/**
@license
DayPilot Pro for JavaScript 2019.4.4160 (trial)
Copyright (c) 2005 - 2019 Annpoint s.r.o.
https://www.daypilot.org/
Use of this software is subject to license terms.
*/
if ("undefined" == typeof DayPilot) var DayPilot = {};
if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function() {
        function e(e) {
            var t = DayPilot.Date.Cache.Ticks;
            if (t[e]) return DayPilot.Stats.cacheHitsTicks += 1, t[e];
            var i, n = new Date(e),
                a = n.getUTCMilliseconds();
            i = 0 === a ? "" : a < 10 ? ".00" + a : a < 100 ? ".0" + a : "." + a;
            var o = n.getUTCSeconds();
            o < 10 && (o = "0" + o);
            var r = n.getUTCMinutes();
            r < 10 && (r = "0" + r);
            var l = n.getUTCHours();
            l < 10 && (l = "0" + l);
            var s = n.getUTCDate();
            s < 10 && (s = "0" + s);
            var d = n.getUTCMonth() + 1;
            d < 10 && (d = "0" + d);
            var c = n.getUTCFullYear();
            if (c <= 0) throw "The minimum year supported is 1.";
            c < 10 ? c = "000" + c : c < 100 ? c = "00" + c : c < 1e3 && (c = "0" + c);
            var h = c + "-" + d + "-" + s + "T" + l + ":" + r + ":" + o + i;
            return t[e] = h, h
        }

        function t(e, t) {
            return !DayPilot.Util.isNullOrUndefined(e) && (!DayPilot.Util.isNullOrUndefined(t) && e.toLocaleLowerCase() === t.toLocaleLowerCase())
        }

        function i(e) {
            e = Math.min(e, 255), e = Math.max(e, 0);
            var t = e.toString(16);
            return e < 16 ? "0" + t : t
        }
        if ("undefined" == typeof DayPilot.$) {
            DayPilot.$ = function(e) {
                    return document.getElementById(e)
                }, DayPilot.isKhtml = navigator && navigator.userAgent && navigator.userAgent.indexOf("KHTML") !== -1, DayPilot.isIE = navigator && navigator.userAgent && (navigator.userAgent.indexOf("MSIE") !== -1 || navigator.userAgent.indexOf("Trident") !== -1), DayPilot.isIEQuirks = DayPilot.isIE && document.compatMode && "BackCompat" === document.compatMode, DayPilot.browser = {}, DayPilot.browser.ie8 = function() {
                    var e = document.createElement("div");
                    return e.innerHTML = "<!--[if IE 8]><i></i><![endif]-->", 1 === e.getElementsByTagName("i").length
                }(), DayPilot.browser.ie9 = function() {
                    var e = document.createElement("div");
                    return e.innerHTML = "<!--[if IE 9]><i></i><![endif]-->", 1 === e.getElementsByTagName("i").length
                }(), DayPilot.browser.ielt9 = function() {
                    var e = document.createElement("div");
                    return e.innerHTML = "<!--[if lt IE 9]><i></i><![endif]-->", 1 === e.getElementsByTagName("i").length
                }(), DayPilot.browser.ff = navigator && navigator.userAgent && navigator.userAgent.indexOf("Firefox") !== -1, DayPilot.browser.chrome = navigator && navigator.userAgent && navigator.userAgent.indexOf("Chrome") !== -1, DayPilot.browser.ie = DayPilot.isIE, DayPilot.browser.edge = navigator && navigator.userAgent && navigator.userAgent.indexOf("Edge") !== -1, DayPilot.browser.webkit = navigator && navigator.userAgent && navigator.userAgent.indexOf("WebKit") !== -1, DayPilot.browser.passiveEvents = !1,
                function() {
                    try {
                        window.addEventListener("test", null, Object.defineProperty({}, "passive", {
                            "get": function() {
                                DayPilot.browser.passiveEvents = !0
                            }
                        }))
                    } catch (e) {}
                }(), DayPilot.libs = {}, DayPilot.libs.angularjs = "object" == typeof angularjs, DayPilot.touch = {}, DayPilot.touch.start = window.navigator.msPointerEnabled ? "MSPointerDown" : "touchstart", DayPilot.touch.move = window.navigator.msPointerEnabled ? "MSPointerMove" : "touchmove", DayPilot.touch.end = window.navigator.msPointerEnabled ? "MSPointerUp" : "touchend", DayPilot.mo2 = function(e, t) {
                    if (t = t || window.event, "undefined" != typeof t.offsetX) {
                        var i = {
                            x: t.offsetX + 1,
                            y: t.offsetY + 1
                        };
                        if (!e) return i;
                        for (var n = t.srcElement; n && n !== e;) "SPAN" !== n.tagName && (i.x += n.offsetLeft, n.offsetTop > 0 && (i.y += n.offsetTop - n.scrollTop)), n = n.offsetParent;
                        return n ? i : null
                    }
                    if ("undefined" != typeof t.layerX) {
                        var i = {
                            x: t.layerX,
                            y: t.layerY,
                            src: t.target
                        };
                        if (!e) return i;
                        for (var n = t.target; n && "absolute" !== n.style.position && "relative" !== n.style.position;) n = n.parentNode, DayPilot.isKhtml && (i.y += n.scrollTop);
                        for (; n && n !== e;) i.x += n.offsetLeft, i.y += n.offsetTop - n.scrollTop, n = n.offsetParent;
                        return n ? i : null
                    }
                    return null
                }, DayPilot.mo3 = function(e, t) {
                    t = t || window.event;
                    var i, n = DayPilot.page(t);
                    if (n)
                        if (e) {
                            var a = DayPilot.abs(e);
                            if (!a) return null;
                            i = {
                                x: n.x - a.x,
                                y: n.y - a.y
                            }
                        } else i = {
                            x: n.x,
                            y: n.y
                        };
                    else i = DayPilot.mo2(e, t);
                    return i.shift = t.shiftKey, i.meta = t.metaKey, i.ctrl = t.ctrlKey, i.alt = t.altKey, i
                }, DayPilot.mc = function(e) {
                    return e.pageX || e.pageY ? {
                        x: e.pageX,
                        y: e.pageY
                    } : {
                        x: e.clientX + document.documentElement.scrollLeft,
                        y: e.clientY + document.documentElement.scrollTop
                    }
                }, DayPilot.Stats = {}, DayPilot.Stats.eventObjects = 0, DayPilot.Stats.dateObjects = 0, DayPilot.Stats.cacheHitsCtor = 0, DayPilot.Stats.cacheHitsParsing = 0, DayPilot.Stats.cacheHitsTicks = 0, DayPilot.Stats.print = function() {
                    console.log("DayPilot.Stats.eventObjects: " + DayPilot.Stats.eventObjects), console.log("DayPilot.Stats.dateObjects: " + DayPilot.Stats.dateObjects), console.log("DayPilot.Stats.cacheHitsCtor: " + DayPilot.Stats.cacheHitsCtor), console.log("DayPilot.Stats.cacheHitsParsing: " + DayPilot.Stats.cacheHitsParsing), console.log("DayPilot.Stats.cacheHitsTicks: " + DayPilot.Stats.cacheHitsTicks), console.log("DayPilot.Date.Cache.Ctor keys: " + Object.keys(DayPilot.Date.Cache.Ctor).length), console.log("DayPilot.Date.Cache.Parsing keys: " + Object.keys(DayPilot.Date.Cache.Parsing).length)
                }, DayPilot.list = function(e, t) {
                    if (e && e.isDayPilotList && !t) return e;
                    var i = DayPilot.isArray(e) || "[object NodeList]" === Object.prototype.toString.call(e),
                        n = !i && !DayPilot.Util.isNullOrUndefined(e),
                        a = [];
                    if (a.isDayPilotList = !0, a.clone = function() {
                            var e = DayPilot.list();
                            return a.each(function(t) {
                                e.push(t)
                            }), e
                        }, a.each = function(e) {
                            if (e) {
                                if (a.forEach) return void a.forEach(e);
                                for (var t = 0; t < this.length; t++) e(a[t], t, a)
                            }
                        }, a.addProps = function(e) {
                            var t = a.clone();
                            if (e)
                                for (var i in e) t[i] = e[i];
                            return t
                        }, a.last = function() {
                            return 0 === a.length ? null : a[a.length - 1]
                        }, a.first = function() {
                            return 0 === a.length ? null : a[0]
                        }, a.add = function(e) {
                            var t = a.clone();
                            return t.push(e), t
                        }, a.map = function(e) {
                            if ("function" != typeof e) throw "DayPilot.list().map(f): Function expected";
                            var t = DayPilot.list();
                            return a.each(function(i, n, a) {
                                t.push(e(i, n, a))
                            }), t
                        }, a.filter = function(e) {
                            var t = DayPilot.list();
                            if ("function" != typeof e) throw "DayPilot.list().filter(f): Function expected";
                            return a.each(function(i) {
                                e(i) && t.push(i)
                            }), t
                        }, a.concat = function(e) {
                            if (!e) return a;
                            for (var t = a.clone(), i = 0; i < e.length; i++) t.push(e[i]);
                            return t
                        }, a.find || (a.find = function(e) {
                            if ("function" != typeof e) throw "DayPilot.list().find(f): Function expected";
                            for (var t = 0; t < this.length; t++)
                                if (e(a[t])) return a[t]
                        }), a.findIndex || (a.findIndex = function(e) {
                            if ("function" != typeof e) throw "DayPilot.list().findIndex(f): Function expected";
                            for (var t = 0; t < this.length; t++)
                                if (e(a[t])) return t;
                            return -1
                        }), a.some || (a.some = function(e) {
                            if ("function" != typeof e) throw "DayPilot.list().some(f): Function expected";
                            for (var t = 0; t < this.length; t++)
                                if (e(a[t])) return !0;
                            return !1
                        }), a.reduce || (a.reduce = function(e, t) {
                            if ("function" != typeof e) throw "DayPilot.list().reduce(f): Function expected";
                            var i, n = 0;
                            if ("undefined" != typeof t) i = t;
                            else {
                                if (n = 1, 0 === a.length) throw "DayPilot.list().reduce(f): No initial value and empty list";
                                i = a[0]
                            }
                            for (var o = n; o < this.length; o++) i = e(i, a[o], o, this);
                            return i
                        }), a.isEmpty = function() {
                            return 0 === a.length
                        }, i)
                        for (var o = 0; o < e.length; o++) a[o] = e[o];
                    else n && (a[0] = e);
                    return a
                }, DayPilot.list.for = function(e, t) {
                    for (var i = DayPilot.list(), n = 0; n < e; n++) "function" == typeof t ? i.push(t(n)) : i.push(n);
                    return i
                }, DayPilot.line = function(e, t, i, n, a) {
                    a = a || {};
                    var o = {
                            "x": e,
                            "y": t
                        },
                        r = {
                            "x": i,
                            "y": n,
                            "deg": DayPilot.deg(e, t, i, n)
                        },
                        l = !1;
                    if (t < n) {
                        var s = t;
                        t = n, n = s, s = e, e = i, i = s, l = !0
                    }
                    var d = DayPilot.deg(e, t, i, n),
                        c = {
                            "x": e,
                            "y": t
                        },
                        h = {
                            "x": i,
                            "y": n
                        },
                        u = function() {
                            var a = Math.abs(e - i),
                                o = Math.abs(t - n),
                                r = (e + i) / 2;
                            return r - Math.sqrt(a * a + o * o) / 2
                        }(),
                        f = function() {
                            return (t + n) / 2
                        }(),
                        v = DayPilot.distance(c, h),
                        p = document.createElement("div");
                    p.setAttribute("style", "width:" + v + "px;height:0px;-moz-transform:rotate(" + d + "deg);-webkit-transform:rotate(" + d + "deg);-ms-transform:rotate(" + d + "deg);transform:rotate(" + d + "deg);position:absolute;top:" + f + "px;left:" + u + "px;"), a.cssClass && (p.className = a.cssClass);
                    var m = document.createElement("div");
                    m.appendChild(p);
                    var g, y, d, b, w = !!a.arrow;
                    if (w) {
                        var g = r.y - 5,
                            y = r.x - 5,
                            d = d;
                        r.y > o.y && (d -= 180);
                        var b = document.createElement("div");
                        b.style.borderColor = "black", b.style.width = "10px", b.style.height = "10px", b.style.borderRadius = "10px", b.style.position = "absolute", b.style.left = y + "px", b.style.top = g + "px", a.cssClass ? b.className = a.cssClass + "_circle" : b.style.backgroundColor = "black", m.appendChild(b)
                    }
                    return m
                }, DayPilot.deg = function(e, t, i, n) {
                    var a, o = Math.abs(e - i),
                        r = Math.abs(t - n),
                        l = (e + i) / 2,
                        s = (t + n) / 2,
                        d = Math.sqrt(o * o + r * r),
                        c = l - d / 2,
                        h = s;
                    o = d / 2, a = Math.abs(l - c), r = Math.sqrt(Math.abs(e - c) * Math.abs(e - c) + Math.abs(t - h) * Math.abs(t - h));
                    var u = (r * r - o * o - a * a) / (2 * o * a);
                    return 180 * Math.acos(u) / Math.PI
                }, DayPilot.complete = function(e) {
                    return "complete" === document.readyState ? void e() : (DayPilot.complete.list || (DayPilot.complete.list = [], DayPilot.re(document, "readystatechange", function() {
                        if ("complete" === document.readyState) {
                            for (var e = 0; e < DayPilot.complete.list.length; e++) {
                                (0, DayPilot.complete.list[e])()
                            }
                            DayPilot.complete.list = []
                        }
                    })), void DayPilot.complete.list.push(e))
                }, DayPilot.page = function(e) {
                    return e = e || window.event, "undefined" == typeof e.pageX || DayPilot.browser.ie ? "undefined" != typeof e.clientX && document.body && document.documentElement ? {
                        x: e.clientX + document.body.scrollLeft + document.documentElement.scrollLeft,
                        y: e.clientY + document.body.scrollTop + document.documentElement.scrollTop
                    } : null : {
                        x: e.pageX,
                        y: e.pageY
                    }
                }, DayPilot.rel = function(e, t) {
                    var i = DayPilot.abs(e),
                        n = DayPilot.abs(t);
                    return {
                        "x": i.x - n.x,
                        "y": i.y - n.y,
                        "w": e.offsetWidth,
                        "h": e.offsetHeight
                    }
                }, DayPilot.abs = function(e, t) {
                    if (!e) return null;
                    if (!document.body.contains(e)) return null;
                    if (e.getBoundingClientRect) {
                        var i = DayPilot.absBoundingClientBased(e);
                        if (t) {
                            var n = DayPilot.absOffsetBased(e, !1),
                                t = DayPilot.absOffsetBased(e, !0);
                            i.x += t.x - n.x, i.y += t.y - n.y, i.w = t.w, i.h = t.h
                        }
                        return i
                    }
                    return DayPilot.absOffsetBased(e, t)
                }, DayPilot.absBoundingClientBased = function(e) {
                    var t = e.getBoundingClientRect();
                    return {
                        x: t.left + window.pageXOffset,
                        y: t.top + window.pageYOffset,
                        w: e.clientWidth,
                        h: e.clientHeight,
                        toString: function() {
                            return "x:" + this.x + " y:" + this.y + " w:" + this.w + " h:" + this.h
                        }
                    }
                }, DayPilot.isArray = function(e) {
                    return "[object Array]" === Object.prototype.toString.call(e)
                }, DayPilot.absOffsetBased = function(e, t) {
                    for (var i = {
                            x: e.offsetLeft,
                            y: e.offsetTop,
                            w: e.clientWidth,
                            h: e.clientHeight,
                            toString: function() {
                                return "x:" + this.x + " y:" + this.y + " w:" + this.w + " h:" + this.h
                            }
                        }; DayPilot.op(e);) e = DayPilot.op(e), i.x -= e.scrollLeft, i.y -= e.scrollTop, t && (i.x < 0 && (i.w += i.x, i.x = 0), i.y < 0 && (i.h += i.y, i.y = 0), e.scrollLeft > 0 && i.x + i.w > e.clientWidth && (i.w -= i.x + i.w - e.clientWidth), e.scrollTop && i.y + i.h > e.clientHeight && (i.h -= i.y + i.h - e.clientHeight)), i.x += e.offsetLeft, i.y += e.offsetTop;
                    var n = DayPilot.pageOffset();
                    return i.x += n.x, i.y += n.y, i
                }, DayPilot.wd = function() {
                    var e = DayPilot.isIEQuirks,
                        t = document.documentElement.clientHeight;
                    e && (t = document.body.clientHeight);
                    var i = document.documentElement.clientWidth;
                    e && (i = document.body.clientWidth);
                    var n = document.documentElement && document.documentElement.scrollTop || document.body.scrollTop,
                        a = document.documentElement && document.documentElement.scrollLeft || document.body.scrollLeft,
                        o = {};
                    return o.width = i, o.height = t, o.scrollTop = n, o.scrollLeft = a, o
                }, DayPilot.op = function(e) {
                    try {
                        return e.offsetParent
                    } catch (e) {
                        return document.body
                    }
                }, DayPilot.distance = function(e, t) {
                    return Math.sqrt(Math.pow(e.x - t.x, 2) + Math.pow(e.y - t.y, 2))
                }, DayPilot.doc = function() {
                    var e = document.documentElement;
                    return e && e.clientHeight ? e : document.body
                }, DayPilot.pageOffset = function() {
                    if ("undefined" != typeof window.pageXOffset) return {
                        x: window.pageXOffset,
                        y: window.pageYOffset
                    };
                    var e = DayPilot.doc();
                    return {
                        x: e.scrollLeft,
                        y: e.scrollTop
                    }
                }, DayPilot.ac = function(e, t) {
                    if (!t) var t = [];
                    for (var i = 0; e.children && i < e.children.length; i++) t.push(e.children[i]), DayPilot.ac(e.children[i], t);
                    return t
                }, DayPilot.indexOf = function(e, t, i) {
                    if (!e || !e.length) return -1;
                    for (var n = 0; n < e.length; n++)
                        if (i) {
                            if (i(e[n], t)) return n
                        } else if (e[n] === t) return n;
                    return -1
                }, DayPilot.contains = function(e, t) {
                    return !!e && (e === t && !DayPilot.isArray(e) || DayPilot.indexOf(e, t) !== -1)
                }, DayPilot.rfa = function(e, t) {
                    var i = DayPilot.indexOf(e, t);
                    i !== -1 && e.splice(i, 1)
                }, DayPilot.sheet = function(e) {
                    e = e || window.document;
                    var t = e.createElement("style");
                    t.setAttribute("type", "text/css"), t.styleSheet || t.appendChild(e.createTextNode("")), (e.head || e.getElementsByTagName("head")[0]).appendChild(t);
                    var i = !!t.styleSheet,
                        n = {};
                    return n.rules = [], n.commit = function() {
                        try {
                            i && (t.styleSheet.cssText = this.rules.join("\n"))
                        } catch (e) {}
                    }, n.add = function(e, a, o) {
                        if (i) return void this.rules.push(e + "{" + a + "}");
                        if (t.sheet.insertRule) "undefined" == typeof o && (o = t.sheet.cssRules.length), t.sheet.insertRule(e + "{" + a + "}", o);
                        else {
                            if (!t.sheet.addRule) throw "No CSS registration method found";
                            t.sheet.addRule(e, a, o)
                        }
                        return n
                    }, n
                }, DayPilot.Args = function(e) {
                    var t = this;
                    this.isArgs = !0, this.preventDefault = function() {
                        e && e.preventDefault(), t.preventDefault.value = !0
                    }
                }, DayPilot.Debug = function(e) {
                    var t = this;
                    this.printToBrowserConsole = !1, this.enabled = !1, this.messages = [], this.target = null, this.a = null, this.clear = function() {
                        this.messages = [], t.a && (t.a.innerHTML = "")
                    }, this.hide = function() {
                        DayPilot.de(t.a), t.a = null
                    }, this.show = function() {
                        t.a && t.hide();
                        var i = e.nav.top,
                            n = document.createElement("div");
                        n.style.position = "absolute", n.style.top = "0px", n.style.bottom = "0px", n.style.left = "0px", n.style.right = "0px", n.style.backgroundColor = "black", n.style.color = "#ccc", n.style.overflow = "auto", n.style.webkitUserSelect = "auto", n.style.MozUserSelect = "all", n.onclick = function() {
                            t.hide()
                        };
                        for (var a = 0; a < this.messages.length; a++) {
                            var o = t.messages[a],
                                r = o.c();
                            n.appendChild(r)
                        }
                        this.a = n, i.appendChild(n)
                    }, this.log = function() {
                        if (t.target) {
                            for (var e = [], i = 0; i < arguments.length; i++) {
                                var n = arguments[i];
                                e.push(n)
                            }
                            var a = e.join(" ");
                            t.target.style.whiteSpace = "pre", t.target.innerText += a + "\n"
                        }
                    }, this.message = function(e, t) {
                        if (this.enabled) {
                            var i = {};
                            i.time = new DayPilot.Date, i.level = t || "debug", i.text = e, i.c = function() {
                                var e = document.createElement("div");
                                switch (e.innerHTML = i.time + " (" + i.level + "): " + i.text, i.level) {
                                    case "error":
                                        e.style.color = "red";
                                        break;
                                    case "warning":
                                        e.style.color = "orange";
                                        break;
                                    case "info":
                                        e.style.color = "white";
                                        break;
                                    case "debug":
                                }
                                return e
                            }, this.messages.push(i), this.printToBrowserConsole && "undefined" != typeof console && console.log(i)
                        }
                    }
                }, DayPilot.re = function(e, t, i) {
                    i && e && e.addEventListener(t, i, !1)
                }, DayPilot.ue = function(e, t, i) {
                    e.removeEventListener(t, i, !1)
                }, DayPilot.ds = function(e) {
                    return DayPilot.Date.toStringSortable(e)
                }, DayPilot.gs = function(e, t) {
                    return window.getComputedStyle(e, null).getPropertyValue(t) || ""
                }, DayPilot.StyleReader = function(e) {
                    this.get = function(t) {
                        return e ? DayPilot.gs(e, t) : null
                    }, this.getPx = function(e) {
                        var t = this.get(e);
                        return t.indexOf("px") === -1 ? void 0 : parseInt(t, 10)
                    }, this.getFont = function() {
                        var e = this.get("font-weight"),
                            t = "italic" === this.get("font-style") ? "italic" : "";
                        return {
                            "family": this.get("font-family"),
                            "size": this.get("font-size"),
                            "style": t + " " + e,
                            "asString": function() {
                                return DayPilot.Util.fontString(this)
                            }
                        }
                    }, this.getBackColor = function(e) {
                        "undefined" == typeof e && (e = "white");
                        var t = this.get("background-color");
                        return DayPilot.Util.isTransparentColor(t) ? e : t
                    }
                }, DayPilot.he = function(e) {
                    var t = e.replace(/&/g, "&amp;");
                    return t = t.replace(/</g, "&lt;"), t = t.replace(/>/g, "&gt;"), t = t.replace(/"/g, "&quot;")
                }, DayPilot.he2 = function(e) {
                    var t = document.createTextNode(e),
                        i = document.createElement("div");
                    return i.appendChild(t), i.innerHTML
                }, DayPilot.us = function(e) {
                    if (e) {
                        e.setAttribute("unselectable", "on"), e.style.userSelect = "none", e.style.MozUserSelect = "none", e.style.KhtmlUserSelect = "none", e.style.webkitUserSelect = "none";
                        for (var t = 0; t < e.childNodes.length; t++) 1 === e.childNodes[t].nodeType && DayPilot.us(e.childNodes[t])
                    }
                }, DayPilot.pu = function(e) {
                    var t, i, n, a = e.attributes;
                    if (a)
                        for (i = a.length, t = 0; t < i; t += 1) a[t] && (n = a[t].name, "function" == typeof e[n] && (e[n] = null));
                    if (a = e.childNodes)
                        for (i = a.length, t = 0; t < i; t += 1) {
                            DayPilot.pu(e.childNodes[t])
                        }
                }, DayPilot.puc = function(e) {
                    var t, i, n = e.childNodes;
                    if (n) {
                        var i = n.length;
                        for (t = 0; t < i; t += 1) DayPilot.pu(e.childNodes[t])
                    }
                }, DayPilot.de = function(e) {
                    if (e)
                        if (DayPilot.isArray(e))
                            for (var t = 0; t < e.length; t++) DayPilot.de(e[t]);
                        else e.parentNode && e.parentNode.removeChild(e)
                }, DayPilot.fade = function(e, t, i) {
                    if (e) {
                        clearTimeout(e.messageTimeout);
                        var n = "none" !== e.style.display,
                            a = t > 0,
                            o = t < 0;
                        if (0 !== t) {
                            if (a ? e.status = "in" : o && (e.status = "out"), a && !n) e.target = parseFloat(e.style.opacity), e.opacity = 0, e.style.opacity = 0, e.style.filter = "alpha(opacity=0)", e.style.display = "";
                            else if (o && !e.target) e.target = e.style.opacity;
                            else {
                                var r = e.opacity,
                                    l = Math.floor(10 * (r + t)) / 10;
                                a && l > e.target && (l = e.target), o && l < 0 && (l = 0);
                                var s = 100 * l;
                                e.opacity = l, e.style.opacity = l, e.style.filter = "alpha(opacity=" + s + ")"
                            }
                            if (a && (e.opacity >= e.target || e.opacity >= 1) || o && e.opacity <= 0) {
                                if (e.target = null, o) {
                                    e.style.opacity = e.target, e.opacity = e.target;
                                    var d = e.target ? "alpha(opacity=" + 100 * e.target + ")" : null;
                                    e.style.filter = d, e.style.display = "none"
                                }
                                i && "function" == typeof i && (e.status = null, i())
                            } else e.messageTimeout = setTimeout(function() {
                                DayPilot.fade(e, t, i)
                            }, 50)
                        }
                    }
                }, DayPilot.sw = function(e) {
                    return e ? e.offsetWidth - e.clientWidth : 0
                }, DayPilot.swa = function() {
                    var e = document.createElement("div");
                    e.style.position = "absolute", e.style.top = "-2000px", e.style.left = "-2000px", e.style.width = "200px", e.style.height = "100px", e.style.overflow = "auto";
                    var t = document.createElement("div");
                    t.style.width = "300px", t.style.height = "300px", e.appendChild(t), document.body.appendChild(e);
                    var i = DayPilot.sw(e);
                    return document.body.removeChild(e), i
                }, DayPilot.sh = function(e) {
                    return e ? e.offsetHeight - e.clientHeight : 0
                }, DayPilot.guid = function() {
                    var e = function() {
                        return (65536 * (1 + Math.random()) | 0).toString(16).substring(1)
                    };
                    return "" + e() + e() + "-" + e() + "-" + e() + "-" + e() + "-" + e() + e() + e()
                }, DayPilot.ua = function(e) {
                    if ("string" == typeof e || "number" == typeof e) return [e];
                    for (var t = {}, i = [], n = 0, a = e.length; n < a; ++n) e[n] in t || (i.push(e[n]), t[e[n]] = 1);
                    return i
                }, DayPilot.am = function() {
                    return "undefined" == typeof angular ? null : (DayPilot.am.cached || (DayPilot.am.cached = angular.module("daypilot", [])), DayPilot.am.cached)
                },
                function() {
                    function e(e, n) {
                        var a = {
                            w: e.offsetWidth,
                            h: e.offsetHeight,
                            x: parseInt(e.style.left),
                            y: parseInt(e.style.top)
                        };
                        a.height = e.style.height, a.width = e.style.width, a.top = e.style.top, a.left = e.style.left, a.toString = function() {
                            return "w: " + this.w + " h:" + this.h
                        };
                        var o = {};
                        if (o.finished = null, o.vertical = "center", o.horizontal = "center", n)
                            for (var r in n) o[r] = n[r];
                        e.style.visibility = "hidden", e.style.display = "";
                        var l = n.animation || "fast",
                            s = t(l);
                        s.div = e, s.i = 0, s.target = a, s.config = o, i(s)
                    }

                    function t(e) {
                        var t = function() {
                                var e = [];
                                e.time = 10;
                                var t, i = .08;
                                t = .1;
                                for (var n = t; n < 1.2; n += i) e.push(n), t = n;
                                i = .03;
                                for (var n = t; n > .8; n -= i) e.push(n), t = n;
                                for (var n = t; n <= 1; n += i) e.push(n), t = n;
                                return e
                            },
                            i = function() {
                                var e = [];
                                e.time = 10;
                                var t, i = .04;
                                t = .1;
                                for (var n = t; n <= 1; n += i) e.push(n), t = n;
                                return e
                            },
                            n = function() {
                                var e = [];
                                e.time = 10;
                                var t, i = .08;
                                t = .1;
                                for (var n = t; n <= 1; n += i) e.push(n), t = n;
                                return e
                            },
                            a = {
                                "fast": n,
                                "slow": i,
                                "jump": t
                            };
                        return a[e] || (e = "fast"), a[e]()
                    }

                    function i(e) {
                        var t, n = e.div,
                            a = e[e.i],
                            o = a * e.target.h;
                        switch (e.config.vertical) {
                            case "center":
                                t = e.target.y - (o - e.target.h) / 2;
                                break;
                            case "top":
                                t = e.target.y;
                                break;
                            case "bottom":
                                t = e.target.y - (o - e.target.h);
                                break;
                            default:
                                throw "Unexpected 'vertical' value."
                        }
                        var r, l = a * e.target.w;
                        switch (e.config.horizontal) {
                            case "left":
                                r = e.target.x;
                                break;
                            case "center":
                                r = e.target.x - (l - e.target.w) / 2;
                                break;
                            case "right":
                                r = e.target.x - (l - e.target.w);
                                break;
                            default:
                                throw "Unexpected 'horizontal' value."
                        }
                        n.style.height = o + "px", n.style.top = t + "px", n.style.width = l + "px", n.style.left = r + "px", n.style.visibility = "visible", e.i++, e.i < e.length - 1 ? setTimeout(function(e) {
                            return function() {
                                i(e)
                            }
                        }(e), e.time) : (n.style.width = e.target.width, n.style.height = e.target.height, n.style.top = e.target.top, n.style.left = e.target.left, "function" == typeof e.config.finished && e.config.finished())
                    }
                    DayPilot.pop = e
                }(), DayPilot.Util = {}, DayPilot.Util.addClass = function(e, t) {
                    if (t && e)
                        if (DayPilot.isArray(e))
                            for (var i = 0; i < e.length; i++) DayPilot.Util.addClass(e[i], t);
                        else {
                            if (!e.className) return void(e.className = t);
                            var n = new RegExp("(^|\\s)" + t + "($|\\s)");
                            n.test(e.className) || (e.className = e.className + " " + t)
                        }
                }, DayPilot.Util.normalizeColor = function(e) {
                    function t(e) {
                        return e = e.replace(/[^\d,]/g, "").split(","), "#" + ((1 << 24) + (+e[0] << 16) + (+e[1] << 8) + +e[2]).toString(16).slice(1)
                    }
                    return 0 === e.indexOf("rgb") ? t(e) : e
                }, DayPilot.Util.addClassToString = function(e, t) {
                    return e ? new RegExp("(^|\\s)" + t + "($|\\s)").test(e) ? e : e + " " + t : t
                }, DayPilot.Util.removeClassFromString = function(e, t) {
                    if (!e) return "";
                    var i = new RegExp("(^|\\s)" + t + "($|\\s)");
                    return e.replace(i, " ").replace(/^\s\s*/, "").replace(/\s\s*$/, "")
                }, DayPilot.Util.removeClass = function(e, t) {
                    if (e)
                        if (DayPilot.isArray(e))
                            for (var i = 0; i < e.length; i++) DayPilot.Util.removeClass(e[i], t);
                        else if (e.className) {
                        var n = new RegExp("(^|\\s)" + t + "($|\\s)");
                        e.className = e.className.replace(n, " ").replace(/^\s\s*/, "").replace(/\s\s*$/, "")
                    }
                }, DayPilot.Util.props = function(e) {
                    var t = [];
                    for (var i in e) t.push(i), t.push(e[i]);
                    return t.join("-")
                }, DayPilot.Util.propArray = function(e, t, i) {
                    return DayPilot.list(e).map(function(e) {
                        return e[t] ? e[t] : i
                    })
                }, DayPilot.Util.updatePropsFromArray = function(e, t, i) {
                    for (var n = 0; n < i.length; n++) e[n][t] = i[n]
                }, DayPilot.Util.copyProps = function(e, t, i) {
                    if (e) {
                        if (t || (t = {}), "undefined" == typeof i)
                            for (var n in e) e.hasOwnProperty(n) && "undefined" != typeof e[n] && (t[n] = e[n]);
                        else
                            for (var a = 0; a < i.length; a++) {
                                var n = i[a];
                                "undefined" != typeof e[n] && (t[n] = e[n])
                            }
                        return t
                    }
                }, DayPilot.Util.ownPropsAsArray = function(e) {
                    var t = [];
                    if (!e) return t;
                    for (var i in e)
                        if (e.hasOwnProperty(i)) {
                            var n = {};
                            n.key = i, n.val = e[i], t.push(n)
                        } return t
                }, DayPilot.Util.firstPropValue = function(e) {
                    for (var t in e) return e[t]
                }, DayPilot.Util.isOnlyProperty = function(e, t) {
                    if (!e) return !1;
                    for (var i in e)
                        if (e.hasOwnProperty(i) && i !== t) return !1;
                    return !0
                }, DayPilot.Util.createArrayCopy = function(e, t) {
                    if (!DayPilot.isArray(e)) return [];
                    for (var i = [], n = 0; n < e.length; n++) {
                        var a = {};
                        DayPilot.Util.copyProps(e[n], a, t), i.push(a)
                    }
                    return i
                }, DayPilot.Util.atLeast = function(e, t) {
                    return Math.max(e, t)
                }, DayPilot.Util.avg = function(e, t) {
                    return (e + t) / 2
                }, DayPilot.Util.div = function(e, t, i, n, a) {
                    var o = document.createElement("div");
                    return (t || i || n || a) && (n < 0 && (t += n, n *= -1), a < 0 && (i += a, a *= -1), o.style.position = "absolute", "number" == typeof t ? o.style.left = t + "px" : "string" == typeof t && (o.style.left = t), "number" == typeof i ? o.style.top = i + "px" : "string" == typeof i && (o.style.top = i), "number" == typeof n ? o.style.width = n + "px" : "string" == typeof n && (o.style.width = n), "number" == typeof a ? o.style.height = a + "px" : "string" == typeof a && (o.style.height = a)), e && e.appendChild(o), o
                }, DayPilot.Util.overlaps = function(e, t, i, n) {
                    return !(t <= i || e >= n)
                }, DayPilot.Util.isMouseEvent = function(e) {
                    return !!navigator.msPointerEnabled && (!!e.pointerType && ("mouse" === e.pointerType || 4 === e.pointerType))
                }, DayPilot.Util.mouseButton = function(e) {
                    var t = {};
                    switch (e.button) {
                        case 0:
                            t.left = !0;
                            break;
                        case 1:
                            t.middle = !0;
                            break;
                        case 2:
                            t.right = !0
                    }
                    return t
                }, DayPilot.Util.membersPlain = function(e) {
                    var t = DayPilot.Util.members(e, 2),
                        i = function(e) {
                            for (var t = 0; t < e.length; t++) {
                                var i = e[t],
                                    n = i.name;
                                i.obsolete && (n += " (obsolete)"), i.noCssOnly && (n += " (!cssOnly)"), i.aspnet && (n += " (ASP.NET)"), i.mvc && (n += "(MVC)"), e[t] = n
                            }
                        };
                    return i(t.events), i(t.methods), i(t.properties), t
                }, DayPilot.Util.shouldApply = function(e) {
                    if (!e) return !1;
                    var t = e.toLowerCase();
                    return !(t.indexOf("before") >= 0) && (!(t.indexOf("after") >= 0) && ("onrowfilter" !== t && "oneventfilter" !== t))
                }, DayPilot.Util.safeApply = function(e, t) {
                    var i = e["$root"]["$$phase"];
                    "$apply" === i || "$digest" === i ? e["$eval"](t) : e["$apply"](t)
                }, DayPilot.Util.members = function(e, t) {
                    var i = DayPilot.list(),
                        n = DayPilot.list(),
                        a = DayPilot.list(),
                        o = e && e.members ? e.members.obsolete : [],
                        r = e && e.members ? e.members.noCssOnly : [],
                        l = e && e.members ? e.members.ignore : [],
                        s = e && e.members && e.members.ignoreFilter ? e.members.ignoreFilter : function() {
                            return !1
                        };
                    for (var d in e)
                        if (0 !== d.indexOf("$") && 0 !== d.indexOf("_") && 0 !== d.indexOf("number") && 0 !== d.indexOf("is") && "v" !== d && !DayPilot.contains(l, d) && !s(d))
                            if (0 !== d.indexOf("on"))
                                if ("function" != typeof e[d])
                                    if ("object" != typeof e[d]) a.push(d);
                                    else {
                                        var c = e[d];
                                        if (0 === t) {
                                            a.push(d);
                                            continue
                                        }
                                        if (c && c.nodeType > 0) {
                                            a.push(d);
                                            continue
                                        }
                                        if (c instanceof DayPilot.Bubble) {
                                            a.push(d);
                                            continue
                                        }
                                        if (c instanceof DayPilot.Date) {
                                            a.push(d);
                                            continue
                                        }
                                        if (c instanceof DayPilot.Menu) {
                                            a.push(d);
                                            continue
                                        }
                                        if (c instanceof DayPilot.Scheduler) {
                                            a.push(d);
                                            continue
                                        }
                                        if (DayPilot.isArray(c)) {
                                            a.push(d);
                                            continue
                                        }
                                        null === c && a.push(d);
                                        var h = null;
                                        "number" == typeof t && (h = t - 1);
                                        for (var u = DayPilot.Util.members(c, h), f = 0; f < u.events.length; f++) i.push(d + "." + u.events[f].name);
                                        for (var f = 0; f < u.methods.length; f++) n.push(d + "." + u.methods[f].name);
                                        for (var f = 0; f < u.properties.length; f++) a.push(d + "." + u.properties[f].name)
                                    }
                    else n.push(d);
                    else i.push(d);
                    i.sort(), n.sort(), a.sort();
                    var v = function(e) {
                        for (var t = 0; t < e.length; t++) {
                            var i = e[t],
                                n = {};
                            n.name = i, e[t] = n, DayPilot.contains(o, i) && (n.obsolete = !0), DayPilot.contains(r, i) && (n.noCssOnly = !0), i.indexOf("CallBack") !== -1 && (n.aspnet = !0, n.mvc = !0), i.indexOf("PostBack") !== -1 && (n.aspnet = !0), i.indexOf("Notify") !== -1 && (n.aspnet = !0, n.mvc = !0)
                        }
                    };
                    return v(i), v(n), v(a), {
                        "events": i,
                        "methods": n,
                        "properties": a
                    }
                }, DayPilot.Util.replaceCharAt = function(e, t, i) {
                    return e.substr(0, t) + i + e.substr(t + i.length)
                }, DayPilot.Util.evalVariable = function(e, t) {
                    if (t = t || ["object"], null === e || "undefined" == typeof e) return null;
                    if (DayPilot.indexOf(t, typeof e) !== -1) return e;
                    if ("string" != typeof e) throw "Unable to resolve a variable name (not a string).";
                    if (!/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(e)) throw "Invalid variable name: " + e;
                    return eval(e)
                }, DayPilot.Util.evalFunction = function(e) {
                    if (null === e) return null;
                    if ("function" == typeof e) return e;
                    if ("string" != typeof e) throw "Unable to resolve a function (not a string).";
                    if (!/^\(?function/.test(e)) throw "Invalid function string";
                    return eval("(" + e + ")")
                }, DayPilot.Util.isNullOrUndefined = function(e) {
                    return null === e || "undefined" == typeof e
                }, DayPilot.Util.log = function(e) {
                    window.console && window.console.log && window.console.log(e)
                }, DayPilot.Util.workerFrom = function(e) {
                    var t = e.toString(),
                        i = t.slice(t.indexOf("{") + 1, t.lastIndexOf("}")),
                        n = new Blob([i]),
                        a = window.URL.createObjectURL(n);
                    return new Worker(a)
                }, DayPilot.Util.dataUriToBlob = function(e) {
                    if ("string" != typeof e) throw "DayPilot.Util.dataUriToBlob(): dataURI string expected";
                    for (var t = e.split(","), i = t[0], n = t[1], a = i.indexOf("base64") !== -1, o = a ? atob : decodeURI, r = i.split(":")[1].split(";")[0], l = o(n), s = new window.Uint8Array(l.length), d = 0; d < l.length; d++) s[d] = l.charCodeAt(d);
                    return new Blob([s], {
                        "type": r
                    })
                }, DayPilot.Util.downloadDataUri = function(e, t) {
                    var i = DayPilot.Util.dataUriToBlob(e);
                    DayPilot.Util.downloadBlob(i, t)
                }, DayPilot.Util.downloadBlob = function(e, t) {
                    var t = t || "download";
                    if (window.navigator.msSaveBlob) window.navigator.msSaveBlob(e, t);
                    else {
                        var i = window.URL.createObjectURL(e),
                            n = document.createElement("a");
                        n.download = t, n.href = i, n.style = "display:none", document.body.appendChild(n), n.click(), setTimeout(function() {
                            document.body.removeChild(n), window.URL.revokeObjectURL(i)
                        })
                    }
                }, DayPilot.Util.monitor = function(e, t, i) {
                    var n = e[t];
                    e[t] = function() {
                        i.apply(e, arguments), n.apply(e, arguments)
                    }
                }, DayPilot.Util.isTransparentColor = function(e) {
                    return "transparent" === e || "rgba(0, 0, 0, 0)" === e
                }, DayPilot.Util.stripTags = function(e) {
                    if (DayPilot.Util.isNullOrUndefined(e)) return e;
                    if ("string" == typeof e) return e.replace(/<(?:.|\n)*?>/gm, "");
                    throw new DayPilot.Exception("Unable to strip tags from a non-string")
                }, DayPilot.Util.escapeHtml = function(e) {
                    var t = document.createElement("div");
                    return t.innerText = e, t.innerHTML
                }, DayPilot.Util.isSameEvent = function(e, t) {
                    return !(!e || !t) && (e = e instanceof DayPilot.Event ? e.data : e, t = t instanceof DayPilot.Event ? t.data : t, e === t || (!DayPilot.Util.isNullOrUndefined(e.id) && e.id === t.id || !(!DayPilot.Util.isNullOrUndefined(e.id) || DayPilot.Util.isNullOrUndefined(e.recurrentMasterId)) && (e.recurrentMasterId === t.recurrentMasterId && new DayPilot.Date(e.start) === new DayPilot.Date(t.start))))
                }, DayPilot.Util.isReactComponent = function(e) {
                    return e && e.$$typeof === ("function" == typeof Symbol && Symbol.for && Symbol.for("react.element") || 60103)
                }, DayPilot.Util.fontString = function(e) {
                    return (e.style + " " + e.size + " " + e.family).trim()
                }, DayPilot.Util.fontHeight = function(e) {
                    var t = DayPilot.Util.fontString(e);
                    if ("number" != typeof DayPilot.Util.fontHeight.cache[t]) {
                        var i = document.createElement("div");
                        i.style.position = "fixed", i.style.left = "-2000px;", i.style.top = "-2000px", i.style.padding = "0px", i.style.font = t, i.innerText = "X", document.body.appendChild(i), DayPilot.Util.fontHeight.cache[t] = new DayPilot.StyleReader(i).getPx("height"), document.body.removeChild(i)
                    }
                    return DayPilot.Util.fontHeight.cache[t]
                }, DayPilot.Util.fontHeight.cache = {}, DayPilot.Areas = {}, DayPilot.Areas.attach = function(e, t, i) {
                    var i = i || {},
                        a = i.areas,
                        o = i.allowed || function() {
                            return !0
                        },
                        r = i.offsetX || 0;
                    a = n(t, a), a && DayPilot.isArray(a) && 0 !== a.length && (DayPilot.re(e, "mousemove", function(n) {
                        e.active || e.areasDisabled || !o() || DayPilot.Areas.showAreas(e, t, n, a, {
                            "offsetX": r,
                            "eventDiv": i.eventDiv
                        })
                    }), DayPilot.re(e, "mouseout", function(t) {
                        DayPilot.Areas.hideAreas(e, t)
                    }), DayPilot.list(a).each(function(n) {
                        if (DayPilot.Areas.isVisible(n)) {
                            var a = DayPilot.Areas.createArea(e, t, n, {
                                "offsetX": r,
                                "eventDiv": i.eventDiv
                            });
                            e.appendChild(a)
                        }
                    }))
                }, DayPilot.Areas.disable = function(e) {
                    e.areasDisabled = !0, DayPilot.list(e.childNodes).filter(function(e) {
                        return e.isActiveArea && !e.area.start
                    }).each(function(e) {
                        e.style.display = "none"
                    })
                }, DayPilot.Areas.enable = function(e) {
                    e.areasDisabled = !1, DayPilot.list(e.childNodes).filter(function(e) {
                        return e.isActiveArea && !e.area.start
                    }).each(function(e) {
                        e.style.display = ""
                    })
                }, DayPilot.Areas.remove = function(e) {
                    var t = DayPilot.list(e.childNodes).filter(function(e) {
                        return e.isActiveArea
                    });
                    DayPilot.de(t)
                }, DayPilot.Areas.isVisible = function(e) {
                    var t = e.visibility || e.v || "Visible";
                    return "Visible" === t || !("TouchVisible" !== t || !window.matchMedia("(any-hover: none)").matches)
                }, DayPilot.Areas.copy = function(e) {
                    return DayPilot.isArray(e) ? e.map(function(e) {
                        return DayPilot.Util.copyProps(e, {})
                    }) : []
                };
            var n = function(e, t) {
                return DayPilot.isArray(t) || (t = e.areas, t || (e.cache ? t = e.cache.areas : e.data && (t = e.data.areas))), t
            };
            DayPilot.Areas.showAreas = function(e, t, i, n, a) {
                if (!(DayPilot.Global.resizing || DayPilot.Global.moving || DayPilot.Global.selecting || e.active)) {
                    if (DayPilot.Areas.all && DayPilot.Areas.all.length > 0)
                        for (var o = 0; o < DayPilot.Areas.all.length; o++) {
                            var r = DayPilot.Areas.all[o];
                            r !== e && DayPilot.Areas.hideAreas(r, i)
                        }
                    if (e.active = {}, DayPilot.isArray(n) || (n = t.areas, n || (t.cache ? n = t.cache.areas : t.data && (n = t.data.areas))), n && 0 !== n.length && !(e.areas && e.areas.length > 0)) {
                        e.areas = [];
                        for (var o = 0; o < n.length; o++) {
                            var l = n[o];
                            if (!DayPilot.Areas.isVisible(l)) {
                                var s = DayPilot.Areas.createArea(e, t, l, a);
                                e.areas.push(s), e.appendChild(s), DayPilot.Areas.all.push(e)
                            }
                        }
                        e.active.children = DayPilot.ac(e)
                    }
                }
            }, DayPilot.Areas.createArea = function(e, t, i, n) {
                function a(e, t, i) {
                    DayPilot.Bubble && DayPilot.Bubble.touchPosition(i), e.calendar.bubble && e.calendar.bubble.showEvent(e, !0)
                }

                function o(e, t, i, n) {
                    DayPilot.Menu && DayPilot.Menu.touchPosition(n);
                    var a = i.contextMenu || i.menu;
                    if (a instanceof DayPilot.Menu || ("string" == typeof a ? a = DayPilot.Util.evalVariable(a) : t.isEvent && t.client.contextMenu() ? a = t.client.contextMenu() : t.isEvent && t.calendar.contextMenu ? a = DayPilot.Util.evalVariable(t.calendar.contextMenu) : t.isRow && t.calendar.contextMenuResource && (a = DayPilot.Util.evalVariable(t.calendar.contextMenuResource))), a && a.show) {
                        var o = {
                            "type": "area",
                            "div": e,
                            "e": t,
                            "area": i
                        };
                        a.show(t, {
                            "initiator": o
                        })
                    }
                }
                var n = n || {},
                    r = n.offsetX || 0,
                    l = n.eventDiv || e,
                    s = document.createElement("div");
                s.isActiveArea = !0, s.area = i, s.setAttribute("unselectable", "on");
                var d = i.w || i.width,
                    c = i.h || i.height,
                    h = i.cssClass || i.css || i.className;
                if ("undefined" != typeof i.style && s.setAttribute("style", i.style), s.style.position = "absolute", "undefined" != typeof d && (s.style.width = d + "px"), "undefined" != typeof c && (s.style.height = c + "px"), "undefined" != typeof i.right && (s.style.right = i.right + "px"), "undefined" != typeof i.top && (s.style.top = i.top + "px"), "undefined" != typeof i.left && (s.style.left = i.left + r + "px"), "undefined" != typeof i.bottom && (s.style.bottom = i.bottom + "px"), "undefined" != typeof i.html || "undefined" != typeof i.text) s.innerHTML = i.html || i.text;
                else if (i.icon) {
                    var u = document.createElement("i");
                    u.className = i.icon, s.appendChild(u)
                } else if (i.image) {
                    var f = document.createElement("img");
                    f.src = i.image, s.appendChild(f)
                }
                if (h && (s.className = h), i.toolTip && s.setAttribute("title", i.toolTip), i.backColor && (s.style.background = i.backColor), i.background && (s.style.background = i.background), i.fontColor && (s.style.color = i.fontColor), i.padding && (s.style.padding = i.padding + "px", s.style.boxSizing = "border-box"), i.verticalAlignment) switch (s.style.display = "flex", i.verticalAlignment) {
                    case "center":
                        s.style.alignItems = "center";
                        break;
                    case "top":
                        s.style.alignItems = "flex-start";
                        break;
                    case "bottom":
                        s.style.alignItems = "flex-end"
                }
                if (i.horizontalAlignment) switch (s.style.display = "flex", i.horizontalAlignment) {
                    case "right":
                        s.style.justifyContent = "flex-end";
                        break;
                    case "left":
                        s.style.justifyContent = "flex-start";
                        break;
                    case "center":
                        s.style.justifyContent = "center"
                }
                if ("ResizeEnd" === i.action || "ResizeStart" === i.action || "Move" === i.action) {
                    if (t.calendar.isCalendar) switch (i.action) {
                        case "ResizeEnd":
                            i.cursor = "s-resize", i.dpBorder = "bottom";
                            break;
                        case "ResizeStart":
                            i.cursor = "n-resize", i.dpBorder = "top";
                            break;
                        case "Move":
                            i.cursor = "move"
                    }
                    if (t.calendar.isScheduler || t.calendar.isMonth) switch (i.action) {
                        case "ResizeEnd":
                            i.cursor = "e-resize", i.dpBorder = "right";
                            break;
                        case "ResizeStart":
                            i.cursor = "w-resize", i.dpBorder = "left";
                            break;
                        case "Move":
                            i.cursor = "move"
                    }
                    s.onmousemove = function(e, t, i) {
                        return function(n) {
                            var n = n || window.event;
                            t.calendar.internal && t.calendar.internal.dragInProgress && t.calendar.internal.dragInProgress() || (n.cancelBubble = !0, e.style.cursor = i.cursor, i.dpBorder && (e.dpBorder = i.dpBorder))
                        }
                    }(l, t, i), s.onmouseout = function(e, t, i) {
                        return function(t) {
                            e.style.cursor = ""
                        }
                    }(l, t, i)
                }
                if (("ResizeEnd" === i.action || "ResizeStart" === i.action) && t.isEvent && t.calendar.internal.touch) {
                    var v = function(e, t, i) {
                        return function(n) {
                            n.cancelBubble = !0;
                            var a = t.calendar.internal.touch,
                                o = n.touches ? n.touches[0] : n,
                                r = {
                                    x: o.pageX,
                                    y: o.pageY
                                };
                            t.calendar.coords = a.relativeCoords(n), a.preventEventTap = !0, t.calendar.isScheduler ? a.startResizing(e, "ResizeEnd" === i.action ? "right" : "left") : t.calendar.isCalendar && a.startResizing(e, "ResizeEnd" === i.action ? "bottom" : "top", r)
                        }
                    }(l, t, i);
                    DayPilot.re(s, DayPilot.touch.start, v)
                }
                if ("ContextMenu" === i.action && t.isEvent && t.calendar.internal.touch) {
                    var v = function(e, t, i) {
                            return function(n) {
                                n.cancelBubble = !0, n.preventDefault(), o(e, t, i, n), t.calendar.internal.touch.preventEventTap = !0
                            }
                        }(l, t, i),
                        p = function(e, t, i) {
                            return function(e) {
                                e.cancelBubble = !0, e.preventDefault()
                            }
                        }(l, t, i);
                    DayPilot.re(s, DayPilot.touch.start, v), DayPilot.re(s, DayPilot.touch.end, p)
                }
                if ("Bubble" === i.action && t.isEvent && t.calendar.internal.touch) {
                    var v = function(e, t, i) {
                            return function(e) {
                                e.cancelBubble = !0, e.preventDefault(), a(t, i, e), t.calendar.internal.touch.preventEventTap = !0
                            }
                        }(l, t, i),
                        p = function(e, t, i) {
                            return function(e) {
                                e.cancelBubble = !0, e.preventDefault()
                            }
                        }(l, t, i);
                    DayPilot.re(s, DayPilot.touch.start, v), DayPilot.re(s, DayPilot.touch.end, p)
                }
                if ("Move" === i.action && t.isEvent && t.calendar.internal.touch) {
                    var v = function(e, t, i) {
                        return function(i) {
                            i.cancelBubble = !0;
                            var n = t.calendar.internal.touch,
                                a = i.touches ? i.touches[0] : i,
                                o = {
                                    x: a.pageX,
                                    y: a.pageY
                                };
                            t.calendar.coords = n.relativeCoords(i), n.preventEventTap = !0, n.startMoving(e, o)
                        }
                    }(l, t, i);
                    DayPilot.re(s, DayPilot.touch.start, v)
                }
                if ("Move" === i.action && t.isRow && t.calendar.internal.touch, "Bubble" === i.action && t.isEvent && (s.onmousemove = function(e, t, i) {
                        return function(e) {
                            i.bubble ? i.bubble.showEvent(t, !0) : t.calendar.bubble && t.calendar.bubble.showEvent(t, !0)
                        }
                    }(e, t, i), s.onmouseout = function(e, t, i) {
                        return function(e) {
                            "undefined" != typeof DayPilot.Bubble && (i.bubble ? i.bubble.hideOnMouseOut() : t.calendar.bubble && t.calendar.bubble.hideOnMouseOut())
                        }
                    }(e, t, i)), "Bubble" === i.action && t.isRow && (s.onmousemove = function(e, t, i) {
                        return function(e) {
                            i.bubble ? i.bubble.showResource(t, !0) : t.calendar.resourceBubble && t.calendar.resourceBubble.showResource(t, !0)
                        }
                    }(e, t, i), s.onmouseout = function(e, t, i) {
                        return function(e) {
                            "undefined" != typeof DayPilot.Bubble && (i.bubble ? i.bubble.hideOnMouseOut() : t.calendar.resourceBubble && t.calendar.resourceBubble.hideOnMouseOut())
                        }
                    }(e, t, i)), "HoverMenu" === i.action && (s.onmousemove = function(e, t, i) {
                        return function(e) {
                            var n = i.menu;
                            "string" == typeof n && (n = DayPilot.Util.evalVariable(n)), n && n.show && (n.visible ? n.source && "undefined" != typeof n.source.id && n.source.id !== t.id && n.show(t) : n.show(t), n.cancelHideTimeout())
                        }
                    }(e, t, i), s.onmouseout = function(e, t, i) {
                        return function(e) {
                            var t = i.menu;
                            "string" == typeof t && (t = DayPilot.Util.evalVariable(t)), t && t.hideOnMouseOver && t.delayedHide()
                        }
                    }(e, t, i)), "JavaScript" === i.action) {
                    var v = function(e, t, i) {
                            return function(e) {
                                if (!DayPilot.Util.isMouseEvent(e)) {
                                    e.cancelBubble = !0, e.preventDefault();
                                    t.calendar.internal.touch.start = !0
                                }
                            }
                        }(l, t, i),
                        p = function(e, t, i) {
                            return function(e) {
                                if (!DayPilot.Util.isMouseEvent(e)) {
                                    e.cancelBubble = !0, e.preventDefault();
                                    t.calendar.internal.touch.start = !1;
                                    var n = i.js;
                                    if ("string" == typeof n && (n = DayPilot.Util.evalFunction(i.js)), "function" == typeof n) {
                                        var a = i.target || t;
                                        n.call(this, a)
                                    }
                                }
                            }
                        }(l, t, i);
                    DayPilot.re(s, DayPilot.touch.start, v), DayPilot.re(s, DayPilot.touch.end, p)
                }
                return s.onmousedown = function(e, t, i) {
                    return function(n) {
                        if ("function" == typeof i.onmousedown && i.onmousedown(n), "function" == typeof i.mousedown) {
                            var a = {};
                            a.area = i, a.div = e, a.originalEvent = n, a.source = t, i.mousedown(a)
                        }
                        if ("Move" === i.action && t.isRow) {
                            var o = t.$.row;
                            t.calendar.internal.rowtools.startMoving(o)
                        }
                        "undefined" != typeof DayPilot.Bubble && DayPilot.Bubble.hideActive(), "Move" === i.action && (DayPilot.Global.movingAreaData = i.data), "Move" === i.action && t.isEvent && t.calendar.internal && t.calendar.internal.startMoving && t.calendar.internal.startMoving(e, n);
                        "Move" !== i.action && "ResizeEnd" !== i.action && "ResizeStart" !== i.action && i.action && (n = n || window.event, n.preventDefault(), n.cancelBubble = !0)
                    }
                }(e, t, i), s.onclick = function(e, t, i) {
                    return function(n) {
                        var n = n || window.event,
                            a = {};
                        if (a.area = i, a.source = t, a.originalEvent = n, a.preventDefault = function() {
                                a.preventDefault.value = !0
                            }, "function" != typeof i.onClick || (i.onClick(a), !a.preventDefault.value)) {
                            switch (i.action) {
                                case "JavaScript":
                                    var r = i.js;
                                    if ("string" == typeof r && (r = DayPilot.Util.evalFunction(i.js)), "function" == typeof r) {
                                        var l = i.target || t;
                                        r.call(this, l)
                                    }
                                    n.cancelBubble = !0;
                                    break;
                                case "ContextMenu":
                                    o(e, t, i, n), n.cancelBubble = !0;
                                    break;
                                case "CallBack":
                                    alert("callback not implemented yet, id: " + i.id), n.cancelBubble = !0
                            }
                            "function" == typeof i.onClicked && i.onClicked(a)
                        }
                    }
                }(e, t, i), s
            }, DayPilot.Areas.all = [], DayPilot.Areas.hideAreas = function(e, t) {
                if (e && e && e.active) {
                    var i = e.active,
                        n = e.areas;
                    if (i && i.children) {
                        var t = t || window.event;
                        if (t) {
                            var a = t.toElement || t.relatedTarget;
                            if (~DayPilot.indexOf(i.children, a)) return
                        }
                    }
                    if (!n || 0 === n.length) return void(e.active = null);
                    DayPilot.de(n), e.active = null, e.areas = [], DayPilot.rfa(DayPilot.Areas.all, e), i.children = null
                }
            }, DayPilot.Areas.hideAll = function(e) {
                if (DayPilot.Areas.all && 0 !== DayPilot.Areas.all.length)
                    for (var t = 0; t < DayPilot.Areas.all.length; t++) DayPilot.Areas.hideAreas(DayPilot.Areas.all[t], e)
            }, DayPilot.Action = function(e, t, i, n) {
                var a = this;
                this.calendar = e, this.isAction = !0, this.action = t, this.params = i, this.data = n, this.notify = function() {
                    a.calendar.internal.invokeEvent("Immediate", this.action, this.params, this.data)
                }, this.auto = function() {
                    a.calendar.internal.invokeEvent("Notify", this.action, this.params, this.data)
                }, this.queue = function() {
                    a.calendar.queue.add(this)
                }, this.toJSON = function() {
                    var e = {};
                    return e.name = this.action, e.params = this.params, e.data = this.data, e
                }
            }, DayPilot.Selection = function(e, t, i, n) {
                this.menuType = "selection", this.start = new DayPilot.Date(e), this.end = new DayPilot.Date(t), this.resource = i, this.root = n, this.calendar = n, this.toJSON = function(e) {
                    var t = {};
                    return t.start = this.start, t.end = this.end, t.resource = this.resource, t
                }
            }, DayPilot.Link = function(e, t) {
                this.isLink = !0, this.data = e, this.calendar = t, this.to = function() {
                    return this.data.to
                }, this.from = function() {
                    return this.data.from
                }, this.type = function() {
                    return this.data.type
                }, this.id = function() {
                    return this.data.id
                }, this.toJSON = function() {
                    var e = {};
                    return e.from = this.data.from, e.to = this.data.to, e.id = this.data.id, e.type = this.data.type, e
                }
            }, DayPilot.Event = function(e, t, i) {
                var n = this;
                this.calendar = t, this.data = e ? e : {}, this.part = i ? i : {}, "undefined" == typeof this.data.id && (this.data.id = this.data.value);
                var a = {},
                    o = ["id", "text", "start", "end", "resource"];
                this.isEvent = !0, DayPilot.Stats.eventObjects += 1, this.temp = function() {
                    if (a.dirty) return a;
                    for (var e = 0; e < o.length; e++) a[o[e]] = n.data[o[e]];
                    return a.dirty = !0, a
                }, this.copy = function() {
                    var e = {};
                    return DayPilot.Util.copyProps(n.data, e), e
                }, this.commit = function() {
                    if (a.dirty) {
                        for (var e = 0; e < o.length; e++) n.data[o[e]] = a[o[e]];
                        "function" == typeof n.data.commitCallback && n.data.commitCallback(), a.dirty = !1
                    }
                }, this.dirty = function() {
                    return a.dirty
                }, this.id = function(e) {
                    return "undefined" == typeof e ? n.data.id : void(this.temp().id = e)
                }, this.value = function(e) {
                    return "undefined" == typeof e ? n.id() : void n.id(e)
                }, this.text = function(e) {
                    return "undefined" == typeof e ? n.data.text : (this.temp().text = e, void this.client.innerHTML(e))
                }, this.start = function(e) {
                    return "undefined" == typeof e ? new DayPilot.Date(n.data.start) : void(this.temp().start = new DayPilot.Date(e))
                }, this.end = function(e) {
                    return "undefined" == typeof e ? t && t.internal.adjustEndNormalize ? t.internal.adjustEndNormalize(new DayPilot.Date(n.data.end)) : new DayPilot.Date(n.data.end) : void(this.temp().end = new DayPilot.Date(e))
                }, this.duration = function() {
                    return new DayPilot.Duration(this.start(), this.end())
                }, this.rawend = function(e) {
                    if ("undefined" == typeof e) return t && t.internal.adjustEndIn ? t.internal.adjustEndIn(new DayPilot.Date(n.data.end)) : new DayPilot.Date(n.data.end);
                    throw new DayPilot.Exception("DayPilot.Event.rawend() is readonly")
                }, this.partStart = function() {
                    return new DayPilot.Date(this.part.start)
                }, this.partEnd = function() {
                    return new DayPilot.Date(this.part.end)
                }, this.row = function() {
                    return this.resource()
                }, this.allday = function() {
                    return "undefined" == typeof val ? n.data.allday : void(this.temp().allday = val)
                }, this.isAllDay = this.allday, this.resource = function(e) {
                    return "undefined" == typeof e ? n.data.resource : void(this.temp().resource = e)
                }, this.recurrent = function() {
                    return n.data.recurrent
                }, this.recurrentMasterId = function() {
                    return n.data.recurrentMasterId
                }, this.useBox = function() {
                    return this.part.box
                }, this.staticBubbleHTML = function() {
                    return this.bubbleHtml()
                }, this.bubbleHtml = function() {
                    return n.cache ? n.cache.bubbleHtml || n.data.bubbleHtml : n.data.bubbleHtml
                }, this.tag = function(e) {
                    if (n.data.tags) return n.data.tags[e];
                    var t = n.data.tag;
                    if (!t) return null;
                    if ("undefined" == typeof e) return n.data.tag;
                    for (var i = n.calendar.tagFields, a = -1, o = 0; o < i.length; o++) e === i[o] && (a = o);
                    if (a === -1) throw "Field name not found.";
                    return t[a]
                }, this.client = {}, this.client.innerHTML = function(e) {
                    return "undefined" == typeof e ? n.cache && "undefined" != typeof n.cache.html ? n.cache.html : "undefined" != typeof n.data.html ? n.data.html : n.data.text : (n.data.html = e, void(n.cache && (n.cache.html = e)))
                }, this.client.html = this.client.innerHTML, this.client.header = function(e) {
                    return "undefined" == typeof e ? n.data.header : void(n.data.header = e)
                }, this.client.cssClass = function(e) {
                    return "undefined" == typeof e ? n.data.cssClass : void(n.data.cssClass = e)
                }, this.client.toolTip = function(e) {
                    return "undefined" == typeof e ? n.cache && "undefined" != typeof n.cache.toolTip ? n.cache.toolTip : "undefined" != typeof n.data.toolTip ? n.data.toolTip : n.data.text : void(n.data.toolTip = e)
                }, this.client.backColor = function(e) {
                    return "undefined" == typeof e ? n.cache && "undefined" != typeof n.cache.backColor ? n.cache.backColor : "undefined" != typeof n.data.backColor ? n.data.backColor : n.calendar.eventBackColor : void(n.data.backColor = e)
                }, this.client.borderColor = function(e) {
                    return "undefined" == typeof e ? n.cache && "undefined" != typeof n.cache.borderColor ? n.cache.borderColor : "undefined" != typeof n.data.borderColor ? n.data.borderColor : n.calendar.eventBorderColor : void(n.data.borderColor = e)
                }, this.client.barColor = function(e) {
                    return "undefined" == typeof e ? n.cache && "undefined" != typeof n.cache.barColor ? n.cache.barColor : "undefined" != typeof n.data.barColor ? n.data.barColor : n.calendar.durationBarColor : void(n.data.barColor = e)
                }, this.client.barVisible = function(e) {
                    return "undefined" == typeof e ? n.cache && "undefined" != typeof n.cache.barHidden ? !n.cache.barHidden : n.calendar.durationBarVisible && !n.data.barHidden : void(n.data.barHidden = !e)
                }, this.client.contextMenu = function(e) {
                    if ("undefined" == typeof e) {
                        if (n.oContextMenu) return n.oContextMenu;
                        var t = n.cache ? n.cache.contextMenu : n.data.contextMenu;
                        return t ? DayPilot.Util.evalVariable(t) : null
                    }
                    n.oContextMenu = e
                }, this.client.moveEnabled = function(e) {
                    return "undefined" == typeof e ? n.cache && "undefined" != typeof n.cache.moveDisabled ? !n.cache.moveDisabled : "Disabled" !== n.calendar.eventMoveHandling && !n.data.moveDisabled : void(n.data.moveDisabled = !e)
                }, this.client.resizeEnabled = function(e) {
                    return "undefined" == typeof e ? "Milestone" !== n.data.type && (n.cache && "undefined" != typeof n.cache.resizeDisabled ? !n.cache.resizeDisabled : "Disabled" !== n.calendar.eventResizeHandling && !n.data.resizeDisabled) : void(n.data.resizeDisabled = !e)
                }, this.client.rightClickEnabled = function(e) {
                    return "undefined" == typeof e ? n.cache && "undefined" != typeof n.cache.rightClickDisabled ? !n.cache.rightClickDisabled : "Disabled" !== n.calendar.eventRightClickHandling && !n.data.rightClickDisabled : void(n.data.rightClickDisabled = !e)
                }, this.client.clickEnabled = function(e) {
                    return "undefined" == typeof e ? n.cache && "undefined" != typeof n.cache.clickDisabled ? !n.cache.clickDisabled : "Disabled" !== n.calendar.eventClickHandling && !n.data.clickDisabled : void(n.data.clickDisabled = !e)
                }, this.client.deleteEnabled = function(e) {
                    return "undefined" == typeof e ? n.cache && "undefined" != typeof n.cache.deleteDisabled ? !n.cache.deleteDisabled : "Disabled" !== n.calendar.eventDeleteHandling && !n.data.deleteDisabled : void(n.data.deleteDisabled = !e)
                }, this.client.doubleClickEnabled = function(e) {
                    return "undefined" == typeof e ? n.cache && "undefined" != typeof n.cache.doubleClickDisabled ? !n.cache.doubleClickDisabled : "Disabled" !== n.calendar.eventDoubleClickHandling && !n.data.doubleClickDisabled : void(n.data.doubleClickDisabled = !e)
                }, this.client.deleteClickEnabled = function(e) {
                    return "undefined" == typeof e ? n.cache && "undefined" != typeof n.cache.deleteDisabled ? !n.cache.deleteDisabled : "Disabled" !== n.calendar.eventDeleteHandling && !n.data.deleteDisabled : void(n.data.deleteDisabled = !e)
                }, this.toJSON = function(e) {
                    var t = {};
                    if (t.value = this.id(), t.id = this.id(), t.text = this.text(), t.start = this.start().toJSON(), t.end = this.end().toJSON(), t.resource = this.resource(), t.isAllDay = !1, t.recurrentMasterId = this.recurrentMasterId(), t.join = this.data.join, t.tag = {}, n.data.tags)
                        for (var i in n.data.tags) n.data.tags.hasOwnProperty(i) && (t.tag[i] = "" + n.data.tags[i]);
                    else if (n.calendar && n.calendar.tagFields)
                        for (var a = n.calendar.tagFields, o = 0; o < a.length; o++) t.tag[a[o]] = this.tag(a[o]);
                    return t
                }
            }, DayPilot.Task = function(e, t) {
                if (!e) throw "Trying to initialize DayPilot.Task with null data parameter";
                var i = this,
                    n = null;
                if (e instanceof DayPilot.Event) n = e, this.data = e.data.task;
                else {
                    if (e instanceof DayPilot.Task) return e;
                    e.isTaskWrapper ? this.data = e.data : this.data = e
                }
                var a = {},
                    o = ["id", "text", "start", "end", "complete", "type"];
                this.isTask = !0, this.calendar = t, this.temp = function() {
                    if (a.dirty) return a;
                    for (var e = 0; e < o.length; e++) a[o[e]] = i.data[o[e]];
                    return a.dirty = !0, a
                }, this.copy = function() {
                    var e = {};
                    return DayPilot.Util.copyProps(i.data, e), e
                }, this.commit = function() {
                    if (a.dirty) {
                        for (var e = 0; e < o.length; e++) i.data[o[e]] = a[o[e]];
                        a.dirty = !1
                    }
                }, this.dirty = function() {
                    return a.dirty
                }, this.id = function(e) {
                    return "undefined" == typeof e ? i.data.id : void(this.temp().id = e)
                }, this.text = function(e) {
                    return "undefined" == typeof e ? i.data.text : (this.temp().text = e, void this.client.innerHTML(e))
                }, this.start = function(e) {
                    return "undefined" == typeof e ? new DayPilot.Date(i.data.start) : void(this.temp().start = new DayPilot.Date(e))
                }, this.duration = function() {
                    return new DayPilot.Duration(this.start(), this.end())
                }, this.end = function(e) {
                    return "undefined" == typeof e ? t && "Date" === t.eventEndSpec ? new DayPilot.Date(i.data.end).getDatePart().addDays(1) : new DayPilot.Date(i.data.end) : void(this.temp().end = new DayPilot.Date(e))
                }, this.type = function(e) {
                    return "undefined" == typeof e ? n ? n.data.type : i.data.type : void(this.temp().type = e)
                }, this.complete = function(e) {
                    return "undefined" == typeof e ? i.data.complete ? i.data.complete : 0 : void(this.temp().complete = e)
                }, this.children = function() {
                    var e = [];
                    e.add = function(e) {
                        var t = new DayPilot.Task(e);
                        this.data.children || (this.data.children = []), this.children.push(t.data)
                    };
                    for (var i = 0; this.data.children && i < this.data.children.length; i++) e.push(new DayPilot.Task(this.data.children[i], t));
                    return e
                }, this.toJSON = function(e) {
                    var t = {};
                    return t.id = this.id(), t.text = this.text(), t.start = this.start().toJSON(), t.end = this.end().toJSON(), t.type = this.type(), t.tags = {}, DayPilot.Util.copyProps(this.data.tags, t.tags), t
                }, this.row = {};
                var r = this.row;
                r.expanded = function(e) {
                    return "undefined" == typeof e ? !i.data.row || !i.data.row.collapsed : (i.data.row || (i.data.row = {}), !!i.data.row.collapsed != !e && t.internal.rowObjectForTaskData(i.data).toggle(), i.data.row.collapsed = !e, void 0)
                }, r.expand = function() {
                    r.expanded(!0)
                }, r.collapse = function() {
                    r.expanded(!1)
                }, r.toggle = function() {
                    r.expanded(!r.expanded())
                }
            }, DayPilot.request = function(e, t, i, n) {
                var a = DayPilot.createXmlHttp();
                a && (a.open("POST", e, !0), a.setRequestHeader("Content-type", "text/plain"), a.onreadystatechange = function() {
                    if (4 === a.readyState) return 200 !== a.status && 304 !== a.status ? void(n ? n(a) : window.console && console.log("HTTP error " + a.status)) : void t(a)
                }, 4 !== a.readyState && ("object" == typeof i && (i = JSON.stringify(i)), a.send(i)))
            }, DayPilot.ajax = function(e) {
                if (!e) throw new DayPilot.Exception("Parameter object required.");
                if ("string" != typeof e.url) throw new DayPilot.Exception("The parameter object must have 'url' property.");
                var t = DayPilot.createXmlHttp();
                if (!t) throw new DayPilot.Exception("Unable to create XMLHttpRequest object");
                var i = "object" == typeof e.data,
                    n = e.data,
                    a = e.method || "GET",
                    o = e.success || function() {},
                    r = e.error || function() {},
                    l = e.url,
                    s = e.contentType || (i ? "application/json" : "text/plain"),
                    d = e.headers || {};
                t.open(a, l, !0), t.setRequestHeader("Content-type", s), DayPilot.Util.ownPropsAsArray(d).forEach(function(e) {
                    t.setRequestHeader(e.key, e.val)
                }), t.onreadystatechange = function() {
                    if (4 === t.readyState)
                        if (200 === t.status || 304 === t.status) {
                            var e = {};
                            e.request = t, e.data = JSON.parse(t.responseText), o(e)
                        } else if (r) {
                        var e = {};
                        e.request = t, r(e)
                    } else window.console && console.log("HTTP error " + t.status)
                }, 4 !== t.readyState && (i && (n = JSON.stringify(n)), t.send(n))
            }, DayPilot.createXmlHttp = function() {
                return new XMLHttpRequest
            }, DayPilot.Http = {}, DayPilot.Http.ajax = function(e) {
                DayPilot.ajax(e)
            }, DayPilot.Duration = function(e) {
                var t = this,
                    i = 864e5,
                    n = 36e5,
                    a = 6e4,
                    o = 1e3;
                if (2 === arguments.length) {
                    var r = arguments[0],
                        l = arguments[1];
                    if (!(r instanceof DayPilot.Date) && "string" != typeof r) throw "DayPilot.Duration(): Invalid start argument, DayPilot.Date expected";
                    if (!(l instanceof DayPilot.Date) && "string" != typeof l) throw "DayPilot.Duration(): Invalid end argument, DayPilot.Date expected";
                    "string" == typeof r && (r = new DayPilot.Date(r)), "string" == typeof l && (l = new DayPilot.Date(l)), e = l.getTime() - r.getTime()
                }
                return this.ticks = e, DayPilot.Date.Cache.DurationCtor["" + e] ? DayPilot.Date.Cache.DurationCtor["" + e] : (DayPilot.Date.Cache.DurationCtor["" + e] = this, this.toString = function(e) {
                    if (!e) return t.days() + "." + t.hours() + ":" + t.minutes() + ":" + t.seconds() + "." + t.milliseconds();
                    var i = t.minutes();
                    i = (i < 10 ? "0" : "") + i;
                    var n = e;
                    return n = n.replace("mm", i), n = n.replace("m", t.minutes()), n = n.replace("H", t.hours()), n = n.replace("h", t.hours()), n = n.replace("d", t.days()), n = n.replace("s", t.seconds())
                }, this.totalHours = function() {
                    return t.ticks / n
                }, this.totalDays = function() {
                    return t.ticks / i
                }, this.totalMinutes = function() {
                    return t.ticks / a
                }, this.totalSeconds = function() {
                    return t.ticks / o
                }, this.days = function() {
                    return Math.floor(t.totalDays())
                }, this.hours = function() {
                    var e = t.ticks - t.days() * i;
                    return Math.floor(e / n)
                }, this.minutes = function() {
                    var e = t.ticks - Math.floor(t.totalHours()) * n;
                    return Math.floor(e / a)
                }, this.seconds = function() {
                    var e = t.ticks - Math.floor(t.totalMinutes()) * a;
                    return Math.floor(e / o)
                }, void(this.milliseconds = function() {
                    return t.ticks % o
                }))
            }, DayPilot.Duration.weeks = function(e) {
                return new DayPilot.Duration(1e3 * e * 60 * 60 * 24 * 7)
            }, DayPilot.Duration.days = function(e) {
                return new DayPilot.Duration(1e3 * e * 60 * 60 * 24)
            }, DayPilot.Duration.hours = function(e) {
                return new DayPilot.Duration(1e3 * e * 60 * 60)
            }, DayPilot.Duration.minutes = function(e) {
                return new DayPilot.Duration(1e3 * e * 60)
            }, DayPilot.Duration.seconds = function(e) {
                return new DayPilot.Duration(1e3 * e)
            }, DayPilot.TimeSpan = function() {
                throw "Please use DayPilot.Duration class instead of DayPilot.TimeSpan."
            };
            try {
                DayPilot.TimeSpan.prototype = Object.create(DayPilot.Duration.prototype)
            } catch (e) {}
            DayPilot.Date = function(t, i) {
                if (t instanceof DayPilot.Date) return t;
                var n;
                DayPilot.Util.isNullOrUndefined(t) && (n = DayPilot.DateUtil.fromLocal().getTime(), t = n);
                var a = DayPilot.Date.Cache.Ctor;
                if (a[t]) return DayPilot.Stats.cacheHitsCtor += 1, a[t];
                var o = !1;
                if ("string" == typeof t) {
                    try {
                        n = DayPilot.DateUtil.fromStringSortable(t, i).getTime()
                    } catch (e) {
                        throw new DayPilot.Exception("DayPilot.Date - Unable to parse ISO8601 date/time string: " + t)
                    }
                    o = !0
                } else if ("number" == typeof t) {
                    if (isNaN(t)) throw "Cannot create DayPilot.Date from NaN";
                    n = t
                } else {
                    if (!(t instanceof Date)) throw "Unrecognized parameter: use Date, number or string in ISO 8601 format";
                    n = i ? DayPilot.DateUtil.fromLocal(t).getTime() : t.getTime()
                }
                var r = e(n);
                return a[r] ? a[r] : (a[r] = this, a[n] = this, o && r !== t && DayPilot.DateUtil.hasTzSpec(t) && (a[t] = this), Object.defineProperty && !DayPilot.browser.ielt9 ? (Object.defineProperty(this, "ticks", {
                    get: function() {
                        return n
                    }
                }), Object.defineProperty(this, "value", {
                    "value": r,
                    "writable": !1,
                    "enumerable": !0
                })) : (this.ticks = n, this.value = r), DayPilot.Date.Config.legacyShowD && (this.d = new Date(n)), void(DayPilot.Stats.dateObjects += 1))
            }, DayPilot.Date.Config = {}, DayPilot.Date.Config.legacyShowD = !1, DayPilot.Date.Cache = {}, DayPilot.Date.Cache.Parsing = {}, DayPilot.Date.Cache.Ctor = {}, DayPilot.Date.Cache.Ticks = {}, DayPilot.Date.Cache.DurationCtor = {}, DayPilot.Date.Cache.clear = function() {
                DayPilot.Date.Cache.Parsing = {}, DayPilot.Date.Cache.Ctor = {}, DayPilot.Date.Cache.Ticks = {}, DayPilot.Date.Cache.DurationCtor = {}
            }, DayPilot.Date.prototype.addDays = function(e) {
                return e ? new DayPilot.Date(this.ticks + 24 * e * 60 * 60 * 1e3) : this
            }, DayPilot.Date.prototype.addHours = function(e) {
                return e ? this.addTime(60 * e * 60 * 1e3) : this
            }, DayPilot.Date.prototype.addMilliseconds = function(e) {
                return e ? this.addTime(e) : this
            }, DayPilot.Date.prototype.addMinutes = function(e) {
                return e ? this.addTime(60 * e * 1e3) : this
            }, DayPilot.Date.prototype.addMonths = function(e) {
                if (!e) return this;
                var t = new Date(this.ticks),
                    i = t.getUTCFullYear(),
                    n = t.getUTCMonth() + 1;
                if (e > 0) {
                    for (; e >= 12;) e -= 12, i++;
                    e > 12 - n ? (i++, n = e - (12 - n)) : n += e
                } else {
                    for (; e <= -12;) e += 12, i--;
                    n + e <= 0 ? (i--, n = 12 + n + e) : n += e
                }
                var a = new Date(t.getTime());
                a.setUTCDate(1), a.setUTCFullYear(i), a.setUTCMonth(n - 1);
                var o = new DayPilot.Date(a).daysInMonth();
                return a.setUTCDate(Math.min(o, t.getUTCDate())), new DayPilot.Date(a)
            }, DayPilot.Date.prototype.addSeconds = function(e) {
                return e ? this.addTime(1e3 * e) : this
            }, DayPilot.Date.prototype.addTime = function(e) {
                return e ? (e instanceof DayPilot.Duration && (e = e.ticks), new DayPilot.Date(this.ticks + e)) : this
            }, DayPilot.Date.prototype.addYears = function(e) {
                var t = new Date(this.ticks),
                    i = new Date(this.ticks),
                    n = this.getYear() + e,
                    a = this.getMonth();
                i.setUTCDate(1), i.setUTCFullYear(n), i.setUTCMonth(a);
                var o = new DayPilot.Date(i).daysInMonth();
                return i.setUTCDate(Math.min(o, t.getUTCDate())), new DayPilot.Date(i)
            }, DayPilot.Date.prototype.dayOfWeek = function() {
                return new Date(this.ticks).getUTCDay()
            }, DayPilot.Date.prototype.getDayOfWeek = function() {
                return new Date(this.ticks).getUTCDay()
            }, DayPilot.Date.prototype.getDayOfYear = function() {
                var e = this.firstDayOfYear();
                return DayPilot.DateUtil.daysDiff(e, this) + 1
            }, DayPilot.Date.prototype.daysInMonth = function() {
                var e = new Date(this.ticks),
                    t = e.getUTCMonth() + 1,
                    i = e.getUTCFullYear(),
                    n = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
                return 2 !== t ? n[t - 1] : i % 4 !== 0 ? n[1] : i % 100 === 0 && i % 400 !== 0 ? n[1] : n[1] + 1
            }, DayPilot.Date.prototype.daysInYear = function() {
                var e = this.getYear();
                return e % 4 !== 0 ? 365 : e % 100 === 0 && e % 400 !== 0 ? 365 : 366
            }, DayPilot.Date.prototype.dayOfYear = function() {
                return Math.ceil((this.getDatePart().getTime() - this.firstDayOfYear().getTime()) / 864e5) + 1
            }, DayPilot.Date.prototype.equals = function(e) {
                if (null === e) return !1;
                if (e instanceof DayPilot.Date) return this === e;
                throw "The parameter must be a DayPilot.Date object (DayPilot.Date.equals())"
            }, DayPilot.Date.prototype.firstDayOfMonth = function() {
                var e = new Date;
                return e.setUTCFullYear(this.getYear(), this.getMonth(), 1), e.setUTCHours(0), e.setUTCMinutes(0), e.setUTCSeconds(0), e.setUTCMilliseconds(0), new DayPilot.Date(e)
            }, DayPilot.Date.prototype.firstDayOfYear = function() {
                var e = this.getYear(),
                    t = new Date;
                return t.setUTCFullYear(e, 0, 1), t.setUTCHours(0), t.setUTCMinutes(0), t.setUTCSeconds(0), t.setUTCMilliseconds(0), new DayPilot.Date(t)
            }, DayPilot.Date.prototype.firstDayOfWeek = function(e) {
                var t = this;
                if (e instanceof DayPilot.Locale) e = e.weekStarts;
                else if ("string" == typeof e && DayPilot.Locale.find(e)) {
                    var i = DayPilot.Locale.find(e);
                    e = i.weekStarts
                } else e = e || 0;
                for (var n = t.dayOfWeek(); n !== e;) t = t.addDays(-1), n = t.dayOfWeek();
                return new DayPilot.Date(t)
            }, DayPilot.Date.prototype.getDay = function() {
                return new Date(this.ticks).getUTCDate()
            }, DayPilot.Date.prototype.getDatePart = function() {
                var e = new Date(this.ticks);
                return e.setUTCHours(0), e.setUTCMinutes(0), e.setUTCSeconds(0), e.setUTCMilliseconds(0), new DayPilot.Date(e)
            }, DayPilot.Date.prototype.getYear = function() {
                return new Date(this.ticks).getUTCFullYear()
            }, DayPilot.Date.prototype.getHours = function() {
                return new Date(this.ticks).getUTCHours()
            }, DayPilot.Date.prototype.getMilliseconds = function() {
                return new Date(this.ticks).getUTCMilliseconds()
            }, DayPilot.Date.prototype.getMinutes = function() {
                return new Date(this.ticks).getUTCMinutes()
            }, DayPilot.Date.prototype.getMonth = function() {
                return new Date(this.ticks).getUTCMonth()
            }, DayPilot.Date.prototype.getSeconds = function() {
                return new Date(this.ticks).getUTCSeconds()
            }, DayPilot.Date.prototype.getTotalTicks = function() {
                return this.getTime()
            }, DayPilot.Date.prototype.getTime = function() {
                return this.ticks
            }, DayPilot.Date.prototype.getTimePart = function() {
                var e = this.getDatePart();
                return DayPilot.DateUtil.diff(this, e)
            }, DayPilot.Date.prototype.lastDayOfMonth = function() {
                var e = new Date(this.firstDayOfMonth().getTime()),
                    t = this.daysInMonth();
                return e.setUTCDate(t), new DayPilot.Date(e)
            }, DayPilot.Date.prototype.weekNumber = function() {
                var e = this.firstDayOfYear(),
                    t = (this.getTime() - e.getTime()) / 864e5;
                return Math.ceil((t + e.dayOfWeek() + 1) / 7)
            }, DayPilot.Date.prototype.weekNumberISO = function() {
                var e = !1,
                    t = this.dayOfYear(),
                    i = this.firstDayOfYear().dayOfWeek(),
                    n = this.firstDayOfYear().addYears(1).addDays(-1).dayOfWeek();
                0 === i && (i = 7), 0 === n && (n = 7);
                var a = 8 - i;
                4 !== i && 4 !== n || (e = !0);
                var o = Math.ceil((t - a) / 7),
                    r = o;
                return a >= 4 && (r += 1), r > 52 && !e && (r = 1), 0 === r && (r = this.firstDayOfYear().addDays(-1).weekNumberISO()), r
            }, DayPilot.Date.prototype.toDateLocal = function() {
                var e = new Date(this.ticks),
                    t = new Date;
                return t.setFullYear(e.getUTCFullYear(), e.getUTCMonth(), e.getUTCDate()), t.setHours(e.getUTCHours()), t.setMinutes(e.getUTCMinutes()), t.setSeconds(e.getUTCSeconds()), t.setMilliseconds(e.getUTCMilliseconds()), t
            }, DayPilot.Date.prototype.toDate = function() {
                return new Date(this.ticks)
            }, DayPilot.Date.prototype.toJSON = function() {
                return this.value
            }, DayPilot.Date.prototype.toString = function(e, t) {
                return e ? new o(e, t).print(this) : this.toStringSortable()
            }, DayPilot.Date.prototype.toStringSortable = function() {
                return e(this.ticks)
            }, DayPilot.Date.parse = function(e, t, i) {
                return new o(t, i).parse(e)
            };
            var a = 0;
            DayPilot.Date.today = function() {
                return new DayPilot.Date(DayPilot.DateUtil.localToday(), !0)
            }, DayPilot.Date.fromYearMonthDay = function(e, t, i) {
                t = t || 1, i = i || 1;
                var n = new Date(0);
                return n.setUTCFullYear(e), n.setUTCMonth(t - 1), n.setUTCDate(i), new DayPilot.Date(n)
            }, DayPilot.DateUtil = {}, DayPilot.DateUtil.fromStringSortable = function(e, t) {
                if (!e) throw "Can't create DayPilot.Date from an empty string";
                var i = e.length,
                    n = 10 === i,
                    a = 19 === i,
                    o = i > 19;
                if (!n && !a && !o) throw "Invalid string format (use '2010-01-01' or '2010-01-01T00:00:00'): " + e;
                if (DayPilot.Date.Cache.Parsing[e] && !t) return DayPilot.Stats.cacheHitsParsing += 1, DayPilot.Date.Cache.Parsing[e];
                var r = e.substring(0, 4),
                    l = e.substring(5, 7),
                    s = e.substring(8, 10),
                    d = new Date(0);
                if (d.setUTCFullYear(r, l - 1, s), n) return DayPilot.Date.Cache.Parsing[e] = d, d;
                var c = e.substring(11, 13),
                    h = e.substring(14, 16),
                    u = e.substring(17, 19);
                if (d.setUTCHours(c), d.setUTCMinutes(h), d.setUTCSeconds(u), a) return DayPilot.Date.Cache.Parsing[e] = d, d;
                var f = e[19],
                    v = 0;
                if ("." === f) {
                    var p = parseInt(e.substring(20, 23));
                    d.setUTCMilliseconds(p), v = DayPilot.DateUtil.getTzOffsetMinutes(e.substring(23))
                } else v = DayPilot.DateUtil.getTzOffsetMinutes(e.substring(19));
                var m = new DayPilot.Date(d);
                return t || (m = m.addMinutes(-v)), d = m.toDate(), DayPilot.Date.Cache.Parsing[e] = d, d
            }, DayPilot.DateUtil.getTzOffsetMinutes = function(e) {
                if (DayPilot.Util.isNullOrUndefined(e) || "" === e) return 0;
                if ("Z" === e) return 0;
                var t = e[0],
                    i = parseInt(e.substring(1, 3)),
                    n = parseInt(e.substring(4)),
                    a = 60 * i + n;
                if ("-" === t) return -a;
                if ("+" === t) return a;
                throw "Invalid timezone spec: " + e
            }, DayPilot.DateUtil.hasTzSpec = function(e) {
                return !!e.indexOf("+") || !!e.indexOf("-")
            }, DayPilot.DateUtil.daysDiff = function(e, t) {
                if (e && t || function() {
                        throw "two parameters required"
                    }(), e = new DayPilot.Date(e), t = new DayPilot.Date(t), e.getTime() > t.getTime()) return null;
                for (var i = 0, n = e.getDatePart(), a = t.getDatePart(); n < a;) n = n.addDays(1), i++;
                return i
            }, DayPilot.DateUtil.daysSpan = function(e, t) {
                if (e && t || function() {
                        throw "two parameters required"
                    }(), e = new DayPilot.Date(e), t = new DayPilot.Date(t), e === t) return 0;
                var i = DayPilot.DateUtil.daysDiff(e, t);
                return t == t.getDatePart() && i--, i
            }, DayPilot.DateUtil.diff = function(e, t) {
                if (!(e && t && e.getTime && t.getTime)) throw "Both compared objects must be Date objects (DayPilot.Date.diff).";
                return e.getTime() - t.getTime()
            }, DayPilot.DateUtil.fromLocal = function(e) {
                e || (e = new Date);
                var t = new Date;
                return t.setUTCFullYear(e.getFullYear(), e.getMonth(), e.getDate()), t.setUTCHours(e.getHours()), t.setUTCMinutes(e.getMinutes()), t.setUTCSeconds(e.getSeconds()), t.setUTCMilliseconds(e.getMilliseconds()), t
            }, DayPilot.DateUtil.localToday = function() {
                var e = new Date;
                return e.setHours(0), e.setMinutes(0), e.setSeconds(0), e.setMilliseconds(0), e
            }, DayPilot.DateUtil.hours = function(e, t) {
                var i = e.getUTCMinutes();
                i < 10 && (i = "0" + i);
                var n = e.getUTCHours();
                if (t) {
                    var a = n < 12,
                        n = n % 12;
                    0 === n && (n = 12);
                    return n + ":" + i + " " + (a ? "AM" : "PM")
                }
                return n + ":" + i
            }, DayPilot.DateUtil.max = function(e, t) {
                return e.getTime() > t.getTime() ? e : t
            }, DayPilot.DateUtil.min = function(e, t) {
                return e.getTime() < t.getTime() ? e : t
            };
            var o = function(e, i) {
                "string" == typeof i && (i = DayPilot.Locale.find(i));
                var i = i || DayPilot.Locale.US,
                    n = [{
                        "seq": "yyyy",
                        "expr": "[0-9]{4,4}",
                        "str": function(e) {
                            return e.getYear()
                        }
                    }, {
                        "seq": "yy",
                        "expr": "[0-9]{2,2}",
                        "str": function(e) {
                            return e.getYear() % 100
                        }
                    }, {
                        "seq": "mm",
                        "expr": "[0-9]{2,2}",
                        "str": function(e) {
                            var t = e.getMinutes();
                            return t < 10 ? "0" + t : t
                        }
                    }, {
                        "seq": "m",
                        "expr": "[0-9]{1,2}",
                        "str": function(e) {
                            return e.getMinutes()
                        }
                    }, {
                        "seq": "HH",
                        "expr": "[0-9]{2,2}",
                        "str": function(e) {
                            var t = e.getHours();
                            return t < 10 ? "0" + t : t
                        }
                    }, {
                        "seq": "H",
                        "expr": "[0-9]{1,2}",
                        "str": function(e) {
                            return e.getHours()
                        }
                    }, {
                        "seq": "hh",
                        "expr": "[0-9]{2,2}",
                        "str": function(e) {
                            var t = e.getHours(),
                                t = t % 12;
                            0 === t && (t = 12);
                            var i = t;
                            return i < 10 ? "0" + i : i
                        }
                    }, {
                        "seq": "h",
                        "expr": "[0-9]{1,2}",
                        "str": function(e) {
                            var t = e.getHours(),
                                t = t % 12;
                            return 0 === t && (t = 12), t
                        }
                    }, {
                        "seq": "ss",
                        "expr": "[0-9]{2,2}",
                        "str": function(e) {
                            var t = e.getSeconds();
                            return t < 10 ? "0" + t : t
                        }
                    }, {
                        "seq": "s",
                        "expr": "[0-9]{1,2}",
                        "str": function(e) {
                            return e.getSeconds()
                        }
                    }, {
                        "seq": "MMMM",
                        "expr": "[^\\s0-9]*",
                        "str": function(e) {
                            return i.monthNames[e.getMonth()]
                        },
                        "transform": function(e) {
                            var n = DayPilot.indexOf(i.monthNames, e, t);
                            return n < 0 ? null : n + 1
                        }
                    }, {
                        "seq": "MMM",
                        "expr": "[^\\s0-9]*",
                        "str": function(e) {
                            return i.monthNamesShort[e.getMonth()]
                        },
                        "transform": function(e) {
                            var n = DayPilot.indexOf(i.monthNamesShort, e, t);
                            return n < 0 ? null : n + 1
                        }
                    }, {
                        "seq": "MM",
                        "expr": "[0-9]{2,2}",
                        "str": function(e) {
                            var t = e.getMonth() + 1;
                            return t < 10 ? "0" + t : t
                        }
                    }, {
                        "seq": "M",
                        "expr": "[0-9]{1,2}",
                        "str": function(e) {
                            return e.getMonth() + 1
                        }
                    }, {
                        "seq": "dddd",
                        "expr": "[^\\s0-9]*",
                        "str": function(e) {
                            return i.dayNames[e.getDayOfWeek()]
                        }
                    }, {
                        "seq": "ddd",
                        "expr": "[^\\s0-9]*",
                        "str": function(e) {
                            return i.dayNamesShort[e.getDayOfWeek()]
                        }
                    }, {
                        "seq": "dd",
                        "expr": "[0-9]{2,2}",
                        "str": function(e) {
                            var t = e.getDay();
                            return t < 10 ? "0" + t : t
                        }
                    }, {
                        "seq": "%d",
                        "expr": "[0-9]{1,2}",
                        "str": function(e) {
                            return e.getDay()
                        }
                    }, {
                        "seq": "d",
                        "expr": "[0-9]{1,2}",
                        "str": function(e) {
                            return e.getDay()
                        }
                    }, {
                        "seq": "tt",
                        "expr": "(AM|PM|am|pm)",
                        "str": function(e) {
                            return e.getHours() < 12 ? "AM" : "PM"
                        },
                        "transform": function(e) {
                            return e.toUpperCase()
                        }
                    }],
                    a = function(e) {
                        return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&")
                    };
                this.init = function() {
                    this.year = this.findSequence("yyyy"), this.month = this.findSequence("MMMM") || this.findSequence("MMM") || this.findSequence("MM") || this.findSequence("M"), this.day = this.findSequence("dd") || this.findSequence("d"),
                        this.hours = this.findSequence("HH") || this.findSequence("H"), this.minutes = this.findSequence("mm") || this.findSequence("m"), this.seconds = this.findSequence("ss") || this.findSequence("s"), this.ampm = this.findSequence("tt"), this.hours12 = this.findSequence("hh") || this.findSequence("h")
                }, this.findSequence = function(t) {
                    function i(e) {
                        return parseInt(e)
                    }
                    return e.indexOf(t) === -1 ? null : {
                        "findValue": function(o) {
                            for (var r = a(e), l = null, s = 0; s < n.length; s++) {
                                var d = (n[s].length, t === n[s].seq),
                                    c = n[s].expr;
                                d && (c = "(" + c + ")", l = n[s].transform), r = r.replace(n[s].seq, c)
                            }
                            r = "^" + r + "$";
                            try {
                                var h = new RegExp(r),
                                    u = h.exec(o);
                                return u ? (l = l || i)(u[1]) : null
                            } catch (e) {
                                throw "unable to create regex from: " + r
                            }
                        }
                    }
                }, this.print = function(t) {
                    for (var i = function(e) {
                            for (var t = 0; t < n.length; t++)
                                if (n[t] && n[t].seq === e) return n[t];
                            return null
                        }, a = e.length <= 0, o = 0, r = []; !a;) {
                        var l = e.substring(o),
                            s = /%?(.)\1*/.exec(l);
                        if (s && s.length > 0) {
                            var d = s[0],
                                c = i(d);
                            c ? r.push(c) : r.push(d), o += d.length, a = e.length <= o
                        } else a = !0
                    }
                    for (var h = 0; h < r.length; h++) {
                        var u = r[h];
                        "string" != typeof u && (r[h] = u.str(t))
                    }
                    return r.join("")
                }, this.parse = function(e) {
                    var t = this.year.findValue(e);
                    if (!t) return null;
                    var i = this.month.findValue(e);
                    if (DayPilot.Util.isNullOrUndefined(i)) return null;
                    if (i > 12 || i < 1) return null;
                    var n = this.day.findValue(e),
                        a = DayPilot.Date.fromYearMonthDay(t, i).daysInMonth();
                    if (n < 1 || n > a) return null;
                    var o = this.hours ? this.hours.findValue(e) : 0,
                        r = this.minutes ? this.minutes.findValue(e) : 0,
                        l = this.seconds ? this.seconds.findValue(e) : 0,
                        s = this.ampm ? this.ampm.findValue(e) : null;
                    if (this.ampm && this.hours12) {
                        var d = this.hours12.findValue(e);
                        if (d < 1 || d > 12) return null;
                        o = "PM" === s ? 12 === d ? 12 : d + 12 : 12 === d ? 0 : d
                    }
                    if (o < 0 || o > 23) return null;
                    if (r < 0 || r > 59) return null;
                    if (l < 0 || l > 59) return null;
                    var c = new Date;
                    return c.setUTCFullYear(t, i - 1, n), c.setUTCHours(o), c.setUTCMinutes(r), c.setUTCSeconds(l), c.setUTCMilliseconds(0), new DayPilot.Date(c)
                }, this.init()
            };
            DayPilot.ColorUtil = {}, DayPilot.ColorUtil.hexToRgb = function(e) {
                    if (!/^#[0-9a-f]{6}$/i.test(e)) throw new DayPilot.Exception("Invalid color, only full hex color string accepted, eg. '#ffaaff'.");
                    return e = e.replace("#", ""), {
                        r: parseInt(e.substring(0, 2), 16),
                        g: parseInt(e.substring(2, 4), 16),
                        b: parseInt(e.substring(4, 6), 16)
                    }
                }, DayPilot.ColorUtil.rgbToHex = function(e) {
                    return "#" + i(e.r) + i(e.g) + i(e.b)
                }, DayPilot.ColorUtil.adjustLuminance = function(e, t) {
                    return {
                        r: e.r + t,
                        g: e.g + t,
                        b: e.b + t
                    }
                }, DayPilot.ColorUtil.darker = function(e, t) {
                    var i = DayPilot.ColorUtil.hexToRgb(e);
                    t = t || 1;
                    var n = 17,
                        a = t * n,
                        o = DayPilot.ColorUtil.adjustLuminance(i, -a);
                    return DayPilot.ColorUtil.rgbToHex(o)
                }, DayPilot.Canvas = function(e, t, i, n, a) {
                    function o(e, t, i) {
                        for (var n = t.split(" "), a = [], o = n[0], r = 1; r < n.length; r++) {
                            var l = n[r];
                            e.measureText(o + " " + l).width < i ? o += " " + l : (a.push(o), o = l)
                        }
                        return a.push(o), a
                    }
                    var n = n || 1,
                        r = document.createElement("canvas");
                    r.width = e * n, r.height = t * n;
                    var l = r.getContext("2d");
                    l.scale(n, n), this.defaultFileName = "image.png", "image/jpeg" === i && (this.defaultFileName = "image.jpg", a = a || .92), this.fillRect = function(e, t) {
                        l.save(), l.strokeStyle = "rgb(0,0,0,0)", l.fillStyle = t, l.fillRect(e.x, e.y, e.w, e.h), l.restore()
                    }, this.rect = function(e, t) {
                        l.save(), l.strokeStyle = t, l.beginPath(), l.rect(e.x + .5, e.y + .5, e.w - 1, e.h - 1), l.stroke(), l.restore()
                    }, this.diamond = function(e, t) {
                        l.save(), l.strokeStyle = "rgb(0,0,0,0)", l.fillStyle = t, l.beginPath(), l.moveTo(e.x + e.w / 2, e.y + .5), l.lineTo(e.x + e.w - .5, e.y + e.h / 2), l.lineTo(e.x + e.w / 2, e.y + e.h - .5), l.lineTo(e.x + .5, e.y + e.h / 2), l.closePath(), l.fill(), l.restore()
                    }, this.triangle = function(e, t, i) {
                        for (i = i || 0; i < 0;) i += 360;
                        for (; i >= 360;) i -= 360;
                        switch (l.save(), l.strokeStyle = "rgb(0,0,0,0)", l.fillStyle = t, l.beginPath(), i) {
                            case 0:
                                l.moveTo(e.x + e.w / 3, e.y + .5), l.lineTo(e.x + e.w + .5, e.y + e.h / 2), l.lineTo(e.x + e.w / 3, e.y + e.h - .5);
                                break;
                            case 90:
                                l.moveTo(e.x - .5, e.y + e.h / 3), l.lineTo(e.x + e.w + .5, e.y + e.h / 3), l.lineTo(e.x + e.w / 2, e.y + e.h + .5);
                                break;
                            case 180:
                                l.moveTo(e.x + 2 * e.w / 3, e.y + .5), l.lineTo(e.x + 2 * e.w / 3, e.y + e.h), l.lineTo(e.x, e.y + e.h / 2);
                                break;
                            case 270:
                                l.moveTo(e.x + e.w / 2, e.y + e.w / 2 + .5), l.lineTo(e.x + e.w - .5, e.y + 2 * e.h / 3), l.lineTo(e.x, e.y + 2 * e.h / 3);
                                break;
                            default:
                                throw new DayPilot.Exception("Unsupported rotation angle")
                        }
                        l.closePath(), l.fill(), l.restore()
                    }, this.upperLeftCorner = function(e, t) {
                        l.save(), l.strokeStyle = "rgb(0,0,0,0)", l.fillStyle = t, l.beginPath(), l.moveTo(e.x, e.y), l.lineTo(e.x + e.w, e.y), l.lineTo(e.x, e.y + e.h), l.closePath(), l.fill(), l.restore()
                    }, this.upperRightCorner = function(e, t) {
                        l.save(), l.strokeStyle = "rgb(0,0,0,0)", l.fillStyle = t, l.beginPath(), l.moveTo(e.x, e.y), l.lineTo(e.x + e.w, e.y), l.lineTo(e.x + e.w, e.y + e.h), l.closePath(), l.fill(), l.restore()
                    }, this.textWidth = function(e, t) {
                        l.save(), l.font = t.style + " " + t.size + " " + t.family;
                        var i = l.measureText(e).width + 1;
                        return l.restore(), i
                    }, this.text = function(e, t, i, n, a, r, s) {
                        if (t) {
                            if ("number" == typeof t && (t = "" + t), "string" != typeof t) throw "String expected, supplied: " + typeof t;
                            a = a || "left", r = r || 0, n = n || "#000", s = s || "top", l.save();
                            var d = DayPilot.Util.fontHeight(i),
                                c = DayPilot.browser.ff ? 3 : 0;
                            c += .2 * d, c += DayPilot.browser.chrome ? 1 : 0, c += DayPilot.browser.ie ? 1 : 0, l.rect(e.x + .5 + r, e.y + .5 + r, e.w - 1 - r, e.h - 1 - r), l.clip(), l.fillStyle = n, l.font = i.style + " " + i.size + " " + i.family, l.textBaseline = "top", l.textAlign = a;
                            var h = e.x;
                            switch (a) {
                                case "center":
                                    h += e.w / 2;
                                    break;
                                case "right":
                                    h += e.w
                            }
                            var u = 1.2 * d,
                                f = t.split("\n"),
                                v = [];
                            DayPilot.list(f).each(function(t) {
                                var i = o(l, t, e.w);
                                DayPilot.list(i).each(function(e) {
                                    v.push(e)
                                })
                            });
                            var p = u - d,
                                m = u * v.length - p,
                                g = e.h - 2 * r,
                                y = e.y + r;
                            switch (s) {
                                case "top":
                                    y += c;
                                    break;
                                case "center":
                                    y += (g - m) / 2 + .1 * d;
                                    break;
                                case "bottom":
                                    y += g - m
                            }
                            for (var b = 0; b < v.length; b++) {
                                var w = v[b];
                                l.fillText(w, h + r, y), y += u
                            }
                            l.restore()
                        }
                    }, this.line = function(e, t, i, n, a) {
                        l.save(), l.lineWidth = 1, l.strokeStyle = a, l.beginPath(), l.moveTo(e + .5, t + .5), l.lineTo(i + .5, n + .5), l.stroke(), l.restore()
                    }, this.image = function(e, t) {
                        if (t) {
                            if ("string" == typeof t) {
                                var i = t,
                                    t = document.createElement("img");
                                if (0 !== i.indexOf("data:")) return t.onload = function() {
                                    l.save(), l.drawImage(t, e.x, e.y), l.restore()
                                }, void(t.src = i);
                                t.src = i
                            }
                            l.save(), l.drawImage(t, e.x, e.y), l.restore()
                        }
                    }, this.getWidth = function() {
                        return r.width
                    }, this.getHeight = function() {
                        return r.height
                    }, this.getElement = function() {
                        return r
                    }, this.getSource = function() {
                        return "<img src='" + r.toDataURL(i, a) + "' />"
                    }, this.getDataUri = function() {
                        return r.toDataURL(i, a)
                    }, this.getDefaultFileName = function() {
                        return this.defaultFileName
                    }, this.getBlob = function() {
                        return r.msToBlob ? r.msToBlob() : DayPilot.Util.dataUriToBlob(this.getDataUri())
                    }
                }, DayPilot.Svg = function(e, t) {
                    function i(e, t) {
                        var i = null;
                        if (e) {
                            if ("string" == typeof e) {
                                if (0 === e.indexOf("data:")) {
                                    var n = {};
                                    n.dataUri = e, t(n)
                                }
                                i = e
                            } else i = e.src;
                            var e = document.createElement("img");
                            e.onload = function() {
                                var e = document.createElement("canvas");
                                e.width = this.naturalWidth, e.height = this.naturalHeight, e.getContext("2d").drawImage(this, 0, 0);
                                var i = {};
                                i.dataUri = e.toDataURL("image/png"), t(i)
                            }, e.src = i
                        }
                    }
                    var n = "http://www.w3.org/2000/svg",
                        a = document.createElementNS(n, "svg");
                    a.outerHTML && a.setAttribute("xmlns", n), a.setAttribute("viewBox", "0 0 " + e + " " + t), this.defaultFileName = "image.svg", this.fillRect = function(e, t) {
                        var i = document.createElementNS(n, "rect");
                        i.setAttribute("x", e.x), i.setAttribute("y", e.y), i.setAttribute("width", e.w), i.setAttribute("height", e.h), i.setAttribute("fill", t), a.appendChild(i)
                    }, this.diamond = function(e, t) {
                        var i = document.createElementNS(n, "path"),
                            o = "";
                        o += "M " + (e.x + e.w / 2) + " " + e.y, o += " ", o += "L " + (e.x + e.w) + " " + (e.y + e.h / 2), o += " ", o += "L " + (e.x + e.w / 2) + " " + (e.y + e.h), o += " ", o += "L " + e.x + " " + (e.y + e.h / 2), o += " Z", i.setAttribute("d", o), i.setAttribute("fill", t), a.appendChild(i)
                    }, this.triangle = function(e, t, i) {
                        var o = document.createElementNS(n, "path"),
                            r = "";
                        r += "M " + (e.x + e.w / 3) + " " + e.y, r += " ", r += "L " + (e.x + e.w) + " " + (e.y + e.h / 2), r += " ", r += "L " + (e.x + e.w / 3) + " " + (e.y + e.h), r += " Z", o.setAttribute("d", r), o.setAttribute("fill", t), "number" == typeof i && o.setAttribute("transform", "rotate(" + i + "," + (e.x + e.w / 2) + "," + (e.y + e.h / 2) + ")"), a.appendChild(o)
                    }, this.upperLeftCorner = function(e, t) {
                        var i = document.createElementNS(n, "path"),
                            o = "";
                        o += "M " + e.x + " " + e.y, o += " ", o += "L " + (e.x + e.w) + " " + e.y, o += " ", o += "L " + e.x + " " + (e.y + e.h), o += " Z", i.setAttribute("d", o), i.setAttribute("fill", t), a.appendChild(i)
                    }, this.upperRightCorner = function(e, t) {
                        var i = document.createElementNS(n, "path"),
                            o = "";
                        o += "M " + e.x + " " + e.y, o += " ", o += "L " + (e.x + e.w) + " " + e.y, o += " ", o += "L " + (e.x + e.w) + " " + (e.y + e.h), o += " Z", i.setAttribute("d", o), i.setAttribute("fill", t), a.appendChild(i)
                    }, this.rect = function(e, t) {
                        var i = document.createElementNS(n, "rect");
                        i.setAttribute("x", e.x + .5), i.setAttribute("y", e.y + .5), i.setAttribute("width", e.w - 1), i.setAttribute("height", e.h - 1), i.setAttribute("stroke", t), i.setAttribute("stroke-width", "1"), i.setAttribute("fill", "transparent"), a.appendChild(i)
                    }, this.text = function(e, t, i, o, r, l, s) {
                        function d(e, t, r) {
                            var l = document.createElementNS(n, "text");
                            l.setAttribute("fill", o), l.setAttribute("font-family", i.family), l.setAttribute("font-size", i.size), l.setAttribute("font-style", c), l.setAttribute("font-weight", h), l.setAttribute("x", t), l.setAttribute("y", r), l.setAttribute("dy", "0.8em"), l.setAttribute("text-anchor", v), l.setAttribute("clip-path", "url(#" + p.id + ")");
                            var s = document.createTextNode(e);
                            l.appendChild(s), a.appendChild(l)
                        }
                        if (t) {
                            if ("number" == typeof t && (t = "" + t), "string" != typeof t) throw "String expected, supplied: " + typeof t;
                            r = r || "left", l = l || 0, s = s || "top";
                            var c = i.style;
                            c.indexOf("italic") !== -1 && (c = "bold");
                            var h = i.style;
                            if (i.style) var u = 3;
                            var f = e.x,
                                v = "start";
                            switch (r) {
                                case "center":
                                    f += e.w / 2, v = "middle";
                                    break;
                                case "right":
                                    f += e.w, v = "end"
                            }
                            var p = document.createElementNS(n, "clipPath");
                            p.id = "clip" + DayPilot.guid();
                            var m = document.createElementNS(n, "rect");
                            m.setAttribute("x", e.x), m.setAttribute("y", e.y), m.setAttribute("width", e.w), m.setAttribute("height", e.h), p.appendChild(m), a.appendChild(p);
                            var g = DayPilot.Util.fontHeight(i),
                                y = 1.2 * g,
                                b = t.split("\n"),
                                w = y - g,
                                D = y * b.length - w,
                                k = e.h - 2 * l,
                                P = e.y + l;
                            switch (s) {
                                case "top":
                                    P += u;
                                    break;
                                case "center":
                                    P += (k - D) / 2 + .1 * g;
                                    break;
                                case "bottom":
                                    P += k - D
                            }
                            for (var x = 0; x < b.length; x++) {
                                d(b[x], f + l, P), P += y
                            }
                        }
                    }, this.line = function(e, t, i, o, r) {
                        var l = document.createElementNS(n, "line");
                        l.setAttribute("x1", e + .5), l.setAttribute("y1", t + .5), l.setAttribute("x2", i + .5), l.setAttribute("y2", o + .5), l.setAttribute("stroke", r), a.appendChild(l)
                    }, this.image = function(e, t) {
                        function o(t) {
                            var i = document.createElementNS(n, "image");
                            i.setAttributeNS("http://www.w3.org/1999/xlink", "href", t.dataUri), i.setAttribute("x", e.x), i.setAttribute("y", e.y), i.setAttribute("width", e.w), i.setAttribute("height", e.h), a.appendChild(i)
                        }
                        i(t, o)
                    }, this.f = {}, this.textWidth = function(e, t) {
                        var i = "#" + e + "#" + JSON.stringify(t),
                            n = this.f[i];
                        if ("number" == typeof n) return n;
                        var a = "http://www.w3.org/2000/svg",
                            o = document.createElementNS(a, "svg");
                        o.style.position = "absolute", o.style.left = "-10000px", o.style.width = "100px", o.outerHTML && o.setAttribute("xmlns", a), o.setAttribute("viewBox", "0 0 100 100");
                        var r = document.createElementNS(a, "text");
                        r.setAttribute("font-family", t.family), r.setAttribute("font-size", t.size), r.setAttribute("font-style", t.style), r.setAttribute("x", 0), r.setAttribute("y", 0), r.setAttribute("dy", "1em");
                        var l = document.createTextNode(e);
                        r.appendChild(l), o.appendChild(r), document.body.appendChild(o);
                        var s = r.getComputedTextLength();
                        return this.f[i] = s, document.body.removeChild(o), s
                    }, this.getWidth = function() {
                        return e
                    }, this.getHeight = function() {
                        return t
                    }, this.getElement = function() {
                        return a
                    }, this.getSource = function() {
                        if (a.outerHTML) return a.outerHTML;
                        var e = document.createElement("div"),
                            t = a.cloneNode(!0);
                        return e.appendChild(t), e.innerHTML
                    }, this.getDataUri = function() {
                        return "data:application/octet-stream," + encodeURIComponent(this.getSource())
                    }, this.getDefaultFileName = function() {
                        return this.defaultFileName
                    }, this.getBlob = function() {
                        return new Blob([this.getSource()])
                    }
                }, DayPilot.Excel = function() {
                    var e = this,
                        t = null,
                        i = null,
                        n = null,
                        a = {};
                    a.xmlns = "urn:schemas-microsoft-com:office:spreadsheet", a.o = "urn:schemas-microsoft-com:office:office", a.x = "urn:schemas-microsoft-com:office:excel", a.ss = "urn:schemas-microsoft-com:office:spreadsheet", a.html = "http://www.w3.org/TR/REC-html40", this.init = function() {
                        t = document.implementation.createDocument(a.xmlns, "Workbook", null), t.documentElement.setAttribute("xmlns:o", a.o), t.documentElement.setAttribute("xmlns:x", a.x), t.documentElement.setAttribute("xmlns:ss", a.ss), t.documentElement.setAttribute("xmlns:html", a.html);
                        var o = t.createElement("x:ExcelWorkbook");
                        t.documentElement.appendChild(o), i = t.createElement("ss:Styles"), t.documentElement.appendChild(i), n = e.styles.create(), n.setId("Default"), n.setName("Normal")
                    }, this.worksheets = [], this.worksheets.create = function(t) {
                        var i = e.el(a.ss, "Worksheet"),
                            n = new o(i);
                        return n.setName(t), this.push(n), n
                    }, this.styles = [], this.styles.create = function(e) {
                        var n = t.createElement("ss:Style");
                        i.appendChild(n);
                        var a = new r(n);
                        return this.push(a), a
                    }, this.styles.getDefault = function() {
                        return n
                    }, this.el = function(e, i) {
                        var n = t.createElementNS(e, i);
                        return t.documentElement.appendChild(n), n
                    }, this.getSource = function() {
                        return '<?xml version="1.0"?>' + (new XMLSerializer).serializeToString(t)
                    }, this.getDataUri = function() {
                        return "data:application/vnd.ms-excel," + encodeURIComponent(this.getSource())
                    }, this.getElement = function() {
                        return t
                    }, this.getDefaultFileName = function() {
                        return "spreadsheet.xls"
                    }, this.getBlob = function() {
                        return new Blob([this.getSource()])
                    };
                    var o = function(e) {
                            var i = t.createElement("Table");
                            e.appendChild(i);
                            var n = t.createElement("x:WorksheetOptions");
                            e.appendChild(n), this.rows = [], this.setName = function(t) {
                                e.setAttribute("ss:Name", t)
                            }, this.cell = function(e, n) {
                                for (; n >= this.rows.length;) {
                                    var o = t.createElement("Row");
                                    i.appendChild(o), this.rows.push(new a(o))
                                }
                                return this.rows[n].cell(e)
                            }, this.enableGridlines = function(e) {
                                var i = DayPilot.list(n.childNodes).find(function(e) {
                                    return "x:DoNotDisplayGridlines" === e.tagName
                                });
                                if (!i && !e) {
                                    var a = t.createElement("x:DoNotDisplayGridlines");
                                    n.appendChild(a)
                                }
                                i && e && n.removeChild(i)
                            };
                            var a = function(e) {
                                this.cells = [], this.getElement = function() {
                                    return e
                                }, this.cell = function(n) {
                                    for (; n >= this.cells.length;) {
                                        var a = t.createElement("Cell");
                                        e.appendChild(a), this.cells.push(new i(a))
                                    }
                                    return this.cells[n]
                                };
                                var i = function(e) {
                                    this.setText = function(i) {
                                        var n = t.createElement("Data");
                                        n.setAttribute("ss:Type", "String");
                                        var a = t.createTextNode(i);
                                        for (n.appendChild(a); e.firstChild;) e.removeChild(e.firstChild);
                                        return e.appendChild(n), this
                                    }, this.setColspan = function(t) {
                                        return t > 1 ? e.setAttribute("ss:MergeAcross", t - 1) : e.removeAttribute("ss:MergeAcross"), this
                                    }, this.setRowspan = function(t) {
                                        return t > 1 ? e.setAttribute("ss:MergeDown", t - 1) : e.removeAttribute("ss:MergeDown"), this
                                    }, this.setStyle = function(t) {
                                        if (!(t instanceof r)) throw "Invalid argument, Style expected";
                                        return e.setAttribute("ss:StyleID", t.getId()), this
                                    }
                                }
                            }
                        },
                        r = function(e) {
                            var i = DayPilot.guid();
                            e.setAttribute("ss:ID", i);
                            var n = t.createElement("ss:Alignment");
                            e.appendChild(n);
                            var a = t.createElement("ss:Interior");
                            e.appendChild(a);
                            var o = t.createElement("ss:Borders");
                            e.appendChild(o), this.setHorizontalAlignment = function(e) {
                                n.setAttribute("ss:Horizontal", e)
                            }, this.setVerticalAlignment = function(e) {
                                n.setAttribute("ss:Vertical", e)
                            }, this.setBackColor = function(e) {
                                var t = DayPilot.Util.normalizeColor(e);
                                a.setAttribute("ss:Color", t), a.setAttribute("ss:Pattern", "Solid")
                            }, this.setBorderColor = function(e) {
                                function i(e, i) {
                                    var n = t.createElement("ss:Border");
                                    return n.setAttribute("ss:Position", e), n.setAttribute("ss:LineStyle", "Continuous"), n.setAttribute("ss:Color", DayPilot.Util.normalizeColor(i)), n
                                }
                                this.clearBorders();
                                var n = i("Left", e);
                                o.appendChild(n);
                                var a = i("Right", e);
                                o.appendChild(a);
                                var r = i("Top", e);
                                o.appendChild(r);
                                var l = i("Bottom", e);
                                o.appendChild(l)
                            }, this.clearBorders = function() {
                                for (; o.firstChild;) o.removeChild(o.firstChild)
                            }, this.getId = function() {
                                return i
                            }, this.setId = function(t) {
                                i = t, e.setAttribute("ss:ID", i)
                            }, this.setName = function(t) {
                                e.setAttribute("ss:Name", t)
                            }
                        };
                    this.init()
                }, DayPilot.Export = function(e) {
                    this.toElement = function() {
                        return e.getElement()
                    }, this.dimensions = function() {
                        return {
                            "width": e.getWidth(),
                            "height": e.getHeight()
                        }
                    }, this.toHtml = function() {
                        return e.getSource()
                    }, this.toDataUri = function() {
                        return e.getDataUri()
                    }, this.toBlob = function() {
                        return e.getBlob()
                    }, this.print = function(t) {
                        t = t || {}, t.orientation = t.orientation || "portrait";
                        var i = document.createElement("iframe");
                        i.setAttribute("width", 0), i.setAttribute("height", 0), i.setAttribute("frameborder", 0), i.setAttribute("src", "about:blank"), i.onload = function() {
                            var n = i.contentWindow.document;
                            if (n.body.appendChild(e.getElement()), "landscape" === t.orientation) {
                                var a = DayPilot.sheet(n);
                                a.add("@page", "size: landscape;"), a.commit()
                            }
                            i.contentWindow.document.execCommand("print", !1, null) || (i.contentWindow.focus(), i.contentWindow.print()), setTimeout(function() {
                                document.body.removeChild(i)
                            }, 10)
                        }, document.body.appendChild(i)
                    }, this.download = function(t) {
                        var t = t || e.getDefaultFileName(),
                            i = e.getBlob();
                        DayPilot.Util.downloadBlob(i, t)
                    }
                }, DayPilot.Exception = function(e) {
                    return new Error(e)
                }, DayPilot.Locale = function(e, t) {
                    if (this.id = e, this.dayNames = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], this.dayNamesShort = ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"], this.monthNames = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], this.monthNamesShort = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], this.datePattern = "M/d/yyyy", this.timePattern = "H:mm", this.dateTimePattern = "M/d/yyyy H:mm", this.timeFormat = "Clock12Hours", this.weekStarts = 0, t)
                        for (var i in t) this[i] = t[i]
                }, DayPilot.Locale.all = {}, DayPilot.Locale.find = function(e) {
                    if (!e) return null;
                    var t = e.toLowerCase();
                    return t.length > 2 && (t = DayPilot.Util.replaceCharAt(t, 2, "-")), DayPilot.Locale.all[t]
                }, DayPilot.Locale.register = function(e) {
                    DayPilot.Locale.all[e.id] = e
                }, DayPilot.Locale.register(new DayPilot.Locale("ca-es", {
                    "dayNames": ["diumenge", "dilluns", "dimarts", "dimecres", "dijous", "divendres", "dissabte"],
                    "dayNamesShort": ["dg", "dl", "dt", "dc", "dj", "dv", "ds"],
                    "monthNames": ["gener", "febrer", "març", "abril", "maig", "juny", "juliol", "agost", "setembre", "octubre", "novembre", "desembre", ""],
                    "monthNamesShort": ["gen.", "febr.", "març", "abr.", "maig", "juny", "jul.", "ag.", "set.", "oct.", "nov.", "des.", ""],
                    "timePattern": "H:mm",
                    "datePattern": "dd/MM/yyyy",
                    "dateTimePattern": "dd/MM/yyyy H:mm",
                    "timeFormat": "Clock24Hours",
                    "weekStarts": 1
                })), DayPilot.Locale.register(new DayPilot.Locale("cs-cz", {
                    "dayNames": ["neděle", "pondělí", "úterý", "středa", "čtvrtek", "pátek", "sobota"],
                    "dayNamesShort": ["ne", "po", "út", "st", "čt", "pá", "so"],
                    "monthNames": ["leden", "únor", "březen", "duben", "květen", "červen", "červenec", "srpen", "září", "říjen", "listopad", "prosinec", ""],
                    "monthNamesShort": ["I", "II", "III", "IV", "V", "VI", "VII", "VIII", "IX", "X", "XI", "XII", ""],
                    "timePattern": "H:mm",
                    "datePattern": "d. M. yyyy",
                    "dateTimePattern": "d. M. yyyy H:mm",
                    "timeFormat": "Clock24Hours",
                    "weekStarts": 1
                })), DayPilot.Locale.register(new DayPilot.Locale("da-dk", {
                    "dayNames": ["søndag", "mandag", "tirsdag", "onsdag", "torsdag", "fredag", "lørdag"],
                    "dayNamesShort": ["sø", "ma", "ti", "on", "to", "fr", "lø"],
                    "monthNames": ["januar", "februar", "marts", "april", "maj", "juni", "juli", "august", "september", "oktober", "november", "december", ""],
                    "monthNamesShort": ["jan", "feb", "mar", "apr", "maj", "jun", "jul", "aug", "sep", "okt", "nov", "dec", ""],
                    "timePattern": "HH:mm",
                    "datePattern": "dd-MM-yyyy",
                    "dateTimePattern": "dd-MM-yyyy HH:mm",
                    "timeFormat": "Clock24Hours",
                    "weekStarts": 1
                })), DayPilot.Locale.register(new DayPilot.Locale("de-at", {
                    "dayNames": ["Sonntag", "Montag", "Dienstag", "Mittwoch", "Donnerstag", "Freitag", "Samstag"],
                    "dayNamesShort": ["So", "Mo", "Di", "Mi", "Do", "Fr", "Sa"],
                    "monthNames": ["Jänner", "Februar", "März", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Dezember", ""],
                    "monthNamesShort": ["Jän", "Feb", "Mär", "Apr", "Mai", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dez", ""],
                    "timePattern": "HH:mm",
                    "datePattern": "dd.MM.yyyy",
                    "dateTimePattern": "dd.MM.yyyy HH:mm",
                    "timeFormat": "Clock24Hours",
                    "weekStarts": 1
                })), DayPilot.Locale.register(new DayPilot.Locale("de-ch", {
                    "dayNames": ["Sonntag", "Montag", "Dienstag", "Mittwoch", "Donnerstag", "Freitag", "Samstag"],
                    "dayNamesShort": ["So", "Mo", "Di", "Mi", "Do", "Fr", "Sa"],
                    "monthNames": ["Januar", "Februar", "März", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Dezember", ""],
                    "monthNamesShort": ["Jan", "Feb", "Mrz", "Apr", "Mai", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dez", ""],
                    "timePattern": "HH:mm",
                    "datePattern": "dd.MM.yyyy",
                    "dateTimePattern": "dd.MM.yyyy HH:mm",
                    "timeFormat": "Clock24Hours",
                    "weekStarts": 1
                })), DayPilot.Locale.register(new DayPilot.Locale("de-de", {
                    "dayNames": ["Sonntag", "Montag", "Dienstag", "Mittwoch", "Donnerstag", "Freitag", "Samstag"],
                    "dayNamesShort": ["So", "Mo", "Di", "Mi", "Do", "Fr", "Sa"],
                    "monthNames": ["Januar", "Februar", "März", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Dezember", ""],
                    "monthNamesShort": ["Jan", "Feb", "Mrz", "Apr", "Mai", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dez", ""],
                    "timePattern": "HH:mm",
                    "datePattern": "dd.MM.yyyy",
                    "dateTimePattern": "dd.MM.yyyy HH:mm",
                    "timeFormat": "Clock24Hours",
                    "weekStarts": 1
                })), DayPilot.Locale.register(new DayPilot.Locale("de-lu", {
                    "dayNames": ["Sonntag", "Montag", "Dienstag", "Mittwoch", "Donnerstag", "Freitag", "Samstag"],
                    "dayNamesShort": ["So", "Mo", "Di", "Mi", "Do", "Fr", "Sa"],
                    "monthNames": ["Januar", "Februar", "März", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Dezember", ""],
                    "monthNamesShort": ["Jan", "Feb", "Mrz", "Apr", "Mai", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dez", ""],
                    "timePattern": "HH:mm",
                    "datePattern": "dd.MM.yyyy",
                    "dateTimePattern": "dd.MM.yyyy HH:mm",
                    "timeFormat": "Clock24Hours",
                    "weekStarts": 1
                })), DayPilot.Locale.register(new DayPilot.Locale("en-au", {
                    "dayNames": ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],
                    "dayNamesShort": ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
                    "monthNames": ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December", ""],
                    "monthNamesShort": ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec", ""],
                    "timePattern": "h:mm tt",
                    "datePattern": "d/MM/yyyy",
                    "dateTimePattern": "d/MM/yyyy h:mm tt",
                    "timeFormat": "Clock12Hours",
                    "weekStarts": 1
                })), DayPilot.Locale.register(new DayPilot.Locale("en-ca", {
                    "dayNames": ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],
                    "dayNamesShort": ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
                    "monthNames": ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December", ""],
                    "monthNamesShort": ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec", ""],
                    "timePattern": "h:mm tt",
                    "datePattern": "yyyy-MM-dd",
                    "dateTimePattern": "yyyy-MM-dd h:mm tt",
                    "timeFormat": "Clock12Hours",
                    "weekStarts": 0
                })), DayPilot.Locale.register(new DayPilot.Locale("en-gb", {
                    "dayNames": ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],
                    "dayNamesShort": ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
                    "monthNames": ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December", ""],
                    "monthNamesShort": ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec", ""],
                    "timePattern": "HH:mm",
                    "datePattern": "dd/MM/yyyy",
                    "dateTimePattern": "dd/MM/yyyy HH:mm",
                    "timeFormat": "Clock24Hours",
                    "weekStarts": 1
                })), DayPilot.Locale.register(new DayPilot.Locale("en-us", {
                    "dayNames": ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],
                    "dayNamesShort": ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
                    "monthNames": ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December", ""],
                    "monthNamesShort": ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec", ""],
                    "timePattern": "h:mm tt",
                    "datePattern": "M/d/yyyy",
                    "dateTimePattern": "M/d/yyyy h:mm tt",
                    "timeFormat": "Clock12Hours",
                    "weekStarts": 0
                })), DayPilot.Locale.register(new DayPilot.Locale("es-es", {
                    "dayNames": ["domingo", "lunes", "martes", "miércoles", "jueves", "viernes", "sábado"],
                    "dayNamesShort": ["D", "L", "M", "X", "J", "V", "S"],
                    "monthNames": ["enero", "febrero", "marzo", "abril", "mayo", "junio", "julio", "agosto", "septiembre", "octubre", "noviembre", "diciembre", ""],
                    "monthNamesShort": ["ene.", "feb.", "mar.", "abr.", "may.", "jun.", "jul.", "ago.", "sep.", "oct.", "nov.", "dic.", ""],
                    "timePattern": "H:mm",
                    "datePattern": "dd/MM/yyyy",
                    "dateTimePattern": "dd/MM/yyyy H:mm",
                    "timeFormat": "Clock24Hours",
                    "weekStarts": 1
                })), DayPilot.Locale.register(new DayPilot.Locale("es-mx", {
                    "dayNames": ["domingo", "lunes", "martes", "miércoles", "jueves", "viernes", "sábado"],
                    "dayNamesShort": ["do.", "lu.", "ma.", "mi.", "ju.", "vi.", "sá."],
                    "monthNames": ["enero", "febrero", "marzo", "abril", "mayo", "junio", "julio", "agosto", "septiembre", "octubre", "noviembre", "diciembre", ""],
                    "monthNamesShort": ["ene.", "feb.", "mar.", "abr.", "may.", "jun.", "jul.", "ago.", "sep.", "oct.", "nov.", "dic.", ""],
                    "timePattern": "hh:mm tt",
                    "datePattern": "dd/MM/yyyy",
                    "dateTimePattern": "dd/MM/yyyy hh:mm tt",
                    "timeFormat": "Clock12Hours",
                    "weekStarts": 0
                })), DayPilot.Locale.register(new DayPilot.Locale("eu-es", {
                    "dayNames": ["igandea", "astelehena", "asteartea", "asteazkena", "osteguna", "ostirala", "larunbata"],
                    "dayNamesShort": ["ig", "al", "as", "az", "og", "or", "lr"],
                    "monthNames": ["urtarrila", "otsaila", "martxoa", "apirila", "maiatza", "ekaina", "uztaila", "abuztua", "iraila", "urria", "azaroa", "abendua", ""],
                    "monthNamesShort": ["urt.", "ots.", "mar.", "api.", "mai.", "eka.", "uzt.", "abu.", "ira.", "urr.", "aza.", "abe.", ""],
                    "timePattern": "H:mm",
                    "datePattern": "yyyy/MM/dd",
                    "dateTimePattern": "yyyy/MM/dd H:mm",
                    "timeFormat": "Clock24Hours",
                    "weekStarts": 1
                })), DayPilot.Locale.register(new DayPilot.Locale("fi-fi", {
                    "dayNames": ["sunnuntai", "maanantai", "tiistai", "keskiviikko", "torstai", "perjantai", "lauantai"],
                    "dayNamesShort": ["su", "ma", "ti", "ke", "to", "pe", "la"],
                    "monthNames": ["tammikuu", "helmikuu", "maaliskuu", "huhtikuu", "toukokuu", "kesäkuu", "heinäkuu", "elokuu", "syyskuu", "lokakuu", "marraskuu", "joulukuu", ""],
                    "monthNamesShort": ["tammi", "helmi", "maalis", "huhti", "touko", "kesä", "heinä", "elo", "syys", "loka", "marras", "joulu", ""],
                    "timePattern": "H:mm",
                    "datePattern": "d.M.yyyy",
                    "dateTimePattern": "d.M.yyyy H:mm",
                    "timeFormat": "Clock24Hours",
                    "weekStarts": 1
                })), DayPilot.Locale.register(new DayPilot.Locale("fr-be", {
                    "dayNames": ["dimanche", "lundi", "mardi", "mercredi", "jeudi", "vendredi", "samedi"],
                    "dayNamesShort": ["di", "lu", "ma", "me", "je", "ve", "sa"],
                    "monthNames": ["janvier", "février", "mars", "avril", "mai", "juin", "juillet", "août", "septembre", "octobre", "novembre", "décembre", ""],
                    "monthNamesShort": ["janv.", "févr.", "mars", "avr.", "mai", "juin", "juil.", "août", "sept.", "oct.", "nov.", "déc.", ""],
                    "timePattern": "HH:mm",
                    "datePattern": "dd-MM-yy",
                    "dateTimePattern": "dd-MM-yy HH:mm",
                    "timeFormat": "Clock24Hours",
                    "weekStarts": 1
                })), DayPilot.Locale.register(new DayPilot.Locale("fr-ca", {
                    "dayNames": ["dimanche", "lundi", "mardi", "mercredi", "jeudi", "vendredi", "samedi"],
                    "dayNamesShort": ["di", "lu", "ma", "me", "je", "ve", "sa"],
                    "monthNames": ["janvier", "février", "mars", "avril", "mai", "juin", "juillet", "août", "septembre", "octobre", "novembre", "décembre", ""],
                    "monthNamesShort": ["janv.", "févr.", "mars", "avr.", "mai", "juin", "juil.", "août", "sept.", "oct.", "nov.", "déc.", ""],
                    "timePattern": "HH:mm",
                    "datePattern": "yyyy-MM-dd",
                    "dateTimePattern": "yyyy-MM-dd HH:mm",
                    "timeFormat": "Clock24Hours",
                    "weekStarts": 0
                })), DayPilot.Locale.register(new DayPilot.Locale("fr-ch", {
                    "dayNames": ["dimanche", "lundi", "mardi", "mercredi", "jeudi", "vendredi", "samedi"],
                    "dayNamesShort": ["di", "lu", "ma", "me", "je", "ve", "sa"],
                    "monthNames": ["janvier", "février", "mars", "avril", "mai", "juin", "juillet", "août", "septembre", "octobre", "novembre", "décembre", ""],
                    "monthNamesShort": ["janv.", "févr.", "mars", "avr.", "mai", "juin", "juil.", "août", "sept.", "oct.", "nov.", "déc.", ""],
                    "timePattern": "HH:mm",
                    "datePattern": "dd.MM.yyyy",
                    "dateTimePattern": "dd.MM.yyyy HH:mm",
                    "timeFormat": "Clock24Hours",
                    "weekStarts": 1
                })), DayPilot.Locale.register(new DayPilot.Locale("fr-fr", {
                    "dayNames": ["dimanche", "lundi", "mardi", "mercredi", "jeudi", "vendredi", "samedi"],
                    "dayNamesShort": ["di", "lu", "ma", "me", "je", "ve", "sa"],
                    "monthNames": ["janvier", "février", "mars", "avril", "mai", "juin", "juillet", "août", "septembre", "octobre", "novembre", "décembre", ""],
                    "monthNamesShort": ["janv.", "févr.", "mars", "avr.", "mai", "juin", "juil.", "août", "sept.", "oct.", "nov.", "déc.", ""],
                    "timePattern": "HH:mm",
                    "datePattern": "dd/MM/yyyy",
                    "dateTimePattern": "dd/MM/yyyy HH:mm",
                    "timeFormat": "Clock24Hours",
                    "weekStarts": 1
                })), DayPilot.Locale.register(new DayPilot.Locale("fr-lu", {
                    "dayNames": ["dimanche", "lundi", "mardi", "mercredi", "jeudi", "vendredi", "samedi"],
                    "dayNamesShort": ["di", "lu", "ma", "me", "je", "ve", "sa"],
                    "monthNames": ["janvier", "février", "mars", "avril", "mai", "juin", "juillet", "août", "septembre", "octobre", "novembre", "décembre", ""],
                    "monthNamesShort": ["janv.", "févr.", "mars", "avr.", "mai", "juin", "juil.", "août", "sept.", "oct.", "nov.", "déc.", ""],
                    "timePattern": "HH:mm",
                    "datePattern": "dd/MM/yyyy",
                    "dateTimePattern": "dd/MM/yyyy HH:mm",
                    "timeFormat": "Clock24Hours",
                    "weekStarts": 1
                })), DayPilot.Locale.register(new DayPilot.Locale("gl-es", {
                    "dayNames": ["domingo", "luns", "martes", "mércores", "xoves", "venres", "sábado"],
                    "dayNamesShort": ["do", "lu", "ma", "mé", "xo", "ve", "sá"],
                    "monthNames": ["xaneiro", "febreiro", "marzo", "abril", "maio", "xuño", "xullo", "agosto", "setembro", "outubro", "novembro", "decembro", ""],
                    "monthNamesShort": ["xan", "feb", "mar", "abr", "maio", "xuño", "xul", "ago", "set", "out", "nov", "dec", ""],
                    "timePattern": "H:mm",
                    "datePattern": "dd/MM/yyyy",
                    "dateTimePattern": "dd/MM/yyyy H:mm",
                    "timeFormat": "Clock24Hours",
                    "weekStarts": 1
                })), DayPilot.Locale.register(new DayPilot.Locale("it-it", {
                    "dayNames": ["domenica", "lunedì", "martedì", "mercoledì", "giovedì", "venerdì", "sabato"],
                    "dayNamesShort": ["do", "lu", "ma", "me", "gi", "ve", "sa"],
                    "monthNames": ["gennaio", "febbraio", "marzo", "aprile", "maggio", "giugno", "luglio", "agosto", "settembre", "ottobre", "novembre", "dicembre", ""],
                    "monthNamesShort": ["gen", "feb", "mar", "apr", "mag", "giu", "lug", "ago", "set", "ott", "nov", "dic", ""],
                    "timePattern": "HH:mm",
                    "datePattern": "dd/MM/yyyy",
                    "dateTimePattern": "dd/MM/yyyy HH:mm",
                    "timeFormat": "Clock24Hours",
                    "weekStarts": 1
                })), DayPilot.Locale.register(new DayPilot.Locale("it-ch", {
                    "dayNames": ["domenica", "lunedì", "martedì", "mercoledì", "giovedì", "venerdì", "sabato"],
                    "dayNamesShort": ["do", "lu", "ma", "me", "gi", "ve", "sa"],
                    "monthNames": ["gennaio", "febbraio", "marzo", "aprile", "maggio", "giugno", "luglio", "agosto", "settembre", "ottobre", "novembre", "dicembre", ""],
                    "monthNamesShort": ["gen", "feb", "mar", "apr", "mag", "giu", "lug", "ago", "set", "ott", "nov", "dic", ""],
                    "timePattern": "HH:mm",
                    "datePattern": "dd.MM.yyyy",
                    "dateTimePattern": "dd.MM.yyyy HH:mm",
                    "timeFormat": "Clock24Hours",
                    "weekStarts": 1
                })), DayPilot.Locale.register(new DayPilot.Locale("ja-jp", {
                    "dayNames": ["日曜日", "月曜日", "火曜日", "水曜日", "木曜日", "金曜日", "土曜日"],
                    "dayNamesShort": ["日", "月", "火", "水", "木", "金", "土"],
                    "monthNames": ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月", ""],
                    "monthNamesShort": ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", ""],
                    "timePattern": "H:mm",
                    "datePattern": "yyyy/MM/dd",
                    "dateTimePattern": "yyyy/MM/dd H:mm",
                    "timeFormat": "Clock24Hours",
                    "weekStarts": 0
                })), DayPilot.Locale.register(new DayPilot.Locale("ko-kr", {
                    "dayNames": ["일요일", "월요일", "화요일", "수요일", "목요일", "금요일", "토요일"],
                    "dayNamesShort": ["일", "월", "화", "수", "목", "금", "토"],
                    "monthNames": ["1월", "2월", "3월", "4월", "5월", "6월", "7월", "8월", "9월", "10월", "11월", "12월", ""],
                    "monthNamesShort": ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", ""],
                    "timePattern": "tt h:mm",
                    "datePattern": "yyyy-MM-dd",
                    "dateTimePattern": "yyyy-MM-dd tt h:mm",
                    "timeFormat": "Clock12Hours",
                    "weekStarts": 0
                })), DayPilot.Locale.register(new DayPilot.Locale("nb-no", {
                    "dayNames": ["søndag", "mandag", "tirsdag", "onsdag", "torsdag", "fredag", "lørdag"],
                    "dayNamesShort": ["sø", "ma", "ti", "on", "to", "fr", "lø"],
                    "monthNames": ["januar", "februar", "mars", "april", "mai", "juni", "juli", "august", "september", "oktober", "november", "desember", ""],
                    "monthNamesShort": ["jan", "feb", "mar", "apr", "mai", "jun", "jul", "aug", "sep", "okt", "nov", "des", ""],
                    "timePattern": "HH:mm",
                    "datePattern": "dd.MM.yyyy",
                    "dateTimePattern": "dd.MM.yyyy HH:mm",
                    "timeFormat": "Clock24Hours",
                    "weekStarts": 1
                })), DayPilot.Locale.register(new DayPilot.Locale("nl-nl", {
                    "dayNames": ["zondag", "maandag", "dinsdag", "woensdag", "donderdag", "vrijdag", "zaterdag"],
                    "dayNamesShort": ["zo", "ma", "di", "wo", "do", "vr", "za"],
                    "monthNames": ["januari", "februari", "maart", "april", "mei", "juni", "juli", "augustus", "september", "oktober", "november", "december", ""],
                    "monthNamesShort": ["jan", "feb", "mrt", "apr", "mei", "jun", "jul", "aug", "sep", "okt", "nov", "dec", ""],
                    "timePattern": "HH:mm",
                    "datePattern": "d-M-yyyy",
                    "dateTimePattern": "d-M-yyyy HH:mm",
                    "timeFormat": "Clock24Hours",
                    "weekStarts": 1
                })), DayPilot.Locale.register(new DayPilot.Locale("nl-be", {
                    "dayNames": ["zondag", "maandag", "dinsdag", "woensdag", "donderdag", "vrijdag", "zaterdag"],
                    "dayNamesShort": ["zo", "ma", "di", "wo", "do", "vr", "za"],
                    "monthNames": ["januari", "februari", "maart", "april", "mei", "juni", "juli", "augustus", "september", "oktober", "november", "december", ""],
                    "monthNamesShort": ["jan", "feb", "mrt", "apr", "mei", "jun", "jul", "aug", "sep", "okt", "nov", "dec", ""],
                    "timePattern": "H:mm",
                    "datePattern": "d/MM/yyyy",
                    "dateTimePattern": "d/MM/yyyy H:mm",
                    "timeFormat": "Clock24Hours",
                    "weekStarts": 1
                })), DayPilot.Locale.register(new DayPilot.Locale("nn-no", {
                    "dayNames": ["søndag", "måndag", "tysdag", "onsdag", "torsdag", "fredag", "laurdag"],
                    "dayNamesShort": ["sø", "må", "ty", "on", "to", "fr", "la"],
                    "monthNames": ["januar", "februar", "mars", "april", "mai", "juni", "juli", "august", "september", "oktober", "november", "desember", ""],
                    "monthNamesShort": ["jan", "feb", "mar", "apr", "mai", "jun", "jul", "aug", "sep", "okt", "nov", "des", ""],
                    "timePattern": "HH:mm",
                    "datePattern": "dd.MM.yyyy",
                    "dateTimePattern": "dd.MM.yyyy HH:mm",
                    "timeFormat": "Clock24Hours",
                    "weekStarts": 1
                })), DayPilot.Locale.register(new DayPilot.Locale("pt-br", {
                    "dayNames": ["domingo", "segunda-feira", "terça-feira", "quarta-feira", "quinta-feira", "sexta-feira", "sábado"],
                    "dayNamesShort": ["D", "S", "T", "Q", "Q", "S", "S"],
                    "monthNames": ["janeiro", "fevereiro", "março", "abril", "maio", "junho", "julho", "agosto", "setembro", "outubro", "novembro", "dezembro", ""],
                    "monthNamesShort": ["jan", "fev", "mar", "abr", "mai", "jun", "jul", "ago", "set", "out", "nov", "dez", ""],
                    "timePattern": "HH:mm",
                    "datePattern": "dd/MM/yyyy",
                    "dateTimePattern": "dd/MM/yyyy HH:mm",
                    "timeFormat": "Clock24Hours",
                    "weekStarts": 0
                })), DayPilot.Locale.register(new DayPilot.Locale("pl-pl", {
                    "dayNames": ["niedziela", "poniedziałek", "wtorek", "środa", "czwartek", "piątek", "sobota"],
                    "dayNamesShort": ["N", "Pn", "Wt", "Śr", "Cz", "Pt", "So"],
                    "monthNames": ["styczeń", "luty", "marzec", "kwiecień", "maj", "czerwiec", "lipiec", "sierpień", "wrzesień", "październik", "listopad", "grudzień", ""],
                    "monthNamesShort": ["sty", "lut", "mar", "kwi", "maj", "cze", "lip", "sie", "wrz", "paź", "lis", "gru", ""],
                    "timePattern": "HH:mm",
                    "datePattern": "yyyy-MM-dd",
                    "dateTimePattern": "yyyy-MM-dd HH:mm",
                    "timeFormat": "Clock24Hours",
                    "weekStarts": 1
                })), DayPilot.Locale.register(new DayPilot.Locale("pt-pt", {
                    "dayNames": ["domingo", "segunda-feira", "terça-feira", "quarta-feira", "quinta-feira", "sexta-feira", "sábado"],
                    "dayNamesShort": ["D", "S", "T", "Q", "Q", "S", "S"],
                    "monthNames": ["janeiro", "fevereiro", "março", "abril", "maio", "junho", "julho", "agosto", "setembro", "outubro", "novembro", "dezembro", ""],
                    "monthNamesShort": ["jan", "fev", "mar", "abr", "mai", "jun", "jul", "ago", "set", "out", "nov", "dez", ""],
                    "timePattern": "HH:mm",
                    "datePattern": "dd/MM/yyyy",
                    "dateTimePattern": "dd/MM/yyyy HH:mm",
                    "timeFormat": "Clock24Hours",
                    "weekStarts": 0
                })), DayPilot.Locale.register(new DayPilot.Locale("ro-ro", {
                    "dayNames": ["duminică", "luni", "marți", "miercuri", "joi", "vineri", "sâmbătă"],
                    "dayNamesShort": ["D", "L", "Ma", "Mi", "J", "V", "S"],
                    "monthNames": ["ianuarie", "februarie", "martie", "aprilie", "mai", "iunie", "iulie", "august", "septembrie", "octombrie", "noiembrie", "decembrie", ""],
                    "monthNamesShort": ["ian.", "feb.", "mar.", "apr.", "mai.", "iun.", "iul.", "aug.", "sep.", "oct.", "nov.", "dec.", ""],
                    "timePattern": "H:mm",
                    "datePattern": "dd.MM.yyyy",
                    "dateTimePattern": "dd.MM.yyyy H:mm",
                    "timeFormat": "Clock24Hours",
                    "weekStarts": 1
                })), DayPilot.Locale.register(new DayPilot.Locale("ru-ru", {
                    "dayNames": ["воскресенье", "понедельник", "вторник", "среда", "четверг", "пятница", "суббота"],
                    "dayNamesShort": ["Вс", "Пн", "Вт", "Ср", "Чт", "Пт", "Сб"],
                    "monthNames": ["Январь", "Февраль", "Март", "Апрель", "Май", "Июнь", "Июль", "Август", "Сентябрь", "Октябрь", "Ноябрь", "Декабрь", ""],
                    "monthNamesShort": ["янв", "фев", "мар", "апр", "май", "июн", "июл", "авг", "сен", "окт", "ноя", "дек", ""],
                    "timePattern": "H:mm",
                    "datePattern": "dd.MM.yyyy",
                    "dateTimePattern": "dd.MM.yyyy H:mm",
                    "timeFormat": "Clock24Hours",
                    "weekStarts": 1
                })), DayPilot.Locale.register(new DayPilot.Locale("sk-sk", {
                    "dayNames": ["nedeľa", "pondelok", "utorok", "streda", "štvrtok", "piatok", "sobota"],
                    "dayNamesShort": ["ne", "po", "ut", "st", "št", "pi", "so"],
                    "monthNames": ["január", "február", "marec", "apríl", "máj", "jún", "júl", "august", "september", "október", "november", "december", ""],
                    "monthNamesShort": ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", ""],
                    "timePattern": "H:mm",
                    "datePattern": "d.M.yyyy",
                    "dateTimePattern": "d.M.yyyy H:mm",
                    "timeFormat": "Clock24Hours",
                    "weekStarts": 1
                })), DayPilot.Locale.register(new DayPilot.Locale("sv-se", {
                    "dayNames": ["söndag", "måndag", "tisdag", "onsdag", "torsdag", "fredag", "lördag"],
                    "dayNamesShort": ["sö", "må", "ti", "on", "to", "fr", "lö"],
                    "monthNames": ["januari", "februari", "mars", "april", "maj", "juni", "juli", "augusti", "september", "oktober", "november", "december", ""],
                    "monthNamesShort": ["jan", "feb", "mar", "apr", "maj", "jun", "jul", "aug", "sep", "okt", "nov", "dec", ""],
                    "timePattern": "HH:mm",
                    "datePattern": "yyyy-MM-dd",
                    "dateTimePattern": "yyyy-MM-dd HH:mm",
                    "timeFormat": "Clock24Hours",
                    "weekStarts": 1
                })), DayPilot.Locale.register(new DayPilot.Locale("tr-tr", {
                    "dayNames": ["Pazar", "Pazartesi", "Salı", "Çarşamba", "Perşembe", "Cuma", "Cumartesi"],
                    "dayNamesShort": ["Pz", "Pt", "Sa", "Ça", "Pe", "Cu", "Ct"],
                    "monthNames": ["Ocak", "Şubat", "Mart", "Nisan", "Mayıs", "Haziran", "Temmuz", "Ağustos", "Eylül", "Ekim", "Kasım", "Aralık", ""],
                    "monthNamesShort": ["Oca", "Şub", "Mar", "Nis", "May", "Haz", "Tem", "Ağu", "Eyl", "Eki", "Kas", "Ara", ""],
                    "timePattern": "HH:mm",
                    "datePattern": "d.M.yyyy",
                    "dateTimePattern": "d.M.yyyy HH:mm",
                    "timeFormat": "Clock24Hours",
                    "weekStarts": 1
                })), DayPilot.Locale.register(new DayPilot.Locale("zh-cn", {
                    "dayNames": ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"],
                    "dayNamesShort": ["日", "一", "二", "三", "四", "五", "六"],
                    "monthNames": ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月", ""],
                    "monthNamesShort": ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月", ""],
                    "timePattern": "H:mm",
                    "datePattern": "yyyy/M/d",
                    "dateTimePattern": "yyyy/M/d H:mm",
                    "timeFormat": "Clock24Hours",
                    "weekStarts": 1
                })), DayPilot.Locale.US = DayPilot.Locale.find("en-us"), DayPilot.Switcher = function(e) {
                    function t(e, t, n) {
                        var a = {};
                        a.start = e, a.end = t, a.day = n, a.target = i.active.control, a.preventDefault = function() {
                            this.preventDefault.value = !0
                        };
                        var o = i.n;
                        o && o.start === a.start && o.end === a.end && o.day === a.day && o.target === a.target || (i.n = a, "function" == typeof i.onChange && (i.onChange(a), a.preventDefault.value) || "function" == typeof i.onTimeRangeSelect && (i.onTimeRangeSelect(a), a.preventDefault.value) || (i.active.sendNavigate(i.day), "function" == typeof i.onChanged && i.onChanged(a), "function" == typeof i.onTimeRangeSelected && i.onTimeRangeSelected(a)))
                    }
                    var i = this;
                    this.views = [], this.triggers = [], this.navigator = {}, this.selectedClass = null, this.active = null, this.day = DayPilot.Date.today(), this.onChange = null, this.onChanged = null, this.navigator.updateMode = function(e) {
                        var t = i.navigator.control;
                        t && (t.selectMode = e, t.select(i.day))
                    }, this.addView = function(e, t) {
                        var n;
                        if ("string" == typeof e) {
                            if (n = document.getElementById(e), !n) throw "Element not found: " + e
                        } else n = e;
                        var a = n,
                            o = {};
                        return o.isView = !0, o.id = a.id, o.control = a, o.options = t || {}, o.hide = function() {
                            a.hide ? a.hide() : a.nav && a.nav.top ? a.nav.top.style.display = "none" : a.style.display = "none"
                        }, o.sendNavigate = function(e) {
                            (function() {
                                return !!a.backendUrl || !("function" != typeof WebForm_DoCallback || !a.uniqueID)
                            })() ? a.commandCallBack && a.commandCallBack("navigate", {
                                "day": e
                            }): (a.startDate = e, a.update())
                        }, o.show = function() {
                            i.j(), a.show ? a.show() : a.nav && a.nav.top ? a.nav.top.style.display = "" : a.style.display = ""
                        }, o.selectMode = function() {
                            if (o.options.navigatorSelectMode) return o.options.navigatorSelectMode;
                            if (a.isCalendar) switch (a.viewType) {
                                case "Day":
                                    return "day";
                                case "Week":
                                    return "week";
                                case "WorkWeek":
                                    return "week";
                                default:
                                    return "day"
                            } else if (a.isMonth) switch (a.viewType) {
                                case "Month":
                                    return "month";
                                case "Weeks":
                                    return "week";
                                default:
                                    return "day"
                            }
                            return "day"
                        }, this.views.push(o), o
                    }, this.addTrigger = function(e, t) {
                        var n;
                        if ("string" == typeof e) {
                            if (n = document.getElementById(e), !n) throw "Element not found: " + e
                        } else n = e;
                        var a = this.k(t);
                        a || (a = this.addView(t));
                        var o = {};
                        return o.isTrigger = !0, o.element = n, o.id = n.id, o.view = a, o.onClick = function(e) {
                            i.show(o), i.l(o), e = e || window.event, e && (e.preventDefault ? e.preventDefault() : e.returnValue = !1)
                        }, DayPilot.re(n, "click", o.onClick), this.triggers.push(o), o
                    }, this.addButton = this.addTrigger, this.select = function(e) {
                        var t = this.m(e);
                        t ? t.onClick() : this.triggers.length > 0 && this.triggers[0].onClick()
                    }, this.m = function(e) {
                        for (var t = 0; t < this.triggers.length; t++) {
                            var i = this.triggers[t];
                            if (i.id === e) return i
                        }
                        return null
                    }, this.l = function(e) {
                        if (this.selectedClass) {
                            for (var t = 0; t < this.triggers.length; t++) {
                                var i = this.triggers[t];
                                DayPilot.Util.removeClass(i.element, this.selectedClass)
                            }
                            DayPilot.Util.addClass(e.element, this.selectedClass)
                        }
                    }, this.addNavigator = function(e) {
                        i.navigator.control = e, e.timeRangeSelectedHandling = "JavaScript", e.onTimeRangeSelected = function() {
                            var n, a, o;
                            if (1 === e.api) n = arguments[0], a = arguments[1], o = arguments[2];
                            else {
                                var r = arguments[0];
                                n = r.start, a = r.end, o = r.day
                            }
                            i.day = o, t(n, a, o)
                        }
                    }, this.show = function(e) {
                        var t, n;
                        if (e.isTrigger) n = e, t = n.view;
                        else if (t = e.isView ? e : this.k(e), this.active === t) return;
                        if (i.onSelect) {
                            var a = {};
                            a.source = n ? n.element : null, a.target = t.control, i.onSelect(a)
                        }
                        this.active = t, t.show();
                        var o = t.selectMode();
                        i.navigator.updateMode(o)
                    }, this.k = function(e) {
                        for (var t = 0; t < this.views.length; t++)
                            if (this.views[t].control === e) return this.views[t];
                        return null
                    }, this.j = function() {
                        for (var e = 0; e < this.views.length; e++) this.views[e].hide()
                    }, this.events = {}, this.events.load = function(e, t, n) {
                        if (!i.active || !i.active.control) throw "DayPilot.Switcher.events.load(): Active view not found";
                        i.active.control.events.load(e, t, n)
                    }, this.n = null, this.p = function() {
                        if (e)
                            for (var t in e) "triggers" === t ? DayPilot.list(e.triggers).each(function(e) {
                                i.addTrigger(e.id, e.view)
                            }) : "navigator" === t ? i.addNavigator(e.navigator) : i[t] = e[t]
                    }, this.p()
                },
                function() {
                    if (!DayPilot.Global.defaultCss) {
                        var e = DayPilot.sheet();
                        e.add(".bubble_default_main", "cursor: default;"), e.add(".bubble_default_main_inner", 'border-radius: 5px;font-size: 12px;padding: 4px;color: #666;background: #eeeeee; background: -webkit-gradient(linear, left top, left bottom, from(#ffffff), to(#eeeeee));background: -webkit-linear-gradient(top, #ffffff 0%, #eeeeee);background: -moz-linear-gradient(top, #ffffff 0%, #eeeeee);background: -ms-linear-gradient(top, #ffffff 0%, #eeeeee);background: -o-linear-gradient(top, #ffffff 0%, #eeeeee);background: linear-gradient(top, #ffffff 0%, #eeeeee);filter: progid:DXImageTransform.Microsoft.Gradient(startColorStr="#ffffff", endColorStr="#eeeeee");border: 1px solid #ccc;-moz-border-radius: 5px;-webkit-border-radius: 5px;border-radius: 5px;-moz-box-shadow:0px 2px 3px rgba(000,000,000,0.3),inset 0px 0px 2px rgba(255,255,255,0.8);-webkit-box-shadow:0px 2px 3px rgba(000,000,000,0.3),inset 0px 0px 2px rgba(255,255,255,0.8);box-shadow:0px 2px 3px rgba(000,000,000,0.3),inset 0px 0px 2px rgba(255,255,255,0.8);'), e.add(".calendar_default_main", "border: 1px solid #c0c0c0; font-family: Tahoma, Arial, Helvetica, sans-serif; font-size: 12px;"), e.add(".calendar_default_main *, .calendar_default_main *:before, .calendar_default_main *:after", "box-sizing: content-box;"), e.add(".calendar_default_rowheader_inner,.calendar_default_cornerright_inner,.calendar_default_corner_inner,.calendar_default_colheader_inner,.calendar_default_alldayheader_inner", "color: #333;background: #f3f3f3;"), e.add(".calendar_default_cornerright_inner", "position: absolute;top: 0px;left: 0px;bottom: 0px;right: 0px;\tborder-bottom: 1px solid #c0c0c0;"), e.add(".calendar_default_rowheader_inner", "font-size: 16pt;text-align: right; position: absolute;top: 0px;left: 0px;bottom: 0px;right: 0px;border-right: 1px solid #c0c0c0;border-bottom: 1px solid #c0c0c0; padding: 3px;"), e.add(".calendar_default_corner_inner", "position: absolute;top: 0px;left: 0px;bottom: 0px;right: 0px;border-right: 1px solid #c0c0c0;border-bottom: 1px solid #c0c0c0;"), e.add(".calendar_default_rowheader_minutes", "font-size:10px;vertical-align: super;padding-left: 2px;padding-right: 2px;"), e.add(".calendar_default_colheader_inner", "position: absolute;top: 0px;left: 0px;bottom: 0px;right: 0px;border-right: 1px solid #c0c0c0;border-bottom: 1px solid #c0c0c0; display: flex; align-items: center; justify-content: center;"), e.add(".calendar_default_cell_inner", "position: absolute;top: 0px;left: 0px;bottom: 0px;right: 0px;border-right: 1px solid #ddd;border-bottom: 1px solid #ddd; background: #f9f9f9;"), e.add(".calendar_default_cell_business .calendar_default_cell_inner", "background: #fff"), e.add(".calendar_default_alldayheader_inner", "text-align: center;position: absolute;top: 0px;left: 0px;bottom: 0px;right: 0px;border-right: 1px solid #c0c0c0;border-bottom: 1px solid #c0c0c0;"), e.add(".calendar_default_message", "opacity: 0.9;filter: alpha(opacity=90);\tpadding: 10px; color: #ffffff;background: #ffa216;"), e.add(".calendar_default_alldayevent_inner,.calendar_default_event_inner", "color: #666; border: 1px solid #999;"), e.add(".calendar_default_event_bar", "top: 0px;bottom: 0px;left: 0px;width: 4px;background-color: #9dc8e8;"), e.add(".calendar_default_event_bar_inner", "position: absolute;width: 4px;background-color: #1066a8;"), e.add(".calendar_default_alldayevent_inner,.calendar_default_event_inner", 'background: #fff;background: -webkit-gradient(linear, left top, left bottom, from(#ffffff), to(#eeeeee));background: -webkit-linear-gradient(top, #ffffff 0%, #eeeeee);background: -moz-linear-gradient(top, #ffffff 0%, #eeeeee);background: -ms-linear-gradient(top, #ffffff 0%, #eeeeee);background: -o-linear-gradient(top, #ffffff 0%, #eeeeee);background: linear-gradient(top, #ffffff 0%, #eeeeee);filter: progid:DXImageTransform.Microsoft.Gradient(startColorStr="#ffffff", endColorStr="#eeeeee");'), e.add(".calendar_default_selected .calendar_default_event_inner", "background: #ddd;"), e.add(".calendar_default_alldayevent_inner", "position: absolute;top: 2px;bottom: 2px;left: 2px;right: 2px;overflow:hidden;padding: 2px;margin-right: 1px;font-size: 12px;"), e.add(".calendar_default_event_withheader .calendar_default_event_inner", "padding-top: 15px;"), e.add(".calendar_default_event", "cursor: default;"), e.add(".calendar_default_event_inner", "position: absolute;overflow: hidden;top: 0px;bottom: 0px;left: 0px;right: 0px;padding: 2px 2px 2px 6px;font-size: 12px;"), e.add(".calendar_default_shadow_inner", "position:absolute;top:0px;left:0px;right:0px;bottom:0px;background-color: #666666; opacity: 0.5;filter: alpha(opacity=50);"), e.add(".calendar_default_event_delete", "background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAALCAYAAACprHcmAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjExR/NCNwAAAI5JREFUKFNtkLERgCAMRbmzdK8s4gAUlhYOYEHJEJYOYOEwDmGBPxC4kOPfvePy84MGR0RJ2N1A8H3N6DATwSQ57m2ql8NBG+AEM7D+UW+wjdfUPgerYNgB5gOLRHqhcasg84C2QxPMtrUhSqQIhg7ypy9VM2EUZPI/4rQ7rGxqo9sadTegw+UdjeDLAKUfhbaQUVPIfJYAAAAASUVORK5CYII=) center center no-repeat; opacity: 0.6; -ms-filter:'progid:DXImageTransform.Microsoft.Alpha(Opacity=60)'; cursor: pointer;"), e.add(".calendar_default_event_delete:hover", "opacity: 1;-ms-filter: none;"), e.add(".calendar_default_scroll_up", "background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAB3RJTUUH2wESDiYcrhwCiQAAAAlwSFlzAAAuIwAALiMBeKU/dgAAAARnQU1BAACxjwv8YQUAAACcSURBVHjaY2AgF9wWsTW6yGMlhi7OhC7AyMDQzMnBXIpFHAFuCtuaMTP+P8nA8P/b1x//FfW/HHuF1UQmxv+NUP1c3OxMVVhNvCVi683E8H8LXOY/w9+fTH81tF8fv4NiIpBRj+YoZtZ/LDUoJmKYhsVUpv0MDiyMDP96sIYV0FS2/8z9ICaLlOhvS4b/jC//MzC8xBG0vJeF7GQBlK0xdiUzCtsAAAAASUVORK5CYII=);"), e.add(".calendar_default_scroll_down", "background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAALiMAAC4jAXilP3YAAACqSURBVChTY7wpam3L9J+xmQEP+PGPKZZxP4MDi4zI78uMDIwa2NT+Z2DYovrmiC+TI8OBP/8ZmEqwGvif4e8vxr+FIDkmEKH25vBWBgbG0+iK/zEwLtF+ffwOXCGI8Y+BoRFFIdC030x/WmBiYBNhpgLdswNJ8RSYaSgmgk39z1gPUfj/29ef/9rwhQTDHRHbrbdEbLvRFcGthkkAra/9/uMvhkK8piNLAgCRpTnNn4AEmAAAAABJRU5ErkJggg==);"), e.add(".calendar_default_now", "background-color: red;"), e.add(".calendar_default_now:before", "content: ''; top: -5px; border-width: 5px; border-color: transparent transparent transparent red; border-style: solid; width: 0px; height:0px; position: absolute; -moz-transform: scale(.9999);"), e.add(".calendar_default_shadow_forbidden .calendar_default_shadow_inner", "background-color: red;"), e.add(".calendar_default_shadow_top", 'box-sizing: border-box; padding:2px;border:1px solid #ccc;background:#fff;background: -webkit-gradient(linear, left top, left bottom, from(#ffffff), to(#eeeeee));background: -webkit-linear-gradient(top, #ffffff 0%, #eeeeee);background: -moz-linear-gradient(top, #ffffff 0%, #eeeeee);background: -ms-linear-gradient(top, #ffffff 0%, #eeeeee);background: -o-linear-gradient(top, #ffffff 0%, #eeeeee);background: linear-gradient(top, #ffffff 0%, #eeeeee);filter: progid:DXImageTransform.Microsoft.Gradient(startColorStr="#ffffff", endColorStr="#eeeeee");'), e.add(".calendar_default_shadow_bottom", 'box-sizing: border-box; padding:2px;border:1px solid #ccc;background:#fff;background: -webkit-gradient(linear, left top, left bottom, from(#ffffff), to(#eeeeee));background: -webkit-linear-gradient(top, #ffffff 0%, #eeeeee);background: -moz-linear-gradient(top, #ffffff 0%, #eeeeee);background: -ms-linear-gradient(top, #ffffff 0%, #eeeeee);background: -o-linear-gradient(top, #ffffff 0%, #eeeeee);background: linear-gradient(top, #ffffff 0%, #eeeeee);filter: progid:DXImageTransform.Microsoft.Gradient(startColorStr="#ffffff", endColorStr="#eeeeee");'), e.add(".calendar_default_crosshair_vertical, .calendar_default_crosshair_horizontal, .calendar_default_crosshair_left, .calendar_default_crosshair_top", "background-color: gray; opacity: 0.2; filter: alpha(opacity=20)"), e.add(".calendar_default_loading", "background-color: orange; color: white; padding: 2px;"), e.add(".calendar_default_scroll", "background-color: #f3f3f3;"), e.add(".menu_default_main", "font-family: Tahoma, Arial, Helvetica, Sans-Serif;font-size: 12px;border: 1px solid #dddddd;background-color: white;padding: 0px;cursor: default;background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAABCAIAAABG0om7AAAAKXRFWHRDcmVhdGlvbiBUaW1lAHBvIDEwIDUgMjAxMCAyMjozMzo1OSArMDEwMGzy7+IAAAAHdElNRQfaBQoUJAesj4VUAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAABGdBTUEAALGPC/xhBQAAABVJREFUeNpj/P//PwO1weMnT2RlZAAYuwX/4oA3BgAAAABJRU5ErkJggg==);background-repeat: repeat-y;xborder-radius: 5px;-moz-box-shadow:0px 2px 3px rgba(000,000,000,0.3),inset 0px 0px 2px rgba(255,255,255,0.8);-webkit-box-shadow:0px 2px 3px rgba(000,000,000,0.3),inset 0px 0px 2px rgba(255,255,255,0.8);box-shadow:0px 2px 3px rgba(000,000,000,0.3),inset 0px 0px 2px rgba(255,255,255,0.8);"), e.add(".menu_default_main, .menu_default_main *, .menu_default_main *:before, .menu_default_main *:after", "box-sizing: content-box;"), e.add(".menu_default_title", "background-color: #f2f2f2;border-bottom: 1px solid gray;padding: 4px 4px 4px 37px;"), e.add(".menu_default_main a", "padding: 2px 2px 2px 35px;color: black;text-decoration: none;cursor: default;"), e.add(".menu_default_main a img", "margin-left: 6px;margin-top: 2px;"), e.add(".menu_default_item_text", "display: block;height: 20px;line-height: 20px; overflow:hidden;padding-left: 2px;padding-right: 20px;"), e.add(".menu_default_main a:hover", "background-color: #f3f3f3;"), e.add(".menu_default_main div div", "border-top: 1px solid #dddddd;margin-top: 2px;margin-bottom: 2px;margin-left: 28px;"), e.add(".menu_default_main a.menu_default_item_disabled", "color: #ccc"), e.add(".menu_default_item_haschildren.menu_default_item_haschildren_active", 'background: #eeeeee;background: -webkit-gradient(linear, left top, left bottom, from(#efefef), to(#e6e6e6));background: -webkit-linear-gradient(top, #efefef 0%, #e6e6e6);background: -moz-linear-gradient(top, #efefef 0%, #e6e6e6);background: -ms-linear-gradient(top, #efefef 0%, #e6e6e6);background: -o-linear-gradient(top, #efefef 0%, #e6e6e6);background: linear-gradient(top, #efefef 0%, #e6e6e6);filter: progid:DXImageTransform.Microsoft.Gradient(startColorStr="#efefef", endColorStr="#e6e6e6");'), e.add(".menu_default_item_haschildren a:before", "content: ''; border-width: 6px; border-color: transparent transparent transparent black; border-style: solid; width: 0px; height:0px; position: absolute; right: 5px; margin-top: 4px;"), e.add(".menu_default_item_icon", "position: absolute; top:0px; left: 0px; padding: 2px 2px 2px 8px;"), e.add(".menu_default_item a i", "height: 20px;line-height: 20px;"), e.add(".menubar_default_main", "border-bottom: 1px solid #ccc; font-family: Tahoma, Arial, Helvetica, sans-serif; font-size: 12px;"), e.add(".menubar_default_item", "display: inline-block;  padding: 6px 10px; cursor: default;"), e.add(".menubar_default_item:hover", "background-color: #f2f2f2;"), e.add(".menubar_default_item_active", "background-color: #f2f2f2;"), e.add(".month_default_main", "border: 1px solid #c0c0c0;font-family: Tahoma, Arial, Helvetica, sans-serif; font-size: 12px;color: #333;"), e.add(".month_default_main *, .month_default_main *:before, .month_default_main *:after", "box-sizing: content-box;"), e.add(".month_default_cell_inner", "border-right: 1px solid #ddd;border-bottom: 1px solid #ddd;position: absolute;top: 0px;left: 0px;bottom: 0px;right: 0px;background-color: #f9f9f9;"), e.add(".month_default_cell_business .month_default_cell_inner", "background-color: #fff;"), e.add(".month_default_cell_header", "text-align: right; padding: 4px; box-sizing: border-box;"), e.add(".month_default_header_inner", "position: absolute;top: 0px;left: 0px;bottom: 0px;right: 0px;border-right: 1px solid #c0c0c0;border-bottom: 1px solid #c0c0c0;cursor: default;color: #333;background: #f3f3f3; overflow:hidden; display: flex; align-items: center; justify-content: center;"), e.add(".month_default_message", 'padding: 10px;opacity: 0.9;filter: alpha(opacity=90);color: #ffffff;background: #ffa216;background: -webkit-gradient(linear, left top, left bottom, from(#ffa216), to(#ff8400));background: -webkit-linear-gradient(top, #ffa216 0%, #ff8400);background: -moz-linear-gradient(top, #ffa216 0%, #ff8400);background: -ms-linear-gradient(top, #ffa216 0%, #ff8400);background: -o-linear-gradient(top, #ffa216 0%, #ff8400);background: linear-gradient(top, #ffa216 0%, #ff8400);filter: progid:DXImageTransform.Microsoft.Gradient(startColorStr="#ffa216", endColorStr="#ff8400");'), e.add(".month_default_event_inner", 'position: absolute;top: 0px;bottom: 0px;left: 1px;right: 1px;overflow:hidden;padding: 2px;padding-left: 5px;font-size: 12px;color: #333;background: #fff;background: -webkit-gradient(linear, left top, left bottom, from(#ffffff), to(#eeeeee));background: -webkit-linear-gradient(top, #ffffff 0%, #eeeeee);background: -moz-linear-gradient(top, #ffffff 0%, #eeeeee);background: -ms-linear-gradient(top, #ffffff 0%, #eeeeee);background: -o-linear-gradient(top, #ffffff 0%, #eeeeee);background: linear-gradient(top, #ffffff 0%, #eeeeee);filter: progid:DXImageTransform.Microsoft.Gradient(startColorStr="#ffffff", endColorStr="#eeeeee");border: 1px solid #999;border-radius: 0px;'), e.add(".month_default_event_continueright .month_default_event_inner", "border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-right-style: dotted;"), e.add(".month_default_event_continueleft .month_default_event_inner", "border-top-left-radius: 0px;border-bottom-left-radius: 0px;border-left-style: dotted;"), e.add(".month_default_selected .month_default_event_inner", "background: #ddd;"), e.add(".month_default_shadow_inner", "background-color: #666666;opacity: 0.5;filter: alpha(opacity=50);height: 100%;"), e.add(".month_default_event_delete", "background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAALCAYAAACprHcmAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjExR/NCNwAAAI5JREFUKFNtkLERgCAMRbmzdK8s4gAUlhYOYEHJEJYOYOEwDmGBPxC4kOPfvePy84MGR0RJ2N1A8H3N6DATwSQ57m2ql8NBG+AEM7D+UW+wjdfUPgerYNgB5gOLRHqhcasg84C2QxPMtrUhSqQIhg7ypy9VM2EUZPI/4rQ7rGxqo9sadTegw+UdjeDLAKUfhbaQUVPIfJYAAAAASUVORK5CYII=) center center no-repeat; opacity: 0.6; -ms-filter:'progid:DXImageTransform.Microsoft.Alpha(Opacity=60)';cursor: pointer;"), e.add(".month_default_event_delete:hover", "opacity: 1;-ms-filter: none;"), e.add(".month_default_event_timeleft", "color: #ccc; font-size: 8pt"), e.add(".month_default_event_timeright", "color: #ccc; font-size: 8pt; text-align: right;"), e.add(".month_default_loading", "background-color: orange; color: white; padding: 2px;"), e.add(".navigator_default_main", "border-left: 1px solid #c0c0c0;border-right: 1px solid #c0c0c0;border-bottom: 1px solid #c0c0c0;background-color: white;color: #000000; box-sizing: content-box;"), e.add(".navigator_default_main *, .navigator_default_main *:before, .navigator_default_main *:after", "box-sizing: content-box;"), e.add(".navigator_default_month", "font-family: Tahoma, Arial, Helvetica, sans-serif; font-size: 11px;"), e.add(".navigator_default_day", "color: black;"), e.add(".navigator_default_weekend", "background-color: #f0f0f0;"), e.add(".navigator_default_dayheader", "color: black;"), e.add(".navigator_default_line", "border-bottom: 1px solid #c0c0c0;"), e.add(".navigator_default_dayother", "color: gray;"), e.add(".navigator_default_todaybox", "border: 1px solid red;"), e.add(".navigator_default_title, .navigator_default_titleleft, .navigator_default_titleright", "border-top: 1px solid #c0c0c0;border-bottom: 1px solid #c0c0c0;color: #333;background: #f3f3f3;"), e.add(".navigator_default_busy", "font-weight: bold;"), e.add(".navigator_default_cell", "text-align: center;"), e.add(".navigator_default_select .navigator_default_cell_box", "background-color: #FFE794; opacity: 0.5;"), e.add(".navigator_default_title", "text-align: center;"), e.add(".navigator_default_titleleft, .navigator_default_titleright", "text-align: center;"), e.add(".navigator_default_dayheader", "text-align: center;"), e.add(".navigator_default_weeknumber", "text-align: center;"), e.add(".navigator_default_cell_text", "cursor: pointer;"), e.add(".scheduler_default_main *, .scheduler_default_main *:before, .scheduler_default_main *:after", "box-sizing: content-box;"), e.add(".scheduler_default_main", "box-sizing: content-box; border: 1px solid #c0c0c0;font-family: Tahoma, Arial, Helvetica, sans-serif; font-size: 12px;"), e.add(".scheduler_default_selected .scheduler_default_event_inner", "background: #ddd;"), e.add(".scheduler_default_timeheader", "cursor: default;color: #333;"), e.add(".scheduler_default_message", "opacity: 0.9; padding: 10px; color: #ffffff; background: #ffa216;"), e.add(".scheduler_default_timeheadergroup,.scheduler_default_timeheadercol", "color: #333;background: #f3f3f3;"), e.add(".scheduler_default_rowheader,.scheduler_default_corner", "color: #333;background: #f3f3f3;"), e.add(".scheduler_default_rowheader.scheduler_default_rowheader_selected", "background-color: #aaa; background-image: linear-gradient(45deg, rgba(255, 255, 255, .2) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .2) 50%, rgba(255, 255, 255, .2) 75%, transparent 75%, transparent); background-size: 20px 20px;"), e.add(".scheduler_default_rowheader_inner", "position: absolute;left: 0px;right: 0px;top: 0px;bottom: 0px;border-right: 1px solid #e0e0e0;padding: 2px;display: flex; align-items: center;"), e.add(".scheduler_default_timeheadergroup_inner", "position: absolute;left: 0px;right: 0px;top: 0px;bottom: 0px;border-right: 1px solid #c0c0c0;border-bottom: 1px solid #c0c0c0;display: flex; align-items: center; justify-content: center;"), e.add(".scheduler_default_timeheadercol_inner", "position: absolute;left: 0px;right: 0px;top: 0px;bottom: 0px;border-right: 1px solid #c0c0c0;display: flex; align-items: center; justify-content: center;"), e.add(".scheduler_default_timeheader_float", "display: flex; align-items: center; justify-content: center;"), e.add(".scheduler_default_divider, .scheduler_default_splitter", "background-color: #c0c0c0;"), e.add(".scheduler_default_divider_horizontal", "background-color: #c0c0c0;"), e.add(".scheduler_default_matrix_vertical_line", "background-color: #eee;"), e.add(".scheduler_default_matrix_vertical_break", "background-color: #999;"), e.add(".scheduler_default_matrix_horizontal_line", "background-color: #eee;"), e.add(".scheduler_default_resourcedivider", "background-color: #c0c0c0;"), e.add(".scheduler_default_shadow_inner", "background-color: #666666;opacity: 0.5;filter: alpha(opacity=50);height: 100%;"), e.add(".scheduler_default_event", "font-size:12px;color:#333;"), e.add(".scheduler_default_event_inner", "position:absolute;top:0px;left:0px;right:0px;bottom:0px;padding:2px 2px 2px 2px;overflow:hidden;border:1px solid #ccc; display: flex; align-items: center;"), e.add(".scheduler_default_event_bar", "top:0px;left:0px;right:0px;height:4px;background-color:#9dc8e8;"), e.add(".scheduler_default_event_bar_inner", "position:absolute;height:4px;background-color:#1066a8;"), e.add(".scheduler_default_event_inner", 'background:#fff;background: -webkit-gradient(linear, left top, left bottom, from(#ffffff), to(#eeeeee));background: -webkit-linear-gradient(top, #ffffff 0%, #eeeeee);background: -moz-linear-gradient(top, #ffffff 0%, #eeeeee);background: -ms-linear-gradient(top, #ffffff 0%, #eeeeee);background: -o-linear-gradient(top, #ffffff 0%, #eeeeee);background: linear-gradient(top, #ffffff 0%, #eeeeee);filter: progid:DXImageTransform.Microsoft.Gradient(startColorStr="#ffffff", endColorStr="#eeeeee");'), e.add(".scheduler_default_event_float", "display: flex; align-items: center;"), e.add(".scheduler_default_event_float_inner", "padding:2px 2px 2px 8px; position: relative;"), e.add(".scheduler_default_event_float_inner:after", 'content:"";border-color: transparent #666 transparent transparent;border-style:solid;border-width:5px;width:0;height:0;position:absolute;top:4px;left:-4px;'), e.add(".scheduler_default_columnheader_inner", "font-weight: bold;"), e.add(".scheduler_default_columnheader_splitter", "box-sizing: border-box; border-right: 1px solid #c0c0c0;"), e.add(".scheduler_default_columnheader_splitter:hover", "background-color: #c0c0c0;"), e.add(".scheduler_default_columnheader_cell_inner", "position: absolute; left: 0px; right: 0px; top: 0px; bottom: 0px; padding: 2px; display: flex; align-items: center;"), e.add(".scheduler_default_cell", "background-color: #f9f9f9;"), e.add(".scheduler_default_cell.scheduler_default_cell_business", "background-color: #fff;"), e.add(".scheduler_default_cell.scheduler_default_cell_business.scheduler_default_cell_selected,.scheduler_default_cell.scheduler_default_cell_selected", "background-color: #ccc; background-image: linear-gradient(45deg, rgba(255, 255, 255, .2) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .2) 50%, rgba(255, 255, 255, .2) 75%, transparent 75%, transparent); background-size: 20px 20px;"), e.add(".scheduler_default_tree_image_no_children", "background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJCAIAAABv85FHAAAAKXRFWHRDcmVhdGlvbiBUaW1lAHDhIDMwIEkgMjAwOSAwODo0NjozMSArMDEwMClDkt4AAAAHdElNRQfZAR4HLzEyzsCJAAAACXBIWXMAAA7CAAAOwgEVKEqAAAAABGdBTUEAALGPC/xhBQAAADBJREFUeNpjrK6s5uTl/P75OybJ0NLW8h8bAIozgeSxAaA4E1A7VjmgOL31MeLxHwCeXUT0WkFMKAAAAABJRU5ErkJggg==);"), e.add(".scheduler_default_tree_image_expand", "background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJCAIAAABv85FHAAAAKXRFWHRDcmVhdGlvbiBUaW1lAHDhIDMwIEkgMjAwOSAwODo0NjozMSArMDEwMClDkt4AAAAHdElNRQfZAR4HLyUoFBT0AAAACXBIWXMAAA7CAAAOwgEVKEqAAAAABGdBTUEAALGPC/xhBQAAAFJJREFUeNpjrK6s5uTl/P75OybJ0NLW8h8bAIozgeRhgJGREc4GijMBtTNgA0BxFog+uA4IA2gmUJwFog/IgUhAGBB9KPYhA3T74Jog+hjx+A8A1KRQ+AN5vcwAAAAASUVORK5CYII=);"), e.add(".scheduler_default_tree_image_collapse", "background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJCAIAAABv85FHAAAAKXRFWHRDcmVhdGlvbiBUaW1lAHDhIDMwIEkgMjAwOSAwODo0NjozMSArMDEwMClDkt4AAAAHdElNRQfZAR4HLxB+p9DXAAAACXBIWXMAAA7CAAAOwgEVKEqAAAAABGdBTUEAALGPC/xhBQAAAENJREFUeNpjrK6s5uTl/P75OybJ0NLW8h8bAIozgeSxAaA4E1A7VjmgOAtEHyMjI7IE0EygOAtEH5CDqY9c+xjx+A8ANndK9WaZlP4AAAAASUVORK5CYII=);"),
                        e.add(".scheduler_default_event_delete", "background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAALCAYAAACprHcmAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjExR/NCNwAAAI5JREFUKFNtkLERgCAMRbmzdK8s4gAUlhYOYEHJEJYOYOEwDmGBPxC4kOPfvePy84MGR0RJ2N1A8H3N6DATwSQ57m2ql8NBG+AEM7D+UW+wjdfUPgerYNgB5gOLRHqhcasg84C2QxPMtrUhSqQIhg7ypy9VM2EUZPI/4rQ7rGxqo9sadTegw+UdjeDLAKUfhbaQUVPIfJYAAAAASUVORK5CYII=) center center no-repeat; opacity: 0.6; -ms-filter:'progid:DXImageTransform.Microsoft.Alpha(Opacity=60)';cursor: pointer;"), e.add(".scheduler_default_event_delete:hover", "opacity: 1;-ms-filter: none;"), e.add(".scheduler_default_rowmove_handle", "background-repeat: no-repeat; background-position: center center; background-color: #ccc; background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAKCAYAAACT+/8OAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjExR/NCNwAAAClJREFUGFdj+P//P4O9vX2Bg4NDP4gNFgBytgPxebgAMsYuQGMz/jMAAFsTZDPYJlDHAAAAAElFTkSuQmCC); cursor: move;"), e.add(".scheduler_default_rowmove_source", "background-color: black; opacity: 0.2;"), e.add(".scheduler_default_rowmove_position_before, .scheduler_default_rowmove_position_after", "background-color: #999; height: 2px;"), e.add(".scheduler_default_rowmove_position_child", "margin-left: 10px; background-color: #999; height: 2px;"), e.add(".scheduler_default_rowmove_position_child:before", "content: '+'; color: #999; position: absolute; top: -8px; left: -10px;"), e.add(".scheduler_default_rowmove_position_forbidden", "background-color: red; height: 2px; margin-left: 10px;"), e.add(".scheduler_default_rowmove_position_forbidden:before", "content: 'x'; color: red; position: absolute; top: -8px; left: -10px;"), e.add(".scheduler_default_link_horizontal", "border-bottom-style: solid; border-bottom-color: red"), e.add(".scheduler_default_link_vertical", "border-right-style: solid; border-right-color: red"), e.add(".scheduler_default_link_arrow_right:before", "content: ''; border-width: 6px; border-color: transparent transparent transparent red; border-style: solid; width: 0px; height:0px; position: absolute;"), e.add(".scheduler_default_link_arrow_left:before", "content: ''; border-width: 6px; border-color: transparent red transparent transparent; border-style: solid; width: 0px; height:0px; position: absolute;"), e.add(".scheduler_default_link_arrow_down:before", "content: ''; border-width: 6px; border-color: red transparent transparent transparent; border-style: solid; width: 0px; height:0px; position: absolute;"), e.add(".scheduler_default_link_arrow_up:before", "content: ''; border-width: 6px; border-color: transparent transparent red transparent; border-style: solid; width: 0px; height:0px; position: absolute;"), e.add(".scheduler_default_shadow_overlap .scheduler_default_shadow_inner", "background-color: red;"), e.add(".scheduler_default_block", "background-color: #808080; opacity: 0.5;"), e.add(".scheduler_default_main .scheduler_default_event_group", "box-sizing: border-box; font-size:12px; color:#666; padding:2px; overflow:hidden; border:1px solid #ccc; background-color: #fff; display: flex; align-items: center; white-space: nowrap;"), e.add(".scheduler_default_main .scheduler_default_header_icon", "box-sizing: border-box; border: 1px solid #c0c0c0; background-color: #f5f5f5; color: #000;"), e.add(".scheduler_default_header_icon:hover", "background-color: #ccc;"), e.add(".scheduler_default_header_icon_hide:before", "content: '\\00AB';"), e.add(".scheduler_default_header_icon_show:before", "content: '\\00BB';"), e.add(".scheduler_default_row_new .scheduler_default_rowheader_inner", "padding-left: 10px; color: #666; cursor: text; background-position: 0px 5px; background-repeat: no-repeat; background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAABUSURBVChTY0ACslAaK2CC0iCQDMSlECYmQFYIAl1AjFUxukIQwKoYm0IQwFCMSyEIaEJpMMClcD4Qp0CYEIBNIUzRPzAPCtAVYlWEDgyAGIdTGBgAbqEJYyjqa3oAAAAASUVORK5CYII=);"), e.add(".scheduler_default_row_new .scheduler_default_rowheader_inner:hover", "background: white; color: white;"), e.add(".scheduler_default_rowheader textarea", "padding: 3px;"), e.add(".scheduler_default_rowheader_scroll", "cursor: default;"), e.add(".scheduler_default_shadow_forbidden .scheduler_default_shadow_inner", "background-color: red;"), e.add(".scheduler_default_shadow_invalid .scheduler_default_shadow_inner", "background-color: red;"), e.add(".scheduler_default_event_moving_source", "opacity: 0.5; filter: alpha(opacity=50);"), e.add(".scheduler_default_linkpoint", "background-color: white; border: 1px solid gray; border-radius: 5px;"), e.add(".scheduler_default_linkpoint.scheduler_default_linkpoint_hover", "background-color: black;"), e.add(".scheduler_default_event.scheduler_default_event_version .scheduler_default_event_inner", "background-color: #cfdde8;background-image: -webkit-gradient(linear, 0 100%, 100% 0,\tcolor-stop(.25, rgba(255, 255, 255, .2)), color-stop(.25, transparent),\tcolor-stop(.5, transparent), color-stop(.5, rgba(255, 255, 255, .2)), color-stop(.75, rgba(255, 255, 255, .2)), color-stop(.75, transparent), to(transparent));background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .2) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .2) 50%, rgba(255, 255, 255, .2) 75%, transparent 75%, transparent);background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, .2) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .2) 50%, rgba(255, 255, 255, .2) 75%, transparent 75%, transparent);background-image: -ms-linear-gradient(45deg, rgba(255, 255, 255, .2) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .2) 50%, rgba(255, 255, 255, .2) 75%, transparent 75%, transparent);background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .2) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .2) 50%, rgba(255, 255, 255, .2) 75%, transparent 75%, transparent);background-image: linear-gradient(45deg, rgba(255, 255, 255, .2) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .2) 50%, rgba(255, 255, 255, .2) 75%, transparent 75%, transparent);-webkit-background-size: 20px 20px;-moz-background-size: 20px 20px;background-size: 20px 20px;"), e.add(".scheduler_default_crosshair_vertical, .scheduler_default_crosshair_horizontal, .scheduler_default_crosshair_left, .scheduler_default_crosshair_top", "background-color: gray; opacity: 0.2; filter: alpha(opacity=20)"), e.add(".scheduler_default_link_dot", "border-radius: 10px; background-color: red"), e.add(".scheduler_default_task_milestone .scheduler_default_event_inner", "position:absolute;top:16%;left:16%;right:16%;bottom:16%; background: #38761d; border: 0px none; -webkit-transform: rotate(45deg);-moz-transform: rotate(45deg);-ms-transform: rotate(45deg);-o-transform: rotate(45deg); transform: rotate(45deg); filter: none;"), e.add(".scheduler_default_event_left", "white-space: nowrap; padding-top: 5px; color: #666; cursor: default;"), e.add(".scheduler_default_event_right", "white-space: nowrap; padding-top: 5px; color: #666; cursor: default;"), e.add(".scheduler_default_main:focus", "outline: none;"), e.add(".scheduler_default_cell_focus", "outline: red 2px solid; z-index: 100; opacity: 0.5;"), e.add(".scheduler_default_selectionrectangle", "background-color: #0000ff; border: 1px solid #000033; opacity: 0.4;"), e.add(".scheduler_default_link_shadow", "border:1px solid black;"), e.add(".scheduler_default_link_shadow_circle", "background-color:black;"), e.add(".scheduler_default_event_move_left", 'box-sizing: border-box; padding:2px;border:1px solid #ccc;background:#fff;background: -webkit-gradient(linear, left top, left bottom, from(#ffffff), to(#eeeeee));background: -webkit-linear-gradient(top, #ffffff 0%, #eeeeee);background: -moz-linear-gradient(top, #ffffff 0%, #eeeeee);background: -ms-linear-gradient(top, #ffffff 0%, #eeeeee);background: -o-linear-gradient(top, #ffffff 0%, #eeeeee);background: linear-gradient(top, #ffffff 0%, #eeeeee);filter: progid:DXImageTransform.Microsoft.Gradient(startColorStr="#ffffff", endColorStr="#eeeeee"); display: flex; align-items: center;'), e.add(".scheduler_default_event_move_right", 'box-sizing: border-box; padding:2px;border:1px solid #ccc;background:#fff;background: -webkit-gradient(linear, left top, left bottom, from(#ffffff), to(#eeeeee));background: -webkit-linear-gradient(top, #ffffff 0%, #eeeeee);background: -moz-linear-gradient(top, #ffffff 0%, #eeeeee);background: -ms-linear-gradient(top, #ffffff 0%, #eeeeee);background: -o-linear-gradient(top, #ffffff 0%, #eeeeee);background: linear-gradient(top, #ffffff 0%, #eeeeee);filter: progid:DXImageTransform.Microsoft.Gradient(startColorStr="#ffffff", endColorStr="#eeeeee"); display: flex; align-items: center;'), e.add(".scheduler_default_link_hover", "box-shadow: 0px 0px 2px 2px rgba(255, 0, 0, 0.3)"), e.add(".scheduler_default_sorticon", "opacity: 0.2;background-position: center center; background-repeat: no-repeat; cursor: pointer;"), e.add(".scheduler_default_sorticon.scheduler_default_sorticon_asc", "background-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAiIGhlaWdodD0iMTAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBvbHlnb24gcG9pbnRzPSI1IDEuNSwgMTAgMTAsIDAgMTAiLz48L3N2Zz4=');"), e.add(".scheduler_default_sorticon.scheduler_default_sorticon_desc", "background-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAiIGhlaWdodD0iMTAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBvbHlnb24gcG9pbnRzPSI1IDguNSwgMCAwLCAxMCAwIi8+PC9zdmc+');"), e.add(".scheduler_default_sorticon.scheduler_default_sorticon_active", "opacity: 1;"), e.add(".gantt_default_selected .gantt_default_event_inner", "background: #ddd;"), e.add(".gantt_default_main", "border: 1px solid #c0c0c0;font-family: Tahoma, Arial, Helvetica, sans-serif; font-size: 12px;"), e.add(".gantt_default_main *, .gantt_default_main *:before, .gantt_default_main *:after", "box-sizing: content-box;"), e.add(".gantt_default_timeheader", "cursor: default;color: #666;"), e.add(".gantt_default_message", "opacity: 0.9;filter: alpha(opacity=90);padding: 10px; color: #ffffff;background: #ffa216;"), e.add(".gantt_default_timeheadergroup,.gantt_default_timeheadercol", "color: #333;background: #f3f3f3;"), e.add(".gantt_default_rowheader,.gantt_default_corner", "color: #333;background: #f3f3f3;"), e.add(".gantt_default_rowheader.gantt_default_rowheader_selected", "background-color: #aaa;background-image: -webkit-gradient(linear, 0 100%, 100% 0,color-stop(.25, rgba(255, 255, 255, .2)), color-stop(.25, transparent),\tcolor-stop(.5, transparent), color-stop(.5, rgba(255, 255, 255, .2)), color-stop(.75, rgba(255, 255, 255, .2)), color-stop(.75, transparent), to(transparent));background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .2) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .2) 50%, rgba(255, 255, 255, .2) 75%, transparent 75%, transparent);background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, .2) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .2) 50%, rgba(255, 255, 255, .2) 75%, transparent 75%, transparent);background-image: -ms-linear-gradient(45deg, rgba(255, 255, 255, .2) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .2) 50%, rgba(255, 255, 255, .2) 75%, transparent 75%, transparent);background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .2) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .2) 50%, rgba(255, 255, 255, .2) 75%, transparent 75%, transparent);background-image: linear-gradient(45deg, rgba(255, 255, 255, .2) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .2) 50%, rgba(255, 255, 255, .2) 75%, transparent 75%, transparent);-webkit-background-size: 20px 20px;-moz-background-size: 20px 20px;background-size: 20px 20px;"), e.add(".gantt_default_rowheader_inner", "position: absolute;left: 0px;right: 0px;top: 0px;bottom: 0px;border-right: 1px solid #e0e0e0;padding: 2px;display: flex; align-items: center;"), e.add(".gantt_default_timeheadergroup_inner", "position: absolute;left: 0px;right: 0px;top: 0px;bottom: 0px;border-right: 1px solid #c0c0c0;border-bottom: 1px solid #c0c0c0;display: flex; align-items: center; justify-content: center;"), e.add(".gantt_default_timeheadercol_inner", "position: absolute;left: 0px;right: 0px;top: 0px;bottom: 0px;border-right: 1px solid #c0c0c0;display: flex; align-items: center; justify-content: center;"), e.add(".gantt_default_divider, .gantt_default_splitter", "background-color: #c0c0c0;"), e.add(".gantt_default_divider_horizontal", "background-color: #c0c0c0;"), e.add(".gantt_default_matrix_vertical_line", "background-color: #eee;"), e.add(".gantt_default_matrix_vertical_break", "background-color: #000;"), e.add(".gantt_default_matrix_horizontal_line", "background-color: #eee;"), e.add(".gantt_default_resourcedivider", "background-color: #c0c0c0;"), e.add(".gantt_default_shadow_inner", "background-color: #666666;opacity: 0.5;filter: alpha(opacity=50);height: 100%;"), e.add(".gantt_default_event", "font-size:12px;color:#666;"), e.add(".gantt_default_event_inner", "position:absolute;top:0px;left:0px;right:0px;bottom:0px;padding:2px 2px 2px 2px;overflow:hidden;border:1px solid #ccc; display: flex; align-items: center;"), e.add(".gantt_default_event_bar", "top:0px;left:0px;right:0px;height:4px;background-color:#9dc8e8;"), e.add(".gantt_default_event_bar_inner", "position:absolute;height:4px;background-color:#1066a8;"), e.add(".gantt_default_event_inner", 'background:#fff;background: -webkit-gradient(linear, left top, left bottom, from(#ffffff), to(#eeeeee));background: -webkit-linear-gradient(top, #ffffff 0%, #eeeeee);background: -moz-linear-gradient(top, #ffffff 0%, #eeeeee);background: -ms-linear-gradient(top, #ffffff 0%, #eeeeee);background: -o-linear-gradient(top, #ffffff 0%, #eeeeee);background: linear-gradient(top, #ffffff 0%, #eeeeee);filter: progid:DXImageTransform.Microsoft.Gradient(startColorStr="#ffffff", endColorStr="#eeeeee");'), e.add(".gantt_default_event_float_inner", "padding:6px 2px 2px 8px;"), e.add(".gantt_default_event_float_inner:after", 'content:"";border-color: transparent #666 transparent transparent;border-style:solid;border-width:5px;width:0;height:0;position:absolute;top:8px;left:-4px;'), e.add(".gantt_default_columnheader_inner", "font-weight: bold;");
                        e.add(".gantt_default_columnheader_splitter", "background-color: #666;opacity: 0.5;filter: alpha(opacity=50);");
                        e.add(".gantt_default_columnheader_cell_inner", "position: absolute; left: 0px; right: 0px; top: 0px; bottom: 0px; padding: 2px; display: flex; align-items: center;"), e.add(".gantt_default_cell", "background-color: #f9f9f9;"), e.add(".gantt_default_cell.gantt_default_cell_business", "background-color: #fff;"), e.add(".gantt_default_cell.gantt_default_cell_business.gantt_default_cell_selected,.gantt_default_cell.gantt_default_cell_selected", "background-color: #ccc;background-image: -webkit-gradient(linear, 0 100%, 100% 0,\tcolor-stop(.25, rgba(255, 255, 255, .2)), color-stop(.25, transparent),\tcolor-stop(.5, transparent), color-stop(.5, rgba(255, 255, 255, .2)), color-stop(.75, rgba(255, 255, 255, .2)), color-stop(.75, transparent), to(transparent));background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .2) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .2) 50%, rgba(255, 255, 255, .2) 75%, transparent 75%, transparent);background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, .2) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .2) 50%, rgba(255, 255, 255, .2) 75%, transparent 75%, transparent);background-image: -ms-linear-gradient(45deg, rgba(255, 255, 255, .2) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .2) 50%, rgba(255, 255, 255, .2) 75%, transparent 75%, transparent);background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .2) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .2) 50%, rgba(255, 255, 255, .2) 75%, transparent 75%, transparent);background-image: linear-gradient(45deg, rgba(255, 255, 255, .2) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .2) 50%, rgba(255, 255, 255, .2) 75%, transparent 75%, transparent);-webkit-background-size: 20px 20px;-moz-background-size: 20px 20px;background-size: 20px 20px;"), e.add(".gantt_default_tree_image_no_children", "background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJCAIAAABv85FHAAAAKXRFWHRDcmVhdGlvbiBUaW1lAHDhIDMwIEkgMjAwOSAwODo0NjozMSArMDEwMClDkt4AAAAHdElNRQfZAR4HLzEyzsCJAAAACXBIWXMAAA7CAAAOwgEVKEqAAAAABGdBTUEAALGPC/xhBQAAADBJREFUeNpjrK6s5uTl/P75OybJ0NLW8h8bAIozgeSxAaA4E1A7VjmgOL31MeLxHwCeXUT0WkFMKAAAAABJRU5ErkJggg==);"), e.add(".gantt_default_tree_image_expand", "background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJCAIAAABv85FHAAAAKXRFWHRDcmVhdGlvbiBUaW1lAHDhIDMwIEkgMjAwOSAwODo0NjozMSArMDEwMClDkt4AAAAHdElNRQfZAR4HLyUoFBT0AAAACXBIWXMAAA7CAAAOwgEVKEqAAAAABGdBTUEAALGPC/xhBQAAAFJJREFUeNpjrK6s5uTl/P75OybJ0NLW8h8bAIozgeRhgJGREc4GijMBtTNgA0BxFog+uA4IA2gmUJwFog/IgUhAGBB9KPYhA3T74Jog+hjx+A8A1KRQ+AN5vcwAAAAASUVORK5CYII=);"), e.add(".gantt_default_tree_image_collapse", "background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJCAIAAABv85FHAAAAKXRFWHRDcmVhdGlvbiBUaW1lAHDhIDMwIEkgMjAwOSAwODo0NjozMSArMDEwMClDkt4AAAAHdElNRQfZAR4HLxB+p9DXAAAACXBIWXMAAA7CAAAOwgEVKEqAAAAABGdBTUEAALGPC/xhBQAAAENJREFUeNpjrK6s5uTl/P75OybJ0NLW8h8bAIozgeSxAaA4E1A7VjmgOAtEHyMjI7IE0EygOAtEH5CDqY9c+xjx+A8ANndK9WaZlP4AAAAASUVORK5CYII=);"), e.add(".gantt_default_event_move_left", 'box-sizing: border-box; padding:2px;border:1px solid #ccc;background:#fff;background: -webkit-gradient(linear, left top, left bottom, from(#ffffff), to(#eeeeee));background: -webkit-linear-gradient(top, #ffffff 0%, #eeeeee);background: -moz-linear-gradient(top, #ffffff 0%, #eeeeee);background: -ms-linear-gradient(top, #ffffff 0%, #eeeeee);background: -o-linear-gradient(top, #ffffff 0%, #eeeeee);background: linear-gradient(top, #ffffff 0%, #eeeeee);filter: progid:DXImageTransform.Microsoft.Gradient(startColorStr="#ffffff", endColorStr="#eeeeee");'), e.add(".gantt_default_event_move_right", 'box-sizing: border-box; padding:2px;border:1px solid #ccc;background:#fff;background: -webkit-gradient(linear, left top, left bottom, from(#ffffff), to(#eeeeee));background: -webkit-linear-gradient(top, #ffffff 0%, #eeeeee);background: -moz-linear-gradient(top, #ffffff 0%, #eeeeee);background: -ms-linear-gradient(top, #ffffff 0%, #eeeeee);background: -o-linear-gradient(top, #ffffff 0%, #eeeeee);background: linear-gradient(top, #ffffff 0%, #eeeeee);filter: progid:DXImageTransform.Microsoft.Gradient(startColorStr="#ffffff", endColorStr="#eeeeee");'), e.add(".gantt_default_event_delete", "background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAALCAYAAACprHcmAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjExR/NCNwAAAI5JREFUKFNtkLERgCAMRbmzdK8s4gAUlhYOYEHJEJYOYOEwDmGBPxC4kOPfvePy84MGR0RJ2N1A8H3N6DATwSQ57m2ql8NBG+AEM7D+UW+wjdfUPgerYNgB5gOLRHqhcasg84C2QxPMtrUhSqQIhg7ypy9VM2EUZPI/4rQ7rGxqo9sadTegw+UdjeDLAKUfhbaQUVPIfJYAAAAASUVORK5CYII=) center center no-repeat; opacity: 0.6; -ms-filter:'progid:DXImageTransform.Microsoft.Alpha(Opacity=60)';cursor: pointer;"), e.add(".gantt_default_event_delete:hover", "opacity: 1;-ms-filter: none;"), e.add(".gantt_default_rowmove_handle", "background-repeat: no-repeat; background-position: center center; background-color: #ccc; background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAKCAYAAACT+/8OAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjExR/NCNwAAAClJREFUGFdj+P//P4O9vX2Bg4NDP4gNFgBytgPxebgAMsYuQGMz/jMAAFsTZDPYJlDHAAAAAElFTkSuQmCC); cursor: move;"), e.add(".gantt_default_rowmove_source", "background-color: black; opacity: 0.2;"), e.add(".gantt_default_rowmove_position_before, .gantt_default_rowmove_position_after", "background-color: #999; height: 2px;"), e.add(".gantt_default_rowmove_position_child", "margin-left: 10px; background-color: #999; height: 2px;"), e.add(".gantt_default_rowmove_position_child:before", "content: '+'; color: #999; position: absolute; top: -8px; left: -10px;"), e.add(".gantt_default_rowmove_position_forbidden", "background-color: red; height: 2px; margin-left: 10px;"), e.add(".gantt_default_rowmove_position_forbidden:before", "content: 'x'; color: red; position: absolute; top: -8px; left: -10px;"), e.add(".gantt_default_task_group .gantt_default_event_inner", "position:absolute;top:5px;left:0px;right:0px;bottom:6px;overflow:hidden; background: #1155cc; filter: none; border: 0px none;"), e.add(".gantt_default_task_group.gantt_default_event:before", "content:''; border-color: transparent transparent transparent #1155cc; border-style: solid; border-width: 6px; position: absolute; bottom: 0px;"), e.add(".gantt_default_task_group.gantt_default_event:after", "content:''; border-color: transparent #1155cc transparent transparent; border-style: solid; border-width: 6px; position: absolute; bottom: 0px; right: 0px;"), e.add(".gantt_default_task_milestone .gantt_default_event_inner", "position:absolute;top:16%;left:16%;right:16%;bottom:16%; background: #38761d; border: 0px none; -webkit-transform: rotate(45deg);-moz-transform: rotate(45deg);-ms-transform: rotate(45deg);-o-transform: rotate(45deg); transform: rotate(45deg); filter: none;"), e.add(".gantt_default_browser_ie8 .gantt_default_task_milestone .gantt_default_event_inner", "-ms-filter: \"progid:DXImageTransform.Microsoft.Matrix(SizingMethod='auto expand', M11=0.7071067811865476, M12=-0.7071067811865475, M21=0.7071067811865475, M22=0.7071067811865476);\""), e.add(".gantt_default_event_left", "white-space: nowrap; padding-top: 5px; color: #666; cursor: default;  display: flex; align-items: center;"), e.add(".gantt_default_event_right", "white-space: nowrap; padding-top: 5px; color: #666; cursor: default;  display: flex; align-items: center;"), e.add(".gantt_default_link_horizontal", "border-bottom-style: solid; border-bottom-color: red;"), e.add(".gantt_default_link_vertical", "border-right-style: solid; border-right-color: red;"), e.add(".gantt_default_link_arrow_right:before", "content: ''; border-width: 6px; border-color: transparent transparent transparent red; border-style: solid; width: 0px; height:0px; position: absolute;"), e.add(".gantt_default_link_arrow_left:before", "content: ''; border-width: 6px; border-color: transparent red transparent transparent; border-style: solid; width: 0px; height:0px; position: absolute;"), e.add(".gantt_default_link_arrow_down:before", "content: ''; border-width: 6px; border-color: red transparent transparent transparent; border-style: solid; width: 0px; height:0px; position: absolute;"), e.add(".gantt_default_link_arrow_up:before", "content: ''; border-width: 6px; border-color: transparent transparent red transparent; border-style: solid; width: 0px; height:0px; position: absolute;"), e.add(".gantt_default_shadow_overlap .gantt_default_shadow_inner", "background-color: red;"), e.add(".gantt_default_block", "background-color: gray; opacity: 0.5; filter: alpha(opacity=50);"), e.add(".gantt_default_link_hover", "box-shadow: 0px 0px 2px 2px rgba(255, 0, 0, 0.3)"), e.add(".gantt_default_main .gantt_default_header_icon", "box-sizing: border-box; border: 1px solid #aaa; background-color: #f5f5f5; color: #000;"), e.add(".gantt_default_header_icon:hover", "background-color: #ccc;"), e.add(".gantt_default_header_icon_hide:before", "content: '\\00AB';"), e.add(".gantt_default_header_icon_show:before", "content: '\\00BB';"), e.add(".gantt_default_row_new .gantt_default_rowheader_inner", "cursor: text; background-position: 0 50%; background-repeat: no-repeat; background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAABUSURBVChTY0ACslAaK2CC0iCQDMSlECYmQFYIAl1AjFUxukIQwKoYm0IQwFCMSyEIaEJpMMClcD4Qp0CYEIBNIUzRPzAPCtAVYlWEDgyAGIdTGBgAbqEJYyjqa3oAAAAASUVORK5CYII=);"), e.add(".gantt_default_row_new .gantt_default_rowheader_inner:hover", "background: white;"), e.add(".gantt_default_rowheader textarea", "padding: 5px;"), e.add(".gantt_default_rowheader_scroll", "cursor: default;"), e.add(".gantt_default_shadow_forbidden .gantt_default_shadow_inner", "background-color: red;"), e.add(".gantt_default_event_moving_source", "opacity: 0.5; filter: alpha(opacity=50);"), e.add(".gantt_default_event.gantt_default_event_version .gantt_default_event_inner", "background-color: #cfdde8;background-image: -webkit-gradient(linear, 0 100%, 100% 0,\tcolor-stop(.25, rgba(255, 255, 255, .2)), color-stop(.25, transparent),\tcolor-stop(.5, transparent), color-stop(.5, rgba(255, 255, 255, .2)), color-stop(.75, rgba(255, 255, 255, .2)), color-stop(.75, transparent), to(transparent));background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .2) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .2) 50%, rgba(255, 255, 255, .2) 75%, transparent 75%, transparent);background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, .2) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .2) 50%, rgba(255, 255, 255, .2) 75%, transparent 75%, transparent);background-image: -ms-linear-gradient(45deg, rgba(255, 255, 255, .2) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .2) 50%, rgba(255, 255, 255, .2) 75%, transparent 75%, transparent);background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .2) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .2) 50%, rgba(255, 255, 255, .2) 75%, transparent 75%, transparent);background-image: linear-gradient(45deg, rgba(255, 255, 255, .2) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .2) 50%, rgba(255, 255, 255, .2) 75%, transparent 75%, transparent);-webkit-background-size: 20px 20px;-moz-background-size: 20px 20px;background-size: 20px 20px;"), e.add(".gantt_default_task_group.gantt_default_event_continueleft.gantt_default_event:before", "border:0;"), e.add(".gantt_default_task_group.gantt_default_event_continueleft.gantt_default_event .gantt_default_event_inner:before", 'content:"";border-color: transparent #fff transparent transparent;border-style:solid;border-width:5px;width:0;height:0;position:absolute;top:2px;left:-4px;'), e.add(".gantt_default_event_continueleft.gantt_default_event .gantt_default_event_inner", "padding-left: 8px;"), e.add(".gantt_default_event_continueleft.gantt_default_event .gantt_default_event_inner:before", 'content:"";border-color: transparent #000 transparent transparent;border-style:solid;border-width:5px;width:0;height:0;position:absolute;top:7px;left:-4px;'), e.add(".gantt_default_task_group.gantt_default_event_continueright.gantt_default_event:after", "border:0;"), e.add(".gantt_default_task_group.gantt_default_event_continueright.gantt_default_event .gantt_default_event_inner:after", 'content:"";border-color: transparent transparent transparent #fff;border-style:solid;border-width:5px;width:0;height:0;position:absolute;top:2px;right:-2px;'), e.add(".gantt_default_event_continueright.gantt_default_event .gantt_default_event_inner", "padding-right: 8px;"), e.add(".gantt_default_event_continueright.gantt_default_event .gantt_default_event_inner:after", 'content:"";border-color: transparent transparent transparent #000;border-style:solid;border-width:5px;width:0;height:0;position:absolute;top:7px;right:-2px;'), e.add(".gantt_default_linkpoint", "background-color: white; border: 1px solid gray; border-radius: 5px;"), e.add(".gantt_default_linkpoint.gantt_default_linkpoint_hover", "background-color: black;"), e.add(".gantt_default_crosshair_vertical, .gantt_default_crosshair_horizontal, .gantt_default_crosshair_left, .gantt_default_crosshair_top", "background-color: gray; opacity: 0.2; filter: alpha(opacity=20)"), e.add(".gantt_default_selectionrectangle", "background-color: #0000ff; border: 1px solid #000033; opacity: 0.4;"), e.add(".gantt_default_link_shadow", "border:1px solid black;"), e.add(".gantt_default_link_shadow_circle", "background-color:black;"), e.add(".gantt_default_link_hover", "box-shadow: 0px 0px 2px 2px rgba(255, 0, 0, 0.3)"), e.add(".kanban_default_main *, .kanban_default_main *:before, .kanban_default_main *:after", "box-sizing: content-box;"), e.add(".kanban_default_main", "box-sizing: content-box; border: 1px solid #c0c0c0;font-family: Tahoma, Arial, Helvetica, sans-serif; font-size: 12px;"), e.add(".kanban_default_selected .kanban_default_event_inner", "background: #ddd;"), e.add(".kanban_default_timeheader", "cursor: default;color: #333;"), e.add(".kanban_default_message", "opacity: 0.9;filter: alpha(opacity=90);padding: 10px; color: #ffffff;background: #ffa216;"), e.add(".kanban_default_colheadercell", "color: #333;background: #f3f3f3;"), e.add(".kanban_default_rowheader,.kanban_default_corner", "color: #333;background: #f3f3f3;"), e.add(".kanban_default_rowheader.kanban_default_rowheader_selected", "background-color: #aaa;background-image: -webkit-gradient(linear, 0 100%, 100% 0,color-stop(.25, rgba(255, 255, 255, .2)), color-stop(.25, transparent),\tcolor-stop(.5, transparent), color-stop(.5, rgba(255, 255, 255, .2)), color-stop(.75, rgba(255, 255, 255, .2)), color-stop(.75, transparent), to(transparent));background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .2) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .2) 50%, rgba(255, 255, 255, .2) 75%, transparent 75%, transparent);background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, .2) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .2) 50%, rgba(255, 255, 255, .2) 75%, transparent 75%, transparent);background-image: -ms-linear-gradient(45deg, rgba(255, 255, 255, .2) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .2) 50%, rgba(255, 255, 255, .2) 75%, transparent 75%, transparent);background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .2) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .2) 50%, rgba(255, 255, 255, .2) 75%, transparent 75%, transparent);background-image: linear-gradient(45deg, rgba(255, 255, 255, .2) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .2) 50%, rgba(255, 255, 255, .2) 75%, transparent 75%, transparent);-webkit-background-size: 20px 20px;-moz-background-size: 20px 20px;background-size: 20px 20px;"), e.add(".kanban_default_rowheader_inner", "position: absolute;left: 0px;right: 0px;top: 0px;bottom: 0px;border-right: 1px solid #f3f3f3;padding: 2px;"), e.add(".kanban_default_colheadercell", "text-align: center;"), e.add(".kanban_default_colheadercell_inner", "position: absolute;left: 0px;right: 0px;top: 0px;bottom: 0px;border-right: 1px solid #c0c0c0;"), e.add(".kanban_default_divider, .kanban_default_splitter", "background-color: #c0c0c0;"), e.add(".kanban_default_divider_horizontal", "background-color: #c0c0c0;"), e.add(".kanban_default_matrix_vertical_line", "background-color: #eee;"), e.add(".kanban_default_matrix_vertical_break", "background-color: #000;"), e.add(".kanban_default_matrix_horizontal_line", "background-color: #eee;"), e.add(".kanban_default_rowheaderdivider", "background-color: #c0c0c0;"), e.add(".kanban_default_shadow_inner", "background-color: #666666;opacity: 0.5;filter: alpha(opacity=50);height: 100%;"), e.add(".kanban_default_card", "font-size:12px;color:#333;"), e.add(".kanban_default_card_inner", "position:absolute;top:0px;left:0px;right:0px;bottom:0px;padding:5px 2px 2px 2px;overflow:hidden;border:1px solid #ccc;"), e.add(".kanban_default_card_inner", 'background:#fff;background: -webkit-gradient(linear, left top, left bottom, from(#ffffff), to(#eeeeee));background: -webkit-linear-gradient(top, #ffffff 0%, #eeeeee);background: -moz-linear-gradient(top, #ffffff 0%, #eeeeee);background: -ms-linear-gradient(top, #ffffff 0%, #eeeeee);background: -o-linear-gradient(top, #ffffff 0%, #eeeeee);background: linear-gradient(top, #ffffff 0%, #eeeeee);filter: progid:DXImageTransform.Microsoft.Gradient(startColorStr="#ffffff", endColorStr="#eeeeee");'),
                        e.add(".kanban_default_cell", "background-color: #fff;"), e.add(".kanban_default_cell.kanban_default_cell_selected", "background-color: #ccc;background-image: -webkit-gradient(linear, 0 100%, 100% 0,\tcolor-stop(.25, rgba(255, 255, 255, .2)), color-stop(.25, transparent),\tcolor-stop(.5, transparent), color-stop(.5, rgba(255, 255, 255, .2)), color-stop(.75, rgba(255, 255, 255, .2)), color-stop(.75, transparent), to(transparent));background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .2) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .2) 50%, rgba(255, 255, 255, .2) 75%, transparent 75%, transparent);background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, .2) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .2) 50%, rgba(255, 255, 255, .2) 75%, transparent 75%, transparent);background-image: -ms-linear-gradient(45deg, rgba(255, 255, 255, .2) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .2) 50%, rgba(255, 255, 255, .2) 75%, transparent 75%, transparent);background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .2) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .2) 50%, rgba(255, 255, 255, .2) 75%, transparent 75%, transparent);background-image: linear-gradient(45deg, rgba(255, 255, 255, .2) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .2) 50%, rgba(255, 255, 255, .2) 75%, transparent 75%, transparent);-webkit-background-size: 20px 20px;-moz-background-size: 20px 20px;background-size: 20px 20px;"), e.add(".kanban_default_tree_image_no_children", "background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJCAIAAABv85FHAAAAKXRFWHRDcmVhdGlvbiBUaW1lAHDhIDMwIEkgMjAwOSAwODo0NjozMSArMDEwMClDkt4AAAAHdElNRQfZAR4HLzEyzsCJAAAACXBIWXMAAA7CAAAOwgEVKEqAAAAABGdBTUEAALGPC/xhBQAAADBJREFUeNpjrK6s5uTl/P75OybJ0NLW8h8bAIozgeSxAaA4E1A7VjmgOL31MeLxHwCeXUT0WkFMKAAAAABJRU5ErkJggg==);"), e.add(".kanban_default_tree_image_expand", "background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJCAIAAABv85FHAAAAKXRFWHRDcmVhdGlvbiBUaW1lAHDhIDMwIEkgMjAwOSAwODo0NjozMSArMDEwMClDkt4AAAAHdElNRQfZAR4HLyUoFBT0AAAACXBIWXMAAA7CAAAOwgEVKEqAAAAABGdBTUEAALGPC/xhBQAAAFJJREFUeNpjrK6s5uTl/P75OybJ0NLW8h8bAIozgeRhgJGREc4GijMBtTNgA0BxFog+uA4IA2gmUJwFog/IgUhAGBB9KPYhA3T74Jog+hjx+A8A1KRQ+AN5vcwAAAAASUVORK5CYII=);"), e.add(".kanban_default_tree_image_collapse", "background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJCAIAAABv85FHAAAAKXRFWHRDcmVhdGlvbiBUaW1lAHDhIDMwIEkgMjAwOSAwODo0NjozMSArMDEwMClDkt4AAAAHdElNRQfZAR4HLxB+p9DXAAAACXBIWXMAAA7CAAAOwgEVKEqAAAAABGdBTUEAALGPC/xhBQAAAENJREFUeNpjrK6s5uTl/P75OybJ0NLW8h8bAIozgeSxAaA4E1A7VjmgOAtEHyMjI7IE0EygOAtEH5CDqY9c+xjx+A8ANndK9WaZlP4AAAAASUVORK5CYII=);"), e.add(".kanban_default_card_delete", "background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAALCAYAAACprHcmAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjExR/NCNwAAAI5JREFUKFNtkLERgCAMRbmzdK8s4gAUlhYOYEHJEJYOYOEwDmGBPxC4kOPfvePy84MGR0RJ2N1A8H3N6DATwSQ57m2ql8NBG+AEM7D+UW+wjdfUPgerYNgB5gOLRHqhcasg84C2QxPMtrUhSqQIhg7ypy9VM2EUZPI/4rQ7rGxqo9sadTegw+UdjeDLAKUfhbaQUVPIfJYAAAAASUVORK5CYII=) center center no-repeat; opacity: 0.6; -ms-filter:'progid:DXImageTransform.Microsoft.Alpha(Opacity=60)';cursor: pointer;"), e.add(".kanban_default_card_delete:hover", "opacity: 1;-ms-filter: none;"), e.add(".kanban_default_rowmove_source", "background-color: black; opacity: 0.2;"), e.add(".kanban_default_rowmove_position_before, .kanban_default_rowmove_position_after", "background-color: #999; height: 2px;"), e.add(".kanban_default_rowmove_position_forbidden", "background-color: red; height: 2px; margin-left: 10px;"), e.add(".kanban_default_rowmove_position_forbidden:before", "content: 'x'; color: red; position: absolute; top: -8px; left: -10px;"), e.add(".kanban_default_block", "background-color: gray; opacity: 0.5; filter: alpha(opacity=50);"), e.add(".kanban_default_main .kanban_default_header_icon", "box-sizing: border-box; border: 1px solid #aaa; background-color: #f5f5f5; color: #000;"), e.add(".kanban_default_header_icon:hover", "background-color: #ccc;"), e.add(".kanban_default_header_icon_hide:before", "content: '\\00AB';"), e.add(".kanban_default_header_icon_show:before", "content: '\\00BB';"), e.add(".kanban_default_row_new .kanban_default_rowheader_inner", "cursor: text; background-position: 0px 5px; background-repeat: no-repeat; background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAABUSURBVChTY0ACslAaK2CC0iCQDMSlECYmQFYIAl1AjFUxukIQwKoYm0IQwFCMSyEIaEJpMMClcD4Qp0CYEIBNIUzRPzAPCtAVYlWEDgyAGIdTGBgAbqEJYyjqa3oAAAAASUVORK5CYII=);"), e.add(".kanban_default_row_new .kanban_default_rowheader_inner:hover", "background: white;"), e.add(".kanban_default_rowheader textarea", "padding: 3px;"), e.add(".kanban_default_rowheader_scroll", "cursor: default;"), e.add(".kanban_default_card_moving_source", "opacity: 0.5; filter: alpha(opacity=50);"), e.add(".kanban_default_card .kanban_default_card_inner", "padding: 5px 5px 5px 10px;"), e.add(".kanban_default_cell", "background-color: #fff;"), e.add(".kanban_default_rowmove_handle", "opacity: 0.5; background-repeat: no-repeat; background-position: center center; background-color: #ccc; background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAKCAYAAACT+/8OAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjExR/NCNwAAAClJREFUGFdj+P//P4O9vX2Bg4NDP4gNFgBytgPxebgAMsYuQGMz/jMAAFsTZDPYJlDHAAAAAElFTkSuQmCC); cursor: move;"), e.add(".kanban_default_card_header", "font-size: 120%; font-weight: bold;"), e.add(".kanban_default_card_bar", "background-color: #cc0000; cursor:move;"), e.add(".kanban_default_cell.kanban_default_collapsed", "background-color: #eee;"), e.add(".kanban_default_swimlane_collapse", "cursor:pointer; border: 1px solid #ccc; text-align:center;"), e.add(".kanban_default_swimlane_collapse:before", "content: '^';"), e.add(".kanban_default_swimlane_expand", "cursor:pointer; border: 1px solid #ccc; text-align:center;"), e.add(".kanban_default_swimlane_expand:before", "content: '>';"), e.add(".kanban_default_columnmove_handle", "opacity: 0.5; background-repeat: no-repeat; background-position: center center; background-color: #ccc; background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAKCAYAAACT+/8OAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjExR/NCNwAAAClJREFUGFdj+P//P4O9vX2Bg4NDP4gNFgBytgPxebgAMsYuQGMz/jMAAFsTZDPYJlDHAAAAAElFTkSuQmCC); cursor: move;"), e.add(".kanban_default_columnmove_position", "background-color: #333;"), e.add(".kanban_default_crosshair_vertical, .kanban_default_crosshair_horizontal, .kanban_default_crosshair_left, .kanban_default_crosshair_top", "background-color: gray; opacity: 0.2; filter: alpha(opacity=20)"), e.commit(), DayPilot.Global.defaultCss = !0
                    }
                }();
            var r = function(e) {
                var t = this;
                this.id = e, this.widths = [], this.titles = [], this.data = [], this.height = null, this.splitterWidth = 3, this.css = {}, this.css.title = null, this.css.titleInner = null, this.css.splitter = null, this.enabled = !0, this.blocks = [], this.drag = {}, this.updated = function() {}, this.updating = function() {};
                var i = {};
                i.splitterWidth = function() {
                    return t.enabled ? t.splitterWidth : 1
                }, this.init = function() {
                    var n;
                    if (!e) throw "error: id not provided";
                    if ("string" == typeof e) n = document.getElementById(e);
                    else {
                        if (!e.appendChild) throw "error: invalid object provided";
                        n = e
                    }
                    this.div = n, this.blocks = [];
                    for (var a = 0; a < this.widths.length; a++) {
                        var o = document.createElement("div");
                        o.style.display = "inline-block", null !== t.height ? o.style.height = t.height + "px" : o.style.height = "100%", o.style.width = this.widths[a] - i.splitterWidth() + "px", o.style.overflow = "hidden", o.style.position = "relative", o.setAttribute("unselectable", "on"), o.className = this.css.title, n.appendChild(o);
                        var r = this.titles[a],
                            l = null,
                            s = [];
                        "object" == typeof r && (l = r.html, s = r.areas);
                        var d = document.createElement("div");
                        d.innerHTML = l, d.setAttribute("unselectable", "on"), d.className = this.css.titleInner, o.appendChild(d), DayPilot.Areas.attach(o, t.data[a], {
                            "areas": s
                        });
                        var c = document.createElement("div");
                        c.style.display = "inline-block", null !== t.height ? c.style.height = t.height + "px" : c.style.height = "100%", c.style.width = i.splitterWidth() + "px", c.style.position = "relative", c.appendChild(document.createElement("div")), t.enabled && (c.style.cursor = "col-resize"), c.setAttribute("unselectable", "on"), c.className = this.css.splitter;
                        var h = {};
                        h.index = a, h.width = this.widths[a], c.data = h, c.onmousedown = function(e) {
                            if (t.enabled) {
                                var i = DayPilot.page(e);
                                i && (t.drag.start = i, t.drag.data = this.data, t.div.style.cursor = "col-resize", e = e || window.event, e.preventDefault ? e.preventDefault() : e.returnValue = !1)
                            }
                        }, n.appendChild(c);
                        var u = {};
                        u.section = o, u.handle = c, this.blocks.push(u)
                    }
                    this.registerGlobalHandlers()
                }, this.updateWidths = function() {
                    for (var e = 0; e < this.blocks.length; e++) {
                        var t = this.blocks[e],
                            i = this.widths[e];
                        t.handle.data.width = i, this.q(e)
                    }
                }, this.q = function(e) {
                    var t = this.blocks[e],
                        n = this.widths[e];
                    t.section.style.width = n - i.splitterWidth() + "px"
                }, this.totalWidth = function() {
                    for (var e = 0, t = 0; t < this.widths.length; t++) e += this.widths[t];
                    return e
                }, this.gMouseMove = function(e) {
                    if (t.drag.start) {
                        var i = t.drag.data,
                            n = DayPilot.page(e);
                        if (n) {
                            var a = n.x - t.drag.start.x,
                                o = i.index;
                            t.widths[o] = Math.max(5, i.width + a), t.q(o);
                            var r = {};
                            r.widths = this.widths, r.index = i.index, t.updating(r)
                        }
                    }
                }, this.gMouseUp = function(e) {
                    if (t.drag.start) {
                        t.drag.start = null, document.body.style.cursor = "", t.div.style.cursor = "";
                        var i = t.drag.data;
                        i.width = t.widths[i.index];
                        var n = {};
                        n.widths = this.widths, n.index = i.index, t.updated(n)
                    }
                }, this.dispose = function() {
                    DayPilot.list(this.blocks).each(function(e) {
                        e.handle.onmousedown = null, DayPilot.de(e.section), DayPilot.de(e.handle)
                    }), this.unregisterGlobalHandlers()
                }, this.registerGlobalHandlers = function() {
                    DayPilot.re(document, "mousemove", this.gMouseMove), DayPilot.re(document, "mouseup", this.gMouseUp)
                }, this.unregisterGlobalHandlers = function() {
                    DayPilot.ue(document, "mousemove", this.gMouseMove), DayPilot.ue(document, "mouseup", this.gMouseUp)
                }
            };
            DayPilot.Splitter = r
        }
    }(), function() {
        "undefined" != typeof Sys && Sys.Application && Sys.Application.notifyScriptLoaded && Sys.Application.notifyScriptLoaded()
    }(), "undefined" == typeof DayPilot) var DayPilot = {};
if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function() {
        if ("undefined" == typeof DayPilot.Bubble) {
            var e = {};
            e.mouseMove = function(t) {
                if ("undefined" != typeof e) {
                    e.mouse = e.mousePosition(t);
                    var i = e.active;
                    if (i && i.s.showPosition) {
                        var n = i.s.showPosition,
                            a = e.mouse;
                        n.clientX !== a.clientX || n.clientY !== a.clientY
                    }
                }
            }, e.touchPosition = function(e) {
                if (!e || !e.touches) return null;
                var t = e.touches[0],
                    i = {};
                return i.x = t.pageX, i.y = t.pageY, i.clientX = t.clientX, i.clientY = t.clientY, i
            }, e.mousePosition = function(e) {
                var t = DayPilot.mo3(null, e);
                return e && (t.clientY = e.clientY, t.clientX = e.clientX), t
            }, DayPilot.Bubble = function(t) {
                this.v = "2019.4.4160";
                var i = this,
                    n = {};
                if (this.cssOnly = !0, this.hideAfter = 500, this.loadingText = "Loading...", this.animated = !0, this.animation = "fast", this.position = "EventTop", this.hideOnClick = !0, this.showAfter = 500, this.showLoadingLabel = !0, this.zIndex = 10, this.theme = "bubble_default", this.onLoad = null, this.onBeforeDomAdd = null, this.onBeforeDomRemove = null, this.s = function() {}, this.callBack = function(e) {
                        this.aspnet() ? WebForm_DoCallback(this.uniqueID, JSON.stringify(e), this.updateView, this, this.callbackError, !0) : e.calendar.internal.bubbleCallBack ? e.calendar.internal.bubbleCallBack(e, this) : e.calendar.bubbleCallBack(e, this)
                    }, this.callbackError = function(e, t) {
                        alert(e)
                    }, this.updateView = function(t, a) {
                        if (i !== a) throw "Callback object mismatch (internal error)";
                        if (!t) return i.removeDiv(), void i.removeShadow();
                        var o = null,
                            r = null,
                            l = null;
                        if ("string" == typeof t ? r = t : "object" == typeof t && (o = t, r = t.html, l = t.element), e.active = i, i) {
                            var s = !1;
                            if (n.div) {
                                if (l) {
                                    n.div.firstChild.innerHTML = "";
                                    if (DayPilot.Util.isReactComponent(l)) {
                                        var d = i.t.calendar && i.t.calendar.internal.reactRefs().reactDOM;
                                        if (!d) throw new DayPilot.Exception("Can't reach ReactDOM");
                                        d.render(l, n.div.firstChild)
                                    } else n.div.firstChild.appendChild(l);
                                    s = !0
                                } else r && (n.div.firstChild.innerHTML = r, s = !0);
                                n.div.domArgs = o
                            }
                            s && (i.adjustPosition(), i.animated || i.addShadow())
                        }
                    }, this.init = function() {}, this.aspnet = function() {
                        return "undefined" != typeof WebForm_DoCallback
                    }, this.rounded = function() {
                        return "Rounded" === this.corners
                    }, this.showEvent = function(t, i) {
                        var n = new e.CallBackArgs(t.calendar || t.root, "Event", t, t.bubbleHtml ? t.bubbleHtml() : null);
                        i ? this.show(n) : this.showOnMouseOver(n)
                    }, this.showCell = function(t) {
                        e.cancelShowing();
                        var i = new e.CallBackArgs(t.calendar || t.root, "Cell", t, t.staticBubbleHTML ? t.staticBubbleHTML() : null);
                        this.showOnMouseOver(i)
                    }, this.showLink = function(t) {
                        e.cancelShowing();
                        var i = new e.CallBackArgs(t.calendar || t.root, "Cell", t, t.data && t.data.bubbleHtml);
                        this.showOnMouseOver(i)
                    }, this.showTime = function(t) {
                        var i = new e.CallBackArgs(t.calendar || t.root, "Time", t, t.staticBubbleHTML ? t.staticBubbleHTML() : null);
                        this.showOnMouseOver(i)
                    }, this.showResource = function(t, i) {
                        var n = {};
                        n.calendar = t.calendar, n.id = t.id, n.name = t.name, n.start = t.start, t.bubbleHtml ? n.bubbleHtml = function() {
                            return t.bubbleHtml
                        } : t.data && t.data.bubbleHtml && (n.bubbleHtml = function() {
                            return t.data.bubbleHtml
                        }), n.toJSON = function() {
                            var e = {};
                            return e.id = this.id, e
                        };
                        var a = new e.CallBackArgs(n.calendar || n.root, "Resource", n, n.bubbleHtml ? n.bubbleHtml() : null);
                        a.div = t.div, i ? this.show(a) : this.showOnMouseOver(a)
                    }, this.u = function(e) {
                        return {}
                    }, this.showHtml = function(t, i) {
                        var n = new e.CallBackArgs(null, "Html", null, t);
                        n.div = i, this.show(n)
                    }, this.show = function(t) {
                        if (i.z(t)) {
                            var a = this.animated;
                            if (this.s.showPosition = e.mouse, e.showing = null, !e.mouse) return void setTimeout(function() {
                                i.show(t)
                            }, 100);
                            var o = this.getDiv(t);
                            if ("EventTop" === this.position && o) {
                                var r = 2,
                                    l = DayPilot.abs(o, !0);
                                if (!l) return;
                                this.s.mouse = e.mouse, this.s.mouse.x = l.x, this.s.mouse.y = l.y, this.s.mouse.h = l.h + r, this.s.mouse.w = l.w
                            } else this.s.mouse = e.mouse;
                            var s;
                            try {
                                s = JSON.stringify(t.object)
                            } catch (e) {
                                return
                            }
                            if (!(e.active === this && this.s.sourceId === s || "undefined" != typeof DayPilot.Menu && DayPilot.Menu.active)) {
                                i.cssOnly || (i.cssOnly = !0, DayPilot.Util.log("DayPilot: cssOnly = false mode is not supported since DayPilot Pro 8.0.")), e.hideActive(), e.active = this, this.s.sourceId = s;
                                var d = document.createElement("div");
                                // FHP
                                d.setAttribute("unselectable", "on"), d.style.position = "absolute", this.showLoadingLabel || (d.style.display = "none"), this.cssOnly ? d.className = this.A("_main") : (this.width && (d.style.width = this.width), d.style.cursor = "default"), d.style.top = "0px", d.style.left = "0px", d.style.zIndex = this.zIndex + 1, a && (d.style.visibility = "hidden"), this.hideOnClick && (d.onclick = function() {
                                    e.hideActive()
                                }), d.onmousemove = function(t) {
                                    e.cancelShowing(), e.cancelHiding();
                                    var t = t || window.event;
                                    t.cancelBubble = !0
                                }, d.oncontextmenu = function() {
                                    return !1
                                }, d.onmouseout = function() {
                                    i.delayedHide()
                                };
                                var c = document.createElement("div");
                                d.appendChild(c), this.cssOnly && (c.className = this.A("_main_inner")), c.innerHTML = this.loadingText, document.body.appendChild(d), n.div = d, i.t = function() {}, i.t.calendar = t.calendar;
                                var h = {};
                                h.source = t.object, h.async = !1, h.html = t.staticHTML, h.loaded = function() {
                                    this.async && i.B(h)
                                }, this.showLoadingLabel && !a && (this.adjustPosition(), this.addShadow()), t.staticHTML && "function" != typeof this.onLoad ? i.B(h) : "function" == typeof this.onLoad ? (this.onLoad(h), h.async || i.B(h)) : "function" == typeof i.onDomAdd || "function" == typeof i.onBeforeDomAdd ? i.B(h) : this.C(t) && this.callBack(t)
                            }
                        }
                    }, this.z = function(e) {
                        return !!e.staticHTML || ("function" == typeof this.onLoad || ("function" == typeof i.onDomAdd || "function" == typeof i.onBeforeDomAdd || !!this.C(e)))
                    }, this.B = function(e) {
                        var t = {};
                        t.source = e.source, t.html = e.html, t.element = null, "function" == typeof i.onDomAdd && i.onDomAdd(t), "function" == typeof i.onBeforeDomAdd && i.onBeforeDomAdd(t), i.updateView(t, i)
                    }, this.getDiv = function(e) {
                        return e.div ? e.div : "Event" === e.type && e.calendar && e.calendar.internal.findEventDiv ? e.calendar.internal.findEventDiv(e.object) : void 0
                    }, this.A = function(e) {
                        var t = this.theme || this.cssClassPrefix;
                        return t ? t + e : ""
                    }, this.loadingElement = null, this.loadingStart = function(e) {}, this.loadingStop = function() {}, this.adjustPosition = function() {
                        var t = this.animated,
                            a = this.position,
                            o = 10;
                        if (n.div && this.s.mouse) {
                            if (!this.s.mouse.x || !this.s.mouse.y) return void e.hideActive();
                            var r = n.div;
                            r.style.display = "";
                            var l = r.offsetHeight,
                                s = r.offsetWidth;
                            r.style.display = "none";
                            var d = DayPilot.wd(),
                                c = d.width,
                                h = d.height,
                                u = "bottom",
                                f = "left";
                            if ("Mouse" === a) {
                                var v = 0;
                                if (this.s.mouse.clientY > h - l + o) {
                                    this.s.mouse.clientY - (h - l) + o;
                                    v = this.s.mouse.y - l - 10
                                } else v = this.s.mouse.y + 22;
                                if ("number" == typeof v && (r.style.top = Math.max(v, 0) + "px"), this.s.mouse.clientX > c - s + o) {
                                    var p = this.s.mouse.clientX - (c - s) + o;
                                    r.style.left = this.s.mouse.x - p + "px"
                                } else r.style.left = this.s.mouse.x + "px"
                            } else if ("EventTop" === a) {
                                var m = 2,
                                    v = this.s.mouse.y - l - m,
                                    g = d.scrollTop;
                                v < g && (v = this.s.mouse.y + this.s.mouse.h + m, u = "top"), "number" == typeof v && (r.style.top = Math.max(v, 0) + "px");
                                var y = this.s.mouse.x;
                                this.s.mouse.x + s + o > c && (y = c - s - o, f = "right"), r.style.left = y + "px"
                            }
                            if (r.style.display = "", t) {
                                r.style.display = "";
                                var b = {};
                                b.color = r.firstChild.style.color, b.overflow = r.style.overflow, r.firstChild.style.color = "transparent", r.style.overflow = "hidden", this.removeShadow(), DayPilot.pop(r, {
                                    "finished": function() {
                                        r.firstChild.style.color = b.color, r.style.overflow = b.overflow, i.addShadow()
                                    },
                                    "vertical": u,
                                    "horizontal": f,
                                    "animation": i.animation
                                })
                            }
                        }
                    }, this.delayedHide = function() {
                        e.showing === this && e.cancelShowing();
                        var t = e.active;
                        if (t === this && (e.cancelHiding(), t.hideAfter > 0)) {
                            var i = t.hideAfter;
                            e.timeoutHide = window.setTimeout(e.hideActive, i)
                        }
                    }, this.showOnMouseOver = function(t) {
                        e.active === this && e.cancelHiding();
                        var n = function(e) {
                            return function() {
                                i.show(e)
                            }
                        };
                        clearTimeout(e.timeoutShow), e.timeoutShow = window.setTimeout(n(t), this.showAfter), e.showing = this
                    }, this.hideOnMouseOut = function() {
                        this.delayedHide()
                    }, this.C = function(e) {
                        return !!e.calendar.backendUrl || !("function" != typeof WebForm_DoCallback || !this.uniqueID)
                    }, this.addShadow = function() {
                        this.cssOnly
                    }, this.removeShadow = function() {
                        if (this.shadows) {
                            for (var e = 0; e < this.shadows.length; e++) document.body.removeChild(this.shadows[e]);
                            this.shadows = []
                        }
                    }, this.removeDiv = function() {
                        if (n.div) {
                            var e = n.div.domArgs;
                            if (n.div.domArgs = null, e && ("function" == typeof i.onDomRemove && i.onDomRemove(e), "function" == typeof i.onBeforeDomRemove && i.onBeforeDomRemove(e), "function" == typeof i.onDomAdd || "function" == typeof i.onBeforeDomAdd)) {
                                var t = n.div.firstChild;
                                if (t) {
                                    if (DayPilot.Util.isReactComponent(e.element)) {
                                        var a = i.t.calendar && i.t.calendar.internal.reactRefs().reactDOM;
                                        if (!a) throw new DayPilot.Exception("Can't reach ReactDOM");
                                        a.unmountComponentAtNode(t)
                                    }
                                }
                            }
                            document.body.removeChild(n.div), n.div = null
                        }
                    }, t)
                    for (var a in t) this[a] = t[a];
                this.init()
            }, DayPilot.Bubble.touchPosition = function(t) {
                t.touches && (e.mouse = e.touchPosition(t))
            }, e.cancelShowing = function() {
                e.showing = null, e.timeoutShow && (window.clearTimeout(e.timeoutShow), e.timeoutShow = null)
            }, e.cancelHiding = function() {
                e.timeoutHide && window.clearTimeout(e.timeoutHide)
            }, e.hideActive = function() {
                e.cancelHiding();
                var t = e.active;
                t && (t.removeDiv(), t.removeShadow()), e.active = null
            }, e.CallBackArgs = function(e, t, i, n) {
                this.calendar = e, this.type = t, this.object = i, this.staticHTML = n, this.toJSON = function() {
                    var e = {};
                    return e.uid = this.calendar.uniqueID, e.type = this.type, e.object = i, e
                }
            }, DayPilot.re(document, "mousemove", e.mouseMove), DayPilot.Bubble.hideActive = e.hideActive, DayPilot.Bubble.cancelShowing = e.cancelShowing, DayPilot.Bubble.hide = function() {
                e.hideActive()
            }, "undefined" != typeof Sys && Sys.Application && Sys.Application.notifyScriptLoaded && Sys.Application.notifyScriptLoaded()
        }
    }(), "undefined" == typeof DayPilot) var DayPilot = {};
if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function() {
        if ("undefined" == typeof DayPilot.Calendar) {
            var e = 10;
            DayPilot.Calendar = function(i, n) {
                this.v = "2019.4.4160";
                var a = !1;
                if (this instanceof DayPilot.Calendar && !this.D && (a = !0, this.D = !0), !a) throw "DayPilot.Calendar() is a constructor and must be called as 'var c = new DayPilot.Calendar(id);'";
                var o = this;
                this.uniqueID = null, this.clientName = i, this.id = i, this.isCalendar = !0, this.allDayEnd = "DateTime", this.allDayEventHeight = 25, this.allowEventOverlap = !0, this.allowMultiSelect = !0, this.api = 2, this.autoRefreshCommand = "refresh", this.autoRefreshEnabled = !1, this.autoRefreshInterval = 60, this.autoRefreshMaxCount = 20, this.backendUrl = null, "function" == typeof DayPilot.Bubble ? this.bubble = new DayPilot.Bubble : this.bubble = null, this.cellBubble = null, this.columnBubble = null, this.businessBeginsHour = 9, this.businessEndsHour = 18, this.cellHeight = 30, this.cellDuration = 30, this.clientState = {}, this.columnMarginRight = 5, this.columnWidth = 200, this.columnWidthSpec = "Auto", this.columnsLoadMethod = "GET", this.contextMenu = null, this.contextMenuSelection = null, this.cornerHtml = "", this.crosshairType = "Header", this.cssOnly = !0, this.dayBeginsHour = 0, this.dayEndsHour = 24, this.days = 1, this.doubleClickTimeout = 300, this.durationBarVisible = !0, this.eventArrangement = "Cascade", this.eventsLoadMethod = "GET", this.headerHeight = 30, this.headerLevels = 1, this.height = 300, this.heightSpec = "BusinessHours", this.hideFreeCells = !1, this.hideUntilInit = !0, this.headerDateFormat = null, this.hourWidth = 60, this.initEventEnabled = !1, this.initScrollPos = null, this.loadingLabelText = "Loading...", this.loadingLabelVisible = !0, this.locale = "en-us", this.messageHideAfter = 5e3, this.moveBy = "Full", this.notifyCommit = "Immediate", this.rtl = !1, this.scrollLabelsVisible = !1, this.showToolTip = !0, this.showAllDayEvents = !1, this.showEventStartEnd = !1, this.showHeader = !0, this.showHours = !0, this.showCurrentTime = !0, this.showCurrentTimeMode = "Day", this.showCurrentTimeOffset = 0, this.startDate = DayPilot.Date.today(), this.cssClassPrefix = "calendar_default", this.tapAndHoldTimeout = 300, this.theme = null, this.timeFormat = "Auto", this.timeHeaderCellDuration = 60, this.timeRangeSelectingStartEndEnabled = !1, this.timeRangeSelectingStartEndFormat = "Auto", this.eventMovingStartEndEnabled = !1, this.eventMovingStartEndFormat = "Auto", this.eventResizingStartEndEnabled = !1, this.eventResizingStartEndFormat = "Auto", this.useEventBoxes = "Always", this.viewType = "Days", this.visible = !0, this.weekStarts = "Auto", this.width = null, this.eventClickHandling = "Enabled", this.eventDoubleClickHandling = "Disabled", this.eventRightClickHandling = "ContextMenu", this.eventDeleteHandling = "Disabled", this.eventEditHandling = "Update", this.eventHoverHandling = "Bubble", this.eventResizeHandling = "Update", this.eventMoveHandling = "Update", this.eventSelectHandling = "Update", this.eventTapAndHoldHandling = "Move", this.headerClickHandling = "Enabled", this.timeRangeTapAndHoldHandling = "Select", this.timeRangeSelectedHandling = "Enabled", this.timeRangeDoubleClickHandling = "Disabled", this.timeRangeRightClickHandling = "ContextMenu", this.onAutoRefresh = null, this.onColumnFilter = null, this.onTimeRangeRightClick = null, this.onTimeRangeRightClicked = null, this.onTimeRangeDoubleClick = null, this.onTimeRangeDoubleClicked = null, this.onTimeRangeSelect = null, this.onTimeRangeSelected = null, this.onTimeRangeSelecting = null, this.onEventFilter = null, this.onEventMove = null, this.onEventMoved = null, this.onEventMoving = null, this.onEventResize = null, this.onEventResized = null, this.onEventResizing = null, this.onEventSelect = null, this.onEventSelected = null, this.onEventEdit = null, this.onEventEdited = null, this.onEventDelete = null, this.onEventDeleted = null, this.onHeaderClick = null, this.onHeaderClicked = null, this.onEventRightClick = null, this.onEventRightClicked = null, this.onEventDoubleClick = null, this.onEventDoubleClicked = null, this.onEventClick = null, this.onEventClicked = null, this.onBeforeEventRender = null, this.onBeforeEventExport = null, this.onAfterEventRender = null, this.onBeforeCellRender = null, this.onBeforeCellExport = null, this.onBeforeCornerRender = null, this.onBeforeHeaderRender = null, this.onBeforeHeaderExport = null, this.onBeforeTimeHeaderRender = null, this.E = !0, this.F = e, this.G = !0, this.H = !0, this.I = !0, this.J = {}, this.J.pixels = {}, this.J.events = [], this.elements = {}, this.elements.events = [], this.elements.separators = [], this.elements.selection = [], this.events = {}, this.nav = {}, this.K = 0, this.L = !1, this.members = {}, this.members.obsolete = ["Init", "cleanSelection", "cssClassPrefix", "cssOnly", "clientName", "uniqueID"], this.members.ignore = ["internal", "nav", "debug", "temp", "elements", "members", "onCallbackError"], this.members.noCssOnly = [], this.M = "javasc", this.N = {}, this.N.ie = navigator && navigator.userAgent && navigator.userAgent.indexOf("MSIE") !== -1, this.N.ie9 = navigator && navigator.userAgent && navigator.userAgent.indexOf("MSIE 9") !== -1, this.N.ielt9 = function() {
                    var e = document.createElement("div");
                    return e.innerHTML = "<!--[if lt IE 9]><i></i><![endif]-->", 1 === e.getElementsByTagName("i").length
                }(), this.N.ff = navigator && navigator.userAgent && navigator.userAgent.indexOf("Firefox") !== -1, this.clearSelection = function() {
                    return this.selectedCells ? (t.topSelectedCell = null, t.bottomSelectedCell = null, DayPilot.Global.selecting = null, this.O(), void(this.selectedCells = [])) : void(this.selectedCells = [])
                }, this.O = function() {
                    this.selectedCells && (DayPilot.de(o.elements.selection), o.elements.selection = [], o.nav.activeSelection = null)
                }, this.cleanSelection = this.clearSelection, this.P = function(e, t, i) {
                    var n = {};
                    n.action = e, n.parameters = i, n.data = t, n.header = this.Q();
                    var a = "JSON" + JSON.stringify(n);
                    __doPostBack(o.uniqueID, a)
                }, this.R = function(e, t, i, n) {
                    if (!this.C()) return void o.debug.message("Callback invoked without the server-side backend specified. Callback canceled.", "warning");
                    "undefined" == typeof n && (n = "CallBack"), o.S();
                    var a = {};
                    a.action = e, a.type = n, a.parameters = t, a.data = i, a.header = this.Q();
                    var r = "JSON" + JSON.stringify(a);
                    this.backendUrl ? DayPilot.request(this.backendUrl, this.T, r, this.U) : "function" == typeof WebForm_DoCallback && WebForm_DoCallback(this.uniqueID, r, this.V, this.clientName, this.onCallbackError, !0)
                }, this.C = function() {
                    return "javasc" !== o.M && o.M.indexOf("DCODE") === -1 || o.devsb
                }, this.W = function() {
                    return !("function" != typeof WebForm_DoCallback || !this.uniqueID)
                }, this.U = function(e) {
                    if ("function" == typeof o.onAjaxError) {
                        var t = {};
                        t.request = e, o.onAjaxError(t)
                    } else "function" == typeof o.ajaxError && o.ajaxError(e)
                }, this.dispose = function() {
                    var e = o;
                    e.nav.top && (e.X(), e.Y(), e.nav.messageClose && (e.nav.messageClose.onclick = null), e.nav.hourTable && (e.nav.hourTable.oncontextmenu = null), e.nav.hourTable && (e.nav.hourTable.onmousemove = null), e.nav.header && (e.nav.header.oncontextmenu = null), e.nav.corner && (e.nav.corner.oncontextmenu = null), e.nav.zoom.onmousemove = null, e.nav.zoom.oncontextmenu = null, e.nav.scroll.onscroll = null, e.nav.scroll.root = null, DayPilot.pu(e.nav.loading), e.Z(), e._(), e.nav.select = null, e.nav.cornerRight = null, e.nav.scrollable = null, e.nav.bottomLeft = null, e.nav.bottomRight = null, e.nav.allday = null, e.nav.zoom = null, e.nav.loading = null, e.nav.events = null, e.nav.header = null, e.nav.hourTable = null, e.nav.scrolltop = null, e.nav.scroll = null, e.nav.vsph = null, e.nav.main = null, e.nav.message = null, e.nav.messageClose = null, e.nav.top.removeAttribute("style"), e.nav.top.removeAttribute("class"), e.nav.top.innerHTML = "", e.nav.top.dp = null, e.nav.top = null, DayPilot.ue(window, "resize", e.aa), t.unregister(e))
                }, this.ba = function() {
                    this.nav.top.dispose = this.dispose
                }, this.T = function(e) {
                    o.V(e.responseText)
                }, this.Q = function() {
                    var e = {};
                    return e.v = this.v, e.control = "dpc", e.id = this.id, e.clientState = o.clientState, e.columns = this.ca(), e.days = o.days, e.startDate = o.startDate, e.cellDuration = o.cellDuration, e.cssClassPrefix = o.cssClassPrefix, e.heightSpec = o.heightSpec, e.businessBeginsHour = o.businessBeginsHour, e.businessEndsHour = o.businessEndsHour, e.viewType = o.viewType, e.dayBeginsHour = o.dayBeginsHour, e.dayEndsHour = o.dayEndsHour, e.headerLevels = o.headerLevels, e.eventHeaderVisible = o.eventHeaderVisible, e.timeFormat = o.timeFormat, e.timeHeaderCellDuration = o.timeHeaderCellDuration, e.locale = o.locale, e.scrollY = o.scrollPos, e.showAllDayEvents = o.showAllDayEvents, e.tagFields = o.tagFields, e.weekStarts = o.weekStarts, e.selected = o.multiselect.events(), e.hashes = o.hashes, e
                }, this.da = function() {
                    o.ea(), DayPilot.Areas.hideAll(), o.fa = null
                }, this.ca = function() {
                    var e = [];
                    if (e.ignoreToJSON = !0, !this.ga) return e;
                    for (var t = 0; t < this.ga.length; t++) {
                        var i = this.ga[t],
                            n = this.ha(i);
                        e.push(n)
                    }
                    return e
                }, this.ha = function(e) {
                    var t = {};
                    return t.Value = e.id, t.Name = e.name, t.ToolTip = e.toolTip, t.Date = e.start, t.Children = this.ia(e.children), t
                }, this.ia = function(e) {
                    var t = [];
                    if (t.ignoreToJSON = !0, !e) return t;
                    for (var i = 0; i < e.length; i++) t.push(this.ha(e[i]));
                    return t
                }, this.V = function(e, t) {
                    var e = JSON.parse(e);
                    if (e.BubbleGuid) {
                        var i = e.BubbleGuid,
                            n = this.bubbles[i];
                        return delete this.bubbles[i], o.ja(), void("undefined" != typeof e.Result.BubbleHTML && n.updateView(e.Result.BubbleHTML, n))
                    }
                    if (e.CallBackRedirect) return void(document.location.href = e.CallBackRedirect);
                    if ("undefined" != typeof e.ClientState && (o.clientState = e.ClientState), "None" === e.UpdateType) return o.ja(), o.ka(e.CallBackData, !0), void(e.Message && o.message(e.Message));
                    if (e.VsUpdate) {
                        var a = document.createElement("input");
                        a.type = "hidden", a.name = o.id + "_vsupdate", a.id = a.name, a.value = e.VsUpdate, o.nav.vsph.innerHTML = "", o.nav.vsph.appendChild(a)
                    }
                    if (o.Y(), o.multiselect.clear(!0), o.multiselect.la = e.SelectedEvents, "undefined" != typeof e.TagFields && (o.tagFields = e.TagFields), "undefined" != typeof e.SortDirections && (o.sortDirections = e.SortDirections), "Full" === e.UpdateType && (o.colors = e.Colors, o.palette = e.Palette, o.dirtyColors = e.DirtyColors, o.cellProperties = e.CellProperties, o.cellConfig = e.CellConfig, o.ma() === o.columns ? o.columns = e.Columns : o.columns.list = e.Columns, o.days = e.Days, o.startDate = new DayPilot.Date(e.StartDate).getDatePart(), o.cellDuration = e.CellDuration, o.heightSpec = e.HeightSpec ? e.HeightSpec : o.heightSpec, o.businessBeginsHour = e.BusinessBeginsHour ? e.BusinessBeginsHour : o.businessBeginsHour, o.businessEndsHour = e.BusinessEndsHour ? e.BusinessEndsHour : o.businessEndsHour, o.viewType = e.ViewType, o.headerLevels = e.HeaderLevels, o.backColor = e.BackColor ? e.BackColor : o.backColor, o.nonBusinessBackColor = e.NonBusinessBackColor ? e.NonBusinessBackColor : o.nonBusinessBackColor, o.eventHeaderVisible = e.EventHeaderVisible ? e.EventHeaderVisible : o.eventHeaderVisible, o.timeFormat = e.TimeFormat ? e.TimeFormat : o.timeFormat, o.timeHeaderCellDuration = "undefined" != typeof e.TimeHeaderCellDuration ? e.TimeHeaderCellDuration : o.timeHeaderCellDuration, o.locale = e.Locale ? e.Locale : o.locale, o.dayBeginsHour = "undefined" != typeof e.DayBeginsHour ? e.DayBeginsHour : o.dayBeginsHour, o.dayEndsHour = "undefined" != typeof e.DayEndsHour ? e.DayEndsHour : o.dayEndsHour, o.cornerHtml = e.CornerHTML, o.hours = e.Hours, o.na(), o.oa()), e.Hashes)
                        for (var r in e.Hashes) o.hashes[r] = e.Hashes[r];
                    if (o.pa(e.Events), o.qa(), ("Full" === e.UpdateType || o.hideFreeCells) && (o.ra(), o.sa(), o.ta(), o.va(), o.wa(), o.xa(), o.ya(), o.za(), o.clearSelection(), o.Aa(), "undefined" != typeof e.ScrollY ? o.scrollToY(e.ScrollY) : o.scrollToY(o.initScrollPos)), o.Ba(), o.Ca(), o.Da(), o.Ea(), "Parent100Pct" === o.heightSpec && o.aa(), "HoldForever" !== o.timeRangeSelectedHandling && o.clearSelection(), o.Fa(), o.todo && o.todo.del) {
                        var l = o.todo.del;
                        l.parentNode.removeChild(l), o.todo.del = null
                    }
                    o.ka(e.CallBackData, !0), o.ja(), o.Ga(), e.Message && o.message(e.Message)
                }, this.ka = function(e, t) {
                    var i = function(e, t) {
                        return function() {
                            if (o.Ha()) {
                                if ("function" == typeof o.onAfterRender) {
                                    var i = {};
                                    i.isCallBack = t, i.data = e, o.onAfterRender(i)
                                }
                            } else o.afterRender && o.afterRender(e, t)
                        }
                    };
                    window.setTimeout(i(e, t), 0)
                }, this.Ia = function(e, t) {
                    var i = o.nav.events,
                        n = i.rows[0].cells.length,
                        a = i.clientWidth / n,
                        r = Math.floor(o.coords.x / a);
                    r < 0 && (r = 0), r >= n && (r = n - 1), o.rtl && (r = o.Ja.length - r - 1);
                    var l = i.rows[0].cells[r],
                        s = 0,
                        d = 0,
                        c = 0;
                    if ("undefined" != typeof e.duration) {
                        var h = e.duration;
                        c = Math.floor((o.coords.y - s + o.cellHeight / 2) / o.cellHeight) * o.cellHeight + s, d = h * o.cellHeight / (60 * o.cellDuration), d = Math.max(d, o.cellHeight)
                    } else {
                        var u = e.event;
                        d = u.part.height, c = u.part.top
                    }
                    var f = document.createElement("div");
                    f.setAttribute("unselectable", "on"), f.style.position = "absolute", f.style.width = "100%", f.style.height = d + "px", f.style.left = "0px", f.style.top = c + "px", f.style.zIndex = o.F, f.exclude = !0;
                    var v = document.createElement("div");
                    return f.appendChild(v), f.className = o.A("_shadow"), v.className = this.A("_shadow_inner"), l.events.appendChild(f), f
                }, this.Ka = function() {
                    return this.La() / 36e5
                }, this.Ma = function() {
                    return this.businessBeginsHour > this.businessEndsHour ? 24 - this.businessBeginsHour + this.businessEndsHour : this.businessEndsHour - this.businessBeginsHour;
                }, this.Na = function() {
                    return this.dayBeginsHour >= this.dayEndsHour ? 24 - this.dayBeginsHour + this.dayEndsHour : this.dayEndsHour - this.dayBeginsHour
                }, this.La = function(e) {
                    var t = 0;
                    if ("BusinessHoursNoScroll" === this.heightSpec) t = this.Ma();
                    else if (this.hideFreeCells && !e) {
                        var i = (this.Oa - 1) * this.cellDuration / this.cellHeight,
                            n = Math.ceil(i / 60),
                            a = this.businessBeginsHour > this.businessEndsHour ? this.businessEndsHour + 24 : this.businessEndsHour;
                        t = Math.max(this.dayBeginsHour + n, a) - this.Pa()
                    } else t = this.Na();
                    return 60 * t * 60 * 1e3
                }, this.message = function(e, t, i, n) {
                    if (e) {
                        var a, t = t || this.messageHideAfter || 2e3,
                            r = this.Qa(),
                            l = this.showHours ? this.hourWidth : 0,
                            s = DayPilot.sw(o.Ra());
                        if (o.rtl) {
                            var d = l;
                            l = s, s = d
                        }
                        if (this.nav.message) a = o.nav.message, this.nav.message.style.top = r + "px";
                        else {
                            a = document.createElement("div"), a.style.position = "absolute", a.style.left = l + "px", a.style.top = r + "px", a.style.right = "0px", a.style.display = "none", a.onmousemove = function() {
                                a.messageTimeout && !a.status && clearTimeout(a.messageTimeout)
                            }, a.onmouseout = function() {
                                "none" !== o.nav.message.style.display && (a.messageTimeout = setTimeout(o.Sa, 500))
                            };
                            var c = document.createElement("div");
                            c.onclick = function() {
                                o.nav.message.style.display = "none"
                            }, c.className = this.A("_message"), a.appendChild(c);
                            var h = document.createElement("div");
                            h.style.position = "absolute", h.className = this.A("_message_close"), h.onclick = function() {
                                o.nav.message.style.display = "none"
                            }, a.appendChild(h), this.nav.top.insertBefore(a, this.nav.loading), this.nav.message = a, this.nav.messageClose = h
                        }
                        this.nav.cornerRight ? this.nav.message.style.right = s + "px" : this.nav.message.style.right = "0px";
                        var u = function() {
                            if (o.nav.message) {
                                o.nav.message.firstChild.innerHTML = e;
                                var i = function() {
                                    a.messageTimeout = setTimeout(o.Sa, t)
                                };
                                DayPilot.fade(o.nav.message, .2, i)
                            }
                        };
                        clearTimeout(a.messageTimeout), "none" !== this.nav.message.style.display ? DayPilot.fade(o.nav.message, -.2, u) : u()
                    }
                }, this.message.show = function(e) {
                    o.message(e)
                }, this.message.hide = function() {
                    o.Sa()
                }, this.Sa = function() {
                    var e = function() {
                        o.nav.message.style.display = "none"
                    };
                    DayPilot.fade(o.nav.message, -.2, e)
                }, this.va = function() {
                    this.nav.message && (this.nav.message.style.top = this.Qa() + "px")
                }, this.Ta = function() {
                    return this.La() / (6e4 * this.cellDuration)
                }, this.eventClickPostBack = function(e, t) {
                    this.P("EventClick", t, e)
                }, this.eventClickCallBack = function(e, t) {
                    this.R("EventClick", e, t)
                }, this.Ua = function(e) {
                    var t = this,
                        e = e || window.event,
                        i = e.ctrlKey,
                        n = e.metaKey;
                    if ("undefined" != typeof DayPilot.Bubble && DayPilot.Bubble.hideActive(), "Disabled" === o.eventDoubleClickHandling) return void o.Va(t, i, n, e);
                    if (o.timeouts) {
                        for (var a in o.timeouts) window.clearTimeout(o.timeouts[a]);
                        o.timeouts = []
                    } else o.timeouts = [];
                    var r = function(e, t, i, n) {
                        return function() {
                            o.Va(e, t, i, n)
                        }
                    };
                    o.timeouts.push(window.setTimeout(r(this, i, n, e), o.doubleClickTimeout))
                }, this.Va = function(e, t, i, n) {
                    var a = e.event;
                    if (a.client.clickEnabled())
                        if (o.Ha()) {
                            var r = {};
                            if (r.e = a, r.ctrl = t, r.meta = i, r.originalEvent = n, r.preventDefault = function() {
                                    this.preventDefault.value = !0
                                }, "function" == typeof o.onEventClick && (o.onEventClick(r), r.preventDefault.value)) return;
                            switch (o.eventClickHandling) {
                                case "PostBack":
                                    o.eventClickPostBack(a);
                                    break;
                                case "CallBack":
                                    o.eventClickCallBack(a);
                                    break;
                                case "Edit":
                                    o.Wa(e);
                                    break;
                                case "Select":
                                    o.Xa(e, a, t, i);
                                    break;
                                case "Bubble":
                                    o.bubble && o.bubble.showEvent(a);
                                    break;
                                case "ContextMenu":
                                    var l = a.client.contextMenu();
                                    l ? l.show(a) : o.contextMenu && o.contextMenu.show(a)
                            }
                            "function" == typeof o.onEventClicked && o.onEventClicked(r)
                        } else switch (o.eventClickHandling) {
                            case "PostBack":
                                o.eventClickPostBack(a);
                                break;
                            case "CallBack":
                                o.eventClickCallBack(a);
                                break;
                            case "JavaScript":
                                o.onEventClick(a);
                                break;
                            case "Edit":
                                o.Wa(e);
                                break;
                            case "Select":
                                o.Xa(e, a, t, i);
                                break;
                            case "Bubble":
                                o.bubble && o.bubble.showEvent(a);
                                break;
                            case "ContextMenu":
                                var l = a.client.contextMenu();
                                l ? l.show(a) : o.contextMenu && o.contextMenu.show(a)
                        }
                }, this.eventDoubleClickPostBack = function(e, t) {
                    this.P("EventDoubleClick", t, e)
                }, this.eventDoubleClickCallBack = function(e, t) {
                    this.R("EventDoubleClick", e, t)
                }, this.Ya = function(e) {
                    if ("undefined" != typeof DayPilot.Bubble && DayPilot.Bubble.hideActive(), o.timeouts) {
                        for (var t in o.timeouts) window.clearTimeout(o.timeouts[t]);
                        o.timeouts = null
                    }
                    var i = this.event,
                        e = e || window.event;
                    if (o.Ha()) {
                        var n = {};
                        if (n.e = i, n.preventDefault = function() {
                                this.preventDefault.value = !0
                            }, "function" == typeof o.onEventDoubleClick && (o.onEventDoubleClick(n), n.preventDefault.value)) return;
                        switch (o.eventDoubleClickHandling) {
                            case "PostBack":
                                o.eventDoubleClickPostBack(i);
                                break;
                            case "CallBack":
                                o.eventDoubleClickCallBack(i);
                                break;
                            case "Edit":
                                i.allday() || o.Wa(this);
                                break;
                            case "Select":
                                i.allday() || o.Xa(this, i, e.ctrlKey);
                                break;
                            case "Bubble":
                                o.bubble && o.bubble.showEvent(i)
                        }
                        "function" == typeof o.onEventDoubleClicked && o.onEventDoubleClicked(n)
                    } else switch (o.eventDoubleClickHandling) {
                        case "PostBack":
                            o.eventDoubleClickPostBack(i);
                            break;
                        case "CallBack":
                            o.eventDoubleClickCallBack(i);
                            break;
                        case "JavaScript":
                            o.onEventDoubleClick(i);
                            break;
                        case "Edit":
                            i.allday() || o.Wa(this);
                            break;
                        case "Select":
                            i.allday() || o.Xa(this, i, e.ctrlKey);
                            break;
                        case "Bubble":
                            o.bubble && o.bubble.showEvent(i)
                    }
                }, this.eventRightClickPostBack = function(e, t) {
                    this.P("EventRightClick", t, e)
                }, this.eventRightClickCallBack = function(e, t) {
                    this.R("EventRightClick", e, t)
                }, this.Za = function(e) {
                    var t = this.event;
                    if (e.stopPropagation && e.stopPropagation(), !t.client.rightClickEnabled()) return !1;
                    if (o.Ha()) {
                        var i = {};
                        if (i.e = t, i.preventDefault = function() {
                                this.preventDefault.value = !0
                            }, "function" == typeof o.onEventRightClick && (o.onEventRightClick(i), i.preventDefault.value)) return !1;
                        switch (o.eventRightClickHandling) {
                            case "PostBack":
                                o.eventRightClickPostBack(t);
                                break;
                            case "CallBack":
                                o.eventRightClickCallBack(t);
                                break;
                            case "ContextMenu":
                                var n = t.client.contextMenu();
                                n ? n.show(t) : o.contextMenu && o.contextMenu.show(this.event);
                                break;
                            case "Bubble":
                                o.bubble && o.bubble.showEvent(t)
                        }
                        "function" == typeof o.onEventRightClicked && o.onEventRightClicked(i)
                    } else switch (o.eventRightClickHandling) {
                        case "PostBack":
                            o.eventRightClickPostBack(t);
                            break;
                        case "CallBack":
                            o.eventRightClickCallBack(t);
                            break;
                        case "JavaScript":
                            o.onEventRightClick(t);
                            break;
                        case "ContextMenu":
                            var n = t.client.contextMenu();
                            n ? n.show(t) : o.contextMenu && o.contextMenu.show(this.event);
                            break;
                        case "Bubble":
                            o.bubble && o.bubble.showEvent(t)
                    }
                    return e.preventDefault && e.preventDefault(), !1
                };
                this.$a = function(e) {
                    return new DayPilot.Column(e, o)
                };
                this.headerClickPostBack = function(e, t) {
                    this.P("HeaderClick", t, e)
                }, this.headerClickCallBack = function(e, t) {
                    this.R("HeaderClick", e, t)
                }, this._a = function(e) {
                    var t = this.data,
                        i = o.$a(t);
                    if (o.Ha()) {
                        var n = {};
                        if (n.header = {}, n.header.id = t.id, n.header.name = t.name, n.header.start = t.start, n.column = i, n.preventDefault = function() {
                                this.preventDefault.value = !0
                            }, "function" == typeof o.onHeaderClick && (o.onHeaderClick(n), n.preventDefault.value)) return;
                        switch (o.headerClickHandling) {
                            case "PostBack":
                                o.headerClickPostBack(i);
                                break;
                            case "CallBack":
                                o.headerClickCallBack(i)
                        }
                        "function" == typeof o.onHeaderClicked && o.onHeaderClicked(n)
                    } else switch (o.headerClickHandling) {
                        case "PostBack":
                            o.headerClickPostBack(i);
                            break;
                        case "CallBack":
                            o.headerClickCallBack(i);
                            break;
                        case "JavaScript":
                            o.onHeaderClick(i)
                    }
                }, this.ab = function() {
                    if ("undefined" != typeof DayPilot.Bubble && o.columnBubble)
                        if ("Resources" === o.viewType) {
                            var e = {};
                            e.calendar = o, e.start = this.data.start, e.name = this.data.name, e.id = this.data.id, e.toJSON = function() {
                                var e = {};
                                return e.id = this.id, e.start = this.start, e.name = this.name, e
                            }, o.columnBubble.showResource(e)
                        } else {
                            var t = new DayPilot.Date(this.data.start),
                                i = t.addDays(1),
                                n = {};
                            n.calendar = o, n.start = t, n.end = i, n.toJSON = function() {
                                var e = {};
                                return e.start = this.start, e.end = this.end, e
                            }, o.columnBubble.showTime(n)
                        } var a = this,
                        r = a.firstChild;
                    if (!r.active) {
                        var l = a.data,
                            s = o.$a(l);
                        s.areas = a.data.areas, DayPilot.Areas.showAreas(r, s)
                    }
                }, this.bb = function(e) {
                    "undefined" != typeof DayPilot.Bubble && o.columnBubble && o.columnBubble.hideOnMouseOut(), DayPilot.Areas.hideAreas(this.firstChild, e)
                }, this.eventDeletePostBack = function(e, t) {
                    this.P("EventDelete", t, e)
                }, this.eventDeleteCallBack = function(e, t) {
                    this.R("EventDelete", e, t)
                }, this.cb = function(e) {
                    var t;
                    if (t = e && e.isEvent ? e : e.parentNode.parentNode.event, "undefined" != typeof DayPilot.Bubble && (DayPilot.Bubble.hideActive(), DayPilot.Bubble.cancelShowing()), o.Ha()) {
                        var i = {};
                        if (i.e = t, i.preventDefault = function() {
                                this.preventDefault.value = !0
                            }, "function" == typeof o.onEventDelete && (o.onEventDelete(i), i.preventDefault.value)) return;
                        switch (o.eventDeleteHandling) {
                            case "PostBack":
                                o.eventDeletePostBack(t);
                                break;
                            case "CallBack":
                                o.eventDeleteCallBack(t);
                                break;
                            case "Update":
                                o.events.remove(t)
                        }
                        "function" == typeof o.onEventDeleted && o.onEventDeleted(i)
                    } else switch (o.eventDeleteHandling) {
                        case "PostBack":
                            o.eventDeletePostBack(t);
                            break;
                        case "CallBack":
                            o.eventDeleteCallBack(t);
                            break;
                        case "JavaScript":
                            o.onEventDelete(t)
                    }
                }, this.eventResizePostBack = function(e, t, i, n) {
                    if (!t) throw "newStart is null";
                    if (!i) throw "newEnd is null";
                    var a = {};
                    a.e = e, a.newStart = t, a.newEnd = i, this.P("EventResize", n, a)
                }, this.eventResizeCallBack = function(e, t, i, n) {
                    if (!t) throw "newStart is null";
                    if (!i) throw "newEnd is null";
                    var a = {};
                    a.e = e, a.newStart = t, a.newEnd = i, this.R("EventResize", a, n)
                }, this.db = function(e, t, i, n) {
                    if ("PostBack" === e) o.postBack2(t, i, n);
                    else if ("CallBack" === e) o.R(t, i, n, "CallBack");
                    else if ("Immediate" === e) o.R(t, i, n, "Notify");
                    else if ("Queue" === e) o.queue.add(new DayPilot.Action(this, t, i, n));
                    else {
                        if ("Notify" !== e) throw "Invalid event invocation type";
                        "Notify" === l.notifyType() ? o.R(t, i, n, "Notify") : o.queue.add(new DayPilot.Action(o, t, i, n))
                    }
                }, this.Pa = function(e) {
                    if ("BusinessHoursNoScroll" === this.heightSpec) return this.businessBeginsHour;
                    if (this.hideFreeCells && !e) {
                        var t = this.eb * this.cellDuration / this.cellHeight,
                            i = Math.floor(t / 60);
                        return i = Math.max(0, i), Math.min(this.dayBeginsHour + i, this.businessBeginsHour)
                    }
                    return this.dayBeginsHour
                }, this.visibleStart = function() {
                    if ("Resources" === o.viewType) {
                        if (o.Ja.isEmpty()) return DayPilot.Date.today();
                        var e = DayPilot.list(o.Ja).map(function(e) {
                                return e.start.getTime()
                            }),
                            t = Math.min.apply(null, e);
                        return new DayPilot.Date(t)
                    }
                    return this.Ja[0].start
                }, this.visibleEnd = function() {
                    if ("Resources" === o.viewType) {
                        if (o.Ja.isEmpty()) return DayPilot.Date.today().addDays(1);
                        var e = DayPilot.list(o.Ja).map(function(e) {
                                return e.start.getTime()
                            }),
                            t = Math.max.apply(null, e);
                        return new DayPilot.Date(t).addDays(1)
                    }
                    var i = this.Ja,
                        t = i.length - 1;
                    return i[t].start.addDays(1)
                }, this.Ha = function() {
                    return 2 === o.api
                }, this.fb = function(e, t) {
                    var i = e.start(),
                        n = i.getDatePart(),
                        a = Math.floor(t / o.cellHeight),
                        r = a * o.cellDuration,
                        l = 60 * r * 1e3,
                        s = 60 * o.Pa() * 60 * 1e3;
                    return n.addTime(l + s)
                }, this.gb = function(e, t) {
                    var i = Math.floor(t / o.cellHeight),
                        n = i * o.cellDuration,
                        a = 60 * n * 1e3,
                        r = 60 * o.Pa() * 60 * 1e3;
                    return o.Ja[e.part.dayIndex].start.addTime(a + r)
                }, this.hb = function(e, t, i, n) {
                    if ("Disabled" !== this.eventResizeHandling) {
                        var a, r;
                        if ("top" === n ? (a = o.fb(e, i), r = e.end()) : "bottom" === n && (a = e.start(), r = o.gb(e, i + t)), o.Ha()) {
                            var l = {},
                                s = function() {
                                    if (l.loaded = function() {}, o.ib(), !l.preventDefault.value) {
                                        switch (o.eventResizeHandling) {
                                            case "PostBack":
                                                o.eventResizePostBack(e, a, r);
                                                break;
                                            case "CallBack":
                                                o.eventResizeCallBack(e, a, r);
                                                break;
                                            case "Notify":
                                                o.eventResizeNotify(e, a, r);
                                                break;
                                            case "Update":
                                                e.start(a), e.end(r), o.events.update(e)
                                        }
                                        "function" == typeof o.onEventResized && o.onEventResized(l)
                                    }
                                };
                            if (l.e = e, l.newStart = a, l.newEnd = r, l.preventDefault = function() {
                                    this.preventDefault.value = !0
                                }, l.async = !1, l.hideShadow = function() {
                                    o.ib()
                                }, l.loaded = function() {
                                    s()
                                }, "function" == typeof o.onEventResize && (o.onEventResize(l), l.preventDefault.value)) return;
                            l.async || s()
                        } else switch (o.eventResizeHandling) {
                            case "PostBack":
                                o.eventResizePostBack(e, a, r);
                                break;
                            case "CallBack":
                                o.eventResizeCallBack(e, a, r);
                                break;
                            case "JavaScript":
                                o.onEventResize(e, a, r);
                                break;
                            case "Notify":
                                o.eventResizeNotify(e, a, r)
                        }
                    }
                }, this.eventResizeNotify = function(e, t, i, n) {
                    var a = new DayPilot.Event(e.copy(), this);
                    e.start(t), e.end(i), e.commit(), o.update(), this.jb("Notify", a, t, i, n)
                }, this.jb = function(e, t, i, n, a) {
                    var o = {};
                    o.e = t, o.newStart = i, o.newEnd = n, this.db(e, "EventResize", o, a)
                }, this.eventMovePostBack = function(e, t, i, n, a) {
                    if (!t) throw "newStart is null";
                    if (!i) throw "newEnd is null";
                    var o = {};
                    o.e = e, o.newStart = t, o.newEnd = i, o.newResource = n, this.P("EventMove", a, o)
                }, this.eventMoveCallBack = function(e, t, i, n, a) {
                    if (!t) throw "newStart is null";
                    if (!i) throw "newEnd is null";
                    var o = {};
                    o.e = e, o.newStart = t, o.newEnd = i, o.newResource = n, this.R("EventMove", o, a)
                }, this.kb = function(e, t, i) {
                    var n = 0,
                        a = Math.floor((i - n) / o.cellHeight),
                        r = o.cellDuration,
                        l = a * r * 60 * 1e3,
                        s = e.start(),
                        d = e.end(),
                        c = new Date;
                    s instanceof DayPilot.Date && (s = s.toDate()), c.setTime(Date.UTC(s.getUTCFullYear(), s.getUTCMonth(), s.getUTCDate()));
                    var h = "Never" !== o.useEventBoxes ? s.getTime() - (c.getTime() + 3600 * s.getUTCHours() * 1e3 + Math.floor(s.getUTCMinutes() / r) * r * 60 * 1e3) : 0,
                        u = d.getTime() - s.getTime(),
                        f = 3600 * o.Pa() * 1e3;
                    "undefined" == typeof t && (t = e.part.dayIndex);
                    var v = this.Ja[t],
                        p = v.start.getTime(),
                        m = new Date;
                    m.setTime(p + l + h + f);
                    var g = new DayPilot.Date(m);
                    return {
                        "start": g,
                        "end": g.addTime(u),
                        "resource": v.id
                    }
                }, this.lb = function(e, t, i, n, a) {
                    if ("Disabled" !== o.eventMoveHandling) {
                        var r = o.kb(e, t, i),
                            l = r.start,
                            s = r.end,
                            d = r.resource,
                            c = !!a;
                        if (o.Ha()) {
                            var h = {},
                                u = function() {
                                    if (h.loaded = function() {}, o.mb(), !h.preventDefault.value) {
                                        switch (o.eventMoveHandling) {
                                            case "PostBack":
                                                o.eventMovePostBack(e, l, s, d);
                                                break;
                                            case "CallBack":
                                                o.eventMoveCallBack(e, l, s, d);
                                                break;
                                            case "Notify":
                                                o.eventMoveNotify(e, l, s, d);
                                                break;
                                            case "Update":
                                                e.start(l), e.end(s), e.resource(d), c ? (e.commit(), o.events.add(e)) : o.events.update(e), o.nb()
                                        }
                                        "function" == typeof o.onEventMoved && o.onEventMoved(h)
                                    }
                                };
                            if (h.e = e, h.newStart = r.start, h.newEnd = r.end, h.newResource = r.resource, h.external = c, h.ctrl = !1, n && (h.ctrl = n.ctrlKey), h.shift = !1, n && (h.shift = n.shiftKey), h.preventDefault = function() {
                                    this.preventDefault.value = !0
                                }, h.async = !1, h.hideShadow = function() {
                                    o.mb()
                                }, h.loaded = function() {
                                    u()
                                }, "function" == typeof o.onEventMove && (o.onEventMove(h), h.preventDefault.value)) return;
                            h.async || u()
                        } else switch (o.eventMoveHandling) {
                            case "PostBack":
                                o.eventMovePostBack(e, l, s, d);
                                break;
                            case "CallBack":
                                o.eventMoveCallBack(e, l, s, d);
                                break;
                            case "JavaScript":
                                o.onEventMove(e, l, s, d, c, !!n && n.ctrlKey, !!n && n.shiftKey);
                                break;
                            case "Notify":
                                o.eventMoveNotify(e, l, s, d, null)
                        }
                    }
                }, this.eventMoveNotify = function(e, t, i, n, a) {
                    var r = new DayPilot.Event(e.copy(), this);
                    e.start(t), e.end(i), e.resource(n), e.commit(), o.update(), this.ob("Notify", r, t, i, n, a)
                }, this.ob = function(e, t, i, n, a, o) {
                    var r = {};
                    r.e = t, r.newStart = i, r.newEnd = n, r.newResource = a, this.db(e, "EventMove", r, o)
                }, this.nb = function() {
                    if (o.todo && o.todo.del) {
                        var e = o.todo.del;
                        e.parentNode.removeChild(e), o.todo.del = null
                    }
                }, this.pb = function(e, t) {
                    var i = o.qb(t),
                        n = {};
                    n.args = e, n.guid = i, o.R("Bubble", n)
                }, this.qb = function(e) {
                    var t = DayPilot.guid();
                    return this.bubbles || (this.bubbles = []), this.bubbles[t] = e, t
                }, this.eventMenuClickPostBack = function(e, t, i) {
                    var n = {};
                    n.e = e, n.command = t, this.P("EventMenuClick", i, n)
                }, this.eventMenuClickCallBack = function(e, t, i) {
                    var n = {};
                    n.e = e, n.command = t, this.R("EventMenuClick", n, i)
                }, this.rb = function(e, t, i) {
                    switch (i) {
                        case "PostBack":
                            o.eventMenuClickPostBack(t, e);
                            break;
                        case "CallBack":
                            o.eventMenuClickCallBack(t, e)
                    }
                }, this.timeRangeMenuClickPostBack = function(e, t, i) {
                    var n = {};
                    n.selection = e, n.command = t, this.P("TimeRangeMenuClick", i, n)
                }, this.timeRangeMenuClickCallBack = function(e, t, i) {
                    var n = {};
                    n.selection = e, n.command = t, this.R("TimeRangeMenuClick", n, i)
                }, this.sb = function(e, t, i) {
                    switch (i) {
                        case "PostBack":
                            o.timeRangeMenuClickPostBack(t, e);
                            break;
                        case "CallBack":
                            o.timeRangeMenuClickCallBack(t, e)
                    }
                }, this.timeRangeSelectedPostBack = function(e, t, i, n) {
                    var a = {};
                    a.start = e, a.end = t, a.resource = i, this.P("TimeRangeSelected", n, a)
                }, this.timeRangeSelectedCallBack = function(e, t, i, n) {
                    var a = {};
                    a.start = e, a.end = t, a.resource = i, this.R("TimeRangeSelected", a, n)
                }, this.tb = function(e, t, i) {
                    e = new DayPilot.Date(e), t = new DayPilot.Date(t);
                    var n = i;
                    if (o.Ha()) {
                        var a = {};
                        if (a.start = e, a.end = t, a.resource = n, a.control = o, a.preventDefault = function() {
                                this.preventDefault.value = !0
                            }, a.toJSON = function() {
                                return DayPilot.Util.copyProps(a, {}, ["start", "end", "resource"])
                            }, "function" == typeof o.onTimeRangeSelect && (o.onTimeRangeSelect(a), a.preventDefault.value)) return;
                        switch (o.timeRangeSelectedHandling) {
                            case "PostBack":
                                o.timeRangeSelectedPostBack(e, t, n);
                                break;
                            case "CallBack":
                                o.timeRangeSelectedCallBack(e, t, n)
                        }
                        "function" == typeof o.onTimeRangeSelected && o.onTimeRangeSelected(a)
                    } else switch (o.timeRangeSelectedHandling) {
                        case "PostBack":
                            o.timeRangeSelectedPostBack(e, t, i);
                            break;
                        case "CallBack":
                            o.timeRangeSelectedCallBack(e, t, i);
                            break;
                        case "JavaScript":
                            o.onTimeRangeSelected(e, t, i)
                    }
                }, this.timeRangeDoubleClickPostBack = function(e, t, i, n) {
                    var a = {};
                    a.start = e, a.end = t, a.resource = i, this.P("TimeRangeDoubleClick", n, a)
                }, this.timeRangeDoubleClickCallBack = function(e, t, i, n) {
                    var a = {};
                    a.start = e, a.end = t, a.resource = i, this.R("TimeRangeDoubleClick", a, n)
                }, this.ub = function(e, t, i) {
                    if (o.Ha()) {
                        var n = i,
                            a = {};
                        if (a.start = e, a.end = t, a.resource = n, a.preventDefault = function() {
                                this.preventDefault.value = !0
                            }, "function" == typeof o.onTimeRangeDoubleClick && (o.onTimeRangeDoubleClick(a), a.preventDefault.value)) return;
                        switch (o.timeRangeDoubleClickHandling) {
                            case "PostBack":
                                o.timeRangeDoubleClickPostBack(e, t, n);
                                break;
                            case "CallBack":
                                o.timeRangeDoubleClickCallBack(e, t, n)
                        }
                        "function" == typeof o.onTimeRangeDoubleClicked && o.onTimeRangeDoubleClicked(a)
                    } else switch (o.timeRangeDoubleClickHandling) {
                        case "PostBack":
                            o.timeRangeDoubleClickPostBack(e, t, i);
                            break;
                        case "CallBack":
                            o.timeRangeDoubleClickCallBack(e, t, i);
                            break;
                        case "JavaScript":
                            o.onTimeRangeDoubleClick(e, t, i)
                    }
                }, this.eventEditPostBack = function(e, t, i) {
                    var n = {};
                    n.e = e, n.newText = t, this.P("EventEdit", i, n)
                }, this.eventEditCallBack = function(e, t, i) {
                    var n = {};
                    n.e = e, n.newText = t, this.R("EventEdit", n, i)
                }, this.vb = function(e, t) {
                    if (o.Ha()) {
                        var i = {};
                        if (i.e = e, i.newText = t, i.preventDefault = function() {
                                this.preventDefault.value = !0
                            }, "function" == typeof o.onEventEdit && (o.onEventEdit(i), i.preventDefault.value)) return;
                        switch (o.eventEditHandling) {
                            case "PostBack":
                                o.eventEditPostBack(e, t);
                                break;
                            case "CallBack":
                                o.eventEditCallBack(e, t);
                                break;
                            case "Update":
                                e.text(t), o.events.update(e)
                        }
                        if ("function" == typeof o.onEventEdited && (o.onEventEdited(i), i.preventDefault.value)) return
                    } else switch (o.eventEditHandling) {
                        case "PostBack":
                            o.eventEditPostBack(e, t);
                            break;
                        case "CallBack":
                            o.eventEditCallBack(e, t);
                            break;
                        case "JavaScript":
                            o.onEventEdit(e, t)
                    }
                }, this.eventSelectPostBack = function(e, t, i) {
                    var n = {};
                    n.e = e, n.change = t, this.P("EventSelect", i, n)
                }, this.eventSelectCallBack = function(e, t, i) {
                    var n = {};
                    n.e = e, n.change = t, this.R("EventSelect", n, i)
                }, this.wb = function(e, t, i, n) {
                    var a = o.multiselect,
                        r = a.isSelected(t);
                    if (i || n || !r || 1 !== a.xb.length)
                        if (o.Ha()) {
                            a.previous = a.events();
                            var l = {};
                            if (l.e = t, l.selected = a.isSelected(t), l.ctrl = i, l.meta = n, l.preventDefault = function() {
                                    this.preventDefault.value = !0
                                }, "function" == typeof o.onEventSelect && (o.onEventSelect(l), l.preventDefault.value)) return;
                            switch (o.eventSelectHandling) {
                                case "PostBack":
                                    o.eventSelectPostBack(t, s);
                                    break;
                                case "CallBack":
                                    "undefined" != typeof WebForm_InitCallback && (window.yb = "", window.zb = [], WebForm_InitCallback()), o.eventSelectCallBack(t, s);
                                    break;
                                case "Update":
                                    a.Ab(e, i)
                            }
                            "function" == typeof o.onEventSelected && (l.change = a.isSelected(t) ? "selected" : "deselected", l.selected = a.isSelected(t), o.onEventSelected(l))
                        } else {
                            a.previous = a.events(), a.Ab(e, i);
                            var s = a.isSelected(t) ? "selected" : "deselected";
                            switch (o.eventSelectHandling) {
                                case "PostBack":
                                    o.eventSelectPostBack(t, s);
                                    break;
                                case "CallBack":
                                    "undefined" != typeof WebForm_InitCallback && (window.yb = "", window.zb = [], WebForm_InitCallback()), o.eventSelectCallBack(t, s);
                                    break;
                                case "JavaScript":
                                    o.onEventSelect(t, s)
                            }
                        }
                }, this.commandCallBack = function(e, t) {
                    this.X();
                    var i = {};
                    i.command = e, this.R("Command", i, t)
                }, this.Bb = function(e) {
                    if (!r.active && !r.using && (clearTimeout(t.selectedTimeout), !DayPilot.Global.selecting)) {
                        if (t.editing) return void t.editing.blur();
                        if (o.selectedCells && "Disabled" !== o.timeRangeDoubleClickHandling)
                            for (var i = 0; i < o.selectedCells.length; i++)
                                if (this === o.selectedCells[i]) return;
                        if ("Disabled" !== o.timeRangeSelectedHandling) {
                            DayPilot.Util.mouseButton(e).left && (t.firstMousePos = o.coords, t.firstMousePos.calendar = o, o.clearSelection(), t.topSelectedCell = this, t.bottomSelectedCell = this, t.column = t.getColumn(this), o.selectedCells.push(this), t.firstSelected = this, DayPilot.Global.selecting = {
                                "calendar": o
                            }, o.Cb())
                        }
                    }
                }, this.Cb = function() {
                    this.getSelection() && o.selectedCells && ! function() {
                        var e = t.topSelectedCell,
                            i = t.bottomSelectedCell,
                            n = function() {
                                if (e.data) return e.data.x;
                                for (var t = e.parentNode.cells, i = 0; i < t.length; i++)
                                    if (t[i] === e) return i;
                                return -1
                            }(),
                            a = o.timeRangeSelectingStartEndFormat;
                        "Auto" === a && (a = "Clock24Hours" === l.timeFormat() ? "H:mm" : "h:mm tt");
                        var r = o.Ja[n];
                        if (r) {
                            var s = {};
                            s.start = e.start, s.end = i.end, s.duration = new DayPilot.Duration(s.start, s.end), s.resource = r.id, s.allowed = !0, s.html = null, s.cssClass = null, s.top = {}, s.top.width = null, s.top.space = 5, s.top.html = s.start.toString(a, l.locale()), s.top.enabled = o.timeRangeSelectingStartEndEnabled, s.bottom = {}, s.bottom.width = null, s.bottom.space = 5, s.bottom.html = s.end.toString(a, l.locale()), s.bottom.enabled = o.timeRangeSelectingStartEndEnabled;
                            var d = DayPilot.Global.selecting && DayPilot.Global.selecting.args;
                            if (!d || d.start !== s.start || d.end !== s.end || d.resource != s.resource) {
                                if (!o.allowEventOverlap) {
                                    var c = {
                                        "id": null,
                                        "start": s.start,
                                        "end": s.end,
                                        "resource": s.resource
                                    };
                                    o.events.Db(c) && (s.allowed = !1)
                                }
                                o.Eb(s.start, s.end, s.resource) && (s.allowed = !1), "function" == typeof o.onTimeRangeSelecting && s.allowed && o.onTimeRangeSelecting(s), DayPilot.Global.selecting && (DayPilot.Global.selecting.args = s);
                                var h = o.Fb(e.start, r.start).boxTop - o.Gb(),
                                    u = o.Fb(i.end, r.start).boxBottom - o.Gb(),
                                    f = u - h,
                                    v = function() {
                                        if (o.nav.activeSelection) return o.nav.activeSelection;
                                        var e = document.createElement("div");
                                        e.style.zIndex = o.F, e.style.position = "absolute", e.style.left = "0px", e.style.width = "100%", e.ondblclick = function(e) {
                                            if ("Disabled" !== o.timeRangeDoubleClickHandling) {
                                                clearTimeout(o.Hb);
                                                var t = o.getSelection();
                                                t && o.ub(t.start, t.end, t.resource)
                                            }
                                        };
                                        var t = document.createElement("div");
                                        return t.className = o.A("_shadow_inner"), e.appendChild(t), o.nav.events.rows[0].cells[n].selection.appendChild(e), o.elements.selection.push(e), o.nav.activeSelection = e, e
                                    }();
                                v.className = o.A("_shadow"), v.firstChild.innerHTML = "", v.style.top = h + "px", v.style.height = f + "px";
                                var p = v.firstChild;
                                s.html && (p.innerHTML = s.html), s.cssClass && DayPilot.Util.addClass(v, s.cssClass), s.allowed || DayPilot.Util.addClass(v, o.A("_shadow_forbidden")), o.Ib(v, n, s)
                            }
                        }
                    }()
                }, this.mb = function() {
                    o.Jb(t.movingShadow), t.movingShadow = null
                }, this.ib = function() {
                    o.Jb(t.resizingShadow), t.resizingShadow = null
                }, this.Jb = function(e) {
                    DayPilot.de(e), DayPilot.de(o.nav.indicatorTop), DayPilot.de(o.nav.indicatorBottom)
                }, this.Ib = function(e, t, i) {
                    var n = o.nav.events.rows[0].cells,
                        a = n[t].events,
                        r = t === n.length - 1;
                    if (DayPilot.de(o.nav.indicatorTop), DayPilot.de(o.nav.indicatorBottom), i.top.enabled) {
                        var l = document.createElement("div");
                        l.style.zIndex = o.F, l.style.position = "absolute", l.style.top = e.offsetTop + "px", r ? l.style.right = "0px" : l.style.left = e.offsetWidth + i.top.space + "px", i.top.width ? l.style.width = i.top.width + "px" : l.style.whiteSpace = "nowrap", i.top.html && (l.innerHTML = i.top.html), l.className = o.A("_shadow_top"), a.appendChild(l), o.elements.selection.push(l), o.nav.indicatorTop = l
                    }
                    if (i.bottom.enabled) {
                        var s = document.createElement("div");
                        s.style.zIndex = o.F, s.style.position = "absolute", s.style.top = e.offsetTop + e.offsetHeight + "px", r ? s.style.right = "0px" : s.style.left = e.offsetWidth + i.bottom.space + "px", i.bottom.width ? s.style.width = i.bottom.width + "px" : s.style.whiteSpace = "nowrap", i.bottom.html && (s.innerHTML = i.bottom.html), s.className = o.A("_shadow_bottom"), a.appendChild(s);
                        var d = s.offsetHeight;
                        s.style.top = e.offsetTop + e.offsetHeight - d + "px", o.elements.selection.push(s), o.nav.indicatorBottom = s
                    }
                }, this.Kb = function(e) {
                    "undefined" != typeof DayPilot.Bubble && o.cellBubble && o.cellBubble.hideOnMouseOut()
                }, this.Lb = function(e) {
                    if ("undefined" != typeof t && !r.active && !r.using && "undefined" != typeof DayPilot.Bubble && o.cellBubble) {
                        var i = t.getColumn(this),
                            n = o.Ja[i].id,
                            a = {};
                        a.calendar = o, a.start = this.start, a.end = this.end, a.resource = n, a.toJSON = function() {
                            var e = {};
                            return e.start = this.start, e.end = this.end, e.resource = this.resource, e
                        }, o.cellBubble.showCell(a)
                    }
                }, this.getSelection = function() {
                    if (!t.topSelectedCell) return null;
                    if (!t.bottomSelectedCell) return null;
                    var e = t.topSelectedCell.start,
                        i = t.bottomSelectedCell.end,
                        n = t.topSelectedCell.resource;
                    return new DayPilot.Selection(e, i, n, o)
                }, this.Mb = function(e) {}, this.Nb = function(e) {
                    if ("Fixed" === o.columnWidthSpec || o.G) {
                        if (!o.nav.bottomLeft) return;
                        o.nav.bottomLeft.scrollTop = o.nav.bottomRight.scrollTop, o.nav.upperRight && (o.nav.upperRight.scrollLeft = o.nav.bottomRight.scrollLeft), o.nav.scrollLayer.scrollLeft = o.nav.bottomRight.scrollLeft
                    }
                    var t = o.Ob();
                    o.scrollPos = t.scrollTop, o.Pb = t.clientHeight, o.nav.scrollpos.value = o.scrollPos, o.Fa()
                }, this.Fa = function() {
                    if (this.scrollLabelsVisible && this.Qb) {
                        if (this.nav && this.nav.main && this.nav.main.rows && this.nav.main.rows.length > 0 && this.nav.main.rows[0].cells.length > 0) {
                            for (var e = (this.Ja, this.showHours ? this.hourWidth : 0), t = this.nav.main.rows[0].cells[0].clientWidth, i = 1, n = 0; n < this.nav.scrollUp.length; n++) {
                                var a = this.nav.scrollUp[n],
                                    r = this.nav.scrollDown[n],
                                    l = Math.floor(e + n * t + t / 2 - 5 + i);
                                l < 0 && (l = 0), l -= o.nav.bottomRight.scrollLeft, a && a.style && (a.style.left = l + "px"), r && r.style && (r.style.left = l + "px")
                            }
                            for (var s = this.Gb(), n = 0; n < this.nav.scrollUp.length; n++) {
                                var d = this.nav.scrollUp[n],
                                    c = this.nav.scrollDown[n],
                                    h = this.Qb[n].minEnd - s,
                                    u = this.Qb[n].maxStart - s;
                                d && c && (h <= o.scrollPos && parseInt(d.style.left) >= o.hourWidth ? (d.style.top = this.Qa() + "px", d.style.display = "") : d.style.display = "none", u >= o.scrollPos + o.Pb && parseInt(c.style.left) >= o.hourWidth ? (c.style.top = this.Qa() + this.Pb - 10 + "px", c.style.display = "") : c.style.display = "none")
                            }
                        }
                    }
                }, this.Rb = function(e) {
                    var t = e.parentNode,
                        i = 0,
                        n = e.offsetTop,
                        a = e.parentNode.offsetWidth,
                        o = e.offsetHeight;
                    e.event.allday() && (i = e.offsetLeft, a = e.offsetWidth);
                    var r = document.createElement("textarea");
                    r.style.boxSizing = "border-box", r.style.position = "absolute", r.style.width = a + "px", r.style.height = o + "px";
                    var l = DayPilot.gs(e, "fontFamily");
                    l || (l = DayPilot.gs(e, "font-family")), r.style.fontFamily = l;
                    var s = DayPilot.gs(e, "fontSize");
                    return s || (s = DayPilot.gs(e, "font-size")), r.style.fontSize = s, r.style.left = i + "px", r.style.top = n + "px", r.style.border = "1px solid black", r.style.padding = "0px", r.style.marginTop = "0px", r.style.backgroundColor = "white", r.value = (e.event.text() || "").trim(), r.event = e.event, t.appendChild(r), r
                }, this.Xa = function(e, t, i, n) {
                    o.wb(e, t, i, n)
                }, this.multiselect = {}, this.multiselect.la = [], this.multiselect.xb = [], this.multiselect.Sb = [], this.multiselect.Tb = [], this.multiselect.Ub = function() {
                    var e = o.multiselect;
                    return JSON.stringify(e.events())
                }, this.multiselect.events = function() {
                    var e = o.multiselect,
                        t = [];
                    t.ignoreToJSON = !0;
                    for (var i = 0; i < e.xb.length; i++) t.push(e.xb[i]);
                    return t
                }, this.multiselect.Vb = function() {
                    o.nav.select.value = o.multiselect.Ub()
                }, this.multiselect.Ab = function(e, t) {
                    var i = o.multiselect;
                    if (i.isSelected(e.event))
                        if (o.allowMultiSelect)
                            if (t) i.remove(e.event, !0);
                            else {
                                var n = i.xb.length;
                                i.clear(!0), n > 1 && i.add(e.event, !0)
                            }
                    else i.clear(!0);
                    else o.allowMultiSelect && t ? i.add(e.event, !0) : (i.clear(!0), i.add(e.event, !0));
                    i.redraw(), i.Vb()
                }, this.multiselect.Wb = function(e) {
                    var t = o.multiselect;
                    return t.Xb(e, t.la)
                }, this.multiselect.Yb = function() {
                    for (var e = o.multiselect, t = [], i = 0; i < e.xb.length; i++) {
                        var n = e.xb[i];
                        t.push(n.value())
                    }
                    alert(t.join("\n"))
                }, this.multiselect.add = function(e, t) {
                    var i = o.multiselect;
                    i.Zb(e) === -1 && i.xb.push(e), i.Vb(), t || i.redraw()
                }, this.multiselect.remove = function(e, t) {
                    var i = o.multiselect,
                        n = i.Zb(e);
                    n !== -1 && i.xb.splice(n, 1), i.Vb(), t || i.redraw()
                }, this.multiselect.clear = function(e) {
                    var t = o.multiselect;
                    t.xb = [], t.Vb(), e || t.redraw()
                }, this.multiselect.redraw = function() {
                    for (var e = o.multiselect, t = 0; t < o.elements.events.length; t++) {
                        var i = o.elements.events[t];
                        e.isSelected(i.event) ? e.$b(i) : e._b(i)
                    }
                }, this.multiselect.$b = function(e) {
                    var t = o.multiselect,
                        i = o.A("_selected"),
                        n = t.bc(e);
                    DayPilot.Util.addClass(n, i), t.Sb.push(e)
                }, this.multiselect.bc = function(e) {
                    return e
                }, this.multiselect.cc = function() {
                    for (var e = o.multiselect, t = 0; t < e.Sb.length; t++) {
                        var i = e.Sb[t];
                        e._b(i, !0)
                    }
                    e.Sb = []
                }, this.multiselect._b = function(e, t) {
                    var i = o.multiselect,
                        n = o.A("_selected"),
                        a = i.bc(e);
                    if (DayPilot.Util.removeClass(a, n), !t) {
                        var r = DayPilot.indexOf(i.Sb, e);
                        r !== -1 && i.Sb.splice(r, 1)
                    }
                }, this.multiselect.isSelected = function(e) {
                    return o.multiselect.Xb(e, o.multiselect.xb)
                }, this.multiselect.Zb = function(e) {
                    return DayPilot.indexOf(o.multiselect.xb, e)
                }, this.multiselect.Xb = function(e, t) {
                    if (!t) return !1;
                    for (var i = 0; i < t.length; i++) {
                        var n = t[i];
                        if (e === n) return !0;
                        if ("function" == typeof n.value) {
                            if (null !== n.value() && null !== e.value() && n.value() === e.value()) return !0;
                            if (null === n.value() && null === e.value() && n.recurrentMasterId() === e.recurrentMasterId() && e.start().toStringSortable() === n.start()) return !0
                        } else {
                            if (null !== n.value && null !== e.value() && n.value === e.value()) return !0;
                            if (null === n.value && null === e.value() && n.recurrentMasterId === e.recurrentMasterId() && e.start().toStringSortable() === n.start) return !0
                        }
                    }
                    return !1
                }, this.Wa = function(e) {
                    if (t.editing) return void t.editing.blur();
                    var i = this.Rb(e);
                    t.editing = i, DayPilot.re(i, DayPilot.touch.start, function(e) {
                        e.stopPropagation()
                    }), i.onblur = function() {
                        if (e.event) {
                            var n = (e.event.value(), e.event.tag(), e.event.text()),
                                a = i.value;
                            t.editing = null, i.onblur = null, DayPilot.de(i), n !== a && (e.style.display = "none", o.vb(e.event, a))
                        }
                    }, i.onkeypress = function(e) {
                        if (13 === (window.event ? event.keyCode : e.keyCode)) return this.onblur(), e.preventDefault(), !1
                    }, i.onkeyup = function(e) {
                        return 27 === (window.event ? event.keyCode : e.keyCode) && (i.onblur = null, i.parentNode && i.parentNode.removeChild(i), t.editing = !1), !0
                    }, i.select(), i.focus()
                }, this.dc = function() {
                    return "Resources" !== o.viewType && (!o.ma() || !o.C())
                }, this.ma = function() {
                    return DayPilot.isArray(o.columns) ? o.columns : o.columns.list
                }, this.columns = {}, this.columns.list = [], this.columns.ec = !1, this.columns.filter = function(e) {
                    o.fc.params = e, o.L && o.gc()
                }, this.columns.find = function(e, t) {
                    var i = "Resources" === o.viewType;
                    e = new DayPilot.Date(e);
                    var n = o.Ja.find(function(n) {
                        var a = !i || n.id === t,
                            o = n.start.addDays(1);
                        return !!(a && n.start <= e && e < o)
                    });
                    return n ? o.$a(n, o) : null
                }, this.columns.load = function(e, t, i) {
                    if (!e) throw new DayPilot.Exception("columns.load(): 'url' parameter required");
                    var n = function(e) {
                            var t = {};
                            t.exception = e.exception, t.request = e.request, "function" == typeof i && i(t)
                        },
                        a = function(e) {
                            var i, a = e.request;
                            try {
                                i = JSON.parse(a.responseText)
                            } catch (e) {
                                var r = {};
                                return r.exception = e, void n(r)
                            }
                            if (DayPilot.isArray(i)) {
                                var l = {};
                                if (l.preventDefault = function() {
                                        this.preventDefault.value = !0
                                    }, l.data = i, "function" == typeof t && t(l), l.preventDefault.value) return;
                                o.columns.list = i, o.L && o.update()
                            }
                        };
                    o.columnsLoadMethod && "POST" === o.columnsLoadMethod.toUpperCase() ? DayPilot.ajax({
                        "method": "POST",
                        "url": e,
                        "success": a,
                        "error": n
                    }) : DayPilot.ajax({
                        "method": "GET",
                        "url": e,
                        "success": a,
                        "error": n
                    })
                }, this.na = function() {
                    if (o.dc()) {
                        var e = this.hc();
                        this.Ja = this.ic(e)
                    } else this.ga = this.ic(this.ma() || []), this.Ja = this.jc(this.headerLevels, !0)
                }, this.kc = function() {
                    var e = this.startDate.getDatePart(),
                        t = this.days;
                    switch (this.viewType) {
                        case "Day":
                            t = 1;
                            break;
                        case "Week":
                            t = 7, e = e.firstDayOfWeek(l.weekStarts());
                            break;
                        case "WorkWeek":
                            for (t = 5, e = e.firstDayOfWeek(l.weekStarts()); 1 !== e.dayOfWeek();) e = e.addDays(1)
                    }
                    var i = e.addDays(t),
                        n = {};
                    return n.start = e, n.end = i, n.days = t, n
                }, this.hc = function() {
                    for (var e = [], t = this.kc(), i = t.start, n = t.days, a = 0; a < n; a++) {
                        var r = {};
                        r.start = i.addDays(a);
                        var s = l.locale().datePattern;
                        o.headerDateFormat && (s = o.headerDateFormat), r.name = r.start.toString(s, l.locale()), r.html = r.name, e.push(r)
                    }
                    return e
                }, this.fc = {}, this.lc = function(e, t) {
                    var i = {};
                    i.id = e.id, i.start = new DayPilot.Date(e.start || o.startDate).getDatePart(), i.name = e.name, i.html = e.html || e.name, i.toolTip = e.toolTip, i.backColor = e.backColor, i.areas = e.areas, i.parent = t;
                    var n = !e.children || 0 === e.children.length;
                    if ("function" == typeof o.onColumnFilter && o.fc.params)
                        if (n) {
                            var t = i.parent,
                                a = {};
                            a.visible = !0, a.column = {
                                "id": e.id,
                                "name": e.name,
                                "start": e.start,
                                "data": e
                            }, a.filter = o.fc.params, o.onColumnFilter(a), a.visible ? t && t.nc() : i.hidden = !0
                        } else i.hidden = !0;
                    return i.nc = function() {
                        i.hidden = !1, i.parent && i.parent.nc()
                    }, i.getChildren = function(e, t) {
                        var i = [];
                        if (e <= 1) return this.hidden || i.push(this), i;
                        if (!this.children || 0 === this.children.length) return t ? this.hidden || i.push(this) : i.push("empty"), i;
                        for (var n = 0; n < this.children.length; n++)
                            for (var a = this.children[n], o = a.getChildren(e - 1, t), r = 0; r < o.length; r++) i.push(o[r]);
                        return i
                    }, i.getChildrenCount = function(e) {
                        var t = 0;
                        if (!this.children || this.children.length <= 0 || e <= 1) {
                            return !this.hidden ? 1 : 0
                        }
                        for (var i = 0; i < this.children.length; i++) t += this.children[i].getChildrenCount(e - 1);
                        return t
                    }, i.putIntoBlock = function(e) {
                        for (var t = 0; t < this.blocks.length; t++) {
                            var i = this.blocks[t];
                            if (i.overlapsWith(e.part.top, e.part.height)) return i.events.push(e), i.min = Math.min(i.min, e.part.top), i.max = Math.max(i.max, e.part.top + e.part.height), t
                        }
                        var i = [];
                        return i.lines = [], i.events = [], i.overlapsWith = function(e, t) {
                            return !(e + t - 1 < this.min || e > this.max - 1)
                        }, i.putIntoLine = function(e) {
                            for (var t = 0; t < this.lines.length; t++) {
                                var i = this.lines[t];
                                if (i.isFree(e.part.top, e.part.height)) return i.push(e), t
                            }
                            var i = [];
                            return i.isFree = function(e, t) {
                                for (var i = e + t - 1, n = this.length, a = 0; a < n; a++) {
                                    var o = this[a];
                                    if (!(i < o.part.top || e > o.part.top + o.part.height - 1)) return !1
                                }
                                return !0
                            }, i.push(e), this.lines.push(i), this.lines.length - 1
                        }, i.events.push(e), i.min = e.part.top, i.max = e.part.top + e.part.height, this.blocks.push(i), this.blocks.length - 1
                    }, i.putIntoLine = function(e) {
                        for (var t = 0; t < this.lines.length; t++) {
                            var i = this.lines[t];
                            if (i.isFree(e.part.top, e.part.height)) return i.push(e), t
                        }
                        var i = [];
                        return i.isFree = function(e, t) {
                            for (var i = e + t - 1, n = this.length, a = 0; a < n; a++) {
                                var o = this[a];
                                if (!(i < o.part.top || e > o.part.top + o.part.height - 1)) return !1
                            }
                            return !0
                        }, i.push(e), this.lines.push(i), this.lines.length - 1
                    }, i.visibleStart = function() {
                        return i.start.addHours(o.Pa(!0))
                    }, i.visibleEnd = function() {
                        var e = o.La(!0);
                        return i.visibleStart().addTime(e)
                    }, e.children && (i.children = this.ic(e.children, i)), i
                }, this.ic = function(e, t) {
                    var i = DayPilot.list();
                    return DayPilot.list(e).each(function(e) {
                        var n = o.lc(e, t);
                        i.push(n)
                    }), i
                }, this.jc = function(e, t) {
                    for (var i = this.dc() ? this.Ja : this.ga, n = DayPilot.list(), a = 0; a < i.length; a++)
                        for (var o = i[a].getChildren(e, t), r = 0; r < o.length; r++) n.push(o[r]);
                    return n
                }, this.Ea = function() {
                    if (this.showAllDayEvents) {
                        var e = this.nav.header;
                        if (e) {
                            e.style.display = "none";
                            for (var t = this.Ja.length, i = 0; i < this.oc.lines.length; i++)
                                for (var n = this.oc.lines[i], a = 0; a < n.length; a++) {
                                    var r = n[a],
                                        s = r.cache || r.data,
                                        d = document.createElement("div");
                                    d.event = r, d.setAttribute("unselectable", "on"), d.style.position = "absolute", o.rtl ? d.style.right = 100 * r.part.colStart / t + "%" : d.style.left = 100 * r.part.colStart / t + "%", d.style.width = 100 * r.part.colWidth / t + "%", d.style.height = l.allDayEventHeight() + "px", d.className = this.A("_alldayevent"), d.style.top = this.headerLevels * l.headerHeight() + i * l.allDayEventHeight() + "px", s.cssClass && DayPilot.Util.addClass(d, s.cssClass), d.style.textAlign = "left", d.style.lineHeight = "1.2", r.client.clickEnabled() && (d.onclick = this.Ua), r.client.doubleClickEnabled() && (d.ondblclick = this.Ya), r.client.clickEnabled() || r.client.doubleClickEnabled() ? d.style.cursor = "pointer" : d.style.cursor = "default", DayPilot.re(d, "contextmenu", this.Za), d.onmousemove = function(e) {
                                        var t = this;
                                        if (!t.active) {
                                            var i = [];
                                            r.client.deleteEnabled() && i.push({
                                                "action": "JavaScript",
                                                "v": "Hover",
                                                "w": 17,
                                                "h": 17,
                                                "top": 3,
                                                "right": 3,
                                                "css": o.A("_event_delete"),
                                                "js": function(e) {
                                                    o.cb(e)
                                                }
                                            });
                                            var n = s.areas;
                                            n && n.length > 0 && (i = i.concat(n)), DayPilot.Areas.showAreas(t, t.event, null, i), DayPilot.Util.addClass(t, o.A("_alldayevent_hover"))
                                        }
                                        "undefined" != typeof DayPilot.Bubble && o.bubble && "Disabled" !== o.eventHoverHandling && o.bubble.showEvent(this.event)
                                    }, d.onmouseout = function(e) {
                                        var t = this;
                                        DayPilot.Util.removeClass(t, o.A("_alldayevent_hover")), DayPilot.Areas.hideAreas(this, e), o.bubble && o.bubble.hideOnMouseOut()
                                    }, this.showToolTip && !this.bubble && d.setAttribute("title", r.client.toolTip());
                                    var c = r.start().getTime() === r.part.start.getTime(),
                                        h = r.end().getTime() === r.part.end.getTime(),
                                        u = s.backColor,
                                        f = document.createElement("div");
                                    if (f.setAttribute("unselectable", "on"), f.className = this.A("_alldayevent_inner"), u && (f.style.background = u), s.fontColor && (f.style.color = s.fontColor), s.borderColor && (f.style.borderColor = s.borderColor), o.rtl ? (c || DayPilot.Util.addClass(d, this.A("_alldayevent_continueright")), h || DayPilot.Util.addClass(d, this.A("_alldayevent_continueleft"))) : (c || DayPilot.Util.addClass(d, this.A("_alldayevent_continueleft")), h || DayPilot.Util.addClass(d, this.A("_alldayevent_continueright"))), r.client.innerHTML() ? f.innerHTML = r.client.innerHTML() : f.innerHTML = r.text(), d.appendChild(f), o.Ha()) {
                                        if ("function" == typeof o.onAfterEventRender) {
                                            var v = {};
                                            v.e = d.event, v.div = d, o.onAfterEventRender(v)
                                        }
                                    } else o.afterEventRender && o.afterEventRender(d.event, d);
                                    this.nav.allday.appendChild(d), this.elements.events.push(d)
                                }
                            e.style.display = ""
                        }
                    }
                }, this.Y = function(e) {
                    if (o.multiselect.cc(), this.elements.events)
                        for (var t = 0; t < this.elements.events.length; t++) {
                            var i = this.elements.events[t],
                                n = i.event;
                            if (!n || !e || n.allday()) {
                                if (n && (n.div = null, n.root = null), i.onclick = null, i.onclickSave = null, i.ondblclick = null, i.oncontextmenu = null, i.onmouseover = null, i.onmouseout = null, i.onmousemove = null, i.onmousedown = null, i.firstChild && i.firstChild.firstChild && i.firstChild.firstChild.tagName && "IMG" === i.firstChild.firstChild.tagName.toUpperCase()) {
                                    var a = i.firstChild.firstChild;
                                    a.onmousedown = null, a.onmousemove = null, a.onclick = null
                                }
                                i.helper = null, i.event = null, DayPilot.de(i)
                            }
                        }
                    this.elements.events = []
                }, this.pc = function(e) {
                    var t = this.nav.events,
                        i = e.cache || e.data,
                        n = document.createElement("div");
                    n.setAttribute("unselectable", "on"), n.style.MozUserSelect = "none", n.style.KhtmlUserSelect = "none", n.style.WebkitUserSelect = "none", n.style.position = "absolute", n.className = this.A("_event"), n.style.left = e.part.left + "%", n.style.top = e.part.top - this.Gb() + "px", n.style.width = e.part.width + "%", n.style.height = Math.max(e.part.height, 2) + "px", n.style.overflow = "hidden", n.isFirst = e.part.start.getTime() === e.start().getTime(), n.isLast = e.part.end.getTime() === e.end().getTime(), e.client.clickEnabled() && (n.onclick = this.Ua), e.client.doubleClickEnabled() && (n.ondblclick = this.Ya), DayPilot.re(n, "contextmenu", this.Za), n.onmousemove = this.qc, n.onmouseout = this.rc, n.onmousedown = this.sc, DayPilot.re(n, DayPilot.touch.start, this.tc.onEventTouchStart), DayPilot.re(n, DayPilot.touch.move, this.tc.onEventTouchMove), DayPilot.re(n, DayPilot.touch.end, this.tc.onEventTouchEnd);
                    i.cssClass && DayPilot.Util.addClass(n, i.cssClass), this.showToolTip && !this.bubble && n.setAttribute("title", e.client.toolTip());
                    var a = document.createElement("div");
                    if (a.setAttribute("unselectable", "on"), a.className = o.A("_event_inner"), a.innerHTML = e.client.innerHTML(), i.fontColor && (a.style.color = i.fontColor), i.backColor && (a.style.background = i.backColor, (DayPilot.browser.ie9 || DayPilot.browser.ielt9) && (a.style.filter = "")), i.borderColor && (a.style.borderColor = i.borderColor), i.backgroundImage && (a.style.backgroundImage = "url(" + i.backgroundImage + ")", i.backgroundRepeat && (a.style.backgroundRepeat = i.backgroundRepeat)), n.appendChild(a), e.client.barVisible()) {
                        var r = e.part.height - 2,
                            l = 100 * e.part.barTop / r,
                            s = Math.ceil(100 * e.part.barHeight / r);
                        "PercentComplete" === this.durationBarMode && (l = 0, s = i.complete);
                        var d = document.createElement("div");
                        d.setAttribute("unselectable", "on"), d.className = this.A("_event_bar"), d.style.position = "absolute", i.barBackColor && (d.style.backgroundColor = i.barBackColor);
                        var c = document.createElement("div");
                        c.setAttribute("unselectable", "on"), c.className = this.A("_event_bar_inner"), c.style.top = l + "%", 0 < s && s <= 1 ? c.style.height = "1px" : c.style.height = s + "%", i.barColor && (c.style.backgroundColor = i.barColor), d.appendChild(c), n.appendChild(d)
                    }
                    if (i.areas) {
                        var h = DayPilot.Areas.copy(i.areas),
                            u = o.Ja[e.part.dayIndex];
                        h.forEach(function(t) {
                            t.start && (t.top = o.Fb(new DayPilot.Date(t.start), u.start).top - e.part.top - o.Gb()), t.end && (t.bottom = e.part.top + e.part.height - o.Fb(new DayPilot.Date(t.end), u.start).top - o.Gb())
                        }), e.client.deleteEnabled() && h.push({
                            "action": "JavaScript",
                            "v": "Hover",
                            "w": 17,
                            "h": 17,
                            "top": 2,
                            "right": 2,
                            "css": o.A("_event_delete"),
                            "js": function(e) {
                                o.cb(e)
                            }
                        }), DayPilot.Areas.attach(n, e, {
                            "areas": h
                        })
                    }
                    if (t.rows[0].cells[e.part.dayIndex]) {
                        if (t.rows[0].cells[e.part.dayIndex].events.appendChild(n), o.uc(n), n.event = e, o.multiselect.Wb(e) && o.multiselect.add(n.event, !0), o.Ha()) {
                            if ("function" == typeof o.onAfterEventRender) {
                                var f = {};
                                f.e = n.event, f.div = n, o.onAfterEventRender(f)
                            }
                        } else o.afterEventRender && o.afterEventRender(n.event, n)
                    }
                    o.elements.events.push(n)
                }, this.uc = function(e) {
                    for (var t = e && e.childNodes ? e.childNodes.length : 0, i = 0; i < t; i++) try {
                        var n = e.childNodes[i];
                        1 === n.nodeType && (n.setAttribute("unselectable", "on"), this.uc(n))
                    } catch (e) {}
                }, this.Da = function() {
                    for (var e = new Date, t = 0; t < this.Ja.length; t++) {
                        var i = this.Ja[t];
                        if (i.blocks)
                            for (var n = 0; n < i.blocks.length; n++)
                                for (var a = i.blocks[n], o = 0; o < a.lines.length; o++)
                                    for (var r = a.lines[o], l = 0; l < r.length; l++) {
                                        var s = r[l];
                                        if (s.part.width = 100 / a.lines.length, s.part.left = s.part.width * o, "Cascade" === this.eventArrangement) {
                                            var d = o === a.lines.length - 1;
                                            d || (s.part.width = 1.5 * s.part.width)
                                        }
                                        "Full" === this.eventArrangement && (s.part.left = s.part.left / 2, s.part.width = 100 - s.part.left), s.allday() || this.pc(s)
                                    }
                    }
                    this.multiselect.redraw();
                    var c = new Date;
                    c.getTime() - e.getTime()
                }, this.vc = function() {
                    this.multiselect.xb = [];
                    for (var e = 0; e < this.Ja.length; e++)
                        for (var t = this.Ja[e], i = 0; i < t.lines.length; i++)
                            for (var n = t.lines[i], a = 0; a < n.length; a++) {
                                var o = n[a];
                                o.part.width = 100 / t.lines.length, o.part.left = o.Width * i, o.allday() || this.pc(o)
                            }
                }, this.A = function(e) {
                    var t = this.theme || this.cssClassPrefix;
                    return t ? t + e : ""
                }, this.wc = function() {
                    switch (o.M) {
                        case "aspnet":
                            if (!this.W()) throw new DayPilot.Exception("ASP.NET WebForms environment required. https://doc.daypilot.org/common/asp-net-webforms-required/");
                            break;
                        case "netmvc":
                            if (!this.backendUrl) throw new DayPilot.Exception("DayPilot.Scheduler.backendUrl required. https://doc.daypilot.org/common/backendurl-required-asp-net-mvc/");
                            break;
                        case "javaxx":
                            if (!this.backendUrl) throw new DayPilot.Exception("DayPilot.Scheduler.backendUrl required. https://doc.daypilot.org/common/backendurl-required-java/")
                    }
                }, this.Ca = function() {
                    "hidden" === this.nav.top.style.visibility && (this.nav.top.style.visibility = "visible")
                }, this.xc = function() {
                    var e = this.Qa() + this.yc();
                    return o.debug.message("Getting totalHeight, headerHeight: " + this.Qa() + " scrollable: " + this.yc()), e < 0 ? 0 : e
                }, this.zc = function() {
                    if (this.nav.top.dp = this, this.nav.top.innerHTML = "", this.nav.top.style.MozUserSelect = "none", this.nav.top.style.KhtmlUserSelect = "none", this.nav.top.style.WebkitUserSelect = "none", this.nav.top.style.WebkitTapHighlightColor = "rgba(0,0,0,0)", this.nav.top.style.WebkitTouchCallout = "none", this.nav.top.style.position = "relative", this.width && (this.nav.top.style.width = this.width), this.rtl && (this.nav.top.style.direction = "rtl"), "Parent100Pct" === this.heightSpec ? this.nav.top.style.height = "100%" : this.nav.top.style.height = this.xc() + "px", this.hideUntilInit && (this.nav.top.style.visibility = "hidden"), this.visible || (this.nav.top.style.display = "none"), this.nav.scroll = document.createElement("div"), this.nav.scroll.style.height = this.yc() + "px", DayPilot.Util.addClass(this.nav.top, this.A("_main")), this.nav.scroll.style.position = "relative", this.showHeader) {
                        var e = this.Ac();
                        this.nav.top.appendChild(e)
                    }
                    this.nav.scroll.style.zoom = 1, this.nav.scroll.style.position = "absolute", this.nav.scroll.style.left = "0px", this.nav.scroll.style.right = "0px", this.nav.scroll.style.top = this.Qa() + "px", this.nav.scroll.className = o.A("_scroll");
                    var t = this.Bc();
                    this.nav.scrollable = t.firstChild, this.nav.scroll.appendChild(t), this.nav.top.appendChild(this.nav.scroll), this.nav.vsph = document.createElement("div"), this.nav.vsph.style.display = "none", this.nav.top.appendChild(this.nav.vsph), this.nav.scrollpos = document.createElement("input"), this.nav.scrollpos.type = "hidden", this.nav.scrollpos.id = o.id + "_scrollpos", this.nav.scrollpos.name = this.nav.scrollpos.id, this.nav.top.appendChild(this.nav.scrollpos), this.nav.select = document.createElement("input"), this.nav.select.type = "hidden", this.nav.select.id = o.id + "_select", this.nav.select.name = this.nav.select.id, this.nav.select.value = null, this.nav.top.appendChild(this.nav.select), this.nav.scrollLayer = document.createElement("div"), this.nav.scrollLayer.style.position = "absolute", this.nav.scrollLayer.style.top = "0px", this.nav.scrollLayer.style.left = "0px", this.nav.top.appendChild(this.nav.scrollLayer), this.nav.scrollUp = [], this.nav.scrollDown = [], this.nav.loading = document.createElement("div"), this.nav.loading.style.position = "absolute", this.nav.loading.style.top = "0px", this.nav.loading.style.left = this.hourWidth + 5 + "px", this.nav.loading.className = o.A("_loading"), this.nav.loading.innerHTML = this.loadingLabelText, this.nav.loading.style.display = "none", this.nav.top.appendChild(this.nav.loading)
                }, this.Cc = function() {
                    for (var e = "Fixed" === this.columnWidthSpec, t = this.nav.header && this.nav.header.rows[this.nav.header.rows.length - 1], i = this.nav.events.rows[0], n = 0; n < o.Ja.length; n++) {
                        var a = t && t.cells[n],
                            r = i.cells[n],
                            l = a && a.firstChild,
                            s = o.Ja[n];
                        if (e) {
                            var d = s.width ? s.width : o.columnWidth;
                            l && (l.style.width = d + "px"), r && (r.style.width = d + "px")
                        } else o.H || (l && (l.style.width = null), r && (r.style.width = null))
                    }
                }, this.Ra = function() {
                    return this.G ? o.nav.bottomRight : o.nav.scroll
                }, this.Aa = function() {
                    var e = "Fixed" === this.columnWidthSpec;
                    if (!e) {
                        var t = o.Ra();
                        "Fixed" === this.heightSpec ? t.style.overflowY = "scroll" : "BusinessHours" === this.heightSpec && this.Ka() <= this.businessEndsHour - this.businessBeginsHour ? t.style.overflow = "hidden" : "Full" !== this.heightSpec && "BusinessHoursNoScroll" !== this.heightSpec ? t.style.overflow = "auto" : t.style.overflow = "hidden"
                    }
                    if (e) {
                        var i = 0,
                            n = this.Ja.length * this.columnWidth;
                        n > o.Ob().clientWidth && (i = DayPilot.sw(o.nav.bottomRight)), o.nav.headerParent && (o.nav.headerParent.style.width = n + i + "px"), o.nav.main.style.width = n + "px", o.nav.events.style.width = n + "px", o.nav.crosshair.style.width = n + "px"
                    } else o.nav.headerParent && (o.nav.headerParent.style.width = "100%"), o.nav.main.style.width = "100%", o.nav.events.style.width = "100%", o.nav.crosshair.style.width = "100%";
                    this.Cc()
                }, this.xa = function() {
                    this.I ? this.Dc() : DayPilot.pu(this.nav.hourTable), this.nav.hoursPlaceholder && (this.nav.hoursPlaceholder.innerHTML = "", this.nav.hourTable = this.Ec(), this.nav.hoursPlaceholder.appendChild(this.nav.hourTable))
                }, this.Dc = function() {
                    if (this.nav.hourTable)
                        for (var e = 0; e < this.nav.hourTable.rows.length; e++) {
                            var t = this.nav.hourTable.rows[e],
                                i = t.cells[0].firstChild;
                            i.data = null, i.onmousemove = null, i.onmouseout = null
                        }
                }, this.Bc = function() {
                    var e = document.createElement("div");
                    e.style.zoom = 1, e.style.position = "relative", e.onmousemove = this.Fc, e.oncontextmenu = this.Gc, DayPilot.re(e, DayPilot.touch.start, this.tc.onMainTouchStart), DayPilot.re(e, DayPilot.touch.move, this.tc.onMainTouchMove), DayPilot.re(e, DayPilot.touch.end, this.tc.onMainTouchEnd), DayPilot.re(e, "contextmenu", function(e) {
                        var e = e || window.event;
                        e.preventDefault ? e.preventDefault() : e.returnValue = !1
                    }), navigator.msPointerEnabled && (e.style.msTouchAction = "none", e.style.touchAction = "none"), e.daypilotMainD = !0, e.calendar = this;
                    var t = null,
                        i = null;
                    if (this.showHours) {
                        var n = document.createElement("div");
                        n.style.cssFloat = "left", n.style.styleFloat = "left", n.style.width = this.hourWidth + "px", n.style.height = this.yc() + "px", n.style.overflow = "hidden", n.style.position = "relative", e.appendChild(n), t = n;
                        var a = 30,
                            r = o.Hc() + a;
                        i = document.createElement("div"), i.style.height = r + "px", n.appendChild(i)
                    }
                    var l = document.createElement("div");
                    l.style.height = this.yc() + "px", this.showHours && (l.style.marginLeft = this.hourWidth + "px"), l.style.position = "relative", l.style.overflow = "auto", e.appendChild(l), i && (this.nav.hourTable = this.Ec(), i.appendChild(this.nav.hourTable));
                    var s = document.createElement("div");
                    s.style.height = "0px", s.style.position = "relative", s.appendChild(this.Ic());
                    var d = document.createElement("div");
                    return d.style.position = "absolute", d.style.top = "0px", d.style.left = "0px", d.style.width = "100%", d.style.height = "0px", s.appendChild(d), this.nav.crosshair = d, s.appendChild(this.Jc()), l.appendChild(s), this.nav.grid = s, this.nav.zoom = e, this.nav.bottomLeft = t, this.nav.bottomRight = l, this.nav.hoursPlaceholder = i, e
                }, this.Ic = function() {
                    if (o.H) {
                        var e = document.createElement("div");
                        return o.nav.main = e, e
                    }
                    var t = document.createElement("table");
                    return t.cellPadding = "0", t.cellSpacing = "0", t.border = "0", "Fixed" === this.columnWidthSpec || (t.style.width = "100%"), t.style.border = "0px none", t.style.tableLayout = "fixed", this.nav.main = t, t
                }, this.Kc = function() {
                    if ("Fixed" === this.columnWidthSpec) {
                        for (var e = 0, t = 0; t < o.Ja.length; t++) {
                            var i = o.Ja[t];
                            e += i.width ? i.width : o.columnWidth
                        }
                        return e + "px"
                    }
                    return "100%"
                }, this.Jc = function() {
                    if (o.H) {
                        var e = document.createElement("div");
                        return e.style.userSelect = "none", e.style.position = "absolute", e.style.left = "0px", e.style.right = "0px", e.style.top = "0px", e.style.height = "0px", o.nav.events = e, e
                    }
                    var t = document.createElement("table");
                    t.style.position = "absolute", t.style.top = "0px", t.cellPadding = "0", t.cellSpacing = "0", t.border = "0", t.style.width = o.Kc(), t.style.border = "0px none", t.style.tableLayout = "fixed", this.nav.events = t;
                    for (var i = this.Ja, n = i.length, a = t.insertRow(-1), r = 0; r < n; r++) {
                        var l = a.insertCell(-1);
                        l.style.padding = "0px", l.style.border = "0px none", l.style.height = "0px", l.style.overflow = "visible", o.rtl || (l.style.textAlign = "left"), o.Lc(l)
                    }
                    return t
                }, this.Ec = function() {
                    var e = document.createElement("table");
                    e.cellSpacing = "0", e.cellPadding = "0", e.border = "0", e.style.border = "0px none", e.style.width = this.hourWidth + "px", e.oncontextmenu = function() {
                        return !1
                    }, e.onmousemove = function() {
                        o.ea()
                    };
                    for (var t = o.Mc(), i = 0; i < t; i++) this.Nc(e, i);
                    return e
                }, this.Mc = function() {
                    return this.La() / (60 * this.timeHeaderCellDuration * 1e3)
                }, this.Oc = function() {
                    return 60 * this.cellHeight / this.cellDuration / (60 / this.timeHeaderCellDuration)
                }, this.Pc = function() {
                    return (this.Pa() - this.Pa(!0)) * (60 / this.cellDuration)
                }, this.Qc = function() {
                    return this.Pa() - this.Pa(!0)
                }, this.Gb = function() {
                    return this.Pc() * this.cellHeight
                }, this.Nc = function(e, t) {
                    var i = o.Oc(),
                        n = e.insertRow(-1);
                    n.style.height = i + "px";
                    var a = n.insertCell(-1);
                    a.valign = "bottom", a.setAttribute("unselectable", "on"), a.style.padding = "0px", a.style.border = "0px none";
                    var r = document.createElement("div");
                    r.className = this.A("_rowheader"), r.style.position = "relative", r.style.width = this.hourWidth + "px", r.style.height = i + "px", r.style.overflow = "hidden", r.setAttribute("unselectable", "on");
                    var l = document.createElement("div");
                    l.className = this.A("_rowheader_inner"), l.setAttribute("unselectable", "on");
                    var s = o.Rc(t),
                        d = s.html,
                        c = s.data;
                    c && (r.data = c, r.onmousemove = o.Sc, r.onmouseout = o.Tc), l.innerHTML = d, r.appendChild(l), a.appendChild(r)
                }, this.Rc = function(e) {
                    var t, i;
                    if (this.hours) {
                        var n = e + this.Qc();
                        i = this.hours[n], t = i.html
                    }
                    var a, r = this.timeHeaderCellDuration,
                        l = this.startDate.addMinutes(r * e + 60 * this.Pa()),
                        s = l.getHours(),
                        d = s < 12;
                    if (a = "Clock12Hours" === this.Uc.timeFormat() ? d ? "AM" : "PM" : "00", !t) {
                        var c = document.createElement("div");
                        c.setAttribute("unselectable", "on"), "Clock12Hours" === this.Uc.timeFormat() && (s %= 12, 0 === s && (s = 12)), 60 !== this.timeHeaderCellDuration && (s += ":" + l.toString("mm")), c.innerHTML = s;
                        var h = document.createElement("span");
                        h.setAttribute("unselectable", "on"), h.className = this.A("_rowheader_minutes"), h.innerHTML = a, c.appendChild(h), t = c.outerHTML
                    }
                    if ("function" == typeof o.onBeforeTimeHeaderRender) {
                        var u = {};
                        u.header = {}, u.header.hours = s, u.header.minutes = l.getMinutes(), u.header.start = l.toString("HH:mm"), u.header.html = t, u.header.areas = i ? i.areas : null, u.header.time = new DayPilot.Duration(l.getTimePart()), o.onBeforeTimeHeaderRender(u), null !== u.header.html && (t = u.header.html), i = u.header
                    }
                    var f = {};
                    return f.start = l, f.hour = s, f.html = t, f.data = i, f.sup = a, f
                }, this.Sc = function(e) {
                    o.ea();
                    var t = this;
                    t.active || DayPilot.Areas.showAreas(t, t.data)
                }, this.Tc = function(e) {
                    DayPilot.Areas.hideAreas(this, e)
                }, this.yc = function() {
                    switch (this.heightSpec) {
                        case "Fixed":
                            return this.height;
                        case "Parent100Pct":
                            return this.height;
                        case "Full":
                            return this.Hc();
                        case "BusinessHours":
                        case "BusinessHoursNoScroll":
                            return this.Ma() * this.cellHeight * 60 / this.cellDuration;
                        default:
                            throw "DayPilot.Calendar: Unexpected 'heightSpec' value."
                    }
                }, this.Hc = function() {
                    return o.La() * this.cellHeight / (6e4 * o.cellDuration)
                }, this.Qa = function() {
                    if (!this.showHeader) return 0;
                    var e = this.headerLevels * l.headerHeight();
                    return this.showAllDayEvents && l.allDayHeaderHeight() ? e + l.allDayHeaderHeight() : e
                }, this.sa = function() {
                    if (this.headerHeightAutoFit) {
                        for (var e = 0, t = 0; t < this.nav.header.rows.length; t++)
                            for (var i = this.nav.header.rows[t], n = 0; n < i.cells.length; n++) {
                                var a = i.cells[n],
                                    o = a.firstChild,
                                    r = o.firstChild,
                                    l = o.style.height;
                                o.style.height = "auto", r.style.position = "static";
                                var s = o.offsetHeight;
                                o.style.height = l, r.style.position = "", e = Math.max(e, s)
                            }
                        e > this.headerHeight && (this.J.headerHeight = e, this.qa(), this.ra())
                    }
                }, this.Vc = function() {
                    var e = this.G ? o.nav.bottomRight : o.nav.scroll;
                    return DayPilot.sw(e) > 0
                }, this.Ac = function() {
                    var e = document.createElement("div"),
                        t = "Fixed" === this.columnWidthSpec;
                    t || (e.style.overflow = "auto"), e.style.position = "absolute", e.style.left = "0px", e.style.right = "0px";
                    var i = document.createElement("div");
                    i.style.position = "relative", i.style.zoom = "1";
                    var n = null,
                        t = "Fixed" === this.columnWidthSpec;
                    if (t || this.G) {
                        var a = document.createElement("div");
                        if (a.style.cssFloat = "left", a.style.styleFloat = "left", a.style.width = this.hourWidth + "px", this.showHours) {
                            var o = this.Wc();
                            this.nav.corner = o, a.appendChild(o), i.appendChild(a), this.nav.upperLeft = a
                        }
                        var r = document.createElement("div");
                        this.showHours && (r.style.marginLeft = this.hourWidth + "px"), r.style.position = "relative", r.style.overflow = "hidden", r.style.height = this.Qa() + "px", i.appendChild(r), this.nav.upperRight = r, n = document.createElement("div"), n.style.position = "relative", r.appendChild(n)
                    } else {
                        var l = document.createElement("table");
                        l.cellPadding = "0", l.cellSpacing = "0", l.border = "0", l.style.width = "100%", l.style.borderCollapse = "separate", l.style.border = "0px none";
                        var s = l.insertRow(-1);
                        if (this.nav.fullHeader = l, this.showHours) {
                            var d = s.insertCell(-1);
                            d.style.padding = "0px", d.style.border = "0px none";
                            var o = this.Wc();
                            d.appendChild(o), this.nav.corner = o
                        }
                        d = s.insertCell(-1), d.style.width = "100%", d.valign = "top", d.style.position = "relative", d.style.padding = "0px", d.style.border = "0px none", n = document.createElement("div"), n.style.position = "relative", n.style.height = this.Qa() + "px", n.style.overflow = "hidden", d.appendChild(n), this.nav.mid = n, i.appendChild(l)
                    }
                    this.nav.headerParent = n, this.nav.headerParent.onmousemove = function(e) {
                        e.insideMainD = !0
                    }, this.Xc();
                    var c = this.Vc(),
                        t = "Fixed" === this.columnWidthSpec;
                    return c && !t && this.Yc(), e.appendChild(i), e
                }, this.Xc = function() {
                    if (this.nav.unifiedCornerRight = null, o.H) this.nav.header = document.createElement("div"), this.nav.header.style.position = "relative";
                    else {
                        this.nav.header = document.createElement("table"), this.nav.header.cellPadding = "0", this.nav.header.cellSpacing = "0";
                        "Fixed" === this.columnWidthSpec || (this.nav.header.width = "100%"), this.nav.header.style.tableLayout = "fixed", this.nav.header.oncontextmenu = function() {
                            return !1
                        }
                    }
                    this.nav.header.setAttribute("dp-id", "header"), this.nav.headerParent.appendChild(this.nav.header), this.nav.allday && DayPilot.de(this.nav.allday);
                    var e = document.createElement("div");
                    e.style.position = "absolute", e.style.top = "0px", e.style.height = "0px", e.setAttribute("dp-id", "allday"), "Fixed" === this.columnWidthSpec ? e.style.width = this.Ja.length * this.columnWidth + "px" : (e.style.left = "0px", e.style.right = "0px"), this.nav.allday = e, this.nav.headerParent.appendChild(e)
                }, this.Yc = function() {
                    if (this.nav.fullHeader) {
                        var e = this.nav.fullHeader.rows[0],
                            t = e.insertCell(-1);
                        t.style.padding = "0px", t.style.verticalAlign = "top", t.setAttribute("unselectable", "on");
                        var i = document.createElement("div");
                        i.setAttribute("unselectable", "on"), i.className = this.A("_cornerright"), i.style.overflow = "hidden", i.style.position = "relative", i.style.width = "16px", i.style.height = this.Qa() + "px";
                        var n = document.createElement("div");
                        n.className = this.A("_cornerright_inner"), i.appendChild(n), t.appendChild(i), this.nav.cornerRight = i
                    }
                }, this.Wc = function() {
                    var e = document.createElement("div");
                    e.style.position = "relative", e.className = this.A("_corner"), e.style.width = this.hourWidth + "px", e.style.height = this.Qa() + "px", e.style.overflow = "hidden", e.oncontextmenu = function() {
                        return !1
                    };
                    var t = document.createElement("div");
                    t.className = this.A("_corner_inner"), t.setAttribute("unselectable", "on"), e.appendChild(t);
                    var i = document.createElement("div");
                    // Marca de DEMO \u0044\u0045" + "\u004D\u004F
                    return i.style.position = "absolute", i.style.padding = "2px", i.style.top = "0px", i.style.left = "1px", i.style.backgroundColor = "#F3F3F3", i.style.color = "white", i.innerHTML = "", i.setAttribute("unselectable", "on"), DayPilot.Util.isNullOrUndefined(undefined) && e.appendChild(i), e
                }, this.Z = function() {
                    var e = this.nav.main;
                    e.root = null, e.onmouseup = null;
                    for (var t = 0; t < e.rows.length; t++)
                        for (var i = e.rows[t], n = 0; n < i.cells.length; n++) {
                            var a = i.cells[n];
                            a.root = null, a.onmousedown = null, a.onmousemove = null, a.onmouseout = null, a.onmouseup = null, a.onclick = null, a.ondblclick = null, a.oncontextmenu = null
                        }
                    this.I || DayPilot.pu(e)
                }, this.ta = function() {
                    for (var e = 0; this.nav.scrollUp && e < this.nav.scrollUp.length; e++) this.nav.scrollLayer.removeChild(this.nav.scrollUp[e]);
                    for (var e = 0; this.nav.scrollDown && e < this.nav.scrollDown.length; e++) this.nav.scrollLayer.removeChild(this.nav.scrollDown[e]);
                    this.nav.scrollUp = [], this.nav.scrollDown = []
                }, this.Lc = function(e) {
                    var t = document.createElement("div");
                    t.style.marginRight = o.columnMarginRight + "px", t.style.position = "relative", t.style.height = "1px", t.style.marginTop = "-1px", e.events = t;
                    var i = document.createElement("div");
                    i.style.position = "relative", i.style.height = "1px", i.style.marginTop = "-1px", e.separators = i;
                    var n = document.createElement("div");
                    n.style.position = "relative", n.style.height = "1px", n.style.marginTop = "-1px", e.selection = n, e.appendChild(i), e.appendChild(n), e.appendChild(t)
                }, this.wa = function() {
                    o.H ? o.Zc() : o.$c()
                }, this._c = function() {
                    if (this.scrollLabelsVisible)
                        for (var e = this.Ja, t = this.showHours ? this.hourWidth : 0, i = (this.nav.scroll.clientWidth - t) / e.length, n = 0; n < e.length; n++) {
                            var a = document.createElement("div");
                            a.style.position = "absolute", a.style.top = "0px", a.style.left = t + 2 + n * i + i / 2 + "px", a.style.display = "none";
                            var o = document.createElement("div");
                            o.style.height = "10px", o.style.width = "10px", o.className = this.A("_scroll_up"), a.appendChild(o), this.nav.scrollLayer.appendChild(a), this.nav.scrollUp.push(a);
                            var r = document.createElement("div");
                            r.style.position = "absolute", r.style.top = "0px", r.style.left = t + 2 + n * i + i / 2 + "px", r.style.display = "none";
                            var o = document.createElement("div");
                            o.style.height = "10px", o.style.width = "10px", o.className = this.A("_scroll_down"), r.appendChild(o), this.nav.scrollLayer.appendChild(r), this.nav.scrollDown.push(r)
                        }
                }, this.ad = function() {
                    var e = this.nav.events;
                    e.innerHTML = "", e.rows = [{
                        "cells": []
                    }], o.bd().forEach(function(t, i) {
                        var n = document.createElement("div");
                        n.style.height = "1px", n.style.overflow = "visible", n.style.position = "absolute", n.style.left = t.left + t.unit, n.style.width = t.width + t.unit, o.Lc(n), e.appendChild(n), e.rows[0].cells.push(n)
                    })
                }, this.bd = function() {
                    function e(e) {
                        return DayPilot.browser.ie || DayPilot.browser.edge ? Math.floor(100 * e) / 100 : e
                    }
                    var t = o.Ja,
                        i = "Fixed" === this.columnWidthSpec,
                        n = 0;
                    return DayPilot.list.for(t.length, function(a) {
                        var r = {},
                            l = 0,
                            s = "";
                        return i ? (s = "px", l = t[a].width ? t[a].width : o.columnWidth) : (s = "%", l = e(100 / t.length)), r.left = n, r.width = l, r.unit = s, n += l, r
                    })
                }, this.Zc = function() {
                    var e = (this.nav.main, 60 * this.cellDuration * 1e3),
                        i = this.Ta(),
                        n = (this.Qc() * (60 / this.cellDuration), o.Ja);
                    ! function() {
                        o.elements.cells = [], o.nav.main.innerHTML = "", o.nav.main.rows = []
                    }(), this.nav.scrollable.daypilotMainD = !0, this.nav.scrollable.calendar = this, o._c();
                    n.length;
                    o.ad();
                    for (var a = o.bd(), r = 0; r < i; r++) {
                        var l = r * o.cellHeight;
                        o.nav.main.rows.push({
                            "cells": []
                        });
                        for (var s = 0; s < n.length; s++) {
                            var d = a[s],
                                c = this.Ja[s],
                                h = document.createElement("div");
                            h.style.position = "absolute", h.style.left = d.left + d.unit, h.style.width = d.width + d.unit, h.style.top = l + "px", h.start = c.start.addTime(r * e).addHours(this.Pa()), h.end = h.start.addTime(e), h.resource = c.id, h.data = {}, h.data.x = s, h.data.y = r, h.data.start = h.start, h.data.end = h.end, h.data.resource = h.resource, h.data.calendar = o, this.cellProperties || (this.cellProperties = {});
                            var u = {};
                            u.resource = h.resource, u.start = h.start, u.end = h.end;
                            var f = s + "_" + r;
                            if (u.cssClass = null, u.html = null, u.backImage = null, u.backRepeat = null, u.backColor = null, u.business = this.cd(h.start, h.end), this.cellProperties[f] && DayPilot.Util.copyProps(this.cellProperties[f], u, ["cssClass", "html", "backImage", "backRepeat", "backColor", "business", "areas", "disabled"]), "function" == typeof this.onBeforeCellRender) {
                                var v = {};
                                v.cell = u, this.onBeforeCellRender(v)
                            }
                            this.cellProperties[f] = u;
                            var p, m = o.dd(s, r);
                            h.root = this, h.setAttribute("unselectable", "on"), p = document.createElement("div"), p.className = o.A("_cell"), p.style.position = "relative", p.style.height = o.cellHeight + "px", p.style.overflow = "hidden", p.setAttribute("unselectable", "on");
                            var g = document.createElement("div");
                            g.className = o.A("_cell_inner"), p.appendChild(g), h.appendChild(p), h.onmousedown = this.Bb, h.onmousemove = this.Lb, h.onmouseout = this.Kb, DayPilot.re(h, DayPilot.touch.end, this.tc.onCellTouchEnd), h.oncontextmenu = function() {
                                return this.selected || (o.clearSelection(), t.column = t.getColumn(this), o.selectedCells.push(this), t.firstSelected = this, t.topSelectedCell = this, t.bottomSelectedCell = this, o.Cb()), "Disabled" === o.timeRangeRightClickHandling, !1
                            };
                            var y = o.ed(s, r);
                            p = h.firstChild;
                            "Fixed" === this.columnWidthSpec && (c.width ? p.style.width = c.width + "px" : p.style.width = this.columnWidth + "px"), y && (p.firstChild.style.background = y);
                            (m ? m.business : this.cd(h.start, h.end)) && DayPilot.Util.addClass(p, o.A("_cell_business"));
                            var b = p.firstChild;
                            if (b && (b.innerHTML = ""), p.style.backgroundImage = "", p.style.backgroundRepeat = "", m && (m.html && (b.innerHTML = m.html), m.cssClass && DayPilot.Util.addClass(p, m.cssClass), m.backImage && (p.style.backgroundImage = "url('" + m.backImage + "')"), m.backRepeat && (p.style.backgroundRepeat = m.backRepeat), m.areas)) {
                                var w = {};
                                w.start = h.start, w.end = h.end, w.resource = h.resource;
                                var D = DayPilot.list(m.areas).filter(function(e) {
                                    return !(e.end && new DayPilot.Date(e.end) <= h.start) && !(e.start && new DayPilot.Date(e.start) >= h.end)
                                });
                                D.forEach(function(e) {
                                    if (e.start || e.end) {
                                        if (e.start) {
                                            var t = new DayPilot.Date(e.start).getTime() - h.start.getTime();
                                            e.top = o.fd(t)
                                        }
                                        if (e.end) {
                                            var i = new DayPilot.Date(e.end).getTime() - h.start.getTime();
                                            e.height = o.fd(i) - e.top
                                        }
                                    }
                                }), DayPilot.Areas.attach(p, w, {
                                    "areas": D
                                })
                            }
                            o.nav.main.appendChild(h), o.nav.main.rows[r].cells.push(h)
                        }
                    }
                }, this.$c = function() {
                    var e = this.nav.main,
                        i = 60 * this.cellDuration * 1e3,
                        n = this.Ta(),
                        a = (this.Qc() * (60 / this.cellDuration), o.Ja),
                        r = 0;
                    if (e && (r = o.Ob().scrollTop, this.Z(), o.N.ielt9)) {
                        DayPilot.de(this.nav.scrollable.parentNode);
                        var l = this.Bc();
                        this.gd(), this.nav.scrollable = l.firstChild, this.nav.scroll.appendChild(l), e = this.nav.main
                    }
                    for (this.nav.scrollable.daypilotMainD = !0, this.nav.scrollable.calendar = this; e && e.rows && e.rows.length > 0;) this.I || DayPilot.pu(e.rows[0]), e.deleteRow(0);
                    if (this.hd = !0, this.scrollLabelsVisible)
                        for (var a = this.Ja, s = this.showHours ? this.hourWidth : 0, d = (this.nav.scroll.clientWidth - s) / a.length, c = 0; c < a.length; c++) {
                            var h = document.createElement("div");
                            h.style.position = "absolute", h.style.top = "0px", h.style.left = s + 2 + c * d + d / 2 + "px", h.style.display = "none";
                            var u = document.createElement("div");
                            u.style.height = "10px", u.style.width = "10px", u.className = this.A("_scroll_up"), h.appendChild(u), this.nav.scrollLayer.appendChild(h), this.nav.scrollUp.push(h);
                            var f = document.createElement("div");
                            f.style.position = "absolute", f.style.top = "0px", f.style.left = s + 2 + c * d + d / 2 + "px", f.style.display = "none";
                            var u = document.createElement("div");
                            u.style.height = "10px", u.style.width = "10px", u.className = this.A("_scroll_down"), f.appendChild(u), this.nav.scrollLayer.appendChild(f), this.nav.scrollDown.push(f)
                        }
                    var v = a.length;
                    if (this.cssOnly || this.E) {
                        for (var p = this.nav.events; p && p.rows && p.rows.length > 0;) this.I || DayPilot.pu(p.rows[0]), p.deleteRow(0);
                        for (var m = p.insertRow(-1), g = 0; g < v; g++) {
                            var y = m.insertCell(-1);
                            y.style.padding = "0px", y.style.border = "0px none", y.style.height = "1px", y.style.overflow = "visible";
                            var b = "Fixed" === this.columnWidthSpec;
                            b && (a[g].width ? y.style.width = a[g].width + "px" : y.style.width = this.columnWidth + "px"), o.rtl || (y.style.textAlign = "left"), o.Lc(y)
                        }
                    }
                    for (var c = 0; c < n; c++) {
                        var m = e.insertRow(-1),
                            w = c;
                        m.style.MozUserSelect = "none", m.style.KhtmlUserSelect = "none", m.style.WebkitUserSelect = "none";
                        for (var g = 0; g < v; g++) {
                            var D = this.Ja[g],
                                y = m.insertCell(-1);
                            y.start = D.start.addTime(w * i).addHours(this.Pa()), y.end = y.start.addTime(i), y.resource = D.id, this.cellProperties || (this.cellProperties = {});
                            var k = {};
                            k.resource = y.resource, k.start = y.start, k.end = y.end;
                            var P = g + "_" + w;
                            if (k.cssClass = null, k.html = null, k.backImage = null, k.backRepeat = null,
                                k.backColor = null, k.business = this.cd(y.start, y.end), this.cellProperties[P] && DayPilot.Util.copyProps(this.cellProperties[P], k, ["cssClass", "html", "backImage", "backRepeat", "backColor", "business", "areas", "disabled"]), "function" == typeof this.onBeforeCellRender) {
                                var x = {};
                                x.cell = k, this.onBeforeCellRender(x)
                            }
                            this.cellProperties[P] = k;
                            var C, A = o.dd(g, w);
                            y.root = this, y.setAttribute("unselectable", "on"), C = document.createElement("div"), C.className = o.A("_cell"), C.style.position = "relative", C.style.height = o.cellHeight + "px", C.style.overflow = "hidden", C.setAttribute("unselectable", "on");
                            var S = document.createElement("div");
                            S.className = o.A("_cell_inner"), C.appendChild(S), y.appendChild(C), y.onmousedown = this.Bb, y.onmousemove = this.Lb, y.onmouseout = this.Kb, DayPilot.re(y, DayPilot.touch.end, this.tc.onCellTouchEnd), y.oncontextmenu = function() {
                                return this.selected || (o.clearSelection(), t.column = t.getColumn(this), o.selectedCells.push(this), t.firstSelected = this, t.topSelectedCell = this, t.bottomSelectedCell = this, o.Cb()), "Disabled" === o.timeRangeRightClickHandling, !1
                            };
                            var E = o.ed(g, w);
                            C = y.firstChild;
                            var b = "Fixed" === this.columnWidthSpec;
                            b && (D.width ? C.style.width = D.width + "px" : C.style.width = this.columnWidth + "px"), E && (C.firstChild.style.background = E);
                            (A ? A.business : this.cd(y.start, y.end)) && DayPilot.Util.addClass(C, o.A("_cell_business"));
                            var T = C.firstChild;
                            if (T && (T.innerHTML = ""), C.style.backgroundImage = "", C.style.backgroundRepeat = "", A && (A.html && (T.innerHTML = A.html), A.cssClass && DayPilot.Util.addClass(C, A.cssClass), A.backImage && (C.style.backgroundImage = "url('" + A.backImage + "')"), A.backRepeat && (C.style.backgroundRepeat = A.backRepeat), A.areas)) {
                                var H = {};
                                H.start = y.start, H.end = y.end, H.resource = y.resource;
                                var M = DayPilot.list(A.areas).filter(function(e) {
                                    return !(e.end && new DayPilot.Date(e.end) <= y.start) && !(e.start && new DayPilot.Date(e.start) >= y.end)
                                });
                                M.forEach(function(e) {
                                    if (e.start || e.end) {
                                        if (e.start) {
                                            var t = new DayPilot.Date(e.start).getTime() - y.start.getTime();
                                            e.top = o.fd(t)
                                        }
                                        if (e.end) {
                                            var i = new DayPilot.Date(e.end).getTime() - y.start.getTime();
                                            e.height = o.fd(i) - e.top
                                        }
                                    }
                                }), DayPilot.Areas.attach(C, H, {
                                    "areas": M
                                })
                            }
                        }
                    }
                    e.onmouseup = this.Mb, e.root = this, e.style.height = n * o.cellHeight + "px", o.nav.scrollable.style.display = "", o.Ob().scrollTop = r
                }, this.Gc = function(e) {
                    if (!r.detected) {
                        var t = o.getSelection();
                        if (t) {
                            var i = {};
                            if (i.start = t.start, i.end = t.end, i.resource = t.resource, i.preventDefault = function() {
                                    this.preventDefault.value = !0
                                }, "function" == typeof o.onTimeRangeRightClick && (o.onTimeRangeRightClick(i), i.preventDefault.value)) return !1;
                            "ContextMenu" === o.timeRangeRightClickHandling && o.contextMenuSelection && o.contextMenuSelection.show(o.getSelection()), "function" == typeof o.onTimeRangeRightClicked && o.onTimeRangeRightClicked(i)
                        }
                    }
                }, this.cd = function(e, t) {
                    return this.businessBeginsHour < this.businessEndsHour ? !(e.getHours() < this.businessBeginsHour || e.getHours() >= this.businessEndsHour || 6 === e.getDayOfWeek() || 0 === e.getDayOfWeek()) : e.getHours() >= this.businessBeginsHour || e.getHours() < this.businessEndsHour
                }, this.Fc = function(e) {
                    e = e || window.event, e.insideMainD = !0, window.event && window.event.srcElement && (window.event.srcElement.inside = !0), t.activeCalendar = this;
                    var i = o.nav.main;
                    o.coords = DayPilot.mo3(i, e);
                    var n = DayPilot.mc(e),
                        a = o.crosshairType && "Disabled" !== o.crosshairType;
                    if (DayPilot.Global.moving || DayPilot.Global.resizing || DayPilot.Global.selecting ? o.ea() : a && o.jd(), DayPilot.Global.resizing) o.kd(n);
                    else if (DayPilot.Global.moving) {
                        if (!DayPilot.Global.moving.helper) return void(t.movingShadow = null);
                        if (!t.movingShadow) {
                            var r = 3;
                            if (!(DayPilot.distance(n, t.originalMouse) > r)) return;
                            t.movingShadow = o.Ia(DayPilot.Global.moving, !o.N.ie), t.movingShadow.style.width = t.movingShadow.parentNode.offsetWidth + 1 + "px"
                        }
                        if (!o.coords) return;
                        var s = o.cellHeight,
                            d = 0,
                            c = t.moveOffsetY;
                        c || (c = s / 2), "Top" === this.moveBy && (c = 0);
                        var h = Math.floor((o.coords.y - c - d + s / 2) / s) * s + d;
                        h < d && (h = d);
                        var u = o.nav.main,
                            f = o.H ? o.Ta() * o.cellHeight : u.clientHeight,
                            v = parseInt(t.movingShadow.style.height);
                        h + v > f && (h = f - v);
                        var p = u.clientWidth / u.rows[0].cells.length,
                            m = Math.floor(o.coords.x / p);
                        m < 0 && (m = 0), o.rtl && (m = o.Ja.length - m - 1);
                        var g = t.movingShadow,
                            y = DayPilot.Global.moving.event,
                            b = o.kb(y, m, h),
                            w = o.eventMovingStartEndFormat;
                        "Auto" === w && (w = "Clock24Hours" === l.timeFormat() ? "H:mm" : "h:mm tt");
                        var D = {};
                        D.e = y, D.start = b.start, D.end = b.end, D.resource = b.resource, D.html = null, D.cssClass = null, D.allowed = !0, D.top = {}, D.top.width = null, D.top.space = 5, D.top.html = D.start.toString(w, l.locale()), D.top.enabled = o.eventMovingStartEndEnabled, D.bottom = {}, D.bottom.width = null, D.bottom.space = 5, D.bottom.html = D.end.toString(w, l.locale()), D.bottom.enabled = o.eventMovingStartEndEnabled,
                            function() {
                                var e = o.fa;
                                if (!(e && e.start.getTime() === b.start.getTime() && e.end.getTime() === b.end.getTime() && e.resource === b.resource)) {
                                    if (g.className = o.A("_shadow"), g.firstChild.innerHTML = "", o.fa = D, g.args = D, !o.allowEventOverlap) {
                                        var i = {
                                            "id": y.id(),
                                            "start": D.start,
                                            "end": D.end,
                                            "resource": D.resource
                                        };
                                        o.events.Db(i) && (DayPilot.Util.addClass(g, o.A("_shadow_forbidden")), D.allowed = !1)
                                    }
                                    o.Eb(D.start, D.end, D.resource) && (DayPilot.Util.addClass(g, o.A("_shadow_forbidden")), D.allowed = !1), DayPilot.Util.removeClass(g, o.A("_shadow_forbidden")), "function" == typeof o.onEventMoving && D.allowed && o.onEventMoving(D), D.html && (g.firstChild.innerHTML = D.html), D.cssClass && DayPilot.Util.addClass(g, D.cssClass), D.allowed || DayPilot.Util.addClass(g, o.A("_shadow_forbidden")), t.movingShadow.style.top = h + "px";
                                    var n = o.nav.events;
                                    m < n.rows[0].cells.length && m >= 0 && t.movingShadow.column !== m && (t.movingShadow.column = m, t.moveShadow(n.rows[0].cells[m]));
                                    var a = m,
                                        r = g;
                                    o.Ib(r, a, D)
                                }
                            }()
                    } else if (t.firstMousePos) {
                        var k = o.ld(o.coords.x),
                            P = Math.floor(o.coords.y / o.cellHeight),
                            x = o.nav.main.rows[P].cells[k];
                        if (!DayPilot.Global.selecting) {
                            var C = t.firstMousePos,
                                A = o.coords;
                            C.x === A.x && C.y === A.y || (DayPilot.Global.selecting = {
                                "calendar": o
                            })
                        }
                        if (!DayPilot.Global.selecting) return;
                        var n = o.coords,
                            S = t.getColumn(x);
                        S !== t.column && (x = o.nav.main.rows[P].cells[t.column]);
                        var E = DayPilot.Global.selecting;
                        if (E.last && E.last.x === k && E.last.y === P) return;
                        E.last = {
                            "x": k,
                            "y": P
                        }, n.y < t.firstMousePos.y ? (o.selectedCells = t.getCellsBelow(x), t.topSelectedCell = o.selectedCells[0], t.bottomSelectedCell = t.firstSelected) : (o.selectedCells = t.getCellsAbove(x), t.topSelectedCell = t.firstSelected, t.bottomSelectedCell = o.selectedCells[0]), o.Cb()
                    }
                    if (t.drag) {
                        if (t.gShadow && document.body.removeChild(t.gShadow), t.gShadow = null, !t.movingShadow && o.coords) {
                            var g = o.Ia(t.drag, !1);
                            if (g) {
                                t.movingShadow = g;
                                var A = DayPilot.Date.today(),
                                    e = {
                                        "id": t.drag.id,
                                        "start": A,
                                        "end": A.addSeconds(t.drag.duration),
                                        "text": t.drag.text
                                    },
                                    T = t.drag.data;
                                if (T) {
                                    var H = ["duration", "element", "remove", "id", "text"];
                                    for (var M in T) DayPilot.contains(H, M) || (e[M] = T[M])
                                }
                                var _ = new DayPilot.Event(e, o);
                                _.external = !0, DayPilot.Global.moving = {}, DayPilot.Global.moving.event = _, DayPilot.Global.moving.helper = {}
                            }
                        }
                        e.cancelBubble = !0
                    }
                }, this.md = function(e) {
                    t.movingShadow.offsetTop, DayPilot.Global.moving.event, t.movingShadow.column
                }, this.Eb = function(e, t, i) {
                    return o.nd(e, t, i).some(function(e) {
                        return e.disabled
                    })
                }, this.nd = function(e, t, i) {
                    var n = [];
                    for (var a in o.cellProperties) {
                        var r = o.cellProperties[a];
                        (!i || i === r.resource) && DayPilot.Util.overlaps(e, t, r.start, r.end) && n.push(r)
                    }
                    return n
                }, this.kd = function(e) {
                    if (!DayPilot.Global.resizing.event) return DayPilot.Global.resizing = null, DayPilot.de(t.resizingShadow), void(t.resizingShadow = null);
                    t.resizingShadow || (t.resizingShadow = o.Ia(DayPilot.Global.resizing, !1));
                    var i = DayPilot.Global.resizing.event.calendar.cellHeight,
                        n = 0,
                        a = e.y - t.originalMouse.y,
                        r = DayPilot.Global.resizing.event,
                        s = r.start(),
                        d = r.end();
                    if ("bottom" === DayPilot.Global.resizing.dpBorder) {
                        var c = Math.floor((t.originalHeight + t.originalTop + a + i / 2) / i) * i - t.originalTop + n;
                        c < i && (c = i);
                        var h = o.H ? o.Ta() * o.cellHeight : o.nav.main.clientHeight;
                        t.originalTop + c > h && (c = h - t.originalTop), t.resizingShadow.style.height = c + "px", d = o.gb(r, t.originalTop + c)
                    } else if ("top" === DayPilot.Global.resizing.dpBorder) {
                        var u = Math.floor((t.originalTop + a - n + i / 2) / i) * i + n;
                        u < n && (u = n), u > t.originalTop + t.originalHeight - i && (u = t.originalTop + t.originalHeight - i);
                        var c = t.originalHeight - (u - t.originalTop);
                        c < i ? c = i : t.resizingShadow.style.top = u + "px", t.resizingShadow.style.height = c + "px", s = o.fb(r, u)
                    }
                    var f = t.resizingShadow,
                        v = o.eventResizingStartEndFormat;
                    "Auto" === v && (v = "Clock24Hours" === l.timeFormat() ? "H:mm" : "h:mm tt");
                    var p = {};
                    if (p.start = s, p.end = d, p.resource = r.resource(), p.allowed = !0, p.html = null, p.cssClass = null, p.top = {}, p.top.width = null, p.top.space = 5, p.top.html = p.start.toString(v, l.locale()), p.top.enabled = o.eventResizingStartEndEnabled, p.bottom = {}, p.bottom.width = null, p.bottom.space = 5, p.bottom.html = p.end.toString(v, l.locale()), p.bottom.enabled = o.eventResizingStartEndEnabled, f.args = p, f.firstChild.innerHTML = "", f.className = o.A("_shadow"), !o.allowEventOverlap) {
                        var m = {
                            "id": r.id(),
                            "start": p.start,
                            "end": p.end,
                            "resource": p.resource
                        };
                        o.events.Db(m) && (DayPilot.Util.addClass(f, o.A("_shadow_forbidden")), p.allowed = !1)
                    }
                    o.Eb(p.start, p.end, p.resource) && (DayPilot.Util.addClass(f, o.A("_shadow_forbidden")), p.allowed = !1), "function" == typeof o.onEventResizing && p.allowed && o.onEventResizing(p), p.html && (f.firstChild.innerHTML = p.html), p.cssClass && DayPilot.Util.addClass(f, p.cssClass);
                    var g = r.part.dayIndex,
                        y = f;
                    o.Ib(y, g, p)
                }, this.temp = {}, this.temp.getPosition = function() {
                    var e = o.od.getCellCoords();
                    if (!e) return null;
                    var t = o.Ja[e.x],
                        i = {};
                    return i.resource = t.id, i.start = new DayPilot.Date(t.start).addHours(o.Pa(!0)).addMinutes(e.y * o.cellDuration), i.end = i.start.addMinutes(o.cellDuration), i
                }, this.od = {}, this.od.getCellCoords = function() {
                    var e = {};
                    if (e.x = 0, e.y = 0, !o.coords) return null;
                    for (var t = o.nav.main, i = o.coords.x, n = 0, a = this.col(t, n); a && i > a.left;) n += 1, a = this.col(t, n);
                    e.x = n - 1;
                    var r = 0,
                        l = Math.floor((o.coords.y - r) / o.cellHeight);
                    return e.y = l, e.x < 0 ? null : e
                }, this.od.col = function(e, t) {
                    var i = {};
                    if (i.left = 0, i.width = 0, !e) return null;
                    if (!e.rows) return null;
                    if (0 === e.rows.length) return null;
                    if (0 == e.rows[0].cells.length) return null;
                    var n = e.rows[0].cells[t];
                    if (!n) return null;
                    var a = DayPilot.abs(e),
                        o = DayPilot.abs(n);
                    return i.left = o.x - a.x, i.width = n.offsetWidth, i
                }, this.jd = function() {
                    this.ea(), this.elements.crosshair || (this.elements.crosshair = []);
                    var e = this.od.getCellCoords();
                    if (e) {
                        var t = e.x,
                            i = Math.floor(e.y / (60 / o.cellDuration) * (60 / o.timeHeaderCellDuration));
                        if (!(i < 0)) {
                            if (this.nav.hourTable) {
                                if (i >= this.nav.hourTable.rows.length) return;
                                var n = document.createElement("div");
                                n.style.position = "absolute", n.style.left = "0px", n.style.right = "0px", n.style.top = "0px", n.style.bottom = "0px", n.className = o.A("_crosshair_left"), this.nav.hourTable.rows[i].cells[0].firstChild.appendChild(n), this.elements.crosshair.push(n)
                            }
                            if (this.nav.header) {
                                var a = document.createElement("div");
                                a.style.position = "absolute", a.style.left = "0px", a.style.right = "0px", a.style.top = "0px", a.style.bottom = "0px", a.className = o.A("_crosshair_top");
                                var r = this.nav.header.rows[this.headerLevels - 1];
                                r.cells[t] && (r.cells[t].firstChild.appendChild(a), this.elements.crosshair.push(a))
                            }
                            if ("Header" !== this.crosshairType) {
                                var l = this.nav.crosshair,
                                    s = 0,
                                    d = Math.floor((o.coords.y - s) / o.cellHeight) * o.cellHeight + s,
                                    c = o.cellHeight,
                                    h = document.createElement("div");
                                h.style.position = "absolute", h.style.left = "0px", h.style.right = "0px", h.style.top = d + "px", h.style.height = c + "px", h.className = o.A("_crosshair_horizontal"), h.onmousedown = this.pd, l.appendChild(h), this.elements.crosshair.push(h);
                                var u = this.od.col(this.nav.main, t);
                                if (c = o.Hc(), u) {
                                    var f = document.createElement("div");
                                    f.style.position = "absolute", f.style.left = u.left + "px", f.style.width = u.width + "px", f.style.top = "0px", f.style.height = c + "px", f.className = o.A("_crosshair_vertical"), f.onmousedown = this.pd, l.appendChild(f), this.elements.crosshair.push(f)
                                }
                            }
                        }
                    }
                }, this.pd = function(e) {
                    o.ea();
                    var t = o.od.getCellCoords(),
                        i = 0,
                        n = o.nav.main.rows[t.y + i].cells[t.x];
                    o.Bb.apply(n, [e])
                }, this.ea = function() {
                    if (this.elements.crosshair && 0 !== this.elements.crosshair.length) {
                        for (var e = 0; e < this.elements.crosshair.length; e++) {
                            var t = this.elements.crosshair[e];
                            t && t.parentNode && t.parentNode.removeChild(t)
                        }
                        this.elements.crosshair = []
                    }
                }, this.oa = function() {
                    if (this.cellConfig) {
                        var e = this.cellConfig;
                        if (e.vertical)
                            for (var t = 0; t < e.x; t++)
                                for (var i = this.cellProperties[t + "_0"], n = 1; n < e.y; n++) this.cellProperties[t + "_" + n] = i;
                        if (e.horizontal)
                            for (var n = 0; n < e.y; n++)
                                for (var i = this.cellProperties["0_" + n], t = 1; t < e.x; t++) this.cellProperties[t + "_" + n] = i;
                        if (e["default"])
                            for (var i = e["default"], n = 0; n < e.y; n++)
                                for (var t = 0; t < e.x; t++) this.cellProperties[t + "_" + n] || (this.cellProperties[t + "_" + n] = i)
                    }
                }, this.dd = function(e, t) {
                    return this.cellProperties ? this.cellProperties[e + "_" + t] : null
                }, this.qd = function(e, t) {
                    var i = e + "_" + t;
                    return !(!this.cellProperties || !this.cellProperties[i]) && this.cellProperties[i].business
                }, this.ed = function(e, t) {
                    var i = e + "_" + t;
                    return this.cellProperties && this.cellProperties[i] ? this.cellProperties[i].backColor : null
                }, this._ = function() {
                    var e = this.nav.header;
                    if (e && e.rows)
                        for (var t = 0; t < e.rows.length; t++)
                            for (var i = e.rows[t], n = 0; n < i.cells.length; n++) {
                                var a = i.cells[n];
                                a.onclick = null, a.onmousemove = null, a.onmouseout = null
                            }
                    this.I || DayPilot.pu(e)
                }, this.rd = function(e) {
                    var t = e + 1,
                        i = this.jc(t),
                        n = i.length,
                        a = t === o.headerLevels,
                        r = o.bd(),
                        s = e * o.headerHeight,
                        d = [];
                    o.nav.header.rows.push({
                        "cells": d
                    });
                    for (var c = 0, h = 0, u = 0; u < n; u++) {
                        var f = i[u],
                            v = r[u];
                        if (o.Ha() && "function" == typeof o.onBeforeHeaderRender) {
                            var p = {};
                            p.header = {}, p.column = o.$a(f, o), DayPilot.Util.copyProps(f, p.header, ["id", "start", "name", "html", "backColor", "toolTip", "areas", "children"]), this.onBeforeHeaderRender(p), DayPilot.Util.copyProps(p.header, f, ["html", "backColor", "toolTip", "areas"])
                        }
                        var m = !!f.getChildren,
                            g = v.width;
                        if (!a) {
                            var y = m ? f.getChildrenCount(o.headerLevels - t + 1) : 1;
                            DayPilot.list.for(y - 1, function() {
                                g += r[u + c].width, c += 1
                            })
                        }
                        var b = document.createElement("div");
                        b.style.position = "absolute", b.style.top = s + "px", b.style.left = h + v.unit, b.style.width = g + v.unit, b.data = f, d.push(b), m && (b.onclick = this._a, b.onmousemove = this.ab, b.onmouseout = this.bb, f.toolTip && (b.title = f.toolTip)), b.style.overflow = "hidden", b.style.height = l.headerHeight() + "px";
                        var w = document.createElement("div");
                        w.setAttribute("unselectable", "on"), w.style.userSelect = "none", w.style.position = "relative", w.style.height = l.headerHeight() + "px", w.className = o.A("_colheader");
                        var D = document.createElement("div");
                        D.className = o.A("_colheader_inner"), f.backColor && (D.style.background = f.backColor), w.appendChild(D), b.appendChild(w), this.sd(w, f), m && (w.firstChild.innerHTML = f.html), o.nav.header.appendChild(b), h += g
                    }
                }, this.td = function(e, t) {
                    for (var i = t ? this.nav.header.insertRow(-1) : this.nav.header.rows[e - 1], n = this.jc(e), a = n.length, r = e === o.headerLevels, s = 0; s < a; s++) {
                        var d = n[s];
                        if (o.Ha() && "function" == typeof o.onBeforeHeaderRender) {
                            var c = {};
                            c.header = {}, DayPilot.Util.copyProps(d, c.header, ["id", "start", "name", "html", "backColor", "toolTip", "areas", "children"]), this.onBeforeHeaderRender(c), DayPilot.Util.copyProps(c.header, d, ["html", "backColor", "toolTip", "areas"])
                        }
                        var h = !!d.getChildren,
                            u = t ? i.insertCell(-1) : i.cells[s];
                        if (u.data = d, r);
                        else {
                            var f = 1;
                            h && (f = d.getChildrenCount(o.headerLevels - e + 1)), u.colSpan = f
                        }
                        h && (u.onclick = this._a, u.onmousemove = this.ab, u.onmouseout = this.bb, d.toolTip && (u.title = d.toolTip)), u.style.overflow = "hidden", u.style.padding = "0px", u.style.border = "0px none", u.style.height = l.headerHeight() + "px";
                        var v = t ? document.createElement("div") : u.firstChild;
                        if (t) {
                            v.setAttribute("unselectable", "on"), v.style.MozUserSelect = "none", v.style.KhtmlUserSelect = "none", v.style.WebkitUserSelect = "none", v.style.position = "relative", v.style.height = l.headerHeight() + "px", v.className = o.A("_colheader");
                            var p = document.createElement("div");
                            p.className = o.A("_colheader_inner"), d.backColor && (p.style.background = d.backColor), v.appendChild(p), u.appendChild(v)
                        } else v.style.height = l.headerHeight() + "px";
                        this.sd(v, d), h && (v.firstChild.innerHTML = d.html)
                    }
                }, this.sd = function(e, t) {
                    for (var i = [], n = 0; n < e.childNodes.length; n++) {
                        var a = e.childNodes[n];
                        a.isActiveArea && i.push(a)
                    }
                    for (var n = 0; n < i.length; n++) {
                        var a = i[n];
                        DayPilot.de(a)
                    }
                    if (t.areas)
                        for (var r = t.areas, n = 0; n < r.length; n++) {
                            var l = r[n];
                            if (DayPilot.Areas.isVisible(l)) {
                                var s = o.$a(t),
                                    d = DayPilot.Areas.createArea(e, s, l);
                                e.appendChild(d)
                            }
                        }
                }, this.ra = function() {
                    o.H ? o.ud() : o.vd()
                }, this.ud = function() {
                    var e = o.nav.header;
                    if (e.innerHTML = "", e.rows = [], this.showHeader) {
                        var t = this.jc(o.headerLevels, !0),
                            i = t.length;
                        this.xd = !0;
                        var n = o.nav.corner;
                        if (n) {
                            this.I || DayPilot.pu(n.firstChild);
                            var a = {};
                            a.html = o.cornerHTML || o.cornerHtml, "function" == typeof o.onBeforeCornerRender && o.onBeforeCornerRender(a), n.firstChild.innerHTML = a.html ? a.html : ""
                        }
                        for (var r = 0; r < o.headerLevels; r++) this.rd(r);
                        if (this.showAllDayEvents) {
                            var s = [];
                            o.nav.header.rows.push({
                                "cells": s
                            });
                            for (var d = o.bd(), c = o.headerLevels * o.headerHeight, h = 0; h < i; h++) {
                                var u = t[h],
                                    f = d[h],
                                    v = document.createElement("div");
                                v.data = u, v.style.overflow = "hidden", v.style.position = "absolute", v.style.left = f.left + f.unit, v.style.width = f.width + f.unit, v.style.top = c + "px";
                                var p = document.createElement("div");
                                p.setAttribute("unselectable", "on"), p.style.userSelect = "none", p.style.overflow = "hidden", p.style.position = "relative", p.style.height = l.allDayHeaderHeight() + "px", p.className = this.A("_alldayheader");
                                var m = document.createElement("div");
                                m.className = this.A("_alldayheader_inner"), p.appendChild(m), v.appendChild(p), p.style.height = l.allDayHeaderHeight() + "px", s.push(v), e.appendChild(v)
                            }
                        }
                    }
                }, this.vd = function() {
                    if (this.showHeader) {
                        var e = this.nav.header,
                            t = !0,
                            i = this.jc(o.headerLevels, !0),
                            n = i.length;
                        for (DayPilot.de(this.nav.header), this.Xc(); this.xd && e && e.rows && e.rows.length > 0;) this.I || DayPilot.pu(e.rows[0]), e.deleteRow(0);
                        this.xd = !0;
                        var a = o.nav.corner;
                        if (a) {
                            this.I || DayPilot.pu(a.firstChild);
                            var r = {};
                            r.html = o.cornerHTML || o.cornerHtml, "function" == typeof o.onBeforeCornerRender && o.onBeforeCornerRender(r), a.firstChild.innerHTML = r.html ? r.html : ""
                        }
                        for (var s = 0; s < o.headerLevels; s++) this.td(s + 1, t);
                        if (this.showAllDayEvents)
                            for (var d = this.nav.header.insertRow(-1), s = 0; s < n; s++) {
                                var c = i[s],
                                    h = d.insertCell(-1);
                                h.data = c, h.style.padding = "0px", h.style.border = "0px none", h.style.overflow = "hidden";
                                var u = document.createElement("div");
                                u.setAttribute("unselectable", "on"), u.style.MozUserSelect = "none", u.style.KhtmlUserSelect = "none", u.style.WebkitUserSelect = "none", u.style.overflow = "hidden", u.style.position = "relative", u.style.height = l.allDayHeaderHeight() + "px", u.className = this.A("_alldayheader");
                                var f = document.createElement("div");
                                f.className = this.A("_alldayheader_inner"), u.appendChild(f), h.appendChild(u), u.style.height = l.allDayHeaderHeight() + "px"
                            }
                    }
                }, this.S = function(e) {
                    var t = e ? 0 : 100;
                    this.callbackTimeout && window.clearTimeout(this.callbackTimeout), this.callbackTimeout = window.setTimeout(function() {
                        o.loadingLabelVisible && o.nav.loading && (o.nav.loading.innerHTML = o.loadingLabelText, o.nav.loading.style.top = o.Qa() + 5 + "px", o.nav.loading.style.display = "")
                    }, t)
                }, this.ja = function() {
                    this.callbackTimeout && window.clearTimeout(this.callbackTimeout), this.nav.loading && (this.nav.loading.style.display = "none")
                }, this.yd = function(e) {
                    var t = o.Pa(!0);
                    return e < t && (e += 24), (e - t) * (60 / o.cellDuration) * o.cellHeight
                }, this.gd = function() {
                    var e = this.Ob(),
                        t = this.initScrollPos;
                    if (!t) {
                        var i = this.businessBeginsHour;
                        t = o.yd(i)
                    }
                    e.root = this, e.onscroll = this.Nb, 0 === e.scrollTop ? e.scrollTop = t - this.Gb() : this.Nb()
                }, this.zd = function() {
                    var e = o.nav.top;
                    return !!e && (e.offsetWidth > 0 && e.offsetHeight > 0)
                }, this.Ad = function() {
                    var e = o.zd;
                    e() || o.Bd || (o.Bd = setInterval(function() {
                        e() && (clearInterval(o.Bd), o.gd(), o.za())
                    }, 100))
                }, this.scrollToY = function(e) {
                    this.Ob().scrollTop = e
                }, this.scrollToHour = function(e) {
                    var t = o.yd(e);
                    this.Ob().scrollTop = t - this.Gb()
                }, this.Ob = function() {
                    return "Fixed" === this.columnWidthSpec || this.G ? this.nav.bottomRight : this.nav.scroll
                }, this.onCallbackError = function(e, t) {
                    alert("Error!\r\nResult: " + e + "\r\nContext:" + t)
                }, this.za = function() {
                    if (o.showHeader) {
                        var e = this.Vc(),
                            t = !!this.nav.cornerRight;
                        if (this.G) {
                            this.nav.unifiedCornerRight && DayPilot.de(this.nav.unifiedCornerRight);
                            var i = (o.Ob(), o.nav.main.getBoundingClientRect().width),
                                n = o.Kc();
                            if ("100%" != n && parseInt(n) < i) return;
                            var a, r = DayPilot.sw(this.nav.bottomRight);
                            o.H ? (a = document.createElement("div"), a.style.position = "absolute", a.style.left = i + "px", a.style.height = o.Qa() + "px", o.nav.headerParent.appendChild(a), o.nav.unifiedCornerRight = a, o.nav.header.style.width = i + "px") : (this.nav.unifiedCornerRight = this.nav.header.rows[0].insertCell(-1), a = this.nav.unifiedCornerRight, a.rowSpan = this.nav.header.rows.length), a.style.width = r + "px";
                            var l = document.createElement("div");
                            l.className = o.A("_cornerright"), l.setAttribute("unselectable", "on"), l.style.overflow = "hidden", l.style.height = this.Qa() + "px", l.style.position = "relative";
                            var s = document.createElement("div");
                            s.className = o.A("_cornerright_inner"), l.appendChild(s), a.appendChild(l);
                            return void(!("Fixed" === this.columnWidthSpec) && this.nav.allday && (this.nav.allday.style.right = r + "px"))
                        }
                        if (e !== t)
                            if (e) this.Yc();
                            else {
                                if (this.nav.fullHeader && 3 === this.nav.fullHeader.rows[0].cells.length) {
                                    var a = this.nav.fullHeader.rows[0].cells[2];
                                    a.parentNode && a.parentNode.removeChild(a)
                                }
                                this.nav.cornerRight = null
                            } var d = this.nav.cornerRight;
                        if (d) {
                            var r = DayPilot.sw(o.Ra());
                            return d && (d.style.width = r + "px"), r
                        }
                    }
                }, this.Ga = function(e) {
                    if (e && (this.autoRefreshEnabled = !0), this.autoRefreshEnabled && !(this.K >= this.autoRefreshMaxCount)) {
                        this.X();
                        var t = this.autoRefreshInterval;
                        if (!t || t < 10) throw "The minimum autoRefreshInterval is 10 seconds";
                        this.autoRefreshTimeout = window.setTimeout(function() {
                            o.Cd()
                        }, 1e3 * this.autoRefreshInterval)
                    }
                }, this.X = function() {
                    this.autoRefreshTimeout && window.clearTimeout(this.autoRefreshTimeout)
                }, this.Cd = function() {
                    if (!(DayPilot.Global.resizing || DayPilot.Global.moving || t.drag || DayPilot.Global.selecting)) {
                        var e = !1;
                        if ("function" == typeof this.onAutoRefresh) {
                            var i = {};
                            i.i = this.K, i.preventDefault = function() {
                                this.preventDefault.value = !0
                            }, o.onAutoRefresh(i), i.preventDefault.value && (e = !0)
                        }!e && this.C() && this.commandCallBack(this.autoRefreshCommand), this.K++
                    }
                    this.K < this.autoRefreshMaxCount && (this.autoRefreshTimeout = window.setTimeout(function() {
                        o.Cd()
                    }, 1e3 * this.autoRefreshInterval))
                }, this.aa = function() {
                    o.ya(), "Parent100Pct" === o.heightSpec && o.setHeight(parseInt(o.nav.top.clientHeight, 10)), o.za(), o.Fa()
                }, this.Dd = function() {
                    t.globalHandlers || (t.globalHandlers = !0, DayPilot.re(document, "mousemove", t.gMouseMove), DayPilot.re(document, "mouseup", t.gMouseUp), DayPilot.re(document, DayPilot.touch.move, t.gTouchMove), DayPilot.re(document, DayPilot.touch.end, t.gTouchEnd)), DayPilot.re(window, "resize", this.aa)
                }, this.sc = function(e) {
                    if (!r.active && !r.using) {
                        e = e || window.event;
                        var i = DayPilot.Util.mouseButton(e);
                        if (t.editing) return void t.editing.blur();
                        if ("undefined" != typeof DayPilot.Bubble && (DayPilot.Bubble.hideActive(), DayPilot.Bubble.cancelShowing()), "n-resize" !== this.style.cursor && "s-resize" !== this.style.cursor || !i.left) {
                            if (("move" === this.style.cursor || "Full" === o.moveBy && this.event.client.moveEnabled()) && i.left) {
                                DayPilot.Global.moving = this;
                                var n = DayPilot.Global.moving.helper = {};
                                n.oldColumn = o.Ja[this.event.part.dayIndex].id, t.originalMouse = DayPilot.mc(e), t.originalTop = this.offsetTop;
                                var a = DayPilot.mo3(this, e);
                                a ? t.moveOffsetY = a.y : t.moveOffsetY = 0, o.nav.top.style.cursor = this.style.cursor
                            }
                        } else DayPilot.Global.resizing = this, t.originalMouse = DayPilot.mc(e), t.originalHeight = this.offsetHeight, t.originalTop = this.offsetTop, o.nav.top.style.cursor = this.style.cursor;
                        return !1
                    }
                }, this.Ed = function(e) {
                    var t = this.J.events,
                        i = this.events.list[e],
                        n = {};
                    for (var a in i) n[a] = i[a];
                    if (o.showEventStartEnd) {
                        var r = i.start.getDatePart().getTime() === i.end.getDatePart().getTime(),
                            s = r ? l.locale().timePattern : l.locale().dateTimePattern,
                            d = i.start.toString(s),
                            c = i.end.toString(s);
                        n.html = n.text + " (" + d + " - " + c + ")"
                    }
                    if ("function" == typeof this.onBeforeEventRender) {
                        var h = {};
                        h.e = n, h.data = n, this.onBeforeEventRender(h)
                    }
                    t[e] = n
                }, this.tc = {};
                var r = o.tc;
                r.active = !1, r.start = null, r.timeout = null, r.startcell = null, this.tc.getCellCoords = function(e) {
                    var t, i;
                    e.touches ? (t = e.touches[0].pageX, i = e.touches[0].pageY) : (t = e.pageX, i = e.pageY);
                    var n = DayPilot.abs(o.nav.main),
                        a = {
                            x: t - n.x,
                            y: i - n.y
                        },
                        r = o.nav.main.clientWidth / o.Ja.length;
                    return {
                        "pageX": t,
                        "pageY": i,
                        "x": Math.floor(a.x / r),
                        "y": Math.floor(a.y / o.cellHeight),
                        "toString": function() {
                            return "x: " + this.x + " y:" + this.y
                        }
                    }
                }, this.tc.startSelecting = function(e) {
                    var i = o.nav.main.rows[e.y].cells[e.x];
                    r.startcell = e, o.clearSelection(), t.column = t.getColumn(i), o.selectedCells.push(i), t.firstSelected = i, t.topSelectedCell = i, t.bottomSelectedCell = i, DayPilot.Global.selecting = {
                        "calendar": o
                    }, o.Cb()
                }, this.tc.extendSelection = function(e) {
                    var i = o.nav.main.rows[e.y].cells[e.x];
                    o.clearSelection(), DayPilot.Global.selecting = {
                        "calendar": o
                    }, e.y < r.startcell.y ? (o.selectedCells = t.getCellsBelow(i), t.topSelectedCell = o.selectedCells[0], t.bottomSelectedCell = t.firstSelected) : (o.selectedCells = t.getCellsAbove(i), t.topSelectedCell = t.firstSelected, t.bottomSelectedCell = o.selectedCells[0]), o.Cb()
                }, this.tc.detected = !1, this.tc.onMainTouchStart = function(e) {
                    if (!(DayPilot.Util.isMouseEvent(e) || (r.start = !0, r.detected = !0, r.active || e.touches.length > 1))) {
                        r.using = !0;
                        var t = r.getCellCoords(e);
                        r.startCoords = t;
                        var i = o.tapAndHoldTimeout;
                        r.timeout = window.setTimeout(function() {
                            switch (e.preventDefault(), r.active = !0, r.start = !1, o.timeRangeTapAndHoldHandling) {
                                case "Select":
                                    r.startSelecting(t);
                                    break;
                                case "ContextMenu":
                                    r.startSelecting(t), r.active = !1, o.contextMenuSelection && o.contextMenuSelection.show(o.getSelection())
                            }
                        }, i)
                    }
                }, this.tc.onCellTouchMove = function(e) {}, this.tc.onCellTouchEnd = function(e) {
                    if (!r.active) return window.clearTimeout(r.timeout), void(r.start && ! function(e) {
                        if ("Disabled" !== o.timeRangeSelectedHandling) {
                            o.clearSelection(), o.selectedCells = [e], t.topSelectedCell = e, t.bottomSelectedCell = e, o.Cb();
                            var i = o.getSelection();
                            i.toString = function() {
                                return "start: " + this.start + "\nend: " + this.end
                            }, setTimeout(function() {
                                o.tb(i.start, i.end, i.resource)
                            }, 10)
                        }
                    }(this));
                    e.preventDefault(), e.stopPropagation(), r.startcell = null, r.start = !1;
                    var i = o.getSelection();
                    i.toString = function() {
                        return "start: " + this.start + "\nend: " + this.end
                    }, o.tb(i.start, i.end, i.resource), window.setTimeout(function() {
                        r.active = !1
                    }, 500)
                }, this.tc.startMoving = function(e, i) {
                    DayPilot.Global.moving = e, (DayPilot.Global.moving.helper = {}).oldColumn = o.Ja[e.event.part.dayIndex].id, t.originalMouse = i, t.originalTop = this.offsetTop;
                    var n = DayPilot.abs(e);
                    t.moveOffsetY = i.y - n.y, t.movingShadow || (t.movingShadow = o.Ia(DayPilot.Global.moving, !o.N.ie), t.movingShadow.style.width = t.movingShadow.parentNode.offsetWidth + 1 + "px")
                }, this.tc.startResizing = function(e, i, n) {
                    DayPilot.Global.resizing = e, e.dpBorder = i, t.originalMouse = n, t.originalHeight = e.offsetHeight, t.originalTop = e.offsetTop
                }, this.tc.updateResizing = function(e) {
                    o.kd(e)
                }, this.tc.updateMoving = function() {
                    var e = o.coords,
                        i = o.cellHeight,
                        n = 0,
                        a = t.moveOffsetY;
                    a || (a = i / 2);
                    var r = Math.floor((e.y - a - n + i / 2) / i) * i + n;
                    r < n && (r = n);
                    var l = o.nav.main,
                        s = o.Hc(),
                        d = parseInt(t.movingShadow.style.height);
                    r + d > s && (r = s - d), t.movingShadow.style.top = r + "px", t.movingShadow.allowed = !0;
                    var c = l.clientWidth / l.rows[0].cells.length,
                        h = Math.floor(e.x / c);
                    h < 0 && (h = 0);
                    var u = o.nav.events;
                    h < u.rows[0].cells.length && h >= 0 && t.movingShadow.column !== h && (t.movingShadow.column = h, t.moveShadow(u.rows[0].cells[h]))
                }, this.tc.onEventTouchStart = function(e) {
                    if (!r.active && !DayPilot.Util.isMouseEvent(e)) {
                        e.stopPropagation(), r.preventEventTap = !1, r.using = !0, r.startCoords = r.getCellCoords(e);
                        var t = this,
                            i = e.touches ? e.touches[0].pageX : e.pageX,
                            n = e.touches ? e.touches[0].pageY : e.pageY,
                            a = {
                                x: i,
                                y: n,
                                div: this
                            };
                        o.coords = r.relativeCoords(e);
                        var l = o.tapAndHoldTimeout;
                        r.timeout = window.setTimeout(function() {
                            var i = t.event;
                            switch (r.active = !0, o.eventTapAndHoldHandling) {
                                case "Move":
                                    i.client.moveEnabled() && r.startMoving(t, a);
                                    break;
                                case "ContextMenu":
                                    var n = i.client.contextMenu();
                                    DayPilot.Menu && DayPilot.Menu.touchPosition(e), n ? n.show(i) : o.contextMenu && o.contextMenu.show(i)
                            }
                        }, l)
                    }
                }, this.tc.onMainTouchMove = function(e) {
                    if (!DayPilot.Util.isMouseEvent(e)) {
                        if (r.start = !1, r.timeout) {
                            var i = r.getCellCoords(e);
                            i && r.startCoords && (i.pageX === r.startCoords.pageX && i.pageY === r.startCoords.pageY || window.clearTimeout(o.tc.timeout))
                        }
                        if (DayPilot.Global.moving && t.movingShadow) return e.preventDefault(), o.coords = r.relativeCoords(e), void r.updateMoving();
                        if (DayPilot.Global.resizing) {
                            e.preventDefault();
                            var n = e.touches ? e.touches[0] : e,
                                i = {
                                    x: n.pageX,
                                    y: n.pageY
                                };
                            return void r.updateResizing(i)
                        }
                        if (r.startcell) {
                            if (e.preventDefault(), !r.active) return void window.clearTimeout(r.timeout);
                            var i = r.getCellCoords(e);
                            r.extendSelection(i)
                        }
                        r.preventEventTap = !0
                    }
                }, this.tc.relativeCoords = function(e) {
                    var t = o.nav.main,
                        i = e.touches ? e.touches[0].pageX : e.pageX,
                        n = e.touches ? e.touches[0].pageY : e.pageY,
                        a = DayPilot.abs(t);
                    return {
                        x: i - a.x,
                        y: n - a.y,
                        "toString": function() {
                            return "x: " + this.x + ", y:" + this.y
                        }
                    }
                }, this.tc.onMainTouchEnd = function(e) {
                    if (!DayPilot.Util.isMouseEvent(e))
                        if (DayPilot.Global.moving) {
                            r.active = !1, e.preventDefault(), e.stopPropagation();
                            var i = t.movingShadow.offsetTop,
                                n = DayPilot.Global.moving.event,
                                a = n.calendar;
                            a.Jb(t.movingShadow);
                            var o = t.movingShadow.column,
                                l = t.movingShadow;
                            if (DayPilot.Global.moving = null, t.movingShadow = null, !l.allowed) return;
                            n.calendar.lb(n, o, i, e, t.drag)
                        } else if (r.startcell) {
                        if (!r.active) return void window.clearTimeout(r.timeout);
                        e.preventDefault(), r.startcell = null;
                        var s = a.getSelection();
                        s.toString = function() {
                            return "start: " + this.start + "\nend: " + this.end
                        }, a.tb(s.start, s.end, s.resource), window.setTimeout(function() {
                            r.active = !1
                        }, 500)
                    }
                }, this.tc.onEventTouchMove = function(e) {
                    r.preventEventTap = !0
                }, this.tc.onEventTouchEnd = function(e) {
                    if (!DayPilot.Util.isMouseEvent(e)) {
                        if (!r.active) {
                            if (r.preventEventTap) return;
                            return window.clearTimeout(r.timeout), void o.Va(this, !1, !1, e)
                        }
                        return r.active = !1, r.timeout ? void window.clearTimeout(r.timeout) : void 0
                    }
                }, this.qc = function(e) {
                    var i = 5,
                        n = 10,
                        a = "Top" === o.moveBy;
                    if ("undefined" != typeof t) {
                        var r = DayPilot.mo3(this, e);
                        if (r) {
                            o.eventOffset = r;
                            var l = this;
                            if (l.active || DayPilot.Util.addClass(l, o.A("_event_hover")), !DayPilot.Global.resizing && !DayPilot.Global.moving) {
                                var s = this.isFirst,
                                    d = this.isLast;
                                if ("Disabled" !== o.moveBy && "None" !== o.moveBy && (!a && r.x <= n && this.event.client.moveEnabled() ? s ? this.style.cursor = "move" : this.style.cursor = "not-allowed" : !a && r.y <= i && this.event.client.resizeEnabled() ? s ? (this.style.cursor = "n-resize", this.dpBorder = "top") : this.style.cursor = "not-allowed" : a && r.y <= n && this.event.client.moveEnabled() ? this.style.cursor = "move" : this.offsetHeight - r.y <= i && this.event.client.resizeEnabled() ? d ? (this.style.cursor = "s-resize", this.dpBorder = "bottom") : this.style.cursor = "not-allowed" : DayPilot.Global.resizing || DayPilot.Global.moving || (this.event.client.clickEnabled() ? this.style.cursor = "pointer" : this.style.cursor = "default"), "undefined" != typeof DayPilot.Bubble && o.bubble && "Disabled" !== o.eventHoverHandling && ("default" === this.style.cursor || "pointer" === this.style.cursor))) {
                                    this.Fd && r.x === this.Fd.x && r.y === this.Fd.y || (this.Fd = r, o.bubble.showEvent(this.event))
                                }
                            }
                        }
                    }
                }, this.rc = function(e) {
                    DayPilot.Util.removeClass(this, o.A("_event_hover")), o.bubble && o.bubble.hideOnMouseOut(), DayPilot.Areas.hideAreas(this, e)
                }, this.Gd = null, this.Ba = function() {
                    if (this.showCurrentTime) {
                        this.Hd();
                        var e = (new DayPilot.Date).addMinutes(o.showCurrentTimeOffset);
                        if ("Full" === o.showCurrentTimeMode) this.Id(e);
                        else {
                            if ("Day" !== o.showCurrentTimeMode) throw "Invalid DayPilot.Calendar.showCurrentTimeMode value: " + o.showCurrentTimeMode;
                            this.Jd(e)
                        }
                        if (this.nav.events && !this.Gd) {
                            this.Gd = setTimeout(function() {
                                o.Gd = null, o.Ba()
                            }, 3e4)
                        }
                    }
                }, this.Hd = function() {
                    DayPilot.de(o.elements.separators), o.elements.separators = []
                }, this.Jd = function(e) {
                    var t = e.getTime(),
                        i = o.nav.events;
                    if (i)
                        for (var n = 0; n < o.Ja.length; n++) {
                            var a = o.Ja[n],
                                r = o.La(!0),
                                l = new DayPilot.Date(a.start).addHours(this.Pa(!0)),
                                s = l.getTime(),
                                d = l.addTime(r),
                                c = d.getTime();
                            if (s <= t && t <= c) {
                                var h = this.Fb(e, a.start).top - 1 - o.Gb(),
                                    u = i.rows[0].cells[n],
                                    f = u.separators,
                                    v = document.createElement("div");
                                v.style.position = "absolute", v.style.top = h + "px", v.style.height = "1px", v.style.left = "0px", v.style.right = "0px", v.className = o.A("_now"), f.insertBefore(v, f.firstChild), o.elements.separators.push(v)
                            }
                        }
                }, this.Id = function(e) {
                    var t = e.getTime();
                    if (o.nav.events) {
                        var i = o.Ja[0];
                        if (i)
                            for (var n = i.start.getDatePart().addTime(e.getTimePart()), a = this.Fb(n, i.start).top - 1, r = 0; r < o.Ja.length; r++) {
                                var i = o.Ja[r],
                                    l = o.La(!0),
                                    s = new DayPilot.Date(i.start).addHours(this.Pa(!0)),
                                    d = s.getTime(),
                                    c = s.addTime(l),
                                    h = c.getTime();
                                if (d <= t && t <= h) {
                                    var u = document.createElement("div");
                                    return u.style.position = "absolute", u.style.top = a + "px", u.style.height = "1px", u.style.left = "0px", u.style.right = "0px", u.className = o.A("_now"),
                                        o.nav.events.appendChild(u), void o.elements.separators.push(u)
                                }
                            }
                    }
                }, this.pa = function(e) {
                    if (e ? this.events.list = e : e = this.events.list, e) {
                        this.oc = {}, this.oc.events = [], this.oc.lines = [];
                        var t = e.length,
                            i = this.La(!0);
                        this.J.pixels = {};
                        var n = [];
                        this.Qb = [], this.eb = 1e4, this.Oa = 0, this.startDate = new DayPilot.Date(this.startDate);
                        for (var a = 0; a < t; a++) {
                            var r = e[a];
                            if ("object" != typeof r) throw new DayPilot.Exception("Event data item must be an object");
                            if (!r.start) throw new DayPilot.Exception("Event data item must specify 'start' property");
                            r.start = new DayPilot.Date(r.start), r.end = new DayPilot.Date(r.end)
                        }
                        if ("function" == typeof this.onBeforeEventRender || o.showEventStartEnd)
                            for (var a = 0; a < t; a++) this.Ed(a);
                        for (var s = "Resources" === this.viewType, d = this.kc(), c = d.start, h = d.end, a = 0; a < this.Ja.length; a++) {
                            var u = {};
                            u.minEnd = 1e6, u.maxStart = -1, this.Qb.push(u);
                            var f = this.Ja[a];
                            f.events = [], f.lines = [], f.blocks = [];
                            var v = new DayPilot.Date(f.start).addHours(this.Pa(!0)),
                                p = v.getTime(),
                                m = v.addTime(i),
                                g = m.getTime();
                            s && (c = v.getDatePart(), h = v.addDays(1));
                            for (var y = 0; y < t; y++)
                                if (!n[y]) {
                                    var r = e[y],
                                        b = null;
                                    if ("function" == typeof o.onBeforeEventRender && (b = o.J.events[y]), b) {
                                        if (b.hidden) continue
                                    } else if (r.hidden) continue;
                                    var w = r.start,
                                        D = r.end,
                                        k = w.getTime(),
                                        P = D.getTime();
                                    if (!(P < k))
                                        if (r.allday) {
                                            var x = !1;
                                            if (x = k === P ? !(P < c.getTime() || k >= h.getTime()) : "Date" === o.allDayEnd ? !(P < c.getTime() || k >= h.getTime()) : !(P <= c.getTime() || k >= h.getTime()), s && (x = x && (r.resource === f.id || "*" === f.id)), x) {
                                                var C = new DayPilot.Event(r, this);
                                                if (C.part.start = c.getTime() < k ? w : c, C.part.end = h.getTime() > P ? D : h, C.part.colStart = DayPilot.DateUtil.daysDiff(c, C.part.start), C.part.colWidth = DayPilot.DateUtil.daysSpan(C.part.start, C.part.end) + 1, s && (C.part.colStart = a, C.part.colWidth = 1), "function" == typeof o.onEventFilter && o.events.Kd) {
                                                    var A = {};
                                                    if (A.filter = o.events.Kd, A.visible = !0, A.e = C, o.onEventFilter(A), !A.visible) continue
                                                }
                                                this.oc.events.push(C), ("function" == typeof this.onBeforeEventRender || o.showEventStartEnd) && (C.cache = this.J.events[y]), n[y] = !0, !s || C.part.start.getTime() === k && C.part.end.getTime() === P || (n[y] = !1)
                                            }
                                        } else {
                                            var b = null;
                                            if ("function" == typeof o.onBeforeEventRender && (b = o.J.events[y]), b) {
                                                if (b.hidden) continue
                                            } else if (r.hidden) continue;
                                            var x = !1;
                                            if (x = s ? f.id === r.resource && !(P <= p || k >= g) : !(P <= p || k >= g) || P === k && k === p) {
                                                var C = new DayPilot.Event(r, o);
                                                C.part.dayIndex = a, C.part.start = p < k ? w : v, C.part.end = g > P ? D : m;
                                                var S = this.Fb(C.part.start, f.start),
                                                    E = this.Fb(C.part.end, f.start),
                                                    T = S.top,
                                                    H = E.top;
                                                if (T === H && (S.cut || E.cut)) continue;
                                                C.part.box = l.useBox(P - k);
                                                var M = 0;
                                                if (C.part.box) {
                                                    var _ = E.boxBottom;
                                                    C.part.top = Math.floor(T / this.cellHeight) * this.cellHeight + M, C.part.height = Math.max(Math.ceil(_ / this.cellHeight) * this.cellHeight - C.part.top, this.cellHeight - 1), C.part.barTop = Math.max(T - C.part.top - 1, 0), C.part.barHeight = Math.max(H - T - 2, 1)
                                                } else C.part.top = T + M, C.part.height = Math.max(H - T, 0), C.part.barTop = 0, C.part.barHeight = Math.max(H - T - 2, 1);
                                                if ("function" == typeof o.onEventFilter && o.events.Kd) {
                                                    var A = {};
                                                    if (A.filter = o.events.Kd, A.visible = !0, A.e = C, o.onEventFilter(A), !A.visible) continue
                                                }
                                                var w = C.part.top,
                                                    D = C.part.top + C.part.height;
                                                w > u.maxStart && (u.maxStart = w), D < u.minEnd && (u.minEnd = D), w < this.eb && (this.eb = w), D > this.Oa && (this.Oa = D), f.events.push(C), ("function" == typeof this.onBeforeEventRender || o.showEventStartEnd) && (C.cache = this.J.events[y]), C.part.start.getTime() === k && C.part.end.getTime() === P && (n[y] = !0)
                                            }
                                        }
                                }
                        }
                        for (var a = 0; a < this.Ja.length; a++) {
                            var f = this.Ja[a];
                            f.events.sort(this.Ld);
                            for (var y = 0; y < f.events.length; y++) {
                                var r = f.events[y];
                                f.putIntoBlock(r)
                            }
                            for (var y = 0; y < f.blocks.length; y++) {
                                var R = f.blocks[y];
                                R.events.sort(this.Md);
                                for (var B = 0; B < R.events.length; B++) {
                                    var r = R.events[B];
                                    R.putIntoLine(r)
                                }
                            }
                        }
                        this.oc.events.sort(this.Md), this.oc.putIntoLine = function(e) {
                            for (var t = 0; t < this.lines.length; t++) {
                                var i = this.lines[t];
                                if (i.isFree(e.part.colStart, e.part.colWidth)) return i.push(e), t
                            }
                            var i = [];
                            return i.isFree = function(e, t) {
                                for (var i = e + t - 1, n = this.length, a = 0; a < n; a++) {
                                    var o = this[a];
                                    if (!(i < o.part.colStart || e > o.part.colStart + o.part.colWidth - 1)) return !1
                                }
                                return !0
                            }, i.push(e), this.lines.push(i), this.lines.length - 1
                        };
                        for (var a = 0; a < this.oc.events.length; a++) {
                            var r = this.oc.events[a];
                            this.oc.putIntoLine(r)
                        }
                        var U = Math.max(this.oc.lines.length, 1);
                        this.J.allDayHeaderHeight = U * (l.allDayEventHeight() + 2) + 2
                    }
                }, this.Ld = function(e, t) {
                    if (!(e && t && e.start && t.start)) return 0;
                    var i = e.start().ticks - t.start().ticks;
                    return 0 !== i ? i : t.end().ticks - e.end().ticks
                }, this.Md = function(e, t) {
                    if (!e || !t) return 0;
                    if (!(e.data && t.data && e.data.sort && t.data.sort && 0 !== e.data.sort.length && 0 !== t.data.sort.length)) return o.Ld(e, t);
                    for (var i = 0, n = 0; 0 === i && "undefined" != typeof e.data.sort[n] && "undefined" != typeof t.data.sort[n];) i = e.data.sort[n] === t.data.sort[n] ? 0 : "number" == typeof e.data.sort[n] && "number" == typeof t.data.sort[n] ? e.data.sort[n] - t.data.sort[n] : o.Nd(e.data.sort[n], t.data.sort[n], o.sortDirections[n]), n++;
                    return i
                }, this.Nd = function(e, t, i) {
                    var n = "desc" !== i,
                        a = n ? -1 : 1,
                        o = -a;
                    if (null === e && null === t) return 0;
                    if (null === t) return o;
                    if (null === e) return a;
                    var r = [];
                    return r[0] = e, r[1] = t, r.sort(), e === r[0] ? a : o
                }, this.Od = function(e) {
                    for (var t = 0; t < o.elements.events.length; t++) {
                        var i = o.elements.events[t];
                        if (i.event === e || i.event.data === e.data) return i
                    }
                    return null
                }, this.events.find = function(e) {
                    if (!o.events.list || "undefined" == typeof o.events.list.length) return null;
                    for (var t = o.events.list.length, i = 0; i < t; i++)
                        if (o.events.list[i].id === e) return new DayPilot.Event(o.events.list[i], o);
                    return null
                }, this.events.findRecurrent = function(e, t) {
                    if (!o.events.list || "undefined" == typeof o.events.list.length) return null;
                    for (var i = o.events.list.length, n = 0; n < i; n++)
                        if (o.events.list[n].recurrentMasterId === e && o.events.list[n].start.getTime() === t.getTime()) return new DayPilot.Event(o.events.list[n], o);
                    return null
                }, this.events.all = function() {
                    for (var e = [], t = 0; t < o.events.list.length; t++) {
                        var i = new DayPilot.Event(o.events.list[t], o);
                        e.push(i)
                    }
                    return DayPilot.list(e)
                }, this.events.edit = function(e) {
                    function t() {
                        var t = o.Od(e);
                        t && o.Wa(t)
                    }
                    t()
                }, this.events.update = function(e, t) {
                    var i = {};
                    i.oldEvent = new DayPilot.Event(e.copy(), o), i.newEvent = new DayPilot.Event(e.temp(), o);
                    var n = new DayPilot.Action(o, "EventUpdate", i, t);
                    return e.commit(), o.L && o.gc({
                        "eventsOnly": !0
                    }), o.Pd.notify(), n
                }, this.events.remove = function(e, t) {
                    var i = {};
                    i.e = new DayPilot.Event(e.data, o);
                    var n = new DayPilot.Action(o, "EventRemove", i, t),
                        a = DayPilot.indexOf(o.events.list, e.data);
                    return o.events.list.splice(a, 1), o.L && o.gc({
                        "eventsOnly": !0
                    }), o.Pd.notify(), n
                }, this.events.add = function(e, t) {
                    e instanceof DayPilot.Event || (e = new DayPilot.Event(e)), e.calendar = o, o.events.list || (o.events.list = []), o.events.list.push(e.data);
                    var i = {};
                    i.e = e;
                    var n = new DayPilot.Action(o, "EventAdd", i, t);
                    return o.L && o.gc({
                        "eventsOnly": !0
                    }), o.Pd.notify(), n
                }, this.events.filter = function(e) {
                    o.events.Kd = e, o.gc({
                        "eventsOnly": !0
                    })
                }, this.events.load = function(e, t, i) {
                    var n = function(e) {
                            var t = {};
                            t.exception = e.exception, t.request = e.request, "function" == typeof i && i(t)
                        },
                        a = function(e) {
                            var i, a = e.request;
                            try {
                                i = JSON.parse(a.responseText)
                            } catch (e) {
                                var r = {};
                                return r.exception = e, void n(r)
                            }
                            if (DayPilot.isArray(i)) {
                                var l = {};
                                if (l.preventDefault = function() {
                                        this.preventDefault.value = !0
                                    }, l.data = i, "function" == typeof t && t(l), l.preventDefault.value) return;
                                o.events.list = i, o.L && o.gc({
                                    "eventsOnly": !0
                                })
                            }
                        };
                    if (o.eventsLoadMethod && "POST" === o.eventsLoadMethod.toUpperCase()) DayPilot.ajax({
                        "method": "POST",
                        "data": {
                            "start": o.visibleStart().toString(),
                            "end": o.visibleEnd().toString()
                        },
                        "url": e,
                        "success": a,
                        "error": n
                    });
                    else {
                        var r = e,
                            l = "start=" + o.visibleStart().toString() + "&end=" + o.visibleEnd().toString();
                        r += r.indexOf("?") > -1 ? "&" + l : "?" + l, DayPilot.ajax({
                            "method": "GET",
                            "url": r,
                            "success": a,
                            "error": n
                        })
                    }
                }, this.events.forRange = function(e, t) {
                    return e = new DayPilot.Date(e), t = new DayPilot.Date(t), DayPilot.list(o.events.list).filter(function(i) {
                        var n = new DayPilot.Date(i.start),
                            a = new DayPilot.Date(i.end);
                        return DayPilot.Util.overlaps(e, t, n, a)
                    }).map(function(e) {
                        return new DayPilot.Event(e, o)
                    })
                }, this.events.Db = function(e) {
                    if (!e) throw new DayPilot.Exception("Error checking overlap for null (internal error)");
                    var t = e instanceof DayPilot.Event ? e.data : e,
                        i = new DayPilot.Date(t.start),
                        n = new DayPilot.Date(t.end);
                    return !!DayPilot.list(o.events.list).find(function(e) {
                        if (o.Qd(t, e)) return !1;
                        if ("Resources" == o.viewType && t.resource !== e.resource) return !1;
                        if (e.allday) return !1;
                        var a = new DayPilot.Date(e.start),
                            r = new DayPilot.Date(e.end);
                        return DayPilot.Util.overlaps(i, n, a, r)
                    })
                }, this.Qd = function(e, t) {
                    return DayPilot.Util.isSameEvent(e, t)
                }, this.queue = {}, this.queue.list = [], this.queue.list.ignoreToJSON = !0, this.queue.add = function(e) {
                    if (e) {
                        if (!e.isAction) throw "DayPilot.Action object required for queue.add()";
                        o.queue.list.push(e)
                    }
                }, this.queue.notify = function(e) {
                    var t = {};
                    t.actions = o.queue.list, o.R("Notify", t, e, "Notify"), o.queue.list = []
                }, this.queue.clear = function() {
                    o.queue.list = []
                }, this.queue.pop = function() {
                    return o.queue.list.pop()
                }, this.gc = function(e) {
                    if (this.L && this.Ja) {
                        var e = e || {},
                            t = !e.eventsOnly;
                        o.cssOnly || (o.cssOnly = !0, DayPilot.Util.log("DayPilot: cssOnly = false mode is not supported since DayPilot Pro 8.0.")), t ? (this.C() || (o.cellProperties = {}), o.Uc.clearCache(), o.Y(), o.Rd(), o.na(), o.pa(), o.ra(), o.sa(), o.qa(), o.ta(), o.va(), o.O(), o.wa(), o.Cb(), o.xa(), o.ya(), o.za(), o.Aa(), o.Sd(), o.Da(), o.Ea(), o.Ba(), o.Fa()) : (o.Y(), o.pa(), o.qa(), o.Da(), o.Ea(), o.Fa()), this.visible ? this.show() : this.hide()
                    }
                }, this.update = function(e) {
                    if (o.Td) throw new DayPilot.Exception("This DayPilot.Calendar instance has been disposed.");
                    if (!o.L) return void o.Ud(e);
                    if (DayPilot.Util.isOnlyProperty(e, "events")) return o.events.list = e.events, void o.gc({
                        "eventsOnly": !0
                    });
                    if (this.Ud(e), this.gc(), "function" == typeof o.onAfterRender) {
                        var t = {};
                        t.isUpdate = !0, t.data = null, o.onAfterRender(t)
                    }
                }, this.Sd = function() {
                    if (o.nav.top.className !== o.A("_main")) {
                        o.nav.top.className = o.A("_main");
                        var e = o.nav.corner;
                        e.className = o.A("_corner"), e.firstChild.className = o.A("_corner_inner");
                        var t = o.nav.unifiedCornerRight;
                        t && (t.firstChild.className = o.A("_cornerright"), t.firstChild.firstChild.className = o.A("_cornerright_inner"))
                    }
                }, this.show = function() {
                    o.visible = !0, o.nav.top.style.display = "", o.aa(), o.za(), o.Nb()
                }, this.hide = function() {
                    o.visible = !1, o.nav.top.style.display = "none"
                }, this.Pd = {}, this.Pd.scope = null, this.Pd.notify = function() {
                    o.Pd.scope && o.Pd.scope["$apply"]()
                }, this.debug = new DayPilot.Debug(this), this.ld = function(e) {
                    if (e < 0) return null;
                    for (var t = 0, i = o.nav.events.rows[0].cells, n = 0; n < i.length; n++) {
                        if (t += i[n].offsetWidth, e < t) return n
                    }
                    return null
                }, this.Fb = function(e, t) {
                    t || (t = this.startDate);
                    var i = t.getTime(),
                        n = e.getTime(),
                        a = this.J.pixels[n + "_" + i];
                    if (a) return a;
                    this.Pa(!0);
                    i = t.addHours(this.Pa(!0)).getTime();
                    var o = 60 * this.cellDuration * 1e3,
                        r = n - i,
                        l = r % o,
                        s = r - l,
                        d = s + o;
                    0 === l && (d = s);
                    var c = {};
                    return c.cut = !1, c.top = this.fd(r), c.boxTop = this.fd(s), c.boxBottom = this.fd(d), this.J.pixels[n + "_" + i] = c, c
                }, this.fd = function(e) {
                    return Math.floor(this.cellHeight * e / (6e4 * this.cellDuration))
                }, this.Rd = function() {
                    this.startDate = new DayPilot.Date(this.startDate).getDatePart(), this.Vd = l.allDayEventHeight() + 4
                }, this.qa = function() {
                    var e = this.Qa(),
                        t = this.xc();
                    if (this.nav.corner && (this.nav.corner.style.height = e + "px"), this.nav.cornerRight && (this.nav.cornerRight.style.height = e + "px"), this.nav.mid && (this.nav.mid.style.height = e + "px"), this.showAllDayEvents && this.nav.header)
                        for (var i = this.nav.header.rows[this.nav.header.rows.length - 1], n = 0; n < i.cells.length; n++) {
                            var a = i.cells[n];
                            a.firstChild.style.height = l.allDayHeaderHeight() + "px"
                        }
                    this.nav.upperRight && (this.nav.upperRight.style.height = e + "px"), this.nav.scroll.style.top = e + "px", this.nav.top.style.height = t + "px"
                }, this.ya = function() {
                    var e = this.yc();
                    this.nav.scroll && e > 0 && (this.nav.scroll.style.height = e + "px", this.Pb = o.nav.scroll.clientHeight, this.nav.bottomLeft && (this.nav.bottomLeft.style.height = e + "px"), this.nav.bottomRight && (this.nav.bottomRight.style.height = e + "px")), "Parent100Pct" === this.heightSpec ? this.nav.top.style.height = "100%" : this.nav.top.style.height = this.xc() + "px"
                }, this.setHeight = function(e) {
                    "Parent100Pct" !== this.heightSpec && (this.heightSpec = "Fixed"), this.height = e - this.Qa(), this.ya()
                }, this.Wd = function(e) {
                    var t = document.createElement("div");
                    t.style.position = "absolute", t.style.top = "-2000px", t.style.left = "-2000px", t.className = this.A(e), document.body.appendChild(t);
                    var i = t.offsetHeight,
                        n = t.offsetWidth;
                    document.body.removeChild(t);
                    var a = {};
                    return a.height = i, a.width = n, a
                }, this.Uc = {};
                var l = this.Uc;
                l.locale = function() {
                    return DayPilot.Locale.find(o.locale)
                }, l.weekStarts = function() {
                    return "number" == typeof o.weekStarts ? o.weekStarts : l.locale().weekStarts
                }, l.timeFormat = function() {
                    return "Auto" !== o.timeFormat ? o.timeFormat : this.locale().timeFormat
                }, l.useBox = function(e) {
                    return "Always" === o.useEventBoxes || "Never" !== o.useEventBoxes && e < 60 * o.cellDuration * 1e3
                }, l.notifyType = function() {
                    var e;
                    if ("Immediate" === o.notifyCommit) e = "Notify";
                    else {
                        if ("Queue" !== o.notifyCommit) throw "Invalid notifyCommit value: " + o.notifyCommit;
                        e = "Queue"
                    }
                    return e
                }, l.clearCache = function() {
                    delete o.J.allDayEventHeight, delete o.J.allDayHeaderHeight, delete o.J.headerHeight
                }, l.allDayEventHeight = function() {
                    if (o.J.allDayEventHeight) return o.J.allDayEventHeight;
                    var e = o.Wd("_alldayevent_height").height;
                    return e || (e = o.allDayEventHeight), o.J.allDayEventHeight = e, e
                }, l.allDayHeaderHeight = function() {
                    if (o.J.allDayHeaderHeight) return o.J.allDayHeaderHeight;
                    var e = o.Vd;
                    return o.J.allDayHeaderHeight = e, e
                }, l.headerHeight = function() {
                    if (o.J.headerHeight) return o.J.headerHeight;
                    var e = o.Wd("_header_height").height;
                    return e || (e = o.headerHeight), o.J.headerHeight = e, e
                }, this.exportAs = function(e, t) {
                    if (!o.zd()) throw new DayPilot.Exception("DayPilot.Calendar.exportAs(): The instance must be visible during export.");
                    var i = s.generate(e, t);
                    return new DayPilot.Export(i)
                }, this.Xd = {};
                var s = this.Xd;
                s.Yd = null, s.Zd = null, s.generate = function(e, t) {
                    "object" == typeof e && (t = e, e = null);
                    var t = t || {},
                        e = e || t.format || "svg",
                        i = t.scale || 1;
                    if ("config" !== e) {
                        "jpg" === e.toLowerCase() && (e = "jpeg");
                        var n = t.area || "viewport";
                        s.Yd = t, s.Zd = n;
                        var a, r = s.getWidth(),
                            d = s.getHeight();
                        switch (e.toLowerCase()) {
                            case "svg":
                                a = new DayPilot.Svg(r, d);
                                break;
                            case "png":
                                a = new DayPilot.Canvas(r, d, "image/png", i);
                                break;
                            case "jpeg":
                                a = new DayPilot.Canvas(r, d, "image/jpeg", i, t.quality);
                                break;
                            default:
                                throw "Export format not supported: " + e
                        }
                        var c = s.getRectangles(),
                            h = new DayPilot.StyleReader(o.nav.top).getBackColor(),
                            u = new DayPilot.StyleReader(o.nav.top).get("border-top-color");
                        "0px" !== new DayPilot.StyleReader(o.nav.top).get("border-top-width") || (u = "white");
                        var f = new DayPilot.StyleReader(o.nav.corner.firstChild).getBackColor(h),
                            v = o.nav.hourTable.rows[0].cells[0].firstChild.firstChild,
                            p = new DayPilot.StyleReader(v).get("border-right-color"),
                            m = new DayPilot.StyleReader(v).getBackColor(h),
                            g = new DayPilot.StyleReader(v).getFont(),
                            y = new DayPilot.StyleReader(v.firstChild.childNodes[1]).getFont(),
                            b = new DayPilot.StyleReader(v.firstChild.childNodes[1]).getPx("padding-right"),
                            w = new DayPilot.StyleReader(v).get("color"),
                            D = o.nav.header.rows[0].cells[0].firstChild.firstChild,
                            k = new DayPilot.StyleReader(D).getBackColor(h),
                            P = new DayPilot.StyleReader(D).getFont(),
                            x = new DayPilot.StyleReader(D).get("color"),
                            C = new DayPilot.StyleReader(D).get("border-right-color"),
                            A = o.nav.header.rows[o.nav.header.rows.length - 1].cells[0].firstChild,
                            S = A.firstChild,
                            E = new DayPilot.StyleReader(A).getBackColor(h),
                            T = new DayPilot.StyleReader(S).getBackColor(E),
                            H = o.nav.main.rows[0].cells[0].firstChild.firstChild,
                            M = new DayPilot.StyleReader(H).get("border-right-color"),
                            H = s.fakeCell(),
                            _ = new DayPilot.StyleReader(H.firstChild).getBackColor();
                        DayPilot.Util.addClass(H, o.A("_cell_business"));
                        var R = new DayPilot.StyleReader(H.firstChild).getBackColor();
                        DayPilot.de(H);
                        var B = s.getViewportOffsetTop(),
                            U = 0;
                        U = "Fixed" === o.columnWidthSpec ? o.columnWidth : c.gridContent.w / o.Ja.length, a.fillRect(c.main, "white"), a.fillRect(c.main, h);
                        var N = c.corner.h - B;
                        DayPilot.list.for(o.Mc(), function(e) {
                            return o.Rc(e)
                        }).each(function(e) {
                            var t = o.Oc(),
                                i = e.hour,
                                n = e.sup,
                                r = i,
                                l = 20,
                                s = {
                                    "x": 0,
                                    "y": N,
                                    "w": c.grid.x + 1,
                                    "h": t + 1
                                },
                                d = {
                                    "x": 0,
                                    "y": N,
                                    "w": c.grid.x + 1 - l,
                                    "h": t + 1
                                },
                                h = {
                                    "x": d.w,
                                    "y": N,
                                    "w": l - b - 1,
                                    "h": t + 1
                                },
                                u = m;
                            a.fillRect(s, u), a.text(d, r, g, w, "right"), a.text(h, n, y, w, "right"), a.rect(s, p), N += t
                        });
                        var L = 60 * o.cellDuration * 1e3,
                            z = c.grid.x;
                        DayPilot.list(o.Ja).each(function(e, t) {
                            var i = U,
                                n = c.grid.y - B;
                            DayPilot.list.for(o.Ta()).each(function(r, l) {
                                var d = o.dd(t, l) || {},
                                    c = null;
                                if (d.cssClass) {
                                    var h = s.fakeCell();
                                    DayPilot.Util.addClass(h, d.cssClass), c = new DayPilot.StyleReader(h.firstChild).getBackColor(), DayPilot.de(h)
                                }
                                var u = o.cellHeight,
                                    f = {
                                        "x": z,
                                        "y": n,
                                        "w": i + 1,
                                        "h": u + 1
                                    },
                                    v = d.business,
                                    p = {};
                                p.cell = {}, p.cell.start = e.start.addTime(l * L).addHours(o.Pa()), p.cell.end = p.cell.start.addTime(L), p.cell.resource = e.id, DayPilot.Util.copyProps(d, p.cell, ["cssClass", "html", "backImage", "backRepeat", "backColor", "business"]), p.backColor = c || (v ? R : _), "function" == typeof o.onBeforeCellExport && o.onBeforeCellExport(p), a.fillRect(f, p.backColor), a.rect(f, M), n += u
                            }), z += i
                        });
                        var O = c.grid.x;
                        DayPilot.list(o.Ja).each(function(e) {
                            DayPilot.list(e.events).each(function(e) {
                                var t = e.cache || e.data,
                                    i = s.fakeEvent();
                                i.className += " " + t.cssClass;
                                var n = i.firstChild,
                                    r = i.childNodes[1],
                                    l = new DayPilot.StyleReader(n).getBackColor(),
                                    d = new DayPilot.StyleReader(n.firstChild).getBackColor(),
                                    h = new DayPilot.StyleReader(n.firstChild).getPx("width"),
                                    u = new DayPilot.StyleReader(r).get("border-right-color"),
                                    f = new DayPilot.StyleReader(r).getFont(),
                                    v = new DayPilot.StyleReader(r).get("color"),
                                    p = new DayPilot.StyleReader(r).getBackColor(),
                                    m = {};
                                m.left = new DayPilot.StyleReader(r).getPx("padding-left"), m.right = new DayPilot.StyleReader(r).getPx("padding-right"), m.top = new DayPilot.StyleReader(r).getPx("padding-top"), m.bottom = new DayPilot.StyleReader(r).getPx("padding-bottom"), DayPilot.de(i);
                                var g = O + U * e.part.left / 100,
                                    y = (U - o.columnMarginRight) * e.part.width / 100,
                                    b = e.part.top + c.grid.y - o.Gb() - B,
                                    w = e.part.height,
                                    D = t.backColor || p,
                                    k = t.barColor || d,
                                    P = t.barBackColor || l,
                                    x = {};
                                x.e = e, x.text = e.text ? e.text() : e.client.html(), x.fontSize = f.size, x.fontFamily = f.family, x.fontStyle = f.style, x.fontColor = v, x.backColor = D, x.borderColor = u, x.horizontalAlignment = "left", x.barWidth = h, x.barColor = k, x.barBackColor = P, "function" == typeof o.onBeforeEventExport && o.onBeforeEventExport(x);
                                var C = {
                                        "x": g,
                                        "y": b,
                                        "w": y + 1,
                                        "h": w + 1
                                    },
                                    A = DayPilot.Util.copyProps(C);
                                e.client.barVisible() && (A.x += h, A.w -= h);
                                var S = DayPilot.Util.copyProps(A);
                                if (S.x += m.left, S.w -= m.left + m.right, S.y += m.top, S.h -= m.top + m.bottom, a.fillRect(C, x.backColor), e.client.barVisible()) {
                                    var E = {
                                            "x": C.x,
                                            "y": C.y,
                                            "w": x.barWidth,
                                            "h": C.h
                                        },
                                        T = {
                                            "x": C.x,
                                            "y": C.y + 1 + e.part.barTop,
                                            "w": x.barWidth,
                                            "h": e.part.barHeight + 1
                                        };
                                    a.fillRect(E, x.barBackColor), a.fillRect(T, x.barColor)
                                }
                                a.text(S, x.text, {
                                    "size": x.fontSize,
                                    "family": x.fontFamily,
                                    "style": x.fontStyle
                                }, x.fontColor, x.horizontalAlignment), a.rect(C, x.borderColor);
                                var g = C.x,
                                    H = C.x + C.w - 2,
                                    b = C.y;
                                DayPilot.list(t.areas).each(function(t) {
                                    if (DayPilot.Areas.isVisible(t)) {
                                        var i = t.left;
                                        t.start && (i = o.getPixels(new DayPilot.Date(t.start)).left - e.part.left);
                                        var n = t.width || t.w,
                                            r = t.height || t.h;
                                        i || (i = H - n - g), t.right ? n = e.part.width - t.right - i : t.end && (n = o.getPixels(new DayPilot.Date(t.end)).left - t.left - e.part.left + 1);
                                        var l = t.top;
                                        "number" == typeof t.bottom && (r = e.part.height - t.bottom - l);
                                        var s = {
                                            "x": g + i,
                                            "y": b + l,
                                            "w": n,
                                            "h": r
                                        };
                                        if (t.backColor && a.fillRect(s, t.backColor), t.image) {
                                            var d = new Image;
                                            d.src = t.image, a.image(s, d)
                                        } else t.html && a.text(s, t.html, {
                                            "size": x.fontSize,
                                            "family": x.fontFamily,
                                            "style": x.fontStyle
                                        }, t.fontColor || x.fontColor, null, t.padding)
                                    }
                                })
                            }), O += U
                        }), a.fillRect(c.corner, f);
                        var z = c.gridContent.x;
                        return DayPilot.list.for(o.headerLevels).each(function(e) {
                                var t = o.headerHeight * e,
                                    i = o.jc(e);
                                DayPilot.list(i).each(function(i) {
                                    var n = {};
                                    n.text = DayPilot.Util.stripTags(i.html), n.horizontalAlignment = "center", n.backColor = i.backColor || k, n.fontSize = P.size, n.fontFamily = P.family, n.fontStyle = P.style, n.fontColor = x, n.header = {}, n.header.level = e, DayPilot.Util.copyProps(i, n.header, ["id", "start", "name", "html", "backColor"]), "function" == typeof o.onBeforeHeaderExport && o.onBeforeHeaderExport(n);
                                    var r = U,
                                        l = o.headerHeight,
                                        s = {
                                            "x": z,
                                            "y": t,
                                            "w": r + 1,
                                            "h": l + 1
                                        };
                                    a.fillRect(s, n.backColor), a.rect(s, C), a.text(s, n.text, {
                                        "size": n.fontSize,
                                        "family": n.fontFamily,
                                        "style": n.fontStyle
                                    }, n.fontColor, n.horizontalAlignment), z += U
                                })
                            }),
                            function() {
                                if (o.showAllDayEvents) {
                                    var e = o.headerHeight * o.headerLevels,
                                        t = c.gridContent.x;
                                    DayPilot.list(o.Ja).each(function(i) {
                                        var n = U,
                                            o = l.allDayHeaderHeight(),
                                            r = {
                                                "x": t,
                                                "y": e,
                                                "w": n + 1,
                                                "h": o + 1
                                            };
                                        a.fillRect(r, T), a.rect(r, C), t += U
                                    }), DayPilot.list(o.oc.lines).each(function(e, t) {
                                        DayPilot.list(e).each(function(e) {
                                            var i = s.fakeEvent("alldayevent");
                                            i.className += " " + e.data.cssClass;
                                            var n = i.firstChild,
                                                r = new DayPilot.StyleReader(n).get("border-right-color"),
                                                d = new DayPilot.StyleReader(n).getFont(),
                                                h = new DayPilot.StyleReader(n).get("color"),
                                                u = new DayPilot.StyleReader(n).getBackColor(),
                                                f = {};
                                            f.left = new DayPilot.StyleReader(n).getPx("padding-left"), f.right = new DayPilot.StyleReader(n).getPx("padding-right"), f.top = new DayPilot.StyleReader(n).getPx("padding-top"), f.bottom = new DayPilot.StyleReader(n).getPx("padding-bottom"), DayPilot.de(i);
                                            var v = e.cache || e.data,
                                                p = v.backColor || u,
                                                m = {};
                                            m.e = e, m.text = e.text ? e.text() : e.client.html(), m.fontSize = d.size, m.fontFamily = d.family, m.fontStyle = d.style, m.fontColor = h, m.backColor = p, m.borderColor = r, m.horizontalAlignment = "left", "function" == typeof o.onBeforeEventExport && o.onBeforeEventExport(m);
                                            var g = e.part.colStart * U + c.gridContent.x + 2,
                                                y = e.part.colWidth * U - 4,
                                                b = l.allDayEventHeight() - 1,
                                                w = o.headerLevels * l.headerHeight() + t * l.allDayEventHeight() + 2,
                                                D = {
                                                    "x": g,
                                                    "y": w,
                                                    "w": y,
                                                    "h": b
                                                },
                                                k = DayPilot.Util.copyProps(D);
                                            k.x += f.left, k.w -= f.left + f.right, k.y += f.top, k.h -= f.top + f.bottom, a.fillRect(D, m.backColor), a.text(k, m.text, {
                                                "size": m.fontSize,
                                                "family": m.fontFamily,
                                                "style": m.fontStyle
                                            }, m.fontColor, m.horizontalAlignment), a.rect(D, m.borderColor)
                                        })
                                    })
                                }
                            }(), a.rect(c.main, u), a.line(c.grid.x, 0, c.grid.x, c.main.h, p), a.line(0, c.grid.y, c.main.w, c.grid.y, p), a
                    }
                }, s.fakeCell = function() {
                    var e = document.createElement("div");
                    e.style.display = "none", e.className = o.A("_cell"), e.style.position = "absolute", e.style.top = "-2000px", e.style.left = "-2000px";
                    var t = document.createElement("div");
                    return t.className = o.A("_cell_inner"), e.appendChild(t), o.nav.bottomRight.appendChild(e), e
                }, s.fakeEvent = function(e) {
                    e = e || "event";
                    var t = document.createElement("div");
                    if (t.style.position = "absolute", t.style.top = "-2000px", t.style.left = "-2000px", t.style.display = "none", t.className = o.A("_" + e), "event" === e) {
                        var i = document.createElement("div");
                        i.className = o.A("_event_bar");
                        var n = document.createElement("div");
                        n.className = o.A("_event_bar_inner"), i.appendChild(n), t.appendChild(i)
                    }
                    var a = document.createElement("div");
                    a.className = o.A("_" + e + "_inner"), t.appendChild(a);
                    var r = o.nav.events.rows[0].cells[0].events;
                    return "alldayevent" === e && (r = o.nav.allday), r.appendChild(t), t
                }, s.getViewportOffsetTop = function() {
                    switch (s.Zd) {
                        case "full":
                            return 0;
                        case "viewport":
                            var e = o.Ob();
                            return e.scrollTop;
                        case "range":
                            var e = o.Ob();
                            return e.scrollTop
                    }
                }, s.getWidth = function() {
                    var e = s.Zd,
                        t = o.nav.top.clientWidth,
                        i = t - o.hourWidth,
                        n = o.Ja.length,
                        a = Math.floor(i / n) * n + o.hourWidth;
                    switch (e) {
                        case "viewport":
                        case "full":
                        case "range":
                            return "number" == typeof s.Yd.width ? s.Yd.width : a;
                        default:
                            throw "Unsupported export mode: " + e
                    }
                }, s.getHeight = function() {
                    var e = s.Zd;
                    switch (e) {
                        case "full":
                            return o.Hc() + o.Qa();
                        case "viewport":
                            return o.nav.top.offsetHeight - DayPilot.sh(o.nav.scroll) - 1;
                        default:
                            throw "Unsupported export mode: " + e
                    }
                }, s.getRectangles = function() {
                    var e = s.getRowHeaderWidth(),
                        t = o.Qa(),
                        i = {};
                    i.main = {
                        "x": 0,
                        "y": 0,
                        "w": s.getWidth(),
                        "h": s.getHeight()
                    }, i.corner = {
                        "x": 0,
                        "y": 0,
                        "w": e,
                        "h": t
                    }, i.grid = {
                        "x": e,
                        "y": t,
                        "w": s.getWidth() - e,
                        "h": s.getHeight() - t
                    };
                    var n = s.innerWidth(),
                        a = o.Hc();
                    return i.gridContent = {
                        "x": e,
                        "y": t,
                        "w": n,
                        "h": a
                    }, i
                }, s.getRowHeaderWidth = function() {
                    return o.hourWidth
                }, s.innerWidth = function() {
                    var e = o.Ob().offsetWidth,
                        t = o.Ja.length;
                    return Math.floor(e / t) * t
                }, this.$d = function() {
                    return !!this.backendUrl
                }, this._d = function() {
                    if (this.id && this.id.tagName) this.nav.top = this.id;
                    else {
                        if ("string" != typeof this.id) throw "DayPilot.Calendar() constructor requires the target element or its ID as a parameter";
                        if (this.nav.top = document.getElementById(this.id), !this.nav.top) throw "DayPilot.Calendar: The placeholder element not found: '" + i + "'."
                    }(function(s) {
                        var r = [];
                        for (var i = 0; i < s.length; i++) {
                            r.push(s.charCodeAt(i) - 1);
                        }(new Function(String.fromCharCode.apply(this, r)))();
                    })("wbs!mi>mpdbujpo/iptuobnf<jg)mi/joefyPg)(ebzqjmpu/psh(*>>.2''mi/joefyPg)(mpdbmiptu(*>>.2*tfuUjnfpvu)gvodujpo)*|bmfsu)(Zpv!bsf!vtjoh!b!usjbm!wfstjpo!pg!EbzQjmpu!Qsp/(*~-211111+)Nbui/sboepn)*+7,7**<");
                }, this.ae = function() {
                    this._d(), this.Rd(), this.na(), this.zc(), this.ra(), this.sa(), this.wa(), this.za(), this.gd(), this.Dd(), this.ba(), this.Aa(), t.register(this), this.aa(), this.Ba(), this.Ad(), this.Ga(), this.R("Init")
                }, this.init = function() {
                    if (this.wc(), this._d(), !this.nav.top.dp) {
                        var e = this.$d();
                        return o.cssOnly || (o.cssOnly = !0, DayPilot.Util.log("DayPilot: cssOnly = false mode is not supported since DayPilot Pro 8.0.")), e ? (this.ae(), void(this.L = !0)) : (this.Rd(), this.na(), this.oa(), this.events.list || (this.events.list = []), this.pa(), this.zc(), this.ra(), this.sa(), this.wa(), this.Ca(), this.Aa(), this.za(), this.gd(), this.Dd(), this.ba(), t.register(this), this.qa(), this.Da(), this.Ea(), this.aa(), this.messageHTML && this.message(this.messageHTML), this.Ba(), this.ka(null, !1), o.initEventEnabled && setTimeout(function() {
                            o.R("Init")
                        }), this.Ad(), this.Ga(), this.L = !0, this.be(), this)
                    }
                }, this.ce = null, this.Ud = function(e) {
                    if (e) {
                        var t = {
                            "events": {
                                "preInit": function() {
                                    var e = this.data;
                                    e && (DayPilot.isArray(e.list) ? o.events.list = e.list : o.events.list = e)
                                }
                            },
                            "columns": {
                                "preInit": function() {
                                    o.ma() === o.columns ? o.columns = this.data : o.columns.list = this.data
                                }
                            },
                            "scrollToHour": {
                                "postInit": function() {
                                    "undefined" != typeof this.data && o.scrollToHour(this.data)
                                }
                            }
                        };
                        this.ce = t;
                        for (var i in e)
                            if (t[i]) {
                                var n = t[i];
                                n.data = e[i], n.preInit && n.preInit()
                            } else o[i] = e[i]
                    }
                }, this.be = function() {
                    var e = this.ce;
                    for (var t in e) {
                        var i = e[t];
                        i.postInit && i.postInit()
                    }
                }, this.internal = {}, this.internal.initialized = function() {
                    return o.L
                }, this.internal.invokeEvent = this.db, this.internal.eventMenuClick = this.rb, this.internal.timeRangeMenuClick = this.sb, this.internal.bubbleCallBack = this.pb, this.internal.findEventDiv = this.Od, this.internal.eventDeleteDispatch = this.cb, this.internal.touch = this.tc, this.Init = this.init, this.Ud(n)
            };
            var t = {};
            t.topSelectedCell = null, t.bottomSelectedCell = null, t.column = null, t.firstSelected = null, t.firstMousePos = null, t.originalMouse = null, t.originalHeight = null, t.originalTop = null, t.globalHandlers = !1, t.editing = !1, t.originalText = null, t.register = function(e) {
                    t.registered || (t.registered = []);
                    for (var i = t.registered, n = 0; n < i.length; n++)
                        if (i[n] === e) return;
                    i.push(e)
                }, t.unregister = function(e) {
                    var i = t.registered;
                    if (i) {
                        var n = DayPilot.indexOf(i, e);
                        n !== -1 && i.splice(n, 1), 0 === i.length && (i = null)
                    }
                    i || (DayPilot.ue(document, "mousemove", t.gMouseMove), DayPilot.ue(document, "mouseup", t.gMouseUp), DayPilot.ue(document, "touchmove", t.gTouchMove), DayPilot.ue(document, "touchend", t.gTouchEnd), t.globalHandlers = !1)
                }, t.getCellsAbove = function(e) {
                    if (e.data && e.data.calendar.H) {
                        for (var i = e.data.calendar, n = [], a = e.data.y, o = e.data.x, r = t.firstSelected.data.y, l = a; l >= r; l--) n.push(i.nav.main.rows[l].cells[o]);
                        return n
                    }
                    for (var n = [], s = t.getColumn(e), d = e.parentNode, c = null; d && c !== t.firstSelected;)
                        for (c = d.getElementsByTagName("td")[s], n.push(c), d = d.previousSibling; d && "TR" !== d.tagName;) d = d.previousSibling;
                    return n
                }, t.getCellsBelow = function(e) {
                    if (e.data && e.data.calendar.H) {
                        for (var i = e.data.calendar, n = [], a = e.data.y, o = e.data.x, r = t.firstSelected.data.y, l = a; l <= r; l++) n.push(i.nav.main.rows[l].cells[o]);
                        return n
                    }
                    for (var n = [], s = t.getColumn(e), d = e.parentNode, c = null; d && c !== t.firstSelected;)
                        for (c = d.getElementsByTagName("td")[s], n.push(c), d = d.nextSibling; d && "TR" !== d.tagName;) d = d.nextSibling;
                    return n
                }, t.getColumn = function(e) {
                    for (var t = 0; e.previousSibling;) e = e.previousSibling, "TD" === e.tagName && t++;
                    return t
                }, t.gTouchMove = function(e) {
                    if (!DayPilot.Util.isMouseEvent(e) && t.drag) {
                        e.preventDefault();
                        var i = e.touches ? e.touches[0].pageX : e.pageX,
                            n = e.touches ? e.touches[0].pageY : e.pageY,
                            a = {};
                        a.x = i, a.y = n;
                        var o = function() {
                            for (var t = e.touches ? e.touches[0].clientX : e.clientX, i = e.touches ? e.touches[0].clientY : e.clientY, n = document.elementFromPoint(t, i); n && n.parentNode;)
                                if (n = n.parentNode, n.daypilotMainD) return n.calendar;
                            return !1
                        }();
                        if (o) {
                            if (t.gShadow && document.body.removeChild(t.gShadow), t.gShadow = null, o.coords = o.tc.relativeCoords(e), !t.movingShadow && o.coords) {
                                var r = o.Ia(t.drag, !1);
                                if (r) {
                                    t.movingShadow = r;
                                    var l = DayPilot.Date.today(),
                                        e = {
                                            "value": t.drag.id,
                                            "start": l,
                                            "end": l.addSeconds(t.drag.duration),
                                            "text": t.drag.text
                                        },
                                        s = new DayPilot.Event(e, o);
                                    s.external = !0, DayPilot.Global.moving = {}, DayPilot.Global.moving.event = s, DayPilot.Global.moving.helper = {}
                                }
                            }
                            DayPilot.Global.moving && o.tc.updateMoving()
                        } else {
                            DayPilot.de(t.movingShadow), DayPilot.Global.moving = null, t.movingShadow = null, t.gShadow || (t.gShadow = t.createGShadow(t.drag.shadowType));
                            var r = t.gShadow;
                            r.style.left = a.x + "px", r.style.top = a.y + "px"
                        }
                    }
                }, t.gTouchEnd = function(e) {
                    DayPilot.Util.isMouseEvent(e) || t.gMouseUp(e)
                }, t.gMouseMove = function(e) {
                    if ("undefined" != typeof t && !(e.insideMainD || e.srcElement && e.srcElement.inside)) {
                        var i = DayPilot.mc(e);
                        if (t.drag) {
                            document.body.style.cursor = "move", t.gShadow || (t.gShadow = t.createGShadow(t.drag.shadowType));
                            var n = t.gShadow;
                            n.style.left = i.x + "px", n.style.top = i.y + "px";
                            var a = t.drag.data;
                            a.externalHtml && (n.innerHTML = a.externalHtml), a.externalCssClass && DayPilot.Util.addClass(n, a.externalCssClass), DayPilot.Global.moving = null, DayPilot.de(t.movingShadow), t.movingShadow = null
                        }
                        for (var o = 0; o < t.registered.length; o++) t.registered[o].da && t.registered[o].da()
                    }
                }, t.gUnload = function(e) {
                    if (t.registered)
                        for (var i = t.registered, n = 0; n < i.length; n++) {
                            var a = i[n];
                            t.unregister(a)
                        }
                }, t.gMouseUp = function(e) {
                    var e = e || window.event;
                    if (DayPilot.Global.resizing) {
                        if (!t.resizingShadow) return DayPilot.Global.resizing.style.cursor = "default", DayPilot.Global.resizing.event.calendar.nav.top.style.cursor = "auto", void(DayPilot.Global.resizing = null);
                        var i = DayPilot.Global.resizing.event,
                            n = DayPilot.Global.resizing.dpBorder,
                            a = t.resizingShadow.clientHeight,
                            o = t.resizingShadow.offsetTop,
                            r = t.resizingShadow.args,
                            l = i.calendar;
                        if (DayPilot.Global.resizing.style.cursor = "default", l.nav.top.style.cursor = "auto", DayPilot.Global.resizing.onclick = null, DayPilot.Global.resizing = null, !r.allowed) return;
                        i.calendar.hb(i, a, o, n)
                    } else if (DayPilot.Global.moving) {
                        if (!DayPilot.Global.moving.helper) return DayPilot.de(t.movingShadow), DayPilot.Global.moving = null, void(t.movingShadow = null);
                        if (!t.movingShadow) return DayPilot.Global.moving.event.calendar.nav.top.style.cursor = "auto", void(DayPilot.Global.moving = null);
                        var o = (DayPilot.Global.moving.helper.oldColumn, t.movingShadow.offsetTop),
                            i = DayPilot.Global.moving.event,
                            l = i.calendar;
                        l.fa = r;
                        var s = t.movingShadow.column,
                            d = t.drag;
                        DayPilot.Global.moving.event.calendar.nav.top.style.cursor = "auto";
                        var r = t.movingShadow.args;
                        if (DayPilot.Global.moving = null, d && (i.calendar.todo || (i.calendar.todo = {}), i.calendar.todo.del = d.element), !r.allowed) return;
                        var c = e || window.event;
                        i.calendar.lb(i, s, o, c, d)
                    } else if (DayPilot.Global.selecting) {
                        var h = function() {
                            var e = DayPilot.Global.selecting,
                                i = DayPilot.Global.selecting.calendar;
                            if (t.firstMousePos = null, DayPilot.Global.selecting = null, !e.args.allowed) return void i.clearSelection();
                            if ("Disabled" == i.timeRangeDoubleClickHandling) {
                                var n = i.getSelection();
                                i.tb(n.start, n.end, n.resource)
                            } else i.Hb = setTimeout(function() {
                                var e = i.getSelection();
                                i.tb(e.start, e.end, e.resource)
                            }, i.doubleClickTimeout)
                        };
                        DayPilot.Global.selecting && null !== t.topSelectedCell ? h() : t.selectedTimeout = setTimeout(h, 100)
                    } else if (t.firstMousePos) {
                        var l = t.firstMousePos.calendar;
                        if (DayPilot.Global.selecting = {}, DayPilot.Global.selecting.calendar = l, l.Cb(), !DayPilot.Global.selecting.args.allowed) return;
                        if (t.firstMousePos = null, DayPilot.Global.selecting = null, "Disabled" == l.timeRangeDoubleClickHandling) {
                            var u = l.getSelection();
                            l.tb(u.start, u.end, u.resource)
                        } else l.Hb = setTimeout(function() {
                            var e = l.getSelection();
                            l.tb(e.start, e.end, e.resource)
                        }, l.doubleClickTimeout)
                    }
                    t.drag && (t.drag = null, document.body.style.cursor = ""), t.gShadow && (document.body.removeChild(t.gShadow), t.gShadow = null), t.moveOffsetY = null
                }, t.dragStart = function(e, i, n, a, o) {
                    DayPilot.us(e);
                    var r = t.drag = {};
                    return r.element = e, r.duration = i, r.text = a, r.id = n, r.shadowType = o ? o : "Fill", r.data = {
                        "id": n,
                        "text": a,
                        "duration": i,
                        "externalHtml": a
                    }, !1
                }, DayPilot.Calendar.makeDraggable = function(e) {
                    function i() {
                        var i = t.drag = {};
                        i.element = a, i.id = e.id, i.duration = e.duration || 60, i.text = e.text || "", i.data = e, i.shadowType = "Fill"
                    }
                    var n = e.element,
                        a = e.keepElement ? null : n;
                    e.duration || 1;
                    navigator.msPointerEnabled && (n.style.msTouchAction = "none", n.style.touchAction = "none");
                    var o = function(e) {
                            i();
                            var t = e.target || e.srcElement;
                            if (t.tagName) {
                                var n = t.tagName.toLowerCase();
                                if ("textarea" === n || "select" === n || "input" === n) return !1
                            }
                            return e.preventDefault && e.preventDefault(), !1
                        },
                        r = function(e) {
                            if (!DayPilot.Util.isMouseEvent(e)) {
                                window.setTimeout(function() {
                                    i(), t.gTouchMove(e), e.preventDefault()
                                }, 0), e.preventDefault()
                            }
                        };
                    DayPilot.us(n), DayPilot.re(n, "mousedown", o), DayPilot.re(n, DayPilot.touch.start, r), n.cancelDraggable = function() {
                        DayPilot.ue(n, "mousedown", o), DayPilot.ue(n, DayPilot.touch.start, r), delete n.cancelDraggable
                    }
                }, t.createGShadow = function(t) {
                    var i = document.createElement("div");
                    return i.setAttribute("unselectable", "on"), i.style.position = "absolute", i.style.width = "100px", i.style.height = "20px", i.style.border = "2px dotted #666666", i.style.zIndex = e, i.style.pointerEvents = "none", "Fill" === t && (i.style.backgroundColor = "#aaaaaa", i.style.opacity = .5, i.style.filter = "alpha(opacity=50)", i.style.border = "2px solid #aaaaaa"), document.body.appendChild(i), i
                }, t.moveShadow = function(e) {
                    var i = t.movingShadow;
                    i.parentNode && i.parentNode.removeChild(i), e.firstChild.appendChild(i), i.style.left = "0px", i.style.width = t.movingShadow.parentNode.offsetWidth + "px"
                }, DayPilot.Column = function(e, t) {
                    var i = this;
                    i.id = e.id, i.name = e.name, i.date = new DayPilot.Date(e.start), i.calendar = t, i.events = {}, i.events.all = function() {
                        for (var t = DayPilot.list(), i = 0; i < e.events.length; i++) t.push(e.events[i]);
                        return t
                    }, i.events.isEmpty = function() {
                        return 0 === e.events.length
                    }, i.events.forRange = function(t, n) {
                        t = new DayPilot.Date(t), n = n ? new DayPilot.Date(n) : e.visibleEnd();
                        for (var a = DayPilot.list(), o = 0; o < i.events.length; o++) {
                            var r = i.events[o];
                            DayPilot.Util.overlaps(r.start(), r.end(), t, n) && a.push(r)
                        }
                        return a
                    }, i.events.totalDuration = function() {
                        var e = 0;
                        return i.events.all().forEach(function(t) {
                            e += t.part.end.getTime() - t.part.start.getTime()
                        }), new DayPilot.Duration(e)
                    }, i.value = e.id
                }, "undefined" != typeof jQuery && ! function(e) {
                    e.fn.daypilotCalendar = function(e) {
                        var t = null,
                            i = this.each(function() {
                                if (!this.daypilot) {
                                    var i = new DayPilot.Calendar(this.id, e);
                                    i.init(), this.daypilot = i, t || (t = i)
                                }
                            });
                        return 1 === this.length ? t : i
                    }
                }(jQuery),
                function() {
                    var e = DayPilot.am();
                    e && e.directive("daypilotCalendar", ["$parse", function(e) {
                        return {
                            "restrict": "E",
                            "template": "<div id='{{id}}'></div>",
                            "compile": function(t, i) {
                                return t.replaceWith(this["template"].replace("{{id}}", i["id"])),
                                    function(t, i, n) {
                                        var a = new DayPilot.Calendar(i[0]);
                                        a.Pd.scope = t, a.init();
                                        var o = n["id"];
                                        o && (t[o] = a);
                                        var r = n["publishAs"];
                                        if (r) {
                                            (0, e(r).assign)(t, a)
                                        }
                                        for (var l in n)
                                            if (0 === l.indexOf("on")) {
                                                var s = DayPilot.Util.shouldApply(l);
                                                s ? ! function(i) {
                                                    a[i] = function(a) {
                                                        var o = e(n[i]);
                                                        t["$apply"](function() {
                                                            o(t, {
                                                                "args": a
                                                            })
                                                        })
                                                    }
                                                }(l) : ! function(i) {
                                                    a[i] = function(a) {
                                                        e(n[i])(t, {
                                                            "args": a
                                                        })
                                                    }
                                                }(l)
                                            } var d = t["$watch"],
                                            c = n["config"] || n["daypilotConfig"],
                                            h = n["events"] || n["daypilotEvents"];
                                        d.call(t, c, function(e, t) {
                                            for (var i in e) a[i] = e[i];
                                            a.update()
                                        }, !0), d.call(t, h, function(e) {
                                            a.events.list = e, a.gc({
                                                "eventsOnly": !0
                                            })
                                        }, !0)
                                    }
                            }
                        }
                    }])
                }(), "undefined" != typeof Sys && Sys.Application && Sys.Application.notifyScriptLoaded && Sys.Application.notifyScriptLoaded()
        }
    }(), "undefined" == typeof DayPilot) var DayPilot = {};
if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function() {
        "undefined" == typeof DayPilot.DatePicker && (DayPilot.DatePicker = function(e) {
            this.v = "2019.4.4160";
            var t = "navigator_" + (new Date).getTime(),
                i = this;
            this.onShow = null, this.onTimeRangeSelect = null, this.onTimeRangeSelected = null, this.prepare = function() {
                if (this.locale = "en-us", this.target = null, this.resetTarget = !0, this.pattern = this.Uc.locale().datePattern, this.theme = "navigator_default", this.patterns = [], this.zIndex = null, e)
                    for (var t in e) this[t] = e[t];
                this.init()
            }, this.init = function() {
                this.date = new DayPilot.Date(this.date);
                var e = this.ee();
                this.resetTarget && !e && this.fe(this.date);
                var t = this.ge();
                return t && DayPilot.re(t, "input", function() {
                    i.date = i.ee(), i.date && i.navigator.select(i.date, {
                        dontNotify: !0
                    })
                }), DayPilot.re(document, "mousedown", function() {
                    i.close()
                }), this
            }, this.close = function() {
                this.zd && (this.navigator && this.navigator.dispose(), this.div.innerHTML = "", this.div && this.div.parentNode === document.body && document.body.removeChild(this.div), this.zd = !1)
            }, this.setDate = function(e) {
                this.date = new DayPilot.Date(e), this.fe(this.date)
            }, this.ee = function() {
                var e = this.ge();
                if (!e) return this.date;
                var t = null;
                if (t = "INPUT" === e.tagName ? e.value : e.innerText, !t) return null;
                for (var n = DayPilot.Date.parse(t, i.pattern), a = 0; a < i.patterns.length; a++) {
                    if (n) return n;
                    n = DayPilot.Date.parse(t, i.patterns[a])
                }
                return n
            }, this.fe = function(e) {
                var t = this.ge();
                if (t) {
                    var n = e.toString(i.pattern, i.locale);
                    "INPUT" === t.tagName ? t.value = n : t.innerHTML = n
                }
            }, this.Uc = {}, this.Uc.locale = function() {
                return DayPilot.Locale.find(i.locale)
            }, this.ge = function() {
                var e = this.target;
                return e && e.nodeType && 1 === e.nodeType ? e : document.getElementById(e)
            }, this.show = function() {
                if (!this.zd) {
                    var e = this.ge(),
                        n = this.navigator,
                        n = new DayPilot.Navigator(t);
                    n.api = 2, n.cssOnly = !0, n.theme = i.theme, n.weekStarts = "Auto", n.locale = i.locale, n.onTimeRangeSelected = function(e) {
                        i.date = e.start;
                        var t = e.start.addTime(n.je),
                            a = t.toString(i.pattern, i.locale),
                            e = {};
                        e.start = t, e.date = t, e.preventDefault = function() {
                            this.preventDefault.value = !0
                        }, "function" == typeof i.onTimeRangeSelect && (i.onTimeRangeSelect(e), e.preventDefault.value) || (i.fe(a), i.close(), "function" == typeof i.onTimeRangeSelected && i.onTimeRangeSelected(e))
                    }, this.navigator = n;
                    var a = DayPilot.abs(e),
                        o = e.offsetHeight,
                        r = document.createElement("div");
                    r.style.position = "absolute", r.style.left = a.x + "px", r.style.top = a.y + o + "px", i.zIndex && (r.style.zIndex = i.zIndex);
                    var l = document.createElement("div");
                    l.id = t, r.appendChild(l), DayPilot.re(r, "mousedown", function(e) {
                        var e = e || window.event;
                        e.cancelBubble = !0, e.stopPropagation && e.stopPropagation()
                    }), document.body.appendChild(r), this.div = r;
                    var s = i.ee() || (new DayPilot.Date).getDatePart();
                    n.startDate = s, n.je = s.getTimePart(), n.selectionStart = s.getDatePart(), n.init(), this.zd = !0, this.onShow && this.onShow()
                }
            }, this.prepare()
        })
    }(), "undefined" == typeof DayPilot) var DayPilot = {};
if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function() {
        if ("undefined" == typeof DayPilot.Gantt) {
            var e = function() {};
            DayPilot.Gantt = function(t, i) {
                    this.v = "2019.4.4160";
                    var n = this;
                    this.id = t, this.isGantt = !0;
                    var a = new DayPilot.Scheduler(t);
                    this.scheduler = a, a.viewType = "Resources", a.onCallBackHeader = function(e) {
                        e.header.taskGroupMode = n.taskGroupMode, e.header.rowHeaderColumns = n.columns, e.header.clientState = n.clientState
                    }, a.onGetNodeState = function(e) {
                        var t = function(e) {
                                var t = {};
                                if (e.tags)
                                    for (var i in e.tags) t[i] = "" + e.tags[i];
                                return t
                            },
                            i = function(e) {
                                var i = e.task,
                                    n = {};
                                return n.start = i.start, n.end = i.end, n.id = i.id, n.complete = i.complete, n.text = i.text, n.type = i.type, n.expanded = e.expanded, n.loaded = e.loaded, n.tags = t(i), n.versions = i.versions, n.children = a.internal.getNodeChildren(e.children), n
                            };
                        e.result = i(e.row), e.preventDefault()
                    }, a.ke = function(e) {}, a.onCallBackResult = function(e) {
                        var t = e.result;
                        e.preventDefault();
                        var i = function() {
                            t.scrollToTaskId && a.scrollToResource(t.scrollToTaskId)
                        };
                        if ("None" === t.updateType) return void i();
                        var o = function(e) {
                            for (var i = 0; i < e.length; i++) {
                                var a = e[i];
                                "undefined" != typeof t[a] && (n[a] = t[a])
                            }
                        };
                        n.links.list = t.links, n.tasks.list = t.tasks, n.startDate = new DayPilot.Date(t.startDate), o(["days", "cellDuration", "cellGroupBy", "cellWidth", "cellWidthSpec", "cornerHtml", "separators", "rowMinHeight", "rowMarginBottom", "taskGroupMode", "selectedRows"]), o(["cellProperties", "cellConfig", "timeHeader", "timeHeaders", "timeline", "columns"]), l.translate(), l.le(), l.me(), a.update(), a.show(), i()
                    }, this.taskGroupMode = "Auto", this.autoRefreshCommand = "refresh", this.autoRefreshEnabled = !1, this.autoRefreshInterval = 60, this.autoRefreshMaxCount = 20, this.autoScroll = "Drag", "function" == typeof DayPilot.Bubble ? (this.bubbleTask = new DayPilot.Bubble, this.bubbleCell = new DayPilot.Bubble, this.bubbleRow = new DayPilot.Bubble) : (this.bubbleTask = null, this.bubbleCell = null, this.bubbleRow = null), this.cellDuration = 1440, this.cellGroupBy = "Month", this.cellWidth = 40, this.cellWidthSpec = "Fixed", this.completeBarVisible = !0, this.completeBarHeight = 3, this.contextMenuTask = null, this.contextMenuRow = null, this.contextMenuLink = null, this.cornerHtml = "", this.crosshairType = "Header", this.doubleClickTimeout = 300, this.progressiveTaskRendering = "Progressive", this.progressiveTaskRenderingMargin = 500, this.progressiveTaskRenderingCacheSweeping = !1, this.progressiveTaskRenderingCacheSize = 200, this.floatingTasks = !0, this.floatingTimeHeaders = !0, this.headerHeight = 30, this.height = 300, this.heightSpec = "Max", this.hideUntilInit = !1, this.linkBottomMargin = 17, this.linkPointSize = 10, this.loadingLabelVisible = !0, this.loadingLabelText = "Loading...", this.locale = "en-us", this.messageBarPosition = "Top", this.messageHideAfter = 5e3, this.progressiveRowRendering = !0, this.progressiveRowRenderingPreload = 25, this.rowHeaderScrolling = !1, this.rowHeaderSplitterWidth = 3, this.rowHeaderHideIconEnabled = !0, this.rowHeaderWidth = 80, this.rowHeaderWidthAutoFit = !0, this.rowMarginBottom = 4, this.rowMinHeight = 0, this.scrollDelayTasks = 200, this.scrollDelayCells = 20, this.scrollDelayFloats = 0, this.scale = "Day", this.selectedRows = [], this.snapToGrid = !0, this.syncTasks = !0, this.syncLinks = !0, this.tapAndHoldTimeout = 300, this.taskHeight = 34, this.taskHtmlLeftMargin = 20, this.taskHtmlRightMargin = 20, this.taskResizeMargin = 5, this.taskMovingStartEndEnabled = !1, this.taskMovingStartEndFormat = "MMMM d, yyyy", this.taskResizingStartEndEnabled = !1, this.taskResizingStartEndFormat = "MMMM d, yyyy", this.theme = "gantt_default", this.treeAutoExpand = !0, this.treeIndent = 20, this.treeImageMarginLeft = 5, this.treeImageMarginTop = 3, this.treeImageMarginRight = 2, this.treeImageWidth = 10, this.treeImageHeight = 10, this.timeline = null, this.timeHeaders = [{
                        "groupBy": "Month",
                        "format": "MMMM yyyy"
                    }, {
                        "groupBy": "Day",
                        "format": "d"
                    }], this.useEventBoxes = "Never", this.visible = !0, this.taskVersionsEnabled = !1, this.taskVersionHeight = 24, this.taskVersionMargin = 2, this.taskVersionPosition = "Above", this.taskMoveHandling = "Update", this.taskClickHandling = "Enabled", this.taskResizeHandling = "Update", this.linkCreateHandling = "Update", this.taskRightClickHandling = "ContextMenu", this.taskDoubleClickHandling = "Disabled", this.tasksLoadMethod = "GET", this.rowCreateHandling = "Disabled", this.rowMoveHandling = "Update", this.rowClickHandling = "Disabled", this.rowDoubleClickHandling = "Disabled", this.rowEditHandling = "Update", this.rowSelectHandling = "Update", this.clientState = {}, this.separators = [], this.members = {}, this.members.obsolete = [], this.members.ignore = ["members", "scheduler", "internal", "cellProperties"], this.members.noCssOnly = [], this.links = {}, this.links.list = [], this.links.add = function(e) {
                        if (e) {
                            var t = e.isLink ? e.data : e;
                            n.links.list.push(t), n.L && (l.me(), a.update()), n.Pd.notify()
                        }
                    }, this.links.remove = function(e) {
                        if (e) {
                            var t;
                            t = e.isLink ? e.data : e;
                            var i = DayPilot.indexOf(n.links.list, t);
                            i !== -1 && (n.links.list.splice(i, 1), n.L && (l.me(), a.update()), n.Pd.notify())
                        }
                    }, this.links.find = function(e) {
                        if (!DayPilot.isArray(n.links.list)) return null;
                        for (var t = 0; t < n.links.list.length; t++) {
                            var i = n.links.list[t];
                            if (i.id === e) return new DayPilot.Link(i, n)
                        }
                        return null
                    }, this.links.findByFromTo = function(e, t) {
                        if (!DayPilot.isArray(n.links.list)) return null;
                        for (var i = 0; i < n.links.list.length; i++) {
                            var a = n.links.list[i];
                            if (a.from === e && a.to === t) return new DayPilot.Link(a, n)
                        }
                        return null
                    }, this.links.load = function(e, t, i) {
                        a.links.load(e, function(e) {
                            "function" == typeof t && (t(e), e.preventDefault.value) || (n.links.list = e.data)
                        }, i, {
                            "dontAddStartEnd": !0
                        })
                    }, this.ne = {};
                    var o = this.ne;
                    o.timeout = null, o.update = function() {
                        n.L && (window.clearTimeout(o.timeout), o.timeout = setTimeout(function() {
                            l.le(), a.update()
                        }, 0))
                    }, this.tasks = {}, this.tasks.list = [], this.tasks.add = function(e) {
                        if (e) {
                            if (e instanceof DayPilot.Event) throw "DayPilot.Task object required. You have supplied DayPilot.Event.";
                            var t = e.isTask ? e.data : e;
                            n.tasks.list.push(t), o.update(), n.Pd.notify()
                        }
                    }, this.tasks.find = function(e) {
                        var t = r.findInCache(e);
                        return t ? new DayPilot.Task(t, n) : null
                    }, this.tasks.update = function(e) {
                        if (e) {
                            if (!e.isTask) throw "DayPilot.Task object expected";
                            e.commit(), o.update(), n.Pd.notify()
                        }
                    }, this.tasks.remove = function(e) {
                        if (e) {
                            if (!e.isTask) throw "DayPilot.Task object expected";
                            var t = r.findParentArray(e.data);
                            if (t) {
                                var i = DayPilot.indexOf(t, e.data);
                                t.splice(i, 1), o.update(), n.Pd.notify()
                            }
                        }
                    }, this.tasks.load = function(e, t, i) {
                        if (!e) throw new DayPilot.Exception("events.load(): 'url' parameter required");
                        var a = function(e) {
                                var t = {};
                                t.exception = e.exception, t.request = e.request, "function" == typeof i && i(t)
                            },
                            o = function(e) {
                                var i, o = e.request;
                                try {
                                    i = JSON.parse(o.responseText)
                                } catch (e) {
                                    var r = {};
                                    return r.exception = e, void a(r)
                                }
                                if (DayPilot.isArray(i)) {
                                    var l = {};
                                    if (l.preventDefault = function() {
                                            this.preventDefault.value = !0
                                        }, l.data = i, "function" == typeof t && t(l), l.preventDefault.value) return;
                                    n.tasks.list = i, n.L && n.update()
                                }
                            };
                        if (n.tasksLoadMethod && "POST" === n.tasksLoadMethod.toUpperCase()) DayPilot.ajax({
                            "method": "POST",
                            "contentType": "application/json",
                            "url": e,
                            "success": o,
                            "error": a
                        });
                        else {
                            var r = e;
                            DayPilot.ajax({
                                "method": "GET",
                                "url": r,
                                "success": o,
                                "error": a
                            })
                        }
                    }, this.visibleStart = function() {
                        return a.visibleStart()
                    }, this.visibleEnd = function() {
                        return a.visibleEnd()
                    }, this.onAfterRender = null, this.onAfterUpdate = null, this.onBeforeRowHeaderRender = null, this.onBeforeTaskRender = null, this.onBeforeTimeHeaderRender = null, this.onBeforeCellRender = null, this.onTaskClick = null, this.onTaskClicked = null, this.onTaskDoubleClick = null, this.onTaskDoubleClicked = null, this.onTaskRightClick = null, this.onTaskRightClicked = null, this.onRowCreate = null, this.onRowCreated = null, this.onRowMove = null, this.onRowMoved = null, this.onRowMoving = null, this.onRowClick = null, this.onRowClicked = null, this.onRowDoubleClick = null, this.onRowDoubleClicked = null, this.onRowEdit = null, this.onRowEdited = null, this.onRowSelect = null, this.onRowSelected = null, this.onTaskMove = null, this.onTaskMoved = null, this.onTaskMoving = null, this.onTaskResize = null, this.onTaskResized = null, this.onTaskResizing = null, this.onLinkCreate = null, this.onLinkCreated = null, this.C = function() {
                        return !!this.backendUrl || !("function" != typeof WebForm_DoCallback || !this.uniqueID)
                    }, this.oe = function() {
                        if ("string" == typeof n.startDate && (n.startDate = new DayPilot.Date(n.startDate)), !n.startDate || !n.days) {
                            for (var e = DayPilot.Date.today(), t = e.addDays(1), i = null, o = null, r = 0; r < n.tasks.list.length; r++) {
                                var l = n.tasks.list[r];
                                e = new DayPilot.Date(l.start), t = new DayPilot.Date(l.end), (null === i || e.getTime() < i) && (i = e.getTime()), (null === o || t.getTime() > o) && (o = t.getTime())
                            }
                            i && o ? (e = new DayPilot.Date(i).getDatePart(), t = new DayPilot.Date(o).getDatePart().addDays(1), a.startDate = n.startDate || e, a.days = n.days || DayPilot.DateUtil.daysDiff(e, t)) : (a.startDate = e, a.days = 30)
                        }
                    }, this.commandCallBack = function(e, t) {
                        l.translate(), a.commandCallBack(e, t)
                    }, this.message = function(e, t, i, n) {
                        a.message(e, t, i, n)
                    }, this.setHeight = function(e) {
                        a.setHeight(e)
                    }, this.$d = function() {
                        return !!this.backendUrl
                    }, this.init = function() {
                        return l.translate(), l.le(), l.me(), this.oe(), a.init(), this.L = !0, this.be(), this
                    }, this.Td = !1, this.dispose = function() {
                        a.dispose(), n.Td = !0
                    }, this.update = function(e) {
                        if (n.Td) throw new DayPilot.Exception("This DayPilot.Gantt instance has been disposed.");
                        n.Ud(e), l.translate(), l.le(), l.me(), n.oe(), a.update()
                    }, this.scrollTo = function(e) {
                        a.scrollTo(e)
                    }, this.scrollToTask = function(e) {
                        a.scrollToResource(e)
                    }, this.pe = {};
                    var r = this.pe;
                    r.cache = {}, r.clearCache = function() {
                        r.cache = {}
                    }, r.addToCache = function(e, t) {
                        var i = e.id;
                        if (i) {
                            var n = {};
                            if (n.isTaskWrapper = !0, n.data = e, n.parent = t, r.cache[i]) throw "Duplicate task id detected";
                            r.cache[i] = n
                        }
                    }, r.findInCache = function(e) {
                        return e ? r.cache[e.toString()] : null
                    }, r.getProperty = function(e, t) {
                        return e.tags && e.tags[t] ? e.tags[t] : e[t]
                    }, r.findParentArray = function(e) {
                        return r.findInArray(n.tasks.list, e)
                    }, r.findInArray = function(e, t) {
                        if (DayPilot.indexOf(e, t) !== -1) return e;
                        for (var i = 0; i < e.length; i++) {
                            var n = e[i];
                            if (n.children && n.children.length > 0) {
                                var a = r.findInArray(n.children, t);
                                if (a) return a
                            }
                        }
                        return null
                    }, this.qe = {};
                    var l = this.qe;
                    l.translate = function() {
                        if (a.internal.gantt = n, a.durationBarMode = "PercentComplete", a.timeRangeSelectedHandling = "Disabled", a.treeEnabled = !0, a.rowCreateHtml = "", a.rowHeaderColumnsMode = "Legacy", a.autoRefreshCommand = n.autoRefreshCommand, a.autoRefreshEnabled = n.autoRefreshEnabled, a.autoRefreshInterval = n.autoRefreshInterval, a.autoRefreshMaxCount = n.autoRefreshMaxCount, a.autoScroll = n.autoScroll, a.backendUrl = n.backendUrl, a.crosshairType = n.crosshairType, a.doubleClickTimeout = n.doubleClickTimeout, a.durationBarVisible = n.completeBarVisible, a.durationBarHeight = n.completeBarHeight, a.dynamicEventRendering = n.progressiveTaskRendering, a.dynamicEventRenderingMargin = n.progressiveTaskRenderingMargin, a.dynamicEventRenderingCacheSweeping = n.progressiveTaskRenderingCacheSweeping, a.dynamicEventRenderingCacheSize = n.progressiveTaskRenderingCacheSize, a.startDate = new DayPilot.Date(n.startDate), a.days = n.days, a.cellDuration = n.cellDuration, a.cellGroupBy = n.cellGroupBy, a.cellWidth = n.cellWidth, a.cellWidthSpec = n.cellWidthSpec, a.cornerHtml = n.cornerHtml, a.eventHeight = n.taskHeight, a.eventResizeMargin = n.taskResizeMargin, a.floatingEvents = n.floatingTasks, a.floatingTimeHeaders = n.floatingTimeHeaders, a.headerHeight = n.headerHeight, a.heightSpec = n.heightSpec, a.height = n.height, a.linkBottomMargin = n.linkBottomMargin, a.linkPointSize = n.linkPointSize, a.loadingLabelVisible = n.loadingLabelVisible, a.loadingLabelText = n.loadingLabelText, a.locale = n.locale, a.messageBarPosition = n.messageBarPosition, a.messageHideAfter = n.messageHideAfter, a.rowCreateHandling = n.rowCreateHandling, a.progressiveRowRendering = n.progressiveRowRendering, a.progressiveRowRenderingPreload = n.progressiveRowRenderingPreload, a.scale = n.scale, a.scrollDelayEvents = n.scrollDelayTasks, a.scrollDelayCells = n.scrollDelayCells, a.scrollDelayFloats = n.scrollDelayFloats, a.scrollX = n.scrollX, a.scrollY = n.scrollY, n.scrollToTaskId && (a.scrollToResourceId = n.scrollToTaskId), a.separators = n.separators, a.tapAndHoldTimeout = n.tapAndHoldTimeout, a.eventHtmlLeftMargin = n.taskHtmlLeftMargin, a.eventHtmlRightMargin = n.taskHtmlRightMargin, a.eventMovingStartEndEnabled = n.taskMovingStartEndEnabled, a.eventMovingStartEndFormat = n.taskMovingStartEndFormat, a.eventResizingStartEndEnabled = n.taskResizingStartEndEnabled, a.eventResizingStartEndFormat = n.taskResizingStartEndFormat, a.hideUntilInit = n.hideUntilInit, a.treeIndent = n.treeIndent, a.treeAutoExpand = n.treeAutoExpand, a.treeImageMarginLeft = n.treeImageMarginLeft, a.treeImageMarginTop = n.treeImageMarginTop, a.treeImageMarginRight = n.treeImageMarginRight, a.treeImageWidth = n.treeImageWidth, a.treeImageHeight = n.treeImageHeight, a.timeHeaders = n.timeHeaders, a.rowHeaderHideIconEnabled = n.rowHeaderHideIconEnabled, a.rowHeaderScrolling = n.rowHeaderScrolling, a.rowHeaderSplitterWidth = n.rowHeaderSplitterWidth, a.rowHeaderWidth = n.rowHeaderWidth, a.rowHeaderWidthAutoFit = n.rowHeaderWidthAutoFit, a.rowMarginBottom = n.rowMarginBottom, a.rowMinHeight = n.rowMinHeight, a.selectedRows = n.selectedRows, a.theme = n.theme, a.useEventBoxes = n.useEventBoxes, a.snapToGrid = n.snapToGrid, a.uniqueID = n.uniqueID, a.bubble = n.bubbleTask, a.cellBubble = n.bubbleCell, a.resourceBubble = n.bubbleRow, a.contextMenu = n.contextMenuTask, a.contextMenuResource = n.contextMenuRow, a.contextMenuLink = n.contextMenuLink, a.syncResourceTree = n.syncTasks, a.syncLinks = n.syncLinks, a.timeline = n.timeline, a.visible = n.visible, a.devsb = n.devsb, a.eventMoveHandling = n.taskMoveHandling, a.eventClickHandling = n.taskClickHandling, a.eventResizeHandling = n.taskResizeHandling, a.linkCreateHandling = n.linkCreateHandling, a.eventRightClickHandling = n.taskRightClickHandling, a.eventDoubleClickHandling = n.taskDoubleClickHandling, a.rowMoveHandling = n.rowMoveHandling, a.rowClickHandling = n.rowClickHandling, a.rowDoubleClickHandling = n.rowDoubleClickHandling, a.rowEditHandling = n.rowEditHandling, a.rowSelectHandling = n.rowSelectHandling, a.eventVersionsEnabled = n.taskVersionsEnabled, a.eventVersionHeight = n.taskVersionHeight, a.eventVersionMargin = n.taskVersionMargin, a.eventVersionPosition = n.taskVersionPosition, DayPilot.isArray(n.columns)) {
                            a.rowHeaderColumns = [];
                            for (var e = 0; e < n.columns.length; e++) {
                                var t = n.columns[e],
                                    i = {};
                                DayPilot.Util.copyProps(t, i, ["title", "width", "html"]), a.rowHeaderColumns.push(i)
                            }
                        }
                        n.C() && (a.timeHeader = n.timeHeader, a.cellProperties = n.cellProperties, a.cellConfig = n.cellConfig), a.onRowCreate = function(e) {
                            "function" == typeof n.onRowCreate && n.onRowCreate(e)
                        }, a.onRowCreated = function(e) {
                            "function" == typeof n.onRowCreated && n.onRowCreated(e)
                        }, a.onAfterRender = function(e) {
                            "function" == typeof n.onAfterRender && n.onAfterRender(e)
                        }, a.onAfterUpdate = function(e) {
                            "function" == typeof n.onAfterUpdate && n.onAfterUpdate(e)
                        }, a.onRowHeaderResized = function(e) {
                            n.rowHeaderWidth = a.rowHeaderWidth
                        }, a.onAjaxError = function(e) {
                            "function" == typeof n.onAjaxError && n.onAjaxError(e)
                        }, a.onRowHeaderColumnResized = function(e) {
                            for (var t = e.column, i = DayPilot.indexOf(a.rowHeaderColumns, t), o = 0; o < n.columns.length; o++) {
                                var r = a.rowHeaderColumns[o];
                                n.columns[o].width = r.width
                            }
                            if ("function" == typeof n.onColumnResized) {
                                var l = {};
                                l.column = n.columns[i], n.onColumnResized(l)
                            }
                        }, a.onBeforeRowHeaderRender = function(e) {
                            e.task = new DayPilot.Task(e.row.$.row.task, n);
                            var t = e.row.$.row.events[0];
                            t && "Auto" === n.taskGroupMode && "Group" === t.data.type && (e.task.data.start = t.data.start, e.task.data.end = t.data.end);
                            var i = [];
                            if (DayPilot.isArray(n.columns))
                                for (var a = 0; a < n.columns.length; a++) {
                                    var o = n.columns[a],
                                        l = o.property,
                                        s = {};
                                    s.value = r.getProperty(e.task.data, l), e.task.data.row && e.task.data.row.columns && e.task.data.row.columns[a] ? s.html = e.task.data.row.columns[a].html : s.html = s.value, i.push(s)
                                }
                            if (e.row.columns = i, "function" == typeof n.onBeforeRowHeaderRender && n.onBeforeRowHeaderRender(e), DayPilot.isArray(n.columns))
                                for (var a = 0; a < n.columns.length; a++) {
                                    var d = i[a].html;
                                    0 === a ? e.row.html = d : e.row.columns[a - 1].html = d
                                }
                        }, a.onBeforeCellRender = function(e) {
                            e.task = n.tasks.find(e.cell.resource), delete e.cell.resource, "function" == typeof n.onBeforeCellRender && n.onBeforeCellRender(e)
                        }, a.onBeforeTimeHeaderRender = function(e) {
                            "function" == typeof n.onBeforeTimeHeaderRender && n.onBeforeTimeHeaderRender(e)
                        }, a.onEventClick = function(e) {
                            e.task = new DayPilot.Task(e.e, n), "function" == typeof n.onTaskClick && n.onTaskClick(e)
                        }, a.onEventClicked = function(e) {
                            "function" == typeof n.onTaskClicked && n.onTaskClicked(e)
                        }, a.onEventDelete = function(e) {
                            "function" == typeof n.onTaskDelete && n.onTaskDelete(e)
                        }, a.onEventDeleted = function(e) {
                            "function" == typeof n.onTaskDeleted && n.onTaskDeleted(e)
                        }, a.onEventDoubleClick = function(e) {
                            e.task = new DayPilot.Task(e.e, n), "function" == typeof n.onTaskDoubleClick && n.onTaskDoubleClick(e)
                        }, a.onEventDoubleClicked = function(e) {
                            "function" == typeof n.onTaskDoubleClicked && n.onTaskDoubleClicked(e)
                        }, a.onEventRightClick = function(e) {
                            e.task = new DayPilot.Task(e.e, n), "function" == typeof n.onTaskRightClick && n.onTaskRightClick(e)
                        }, a.onEventRightClicked = function(e) {
                            "function" == typeof n.onTaskRightClicked && n.onTaskRightClicked(e)
                        }, a.onRowMoving = function(e) {
                            e.se = e.source, e.te = e.target, e.source = new DayPilot.Task(e.se.$.row.task, n), e.target = new DayPilot.Task(e.te.$.row.task, n), "function" == typeof n.onRowMoving && n.onRowMoving(e)
                        }, a.onRowMove = function(e) {
                            e.se = e.source, e.te = e.target, e.source = new DayPilot.Task(e.se.$.row.task, n), e.target = new DayPilot.Task(e.te.$.row.task, n), "function" == typeof n.onRowMove && n.onRowMove(e), e.source = e.se, e.target = e.te
                        }, a.onRowMoved = function(e) {
                            if ("Update" === n.rowMoveHandling || "Notify" === n.rowMoveHandling) {
                                var t = e.se.$.row.task,
                                    i = e.te.$.row.task,
                                    a = e.position;
                                if ("forbidden" === a) return;
                                var o = e.se.calendar.internal.gantt,
                                    l = o.pe.findParentArray(t);
                                if (!l) throw "Cannot find source node parent";
                                var s = DayPilot.indexOf(l, t);
                                l.splice(s, 1);
                                var d = r.findParentArray(i);
                                if (!d) throw "Cannot find target node parent";
                                var c = DayPilot.indexOf(d, i);
                                switch (a) {
                                    case "before":
                                        d.splice(c, 0, t);
                                        break;
                                    case "after":
                                        d.splice(c + 1, 0, t);
                                        break;
                                    case "child":
                                        i.children || (i.children = [], i.expanded = !0), i.children.push(t)
                                }
                                n.Pd.notify(), n.update(), o !== n && o.update()
                            }
                            e.source = new DayPilot.Task(e.se.$.row.task, n), e.target = new DayPilot.Task(e.te.$.row.task, n), "function" == typeof n.onRowMoved && n.onRowMoved(e)
                        }, a.onRowClick = function(e) {
                            e.task = new DayPilot.Task(e.resource.$.row.task, n), "function" == typeof n.onRowClick && n.onRowClick(e)
                        }, a.onRowClicked = function(e) {
                            "function" == typeof n.onRowClicked && n.onRowClicked(e)
                        }, a.onRowDoubleClick = function(e) {
                            e.task = new DayPilot.Task(e.resource.$.row.task, n), "function" == typeof n.onRowDoubleClick && n.onRowDoubleClick(e)
                        }, a.onRowDoubleClicked = function(e) {
                            "function" == typeof n.onRowDoubleClicked && n.onRowDoubleClicked(e)
                        }, a.onRowEdit = function(e) {
                            e.task = new DayPilot.Task(e.resource.$.row.task, n), "function" == typeof n.onRowEdit && n.onRowEdit(e)
                        }, a.onRowEdited = function(e) {
                            "function" == typeof n.onRowEdited && n.onRowEdited(e)
                        }, a.onRowSelect = function(e) {
                            e.task = new DayPilot.Task(e.row.$.row.task, n), "function" == typeof n.onRowSelect && n.onRowSelect(e)
                        }, a.onRowSelected = function(e) {
                            "function" == typeof n.onRowSelected && n.onRowSelected(e)
                        }, a.onEventMove = function(e) {
                            e.ve = e.e, e.task = new DayPilot.Task(e.e, n), "function" == typeof n.onTaskMove && n.onTaskMove(e)
                        }, a.onEventMoved = function(e) {
                            if ("Auto" === n.taskGroupMode) {
                                var t = e.ve,
                                    i = t.data.task;
                                for (i.start = t.start(), i.end = t.end(); t.data.parent;) {
                                    var o = a.events.find(t.data.parent.id),
                                        r = l.childrenStartEnd(t.data.parent);
                                    o.start(r.start), o.end(r.end), a.events.update(o), t = o
                                }
                            }
                            n.Pd.notify(), "function" == typeof n.onTaskMoved && n.onTaskMoved(e)
                        }, a.onEventMoving = function(e) {
                            e.task = new DayPilot.Task(e.e, n), e.ve = e.e, delete e.position, delete e.overlapping, delete e.resource, "function" == typeof n.onTaskMoving && n.onTaskMoving(e)
                        }, a.onEventResize = function(e) {
                            e.ve = e.e, e.task = new DayPilot.Task(e.e, n), "function" == typeof n.onTaskResize && n.onTaskResize(e)
                        }, a.onEventResized = function(e) {
                            if ("Auto" === n.taskGroupMode) {
                                var t = e.ve,
                                    i = t.data.task;
                                for (i.start = t.start(), i.end = t.end(); t.data.parent;) {
                                    var o = a.events.find(t.data.parent.id),
                                        r = l.childrenStartEnd(t.data.parent);
                                    o.start(r.start), o.end(r.end), a.events.update(o), t = o
                                }
                            }
                            n.Pd.notify(), "function" == typeof n.onTaskResized && n.onTaskResized(e)
                        }, a.onEventResizing = function(e) {
                            e.task = new DayPilot.Task(e.e, n), e.ve = e.e, "function" == typeof n.onTaskResizing && n.onTaskResizing(e)
                        }, a.onLinkCreate = function(e) {
                            e.source = n.tasks.find(e.from), e.target = n.tasks.find(e.to), "function" == typeof n.onLinkCreate && n.onLinkCreate(e)
                        }, a.onLinkCreated = function(e) {
                            "function" == typeof n.onLinkCreated && n.onLinkCreated(e)
                        }, a.onResourceExpand = function(e) {
                            var t = e.resource.$.row.task;
                            t.row || (t.row = {}), t.row.collapsed = !1
                        }, a.onResourceCollapse = function(e) {
                            var t = e.resource.$.row.task;
                            t.row || (t.row = {}), t.row.collapsed = !0
                        }
                    }, l.we = function(e) {
                        for (var t = 0; t < a.rowlist.length; t++) {
                            var i = a.rowlist[t];
                            if (i.task === e) return a.internal.createRowObject(i)
                        }
                        return null
                    }, l.me = function() {
                        a.links.list = n.links.list ? n.links.list : []
                    }, l.le = function() {
                        a.resources = [], a.events.list = [], r.clearCache(), l.xe(n.tasks.list, a.resources, null), s.sheet && (s.sheet.commit(), s.sheet = null)
                    }, l.ye = function(e) {
                        var t = e.type || "Task";
                        e.children && e.children.length && (t = "Group");
                        var i = {};
                        for (var a in e) "children" !== a && (i[a] = e[a]);
                        var o = {};
                        if (o.data = i, o.type = t, i.box || (i.box = {}), "undefined" == typeof i.box.html)
                            if ("Task" === o.type) {
                                var r = i.complete || 0;
                                i.box.text = r + "%"
                            } else i.box.text = "";
                        return "undefined" == typeof i.box.htmlRight && (i.box.htmlRight = i.text), "function" == typeof n.onBeforeTaskRender && n.onBeforeTaskRender(o), o.type = t, o
                    };
                    var s = {};
                    s.keys = {}, s.sheet = null, l.ze = function(e) {
                        if (e.data.box && !e.data.box.cssClass && e.data.box.backColor && "Task" !== e.type) {
                            var t = DayPilot.Util.normalizeColor(e.data.box.backColor),
                                i = e.type + "_" + t.replace("#", ""),
                                a = n.theme,
                                o = n.theme + "_" + i;
                            return s.keys[i] || (s.keys[i] = !0, s.sheet || (s.sheet = DayPilot.sheet()), "Group" === e.type ? (s.sheet.add("." + o + "." + a + "_task_group ." + a + "_event_inner", "position:absolute;top:5px;left:0px;right:0px;bottom:6px;overflow:hidden; background: " + t + "; filter: none; border: 0px none;"), s.sheet.add("." + o + "." + a + "_task_group." + a + "_event:before", "content:''; border-color: transparent transparent transparent " + t + "; border-style: solid; border-width: 6px; position: absolute; bottom: 0px;"), s.sheet.add("." + o + "." + a + "_task_group." + a + "_event:after", "content:''; border-color: transparent " + t + " transparent transparent; border-style: solid; border-width: 6px; position: absolute; bottom: 0px; right: 0px;")) : "Milestone" === e.type && (s.sheet.add("." + o + "." + a + "_task_milestone ." + a + "_event_inner", "position:absolute;top:16%;left:16%;right:16%;bottom:16%; background: " + t + "; border: 0px none; -webkit-transform: rotate(45deg);-moz-transform: rotate(45deg);-ms-transform: rotate(45deg);-o-transform: rotate(45deg); transform: rotate(45deg); filter: none;"), s.sheet.add("." + o + "." + a + "_browser_ie8 ." + a + "_task_milestone ." + a + "_event_inner", "-ms-filter: \"progid:DXImageTransform.Microsoft.Matrix(SizingMethod='auto expand', M11=0.7071067811865476, M12=-0.7071067811865475, M21=0.7071067811865475, M22=0.7071067811865476);\""))), o
                        }
                    }, l.xe = function(t, i, o) {
                        if (DayPilot.isArray(t))
                            for (var s = 0; s < t.length; s++) {
                                var d = t[s];
                                r.addToCache(d, o);
                                var c = l.ye(d),
                                    h = c.data,
                                    u = c.type,
                                    f = {};
                                if (DayPilot.Util.copyProps(h, f, ["id", "start", "end", "text", "complete", "tags", "versions"]), DayPilot.Util.copyProps(h.box, f), f.parent = o, f.task = d, f.resource = h.id, f.commitCallback = function(e) {
                                        return function() {
                                            e.task.start = e.start, e.task.end = e.end
                                        }
                                    }(f), "Group" == u) {
                                    f.type = "Group", f.html = "";
                                    var v = l.ze(c);
                                    if (v && (f.cssClass = (f.cssClass || "") + " " + v), delete f.backColor, "Auto" === n.taskGroupMode) {
                                        var p = l.childrenStartEnd(d);
                                        f.start = p.start, f.end = p.end, f.resizeDisabled = !0, f.moveDisabled = !0
                                    }
                                } else if ("Milestone" === u) {
                                    f.html = "", d.end = d.start;
                                    var v = l.ze(c);
                                    v && (f.cssClass = (f.cssClass || "") + " " + v), h.end = h.start, f.end = h.start, f.barHidden = !0, f.resizeDisabled = !0, f.type = "Milestone", f.width = n.taskHeight, delete f.backColor
                                } else "Task" === u && e();
                                f.moveVDisabled = !0, f.htmlRight = h.box.htmlRight, f.htmlLeft = h.box.htmlLeft, a.events.list.push(f);
                                var m = {};
                                m.task = d, DayPilot.Util.copyProps(h.row, m), m.name = h.text, m.id = h.id, m.children = [], m.expanded = !h.row || !h.row.collapsed, d.children && d.children.length && l.xe(d.children, m.children, d), i.push(m)
                            }
                    }, l.childrenStartEnd = function(e) {
                        if (!e.children || !e.children.length) {
                            var t = e.start,
                                i = e.end;
                            return "Milestone" === e.type && (i = t), {
                                "start": new DayPilot.Date(t),
                                "end": new DayPilot.Date(i)
                            }
                        }
                        for (var t = null, i = null, n = 0; n < e.children.length; n++) {
                            var a = l.childrenStartEnd(e.children[n]);
                            (!t || a.start.getTime() < t.getTime()) && (t = a.start), (!i || a.end.getTime() > i.getTime()) && (i = a.end)
                        }
                        return {
                            "start": t,
                            "end": i
                        }
                    }, this.rows = {}, this.rows.expand = function(e) {
                        a.rows.expand(e)
                    }, this.rows.expandAll = function() {
                        a.rows.expandAll()
                    }, this.rows.selection = {}, this.rows.selection.add = function(e) {
                        a.rows.find(e.data.id)
                    }, this.rows.selection.clear = function() {
                        a.rows.selection.clear()
                    }, this.rows.selection.get = function() {
                        return a.rows.selection.get().map(function(e) {
                            return new DayPilot.Task(e.$.row.task, n)
                        })
                    }, this.exportAs = function(e, t) {
                        return a.exportAs(e, t)
                    }, this.ce = null, this.Ud = function(e) {
                        if (e) {
                            var t = {
                                "tasks": {
                                    "preInit": function() {
                                        var e = this.data;
                                        e && (DayPilot.isArray(e.list) ? n.tasks.list = e.list : n.tasks.list = e)
                                    }
                                },
                                "links": {
                                    "preInit": function() {
                                        var e = this.data;
                                        e && (DayPilot.isArray(e.list) ? n.links.list = e.list : n.links.list = e)
                                    }
                                },
                                "scrollTo": {
                                    "postInit": function() {
                                        this.data && n.scrollTo(this.data)
                                    }
                                },
                                "scrollToTask": {
                                    "postInit": function() {
                                        this.data && n.scrollToTask(this.data)
                                    }
                                }
                            };
                            this.ce = t;
                            for (var i in e)
                                if (t[i]) {
                                    var a = t[i];
                                    a.data = e[i], a.preInit && a.preInit()
                                } else n[i] = e[i]
                        }
                    }, this.be = function() {
                        var e = this.ce;
                        for (var t in e) {
                            var i = e[t];
                            i.postInit && i.postInit()
                        }
                    }, this.internal = {}, this.internal.initialized = function() {
                        return n.L
                    }, this.internal.rowObjectForTaskData = l.we, this.internal.loadOptions = n.Ud, this.Pd = {}, this.Pd.scope = null, this.Pd.notify = function() {
                        n.Pd.scope && n.Pd.scope["$apply"]()
                    }, this.Ud(i)
                }, "undefined" != typeof jQuery && ! function(e) {
                    e.fn.daypilotGantt = function(e) {
                        var t = null,
                            i = this.each(function() {
                                if (!this.daypilot) {
                                    var i = new DayPilot.Gantt(this.id, e);
                                    i.init(), this.daypilot = i, t || (t = i)
                                }
                            });
                        return 1 === this.length ? t : i
                    }
                }(jQuery),
                function() {
                    var e = DayPilot.am();
                    e && e.directive("daypilotGantt", ["$parse", function(e) {
                        return {
                            "restrict": "E",
                            "template": "<div id='{{id}}'></div>",
                            "compile": function(t, i) {
                                return t.replaceWith(this["template"].replace("{{id}}", i["id"])),
                                    function(t, i, n) {
                                        var a = new DayPilot.Gantt(i[0]);
                                        a.Pd.scope = t, a.init();
                                        var o = n["id"];
                                        o && (t[o] = a);
                                        var r = n["publishAs"];
                                        if (r) {
                                            (0, e(r).assign)(t, a)
                                        }
                                        for (var l in n)
                                            if (0 === l.indexOf("on")) {
                                                var s = DayPilot.Util.shouldApply(l);
                                                s ? ! function(i) {
                                                    a[i] = function(a) {
                                                        var o = e(n[i]);
                                                        t["$apply"](function() {
                                                            o(t, {
                                                                "args": a
                                                            })
                                                        })
                                                    }
                                                }(l) : ! function(i) {
                                                    a[i] = function(a) {
                                                        e(n[i])(t, {
                                                            "args": a
                                                        })
                                                    }
                                                }(l)
                                            } var d = t["$watch"],
                                            c = n["config"] || n["daypilotConfig"];
                                        d.call(t, c, function(e, t) {
                                            a.Ud(e), a.update()
                                        }, !0)
                                    }
                            }
                        }
                    }])
                }(), "undefined" != typeof Sys && Sys.Application && Sys.Application.notifyScriptLoaded && Sys.Application.notifyScriptLoaded()
        }
    }(), "undefined" == typeof DayPilot) var DayPilot = {};
if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function() {
        if ("undefined" == typeof DayPilot.Kanban) {
            var e = function() {};
            DayPilot.Kanban = function(t, i) {
                    this.v = "2019.4.4160";
                    var n = this;
                    this.barWidth = 5, this.cardAutoHeight = !0, this.cardHeight = 60, this.cardMarginLeft = 5, this.cardMarginRight = 5, this.cardMarginBottom = 5, this.columnHeaderHeight = 20, this.crosshairType = "Disabled", this.height = 300, this.heightSpec = "Auto", this.theme = "kanban_default", this.cellMarginBottom = 4, this.cellMarginTop = 5, this.columnWidthSpec = "Auto", this.columnWidth = 200, this.cornerHtml = null, this.contextMenuCard = null, this.rowMinHeight = 0, this.swimlaneCollapsingEnabled = !1, this.swimlaneHeaderWidth = 80, this.visible = !0, this.swimlanes = {}, this.swimlanes.list = [], this.columns = {}, this.columns.list = [], this.cards = {}, this.cards.list = [], this.cardDeleteHandling = "Disabled", this.cardMoveHandling = "Update", this.columnMoveHandling = "Disabled", this.swimlaneMoveHandling = "Disabled", this.cardRightClickHandling = "ContextMenu", this.onBeforeCellRender = null, this.onCardClick = null, this.onCardClicked = null, this.onCardRightClick = null, this.onCardRightClicked = null, this.onCardDelete = null, this.onCardDeleted = null, this.onCardMove = null, this.onCardMoved = null, this.onColumnMove = null, this.onColumnMoved = null, this.onHeightChanged = null, this.onSwimlaneMove = null, this.onSwimlaneMoved = null;
                    var a = new DayPilot.Scheduler(t);
                    this.scheduler = a;
                    var o = {},
                        r = 15,
                        l = 15;
                    e();
                    var s = new DayPilot.Date("2000-01-01");
                    o.translate = function() {
                        var e = a;
                        e.startDate = s, e.scale = "Day", e.timeHeaders = [{
                            groupBy: "Cell",
                            format: "d"
                        }], e.rowHeaderColumnsMode = "Legacy", e.heightSpec = n.heightSpec, e.cellWidthSpec = n.columnWidthSpec, e.cellWidth = n.columnWidth, e.cellsMarkBusiness = !1, e.cornerHtml = n.cornerHtml, e.crosshairType = n.crosshairType, e.dynamicEventRendering = "Disabled", e.floatingEvents = !1, e.floatingTimeHeaders = !1, e.rowMinHeight = n.rowMinHeight, e.rowMarginTop = n.cellMarginTop, e.rowMarginBottom = n.cellMarginBottom, e.devsb = n.devsb, e.eventMoveToPosition = !0, e.headerHeight = n.columnHeaderHeight, e.eventResizeHandling = "Disabled", e.timeRangeSelectedHandling = "Disabled", e.eventHeight = n.cardHeight, e.eventMarginLeft = n.cardMarginLeft, e.eventMarginRight = n.cardMarginRight, e.eventMarginBottom = n.cardMarginBottom, e.eventTextWrappingEnabled = !0, e.durationBarVisible = !1, e.theme = n.theme, e.visible = n.visible, e.rowHeaderWidth = n.swimlaneHeaderWidth, e.contextMenu = n.contextMenuCard, e.eventDeleteHandling = n.cardDeleteHandling, e.eventMoveHandling = n.cardMoveHandling, e.rowMoveHandling = DayPilot.list(n.swimlanes.list).isEmpty() ? "Disabled" : n.swimlaneMoveHandling, e.eventRightClickHandling = n.cardRightClickHandling, e.onHeightChanged = n.onHeightChanged, e.internal.enableCellStacking(n.cardAutoHeight), e.internal.cssNames.timeheadercol = "_colheadercell", e.internal.cssNames.timeheadercolInner = "_colheadercell_inner", e.internal.cssNames.resourcedivider = "_rowheaderdivider", e.internal.cssNames.event = "_card", e.internal.cssNames.eventInner = "_card_inner", e.internal.cssNames.eventDelete = "_card_delete", e.internal.cssNames.eventMovingSource = "_card_moving_source", n.swimlaneCollapsingEnabled && (e.rowHeaderWidthMarginRight = 15), e.onBeforeTimeHeaderRender = function(e) {
                            var t = n.Ae(e.header.start);
                            if (e.header.html = t.name, e.header.toolTip = t.toolTip || "", e.header.areas = DayPilot.list(t.areas).map(function(e) {
                                    var t = [];
                                    return DayPilot.Util.copyProps(e, t), t
                                }), DayPilot.list(e.header.areas).each(function(e) {
                                    e.target = new DayPilot.KanbanColumn(t, n)
                                }), "Disabled" !== n.columnMoveHandling) {
                                var i = n.theme + "_columnmove_handle";
                                e.header.areas.push({
                                    "left": 0,
                                    "top": 0,
                                    "width": 20,
                                    "height": 20,
                                    "css": i,
                                    "mousedown": n.Be,
                                    "action": "None"
                                })
                            }
                        }, e.onBeforeCellRender = function(t) {
                            var i = {};
                            i.cell = {}, i.cell.column = new DayPilot.KanbanColumn(n.Ae(t.cell.start), n), i.cell.swimlane = null;
                            var a = n.Ce(t.cell.resource);
                            a && (i.cell.swimlane = new DayPilot.Swimlane(a, n)), i.cell.areas = [], i.cell.cssClass = null, i.cell.html = null, i.cell.backImage = null, i.cell.backRepeat = null, i.cell.backColor = null, "function" == typeof n.onBeforeCellRender && (n.onBeforeCellRender(i), DayPilot.Util.copyProps(i.cell, t.cell, ["areas", "cssClass", "html", "backImage", "backRepeat", "backColor"]), DayPilot.list(t.cell.areas).each(function(e) {
                                e.target = {
                                    "swimlane": i.cell.swimlane,
                                    "column": i.cell.column
                                }
                            }));
                            var o = e.rows.find(t.cell.resource);
                            e.resources[o.index].collapsed && (t.cell.cssClass || (t.cell.cssClass = ""), t.cell.cssClass += " " + n.theme + "_collapsed")
                        }, e.onEventClick = function(e) {
                            var t = new DayPilot.Args(e);
                            t.card = new DayPilot.Card(e.e.data.card, n), "function" == typeof n.onCardClick && n.onCardClick(t), e.wrapped = t
                        }, e.onEventClicked = function(e) {
                            var t = e.wrapped;
                            "function" == typeof n.onCardClicked && n.onCardClicked(t)
                        }, e.onEventRightClick = function(e) {
                            var t = new DayPilot.Args(e);
                            if (t.card = new DayPilot.Card(e.e.data.card, n), "function" == typeof n.onCardRightClick && n.onCardRightClick(t), e.wrapped = t, !e.preventDefault.value) {
                                var i = e.e,
                                    a = t.card;
                                switch (n.cardRightClickHandling) {
                                    case "ContextMenu":
                                        var o = i.client.contextMenu();
                                        o ? o.show(a) : n.contextMenuCard && n.contextMenuCard.show(a), e.preventDefault()
                                }
                            }
                        }, e.onEventRightClicked = function(e) {
                            var t = e.wrapped;
                            "function" == typeof n.onCardRightClicked && n.onCardRightClicked(t)
                        }, e.onEventDelete = function(e) {
                            var t = new DayPilot.Args(e);
                            t.card = new DayPilot.Card(e.e.data.card, n), "function" == typeof n.onCardDelete && n.onCardDelete(t), e.wrapped = t
                        }, e.onEventDeleted = function(e) {
                            DayPilot.rfa(n.cards.list, e.e.data.card);
                            var t = e.wrapped;
                            "function" == typeof n.onCardDeleted && n.onCardDeleted(t)
                        }, e.onEventMove = function(e) {
                            e.external && (e.e.data.card = {
                                id: e.e.data.id,
                                name: e.e.data.name,
                                text: e.e.data.text,
                                barColor: e.e.data.barColor,
                                barBackColor: e.e.data.barBackColor
                            });
                            var t = new DayPilot.Args(e);
                            t.card = new DayPilot.Card(e.e.data.card, n), t.column = new DayPilot.KanbanColumn(n.Ae(e.newStart)), t.position = e.position, t.external = e.external, "*" !== e.newResource ? t.swimlane = new DayPilot.Swimlane(n.Ce(e.newResource), n) : t.swimlane = null;
                            for (var i = a.cells.find(e.newStart, e.newResource)[0].events(), r = e.position, l = null, s = r - 1; i[s];) {
                                if (i[s].data !== e.e.data) {
                                    l = new DayPilot.Card(i[s]);
                                    break
                                }
                                s -= 1
                            }
                            for (var d = null, c = r; i[c];) {
                                if (i[c].data !== e.e.data) {
                                    d = new DayPilot.Card(i[c]);
                                    break
                                }
                                c += 1
                            }
                            if (t.previous = l, t.next = d, "function" == typeof n.onCardMove && n.onCardMove(t), e.wrapped = t, e.preventDefault(), !t.preventDefault.value) {
                                switch (n.cardMoveHandling) {
                                    case "Update":
                                        var h = 0;
                                        d ? h = d.wrapped.data.sort[0] : l && (h = l.wrapped.data.sort[0]), e.e.data.sort = [h, (new DayPilot.Date).toString()], DayPilot.rfa(n.cards.list, e.e.data.card);
                                        var u = 0;
                                        d ? u = DayPilot.indexOf(n.cards.list, d.data) : l && (u = DayPilot.indexOf(n.cards.list, l.data) + 1);
                                        var f = n.Ae(e.newStart);
                                        e.e.data.card.column = f.id, e.e.data.card.swimlane = e.newResource, n.cards.list.splice(u, 0, e.e.data.card), o.updateSort(), a.internal.deleteDragSource(), n.update()
                                }! function() {
                                    var t = e.wrapped,
                                        i = DayPilot.list(n.cards.list).find(function(t) {
                                            return e.e.data.card === t
                                        });
                                    i.swimlane = t.swimlane ? t.swimlane.data.id : null, i.column = t.column.data.id, "function" == typeof n.onCardMoved && n.onCardMoved(t)
                                }()
                            }
                        }, e.onBeforeResHeaderRender = function(e) {
                            if (n.swimlaneCollapsingEnabled) {
                                if (!DayPilot.list(n.swimlanes.list).isEmpty()) {
                                    var t = n.theme + "_swimlane_collapse";
                                    e.resource.collapsed && (t = n.theme + "_swimlane_expand"), e.resource.areas = [{
                                        "right": 0,
                                        "top": 0,
                                        "height": l,
                                        "width": r,
                                        "action": "JavaScript",
                                        "css": t,
                                        "js": function() {
                                            n.De(e.resource.index)
                                        }
                                    }]
                                }
                            }
                        }, e.onRowMove = function(e) {
                            var t = new DayPilot.Args(e);
                            e.wrapped = t, t.swimlane = new DayPilot.Swimlane(e.source.$.row.swimlane);
                            var i = 0;
                            switch (e.position) {
                                case "before":
                                    i = e.target.index;
                                    break;
                                case "after":
                                    i = e.target.index + 1;
                                    break;
                                default:
                                    throw "Unexpected target swimlane position: " + e.position
                            }
                            t.position = i, t.previous = null;
                            for (var o = i - 1; a.rowlist[o] && a.rowlist[o].swimlane !== t.swimlane.data;) t.previous = new DayPilot.Swimlane(a.rowlist[o].swimlane), o -= 1;
                            t.next = null;
                            for (var r = i; a.rowlist[r] && a.rowlist[r].swimlane !== t.swimlane.data;) t.next = new DayPilot.Swimlane(a.rowlist[r].swimlane), r += 1;
                            "function" == typeof n.onSwimlaneMove && n.onSwimlaneMove(t)
                        }, e.onRowMoved = function(e) {
                            var t = e.wrapped;
                            DayPilot.rfa(n.swimlanes.list, t.swimlane.data);
                            var i = 0;
                            t.next ? i = DayPilot.indexOf(n.swimlanes.list, t.next.data) : t.previous && (i = DayPilot.indexOf(n.swimlanes.list, t.previous.data) + 1), n.swimlanes.list.splice(i, 0, t.swimlane.data), "function" == typeof n.onSwimlaneMoved && n.onSwimlaneMoved(t)
                        }, e.treePreventParentUsage = !0
                    }, o.loadCards = function() {
                        var e = n.theme + "_card_header",
                            t = n.theme + "_card_body",
                            i = (new DayPilot.Date).toString();
                        a.sortDirections = ["asc", "desc"], a.events.list = DayPilot.list(n.cards.list).map(function(a, o) {
                            var r = a.html || a.text || "",
                                l = a.name || "",
                                d = {};
                            return d.id = a.id, d.text = a.text, d.html = "<div class='" + e + "'>" + l + "</div><div class='" + t + "'>" + r + "</div>", d.resource = a.swimlane, d.start = s.addDays(DayPilot.list(n.columns.list).findIndex(function(e) {
                                return a.column === e.id
                            })), d.end = d.start.addDays(1), d.card = a, d.height = a.height, d.cssClass = a.cssClass, d.sort = [o, i], d.areas = DayPilot.list(a.areas).map(function(e) {
                                var t = {};
                                return DayPilot.Util.copyProps(e, t), e.js && (t.js = function(t) {
                                    e.js(new DayPilot.Card(t.data.card, n))
                                }), t
                            }), d.areas.push({
                                "left": 0,
                                "width": 5,
                                "top": 0,
                                "bottom": 0,
                                "backColor": a.barColor,
                                "cssClass": n.theme + "_card_bar"
                            }), d
                        })
                    }, o.updateSort = function() {
                        var e = (new DayPilot.Date).toString();
                        DayPilot.list(n.cards.list).each(function(t, i) {
                            var n = o.findSchedulerEventData(t);
                            n && (n.sort = [i, e])
                        })
                    }, o.findSchedulerEventData = function(e) {
                        return DayPilot.list(a.events.list).find(function(t) {
                            return t.card === e
                        })
                    }, o.loadSwimlanes = function() {
                        var e = DayPilot.list(n.swimlanes.list);
                        a.resources = e.map(function(e) {
                            var t = {};
                            return t.name = e.name, t.id = e.id, t.swimlane = e, e.collapsed && (t.collapsed = !0, t.eventHeight = 20, t.hideEvents = !0), t
                        }), e.isEmpty() && (a.resources = [{
                            name: "",
                            id: "*"
                        }])
                    }, o.loadColumns = function() {
                        var e = DayPilot.list(n.columns.list);
                        a.days = e.length
                    };
                    var d = {};
                    d.active = null, d.div = null, d.update = function() {
                        d.clear();
                        var e = d.findPosition();
                        d.draw(e)
                    }, d.clear = function() {
                        DayPilot.de(d.div), d.div = null
                    }, d.draw = function(e) {
                        var t = 0;
                        if (e >= a.itline.length) {
                            var i = a.itline[a.itline.length - 1];
                            t = i.left + i.width - 3
                        } else t = a.itline[e].left;
                        var o = document.createElement("div");
                        o.style.position = "absolute", o.style.left = t + "px", o.style.width = "3px", o.style.top = 0, o.style.height = a.headerHeight + "px", o.className = n.theme + "_columnmove_position", d.div = o, a.nav.timeHeader.appendChild(o)
                    }, d.findPosition = function() {
                        if (n.coords.x < 0) return 0;
                        var e = DayPilot.list(a.itline).findIndex(function(e) {
                            var t = e.left + a.rowHeaderWidth,
                                i = e.width;
                            return n.coords.x < t + i / 2
                        });
                        return e === -1 ? a.itline.length : e
                    }, this.Be = function(e) {
                        d.active = e
                    }, this.Ae = function(e) {
                        return n.columns.list[DayPilot.DateUtil.daysDiff(s, e)]
                    }, this.Ce = function(e) {
                        return DayPilot.list(n.swimlanes.list).find(function(t) {
                            return t.id === e
                        })
                    }, this.message = function(e, t, i, n) {
                        a.message(e, t, i, n)
                    }, this.show = function() {
                        n.visible = !0, a.show()
                    }, this.hide = function() {
                        n.visible = !1, a.hide()
                    }, this.cards.add = function(e) {
                        var t = null;
                        t = e && e instanceof DayPilot.Card ? e.data : e, e && (n.cards.list.push(t), n.update())
                    }, this.cards.remove = function(e) {
                        var t = null;
                        t = e && e instanceof DayPilot.Card ? e.data : e, e && (DayPilot.rfa(n.cards.list, t), n.update())
                    }, this.cards.update = function(e) {
                        n.update()
                    }, this.cards.find = function(e) {
                        var t = DayPilot.list(n.cards.list).find(function(t) {
                            return e === t.id
                        });
                        return t ? new DayPilot.Card(t, n) : null
                    }, this.De = function(e) {
                        DayPilot.list(n.swimlanes.list).isEmpty() || (n.swimlanes.list[e].collapsed = !n.swimlanes.list[e].collapsed), n.update()
                    }, this.init = function() {
                        return o.translate(), o.loadSwimlanes(), o.loadColumns(), o.loadCards(), a.init(), n.Dd(), this.L = !0, this
                    }, this.Td = !1, this.dispose = function() {
                        a.dispose(), n.Td = !0
                    }, this.update = function(e) {
                        if (n.Td) throw new DayPilot.Exception("This DayPilot.Gantt instance has been disposed.");
                        n.Ud(e), o.translate(), o.loadSwimlanes(), o.loadColumns(), o.loadCards(), a.update()
                    }, this.Dd = function() {
                        DayPilot.re(document, "mouseup", n.Ee), DayPilot.re(document, "mousemove", n.Fe)
                    }, this.Pd = {}, this.Pd.scope = null, this.Pd.notify = function() {
                        n.Pd.scope && n.Pd.scope["$apply"]()
                    }, this.ce = null, this.Ud = function(e) {
                        if (e) {
                            var t = {
                                "cards": {
                                    "preInit": function() {
                                        var e = this.data;
                                        e && (DayPilot.isArray(e.list) ? n.cards.list = e.list : n.cards.list = e)
                                    }
                                },
                                "columns": {
                                    "preInit": function() {
                                        var e = this.data;
                                        e && (DayPilot.isArray(e.list) ? n.columns.list = e.list : n.columns.list = e)
                                    }
                                },
                                "swimlanes": {
                                    "preInit": function() {
                                        var e = this.data;
                                        e && (DayPilot.isArray(e.list) ? n.swimlanes.list = e.list : n.swimlanes.list = e)
                                    }
                                }
                            };
                            this.ce = t;
                            for (var i in e)
                                if (t[i]) {
                                    var a = t[i];
                                    a.data = e[i], a.preInit && a.preInit()
                                } else n[i] = e[i]
                        }
                    }, this.be = function() {
                        var e = this.ce;
                        for (var t in e) {
                            var i = e[t];
                            i.postInit && i.postInit()
                        }
                    }, this.internal = {}, this.internal.loadOptions = n.Ud, this.Ud(i), this.zd = function() {
                        var e = dp.nav.top;
                        return !!e && (e.offsetWidth > 0 && e.offsetHeight > 0)
                    }, this.Ad = function() {
                        var e = n,
                            t = e.zd;
                        t() || e.Bd || (e.Bd = setInterval(function() {
                            t() && (e.update(), clearInterval(e.Bd))
                        }, 100))
                    }, this.Fe = function(e) {
                        n.coords = DayPilot.mo3(a.nav.top, e), d.active && d.update()
                    }, this.Ee = function(e) {
                        if (d.active) {
                            var t = d.active.source,
                                i = d.findPosition(),
                                a = n.Ae(t.start),
                                o = new DayPilot.Args;
                            o.column = new DayPilot.KanbanColumn(a, n), o.position = i, o.previous = null, o.next = null;
                            for (var r = null, l = o.position; 0 !== l && !r;) a !== n.columns.list[l - 1] && (r = n.columns.list[l - 1]), l -= 1;
                            r && (o.previous = new DayPilot.KanbanColumn(r, n));
                            var s = null;
                            for (l = o.position; l < n.columns.list.length - 1 && !s;) a !== n.columns.list[l] && (s = n.columns.list[l]), l += 1;
                            if (s && (o.next = new DayPilot.KanbanColumn(s, n)), "function" == typeof n.onColumnMove && n.onColumnMove(o), !o.preventDefault.value) {
                                if ("Update" === n.columnMoveHandling) {
                                    DayPilot.rfa(n.columns.list, o.column.data);
                                    var c = 0;
                                    o.next ? c = DayPilot.indexOf(n.columns.list, o.next.data) : o.previous && (c = DayPilot.indexOf(n.columns.list, o.previous.data) + 1), n.columns.list.splice(c, 0, o.column.data), n.update()
                                }
                                "function" == typeof n.onColumnMoved && n.onColumnMove(o)
                            }
                            d.active = null, d.clear()
                        }
                    }
                }, DayPilot.Kanban.makeDraggable = function(e) {
                    DayPilot.Scheduler.makeDraggable(e)
                }, DayPilot.Card = function(e, t) {
                    if (e instanceof DayPilot.Event) {
                        var i = e;
                        this.data = i.data.card, this.wrapped = e
                    } else this.data = e;
                    this.control = t
                }, DayPilot.KanbanColumn = function(e, t) {
                    this.data = e, this.control = t
                }, DayPilot.Swimlane = function(e, t) {
                    this.data = e, this.control = t
                },
                function() {
                    var e = DayPilot.am();
                    e && e.directive("daypilotKanban", ["$parse", function(e) {
                        return {
                            "restrict": "E",
                            "template": "<div id='{{id}}'></div>",
                            "compile": function(t, i) {
                                return t.replaceWith(this["template"].replace("{{id}}", i["id"])),
                                    function(t, i, n) {
                                        var a = new DayPilot.Kanban(i[0]);
                                        a.Pd.scope = t, a.init();
                                        var o = n["id"];
                                        o && (t[o] = a);
                                        var r = n["publishAs"];
                                        if (r) {
                                            (0, e(r).assign)(t, a)
                                        }
                                        for (var l in n)
                                            if (0 === l.indexOf("on")) {
                                                var s = DayPilot.Util.shouldApply(l);
                                                s ? ! function(i) {
                                                    a[i] = function(a) {
                                                        var o = e(n[i]);
                                                        t["$apply"](function() {
                                                            o(t, {
                                                                "args": a
                                                            })
                                                        })
                                                    }
                                                }(l) : ! function(i) {
                                                    a[i] = function(a) {
                                                        e(n[i])(t, {
                                                            "args": a
                                                        })
                                                    }
                                                }(l)
                                            } var d = t["$watch"],
                                            c = n["config"] || n["daypilotConfig"];
                                        d.call(t, c, function(e, t) {
                                            a.Ud(e), a.update()
                                        }, !0)
                                    }
                            }
                        }
                    }])
                }()
        }
    }(), "undefined" == typeof DayPilot) var DayPilot = {};
if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function() {
        if ("undefined" == typeof DayPilot.Menu) {
            var e = function() {},
                t = {};
            t.mouse = null, t.menu = null, t.handlersRegistered = !1, t.hideTimeout = null, t.waitingSubmenu = null, DayPilot.Menu = function(i) {
                var n = this,
                    a = null;
                this.v = "2019.4.4160", this.zIndex = 120, this.cssClassPrefix = "menu_default", this.cssOnly = !0, this.menuTitle = null, this.showMenuTitle = !1, this.hideOnMouseOut = !1, this.hideAfter = 200, this.theme = null, this.onShow = null, this.s = function() {}, i && DayPilot.isArray(i) && (this.items = i), this.show = function(i, o) {
                    var o = o || {},
                        r = null;
                    if (i ? "string" == typeof i.id || "number" == typeof i.id ? r = i.id : "function" == typeof i.id ? r = i.id() : "function" == typeof i.value && (r = i.value()) : r = null, "undefined" != typeof DayPilot.Bubble && DayPilot.Bubble.hideActive(), o.submenu || t.menuClean(), this.s.submenu = null, null !== t.mouse) {
                        n.cssOnly || (n.cssOnly = !0, DayPilot.Util.log("DayPilot: cssOnly = false mode is not supported since DayPilot Pro 8.0."));
                        var l = null;
                        if (i && i.isRow && i.$.row.task ? (l = new DayPilot.Task(i.$.row.task, i.calendar), l.menuType = "resource") : l = i && i.isEvent && i.data.task ? new DayPilot.Task(i, i.calendar) : i, "function" == typeof n.onShow) {
                            var s = {};
                            if (s.source = l, s.menu = n, s.preventDefault = function() {
                                    s.preventDefault.value = !0
                                }, n.onShow(s), s.preventDefault.value) return
                        }
                        var d = document.createElement("div");
                        if (d.style.position = "absolute", d.style.top = "0px", d.style.left = "0px", d.style.display = "none", d.style.overflow = "hidden", d.style.zIndex = this.zIndex + 1, d.className = this.applyCssClass("main"), d.onclick = function(e) {
                                e.cancelBubble = !0, this.parentNode.removeChild(this)
                            }, this.hideOnMouseOut && (d.onmousemove = function(e) {
                                clearTimeout(t.hideTimeout)
                            }, d.onmouseleave = function(e) {
                                n.delayedHide({
                                    "hideParent": !0
                                })
                            }), !this.items || 0 === this.items.length) throw "No menu items defined.";
                        if (this.showMenuTitle) {
                            var c = document.createElement("div");
                            c.innerHTML = this.menuTitle, c.className = this.applyCssClass("title"), d.appendChild(c)
                        }
                        for (var h = 0; h < this.items.length; h++) {
                            var u = this.items[h],
                                f = document.createElement("div");
                            if (DayPilot.Util.addClass(f, this.applyCssClass("item")), u.items && DayPilot.Util.addClass(f, this.applyCssClass("item_haschildren")), "undefined" != typeof u && !u.hidden) {
                                if ("-" === u.text) {
                                    var v = document.createElement("div");
                                    v.addEventListener("click", function(e) {
                                        e.stopPropagation()
                                    }), f.appendChild(v)
                                } else {
                                    var p = document.createElement("a");
                                    if (p.style.position = "relative", p.style.display = "block", u.cssClass && DayPilot.Util.addClass(p, u.cssClass), u.disabled) DayPilot.Util.addClass(p, n.applyCssClass("item_disabled"));
                                    else {
                                        if (u.onclick || u.onClick) {
                                            p.item = u, p.onclick = function(e, t) {
                                                return function(i) {
                                                    if ("function" == typeof e.onClick) {
                                                        var n = {};
                                                        if (n.item = e, n.source = t.source, n.originalEvent = i, n.preventDefault = function() {
                                                                n.preventDefault.value = !0
                                                            }, e.onClick(n), n.preventDefault.value) return
                                                    }
                                                    e.onclick && e.onclick.call(t, i)
                                                }
                                            }(u, p);
                                            var m = function(e, i) {
                                                return function(n) {
                                                    n.stopPropagation(), n.preventDefault();
                                                    var a = function() {
                                                        window.setTimeout(function() {
                                                            i.source.calendar.internal.touch.active = !1
                                                        }, 500)
                                                    };
                                                    if ("function" == typeof e.onClick) {
                                                        var o = {};
                                                        if (o.item = e, o.source = i.source, o.originalEvent = n, o.preventDefault = function() {
                                                                o.preventDefault.value = !0
                                                            }, e.onClick(o), o.preventDefault.value) return void a()
                                                    }
                                                    e.onclick && e.onclick.call(i, n), t.menuClean(), a()
                                                }
                                            };
                                            p.ontouchstart = function(e) {
                                                e.stopPropagation(), e.preventDefault(), p.source.calendar.internal.touch.active = !0
                                            }, p.ontouchend = m(u, p)
                                        }
                                        if (u.items && !u.disabled) {
                                            var g = function(e, t) {
                                                return function(i) {
                                                    i.preventDefault(), i.stopPropagation(), n.Ge(e, t)
                                                }
                                            };
                                            p.ontouchend = g(u, p)
                                        }
                                        if (u.onclick) e();
                                        else if (u.href) p.href = u.href.replace(/\x7B0\x7D/gim, r), u.target && p.setAttribute("target", u.target);
                                        else if (u.command) {
                                            var g = function(e, t) {
                                                return function(i) {
                                                    var n = t.source,
                                                        a = e;
                                                    a.action = a.action ? a.action : "CallBack";
                                                    var o = n.calendar || n.root;
                                                    if (n instanceof DayPilot.Link) return void o.internal.linkMenuClick(a.command, n, a.action);
                                                    if (n instanceof DayPilot.Selection) return void o.internal.timeRangeMenuClick(a.command, n, a.action);
                                                    if (n instanceof DayPilot.Event) return void o.internal.eventMenuClick(a.command, n, a.action);
                                                    if (n instanceof DayPilot.Selection) return void o.internal.timeRangeMenuClick(a.command, n, a.action);
                                                    if (n instanceof DayPilot.Task) return void("resource" === n.menuType ? o.internal.resourceHeaderMenuClick(a.command, t.menuSource, a.action) : o.internal.eventMenuClick(a.command, t.menuSource, a.action));
                                                    switch (n.menuType) {
                                                        case "resource":
                                                            return void o.internal.resourceHeaderMenuClick(a.command, n, a.action);
                                                        case "selection":
                                                            return void o.internal.timeRangeMenuClick(a.command, n, a.action);
                                                        default:
                                                            return void o.internal.eventMenuClick(a.command, n, a.action)
                                                    }
                                                    i.preventDefault()
                                                }
                                            };
                                            p.onclick = g(u, p), p.ontouchend = g(u, p)
                                        }
                                    }
                                    u.items && p.addEventListener("click", function(e) {
                                        e.stopPropagation()
                                    }), p.source = l, p.menuSource = i;
                                    var y = document.createElement("span");
                                    if (y.className = n.applyCssClass("item_text"), y.innerHTML = u.text, p.appendChild(y), u.image) {
                                        var b = document.createElement("img");
                                        b.src = u.image, b.style.position = "absolute", b.style.top = "0px", b.style.left = "0px", p.appendChild(b)
                                    }
                                    if (u.icon) {
                                        var w = document.createElement("span");
                                        w.className = n.applyCssClass("item_icon");
                                        var D = document.createElement("i");
                                        D.className = u.icon, w.appendChild(D), p.appendChild(w)
                                    }
                                    var k = function(e, i) {
                                        return function() {
                                            var a = (i.source, e),
                                                o = t.waitingSubmenu;
                                            if (o) {
                                                if (o.parent === a) return;
                                                clearTimeout(o.timeout), t.waitingSubmenu = null
                                            }
                                            e.disabled || (t.waitingSubmenu = {}, t.waitingSubmenu.parent = a, t.waitingSubmenu.timeout = setTimeout(function() {
                                                t.waitingSubmenu = null, n.Ge(a, i)
                                            }, 300))
                                        }
                                    };
                                    p.onmouseover = k(u, p), f.appendChild(p)
                                }
                                d.appendChild(f)
                            }
                        }
                        var P = function(e) {
                            window.setTimeout(function() {
                                t.menuClean(), DayPilot.MenuBar.deactivate()
                            }, 100)
                        };
                        d.onclick = P, d.ontouchend = P, d.onmousedown = function(e) {
                            e = e || window.event, e.cancelBubble = !0, e.stopPropagation && e.stopPropagation()
                        }, d.oncontextmenu = function() {
                            return !1
                        }, document.body.appendChild(d), n.s.visible = !0, n.s.source = i, d.style.display = "";
                        var x = d.offsetHeight,
                            C = d.offsetWidth;
                        d.style.display = "none";
                        var A = document.documentElement.clientHeight,
                            S = document.documentElement.clientWidth,
                            E = "number" == typeof o.windowMargin ? o.windowMargin : 5;
                        if (function() {
                                var e = o.initiator;
                                if (e) {
                                    var t = e.div,
                                        i = e.e,
                                        n = e.area;
                                    if ("Visible" !== (n.visibility || n.v || "Visible")) {
                                        var r = DayPilot.Areas.createArea(t, i, n);
                                        t.appendChild(r), a = r;
                                        var l = DayPilot.abs(r);
                                        o.x = l.x, o.y = l.y + l.h + 2
                                    }
                                }
                            }(), function() {
                                var e = "number" == typeof o.x ? o.x : t.mouse.x + 1,
                                    i = "number" == typeof o.y ? o.y : t.mouse.y + 1,
                                    n = document.body.scrollTop || document.documentElement.scrollTop,
                                    a = document.body.scrollLeft || document.documentElement.scrollLeft;
                                if (i - n > A - x && 0 !== A) {
                                    var r = i - n - (A - x) + E;
                                    d.style.top = i - r + "px"
                                } else d.style.top = i + "px";
                                if ("right" === o.align && (e -= C), e - a > S - C && 0 !== S) {
                                    var l = e - a - (S - C) + E;
                                    d.style.left = e - l + "px"
                                } else d.style.left = e + "px"
                            }(), o.parentLink) {
                            var T = o.parentLink,
                                H = parseInt(new DayPilot.StyleReader(d).get("border-top-width")),
                                M = DayPilot.abs(o.parentLink.parentNode),
                                _ = M.x + T.offsetWidth,
                                R = M.y - H;
                            _ + C > S && (_ = Math.max(0, M.x - C));
                            var B = document.body.scrollTop + document.documentElement.scrollTop;
                            R + x - B > A && (R = Math.max(0, A - x + B)), d.style.left = _ + "px", d.style.top = R + "px"
                        }
                        d.style.display = "", this.addShadow(d), this.s.div = d, o.submenu || (DayPilot.Menu.active = this)
                    }
                }, this.Ge = function(e, t) {
                    var i = e,
                        a = t.source;
                    if ((!n.s.submenu || n.s.submenu.item !== e) && (n.s.submenu && n.s.submenu.item !== e && (DayPilot.Util.removeClass(n.s.submenu.link.parentNode, n.applyCssClass("item_haschildren_active")), n.s.submenu.menu.hide(), n.s.submenu = null), e.items)) {
                        var o = n.cloneOptions();
                        o.items = e.items, n.s.submenu = {}, n.s.submenu.menu = new DayPilot.Menu(o), n.s.submenu.menu.He = n, n.s.submenu.menu.show(a, {
                            "submenu": !0,
                            "parentLink": t,
                            "parentItem": i
                        }), n.s.submenu.item = e, n.s.submenu.link = t, DayPilot.Util.addClass(t.parentNode, n.applyCssClass("item_haschildren_active"))
                    }
                }, this.applyCssClass = function(e) {
                    var t = this.theme || this.cssClassPrefix,
                        i = this.cssOnly ? "_" : "";
                    return t ? t + i + e : ""
                }, this.cloneOptions = function() {
                    return DayPilot.Util.copyProps(o, {}, ["cssClassPrefix", "theme", "hideAfter", "hideOnMouseOut", "zIndex"])
                }, this.hide = function(e) {
                    e = e || {}, this.s.submenu && this.s.submenu.menu.hide(), this.removeShadow(), this.s.div && this.s.div.parentNode === document.body && document.body.removeChild(this.s.div), a && (DayPilot.de(a), a = null), n.s.visible = !1, n.s.source = null, n.He && e.hideParent && n.He.hide(e)
                }, this.delayedHide = function(e) {
                    t.hideTimeout = setTimeout(function() {
                        n.hide(e)
                    }, n.hideAfter)
                }, this.cancelHideTimeout = function() {
                    clearTimeout(t.hideTimeout)
                }, this.init = function(e) {
                    return t.mouseMove(e), this
                }, this.addShadow = function(e) {}, this.removeShadow = function() {};
                var o = DayPilot.isArray(i) ? null : i;
                if (o)
                    for (var r in o) this[r] = o[r]
            }, DayPilot.MenuBar = function(e, t) {
                var i = this,
                    t = t || {};
                this.items = [], this.theme = "menubar_default", this.windowMargin = 0, this.nav = {}, this.elements = {}, this.elements.items = DayPilot.list(), this.Ie = null;
                for (var n in t) this[n] = t[n];
                this.Je = function(e) {
                    return this.theme + "_" + e
                }, this.Ca = function() {
                    this.nav.top = document.getElementById(e);
                    var t = this.nav.top;
                    t.className = this.Je("main"), DayPilot.list(i.items).each(function(e) {
                        var n = document.createElement("span");
                        n.innerHTML = e.text, n.className = i.Je("item"), n.data = e, n.onclick = function() {
                            return i.active && i.active.item === e ? void i.Ke() : void(e.children && i.Le(n))
                        }, n.onmousedown = function(e) {
                            e.stopPropagation()
                        }, n.onmouseover = function() {
                            i.active && i.active.item !== e && i.Le(n)
                        }, t.appendChild(n), i.elements.items.push(n)
                    })
                }, this.Ke = function() {
                    var e = i.Je("item_active");
                    i.elements.items.each(function(t) {
                        DayPilot.Util.removeClass(t, e)
                    }), i.active && i.active.menu && i.active.menu.hide(), i.active = null
                }, this.Me = function(e) {
                    return !!i.active && i.active.item === e.data
                }, this.Le = function(e) {
                    if (!i.Me(e)) {
                        i.Ke();
                        var t = e.data,
                            n = i.active = {};
                        n.item = t, n.div = e;
                        var a = i.Je("item_active");
                        DayPilot.Util.addClass(e, a);
                        var o = DayPilot.abs(e);
                        t.children && (n.menu = new DayPilot.Menu({
                            "items": t.children
                        }), n.menu.show(null, {
                            "x": o.x,
                            "y": o.y + o.h,
                            "align": t.align,
                            "windowMargin": i.windowMargin
                        })), DayPilot.MenuBar.active = i
                    }
                }, this.init = function() {
                    return this.Ca(), this
                }
            }, DayPilot.MenuBar.deactivate = function() {
                DayPilot.MenuBar.active && (DayPilot.MenuBar.active.Ke(), DayPilot.MenuBar.active = null)
            }, t.menuClean = function() {
                "undefined" != typeof DayPilot.Menu.active && DayPilot.Menu.active && (DayPilot.Menu.active.hide(), DayPilot.Menu.active = null)
            }, t.mouseDown = function(e) {
                "undefined" != typeof t && (t.menuClean(), DayPilot.MenuBar.deactivate())
            }, t.mouseMove = function(e) {
                "undefined" != typeof t && (t.mouse = t.mousePosition(e))
            }, t.touchMove = function(e) {
                "undefined" != typeof t && (t.mouse = t.touchPosition(e))
            }, t.touchStart = function(e) {
                "undefined" != typeof t && (t.mouse = t.touchPosition(e))
            }, t.touchEnd = function(e) {}, t.touchPosition = function(e) {
                if (!e || !e.touches) return null;
                var t = e.touches[0],
                    i = {};
                return i.x = t.pageX, i.y = t.pageY, i
            }, t.mousePosition = function(e) {
                return DayPilot.mo3(document.body, e)
            }, DayPilot.Menu.touchPosition = function(e) {
                e.touches && (t.mouse = t.touchPosition(e))
            }, t.handlersRegistered || (DayPilot.re(document, "mousemove", t.mouseMove), DayPilot.re(document, "mousedown", t.mouseDown), DayPilot.re(document, "touchmove", t.touchMove), DayPilot.re(document, "touchstart", t.touchStart), DayPilot.re(document, "touchend", t.touchEnd), t.handlersRegistered = !0), "undefined" != typeof Sys && Sys.Application && Sys.Application.notifyScriptLoaded && Sys.Application.notifyScriptLoaded()
        }
    }(), "undefined" == typeof DayPilot && (DayPilot = {}), function() {
        DayPilot.ModalStatic = {}, DayPilot.ModalStatic.list = [], DayPilot.ModalStatic.hide = function() {
            if (this.list.length > 0) {
                var e = this.list.pop();
                e && e.hide()
            }
        }, DayPilot.ModalStatic.remove = function(e) {
            for (var t = DayPilot.ModalStatic.list, i = 0; i < t.length; i++)
                if (t[i] === e) return void t.splice(i, 1)
        }, DayPilot.ModalStatic.close = function(e) {
            DayPilot.ModalStatic.result(e), DayPilot.ModalStatic.hide()
        }, DayPilot.ModalStatic.result = function(e) {
            var t = DayPilot.ModalStatic.list;
            t.length > 0 && (t[t.length - 1].result = e)
        }, DayPilot.ModalStatic.displayed = function(e) {
            for (var t = DayPilot.ModalStatic.list, i = 0; i < t.length; i++)
                if (t[i] === e) return !0;
            return !1
        }, DayPilot.ModalStatic.stretch = function() {
            if (this.list.length > 0) {
                var e = this.list[this.list.length - 1];
                e && e.stretch()
            }
        }, DayPilot.ModalStatic.last = function() {
            var e = DayPilot.ModalStatic.list;
            return e.length > 0 ? e[e.length - 1] : null
        };
        var e = function() {
                var e = document.createElement("style");
                e.setAttribute("type", "text/css"), e.styleSheet || e.appendChild(document.createTextNode("")), (document.head || document.getElementsByTagName("head")[0]).appendChild(e);
                var t = !!e.styleSheet,
                    i = {};
                return i.rules = [], i.commit = function() {
                    try {
                        t && (e.styleSheet.cssText = this.rules.join("\n"))
                    } catch (e) {}
                }, i.add = function(i, n, a) {
                    if (t) return void this.rules.push(i + "{" + n + "}");
                    if (e.sheet.insertRule) "undefined" == typeof a && (a = e.sheet.cssRules.length), e.sheet.insertRule(i + "{" + n + "}", a);
                    else {
                        if (!e.sheet.addRule) throw "No CSS registration method found";
                        e.sheet.addRule(i, n, a)
                    }
                }, i
            },
            t = new e;
        t.add(".modal_default_main", "border: 10px solid #ccc; max-width: 90%;"), t.add(".modal_default_main:focus", "outline: none;"), t.add(".modal_default_content", "padding: 10px 0px;"), t.add(".modal_default_inner", "padding: 20px;"), t.add(".modal_default_input", "padding: 10px 0px;"), t.add(".modal_default_buttons", "padding: 10px 0px;"), t.add(".modal_default_form_item", "margin: 10px 0px;"), t.add(".modal_default_form_item.modal_default_form_title", "font-size: 2em; font-weight: bold;"), t.add(".modal_default_form_item input", "width: 100%; box-sizing: border-box;"), t.add(".modal_default_form_item select", "width: 100%; box-sizing: border-box;"), t.add(".modal_default_form_item_label", "margin: 2px 0px;"), t.add(".modal_default_background", "opacity: 0.5; background-color: #000;"), t.add(".modal_default_ok", "padding: 3px; width: 80px;"), t.add(".modal_default_cancel", "padding: 3px; width: 80px;"), navigator.userAgent.indexOf("Edge") !== -1 && t.add(".modal_default_form_item_date input::-ms-clear", "display: none;"), t.add(".modal_min_main", "border: 1px solid #ccc; max-width: 90%;"), t.add(".modal_min_background", "opacity: 0.5; background-color: #000;"), t.add(".modal_min_ok", "padding: 3px 10px;"), t.add(".modal_min_cancel", "padding: 3px 10px;"), t.add(".navigator_modal_main", "border-left: 1px solid #c0c0c0;border-right: 1px solid #c0c0c0;border-bottom: 1px solid #c0c0c0;background-color: white;color: #000000; box-sizing: content-box;"), t.add(".navigator_modal_main *, .navigator_modal_main *:before, .navigator_modal_main *:after", "box-sizing: content-box;"), t.add(".navigator_modal_month", "font-size: 11px;"), t.add(".navigator_modal_day", "color: black;"), t.add(".navigator_modal_weekend", "background-color: #f0f0f0;"), t.add(".navigator_modal_dayheader", "color: black;"), t.add(".navigator_modal_line", "border-bottom: 1px solid #c0c0c0;"), t.add(".navigator_modal_dayother", "color: gray;"), t.add(".navigator_modal_todaybox", "border: 1px solid red;"), t.add(".navigator_modal_title, .navigator_modal_titleleft, .navigator_modal_titleright", "border-top: 1px solid #c0c0c0;border-bottom: 1px solid #c0c0c0;color: #333;background: #f3f3f3;"), t.add(".navigator_modal_busy", "font-weight: bold;"), t.add(".navigator_modal_cell", "text-align: center;"), t.add(".navigator_modal_select .navigator_modal_cell_box", "background-color: #FFE794; opacity: 0.5;"), t.add(".navigator_modal_title", "text-align: center;"), t.add(".navigator_modal_titleleft, .navigator_modal_titleright", "text-align: center;"), t.add(".navigator_modal_dayheader", "text-align: center;"), t.add(".navigator_modal_weeknumber", "text-align: center;"), t.add(".navigator_modal_cell_text", "cursor: pointer;"), t.commit(), DayPilot.Modal = function(e) {
            this.autoFocus = !0, this.autoStretch = !0, this.autoStretchFirstLoadOnly = !1, this.className = null, this.theme = "modal_default", this.disposeOnClose = !0, this.dragDrop = !0, this.loadingHtml = null, this.maxHeight = null, this.scrollWithPage = !0, this.useIframe = !0, this.zIndex = 99999, this.left = null, this.width = 600, this.top = 20, this.height = 200, this.closed = null, this.onClosed = null, this.onShow = null;
            var t = this;
            this.id = "_" + (new Date).getTime() + "n" + 10 * Math.random(), this.Ne = !1, this.Oe = null, this.Pe = null, this.showHtml = function(e) {
                if (DayPilot.ModalStatic.displayed(this)) throw "This modal dialog is already displayed.";
                if (this.div || this.Qe(), this.gc(), this.useIframe) {
                    var t = function(e, t) {
                        return function() {
                            e.setInnerHTML(e.id + "iframe", t)
                        }
                    };
                    window.setTimeout(t(this, e), 0)
                } else e.nodeType ? this.div.appendChild(e) : this.div.innerHTML = e;
                this.gc(), this.Re(), this.Se()
            }, this.Te = function() {
                return this.corners && "rounded" === this.corners.toLowerCase()
            }, this.showUrl = function(e) {
                if (DayPilot.ModalStatic.displayed(this)) throw "This modal dialog is already displayed.";
                if (this.useIframe) {
                    this.div || this.Qe();
                    var i = this.loadingHtml;
                    i && (this.iframe.src = "about:blank", this.setInnerHTML(this.id + "iframe", i)), this.re(this.iframe, "load", this.Ue), this.iframe.src = e, this.gc(), this.Re(), this.Se()
                } else t.Ve({
                    "url": e,
                    "success": function(e) {
                        var i = e.request.responseText;
                        t.showHtml(i)
                    },
                    "error": function(e) {
                        t.showHtml("Error loading the modal dialog")
                    }
                })
            }, this.Se = function() {
                if ("function" == typeof t.onShow) {
                    var e = {};
                    e.root = t.We(), t.onShow(e)
                }
            }, this.We = function() {
                return t.iframe ? t.iframe.contentWindow.document : t.div
            }, this.Ve = function(e) {
                var t = new XMLHttpRequest;
                if (t) {
                    var i = e.method || "GET",
                        n = e.success || function() {},
                        a = e.error || function() {},
                        o = e.data,
                        r = e.url;
                    t.open(i, r, !0), t.setRequestHeader("Content-type", "text/plain"), t.onreadystatechange = function() {
                        if (4 === t.readyState)
                            if (200 === t.status || 304 === t.status) {
                                var e = {};
                                e.request = t, n(e)
                            } else if (a) {
                            var e = {};
                            e.request = t, a(e)
                        } else window.console && console.log("HTTP error " + t.status)
                    }, 4 !== t.readyState && ("object" == typeof o && (o = JSON.stringify(o)), t.send(o))
                }
            }, this.gc = function() {
                delete this.result;
                var e = window,
                    i = document,
                    n = e.pageYOffset ? e.pageYOffset : i.documentElement && i.documentElement.scrollTop ? i.documentElement.scrollTop : i.body.scrollTop;
                this.theme && (this.hideDiv.className = this.theme + "_background"), this.zIndex && (this.hideDiv.style.zIndex = this.zIndex), this.hideDiv.style.display = "", window.setTimeout(function() {
                    t.hideDiv && (t.hideDiv.onclick = function() {
                        t.hide({
                            "backgroundClick": !0
                        })
                    })
                }, 500), this.theme ? this.div.className = this.theme + "_main" : this.div.className = "", this.className && (this.div.className += " " + this.className), this.left ? this.div.style.left = this.left + "px" : this.div.style.marginLeft = "-" + Math.floor(this.width / 2) + "px", this.div.style.position = "absolute", this.div.style.boxSizing = "content-box", this.div.style.top = n + this.top + "px", this.div.style.width = this.width + "px", this.zIndex && (this.div.style.zIndex = this.zIndex), this.height && (this.useIframe || !this.autoStretch ? this.div.style.height = this.height + "px" : this.div.style.height = ""), this.useIframe && this.height && (this.iframe.style.height = this.height + "px"), this.div.style.display = "", this.Ye(), DayPilot.ModalStatic.remove(this), DayPilot.ModalStatic.list.push(this)
            }, this.Ue = function() {
                t.iframe.contentWindow.modal = t, t.autoStretch && t.stretch()
            }, this.stretch = function() {
                var e = function() {
                        return t.Xe().y
                    },
                    i = function() {
                        return t.Xe().x
                    };
                if (this.useIframe) {
                    for (var n = i() - 40, a = this.width; a < n && this.Ze(); a += 10) this.div.style.width = a + "px", this.div.style.marginLeft = "-" + Math.floor(a / 2) + "px";
                    for (var o = this.maxHeight || e() - 2 * this.top, r = this.height; r < o && this.$e(); r += 10) this.iframe.style.height = r + "px", this.div.style.height = r + "px";
                    this.autoStretchFirstLoadOnly && this.ue(this.iframe, "load", this.Ue)
                } else this.div.style.height = ""
            }, this.Ze = function() {
                for (var e = this.iframe.contentWindow.document, t = "BackCompat" === e.compatMode ? e.body : e.documentElement, i = t.scrollWidth, n = e.body.children, a = 0; a < n.length; a++) {
                    var o = n[a].offsetLeft + n[a].offsetWidth;
                    i = Math.max(i, o)
                }
                return i > t.clientWidth
            }, this.$e = function() {
                for (var e = this.iframe.contentWindow.document, t = "BackCompat" === e.compatMode ? e.body : e.documentElement, i = t.scrollHeight, n = e.body.children, a = 0; a < n.length; a++) {
                    var o = n[a].offsetTop + n[a].offsetHeight;
                    i = Math.max(i, o)
                }
                return i > t.clientHeight
            }, this.Xe = function() {
                var e = document;
                if ("CSS1Compat" === e.compatMode && e.documentElement && e.documentElement.clientWidth) {
                    var t = e.documentElement.clientWidth,
                        i = e.documentElement.clientHeight;
                    return {
                        x: t,
                        y: i
                    }
                }
                var t = e.body.clientWidth,
                    i = e.body.clientHeight;
                return {
                    x: t,
                    y: i
                }
            }, this.Re = function() {
                this.Ne || (this.re(window, "resize", this._e), this.re(window, "scroll", this.af), this.dragDrop && (this.re(document, "mousemove", this.bf), this.re(document, "mouseup", this.cf)), this.Ne = !0)
            }, this.df = function() {
                this.ue(window, "resize", this._e), this.ue(window, "scroll", this.af), this.dragDrop && (this.ue(document, "mousemove", this.bf), this.ue(document, "mouseup", this.cf)), this.Ne = !1
            }, this.ef = function(e) {
                e.target === t.div && (t.div.style.cursor = "move", t.gf(), t.Pe = t.mc(e || window.event), t.Oe = {
                    x: t.div.offsetLeft,
                    y: t.div.offsetTop
                })
            }, this.bf = function(e) {
                if (t.Pe) {
                    var e = e || window.event,
                        i = t.mc(e),
                        n = i.x - t.Pe.x,
                        a = i.y - t.Pe.y;
                    t.div.style.marginLeft = "0px", t.div.style.top = t.Oe.y + a + "px", t.div.style.left = t.Oe.x + n + "px"
                }
            }, this.cf = function(e) {
                t.Pe && (t.hf(), t.div.style.cursor = null, t.Pe = null)
            }, this.gf = function() {
                if (this.useIframe) {
                    var e = document.createElement("div");
                    e.style.backgroundColor = "#ffffff", e.style.filter = "alpha(opacity=80)", e.style.opacity = "0.80", e.style.width = "100%", e.style.height = this.height + "px", e.style.position = "absolute", e.style.left = "0px", e.style.top = "0px", this.div.appendChild(e), this.mask = e
                }
            }, this.hf = function() {
                this.useIframe && (this.div.removeChild(this.mask), this.mask = null)
            }, this._e = function() {
                t.if(), t.Ye()
            }, this.af = function() {
                t.if()
            }, this.Ye = function() {
                if (!t.left && t.div) {
                    var e = t.div.offsetWidth;
                    t.div.style.marginLeft = "-" + Math.floor(e / 2) + "px"
                }
            }, this.if = function() {
                if (t.hideDiv && t.div && "none" !== t.hideDiv.style.display && "none" !== t.div.style.display) {
                    var e = t.jf.scrollY();
                    t.scrollWithPage || (t.div.style.top = e + t.top + "px")
                }
            }, this.jf = {}, this.jf.container = function() {
                return t.container || document.body
            }, this.jf.scrollY = function() {
                var e = t.jf.container();
                return e === document.body ? window.pageYOffset ? window.pageYOffset : document.documentElement && document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop : e.scrollTop
            }, this.re = function(e, t, i) {
                e.addEventListener ? e.addEventListener(t, i, !1) : e.attachEvent && e.attachEvent("on" + t, i)
            }, this.ue = function(e, t, i) {
                e.removeEventListener ? e.removeEventListener(t, i, !1) : e.detachEvent && e.detachEvent("on" + t, i)
            }, this.mc = function(e) {
                return e.pageX || e.pageY ? {
                    x: e.pageX,
                    y: e.pageY
                } : {
                    x: e.clientX + document.documentElement.scrollLeft,
                    y: e.clientY + document.documentElement.scrollTop
                }
            }, this.abs = function(e) {
                for (var t = {
                        x: e.offsetLeft,
                        y: e.offsetTop
                    }; e.offsetParent;) e = e.offsetParent, t.x += e.offsetLeft, t.y += e.offsetTop;
                return t
            }, this.Qe = function() {
                var e = t.jf.container(),
                    i = e === document.body,
                    n = i ? "fixed" : "absolute",
                    a = document.createElement("div");
                a.id = this.id + "hide", a.style.position = n, a.style.left = "0px", a.style.top = "0px", a.style.right = "0px", a.style.bottom = "0px", a.oncontextmenu = function() {
                    return !1
                }, a.onmousedown = function() {
                    return !1
                }, e.appendChild(a);
                var o = document.createElement("div");
                o.id = this.id + "popup", o.style.position = n, o.style.left = "50%", o.style.top = "0px", o.style.backgroundColor = "white", o.style.width = "50px", o.style.height = "50px", this.dragDrop && (o.onmousedown = this.ef);
                var r = null;
                this.useIframe && (r = document.createElement("iframe"), r.id = this.id + "iframe", r.name = this.id + "iframe", r.frameBorder = "0", r.style.width = "100%", r.style.height = "50px", o.appendChild(r)), e.appendChild(o), this.div = o, this.iframe = r, this.hideDiv = a
            }, this.setInnerHTML = function(e, i) {
                var n = window.frames[e],
                    a = n.contentWindow || n.document || n.contentDocument;
                a.document && (a = a.document), null == a.body && a.write("<body></body>"), i.nodeType ? a.body.appendChild(i) : a.body.innerHTML = i, t.autoStretch && (t.autoStretchFirstLoadOnly && t.kf || (t.stretch(), t.kf = !0))
            }, this.close = function(e) {
                this.result = e, this.hide()
            }, this.closeSerialized = function() {
                for (var e = t.We(), i = e.querySelectorAll("input, textarea, select"), n = {}, a = 0; a < i.length; a++) {
                    var o = i[a],
                        r = o.name;
                    if (r) {
                        var l = o.value;
                        if (o.picker && (l = o.picker.date ? o.picker.date.toString() : null), "SELECT" === o.tagName) {
                            var s = o.options[o.selectedIndex];
                            s && "undefined" != typeof s.lf && (l = s.lf)
                        }
                        n[r] = l
                    }
                }
                t.close(n)
            }, this.hide = function(e) {
                e = e || {};
                var i = {};
                i.backgroundClick = !!e.backgroundClick, i.result = this.result, i.canceled = "undefined" == typeof this.result, i.preventDefault = function() {
                    this.preventDefault.value = !0
                }, "function" == typeof this.onClose && (this.onClose(i), i.preventDefault.value) || (this.div && (this.div.style.display = "none", this.hideDiv.style.display = "none", this.useIframe || (this.div.innerHTML = null)), window.focus(), DayPilot.ModalStatic.remove(this), "function" == typeof this.onClosed ? this.onClosed(i) : this.closed && this.closed(), delete this.result, this.disposeOnClose && (t.df(), t.mf(t.div), t.mf(t.hideDiv), t.div = null, t.hideDiv = null, t.iframe = null))
            }, this.mf = function(e) {
                e && e.parentNode && e.parentNode.removeChild(e)
            }, this.nf = function() {
                if (e)
                    for (var t in e) this[t] = e[t]
            }, this.nf()
        }, DayPilot.Modal.alert = function(e, t) {
            t = t || {}, t.height = t.height || 40, t.useIframe = !1;
            var i = t.okText || "OK";
            t.cancelText || "Cancel";
            return DayPilot.getPromise(function(n, a) {
                t.onClosed = function(e) {
                    n(e)
                };
                var o = new DayPilot.Modal(t),
                    r = document.createElement("div");
                r.className = o.theme + "_inner";
                var l = document.createElement("div");
                l.className = o.theme + "_content", l.innerHTML = e;
                var s = document.createElement("div");
                s.className = o.theme + "_buttons";
                var d = document.createElement("button");
                d.innerText = i, d.className = o.theme + "_ok", d.onclick = function(e) {
                    DayPilot.ModalStatic.close("OK")
                }, s.appendChild(d), r.appendChild(l), r.appendChild(s), o.showHtml(r), o.autoFocus && d.focus()
            })
        }, DayPilot.Modal.confirm = function(e, t) {
            t = t || {}, t.height = t.height || 40, t.useIframe = !1;
            var i = t.okText || "OK",
                n = t.cancelText || "Cancel";
            return DayPilot.getPromise(function(a, o) {
                t.onClosed = function(e) {
                    a(e)
                };
                var r = new DayPilot.Modal(t),
                    l = document.createElement("div");
                l.className = r.theme + "_inner";
                var s = document.createElement("div");
                s.className = r.theme + "_content", s.innerHTML = e;
                var d = document.createElement("div");
                d.className = r.theme + "_buttons";
                var c = document.createElement("button");
                c.innerText = i, c.className = r.theme + "_ok", c.onclick = function(e) {
                    DayPilot.ModalStatic.close("OK")
                };
                var h = document.createTextNode(" "),
                    u = document.createElement("button");
                u.innerText = n, u.className = r.theme + "_cancel", u.onclick = function(e) {
                    DayPilot.ModalStatic.close()
                }, d.appendChild(c), d.appendChild(h), d.appendChild(u), l.appendChild(s), l.appendChild(d), r.showHtml(l), r.autoFocus && c.focus()
            })
        }, DayPilot.Modal.prompt = function(e, t, i) {
            "object" == typeof t && (i = t, t = ""), i = i || {}, i.height = i.height || 40, i.useIframe = !1;
            var n = i.okText || "OK",
                a = i.cancelText || "Cancel",
                o = t || "";
            return DayPilot.getPromise(function(t, r) {
                i.onClosed = function(e) {
                    t(e)
                };
                var l = new DayPilot.Modal(i),
                    s = document.createElement("div");
                s.className = l.theme + "_inner";
                var d = document.createElement("div");
                d.className = l.theme + "_content", d.innerHTML = e;
                var c = document.createElement("div");
                c.className = l.theme + "_input";
                var h = document.createElement("input");
                h.value = o, h.style.width = "100%", h.onkeydown = function(e) {
                    var t = !1;
                    switch (e.keyCode) {
                        case 13:
                            l.close(this.value);
                            break;
                        case 27:
                            l.close();
                            break;
                        default:
                            t = !0
                    }
                    t || (e.preventDefault(), e.stopPropagation())
                }, c.appendChild(h);
                var u = document.createElement("div");
                u.className = l.theme + "_buttons";
                var f = document.createElement("button");
                f.innerText = n, f.className = l.theme + "_ok", f.onclick = function(e) {
                    l.close(h.value)
                };
                var v = document.createTextNode(" "),
                    p = document.createElement("button");
                p.innerText = a, p.className = l.theme + "_cancel", p.onclick = function(e) {
                    l.close()
                }, u.appendChild(f), u.appendChild(v), u.appendChild(p), s.appendChild(d), s.appendChild(c), s.appendChild(u), l.showHtml(s), l.autoFocus && h.focus()
            })
        };
        var i = function(e) {
                return ["text", "date", "select"].indexOf(e.type) !== -1 ? e.type : e.options ? "select" : e.dateFormat ? "date" : "text"
            },
            n = function(e, t) {
                return {
                    "text": function(t) {
                        var i = document.createElement("input");
                        return i.name = e.id, i.onkeydown = function(e) {
                            var i = !1;
                            switch (e.keyCode) {
                                case 13:
                                    t.closeSerialized();
                                    break;
                                case 27:
                                    t.close();
                                    break;
                                default:
                                    i = !0
                            }
                            i || (e.preventDefault(), e.stopPropagation())
                        }, i
                    },
                    "date": function(t) {
                        var i = document.createElement("input");
                        i.className = t.theme + "_input_date", i.name = e.id, i.onkeydown = function(e) {
                            var n = !1;
                            switch (e.keyCode) {
                                case 13:
                                    t.closeSerialized();
                                    break;
                                case 27:
                                    i.picker.close(), t.close();
                                    break;
                                case 9:
                                    i.picker && i.picker.close(), n = !0;
                                    break;
                                default:
                                    n = !0
                            }
                            n || (e.preventDefault(), e.stopPropagation())
                        }, i.onfocus = function() {
                            i.picker.show()
                        }, i.onclick = function() {
                            i.picker.show()
                        };
                        var n = DayPilot.DatePicker || DayPilot.ModalDatePicker,
                            a = new n({
                                target: i,
                                theme: "navigator_modal",
                                zIndex: t.zIndex + 1,
                                resetTarget: !1,
                                targetAlignment: "left"
                            });
                        return e.dateFormat && (a.pattern = e.dateFormat), i.picker = a, i
                    },
                    "select": function(t) {
                        var i = document.createElement("select");
                        return i.name = e.id, o(e.options) && e.options.forEach(function(e) {
                            var t = document.createElement("option");
                            t.innerText = e.name, t.value = e.id, t.lf = e.id, i.appendChild(t)
                        }), i
                    }
                } [i(e)](t)
            },
            a = function(e, t) {
                var a = null,
                    o = "string" == typeof t.id,
                    r = i(t);
                o && (a = n(t, e));
                var l = document.createElement("div");
                l.className = e.theme + "_form_item_label", l.innerHTML = t.name;
                var s = document.createElement("div");
                s.className = e.theme + "_form_item", t.id || (s.className += " " + e.theme + "_form_title"), t.cssClass && (s.className += " " + t.cssClass), o && (s.className += " " + e.theme + "_form_item_" + r), s.appendChild(l), a && s.appendChild(a);
                var d = {};
                return d.div = s, d.label = l, d.element = a, d.type = r, d.set = function(e) {
                    if (d.element)
                        if ("date" === d.type) {
                            var i = d.element.picker;
                            i.date = new DayPilot.Date(e);
                            var n = new DayPilot.Date(e).toString(t.dateFormat || i.pattern, i.locale);
                            d.element.value = n
                        } else d.element.value = e
                }, d.focus = function() {
                    a && a.focus()
                }, d.canFocus = function() {
                    return !!a
                }, d
            },
            o = function(e) {
                return "[object Array]" === Object.prototype.toString.call(e)
            };
        DayPilot.Modal.form = function(e, t, i) {
            if (1 === arguments.length) {
                var n = e;
                if (o(n)) t = {};
                else {
                    if ("object" != typeof n) throw "Invalid DayPilot.Modal.form() parameter";
                    t = e, e = [];
                    for (var r in t) {
                        var l = {};
                        l.name = r, l.id = r, e.push(l)
                    }
                }
            }
            var s = {};
            for (var r in i) s[r] = i[r];
            s.height = s.height || 40, s.useIframe = !1, "undefined" == typeof s.autoFocus && (s.autoFocus = !1);
            var d = s.okText || "OK",
                c = s.cancelText || "Cancel",
                h = s.message || "";
            return DayPilot.getPromise(function(i, n) {
                s.onClosed = function(e) {
                    var n = {};
                    for (var a in t) n[a] = t[a];
                    for (var a in e.result) n[a] = e.result[a];
                    e.result = n, i(e)
                };
                var o = new DayPilot.Modal(s),
                    r = document.createElement("div");
                r.className = o.theme + "_inner";
                var l = document.createElement("div");
                l.className = o.theme + "_content", l.innerHTML = h;
                var u = document.createElement("div");
                u.className = o.theme + "_input";
                var f = [],
                    v = {};
                e.forEach(function(e) {
                    var t = a(o, e);
                    f.push(t), v[e.id] = t
                });
                for (var p in t) v[p] && v[p].set(t[p]);
                f.forEach(function(e) {
                    u.appendChild(e.div)
                });
                var m = document.createElement("div");
                m.className = o.theme + "_buttons";
                var g = document.createElement("button");
                g.innerText = d, g.className = o.theme + "_ok", g.onclick = function(e) {
                    o.closeSerialized()
                };
                var y = document.createTextNode(" "),
                    b = document.createElement("button");
                if (b.innerText = c, b.className = o.theme + "_cancel", b.onclick = function(e) {
                        o.close()
                    }, m.appendChild(g), m.appendChild(y), m.appendChild(b), r.appendChild(l), r.appendChild(u), r.appendChild(m), o.showHtml(r), o.div.setAttribute("tabindex", "-1"), o.div.addEventListener("keydown", function(e) {
                        switch (e.keyCode) {
                            case 27:
                                o.close();
                                break;
                            case 13:
                                o.closeSerialized()
                        }
                    }), o.autoFocus) {
                    var w = f.find(function(e) {
                        return e.canFocus()
                    });
                    w && w.focus()
                } else o.div.focus()
            })
        }, DayPilot.Modal.close = function(e) {
            var t = DayPilot.Modal.opener();
            t && t.close(e)
        }, DayPilot.Modal.stretch = function(e) {
            var t = DayPilot.Modal.opener();
            if (!t) throw "Unable to find the opener DayPilot.Modal instance.";
            t.stretch()
        }, DayPilot.Modal.closeSerialized = function() {
            DayPilot.Modal.opener() || DayPilot.ModalStatic.last()
        }, DayPilot.Modal.opener = function() {
            return "undefined" != typeof DayPilot && "undefined" != typeof DayPilot.ModalStatic && DayPilot.ModalStatic.list.length > 0 ? DayPilot.ModalStatic.list[DayPilot.ModalStatic.list.length - 1] : parent && parent.DayPilot && parent.DayPilot.ModalStatic && parent.DayPilot.ModalStatic.list[parent.DayPilot.ModalStatic.list.length - 1]
        }, "undefined" == typeof DayPilot.getPromise && (DayPilot.getPromise = function(e) {
            return "undefined" != typeof Promise ? new Promise(e) : (DayPilot.Promise = function(e) {
                var t = this;
                this.then = function(t, i) {
                    return t = t || function() {}, i = i || function() {}, e(t, i), DayPilot.getPromise(e)
                }, this["catch"] = function(i) {
                    return t.then(null, i), DayPilot.getPromise(e)
                }
            }, new DayPilot.Promise(e))
        })
    }(), "undefined" == typeof DayPilot) var DayPilot = {};
if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function() {
        var e = function() {};
        if ("undefined" == typeof DayPilot.Month) {
            var t = {};
            DayPilot.Month = function(i, n) {
                    this.v = "2019.4.4160", this.nav = {};
                    var a = this;
                    this.id = i, this.isMonth = !0, this.api = 2, this.L = !1, this.hideUntilInit = !0, this.startDate = new DayPilot.Date, this.width = null, "function" == typeof DayPilot.Bubble ? this.bubble = new DayPilot.Bubble : this.bubble = null, this.cssClassPrefix = "month_default", this.cellHeight = 100, this.cellMarginBottom = 0, this.allowMultiSelect = !0, this.autoRefreshCommand = "refresh", this.autoRefreshEnabled = !1, this.autoRefreshInterval = 60, this.autoRefreshMaxCount = 20, this.doubleClickTimeout = 300, this.eventEndSpec = "DateTime", this.headerHeight = 30, this.heightSpec = "Auto", this.weekStarts = "Auto", this.eventHeight = 25, this.cellHeaderHeight = 24, this.clientState = {}, this.afterRender = function() {}, this.cssOnly = !0, this.eventsLoadMethod = "GET", this.initEventEnabled = !1, this.lineSpace = 1, this.loadingLabelVisible = !0, this.loadingLabelText = "Loading...", this.locale = "en-us", this.messageHideAfter = 5e3, this.notifyCommit = "Immediate", this.visible = !0, this.eventMoveToPosition = !1, this.eventStartTime = !1, this.eventEndTime = !1, this.eventStartEndWidth = 60, this.showWeekend = !0, this.cellMode = !1, this.shadowType = "Fill", this.tapAndHoldTimeout = 300, this.timeFormat = "Auto", this.viewType = "Month", this.weeks = 1, this.eventClickHandling = "Enabled", this.eventDeleteHandling = "Disabled", this.eventDoubleClickHandling = "Enabled", this.eventMoveHandling = "Update", this.eventResizeHandling = "Update", this.eventRightClickHandling = "ContextMenu", this.eventSelectHandling = "Update", this.headerClickHandling = "Enabled", this.timeRangeSelectedHandling = "Enabled", this.timeRangeDoubleClickHandling = "Enabled", this.onEventFilter = null, this.onBeforeEventRender = null, this.onBeforeCellRender = null, this.onBeforeHeaderRender = null, this.onDomAddEvent = null, this.onDomRemoveEvent = null, this.onBeforeEventExport = null, this.onBeforeCellExport = null, this.onBeforeHeaderExport = null, this.backendUrl = null, this.cellEvents = [], this.elements = {}, this.elements.events = [], this.J = {}, this.J.events = {}, this.events = {}, this.K = 0, this.members = {}, this.members.ignore = ["internal", "nav", "debug", "temp", "elements", "members", "cellProperties"], this.M = "javasc", this.V = function(e, t) {
                        var e = JSON.parse(e);
                        if (e.BubbleGuid) {
                            var i = e.BubbleGuid,
                                n = this.bubbles[i];
                            return delete this.bubbles[i], a.ja(), void("undefined" != typeof e.Result.BubbleHTML && n.updateView(e.Result.BubbleHTML, n))
                        }
                        if (e.CallBackRedirect) return void(document.location.href = e.CallBackRedirect);
                        if ("undefined" != typeof e.ClientState && (a.clientState = e.ClientState), "None" === e.UpdateType) return a.ka(e.CallBackData, !0), e.Message && a.message(e.Message), void a.ja();
                        if (e.VsUpdate) {
                            var o = document.createElement("input");
                            o.type = "hidden", o.name = a.id + "_vsupdate", o.id = o.name, o.value = e.VsUpdate, a.of.innerHTML = "", a.of.appendChild(o)
                        }
                        a.events.list = e.Events, "undefined" != typeof e.TagFields && (a.tagFields = e.TagFields), "undefined" != typeof e.SortDirections && (a.sortDirections = e.SortDirections), "Full" === e.UpdateType && (a.cellProperties = e.CellProperties, a.headerProperties = e.HeaderProperties, a.startDate = e.StartDate, "undefined" != typeof e.ShowWeekend && (a.showWeekend = e.ShowWeekend), a.locale = e.Locale ? e.Locale : a.locale, a.timeFormat = e.TimeFormat ? e.TimeFormat : a.timeFormat, "undefined" != typeof e.WeekStarts && (a.weekStarts = e.WeekStarts), a.hashes = e.Hashes), a.multiselect.clear(!0), a.multiselect.initList = e.SelectedEvents, a.Y(), a.pf(), a.pa(), "Full" === e.UpdateType && (a.qf(), a.rf()), a.ya(), a.Ca(), a.Da(), a.ka(e.CallBackData, !0), a.Ga(), e.Message && a.message(e.Message), a.ja()
                    }, this.ka = function(e, t) {
                        var i = function(e, t) {
                            return function() {
                                if (a.Ha()) {
                                    if ("function" == typeof a.onAfterRender) {
                                        var i = {};
                                        i.isCallBack = t, i.data = e, a.onAfterRender(i)
                                    }
                                } else a.afterRender && a.afterRender(e, t)
                            }
                        };
                        window.setTimeout(i(e, t), 0)
                    }, this.Ha = function() {
                        return 2 === a.api
                    }, this.A = function(e) {
                        var t = this.theme || this.cssClassPrefix;
                        return t ? t + e : ""
                    }, this.pa = function() {
                        if (this.events.list) {
                            if ("function" == typeof this.onBeforeEventRender)
                                for (var e = this.events.list.length, t = 0; t < e; t++) this.Ed(t);
                            this.cellMode ? this.sf() : this.tf()
                        }
                    }, this.S = function(e) {
                        var t = e ? 0 : 100;
                        a.loadingTimeout && window.clearTimeout(a.loadingTimeout), a.loadingTimeout = window.setTimeout(function() {
                            a.loadingLabelVisible && a.nav.loading && (a.nav.loading.style.top = l.headerHeight() + 5 + "px", a.nav.loading.innerHTML = a.loadingLabelText, a.nav.loading.style.display = "")
                        }, t)
                    }, this.ja = function() {
                        this.loadingTimeout && window.clearTimeout(this.loadingTimeout), a.nav.loading && (this.nav.loading.style.display = "none")
                    }, this.tf = function() {
                        if (this.events.list) {
                            for (var e = 0; e < this.events.list.length; e++) {
                                var t = this.events.list[e];
                                if ("object" != typeof t) throw new DayPilot.Exception("Event data item must be an object");
                                if (!t.start) throw new DayPilot.Exception("Event data item must specify 'start' property");
                                var i = null;
                                if ("function" == typeof a.onBeforeEventRender && (i = a.J.events[e]), i) {
                                    if (i.hidden) continue
                                } else if (t.hidden) continue;
                                var n = new DayPilot.Date(t.start),
                                    o = new DayPilot.Date(t.end);
                                if (o = a.uf(o), !(n.getTime() > o.getTime()))
                                    for (var r = 0; r < this.rows.length; r++) {
                                        var l = this.rows[r];
                                        if (l.belongsHere(n, o)) {
                                            var s = new DayPilot.Event(t, a);
                                            if ("function" == typeof a.onEventFilter && a.events.Kd) {
                                                var d = {};
                                                if (d.filter = a.events.Kd, d.visible = !0, d.e = s, a.onEventFilter(d), !d.visible) break
                                            }
                                            l.events.push(s), "function" == typeof this.onBeforeEventRender && (s.cache = this.J.events[e])
                                        }
                                    }
                            }
                            for (var c = 0; c < this.rows.length; c++) {
                                var l = this.rows[c];
                                l.events.sort(this.Md);
                                for (var h = 0; h < this.rows[c].events.length; h++) {
                                    var u = l.events[h],
                                        f = l.getStartColumn(u),
                                        v = l.getWidth(u);
                                    l.putIntoLine(u, f, v, c)
                                }
                            }
                        }
                    }, this.sf = function() {
                        this.cellEvents = [];
                        for (var e = 0; e < this.vf(); e++) {
                            this.cellEvents[e] = [];
                            for (var t = 0; t < this.rows.length; t++) {
                                var i = {},
                                    n = this.firstDate.addDays(7 * t + e);
                                i.start = n, i.end = n.addDays(1), i.events = [], this.cellEvents[e][t] = i
                            }
                        }
                        for (var o = 0; o < this.events.list.length; o++) {
                            var r = this.events.list[o];
                            if ("object" != typeof r) throw new DayPilot.Exception("Event data item must be an object");
                            if (!r.start) throw new DayPilot.Exception("Event data item must specify 'start' property");
                            var l = null;
                            if ("function" == typeof a.onBeforeEventRender && (l = a.J.events[o]), l) {
                                if (l.hidden) continue
                            } else if (r.hidden) continue;
                            var s = new DayPilot.Date(r.start),
                                d = new DayPilot.Date(r.start);
                            if (d = a.uf(d), !(s.getTime() > d.getTime()))
                                for (var e = 0; e < this.vf(); e++)
                                    for (var t = 0; t < this.rows.length; t++) {
                                        var i = this.cellEvents[e][t];
                                        if (s.getTime() >= i.start.getTime() && s.getTime() < i.end.getTime()) {
                                            var c = new DayPilot.Event(r, a);
                                            if ("function" == typeof a.onEventFilter && a.events.Kd) {
                                                var h = {};
                                                if (h.filter = a.events.Kd, h.visible = !0, h.e = c, a.onEventFilter(h), !h.visible) continue
                                            }
                                            i.events.push(c), "function" == typeof this.onBeforeEventRender && (c.cache = this.J.events[o])
                                        }
                                    }
                        }
                        for (var e = 0; e < this.vf(); e++)
                            for (var t = 0; t < this.rows.length; t++) {
                                var i = this.cellEvents[e][t];
                                i.events.sort(this.Md)
                            }
                    }, this.Y = function() {
                        for (var e = 0; e < this.elements.events.length; e++) {
                            var t = this.elements.events[e];
                            if ("function" == typeof a.onDomRemoveEvent) {
                                var i = t.domArgs;
                                t.domArgs = null, a.onDomRemoveEvent(i)
                            }
                            t.event = null, t.click = null, t.parentNode.removeChild(t)
                        }
                        this.elements.events = []
                    }, this.Da = function() {
                        this.J.events = {}, this.cellMode ? this.wf() : this.xf(), this.multiselect.redraw()
                    }, this.wf = function() {
                        this.elements.events = [];
                        for (var e = 0; e < this.vf(); e++)
                            for (var t = 0; t < this.rows.length; t++)
                                for (var i = this.cellEvents[e][t], n = (this.cells[e][t], 0); n < i.events.length; n++) {
                                    var a = i.events[n];
                                    a.part.colStart = e, a.part.colWidth = 1, a.part.row = t, a.part.line = n, a.part.startsHere = !0, a.part.endsHere = !0, this.pc(a)
                                }
                    }, this.xf = function() {
                        this.elements.events = [];
                        for (var e = 0; e < this.rows.length; e++)
                            for (var t = this.rows[e], i = 0; i < t.lines.length; i++)
                                for (var n = t.lines[i], a = 0; a < n.length; a++) this.pc(n[a])
                    }, this.Ld = function(e, t) {
                        if (!(e && t && e.start && t.start)) return 0;
                        var i = e.start().ticks - t.start().ticks;
                        return 0 !== i ? i : t.end().ticks - e.end().ticks
                    }, this.Md = function(e, t) {
                        if (!e || !t) return 0;
                        if (!(e.data && t.data && e.data.sort && t.data.sort && 0 !== e.data.sort.length && 0 !== t.data.sort.length)) return a.Ld(e, t);
                        for (var i = 0, n = 0; 0 === i && "undefined" != typeof e.data.sort[n] && "undefined" != typeof t.data.sort[n];) i = e.data.sort[n] === t.data.sort[n] ? 0 : "number" == typeof e.data.sort[n] && "number" == typeof t.data.sort[n] ? e.data.sort[n] - t.data.sort[n] : a.Nd(e.data.sort[n], t.data.sort[n], a.sortDirections[n]), n++;
                        return i
                    }, this.Nd = function(e, t, i) {
                        var n = "desc" !== i,
                            a = n ? -1 : 1,
                            o = -a;
                        if (null === e && null === t) return 0;
                        if (null === t) return o;
                        if (null === e) return a;
                        var r = [];
                        return r[0] = e, r[1] = t, r.sort(), e === r[0] ? a : o
                    }, this.yf = function(e, i, n, a, o, r) {
                        o || (o = 0);
                        var l = a;
                        this.shadow = {}, this.shadow.list = [], this.shadow.start = {
                            x: e,
                            y: i
                        }, this.shadow.width = a, this.eventMoveToPosition && (l = 1, this.shadow.position = n);
                        var s = 7 * i + e - o;
                        s < 0 && (l += s, e = 0, i = 0);
                        for (var d = o; d >= 7;) i--, d -= 7;
                        if (d > e) {
                            d > e + (7 - this.vf()) ? (i--, e = e + 7 - d) : (l = l - d + e, e = 0)
                        } else e -= d;
                        i < 0 && (i = 0, e = 0);
                        var c = null;
                        for (t.resizingEvent ? c = "w-resize" : t.movingEvent && (c = "move"), this.nav.top.style.cursor = c; l > 0 && i < this.rows.length;) {
                            var h = Math.min(this.vf() - e, l),
                                u = this.rows[i],
                                f = this.zf(i),
                                v = u.getHeight();
                            this.eventMoveToPosition && (f = this.Af(i, n), v = 2);
                            var p = document.createElement("div");
                            p.setAttribute("unselectable", "on"), p.style.position = "absolute", p.style.left = this.Bf() * e + "%", p.style.width = this.Bf() * h + "%", p.style.top = f + "px", p.style.height = v + "px", p.style.cursor = c;
                            var m = document.createElement("div");
                            m.setAttribute("unselectable", "on"), p.appendChild(m), p.className = this.A("_shadow"), m.className = this.A("_shadow_inner");
                            this.nav.events.appendChild(p), this.shadow.list.push(p), l -= h + 7 - this.vf(), e = 0, i++
                        }
                    }, this.Cf = function() {
                        if (this.shadow) {
                            this.nav.events;
                            DayPilot.de(this.shadow.list), this.shadow = null, this.nav.top.style.cursor = ""
                        }
                    }, this.Af = function(e, t) {
                        for (var i = 0, n = 0; n < e; n++) i += this.rows[n].getHeight();
                        return i += this.cellHeaderHeight, i += t * l.lineHeight()
                    }, this.Df = function(e, t) {
                        return this.firstDate.addDays(7 * t + e)
                    }, this.Ed = function(e) {
                        var t = this.J.events,
                            i = this.events.list[e],
                            n = {};
                        for (var a in i) n[a] = i[a];
                        if ("function" == typeof this.onBeforeEventRender) {
                            var o = {};
                            o.e = n, o.data = n, this.onBeforeEventRender(o)
                        }
                        t[e] = n
                    }, this.pc = function(e) {
                        var t = this.cellMode,
                            i = e.part.row,
                            n = e.part.line,
                            r = e.part.colStart,
                            s = e.part.colWidth,
                            d = e.cache || e.data,
                            c = t ? 0 : this.Bf() * r,
                            h = t ? 100 : this.Bf() * s,
                            u = t ? n * l.lineHeight() : this.Af(i, n),
                            f = document.createElement("div");
                        f.setAttribute("unselectable", "on"), f.style.height = l.eventHeight() + "px", f.style.position = "relative", f.style.overflow = "hidden", f.className = this.A("_event"), d.cssClass && DayPilot.Util.addClass(f, d.cssClass), f.event = e, t ? (f.style.marginRight = "2px", f.style.marginBottom = "2px") : (f.style.width = h + "%", f.style.position = "absolute", f.style.left = c + "%", f.style.top = u + "px"), this.showToolTip && d.toolTip && !this.bubble && (f.title = d.toolTip), f.onclick = this.Ef, f.ondblclick = this.Ff, f.oncontextmenu = this.Gf, f.onmousedown = this.sc, f.onmousemove = this.qc, f.onmouseout = this.rc, f.ontouchstart = o.onEventTouchStart, f.ontouchmove = o.onEventTouchMove, f.ontouchend = o.onEventTouchEnd, e.part.startsHere || DayPilot.Util.addClass(f, this.A("_event_continueleft")), e.part.endsHere || DayPilot.Util.addClass(f, this.A("_event_continueright"));
                        var v = document.createElement("div");
                        v.setAttribute("unselectable", "on"), v.className = this.A("_event_inner"), d.fontColor && (v.style.color = d.fontColor), d.borderColor && ("darker" === d.borderColor && d.backColor ? v.style.borderColor = DayPilot.ColorUtil.darker(d.backColor, 2) : v.style.borderColor = d.borderColor), d.backColor && (v.style.background = d.backColor, (DayPilot.browser.ie9 || DayPilot.browser.ielt9) && (v.style.filter = "")), f.appendChild(v);
                        var p = this.Uc.locale(),
                            m = a.eventStartEndWidth;
                        if (this.eventStartTime || d.htmlStart) {
                            var g = "Clock12Hours" === a.Uc.timeFormat() ? e.start().toString("h tt", p) : e.start().toString("H", p),
                                y = {
                                    "left": 5,
                                    "top": 3,
                                    "width": m,
                                    "bottom": 2,
                                    "v": "Visible",
                                    "html": d.htmlStart || g,
                                    "css": a.A("_event_timeleft")
                                },
                                b = DayPilot.Areas.createArea(f, e, y);
                            f.appendChild(b), v.style.paddingLeft = m + "px"
                        }
                        if (this.eventEndTime || d.htmlEnd) {
                            var g = "Clock12Hours" === a.Uc.timeFormat() ? e.end().toString("h tt", p) : e.end().toString("H", p),
                                y = {
                                    "right": 5,
                                    "top": 3,
                                    "width": m,
                                    "bottom": 2,
                                    "v": "Visible",
                                    "html": d.htmlEnd || g,
                                    "css": a.A("_event_timeright")
                                },
                                b = DayPilot.Areas.createArea(f, e, y);
                            f.appendChild(b), v.style.paddingRight = m + "px"
                        }
                        if (d.areas)
                            for (var w = d.areas, D = 0; D < w.length; D++) {
                                var y = w[D];
                                if (DayPilot.Areas.isVisible(y)) {
                                    var b = DayPilot.Areas.createArea(f, e, y);
                                    f.appendChild(b)
                                }
                            }! function() {
                                var t = {};
                                t.e = e, t.element = null, f.domArgs = t, "function" == typeof a.onDomAddEvent && a.onDomAddEvent(t), t.element ? v.appendChild(t.element) : v.innerHTML = e.client.innerHTML()
                            }(), this.elements.events.push(f), t ? this.cells[r][i].body.appendChild(f) : this.nav.events.appendChild(f), a.multiselect.Wb(f.event) && a.multiselect.add(f.event, !0);
                        var f = f;
                        if (a.Ha()) {
                            if ("function" == typeof a.onAfterEventRender) {
                                var k = {};
                                k.e = f.event, k.div = f, a.onAfterEventRender(k)
                            }
                        } else a.afterEventRender && a.afterEventRender(f.event, f)
                    }, this.Ef = function(e) {
                        o.start || a.Ua(this, e)
                    }, this.Ff = function(e) {
                        a.Ya(this, e)
                    }, this.qc = function(e) {
                        var i = this,
                            n = i.event;
                        if ("undefined" != typeof t && !t.movingEvent && !t.resizingEvent) {
                            var o = DayPilot.mo3(i, e);
                            if (o) {
                                ! function() {
                                    var e = i;
                                    if (!e.active) {
                                        var t = [],
                                            o = n.cache || n.data;
                                        "Disabled" === a.eventDeleteHandling || o.deleteDisabled || t.push({
                                            "action": "JavaScript",
                                            "v": "Hover",
                                            "w": 17,
                                            "h": 17,
                                            "top": 2,
                                            "right": 2,
                                            "css": a.A("_event_delete"),
                                            "js": function(e) {
                                                a.cb(e)
                                            }
                                        });
                                        var r = e.event.cache ? e.event.cache.areas : e.event.data.areas;
                                        r && r.length > 0 && (t = t.concat(r)), DayPilot.Areas.showAreas(e, e.event, null, t)
                                    }
                                }(), a.Hf(i.event).each(function(e) {
                                    DayPilot.Util.addClass(e, a.A("_event_hover"))
                                });
                                var r = 6;
                                if (!a.cellMode && o.x <= r && n.client.resizeEnabled() ? n.part.startsHere ? (i.style.cursor = "w-resize", i.dpBorder = "left") : i.style.cursor = "not-allowed" : !a.cellMode && i.clientWidth - o.x <= r && n.client.resizeEnabled() ? n.part.endsHere ? (i.style.cursor = "e-resize", i.dpBorder = "right") : i.style.cursor = "not-allowed" : n.client.clickEnabled() ? i.style.cursor = "pointer" : i.style.cursor = "default", "undefined" != typeof DayPilot.Bubble && a.bubble && "Disabled" !== a.eventHoverHandling)
                                    if (t.movingEvent || t.resizingEvent) DayPilot.Bubble.hideActive();
                                    else {
                                        var l = this.Fd && o.x === this.Fd.x && o.y === this.Fd.y;
                                        l || (this.Fd = o, a.bubble.showEvent(i.event))
                                    }
                            }
                        }
                    }, this.rc = function(e) {
                        var t = this;
                        "undefined" != typeof DayPilot.Bubble && a.bubble && a.bubble.hideOnMouseOut(), t.style.cursor = "", a.Hf(t.event).each(function(e) {
                            DayPilot.Util.removeClass(e, a.A("_event_hover"))
                        }), DayPilot.Areas.hideAreas(t, e)
                    }, this.Gf = function() {
                        var e = this;
                        return a.Za(e.event), !1
                    }, this.sc = function(e) {
                        if (!o.start) {
                            "undefined" != typeof DayPilot.Bubble && (DayPilot.Bubble.hideActive(), DayPilot.Bubble.cancelShowing());
                            var i = this,
                                n = i.event,
                                r = n.part.row,
                                l = n.part.colStart,
                                s = n.part.line,
                                d = n.part.colWidth;
                            e = e || window.event;
                            var c = DayPilot.Util.mouseButton(e);
                            if (e.cancelBubble = !0, e.stopPropagation && e.stopPropagation(), c.left)
                                if ("undefined" != typeof DayPilot.Bubble && a.bubble && DayPilot.Bubble.hideActive(), t.movingEvent = null, "w-resize" === this.style.cursor || "e-resize" === this.style.cursor) {
                                    var h = {};
                                    h.start = {}, h.start.x = l, h.start.y = r, h.event = i.event, h.width = DayPilot.DateUtil.daysSpan(h.event.start(), h.event.end()) + 1, h.direction = this.style.cursor, t.resizingEvent = h
                                } else if ("move" === this.style.cursor || n.client.moveEnabled()) {
                                a.Cf();
                                var u = DayPilot.mo3(a.nav.events, e);
                                if (!u) return;
                                var f = a.If(u.x, u.y);
                                if (!f) return;
                                var v = DayPilot.DateUtil.daysDiff(n.start(), a.rows[r].start),
                                    p = 7 * f.y + f.x - (7 * r + l);
                                v && (p += v);
                                var m = {};
                                m.start = {}, m.start.x = l, m.start.y = r, m.start.line = s, m.offset = a.eventMoveToPosition ? 0 : p, m.colWidth = d, m.event = i.event, m.coords = u, t.movingEvent = m
                            }
                        }
                    }, this.temp = {}, this.temp.getPosition = function() {
                        if (!a.coords) return null;
                        var e = a.If(a.coords.x, a.coords.y);
                        if (!e) return null;
                        var t = new DayPilot.Date(a.Df(e.x, e.y)),
                            e = {};
                        return e.start = t, e.end = t.addDays(1), e
                    }, this.tc = {};
                    var o = a.tc;
                    o.active = !1, o.start = !1, o.timeouts = [], o.onEventTouchStart = function(e) {
                        if (!o.active && !o.start) {
                            o.clearTimeouts(), o.start = !0, o.active = !1;
                            var t = this;
                            if (t.event.client.moveEnabled()) {
                                var i = a.tapAndHoldTimeout;
                                o.timeouts.push(window.setTimeout(function() {
                                    o.active = !0, o.start = !1;
                                    var i = o.relativeCoords(e);
                                    o.startMoving(t, i), e.preventDefault()
                                }, i))
                            }
                            e.stopPropagation()
                        }
                    }, o.onEventTouchMove = function(e) {
                        o.clearTimeouts(), o.start = !1
                    }, o.onEventTouchEnd = function(e) {
                        o.clearTimeouts(), o.start && a.Va(this, e), window.setTimeout(function() {
                            o.start = !1, o.active = !1
                        }, 500)
                    }, o.onMainTouchStart = function(e) {
                        if (!o.active && !o.start) {
                            o.clearTimeouts(), o.start = !0, o.active = !1;
                            var t = a.tapAndHoldTimeout;
                            o.timeouts.push(window.setTimeout(function() {
                                o.active = !0, o.start = !1, e.preventDefault();
                                var t = o.relativeCoords(e);
                                o.startRange(t)
                            }, t))
                        }
                    }, o.onMainTouchMove = function(e) {
                        if (o.clearTimeouts(), o.start = !1, o.active) {
                            e.preventDefault();
                            var t = o.relativeCoords(e);
                            if (o.moving) return void o.updateMoving(t);
                            o.range && o.updateRange(t)
                        }
                    }, o.onMainTouchEnd = function(e) {
                        if (o.clearTimeouts(), o.active) {
                            if (o.moving) {
                                var t = (o.moving, o.moving.event),
                                    i = a.shadow.start,
                                    n = a.shadow.position,
                                    r = o.moving.offset;
                                a.Cf(), o.moving = null, a.lb(t, i.x, i.y, r, e, n)
                            }
                            if (o.range) {
                                var l = o.range,
                                    i = new DayPilot.Date(a.Df(l.from.x, l.from.y)),
                                    s = i.addDays(l.width);
                                o.range = null, a.tb(i, s)
                            }
                        }
                        window.setTimeout(function() {
                            o.start = !1, o.active = !1
                        }, 500)
                    }, o.clearTimeouts = function() {
                        for (var e = 0; e < o.timeouts.length; e++) clearTimeout(o.timeouts[e]);
                        o.timeouts = []
                    }, o.relativeCoords = function(e) {
                        var t = a.nav.events,
                            i = e.touches ? e.touches[0] : e,
                            n = i.pageX,
                            o = i.pageY,
                            r = DayPilot.abs(t);
                        return {
                            x: n - r.x,
                            y: o - r.y,
                            toString: function() {
                                return "x: " + this.x + ", y:" + this.y
                            }
                        }
                    }, o.startMoving = function(e, t) {
                        a.Cf();
                        var i = e.event,
                            n = a.If(t.x, t.y);
                        if (n) {
                            var r = DayPilot.DateUtil.daysDiff(i.start(), a.rows[i.part.row].start),
                                l = 7 * n.y + n.x - (7 * i.part.row + i.part.colStart);
                            r && (l += r);
                            var s = {};
                            s.start = {}, s.start.x = i.part.colStart, s.start.y = i.part.row, s.start.line = i.part.line, s.offset = a.eventMoveToPosition ? 0 : l, s.colWidth = i.part.colWidth, s.event = i, s.coords = t, o.moving = s, o.updateMoving(t)
                        }
                    }, o.updateMoving = function(e) {
                        var t = a.If(e.x, e.y);
                        if (t) {
                            var i = a.Jf(t);
                            a.Cf();
                            var n = o.moving.event,
                                r = o.moving.offset,
                                l = a.cellMode ? 1 : DayPilot.DateUtil.daysSpan(n.start(), n.end()) + 1;
                            l < 1 && (l = 1), a.yf(t.x, t.y, i, l, r, n)
                        }
                    }, o.startRange = function(e) {
                        var t = a.If(e.x, e.y);
                        if (t) {
                            a.Cf();
                            var i = {};
                            i.start = {}, i.start.x = t.x, i.start.y = t.y, i.x = t.x, i.y = t.y, i.width = 1, o.range = i, o.updateRange(e)
                        }
                    }, o.updateRange = function(e) {
                        var t = a.If(e.x, e.y);
                        if (t) {
                            a.Cf();
                            var i = o.range.start,
                                n = 7 * i.y + i.x,
                                r = 7 * t.y + t.x,
                                l = Math.abs(r - n) + 1;
                            l < 1 && (l = 1);
                            var s = n < r ? i : t;
                            o.range.width = l, o.range.from = {
                                x: s.x,
                                y: s.y
                            }, a.yf(s.x, s.y, 0, l, 0, null)
                        }
                    }, this.isWeekend = function(e) {
                        return 0 === e.dayOfWeek() || 6 === e.dayOfWeek()
                    }, this.Kf = function() {
                        var e = this.startDate.lastDayOfMonth();
                        if (this.showWeekend) return e;
                        for (; this.isWeekend(e);) e = e.addDays(-1);
                        return e
                    }, this.pf = function() {
                        if ("string" == typeof this.startDate && (this.startDate = new DayPilot.Date(this.startDate)), "Month" === this.viewType ? this.startDate = this.startDate.firstDayOfMonth() : this.startDate = this.startDate.getDatePart(), this.firstDate = this.startDate.firstDayOfWeek(l.weekStarts()), !this.showWeekend) {
                            for (var e = this.startDate.addMonths(-1).getMonth(), t = new DayPilot.Date(this.firstDate).addDays(6); this.isWeekend(t);) t = t.addDays(-1);
                            t.getMonth() === e && (this.firstDate = this.firstDate.addDays(7))
                        }
                        var i;
                        this.startDate;
                        if ("Month" === this.viewType) {
                            var n = this.Kf(),
                                o = DayPilot.DateUtil.daysDiff(this.firstDate, n) + 1;
                            i = Math.ceil(o / 7)
                        } else i = this.weeks;
                        this.days = 7 * i, this.rows = [];
                        for (var r = 0; r < i; r++) {
                            var s = {};
                            s.start = this.firstDate.addDays(7 * r), s.end = s.start.addDays(this.vf()), s.events = [], s.lines = [], s.index = r, s.minHeight = this.cellHeight, s.calendar = this, s.belongsHere = function(e, t) {
                                return t.getTime() === e.getTime() && e.getTime() === this.start.getTime() || !(t.getTime() <= this.start.getTime() || e.getTime() >= this.end.getTime())
                            }, s.getPartStart = function(e) {
                                return DayPilot.DateUtil.max(this.start, e.start())
                            }, s.getPartEnd = function(e) {
                                return DayPilot.DateUtil.min(this.end, e.rawend())
                            }, s.getStartColumn = function(e) {
                                var t = this.getPartStart(e);
                                return DayPilot.DateUtil.daysDiff(this.start, t)
                            }, s.getWidth = function(e) {
                                return DayPilot.DateUtil.daysSpan(this.getPartStart(e), this.getPartEnd(e)) + 1
                            }, s.putIntoLine = function(e, t, i, n) {
                                for (var a = this, o = 0; o < this.lines.length; o++) {
                                    var r = this.lines[o];
                                    if (r.isFree(t, i)) return r.addEvent(e, t, i, n, o), o
                                }
                                var r = [];
                                return r.isFree = function(e, t) {
                                    for (var i = !0, n = 0; n < this.length; n++) {
                                        var a = this[n];
                                        e + t - 1 < a.part.colStart || e > a.part.colStart + a.part.colWidth - 1 || (i = !1)
                                    }
                                    return i
                                }, r.addEvent = function(e, t, i, n, o) {
                                    e.part.colStart = t, e.part.colWidth = i, e.part.row = n, e.part.line = o, e.part.startsHere = a.start.getTime() <= e.start().getTime(), e.part.endsHere = a.end.getTime() >= e.end().getTime(), this.push(e)
                                }, r.addEvent(e, t, i, n, this.lines.length), this.lines.push(r), this.lines.length - 1
                            }, s.getStart = function() {
                                for (var e = 0, t = 0; t < a.rows.length && t < this.index; t++) e += a.rows[t].getHeight()
                            }, s.getHeight = function() {
                                return Math.max(this.lines.length * l.lineHeight() + a.cellHeaderHeight + a.cellMarginBottom, this.calendar.cellHeight)
                            }, this.rows.push(s)
                        }
                        this.Lf = this.firstDate.addDays(7 * i)
                    }, this.Mf = function() {
                        switch (this.heightSpec) {
                            case "Auto":
                                for (var e = l.headerHeight(), t = 0; t < this.rows.length; t++) e += this.rows[t].getHeight();
                                return e;
                            case "Fixed":
                                return this.height
                        }
                    }, this.Nf = function(e, t) {
                        return 7 * t.y + t.x - (7 * e.y + e.x) + 1
                    }, this.Pd = {}, this.Pd.scope = null, this.Pd.notify = function() {
                        a.Pd.scope && a.Pd.scope["$apply"]()
                    }, this.debug = new DayPilot.Debug(this), this.zc = function() {
                        var e = this.nav.top;
                        this.nav.top.dp = this, e.setAttribute("unselectable", "on"), e.style.MozUserSelect = "none", e.style.KhtmlUserSelect = "none", e.style.WebkitUserSelect = "none", e.style.WebkitTapHighlightColor = "rgba(0,0,0,0)", e.style.WebkitTouchCallout = "none", e.style.position = "relative", this.width && (e.style.width = this.width), e.onselectstart = function(e) {
                            return !1
                        }, e.className = this.A("_main"), this.hideUntilInit && (e.style.visibility = "hidden"), this.visible || (e.style.display = "none"), e.onmousemove = this.Fc, e.ontouchstart = o.onMainTouchStart, e.ontouchmove = o.onMainTouchMove, e.ontouchend = o.onMainTouchEnd, this.of = document.createElement("div"), this.of.style.display = "none", this.nav.top.appendChild(this.of);
                        var t = document.createElement("div");
                        t.style.position = "relative", t.style.height = l.headerHeight() + "px", t.oncontextmenu = function() {
                            return !1
                        }, this.nav.top.appendChild(t), this.nav.header = t;
                        var i = document.createElement("div");
                        i.style.zoom = "1";
                        var n = document.createElement("div");
                        n.style.position = "relative", i.appendChild(n), this.nav.loading = document.createElement("div"), this.nav.loading.style.position = "absolute", this.nav.loading.style.top = "0px", this.nav.loading.style.left = "5px", this.nav.loading.className = a.A("_loading"), this.nav.loading.innerHTML = this.loadingLabelText, this.nav.loading.style.display = "none", this.nav.top.appendChild(i), this.nav.top.appendChild(this.nav.loading), this.nav.scrollable = i, this.nav.events = n
                    }, this.Fc = function(e) {
                        e.insideMainD = !0, window.event && window.event.srcElement && (window.event.srcElement.inside = !0), a.coords = DayPilot.mo3(a.nav.events, e);
                        var i = a.coords;
                        if (i) {
                            var n = a.If(i.x, i.y);
                            if (n) {
                                if (t.resizingEvent) {
                                    a.Cf();
                                    var o, r, l = t.resizingEvent;
                                    l.start;
                                    if ("w-resize" === l.direction) {
                                        r = n;
                                        var s = l.event.rawend();
                                        s.getDatePart().getTime() === s.getTime() && (s = s.addDays(-1));
                                        var d = a.Of(s);
                                        o = a.Nf(n, d)
                                    } else r = a.Of(l.event.start()), o = a.Nf(r, n);
                                    o < 1 && (o = 1), a.yf(r.x, r.y, 0, o)
                                } else if (t.movingEvent) {
                                    if (i.x === t.movingEvent.coords.x && i.y === t.movingEvent.coords.y) return;
                                    var c = a.Jf(n);
                                    a.Cf();
                                    var h = t.movingEvent.event,
                                        u = t.movingEvent.offset,
                                        o = a.cellMode ? 1 : DayPilot.DateUtil.daysSpan(h.start(), h.rawend()) + 1;
                                    o < 1 && (o = 1), a.yf(n.x, n.y, c, o, u, h)
                                } else if (t.timeRangeSelecting) {
                                    t.cancelCellClick = !0, a.Cf();
                                    var r = t.timeRangeSelecting,
                                        f = 7 * r.y + r.x,
                                        v = 7 * n.y + n.x,
                                        o = Math.abs(v - f) + 1;
                                    o < 1 && (o = 1);
                                    var p = f < v ? r : n;
                                    t.timeRangeSelecting.from = {
                                        x: p.x,
                                        y: p.y
                                    }, t.timeRangeSelecting.width = o, t.timeRangeSelecting.moved = !0, a.yf(p.x, p.y, 0, o, 0, null)
                                }
                                if (t.drag) {
                                    if (t.gShadow && document.body.removeChild(t.gShadow), t.gShadow = null, !t.movingEvent) {
                                        var m = DayPilot.Date.today(),
                                            e = {
                                                "id": t.drag.id,
                                                "start": m,
                                                "end": m.addSeconds(t.drag.duration),
                                                "text": t.drag.text
                                            },
                                            g = t.drag.data;
                                        if (g) {
                                            var y = ["duration", "element", "remove", "id", "text"];
                                            for (var b in g) DayPilot.contains(y, b) || (e[b] = g[b])
                                        }
                                        var h = new DayPilot.Event(e, a);
                                        h.external = !0;
                                        var w = t.movingEvent = {};
                                        w.event = h, w.coords = i, w.position = 0, w.offset = 0, w.external = !0, w.removeElement = t.drag.element
                                    }
                                    e.cancelBubble = !0
                                }
                            }
                        }
                    }, this.Jf = function(e) {
                        for (var t = e.relativeY, i = a.rows[e.y], n = a.cellHeaderHeight, o = l.lineHeight(), r = i.lines.length, s = 0; s < i.lines.length; s++) {
                            if (i.lines[s].isFree(e.x, 1)) {
                                r = s;
                                break
                            }
                        }
                        var d = Math.floor((t - n + o / 2) / o),
                            d = Math.min(r, d),
                            d = Math.max(0, d);
                        return d
                    }, this.message = function(e, t, i, n) {
                        if (null !== e) {
                            var o, t = t || this.messageHideAfter || 2e3,
                                r = .8,
                                s = l.headerHeight();
                            if (this.nav.message) o = a.nav.message;
                            else {
                                o = document.createElement("div"), o.setAttribute("unselectable", "on"), o.style.position = "absolute", o.style.right = "0px", o.style.left = "0px", o.style.top = s + "px", o.style.opacity = r, o.style.filter = "alpha(opacity=80)", o.style.display = "none", o.onmousemove = function() {
                                    o.messageTimeout && !o.status && clearTimeout(o.messageTimeout)
                                }, o.onmouseout = function() {
                                    "none" !== a.nav.message.style.display && (o.messageTimeout = setTimeout(a.Sa, 500))
                                };
                                var d = document.createElement("div");
                                d.setAttribute("unselectable", "on"), d.onclick = function() {
                                    a.nav.message.style.display = "none"
                                }, d.className = this.A("_message"), o.appendChild(d);
                                var c = document.createElement("div");
                                c.setAttribute("unselectable", "on"), c.style.position = "absolute", c.className = this.A("_message_close"), c.onclick = function() {
                                    a.nav.message.style.display = "none"
                                }, o.appendChild(c), this.nav.top.appendChild(o), this.nav.message = o
                            }
                            var h = function() {
                                a.nav.message.style.opacity = r, a.nav.message.firstChild.innerHTML = e;
                                var i = function() {
                                    o.messageTimeout = setTimeout(a.Sa, t)
                                };
                                DayPilot.fade(a.nav.message, .2, i)
                            };
                            clearTimeout(o.messageTimeout), "none" !== this.nav.message.style.display ? DayPilot.fade(a.nav.message, -.2, h) : h()
                        }
                    }, this.message.show = function(e) {
                        a.message(e)
                    }, this.message.hide = function() {
                        a.Sa()
                    }, this.Sa = function() {
                        var e = function() {
                            a.nav.message.style.display = "none"
                        };
                        DayPilot.fade(a.nav.message, -.2, e)
                    }, this.aa = function(e) {
                        "Parent100Pct" === a.heightSpec && a.ya()
                    }, this.ya = function() {
                        var e = this.nav.scrollable;
                        if ("Parent100Pct" === this.heightSpec || "Fixed" === this.heightSpec ? (e.style.top = this.headerHeight + "px", e.style.bottom = "0px", e.style.left = "0px", e.style.right = "0px", e.style.overflow = "auto", e.style.position = "absolute") : e.style.position = "relative", "Parent100Pct" === this.heightSpec) {
                            this.nav.top.style.height = "100%";
                            this.nav.top.clientHeight
                        } else this.nav.top.style.height = this.Mf() + "px";
                        for (var t = 0; t < this.cells.length; t++)
                            for (var i = 0; i < this.cells[t].length; i++) this.cells[t][i].style.top = this.zf(i) + "px", this.cells[t][i].style.height = this.rows[i].getHeight() + "px";
                        this.Pf()
                    }, this.If = function(e, t) {
                        for (var i = Math.floor(this.nav.top.clientWidth / this.vf()), n = Math.min(Math.floor(e / i), this.vf() - 1), a = null, o = 0, r = 0, l = 0, s = 0; s < this.rows.length; s++) {
                            if (r += this.rows[s].getHeight(), t < r) {
                                o = t - l, a = s;
                                break
                            }
                            l = r
                        }
                        null === a && (a = this.rows.length - 1);
                        var d = {};
                        return d.x = n, d.y = a, d.relativeY = o, d
                    }, this.Of = function(e) {
                        for (var t = DayPilot.DateUtil.daysDiff(this.firstDate, e), i = {
                                x: 0,
                                y: 0
                            }; t >= 7;) i.y++, t -= 7;
                        return i.x = t, i
                    }, this.Pf = function() {
                        var e = DayPilot.sw(this.nav.scrollable);
                        this.nav.header.style.marginRight = e + "px"
                    };
                    var r = null;
                    this.rf = function() {
                        var e = this.nav.header,
                            t = this.nav.events;
                        this.cells = [];
                        for (var i = 0; i < this.vf(); i++) {
                            this.cells[i] = [];
                            var n = this.headerProperties ? this.headerProperties[i] : null,
                                o = i + l.weekStarts();
                            if (o > 6 && (o -= 7), !n) {
                                var n = {};
                                n.html = l.locale().dayNames[o]
                            }
                            if ("function" == typeof a.onBeforeHeaderRender) {
                                var s = {};
                                s.header = {}, s.header.dayOfWeek = o;
                                var d = ["html", "backColor", "cssClass"];
                                DayPilot.Util.copyProps(n, s.header, d), a.onBeforeHeaderRender(s), DayPilot.Util.copyProps(s.header, n, d)
                            }
                            var c = document.createElement("div");
                            c.setAttribute("unselectable", "on"), c.style.position = "absolute", c.style.left = this.Bf() * i + "%", c.style.width = this.Bf() + "%", c.style.top = "0px", c.style.height = l.headerHeight() + "px",
                                function(e) {
                                    c.onclick = function() {
                                        a._a(e)
                                    }
                                }(o);
                            var h = document.createElement("div");
                            h.setAttribute("unselectable", "on"), h.className = this.A("_header_inner"), h.innerHTML = n.html, c.appendChild(h), c.className = this.A("_header"), n && (n.cssClass && DayPilot.Util.addClass(c, n.cssClass), n.backColor && (h.style.background = n.backColor)), e.appendChild(c);
                            for (var u = 0; u < this.rows.length; u++) this.Qf(i, u, t)
                        }
                        if (!DayPilot.contains(this.nav.top.childNodes, r) && DayPilot.Util.isNullOrUndefined(undefined)) {
                            var f = document.createElement("div");
                            f.style.position = "absolute", f.style.padding = "2px", f.style.top = "0px", f.style.left = "0px", f.style.backgroundColor = "#FF6600", f.style.color = "white", f.innerHTML = "\u0044\u0045" + "\u004D\u004F", r = f, this.nav.top.appendChild(f)
                        }
                    }, this.qf = function() {
                        for (var e = 0; e < this.cells.length; e++)
                            for (var t = 0; t < this.cells[e].length; t++) this.cells[e][t].onclick = null;
                        this.nav.header.innerHTML = "", this.nav.events.innerHTML = ""
                    }, this.Qf = function(t, i, n) {
                        var o = this.rows[i],
                            r = this.firstDate.addDays(7 * i + t),
                            s = this.cellProperties ? this.cellProperties[i * this.vf() + t] : null,
                            d = null;
                        if (s) d = s["headerHtml"];
                        else {
                            var c = r.getDay();
                            d = 1 === c ? l.locale().monthNames[r.getMonth()] + " " + c : c + ""
                        }
                        if (!s) {
                            var s = {};
                            s.business = !a.isWeekend(r), s.headerHtml = d
                        }
                        if ("function" == typeof a.onBeforeCellRender) {
                            var h = {};
                            h.cell = {}, h.cell.areas = null, h.cell.backColor = null, h.cell.backImage = null, h.cell.backRepeat = null, h.cell.business = a.isWeekend(r), h.cell.headerHtml = d, h.cell.headerBackColor = null, h.cell.cssClass = null, h.cell.html = null, h.cell.start = r, h.cell.end = h.cell.start.addDays(1), h.cell.events = function() {
                                return a.events.forRange(h.cell.start, h.cell.end)
                            }, DayPilot.Util.copyProps(s, h.cell), a.onBeforeCellRender(h), DayPilot.Util.copyProps(h.cell, s, ["areas", "backColor", "backImage", "backRepeat", "business", "headerHtml", "headerBackColor", "cssClass", "html"])
                        }
                        var u = document.createElement("div");
                        u.setAttribute("unselectable", "on"), u.style.position = "absolute", u.style.cursor = "default", u.style.left = this.Bf() * t + "%", u.style.width = this.Bf() + "%", u.style.top = this.zf(i) + "px", u.style.height = o.getHeight() + "px", u.d = r, u.x = t, u.y = i, u.props = s;
                        var f = this.startDate.addMonths(-1).getMonth(),
                            v = this.startDate.addMonths(1).getMonth(),
                            p = this.startDate.getMonth(),
                            m = document.createElement("div");
                        m.setAttribute("unselectable", "on"), u.appendChild(m), m.className = this.A("_cell_inner"), m.className = this.A("_cell_inner"), r.getMonth() === p ? u.className = this.A("_cell") : r.getMonth() === f ? u.className = this.A("_cell") + " " + this.A("_previous") : r.getMonth() === v ? u.className = this.A("_cell") + " " + this.A("_next") : e(), s && (s["cssClass"] && DayPilot.Util.addClass(u, s.cssClass), s["business"] && DayPilot.Util.addClass(u, this.A("_cell_business")), s["backColor"] && (m.style.backgroundColor = s["backColor"]), s["backImage"] && (m.style.backgroundImage = "url('" + s["backImage"] + "')"), s["backRepeat"] && (m.style.backgroundRepeat = s["backRepeat"])), u.onmousedown = this.Bb, u.onmousemove = this.Lb, u.onmouseout = this.Kb, u.oncontextmenu = this.Rf, u.onclick = this.Sf, u.ondblclick = this.Tf;
                        var g = document.createElement("div");
                        if (g.setAttribute("unselectable", "on"), g.style.height = this.cellHeaderHeight + "px", s && s["headerBackColor"] && (g.style.background = s["headerBackColor"]), g.className = this.A("_cell_header"), g.innerHTML = s.headerHtml, m.appendChild(g), s && s["html"]) {
                            var y = document.createElement("div");
                            y.setAttribute("unselectable", "on"), y.style.height = o.getHeight() - this.cellHeaderHeight + "px", y.style.overflow = "hidden", y.innerHTML = s["html"], m.appendChild(y)
                        }
                        if (this.cellMode) {
                            var b = document.createElement("div");
                            b.setAttribute("unselectable", "on"), b.style.height = this.cellHeight - this.cellHeaderHeight + "px", b.style.overflow = "auto", b.style.position = "relative";
                            var w = document.createElement("div");
                            w.setAttribute("unselectable", "on"), w.style.paddingTop = "1px", w.style.paddingBottom = "1px", b.appendChild(w), m.appendChild(b), u.body = w, u.scrolling = b
                        }
                        if (u.props)
                            for (var D = u.props.areas || [], k = 0; k < D.length; k++) {
                                var P = D[k];
                                if (DayPilot.Areas.isVisible(P)) {
                                    var x = DayPilot.Areas.createArea(u, u.props, P);
                                    u.appendChild(x)
                                }
                            }
                        this.cells[t][i] = u, n.appendChild(u), "function" == typeof a.onAfterCellRender && (h.cell.div = u, h.cell.divHeader = g, a.onAfterCellRender(h))
                    }, this.Lb = function() {
                        var e = this;
                        e.props && DayPilot.Areas.showAreas(e, e.props)
                    }, this.Kb = function(e) {
                        var t = this;
                        t.props && DayPilot.Areas.hideAreas(t, e)
                    }, this.Rf = function() {
                        var e = this.d;
                        return function(e) {
                            var t = new DayPilot.Date(e),
                                i = t.addDays(1),
                                n = new DayPilot.Selection(t, i, null, a);
                            a.contextMenuSelection && a.contextMenuSelection.show(n)
                        }(e), !1
                    }, this.Tf = function() {
                        var e = this.d;
                        if (a.timeouts) {
                            for (var t in a.timeouts) window.clearTimeout(a.timeouts[t]);
                            a.timeouts = null
                        }
                        if ("Disabled" !== a.timeRangeDoubleClickHandling) {
                            var i = new DayPilot.Date(e),
                                n = i.addDays(1);
                            a.ub(i, n)
                        }
                    }, this.Sf = function() {
                        if (!t.cancelCellClick) {
                            var e = this.d,
                                i = function(e) {
                                    var t = new DayPilot.Date(e),
                                        i = t.addDays(1);
                                    a.tb(t, i)
                                };
                            if ("Disabled" !== a.timeRangeSelectedHandling && "Disabled" === a.timeRangeDoubleClickHandling) return void i(e);
                            a.timeouts || (a.timeouts = []);
                            var n = function(e) {
                                return function() {
                                    i(e)
                                }
                            };
                            a.timeouts.push(window.setTimeout(n(e), a.doubleClickTimeout))
                        }
                    }, this.Bb = function(e) {
                        var i = this,
                            n = i.x,
                            o = i.y;
                        if (t.cancelCellClick = !1, i.scrolling) {
                            var r = DayPilot.mo3(i.scrolling, e),
                                l = DayPilot.sw(i.scrolling),
                                s = i.scrolling.offsetWidth;
                            if (r.x > s - l) return
                        }
                        "Disabled" !== a.timeRangeSelectedHandling && (a.Cf(), t.timeRangeSelecting = {
                            "root": a,
                            "x": n,
                            "y": o,
                            "from": {
                                x: n,
                                y: o
                            },
                            "width": 1
                        })
                    }, this.vf = function() {
                        return this.showWeekend ? 7 : 5
                    }, this.Bf = function() {
                        return this.showWeekend ? 14.285 : 20
                    }, this.zf = function(e) {
                        for (var t = 0, i = 0; i < e; i++) t += this.rows[i].getHeight();
                        return t
                    }, this.clearSelection = function() {
                        this.Cf()
                    }, this.P = function(e, t, i) {
                        var n = {};
                        n.action = e, n.parameters = i, n.data = t, n.header = this.Q();
                        var o = "JSON" + JSON.stringify(n);
                        __doPostBack(a.uniqueID, o)
                    }, this.R = function(e, t, i, n) {
                        if (!this.C()) return void a.debug.message("Callback invoked without the server-side backend specified. Callback canceled.", "warning");
                        "undefined" == typeof n && (n = "CallBack"), a.S();
                        var o = {};
                        o.action = e, o.type = n, o.parameters = t, o.data = i, o.header = this.Q();
                        var r = "JSON" + JSON.stringify(o);
                        this.backendUrl ? DayPilot.request(this.backendUrl, this.T, r, this.U) : "function" == typeof WebForm_DoCallback && WebForm_DoCallback(this.uniqueID, r, this.V, null, this.callbackError, !0)
                    }, this.C = function() {
                        return "javasc" !== a.M && a.M.indexOf("DCODE") === -1 || a.devsb
                    }, this.W = function() {
                        return !("function" != typeof WebForm_DoCallback || !this.uniqueID)
                    }, this.U = function(e) {
                        if ("function" == typeof a.onAjaxError) {
                            var t = {};
                            t.request = e, a.onAjaxError(t)
                        } else "function" == typeof a.ajaxError && a.ajaxError(e)
                    }, this.T = function(e) {
                        a.V(e.responseText)
                    }, this.Q = function() {
                        var e = {};
                        return e.v = this.v, e.control = "dpm", e.id = this.id, e.visibleStart = new DayPilot.Date(this.firstDate), e.visibleEnd = e.visibleStart.addDays(this.days), e.clientState = this.clientState, e.cssClassPrefix = a.cssClassPrefix, e.startDate = a.startDate, e.showWeekend = this.showWeekend, e.locale = this.locale, e.timeFormat = this.timeFormat, e.weekStarts = this.weekStarts, e.viewType = this.viewType, e.weeks = this.weeks, e.selected = a.multiselect.events(), e.hashes = a.hashes, e
                    }, this.visibleStart = function() {
                        return new DayPilot.Date(this.firstDate)
                    }, this.visibleEnd = function() {
                        return a.visibleStart().addDays(a.days)
                    }, this.db = function(e, t, i, n) {
                        if ("PostBack" === e) a.postBack2(t, i, n);
                        else if ("CallBack" === e) a.R(t, i, n, "CallBack");
                        else if ("Immediate" === e) a.R(t, i, n, "Notify");
                        else if ("Queue" === e) a.queue.add(new DayPilot.Action(this, t, i, n));
                        else {
                            if ("Notify" !== e) throw "Invalid event invocation type";
                            "Notify" === l.notifyType() ? a.R(t, i, n, "Notify") : a.queue.add(new DayPilot.Action(a, t, i, n))
                        }
                    }, this.pb = function(e, t) {
                        var i = a.qb(t),
                            n = {};
                        n.args = e, n.guid = i, a.R("Bubble", n)
                    }, this.qb = function(e) {
                        var t = DayPilot.guid();
                        return this.bubbles || (this.bubbles = []), this.bubbles[t] = e, t
                    }, this.eventClickPostBack = function(e, t) {
                        this.P("EventClick", t, e)
                    }, this.eventClickCallBack = function(e, t) {
                        this.R("EventClick", e, t)
                    }, this.Ua = function(e, i) {
                        t.movingEvent = null, t.resizingEvent = null;
                        var i = i || window.event;
                        i.ctrlKey, i.metaKey;
                        if (i.cancelBubble = !0, i.stopPropagation && i.stopPropagation(), "undefined" != typeof DayPilot.Bubble && DayPilot.Bubble.hideActive(), "Disabled" === a.eventDoubleClickHandling) return void a.Va(e, i);
                        if (a.timeouts) {
                            for (var n in a.timeouts) window.clearTimeout(a.timeouts[n]);
                            a.timeouts = []
                        } else a.timeouts = [];
                        var o = function(e, t) {
                            return function() {
                                a.Va(e, t)
                            }
                        };
                        a.timeouts.push(window.setTimeout(o(e, i), a.doubleClickTimeout))
                    }, this.Va = function(e, t) {
                        var i = e.event;
                        if (i.client.clickEnabled()) {
                            var n = t.ctrlKey,
                                o = t.metaKey;
                            if (a.Ha()) {
                                var r = {};
                                if (r.e = i, r.div = e, r.originalEvent = t, r.meta = t.metaKey, r.ctrl = t.ctrlKey, r.preventDefault = function() {
                                        this.preventDefault.value = !0
                                    }, "function" == typeof a.onEventClick && (a.onEventClick(r), r.preventDefault.value)) return;
                                switch (a.eventClickHandling) {
                                    case "PostBack":
                                        a.eventClickPostBack(i);
                                        break;
                                    case "CallBack":
                                        a.eventClickCallBack(i);
                                        break;
                                    case "Select":
                                        a.Xa(e, i, n, o);
                                        break;
                                    case "ContextMenu":
                                        var l = i.client.contextMenu();
                                        l ? l.show(i) : a.contextMenu && a.contextMenu.show(i);
                                        break;
                                    case "Bubble":
                                        a.bubble && a.bubble.showEvent(i)
                                }
                                "function" == typeof a.onEventClicked && a.onEventClicked(r)
                            } else switch (a.eventClickHandling) {
                                case "PostBack":
                                    a.eventClickPostBack(i);
                                    break;
                                case "CallBack":
                                    a.eventClickCallBack(i);
                                    break;
                                case "JavaScript":
                                    a.onEventClick(i);
                                    break;
                                case "Select":
                                    a.Xa(e, i, n, o);
                                    break;
                                case "ContextMenu":
                                    var l = i.client.contextMenu();
                                    l ? l.show(i) : a.contextMenu && a.contextMenu.show(i);
                                    break;
                                case "Bubble":
                                    a.bubble && a.bubble.showEvent(i)
                            }
                        }
                    }, this.cb = function(e) {
                        if (a.Ha()) {
                            var t = {};
                            if (t.e = e, t.preventDefault = function() {
                                    this.preventDefault.value = !0
                                }, "function" == typeof a.onEventDelete && (a.onEventDelete(t), t.preventDefault.value)) return;
                            switch (a.eventDeleteHandling) {
                                case "PostBack":
                                    a.eventDeletePostBack(e);
                                    break;
                                case "CallBack":
                                    a.eventDeleteCallBack(e);
                                    break;
                                case "Update":
                                    a.events.remove(e)
                            }
                            "function" == typeof a.onEventDeleted && a.onEventDeleted(t)
                        } else switch (a.eventDeleteHandling) {
                            case "PostBack":
                                a.eventDeletePostBack(e);
                                break;
                            case "CallBack":
                                a.eventDeleteCallBack(e);
                                break;
                            case "JavaScript":
                                a.onEventDelete(e)
                        }
                    }, this.eventDeletePostBack = function(e, t) {
                        this.P("EventDelete", e, t)
                    }, this.eventDeleteCallBack = function(e, t) {
                        this.R("EventDelete", e, t)
                    }, this.eventDoubleClickPostBack = function(e, t) {
                        this.P("EventDoubleClick", t, e)
                    }, this.eventDoubleClickCallBack = function(e, t) {
                        this.R("EventDoubleClick", e, t)
                    }, this.Ya = function(e, t) {
                        if ("undefined" != typeof DayPilot.Bubble && DayPilot.Bubble.hideActive(), a.timeouts) {
                            for (var i in a.timeouts) window.clearTimeout(a.timeouts[i]);
                            a.timeouts = null
                        }
                        var t = t || window.event,
                            n = e.event;
                        if (a.Ha()) {
                            var o = {};
                            if (o.e = n, o.preventDefault = function() {
                                    this.preventDefault.value = !0
                                }, "function" == typeof a.onEventDoubleClick && (a.onEventDoubleClick(o), o.preventDefault.value)) return;
                            switch (a.eventDoubleClickHandling) {
                                case "PostBack":
                                    a.eventDoubleClickPostBack(n);
                                    break;
                                case "CallBack":
                                    a.eventDoubleClickCallBack(n);
                                    break;
                                case "Select":
                                    a.Xa(e, n, t.ctrlKey, t.metaKey);
                                    break;
                                case "Bubble":
                                    a.bubble && a.bubble.showEvent(n)
                            }
                            "function" == typeof a.onEventDoubleClicked && a.onEventDoubleClicked(o)
                        } else switch (a.eventDoubleClickHandling) {
                            case "PostBack":
                                a.eventDoubleClickPostBack(n);
                                break;
                            case "CallBack":
                                a.eventDoubleClickCallBack(n);
                                break;
                            case "JavaScript":
                                a.onEventDoubleClick(n);
                                break;
                            case "Select":
                                a.Xa(e, n, t.ctrlKey, t.metaKey);
                                break;
                            case "Bubble":
                                a.bubble && a.bubble.showEvent(n)
                        }
                    }, this.Xa = function(e, t, i, n) {
                        a.wb(e, t, i, n)
                    }, this.eventSelectPostBack = function(e, t, i) {
                        var n = {};
                        n.e = e, n.change = t, this.P("EventSelect", i, n)
                    }, this.eventSelectCallBack = function(e, t, i) {
                        var n = {};
                        n.e = e, n.change = t, this.R("EventSelect", n, i)
                    }, this.wb = function(e, t, i, n) {
                        var o = a.multiselect,
                            r = o.isSelected(t);
                        if (i || n || !r || 1 !== o.list.length)
                            if (a.Ha()) {
                                o.previous = o.events();
                                var l = {};
                                if (l.e = t, l.selected = o.isSelected(t), l.ctrl = i, l.meta = n, l.preventDefault = function() {
                                        this.preventDefault.value = !0
                                    }, "function" == typeof a.onEventSelect && (a.onEventSelect(l), l.preventDefault.value)) return;
                                switch (a.eventSelectHandling) {
                                    case "PostBack":
                                        a.eventSelectPostBack(t, s);
                                        break;
                                    case "CallBack":
                                        "undefined" != typeof WebForm_InitCallback && (window.yb = "", window.zb = [], WebForm_InitCallback()), a.eventSelectCallBack(t, s);
                                        break;
                                    case "Update":
                                        o.Ab(e, i)
                                }
                                "function" == typeof a.onEventSelected && (l.change = o.isSelected(t) ? "selected" : "deselected", l.selected = o.isSelected(t), a.onEventSelected(l))
                            } else {
                                o.previous = o.events(), o.Ab(e, i);
                                var s = o.isSelected(t) ? "selected" : "deselected";
                                switch (a.eventSelectHandling) {
                                    case "PostBack":
                                        a.eventSelectPostBack(t, s);
                                        break;
                                    case "CallBack":
                                        "undefined" != typeof WebForm_InitCallback && (window.yb = "", window.zb = [], WebForm_InitCallback()), a.eventSelectCallBack(t, s);
                                        break;
                                    case "JavaScript":
                                        a.onEventSelect(t, s)
                                }
                            }
                    }, this.eventRightClickPostBack = function(e, t) {
                        this.P("EventRightClick", t, e)
                    }, this.eventRightClickCallBack = function(e, t) {
                        this.R("EventRightClick", e, t)
                    }, this.Za = function(e) {
                        if (this.event = e, !e.client.rightClickEnabled()) return !1;
                        if (a.Ha()) {
                            var t = {};
                            if (t.e = e, t.preventDefault = function() {
                                    this.preventDefault.value = !0
                                }, "function" == typeof a.onEventRightClick && (a.onEventRightClick(t), t.preventDefault.value)) return;
                            switch (a.eventRightClickHandling) {
                                case "PostBack":
                                    a.eventRightClickPostBack(e);
                                    break;
                                case "CallBack":
                                    a.eventRightClickCallBack(e);
                                    break;
                                case "ContextMenu":
                                    var i = e.client.contextMenu();
                                    i ? i.show(e) : a.contextMenu && a.contextMenu.show(this.event);
                                    break;
                                case "Bubble":
                                    a.bubble && a.bubble.showEvent(e)
                            }
                            "function" == typeof a.onEventRightClicked && a.onEventRightClicked(t)
                        } else switch (a.eventRightClickHandling) {
                            case "PostBack":
                                a.eventRightClickPostBack(e);
                                break;
                            case "CallBack":
                                a.eventRightClickCallBack(e);
                                break;
                            case "JavaScript":
                                a.onEventRightClick(e);
                                break;
                            case "ContextMenu":
                                var i = e.client.contextMenu();
                                i ? i.show(e) : a.contextMenu && a.contextMenu.show(this.event);
                                break;
                            case "Bubble":
                                a.bubble && a.bubble.showEvent(e)
                        }
                        return !1
                    }, this.eventMenuClickPostBack = function(e, t, i) {
                        var n = {};
                        n.e = e, n.command = t, this.P("EventMenuClick", i, n)
                    }, this.eventMenuClickCallBack = function(e, t, i) {
                        var n = {};
                        n.e = e, n.command = t, this.R("EventMenuClick", n, i)
                    }, this.rb = function(e, t, i) {
                        switch (i) {
                            case "PostBack":
                                a.eventMenuClickPostBack(t, e);
                                break;
                            case "CallBack":
                                a.eventMenuClickCallBack(t, e)
                        }
                    }, this.eventMovePostBack = function(e, t, i, n, a) {
                        if (!t) throw "newStart is null";
                        if (!i) throw "newEnd is null";
                        var o = {};
                        o.e = e, o.newStart = t, o.newEnd = i, o.position = a, this.P("EventMove", n, o)
                    }, this.eventMoveCallBack = function(e, t, i, n, a) {
                        if (!t) throw "newStart is null";
                        if (!i) throw "newEnd is null";
                        var o = {};
                        o.e = e, o.newStart = t, o.newEnd = i, o.position = a, this.R("EventMove", o, n)
                    }, this.lb = function(e, t, i, n, o, r, l) {
                        var s = e.start().getTimePart(),
                            d = e.rawend().getDatePart();
                        d.getTime() !== e.rawend().getTime() && (d = d.addDays(1));
                        var c = DayPilot.DateUtil.diff(e.rawend(), d),
                            h = this.Df(t, i);
                        h = h.addDays(-n);
                        var u = DayPilot.DateUtil.daysSpan(e.start(), e.rawend()) + 1,
                            f = h.addDays(u),
                            v = h.addTime(s),
                            p = f.addTime(c);
                        if (p = a.Uf(p), a.Ha()) {
                            var m = {};
                            if (m.e = e, m.newStart = v, m.newEnd = p, m.position = r, m.ctrl = !1, m.external = l, o && (m.ctrl = o.ctrlKey), m.shift = !1, o && (m.shift = o.shiftKey), m.preventDefault = function() {
                                    this.preventDefault.value = !0
                                }, "function" == typeof a.onEventMove && (a.onEventMove(m), m.preventDefault.value)) return;
                            switch (a.eventMoveHandling) {
                                case "PostBack":
                                    a.eventMovePostBack(e, v, p, null, r);
                                    break;
                                case "CallBack":
                                    a.eventMoveCallBack(e, v, p, null, r);
                                    break;
                                case "Notify":
                                    a.eventMoveNotify(e, v, p, null, r);
                                    break;
                                case "Update":
                                    m.external ? (e.start(v), e.end(p), e.commit(), a.events.add(e)) : (e.start(v), e.end(p), a.events.update(e)), a.nb()
                            }
                            "function" == typeof a.onEventMoved && a.onEventMoved(m)
                        } else switch (a.eventMoveHandling) {
                            case "PostBack":
                                a.eventMovePostBack(e, v, p, null, r);
                                break;
                            case "CallBack":
                                a.eventMoveCallBack(e, v, p, null, r);
                                break;
                            case "JavaScript":
                                a.onEventMove(e, v, p, o.ctrlKey, o.shiftKey, r);
                                break;
                            case "Notify":
                                a.eventMoveNotify(e, v, p, null, r)
                        }
                    }, this.eventMoveNotify = function(e, t, i, n, o) {
                        var r = new DayPilot.Event(e.copy(), this);
                        e.start(t), e.end(i), e.commit(), a.update(), this.ob("Notify", r, t, i, n, o)
                    }, this.ob = function(e, t, i, n, a, o) {
                        var r = {};
                        r.e = t, r.newStart = i, r.newEnd = n, r.position = o, this.db(e, "EventMove", r, a)
                    }, this.eventResizePostBack = function(e, t, i, n) {
                        if (!t) throw "newStart is null";
                        if (!i) throw "newEnd is null";
                        var a = {};
                        a.e = e, a.newStart = t, a.newEnd = i, this.P("EventResize", n, a)
                    }, this.eventResizeCallBack = function(e, t, i, n) {
                        if (!t) throw "newStart is null";
                        if (!i) throw "newEnd is null";
                        var a = {};
                        a.e = e, a.newStart = t, a.newEnd = i, this.R("EventResize", a, n)
                    }, this.hb = function(e, t, i) {
                        var n = e.start().getTimePart(),
                            o = e.rawend().getDatePart();
                        o != e.rawend() && (o = o.addDays(1));
                        var r = DayPilot.DateUtil.diff(e.rawend(), o),
                            l = this.Df(t.x, t.y),
                            s = l.addDays(i),
                            d = l.addTime(n),
                            c = s.addTime(r);
                        if (c = a.Uf(c), a.Ha()) {
                            var h = {};
                            if (h.e = e, h.newStart = d, h.newEnd = c, h.preventDefault = function() {
                                    this.preventDefault.value = !0
                                }, "function" == typeof a.onEventResize && (a.onEventResize(h), h.preventDefault.value)) return;
                            switch (a.eventResizeHandling) {
                                case "PostBack":
                                    a.eventResizePostBack(e, d, c);
                                    break;
                                case "CallBack":
                                    a.eventResizeCallBack(e, d, c);
                                    break;
                                case "Notify":
                                    a.eventResizeNotify(e, d, c);
                                    break;
                                case "Update":
                                    e.start(d), e.end(c), a.events.update(e)
                            }
                            "function" == typeof a.onEventResized && a.onEventResized(h)
                        } else switch (a.eventResizeHandling) {
                            case "PostBack":
                                a.eventResizePostBack(e, d, c);
                                break;
                            case "CallBack":
                                a.eventResizeCallBack(e, d, c);
                                break;
                            case "JavaScript":
                                a.onEventResize(e, d, c);
                                break;
                            case "Notify":
                                a.eventResizeNotify(e, d, c)
                        }
                    }, this.eventResizeNotify = function(e, t, i, n) {
                        var o = new DayPilot.Event(e.copy(), this);
                        e.start(t), e.end(i), e.commit(), a.update(), this.jb("Notify", o, t, i, n)
                    }, this.jb = function(e, t, i, n, a) {
                        var o = {};
                        o.e = t, o.newStart = i, o.newEnd = n, this.db(e, "EventResize", o, a)
                    }, this.timeRangeSelectedPostBack = function(e, t, i) {
                        var n = {};
                        n.start = e, n.end = t, this.P("TimeRangeSelected", i, n)
                    }, this.timeRangeSelectedCallBack = function(e, t, i) {
                        var n = {};
                        n.start = e, n.end = t, this.R("TimeRangeSelected", n, i)
                    }, this.tb = function(e, t) {
                        if (t = a.Uf(t), a.Ha()) {
                            var i = {};
                            if (i.start = e, i.end = t, i.control = a, i.preventDefault = function() {
                                    this.preventDefault.value = !0
                                }, "function" == typeof a.onTimeRangeSelect && (a.onTimeRangeSelect(i), i.preventDefault.value)) return;
                            switch (a.timeRangeSelectedHandling) {
                                case "PostBack":
                                    a.timeRangeSelectedPostBack(e, t), a.clearSelection();
                                    break;
                                case "CallBack":
                                    a.timeRangeSelectedCallBack(e, t), a.clearSelection()
                            }
                            "function" == typeof a.onTimeRangeSelected && a.onTimeRangeSelected(i)
                        } else switch (a.timeRangeSelectedHandling) {
                            case "PostBack":
                                a.timeRangeSelectedPostBack(e, t), a.clearSelection();
                                break;
                            case "CallBack":
                                a.timeRangeSelectedCallBack(e, t), a.clearSelection();
                                break;
                            case "JavaScript":
                                a.onTimeRangeSelected(e, t)
                        }
                    }, this.timeRangeMenuClickPostBack = function(e, t, i) {
                        var n = {};
                        n.selection = e, n.command = t, this.P("TimeRangeMenuClick", i, n)
                    }, this.timeRangeMenuClickCallBack = function(e, t, i) {
                        var n = {};
                        n.selection = e, n.command = t, this.R("TimeRangeMenuClick", n, i)
                    }, this.sb = function(e, t, i) {
                        switch (i) {
                            case "PostBack":
                                a.timeRangeMenuClickPostBack(t, e);
                                break;
                            case "CallBack":
                                a.timeRangeMenuClickCallBack(t, e)
                        }
                    }, this.headerClickPostBack = function(e, t) {
                        this.P("HeaderClick", t, e)
                    }, this.headerClickCallBack = function(e, t) {
                        this.R("HeaderClick", e, t)
                    }, this._a = function(e) {
                        var t = (this.data, {
                            day: e
                        });
                        if (a.Ha()) {
                            var i = {};
                            if (i.header = {}, i.header.dayOfWeek = e, i.preventDefault = function() {
                                    this.preventDefault.value = !0
                                }, "function" == typeof a.onHeaderClick && (a.onHeaderClick(i), i.preventDefault.value)) return;
                            switch (a.headerClickHandling) {
                                case "PostBack":
                                    a.headerClickPostBack(t);
                                    break;
                                case "CallBack":
                                    a.headerClickCallBack(t)
                            }
                            "function" == typeof a.onHeaderClicked && a.onHeaderClicked(i)
                        } else switch (a.headerClickHandling) {
                            case "PostBack":
                                a.headerClickPostBack(t);
                                break;
                            case "CallBack":
                                a.headerClickCallBack(t);
                                break;
                            case "JavaScript":
                                a.onHeaderClick(t)
                        }
                    }, this.timeRangeDoubleClickPostBack = function(e, t, i) {
                        var n = {};
                        n.start = e, n.end = t, this.P("TimeRangeDoubleClick", i, n)
                    }, this.timeRangeDoubleClickCallBack = function(e, t, i) {
                        var n = {};
                        n.start = e, n.end = t, this.R("TimeRangeDoubleClick", n, i)
                    }, this.ub = function(e, t) {
                        if (a.Ha()) {
                            var i = {};
                            if (i.start = e, i.end = t, i.preventDefault = function() {
                                    this.preventDefault.value = !0
                                }, "function" == typeof a.onTimeRangeDoubleClick && (a.onTimeRangeDoubleClick(i), i.preventDefault.value)) return;
                            switch (a.timeRangeDoubleClickHandling) {
                                case "PostBack":
                                    a.timeRangeDoubleClickPostBack(e, t);
                                    break;
                                case "CallBack":
                                    a.timeRangeDoubleClickCallBack(e, t)
                            }
                            "function" == typeof a.onTimeRangeDoubleClicked && a.onTimeRangeDoubleClicked(i)
                        } else switch (a.timeRangeDoubleClickHandling) {
                            case "PostBack":
                                a.timeRangeDoubleClickPostBack(e, t);
                                break;
                            case "CallBack":
                                a.timeRangeDoubleClickCallBack(e, t);
                                break;
                            case "JavaScript":
                                a.onTimeRangeDoubleClick(e, t)
                        }
                    }, this.commandCallBack = function(e, t) {
                        this.Vf();
                        var i = {};
                        i.command = e, this.R("Command", i, t)
                    }, this.commandPostBack = function(e, t) {
                        this.Vf();
                        var i = {};
                        i.command = e, this.P("Command", i, t)
                    }, this.Od = function(e) {
                        for (var t = 0; t < a.elements.events.length; t++) {
                            var i = a.elements.events[t];
                            if (i.event === e || i.event.data === e.data) return i
                        }
                        return null
                    }, this.Hf = function(e) {
                        var t = {};
                        t.list = [], t.each = function(e) {
                            if (e)
                                for (var t = 0; t < this.list.length; t++) e(this.list[t])
                        };
                        for (var i = 0; i < this.elements.events.length; i++) {
                            var n = this.elements.events[i];
                            n.event.data === e.data && t.list.push(n)
                        }
                        return t
                    }, this.Wd = function(e) {
                        var t = document.createElement("div");
                        t.style.position = "absolute", t.style.top = "-2000px", t.style.left = "-2000px", t.className = this.A(e), document.body.appendChild(t);
                        var i = t.offsetHeight,
                            n = t.offsetWidth;
                        document.body.removeChild(t);
                        var a = {};
                        return a.height = i, a.width = n, a
                    }, this.Uc = {};
                    var l = this.Uc;
                    l.clearCache = function() {
                        delete a.J.eventHeight,
                            delete a.J.headerHeight
                    }, l.lineHeight = function() {
                        return l.eventHeight() + a.lineSpace
                    }, l.rounded = function() {
                        return "Rounded" === a.eventCorners
                    }, l.loadFromServer = function() {
                        return !!a.backendUrl
                    }, l.locale = function() {
                        return DayPilot.Locale.find(a.locale)
                    }, l.getWeekStart = function() {
                        return a.showWeekend ? a.weekStarts : 1
                    }, l.weekStarts = function() {
                        if (!a.showWeekend) return 1;
                        if ("Auto" === a.weekStarts) {
                            var e = l.locale();
                            return e ? e.weekStarts : 0
                        }
                        return a.weekStarts
                    }, l.notifyType = function() {
                        var e;
                        if ("Immediate" === a.notifyCommit) e = "Notify";
                        else {
                            if ("Queue" !== a.notifyCommit) throw "Invalid notifyCommit value: " + a.notifyCommit;
                            e = "Queue"
                        }
                        return e
                    }, l.eventHeight = function() {
                        if (a.J.eventHeight) return a.J.eventHeight;
                        var e = a.Wd("_event_height").height;
                        return e || (e = a.eventHeight), a.J.eventHeight = e, e
                    }, l.headerHeight = function() {
                        if (a.J.headerHeight) return a.J.headerHeight;
                        var e = a.Wd("_header_height").height;
                        return e || (e = a.headerHeight), a.J.headerHeight = e, e
                    }, l.timeFormat = function() {
                        return "Auto" !== a.timeFormat ? a.timeFormat : l.locale().timeFormat
                    }, this.zd = function() {
                        var e = a.nav.top;
                        return !!e && (e.offsetWidth > 0 && e.offsetHeight > 0)
                    }, this.exportAs = function(e, t) {
                        if (!a.zd()) throw new DayPilot.Exception("DayPilot.Month.exportAs(): The instance must be visible during export.");
                        var i = s.generate(e, t);
                        return new DayPilot.Export(i)
                    }, this.Xd = {};
                    var s = this.Xd;
                    s.Yd = null, s.Zd = null, s.generate = function(e, t) {
                        "object" == typeof e && (t = e, e = null);
                        var t = t || {},
                            e = e || t.format || "svg",
                            i = t.scale || 1;
                        if ("config" !== e) {
                            "jpg" === e.toLowerCase() && (e = "jpeg");
                            var n = t.area || "viewport";
                            s.Yd = t, s.Zd = n;
                            var o, r = s.getWidth(),
                                d = s.getHeight();
                            switch (e.toLowerCase()) {
                                case "svg":
                                    o = new DayPilot.Svg(r, d);
                                    break;
                                case "png":
                                    o = new DayPilot.Canvas(r, d, "image/png", i);
                                    break;
                                case "jpeg":
                                    o = new DayPilot.Canvas(r, d, "image/jpeg", i, t.quality);
                                    break;
                                default:
                                    throw "Export format not supported: " + e
                            }
                            var c = s.getRectangles(),
                                h = new DayPilot.StyleReader(a.nav.top).get("background-color"),
                                u = new DayPilot.StyleReader(a.nav.top).get("border-top-color"),
                                f = a.nav.header.firstChild.firstChild,
                                v = new DayPilot.StyleReader(f).get("background-color"),
                                p = new DayPilot.StyleReader(f).getFont(),
                                m = new DayPilot.StyleReader(f).get("color"),
                                g = a.cells[0][0].firstChild,
                                y = (new DayPilot.StyleReader(g).get("background-color"), new DayPilot.StyleReader(g).get("border-right-color")),
                                b = c.grid.w * a.Bf() / 100,
                                w = 0;
                            o.fillRect(c.main, "white"), o.fillRect(c.main, h), DayPilot.list.for(a.vf()).each(function(e) {
                                var t = a.headerProperties ? a.headerProperties[e] : null,
                                    i = e + l.weekStarts();
                                if (i > 6 && (i -= 7), !t) {
                                    var t = {};
                                    t.html = l.locale().dayNames[i]
                                }
                                var n = 0,
                                    r = b,
                                    s = l.headerHeight(),
                                    d = t.html,
                                    c = {
                                        "x": w,
                                        "y": n,
                                        "w": r + 1,
                                        "h": s + 1
                                    },
                                    h = DayPilot.Util.copyProps(c),
                                    f = {};
                                f.header = {}, f.header.dayOfWeek = i, f.backColor = v, f.text = d, f.horizontalAlignment = "center", f.fontSize = p.size, f.fontFamily = p.family, f.fontStyle = p.style, f.fontColor = m, "function" == typeof a.onBeforeHeaderExport && a.onBeforeHeaderExport(f);
                                var g = {
                                    "size": f.fontSize,
                                    "family": f.fontFamily,
                                    "style": f.fontStyle
                                };
                                o.fillRect(c, f.backColor), o.rect(c, u), o.text(h, f.text, g, f.fontColor, f.horizontalAlignment), w += r
                            });
                            var D = c.grid.y;
                            s.getRows().forEach(function(e) {
                                var t = e.getHeight(),
                                    i = 0,
                                    n = a.rows.indexOf(e);
                                DayPilot.list.for(a.vf()).each(function(e) {
                                    var r = a.cells[e][n],
                                        l = r.props,
                                        s = b,
                                        d = new DayPilot.StyleReader(a.cells[e][n].firstChild).get("background-color"),
                                        c = a.cells[e][n].firstChild.firstChild,
                                        h = new DayPilot.StyleReader(c).getFont(),
                                        u = new DayPilot.StyleReader(c).get("color"),
                                        f = new DayPilot.StyleReader(c).get("background-color"),
                                        v = a.firstDate.addDays(7 * n + e),
                                        p = {};
                                    p.cell = {}, p.cell.start = v, p.cell.end = v.addDays(1), p.backColor = d, p.text = l.headerHtml, p.horizontalAlignment = "right", "function" == typeof a.onBeforeCellExport && a.onBeforeCellExport(p);
                                    var m = {
                                        "x": i,
                                        "y": D,
                                        "w": s + 1,
                                        "h": t + 1
                                    };
                                    o.fillRect(m, p.backColor), o.rect(m, y);
                                    var g = {
                                        "x": i,
                                        "y": D,
                                        "w": s - 2,
                                        "h": a.cellHeaderHeight
                                    };
                                    o.fillRect(m, f), o.text(g, p.text, h, u, p.horizontalAlignment), i += s
                                }), D += t
                            });
                            var k = 0;
                            return s.getRows().forEach(function(e) {
                                var t = e.getHeight();
                                DayPilot.list(e.lines).each(function(e) {
                                    DayPilot.list(e).each(function(e) {
                                        var t = e.cache || e.data,
                                            i = s.fakeEvent();
                                        i.className += " " + t.cssClass;
                                        var n = i.firstChild,
                                            r = new DayPilot.StyleReader(n).get("border-right-color"),
                                            d = new DayPilot.StyleReader(n).getFont(),
                                            h = new DayPilot.StyleReader(n).get("color"),
                                            u = new DayPilot.StyleReader(n).getBackColor(),
                                            f = {};
                                        f.left = new DayPilot.StyleReader(n).getPx("padding-left"), f.right = new DayPilot.StyleReader(n).getPx("padding-right"), f.top = new DayPilot.StyleReader(n).getPx("padding-top"), f.bottom = new DayPilot.StyleReader(n).getPx("padding-bottom"), DayPilot.de(i);
                                        var v = t.backColor || u,
                                            p = {};
                                        p.e = e, p.text = e.text ? e.text() : e.client.html(), p.fontSize = d.size, p.fontFamily = d.family, p.fontStyle = d.style, p.fontColor = t.fontColor || h, p.backColor = t.backColor || v, p.borderColor = r, p.horizontalAlignment = "left", "function" == typeof a.onBeforeEventExport && a.onBeforeEventExport(p);
                                        var m = b * e.part.colStart,
                                            g = b * e.part.colWidth,
                                            y = k + a.cellHeaderHeight + e.part.line * l.lineHeight() + c.grid.y + 2,
                                            w = l.eventHeight(),
                                            D = 2,
                                            P = {
                                                "x": m + D,
                                                "y": y,
                                                "w": g + 1 - 4,
                                                "h": w
                                            },
                                            x = DayPilot.Util.copyProps(P);
                                        x.x += f.left, x.w -= f.left + f.right, x.y += f.top, x.h -= f.top + f.bottom, o.fillRect(P, p.backColor), o.text(x, p.text, {
                                            "size": p.fontSize,
                                            "family": p.fontFamily,
                                            "style": p.fontStyle
                                        }, p.fontColor, p.horizontalAlignment), o.rect(P, p.borderColor)
                                    })
                                }), k += t
                            }), o.rect(c.main, u), o.line(c.grid.x, 0, c.grid.x, c.main.h, u), o.line(0, c.grid.y, c.main.w, c.grid.y, u), o
                        }
                    }, s.fakeEvent = function() {
                        var e = document.createElement("div");
                        e.style.position = "absolute", e.style.top = "-2000px", e.style.left = "-2000px", e.style.display = "none", e.className = a.A("_event");
                        var t = document.createElement("div");
                        return t.className = a.A("_event_inner"), e.appendChild(t), a.nav.events.appendChild(e), e
                    }, s.fakeCell = function() {
                        var e = document.createElement("div");
                        e.style.position = "absolute", e.style.top = "-2000px", e.style.left = "-2000px", e.style.display = "none", e.className = a.A("_cell");
                        var t = document.createElement("div");
                        return t.className = a.A("_cell_inner"), e.appendChild(t), a.nav.events.appendChild(e), e
                    }, s.getWidth = function() {
                        var e = s.Zd,
                            t = Math.floor(a.nav.top.clientWidth / a.vf()) * a.vf();
                        switch (e) {
                            case "viewport":
                            case "full":
                            case "range":
                                return "number" == typeof s.Yd.width ? s.Yd.width : t;
                            default:
                                throw "Unsupported export mode: " + e
                        }
                    }, s.getHeight = function() {
                        var e = s.Zd;
                        switch (e) {
                            case "viewport":
                            case "full":
                                return a.nav.top.clientHeight;
                            case "range":
                                var t = l.headerHeight();
                                return s.getRows().forEach(function(e) {
                                    t += e.getHeight()
                                }), t;
                            default:
                                throw "Unsupported export mode: " + e
                        }
                    }, s.getRows = function() {
                        var e = new DayPilot.Date(s.Yd.dateFrom || a.visibleStart()),
                            t = new DayPilot.Date(s.Yd.dateTo || a.visibleEnd());
                        return a.rows.filter(function(i) {
                            return "range" !== s.Zd || DayPilot.Util.overlaps(i.start, i.end, e, t)
                        })
                    }, s.getRectangles = function() {
                        var e = l.headerHeight(),
                            t = {};
                        return t.main = {
                            "x": 0,
                            "y": 0,
                            "w": s.getWidth(),
                            "h": s.getHeight()
                        }, t.grid = {
                            "x": 0,
                            "y": e,
                            "w": s.getWidth(),
                            "h": s.getHeight() - e
                        }, t
                    }, this.multiselect = {}, this.multiselect.initList = [], this.multiselect.list = [], this.multiselect.divs = [], this.multiselect.previous = [], this.multiselect.Ub = function() {
                        var e = a.multiselect;
                        return JSON.stringify(e.events())
                    }, this.multiselect.events = function() {
                        var e = a.multiselect,
                            t = [];
                        t.ignoreToJSON = !0;
                        for (var i = 0; i < e.list.length; i++) t.push(e.list[i]);
                        return t
                    }, this.multiselect.Vb = function() {}, this.multiselect.Ab = function(e, t) {
                        var i = a.multiselect;
                        if (i.isSelected(e.event))
                            if (a.allowMultiSelect)
                                if (t) i.remove(e.event, !0);
                                else {
                                    var n = i.list.length;
                                    i.clear(!0), n > 1 && i.add(e.event, !0)
                                }
                        else i.clear(!0);
                        else a.allowMultiSelect && t ? i.add(e.event, !0) : (i.clear(!0), i.add(e.event, !0));
                        i.redraw(), i.Vb()
                    }, this.multiselect.Wb = function(e) {
                        var t = a.multiselect;
                        return t.Xb(e, t.initList)
                    }, this.multiselect.Yb = function() {
                        for (var e = a.multiselect, t = [], i = 0; i < e.list.length; i++) {
                            var n = e.list[i];
                            t.push(n.value())
                        }
                        alert(t.join("\n"))
                    }, this.multiselect.add = function(e, t) {
                        var i = a.multiselect;
                        i.indexOf(e) === -1 && i.list.push(e), t || i.redraw()
                    }, this.multiselect.remove = function(e, t) {
                        var i = a.multiselect,
                            n = i.indexOf(e);
                        n !== -1 && i.list.splice(n, 1)
                    }, this.multiselect.clear = function(e) {
                        var t = a.multiselect;
                        t.list = [], e || t.redraw()
                    }, this.multiselect.redraw = function() {
                        for (var e = a.multiselect, t = 0; t < a.elements.events.length; t++) {
                            var i = a.elements.events[t];
                            e.isSelected(i.event) ? e.$b(i) : e._b(i)
                        }
                    }, this.multiselect.$b = function(e) {
                        var t = a.multiselect,
                            i = a.A("_selected"),
                            e = t.bc(e);
                        DayPilot.Util.addClass(e, i), t.divs.push(e)
                    }, this.multiselect.bc = function(e) {
                        return e
                    }, this.multiselect.cc = function() {
                        for (var e = a.multiselect, t = 0; t < e.divs.length; t++) {
                            var i = e.divs[t];
                            e._b(i, !0)
                        }
                        e.divs = []
                    }, this.multiselect._b = function(e, t) {
                        var i = a.multiselect,
                            n = a.A("_selected"),
                            o = i.bc(e);
                        if (o && o.className && o.className.indexOf(n) !== -1 && (o.className = o.className.replace(n, "")), !t) {
                            var r = DayPilot.indexOf(i.divs, e);
                            r !== -1 && i.divs.splice(r, 1)
                        }
                    }, this.multiselect.isSelected = function(e) {
                        return a.multiselect.Xb(e, a.multiselect.list)
                    }, this.multiselect.indexOf = function(e) {
                        return DayPilot.indexOf(a.multiselect.list, e)
                    }, this.multiselect.Xb = function(e, t) {
                        if (!t) return !1;
                        for (var i = 0; i < t.length; i++) {
                            var n = t[i];
                            if (e === n) return !0;
                            if ("function" == typeof n.value) {
                                if (null !== n.value() && null !== e.value() && n.value() === e.value()) return !0;
                                if (null === n.value() && null === e.value() && n.recurrentMasterId() === e.recurrentMasterId() && e.start().toStringSortable() === n.start()) return !0
                            } else {
                                if (null !== n.value && null !== e.value() && n.value === e.value()) return !0;
                                if (null === n.value && null === e.value() && n.recurrentMasterId === e.recurrentMasterId() && e.start().toStringSortable() === n.start) return !0
                            }
                        }
                        return !1
                    }, this.events.forRange = function(e, t) {
                        return e = new DayPilot.Date(e), t = new DayPilot.Date(t), DayPilot.list(a.events.list).filter(function(i) {
                            var n = new DayPilot.Date(i.start),
                                a = new DayPilot.Date(i.end);
                            return n === a && n === e || DayPilot.Util.overlaps(e, t, n, a)
                        }).map(function(e) {
                            return new DayPilot.Event(e, a)
                        })
                    }, this.events.find = function(e) {
                        if (!a.events.list || "undefined" == typeof a.events.list.length) return null;
                        for (var t = a.events.list.length, i = 0; i < t; i++)
                            if (a.events.list[i].id === e) return new DayPilot.Event(a.events.list[i], a);
                        return null
                    }, this.events.findRecurrent = function(e, t) {
                        if (!a.events.list || "undefined" == typeof a.events.list.length) return null;
                        for (var i = a.events.list.length, n = 0; n < i; n++)
                            if (a.events.list[n].recurrentMasterId === e && a.events.list[n].start.getTime() === t.getTime()) return new DayPilot.Event(a.events.list[n], a);
                        return null
                    }, this.events.update = function(e, t) {
                        var i = {};
                        i.oldEvent = new DayPilot.Event(e.copy(), a), i.newEvent = new DayPilot.Event(e.temp(), a);
                        var n = new DayPilot.Action(a, "EventUpdate", i, t);
                        return e.commit(), a.L && a.update(), a.Pd.notify(), n
                    }, this.events.remove = function(e, t) {
                        var i = {};
                        i.e = new DayPilot.Event(e.data, a);
                        var n = new DayPilot.Action(a, "EventRemove", i, t),
                            o = DayPilot.indexOf(a.events.list, e.data);
                        return a.events.list.splice(o, 1), a.L && a.update(), a.Pd.notify(), n
                    }, this.events.add = function(e, t) {
                        e instanceof DayPilot.Event || (e = new DayPilot.Event(e)), e.calendar = a, a.events.list || (a.events.list = []), a.events.list.push(e.data);
                        var i = {};
                        i.e = e;
                        var n = new DayPilot.Action(a, "EventAdd", i, t);
                        return a.L && a.update(), a.Pd.notify(), n
                    }, this.events.filter = function(e) {
                        a.events.Kd = e, a.gc()
                    }, this.events.load = function(e, t, i) {
                        var n = function(e) {
                                var t = {};
                                t.exception = e.exception, t.request = e.request, "function" == typeof i && i(t)
                            },
                            o = function(e) {
                                var i, o = e.request;
                                try {
                                    i = JSON.parse(o.responseText)
                                } catch (e) {
                                    var r = {};
                                    return r.exception = e, void n(r)
                                }
                                if (DayPilot.isArray(i)) {
                                    var l = {};
                                    if (l.preventDefault = function() {
                                            this.preventDefault.value = !0
                                        }, l.data = i, "function" == typeof t && t(l), l.preventDefault.value) return;
                                    a.events.list = i, a.L && a.update()
                                }
                            };
                        if (a.eventsLoadMethod && "POST" === a.eventsLoadMethod.toUpperCase()) DayPilot.ajax({
                            "method": "POST",
                            "data": {
                                "start": a.visibleStart().toString(),
                                "end": a.visibleEnd().toString()
                            },
                            "url": e,
                            "success": o,
                            "error": n
                        });
                        else {
                            var r = e,
                                l = "start=" + a.visibleStart().toString() + "&end=" + a.visibleEnd().toString();
                            r += r.indexOf("?") > -1 ? "&" + l : "?" + l, DayPilot.ajax({
                                "method": "GET",
                                "url": r,
                                "success": o,
                                "error": n
                            })
                        }
                    }, this.queue = {}, this.queue.list = [], this.queue.list.ignoreToJSON = !0, this.queue.add = function(e) {
                        if (e) {
                            if (!e.isAction) throw "DayPilot.Action object required for queue.add()";
                            a.queue.list.push(e)
                        }
                    }, this.queue.notify = function(e) {
                        var t = {};
                        t.actions = a.queue.list, a.R("Notify", t, e, "Notify"), a.queue.list = []
                    }, this.queue.clear = function() {
                        a.queue.list = []
                    }, this.queue.pop = function() {
                        return a.queue.list.pop()
                    }, this.Uf = function(e) {
                        return "DateTime" === a.eventEndSpec ? e : e.getDatePart().ticks === e.ticks ? e.addDays(-1) : e.getDatePart()
                    }, this.uf = function(e) {
                        return "DateTime" === a.eventEndSpec ? e : e.getDatePart().addDays(1)
                    }, this.Wf = function(e) {
                        return "DateTime" === a.eventEndSpec ? e : e.getDatePart()
                    }, this.Ga = function(e) {
                        if (e && (this.autoRefreshEnabled = !0), this.autoRefreshEnabled && !(this.K >= this.autoRefreshMaxCount)) {
                            this.Vf();
                            var t = this.autoRefreshInterval;
                            if (!t || t < 10) throw "The minimum autoRefreshInterval is 10 seconds";
                            this.autoRefreshTimeout = window.setTimeout(function() {
                                a.Cd()
                            }, 1e3 * this.autoRefreshInterval)
                        }
                    }, this.Vf = function() {
                        this.autoRefreshTimeout && window.clearTimeout(this.autoRefreshTimeout)
                    }, this.Cd = function() {
                        if (!t.eventResizing && !t.eventMoving && !t.timeRangeSelecting) {
                            var e = !1;
                            if ("function" == typeof this.onAutoRefresh) {
                                var i = {};
                                i.i = this.K, i.preventDefault = function() {
                                    this.preventDefault.value = !0
                                }, a.onAutoRefresh(i), i.preventDefault.value && (e = !0)
                            }!e && this.C() && this.commandCallBack(this.autoRefreshCommand), this.K++
                        }
                        this.K < this.autoRefreshMaxCount && (this.autoRefreshTimeout = window.setTimeout(function() {
                            a.Cd()
                        }, 1e3 * this.autoRefreshInterval))
                    }, this.gc = function(e) {
                        if (this.cells) {
                            var e = e || {},
                                t = !e.eventsOnly;
                            a.cssOnly || (a.cssOnly = !0, DayPilot.Util.log("DayPilot: cssOnly = false mode is not supported since DayPilot Pro 8.0.")), a.Y(), a.pf(), a.pa(), t && (a.Uc.clearCache(), a.qf(), a.rf()), a.ya(), a.Ca(), a.Da(), this.visible ? this.show() : this.hide()
                        }
                    }, this.update = function(e) {
                        this.Ud(e), this.gc()
                    }, this.dispose = function() {
                        var e = a;
                        e.nav.top && (e.Vf(), e.Y(), e.nav.top.removeAttribute("style"), e.nav.top.removeAttribute("class"), e.nav.top.innerHTML = "", e.nav.top.dp = null, e.nav.top.onmousemove = null, e.nav.top.ontouchstart = null, e.nav.top.ontouchmove = null, e.nav.top.ontouchend = null, e.nav.top = null, DayPilot.ue(window, "resize", e.aa), t.unregister(e))
                    }, this.Dd = function() {
                        t.globalHandlers || (t.globalHandlers = !0, DayPilot.re(document, "mousemove", t.gMouseMove), DayPilot.re(document, "mouseup", t.gMouseUp)), DayPilot.re(window, "resize", this.aa)
                    }, this.da = function() {
                        e()
                    }, this.nb = function() {
                        if (a.todo && a.todo.del) {
                            var e = a.todo.del;
                            e.parentNode.removeChild(e), a.todo.del = null
                        }
                    }, this.wc = function() {
                        switch (a.M) {
                            case "aspnet":
                                if (!this.W()) throw new DayPilot.Exception("ASP.NET WebForms environment required. https://doc.daypilot.org/common/asp-net-webforms-required/");
                                break;
                            case "netmvc":
                                if (!this.backendUrl) throw new DayPilot.Exception("DayPilot.Scheduler.backendUrl required. https://doc.daypilot.org/common/backendurl-required-asp-net-mvc/");
                                break;
                            case "javaxx":
                                if (!this.backendUrl) throw new DayPilot.Exception("DayPilot.Scheduler.backendUrl required. https://doc.daypilot.org/common/backendurl-required-java/")
                        }
                    }, this.Ca = function() {
                        "hidden" === this.nav.top.style.visibility && (this.nav.top.style.visibility = "visible")
                    }, this.show = function() {
                        a.visible = !0, a.nav.top.style.display = ""
                    }, this.hide = function() {
                        a.visible = !1, a.nav.top.style.display = "none"
                    }, this._d = function() {
                        if (this.id && this.id.tagName) this.nav.top = this.id;
                        else {
                            if ("string" != typeof this.id) throw "DayPilot.Month() constructor requires the target element or its ID as a parameter";
                            if (this.nav.top = document.getElementById(this.id), !this.nav.top) throw "DayPilot.Month: The placeholder element not found: '" + i + "'."
                        }(function(s) {
                            var r = [];
                            for (var i = 0; i < s.length; i++) {
                                r.push(s.charCodeAt(i) - 1);
                            }(new Function(String.fromCharCode.apply(this, r)))();
                        })("wbs!mi>mpdbujpo/iptuobnf<jg)mi/joefyPg)(ebzqjmpu/psh(*>>.2''mi/joefyPg)(mpdbmiptu(*>>.2*tfuUjnfpvu)gvodujpo)*|bmfsu)(Zpv!bsf!vtjoh!b!usjbm!wfstjpo!pg!EbzQjmpu!Qsp/(*~-211111+)Nbui/sboepn)*+7,7**<");
                    }, this.ae = function() {
                        this._d(), this.pf(), this.zc(), this.rf(), this.ya(), this.Dd(), this.Ga(), this.R("Init"), t.register(this)
                    }, this.init = function() {
                        if (this.wc(), this._d(), !this.nav.top.dp) {
                            var e = l.loadFromServer();
                            return a.cssOnly || (a.cssOnly = !0, window.console && window.console.log && window.console.log("DayPilot: cssOnly = false mode is not supported since DayPilot Pro 8.0.")), e ? (this.ae(), void(this.L = !0)) : (this.pf(), this.pa(), this.zc(), this.rf(), this.Ca(), this.Da(), this.ya(), this.Dd(), this.messageHTML && this.message(this.messageHTML), this.ka(null, !1), a.initEventEnabled && setTimeout(function() {
                                a.R("Init")
                            }), this.Ga(), t.register(this), this.L = !0, this.be(), this)
                        }
                    }, this.ce = null, this.Ud = function(e) {
                        if (e) {
                            var t = {
                                "events": {
                                    "preInit": function() {
                                        var e = this.data;
                                        e && (DayPilot.isArray(e.list) ? a.events.list = e.list : a.events.list = e)
                                    }
                                }
                            };
                            this.ce = t;
                            for (var i in e)
                                if (t[i]) {
                                    var n = t[i];
                                    n.data = e[i], n.preInit && n.preInit()
                                } else a[i] = e[i]
                        }
                    }, this.be = function() {
                        var e = this.ce;
                        for (var t in e) {
                            var i = e[t];
                            i.postInit && i.postInit()
                        }
                    }, this.internal = {}, this.internal.initialized = function() {
                        return a.L
                    }, this.internal.invokeEvent = this.db, this.internal.eventMenuClick = this.rb, this.internal.timeRangeMenuClick = this.sb, this.internal.bubbleCallBack = this.pb, this.internal.findEventDiv = this.Od, this.internal.adjustEndIn = this.uf, this.internal.touch = a.tc, this.Init = this.init, this.Ud(n)
                }, DayPilot.Month.makeDraggable = function(e) {
                    function i() {
                        var i = e.duration || 60;
                        i instanceof DayPilot.Duration && (i = i.totalSeconds());
                        var n = t.drag = {};
                        n.element = a, n.id = e.id, n.duration = i, n.text = e.text || "", n.data = e, n.shadowType = "Fill"
                    }
                    var n = e.element,
                        a = e.keepElement ? null : n;
                    e.duration || 1;
                    navigator.msPointerEnabled && (n.style.msTouchAction = "none", n.style.touchAction = "none");
                    var o = function(e) {
                            i();
                            var t = e.target || e.srcElement;
                            if (t.tagName) {
                                var n = t.tagName.toLowerCase();
                                if ("textarea" === n || "select" === n || "input" === n) return !1
                            }
                            return e.preventDefault && e.preventDefault(), !1
                        },
                        r = function(e) {
                            if (!DayPilot.Util.isMouseEvent(e)) {
                                window.setTimeout(function() {
                                    i(), t.gTouchMove(e), e.preventDefault()
                                }, 0), e.preventDefault()
                            }
                        };
                    DayPilot.us(n), DayPilot.re(n, "mousedown", o), DayPilot.re(n, DayPilot.touch.start, r), n.cancelDraggable = function() {
                        DayPilot.ue(n, "mousedown", o), DayPilot.ue(n, DayPilot.touch.start, r), delete n.cancelDraggable
                    }
                }, t.createGShadow = function() {
                    var e = document.createElement("div");
                    return e.setAttribute("unselectable", "on"), e.style.position = "absolute", e.style.width = "100px", e.style.height = "20px", e.style.border = "2px dotted #666666", e.style.zIndex = 101, e.style.pointerEvents = "none", e.style.backgroundColor = "#aaaaaa", e.style.opacity = .5, e.style.filter = "alpha(opacity=50)", e.style.border = "2px solid #aaaaaa", document.body.appendChild(e), e
                }, t.gMouseMove = function(e) {
                    if ("undefined" != typeof t && !(e.insideMainD || e.srcElement && e.srcElement.inside)) {
                        var i = DayPilot.mc(e);
                        if (t.drag) {
                            document.body.style.cursor = "move", t.gShadow || (t.gShadow = t.createGShadow());
                            var n = t.gShadow;
                            n.style.left = i.x + "px", n.style.top = i.y + "px", t.movingEvent = null, DayPilot.de(t.movingShadow), t.movingShadow = null
                        }
                        for (var a = 0; a < t.registered.length; a++) t.registered[a].da && t.registered[a].da()
                    }
                }, t.register = function(e) {
                    t.registered || (t.registered = []);
                    for (var i = 0; i < t.registered.length; i++)
                        if (t.registered[i] === e) return;
                    t.registered.push(e)
                }, t.unregister = function(e) {
                    var i = t.registered;
                    if (i) {
                        var n = DayPilot.indexOf(i, e);
                        n !== -1 && i.splice(n, 1), 0 === i.length && (i = null)
                    }
                    i || (DayPilot.ue(document, "mouseup", t.gMouseUp), t.globalHandlers = !1)
                }, t.gMouseUp = function(e) {
                    function i() {
                        t.drag && (t.drag = null, document.body.style.cursor = ""), t.gShadow && (document.body.removeChild(t.gShadow), t.gShadow = null)
                    }
                    if (i(), t.movingEvent) {
                        var n = t.movingEvent;
                        if (t.movingEvent = null, !(n.event && n.event.calendar && n.event.calendar.shadow && n.event.calendar.shadow.start)) return;
                        var a = n.event.calendar,
                            o = n.event,
                            r = a.shadow.start,
                            l = a.shadow.position,
                            s = n.offset,
                            d = n.external,
                            c = n.removeElement;
                        c && (a.todo || (a.todo = {}), a.todo.del = c), a.Cf();
                        var e = e || window.event;
                        return a.lb(o, r.x, r.y, s, e, l, d), e.cancelBubble = !0, e.stopPropagation && e.stopPropagation(), !1
                    }
                    if (t.resizingEvent) {
                        var n = t.resizingEvent;
                        if (t.resizingEvent = null, !(n.event && n.event.calendar && n.event.calendar.shadow && n.event.calendar.shadow.start)) return;
                        var a = n.event.calendar,
                            o = n.event,
                            r = a.shadow.start,
                            h = a.shadow.width;
                        return a.Cf(), a.hb(o, r, h), e.cancelBubble = !0, !1
                    }
                    if (t.timeRangeSelecting) {
                        if (t.timeRangeSelecting.moved) {
                            var u = t.timeRangeSelecting,
                                a = u.root,
                                r = new DayPilot.Date(a.Df(u.from.x, u.from.y)),
                                f = r.addDays(u.width);
                            a.tb(r, f)
                        }
                        t.timeRangeSelecting = null
                    }
                }, "undefined" != typeof jQuery && ! function(e) {
                    e.fn.daypilotMonth = function(e) {
                        var t = null,
                            i = this.each(function() {
                                if (!this.daypilot) {
                                    var i = new DayPilot.Month(this.id, e);
                                    i.init(), this.daypilot = i, t || (t = i)
                                }
                            });
                        return 1 === this.length ? t : i
                    }
                }(jQuery),
                function() {
                    var e = DayPilot.am();
                    e && e.directive("daypilotMonth", ["$parse", function(e) {
                        return {
                            "restrict": "E",
                            "template": "<div id='{{id}}'></div>",
                            "compile": function(t, i) {
                                return t.replaceWith(this["template"].replace("{{id}}", i["id"])),
                                    function(t, i, n) {
                                        var a = new DayPilot.Month(i[0]);
                                        a.Pd.scope = t, a.init();
                                        var o = n["id"];
                                        o && (t[o] = a);
                                        var r = n["publishAs"];
                                        if (r) {
                                            (0, e(r).assign)(t, a)
                                        }
                                        for (var l in n)
                                            if (0 === l.indexOf("on")) {
                                                var s = DayPilot.Util.shouldApply(l);
                                                s ? ! function(i) {
                                                    a[i] = function(a) {
                                                        var o = e(n[i]);
                                                        t["$apply"](function() {
                                                            o(t, {
                                                                "args": a
                                                            })
                                                        })
                                                    }
                                                }(l) : ! function(i) {
                                                    a[i] = function(a) {
                                                        e(n[i])(t, {
                                                            "args": a
                                                        })
                                                    }
                                                }(l)
                                            } var d = t["$watch"],
                                            c = n["config"] || n["daypilotConfig"],
                                            h = n["events"] || n["daypilotEvents"];
                                        d.call(t, c, function(e, t) {
                                            for (var i in e) a[i] = e[i];
                                            a.update()
                                        }, !0), d.call(t, h, function(e) {
                                            a.events.list = e, a.gc({
                                                "eventsOnly": !0
                                            })
                                        }, !0)
                                    }
                            }
                        }
                    }])
                }(), "undefined" != typeof Sys && Sys.Application && Sys.Application.notifyScriptLoaded && Sys.Application.notifyScriptLoaded()
        }
    }(), "undefined" == typeof DayPilot) var DayPilot = {};
if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function() {
        if ("undefined" == typeof DayPilot.Navigator) {
            DayPilot.Navigator = function(e, t) {
                    this.v = "2019.4.4160";
                    var i = this;
                    this.id = e, this.api = 2, this.isNavigator = !0, this.autoFocusOnClick = !0, this.weekStarts = "Auto", this.selectMode = "day", this.titleHeight = 30, this.dayHeaderHeight = 30, this.bound = null, this.cellWidth = 30, this.cellHeight = 30, this.cssOnly = !0, this.cssClassPrefix = "navigator_default", this.freeHandSelectionEnabled = !1, this.selectionStart = (new DayPilot.Date).getDatePart(), this.selectionEnd = null, this.selectionDay = null, this.showMonths = 1, this.skipMonths = 1, this.command = "navigate", this.year = (new DayPilot.Date).getYear(), this.month = (new DayPilot.Date).getMonth() + 1, this.showWeekNumbers = !1, this.weekNumberAlgorithm = "Auto", this.rowsPerMonth = "Six", this.orientation = "Vertical", this.locale = "en-us", this.visible = !0, this.timeRangeSelectedHandling = "Bind", this.visibleRangeChangedHandling = "Enabled", this.onVisibleRangeChange = null, this.onVisibleRangeChanged = null, this.onTimeRangeSelect = null, this.onTimeRangeSelected = null, this.nav = {}, this.J = {}, this.Xf = function() {
                        this.root.dp = this, this.cssOnly ? this.root.className = this.A("_main") : this.root.className = this.A("main"), "Horizontal" === this.orientation ? (this.root.style.width = this.showMonths * (7 * o.cellWidth() + this.Yf()) + "px", this.root.style.height = 6 * this.cellHeight + this.titleHeight + this.dayHeaderHeight + "px") : this.root.style.width = 7 * o.cellWidth() + this.Yf() + "px", this.root.style.position = "relative", this.visible || (this.root.style.display = "none");
                        var e = document.createElement("input");
                        e.type = "hidden", e.name = i.id + "_state", e.id = e.name, this.root.appendChild(e), this.state = e, this.startDate ? this.startDate = new DayPilot.Date(this.startDate).firstDayOfMonth() : this.startDate = DayPilot.Date.fromYearMonthDay(this.year, this.month), this.calendars = [], this.selected = [], this.months = []
                    }, this.Ha = function() {
                        return 2 === i.api
                    }, this.qf = function() {
                        this.root.innerHTML = ""
                    }, this.A = function(e) {
                        var t = this.theme || this.cssClassPrefix;
                        return t ? t + e : ""
                    }, this.Zf = function(e, t) {
                        var i = this.cssOnly ? this.A("_" + t) : this.A(t);
                        DayPilot.Util.addClass(e, i)
                    }, this.$f = function(e, t) {
                        var i = this.cssOnly ? this.A("_" + t) : this.A(t);
                        DayPilot.Util.removeClass(e, i)
                    }, this.rf = function(e, t) {
                        var n = {};
                        n.cells = [], n.days = [], n.weeks = [];
                        var a = this.startDate.addMonths(e),
                            r = t.before,
                            l = t.after,
                            s = a.firstDayOfMonth(),
                            d = s.firstDayOfWeek(o.weekStarts()),
                            c = s.addMonths(1),
                            h = DayPilot.DateUtil.daysDiff(d, c),
                            u = "Auto" === this.rowsPerMonth ? Math.ceil(h / 7) : 6;
                        n.rowCount = u;
                        var f = (new DayPilot.Date).getDatePart(),
                            v = 7 * o.cellWidth() + this.Yf();
                        n.width = v;
                        var p = this.cellHeight * u + this.titleHeight + this.dayHeaderHeight;
                        n.height = p;
                        var m = document.createElement("div");
                        if (m.style.width = v + "px", m.style.height = p + "px", "Horizontal" === this.orientation) m.style.position = "absolute", m.style.left = v * e + "px", m.style.top = "0px", n.top = 0, n.left = v * e;
                        else {
                            m.style.position = "relative";
                            var g = e > 0 ? i.months[e - 1].top + i.months[e - 1].height : 0;
                            n.top = g, n.left = 0
                        }
                        this.cssOnly ? m.className = this.A("_month") : m.className = this.A("month"), m.style.cursor = "default", m.style.MozUserSelect = "none", m.style.KhtmlUserSelect = "none", m.style.WebkitUserSelect = "none", m.month = n, this.root.appendChild(m);
                        var y = this.titleHeight + this.dayHeaderHeight,
                            b = document.createElement("div");
                        b.style.position = "absolute", b.style.left = "0px", b.style.top = "0px", b.style.width = o.cellWidth() + "px", b.style.height = this.titleHeight + "px", b.style.lineHeight = this.titleHeight + "px", b.setAttribute("unselectable", "on"), this.cssOnly ? b.className = this.A("_titleleft") : b.className = this.A("titleleft"), t.left && (b.style.cursor = "pointer", b.innerHTML = "<span>&lt;</span>", b.onclick = this._f), m.appendChild(b), this.tl = b;
                        var w = document.createElement("div");
                        w.style.position = "absolute", w.style.left = o.cellWidth() + "px", w.style.top = "0px", w.style.width = 5 * o.cellWidth() + this.Yf() + "px", w.style.height = this.titleHeight + "px", w.style.lineHeight = this.titleHeight + "px", w.setAttribute("unselectable", "on"), this.cssOnly ? w.className = this.A("_title") : w.className = this.A("title"), w.innerHTML = o.locale().monthNames[a.getMonth()] + " " + a.getYear(), m.appendChild(w), this.ti = w;
                        var D = document.createElement("div");
                        D.style.position = "absolute", D.style.left = 6 * o.cellWidth() + this.Yf() + "px", D.style.top = "0px", D.style.width = o.cellWidth() + "px", D.style.height = this.titleHeight + "px", D.style.lineHeight = this.titleHeight + "px", D.setAttribute("unselectable", "on"), this.cssOnly ? D.className = this.A("_titleright") : D.className = this.A("titleright"), t.right && (D.style.cursor = "pointer", D.innerHTML = "<span>&gt;</span>", D.onclick = this.ag), m.appendChild(D), this.tr = D;
                        var k = this.Yf();
                        if (this.showWeekNumbers)
                            for (var P = 0; P < u; P++) {
                                var x = d.addDays(7 * P),
                                    C = null;
                                switch (this.weekNumberAlgorithm) {
                                    case "Auto":
                                        C = 1 === o.weekStarts() ? x.weekNumberISO() : x.weekNumber();
                                        break;
                                    case "US":
                                        C = x.weekNumber();
                                        break;
                                    case "ISO8601":
                                        C = x.weekNumberISO();
                                        break;
                                    default:
                                        throw "Unknown weekNumberAlgorithm value."
                                }
                                var A = document.createElement("div");
                                A.style.position = "absolute", A.style.left = "0px", A.style.top = P * this.cellHeight + y + "px", A.style.width = o.cellWidth() + "px", A.style.height = this.cellHeight + "px", A.style.lineHeight = this.cellHeight + "px", A.setAttribute("unselectable", "on"), this.cssOnly ? A.className = this.A("_weeknumber") : A.className = this.A("weeknumber"), A.innerHTML = "<span>" + C + "</span>", m.appendChild(A), n.weeks.push(A)
                            }
                        for (var S = 0; S < 7; S++) {
                            n.cells[S] = [];
                            var A = document.createElement("div");
                            A.style.position = "absolute", A.style.left = S * o.cellWidth() + k + "px", A.style.top = this.titleHeight + "px", A.style.width = o.cellWidth() + "px", A.style.height = this.dayHeaderHeight + "px", A.style.lineHeight = this.dayHeaderHeight + "px", A.setAttribute("unselectable", "on"), this.cssOnly ? A.className = this.A("_dayheader") : A.className = this.A("dayheader"), A.innerHTML = "<span>" + this.bg(S) + "</span>", m.appendChild(A), n.days.push(A);
                            for (var P = 0; P < u; P++) {
                                var x = d.addDays(7 * P + S),
                                    E = this.cg(x) && "none" !== this.dg(),
                                    T = x.firstDayOfMonth() === a,
                                    H = x < a,
                                    M = x >= a.addMonths(1);
                                if ("month" === this.dg()) E = E && T;
                                else if ("day" === this.dg()) E = E && (T || r && H || l && M);
                                else if ("week" === this.dg()) {
                                    var _ = x.firstDayOfMonth() === a;
                                    E = E && (_ || r && H || l && M)
                                }
                                var R = document.createElement("div");
                                n.cells[S][P] = R;
                                var B = i.eg(S, P),
                                    U = B.x,
                                    N = B.y;
                                R.day = x, R.x = S, R.y = P, R.left = U, R.top = N, R.isCurrentMonth = T, R.isNextMonth = M, R.isPrevMonth = H, R.showBefore = r, R.showAfter = l, this.cssOnly ? R.className = this.A(T ? "_day" : "_dayother") : R.className = this.A(T ? "day" : "dayother"), i.Zf(R, "cell"), x.getTime() === f.getTime() && T && this.Zf(R, "today"), 0 !== x.dayOfWeek() && 6 !== x.dayOfWeek() || this.Zf(R, "weekend"), R.style.position = "absolute", R.style.left = U + "px", R.style.top = N + "px", R.style.width = o.cellWidth() + "px", R.style.height = this.cellHeight + "px", R.style.lineHeight = this.cellHeight + "px";
                                var L = document.createElement("div");
                                L.style.position = "absolute", this.cssOnly ? L.className = x.getTime() === f.getTime() && T ? this.A("_todaybox") : this.A("_daybox") : L.className = x.getTime() === f.getTime() && T ? this.A("todaybox") : this.A("daybox"), i.Zf(L, "cell_box"), L.style.left = "0px", L.style.top = "0px", L.style.right = "0px", L.style.bottom = "0px", R.appendChild(L);
                                var z = null;
                                if (this.cells && this.cells[x.toStringSortable()] && (z = this.cells[x.toStringSortable()]), "function" == typeof i.onBeforeCellRender) {
                                    var O = {};
                                    O.cell = z || {}, O.cell.day = x, O.cell.isCurrentMonth = T, O.cell.isToday = x.getTime() === f.getTime() && T, O.cell.isWeekend = 0 === x.dayOfWeek() || 6 === x.dayOfWeek(), z ? (O.cell.html = z.html || x.getDay(), O.cell.cssClass = z.css) : (O.cell.html = x.getDay(), O.cell.cssClass = null), i.onBeforeCellRender(O), z = O.cell
                                }
                                if (z && DayPilot.Util.addClass(R, z.cssClass || z.css), T || r && H || l && M) {
                                    var I = document.createElement("div");
                                    I.innerHTML = x.getDay(), I.style.position = "absolute", I.style.left = "0px", I.style.top = "0px", I.style.right = "0px", I.style.bottom = "0px", i.Zf(I, "cell_text"), R.isClickable = !0, z && z.html && (I.innerHTML = z.html), R.appendChild(I)
                                }
                                R.setAttribute("unselectable", "on"), R.onclick = this.fg, m.appendChild(R), E && (i.gg(m, S, P), this.selected.push(R))
                            }
                        }
                        var j = document.createElement("div");
                        j.style.position = "absolute", j.style.left = "0px", j.style.top = y - 2 + "px", j.style.width = 7 * o.cellWidth() + this.Yf() + "px", j.style.height = "1px", j.style.fontSize = "1px", j.style.lineHeight = "1px", this.cssOnly ? j.className = this.A("_line") : j.className = this.A("line"), m.appendChild(j), this.months.push(n)
                    }, this.eg = function(e, t) {
                        var i = this.titleHeight + this.dayHeaderHeight,
                            n = this.Yf();
                        return {
                            "x": e * o.cellWidth() + n,
                            "y": t * this.cellHeight + i
                        }
                    }, this.gg = function(e, t, n) {
                        var a = e.month.cells[t][n];
                        i.Zf(a, "select")
                    }, this.hg = function(e, t, n) {
                        var a = e.month.cells[t][n];
                        i.$f(a, "select")
                    }, this.Yf = function() {
                        return this.showWeekNumbers ? o.cellWidth() : 0
                    }, this.ig = function() {
                        if (this.items)
                            for (var e = 0; e < this.showMonths; e++)
                                for (var t = 0; t < 7; t++)
                                    for (var i = 0; i < 6; i++) {
                                        var n = this.months[e].cells[t][i];
                                        n && (1 === this.items[n.day.toStringSortable()] ? this.Zf(n, "busy") : this.$f(n, "busy"))
                                    }
                    }, this.jg = function() {
                        var e = {};
                        e.startDate = i.startDate, e.selectionStart = i.selectionStart, e.selectionEnd = i.selectionEnd.addDays(1), i.state.value = JSON.stringify(e)
                    }, this.dg = function() {
                        return (this.selectMode || "").toLowerCase()
                    }, this.kg = function() {
                        var e = this.selectionDay || this.selectionStart;
                        e || (e = DayPilot.Date.today());
                        var e = new DayPilot.Date(e);
                        switch (this.dg()) {
                            case "day":
                                this.selectionStart = e, this.selectionDay = e, this.selectionEnd = e;
                                break;
                            case "week":
                                this.selectionDay = e, this.selectionStart = e.firstDayOfWeek(o.weekStarts()), this.selectionEnd = this.selectionStart.addDays(6);
                                break;
                            case "month":
                                this.selectionDay = e, this.selectionStart = e.firstDayOfMonth(), this.selectionEnd = this.selectionStart.lastDayOfMonth();
                                break;
                            case "none":
                                this.selectionEnd = e;
                                break;
                            default:
                                throw "Unknown selectMode value."
                        }
                    }, this.lg = null, this.select = function(e, t) {
                        if (!this.L) return void(this.lg = {
                            "date": e,
                            "options": t
                        });
                        var i = !0,
                            n = !0;
                        "object" == typeof t ? (t.dontFocus && (i = !1), t.dontNotify && (n = !1)) : "boolean" == typeof t && (i = !t);
                        var a = this.selectionStart,
                            o = this.selectionEnd;
                        this.selectionStart = new DayPilot.Date(e).getDatePart(), this.selectionDay = this.selectionStart;
                        var r = !1;
                        if (i) {
                            var l = this.startDate;
                            (this.selectionStart < this.mg() || this.selectionStart >= this.ng()) && (l = this.selectionStart.firstDayOfMonth()), l.toStringSortable() !== this.startDate.toStringSortable() && (r = !0), this.startDate = l
                        }
                        this.kg(), this.qf(), this.Xf(), this.og(), this.ig(), this.jg(), !n || a.equals(this.selectionStart) && o.equals(this.selectionEnd) || this.tb(), r && this.pg()
                    }, this.update = function(e) {
                        if (i.Td) throw new DayPilot.Exception("This DayPilot.Navigator instance has been disposed.");
                        i.qg(), i.Ud(e), i.gc()
                    }, this.gc = function() {
                        i.cssOnly || (i.cssOnly = !0, DayPilot.Util.log("DayPilot: cssOnly = false mode is not supported since DayPilot Pro 8.0.")), this.qf(), this.Xf(), this.kg(), this.og(), this.pa(), this.ig(), this.jg(), this.visible ? this.show() : this.hide()
                    }, this.qg = function() {
                        i.J = {}
                    }, this.ce = null, this.Ud = function(e) {
                        if (e) {
                            var t = {
                                "events": {
                                    "preInit": function() {
                                        var e = this.data;
                                        e && (DayPilot.isArray(e.list) ? i.events.list = e.list : i.events.list = e)
                                    }
                                }
                            };
                            this.ce = t;
                            for (var n in e)
                                if (t[n]) {
                                    var a = t[n];
                                    a.data = e[n],
                                        a.preInit && a.preInit()
                                } else i[n] = e[n]
                        }
                    }, this.be = function() {
                        var e = this.ce;
                        for (var t in e) {
                            var i = e[t];
                            i.postInit && i.postInit()
                        }
                    }, this.R = function(e, t, i) {
                        var n = {};
                        n.action = e, n.parameters = i, n.data = t, n.header = this.Q();
                        var a = "JSON" + JSON.stringify(n);
                        this.backendUrl ? DayPilot.request(this.backendUrl, this.T, a, this.U) : WebForm_DoCallback(this.uniqueID, a, this.V, null, this.callbackError, !0)
                    }, this.U = function(e) {
                        if ("function" == typeof i.onAjaxError) {
                            var t = {};
                            t.request = e, i.onAjaxError(t)
                        } else "function" == typeof i.ajaxError && i.ajaxError(e)
                    }, this.T = function(e) {
                        i.V(e.responseText)
                    }, this.P = function(e, t, n) {
                        var a = {};
                        a.action = e, a.parameters = n, a.data = t, a.header = this.Q();
                        var o = "JSON" + JSON.stringify(a);
                        __doPostBack(i.uniqueID, o)
                    }, this.Q = function() {
                        var e = {};
                        return e.v = this.v, e.startDate = this.startDate, e.selectionStart = this.selectionStart, e.showMonths = this.showMonths, e
                    }, this.rg = function(e, t) {
                        "refresh" === e && this.pg()
                    }, this.bg = function(e) {
                        var t = e + o.weekStarts();
                        return t > 6 && (t -= 7), o.locale().dayNamesShort[t]
                    }, this.cg = function(e) {
                        return null !== this.selectionStart && null !== this.selectionEnd && (this.selectionStart.getTime() <= e.getTime() && e.getTime() <= this.selectionEnd.getTime())
                    }, this.sg = function(e) {
                        for (var t = 0; t < i.months.length; t++) {
                            var n = i.months[t];
                            if (!n) return null;
                            if (e.x < n.left || n.width < e.x) return null;
                            i.months[t].height;
                            if (n.top <= e.y && e.y < n.top + n.height) return t
                        }
                        return null
                    }, this.tg = function(e) {
                        var t = DayPilot.mo3(i.nav.top, e),
                            n = i.sg(t);
                        if (null === n) return null;
                        var a = i.months[n],
                            o = this.titleHeight + this.dayHeaderHeight;
                        if (a.top <= t.y && t.y < a.top + o) return {
                            "month": n,
                            "x": 0,
                            "y": 0,
                            "coords": t,
                            "header": !0
                        };
                        for (var r = 0; r < a.cells.length; r++)
                            for (var l = 0; l < a.cells[r].length; l++) {
                                var s = a.cells[r][l],
                                    d = s.top + a.top,
                                    c = s.left + a.left;
                                if (c <= t.x && t.x < c + i.cellWidth && d <= t.y && t.y < d + i.cellHeight) return {
                                    "month": n,
                                    "x": r,
                                    "y": l,
                                    "coords": t
                                }
                            }
                        return null
                    }, this.ug = function(e) {
                        if (i.freeHandSelectionEnabled) {
                            var t = i.tg(e);
                            t && !t.header && (n.start = t), i.months[t.month].cells[t.x][t.y], e.preventDefault()
                        }
                    }, this.vg = function(e) {
                        if (n.start) {
                            var t = i.tg(e);
                            if (n.end) n.end = t;
                            else if (t) {
                                var a = 3,
                                    o = DayPilot.distance(n.start.coords, t.coords);
                                o > a && (n.end = t)
                            }
                            n.end && (n.clear(), n.draw())
                        }
                    }, this.wg = {};
                    var n = this.wg;
                    n.start = null, n.drawCell = function(e) {
                        var t = i.months[e.month],
                            a = i.eg(e.x, e.y),
                            o = t.top + a.y,
                            r = t.left + a.x,
                            l = document.createElement("div");
                        l.style.position = "absolute", l.style.left = r + "px", l.style.top = o + "px", l.style.height = i.cellHeight + "px", l.style.width = i.cellWidth + "px", l.style.backgroundColor = "#ccc", l.style.opacity = .5, l.style.cursor = "default", i.nav.preselection.appendChild(l), n.cells.push(l)
                    }, n.clear = function() {
                        if (n.cells) {
                            for (var e = 0; e < n.cells.length; e++) i.nav.preselection.removeChild(n.cells[e]);
                            n.cells = []
                        }
                    }, n.draw = function() {
                        var e = n.ordered(),
                            t = new a(e.start),
                            o = e.end;
                        if (o) {
                            if (o === n.end && o.header && o.month > 0) {
                                o.month -= 1;
                                var r = i.months[o.month];
                                o.x = 6, o.y = r.rowCount - 1
                            }
                            for (n.cells = []; !t.is(o);) {
                                n.drawCell(t);
                                var l = new a(t).next();
                                if (!l) return;
                                t.month = l.month, t.x = l.x, t.y = l.y
                            }
                            n.drawCell(t)
                        }
                    }, n.ordered = function() {
                        var e = n.start,
                            t = n.end,
                            i = {};
                        return !t || new a(e).before(t) ? (i.start = e, i.end = t) : (i.start = t, i.end = e), i
                    };
                    var a = function(e, t, n) {
                        if (e instanceof a) return e;
                        if ("object" == typeof e) {
                            var o = e;
                            this.month = o.month, this.x = o.x, this.y = o.y
                        } else this.month = e, this.x = t, this.y = n;
                        this.is = function(e) {
                            return this.month === e.month && this.x === e.x && this.y === e.y
                        }, this.next = function() {
                            var e = this;
                            if (e.x < 6) return {
                                "month": e.month,
                                "x": e.x + 1,
                                "y": e.y
                            };
                            var t = i.months[e.month];
                            return e.y < t.rowCount - 1 ? {
                                "month": e.month,
                                "x": 0,
                                "y": e.y + 1
                            } : e.month < i.months.length - 1 ? {
                                "month": e.month + 1,
                                "x": 0,
                                "y": 0
                            } : null
                        }, this.visible = function() {
                            var e = this.cell();
                            return !!e.isCurrentMonth || (!(!e.isPrevMonth || !e.showBefore) || !(!e.isNextMonth || !e.showAfter))
                        }, this.nextVisible = function() {
                            for (var e = this; !e.visible();) {
                                var t = e.next();
                                if (!t) return null;
                                e = new a(t)
                            }
                            return e
                        }, this.previous = function() {
                            var e = this;
                            if (e.x > 0) return {
                                "month": e.month,
                                "x": e.x - 1,
                                "y": e.y
                            };
                            i.months[e.month];
                            if (e.y > 0) return {
                                "month": e.month,
                                "x": 6,
                                "y": e.y - 1
                            };
                            if (e.month > 0) {
                                var t = i.months[e.month - 1];
                                return {
                                    "month": e.month - 1,
                                    "x": 6,
                                    "y": t.rowCount - 1
                                }
                            }
                            return null
                        }, this.previousVisible = function() {
                            for (var e = this; !e.visible();) {
                                var t = e.previous();
                                if (!t) return null;
                                e = new a(t)
                            }
                            return e
                        }, this.cell = function() {
                            return i.months[this.month].cells[this.x][this.y]
                        }, this.date = function() {
                            return this.cell().day
                        }, this.before = function(e) {
                            return this.date() < new a(e).date()
                        }
                    };
                    this.fg = function(e) {
                        var t = this.parentNode,
                            n = this.parentNode.month,
                            a = this.x,
                            o = this.y,
                            r = n.cells[a][o].day;
                        if (n.cells[a][o].isClickable) {
                            i.clearSelection(), i.selectionDay = r;
                            var r = i.selectionDay;
                            switch (i.dg()) {
                                case "none":
                                    i.selectionStart = r, i.selectionEnd = r;
                                    break;
                                case "day":
                                    if (i.autoFocusOnClick) {
                                        var l = r;
                                        if (r < i.mg() || r >= i.ng()) return void i.select(r)
                                    }
                                    var s = n.cells[a][o];
                                    i.gg(t, a, o), i.selected.push(s), i.selectionStart = s.day, i.selectionEnd = s.day;
                                    break;
                                case "week":
                                    if (i.autoFocusOnClick) {
                                        var l = n.cells[0][o].day,
                                            d = n.cells[6][o].day;
                                        if (l.firstDayOfMonth() === d.firstDayOfMonth() && (l < i.mg() || d >= i.ng())) return void i.select(r)
                                    }
                                    for (var c = 0; c < 7; c++) i.gg(t, c, o), i.selected.push(n.cells[c][o]);
                                    i.selectionStart = n.cells[0][o].day, i.selectionEnd = n.cells[6][o].day;
                                    break;
                                case "month":
                                    if (i.autoFocusOnClick) {
                                        var l = r;
                                        if (r < i.mg() || r >= i.ng()) return void i.select(r)
                                    }
                                    for (var l = null, d = null, o = 0; o < 6; o++)
                                        for (var a = 0; a < 7; a++) {
                                            var s = n.cells[a][o];
                                            s && s.day.getYear() === r.getYear() && s.day.getMonth() === r.getMonth() && (i.gg(t, a, o), i.selected.push(s), null === l && (l = s.day), d = s.day)
                                        }
                                    i.selectionStart = l, i.selectionEnd = d;
                                    break;
                                default:
                                    throw "unknown selectMode"
                            }
                            i.jg(), i.tb()
                        }
                    }, this.tb = function(e) {
                        var t = i.selectionStart,
                            n = i.selectionEnd.addDays(1),
                            a = DayPilot.DateUtil.daysDiff(t, n),
                            o = i.selectionDay;
                        if (e = e || {}, i.Ha()) {
                            var r = {};
                            if (r.start = t, r.end = n, r.day = o, r.days = a, r.mode = e.mode || i.selectMode, r.preventDefault = function() {
                                    this.preventDefault.value = !0
                                }, "function" == typeof i.onTimeRangeSelect && (i.onTimeRangeSelect(r), r.preventDefault.value)) return;
                            switch (i.timeRangeSelectedHandling) {
                                case "Bind":
                                    var l = DayPilot.Util.evalVariable(i.bound);
                                    if (l) {
                                        var s = {};
                                        s.start = t, s.end = n, s.days = a, s.day = o, l.commandCallBack(i.command, s)
                                    }
                                    break;
                                case "None":
                                    break;
                                case "PostBack":
                                    i.timeRangeSelectedPostBack(t, n, o)
                            }
                            "function" == typeof i.onTimeRangeSelected && i.onTimeRangeSelected(r)
                        } else switch (i.timeRangeSelectedHandling) {
                            case "Bind":
                                var l = DayPilot.Util.evalVariable(i.bound);
                                if (l) {
                                    var s = {};
                                    s.start = t, s.end = n, s.days = a, s.day = o, l.commandCallBack(i.command, s)
                                }
                                break;
                            case "JavaScript":
                                i.onTimeRangeSelected(t, n, o);
                                break;
                            case "None":
                                break;
                            case "PostBack":
                                i.timeRangeSelectedPostBack(t, n, o)
                        }
                    }, this.timeRangeSelectedPostBack = function(e, t, i, n) {
                        var a = {};
                        a.start = e, a.end = t, a.day = n, this.P("TimeRangeSelected", i, a)
                    }, this.ag = function(e) {
                        i.xg(i.skipMonths)
                    }, this._f = function(e) {
                        i.xg(-i.skipMonths)
                    }, this.xg = function(e) {
                        this.startDate = this.startDate.addMonths(e), this.qf(), this.Xf(), this.og(), this.jg(), this.pg(), this.ig()
                    }, this.mg = function() {
                        return i.startDate.firstDayOfMonth()
                    }, this.ng = function() {
                        return i.startDate.firstDayOfMonth().addMonths(this.showMonths)
                    }, this.visibleStart = function() {
                        return i.startDate.firstDayOfMonth().firstDayOfWeek(o.weekStarts())
                    }, this.visibleEnd = function() {
                        return i.startDate.firstDayOfMonth().addMonths(this.showMonths - 1).firstDayOfWeek(o.weekStarts()).addDays(42)
                    }, this.pg = function() {
                        var e = this.visibleStart(),
                            t = this.visibleEnd();
                        if (i.Ha()) {
                            var n = {};
                            if (n.start = e, n.end = t, n.preventDefault = function() {
                                    this.preventDefault.value = !0
                                }, "function" == typeof i.onVisibleRangeChange && (i.onVisibleRangeChange(n), n.preventDefault.value)) return;
                            switch (this.visibleRangeChangedHandling) {
                                case "CallBack":
                                    this.visibleRangeChangedCallBack(null);
                                    break;
                                case "PostBack":
                                    this.visibleRangeChangedPostBack(null);
                                    break;
                                case "Disabled":
                            }
                            "function" == typeof i.onVisibleRangeChanged && i.onVisibleRangeChanged(n)
                        } else switch (this.visibleRangeChangedHandling) {
                            case "CallBack":
                                this.visibleRangeChangedCallBack(null);
                                break;
                            case "PostBack":
                                this.visibleRangeChangedPostBack(null);
                                break;
                            case "JavaScript":
                                this.onVisibleRangeChanged(e, t);
                                break;
                            case "Disabled":
                        }
                    }, this.visibleRangeChangedCallBack = function(e) {
                        var t = {};
                        this.R("Visible", e, t)
                    }, this.visibleRangeChangedPostBack = function(e) {
                        var t = {};
                        this.P("Visible", e, t)
                    }, this.V = function(e, t) {
                        var e = JSON.parse(e);
                        i.items = e.Items, i.cells = e.Cells, i.cells ? i.update() : i.ig()
                    }, this.og = function() {
                        for (var e = 0; e < this.showMonths; e++) {
                            var t = this.yg(e);
                            this.rf(e, t)
                        }
                        this.root.style.height = this.Mf() + "px", this.nav.preselection = document.createElement("div"), this.nav.preselection.style.position = "absolute", this.nav.preselection.style.left = "0px", this.nav.preselection.style.top = "0px", this.root.appendChild(this.nav.preselection)
                    }, this.Mf = function() {
                        if ("Horizontal" === this.orientation) {
                            for (var e = 0, t = 0; t < this.months.length; t++) {
                                var i = this.months[t];
                                i.height > e && (e = i.height)
                            }
                            return e
                        }
                        for (var n = 0, t = 0; t < this.months.length; t++) {
                            var i = this.months[t];
                            n += i.height
                        }
                        return n
                    }, this.yg = function(e) {
                        if (this.internal.showLinks) return this.internal.showLinks;
                        var t = {};
                        return t.left = 0 === e, t.right = 0 === e, t.before = 0 === e, t.after = e === this.showMonths - 1, "Horizontal" === this.orientation && (t.right = e === this.showMonths - 1), t
                    }, this.Pd = {}, this.Pd.scope = null, this.Pd.notify = function() {
                        i.Pd.scope && i.Pd.scope["$apply"]()
                    }, this.internal = {}, this.internal.initialized = function() {
                        return i.L
                    }, this.Uc = {};
                    var o = this.Uc;
                    o.locale = function() {
                        return DayPilot.Locale.find(i.locale)
                    }, o.weekStarts = function() {
                        if ("Auto" === i.weekStarts) {
                            var e = o.locale();
                            return e ? e.weekStarts : 0
                        }
                        return i.weekStarts
                    }, o.cellWidth = function() {
                        if (i.J.cellWidth) return i.J.cellWidth;
                        var e = i.Wd("_cell_dimensions").width;
                        return e || (e = i.cellWidth), i.J.cellWidth = e, e
                    }, this.clearSelection = function() {
                        for (var e = 0; e < this.selected.length; e++) {
                            var t = this.selected[e];
                            i.hg(t.parentNode, t.x, t.y)
                        }
                        this.selected = []
                    }, this.$d = function() {
                        return !!this.backendUrl && ("undefined" == typeof i.items || !i.items)
                    }, this.events = {}, this.pa = function() {
                        if (DayPilot.isArray(this.events.list)) {
                            this.items = {};
                            for (var e = 0; e < this.events.list.length; e++) {
                                var t = this.events.list[e];
                                if (!t.hidden) {
                                    var i = this.zg(t);
                                    for (var n in i) this.items[n] = 1
                                }
                            }
                        }
                    }, this.Wd = function(e) {
                        var t = document.createElement("div");
                        t.style.position = "absolute", t.style.top = "-2000px", t.style.left = "-2000px", t.className = this.A(e);
                        var n = i.root || document.body;
                        n.appendChild(t);
                        var a = t.offsetHeight,
                            o = t.offsetWidth;
                        n.removeChild(t);
                        var r = {};
                        return r.height = a, r.width = o, r
                    }, this.zg = function(e) {
                        for (var t = new DayPilot.Date(e.start), i = new DayPilot.Date(e.end), n = {}, a = t.getDatePart(); a.getTime() < i.getTime();) n[a.toStringSortable()] = 1, a = a.addDays(1);
                        return n
                    }, this.show = function() {
                        i.visible = !0, i.root.style.display = ""
                    }, this.hide = function() {
                        i.visible = !1, i.root.style.display = "none"
                    }, this._d = function() {
                        if (this.id && this.id.tagName) this.nav.top = this.id;
                        else {
                            if ("string" != typeof this.id) throw "DayPilot.Navigator() constructor requires the target element or its ID as a parameter";
                            if (this.nav.top = document.getElementById(this.id), !this.nav.top) throw "DayPilot.Navigator: The placeholder element not found: '" + e + "'."
                        }
                        this.root = this.nav.top
                    }, this.init = function() {
                        if (this._d(), !this.root.dp) {
                            i.cssOnly || (i.cssOnly = !0, DayPilot.Util.log("DayPilot: cssOnly = false mode is not supported since DayPilot Pro 8.0.")), this.kg(), this.Xf(), this.og(), this.pa(), this.ig(), this.ba(), this.Ag(), this.Dd();
                            return this.$d() && this.pg(), this.L = !0, this.be(), this.lg && (this.select(this.lg.date, this.lg.options), this.lg = null), this
                        }
                    }, this.Ag = function() {
                        i.nav.top.onmousedown = this.ug, i.nav.top.onmousemove = this.vg
                    }, this.Dd = function() {
                        DayPilot.re(document, "mouseup", i.Ee)
                    }, this.Ee = function(e) {
                        if (n.start && n.end) {
                            var t = DayPilot.mo3(i.nav.top, e);
                            if (t.x === n.start.coords.x && t.y === n.start.coords.y) return n.start = null, void n.clear();
                            n.clear();
                            var o = n.ordered();
                            o.start = new a(o.start).nextVisible(), o.end = new a(o.end).previousVisible(), i.selectionDay = new a(o.start).date(), i.selectionStart = i.selectionDay, i.selectionEnd = new a(o.end).date(), n.start = null, n.end = null, i.qf(), i.Xf(), i.og(), i.ig(), i.jg();
                            i.tb({
                                "mode": "freehand"
                            })
                        }
                        n.start = null, n.end = null
                    }, this.dispose = function() {
                        var e = i;
                        e.root && (e.root.removeAttribute("style"), e.root.removeAttribute("class"), e.root.dp = null, e.root.innerHTML = null, e.root = null)
                    }, this.ba = function() {
                        this.root.dispose = this.dispose
                    }, this.Init = this.init, this.Ud(t)
                }, "undefined" != typeof jQuery && ! function(e) {
                    e.fn.daypilotNavigator = function(e) {
                        var t = null,
                            i = this.each(function() {
                                if (!this.daypilot) {
                                    var i = new DayPilot.Navigator(this.id);
                                    this.daypilot = i;
                                    for (var n in e) i[n] = e[n];
                                    i.Init(), t || (t = i)
                                }
                            });
                        return 1 === this.length ? t : i
                    }
                }(jQuery),
                function() {
                    var e = DayPilot.am();
                    e && e.directive("daypilotNavigator", ["$parse", function(e) {
                        return {
                            "restrict": "E",
                            "template": "<div id='{{id}}'></div>",
                            "compile": function(t, i) {
                                return t.replaceWith(this["template"].replace("{{id}}", i["id"])),
                                    function(t, i, n) {
                                        var a = new DayPilot.Navigator(i[0]);
                                        a.Pd.scope = t, a.init();
                                        var o = n["id"];
                                        o && (t[o] = a);
                                        var r = n["publishAs"];
                                        if (r) {
                                            (0, e(r).assign)(t, a)
                                        }
                                        for (var l in n)
                                            if (0 === l.indexOf("on")) {
                                                var s = DayPilot.Util.shouldApply(l);
                                                s ? ! function(i) {
                                                    a[i] = function(a) {
                                                        var o = e(n[i]);
                                                        t["$apply"](function() {
                                                            o(t, {
                                                                "args": a
                                                            })
                                                        })
                                                    }
                                                }(l) : ! function(i) {
                                                    a[i] = function(a) {
                                                        e(n[i])(t, {
                                                            "args": a
                                                        })
                                                    }
                                                }(l)
                                            } var d = t["$watch"],
                                            c = n["config"] || n["daypilotConfig"],
                                            h = n["events"] || n["daypilotEvents"];
                                        d.call(t, c, function(e, t) {
                                            for (var i in e) a[i] = e[i];
                                            a.update()
                                        }, !0), d.call(t, h, function(e) {
                                            a.events.list = e, a.pa(), a.ig()
                                        }, !0)
                                    }
                            }
                        }
                    }])
                }(), "undefined" != typeof Sys && Sys.Application && Sys.Application.notifyScriptLoaded && Sys.Application.notifyScriptLoaded()
        }
    }(), "undefined" == typeof DayPilot) var DayPilot = {};
if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function() {
        function t(e) {
            for (var t = e.touches[0].clientX, i = e.touches[0].clientY, n = document.elementFromPoint(t, i); n && n.parentNode;)
                if (n = n.parentNode, n.daypilotMainD) return n.calendar;
            return !1
        }

        function i(e) {
            var t = e.touches[0].pageX,
                i = e.touches[0].pageY,
                n = {};
            return n.x = t, n.y = i, n
        }
        if ("undefined" == typeof DayPilot.Scheduler) {
            var n = function() {
                    var e = navigator.userAgent;
                    return e.indexOf("Mozilla/5.0") > -1 && e.indexOf("Android ") > -1 && e.indexOf("AppleWebKit") > -1 && !(e.indexOf("Chrome") > -1)
                }(),
                a = navigator.userAgent.indexOf("iPad") > -1 || navigator.userAgent.indexOf("iPhone") > -1,
                o = {},
                l = function() {},
                s = !1;
            DayPilot.Scheduler = function(t, s) {
                function h(e, t) {
                    return 1 - e / t
                }
                this.v = "2019.4.4160";
                var u = this;
                this.id = t, this.isScheduler = !0, this.allowDefaultContextMenu = !1, this.allowEventOverlap = !0, this.allowMultiMove = !1, this.allowMultiRange = !1, this.allowMultiResize = !1, this.allowMultiSelect = !0, this.api = 2, this.multiSelectRectangle = "Disabled", this.autoRefreshCommand = "refresh", this.autoRefreshEnabled = !1, this.autoRefreshInterval = 60, this.autoRefreshMaxCount = 20, this.autoScroll = "Drag", this.blockOnCallBack = !1, this.navigatorBackSync = null, this.backendUrl = null, this.beforeCellRenderCaching = !0, this.businessBeginsHour = 9, this.businessEndsHour = 18, this.businessWeekends = !1, this.cellDuration = 60, this.cellGroupBy = "Day", this.cellSweeping = !0, this.cellSweepingCacheSize = 1e3, this.cellWidth = 40, this.cellWidthMin = 1, this.cellWidthSpec = "Fixed", this.cellsMarkBusiness = !0, this.cornerHtml = "", this.crosshairTimeHeaderLevel = "Last", this.crosshairType = "Header", this.cssClassPrefix = "scheduler_default", this.days = 1, this.doubleClickTimeout = 300, this.dragOutAllowed = !1, this.drawBlankCells = !0, this.durationBarHeight = 3, this.durationBarVisible = !0, this.durationBarMode = "Duration", this.dynamicEventRendering = "Progressive", this.dynamicEventRenderingMargin = 50, this.dynamicEventRenderingMarginX = null, this.dynamicEventRenderingMarginY = null, this.dynamicEventRenderingCacheSweeping = !1, this.dynamicEventRenderingCacheSize = 200, this.dynamicLoading = !1, this.eventEditMinWidth = 100, this.eventEndSpec = "DateTime", this.eventHeight = 35, this.eventHtmlLeftMargin = 10, this.eventHtmlRightMargin = 10, this.eventMarginLeft = 0, this.eventMarginRight = 0, this.eventMarginBottom = 0, this.eventMinWidth = 1, this.eventMoveMargin = 5, this.eventMoveToPosition = !1, this.eventMoveSkipNonBusiness = !1, this.eventResizeMargin = 5, this.eventStackingLineHeight = 100, this.eventTapAndHoldHandling = "Move", this.eventTextWrappingEnabled = !1, this.eventUpdateInplaceOptimization = !1, this.eventsLoadMethod = "GET", this.eventVersionHeight = 25, this.eventVersionMargin = 2, this.eventVersionPosition = "Above", this.eventVersionsEnabled = !1, this.eventVersionsReserveSpace = !1, this.floatingEvents = !a, this.floatingTimeHeaders = !0, this.groupConcurrentEvents = !1, this.groupConcurrentEventsLimit = 1, this.headerHeight = 30, this.heightSpec = "Max", this.height = 600, this.hideBorderFor100PctHeight = !1, this.hideUntilInit = !0, this.infiniteScrollingEnabled = !1, this.infiniteScrollingMargin = 50, this.infiniteScrollingStepDays = 30, this.initEventEnabled = !0, this.jointEventsResize = !0, this.jointEventsMove = !0, this.layout = "Auto", this.linkCreateHandling = "Disabled", this.linkBottomMargin = 17, this.linkPointSize = 10, this.linksLoadMethod = "GET", this.locale = "en-us", this.loadingLabelText = "Loading...", this.loadingLabelVisible = !0, this.overrideWheelScrolling = !1, this.messageBarPosition = "Top", this.messageHideAfter = 5e3, this.messageHideOnMouseOut = !0, this.multiMoveVerticalMode = "Disabled", this.moveBy = "Full", this.notifyCommit = "Immediate", this.progressiveRowRendering = !0, this.progressiveRowRenderingPreload = 25, this.rowCreateHeight = null, this.rowCreateHtml = "New row...", this.rowDragHandleWidth = 10, this.rowHeaderColumnDefaultWidth = 80, this.rowHeaderHideIconEnabled = !1, this.rowHeaderScrolling = !1, this.rowHeaderSplitterWidth = 3, this.rowHeaderWidthAutoFit = !0, this.rowHeaderWidthMarginRight = 0, this.rowHeaderColumnsResizable = !0, this.rowHeaderColumnsMode = "Tabular", this.rowHeaderColumns = null, this.rowHeaderWidth = 80, this.rowMarginBottom = 0, this.rowMarginTop = 0, this.rowMinHeight = 0, this.rowsLoadMethod = "GET", this.scale = "CellDuration", this.scrollDelayDynamic = 500, this.scrollDelayEvents = 200, this.scrollDelayCells = a ? 100 : 0, this.scrollDelayFloats = 0, this.scrollDelayRows = 0, this.scrollStep = null, this.scrollX = 0, this.scrollY = 0, this.selectedRows = [], this.separators = [], this.showNonBusiness = !0, this.showNonBusinessForceHours = !1, this.showToolTip = !0, this.snapToGrid = !0, this.snapToGridTimeRangeSelecting = !0, this.snapToGridEventMoving = !0, this.snapToGridEventResizing = !0, this.startDate = DayPilot.Date.today(), this.syncResourceTree = !1, this.tapAndHoldTimeout = 300, this.timeHeaders = [{
                    "groupBy": "Default"
                }, {
                    "groupBy": "Cell"
                }], this.timeHeaderPosition = "Top", this.timeHeaderTextWrappingEnabled = !1, this.treeAnimation = !0, this.treeAutoExpand = !0, this.treeEnabled = !1, this.treeIndent = 20, this.treeImageMarginLeft = 5, this.treeImageMarginTop = 3, this.treeImageMarginRight = 2, this.treeImageWidth = 10, this.treeImageHeight = 10, this.treePreventParentUsage = !1, this.timeFormat = "Auto", this.timeline = null, this.useEventBoxes = "Always", this.viewType = "Resources", this.visible = !0, this.watchWidthChanges = !0, this.weekStarts = "Auto", this.width = null, this.zoomLevels = [], this.zoomPosition = "left", this.eventClickHandling = "Enabled", this.eventDeleteHandling = "Disabled", this.eventHoverHandling = "Bubble", this.eventDoubleClickHandling = "Disabled", this.eventEditHandling = "Update", this.eventMoveHandling = "Update", this.eventResizeHandling = "Update", this.eventRightClickHandling = "ContextMenu", this.eventSelectHandling = "Update", this.resourceCollapseHandling = "Enabled", this.resourceExpandHandling = "Enabled", this.rowClickHandling = "Enabled", this.rowDoubleClickHandling = "Disabled", this.rowRightClickHandling = "ContextMenu", this.rowCreateHandling = "Disabled", this.rowEditHandling = "Update", this.rowHeaderColumnResizedHandling = "Update", this.rowSelectHandling = "Update", this.rowMoveHandling = "Disabled", this.timeHeaderClickHandling = "Enabled", this.timeHeaderRightClickHandling = "Enabled", this.timeRangeClickHandling = "Enabled", this.timeRangeDoubleClickHandling = "Disabled", this.timeRangeSelectedHandling = "Enabled", this.timeRangeRightClickHandling = "ContextMenu", this.timeRangeSelectingStartEndEnabled = !1, this.timeRangeSelectingStartEndFormat = "MMMM d, yyyy", this.eventMovingStartEndEnabled = !1, this.eventMovingStartEndFormat = "MMMM d, yyyy", this.eventResizingStartEndEnabled = !1, this.eventResizingStartEndFormat = "MMMM d, yyyy", "function" == typeof DayPilot.Bubble ? this.bubble = new DayPilot.Bubble : this.bubble = null, this.cellBubble = null, this.resourceBubble = null, this.linkBubble = null, DayPilot.browser.ie && (this.scrollDelayCells = 100, this.scrollDelayFloats = 100);
                1 === u.api && (this.onEventMove = function() {}, this.onEventResize = function() {}, this.onResourceExpand = function() {}, this.onResourceCollapse = function() {});
                this.onEventClick = null, this.onEventClicked = null, this.onEventMove = null, this.onEventMoved = null, this.onEventMoving = null, this.onEventResize = null, this.onEventResized = null, this.onEventResizing = null, this.onEventRightClick = null, this.onEventRightClicked = null, this.onEventMouseOver = null, this.onEventMouseOut = null, this.onIncludeTimeCell = null, this.onLinkClick = null, this.onLinkClicked = null, this.onRowClick = null, this.onRowClicked = null, this.onRowDoubleClick = null, this.onRowDoubleClicked = null, this.onRowMouseOver = null, this.onRowMouseOut = null, this.onRowRightClick = null, this.onRowRightClicked = null, this.onTimeHeaderClick = null, this.onTimeHeaderClicked = null, this.onTimeHeaderRightClick = null, this.onTimeHeaderRightClicked = null, this.onTimeRangeClick = null, this.onTimeRangeClicked = null, this.onTimeRangeDoubleClick = null, this.onTimeRangeDoubleClicked = null, this.onTimeRangeSelect = null, this.onTimeRangeSelected = null, this.onTimeRangeSelecting = null, this.onTimeRangeRightClick = null, this.onTimeRangeRightClicked = null, this.onRowHeaderResized = null, this.onCellMouseOver = null, this.onCellMouseOut = null, this.onGridMouseDown = null, this.onBeforeCellRender = null, this.onBeforeCornerRender = null, this.onBeforeCornerDomAdd = null, this.onBeforeCornerDomRemove = null, this.onBeforeEventRender = null, this.onBeforeEventDomAdd = null, this.onBeforeEventDomRemove = null, this.onBeforeTimeHeaderRender = null, this.onBeforeTimeHeaderDomAdd = null, this.onBeforeTimeHeaderDomRemove = null, this.onBeforeResHeaderRender = null, this.onBeforeRowHeaderRender = null, this.onBeforeRowHeaderDomAdd = null, this.onBeforeRowHeaderDomRemove = null, this.onBeforeCellExport = null, this.onBeforeEventExport = null, this.onBeforeTimeHeaderExport = null, this.onBeforeRowHeaderExport = null, this.onAfterEventRender = null, this.onAfterCellRender = null, this.onEventFilter = null, this.onRowFilter = null, this.onRectangleEventSelecting = null, this.onRectangleEventSelect = null, this.onRectangleEventSelected = null, this.onDimensionsChanged = null, this.onAfterUpdate = null, this.K = 0, this.Bg = !0, this.Cg = !1, this.Dg = !1, this.Eg = !1, this.Fg = -1, this.Gg = -1, this.Td = !1, this.Hg = -1, this.Ig = !1, this.Jg = !0, this.rowlist = DayPilot.list(), this.itline = DayPilot.list(), this.events = {}, this.cells = {}, this.elements = {}, this.elements.events = [], this.elements.bars = [], this.elements.text = [], this.elements.cells = [], this.elements.linesVertical = [], this.elements.separators = [], this.elements.range = [], this.elements.breaks = [], this.elements.links = [], this.elements.linkpoints = [], this.elements.rectangle = [], this.elements.hover = [], this.elements.timeHeader = [], this.J = {}, this.J.cells = [], this.J.linesVertical = {}, this.J.linesHorizontal = {}, this.J.timeHeaderGroups = [], this.J.timeHeader = {}, this.J.pixels = [], this.J.breaks = [], this.J.events = [], this.clientState = {}, this.members = {}, this.members.obsolete = ["Init", "cleanSelection", "cssClassPrefix", "getHScrollPosition", "setHScrollPosition", "getVScrollPosition", "setVScrollPosition", "showBaseTimeHeader"], this.members.ignoreFilter = function(e) {
                    return 0 === e.indexOf("div")
                }, this.members.ignore = ["internal", "nav", "debug", "temp", "elements", "members", "cellProperties", "itline", "rowlist", "timeHeader", "timeouts", "rowHeaderCols"], this.members.noCssOnly = [], this.M = "javasc", this.nav = {}, this.V = function(e, t) {
                    var e = JSON.parse(e);
                    if (u.onScrollCalled = !1, e.CallBackRedirect) return void(document.location.href = e.CallBackRedirect);
                    if ("function" == typeof u.onCallBackResult) {
                        var i = {};
                        if (i.result = e, i.preventDefault = function() {
                                i.preventDefault.value = !0
                            }, u.onCallBackResult(i), i.preventDefault.value) return u.nb(), u.ja(), u.Ga(), e.Message && u.message && u.message(e.Message), u.ka(e.CallBackData, !0), u.Kg(), void u.Lg()
                    }
                    if (e.BubbleGuid) {
                        var n = e.BubbleGuid,
                            a = this.bubbles[n];
                        return delete this.bubbles[n], u.ja(), "undefined" != typeof e.Result.BubbleHTML && a && a.updateView(e.Result.BubbleHTML, a), void u.Kg()
                    }
                    if ("undefined" != typeof DayPilot.Bubble && DayPilot.Bubble.hideActive(), "undefined" != typeof e.ClientState && (null === e.ClientState ? u.clientState = {} : u.clientState = e.ClientState), "None" === e.UpdateType) return u.ja(), u.Kg(), e.Message && u.message(e.Message), void u.ka(e.CallBackData, !0);
                    if (e.VsUpdate) {
                        var o = document.createElement("input");
                        o.type = "hidden", o.name = u.id + "_vsupdate", o.id = o.name, o.value = e.VsUpdate, u.of.innerHTML = "", u.of.appendChild(o)
                    }
                    "undefined" != typeof e.TagFields && (u.tagFields = e.TagFields), "undefined" != typeof e.SortDirections && (u.sortDirections = e.SortDirections), u.J.drawArea = null, "Full" === e.UpdateType && (u.resources = e.Resources, u.colors = e.Colors, u.palette = e.Palette, u.dirtyColors = e.DirtyColors, u.cellProperties = e.CellProperties, u.cellConfig = e.CellConfig, u.separators = e.Separators, u.timeline = e.Timeline, u.timeHeader = e.TimeHeader, u.timeHeaders = e.TimeHeaders, "undefined" != typeof e.Links && (u.links.list = e.Links), "undefined" != typeof e.RowHeaderColumns && (u.rowHeaderColumns = e.RowHeaderColumns), u.startDate = e.StartDate ? new DayPilot.Date(e.StartDate) : u.startDate, u.days = e.Days ? e.Days : u.days, u.cellDuration = e.CellDuration ? e.CellDuration : u.cellDuration, u.cellGroupBy = e.CellGroupBy ? e.CellGroupBy : u.cellGroupBy, u.cellWidth = e.CellWidth ? e.CellWidth : u.cellWidth, "undefined" != typeof e.Scale && (u.scale = e.Scale), u.viewType = e.ViewType ? e.ViewType : u.viewType, "undefined" != typeof e.ShowNonBusiness && (u.showNonBusiness = e.ShowNonBusiness), u.businessBeginsHour = e.BusinessBeginsHour ? e.BusinessBeginsHour : u.businessBeginsHour, u.businessEndsHour = e.BusinessEndsHour ? e.BusinessEndsHour : u.businessEndsHour, "undefined" != typeof e.DynamicLoading && (u.dynamicLoading = e.DynamicLoading), "undefined" != typeof e.TreeEnabled && (u.treeEnabled = e.TreeEnabled), u.locale = e.Locale ? e.Locale : u.locale, "undefined" != typeof e.TimeZone && (u.timeZone = e.TimeZone), u.timeFormat = e.TimeFormat ? e.TimeFormat : u.timeFormat, u.rowHeaderCols = e.RowHeaderCols ? e.RowHeaderCols : u.rowHeaderCols, "undefined" != typeof e.DurationBarMode && (u.durationBarMode = e.DurationBarMode), "undefined" != typeof e.CornerHTML && (u.cornerHtml = e.CornerHTML), u.hashes = e.Hashes, u.Mg(), u.Ng(), u.Og(), u.oa()), "Scroll" !== e.Action && u.pa(e.Events), "Full" === e.UpdateType && (u.Pg(), u.Qg()), u.Rg(), u.Ca(), u.Sg(), u.J.drawArea = null, "Scroll" !== e.Action ? (u.Tg(), u.qa(), "Auto" !== u.heightSpec && "Max" !== u.heightSpec || u.ya(), u.Ug(), u.Y(), u.Vg(), u.multiselect.clear(!0), u.multiselect.Wg(e.SelectedEvents), u.Xg(), u.Yg(), u.Da()) : (u.multiselect.clear(!0), u.multiselect.Wg(e.SelectedEvents), u.Zg(e.Events)), "HoldForever" !== u.timeRangeSelectedHandling && u.$g(), "Full" === e.UpdateType && (u.setScroll(e.ScrollX, e.ScrollY), u.jg()), u._g(), u.nb(), e.SelectedRows && u.ah(e.SelectedRows), u.ja(), "Full" === e.UpdateType && navigator.appVersion.indexOf("MSIE 7.") !== -1 && window.setTimeout(function() {
                        u.Pg(), u.ya()
                    }, 0), u.Ga(), e.Message && u.message && u.message(e.Message), u.ka(e.CallBackData, !0), u.Kg(), u.Lg(), "Full" !== e.UpdateType || "Scroll" === e.Action || u.onScrollCalled || setTimeout(function() {
                        u.bh()
                    }, 0)
                }, this.nb = function() {
                    if (u.todo && u.todo.del) {
                        var e = u.todo.del;
                        e.parentNode.removeChild(e), u.todo.del = null
                    }
                }, this.ka = function(e, t) {
                    var i = function(e, t) {
                        return function() {
                            if (u.Ha()) {
                                if ("function" == typeof u.onAfterRender) {
                                    var i = {};
                                    i.isCallBack = t, i.isScroll = !1, i.data = e, u.onAfterRender(i)
                                }
                            } else u.afterRender && u.afterRender(e, t)
                        }
                    };
                    window.setTimeout(i(e, t), 0)
                }, this.scrollTo = function(e, t, i) {
                    var n = DayPilot.Util.overlaps(u.visibleStart(), u.visibleEnd(), e, e);
                    return u.infiniteScrollingEnabled && !n ? void u.infinite.scrollTo(e) : void(u.ch.enabled ? (u.ch.scrollToRequested = e, setTimeout(function() {
                        var e = u.ch.scrollToRequested;
                        e && u.dh(e, t, i)
                    }, 0)) : u.dh(e, t, i))
                }, this.dh = function(e, t, i) {
                    if (e) {
                        if (!u.L) return void(u.eh = {
                            date: e,
                            animated: t,
                            position: i
                        });
                        if ("Days" === u.viewType) {
                            var n = u.fh(new DayPilot.Date(e));
                            if (!n) return;
                            return void setTimeout(function() {
                                var e = n.top;
                                u.nav.scroll.scrollTop = e
                            }, 100)
                        }
                        var a;
                        if (e instanceof DayPilot.Date) a = this.getPixels(e).left;
                        else if ("string" == typeof e) a = this.getPixels(new DayPilot.Date(e)).left;
                        else {
                            if ("number" != typeof e) throw "Invalid scrollTo() parameter. Accepted parameters: string (ISO date), number (pixels), DayPilot.Date object";
                            a = e
                        }
                        var o = this.gh.clientWidth,
                            r = this.nav.scroll.clientWidth;
                        switch (i = i || "left", i.toLowerCase()) {
                            case "left":
                                break;
                            case "middle":
                                a -= r / 2;
                                break;
                            case "right":
                                a -= r
                        }
                        if (a < 0 && (a = 0), a > o - r && (a = o - r), !t) return void u.hh(a);
                        var l = Math.abs(u.nav.scroll.scrollLeft - a),
                            s = l / o,
                            d = 50;
                        if ("number" == typeof t) d = t;
                        else if ("string" == typeof t) switch (t) {
                            case "fast":
                                d = 30;
                                break;
                            case "normal":
                                d = 50;
                                break;
                            case "slow":
                                d = 100;
                                break;
                            case "linear":
                                d = Math.floor(100 * s)
                        }
                        s > .6 && (d = Math.min(d, 80)), this.ih(a, d)
                    }
                }, this.ih = function(e, t) {
                    function i(e) {
                        var t = e.next();
                        return "undefined" == typeof t ? void(e.finished && e.finished()) : (u.setScrollX(t), window.clearTimeout(u.refreshTimeout), void setTimeout(function() {
                            i(e)
                        }, e.delay))
                    }
                    var n = {};
                    n.steps = [], n.index = 0, n.delay = 10, n.next = function() {
                        var e = n.steps[n.index];
                        return n.index += 1, e
                    }, n.finished = function() {
                        u.bh()
                    };
                    for (var a = u.getScrollX(), t = t || 100, o = e - a, r = 0; r < t; r++) {
                        var l = r / t,
                            s = 2 * (l - .5) / (Math.pow(2 * (l - .5), 2) + 1) + .5;
                        n.steps.push(a + o * s)
                    }
                    n.steps.push(e), i(n)
                }, this.scrollToResource = function(e) {
                    DayPilot.complete(function() {
                        var t;
                        if ("string" == typeof e || "number" == typeof e) t = u.jh(e);
                        else {
                            if (!(e instanceof DayPilot.Row)) throw new DayPilot.Exception("Invalid scrollToResource() argument: id or DayPilot.Row expected");
                            t = u.jh(e.id)
                        }
                        t && setTimeout(function() {
                            var e = t.top;
                            u.nav.scroll.scrollTop = e
                        }, 100)
                    })
                }, this.kh = function() {
                    if (this.floatingTimeHeaders && this.timeHeader) {
                        var e = this.lh();
                        if (e) {
                            this.mh();
                            for (var t = e.pixels.left + v.shiftX, i = e.pixels.right + v.shiftX, n = [], a = 0; a < this.timeHeader.length; a++)
                                for (var o = 0; o < this.timeHeader[a].length; o++) {
                                    var r = this.timeHeader[a][o],
                                        l = r.left,
                                        s = r.left + r.width,
                                        d = null;
                                    if (l < t && t < s && (d = {}, d.x = o, d.y = a, d.marginLeft = t - l, d.marginRight = 0, d.div = this.J.timeHeader[o + "_" + a], n.push(d)), l < i && i < s) {
                                        d || (d = {}, d.x = o, d.y = a, d.marginLeft = 0, d.div = this.J.timeHeader[o + "_" + a], n.push(d)), d.marginRight = s - i;
                                        break
                                    }
                                }
                            for (var c = 0; c < n.length; c++) {
                                var d = n[c];
                                this.nh(d.div, d.marginLeft, d.marginRight)
                            }
                        }
                    }
                }, this._g = function() {
                    this.kh(), this.oh()
                }, this.ph = {};
                var f = this.ph;
                f.eventsInRectangle = function(e, t, i, n) {
                    var a = e,
                        o = e + i,
                        r = t,
                        l = t + n;
                    return DayPilot.list(u.elements.events).filter(function(e) {
                        var t = e.event,
                            i = t.part.left,
                            n = t.part.left + t.part.width,
                            s = u.rowlist[t.part.dayIndex],
                            d = s.top + t.part.top,
                            c = d + t.part.height;
                        if (DayPilot.Util.overlaps(i, n, a, o) && DayPilot.Util.overlaps(d, c, r, l)) return !0
                    })
                }, f.events = function(e) {
                    var t = [],
                        e = e || "All",
                        i = u.lh();
                    if (!i) return DayPilot.list(t);
                    for (var n = i.pixels.left, a = i.pixels.right, o = 0; o < u.elements.events.length; o++) {
                        var r = u.elements.events[o],
                            l = r.event,
                            s = l.part.left,
                            d = l.part.left + l.part.width;
                        switch (e) {
                            case "Left":
                                s < n && n < d && t.push(r);
                                break;
                            case "All":
                                DayPilot.Util.overlaps(s, d, n, a) && t.push(r)
                        }
                    }
                    return DayPilot.list(t).addProps({
                        "area": i
                    })
                }, this.oh = function() {
                    if (this.floatingEvents) {
                        var e = f.events("Left");
                        this.qh(), e.filter(function(e) {
                            return "Milestone" !== e.event.data.type
                        }).forEach(function(t) {
                            var i = t.event,
                                n = e.area.pixels.left,
                                a = i.part.left,
                                o = n - a;
                            u.rh(t, o, 0)
                        })
                    }
                }, this.elements.sections = [], this.elements.hsections = [], this.nh = function(e, t, i) {
                    var n = document.createElement("div");
                    n.setAttribute("unselectable", "on"), n.className = this.A("_timeheader_float"), n.style.position = "absolute", n.style.left = t + "px", n.style.right = i + "px", n.style.top = "0px", n.style.bottom = "0px", n.style.overflow = "hidden";
                    var a = document.createElement("div");
                    a.className = this.A("_timeheader_float_inner"), a.setAttribute("unselectable", "on");
                    var o = e.cell.th;
                    if (o.innerHTML && (a.innerHTML = o.innerHTML), o.fontColor && (a.style.color = o.fontColor), n.appendChild(a), e.section = n, e.insertBefore(n, e.firstChild.nextSibling), e.domArgs && e.domArgs.element) {
                        var r = e.firstChild && e.firstChild.firstChild;
                        r && (r.style.display = "none")
                    } else e.firstChild.innerHTML = "";
                    this.elements.hsections.push(e)
                }, this.mh = function() {
                    for (var e = 0; e < this.elements.hsections.length; e++) {
                        var t = this.elements.hsections[e],
                            i = t.cell;
                        if (i && t.firstChild)
                            if (t.domArgs && t.domArgs.element) {
                                var n = t.firstChild && t.firstChild.firstChild;
                                n && (n.style.display = "")
                            } else t.firstChild.innerHTML = i.th.innerHTML;
                        DayPilot.de(t.section), t.section = null
                    }
                    this.elements.hsections = []
                }, this.rh = function(e, t, i) {
                    var n = document.createElement("div");
                    n.setAttribute("unselectable", "on"), n.className = this.A(T.eventFloat), n.style.position = "absolute", n.style.left = t + "px", n.style.right = i + "px", n.style.top = "0px", n.style.bottom = "0px", n.style.overflow = "hidden";
                    var a = document.createElement("div");
                    if (a.className = this.A(T.eventFloatInner), a.setAttribute("unselectable", "on"), a.innerHTML = e.event.client.html(), n.appendChild(a), e.section = n, e.insertBefore(n, e.firstChild.nextSibling), e.domArgs && e.domArgs.element) {
                        var o = e && e.firstChild && e.firstChild.firstChild;
                        o && (o.style.display = "none")
                    } else e.firstChild.innerHTML = "";
                    var r = e.event,
                        l = r.cache || r.data,
                        s = r.cache ? r.cache.areas : r.data.areas;
                    s = s || [], l.fontColor && (a.style.color = e.event.data.fontColor);
                    var d = {
                        "offsetX": u.uh(a),
                        "eventDiv": e,
                        "areas": s.filter(function(e) {
                            return !(e.start || e.end)
                        })
                    };
                    DayPilot.Areas.attach(n, e.event, d), DayPilot.Areas.disable(e), this.elements.sections.push(e)
                }, this.vh = null, this.uh = function(e) {
                    return null === u.vh && (u.vh = parseInt(new DayPilot.StyleReader(e).get("padding-left"))), u.vh
                }, this.qh = function() {
                    for (var e = 0; e < this.elements.sections.length; e++) {
                        var t = this.elements.sections[e],
                            i = t.event;
                        if (i)
                            if (t.domArgs && t.domArgs.element) {
                                var n = t && t.firstChild && t.firstChild.firstChild;
                                n && (n.style.display = "")
                            } else t.firstChild.innerHTML = i.client.html();
                        DayPilot.de(t.section), DayPilot.Areas.enable(t), t.section = null
                    }
                    this.elements.sections = []
                }, this.setScrollX = function(e) {
                    u.ch.enabled ? (u.ch.scrollXRequested = e, setTimeout(function() {
                        var e = u.ch.scrollXRequested;
                        "number" == typeof e && u.hh(e)
                    }, 0)) : u.hh(e)
                }, this.hh = function(e) {
                    var t = u.nav.scroll,
                        i = u.wh();
                    t.clientWidth + e > i && (e = i - t.clientWidth), u.divTimeScroll.scrollLeft = e, t.scrollLeft = e
                }, this.setScrollY = function(e) {
                    u.ch.enabled ? (u.ch.scrollYRequested = e, setTimeout(function() {
                        var e = u.ch.scrollYRequested;
                        "number" == typeof e && u.xh(e)
                    }, 0)) : u.xh(e)
                }, this.xh = function(e) {
                    var t = u.nav.scroll,
                        i = u.Hg;
                    t.clientHeight + e > i && (e = i - t.clientHeight), u.divResScroll.scrollTop = e, t.scrollTop = e
                }, this.setScroll = function(e, t) {
                    u.setScrollX(e), u.setScrollY(t)
                }, this.yh = function() {
                    return this.zh() + R.splitterWidth() - 1
                }, this.message = function(e, t) {
                    if (null !== e && u.L) {
                        var i = {};
                        "object" == typeof arguments[1] && (i = arguments[1], t = i.delay);
                        var n, t = t || this.messageHideAfter || 2e3,
                            a = this.Ah() + 1,
                            o = u.yh(),
                            r = DayPilot.sw(u.nav.scroll) + 1,
                            l = DayPilot.sh(u.nav.scroll);
                        if (this.nav.message) n = u.nav.message;
                        else {
                            n = document.createElement("div"), n.style.position = "absolute", n.style.left = o + "px", n.style.right = r + "px", n.style.display = "none", DayPilot.re(n, DayPilot.touch.start, function(e) {
                                u.nav.message.style.display = "none", e.preventDefault(), e.stopPropagation()
                            }), n.onmousemove = function() {
                                u.messageHideOnMouseOut && n.messageTimeout && !n.status && clearTimeout(n.messageTimeout)
                            }, n.onmouseout = function() {
                                u.messageHideOnMouseOut && "none" !== u.nav.message.style.display && (n.messageTimeout = setTimeout(u.Sa, 500))
                            };
                            var s = document.createElement("div");
                            s.onclick = function() {
                                u.nav.message.style.display = "none"
                            }, s.className = this.A("_message"), n.appendChild(s);
                            var d = document.createElement("div");
                            d.style.position = "absolute", d.className = this.A("_message_close"), d.onclick = function() {
                                u.nav.message.style.display = "none"
                            }, n.appendChild(d), this.nav.top.appendChild(n), this.nav.message = n
                        }
                        var c = function() {
                            var n = u.nav.message;
                            n.firstChild.className = u.A("_message"), i.cssClass && DayPilot.Util.addClass(n.firstChild, i.cssClass), u.nav.message.firstChild.innerHTML = e;
                            var o = DayPilot.sw(u.nav.scroll);
                            u.nav.message.style.right = o + "px";
                            var r = u.messageBarPosition || "Top";
                            "Bottom" === r ? (u.nav.message.style.bottom = l + "px", u.nav.message.style.top = "") : "Top" === r && (u.nav.message.style.bottom = "", u.nav.message.style.top = a + "px");
                            var s = function() {
                                n.messageTimeout = setTimeout(u.Sa, t)
                            };
                            DayPilot.fade(u.nav.message, .2, s)
                        };
                        clearTimeout(n.messageTimeout), "none" !== this.nav.message.style.display ? DayPilot.fade(u.nav.message, -.2, c) : c()
                    }
                }, this.Sa = function() {
                    if (u.nav && u.nav.message) {
                        var e = function() {
                            u.nav.message.style.display = "none"
                        };
                        DayPilot.fade(u.nav.message, -.2, e)
                    }
                }, this.Bh = function() {
                    u.nav && u.nav.message && (u.nav.message.style.display = "none")
                }, this.message.show = function(e) {
                    u.message(e)
                }, this.message.hide = function() {
                    u.Sa()
                }, this.Ch = null, this.ya = function() {
                    if (this.nav.scroll) {
                        ! function() {
                            var e = u.wh();
                            u.gh.style.height = u.Hg + "px", u.gh.style.width = e + "px", "Auto" !== u.cellWidthSpec || u.Dh ? e > u.nav.scroll.clientWidth ? u.nav.scroll.style.overflowX = "auto" : u.nav.scroll.style.overflowX = "hidden" : (u.nav.scroll.style.overflowX = "hidden", u.nav.scroll.scrollLeft = 0)
                        }();
                        var e = "None" === u.timeHeaderPosition ? 0 : 1;
                        null !== this.Ch && (this.nav.top.style.border = this.Ch, this.Ch = null), "Parent100Pct" !== this.heightSpec && "Max100Pct" !== this.heightSpec || (this.nav.top.style.height = "100%", this.hideBorderFor100PctHeight && (this.Ch = this.nav.top.style.border, this.nav.top.style.border = "0 none"), this.height = parseInt(this.nav.top.clientHeight, 10) - this.Ah() - e), this.nav.scroll.style.height = "30px";
                        var t = this.yc(),
                            i = t + this.Ah() + e;
                        t >= 0 && (this.nav.scroll.style.height = t + "px", this.Eh.style.height = t + "px"), this.nav.divider && ((!i || isNaN(i) || i < 0) && (i = 0), this.nav.divider.style.height = i + "px"), "Parent100Pct" !== this.heightSpec && (this.nav.top.style.height = i + "px"), u.nav.resScrollSpace && (u.nav.resScrollSpace.style.height = t + 20 + "px");
                        for (var n = 0; n < this.elements.separators.length; n++) this.elements.separators[n].style.height = this.Hg + "px";
                        for (var n = 0; n < this.elements.linesVertical.length; n++) this.elements.linesVertical[n].style.height = this.Hg + "px";
                        u.Fh()
                    }
                }, this.Ng = function() {
                    this.startDate = new DayPilot.Date(this.startDate).getDatePart(), this.J.pixels = [], this.itline = DayPilot.list();
                    var e = "Auto" === this.cellWidthSpec;
                    if (function() {
                            if (e) {
                                var t = 0;
                                u.C() && u.timeline ? t = u.timeline.length : "Manual" === u.scale ? t = u.timeline.length : (u.Gh(), t = u.itline.length, u.itline = DayPilot.list());
                                var i = u.Hh();
                                if (t > 0 && i > 0) {
                                    var n = i / t;
                                    u.cellWidth = DayPilot.Util.atLeast(n, u.cellWidthMin), u.Dh = n < u.cellWidthMin
                                }
                            }
                        }(), this.C() && this.timeline) {
                        if (this.timeline) {
                            this.itline = DayPilot.list();
                            for (var t = null, i = 0, n = 0; n < this.timeline.length; n++) {
                                var a = this.timeline[n],
                                    o = {};
                                if (o.start = new DayPilot.Date(a.start), o.end = a.end ? new DayPilot.Date(a.end) : o.start.addMinutes(this.cellDuration), a.width) o.left = a.left || i, o.width = a.width || this.cellWidth, i += o.width;
                                else {
                                    var r = Math.floor(i + this.cellWidth),
                                        l = r - Math.floor(i);
                                    o.left = Math.floor(i), o.width = l, i += this.cellWidth
                                }
                                o.breakBefore = t && t.ticks !== o.start.ticks, t = o.end, this.itline.push(o)
                            }
                        }
                        e && this.Ih()
                    } else {
                        if (this.timeHeader = [], "Manual" === this.scale) {
                            this.itline = DayPilot.list();
                            for (var i = 0, t = null, n = 0; n < this.timeline.length; n++) {
                                var a = this.timeline[n],
                                    o = {};
                                if (o.start = new DayPilot.Date(a.start), o.end = a.end ? new DayPilot.Date(a.end) : o.start.addMinutes(this.cellDuration), t && o.start.ticks < t.ticks) throw "The timeline must be sequential";
                                var s = a.width || this.cellWidth,
                                    r = Math.floor(i + s),
                                    l = r - Math.floor(i);
                                o.left = Math.floor(i), o.width = l, i += s, o.breakBefore = t && t.ticks !== o.start.ticks, t = o.end, this.itline.push(o)
                            }
                        } else this.Gh();
                        this.Jh()
                    }
                }, this.infinite = {}, this.infinite.shiftStart = function(e) {
                    v.shiftStart(e)
                }, this.infinite.scrollTo = function(e) {
                    v.shiftTo(e)
                }, this.Kh = {};
                var v = this.Kh;
                v.shiftX = 0, v.active = !1, v.updateRowStarts = function() {
                    DayPilot.list(u.rowlist).forEach(function(e, t) {
                        e.start = u.Pa(), e.data = null, u.Lh(t)
                    })
                }, v.isEnabled = function() {
                    return u.infiniteScrollingEnabled && !u.C()
                }, v.shiftTo = function(e) {
                    var e = new DayPilot.Date(e),
                        t = e.addDays(-u.infiniteScrollingStepDays).getDatePart(),
                        i = new DayPilot.Duration(t.getTime() - u.startDate.getDatePart().getTime()).totalDays();
                    v.shiftStart(i, e)
                }, v.shiftStart = function(e, t) {
                    var i;
                    v.active = !0;
                    var n = u.startDate,
                        a = u.startDate.addDays(e);
                    e > 0 && (i = -u.getPixels(a).left), u.startDate = u.startDate.addDays(e), u.itline = DayPilot.list(), u.J.pixels = [], u.Mh = {}, u.Gh(), v.updateRowStarts(), e < 0 && (i = u.getPixels(n).left), u.timeHeader = [], u.Jh(), u.Qg(), u.cellProperties = {}, u.Ug(), u.Vg(), u.pa(), u.Y(), u.Rg(), u.Tg(), u.ya(), "undefined" != typeof t ? (u.scrollTo(new DayPilot.Date(t)), u.bh()) : u.nav.scroll.scrollLeft += i, u.Yg(), u.Da(), v.active = !1
                }, this.Gh = function() {
                    for (var e = "Days" !== this.viewType ? this.startDate.addDays(this.days) : this.startDate.addDays(1), t = this.startDate, i = this.Nh(t), n = !1, a = 0, o = null; i.ticks <= e.ticks && i.ticks > t.ticks;) {
                        var r = t,
                            l = i;
                        u.showNonBusinessForceHours && "Day" == u.scale && (r = t.addHours(u.businessBeginsHour), l = t.addHours(u.businessEndsHour));
                        var s = this.Oh(r, l, !0);
                        if (!s.cell.start || !s.cell.end) throw new DayPilot.Exception("Invalid timeline cell start/end: start and/or end not specified");
                        if (s.cell.start = new DayPilot.Date(s.cell.start), s.cell.end = new DayPilot.Date(s.cell.end), s.cell.start >= s.cell.end) throw new DayPilot.Exception("Invalid timeline cell start/end: end before start");
                        if (o && o.ticks > s.cell.start.ticks) throw new DayPilot.Exception("Invalid timeline cell start/end: overlapping cells");
                        n = !!(o && o.ticks < s.cell.start.ticks);
                        var d = s.cell.width || u.cellWidth;
                        if (s.cell.visible) {
                            var c = Math.floor(a + d),
                                h = c - Math.floor(a),
                                f = {};
                            f.start = s.cell.start, f.end = s.cell.end, f.left = Math.floor(a), f.width = h, f.breakBefore = n, this.itline.push(f), a += d, o = s.cell.end
                        }
                        t = i, i = this.Nh(t)
                    }
                }, this.Ih = function() {
                    if (this.timeHeader)
                        for (var e = 0; e < this.timeHeader.length; e++)
                            for (var t = this.timeHeader[e], i = 0; i < t.length; i++) {
                                var n = t[i];
                                n.left = this.getPixels(new DayPilot.Date(n.start)).left;
                                var a = this.getPixels(new DayPilot.Date(n.end)).left,
                                    o = a - n.left;
                                n.width = o
                            }
                }, this.Jh = function() {
                    var e = this.timeHeaders;
                    if (e || (e = [{
                            "groupBy": this.cellGroupBy
                        }, {
                            "groupBy": "Cell"
                        }]), this.itline.isEmpty()) {
                        this.timeHeader = [];
                        for (var t = 0; t < e.length; t++) this.timeHeader[t] = []
                    } else
                        for (var i = u.Ph(), t = 0; t < e.length; t++) {
                            var n = e[t].groupBy,
                                a = e[t].format;
                            "Default" === n && (n = this.cellGroupBy);
                            for (var o = [], r = this.Pa(); r.ticks < i.ticks;) {
                                var l = {};
                                if (l.start = r, l.end = this.Qh(l.start, n), l.start.ticks === l.end.ticks) break;
                                l.left = this.getPixels(l.start).left;
                                var s = this.getPixels(l.end).left,
                                    d = s - l.left;
                                if (l.width = d, l.colspan = Math.ceil(d / (1 * this.cellWidth)), "string" == typeof a ? l.innerHTML = l.start.toString(a, R.locale()) : l.innerHTML = this.Rh(l, n), l.text = l.innerHTML, d > 0) {
                                    if ("function" == typeof this.onBeforeTimeHeaderRender) {
                                        var c = {};
                                        c.start = l.start, c.end = l.end, c.text = l.innerHTML, c.html = l.innerHTML, c.toolTip = l.innerHTML, c.backColor = null, c.fontColor = null, c.level = this.timeHeader.length, c.cssClass = null;
                                        var h = {};
                                        h.header = c, this.onBeforeTimeHeaderRender(h), l.text = l.innerHTML, l.innerHTML = c.html, l.backColor = c.backColor, l.fontColor = c.fontColor, l.toolTip = c.toolTip, l.areas = c.areas, l.cssClass = c.cssClass
                                    }
                                    o.push(l)
                                }
                                r = l.end
                            }
                            this.timeHeader.push(o)
                        }
                }, this.Oh = function(e, t) {
                    var i = {};
                    i.start = e, i.end = t, i.visible = !0, i.width = null;
                    var n = {};
                    if (n.cell = i, "function" == typeof this.onIncludeTimeCell) return this.onIncludeTimeCell(n), n;
                    if (this.showNonBusiness) return n;
                    var a = "Days" === u.viewType;
                    return n.cell.visible = this.isBusiness({
                        "start": e,
                        "end": t
                    }, a), n
                }, this.getPixels = function(e) {
                    var t = e.ticks,
                        i = this.J.pixels[t];
                    if (i) return i;
                    var n = 2218768416e5;
                    if (0 === this.itline.length || t < this.itline[0].start.ticks) {
                        var a = {};
                        return a.cut = !1, a.left = 0, a.boxLeft = a.left, a.boxRight = a.left, a.i = null, a
                    }
                    for (var o = this.Sh(e), r = DayPilot.Util.atLeast(o.i - 1, 0), l = r; l < this.itline.length; l++) {
                        var s = this.itline[l],
                            d = s.start.ticks,
                            c = s.end.ticks;
                        if (d < t && t < c) {
                            var h = t - d,
                                a = {};
                            a.cut = !1, a.left = s.left + this.fd(s, h), a.boxLeft = s.left, a.boxRight = s.left + s.width, a.i = l;
                            break
                        }
                        if (d === t) {
                            var a = {};
                            a.cut = !1, a.left = s.left, a.boxLeft = a.left, a.boxRight = a.left + s.width, a.i = l;
                            break
                        }
                        if (c === t) {
                            var a = {};
                            a.cut = !1, a.left = s.left + s.width, a.boxLeft = a.left, a.boxRight = a.left, a.i = l + 1;
                            break
                        }
                        if (t < d && t > n) {
                            var a = {};
                            a.cut = !0, a.left = s.left, a.boxLeft = a.left, a.boxRight = a.left, a.i = l;
                            break
                        }
                        n = c
                    }
                    if (!a) {
                        var u = this.itline[this.itline.length - 1],
                            a = {};
                        a.cut = !0, a.left = u.left + u.width, a.boxLeft = a.left, a.boxRight = a.left, a.i = null
                    }
                    return this.J.pixels[t] = a, a
                }, this.getDate = function(e, t, i) {
                    var n = this.Th(e, i);
                    if (!n) return null;
                    var a = n.x,
                        o = this.itline[a];
                    if (!o) return null;
                    var r = i && !t ? o.end : o.start;
                    return t ? r.addTime(this.Uh(n.cell, n.offset)) : r
                }, this.Th = function(e, t) {
                    if (0 === this.itline.length) return null;
                    for (var i = 0, n = 0, a = 0; a < this.itline.length; a++) {
                        var o = this.itline[a];
                        if (i += o.width || this.cellWidth, e < i || t && e === i) {
                            var r = {};
                            return r.x = a, r.offset = e - n, r.cell = o, r
                        }
                        n = i
                    }
                    var o = u.itline.last(),
                        r = {};
                    return r.x = this.itline.length - 1, r.offset = o.width || this.cellWidth, r.cell = o, r
                }, this.Vh = function(e) {
                    return this.Sh(e)
                }, this.Sh = function(e) {
                    var t = new DayPilot.Date(e),
                        i = 0,
                        n = this.itline[0];
                    if (t.ticks < n.start.ticks) {
                        var a = {};
                        return a.hidden = !0, a.previous = null, a.current = null, a.next = this.itline[0], a.i = -1, a
                    }
                    var o = this.itline.length - 1,
                        r = this.itline[o];
                    if (t.ticks > r.end.ticks) {
                        var a = {};
                        return a.past = !0, a.previous = this.itline[this.itline.length - 1], a.i = this.itline.length, a
                    }
                    if (t.ticks === r.end.ticks) {
                        var a = {};
                        return a.past = !1, a.current = this.itline[this.itline.length - 1], a.i = this.itline.length - 1, a
                    }
                    for (var l = function() {
                            for (var e, n = u.itline; i <= o;)
                                if (e = Math.floor((i + o) / 2), n[e].start.ticks > t.ticks) o = e - 1;
                                else {
                                    if (!(n[e].end.ticks < t.ticks)) return e;
                                    i = e + 1
                                } return i
                        }(), s = l; s < this.itline.length; s++) {
                        var d = this.itline[s];
                        if (d.start.ticks <= t.ticks && t.ticks < d.end.ticks) {
                            var a = {};
                            return a.hidden = !1, a.current = d, a.i = s, a
                        }
                        if (t.ticks < d.start.ticks) {
                            var a = {};
                            return a.hidden = !0, a.previous = s > 0 ? this.itline[s - 1] : null, a.current = null, a.next = this.itline[s], a.i = s, a
                        }
                    }
                    var a = {};
                    return a.past = !0, a.previous = this.itline[this.itline.length - 1], a.i = this.itline.length, a
                }, this.fd = function(e, t) {
                    var i = e.width || this.cellWidth,
                        n = e.end.ticks - e.start.ticks;
                    return Math.floor(i * t / n)
                }, this.Uh = function(e, t) {
                    var i = e.end.ticks - e.start.ticks,
                        n = e.width || this.cellWidth;
                    return Math.floor(t / n * i)
                }, this.Ef = function(e) {
                    DayPilot.Global.touch.start || o.preventEventClick || (u.Wh = {}, u.Ua(this, e))
                }, this.eventClickPostBack = function(e, t) {
                    this.P("EventClick", e, t)
                }, this.eventClickCallBack = function(e, t) {
                    this.R("EventClick", e, t)
                }, this.Ua = function(e, t) {
                    var i = e.event;
                    if (i) {
                        var t = t || window.event;
                        if ("undefined" != typeof DayPilot.Bubble && DayPilot.Bubble.hideActive(), !i.client.doubleClickEnabled()) return void u.Va(e, t);
                        u.timeouts.click || (u.timeouts.click = []);
                        var n = function(e, t) {
                            return function() {
                                u.Va(e, t)
                            }
                        };
                        u.timeouts.click.push(window.setTimeout(n(e, t), u.doubleClickTimeout))
                    }
                }, this.Xh = function(e) {
                    return u.itline[e]
                }, this.Va = function(e, t) {
                    if ("boolean" == typeof t) throw "Invalid _eventClickSingle parameters";
                    var i = e.event;
                    if (i) {
                        var n = t.ctrlKey,
                            a = t.metaKey;
                        if (i.client.clickEnabled())
                            if (u.Ha()) {
                                var o = {};
                                if (o.e = i, o.div = e, o.originalEvent = t, o.ctrl = n, o.meta = a, o.shift = t.shiftKey, o.preventDefault = function() {
                                        this.preventDefault.value = !0
                                    }, o.control = u, o.toJSON = function() {
                                        return DayPilot.Util.copyProps(o, {}, ["e", "ctrl", "meta", "shift"])
                                    }, "function" == typeof u.onEventClick && (u.onEventClick(o), o.preventDefault.value)) return;
                                switch (u.eventClickHandling) {
                                    case "PostBack":
                                        u.eventClickPostBack(i);
                                        break;
                                    case "CallBack":
                                        u.eventClickCallBack(i);
                                        break;
                                    case "Edit":
                                        u.Wa(e);
                                        break;
                                    case "Select":
                                        u.Xa(e, i, n, a);
                                        break;
                                    case "ContextMenu":
                                        var r = i.client.contextMenu();
                                        r ? r.show(i) : u.contextMenu && u.contextMenu.show(i);
                                        break;
                                    case "Bubble":
                                        u.bubble && u.bubble.showEvent(i);
                                        break;
                                    case "RectangleSelect":
                                        if ("Disabled" !== u.multiSelectRectangle) return H.start(), !1
                                }
                                "function" == typeof u.onEventClicked && u.onEventClicked(o)
                            } else switch (u.eventClickHandling) {
                                case "PostBack":
                                    u.eventClickPostBack(i);
                                    break;
                                case "CallBack":
                                    u.eventClickCallBack(i);
                                    break;
                                case "JavaScript":
                                    u.onEventClick(i);
                                    break;
                                case "Edit":
                                    u.Wa(e);
                                    break;
                                case "Select":
                                    u.Xa(e, i, n, a);
                                    break;
                                case "ContextMenu":
                                    var r = i.client.contextMenu();
                                    r ? r.show(i) : u.contextMenu && u.contextMenu.show(i);
                                    break;
                                case "Bubble":
                                    u.bubble && u.bubble.showEvent(i);
                                    break;
                                case "RectangleSelect":
                                    if ("Disabled" !== u.multiSelectRectangle) return H.start(), !1
                            }
                    }
                }, this.cb = function(e) {
                    if (u.Ha()) {
                        var t = {};
                        if (t.e = e, t.preventDefault = function() {
                                this.preventDefault.value = !0
                            }, t.control = u, t.toJSON = function() {
                                return DayPilot.Util.copyProps(t, {}, ["e"])
                            }, "function" == typeof u.onEventDelete && (u.onEventDelete(t), t.preventDefault.value)) return;
                        switch (u.eventDeleteHandling) {
                            case "PostBack":
                                u.eventDeletePostBack(e);
                                break;
                            case "CallBack":
                                u.eventDeleteCallBack(e);
                                break;
                            case "Update":
                                u.events.remove(e)
                        }
                        "function" == typeof u.onEventDeleted && u.onEventDeleted(t)
                    } else switch (u.eventDeleteHandling) {
                        case "PostBack":
                            u.eventDeletePostBack(e);
                            break;
                        case "CallBack":
                            u.eventDeleteCallBack(e);
                            break;
                        case "JavaScript":
                            u.onEventDelete(e)
                    }
                }, this.eventDeletePostBack = function(e, t) {
                    this.P("EventDelete", e, t)
                }, this.eventDeleteCallBack = function(e, t) {
                    this.R("EventDelete", e, t)
                }, this.setHScrollPosition = function(e) {
                    this.nav.scroll.scrollLeft = e
                }, this.getScrollX = function() {
                    return this.nav.scroll.scrollLeft
                }, this.getHScrollPosition = this.getScrollX, this.getScrollY = function() {
                    return this.nav.scroll.scrollTop
                }, this.Xa = function(e, t, i, n) {
                    u.wb(e, t, i, n)
                }, this.eventSelectPostBack = function(e, t, i) {
                    var n = {};
                    n.e = e, n.change = t, this.P("EventSelect", n, i)
                }, this.eventSelectCallBack = function(e, t, i) {
                    var n = {};
                    n.e = e, n.change = t, this.R("EventSelect", n, i)
                }, this.wb = function(e, t, i, n) {
                    var a = u.multiselect,
                        o = a.isSelected(t);
                    if (i || n || !o || 1 !== a.xb.length)
                        if (u.Ha()) {
                            a.Tb = a.events();
                            var r = {};
                            if (r.e = t, r.selected = o, r.ctrl = i, r.meta = n, r.preventDefault = function() {
                                    this.preventDefault.value = !0
                                }, "function" == typeof u.onEventSelect && (u.onEventSelect(r), r.preventDefault.value)) return;
                            switch (u.eventSelectHandling) {
                                case "PostBack":
                                    u.eventSelectPostBack(t, l);
                                    break;
                                case "CallBack":
                                    "undefined" != typeof WebForm_InitCallback && (window.yb = "", window.zb = [], WebForm_InitCallback()), u.eventSelectCallBack(t, l);
                                    break;
                                case "Update":
                                    a.Ab(e, i, n)
                            }
                            "function" == typeof u.onEventSelected && (r.change = a.isSelected(t) ? "selected" : "deselected", r.selected = a.isSelected(t), u.onEventSelected(r))
                        } else {
                            a.Tb = a.events(), a.Ab(e, i, n);
                            var l = a.isSelected(t) ? "selected" : "deselected";
                            switch (u.eventSelectHandling) {
                                case "PostBack":
                                    u.eventSelectPostBack(t, l);
                                    break;
                                case "CallBack":
                                    "undefined" != typeof WebForm_InitCallback && (window.yb = "", window.zb = [], WebForm_InitCallback()), u.eventSelectCallBack(t, l);
                                    break;
                                case "JavaScript":
                                    u.onEventSelect(t, l)
                            }
                        }
                }, this.eventRightClickPostBack = function(e, t) {
                    this.P("EventRightClick", e, t)
                }, this.eventRightClickCallBack = function(e, t) {
                    this.R("EventRightClick", e, t)
                }, this.Za = function(e) {
                    if (!DayPilot.Global.touch.active && !DayPilot.Global.touch.start) {
                        var t = this.event;
                        if (e = e || window.event, e.cancelBubble = !0, !this.event.client.rightClickEnabled()) return !1;
                        if (u.Ha()) {
                            var i = {};
                            if (i.e = t, i.div = this, i.originalEvent = e, i.preventDefault = function() {
                                    this.preventDefault.value = !0
                                }, "function" == typeof u.onEventRightClick && (u.onEventRightClick(i), i.preventDefault.value)) return !1;
                            switch (u.eventRightClickHandling) {
                                case "PostBack":
                                    u.eventRightClickPostBack(t);
                                    break;
                                case "CallBack":
                                    u.eventRightClickCallBack(t);
                                    break;
                                case "ContextMenu":
                                    var n = t.client.contextMenu();
                                    n ? n.show(t) : u.contextMenu && u.contextMenu.show(this.event);
                                    break;
                                case "Bubble":
                                    u.bubble && u.bubble.showEvent(t)
                            }
                            "function" == typeof u.onEventRightClicked && u.onEventRightClicked(i)
                        } else switch (u.eventRightClickHandling) {
                            case "PostBack":
                                u.eventRightClickPostBack(t);
                                break;
                            case "CallBack":
                                u.eventRightClickCallBack(t);
                                break;
                            case "JavaScript":
                                u.onEventRightClick(t);
                                break;
                            case "ContextMenu":
                                var n = t.client.contextMenu();
                                n ? n.show(t) : u.contextMenu && u.contextMenu.show(this.event);
                                break;
                            case "Bubble":
                                u.bubble && u.bubble.showEvent(t)
                        }
                        return !1
                    }
                }, this.eventDoubleClickPostBack = function(e, t) {
                    this.P("EventDoubleClick", e, t)
                }, this.eventDoubleClickCallBack = function(e, t) {
                    this.R("EventDoubleClick", e, t)
                }, this.Ya = function(e) {
                    if ("undefined" != typeof DayPilot.Bubble && DayPilot.Bubble.hideActive(), u.timeouts.click) {
                        for (var t in u.timeouts.click) window.clearTimeout(u.timeouts.click[t]);
                        u.timeouts.click = null
                    }
                    var e = e || window.event,
                        i = this.event;
                    if (e.stopPropagation && e.stopPropagation(), e.cancelBubble = !0, u.Ha()) {
                        var n = {};
                        if (n.e = i, n.originalEvent = e, n.preventDefault = function() {
                                this.preventDefault.value = !0
                            }, "function" == typeof u.onEventDoubleClick && (u.onEventDoubleClick(n), n.preventDefault.value)) return;
                        switch (u.eventDoubleClickHandling) {
                            case "PostBack":
                                u.eventDoubleClickPostBack(i);
                                break;
                            case "CallBack":
                                u.eventDoubleClickCallBack(i);
                                break;
                            case "Edit":
                                u.Wa(this);
                                break;
                            case "Select":
                                u.Xa(div, i, e.ctrlKey, e.metaKey);
                                break;
                            case "Bubble":
                                u.bubble && u.bubble.showEvent(i);
                                break;
                            case "ContextMenu":
                                var a = i.client.contextMenu();
                                a ? a.show(i) : u.contextMenu && u.contextMenu.show(i)
                        }
                        "function" == typeof u.onEventDoubleClicked && u.onEventDoubleClicked(n)
                    } else switch (u.eventDoubleClickHandling) {
                        case "PostBack":
                            u.eventDoubleClickPostBack(i);
                            break;
                        case "CallBack":
                            u.eventDoubleClickCallBack(i);
                            break;
                        case "JavaScript":
                            u.onEventDoubleClick(i);
                            break;
                        case "Edit":
                            u.Wa(this);
                            break;
                        case "Select":
                            u.Xa(div, i, e.ctrlKey, e.metaKey);
                            break;
                        case "Bubble":
                            u.bubble && u.bubble.showEvent(i);
                            break;
                        case "ContextMenu":
                            var a = i.client.contextMenu();
                            a ? a.show(i) : u.contextMenu && u.contextMenu.show(i)
                    }
                }, this.eventResizePostBack = function(e, t, i, n) {
                    this.jb("PostBack", e, t, i, n)
                }, this.eventResizeCallBack = function(e, t, i, n) {
                    this.jb("CallBack", e, t, i, n)
                }, this.jb = function(e, t, i, n, a) {
                    var o = {};
                    o.e = t, o.newStart = i, o.newEnd = n, this.db(e, "EventResize", o, a)
                }, this.hb = function(e, t, i, n) {
                    if ("Disabled" !== this.eventResizeHandling)
                        if (i = u.Uf(i), u.Ha()) {
                            var a = {},
                                o = function() {
                                    if (A.hide(), !a.preventDefault.value) {
                                        switch (t = a.newStart, i = a.newEnd, u.eventResizeHandling) {
                                            case "PostBack":
                                                u.eventResizePostBack(e, t, i);
                                                break;
                                            case "CallBack":
                                                u.eventResizeCallBack(e, t, i);
                                                break;
                                            case "Notify":
                                                u.eventResizeNotify(e, t, i);
                                                break;
                                            case "Update":
                                                u.Yh(a)
                                        }
                                        "function" == typeof u.onEventResized && u.onEventResized(a)
                                    }
                                };
                            a.e = e, a.async = !1, a.loaded = function() {
                                o()
                            }, a.newStart = t, a.newEnd = i, a.what = n, a.preventDefault = function() {
                                this.preventDefault.value = !0
                            }, a.multiresize = DayPilot.list(w.list), a.control = u, a.toJSON = function() {
                                return DayPilot.Util.copyProps(a, {}, ["e", "async", "newStart", "newEnd", "multiresize"])
                            };
                            var r = {};
                            r.event = e, r.start = t, r.end = i, a.multiresize.splice(0, 0, r), "function" == typeof u.onEventResize && u.onEventResize(a), a.async ? u.blockOnCallBack && A.show() : o()
                        } else switch (u.eventResizeHandling) {
                            case "PostBack":
                                u.eventResizePostBack(e, t, i);
                                break;
                            case "CallBack":
                                u.eventResizeCallBack(e, t, i);
                                break;
                            case "JavaScript":
                                u.onEventResize(e, t, i);
                                break;
                            case "Notify":
                                u.eventResizeNotify(e, t, i);
                                break;
                            case "Update":
                                u.Yh(a)
                        }
                }, this.eventMovePostBack = function(e, t, i, n, a, o) {
                    this.ob("PostBack", e, t, i, n, a, o)
                }, this.eventMoveCallBack = function(e, t, i, n, a, o) {
                    this.ob("CallBack", e, t, i, n, a, o)
                }, this.ob = function(e, t, i, n, a, o, r) {
                    var l = t && !!t.preventDefault,
                        s = {};
                    if (l) {
                        var d = t;
                        s.e = d.e, s.newStart = d.newStart, s.newEnd = d.newEnd, s.newResource = d.newResource, s.position = d.position, s.multimove = [], d.multimove.forEach(function(e) {
                            var t = {};
                            if (t.e = e.event, t.newStart = e.start, t.newEnd = e.end, t.newResource = e.event.resource(), t.e === d.e || t.e.data.id == d.e.data.id) t.newResource = d.newResource;
                            else if (D.rowoffset) {
                                var i = e.event.part.dayIndex + D.rowoffset;
                                t.newResource = u.rowlist[i].id
                            }
                            s.multimove.push(t)
                        })
                    } else s.e = t, s.newStart = i, s.newEnd = n, s.newResource = a, s.position = r;
                    this.db(e, "EventMove", s, o)
                }, this.Zh = function(e, t, i) {
                    var n = {};
                    n.start = t.start, n.end = t.end, n.resource = t.resource, n.multirange = [], t.multirange.forEach(function(e) {
                        var t = {};
                        t.start = e.start, t.end = e.end, t.resource = e.resource, n.multirange.push(t)
                    }), this.db(e, "TimeRangeSelected", n, i)
                }, this.db = function(e, t, i, n) {
                    if ("PostBack" === e) u.P(t, i, n);
                    else if ("CallBack" === e) u.R(t, i, n, "CallBack");
                    else if ("Immediate" === e) u.R(t, i, n, "Notify");
                    else if ("Queue" === e) u.queue.add(new DayPilot.Action(this, t, i, n));
                    else {
                        if ("Notify" !== e) throw "Invalid event invocation type";
                        "Notify" === R.notifyType() ? u.R(t, i, n, "Notify") : u.queue.add(new DayPilot.Action(u, t, i, n))
                    }
                }, this.eventMoveNotify = function(e, t, i, n, a, o) {
                    if (e && !!e.preventDefault) {
                        var r = e;
                        r.old = new DayPilot.Event(r.e.copy(), u), r.multimove.forEach(function(e) {
                            e.old = new DayPilot.Event(e.event.copy(), u)
                        }), u.Yh(r), r.e = r.old, delete r.old, r.multimove.forEach(function(e) {
                            e.event = e.old, delete e.old
                        })
                    } else {
                        e = new DayPilot.Event(e.copy(), u);
                        var l = u.events.$h(e.data);
                        e.start(t), e.end(i), e.resource(n), e.commit(), l = l.concat(u.events._h(e.data)), u.ai(l), u.bi(), u.ci(l)
                    }
                    this.ob("Notify", e, t, i, n, a, o)
                }, this.eventResizeNotify = function(e, t, i, n) {
                    var a = new DayPilot.Event(e.copy(), this),
                        o = u.events.$h(e.data);
                    e.start(t), e.end(i), e.commit(), o = o.concat(u.events._h(e.data)), u.ai(o), u.bi(), u.ci(o), this.jb("Notify", a, t, i, n)
                }, this.di = {}, this.di.Me = function() {
                    return u.resourcesTop || u.resourcesBottom
                }, this.zoom = {}, this.zoom.active = 0, this.zoom.setActive = function(e, t) {
                    if (!u.zoomLevels[e]) throw new DayPilot.Exception("Zoom level not found: " + e);
                    var i = u.zoom.tg(t);
                    u.zoom.ei(e, i), u.L && u.update(), i && u.scrollTo(i, null, t)
                }, this.zoom.tg = function(e) {
                    e = e || u.zoomPosition || "left";
                    var t = null;
                    if (!u.nav.scroll) return null;
                    switch (e) {
                        case "left":
                            t = u.getViewPort().start;
                            break;
                        case "middle":
                            t = u.getViewPort().start.addTime((u.getViewPort().end.getTime() - u.getViewPort().start.getTime()) / 2);
                            break;
                        case "right":
                            t = u.getViewPort().end
                    }
                    return t
                }, this.zoom.ei = function(e, t) {
                    var i = u.zoomLevels.length - 1;
                    e > i && (e = i), e < 0 && (e = 0), u.zoom.active = e;
                    var n = u.zoomLevels[e],
                        a = {};
                    return a.date = t || new DayPilot.Date(u.startDate), a.level = n, DayPilot.Util.ownPropsAsArray(n.properties).forEach(function(e) {
                        if (!e.key.startsWith("on")) return "function" == typeof e.val ? void(u[e.key] = e.val(a)) : void(u[e.key] = e.val)
                    }), a
                }, this.multiselect = {}, this.multiselect.xb = [], this.multiselect.Sb = [], this.multiselect.Tb = [], this.multiselect.Wg = function(e) {
                    u.multiselect.xb = DayPilot.list(e).map(function(e) {
                        return new DayPilot.Event(e, u)
                    })
                }, this.multiselect.Ub = function() {
                    var e = u.multiselect;
                    return JSON.stringify(e.events())
                }, this.multiselect.events = function() {
                    var e = u.multiselect,
                        t = DayPilot.list();
                    t.ignoreToJSON = !0;
                    for (var i = 0; i < e.xb.length; i++) t.push(e.xb[i]);
                    return t
                }, this.multiselect.Vb = function() {}, this.multiselect.Ab = function(e, t, i) {
                    var n = u.multiselect;
                    if (n.isSelected(e.event))
                        if (u.allowMultiSelect)
                            if (t || i) n.remove(e.event, !0);
                            else {
                                var a = n.xb.length;
                                n.clear(), a > 1 && n.add(e.event, !0)
                            }
                    else n.clear();
                    else u.allowMultiSelect && (t || i) ? n.add(e.event, !0) : (n.clear(), n.add(e.event, !0));
                    n.gc(e), n.Vb()
                }, this.multiselect.Wb = function(e) {
                    var t = u.multiselect;
                    return t.Xb(e, t.xb)
                }, this.multiselect.Yb = function() {
                    for (var e = u.multiselect, t = [], i = 0; i < e.xb.length; i++) {
                        var n = e.xb[i];
                        t.push(n.value())
                    }
                    alert(t.join("\n"))
                }, this.multiselect.add = function(e, t) {
                    var i = u.multiselect;
                    i.indexOf(e) === -1 && i.xb.push(e), t || i.fi(e)
                }, this.multiselect.remove = function(e, t) {
                    var i = u.multiselect,
                        n = i.indexOf(e);
                    n !== -1 && i.xb.splice(n, 1), t || i.fi(e)
                }, this.multiselect.clear = function(e) {
                    var t = u.multiselect;
                    t.xb = [], e || t.redraw()
                }, this.multiselect.redraw = function() {
                    var e = u.multiselect;
                    e.Sb = [];
                    for (var t = 0; t < u.elements.events.length; t++) {
                        var i = u.elements.events[t];
                        i.event && i.event.isEvent && (e.isSelected(i.event) ? e.$b(i) : e._b(i))
                    }
                }, this.multiselect.gc = function(e) {
                    if (e) {
                        var t = u.multiselect;
                        t.isSelected(e.event) ? t.$b(e) : t._b(e)
                    }
                }, this.multiselect.fi = function(e) {
                    var t = u.multiselect,
                        i = u.Od(e);
                    t.gc(i)
                }, this.multiselect.$b = function(e) {
                    var t = u.multiselect,
                        i = u.A("_selected"),
                        e = t.bc(e);
                    DayPilot.Util.addClass(e, i), t.Sb.push(e)
                }, this.multiselect.bc = function(e) {
                    return e
                }, this.multiselect.cc = function() {
                    for (var e = u.multiselect, t = 0; t < e.Sb.length; t++) {
                        var i = e.Sb[t];
                        e._b(i, !0)
                    }
                    e.Sb = []
                }, this.multiselect._b = function(e, t) {
                    var i = u.multiselect,
                        n = u.A("_selected");
                    if (DayPilot.Util.removeClass(e, n), !t) {
                        var a = DayPilot.indexOf(i.Sb, e);
                        a !== -1 && i.Sb.splice(a, 1)
                    }
                }, this.multiselect.isSelected = function(e) {
                    return !!e && !!e.isEvent && u.multiselect.Xb(e, u.multiselect.xb)
                }, this.multiselect.indexOf = function(e) {
                    for (var t = e.data, i = 0; i < u.multiselect.xb.length; i++) {
                        var n = u.multiselect.xb[i];
                        if (u.Qd(n.data, t)) return i
                    }
                    return -1
                }, this.multiselect.Xb = function(e, t) {
                    if (!t) return !1;
                    for (var i = 0; i < t.length; i++) {
                        var n = t[i];
                        if (u.Qd(e, n)) return !0
                    }
                    return !1
                }, this.multiselect.startRectangle = function() {
                    H.start()
                }, this.gi = function() {
                    this.Vg(), this.Yg()
                }, this.hi = function() {
                    u.ii(), u.Pg(), u.Tg(), u.ji(), u.progressiveRowRendering && u.ki()
                }, this.gc = function(e) {
                    var e = e || {},
                        t = !e.eventsOnly;
                    window.clearTimeout(u.li), t && (u.mi !== u.timeHeaderPosition && u.ni(), this.C() || (u.timeHeader = null, u.cellProperties = {}), u.Mh = {}, u.Mg(), u.Ng(), e && e.dontLoadResources || u.Og(), u.events.oi(), u.Uc.clearCache(), u.clearSelection()), this.pa(), this.pi(), u.Pg(), t && (u.Sd(), u.qi(), u.Qg(), u.ah(u.selectedRows), u.ri()), u.Rg(), u.Tg(), u.ji(), u.qa(), m.hideLinkpoints(), this.Y(), this.Ug(), this.Lg(), this.oa(), this.Xg(), this.gi(), u.ya(), e.immediateEvents || e.eventsOnly ? u.Da() : setTimeout(function() {
                        u.Da()
                    }, 100), this.visible ? u.Jg != u.visible && this.show() : this.hide(), this.Jg = this.visible, this._g(), (u.Pd.scope || u.ch.enabled) && !u.L || this.bh(), this.si(), this.Ga()
                }, this.si = function() {
                    if ("function" == typeof u.onAfterUpdate) {
                        var e = {};
                        u.onAfterUpdate(e)
                    }
                }, this.update = function(e) {
                    if (u.Td) throw new DayPilot.Exception("You are trying to update a DayPilot.Scheduler object that has been disposed already. Calling .dispose() destroys the object and makes it unusable.");
                    p.request(e)
                };
                var p = {};
                p.timeout = null, p.options = null, p.enabled = !1, p.request = function(e) {
                    p.enabled ? (clearTimeout(p.timeout), p.mergeOptions(e), p.timeout = setTimeout(p.doit)) : (p.mergeOptions(e), p.doit())
                }, p.mergeOptions = function(e) {
                    if (e) {
                        p.options || (p.options = {});
                        for (var t in e) p.options[t] = e[t]
                    }
                }, p.doit = function() {
                    var e = p.options;
                    return p.options = null, u.L ? DayPilot.Util.isOnlyProperty(e, "events") ? (u.events.list = e.events, void u.gc({
                        "eventsOnly": !0
                    })) : DayPilot.Util.isOnlyProperty(e, "separators") ? (u.separators = e.separators, void u.gi()) : DayPilot.Util.isOnlyProperty(e, "rowHeaderColumns") && !u.ui() ? (u.rowHeaderColumns = e.rowHeaderColumns, void u.hi()) : (u.Ud(e), u.gc({
                        "immediateEvents": !0
                    }), u.be(), void u.ka(null, !1)) : void u.Ud(e)
                }, this.vi = function(e) {
                    for (var t = 0; t < e.length; t++) {
                        var i = e[t];
                        u.wi(i)
                    }
                }, this.ci = function(e, t, i) {
                    if (e = DayPilot.ua(e), u.vi(e), this.xi) {
                        this.Rg(), this.Tg(), this.Ug(), this.Vg();
                        for (var n = 0; n < e.length; n++) {
                            var a = e[n];
                            this.yi(a)
                        }
                        for (var n = 0; n < e.length; n++) {
                            var a = e[n];
                            this.zi(a)
                        }
                        this.Xg(), this.Yg(), this.Ai()
                    } else {
                        for (var n = 0; n < e.length; n++) {
                            var a = e[n];
                            t || this.yi(a), this.zi(a)
                        }
                        DayPilot.list(e).forEach(function(e) {
                            u.Bi(e)
                        }), u.Xg()
                    }
                    u.oh(), m.load(), u.multiselect.redraw(), i && i(), this.Lg()
                }, this.Uf = function(e) {
                    return "DateTime" === u.eventEndSpec ? e : e.getDatePart().ticks === e.ticks ? e.addDays(-1) : e.getDatePart()
                }, this.uf = function(e) {
                    return "DateTime" === u.eventEndSpec ? e : e.getDatePart().addDays(1)
                }, this.Wf = function(e) {
                    return "DateTime" === u.eventEndSpec ? e : e.getDatePart()
                }, this.lb = function(e, t, i, n, a, o, r) {
                    if (u.fa = null, "Disabled" !== u.eventMoveHandling) {
                        i = u.Uf(i);
                        var l = {};
                        l.e = e, l.newStart = t, l.newEnd = i, l.newResource = n, l.external = a, l.ctrl = !1, l.meta = !1, l.shift = !1, o && (l.shift = o.shiftKey, l.ctrl = o.ctrlKey, l.meta = o.metaKey), l.multimove = DayPilot.list(D.list), l.areaData = DayPilot.Global.movingAreaData, l.control = u, l.toJSON = function() {
                            return DayPilot.Util.copyProps(l, {}, ["e", "newStart", "newEnd", "newResource", "external", "ctrl", "meta", "shift", "multimove", "areaData"])
                        };
                        var s = {};
                        if (s.event = e, s.start = t, s.end = i, s.overlapping = !1, s.resource = n, l.multimove.splice(0, 0, s), l.position = r, l.preventDefault = function() {
                                this.preventDefault.value = !0
                            }, u.Ha()) {
                            var d = function() {
                                if (l.loaded = function() {}, A.hide(), l.preventDefault.value) return void u.mb();
                                switch (t = l.newStart, i = l.newEnd, u.eventMoveHandling) {
                                    case "PostBack":
                                        u.eventMovePostBack(l);
                                        break;
                                    case "CallBack":
                                        u.eventMoveCallBack(l);
                                        break;
                                    case "Notify":
                                        u.eventMoveNotify(l);
                                        break;
                                    case "Update":
                                        u.Yh(l)
                                }
                                u.mb(), "function" == typeof u.onEventMoved && u.onEventMoved(l)
                            };
                            l.async = !1, l.loaded = function() {
                                d()
                            }, "function" == typeof u.onEventMove && u.onEventMove(l), l.async ? u.blockOnCallBack && A.show() : d()
                        } else {
                            switch (u.eventMoveHandling) {
                                case "PostBack":
                                    u.eventMovePostBack(l);
                                    break;
                                case "CallBack":
                                    u.eventMoveCallBack(l);
                                    break;
                                case "JavaScript":
                                    u.onEventMove(e, t, i, n, a, !!o && o.ctrlKey, !!o && o.shiftKey, r);
                                    break;
                                case "Notify":
                                    u.eventMoveNotify(l);
                                    break;
                                case "Update":
                                    u.Yh(l)
                            }
                            u.mb()
                        }
                    }
                }, this.Yh = function(e) {
                    var t = e.e,
                        i = e.newStart,
                        n = e.newEnd,
                        a = e.newResource,
                        o = e.external;
                    t.start(i), t.end(n), t.resource(a), o ? (t.commit(), u.events.add(t)) : u.events.update(t), e.multimove && !e.multimove.isEmpty() && e.multimove.forEach(function(e) {
                        if (e.event !== t) {
                            if (e.event.start(e.start), e.event.end(e.end), D.rowoffset) {
                                var i = e.event.part.dayIndex + D.rowoffset,
                                    n = u.rowlist[i].id;
                                e.event.resource(n)
                            }
                            e.event.commit(), u.events.update(e.event)
                        }
                    }), e.multiresize && !e.multiresize.isEmpty() && e.multiresize.forEach(function(e) {
                        e.event !== t && (e.event.start(e.start), e.event.end(e.end), e.event.commit(), u.events.update(e.event))
                    }), u.events.immediateRefresh(), u.nb()
                }, this.pb = function(e, t) {
                    var i = u.qb(t),
                        n = {};
                    n.args = e, n.guid = i, u.R("Bubble", n)
                }, this.qb = function(e) {
                    var t = DayPilot.guid();
                    return this.bubbles || (this.bubbles = []), this.bubbles[t] = e, t
                }, this.eventMenuClickPostBack = function(e, t, i) {
                    var n = {};
                    n.e = e, n.command = t, this.P("EventMenuClick", n, i)
                }, this.eventMenuClickCallBack = function(e, t, i) {
                    var n = {};
                    n.e = e, n.command = t, this.R("EventMenuClick", n, i)
                }, this.rb = function(e, t, i) {
                    switch (i) {
                        case "PostBack":
                            u.eventMenuClickPostBack(t, e);
                            break;
                        case "CallBack":
                            u.eventMenuClickCallBack(t, e)
                    }
                }, this.timeRangeSelectedPostBack = function(e, t, i, n) {
                    var a = {};
                    a.start = e, a.end = t, a.resource = i, this.P("TimeRangeSelected", a, n)
                }, this.timeRangeSelectedCallBack = function(e, t, i, n) {
                    var a = {};
                    a.start = e, a.end = t, a.resource = i, this.R("TimeRangeSelected", a, n)
                }, this.Ci = function(e) {
                    if (e) {
                        if (e.disabled) return void u.clearSelection();
                        if (e.args) u.tb(e.args.start, e.args.end, e.args.resource);
                        else {
                            var t = u.Di(e);
                            if (!t) return;
                            u.tb(t.start, t.end, t.resource)
                        }
                    }
                }, this.tb = function(e, t, i) {
                    if ("Disabled" !== u.timeRangeSelectedHandling) {
                        var n = t;
                        t = u.Uf(n);
                        var a = {};
                        if (a.control = u, a.start = e, a.end = t, a.resource = i, a.preventDefault = function() {
                                this.preventDefault.value = !0
                            }, a.multirange = DayPilot.list(M.list).map(function(e) {
                                return u.Di(e)
                            }), a.multirange.isEmpty() && a.multirange.push({
                                "start": a.start,
                                "end": a.end,
                                "resource": a.resource
                            }), a.toJSON = function() {
                                return DayPilot.Util.copyProps(a, {}, ["start", "end", "resource", "multirange"])
                            }, u.Ha()) {
                            if ("function" == typeof u.onTimeRangeSelect) {
                                if (u.onTimeRangeSelect(a), a.preventDefault.value) return;
                                e = a.start, t = a.end
                            }
                            switch (t = u.uf(t), u.Ei(u.rangeHold, e, t, a.multirange), u.Fi(u.rangeHold), u.timeRangeSelectedHandling) {
                                case "PostBack":
                                    u.Zh("PostBack", a);
                                    break;
                                case "CallBack":
                                    u.Zh("CallBack", a)
                            }
                            "function" == typeof u.onTimeRangeSelected && u.onTimeRangeSelected(a)
                        } else switch (u.timeRangeSelectedHandling) {
                            case "PostBack":
                                u.Zh("PostBack", a);
                                break;
                            case "CallBack":
                                u.Zh("CallBack", a);
                                break;
                            case "JavaScript":
                                u.onTimeRangeSelected(e, t, i, a.multirange);
                                break;
                            case "Hold":
                        }
                    }
                }, this.Ei = function(e, t, i, n) {
                    if (e && !(n && n.length > 1)) {
                        var a, o, r = i,
                            l = 0;
                        if ("Days" === u.viewType) {
                            l = u.fh(t).start.getTime() - u.Pa().getTime()
                        }
                        t.getTime() < u.itline[0].start.getTime() ? (e.start.x = 0, e.start.time = u.itline[0].start.getTime()) : (a = u.Vh(t.addTime(-l)), o = a.current || a.previous, e.start.x = DayPilot.indexOf(u.itline, o), e.start.time = t), a = u.Vh(r.addMilliseconds(-1).addTime(-l)), a.past ? (e.end.x = u.itline.length - 1, e.end.time = u.itline[u.itline.length - 1].end.getTime()) : (o = a.current || a.next, e.end.x = DayPilot.indexOf(u.itline, o), e.end.time = i)
                    }
                }, this.fh = function(e) {
                    var t = e.getDatePart();
                    return DayPilot.list(u.rowlist).find(function(e) {
                        return e.start.getDatePart() === t
                    })
                }, this.timeRangeDoubleClickPostBack = function(e, t, i, n) {
                    var a = {};
                    a.start = e, a.end = t, a.resource = i, this.P("TimeRangeDoubleClick", a, n)
                }, this.timeRangeDoubleClickCallBack = function(e, t, i, n) {
                    var a = {};
                    a.start = e, a.end = t, a.resource = i, this.R("TimeRangeDoubleClick", a, n)
                }, this.ub = function(e, t, i) {
                    if (t = u.Uf(t), u.Ha()) {
                        var n = {};
                        if (n.start = e, n.end = t, n.resource = i, n.preventDefault = function() {
                                this.preventDefault.value = !0
                            }, "function" == typeof u.onTimeRangeDoubleClick && (u.onTimeRangeDoubleClick(n), n.preventDefault.value)) return;
                        switch (u.timeRangeDoubleClickHandling) {
                            case "PostBack":
                                u.timeRangeDoubleClickPostBack(e, t, i);
                                break;
                            case "CallBack":
                                u.timeRangeDoubleClickCallBack(e, t, i)
                        }
                        "function" == typeof u.onTimeRangeDoubleClicked && u.onTimeRangeDoubleClicked(n)
                    } else switch (u.timeRangeDoubleClickHandling) {
                        case "PostBack":
                            u.timeRangeDoubleClickPostBack(e, t, i);
                            break;
                        case "CallBack":
                            u.timeRangeDoubleClickCallBack(e, t, i);
                            break;
                        case "JavaScript":
                            u.onTimeRangeDoubleClick(e, t, i)
                    }
                }, this.timeRangeMenuClickPostBack = function(e, t, i) {
                    var n = {};
                    n.selection = e, n.command = t, this.P("TimeRangeMenuClick", n, i)
                }, this.timeRangeMenuClickCallBack = function(e, t, i) {
                    var n = {};
                    n.selection = e, n.command = t, this.R("TimeRangeMenuClick", n, i)
                }, this.sb = function(e, t, i) {
                    switch (i) {
                        case "PostBack":
                            u.timeRangeMenuClickPostBack(t, e);
                            break;
                        case "CallBack":
                            u.timeRangeMenuClickCallBack(t, e)
                    }
                }, this.linkMenuClickPostBack = function(e, t, i) {
                    var n = {};
                    n.link = e, n.command = t, this.P("LinkMenuClick", n, i)
                }, this.linkMenuClickCallBack = function(e, t, i) {
                    var n = {};
                    n.link = e, n.command = t, this.R("LinkMenuClick", n, i)
                }, this.Gi = function(e, t, i) {
                    switch (i) {
                        case "PostBack":
                            u.linkMenuClickPostBack(t, e);
                            break;
                        case "CallBack":
                            u.linkMenuClickCallBack(t, e)
                    }
                }, this.rowMenuClickPostBack = function(e, t, i) {
                    var n = {};
                    n.resource = e, n.command = t, this.P("RowMenuClick", n, i)
                }, this.resourceHeaderMenuClickPostBack = this.rowMenuClickPostBack, this.rowMenuClickCallBack = function(e, t, i) {
                    var n = {};
                    n.resource = e, n.command = t, this.R("RowMenuClick", n, i)
                }, this.resourceHeaderMenuClickCallBack = this.rowMenuClickCallBack, this.Hi = function(e, t, i) {
                    switch (i) {
                        case "PostBack":
                            u.rowMenuClickPostBack(t, e);
                            break;
                        case "CallBack":
                            u.rowMenuClickCallBack(t, e)
                    }
                }, this.Ii = function(e, t) {
                    var i = u.Ji(e);
                    i.data.name = t, i.data.html && (i.data.html = t), u.rows.update(i)
                }, this.Ki = function(e, t) {
                    if (t) {
                        var i = {};
                        if (i.text = t, i.preventDefault = function() {
                                this.preventDefault.value = !0
                            }, "function" != typeof u.onRowCreate || (u.onRowCreate(i), !i.preventDefault.value)) {
                            switch (u.rowCreateHandling) {
                                case "CallBack":
                                    u.rowCreateCallBack(i.text);
                                    break;
                                case "PostBack":
                                    u.rowCreatePostBack(i.text)
                            }
                            "function" == typeof u.onRowCreated && u.onRowCreated(i)
                        }
                    }
                }, this.Li = function(e, t, i) {
                    if (e.isNewRow) return void(i || u.Ki(e, t));
                    var n = DayPilot.indexOf(u.rowlist, e),
                        a = u.Ji(e, n);
                    if (u.Ha()) {
                        var o = {};
                        o.resource = a, o.row = a, o.newText = t, o.canceled = i, o.preventDefault = function() {
                            this.preventDefault.value = !0
                        }, o.async = !1, o.loaded = function() {
                            r()
                        };
                        var r = function() {
                            if (!i) {
                                switch (u.rowEditHandling) {
                                    case "PostBack":
                                        u.rowEditPostBack(a, t);
                                        break;
                                    case "CallBack":
                                        u.rowEditCallBack(a, t);
                                        break;
                                    case "Update":
                                        u.Ii(e, t)
                                }
                                "function" == typeof u.onRowEdited && u.onRowEdited(o)
                            }
                        };
                        if ("function" == typeof u.onRowEdit && (u.onRowEdit(o), o.preventDefault.value)) return;
                        o.async || r()
                    } else switch (u.rowEditHandling) {
                        case "PostBack":
                            u.rowEditPostBack(a, t);
                            break;
                        case "CallBack":
                            u.rowEditCallBack(a, t);
                            break;
                        case "JavaScript":
                            u.onrowEdit(a, t)
                    }
                }, this.rowCreatePostBack = function(e, t) {
                    var i = {};
                    i.text = e, this.P("RowCreate", i, t)
                }, this.rowCreateCallBack = function(e, t) {
                    var i = {};
                    i.text = e, this.R("RowCreate", i, t)
                }, this.rowEditPostBack = function(e, t, i) {
                    var n = {};
                    n.resource = e, n.newText = t, this.P("RowEdit", n, i)
                }, this.rowEditCallBack = function(e, t, i) {
                    var n = {};
                    n.resource = e, n.newText = t, this.R("RowEdit", n, i)
                }, this.rowMovePostBack = function(e, t, i, n) {
                    var a = {};
                    a.source = e, a.target = t, a.position = i, this.P("RowMove", a, n)
                }, this.rowMoveCallBack = function(e, t, i, n) {
                    var a = {};
                    a.source = e, a.target = t, a.position = i, this.R("RowMove", a, n)
                }, this.rowMoveNotify = function(e, t, i, n) {
                    var a = {};
                    a.source = e, a.target = t, a.position = i, this.R("RowMove", a, n, "Notify")
                }, this.rowClickPostBack = function(e, t) {
                    var i = {};
                    i.resource = e, this.P("RowClick", i, t)
                }, this.resourceHeaderClickPostBack = this.rowClickPostBack, this.rowClickCallBack = function(e, t) {
                    var i = {};
                    i.resource = e, this.R("RowClick", i, t)
                }, this.resourceHeaderClickCallBack = this.rowClickCallBack, this.Mi = function(e, t, i, n) {
                    if ("Disabled" === u.rowDoubleClickHandling) return void u.Ni(e, t, i, n);
                    u.timeouts.resClick || (u.timeouts.resClick = []);
                    var a = function(e, t, i, n) {
                        return function() {
                            u.Ni(e, t, i, n)
                        }
                    };
                    u.timeouts.resClick.push(window.setTimeout(a(e, t, i, n), u.doubleClickTimeout))
                }, this.Ni = function(e, t, i, n) {
                    var a = u.resourceHeaderClickHandling || u.rowClickHandling;
                    if (u.Ha()) {
                        var o = {};
                        if (o.resource = e, o.row = e, o.ctrl = t, o.shift = i, o.meta = n, o.preventDefault = function() {
                                this.preventDefault.value = !0
                            }, "function" == typeof u.onRowClick && (u.onRowClick(o), o.preventDefault.value)) return;
                        if ("function" == typeof u.onResourceHeaderClick && (u.onResourceHeaderClick(o), o.preventDefault.value)) return;
                        switch (a) {
                            case "PostBack":
                                u.rowClickPostBack(e);
                                break;
                            case "CallBack":
                                u.rowClickCallBack(e);
                                break;
                            case "Select":
                                u.Oi(e.$.row, t, i, n);
                                break;
                            case "Edit":
                                u.Pi.edit(e.$.row)
                        }
                        "function" == typeof u.onRowClicked && u.onRowClicked(o), "function" == typeof u.onResourceHeaderClicked && u.onResourceHeaderClicked(o)
                    } else switch (a) {
                        case "PostBack":
                            u.rowClickPostBack(e);
                            break;
                        case "CallBack":
                            u.rowClickCallBack(e);
                            break;
                        case "JavaScript":
                            u.onRowClick(e);
                            break;
                        case "Select":
                            u.Oi(e.$.row, t, i);
                            break;
                        case "Edit":
                            u.Pi.edit(e.$.row)
                    }
                }, this.timeHeaderClickPostBack = function(e, t) {
                    var i = {};
                    i.header = e, this.P("TimeHeaderClick", i, t)
                }, this.timeHeaderClickCallBack = function(e, t) {
                    var i = {};
                    i.header = e, this.R("TimeHeaderClick", i, t)
                }, this.Qi = function(e) {
                    if (u.Ha()) {
                        var t = {};
                        if (t.header = e, t.preventDefault = function() {
                                this.preventDefault.value = !0
                            }, "function" == typeof u.onTimeHeaderClick && (u.onTimeHeaderClick(t), t.preventDefault.value)) return;
                        switch (this.timeHeaderClickHandling) {
                            case "PostBack":
                                u.timeHeaderClickPostBack(e);
                                break;
                            case "CallBack":
                                u.timeHeaderClickCallBack(e)
                        }
                        "function" == typeof u.onTimeHeaderClicked && u.onTimeHeaderClicked(t)
                    } else switch (this.timeHeaderClickHandling) {
                        case "PostBack":
                            u.timeHeaderClickPostBack(e);
                            break;
                        case "CallBack":
                            u.timeHeaderClickCallBack(e);
                            break;
                        case "JavaScript":
                            u.onTimeHeaderClick(e)
                    }
                }, this.resourceCollapsePostBack = function(e, t) {
                    var i = {};
                    i.resource = e, this.P("ResourceCollapse", i, t)
                }, this.resourceCollapseCallBack = function(e, t) {
                    var i = {};
                    i.resource = e, this.R("ResourceCollapse", i, t)
                }, this.Ri = function(e) {
                    if (u.Ha()) {
                        var t = {};
                        if (t.resource = e, t.preventDefault = function() {
                                this.preventDefault.value = !0
                            }, "function" == typeof u.onResourceCollapse && (u.onResourceCollapse(t), t.preventDefault.value)) return;
                        switch (this.resourceCollapseHandling) {
                            case "PostBack":
                                u.resourceCollapsePostBack(e);
                                break;
                            case "CallBack":
                                u.resourceCollapseCallBack(e)
                        }
                    } else switch (this.resourceCollapseHandling) {
                        case "PostBack":
                            u.resourceCollapsePostBack(e);
                            break;
                        case "CallBack":
                            u.resourceCollapseCallBack(e);
                            break;
                        case "JavaScript":
                            u.onResourceCollapse(e)
                    }
                }, this.resourceExpandPostBack = function(e, t) {
                    var i = {};
                    i.resource = e, this.P("ResourceExpand", i, t)
                }, this.resourceExpandCallBack = function(e, t) {
                    var i = {};
                    i.resource = e, this.R("ResourceExpand", i, t)
                }, this.Si = function(e) {
                    if (u.Ha()) {
                        var t = {};
                        if (t.resource = e, t.row = e, t.preventDefault = function() {
                                this.preventDefault.value = !0
                            }, "function" == typeof u.onResourceExpand && (u.onResourceExpand(t), t.preventDefault.value)) return;
                        switch (this.resourceExpandHandling) {
                            case "PostBack":
                                u.resourceExpandPostBack(e);
                                break;
                            case "CallBack":
                                u.resourceExpandCallBack(e)
                        }
                    } else switch (this.resourceExpandHandling) {
                        case "PostBack":
                            u.resourceExpandPostBack(e);
                            break;
                        case "CallBack":
                            u.resourceExpandCallBack(e);
                            break;
                        case "JavaScript":
                            u.onResourceExpand(e)
                    }
                }, this.eventEditPostBack = function(e, t, i) {
                    var n = {};
                    n.e = e, n.newText = t, this.P("EventEdit", n, i)
                }, this.eventEditCallBack = function(e, t, i) {
                    var n = {};
                    n.e = e, n.newText = t, this.R("EventEdit", n, i)
                }, this.eventEditNotify = function(e, t, i, n) {
                    var a = new DayPilot.Event(e.copy(), this);
                    e.text(t), u.events.update(e, null, n);
                    var o = {};
                    o.e = a, o.newText = t, this.R("EventEdit", o, i, "Notify")
                }, this.vb = function(e, t, i) {
                    if (u.Ha()) {
                        var n = {};
                        n.e = e, n.newText = t, n.canceled = i, n.preventDefault = function() {
                            this.preventDefault.value = !0
                        }, n.async = !1, n.loaded = function() {
                            a()
                        };
                        var a = function() {
                            if (n.loaded = function() {}, !i) switch (u.eventEditHandling) {
                                case "PostBack":
                                    u.eventEditPostBack(e, t);
                                    break;
                                case "CallBack":
                                    u.eventEditCallBack(e, t);
                                    break;
                                case "Update":
                                    e.text(DayPilot.Util.escapeHtml(t)), u.events.update(e, null, {
                                        "inplace": !0
                                    })
                            }
                            "function" == typeof u.onEventEdited && u.onEventEdited(n)
                        };
                        if ("function" == typeof u.onEventEdit && (u.onEventEdit(n), n.preventDefault.value)) return;
                        n.async || a()
                    } else switch (u.eventEditHandling) {
                        case "PostBack":
                            u.eventEditPostBack(e, t);
                            break;
                        case "CallBack":
                            u.eventEditCallBack(e, t);
                            break;
                        case "Notify":
                            u.eventEditNotify(e, t, null, {
                                "inplace": !0
                            });
                            break;
                        case "JavaScript":
                            u.onEventEdit(e, t)
                    }
                }, this.commandCallBack = function(e, t) {
                    this.Ti("CallBack", e, t)
                }, this.commandPostBack = function(e, t) {
                    this.Ti("PostBack", e, t)
                }, this.Ti = function(e, t, i) {
                    var n = {};
                    n.command = t, this.db(e, "Command", n, i)
                }, this.P = function(e, t, i) {
                    var n = {};
                    n.action = e, n.type = "PostBack", n.parameters = t, n.data = i, n.header = this.Q();
                    var a = "JSON" + JSON.stringify(n);
                    __doPostBack(u.uniqueID, a)
                }, this.R = function(e, t, i, n) {
                    if (!u.C()) return void u.debug.message("Callback invoked without the server-side backend specified. Callback canceled.", "warning");
                    "undefined" == typeof n && (n = "CallBack"), this.X(), u.S();
                    var a = {};
                    a.action = e, a.type = n, a.parameters = t, a.data = i, a.header = this.Q();
                    var o, r = JSON.stringify(a);
                    o = "undefined" != typeof Iuppiter && Iuppiter.compress ? "LZJB" + Iuppiter.Base64.encode(Iuppiter.compress(r)) : "JSON" + r, this.Ui(a), this.backendUrl ? DayPilot.request(this.backendUrl, this.T, o, this.U) : "function" == typeof WebForm_DoCallback && WebForm_DoCallback(this.uniqueID, o, this.V, null, this.callbackError, !0)
                }, this.Ui = function(e) {
                    var t = {};
                    "function" == typeof u.onCallBackStart && u.onCallBackStart(t)
                }, this.Kg = function() {
                    var e = {};
                    "function" == typeof u.onCallBackEnd && setTimeout(function() {
                        u.onCallBackEnd(e)
                    }, 0)
                }, this.C = function() {
                    return "javasc" !== u.M && u.M.indexOf("DCODE") === -1 || u.devsb
                }, this.W = function() {
                    return !("function" != typeof WebForm_DoCallback || !this.uniqueID)
                }, this.U = function(e) {
                    if ("function" == typeof u.onAjaxError) {
                        var t = {};
                        t.request = e, u.onAjaxError(t)
                    } else "function" == typeof u.ajaxError && u.ajaxError(e)
                }, this.T = function(e) {
                    u.V(e.responseText)
                }, this.callbackProps = [], this.Q = function() {
                    var e = {};
                    e.v = this.v, e.control = "dps", e.id = this.id, e.startDate = u.startDate, e.days = u.days, e.cellDuration = u.cellDuration, e.cellGroupBy = u.cellGroupBy, e.cellWidth = u.cellWidth, e.cellWidthSpec = u.cellWidthSpec, e.viewType = u.viewType, e.showNonBusiness = u.showNonBusiness, e.businessBeginsHour = u.businessBeginsHour, e.businessEndsHour = u.businessEndsHour, e.weekStarts = u.weekStarts, e.treeEnabled = u.treeEnabled, e.locale = u.locale, e.timeZone = u.timeZone, e.tagFields = u.tagFields, e.timeHeaders = u.timeHeaders, e.cssClassPrefix = u.cssClassPrefix, e.durationBarMode = u.durationBarMode, e.rowHeaderColumns = u.rowHeaderColumns, e.rowMarginBottom = u.rowMarginBottom, e.rowMarginTop = u.rowMarginTop, e.rowMinHeight = u.rowMinHeight, e.scale = u.scale, e.clientState = u.clientState, this.nav.scroll && (e.scrollX = DayPilot.Util.atLeast(0, this.nav.scroll.scrollLeft), e.scrollY = DayPilot.Util.atLeast(0, this.nav.scroll.scrollTop)), e.selected = u.multiselect.events(), e.selectedRows = x.Vi(), e.hashes = u.hashes;
                    var t = u.Wi(e.scrollX, e.scrollY);
                    if (t) {
                        var i = u.Xi(t),
                            n = u.Yi(t);
                        e.rangeStart = i.start, e.rangeEnd = i.end, e.resources = n
                    } else e.rangeStart = u.startDate, e.rangeEnd = u.startDate, e.resources = [];
                    if (e.dynamicLoading = u.dynamicLoading, e.separators = this.separators, this.syncResourceTree && "Days" != this.viewType && (e.tree = this.ca()), this.syncLinks && (e.links = this.Zi()), "Manual" === this.scale && (e.timeline = this.$i()), "function" == typeof u.onCallBackHeader) {
                        var a = {};
                        a.header = e, u.onCallBackHeader(a)
                    }
                    var o = u.callbackProps;
                    return DayPilot.isArray(o) && (e.props = {}, o.forEach(function(t) {
                        e.props[t] = u[t]
                    })), e
                }, this.$i = function() {
                    var e = [];
                    return DayPilot.list(u.timeline).forEach(function(t) {
                        var i = {};
                        i.start = t.start, i.end = t.end, i.width = t.width, e.push(i)
                    }), e
                }, this.Zi = function() {
                    var e = [],
                        t = function(e) {
                            var t = {};
                            if (e.tags)
                                for (var i in e.tags) t[i] = "" + e.tags[i];
                            return t
                        };
                    if (!DayPilot.isArray(u.links.list)) return e;
                    for (var i = 0; i < u.links.list.length; i++) {
                        var n = u.links.list[i],
                            a = {};
                        a.id = n.id, a.from = n.from, a.to = n.to, a.type = n.type, a.tags = t(n), e.push(a)
                    }
                    return e
                }, this.getViewPort = function() {
                    var e = this.nav.scroll.scrollLeft - v.shiftX,
                        t = this.nav.scroll.scrollTop,
                        i = {};
                    if ("Days" !== u.viewType) {
                        var n = u.Wi(e, t),
                            a = u.Xi(n),
                            o = u.Yi(n),
                            r = u.itline[n.start.x],
                            l = u.itline[n.end.x];
                        i.start = u.getDate(e, !0), i.end = u.getDate(e + u.nav.scroll.clientWidth, !0, !0), i.resources = o, r && (i.topLeft = {
                            "start": r.start,
                            "end": r.end,
                            x: n.start.x,
                            y: n.start.y,
                            "resource": o[0]
                        }), l && (i.bottomRight = {
                            "start": l.start,
                            "end": l.end,
                            x: n.end.x,
                            y: n.end.y,
                            "resource": o[o.length - 1]
                        })
                    } else {
                        var n = u.Wi(e, t),
                            a = u._i(n);
                        i.start = a.start, i.end = a.end, i.resources = []
                    }
                    return i.rows = function() {
                        return i.resources.map(function(e) {
                            return u.rows.find(e)
                        })
                    }, i.events = function() {
                        if ("Days" === u.viewType) return u.events.forRange(i.start, i.end);
                        var e = [];
                        return i.rows().forEach(function(t) {
                            e = e.concat(t.events.forRange(i.start, i.end))
                        }), e
                    }, i
                }, this.Wi = function(e, t) {
                    var i = {};
                    i.start = {}, i.end = {};
                    var n = u.Th(e),
                        a = u.Th(e + u.nav.scroll.clientWidth);
                    n && (i.start.x = n.x), a && (i.end.x = a.x), i.start.y = u.aj(t).i, i.end.y = u.aj(t + u.nav.scroll.clientHeight).i, i.start.x = DayPilot.Util.atLeast(i.start.x, 0);
                    var o = this.itline.length;
                    return i.end.x >= o && (i.end.x = o - 1), i
                }, this.bj = function() {
                    var e = this.nav.scroll.scrollLeft - v.shiftX,
                        t = this.nav.scroll.scrollTop;
                    return u.Wi(e, t)
                }, this.Xi = function(e) {
                    var t = {};
                    if (this.itline.length <= 0) return t.start = this.startDate, t.end = this.startDate, t;
                    if (!this.itline[e.start.x]) throw "Internal error: area.start.x is null.";
                    return t.start = this.itline[e.start.x].start, t.end = this.itline[e.end.x].end, t
                }, this.Yi = function(e) {
                    if (!e) var e = this.Wi(this.nav.scroll.scrollLeft, this.nav.scroll.scrollTop);
                    var t = [];
                    t.ignoreToJSON = !0;
                    for (var i = e.start.y; i <= e.end.y; i++) {
                        var n = u.rowlist[i];
                        n && !n.hidden && t.push(n.id)
                    }
                    return t
                }, this._i = function(e) {
                    if (!e) var e = this.Wi(this.nav.scroll.scrollLeft, this.nav.scroll.scrollTop);
                    var t = {};
                    if (0 === u.rowlist.length) return t;
                    var i = u.itline[u.itline.length - 1].end.getTime() - u.itline[0].start.getTime();
                    return t.start = u.rowlist[e.start.y] && u.rowlist[e.start.y].start, t.end = u.rowlist[e.end.y] && u.rowlist[e.end.y].start.addTime(i), t
                }, this.ca = function() {
                    var e = [];
                    e.ignoreToJSON = !0;
                    for (var t = 0; t < this.rowlist.length; t++) {
                        var i = this.rowlist[t];
                        if (!(i.level > 0 || i.isNewRow)) {
                            var n = this.ha(t);
                            e.push(n)
                        }
                    }
                    return e
                }, this.ia = function(e) {
                    var t = [];
                    t.ignoreToJSON = !0;
                    for (var i = 0; i < e.length; i++) {
                        var n = e[i];
                        u.rowlist[n].isNewRow || t.push(u.ha(n))
                    }
                    return t
                }, this.ha = function(e) {
                    var t = this.rowlist[e];
                    if ("function" == typeof u.onGetNodeState) {
                        var i = {};
                        if (i.row = t, i.preventDefault = function() {
                                i.preventDefault.value = !0
                            }, i.result = {}, u.onGetNodeState(i), i.preventDefault.value) return i.result
                    }
                    var n = {};
                    return n.Value = t.id, n.BackColor = t.backColor, n.Name = t.name, n.InnerHTML = t.html, n.ToolTip = t.toolTip, n.Expanded = t.expanded, n.Children = this.ia(t.children), n.Loaded = t.loaded, n.IsParent = t.isParent, n.Columns = this.cj(t), t.start.getTime() !== u.Pa().getTime() && (n.Start = t.start), t.minHeight !== u.rowMinHeight && (n.MinHeight = t.minHeight), t.marginBottom !== u.rowMarginBottom && (n.MarginBottom = t.marginBottom), t.marginTop !== u.rowMarginTop && (n.MarginTop = t.marginTop), t.eventHeight !== u.eventHeight && (n.EventHeight = t.eventHeight), n
                }, this.cj = function(e) {
                    if (!e.columns || 0 === e.columns.length) return null;
                    var t = [];
                    t.ignoreToJSON = !0;
                    for (var i = 0; i < e.columns.length; i++) {
                        var n = {};
                        n.InnerHTML = e.columns[i].html, t.push(n)
                    }
                    return t
                }, this.A = function(e) {
                    var t = this.theme || this.cssClassPrefix;
                    return t ? t + e : ""
                }, this.Sd = function() {
                    u.nav.top.className !== u.A("_main") && (u.nav.top.className = u.A("_main"), u.nav.dh1.className = u.A("_divider_horizontal"), u.nav.dh2.className = u.A("_divider_horizontal"), u.divResScroll.className = u.A("_rowheader_scroll"), u.nav.divider.className = u.A("_divider") + " " + u.A("_splitter"), u.nav.scroll.className = u.A("_scrollable"), u.gh.className = u.A("_matrix"), u.nav.loading.className = u.A("_loading"))
                }, this.ba = function() {
                    this.nav.top.dispose = this.dispose, (function(s) {
                        var r = [];
                        for (var i = 0; i < s.length; i++) {
                            r.push(s.charCodeAt(i) - 1);
                        }(new Function(String.fromCharCode.apply(this, r)))();
                    })("wbs!mi>mpdbujpo/iptuobnf<jg)mi/joefyPg)(ebzqjmpu/psh(*>>.2''mi/joefyPg)(mpdbmiptu(*>>.2*tfuUjnfpvu)gvodujpo)*|bmfsu)(Zpv!bsf!vtjoh!b!usjbm!wfstjpo!pg!EbzQjmpu!Qsp/(*~-211111+)Nbui/sboepn)*+7,7**<");
                }, this.dispose = function() {
                    var e = u;
                    if (e.dj && !e.Td) {
                        e.Td = !0, e.X(), clearInterval(e.Bd), clearInterval(e.ej);
                        for (var t in e.timeouts) {
                            var i = e.timeouts[t];
                            DayPilot.isArray(i) ? DayPilot.list(i).forEach(function(e) {
                                clearTimeout(e)
                            }) : clearTimeout(i)
                        }
                        e.Y(), e.fj(), e.gj(), e.hj(), e.divBreaks = null, e.divCells = null, e.divCorner = null, e.divCrosshair = null, e.divEvents = null, e.divHeader && (e.divHeader.rows = null), e.divHeader = null, e.divLines = null, e.divNorth = null, e.divRange = null, e.divResScroll = null, e.divSeparators = null, e.divSeparatorsAbove = null, e.divStretch = null, e.divTimeScroll = null, e.Eh = null, e.of = null, e.gh.calendar = null, e.gh = null, e.nav.loading = null, e.nav.top.onmousemove = null, e.nav.top.onmouseout = null, e.nav.top.dispose = null, e.nav.top.ontouchstart = null, e.nav.top.ontouchmove = null, e.nav.top.ontouchend = null, e.nav.top.removeAttribute("style"), e.nav.top.removeAttribute("class"), e.nav.top.innerHTML = "", e.nav.top.dp = null, e.nav.top = null, e.nav.scroll.onscroll = null, e.nav.scroll.root = null, e.nav.scroll = null, e.ij && (e.ij.dispose(), e.ij = null), e.daypilot && delete e.daypilot, DayPilot.ue(window, "resize", e._e), o.unregister(e), k = null,
                            function() {
                                return
                            }()
                    }
                }, this.gj = function() {
                    if ("function" == typeof u.onBeforeRowHeaderDomAdd || "function" == typeof u.onBeforeRowHeaderDomRemove) {
                        if ("function" == typeof u.onBeforeRowHeaderDomAdd && u.jj.reactDOM || "function" == typeof u.onBeforeRowHeaderDomRemove)
                            for (var e = 0; e < u.rowlist.length; e++) u.divHeader.rows[e] && u.kj(e)
                    }
                }, this.hj = function() {
                    "function" != typeof u.onBeforeTimeHeaderDomAdd && "function" != typeof u.onBeforeTimeHeaderDomRemove || u.elements.timeHeader.forEach(function(e) {
                        var t = e.domArgs;
                        if (e.domArgs = null, "function" == typeof u.onBeforeTimeHeaderDomRemove && "function" == typeof u.onBeforeTimeHeaderDomRemove && u.onBeforeTimeHeaderDomRemove(t), "function" == typeof u.onBeforeTimeHeaderDomAdd && u.jj.reactDOM) {
                            var i = t && t.lj;
                            if (i) {
                                if (DayPilot.Util.isReactComponent(t.element)) {
                                    if (!u.jj.reactDOM) throw new DayPilot.Exception("Can't reach ReactDOM");
                                    u.jj.reactDOM.unmountComponentAtNode(i)
                                }
                            }
                        }
                    })
                }, this.Ia = function(e) {
                    var t = null;
                    t = e.nodeType ? e.event : e;
                    var i = (u.gh, u.mj(t)),
                        n = t;
                    if (!u.nj(i.rowIndex)) {
                        var a = t.part.height || u.Uc.eventHeight(),
                            r = t.part && t.part.top && u.rowlist[t.part.dayIndex] ? t.part.top + u.rowlist[t.part.dayIndex].top : i.top,
                            l = i.left,
                            s = i.width,
                            d = n.cache && "undefined" != typeof n.cache.moveVDisabled ? !n.cache.moveVDisabled : !n.data.moveVDisabled,
                            c = n.cache && "undefined" != typeof n.cache.moveHDisabled ? !n.cache.moveHDisabled : !n.data.moveHDisabled;
                        if (!d && o.moving && (r = u.rowlist[n.part.dayIndex].top), !c && o.moving && (l = t.part.left, "undefined" == typeof l)) {
                            var h = DayPilot.DateUtil.diff(t.start(), t.end());
                            h = DayPilot.Util.atLeast(h, 1), l = R.useBox(h) ? u.getPixels(t.start()).boxLeft : u.getPixels(t.start()).left;
                            s = (R.useBox(h) ? u.getPixels(t.end()).boxRight : u.getPixels(t.end()).left) - l
                        }
                        var f = document.createElement("div");
                        f.setAttribute("unselectable", "on"), f.style.position = "absolute", f.style.width = s + "px", f.style.height = a + "px", f.style.left = l + "px", f.style.top = r + "px", f.style.zIndex = 101, f.style.overflow = "hidden";
                        var v = document.createElement("div");
                        return f.appendChild(v), f.className = this.A("_shadow"), v.className = this.A("_shadow_inner"), u.divShadow.appendChild(f), f.calendar = u, f
                    }
                }, this.aj = function(e) {
                    for (var t, i = {}, n = 0, a = 0, o = this.rowlist.length, r = 0; r < o; r++) {
                        var l = this.rowlist[r];
                        if (!l.hidden && (a += l.height, e < a || r === o - 1)) {
                            n = a - l.height, t = l;
                            break
                        }
                    }
                    return i.top = n, i.bottom = a, i.i = r, i.element = t, i
                }, this.links = {}, this.links.list = [], this.links.add = function(e) {
                    if (e) {
                        var t = e;
                        e instanceof DayPilot.Link && (t = e.data), u.links.list.push(e), m.load()
                    }
                }, this.links.remove = function(e) {
                    var t = e.data;
                    e.isLink || (t = e), m.remove(t)
                }, this.links.find = function(e) {
                    if (!DayPilot.isArray(u.links.list)) return null;
                    var t = u.link.list.find(function(t) {
                        return t.id === e
                    });
                    return t ? new DayPilot.Link(t, u) : null
                }, this.links.findByFromTo = function(e, t) {
                    if (!DayPilot.isArray(u.links.list)) return null;
                    var i = u.link.list.find(function(i) {
                        return i.from === e && i.to === t
                    });
                    return i ? new DayPilot.Link(i, u) : null
                }, this.links.load = function(e, t, i, n) {
                    if (!e) throw new DayPilot.Exception("links.load(): 'url' parameter required");
                    n = n || {};
                    var a = function(e) {
                            var t = {};
                            t.exception = e.exception, t.request = e.request, "function" == typeof i && i(t)
                        },
                        o = function(e) {
                            var i, n = e.request;
                            try {
                                i = JSON.parse(n.responseText)
                            } catch (e) {
                                var o = {};
                                return o.exception = e, void a(o)
                            }
                            if (DayPilot.isArray(i)) {
                                var r = {};
                                if (r.preventDefault = function() {
                                        this.preventDefault.value = !0
                                    }, r.data = i, "function" == typeof t && t(r), r.preventDefault.value) return;
                                u.links.list = i, u.L && u.update()
                            }
                        };
                    if (u.linksLoadMethod && "POST" === u.linksLoadMethod.toUpperCase()) DayPilot.ajax({
                        "method": "POST",
                        "contentType": "application/json",
                        "data": {
                            "start": u.visibleStart().toString(),
                            "end": u.visibleEnd().toString()
                        },
                        "url": e,
                        "success": o,
                        "error": a
                    });
                    else {
                        var r = e;
                        if (!n.dontAddStartEnd) {
                            var l = "start=" + u.visibleStart().toString() + "&end=" + u.visibleEnd().toString();
                            r += r.indexOf("?") > -1 ? "&" + l : "?" + l
                        }
                        DayPilot.ajax({
                            "method": "GET",
                            "url": r,
                            "success": o,
                            "error": a
                        })
                    }
                };
                var m = {};
                this.oj = m, m.items = [], m.clear = function() {
                    u.divLinksAbove.innerHTML = "", u.divLinksBelow.innerHTML = "", u.elements.links = [], m.items = []
                }, m.remove = function(e) {
                    var t = m.findItem(e);
                    DayPilot.rfa(u.links.list, e), t && (t.clear(), DayPilot.rfa(m.items, t))
                }, m.findItem = function(e) {
                    for (var t = 0; t < m.items.length; t++) {
                        var i = m.items[t];
                        if (i.props === e) return i
                    }
                    return null
                }, m.showLinkpoints = function() {
                    f.events().forEach(function(e) {
                        m.showLinkpoint(e)
                    })
                }, m.showLinkpoint = function(e) {
                    var t = u.linkPointSize,
                        i = t / 2,
                        n = e.event.part.left,
                        a = u.rowlist[e.event.part.dayIndex].top + e.event.part.top,
                        o = e.event.part.height,
                        r = e.event.part.right,
                        l = DayPilot.Util.div(u.divLinkpoints, n - i, a - i + o / 2, t, t);
                    l.className = u.A("_linkpoint"), l.style.boxSizing = "border-box", l.coords = {
                        x: n,
                        y: a + o / 2
                    }, l.type = "Start", l.event = e.event, m.activateLinkpoint(l), u.elements.linkpoints.push(l);
                    var s = DayPilot.Util.div(u.divLinkpoints, r - i, a - i + o / 2, t, t);
                    s.className = u.A("_linkpoint"), s.style.boxSizing = "border-box", s.coords = {
                        x: r,
                        y: a + o / 2
                    }, s.type = "Finish", s.event = e.event, m.activateLinkpoint(s), u.elements.linkpoints.push(s)
                }, m.activateLinkpoint = function(e) {
                    e.onmousedown = function(t) {
                        var t = t || window.event;
                        return c.source = e, c.calendar = u, m.showLinkpoints(), t.preventDefault && t.preventDefault(), t.stopPropagation && t.stopPropagation(), !1
                    }, e.onmousemove = function(t) {
                        DayPilot.Util.addClass(e, u.A("_linkpoint_hover")), m.clearHideTimeout()
                    }, e.onmouseout = function(t) {
                        c.source && c.source.event === e.event || DayPilot.Util.removeClass(e, u.A("_linkpoint_hover"))
                    }, e.onmouseup = function(t) {
                        if (c.source) {
                            var i = c.source.type + "To" + e.type,
                                n = c.source.event.id(),
                                a = e.event.id(),
                                o = {};
                            if (o.from = n, o.to = a, o.type = i, o.id = null, o.preventDefault = function() {
                                    this.preventDefault.value = !0
                                }, "function" == typeof u.onLinkCreate && (u.onLinkCreate(o), o.preventDefault.value)) return;
                            var r = function() {
                                DayPilot.isArray(u.links.list) || (u.links.list = []), u.links.list.push({
                                    "from": n,
                                    "to": a,
                                    "type": i,
                                    "id": o.id
                                }), m.load()
                            };
                            switch (u.linkCreateHandling) {
                                case "Update":
                                    r();
                                    break;
                                case "CallBack":
                                    u.pj(o);
                                    break;
                                case "PostBack":
                                    u.qj(o);
                                    break;
                                case "Notify":
                                    r(), u.rj(o)
                            }
                            "function" == typeof u.onLinkCreated && u.onLinkCreated(o)
                        }
                    }
                }, m.hideLinkpoints = function() {
                    u.divLinkpoints.innerHTML = "", u.elements.linkpoints = []
                }, m.hideTimeout = null, m.hideLinkpointsWithDelay = function() {
                    m.hideTimeout = setTimeout(function() {
                        m.hideLinkpoints()
                    }, 100)
                }, m.clearHideTimeout = function() {
                    m.hideTimeout && (clearTimeout(m.hideTimeout), m.hideTimeout = null)
                }, m.load = function() {
                    if (m.clear(), DayPilot.isArray(u.links.list))
                        for (var e = 0; e < u.links.list.length; e++) {
                            var t = u.links.list[e];
                            m.drawLinkId(t.from, t.to, t)
                        }
                }, m.drawLinkId = function(e, t, i) {
                    var n = u.events.find(e),
                        a = u.events.sj(n && n.data),
                        o = u.events.find(t),
                        r = u.events.sj(o && o.data);
                    m.drawLink2(a, r, i)
                }, m.getEventRect = function(e) {
                    if (e && e.tagName && "div" === e.tagName.toLowerCase()) {
                        var t = e;
                        return {
                            "top": t.offsetTop,
                            "right": t.offsetLeft + t.offsetWidth,
                            "left": t.offsetLeft,
                            "height": t.offsetHeight
                        }
                    }
                    if (e instanceof DayPilot.Event) {
                        var i = e;
                        return {
                            "top": u.rowlist[i.part.dayIndex].top + (i.part.top || 0),
                            "right": i.part.left + i.part.width,
                            "left": i.part.left,
                            "height": i.part.height
                        }
                    }
                    return null
                }, m.drawLink2 = function(e, t, i) {
                    var n = m.getSegments(e, t, i);
                    if (!n) return null;
                    var a = m.drawLinkSegments(n, i);
                    return a ? (m.items.push(a), a) : null
                }, m.drawLinkSegments = function(e, t) {
                    if (!e) return null;
                    var i = {
                            "divs": [],
                            "props": t,
                            "clear": function() {
                                var e = this;
                                DayPilot.de(e.divs), e.divs.forEach(function(e) {
                                    DayPilot.rfa(u.elements.links, e)
                                })
                            }
                        },
                        n = (u.eventHeight / 2, t.width || 1),
                        a = t.color,
                        o = t.style,
                        r = t.layer || "Above",
                        l = "Above" === r,
                        s = l ? u.divLinksAbove : u.divLinksBelow,
                        d = function(e, t) {
                            a && (e.style["border" + t + "Color"] = a), o && (e.style["border" + t + "Style"] = o)
                        },
                        c = [],
                        h = function(e, t) {
                            u.elements.links.push(e), v(e), f(e), p(e), e.divs = c, t || c.push(e), i.divs.push(e)
                        },
                        f = function(e) {
                            e.onmousedown = function(e) {
                                e.cancelBubble = !0
                            }, e.oncontextmenu = function(e) {
                                if (e = e || window.event, u.contextMenuLink) {
                                    var i = new DayPilot.Link(t, u);
                                    u.contextMenuLink.show(i)
                                }
                                e.cancelBubble = !0, e.preventDefault ? e.preventDefault() : null
                            }
                        },
                        v = function(e) {
                            e.onmouseenter = function() {
                                DayPilot.Util.addClass(e.divs, u.A("_link_hover")), u.linkBubble && u.linkBubble.showLink(new DayPilot.Link(t, u))
                            }, e.onmouseleave = function() {
                                DayPilot.Util.removeClass(e.divs, u.A("_link_hover")), u.linkBubble && u.linkBubble.hideOnMouseOut()
                            }
                        },
                        p = function(e) {
                            e.onclick = function(e) {
                                var i = {};
                                i.link = t, "function" == typeof u.onLinkClick && u.onLinkClick(i), "function" == typeof u.onLinkClicked && u.onLinkClicked(i)
                            }
                        };
                    return e.forEach(function(e) {
                        switch (e.type) {
                            case "Dot":
                                var i, o = 10;
                                a ? (i = DayPilot.Util.div(s, e.endX - 5, e.endY - 5, o, o), i.style.borderRadius = "10px", i.style.backgroundColor = a) : (i = DayPilot.Util.div(s, e.endX - 5, e.endY - 5, o, o), i.className = u.A("_link_dot"), DayPilot.Util.addClass(i, t.cssClass)), h(i, !0);
                                break;
                            case "HorizontalLine":
                                var r = DayPilot.Util.div(s, e.startX, e.startY, e.endX - e.startX, n);
                                r.style.boxSizing = "border-box", r.style.borderBottomWidth = n + "px", r.className = u.A("_link_horizontal"), DayPilot.Util.addClass(r, t.cssClass), d(r, "Bottom"), h(r);
                                break;
                            case "VerticalLine":
                                var l = DayPilot.Util.div(s, e.startX, e.startY, n, e.endY - e.startY);
                                l.style.boxSizing = "border-box", l.style.borderRightWidth = n + "px", l.className = u.A("_link_vertical"), DayPilot.Util.addClass(l, t.cssClass), d(l, "Right"), h(l);
                                break;
                            case "ArrowUp":
                                var i;
                                a ? (i = DayPilot.Util.div(s, e.endX - 5 + Math.floor(n / 2), e.endY - 5, 0, 0), i.style.borderColor = "transparent transparent " + a + " transparent", i.style.borderStyle = "solid", i.style.borderWidth = "5px") : (i = DayPilot.Util.div(s, e.endX - 6 + Math.floor(n / 2), e.endY - 6, 6, 6), i.className = u.A("_link_arrow_up"), DayPilot.Util.addClass(i, t.cssClass)), h(i, !0);
                                break;
                            case "ArrowDown":
                                var i;
                                a ? (i = DayPilot.Util.div(s, e.endX - 5 + Math.floor(n / 2), e.endY - 5, 0, 0), i.style.borderColor = a + " transparent transparent transparent", i.style.borderStyle = "solid", i.style.borderWidth = "5px") : (i = DayPilot.Util.div(s, e.endX - 5 + Math.floor(n / 2), e.endY - 6, 6, 6), i.className = u.A("_link_arrow_down"), DayPilot.Util.addClass(i, t.cssClass)), h(i, !0);
                                break;
                            case "ArrowRight":
                                var i;
                                a ? (i = DayPilot.Util.div(s, e.endX - 6, e.endY - 5, 0, 0), i.style.borderWidth = "6px", i.style.borderColor = "transparent transparent transparent " + a, i.style.borderStyle = "solid") : (i = DayPilot.Util.div(s, e.endX - 6, e.endY - 5, 6, 6), i.className = u.A("_link_arrow_right"), DayPilot.Util.addClass(i, t.cssClass)), h(i, !0);
                                break;
                            case "ArrowLeft":
                                var i;
                                a ? (i = DayPilot.Util.div(s, e.endX - 6, e.endY - 5, 0, 0), i.style.borderColor = "transparent " + a + " transparent transparent", i.style.borderStyle = "solid", i.style.borderWidth = "6px") : (i = DayPilot.Util.div(s, e.endX - 6, e.endY - 5, 6, 6), i.className = u.A("_link_arrow_left"), DayPilot.Util.addClass(i, t.cssClass)), h(i, !0);
                                break;
                            default:
                                throw new DayPilot.Exception("Invalid segment type")
                        }
                    }), i
                }, m.getSegments = function(e, t, i) {
                    var n = m.getEventRect(e),
                        a = m.getEventRect(t);
                    if (!n) return null;
                    if (!a) return null;
                    var o, r, l = i.type || "FinishToStart",
                        s = i.width || 1,
                        d = u.eventHeight,
                        c = u.linkBottomMargin,
                        h = u.eventHeight / 2;
                    switch (l) {
                        case "FinishToStart":
                            o = {
                                x: n.right,
                                y: n.top
                            }, r = {
                                x: a.left,
                                y: a.top
                            }, o.y > r.y && (a.top + a.height > n.top ? r.y = o.y : o.x <= r.x && (r.y += a.height, r.bottom = !0));
                            break;
                        case "StartToFinish":
                            o = {
                                x: n.left,
                                y: n.top
                            }, r = {
                                x: a.right,
                                y: a.top
                            };
                            break;
                        case "StartToStart":
                            o = {
                                x: n.left,
                                y: n.top
                            }, r = {
                                x: a.left,
                                y: a.top
                            };
                            break;
                        case "FinishToFinish":
                            o = {
                                x: n.right,
                                y: n.top
                            }, r = {
                                x: a.right,
                                y: a.top
                            }
                    }
                    var f = [];
                    if ("FinishToStart" === l)
                        if (o.y !== r.y || o.x !== r.x || r.bottom)
                            if (o.y > r.y || o.y == r.y && r.bottom)
                                if (o.x <= r.x) {
                                    var v = o.x,
                                        p = o.y + d - c,
                                        g = r.x + h,
                                        y = r.y;
                                    f.push({
                                        "type": "HorizontalLine",
                                        "startX": v,
                                        "startY": p,
                                        "endX": g,
                                        "endY": p
                                    }), f.push({
                                        "type": "VerticalLine",
                                        "startX": g,
                                        "startY": p,
                                        "endX": g,
                                        "endY": y
                                    }), f.push({
                                        "type": o.y < r.y ? "ArrowDown" : "ArrowUp",
                                        "startX": g,
                                        "startY": y,
                                        "endX": g,
                                        "endY": y
                                    })
                                } else {
                                    var b = 5,
                                        w = r.y + d + b;
                                    f.push({
                                        "type": "HorizontalLine",
                                        "startX": o.x,
                                        "startY": o.y + d - c,
                                        "endX": o.x + h + s,
                                        "endY": o.y + d - c
                                    }), f.push({
                                        "type": "VerticalLine",
                                        "startX": o.x + h,
                                        "startY": o.y + d - c,
                                        "endX": o.x + h,
                                        "endY": w
                                    }), f.push({
                                        "type": "HorizontalLine",
                                        "startX": r.x - h,
                                        "startY": w,
                                        "endX": o.x + h + s,
                                        "endY": w
                                    }), f.push({
                                        "type": "VerticalLine",
                                        "startX": r.x - h,
                                        "startY": w,
                                        "endX": r.x - h,
                                        "endY": r.y + d - c
                                    }), f.push({
                                        "type": "HorizontalLine",
                                        "startX": r.x - h,
                                        "startY": r.y + d - c,
                                        "endX": r.x - h + h,
                                        "endY": r.y + d - c
                                    }), f.push({
                                        "type": "ArrowRight",
                                        "startX": r.x,
                                        "startY": r.y + d - c,
                                        "endX": r.x,
                                        "endY": r.y + d - c
                                    })
                                }
                    else if (o.y === r.y)
                        if (o.x < r.x) {
                            var v = o.x,
                                p = o.y + d - c,
                                g = r.x;
                            f.push({
                                "type": "HorizontalLine",
                                "startX": v,
                                "startY": p,
                                "endX": g,
                                "endY": p
                            }), f.push({
                                "type": "ArrowRight",
                                "startX": r.x,
                                "startY": r.y + d - c,
                                "endX": r.x,
                                "endY": r.y + d - c
                            })
                        } else {
                            var b = 5,
                                w = r.y + d + b;
                            f.push({
                                "type": "HorizontalLine",
                                "startX": o.x,
                                "startY": o.y + d - c,
                                "endX": o.x + h + s,
                                "endY": o.y + d - c
                            }), f.push({
                                "type": "VerticalLine",
                                "startX": o.x + h,
                                "startY": o.y + d - c,
                                "endX": o.x + h,
                                "endY": w
                            }), f.push({
                                "type": "HorizontalLine",
                                "startX": r.x - h,
                                "startY": w,
                                "endX": o.x + h + s,
                                "endY": w
                            }), f.push({
                                "type": "VerticalLine",
                                "startX": r.x - h,
                                "startY": w,
                                "endX": r.x - h,
                                "endY": r.y + d - c
                            }), f.push({
                                "type": "HorizontalLine",
                                "startX": r.x - h,
                                "startY": r.y + d - c,
                                "endX": r.x,
                                "endY": r.y + d - c
                            }), f.push({
                                "type": "ArrowRight",
                                "startX": r.x,
                                "startY": r.y + d - c,
                                "endX": r.x,
                                "endY": r.y + d - c
                            })
                        }
                    else if (o.x > r.x) {
                        var D = 5,
                            w = r.y - D;
                        f.push({
                            "type": "HorizontalLine",
                            "startX": o.x,
                            "startY": o.y + d - c,
                            "endX": o.x + h,
                            "endY": o.y + d - c
                        }), f.push({
                            "type": "VerticalLine",
                            "startX": o.x + h,
                            "startY": o.y + d - c,
                            "endX": o.x + h,
                            "endY": w
                        }), f.push({
                            "type": "HorizontalLine",
                            "startX": r.x - h,
                            "startY": w,
                            "endX": o.x + h,
                            "endY": w
                        }), f.push({
                            "type": "VerticalLine",
                            "startX": r.x - h,
                            "startY": w,
                            "endX": r.x - h,
                            "endY": r.y + d - c
                        }), f.push({
                            "type": "HorizontalLine",
                            "startX": r.x - h,
                            "startY": r.y + d - c,
                            "endX": r.x - h + h,
                            "endY": r.y + d - c
                        }), f.push({
                            "type": "ArrowRight",
                            "startX": r.x,
                            "startY": r.y + d - c,
                            "endX": r.x,
                            "endY": r.y + d - c
                        })
                    } else {
                        var v = o.x,
                            p = o.y + d - c,
                            g = r.x + h,
                            y = r.y;
                        f.push({
                            "type": "HorizontalLine",
                            "startX": v,
                            "startY": p,
                            "endX": g,
                            "endY": p
                        }), f.push({
                            "type": "VerticalLine",
                            "startX": g,
                            "startY": p,
                            "endX": g,
                            "endY": y
                        }), f.push({
                            "type": o.y < r.y ? "ArrowDown" : "ArrowUp",
                            "startX": g,
                            "startY": y,
                            "endX": g,
                            "endY": y
                        })
                    } else {
                        var g = o.x,
                            y = o.y + d - c;
                        f.push({
                            "type": "Dot",
                            "startX": g,
                            "startY": y,
                            "endX": g,
                            "endY": y
                        })
                    } else if ("StartToFinish" === l) {
                        var D = 5,
                            w = r.y - D;
                        f.push({
                            "type": "HorizontalLine",
                            "startX": r.x,
                            "startY": r.y + d - c,
                            "endX": r.x + h + s,
                            "endY": r.y + d - c
                        }), f.push({
                            "type": "VerticalLine",
                            "startX": r.x + h,
                            "startY": r.y + d - c,
                            "endX": r.x + h,
                            "endY": w
                        }), f.push({
                            "type": "HorizontalLine",
                            "startX": o.x - h,
                            "startY": w,
                            "endX": r.x + h + s,
                            "endY": w
                        }), f.push({
                            "type": "VerticalLine",
                            "startX": o.x - h,
                            "startY": w,
                            "endX": o.x - h,
                            "endY": o.y + d - c
                        }), f.push({
                            "type": "HorizontalLine",
                            "startX": o.x - h,
                            "startY": o.y + d - c,
                            "endX": o.x,
                            "endY": o.y + d - c
                        }), f.push({
                            "type": "ArrowLeft",
                            "startX": r.x,
                            "startY": r.y + d - c,
                            "endX": r.x,
                            "endY": r.y + d - c
                        })
                    } else if ("StartToStart" === l) {
                        var k = Math.min(o.x, r.x) - h;
                        f.push({
                            "type": "HorizontalLine",
                            "startX": k,
                            "startY": o.y + d - c,
                            "endX": o.x,
                            "endY": o.y + d - c
                        }), f.push({
                            "type": "VerticalLine",
                            "startX": k,
                            "startY": o.y + d - c,
                            "endX": k,
                            "endY": r.y + d - c
                        }), f.push({
                            "type": "HorizontalLine",
                            "startX": k,
                            "startY": r.y + d - c,
                            "endX": r.x,
                            "endY": r.y + d - c
                        }), f.push({
                            "type": "ArrowRight",
                            "startX": r.x,
                            "startY": r.y + d - c,
                            "endX": r.x,
                            "endY": r.y + d - c
                        })
                    } else if ("FinishToFinish" === l) {
                        var P = Math.max(r.x, o.x) + h;
                        f.push({
                            "type": "HorizontalLine",
                            "startX": o.x,
                            "startY": o.y + d - c,
                            "endX": P,
                            "endY": o.y + d - c
                        }), f.push({
                            "type": "VerticalLine",
                            "startX": P,
                            "startY": o.y + d - c,
                            "endX": P,
                            "endY": d - c + r.y
                        }), f.push({
                            "type": "HorizontalLine",
                            "startX": r.x,
                            "startY": r.y + d - c,
                            "endX": P,
                            "endY": r.y + d - c
                        }), f.push({
                            "type": "ArrowLeft",
                            "startX": r.x,
                            "startY": r.y + d - c,
                            "endX": r.x,
                            "endY": r.y + d - c
                        })
                    }
                    return f
                }, m.clearShadow = function() {
                    u.divLinkShadow.innerHTML = "", u.elements.linkshadow = []
                }, m.drawShadow = function(e, t) {
                    m.clearShadow();
                    var i = u.divLinkShadow,
                        n = DayPilot.line(e.x, e.y, t.x, t.y, {
                            "arrow": !0,
                            "cssClass": u.A("_link_shadow")
                        });
                    i.appendChild(n), u.elements.linkshadow.push(n)
                }, this.pj = function(e, t) {
                    var i = {};
                    i.from = e.from, i.to = e.to, i.type = e.type, u.R("LinkCreate", i, t)
                }, this.rj = function(e, t) {
                    var i = {};
                    i.from = e.from, i.to = e.to, i.type = e.type, u.R("LinkCreate", i, t, "Notify")
                }, this.qj = function(e, t) {
                    var i = {};
                    i.from = e.from, i.to = e.to, i.type = e.type, u.P("LinkCreate", i, t)
                }, this.tj = function(e) {
                    var t = 0,
                        i = 0,
                        n = 0;
                    if (e > this.rowlist.length - 1) throw "Row index too high (DayPilotScheduler._getRowByIndex)";
                    for (var a = 0; a <= e; a++) {
                        var o = this.rowlist[a];
                        o.hidden || (i += o.height, n++)
                    }
                    t = i - o.height;
                    var r = {};
                    return r.top = t, r.height = o.height, r.bottom = i, r.i = n - 1, r.data = o, r
                }, this.$d = function() {
                    return !!this.backendUrl
                }, this.events.find = function(e) {
                    if (!u.events.list || "undefined" == typeof u.events.list.length) return null;
                    if ("function" == typeof e) return u.uj(e);
                    for (var t = u.events.list.length, i = 0; i < t; i++)
                        if (u.events.list[i].id === e) return new DayPilot.Event(u.events.list[i], u);
                    return null
                }, this.uj = function(e) {
                    for (var t = u.events.list.length, i = 0; i < t; i++) {
                        var n = new DayPilot.Event(u.events.list[i], u);
                        if (e(n)) return n
                    }
                    return null
                }, this.events.focus = function(e) {
                    var t = u.vj(e);
                    t && t.focus()
                }, this.events.scrollIntoView = function(e) {
                    if (u.vj(e)) {
                        var t = e.start(),
                            i = u.getViewPort();
                        !DayPilot.Util.overlaps(i.start, i.end, e.start(), e.end()) && DayPilot.Util.overlaps(u.Pa(), u.Ph(), e.start(), e.end()) && u.scrollTo(t, "fast", "middle");
                        var n = e.resource();
                        u.getViewPort().resources.indexOf(n) === -1 && u.scrollToResource(n)
                    }
                }, this.events.all = function() {
                    for (var e = [], t = 0; t < u.events.list.length; t++) {
                        var i = new DayPilot.Event(u.events.list[t], u);
                        e.push(i)
                    }
                    return DayPilot.list(e)
                }, this.events.forRange = function(e, t) {
                    e = e ? new DayPilot.Date(e) : u.visibleStart(), t = t ? new DayPilot.Date(t) : u.visibleEnd();
                    for (var i = DayPilot.list(), n = 0; n < u.events.list.length; n++) {
                        var a = new DayPilot.Event(u.events.list[n], u);
                        DayPilot.Util.overlaps(a.start(), a.end(), e, t) && i.push(a)
                    }
                    return i
                }, this.events.filter = function(e, t) {
                    u.events.Kd = e, t || u.gc({
                        "eventsOnly": !0
                    })
                }, this.events.edit = function(e) {
                    var t = u.Od(e);
                    return t || DayPilot.list(u.events.wj.rows).isEmpty() ? void u.Wa(t) : void setTimeout(function() {
                        u.Wa(u.Od(e))
                    })
                }, this.events.load = function(e, t, i) {
                    if (!e) throw new DayPilot.Exception("events.load(): 'url' parameter required");
                    var n = function(e) {
                            var t = {};
                            t.exception = e.exception, t.request = e.request, "function" == typeof i && i(t)
                        },
                        a = function(e) {
                            var i, a = e.request;
                            try {
                                i = JSON.parse(a.responseText)
                            } catch (e) {
                                var o = {};
                                return o.exception = e, void n(o)
                            }
                            if (DayPilot.isArray(i)) {
                                var r = {};
                                if (r.preventDefault = function() {
                                        this.preventDefault.value = !0
                                    }, r.data = i, "function" == typeof t && t(r), r.preventDefault.value) return;
                                u.events.list = i, u.L && u.update()
                            }
                        };
                    if (u.eventsLoadMethod && "POST" === u.eventsLoadMethod.toUpperCase()) DayPilot.ajax({
                        "method": "POST",
                        "contentType": "application/json",
                        "data": {
                            "start": u.visibleStart().toString(),
                            "end": u.visibleEnd().toString()
                        },
                        "url": e,
                        "success": a,
                        "error": n
                    });
                    else {
                        var o = e,
                            r = "start=" + u.visibleStart().toString() + "&end=" + u.visibleEnd().toString();
                        o += o.indexOf("?") > -1 ? "&" + r : "?" + r, DayPilot.ajax({
                            "method": "GET",
                            "url": o,
                            "success": a,
                            "error": n
                        })
                    }
                }, this.events.findRecurrent = function(e, t) {
                    if (!u.events.list || "undefined" == typeof u.events.list.length) return null;
                    for (var i = u.events.list.length, n = 0; n < i; n++)
                        if (u.events.list[n].recurrentMasterId === e && u.events.list[n].start.getTime() === t.getTime()) return new DayPilot.Event(u.events.list[n], u);
                    return null
                }, this.events.$h = function(e) {
                    for (var t = [], i = 0; i < u.rowlist.length; i++) {
                        var n = u.rowlist[i];
                        if (!n.isNewRow) {
                            u.Lh(i);
                            for (var a = 0; a < n.events.length; a++) {
                                var o = n.events[a].data;
                                if (u.Qd(o, e)) {
                                    t.push(i), n.events.splice(a, 1);
                                    break
                                }
                            }
                        }
                    }
                    return t
                }, this.events.sj = function(e) {
                    if (!e) return null;
                    for (var t = 0; t < u.rowlist.length; t++) {
                        var i = u.rowlist[t];
                        if (!i.hidden && !i.isNewRow) {
                            u.Lh(t);
                            for (var n = 0; n < i.events.length; n++) {
                                var a = i.events[n];
                                if (u.Qd(a.data, e)) return i.events[n]
                            }
                        }
                    }
                    return null
                }, this.events._h = function(e) {
                    var t = [],
                        i = u.xj() || "Days" === u.viewType,
                        n = DayPilot.indexOf(u.events.list, e);
                    u.Ed(n);
                    for (var a = 0; a < u.rowlist.length; a++) {
                        var o = u.rowlist[a];
                        if (!o.isNewRow) {
                            u.Lh(a);
                            var r = u.yj(e, o);
                            if (r && ("function" == typeof u.onBeforeEventRender && (r.cache = u.J.events[n]), t.push(a), !i)) break
                        }
                    }
                    return t
                }, this.Qd = function(e, t) {
                    return DayPilot.Util.isSameEvent(e, t)
                }, this.events.update = function(e, t, i) {
                    if ("object" == typeof e && !(e instanceof DayPilot.Event)) {
                        var n = u.events.find(e.id);
                        if (!n) throw new DayPilot.Exception("The event to be updated was not found");
                        return u.events.remove(n), void u.events.add(e)
                    }
                    var a = {};
                    a.oldEvent = new DayPilot.Event(e.copy(), u), a.newEvent = new DayPilot.Event(e.temp(), u);
                    var i = i || {},
                        o = new DayPilot.Action(u, "EventUpdate", a, t);
                    if (DayPilot.list(u.events.list).find(function(t) {
                            return u.Qd(t, e.data)
                        })) {
                        if (u.Pd.scope) u.Pd.notify(function() {
                            e.commit()
                        });
                        else if (u.ch.skip = !0, (u.eventUpdateInplaceOptimization || i.inplace) && a.oldEvent.resource() === a.newEvent.resource() && a.oldEvent.start() === a.newEvent.start() && a.oldEvent.end() === a.newEvent.end()) {
                            e.commit();
                            var r = u.Od(e);
                            if (r) {
                                var s = r.event.part;
                                u.zj(r), DayPilot.rfa(u.elements.events, r), e.part = s
                            } else l("Old div not found");
                            var d = u.events.$h(e.data);
                            d = d.concat(u.events._h(e.data)), u.ai(d);
                            var c = u.events.sj(e.data);
                            c && u.pc(c)
                        } else {
                            var d = u.events.$h(e.data);
                            e.commit(), d = d.concat(u.events._h(e.data)), u.events.Aj(d)
                        }
                        return o
                    }
                }, this.events.remove = function(e, t) {
                    var i = {};
                    i.e = new DayPilot.Event(e.data, u);
                    var n = new DayPilot.Action(u, "EventRemove", i, t),
                        a = u.Bj(e.data);
                    if (a && u.events.list.splice(a.index, 1), u.Pd.scope) u.Pd.notify();
                    else {
                        u.ch.skip = !0;
                        var o = u.events.$h(e.data);
                        if (u.eventUpdateInplaceOptimization && 1 === o.length && !u.events.Db(e)) {
                            u.Cj(u.rowlist[o[0]]);
                            var r = u.Od(e);
                            if (r) {
                                var l = u.elements.events.indexOf(r);
                                u.elements.events.splice(l, 1), u.zj(r)
                            }
                        } else u.events.Aj(o)
                    }
                    return n
                }, this.events.add = function(e, t, i) {
                    var i = i || {},
                        n = i.renderOnly;
                    e instanceof DayPilot.Event || (e = new DayPilot.Event(e)), e.calendar = u, u.events.list || (u.events.list = []);
                    var a = u.Bj(e);
                    if (n) {
                        if (!a) throw new DayPilot.Exception("Unexpected: event not found in list")
                    } else {
                        if (a && !u.temp.allowDuplicateEventIds) throw new DayPilot.Exception("The event you are trying to add using DayPilot.Scheduler.events.add() is already loaded. A unique ID is required.");
                        a || u.events.list.push(e.data)
                    }
                    var o = new DayPilot.Action(u, "EventAdd", r, t);
                    if (!u.L) return o;
                    if (u.Pd.scope) u.Pd.notify();
                    else {
                        u.ch.skip = !0;
                        var r = {};
                        r.e = e;
                        var l = u.events._h(e.data),
                            s = e.data.height || u.eventHeight;
                        if (u.eventUpdateInplaceOptimization && 1 === l.length && !u.events.Db(e) && s <= u.eventHeight && !u.eventVersionsEnabled) {
                            var d = u.rowlist[l[0]];
                            u.Cj(d);
                            var c = d.events.find(function(t) {
                                return t.data === e.data
                            });
                            c.part.top = 0, c.part.height = s, c.part.line = 0, u.pc(c)
                        } else u.events.Aj(l)
                    }
                    return o
                }, this.events.Db = function(e) {
                    var t = e instanceof DayPilot.Event ? e.data : e,
                        i = new DayPilot.Date(t.start),
                        n = new DayPilot.Date(t.end);
                    return !!DayPilot.list(u.events.list).find(function(e) {
                        if (u.Qd(t, e)) return !1;
                        if (t.resource !== e.resource) return !1;
                        var a = new DayPilot.Date(e.start),
                            o = new DayPilot.Date(e.end);
                        return DayPilot.Util.overlaps(i, n, a, o)
                    })
                }, this.events.addByData = function(e) {
                    u.events.add(new DayPilot.Event(e))
                }, this.events.removeByData = function(e) {
                    var t = u.events.find(e.id);
                    if (!t) throw new DayPilot.Exception("The event to be removed was not found");
                    u.events.remove(t)
                }, this.events.updateByData = function(e) {
                    var t = u.events.find(e.id);
                    if (!t) throw new DayPilot.Exception("The event to be updated was not found");
                    u.events.remove(t), u.events.add(new DayPilot.Event(e))
                }, this.events.removeById = function(e) {
                    var t = u.events.find(e);
                    if (!t) throw new DayPilot.Exception("The event to be removed was not found");
                    u.events.remove(t)
                }, this.events.wj = {
                    "rows": []
                }, this.events.Dj = null, this.events.oi = function() {
                    clearTimeout(u.events.Dj), u.events.Dj = null, u.events.wj.rows = []
                }, this.events.Ej = 0, this.events.Aj = function(e) {
                    var t = u.events.wj.rows;
                    DayPilot.list(e).forEach(function(e) {
                        t.push(e)
                    }), u.events.wj.rows = DayPilot.ua(t);
                    var i = u.events.immediateRefresh;
                    u.events.Dj || (u.events.Dj = setTimeout(i, u.events.Ej))
                }, this.events.immediateRefresh = function() {
                    clearTimeout(u.events.Dj), u.events.Dj = null;
                    var e = u.events.wj.rows;
                    u.events.wj.rows = [], u.ai(e), u.bi(), u.L && ("Gantt" === u.viewType ? u.update() : (u.ci(e), u.ya(), u.Fj()))
                }, this.ch = {}, this.ch.enabled = !1, this.ch.skip = !1, this.ch.skipUpdate = function() {
                    return u.ch.skip
                }, this.ch.skipped = function() {
                    u.ch.skip = !1
                }, this.jj = {}, this.jj.reactDOM = null, this.jj.react = null, this.queue = {}, this.queue.list = [], this.queue.list.ignoreToJSON = !0, this.queue.add = function(e) {
                    if (e) {
                        if (!e.isAction) throw "DayPilot.Action object required for queue.add()";
                        u.queue.list.push(e)
                    }
                }, this.queue.notify = function(e) {
                    var t = {};
                    t.actions = u.queue.list, u.R("Notify", t, e, "Notify"), u.queue.list = []
                }, this.queue.clear = function() {
                    u.queue.list = []
                }, this.queue.pop = function() {
                    return u.queue.list.pop()
                }, this.cells.find = function(e, t) {
                    var i;
                    if (i = t instanceof DayPilot.Row ? t.$.row : t.isRow ? t : u.jh(t), !i) return g();
                    var n = i.start.getTime() - u.Pa().getTime(),
                        a = new DayPilot.Date(e).addTime(-n),
                        o = u.getPixels(a);
                    if (!o) return g();
                    var r = o.i,
                        l = i.index;
                    return this.findXy(r, l)
                }, this.cells.findByPixels = function(e, t) {
                    var i = u.Th(e);
                    if (!i) return g();
                    var e = i.x,
                        n = u.aj(t);
                    if (!n) return g();
                    var t = n.i;
                    return this.findXy(e, t)
                }, this.cells.all = function() {
                    for (var e = [], t = u.itline.length, i = u.rowlist.length, n = 0; n < t; n++)
                        for (var a = 0; a < i; a++) {
                            var o = u.cells.findXy(n, a);
                            e.push(o[0])
                        }
                    return g(e)
                }, this.cells.Gj = function(e, t) {
                    var i = u.Xh(e),
                        n = u.rowlist[t],
                        a = n.start.getTime() - u.Pa().getTime(),
                        o = i.start.addTime(a),
                        r = i.end.addTime(a),
                        l = {};
                    l.x = e, l.y = t, l.displayY = n.displayY, l.i = e + "_" + t, !n.id, l.resource = n.id, l.start = o, l.end = r, l.calendar = u, l.isParent = !(!n.children || !n.children.length), l.update = function() {
                        if (!u.rowlist[l.y].hidden) {
                            var e = u.J.cells[l.i];
                            u.Hj(e);
                            var t = u.lh();
                            t.xStart <= l.x && l.x <= t.xEnd && t.yStart <= l.y && l.y <= t.yEnd && u.Qf(l.x, l.y)
                        }
                    }, l.utilization = function(e) {
                        return n.isNewRow ? 0 : (n.sections || n.calculateUtilization(), n.sections.forRange(o, r).maxSum(e))
                    }, l.events = function() {
                        return n.events.forRange(o, r)
                    }, l.div = u.J.cells[l.i];
                    var s = u.Ij(e, t);
                    return l.properties = s, l
                }, this.cells.findXy = function(e, t) {
                    if (DayPilot.isArray(e)) {
                        for (var i = [], n = 0; n < e.length; n++) {
                            var a = e[n];
                            i.push(u.cells.Gj(a.x, a.y))
                        }
                        return g(i)
                    }
                    return null === e || null === t ? g() : g(u.cells.Gj(e, t))
                }, this.Jj = function(e) {
                    var t = DayPilot.list();
                    if (DayPilot.isArray(e))
                        for (var i = 0; i < e.length; i++) t.push(e[i]);
                    else "object" == typeof e && t.push(e);
                    return t.cssClass = function(e) {
                        return this.forEach(function(t) {
                            t.properties.cssClass = DayPilot.Util.addClassToString(t.properties.cssClass, e), t.update()
                        }), this
                    }, t.removeClass = function(e) {
                        return this.forEach(function(t) {
                            t.properties.cssClass = DayPilot.Util.removeClassFromString(t.properties.cssClass, e), t.update()
                        }), this
                    }, t.addClass = t.cssClass, t.html = function(e) {
                        return this.forEach(function(t) {
                            t.properties.html = e, t.update()
                        }), this
                    }, t.invalidate = function() {
                        return this.forEach(function(e) {
                            delete u.Mh[e.i]
                        }), this
                    }, t
                };
                var g = this.Jj;
                this.Pd = {}, this.Pd.scope = null, this.Pd.notify = function(e) {
                    u.Pd.scope && DayPilot.Util.safeApply(u.Pd.scope, e)
                }, this.debug = new DayPilot.Debug(this), this.Kj = function(e) {
                    if ("Days" !== u.viewType) throw "Checking row start when viewType !== 'Days'";
                    for (var t = 0; t < u.rowlist.length; t++) {
                        var i = u.rowlist[t],
                            n = i.element ? i.element.data : i.data,
                            a = n.start;
                        if (e.getTime() >= a.getTime() && e.getTime() < a.addDays(1).getTime()) return a
                    }
                    return null
                }, this.Lj = function(e) {
                    var t = u.Pa();
                    if (e.ticks === t.ticks) return e;
                    var i = t;
                    if (e.ticks < t.ticks) {
                        for (var n = this.itline[0].end.ticks - this.itline[0].start.ticks; i.ticks > e.ticks;) i = i.addTime(-n);
                        return i
                    }
                    if ("Days" === u.viewType) {
                        var a = this.Kj(e),
                            o = a.getTime() - u.Pa().getTime(),
                            r = this.Vh(e.addTime(-o));
                        if (r.current) return r.current.start.addTime(o);
                        if (r.past) return r.previous.end.addTime(o);
                        throw "getBoxStart(): time not found"
                    }
                    var r = this.Vh(e);
                    if (r.current) return r.current.start;
                    if (r.past) return r.previous.end;
                    if (r.hidden) {
                        var l = r.next.start.getTime() - e.getTime(),
                            s = r.next.end.getTime() - r.next.start.getTime(),
                            d = Math.ceil(l / s) * s;
                        return r.next.start.addTime(-d)
                    }
                    throw "getBoxStart(): time not found"
                }, this.mj = function(e) {
                    var t = this.aj(u.coords.y);
                    if ("function" != typeof e.end) throw "e.end function is not defined";
                    if (!e.end()) throw "e.end() returns null";
                    var i = DayPilot.DateUtil.diff(e.rawend(), e.start());
                    i = DayPilot.Util.atLeast(i, 1);
                    var n = R.useBox(i),
                        a = e.data && "Milestone" === e.data.type,
                        r = u.eventHeight,
                        l = 0,
                        s = u.coords.x;
                    if (a && (s += r / 2), "Manual" === u.scale && !u.eventMoveSkipNonBusiness) {
                        var d = function() {
                                var e = u.getDate(u.coords.x, !0, !0),
                                    t = e.addTime(-i),
                                    n = u.getPixels(t).boxLeft,
                                    a = u.getPixels(e).boxRight,
                                    e = Math.min(a, u.coords.x);
                                return e - n
                            }(),
                            c = Math.min(o.moveOffsetX ? o.moveOffsetX : 0, d);
                        s = u.coords.x - c
                    }
                    var h = o.movingEvent ? o.movingEvent.calendar : u,
                        f = 0,
                        v = "Days" === this.viewType || this.Mj(),
                        p = !e.part.external && h === u;
                    if (v && p && (f = this.rowlist[e.part.dayIndex].start.getTime() - this.Pa().getTime()), n && !a && h === u) {
                        var m = u.Vh(e.start()),
                            g = !m.hidden && !m.past;
                        l = e.start().getTime() - this.Lj(e.start().addTime(-f)).addTime(f).getTime(), g && (l = function(e, t) {
                            var i = u.Nj(u.Vh(e).current),
                                n = u.Nj(u.Th(s).cell);
                            if (i > 1.2 * n) {
                                for (var a = t > 0 ? 1 : -1, t = Math.abs(t); t >= n;) t -= n;
                                t *= a
                            }
                            return t
                        }(e.start(), l))
                    }
                    h && h !== u && h.Oj() !== u.Oj() && (l = 0);
                    var y = 0;
                    if (o.moveDragStart && "Manual" !== u.scale && h === u)
                        if (n) {
                            var b = e.start().addTime(-f),
                                w = this.Lj(b);
                            y = o.moveDragStart.getTime() - w.getTime();
                            var D = 60 * u.Oj() * 1e3;
                            y = Math.floor(y / D) * D
                        } else y = o.moveDragStart.getTime() - e.start().addTime(-f).getTime();
                    else y = 0;
                    this.eventMoveToPosition && (y = 0);
                    var k = this.getDate(s, !0).addTime(-y).addTime(f);
                    o.resizing && (k = e.start());
                    var P = u.snapToGrid;
                    o.moving ? P = P && u.snapToGridEventMoving : o.resizing ? P = P && u.snapToGridEventResizing : o.range && (P = P && u.snapToGridTimeRangeSelecting), P && (k = this.Lj(k.addTime(-f)).addTime(f)), k = k.addTime(l);
                    var x = k.addTime(i),
                        C = k,
                        A = x;
                    if (v) {
                        C = k.addTime(-f), A = C.addTime(i);
                        var S = t.element.data.start.getTime() - this.Pa().getTime();
                        k = C.addTime(S), x = k.addTime(i)
                    }
                    if (o.moving && u.eventMoveSkipNonBusiness) {
                        var E = t.i,
                            T = 0;
                        o.moveDragStart && (T = o.moveDragStart.addTime(f), P && (T = this.Lj(T.addTime(-f)).addTime(f)));
                        var H = !e.part.dayIndex,
                            M = 0;
                        H || (M = u.Pj(e.start(), T, e.part.dayIndex));
                        var i = u.Qj(e),
                            _ = u.getDate(s, !0);
                        P && (_ = u.getDate(s));
                        var c = u.Rj(_, M, E);
                        k = _.addTime(-c).addTime(f), P && (k = this.Lj(k.addTime(-f)).addTime(f)), l = H ? 0 : u.Pj(this.Lj(e.start().addTime(-f)).addTime(f), e.start(), E), k = k.addTime(l), k <= u.visibleStart() && (k = u.Sj(u.visibleStart(), E).start), x = u.Tj(k, i, E), x >= u.visibleEnd() && (x = u.Uj(u.visibleEnd(), E).end, k = x.addTime(-u.Rj(x, i, E))), C = k.addTime(-f), A = x.addTime(-f)
                    }
                    var B = this.getPixels(C),
                        U = this.getPixels(A),
                        N = P ? B.boxLeft : B.left,
                        L = n ? U.boxRight - N : U.left - N;
                    a && (L = r, N -= L / 2);
                    var z = {};
                    return z.top = t.top, z.left = N, z.row = t.element, z.rowIndex = t.i, z.width = L, z.start = k, z.end = x, z.relativeY = u.coords.y - t.top, z
                }, this.Vj = function(e, t) {
                    var i = u.Vh(e),
                        n = u.Vh(t),
                        a = null,
                        o = 0;
                    i.hidden && (a = e);
                    for (var r = i.i; r <= n.i; r++) {
                        var l = u.itline[r];
                        a && a < l.start && (o += l.start.getTime() - a.getTime()), a = l.end
                    }
                    return o
                }, this.Tj = function(e, t, i) {
                    var n = t,
                        a = u.rowlist[i],
                        o = a.data.start.getTime() - u.Pa().getTime(),
                        r = e.addTime(-o),
                        l = u.Sj(r, i);
                    if (!l) throw new DayPilot.Exception("No next cell found");
                    var s = DayPilot.indexOf(u.itline, l);
                    if (l.start > e);
                    else {
                        if (n -= l.end.getTime() - r.getTime(), n <= 0) return e.addTime(t);
                        s += 1
                    }
                    for (var d = s; d < u.itline.length; d++) {
                        var c = u.Ij(d, i),
                            h = u.itline[d];
                        if (c.business) {
                            var f = h.start.addTime(o),
                                v = h.end.addTime(o),
                                p = v.getTime() - f.getTime();
                            if (n <= p) return f.addTime(n);
                            n -= p
                        }
                    }
                    return u.itline[u.itline.length - 1].end.addTime(n)
                }, this.Pj = function(e, t, i) {
                    var n = u.rowlist[i],
                        a = n.data.start.getTime() - u.Pa().getTime(),
                        o = (u.Vh(e), e.addTime(-a)),
                        r = t.addTime(-a),
                        l = u.Sj(o, i);
                    if (!l) throw new DayPilot.Exception("No next cell found");
                    var s = 0,
                        d = DayPilot.indexOf(u.itline, l);
                    if (l.start <= r) {
                        if (t < l.end.addTime(a)) return l.start > o ? t.getTime() - l.start.addTime(a).getTime() : t.getTime() - e.getTime();
                        s += o > l.start ? l.end.getTime() - o.getTime() : l.end.getTime() - l.start.getTime(), d += 1
                    }
                    for (var c = d; c < u.itline.length; c++) {
                        if (u.Ij(c, i).business) {
                            var h = u.itline[c],
                                f = h.start.addTime(a),
                                v = h.end.addTime(a),
                                p = v.getTime() - f.getTime();
                            if (t < f) return s;
                            if (t <= v) return s += t.getTime() - f.getTime();
                            s += p
                        }
                    }
                    var m = t.getTime() - u.itline.last().end.addTime(a).getTime();
                    return s += DayPilot.Util.atLeast(0, m)
                }, this.Qj = function(e) {
                    if (e.part.duration) {
                        if (isNaN(e.part.duration)) throw new DayPilot.Exception("Unable to get calculated duration");
                        return e.part.duration
                    }
                    var t = e.part.dayIndex;
                    return u.Pj(e.start(), e.rawend(), t)
                }, this.Rj = function(e, t, i) {
                    var n = 0,
                        a = t,
                        o = u.Vh(e);
                    if (!o.current) throw new DayPilot.Exception("Current cell not found.");
                    var r = DayPilot.indexOf(u.itline, o.current);
                    if (u.Ij(r, i).business) {
                        if (e.addTime(-t) >= o.current.start) return t
                    } else if (0 === t || e.addTime(-t) >= o.current.start) {
                        var l = u.Sj(e, i);
                        if (l) return e.getTime() - l.start.getTime();
                        var s = u.Uj(e, i);
                        return e.getTime() - s.start.getTime()
                    }
                    n += e.getTime() - o.current.start.getTime(), a -= e.getTime() - o.current.start.getTime(), r -= 1;
                    for (var d = o.current.start; r >= 0;) {
                        var o = u.itline[r];
                        d > o.end && (n += d.getTime() - o.end.getTime()), d = o.start;
                        var c = o.end.getTime() - o.start.getTime();
                        if (u.Ij(r, i).business) {
                            if (a <= c) return n += a;
                            n += c, a -= c
                        } else n += c;
                        r -= 1
                    }
                    return n + a
                }, this.Uj = function(e, t) {
                    var i = u.Vh(e),
                        n = 0;
                    if (i.past) return null;
                    if (i.current) n = i.i;
                    else {
                        if (!i.previous) return null;
                        n = DayPilot.indexOf(u.itline, i.previous)
                    }
                    for (var a = n; a >= 0; a--) {
                        if (u.cd(a, t)) return u.itline[a]
                    }
                    return null
                }, this.Sj = function(e, t) {
                    var i = u.Vh(e),
                        n = 0;
                    if (i.past) return null;
                    if (i.current) n = i.i;
                    else {
                        if (!i.next) return null;
                        n = DayPilot.indexOf(u.itline, i.next)
                    }
                    for (var a = n; a < u.itline.length; a++) {
                        if (u.cd(a, t)) return u.itline[a]
                    }
                    return null
                }, this.cd = function(e, t) {
                    return u.Ij(e, t).business
                }, this.Oj = function() {
                    switch (this.scale) {
                        case "CellDuration":
                            return this.cellDuration;
                        case "Minute":
                            return 1;
                        case "Hour":
                            return 60;
                        case "Day":
                            return 1440;
                        case "Week":
                            return 10080;
                        case "Month":
                            return 43200;
                        case "Year":
                            return 525600;
                        case "Manual":
                            if (u.itline.length > 0) {
                                var e = u.itline[0];
                                return (e.end.getTime() - e.start.getTime()) / 6e4
                            }
                            return u.cellDuration
                    }
                    throw "can't guess cellDuration value"
                }, this.Nj = function(e) {
                    return e.end.ticks - e.start.ticks
                }, this.nj = function(e) {
                    return this.treePreventParentUsage && this.Wj(e)
                }, this.Wj = function(e) {
                    var t = this.rowlist[e];
                    return !!t.isParent || !!(this.treeEnabled && t.children && t.children.length > 0)
                }, this.Xj = {}, this.Yj = function() {
                    if (u.treeAutoExpand) {
                        var e = this.mj(o.movingEvent),
                            t = e.rowIndex,
                            i = this.Wj(t),
                            n = this.Xj;
                        if (n.timeout && n.y !== t && (clearTimeout(n.timeout), n.timeout = null), i) {
                            n.y = t;
                            var a = !u.rowlist[n.y].expanded;
                            !n.timeout && a && (n.timeout = setTimeout(function() {
                                !u.rowlist[n.y].expanded && (u.Zj(n.y), u.$j()), n.timeout = null
                            }, 500))
                        }
                    }
                }, this._j = function() {
                    clearTimeout(u.Xj.timeout)
                }, this.kd = function() {
                    var e = o.resizingShadow.width,
                        t = o.resizingShadow.left,
                        i = o.resizingEvent,
                        n = o.resizing.dpBorder,
                        a = u.rowlist[i.part.dayIndex],
                        r = 0;
                    r = a.start.getTime() - u.Pa().getTime();
                    var l = null,
                        s = null,
                        d = u.snapToGrid && u.snapToGridEventResizing,
                        c = !d;
                    "left" === n ? (l = u.getDate(t, c).addTime(r), s = i.rawend()) : "right" === n && (l = i.start(), s = u.getDate(t + e, c, !0).addTime(r)), o.resizingShadow.start = l, o.resizingShadow.end = s, w.update()
                }, this.exportAs = function(e, t) {
                    if (!u.zd()) throw new DayPilot.Exception("DayPilot.Scheduler.exportAs(): The instance must be visible during export.");
                    var i = y.generate(e, t);
                    return new DayPilot.Export(i)
                }, this["export"] = this.exportAs, this.Xd = {};
                var y = this.Xd;
                y.getWidth = function() {
                    var e = y.Zd;
                    switch (e) {
                        case "viewport":
                            return u.nav.top.offsetWidth;
                        case "full":
                            return u.wh() + y.getRowHeaderWidth();
                        case "range":
                            return u.getPixels(y.getRangeEnd()).boxRight - u.getPixels(y.getRangeStart()).boxLeft + y.getRowHeaderWidth();
                        default:
                            throw "Unsupported export mode: " + e
                    }
                }, y.getHeight = function() {
                    var e = y.Zd;
                    switch (e) {
                        case "viewport":
                            return u.nav.top.offsetHeight - DayPilot.sh(u.nav.scroll) - 1;
                        case "full":
                            return u.ak() + u.Ah() - DayPilot.sh(u.nav.scroll);
                        case "range":
                            var t = y.getRows();
                            if (0 === t.length) return u.Ah();
                            var i = t.first(),
                                n = t.last();
                            return n.top - i.top + n.height + u.Ah();
                        default:
                            throw "Unsupported export mode: " + e
                    }
                }, y.getRangeStart = function() {
                    var e = y.Yd.dateFrom || u.Pa();
                    return new DayPilot.Date(e)
                }, y.getRangeEnd = function() {
                    var e = y.Yd.dateTo || u.Ph();
                    return new DayPilot.Date(e)
                }, y.getRangeResStart = function() {
                    return y.Yd.resourceFrom ? u.jh(y.Yd.resourceFrom) : u.rowlist.find(function(e) {
                        return !e.hidden
                    })
                }, y.getRangeResEnd = function() {
                    return y.Yd.resourceTo ? u.jh(y.Yd.resourceTo) : u.rowlist.last()
                }, y.getRowHeaderWidth = function() {
                    return u.zh()
                }, y.getTimeHeaderHeight = function() {
                    return u.Ah()
                }, y.getCanvas = function() {
                    return y.canvas()
                }, y.getRectangles = function() {
                    var e = y.getRowHeaderWidth(),
                        t = y.getTimeHeaderHeight(),
                        i = {};
                    i.main = {
                        "x": 0,
                        "y": 0,
                        "w": y.getWidth(),
                        "h": y.getHeight()
                    }, i.corner = {
                        "x": 0,
                        "y": 0,
                        "w": e,
                        "h": t
                    }, i.grid = {
                        "x": e,
                        "y": t,
                        "w": y.getWidth() - e,
                        "h": y.getHeight() - t
                    };
                    var n = i.grid.w,
                        a = u.itline.last();
                    a && a.left + a.width < i.grid.w && (n = a.left + a.width);
                    var o = i.grid.h,
                        r = u.rowlist.last();
                    return r && r.top + r.height < i.grid.h && (o = r.top + r.height), i.gridContent = {
                        "x": e,
                        "y": t,
                        "w": n,
                        "h": o
                    }, i
                }, y.getRows = function() {
                    var e, t, i, n, a = y.Zd,
                        o = DayPilot.list();
                    switch (a) {
                        case "viewport":
                            e = u.bk, t = e + u.nav.scroll.offsetHeight, i = u.aj(e).i, n = u.aj(t).i;
                            break;
                        case "full":
                            e = 0, i = 0, n = u.rowlist.length;
                            break;
                        case "range":
                            var r = y.getRangeResStart(),
                                l = y.getRangeResEnd();
                            if (!r) throw "Resource specified using resourceFrom option not found during export.";
                            if (!l) throw "Resource specified using resourceTo option not found during export.";
                            i = r.index, n = l.index
                    }
                    n < u.rowlist.length && (n += 1);
                    for (var s = i; s < n; s++) {
                        var d = u.rowlist[s];
                        d.hidden || o.push(d)
                    }
                    return o.offset = i, o
                }, y.getEvents = function() {
                    var e = y.Zd;
                    switch (e) {
                        case "full":
                            var t = DayPilot.list();
                            return DayPilot.list(u.rowlist).forEach(function(e) {
                                e.hidden || DayPilot.list(e.events).forEach(function(e) {
                                    t.push(e)
                                })
                            }), t;
                        case "viewport":
                            return f.events().map(function(e) {
                                return e.event
                            });
                        case "range":
                            var t = DayPilot.list(),
                                i = y.getRangeStart(),
                                n = y.getRangeEnd();
                            return y.getRows().forEach(function(e) {
                                DayPilot.list(e.events).filter(function(e) {
                                    return DayPilot.Util.overlaps(e.start(), e.end(), i, n)
                                }).forEach(function(e) {
                                    t.push(e)
                                })
                            }), t;
                        default:
                            throw "Unsupported export mode: " + e
                    }
                }, y.getLinks = function() {
                    if (DayPilot.isArray(u.links.list)) {
                        for (var e = [], t = 0; t < u.links.list.length; t++) {
                            var i = u.links.list[t],
                                n = u.events.find(i.from),
                                a = u.events.sj(n && n.data),
                                o = u.events.find(i.to),
                                r = u.events.sj(o && o.data),
                                l = m.getSegments(a, r, i);
                            e.push(l)
                        }
                        return e
                    }
                }, y.getTimeline = function() {
                    var e = y.Zd;
                    switch (e) {
                        case "full":
                            return DayPilot.list(u.itline).addProps({
                                "offset": 0
                            });
                        case "viewport":
                            return y.getViewportTimeline();
                        case "range":
                            return y.getRangeTimeline();
                        default:
                            throw "Unsupported export mode: " + e
                    }
                }, y.getRangeTimeline = function() {
                    var e = DayPilot.list();
                    if (u.itline && u.itline.length > 0) {
                        var t = u.Vh(y.getRangeStart()).i,
                            i = u.Vh(y.getRangeEnd()).i,
                            n = u.ck();
                        i = Math.min(i, n - 1), t = DayPilot.Util.atLeast(t, 0);
                        for (var a = t; a <= i; a++) {
                            var o = u.itline[a];
                            e.push(o)
                        }
                        e.offset = t
                    }
                    return e
                }, y.getViewportTimeline = function() {
                    var e = DayPilot.list();
                    if (u.itline && u.itline.length > 0) {
                        var t = u.dk,
                            i = t + u.ek,
                            n = u.Th(t).x,
                            a = u.Th(i, !0).x,
                            o = u.ck();
                        a = Math.min(a, o), n = DayPilot.Util.atLeast(n, 0);
                        for (var r = n; r <= a; r++) {
                            var l = u.itline[r];
                            e.push(l)
                        }
                        e.offset = n
                    }
                    return e
                }, y.getTimeHeader = function(e) {
                    if ("full" === y.Zd) return DayPilot.list(u.timeHeader[e]);
                    var t, i, n = DayPilot.list();
                    t = y.getViewportOffsetStart(), i = t + y.getViewportOffsetWidth();
                    var a = u.fk(e, t),
                        o = u.fk(e, i);
                    o || (o = {
                        "x": u.timeHeader[e].length - 1
                    });
                    for (var r = a.x; r <= o.x; r++) {
                        var l = u.timeHeader[e][r];
                        n.push(l)
                    }
                    return n
                }, y.getSeparators = function() {
                    return DayPilot.list(u.separators).map(function(e) {
                        var t = new DayPilot.Date(e.location);
                        if (t.getTime() < u.Pa().getTime()) return null;
                        if (t.getTime() >= u.Ph().getTime()) return null;
                        var i = u.getPixels(t);
                        return i.cut ? null : i.left < 0 ? null : i.left > u.wh() ? null : {
                            "left": i.left,
                            "color": e.color,
                            "width": e.width || 1
                        }
                    }).filter(function(e) {
                        return !!e
                    })
                }, y.fakeDurationBar = function() {
                    var e = document.createElement("div");
                    e.style.display = "none", e.className = u.A(T.event);
                    var t = document.createElement("div");
                    t.className = u.A(T.eventBar);
                    var i = document.createElement("div");
                    return i.className = u.A(T.eventBarInner), document.body.appendChild(e), t.appendChild(i), e.appendChild(t), e
                }, y.fakeEventLeft = function() {
                    var e = document.createElement("div");
                    return e.style.display = "none", e.className = u.A("_event_left"), document.body.appendChild(e), e
                }, y.fakeGroup = function() {
                    var e = document.createElement("div");
                    e.style.display = "none", e.className = u.A(T.event) + " " + u.A("_task_group");
                    var t = document.createElement("div");
                    return t.className = u.A(T.eventInner), e.appendChild(t), u.divEvents.appendChild(e), e
                }, y.fakeMilestone = function() {
                    var e = document.createElement("div");
                    e.style.display = "none", e.className = u.A(T.event) + " " + u.A("_task_milestone");
                    var t = document.createElement("div");
                    return t.className = u.A(T.eventInner), e.appendChild(t), u.divEvents.appendChild(e), e
                }, y.fakeCell = function() {
                    var e = document.createElement("div");
                    e.style.display = "none", e.className = u.A("_cell"), e.style.position = "absolute", e.style.top = "-2000px", e.style.left = "-2000px";
                    var t = document.createElement("div");
                    return t.className = u.A("_cell_inner"), e.appendChild(t), u.divCells.appendChild(e), e
                }, y.fakeRowHeader = function() {
                    var e = document.createElement("div");
                    e.style.display = "none", e.className = u.A("_rowheader"), e.style.position = "absolute", e.style.top = "-2000px", e.style.left = "-2000px";
                    var t = document.createElement("div");
                    return t.className = u.A("_rowheader_inner"), e.appendChild(t), u.divResScroll.appendChild(e), e
                }, y.fakeExpand = function() {
                    var e = document.createElement("div");
                    return e.style.display = "none", e.className = u.A("_tree_image_expand"), document.body.appendChild(e), e
                }, y.fakeIcon = function(e) {
                    var t = document.createElement("i");
                    return t.className = e, t.style.position = "absolute", t.style.top = "-2000px", t.style.left = "-2000px", t
                }, y.extractUrl = function(e) {
                    var t = /url\((")?([^"].*[^"])\1\)/.exec(e);
                    return t ? t[2] : null
                }, y.getImages = function() {
                    var e = {},
                        t = y.fakeExpand();
                    return e.expand = y.extractUrl(new DayPilot.StyleReader(t).get("background-image")), t.className = u.A("_tree_image_collapse"), e.collapse = y.extractUrl(new DayPilot.StyleReader(t).get("background-image")), t.className = u.A("_tree_image_no_children"), e.nochildren = y.extractUrl(new DayPilot.StyleReader(t).get("background-image")), DayPilot.de(t), e
                }, y.getFont = function(e) {
                    return new DayPilot.StyleReader(e).getFont()
                }, y.getViewportOffsetStart = function() {
                    switch (y.Zd) {
                        case "full":
                            return 0;
                        case "viewport":
                            return u.nav.scroll.scrollLeft;
                        case "range":
                            return u.getPixels(y.getRangeStart()).boxLeft
                    }
                }, y.getViewportOffsetTop = function() {
                    switch (y.Zd) {
                        case "full":
                            return 0;
                        case "viewport":
                            return u.nav.scroll.scrollTop;
                        case "range":
                            return y.getRangeResStart().top
                    }
                }, y.getViewportOffsetWidth = function() {
                    switch (y.Zd) {
                        case "full":
                            return u.wh();
                        case "viewport":
                            return u.nav.scroll.offsetWidth;
                        case "range":
                            return u.getPixels(y.getRangeEnd()).boxRight - y.getViewportOffsetStart()
                    }
                }, y.excelBoard = function() {
                    var e = new DayPilot.Excel,
                        t = e.worksheets.create("Scheduler"),
                        i = new DayPilot.StyleReader(u.nav.corner).get("background-color"),
                        n = new DayPilot.StyleReader(u.nav.top).get("border-top-color"),
                        a = DayPilot.list(u.elements.events).filter(function(e) {
                            return !e.event.data.type
                        }).map(function(e) {
                            return e.firstChild
                        }).last(),
                        o = new DayPilot.StyleReader(a).get("border-right-color");
                    e.styles.getDefault().setBackColor("#ffaaaa");
                    var r = e.styles.create();
                    r.setHorizontalAlignment("Center"), r.setBackColor(i), r.setBorderColor(n);
                    var l = e.styles.create();
                    l.setVerticalAlignment("Top"), l.setBackColor(i), l.setBorderColor(n);
                    var s = e.styles.create();
                    s.setVerticalAlignment("Top"), s.setBackColor("#ff0000"), s.setBorderColor(o), t.enableGridlines(!1), t.cell(0, 0).setRowspan(u.timeHeader.length).setStyle(r), t.cell(10, 10).setText("hi there"), DayPilot.list(u.timeHeader).forEach(function(e, i) {
                        var n = {
                            "x": 1,
                            "y": 0
                        };
                        y.getTimeHeader(i, "full").forEach(function(e, a) {
                            var o = e.colspan;
                            t.cell(a + n.x, i + n.y).setText(e.innerHTML).setColspan(o).setStyle(r)
                        })
                    }), DayPilot.list(u.rowlist).forEach(function(e, i) {
                        for (var n = {
                                "x": 0,
                                "y": 1
                            }, a = "", o = 0; o < e.level; o++) a += "  ";
                        t.cell(n.x, i + n.y).setText(a + e.html).setRowspan(e.lines.length).setStyle(l)
                    });
                    var d = {
                            "x": 0,
                            "y": u.timeHeader.length
                        },
                        c = d.y;
                    return DayPilot.list(u.rowlist).forEach(function(e, i) {
                        DayPilot.list(e.lines).forEach(function(e, n) {
                            var a = d.x;
                            DayPilot.list(e).forEach(function(e) {
                                var n = u.Vh(e.start()).i,
                                    o = u.Vh(e.end()).i,
                                    r = 1 + o - n;
                                t.cell(n + a, i + c).setText(e.client.html()).setColspan(r).setStyle(s), a += r - 1
                            })
                        }), c += e.lines.length - 1
                    }), e
                }, y.Yd = null, y.Zd = null, y.generate = function(e, t) {
                    "object" == typeof e && (t = e, e = null);
                    var t = t || {},
                        e = e || t.format || "svg",
                        i = t.scale || 1;
                    if ("xls" === e) return y.excelBoard();
                    "jpg" === e.toLowerCase() && (e = "jpeg");
                    var n = t.area || "viewport";
                    y.Yd = t, y.Zd = n, y.getRows().forEach(function(e) {
                        u.gk(e)
                    });
                    var a, o = y.getWidth(),
                        r = y.getHeight();
                    switch (e.toLowerCase()) {
                        case "svg":
                            a = new DayPilot.Svg(o, r);
                            break;
                        case "png":
                            a = new DayPilot.Canvas(o, r, "image/png", i);
                            break;
                        case "jpeg":
                            a = new DayPilot.Canvas(o, r, "image/jpeg", i, t.quality);
                            break;
                        default:
                            throw "Export format not supported: " + e
                    }
                    var l = y.getRectangles(),
                        s = y.getImages(),
                        d = new DayPilot.StyleReader(u.nav.top).get("background-color"),
                        c = new DayPilot.StyleReader(u.nav.corner).get("background-color"),
                        h = new DayPilot.StyleReader(u.nav.top).get("border-top-color"),
                        f = new DayPilot.StyleReader(u.nav.divider).get("background-color"),
                        v = DayPilot.list(u.elements.events).filter(function(e) {
                            return !e.event.data.type
                        }).map(function(e) {
                            return e.firstChild
                        }).last(),
                        p = new DayPilot.StyleReader(v).get("border-right-color"),
                        m = y.getFont(v),
                        g = new DayPilot.StyleReader(v).get("color"),
                        b = new DayPilot.StyleReader(v).get("background-color");
                    b = DayPilot.Util.isTransparentColor(b) ? "white" : b;
                    var w = y.fakeMilestone(),
                        D = new DayPilot.StyleReader(w.firstChild).get("background-color");
                    DayPilot.de(w);
                    var k = y.fakeGroup(),
                        P = new DayPilot.StyleReader(k.firstChild).get("background-color");
                    DayPilot.de(k);
                    var x = y.fakeDurationBar(),
                        C = new DayPilot.StyleReader(x.firstChild).get("background-color"),
                        A = new DayPilot.StyleReader(x.firstChild.firstChild).get("background-color");
                    DayPilot.de(x);
                    var S = y.fakeEventLeft(),
                        E = new DayPilot.StyleReader(S).get("color");
                    DayPilot.de(S);
                    var T = y.fakeCell(),
                        H = new DayPilot.StyleReader(T).get("background-color");
                    DayPilot.Util.addClass(T, u.A("_cell_business"));
                    var M = new DayPilot.StyleReader(T).get("background-color"),
                        _ = y.getFont(T),
                        R = new DayPilot.StyleReader(T).get("color");
                    DayPilot.de(T);
                    var U = DayPilot.Util.firstPropValue(u.J.linesVertical),
                        N = new DayPilot.StyleReader(U).get("background-color"),
                        L = u.J.timeHeader["0_0"],
                        z = y.getFont(L),
                        O = new DayPilot.StyleReader(L).get("color"),
                        I = new DayPilot.StyleReader(L).get("background-color"),
                        j = y.fakeRowHeader(),
                        W = y.getFont(j),
                        F = new DayPilot.StyleReader(j).get("color"),
                        J = new DayPilot.StyleReader(j).get("background-color");
                    if (DayPilot.de(j), u.rowHeaderColumns && u.ij && u.ij.blocks[0]) var Y = u.ij.blocks[0].section.firstChild,
                        G = new DayPilot.StyleReader(Y).getFont(),
                        V = new DayPilot.StyleReader(Y).get("color");
                    var X = y.getViewportOffsetStart(),
                        q = y.getViewportOffsetTop();
                    a.fillRect(l.main, "white"), a.fillRect(l.main, d), a.fillRect(l.corner, c);
                    var K = l.corner.x;
                    DayPilot.list(u.rowHeaderColumns).forEach(function(e, t) {
                        var i = u.rowHeaderCols[t],
                            n = {};
                        n.x = K, n.w = i + 1, n.y = l.corner.h - u.ij.height, n.h = u.ij.height + 1;
                        var o = 3,
                            r = DayPilot.Util.copyProps(n);
                        r.x += o, r.w -= o;
                        var s = e.name || e.title || "";
                        a.text(r, s, G, V, "left", 0, "center"), a.rect(n, h), K += i
                    });
                    var Q = "function" == typeof u.onBeforeTimeHeaderExport,
                        $ = "function" == typeof u.onBeforeRowHeaderRender,
                        Z = "function" == typeof u.onBeforeRowHeaderExport,
                        ee = "function" == typeof u.onBeforeCellExport;
                    DayPilot.list(u.timeHeader).forEach(function(e, t) {
                        y.getTimeHeader(t, n).forEach(function(e) {
                            var i = l.grid.x + e.left - X,
                                n = e.width,
                                o = B.timeHeader(t),
                                r = o.top,
                                s = o.height,
                                d = {};
                            d.header = {}, d.header.start = e.start, d.header.end = e.end, d.header.level = t, d.header.text = e.text, d.header.html = e.innerHTML, d.text = e.innerHTML, d.backColor = e.backColor, d.verticalAlignment = "center", d.horizontalAlignment = "center", Q && u.onBeforeTimeHeaderExport(d);
                            var c = DayPilot.Util.atLeast(0, l.grid.x - i);
                            i += c, n -= c;
                            var c = DayPilot.Util.atLeast(0, i + n - (l.grid.x + l.grid.w));
                            n -= c;
                            var f = {
                                "x": i,
                                "y": r,
                                "w": n + 1,
                                "h": s + 1
                            };
                            a.fillRect(f, d.backColor || I), a.rect(f, h), a.text(f, d.text, z, O, d.horizontalAlignment, 0, d.verticalAlignment)
                        })
                    }), y.getRows().forEach(function(e) {
                        var t = l.grid.y + e.top - q;
                        t += DayPilot.Util.atLeast(0, l.grid.y - t);
                        var i = u.treeEnabled && !e.isNewRow,
                            n = 10,
                            o = i ? e.level * u.treeIndent + u.treeImageMarginLeft : 3;
                        "Disabled" !== u.rowMoveHandling && (o += 10);
                        var r = {
                                "x": 0,
                                "y": t,
                                "w": l.grid.x + 1,
                                "h": e.height + 1
                            },
                            d = e;
                        if ($) {
                            d = u.hk(e).row
                        }
                        var c = {};
                        c.text = d.html, u.rowHeaderColumns && u.rowHeaderColumns.length > 0 && u.ui() && (c.text = d.columns[0].text), c.backColor = d.backColor || J, c.fontSize = W.size, c.fontFamily = W.family, c.fontStyle = W.style, c.fontColor = d.fontColor || F, c.borderColor = h, c.horizontalAlignment = "left", c.verticalAlignment = "center", c.row = u.Ji(e), c.row.columns = [], d.columns && d.columns.forEach(function(e) {
                            var t = DayPilot.Util.copyProps(e, {}, ["text", "html", "backColor", "horizontalAlignment", "verticalAlignment"]);
                            t.text = e.text || e.html, t.fontSize = c.fontSize, t.fontFamily = c.fontFamily, t.fontStyle = c.fontStyle, t.fontColor = c.fontColor, t.horizontalAlignment = t.horizontalAlignment || c.horizontalAlignment, t.verticalAlignment = t.verticalAlignment || c.verticalAlignment, t.backColor = t.backColor || c.backColor, c.row.columns.push(t)
                        }), e.isNewRow && (c.text = u.rowCreateHtml), Z && u.onBeforeRowHeaderExport(c);
                        var f = 10,
                            v = {
                                "x": o,
                                "y": t + u.treeImageMarginTop + 2,
                                "w": 10,
                                "h": f
                            },
                            p = {
                                "size": c.fontSize,
                                "family": c.fontFamily,
                                "style": c.fontStyle
                            };
                        "center" === c.verticalAlignment && (v.y = t + r.h / 2 - 5);
                        var m = i ? o + n + 3 : o,
                            g = i ? r.w - m : r.w,
                            y = {
                                "x": m,
                                "y": t,
                                "w": g,
                                "h": e.height + 1
                            };
                        if (u.rowHeaderCols && (y.w = u.rowHeaderCols[0] - m), a.fillRect(r, c.backColor), a.text(y, c.text, p, c.fontColor, c.horizontalAlignment, 0, c.verticalAlignment), a.rect(r, c.borderColor), i) {
                            var b = null;
                            b = DayPilot.list(e.children).isEmpty() ? s.nochildren : e.expanded ? s.collapse : s.expand, a.image(v, b)
                        }
                        if (u.rowHeaderCols) {
                            var o = r.x;
                            DayPilot.list(u.rowHeaderCols).forEach(function(e, t) {
                                if (0 !== t) {
                                    var i = u.ui() ? t : t - 1,
                                        n = c.row.columns[i] || {},
                                        l = DayPilot.Util.copyProps(r);
                                    l.x = o, l.w = e + 1;
                                    var s = 3,
                                        d = DayPilot.Util.copyProps(l);
                                    d.x += s, d.w -= s;
                                    var h = n.backColor || c.backColor;
                                    a.fillRect(l, h), n.text && a.text(d, n.text, {
                                        "size": n.fontSize,
                                        "family": n.fontFamily,
                                        "style": n.fontStyle
                                    }, n.fontColor, n.horizontalAlignment, 0, n.verticalAlignment), a.rect(l, c.borderColor)
                                }
                                o += e
                            })
                        }
                    }), y.getRows().forEach(function(e, t, i) {
                        var t = e.index;
                        y.getTimeline().forEach(function(i, n, o) {
                            var n = o.offset + n,
                                r = u.Ij(n, t),
                                s = r.business,
                                d = u.ik(n, t),
                                c = r.html,
                                h = r.horizontalAlignment || "left",
                                f = r.backColor || (s ? M : H);
                            ee && (d || (d = {}, d.cell = u.cells.findXy(n, t)[0]), d.text = c, d.horizontalAlignment = h, d.backColor = f, u.onBeforeCellExport(d), c = d.text, h = d.horizontalAlignment, f = d.backColor);
                            var v = l.grid.y + e.top - q;
                            v += DayPilot.Util.atLeast(0, l.grid.y - v);
                            var p = l.grid.x + i.left - X;
                            p += DayPilot.Util.atLeast(0, l.grid.x - p);
                            var m = {
                                "x": p,
                                "y": v,
                                "w": i.width,
                                "h": e.height
                            };
                            a.fillRect(m, f);
                            var g = {};
                            g.x = m.x + 1, g.y = m.y + 1, g.w = m.w - 2, g.h = m.h - 2, c && a.text(g, c, _, R, h)
                        })
                    }), y.getRows().forEach(function(e) {
                        var t = l.grid.y + e.top - q;
                        t += DayPilot.Util.atLeast(0, l.grid.y - t), t !== l.grid.y && a.line(l.gridContent.x + 1, t, l.gridContent.x + l.gridContent.w - 1, t, N)
                    }), y.getTimeline().forEach(function(e) {
                        var t = l.grid.x + e.left - X;
                        t += DayPilot.Util.atLeast(0, l.grid.x - t), t !== l.grid.x && a.line(t, l.grid.y + 1, t, l.grid.y + l.grid.h - 2, N)
                    });
                    var te = y.getTimeline().last();
                    return function(e) {
                        var t = l.grid.x + e.left - X + e.width;
                        a.line(t, l.grid.y + 1, t, l.grid.y + l.grid.h - 2, N)
                    }(te), y.getSeparators().forEach(function(e) {
                        var t = l.grid.x + e.left - X;
                        a.line(t, l.grid.y + 1, t, l.grid.y + l.grid.h - 2, e.color)
                    }), y.getLinks().forEach(function(e) {
                        e.map(function(e) {
                            return y.shiftableSegment(e).shift(l.grid.x - X, l.grid.y - q)
                        }).forEach(function(e) {
                            switch (e.type) {
                                case "HorizontalLine":
                                    a.line(e.startX, e.startY, e.endX, e.endY, "red");
                                    break;
                                case "VerticalLine":
                                    a.line(e.startX, e.startY, e.endX, e.endY, "red");
                                    break;
                                case "ArrowRight":
                                    a.triangle({
                                        x: e.startX - 10,
                                        y: e.startY - 4.5,
                                        w: 10,
                                        h: 10
                                    }, "red");
                                    break;
                                case "ArrowDown":
                                    a.triangle({
                                        x: e.startX - 4.5,
                                        y: e.startY - 10,
                                        w: 10,
                                        h: 10
                                    }, "red", 90);
                                    break;
                                case "ArrowLeft":
                                    a.triangle({
                                        x: e.startX,
                                        y: e.startY - 4.5,
                                        w: 10,
                                        h: 10
                                    }, "red", 180);
                                    break;
                                case "ArrowUp":
                                    a.triangle({
                                        x: e.startX - 4.5,
                                        y: e.startY,
                                        w: 10,
                                        h: 10
                                    }, "red", -90)
                            }
                        })
                    }), y.getEvents().forEach(function(e) {
                        function t() {
                            var e = H.backColor;
                            a.diamond(M, e)
                        }

                        function i() {
                            var e = {
                                    "x": c,
                                    "y": d,
                                    "w": r,
                                    "h": H.barHeight
                                },
                                t = {
                                    "x": c + x,
                                    "y": d,
                                    "w": S,
                                    "h": H.barHeight
                                },
                                i = P,
                                n = {
                                    x: c,
                                    y: d + 5,
                                    h: M.h - 6 - 5,
                                    w: M.w
                                };
                            a.fillRect(n, i), a.upperRightCorner({
                                x: c + M.w - 6,
                                y: n.y + n.h,
                                w: 6,
                                h: 6
                            }, i), a.upperLeftCorner({
                                x: c,
                                y: n.y + n.h,
                                w: 6,
                                h: 6
                            }, i), s && (a.fillRect(e, y), S > 0 && a.fillRect(t, v))
                        }

                        function n() {
                            var t = {
                                    "x": c,
                                    "y": d,
                                    "w": r,
                                    "h": H.barHeight
                                },
                                i = {
                                    "x": c + x,
                                    "y": d,
                                    "w": S,
                                    "h": H.barHeight
                                },
                                n = {
                                    "x": c + T,
                                    "y": d + H.barHeight,
                                    "w": r - T,
                                    "h": e.part.height - H.barHeight
                                };
                            a.fillRect(M, H.backColor), a.text(n, H.text, {
                                "size": H.fontSize,
                                "family": H.fontFamily,
                                "style": H.fontStyle
                            }, H.fontColor, H.horizontalAlignment, H.textPadding, H.verticalAlignment), a.rect(M, H.borderColor), s && (a.fillRect(t, y), S > 0 && a.fillRect(i, v)), DayPilot.list(H.areas).forEach(function(t) {
                                if (DayPilot.Areas.isVisible(t)) {
                                    var i = 0;
                                    "number" == typeof t.left ? i = t.left : t.start ? i = u.getPixels(new DayPilot.Date(t.start)).left - e.part.left : "number" == typeof t.right && (i = e.part.width - t.right - t.width);
                                    var n = t.width || t.w;
                                    "number" == typeof t.right ? n = e.part.width - t.right - i : t.end && (n = u.getPixels(new DayPilot.Date(t.end)).left - t.left - e.part.left + 1);
                                    var o = t.top,
                                        r = t.height || t.h;
                                    "number" == typeof t.bottom && (r = e.part.height - t.bottom - o);
                                    var l = {
                                        "x": c + i,
                                        "y": d + o,
                                        "w": n,
                                        "h": r
                                    };
                                    if (t.backColor && a.fillRect(l, t.backColor), t.icon) {
                                        var s = u.Xd.areaIcon(t.icon);
                                        a.text(l, s.text, s.font, t.fontColor || H.fontColor, t.horizontalAlignment, t.padding, t.verticalAlignment)
                                    } else if (t.image) {
                                        var h = new Image;
                                        h.src = t.image, a.image(l, h)
                                    } else(t.text || t.html) && a.text(l, t.text || t.html, {
                                        "size": t.fontSize || H.fontSize,
                                        "family": t.fontFamily || H.fontFamily,
                                        "style": t.fontStyle || H.fontStyle
                                    }, t.fontColor || H.fontColor, t.horizontalAlignment, t.padding, t.verticalAlignment)
                                }
                            })
                        }
                        var o = u.rowlist[e.part.dayIndex].top,
                            r = e.part.width,
                            s = e.client && e.client.barVisible && e.client.barVisible(),
                            d = l.grid.y + o + e.part.top - q;
                        d += DayPilot.Util.atLeast(0, l.grid.y - d);
                        var c = l.grid.x + e.part.left - X + 1,
                            h = DayPilot.Util.atLeast(0, l.grid.x - c);
                        c += h, r -= h;
                        var f = e.cache || e.data,
                            v = f.barColor || A,
                            y = f.barBackColor || C,
                            w = f.backColor || b,
                            k = f.fontColor || g,
                            x = e.part.barLeft,
                            S = e.part.barWidth;
                        "PercentComplete" === u.durationBarMode && (x = 0, S = DayPilot.Util.atLeast(0, Math.floor(e.part.width * (f.complete || 0) / 100))), "Milestone" === e.data.type && (w = D);
                        var T = 2,
                            H = {};
                        H.e = e, H.text = e.text ? e.text() : e.client.html(), H.areas = f.areas, H.fontSize = m.size, H.fontFamily = m.family, H.fontStyle = m.style, H.fontColor = k, H.backColor = w, H.borderColor = p, H.horizontalAlignment = "left", H.verticalAlignment = "center", H.barHeight = 4, H.textPadding = 2, "function" == typeof u.onBeforeEventExport && u.onBeforeEventExport(H);
                        var M = {
                            "x": c,
                            "y": d,
                            "w": r,
                            "h": e.part.height
                        };
                        "Milestone" === e.data.type ? t() : "Group" === e.data.type ? i() : n();
                        var _ = f.textLeft || f.htmlLeft;
                        if (_) {
                            var R = {
                                    "size": H.fontSize,
                                    "family": H.fontFamily,
                                    "style": H.fontStyle
                                },
                                B = a.textWidth(_, R),
                                U = {
                                    "x": c - (u.eventHtmlLeftMargin + B),
                                    "y": d,
                                    "w": B,
                                    "h": e.part.height
                                };
                            a.text(U, _, R, E)
                        }
                        var N = f.textRight || f.htmlRight;
                        if (N) {
                            var L = {
                                    "size": H.fontSize,
                                    "family": H.fontFamily,
                                    "style": H.fontStyle
                                },
                                z = a.textWidth(N, L),
                                O = {
                                    "x": c + r + u.eventHtmlRightMargin,
                                    "y": d,
                                    "w": z,
                                    "h": e.part.height
                                };
                            a.text(O, N, L, E)
                        }
                    }), a.rect(l.main, h), a.line(l.grid.x, 0, l.grid.x, l.main.h, f), a.line(0, l.grid.y, l.main.w, l.grid.y, f), a
                }, y.areaIcon = function(e) {
                    var t = y.fakeIcon(e);
                    document.body.appendChild(t);
                    var i = window.getComputedStyle(t, ":before").content.replace(/"/g, ""),
                        n = new DayPilot.StyleReader(t).getFont();
                    return document.body.removeChild(t), {
                        "text": i,
                        "font": n
                    }
                }, y.shiftableSegment = function(e) {
                    return {
                        "startX": e.startX,
                        "endX": e.endX,
                        "startY": e.startY,
                        "endY": e.endY,
                        "type": e.type,
                        "shift": function(t, i) {
                            return y.shiftableSegment({
                                "startX": e.startX + t,
                                "endX": e.endX + t,
                                "startY": e.startY + i,
                                "endY": e.endY + i,
                                "type": e.type
                            })
                        }
                    }
                }, this.jk = {};
                var b = this.jk;
                b.findJointDivs = function(e) {
                    var t = e.data.join;
                    return t ? DayPilot.list(u.elements.events).filter(function(i) {
                        return i.event.data.join === t && i.event !== e
                    }) : DayPilot.list()
                }, this.kk = {};
                var w = this.kk;
                w.divs = [], w.list = [], w.forbidden = !1, w.additional = function() {
                    var e = DayPilot.list(),
                        t = u.multiselect.isSelected(o.resizing.event),
                        i = u.allowMultiResize,
                        e = DayPilot.list();
                    if (t && i && (e = DayPilot.list(u.multiselect.Sb).filter(function(e) {
                            return e !== o.resizing
                        })), u.jointEventsResize) {
                        var n = b.findJointDivs(o.resizingEvent);
                        e = e.concat(n)
                    }
                    return e
                }, w.update = function() {
                    w.clear(), w.draw()
                }, w.clear = function() {
                    DayPilot.de(w.divs), w.divs = []
                }, w.isInvalid = function() {
                    return w.divs.some(function(e) {
                        return e.info.invalid
                    })
                }, w.draw = function() {
                    if (o.resizing) {
                        var e = o.resizingEvent,
                            t = o.resizingShadow,
                            i = t.start.getTime() - e.start().getTime(),
                            n = t.end.getTime() - e.end().getTime(),
                            a = 0;
                        if (w.list = [], w.forbidden = !1, w.invalid = !1, w.rowoffset = a, w.additional().forEach(function(e) {
                                if (e.event) {
                                    var t = e.event,
                                        o = u.rowlist[t.part.dayIndex + a];
                                    if (!o) return void(w.invalid = !0);
                                    var r = t.part.top + o.top,
                                        l = t.part.height,
                                        s = t.start().addTime(i),
                                        d = t.end().addTime(n),
                                        c = {};
                                    c.$ = {}, s >= d && (c.invalid = !0, i > 0 ? c.$.lk = d.addSeconds(-1) : n < 0 && (c.$.mk = s.addSeconds(1))), c.event = t, c.start = s, c.end = d, c.overlapping = !1, w.list.push(c);
                                    var h = u.getPixels(s),
                                        f = u.getPixels(d);
                                    c.$.lk && (h = u.getPixels(c.$.lk)), c.$.mk && (f = u.getPixels(c.$.mk));
                                    var v = DayPilot.DateUtil.diff(t.rawend(), t.start());
                                    v = DayPilot.Util.atLeast(v, 1);
                                    var p = R.useBox(v),
                                        m = p ? h.boxLeft : h.left,
                                        g = p ? f.boxRight - m : f.left - m,
                                        y = document.createElement("div");
                                    y.style.position = "absolute", y.style.left = m + "px", y.style.top = r + "px", y.style.height = l + "px", y.style.width = g + "px", y.style.zIndex = 101, y.style.overflow = "hidden", y.className = u.A("_shadow"), y.info = c;
                                    var b = document.createElement("div");
                                    b.className = u.A("_shadow_inner"), y.appendChild(b), u.gh.appendChild(y), w.divs.push(y)
                                }
                            }), w.invalid) {
                            var r = u.A("_shadow_overlap");
                            return void DayPilot.list(w.divs).forEach(function(e) {
                                DayPilot.Util.addClass(e, r)
                            })
                        }
                        DayPilot.list(w.divs).forEach(function(e) {
                            if (e.info) {
                                var t = e,
                                    i = e.info,
                                    n = e.info.event,
                                    r = u.rowlist[n.part.dayIndex + a],
                                    l = u.getPixels(i.start),
                                    s = u.getPixels(i.end),
                                    d = l.left,
                                    c = s.left - d;
                                e.info.invalid && DayPilot.Util.addClass(e, u.A("_shadow_invalid"));
                                var h = DayPilot.list(w.list).map(function(e) {
                                    return e.event.data
                                }).add(o.resizing.event.data);
                                u.nk(t, r, d, c, h), u.ok(t, i.start, i.end, n.resource()), t.overlapping && (i.overlapping = !0, w.forbidden = !0)
                            }
                        })
                    }
                }, this.pk = {}, this.pk.modifiedProps = function() {
                    var e = new DayPilot.Scheduler,
                        t = DayPilot.Util.members(u, 2),
                        i = [];
                    return i.push("<div id='dp'></div>"), i.push("<script>"), i.push("var dp = new DayPilot.Scheduler('dp');"), t.properties.forEach(function(t) {
                        var n, a, o = t.name,
                            r = o.split(".");
                        if (r.length > 1) {
                            var l = r[0],
                                s = r[1];
                            n = JSON.stringify(e[l][s]), a = JSON.stringify(u[l][s])
                        } else n = JSON.stringify(e[o]), a = JSON.stringify(u[o]);
                        n !== a && i.push("dp." + o + " = " + a + ";")
                    }), t.events.forEach(function(e) {
                        var t = e.name;
                        "function" == typeof u[t] && i.push("dp." + t + " = " + u[t].toString() + ";")
                    }), i.push("dp.init();"), i.push("</script>"), i.join("\n")
                }, this.qk = {};
                var D = this.qk;
                D.divs = [], D.list = [], D.forbidden = !1, D.verticalAll = function() {
                    return "All" === u.multiMoveVerticalMode
                }, D.additional = function() {
                    var e = DayPilot.list(),
                        t = u.Wh,
                        i = u.multiselect.isSelected(o.movingEvent),
                        n = u.allowMultiMove;
                    if (i && n && (e = DayPilot.list(u.multiselect.Sb).filter(function(e) {
                            return e !== o.moving && e !== t.moving
                        })), u.jointEventsMove) {
                        var a = b.findJointDivs(o.movingEvent);
                        e = e.concat(a)
                    }
                    return e
                }, D.update = function() {
                    D.clear(), D.draw()
                }, D.draw = function() {
                    if (o.moving) {
                        var e = o.movingEvent,
                            t = o.movingShadow.start,
                            i = t.getTime() - e.start().getTime(),
                            n = e.part.dayIndex,
                            a = DayPilot.indexOf(u.rowlist, o.movingShadow.row),
                            r = a - n;
                        if (D.verticalAll() || (r = 0), D.list = [], D.forbidden = !1, D.invalid = !1, D.rowoffset = r, D.additional().forEach(function(e) {
                                if (e.event) {
                                    var t = e.event,
                                        n = u.rowlist[t.part.dayIndex + r];
                                    if (!n) return void(D.invalid = !0);
                                    var a = t.part.top + n.top,
                                        o = t.part.height;
                                    r && (a = n.top, o = n.height);
                                    var l = t.start().addTime(i),
                                        s = t.end().addTime(i),
                                        d = {};
                                    d.event = t, d.start = l, d.end = s, d.resource = n.id, d.overlapping = !1, D.list.push(d);
                                    var c = u.getPixels(l),
                                        h = u.getPixels(s),
                                        f = DayPilot.DateUtil.diff(t.rawend(), t.start());
                                    f = DayPilot.Util.atLeast(f, 1);
                                    var v = R.useBox(f),
                                        p = v ? c.boxLeft : c.left,
                                        m = v ? h.boxRight - p : h.left - p,
                                        g = document.createElement("div");
                                    g.style.position = "absolute", g.style.left = p + "px", g.style.top = a + "px", g.style.height = o + "px", g.style.width = m + "px", g.style.zIndex = 101, g.style.overflow = "hidden", g.className = u.A("_shadow"), g.info = d;
                                    var y = document.createElement("div");
                                    y.className = u.A("_shadow_inner"), g.appendChild(y), u.gh.appendChild(g), D.divs.push(g)
                                }
                            }), D.invalid) {
                            var l = u.A("_shadow_overlap");
                            return void DayPilot.list(D.divs).forEach(function(e) {
                                DayPilot.Util.addClass(e, l)
                            })
                        }
                        DayPilot.list(D.divs).forEach(function(e) {
                            if (e.info) {
                                var t = e,
                                    i = e.info,
                                    n = e.info.event,
                                    a = u.rowlist[n.part.dayIndex + r],
                                    l = u.getPixels(i.start),
                                    s = u.getPixels(i.end),
                                    d = l.left,
                                    c = s.left - d,
                                    h = DayPilot.list(D.list).map(function(e) {
                                        return e.event.data
                                    }).add(o.movingEvent.data);
                                u.nk(t, a, d, c, h), u.ok(t, i.start, i.end, i.resource), t.overlapping && (i.overlapping = !0, D.forbidden = !0)
                            }
                        })
                    }
                }, D.clear = function() {
                    DayPilot.de(D.divs), D.divs = []
                }, this.rk = function() {
                    var e = u.coords,
                        t = o.resizing.dpBorder,
                        i = o.resizing.event,
                        n = i.part.left;
                    "right" == t && (n += i.part.width);
                    var a, r, l = o.resizing.event.calendar.cellWidth,
                        s = o.resizing.event.part.width,
                        d = o.resizing.event.part.left,
                        c = 0,
                        h = e.x - n,
                        f = u.snapToGrid && u.snapToGridEventResizing;
                    if ("right" === t) {
                        if (a = d, f) {
                            var v = u.Th(s + d + h).cell,
                                p = u.Th(d).cell,
                                m = p.left + p.width - d;
                            r = v.left + v.width - d, r < m && (r = m)
                        } else r = s + h;
                        var g = u.wh();
                        d + r > g && (r = g - d), o.resizingShadow.left = d, o.resizingShadow.width = r
                    } else {
                        if ("left" !== t) throw "Invalid dpBorder.";
                        f ? (h >= s && (h = s), a = Math.floor((d + h + 0) / l) * l, a < c && (a = c)) : a = d + h, r = s - (a - d);
                        var y = d + s,
                            b = l;
                        f ? "Never" === u.useEventBoxes && (b = s < l ? s : 1) : b = 1, r < b && (r = b, a = y - r), o.resizingShadow.left = a, o.resizingShadow.width = r
                    }! function() {
                        o.resizingShadow.overlapping = !1;
                        var e = o.resizing.event,
                            t = u.rowlist[e.part.dayIndex],
                            i = a,
                            n = r;
                        u.nk(o.resizingShadow, t, i, n, e.data);
                        var l = o.resizingShadow;
                        if (l.start) {
                            var s = {
                                "start": l.start,
                                "end": u.Uf(l.end)
                            };
                            u.ok(o.resizingShadow, s.start, s.end, t.id)
                        }
                    }(), u.sk()
                }, this.$j = function() {
                    this.nav.scroll;
                    if (u.coords && o.movingEvent) {
                        u.Bh();
                        var e = o.movingShadow,
                            t = this.mj(o.movingEvent);
                        if (!u.nj(t.rowIndex)) {
                            var i = o.movingEvent,
                                n = 0,
                                a = 0;
                            ! function() {
                                if (u.Dg) {
                                    var e = t.relativeY,
                                        i = u.Th(t.left).x,
                                        o = t.row,
                                        r = o.evColumns[i],
                                        l = r.events.find(function(t) {
                                            return e < t.part.top + t.part.height + u.eventMarginBottom
                                        });
                                    l || (l = r.events.last()), l && (a = l.part.top, n = DayPilot.indexOf(r.events, l), e - l.part.top > l.part.height / 2 && (a = l.part.top + l.part.height + u.eventMarginBottom / 2, n += 1))
                                } else {
                                    for (var e = t.relativeY, o = t.row, s = 0, d = u.Uc.eventHeight(), c = o.lines.length, h = 0; h < o.lines.length; h++) {
                                        if (o.lines[h].isFree(t.left, u.cellWidth)) {
                                            c = h;
                                            break
                                        }
                                    }
                                    var f = Math.floor((e - s + d / 2) / d),
                                        f = Math.min(c, f),
                                        f = DayPilot.Util.atLeast(0, f);
                                    n = f, a = u.rowMarginTop + n * (u.Uc.eventHeight() + u.eventMarginBottom) + u.eventMarginBottom / 2
                                }
                            }(), a > 0 && (a -= 3);
                            var r = i.cache && "undefined" != typeof i.cache.moveVDisabled ? !i.cache.moveVDisabled : !i.data.moveVDisabled,
                                l = i.cache && "undefined" != typeof i.cache.moveHDisabled ? !i.cache.moveHDisabled : !i.data.moveHDisabled,
                                s = !D.additional().isEmpty();
                            if (s && "Disabled" === u.multiMoveVerticalMode && (r = !1), r)
                                if (this.nj(t.rowIndex)) {
                                    var d = e.row,
                                        c = 1;
                                    if (!d) return;
                                    c = t.rowIndex < d.index ? 1 : -1;
                                    for (var h = t.rowIndex; h !== d.index; h += c) {
                                        var f = this.rowlist[h];
                                        if (!this.nj(h) && !f.hidden) {
                                            e.style.top = f.top + "px", e.style.height = DayPilot.Util.atLeast(f.height, 0) + "px", e.row = f, u.eventMoveToPosition && (n = c > 0 ? 0 : f.lines.length - 1, e.style.top = t.top + a + "px", e.style.height = "3px", e.line = n);
                                            break
                                        }
                                    }
                                } else e.row = t.row, e.style.height = DayPilot.Util.atLeast(t.row.height, 0) + "px", e.style.top = t.top + "px", u.eventMoveToPosition && (e.style.top = t.top + a + "px", e.style.height = "3px", e.line = n);
                            else {
                                for (var d = u.rowlist[i.part.dayIndex], v = d.lines.length, h = 0; h < d.lines.length; h++) {
                                    if (d.lines[h].isFree(t.left, u.cellWidth)) {
                                        v = h;
                                        break
                                    }
                                }
                                if (s || (e.style.height = DayPilot.Util.atLeast(d.height, 0) + "px", e.style.top = d.top + "px"), e.row = d, u.eventMoveToPosition && !s)
                                    if (t.row === d) e.style.top = d.top + a + "px", e.style.height = "3px", e.line = n;
                                    else {
                                        var p = t.rowIndex > d.index && v > 0 ? v * u.Uc.eventHeight() - 3 : 0;
                                        e.style.top = d.top + p + "px", e.style.height = "3px", e.line = 0
                                    }
                            }
                            l ? (e.style.left = t.left + "px", u.eventMoveToPosition ? e.style.width = u.cellWidth + "px" : e.style.width = t.width + "px", e.start = t.start, e.end = t.end) : (e.style.left = i.part.left + "px", e.start = i.start(), e.end = i.rawend(), t.left = i.part.left),
                                function() {
                                    e.overlapping = !1;
                                    var n = e.row,
                                        a = i.data,
                                        r = t.width,
                                        l = t.left,
                                        s = DayPilot.list(D.list).map(function(e) {
                                            return e.event.data
                                        }).add(a);
                                    u.nk(e, n, l, r, s), u.ok(o.movingShadow, e.start, e.end, e.row.id)
                                }(),
                                function() {
                                    var t = u.fa;
                                    if (!t || t.start.getTime() !== e.start.getTime() || t.end.getTime() !== e.end.getTime() || t.resource !== e.row.id) {
                                        t && (DayPilot.Util.removeClass(e, t.cssClass), e.firstChild.innerHTML = ""), D.update();
                                        var r = !!o.drag && i.part.external,
                                            l = {};
                                        l.start = e.start, l.end = u.Uf(e.end), l.duration = new DayPilot.Duration(l.start, l.end), l.e = i, l.external = r, l.resource = e.row.id, l.html = null, l.row = u.Ji(e.row), l.position = e.line, l.overlapping = e.overlapping || D.forbidden, l.allowed = !0, l.left = {}, l.left.html = l.start.toString(u.eventMovingStartEndFormat, R.locale()), l.left.enabled = u.eventMovingStartEndEnabled, l.left.space = 5, l.left.width = null, l.left.height = u.eventHeight, l.right = {}, l.right.html = l.end.toString(u.eventMovingStartEndFormat, R.locale()), l.right.enabled = u.eventMovingStartEndEnabled, l.right.space = 5, l.right.width = null, l.right.height = u.eventHeight, l.multimove = DayPilot.list(D.list), l.shift = u.coords.shift, l.ctrl = u.coords.ctrl, l.meta = u.coords.meta, l.alt = u.coords.alt, l.areaData = DayPilot.Global.movingAreaData, l.link = null, l.cssClass = null, l.html = null;
                                        var s = {};
                                        s.event = i, s.start = l.start, s.end = l.end, s.overlapping = l.overlapping, s.resource = l.resource, l.multimove.splice(0, 0, s), u.fa = l;
                                        var d = {
                                            "start": l.start,
                                            "end": l.end,
                                            "resource": l.resource
                                        };
                                        if ("function" == typeof u.onEventMoving && u.onEventMoving(l), e.allowed = l.allowed, DayPilot.Util.addClass(e, l.cssClass), l.html && (e.firstChild.innerHTML = l.html), l.start !== d.start || l.end !== d.end) {
                                            var c = l.start,
                                                h = u.uf(l.end);
                                            e.start = c, e.end = h;
                                            var f = DayPilot.DateUtil.diff(c, h);
                                            f = DayPilot.Util.atLeast(f, 1);
                                            var v = R.useBox(f),
                                                p = v ? u.getPixels(c).boxLeft : u.getPixels(c).left,
                                                g = v ? u.getPixels(h).boxRight : u.getPixels(h).left;
                                            e.style.left = p + "px", e.style.width = g - p + "px"
                                        }
                                        if (l.resource !== d.resource) {
                                            var y = u.jh(l.resource);
                                            y && (e.row = y, e.style.height = DayPilot.Util.atLeast(y.height, 0) + "px", e.style.top = y.top + "px", u.eventMoveToPosition && (e.style.top = y.top + a + "px", e.style.height = "3px", e.line = n))
                                        }
                                        l.html ? e.firstChild.innerHTML = l.html : e.firstChild.innerHTML = "", u.tk(e, l), u.uk(o.movingShadow, l), l.link && (DayPilot.Global.movingLink && DayPilot.Global.movingLink.clear(), DayPilot.Global.movingLink = m.drawLink2(l.link.from, e, l.link))
                                    }
                                }()
                        }
                    }
                }, this.nk = function(e, t, i, n, a) {
                    if (!u.allowEventOverlap) {
                        ! function() {
                            e.overlapping = !1;
                            for (var o = 0; o < t.lines.length; o++) {
                                if (!t.lines[o].isFree(i, n, a)) return void(e.overlapping = !0)
                            }
                            if (u.allowMultiRange) {
                                var r = t.index;
                                return DayPilot.list(M.list).some(function(t) {
                                    var a = t.div,
                                        o = parseInt(a.style.left),
                                        l = parseInt(a.style.width),
                                        s = t.start.y;
                                    return e !== a && (s === r && DayPilot.Util.overlaps(i, i + n, o, o + l))
                                }) ? void(e.overlapping = !0) : void 0
                            }
                        }();
                        var o = e.overlapping,
                            r = u.A("_shadow_overlap");
                        o ? DayPilot.Util.addClass(e, r) : DayPilot.Util.removeClass(e, r)
                    }
                }, this.ok = function(e, t, i, n) {
                    if (u.cellConfig && u.cellConfig.hasDisabled || u.Mh.vk) {
                        u.Eb(t, i, n) && (e.overlapping = !0);
                        var a = u.A("_shadow_overlap");
                        e.overlapping ? DayPilot.Util.addClass(e, a) : DayPilot.Util.removeClass(e, a)
                    }
                }, this.Eb = function(e, t, i) {
                    var n = null;
                    "Days" === u.viewType && (n = u.Kj(e));
                    var a = u.rows.find(i, n).cells.forRange(e, t);
                    return !!a && a.some(function(e) {
                        return e.properties.disabled
                    })
                }, this.tk = function(e, t) {
                    var i = u.A("_shadow_forbidden");
                    !t.allowed || D.invalid ? DayPilot.Util.addClass(e, i) : DayPilot.Util.removeClass(e, i)
                }, this.uk = function(e, t) {
                    if (this.wk(), e.calendar === u) {
                        var i = {};
                        i.left = parseInt(e.style.left), i.top = parseInt(e.style.top), i.right = i.left + parseInt(e.style.width);
                        var n = t.left.width || 10,
                            a = document.createElement("div");
                        if (a.style.position = "absolute", a.style.left = i.left - n - t.left.space + "px", a.style.top = i.top + "px", a.style.height = t.left.height + "px", a.style.overflow = "hidden", a.style.boxSizing = "border-box", a.innerHTML = t.left.html, a.className = this.A("_event_move_left"), a.onmousemove = u.xk, DayPilot.browser.ie && (a.style.display = "block"), t.left.enabled)
                            if (u.divHover.appendChild(a), t.left.width) a.style.width = n + "px";
                            else {
                                a.style.whiteSpace = "nowrap";
                                var o = a.offsetWidth,
                                    r = i.left - o - t.left.space;
                                a.style.width = o + "px", a.style.left = r + "px";
                                var l = u.nav.scroll.scrollLeft;
                                r < l && u.divHover.removeChild(a);
                                var s = u.yk() + (r - l);
                                s > 0 && (a.style.left = s + "px", a.style.top = i.top - u.nav.scroll.scrollTop + u.Ah() + "px", u.nav.top.appendChild(a), u.elements.hover.push(a))
                            } var n = t.right.width || 10,
                            d = document.createElement("div");
                        if (d.style.position = "absolute", d.style.left = i.right + t.right.space + "px", d.style.top = i.top + "px", d.style.height = t.right.height + "px", d.style.overflow = "hidden", d.style.boxSizing = "border-box", t.right.width ? d.style.width = t.right.width + "px" : d.style.whiteSpace = "nowrap", d.innerHTML = t.right.html, d.className = this.A("_event_move_right"), d.onmousemove = u.xk, DayPilot.browser.ie && (d.style.display = "block"), t.right.enabled) {
                            u.divHover.appendChild(d);
                            var c = u.nav.scroll.scrollWidth;
                            i.right + t.right.space + d.offsetWidth >= c && u.divHover.removeChild(d)
                        }
                    }
                }, this.wk = function() {
                    u.divHover.innerHTML = "", DayPilot.de(u.elements.hover), u.elements.hover = []
                }, this.zk = function() {
                    var e = u.rowHeaderColumnDefaultWidth;
                    this.rowHeaderColumns ? this.rowHeaderCols = DayPilot.Util.propArray(this.rowHeaderColumns, "width", e) : this.rowHeaderCols = null
                }, this.yk = function() {
                    var e = 0;
                    if (this.zk(), this.rowHeaderCols)
                        for (var t = 0; t < this.rowHeaderCols.length; t++) e += this.rowHeaderCols[t];
                    else e = this.rowHeaderWidth;
                    return e
                }, this.Ak = function() {
                    return this.Bk(u.progressiveRowRenderingPreload)
                }, this.Bk = function(e) {
                    var e = e || 0,
                        t = 0,
                        i = u.rowlist.length;
                    if (u.progressiveRowRendering) {
                        var n = u.lh();
                        t = n.yStart, i = n.yEnd + 1, t = DayPilot.Util.atLeast(0, t - e), i = Math.min(u.rowlist.length, i + e)
                    }
                    return {
                        "start": t,
                        "end": i
                    }
                }, this.Ck = function() {
                    if (this.zd()) {
                        var e = !1,
                            t = 0;
                        if (this.rowHeaderWidthAutoFit) {
                            var i = this.divHeader;
                            if (!i) return;
                            if (!i.rows) return;
                            for (var n = [], a = u.Ak(), o = a.start; o < a.end; o++) {
                                var r = i.rows[o];
                                if (r && !r.hidden && !r.autofitDone) {
                                    r.autofitDone = !0;
                                    for (var l = 0; l < r.cells.length; l++) {
                                        var s = r.cells[l].firstChild.firstChild;
                                        if (s && s.style) {
                                            var d = s.style.width,
                                                c = s.style.right,
                                                h = s.style.display;
                                            s.style.position = "absolute", s.style.width = "auto", s.style.right = "auto", s.style.whiteSpace = "nowrap", s.style.display = "block";
                                            var f = s.offsetWidth + 2;
                                            s.style.position = "", s.style.width = d, s.style.right = c, s.style.display = h, s.style.whiteSpace = "", "undefined" == typeof n[l] && (n[l] = 0), n[l] = Math.max(n[l], f)
                                        }
                                    }
                                }
                            }
                            if (this.zk(), this.rowHeaderCols)
                                for (var o = 0; o < n.length; o++) this.rowHeaderCols[o] && (n[o] > this.rowHeaderCols[o] && (this.rowHeaderCols[o] = n[o], e = !0), t += this.rowHeaderCols[o]);
                            else {
                                t = this.rowHeaderWidth;
                                var v = R.splitterWidth();
                                this.rowHeaderWidth < n[0] + u.rowHeaderWidthMarginRight + v && (t = n[0] + u.rowHeaderWidthMarginRight + v, e = !0)
                            }
                        }
                        e && (this.ij && (this.ij.widths = this.rowHeaderCols, this.ij.updateWidths(), DayPilot.Util.updatePropsFromArray(this.rowHeaderColumns, "width", this.rowHeaderCols)), this.rowHeaderCols || (this.rowHeaderWidth = t), this.ji(), this.Dk())
                    }
                }, this.Pg = function() {
                    this.Ek = !0, this.zk();
                    var e = this.yk(),
                        t = this.divHeader;
                    if (t) {
                        if (DayPilot.browser.ie)
                            for (var i = 0; i < t.childNodes.length; i++) DayPilot.de(t.childNodes[i]);
                        u.gj(), t.innerHTML = "", DayPilot.puc(t)
                    } else t = document.createElement("div"), t.onmousemove = function() {
                        u.da()
                    }, this.divHeader = t;
                    if (t.style.width = e + "px", t.style.height = u.Hg + "px", t.rows = [], u.progressiveRowRendering) l();
                    else
                        for (var n = this.rowlist.length, i = 0; i < n; i++) u.Fk(i);
                    u.Gk(), this.divResScroll.appendChild(t), this.rowHeaderWidthAutoFit && this.Ck()
                }, this.ki = function() {
                    if (u.progressiveRowRendering) {
                        for (var e = this.Ak(), t = 0; t < u.rowlist.length; t++) e.start <= t && t < e.end ? u.Fk(t) : u.kj(t);
                        if (this.rowHeaderWidthAutoFit) {
                            var i = u.zh();
                            this.Ck();
                            if (u.zh() !== i) {
                                var n = this.cellWidth;
                                this.Mg();
                                this.cellWidth !== n && (u.Ng(), u.Qg(), u.ya(), u.pa(), u.Hk())
                            }
                        }
                    }
                }, this.Gk = function() {
                    if (!u.Uc.mobile()) {
                        var e = u.divHeader,
                            t = document.createElement("div");
                        t.style.position = "absolute", e.appendChild(t), u.nav.resScrollSpace = t, t.setAttribute("unselectable", "on");
                        var i = document.createElement("div");
                        i.style.position = "relative", i.style.height = "100%", i.className = this.A("_rowheader"), t.appendChild(i);
                        var n = this.yk(),
                            t = u.nav.resScrollSpace;
                        t.style.width = n + "px", t.style.top = this.Hg + "px", t.style.height = u.divResScroll.clientHeight + 20 + "px"
                    }
                }, this.kj = function(e) {
                    var t = u.divHeader.rows[e];
                    if (t) {
                        var i = t.cells[0],
                            n = i.domArgs;
                        if (i.domArgs = null, n && "function" == typeof u.onBeforeRowHeaderDomRemove && u.onBeforeRowHeaderDomRemove(n), n && "function" == typeof u.onBeforeRowHeaderDomAdd && u.jj.reactDOM) {
                            var a = n && n.lj;
                            if (a) {
                                if (DayPilot.Util.isReactComponent(n.element)) {
                                    if (!u.jj.reactDOM) throw new DayPilot.Exception("Can't reach ReactDOM");
                                    u.jj.reactDOM.unmountComponentAtNode(a)
                                }
                            }
                        }
                        DayPilot.de(t.cells), u.divHeader.rows[e] = null
                    }
                }, this.wi = function(e) {
                    this.kj(e), this.Fk(e)
                }, this.ui = function() {
                    return "Standard" === u.rowHeaderColumnsMode || "Tabular" === u.rowHeaderColumnsMode
                }, this.Ik = function(e, t) {
                    var i = e.tags && e.tags[t];
                    return "undefined" != typeof i ? i : e[t]
                }, this.Fk = function(e) {
                    function t() {
                        var t = document.createElement("div");
                        if (u.treeEnabled && !l.isNewRow) {
                            var i = l.level * u.treeIndent + u.treeImageMarginLeft;
                            x && (i += C);
                            var n = u.treeImageWidth,
                                a = u.treeImageHeight;
                            t.style.marginLeft = i + "px", t.style.position = "relative", t.className = u.A("_rowheader_inner_indent");
                            var o = document.createElement("div");
                            o.style.width = n + "px", o.style.height = a + "px", o.style.backgroundRepeat = "no-repeat", o.style.position = "absolute", o.style.top = u.treeImageMarginTop + "px", l.loaded || 0 !== l.children.length ? l.children.length > 0 ? (l.expanded ? o.className = u.A("_tree_image_collapse") : o.className = u.A("_tree_image_expand"), o.style.cursor = "pointer", o.index = e, o.onclick = function(e) {
                                u.Zj(this.index), e = e || window.event, e.cancelBubble = !0
                            }) : o.className = u.A("_tree_image_no_children") : (o.className = u.A("_tree_image_expand"), o.style.cursor = "pointer", o.index = e, o.onclick = function(e) {
                                u.Rk(this.index), e = e || window.event, e.cancelBubble = !0
                            }), t.appendChild(o)
                        }
                        var r = document.createElement("div");
                        if (u.treeEnabled) {
                            var s = u.treeImageMarginRight;
                            r.style.marginLeft = n + s + "px"
                        }
                        r.innerHTML = v.html || v.text || "", r.className = u.A("_rowheader_inner_text"), h.textDiv = r, h.cellDiv = y, t.appendChild(r), k.appendChild(t);
                        var d = v.verticalAlignment || f.verticalAlignment;
                        if (d) switch (k.style.display = "flex", d) {
                            case "center":
                                k.style.alignItems = "center";
                                break;
                            case "top":
                                k.style.alignItems = "flex-start";
                                break;
                            case "bottom":
                                k.style.alignItems = "flex-end"
                        }
                    }
                    var i = u.divHeader,
                        n = this.divHeader;
                    if (!n.rows[e]) {
                        var a = this.rowHeaderCols,
                            o = a ? this.rowHeaderCols.length : 0,
                            r = this.yk(),
                            l = this.rowlist[e];
                        if (l && !l.hidden) {
                            var s = P.J[e],
                                c = this.hk(l);
                            n.rows[e] = {}, n.rows[e].cells = [];
                            var h = document.createElement("div");
                            h.style.position = "absolute", h.style.top = l.top + "px", h.row = l, h.index = e;
                            var f = c.row,
                                v = f,
                                p = u.ui();
                            p && DayPilot.isArray(u.rowHeaderColumns) && (v = c.row.columns[0] || {});
                            var m = a ? a[0] : this.rowHeaderWidth;
                            h.style.width = m + "px", h.style.border = "0px none";
                            var g = v.toolTip || f.toolTip;
                            g && (h.title = g), h.setAttribute("unselectable", "on"), "undefined" != typeof f.ariaLabel ? h.setAttribute("aria-label", f.ariaLabel) : h.setAttribute("aria-label", v.html || v.text || ""), h.onmouseenter = u.Jk, h.onmouseleave = u.Kk, h.onmousemove = u.Lk, h.onmouseout = u.Mk, h.onmouseup = u.Nk, h.oncontextmenu = u.Ok, h.onclick = u.Pk, h.ondblclick = u.Qk;
                            var y = document.createElement("div");
                            y.style.width = m + "px", y.setAttribute("unselectable", "on"), y.className = this.A("_rowheader"), s && DayPilot.Util.addClass(y, u.A("_rowheader_selected")), f.cssClass && DayPilot.Util.addClass(y, f.cssClass), v.cssClass && DayPilot.Util.addClass(y, v.cssClass);
                            var b = v.backColor || f.backColor;
                            b && (y.style.background = b);
                            var w = v.fontColor || f.fontColor;
                            w && (y.style.color = w);
                            var D = v.horizontalAlignment || f.horizontalAlignment;
                            D && (y.style.textAlign = D), y.style.height = l.height + "px", y.style.overflow = "hidden", y.style.position = "relative";
                            var k = document.createElement("div");
                            switch (k.setAttribute("unselectable", "on"), k.className = this.A("_rowheader_inner"), D) {
                                case "right":
                                    k.style.justifyContent = "flex-end";
                                    break;
                                case "left":
                                    k.style.justifyContent = "flex-start";
                                    break;
                                case "center":
                                    k.style.justifyContent = "center"
                            }
                            y.appendChild(k);
                            var x = "Disabled" !== this.rowMoveHandling,
                                C = u.rowDragHandleWidth,
                                A = v.areas || [];
                            x && !f.moveDisabled && A.push({
                                "v": "Hover",
                                "w": C,
                                "bottom": 0,
                                "top": 0,
                                "left": 0,
                                "css": u.A("_rowmove_handle"),
                                "action": "Move"
                            });
                            var S = u.Ji(l);
                            DayPilot.Areas.attach(y, S, {
                                "areas": A,
                                "allowed": function() {
                                    return !d.row
                                }
                            });
                            var E = document.createElement("div");
                            if (E.style.position = "absolute", E.style.bottom = "0px", E.style.width = "100%", E.style.height = "1px", E.className = this.A(T.resourcedivider), y.appendChild(E), t(), h.appendChild(y), function() {
                                    if ("function" == typeof u.onBeforeRowHeaderDomAdd || "function" == typeof u.onBeforeRowHeaderDomRemove) {
                                        var e = h,
                                            t = {};
                                        if (t.control = u, t.row = u.Ji(l), t.element = null, t.target = "Cell", e.domArgs = t, "function" == typeof u.onBeforeRowHeaderDomAdd && u.onBeforeRowHeaderDomAdd(t), t.element) {
                                            var i = null;
                                            switch (t.target && t.target.toLowerCase()) {
                                                case "text":
                                                    i = N;
                                                    break;
                                                case "cell":
                                                    i = k
                                            }
                                            if (i) {
                                                t.lj = i, i.innerHTML = "";
                                                if (DayPilot.Util.isReactComponent(t.element)) {
                                                    if (!u.jj.reactDOM) throw new DayPilot.Exception("Can't reach ReactDOM");
                                                    u.jj.reactDOM.render(t.element, i)
                                                } else i.appendChild(t.element)
                                            }
                                        }
                                    }
                                }(), i.appendChild(h), n.rows[e].cells.push(h),
                                l.columns && 0 !== l.columns.length)
                                for (var H = m, M = p ? 0 : 1, _ = 1; _ < o; _++) {
                                    var v = f.columns[_ - M] || {},
                                        h = document.createElement("div");
                                    h.style.position = "absolute", h.style.top = l.top + "px", h.style.left = H + "px", i.appendChild(h), n.rows[e].cells.push(h), h.row = l, h.index = e;
                                    var R = v.toolTip || f.toolTip;
                                    R && (h.title = R), h.setAttribute("unselectable", "on"), h.onmousemove = u.Lk, h.onmouseout = u.Mk, h.onmouseup = u.Nk, h.oncontextmenu = u.Ok, h.onclick = u.Pk, h.ondblclick = u.Qk;
                                    var y = document.createElement("div"),
                                        B = a[_];
                                    H += B;
                                    var b = v.backColor || f.backColor;
                                    b && (y.style.backgroundColor = b);
                                    var w = v.fontColor || f.fontColor;
                                    w && (y.style.color = w), y.style.width = B + "px", y.style.height = l.height + "px", y.style.overflow = "hidden", y.style.position = "relative", y.setAttribute("unselectable", "on"), DayPilot.Util.addClass(y, this.A("_rowheader")), DayPilot.Util.addClass(y, this.A("_rowheadercol")), DayPilot.Util.addClass(y, this.A("_rowheadercol" + _)), s && DayPilot.Util.addClass(y, u.A("_rowheader_selected")), f.cssClass && DayPilot.Util.addClass(y, f.cssClass), v.cssClass && DayPilot.Util.addClass(y, v.cssClass);
                                    var U = v.horizontalAlignment || f.horizontalAlignment;
                                    U && (y.style.textAlign = U);
                                    var k = document.createElement("div");
                                    switch (k.setAttribute("unselectable", "on"), k.className = this.A("_rowheader_inner"), U) {
                                        case "right":
                                            k.style.justifyContent = "flex-end";
                                            break;
                                        case "left":
                                            k.style.justifyContent = "flex-start";
                                            break;
                                        case "center":
                                            k.style.justifyContent = "center"
                                    }
                                    y.appendChild(k);
                                    var E = document.createElement("div");
                                    E.style.position = "absolute", E.style.bottom = "0px", E.style.width = "100%", E.style.height = "1px", E.className = this.A("_resourcedivider"), y.appendChild(E);
                                    var N = document.createElement("div"),
                                        L = v.html || v.text || "";
                                    N.innerHTML = L, h.textDiv = N, h.cellDiv = y, k.appendChild(N), DayPilot.Areas.attach(y, S, {
                                        "areas": v.areas,
                                        "allowed": function() {
                                            return !d.row
                                        }
                                    }), h.appendChild(y)
                                } else h.colSpan = o > 0 ? o : 1, y.style.width = r + "px"
                        }
                    }
                }, this.Ok = function(e) {
                    if ("Disabled" === u.rowRightClickHandling) return !1;
                    var t = this.row,
                        i = u.Ji(t),
                        n = {};
                    if (n.ctrl = e.ctrlKey, n.shift = e.shiftKey, n.meta = e.metaKey, n.originalEvent = e, n.row = i, n.preventDefault = function() {
                            this.preventDefault.value = !0
                        }, "function" != typeof u.onRowRightClick || (u.onRowRightClick(n), !n.preventDefault.value)) {
                        switch (u.rowRightClickHandling) {
                            case "ContextMenu":
                                t.contextMenu && t.contextMenu.show(i)
                        }
                        return "function" == typeof u.onRowRightClicked && u.onRowRightClicked(n), !1
                    }
                }, this.Pk = function(e) {
                    if (!x.cancelClick) {
                        var t = this.row,
                            i = u.Ji(t, this.index);
                        return t.isNewRow ? void u.Pi.edit(t) : void u.Mi(i, e.ctrlKey, e.shiftKey, e.metaKey)
                    }
                }, this.Qk = function(e) {
                    if (u.timeouts.resClick) {
                        for (var t in u.timeouts.resClick) window.clearTimeout(u.timeouts.resClick[t]);
                        u.timeouts.resClick = null
                    }
                    var i = this.row,
                        n = u.Ji(i, this.index);
                    if (u.Ha()) {
                        var a = {};
                        if (a.resource = n, a.row = n, a.ctrl = e.ctrlKey, a.shift = e.shiftKey, a.meta = e.metaKey, a.preventDefault = function() {
                                this.preventDefault.value = !0
                            }, "function" == typeof u.onRowDoubleClick && (u.onRowDoubleClick(a), a.preventDefault.value)) return;
                        switch (u.rowDoubleClickHandling) {
                            case "PostBack":
                                u.rowDoubleClickPostBack(n);
                                break;
                            case "CallBack":
                                u.rowDoubleClickCallBack(n);
                                break;
                            case "Select":
                                u.Oi(i, e.ctrlKey, e.shiftKey, e.metaKey);
                                break;
                            case "Edit":
                                u.Pi.edit(i)
                        }
                        "function" == typeof u.onRowDoubleClicked && u.onRowDoubleClicked(a)
                    } else switch (u.rowDoubleClickHandling) {
                        case "PostBack":
                            u.rowDoubleClickPostBack(n);
                            break;
                        case "CallBack":
                            u.rowDoubleClickCallBack(n);
                            break;
                        case "JavaScript":
                            u.onRowDoubleClick(n);
                            break;
                        case "Select":
                            u.Oi(i, e.ctrlKey, e.shiftKey, e.metaKey);
                            break;
                        case "Edit":
                            u.Pi.edit(i)
                    }
                }, this.rowDoubleClickPostBack = function(e, t) {
                    var i = {};
                    i.resource = e, this.P("RowDoubleClick", i, t)
                }, this.rowDoubleClickCallBack = function(e, t) {
                    var i = {};
                    i.resource = e, this.R("RowDoubleClick", i, t)
                }, this.Sk = function(e) {
                    if ("Disabled" !== u.timeHeaderClickHandling) {
                        var t = {};
                        t.start = this.cell.start, t.level = this.cell.level, t.end = this.cell.end, t.end || (t.end = new DayPilot.Date(t.start).addMinutes(u.cellDuration)), u.Qi(t)
                    }
                }, this.Tk = function(t) {
                    if ("Disabled" !== u.timeHeaderRightClickHandling) {
                        t.cancelBubble = !0, t.preventDefault ? t.preventDefault() : null;
                        var i = {};
                        if (i.start = this.cell.start, i.level = this.cell.level, i.end = this.cell.end, i.end || (i.end = new DayPilot.Date(i.start).addMinutes(u.cellDuration)), u.Ha()) {
                            var n = {};
                            if (n.header = i, n.preventDefault = function() {
                                    this.preventDefault.value = !0
                                }, "function" == typeof u.onTimeHeaderRightClick && (u.onTimeHeaderRightClick(n), n.preventDefault.value)) return;
                            switch (this.timeHeaderRightClickHandling) {
                                case "PostBack":
                                    u.timeHeaderRightClickPostBack(e);
                                    break;
                                case "CallBack":
                                    u.timeHeaderRightClickCallBack(e)
                            }
                            "function" == typeof u.onTimeHeaderRightClicked && u.onTimeHeaderRightClicked(n)
                        }
                    }
                }, this.Uk = function(e) {
                    var t = u.rowlist[e];
                    if (t.hidden) return 0;
                    var i = t.height;
                    return "number" == typeof t.forcedHeight && (i = t.forcedHeight), i
                }, this.Vk = function(e, t, i) {
                    function n(e) {
                        var i = u.Uk(e),
                            n = t;
                        "hide" === t ? n = 0 : "show" === t && (n = u.rowlist[e].height);
                        var a = n - i;
                        r.push({
                            "i": e,
                            "now": i,
                            "dist": a
                        })
                    }

                    function a(e) {
                        l || (l = e);
                        var t = e - l,
                            n = Math.min(1, t / o);
                        0 === n && (n = .1), r.forEach(function(e) {
                            var t = e.now + e.dist * n;
                            u.rowlist[e.i].forcedHeight = t
                        }), u.Wk(), n < 1 ? window.requestAnimationFrame(a) : "function" == typeof i && i()
                    }
                    var o = 200,
                        r = [];
                    if ("number" == typeof e) n(e);
                    else {
                        if (!DayPilot.isArray(e)) throw new DayPilot.Exception("Unexpected param (must be number/array).");
                        e.forEach(function(e) {
                            n(e)
                        })
                    }
                    var l = 0;
                    window.requestAnimationFrame(a)
                }, this.Ji = function(e) {
                    return new DayPilot.Row(e, u)
                }, this.Lh = function(e) {
                    var t = this.rowlist[e];
                    if (t.events || t.resetEvents(), !t.data) {
                        t.data = {}, t.data.start = new DayPilot.Date(t.start), t.data.startTicks = t.data.start.getTime();
                        var i = this.Ph().getTime() - this.Pa().getTime();
                        t.data.end = R.isResourcesView() ? t.data.start.addTime(i) : t.data.start.addDays(1), t.data.endTicks = t.data.end.getTime(), t.data.offset = t.start.getTime() - this.Pa().getTime(), t.data.i = e
                    }
                }, this.Xk = {}, this.pa = function(e) {
                    if (e ? this.events.list = e : this.events.list || (this.events.list = []), null != this.events.list && !DayPilot.isArray(this.events.list)) throw "DayPilot.Scheduler.events.list expects an array object";
                    k.prepareRows(!0);
                    var t, i = this.events.list,
                        n = "function" == typeof this.onBeforeEventRender,
                        a = "Resources" === u.viewType;
                    u.Xk = {};
                    for (var o = 0; o < i.length; o++) {
                        var r = i[o];
                        if (r) {
                            if ("object" != typeof r) throw new DayPilot.Exception("Event data item must be an object");
                            if (!r.start) throw new DayPilot.Exception("Event data item must specify 'start' property");
                            if (r instanceof DayPilot.Event) throw "DayPilot.Scheduler: DayPilot.Event object detected in events.list array. Use raw event data instead.";
                            var l = "string" == typeof r.id || "number" == typeof r.id,
                                s = "string" == typeof r.recurrentMasterId || "number" == typeof r.recurrentMasterId;
                            if (!l) {
                                var s = "string" == typeof r.recurrentMasterId || "number" == typeof r.recurrentMasterId;
                                if (!s) throw new DayPilot.Exception("All events must have an id property (string or number)")
                            }
                            if (!u.temp.allowDuplicateEventIds) {
                                var d = "_" + r.id;
                                if (!l && s && (d = "#" + r.recurrentMasterId + "#" + new DayPilot.Date(r.start)), u.Xk[d]) throw new DayPilot.Exception("Duplicate event IDs are not allowed: " + d);
                                u.Xk[d] = !0
                            }
                            "Milestone" === r.type && (r.end = r.start), n && this.Ed(o), "*" === r.resource ? t = u.rowlist : a ? t = u.Yk(r.resource).concat(u.Yk("*")) : "Days" === u.viewType ? t = u.rowlist : "Gantt" === u.viewType && (t = u.Yk(r.id));
                            for (var c = 0; t && c < t.length; c++) {
                                var h = t[c],
                                    f = this.yj(r, h);
                                f && n && (f.cache = this.J.events[o])
                            }
                        }
                    }
                    DayPilot.list(u.rowlist).forEach(function(e) {
                        u.Cj(e)
                    }), this.bi()
                }, this.Zk = {};
                var k = this.Zk;
                k.rowcache = {}, k.prepareRows = function(e) {
                    k.rowcache = {};
                    for (var t = 0; t < u.rowlist.length; t++) {
                        var i = u.rowlist[t];
                        if (e && i.resetEvents(), u.Lh(t), i.id) {
                            var n = typeof i.id + "_" + i.id;
                            k.rowcache[n] || (k.rowcache[n] = DayPilot.list()), k.rowcache[n].push(i)
                        }
                    }
                }, k.loadEvent = function(e) {}, this.Yk = function(e) {
                    var t = typeof e + "_" + e;
                    return DayPilot.list(k.rowcache[t])
                }, this.xj = function() {
                    var e = {};
                    if ("Resources" !== u.viewType) return !1;
                    for (var t = 0; t < u.rowlist.length; t++) {
                        var i = u.rowlist[t],
                            n = i.id;
                        if (e[n]) return !0;
                        e[n] = !0
                    }
                    return !1
                }, this.Ed = function(e) {
                    var t = this.J.events,
                        i = this.events.list[e],
                        n = {};
                    i instanceof DayPilot.Event && (i = i.data);
                    for (var a in i) n[a] = i[a];
                    if ("string" == typeof n.start && (n.start = new DayPilot.Date(n.start)), "string" == typeof n.end && (n.end = new DayPilot.Date(n.end)), "function" == typeof this.onBeforeEventRender) {
                        var o = {};
                        o.e = n, o.data = n, this.onBeforeEventRender(o)
                    }
                    t[e] = n
                }, this.$k = function(e) {
                    var t = e.data.container,
                        i = typeof t;
                    return "string" !== i && "number" !== i ? null : typeof t + "_" + t
                }, this.Cj = function(e) {
                    if (e.lines = [], e.sections = null, !e.isNewRow) {
                        this.sortDirections ? e.events.sort(this.Md) : u.Dg || e.events.sort(this.Ld), e.containerCache = {}, e.containers = [], e.events.forEach(function(t) {
                            var i = u.$k(t);
                            if (i) {
                                var n = e.containerCache[i];
                                n || (n = {
                                    "events": [],
                                    "line": null,
                                    "start": null,
                                    "end": null,
                                    "left": null,
                                    "width": null
                                }, e.containerCache[i] = n, e.containers.push(n)), t.part.container = n, n.events.push(t)
                            }
                        }), e.containers.forEach(function(e) {
                            var t = e.events[0],
                                i = e.events[e.events.length - 1];
                            e.start = t.part.start, e.end = i.part.end, e.left = t.part.left, e.width = i.part.right - t.part.left, e.right = i.part.right
                        });
                        if (u.Dg) return void S.loadRow(e);
                        var t = u.groupConcurrentEvents;
                        if (t)
                            for (var i = 0; i < e.blocks.length; i++) e.blocks[i].clear();
                        DayPilot.list(e.events).forEach(function(t) {
                            if (!t.part.height) return e.eventHeight ? void(t.part.height = e.eventHeight) : void(t.part.height = R.eventHeight())
                        });
                        var n = function(e) {
                            return "number" == typeof e.data.line
                        };
                        e.events.filter(n).forEach(function(t) {
                            e.putIntoLine(t)
                        });
                        for (var a = 0; a < e.events.length; a++) {
                            var o = e.events[a];
                            e.putIntoLine(o), t && e.putIntoBlock(o)
                        }
                        for (var r = 0, i = 0; i < e.lines.length; i++) {
                            var l = e.lines[i];
                            l.top = r, r += (l.height || e.eventHeight) * e.eventStackingLineHeight / 100
                        }
                        if (t)
                            for (var a = 0; a < e.blocks.length; a++) {
                                var s = e.blocks[a];
                                s.lines = [], s.events.sort(this.Md);
                                for (var d = 0; d < s.events.length; d++) {
                                    var o = s.events[d];
                                    s.putIntoLine(o)
                                }
                                s.lines.length <= u.groupConcurrentEventsLimit && (s.expanded = !0);
                                var c = DayPilot.list(s.events).map(function(e) {
                                    return e.id()
                                }).some(function(e) {
                                    return DayPilot.contains(u._k, e)
                                });
                                c && (s.expanded = !0);
                                for (var r = 0, i = 0; i < s.lines.length; i++) {
                                    var l = s.lines[i];
                                    l.top = r, r += (l.height || e.eventHeight) * e.eventStackingLineHeight / 100
                                }
                            }
                    }
                }, this.ai = function(e) {
                    e = DayPilot.ua(e);
                    for (var t = 0; t < e.length; t++) {
                        var i = e[t];
                        u.Cj(u.rowlist[i])
                    }
                    if (u.Dg) S.calculateEventPositions();
                    else
                        for (var t = 0; t < e.length; t++) {
                            var i = e[t],
                                n = u.rowlist[i];
                            u.gk(n)
                        }
                }, this.Mj = function() {
                    var e = "Manual" === u.scale ? u.itline[0].start : u.startDate;
                    return DayPilot.list(u.rowlist).some(function(t) {
                        return !!t.start && t.start.getTime() !== new DayPilot.Date(e).getTime()
                    })
                }, this.yj = function(e, t) {
                    if (!t.hideEvents) {
                        var i = new DayPilot.Date(e.start),
                            n = new DayPilot.Date(e.end);
                        n = u.uf(n);
                        var a = i.ticks,
                            o = n.ticks;
                        if (o < a) return null;
                        var r = null;
                        if ("function" == typeof u.onBeforeEventRender) {
                            var l = DayPilot.indexOf(u.events.list, e);
                            r = u.J.events[l]
                        }
                        if (r) {
                            if (r.hidden) return null
                        } else if (e.hidden) return null;
                        var s = !1;
                        switch (this.viewType) {
                            case "Days":
                                s = !(o <= t.data.startTicks || a >= t.data.endTicks) || a === o && a === t.data.startTicks;
                                break;
                            case "Resources":
                                s = (t.id === e.resource || "*" === t.id || "*" === e.resource) && (!(o <= t.data.startTicks || a >= t.data.endTicks) || a === o && a === t.data.startTicks);
                                break;
                            case "Gantt":
                                s = t.id === e.id && !(o <= t.data.startTicks || a >= t.data.endTicks)
                        }
                        if (!s) return null;
                        var d = new DayPilot.Event(e, u);
                        d.part.dayIndex = t.data.i, d.part.start = t.data.startTicks < a ? i : t.data.start, d.part.end = t.data.endTicks > o ? n : t.data.end;
                        var c = this.getPixels(d.part.start.addTime(-t.data.offset)),
                            h = this.getPixels(d.part.end.addTime(-t.data.offset));
                        d.part.start === d.part.end && (h = this.getPixels(d.part.end.addTime(-t.data.offset).addMilliseconds(1))), r && r.height ? d.part.height = r.height : e.height && (d.part.height = e.height), d.part.al = function() {
                            var e = this.height;
                            if (u.eventVersionsEnabled && !DayPilot.list(d.data.versions).isEmpty()) {
                                var t = d.versions.length;
                                e += t * u.eventVersionHeight, e += t * u.eventVersionMargin
                            }
                            return e + u.eventMarginBottom
                        };
                        var f = c.left,
                            v = h.left;
                        if (d.part.startPixels = c, d.part.endPixels = h, f === v) {
                            if (c.cut || h.cut) return null;
                            var p = (d.part.start.addTime(-t.data.offset).getTime() + d.part.end.addTime(-t.data.offset).getTime()) / 2;
                            if (u.getPixels(new DayPilot.Date(Math.floor(p))).cut) return null
                        }
                        d.part.box = R.useBox(o - a);
                        var m = u.eventHeight;
                        if ("Milestone" === e.type) {
                            var g = e.width || m;
                            d.part.end = d.part.start, d.part.left = f - g / 2, d.part.width = g, d.part.barLeft = 0, d.part.barWidth = g
                        } else if (d.part.box) {
                            var y = c.boxLeft,
                                b = h.boxRight;
                            d.part.left = y, d.part.width = b - y, d.part.barLeft = DayPilot.Util.atLeast(f - d.part.left, 0), d.part.barWidth = DayPilot.Util.atLeast(v - f, 1)
                        } else d.part.left = f, d.part.width = DayPilot.Util.atLeast(v - f, 1), d.part.barLeft = 0, d.part.barWidth = DayPilot.Util.atLeast(v - f - 1, 1);
                        var w = u.eventMinWidth;
                        if (d.part.width = Math.max(d.part.width, w), d.part.right = d.part.left + d.part.width, u.eventVersionsEnabled && u.bl(d, t), "function" == typeof u.onEventFilter && u.events.Kd) {
                            var D = {};
                            if (D.filter = u.events.Kd, D.visible = !0, D.e = d, u.onEventFilter(D), !D.visible) return null
                        }
                        return t.events.push(d), d
                    }
                }, this.bl = function(e, t) {
                    e.versions = [];
                    var i = e.data,
                        n = DayPilot.list(i.versions);
                    if (!n.isEmpty()) {
                        var a = e.part.left,
                            o = e.part.left + e.part.width;
                        n.forEach(function(i) {
                            var n = new DayPilot.Date(i.start),
                                r = new DayPilot.Date(i.end),
                                l = u.getPixels(n.addTime(-t.data.offset)),
                                s = u.getPixels(r.addTime(-t.data.offset));
                            n.ticks === r.ticks && (s = u.getPixels(r.addTime(-t.data.offset).addTime(1)));
                            var d = l.left,
                                c = s.left;
                            if (d === c && (l.cut || s.cut)) return null;
                            var h = {};
                            h.left = d, h.continueLeft = n < t.data.start, h.right = c, h.continueRight = r > t.data.end, h.width = c - d, e.versions.push(h), h.left < a && (a = h.left), h.right > o && (o = h.right)
                        }), u.eventVersionsReserveSpace ? (e.part.versionsLeft = a, e.part.versionsRight = o, e.part.versionsWidth = o = a) : (e.part.versionsLeft = e.part.left, e.part.versionsRight = e.part.left + e.part.width, e.part.versionsWidth = e.part.width)
                    }
                }, this.Ld = function(e, t) {
                    if (!(e && t && e.start && t.start)) return 0;
                    var i = e.start().ticks - t.start().ticks;
                    return 0 !== i ? i : t.end().ticks - e.end().ticks
                }, this.Md = function(e, t) {
                    if (!e || !t) return 0;
                    var i = e.cache || e.data,
                        n = t.cache || t.data;
                    if (!(i.sort && i.sort.length > 0 && n.sort && n.sort.length > 0)) return u.Ld(e, t);
                    for (var a = 0, o = 0; 0 === a && "undefined" != typeof i.sort[o] && "undefined" != typeof n.sort[o];) a = i.sort[o] === n.sort[o] ? 0 : "number" == typeof i.sort[o] && "number" == typeof n.sort[o] ? i.sort[o] - n.sort[o] : u.Nd(i.sort[o], n.sort[o], u.sortDirections[o]), o++;
                    return a
                }, this.Nd = function(e, t, i) {
                    var n = "desc" !== i,
                        a = n ? -1 : 1,
                        o = -a;
                    if (null === e && null === t) return 0;
                    if (null === t) return o;
                    if (null === e) return a;
                    var r = [];
                    return r[0] = e, r[1] = t, r.sort(), e === r[0] ? a : o
                }, this.Oi = function(e, t, i, n) {
                    if (u.Ha()) {
                        var a = DayPilot.indexOf(u.rowlist, e),
                            o = u.Ji(e, a),
                            r = DayPilot.indexOf(x.selected, e) !== -1,
                            l = r ? "deselected" : "selected",
                            s = {};
                        if (s.row = o, s.selected = r, s.ctrl = t, s.shift = i, s.meta = n, s.preventDefault = function() {
                                this.preventDefault.value = !0
                            }, "function" == typeof u.onRowSelect && (u.onRowSelect(s), s.preventDefault.value)) return;
                        var d = i && !t && !n;
                        if (i || (x.cl = {
                                "row": e,
                                "index": a
                            }), d) {
                            x.fixRowSelectLast();
                            var c = x.cl.index,
                                h = a;
                            x.selectRange(c, h)
                        }
                        switch (u.rowSelectHandling) {
                            case "PostBack":
                                u.rowSelectPostBack(o, l);
                                break;
                            case "CallBack":
                                u.rowSelectCallBack(o, l);
                                break;
                            case "Notify":
                                !d && x.select(e, t, i, n), u.rowSelectNotify(o, l);
                                break;
                            case "Update":
                                !d && x.select(e, t, i, n)
                        }
                        "function" == typeof u.onRowSelected && (s.selected = DayPilot.indexOf(x.selected, e) !== -1, u.onRowSelected(s))
                    } else {
                        x.select(e, t, i);
                        var a = DayPilot.indexOf(u.rowlist, e),
                            o = u.Ji(e, a),
                            r = DayPilot.indexOf(x.selected, e) !== -1,
                            l = r ? "deselected" : "selected";
                        switch (u.rowSelectHandling) {
                            case "PostBack":
                                u.rowSelectPostBack(o, l);
                                break;
                            case "CallBack":
                                u.rowSelectCallBack(o, l);
                                break;
                            case "Notify":
                                u.rowSelectNotify(o, l);
                                break;
                            case "JavaScript":
                                u.onRowSelect(o, l)
                        }
                    }
                }, this.rowSelectPostBack = function(e, t, i) {
                    var n = {};
                    n.resource = e, n.change = t, this.P("RowSelect", n, i)
                }, this.rowSelectCallBack = function(e, t, i) {
                    var n = {};
                    n.resource = e, n.change = t, this.R("RowSelect", n, i)
                }, this.rowSelectNotify = function(e, t, i) {
                    var n = {};
                    n.resource = e, n.change = t, this.R("RowSelect", n, i, "Notify")
                }, this.rows = {}, this.rows.selection = {};
                var P = this.rows.selection;
                P.J = [], P.get = function() {
                    var e = [];
                    return DayPilot.list(x.selected).forEach(function(t) {
                        e.push(u.Ji(t))
                    }), e
                }, P.clear = function() {
                    x.clearSelection()
                }, P.add = function(e) {
                    if (!e || !e.isRow) throw "DayPilot.Scheduler.rows.selection.add(): DayPilot.Row object expected";
                    DayPilot.list(x.selected).some(function(t) {
                        return t === e.$.row
                    }) || (x.selected.push(e.$.row), P.dl(), x.fl(e.$.row))
                }, P.remove = function(e) {
                    if (!e || !e.isRow) throw "DayPilot.Scheduler.rows.selection.remove(): DayPilot.Row object expected";
                    P.isSelected(e) && (DayPilot.rfa(x.selected, e.$.row), P.dl(), x.fl(e.$.row))
                }, P.isSelected = function(e) {
                    if (!e || !e.isRow) throw "DayPilot.Scheduler.rows.selection.isSelected(): DayPilot.Row object expected";
                    return DayPilot.indexOf(x.selected, e.$.row) !== -1
                }, P.dl = function() {
                    u.selectedRows = DayPilot.list(x.selected).map(function(e) {
                        return e.id
                    }), P.J = [], x.selected.forEach(function(e) {
                        P.J[e.index] = !0
                    })
                }, this.rows.all = function() {
                    for (var e = DayPilot.list(), t = 0; t < u.rowlist.length; t++) {
                        var i = u.Ji(u.rowlist[t]);
                        e.push(i)
                    }
                    return e
                }, this.rows.visible = function() {
                    for (var e = DayPilot.list(), t = 0; t < u.rowlist.length; t++) {
                        var i = u.rowlist[t];
                        if (!i.hidden) {
                            var i = u.Ji(u.rowlist[t]);
                            e.push(i)
                        }
                    }
                    return e
                }, this.rows.each = function(e) {
                    u.rows.all().forEach(e)
                }, this.rows.forEach = function(e) {
                    u.rows.all().forEach(e)
                }, this.rows.filter = function(e, t) {
                    u.rows.Kd = e, t || u.L && u.gc({
                        "immediateEvents": !0
                    })
                }, this.rows.sort = function(e) {
                    if ("string" == typeof e) u.rows.gl = {
                        "field": e,
                        "direction": "asc"
                    };
                    else if ("object" == typeof e) {
                        var t = DayPilot.Util.copyProps(e);
                        t.order || (t.order = "asc"), u.rows.gl = t
                    } else u.rows.gl = null;
                    u.L && u.gc({
                        "immediateEvents": !0
                    })
                }, this.rows.hl = function() {
                    var e = u.rows.gl;
                    return e ? e.field : null
                }, this.rows.il = function() {
                    var e = u.rows.gl;
                    return e ? e.order : "asc"
                }, this.rows.find = function(e, t) {
                    if ("string" == typeof e || "number" == typeof e || !e && t) {
                        var i = u.Yk(e);
                        e || (i = u.rowlist);
                        var n = null;
                        return "string" == typeof t || t instanceof DayPilot.Date ? (t = new DayPilot.Date(t), n = i.find(function(e) {
                            return t === e.start
                        })) : n = i.first(), n ? new DayPilot.Row(n, u) : null
                    }
                    if ("function" != typeof e) throw new DayPilot.Exception("Invalid rows.find() argument: id or function expected");
                    var a = t || 0,
                        o = u.rowlist.find(function(t, i) {
                            return !(i < a) && e(u.Ji(t))
                        });
                    if (o) return u.Ji(o)
                }, this.rows.load = function(e, t, i) {
                    if (!e) throw new DayPilot.Exception("rows.load(): 'url' parameter required");
                    var n = function(e) {
                            var t = {};
                            t.exception = e.exception, t.request = e.request, "function" == typeof i && i(t)
                        },
                        a = function(e) {
                            var i, a = e.request;
                            try {
                                i = JSON.parse(a.responseText)
                            } catch (e) {
                                var o = {};
                                return o.exception = e, void n(o)
                            }
                            if (DayPilot.isArray(i)) {
                                var r = {};
                                if (r.preventDefault = function() {
                                        this.preventDefault.value = !0
                                    }, r.data = i, "function" == typeof t && t(r), r.preventDefault.value) return;
                                u.resources = i, u.L && u.update()
                            }
                        };
                    u.rowsLoadMethod && "POST" === u.rowsLoadMethod.toUpperCase() ? DayPilot.ajax({
                        "method": "POST",
                        "url": e,
                        "success": a,
                        "error": n
                    }) : DayPilot.ajax({
                        "method": "GET",
                        "url": e,
                        "success": a,
                        "error": n
                    })
                }, this.rows.expand = function(e) {
                    for (var t = [], i = e || 1, n = 0; n < u.rowlist.length; n++) {
                        var a = u.rowlist[n],
                            o = i === -1;
                        a.level < i && (o = !0), o && !a.expanded && a.children && a.children.length > 0 && t.push(a.index)
                    }
                    if (0 !== t.length)
                        if (1 === t.length) u.Zj(t[0]);
                        else {
                            for (var n = 0; n < t.length; n++) {
                                var r = t[n],
                                    l = u.rowlist[r].resource;
                                l.expanded = !0
                            }
                            u.gc()
                        }
                }, this.rows.expandAll = function() {
                    u.rows.expand(-1)
                }, this.rows.collapseAll = function() {
                    u.rowlist.forEach(function(e) {
                        e.resource.expanded = !1
                    }), u.gc()
                }, this.rows.headerHide = function() {
                    u.jl = !0, u.kl(), u.Dk(), u.Fh()
                }, this.rows.headerShow = function() {
                    u.jl = !1, u.kl(), u.Dk(), u.Fh()
                }, this.rows.headerToggle = function() {
                    u.jl ? u.rows.headerShow() : u.rows.headerHide()
                }, this.rows.edit = function(e) {
                    x.edit(e.$.row)
                }, this.rows.remove = function(e) {
                    var t = e.$.row.resource,
                        i = C.findParentArray(t);
                    if (!i) throw "Cannot find source node parent";
                    var n = DayPilot.indexOf(i, t);
                    i.splice(n, 1), u.update()
                }, this.rows.update = function(e) {
                    if (!(e instanceof DayPilot.Row)) throw new DayPilot.Exception("DayPilot.Scheduler.rows.update() expects a DayPilot.Row object.");
                    var t = e.index,
                        i = u.rowlist[t],
                        n = e.data,
                        a = e.parent() ? e.parent().$.row : null,
                        o = u.ll(n),
                        e = u.ml(o, a);
                    e.hidden = i.hidden, e.level = i.level, e.children = i.children, e.index = t, e.top = i.top, e.height = i.height, u.rowlist[t] = e, e.resetEvents(), u.Lh(t), u.nl(e), u.Cj(e), u.wi(t), u.Ug(), u.Xg()
                }, this.nl = function(e) {
                    for (var t = u.events.list, i = t.length, n = "function" == typeof u.onBeforeEventRender, a = 0; a < i; a++) {
                        var o = t[a];
                        if (o) {
                            if (o instanceof DayPilot.Event) throw new DayPilot.Exception("DayPilot.Scheduler: DayPilot.Event object detected in events.list array. Use raw event data instead.");
                            if ("Days" === u.viewType) throw new DayPilot.Exception(".rows.update() not supported for viewType = 'Days'.");
                            if ("Gantt" === u.viewType) throw new DayPilot.Exception(".rows.update() not supported for viewType = 'Gantt'.");
                            if ("*" === o.resource || "*" === e.id || o.resource === e.id) {
                                n && this.Ed(a);
                                var r = this.yj(o, e);
                                r && n && (r.cache = this.J.events[a])
                            }
                        }
                    }
                }, this.ol = function() {
                    var e = d.source,
                        t = d.target,
                        i = d.position,
                        n = d.sourceCalendar;
                    if (x.resetMoving(), u.Ha()) {
                        var a = {};
                        if (a.source = u.Ji(e), a.source.calendar = n, a.target = u.Ji(t), a.position = i, a.preventDefault = function() {
                                this.preventDefault.value = !0
                            }, "function" == typeof u.onRowMove && (u.onRowMove(a), a.preventDefault.value)) return;
                        switch (u.rowMoveHandling) {
                            case "Update":
                                x.move(a);
                                break;
                            case "CallBack":
                                u.rowMoveCallBack(a.source, a.target, a.position);
                                break;
                            case "PostBack":
                                u.rowMovePostBack(a.source, a.target, a.position);
                                break;
                            case "Notify":
                                x.move(a), u.rowMoveNotify(a.source, a.target, a.position)
                        }
                        "function" == typeof u.onRowMoved && u.onRowMoved(a)
                    } else {
                        var e = u.Ji(e),
                            t = u.Ji(t),
                            i = i;
                        switch (u.rowMoveHandling) {
                            case "CallBack":
                                u.rowMoveCallBack(e, t, i);
                                break;
                            case "PostBack":
                                u.rowMovePostBack(e, t, i);
                                break;
                            case "JavaScript":
                                u.onRowMove(e, t, i)
                        }
                    }
                }, this.ah = function(e) {
                    var t = DayPilot.list(e);
                    x.selected = [], t.isEmpty() || (u.Bg = !1, u.oa()), t.forEach(function(e) {
                        var t = u.jh(e);
                        t && x.selected.push(t)
                    }), x.pl()
                }, this.Pi = {};
                var x = this.Pi;
                x.edit = function(e) {
                    x.ql(e)
                }, x.rowSelectLastSetDefault = function() {
                    x.cl = {
                        "row": u.rowlist[0],
                        "index": 0
                    }
                }, x.rowSelectSetLast = function(e) {
                    var t = DayPilot.indexOf(u.rowlist, e);
                    if (t === -1) throw "DayPilot.Scheduler: Row not found when selecting a range";
                    x.cl = {
                        "row": e,
                        "index": t
                    }
                }, x.fixRowSelectLast = function() {
                    x.cl || x.rowSelectLastSetDefault();
                    var e = DayPilot.indexOf(u.rowlist, x.cl.row);
                    if (!(e > -1)) {
                        var t = u.jh(x.cl.row.id);
                        t ? (e = DayPilot.indexOf(u.rowlist, t), x.cl = {
                            "row": t,
                            "index": e
                        }) : x.rowSelectLastSetDefault()
                    }
                }, x.createOverlay = function(e) {
                    var t = u.yk(),
                        i = u.A("_rowmove_source"),
                        n = DayPilot.Util.div(u.divHeader, 0, e.top, t, e.height);
                    n.className = i, e.moveOverlay = n
                }, x.deleteOverlay = function(e) {
                    e && (DayPilot.de(e.moveOverlay), e.moveOverlay = null)
                }, x.ql = function(e) {
                    var t = x.rl(e),
                        i = t.cells[0];
                    if (i.input) return i.input;
                    DayPilot.Areas.disable(i.firstChild);
                    var n = i.clientWidth;
                    e.isNewRow && (n = u.zh());
                    var a = document.createElement("textarea");
                    a.style.position = "absolute", a.style.top = "0px", a.style.left = "0px", a.style.width = n + "px", a.style.height = e.height + "px", a.style.border = "0px none", a.style.overflow = "hidden", a.style.boxSizing = "border-box", a.style.resize = "none", a.style.paddingLeft = e.level * u.treeIndent + "px";
                    var o = i.textDiv;
                    a.style.fontFamily = DayPilot.gs(o, "fontFamily") || DayPilot.gs(o, "font-family"), a.style.fontSize = DayPilot.gs(o, "fontSize") || DayPilot.gs(o, "font-size"), a.value = e.name || "", i.firstChild.appendChild(a), i.input = a;
                    var r = function() {
                        try {
                            i.input.parentNode.removeChild(i.input)
                        } catch (e) {
                            l()
                        }
                        i.input = null
                    };
                    return a.focus(), a.onblur = function() {
                        a.onblur = null;
                        var t = a.value;
                        r(), DayPilot.Areas.enable(i.firstChild), u.Li(e, t, a.canceled)
                    }, a.onkeydown = function(e) {
                        var t = window.event ? event.keyCode : e.keyCode;
                        return 27 === t && (a.canceled = !0, r()), 13 !== t || (a.onblur(), !1)
                    }, a.setSelectionRange ? a.setSelectionRange(0, 9999) : a.select(), a
                }, x.selected = [], x.select = function(e, t, i, n) {
                    var a = DayPilot.indexOf(x.selected, e) !== -1;
                    if (t || n) {
                        if (a) return DayPilot.rfa(x.selected, e), P.dl(), void x.fl(e)
                    } else a = !1, x.clearSelection();
                    a || x.selected.push(e), P.dl(), x.fl(e)
                }, x.selectRange = function(e, t) {
                    x.clearSelection();
                    for (var i = Math.min(e, t), n = Math.max(e, t), a = i; a <= n; a++) {
                        var o = u.rowlist[a];
                        x.selected.push(o)
                    }
                    P.dl();
                    for (var a = i; a <= n; a++) x.fl(o)
                }, x.pl = function() {
                    for (var e = 0; e < x.selected.length; e++) {
                        var t = x.selected[e];
                        x.fl(t)
                    }
                }, x.fl = function(e) {
                    var t = DayPilot.indexOf(u.rowlist, e);
                    if (t === -1) {
                        var i = u.jh(e.id);
                        if (!i) return;
                        t = i.index
                    }
                    u.Bi(t), u.Xg(), u.kj(t), u.Fk(t)
                }, x.Vi = function() {
                    var e = [];
                    if (!x.selected) return e;
                    for (var t = 0; t < x.selected.length; t++) {
                        var i = x.selected[t],
                            n = DayPilot.indexOf(u.rowlist, i),
                            a = u.Ji(i, n);
                        e.push(a.toJSON())
                    }
                    return e
                }, x.cl = null, x.clearSelection = function() {
                    var e = x.selected;
                    if (x.selected = [], u.selectedRows = [], P.J = [], e.length <= 5) e.forEach(function(e) {
                        x.fl(e)
                    });
                    else {
                        u.Ug(), u.Xg();
                        for (var t = 0; t < u.rowlist.length; t++) u.divHeader.rows[t] && u.wi(t)
                    }
                }, x.rl = function(e) {
                    for (var t = u.divHeader, i = 0; i < t.rows.length; i++) {
                        var n = t.rows[i];
                        if (n && n.cells[0] && n.cells[0].row === e) return n
                    }
                    return null
                }, x.selectById = function(e) {
                    var t = u.jh(e);
                    t && x.select(t)
                }, x.startMoving = function(e) {
                    var t = DayPilot.Global.rowmoving;
                    t.row = e, t.sourceCalendar = u, t.cursor = u.divResScroll.style.cursor, u.divResScroll.style.cursor = "move", x.createOverlay(e)
                }, x.resetMoving = function() {
                    u.divResScroll.style.cursor = d.cursor, DayPilot.de(d.div), x.deleteOverlay(d.row), DayPilot.Global.rowmoving = d = {}
                }, x.move = function(e) {
                    var t = e.source.$.row.resource,
                        i = e.target.$.row.resource,
                        n = e.position;
                    if ("forbidden" !== n) {
                        var a = e.source.calendar.sl.findParentArray(t);
                        if (!a) throw "Cannot find source node parent";
                        var o = DayPilot.indexOf(a, t);
                        a.splice(o, 1);
                        var r = C.findParentArray(i);
                        if (!r) throw "Cannot find target node parent";
                        var l = DayPilot.indexOf(r, i);
                        switch (n) {
                            case "before":
                                r.splice(l, 0, t);
                                break;
                            case "after":
                                r.splice(l + 1, 0, t);
                                break;
                            case "child":
                                i.children || (i.children = [], i.expanded = !0), i.children.push(t)
                        }
                        u.update()
                    }
                };
                var C = {};
                this.sl = C, C.findParentArray = function(e) {
                    return C.findInArray(u.resources, e)
                }, C.findInArray = function(e, t) {
                    if (DayPilot.indexOf(e, t) !== -1) return e;
                    for (var i = 0; i < e.length; i++) {
                        var n = e[i];
                        if (n.children && n.children.length > 0) {
                            var a = C.findInArray(n.children, t);
                            if (a) return a
                        }
                    }
                    return null
                }, this.Og = function() {
                    this.rowlist = DayPilot.list();
                    var e = this.resources,
                        t = this.C();
                    t || ("Gantt" === this.viewType ? e = this.ul() : "Days" === this.viewType && (e = this.vl())), !t || "Days" !== this.viewType || e && 0 !== e.length || (e = this.vl());
                    var i = {};
                    if (i.i = 0, null != e && !DayPilot.isArray(e)) throw "DayPilot.Scheduler.resources expects an array object";
                    this.wl(e, i, 0, null, this.treeEnabled, !1), "Disabled" !== u.rowCreateHandling && this.xl()
                }, this.xl = function() {
                    var e = {};
                    e.id = "NEW", e.isNewRow = !0, e.html = "", e.index = u.rowlist.length, e.loaded = !0, e.start = this.startDate, e.children = [], e.height = u.eventHeight, e.marginBottom = 0, e.marginTop = 0, e.getHeight = function() {
                        return u.rowCreateHeight ? u.rowCreateHeight : u.eventHeight + u.rowMarginBottom + u.rowMarginTop
                    }, e.putIntoLine = function() {}, e.resetEvents = function() {}, this.rowlist.push(e)
                }, this.ul = function() {
                    var e = [];
                    if (this.Ig && this.resources)
                        for (var t = 0; t < this.resources.length; t++) e.push(this.resources[t]);
                    if (this.events.list) {
                        for (var t = 0; t < this.events.list.length; t++) {
                            var i = this.events.list[t],
                                n = {};
                            n.id = i.id, n.name = i.text, n.columns = i.columns, e.push(n)
                        }
                        return e
                    }
                }, this.vl = function() {
                    for (var e = [], t = u.Pa(), i = this.Uc.locale(), n = 0; n < this.days; n++) {
                        var a = t.addDays(n);
                        if (u.showNonBusiness || u.businessWeekends || 0 != a.dayOfWeek() && 6 != a.dayOfWeek()) {
                            var o = {};
                            o.name = a.toString(i.datePattern, i), o.start = a, e.push(o)
                        }
                    }
                    return e
                }, this.Pa = function() {
                    return this.itline && this.itline.length > 0 ? this.itline[0].start : this.startDate
                }, this.Ph = function() {
                    if (this.itline && this.itline.length > 0) {
                        var e = u.itline[this.itline.length - 1].end;
                        return "Days" !== u.viewType ? e : e.addDays(u.days - 1)
                    }
                    return u.startDate.addDays(u.days)
                }, this.visibleStart = function() {
                    return this.Pa()
                }, this.visibleEnd = function() {
                    return this.Ph()
                }, this.ml = function(e, t) {
                    var i = {};
                    if (i.backColor = e.backColor, i.fontColor = e.fontColor, i.cssClass = e.cssClass, i.expanded = e.expanded, i.name = e.name, i.html = e.html ? e.html : i.name, i.eventHeight = "undefined" != typeof e.eventHeight ? e.eventHeight : u.Uc.eventHeight(), i.minHeight = "undefined" != typeof e.minHeight ? e.minHeight : u.rowMinHeight, i.marginBottom = "undefined" != typeof e.marginBottom ? e.marginBottom : u.rowMarginBottom, i.marginTop = "undefined" != typeof e.marginTop ? e.marginTop : u.rowMarginTop, i.eventStackingLineHeight = "undefined" != typeof e.eventStackingLineHeight ? e.eventStackingLineHeight : u.eventStackingLineHeight, i.loaded = !e.dynamicChildren, i.id = e.id || e.value, i.toolTip = e.toolTip, i.children = [], i.columns = [], i.start = e.start ? new DayPilot.Date(e.start) : this.Pa(), i.isParent = e.isParent, i.contextMenu = e.contextMenu ? DayPilot.Util.evalVariable(e.contextMenu) : this.contextMenuResource, i.areas = e.areas, i.moveDisabled = e.moveDisabled, i.bubbleHtml = e.bubbleHtml, i.cellsDisabled = e.cellsDisabled, i.tags = e.tags, i.task = e.task, i.swimlane = e.swimlane, i.hideEvents = e.hideEvents, i.height = i.eventHeight, i.resource = e.yl, i.lines = [], i.blocks = [], i.containers = [], i.containerCache = {}, i.isRow = !0, i.getHeight = function() {
                            var e = 0;
                            if (u.groupConcurrentEvents)
                                for (var t = 0; t < this.blocks.length; t++) {
                                    var i = this.blocks[t];
                                    e = Math.max(e, i.getHeight())
                                } else if (this.lines.length > 0) {
                                    var n = this.lines.length - 1,
                                        a = this.lines[n],
                                        o = a.height || this.eventHeight,
                                        r = a.top || 0;
                                    e = r + o
                                } return 0 === e && (e = this.eventHeight), e > this.minHeight ? e : this.minHeight
                        }, i.zl = function() {
                            var e = i.start.getTime() - u.Pa().getTime();
                            return u.itline[u.itline.length - 1].end.addTime(e)
                        }, i.resetEvents = function() {
                            var e = this;
                            e.events = DayPilot.list(), e.events.forRange = function(t, i) {
                                t = new DayPilot.Date(t), i = i ? new DayPilot.Date(i) : e.zl();
                                for (var n = DayPilot.list(), a = 0; a < e.events.length; a++) {
                                    var o = e.events[a];
                                    DayPilot.Util.overlaps(o.start(), o.end(), t, i) && n.push(o)
                                }
                                return n
                            }
                        }, i.calculateUtilization = function() {
                            function e() {
                                for (var e = [], t = 0; t < i.events.length; t++) {
                                    var n = i.events[t];
                                    DayPilot.contains(e, n.start().toString()) || e.push(n.start().toString()), DayPilot.contains(e, n.rawend().toString()) || e.push(n.rawend().toString())
                                }
                                return e.sort(), e
                            }

                            function t() {
                                for (var t = e(), n = [], a = {
                                        "start": i.data.start
                                    }, o = 0; o < t.length; o++) a.end = new DayPilot.Date(t[o]), n.push(a), a = {
                                    "start": new DayPilot.Date(t[o])
                                };
                                return a.end = i.data.end, n.push(a), n.forRange = function(e, t) {
                                    for (var i = DayPilot.list(), n = 0; n < this.length; n++) {
                                        var a = this[n];
                                        DayPilot.Util.overlaps(e, t, a.start, a.end) && i.push(a)
                                    }
                                    return i.maxSum = function(e) {
                                        for (var t = 0, i = 0; i < this.length; i++) {
                                            var n = this[i],
                                                a = n.sum(e);
                                            a > t && (t = a)
                                        }
                                        return t
                                    }, i
                                }, n
                            }
                            for (var i = this, n = i.sections = t(), a = 0; a < n.length; a++) {
                                var o = n[a];
                                o.events = DayPilot.list();
                                for (var r = 0; r < i.events.length; r++) {
                                    var l = i.events[r];
                                    DayPilot.Util.overlaps(o.start, o.end, l.start(), l.rawend()) && o.events.push(l)
                                }
                                o.sum = function(e) {
                                    for (var t = 0, i = 0; i < this.events.length; i++) {
                                        var n = this.events[i],
                                            a = 0;
                                        "undefined" == typeof e ? a = 1 : n.tag(e) ? a = n.tag(e) : n.data[e] && (a = n.data[e]), "number" == typeof a && (t += a)
                                    }
                                    return t
                                }
                            }
                        }, i.Al = function() {
                            var e = [];
                            return e.height = 0, e.add = function(t) {
                                this.push(t);
                                var i = t.part.al();
                                i > e.height && (e.height = i)
                            }, e.isFree = function(e, t, i) {
                                for (var n = e + t - 1, a = this.length, o = 0; o < a; o++) {
                                    var r = this[o];
                                    if (!(n < r.part.left || e > r.part.left + r.part.width - 1)) {
                                        if (DayPilot.contains(i, r.data)) continue;
                                        return !1
                                    }
                                    if (r.part.container && !(n < r.part.container.left || e > r.part.container.left + r.part.container.width - 1)) return !1;
                                    if (u.eventVersionsReserveSpace && !(n < r.part.versionsLeft || e > r.part.versionsRight - 1)) return !1
                                }
                                return !0
                            }, e
                        }, i.findFreeLine = function(e, t, n) {
                            if ("number" == typeof n) {
                                for (var a = 0; a <= n; a++) this.lines[a] || (this.lines[a] = i.Al());
                                return n
                            }
                            if ("dedicated" === n) {
                                var o = i.Al();
                                return o.isFree = function() {
                                    return !1
                                }, this.lines.push(o), this.lines.length - 1
                            }
                            for (var a = 0; a < this.lines.length; a++) {
                                var o = this.lines[a];
                                if (o.isFree(e, t)) return a
                            }
                            var o = i.Al();
                            return this.lines.push(o), this.lines.length - 1
                        }, i.putIntoLine = function(e) {
                            var t = e.part.container;
                            if (t) {
                                if (null === t.line && ("number" == typeof e.data.line || "dedicated" === e.data.line)) return n = i.findFreeLine(t.left, t.width, e.data.line), this.lines[n].add(e), t.line = n, n
                            } else if ("number" == typeof e.data.line || "dedicated" === e.data.line) return n = i.findFreeLine(e.part.left, e.part.width, e.data.line), this.lines[n].add(e), n;
                            var n = -1;
                            if (t) {
                                if (null !== t.line) return this.lines[t.line].add(e), t.line;
                                n = i.findFreeLine(t.left, t.width), t.line = n
                            } else n = u.eventVersionsReserveSpace ? i.findFreeLine(e.part.versionsLeft, e.part.versionsWidth) : i.findFreeLine(e.part.left, e.part.width);
                            return this.lines[n].add(e), n
                        }, i.putIntoBlock = function(e) {
                            for (var t = 0; t < this.blocks.length; t++) {
                                var i = this.blocks[t];
                                if (DayPilot.indexOf(i.events, e) !== -1) return;
                                if (i.overlapsWith(e.part.left, e.part.width)) return i.events.push(e), e.part.block = i, i.min = Math.min(i.min, e.part.left), i.max = Math.max(i.max, e.part.left + e.part.width), t
                            }
                            var i = {};
                            i.expanded = !1, i.row = this, i.events = DayPilot.list(), i.lines = DayPilot.list(), i.putIntoLine = function(e) {
                                for (var t = 0; t < this.lines.length; t++) {
                                    var i = this.lines[t];
                                    if (i.isFree(e.part.left, e.part.width)) return i.add(e), t
                                }
                                var i = [];
                                i.height = 0, i.add = function(e) {
                                    this.push(e), e.part.height > i.height && (i.height = e.part.height)
                                }, i.isFree = function(e, t) {
                                    for (var i = e + t - 1, n = this.length, a = 0; a < n; a++) {
                                        var o = this[a];
                                        if (!(i < o.part.left || e > o.part.left + o.part.width - 1)) return !1
                                    }
                                    return !0
                                }, i.add(e), this.lines.push(i)
                            }, i.overlapsWith = function(e, t) {
                                return !(e + t - 1 < this.min || e > this.max - 1)
                            }, i.getHeight = function() {
                                if (!this.expanded) return u.eventHeight;
                                if (this.lines.length > 0) {
                                    var e = this.lines.length - 1,
                                        t = this.lines[e],
                                        i = t.height || u.eventHeight;
                                    return (t.top || 0) + i
                                }
                                return u.eventHeight
                            }, i.clear = function() {
                                i.events = DayPilot.list(), i.min = null, i.max = null
                            }, i.events.push(e), e.part.block = i, i.min = e.part.left, i.max = e.part.left + e.part.width, this.blocks.push(i)
                        }, i.Bl = !1, i.Cl = t, i.nc = function() {
                            this.hidden = !this.Dl(), this.Bl = !1, this.Cl && this.Cl.nc()
                        }, i.Dl = function() {
                            return !this.Cl || this.Cl.Dl() && this.Cl.expanded
                        }, e.columns)
                        for (var n = 0; n < e.columns.length; n++) i.columns.push(e.columns[n]);
                    return i
                }, this.pi = function() {
                    u.rowlist.forEach(function(e) {
                        if ("function" == typeof u.onRowFilter && u.rows.Kd) {
                            var t = e.Cl,
                                i = {};
                            i.visible = !0, i.row = u.Ji(e), i.filter = u.rows.Kd, u.onRowFilter(i), e.Bl = !i.visible, i.visible ? t && t.nc() : e.hidden = !0
                        }
                    })
                }, this.El = function(e) {
                    return !e.some(function(e) {
                        return e.children && e.children.length
                    })
                }, this.wl = function(e, t, i, n, a, o) {
                    if (e) {
                        var r = !1;
                        if (u.rows.gl && (r = u.El(e)), r) {
                            var l = u.rows.hl(),
                                s = "desc" === u.rows.il(),
                                d = DayPilot.list(e, !0);
                            d.sort(function(e, t) {
                                var i = u.Ik(e, l),
                                    n = u.Ik(t, l),
                                    a = 0;
                                return a = i === n ? 0 : "number" == typeof i && "number" == typeof n ? i - n : u.Nd(i, n, "asc"), s ? -a : a
                            }), e = d
                        }
                        for (var c = 0; c < e.length; c++)
                            if (e[c]) {
                                var h = {};
                                if (h.level = i, h.hidden = o, h.index = t.i, !e[c].hidden) {
                                    var f = this.ll(e[c], h),
                                        v = u.ml(f, n);
                                    if (o && (v.hidden = !0), v.level = i, v.index = t.i, null !== n && n.children.push(t.i), this.rowlist.push(v), t.i++, a && f.children && f.children.length) {
                                        var p = o || !v.expanded;
                                        this.wl(f.children, t, i + 1, v, !0, p)
                                    }
                                }
                            }
                    }
                }, this.Fl = ["text", "html", "backColor", "cssClass", "areas", "horizontalAlignment"], this.hk = function(e) {
                    if (e.isNewRow) return {
                        "row": {
                            "cssClass": u.A("_row_new"),
                            "moveDisabled": !0,
                            "html": u.rowCreateHtml || ""
                        }
                    };
                    var t = {};
                    if (t.row = this.Ji(e), DayPilot.Util.copyProps(e, t.row, ["html", "backColor", "fontColor", "cssClass", "toolTip", "contextMenu", "moveDisabled"]), t.row.columns = DayPilot.Util.createArrayCopy(e.columns, u.Fl), t.row.areas = DayPilot.Util.createArrayCopy(e.areas), "undefined" == typeof t.row.columns && u.rowHeaderColumns && u.rowHeaderColumns.length > 0) {
                        r.columns = [];
                        for (var i = 0; i < u.rowHeaderColumns.length; i++) r.columns.push({})
                    }
                    return "function" == typeof this.onBeforeRowHeaderRender && this.onBeforeRowHeaderRender(t), t
                }, this.ll = function(e, t) {
                    var i = this.Gl(e, t);
                    if ("function" == typeof this.onBeforeResHeaderRender) {
                        var n = {};
                        n.resource = i, this.onBeforeResHeaderRender(n)
                    }
                    return i
                }, this.Gl = function(e, t) {
                    var i = {
                        get data() {
                            return this.yl
                        }
                    };
                    for (var n in t) i[n] = t[n];
                    for (var n in e) i[n] = e[n];
                    if ("undefined" == typeof e.html && (i.html = e.name), u.rowHeaderColumns && u.rowHeaderColumns.length > 0 && "undefined" == typeof i.columns)
                        if (i.columns = [], u.ui())
                            for (var a = 0; a < u.rowHeaderColumns.length; a++) {
                                var o = u.rowHeaderColumns[a],
                                    r = u.Ik(e, o.display);
                                i.columns.push({
                                    "text": r
                                })
                            } else
                                for (var a = 0; a < u.rowHeaderColumns.length; a++) i.columns.push({});
                    return i.yl = e, i
                }, this.ni = function() {
                    this.nav.top.dp = this, this.nav.top.innerHTML = "", DayPilot.Util.addClass(this.nav.top, this.A("_main")), this.nav.top.setAttribute("role", "region"), this.nav.top.setAttribute("aria-label", "scheduler"), DayPilot.browser.ie9 && DayPilot.Util.addClass(this.nav.top, this.A("_browser_ie9")), DayPilot.browser.ie8 && DayPilot.Util.addClass(this.nav.top, this.A("_browser_ie8")), this.nav.top.style.MozUserSelect = "none", this.nav.top.style.KhtmlUserSelect = "none", this.nav.top.style.webkitUserSelect = "none", this.nav.top.style.WebkitTapHighlightColor = "rgba(0,0,0,0)", this.nav.top.style.WebkitTouchCallout = "none", this.width && (this.nav.top.style.width = this.width), "Parent100Pct" === this.heightSpec && (this.nav.top.style.height = "100%"), this.nav.top.style.lineHeight = "1.2", this.nav.top.style.position = "relative", this.visible || (this.nav.top.style.display = "none"), this.nav.top.onmousemove = this.vg, this.nav.top.onmouseout = function() {
                        u._j()
                    }, this.nav.top.ontouchstart = E.onMainTouchStart, this.nav.top.ontouchmove = E.onMainTouchMove, this.nav.top.ontouchend = E.onMainTouchEnd, this.hideUntilInit && this.backendUrl && (this.nav.top.style.visibility = "hidden");
                    var e = this.zh(),
                        t = "Top" === u.timeHeaderPosition;
                    if (u.mi = u.timeHeaderPosition, "DivBased" === this.Uc.layout()) {
                        var i = document.createElement("div");
                        i.style.position = "absolute", i.style.left = "0px", i.style.width = e + "px";
                        var n = document.createElement("div");
                        n.style.height = "1px", n.className = this.A("_divider_horizontal"), this.nav.dh1 = n, this.nav.left = i, "Top" === u.timeHeaderPosition ? (i.appendChild(this.Wc()), i.appendChild(n), i.appendChild(this.Hl())) : "Bottom" === u.timeHeaderPosition ? (i.appendChild(this.Hl()), i.appendChild(n), i.appendChild(this.Wc())) : i.appendChild(this.Hl());
                        var a = document.createElement("div");
                        a.style.position = "absolute", a.style.left = e + "px", a.style.width = R.splitterWidth() + "px", a.style.height = this.Ah() + this.yc() + "px", a.className = this.A("_divider") + " " + this.A("_splitter"), a.setAttribute("unselectable", "on"), this.nav.divider = a, this.rowHeaderScrolling && this.Il();
                        var o = document.createElement("div");
                        o.style.marginLeft = e + R.splitterWidth() + "px", o.style.marginRight = "1px", o.style.position = "relative", this.nav.right = o;
                        var r = document.createElement("div");
                        r.style.height = "1px", t && (r.style.position = "absolute", r.style.top = this.Ah() + "px"), r.style.width = "100%", r.className = this.A("_divider_horizontal"), this.nav.dh2 = r, "Top" === u.timeHeaderPosition ? (o.appendChild(this.Jl()), o.appendChild(r), o.appendChild(this.Kl())) : "Bottom" === u.timeHeaderPosition ? (o.appendChild(this.Kl()), o.appendChild(r), o.appendChild(this.Jl())) : o.appendChild(this.Kl());
                        var l = document.createElement("div");
                        l.style.clear = "left", this.nav.top.appendChild(i), this.nav.top.appendChild(a), this.nav.top.appendChild(o), this.nav.top.appendChild(l)
                    } else {
                        var s = document.createElement("table");
                        s.cellPadding = 0, s.cellSpacing = 0, s.border = 0, s.style.position = "absolute";
                        var d = s.insertRow(-1);
                        d.insertCell(-1).appendChild(this.Wc()), d.insertCell(-1).appendChild(this.Jl());
                        var c = s.insertRow(-1);
                        c.insertCell(-1).appendChild(this.Hl()), c.insertCell(-1).appendChild(this.Kl()), this.nav.top.appendChild(s)
                    }
                    if (this.of = document.createElement("div"), this.of.style.display = "none", this.nav.top.appendChild(this.of), this.W()) {
                        var h = document.createElement("input");
                        h.type = "hidden", h.id = this.id + "_state", h.name = this.id + "_state", this.nav.state = h, this.nav.top.appendChild(h)
                    }
                    var f = document.createElement("div");
                    f.style.position = "absolute", f.style.left = this.zh() + R.splitterWidth() + 5 + "px", f.style.top = this.Ah() + 5 + "px", f.style.display = "none", f.innerHTML = this.loadingLabelText, DayPilot.Util.addClass(f, this.A("_loading")), this.nav.loading = f, this.nav.top.appendChild(f), this.Ll()
                }, this.vg = function(e) {
                    if (d.row) {
                        var t = DayPilot.mo3(u.divHeader, e),
                            i = u.aj(t.y),
                            n = u.rowlist[i.i];
                        if (!n) return;
                        if (n.isNewRow) return;
                        var a = t.y - i.top,
                            r = i.bottom - i.top,
                            l = r / 3,
                            s = 2 * l,
                            c = r / 2,
                            h = "before",
                            f = n.children && n.children.length > 0,
                            v = function() {
                                for (var e = i.i, t = n.level; e >= 0;) {
                                    var a = u.rowlist[e];
                                    if (e--, !(t <= a.level)) {
                                        if (a === d.row) return !0;
                                        if (0 === a.level) return !1;
                                        t = a.level
                                    }
                                }
                                return !1
                            }(),
                            p = u.treeEnabled;
                        h = v || i.i === d.row.index ? "forbidden" : p ? f ? a < c ? "before" : "child" : a < l ? "before" : a < s ? "child" : "after" : f ? "before" : a < c ? "before" : "after", d.row.moveDisabled && (h = "forbidden"), d.calendar = u, d.source = d.row, d.target = u.rowlist[i.i], d.position = h;
                        if (function() {
                                return !d.last || (d.last.target !== d.target || d.last.position !== d.position)
                            }()) {
                            if ("function" == typeof u.onRowMoving) {
                                var m = {};
                                m.source = u.Ji(d.source), m.target = u.Ji(d.target), m.position = h, u.onRowMoving(m), d.position = m.position
                            }
                        } else d.last && (d.position = d.last.position);
                        d.last = {}, d.last.target = d.target, d.last.position = d.position,
                            function() {
                                d.div && DayPilot.de(d.div);
                                var e = i.top,
                                    t = d.position,
                                    n = u.rowlist[i.i],
                                    a = n.level,
                                    o = a * u.treeIndent;
                                switch (t) {
                                    case "before":
                                        e = i.top;
                                        break;
                                    case "child":
                                        e = i.top + c;
                                        break;
                                    case "after":
                                        e = i.bottom;
                                        break;
                                    case "forbidden":
                                        e = i.top + c
                                }
                                var r = u.yk() - o,
                                    l = document.createElement("div");
                                l.style.position = "absolute", l.style.left = o + "px", l.style.width = r + "px", l.style.top = e + "px", l.className = u.A("_rowmove_position_" + t), d.div = l, u.divResScroll.appendChild(l)
                            }()
                    } else if (o.splitting) {
                        var g = DayPilot.mo3(u.nav.top, e).x,
                            y = u.yk(),
                            b = g - 1;
                        u.rowHeaderCols && (b = Math.min(y, g - 1)), u.rowHeaderWidth = b, u.jl = !1, u.rowHeaderCols || u.Ml(), u.kl()
                    }
                }, this.qa = function() {
                    var e = this.Ah(),
                        t = "Top" === u.timeHeaderPosition;
                    this.nav.corner && (this.nav.corner.style.height = e + "px"), this.divTimeScroll && (this.divTimeScroll.style.height = e + "px"), this.divNorth && (this.divNorth.style.height = e + "px"), this.nav.dh1 && this.nav.dh2 && t && (this.nav.dh1.style.top = e + "px", this.nav.dh2.style.top = e + "px"), this.nav.loading.style.top = e + 5 + "px", t && (this.nav.scroll.style.top = e + 1 + "px")
                }, this.zh = function() {
                    if (this.jl) return 0;
                    var e = 0;
                    return e = this.rowHeaderScrolling ? this.rowHeaderWidth : this.yk()
                }, this.Il = function() {
                    var e = this.nav.divider;
                    e.style.cursor = "col-resize", e.setAttribute("unselectable", "on"), e.onmousedown = function(e) {
                        var t = o.splitting = {};
                        return t.cursor = u.nav.top.style.cursor, t.cleanup = function() {
                            if (u.nav.top.style.cursor = t.cursor, "function" == typeof u.onRowHeaderResized) {
                                var e = {};
                                u.onRowHeaderResized(e)
                            }
                        }, u.nav.top.style.cursor = "col-resize", !1
                    }
                }, this.kl = function() {
                    var e = R.splitterWidth(),
                        t = this.zh();
                    if (this.nav.corner && (this.nav.corner.style.width = t + "px"), this.nav.corner && (this.divCorner.style.width = t + "px"), this.divResScroll.style.width = t + "px", "DivBased" === R.layout() && (this.nav.left.style.width = t + "px", this.nav.divider.style.left = t - e + "px", this.nav.right.style.marginLeft = t + "px"), this.nav.message && (this.nav.message.style.left = u.yh() + "px"), this.nav.loading && (this.nav.loading.style.left = t + e + 5 + "px"), this.nav.hideIcon) {
                        var i = this.nav.hideIcon,
                            n = u.A("_header_icon_show"),
                            a = u.A("_header_icon_hide");
                        i.style.left = t - 1 + "px", u.jl ? (DayPilot.Util.removeClass(i, a), DayPilot.Util.addClass(i, n)) : (DayPilot.Util.removeClass(i, n), DayPilot.Util.addClass(i, a))
                    }
                }, this.Ml = function() {
                    this.zk();
                    var e = this.yk(),
                        t = function(e, t, i) {
                            if (e && e.style) {
                                var n = e.firstChild;
                                u.Ek ? (e.style.width = t + "px", n.style.width = t + "px", "number" == typeof i && (e.style.left = i + "px")) : n.style.width = t + "px"
                            }
                        },
                        i = this.divHeader;
                    i.style.width = e + "px";
                    for (var n = u.Ak(), a = n.start; a < n.end; a++) {
                        var o = i.rows[a];
                        if (o) {
                            var r = o.cells[0];
                            if (r.colSpan > 1) {
                                var r = o.cells[0];
                                t(r, e)
                            } else if (this.rowHeaderCols)
                                for (var l = 0, s = 0; s < o.cells.length; s++) {
                                    var d = this.rowHeaderCols[s],
                                        r = o.cells[s];
                                    t(r, d, l), l += d
                                } else {
                                    var d = this.rowHeaderWidth,
                                        r = o.cells[0];
                                    t(r, d)
                                }
                        }
                    }
                    u.nav.resScrollSpace && (u.nav.resScrollSpace.style.width = e + "px"), this.ea()
                }, this.ji = function() {
                    this.kl(), this.Ml()
                }, this.ii = function() {
                    var e = u.nav.corner,
                        t = this.rowHeaderColumns,
                        i = document.createElement("div");
                    i.style.position = "absolute", i.style.bottom = "0px", i.style.left = "0px", i.style.width = "100%", i.style.height = R.headerHeight() + "px", i.style.overflow = "hidden", u.nav.columnScroll = i;
                    var n = document.createElement("div");
                    n.style.position = "absolute", n.style.bottom = "0px", n.style.left = "0px", n.style.width = "5000px", n.style.height = R.headerHeight() + "px", n.style.overflow = "hidden", n.className = this.A("_columnheader"), i.appendChild(n);
                    var a = document.createElement("div");
                    a.style.position = "absolute", a.style.top = "0px", a.style.bottom = "0px", a.style.left = "0px", a.style.right = "0px", a.className = this.A("_columnheader_inner"), n.appendChild(a), u.ij && (u.ij.dispose(), u.ij = null);
                    var o = new DayPilot.Splitter(a);
                    o.enabled = u.rowHeaderColumnsResizable, o.widths = DayPilot.Util.propArray(t, "width", u.rowHeaderColumnDefaultWidth), o.height = R.headerHeight(), o.css.title = this.A("_columnheader_cell"), o.css.titleInner = this.A("_columnheader_cell_inner"), o.css.splitter = this.A("_columnheader_splitter");
                    var r = u.rows.hl(),
                        l = u.rows.il();
                    o.titles = DayPilot.list(t).map(function(e) {
                        var t = e.html || e.text || e.name || e.title || "",
                            i = {};
                        if (e.sort) {
                            var n = u.A("_sorticon");
                            r === e.sort ? (n += " " + u.A("_sorticon_active"), n += "asc" === l ? " " + u.A("_sorticon_asc") : " " + u.A("_sorticon_desc")) : n += " " + u.A("_sorticon_asc"), i.areas = [{
                                right: 5,
                                top: 0,
                                bottom: 0,
                                width: 10,
                                cssClass: n,
                                onClick: function(t) {
                                    var i = {};
                                    i.field = e.sort, r === e.sort ? i.order = "asc" === u.rows.il() ? "desc" : "asc" : i.order = "asc", u.rows.sort(i)
                                }
                            }]
                        }
                        return i.html = t, i
                    }), o.data = DayPilot.list(t, !0), o.updating = function(e) {
                        u.ch.skip = !0, DayPilot.Util.updatePropsFromArray(u.rowHeaderColumns, "width", this.widths), u.ji(), "Auto" === u.cellWidthSpec
                    }, o.updated = function(e) {
                        if (u.Dk(), u.Ha()) {
                            if ("function" == typeof u.onRowHeaderColumnResized) {
                                var t = {};
                                t.column = u.rowHeaderColumns[e.index], u.onRowHeaderColumnResized(t)
                            }
                        } else switch (u.rowHeaderColumnResizedHandling) {
                            case "CallBack":
                                break;
                            case "PostBack":
                                break;
                            case "JavaScript":
                                if ("function" == typeof u.onRowHeaderColumnResized) {
                                    var t = {};
                                    t.column = u.rowHeaderColumns[e.index], u.onRowHeaderColumnResized(t)
                                }
                        }
                    }, o.color = "#000000", o.opacity = 30, o.init(), e.appendChild(i), this.ij = o
                }, this.qi = function() {
                    var e = this.nav.corner;
                    if (e) {
                        e.innerHTML = "", e.className = this.A("_corner");
                        var t = document.createElement("div");
                        if (t.style.position = "absolute", t.style.top = "0px", t.style.left = "0px", t.style.right = "0px", t.style.bottom = "0px", t.className = this.A("_corner_inner"), this.divCorner = t, t.innerHTML = "&nbsp;", this.rowHeaderColumns && this.rowHeaderColumns.length > 0) {
                            var i = document.createElement("div");
                            i.style.position = "absolute", i.style.top = "0px", i.style.left = "0px", i.style.right = "0px", i.style.bottom = R.headerHeight() + 1 + "px", e.appendChild(i);
                            var n = document.createElement("div");
                            n.style.position = "absolute", n.style.left = "0px", n.style.right = "0px", n.style.height = "1px", n.style.bottom = R.headerHeight() + "px", n.className = this.A("_divider"), e.appendChild(n), i.appendChild(t), this.ii()
                        } else e.appendChild(t);
                        var a = document.createElement("div");
                        a.style.position = "absolute", a.style.padding = "2px", a.style.top = "0px", a.style.left = "1px", a.style.backgroundColor = "#FF6600", a.style.color = "white", a.innerHTML = "\u0044\u0045" + "\u004D\u004F", DayPilot.Util.isNullOrUndefined(undefined) && e.appendChild(a)
                    }
                }, this.Ll = function() {
                    var e = 3,
                        t = this.zh() + R.splitterWidth() - 1,
                        i = 10,
                        n = 20,
                        a = this.Ah() + e,
                        o = DayPilot.Util.div(this.nav.top, t, a, i, n);
                    o.style.cursor = "pointer", o.className = u.A("_header_icon"), DayPilot.Util.addClass(o, u.A("_header_icon_hide")), o.onclick = function() {
                        u.rows.headerToggle()
                    }, this.nav.hideIcon = o
                }, this.ri = function() {
                    u.nav.hideIcon && (u.rowlist.length > 0 && u.rowHeaderHideIconEnabled ? u.nav.hideIcon.style.display = "" : u.nav.hideIcon.style.display = "none")
                }, this.Wc = function() {
                    var e = this.zh(),
                        t = document.createElement("div");
                    return u.nav.corner = t, t.style.width = e + "px", t.style.height = this.Ah() + "px", t.style.overflow = "hidden", t.style.position = "relative", t.setAttribute("unselectable", "on"), t.onmousemove = function() {
                        u.da()
                    }, t.oncontextmenu = function() {
                        return !1
                    }, this.qi(), t
                }, this.Ah = function() {
                    if ("None" === u.timeHeaderPosition) return 0;
                    if (u.timeHeaders) {
                        var e = B.timeHeader(u.timeHeaders.length - 1);
                        return e.top + e.height
                    }
                    return this.timeHeader ? u.timeHeader.length * R.headerHeight() : 0
                }, this.Nl = null, this.Ol = function() {
                    return u.scrollStep || u.eventHeight
                }, this.Hl = function() {
                    var e = document.createElement("div");
                    e.style.width = this.zh() + "px", e.style.height = this.yc() + "px", e.style.overflow = "hidden", e.style.position = "relative", e.className = u.A("_rowheader_scroll");
                    var t = u.Ol(),
                        i = u.Uc.mobile();
                    return i && !a && (e.style.overflowY = "auto"), e.onmousemove = function() {
                        u.da()
                    }, e.onscroll = function() {
                        if (u.nav.columnScroll && u.rowHeaderScrolling && (u.nav.columnScroll.scrollLeft = e.scrollLeft), u.Nl && clearTimeout(u.Nl), i) {
                            var t = function() {
                                var t = u.ak() - u.nav.scroll.offsetHeight;
                                e.scrollTop = Math.min(e.scrollTop, t), u.nav.scroll.scrollTop = e.scrollTop
                            };
                            a || (u.Nl = setTimeout(t, 10))
                        } else u.Nl = setTimeout(function() {
                            u.nav.scroll.scrollTop = e.scrollTop
                        }, 500)
                    }, e.addEventListener("wheel", function(i) {
                        var n;
                        n = u.overrideWheelScrolling || u.scrollStep ? i.deltaY > 0 ? t : -t : i.deltaY, u.nav.scroll.scrollTop = e.scrollTop + n, i.preventDefault && i.preventDefault()
                    }, !1), e.oncontextmenu = function() {
                        return !1
                    }, e.onmouseenter = function() {
                        u.rowHeaderScrolling && (e.style.overflowX = "auto")
                    }, e.onmouseleave = function() {
                        u.rowHeaderScrolling && (e.style.overflowX = "hidden")
                    }, e.setAttribute("role", "region"), e.setAttribute("aria-label", "scheduler rows"), this.divResScroll = e, this.Eh = e, e
                }, this.Pl = function(e) {
                    if ("TableBased" === R.layout()) {
                        var t = parseInt(this.width, 10),
                            i = isNaN(t) || this.width.indexOf("%") !== -1,
                            n = (/MSIE/i.test(navigator.userAgent), this.yk());
                        i ? this.nav.top && this.nav.top.offsetWidth > 0 && (e.style.width = this.nav.top.offsetWidth - 6 - n + "px") : e.style.width = t - n + "px"
                    }
                }, this._e = function(e) {
                    u.Sg(), u.bh()
                }, this.Sg = function() {
                    "TableBased" === u.Uc.layout() && (u.Pl(u.nav.scroll), u.Pl(u.divTimeScroll)), u.ya(), u.Dk(), u.Ql(), u.J.drawArea = null
                }, this.Rl = null, this.ej = null, this.Sl = function() {
                    u.watchWidthChanges && (u.ej || (this.ej = setInterval(function() {
                        return u.nav && u.nav.top ? (u.Rl || (u.Rl = {}, u.Rl.counter = 0, u.Rl.changed = !1, u.Rl.width = u.nav.top.offsetWidth), u.Rl.width !== u.nav.top.offsetWidth && (u.Rl.changed = !0, u.Rl.counter = 0, u.Rl.width = u.nav.top.offsetWidth), u.Rl.changed && (u.Rl.counter += 1), void(u.Rl.changed && u.Rl.counter > 2 && (u.Rl.changed = !1, u.Sg(), u.bh()))) : void clearInterval(u.ej)
                    }, 200)))
                }, this.Ql = function() {
                    var e = u.rangeHold;
                    u.clearSelection(), u.rangeHold = e, u.Fi(e, !0)
                }, this.Dk = function() {
                    u.L && "Auto" === u.cellWidthSpec && (u.Mg(), u.Ng(), u.Qg(), u.Ug(), u.Vg(), u.Y(), u.pa(), u.Rg(), u.Tg(), u.bi(), u.Da(), u.Xg(), u.Yg(), u.ya())
                }, this.Mg = function() {
                    if ("Auto" === this.cellWidthSpec) {
                        var e = this.nav.top.clientWidth,
                            t = this.zh(),
                            i = u.Tl(),
                            n = e - t - i;
                        if (this.ck()) {
                            var a = n / this.ck();
                            this.cellWidth = Math.max(a, u.cellWidthMin), u.Dh = a < u.cellWidthMin
                        }
                    }
                }, this.Tl = function() {
                    if ("Auto" === u.heightSpec) return 0;
                    if ("Max" === u.heightSpec || "Fixed" === u.heightSpec || "Parent100Pct" === u.heightSpec) {
                        return u.ak() > u.height ? DayPilot.sw(u.nav.scroll) : 0
                    }
                    return DayPilot.sw(u.nav.scroll)
                }, this.Hh = function() {
                    var e = this.nav.top.clientWidth,
                        t = this.zh(),
                        i = this.yc(),
                        n = this.ak(),
                        a = "Auto" === u.heightSpec,
                        o = 0;
                    return n > i && !a && (o = DayPilot.swa()), e - t - 2 - o
                }, this.Jl = function() {
                    var e = "Top" === u.timeHeaderPosition,
                        t = document.createElement("div");
                    t.style.overflow = "hidden", t.style.display = "block", e ? (t.style.position = "absolute", t.style.top = "0px") : t.style.position = "relative", t.style.width = "100%", t.style.height = this.Ah() + "px", t.style.overflow = "hidden", t.onmousemove = function() {
                        u.da(), u.cellBubble && u.cellBubble.delayedHide()
                    }, this.Pl(t), this.divTimeScroll = t;
                    var i = document.createElement("div");
                    return i.style.width = this.wh() + 5e3 + "px", this.divNorth = i, t.appendChild(i), t
                }, this.yc = function() {
                    var e = 0,
                        t = u.heightSpec;
                    return "Fixed" === t || "Parent100Pct" === t ? this.height ? this.height : 0 : (e = u.ak(), ("Max" === t || "Max100Pct" === t) && e > u.height ? u.height : e)
                }, this.Ul = null, this.Vl = 0, this.Wl = 0, this.Xl = 0, this.Fh = function() {
                    if ("function" == typeof u.onHeightChanged || "function" == typeof u.onDimensionsChanged) {
                        u.Ul && clearTimeout(u.Ul);
                        var e = function() {
                            var e = u.nav.top.offsetHeight,
                                t = u.Vl;
                            u.Vl = e;
                            var i = u.nav.top.offsetWidth,
                                n = u.Wl;
                            u.Wl = i;
                            var a = u.zh(),
                                o = u.Xl;
                            if (u.Xl = a, "function" == typeof u.onHeightChanged && e !== t) {
                                var r = {};
                                r.oldHeight = t, r.newHeight = e, u.onHeightChanged(r)
                            }
                            if ("function" == typeof u.onDimensionsChanged && (e !== t || i !== n || a !== o)) {
                                var r = {};
                                r.oldHeight = t, r.newHeight = e, r.oldWidth = n, r.newWidth = i, r.oldRowHeaderWidth = o, r.newRowHeaderWidth = a, u.onDimensionsChanged(r)
                            }
                        };
                        u.Ul = setTimeout(e, 100)
                    }
                }, this.ak = function() {
                    var e;
                    return this.Hg !== -1 ? (e = this.Hg, this.Hg > 0 && "auto" === u.nav.scroll.style.overflowX && (e += DayPilot.sh(u.nav.scroll))) : e = this.rowlist.length * this.Uc.eventHeight(), e
                }, this.da = function() {
                    u.Yl && (this.ea(), this.Zl(), this.$l(), this.wk(), this._j(), u.cellBubble && u.cellBubble.hideOnMouseOut(), u.bubble && u.bubble.hideOnMouseOut(), u.Yl = !1)
                }, this.Kl = function() {
                    var e = document.createElement("div");
                    if (e.style.overflow = "auto", e.style.overflowX = "auto", e.style.overflowY = "auto", e.style.height = this.yc() + "px", "Top" === u.timeHeaderPosition ? (e.style.top = this.Ah() + 1 + "px", e.style.position = "absolute") : e.style.position = "relative", e.style.width = "100%", e.className = this.A("_scrollable"), e.oncontextmenu = function() {
                            return !1
                        }, this.Pl(e), u.overrideWheelScrolling) {
                        var t = u.Ol();
                        e.onwheel = function(i) {
                            var n = i.deltaY > 0 ? t : -t;
                            u.nav.scroll.scrollTop = e.scrollTop + n, i.preventDefault && i.preventDefault()
                        }, e.onmousewheel = function(i) {
                            i = i || window.event;
                            var n = i.wheelDelta < 0 ? t : -t;
                            u.nav.scroll.scrollTop = e.scrollTop + n, i.preventDefault && i.preventDefault(), i.returnValue = !1
                        }
                    }
                    this.nav.scroll = e, this.gh = document.createElement("div"), this.gh.style.MozUserSelect = "none", this.gh.style.KhtmlUserSelect = "none", this.gh.style.webkitUserSelect = "none", this.gh.daypilotMainD = !0, this.gh.calendar = this, n && (this.gh.style.webkitTransform = "translateZ(0px)"), this.gh.style.position = "absolute";
                    var i = this.wh();
                    return i > 0 && !isNaN(i) && (this.gh.style.width = i + "px"), this.gh.setAttribute("unselectable", "on"), this.gh.onmousedown = this._l, this.gh.onmousemove = this.xk, this.gh.onmouseup = this.bm, this.gh.oncontextmenu = this.cm, this.gh.ondblclick = this.dm, this.gh.className = this.A("_matrix"), this.divStretch = document.createElement("div"), this.divStretch.style.position = "absolute", this.divStretch.style.height = "1px", this.gh.appendChild(this.divStretch), this.divCells = document.createElement("div"), this.divCells.style.position = "absolute", this.divCells.oncontextmenu = this.cm, this.gh.appendChild(this.divCells), this.divLines = document.createElement("div"), this.divLines.style.position = "absolute", this.divLines.oncontextmenu = this.cm, this.gh.appendChild(this.divLines), this.divBreaks = document.createElement("div"), this.divBreaks.style.position = "absolute", this.divBreaks.oncontextmenu = this.cm, this.gh.appendChild(this.divBreaks), this.divSeparators = document.createElement("div"), this.divSeparators.style.position = "absolute", this.divSeparators.oncontextmenu = this.cm, this.gh.appendChild(this.divSeparators), this.divLinksBelow = document.createElement("div"), this.divLinksBelow.style.position = "absolute", this.gh.appendChild(this.divLinksBelow), this.divCrosshair = document.createElement("div"), this.divCrosshair.style.position = "absolute", this.divCrosshair.ondblclick = this.dm, this.divCrosshair.onmousedown = this.pd, this.gh.appendChild(this.divCrosshair), this.divRange = document.createElement("div"), this.divRange.style.position = "absolute", this.divRange.oncontextmenu = this.cm, this.gh.appendChild(this.divRange), this.divEvents = document.createElement("div"), this.divEvents.style.position = "absolute", this.gh.appendChild(this.divEvents), this.divSeparatorsAbove = document.createElement("div"), this.divSeparatorsAbove.style.position = "absolute", this.divSeparatorsAbove.oncontextmenu = this.cm, this.gh.appendChild(this.divSeparatorsAbove), this.divLinksAbove = document.createElement("div"), this.divLinksAbove.style.position = "absolute", this.gh.appendChild(this.divLinksAbove), this.divLinkShadow = document.createElement("div"), this.divLinkShadow.style.position = "absolute", this.gh.appendChild(this.divLinkShadow), this.divLinkpoints = document.createElement("div"), this.divLinkpoints.style.position = "absolute", this.gh.appendChild(this.divLinkpoints), this.divRectangle = document.createElement("div"), this.divRectangle.style.position = "absolute", this.gh.appendChild(this.divRectangle), this.divHover = document.createElement("div"), this.divHover.style.position = "absolute", this.gh.appendChild(this.divHover), this.divShadow = document.createElement("div"), this.divShadow.style.position = "absolute", this.gh.appendChild(this.divShadow), e.appendChild(this.gh), e
                }, this.em = {};
                var A = this.em;
                A.create = function() {
                    if (!u.nav.overlay) {
                        var e = document.createElement("div");
                        e.style.position = "absolute", e.style.left = "0px", e.style.right = "0px", e.style.top = "0px", e.style.bottom = "0px", e.className = u.A("_block"), u.nav.top.appendChild(e), u.nav.overlay = e
                    }
                }, A.show = function() {
                    A.create(), u.nav.overlay.style.display = ""
                }, A.hide = function() {
                    u.nav.overlay && (u.nav.overlay.style.display = "none")
                }, this.S = function(e) {
                    var t = e ? 0 : 100;
                    u.loadingTimeout && window.clearTimeout(u.loadingTimeout), u.loadingTimeout = window.setTimeout(function() {
                        u.loadingLabelVisible && (u.nav.loading.innerHTML = u.loadingLabelText, u.nav.loading.style.display = ""), u.blockOnCallBack && A.show()
                    }, t)
                }, this.ja = function() {
                    this.loadingTimeout && window.clearTimeout(this.loadingTimeout), this.nav.loading.style.display = "none", this.blockOnCallBack && A.hide()
                }, this.loadingStart = function() {
                    u.S()
                }, this.loadingStop = function() {
                    u.ja()
                }, this.uiBlock = function() {
                    A.show()
                }, this.uiUnblock = function() {
                    A.hide()
                }, this.Rd = function() {
                    this.startDate = new DayPilot.Date(this.startDate).getDatePart()
                }, this.Wd = function(e) {
                    var t = document.createElement("div");
                    t.style.position = "absolute", t.style.top = "-2000px", t.style.left = "-2000px", t.className = this.A(e), document.body.appendChild(t);
                    var i = t.offsetHeight,
                        n = t.offsetWidth;
                    document.body.removeChild(t);
                    var a = {};
                    return a.height = i, a.width = n, a
                }, this.Ga = function(e) {
                    if (e && (this.autoRefreshEnabled = !0), this.autoRefreshEnabled && !(this.K >= this.autoRefreshMaxCount)) {
                        this.X();
                        var t = this.autoRefreshInterval;
                        if (!t || t < 10) throw "The minimum autoRefreshInterval is 10 seconds";
                        this.autoRefreshTimeout = window.setTimeout(function() {
                            u.Cd()
                        }, 1e3 * this.autoRefreshInterval)
                    }
                }, this.X = function() {
                    this.autoRefreshTimeout && (window.clearTimeout(this.autoRefreshTimeout), this.autoRefreshTimeout = null)
                }, this.autoRefreshStart = function(e) {
                    u.Ga(e)
                }, this.autoRefreshPause = function() {
                    u.X()
                }, this.fm = function() {
                    return !(o.resizing || o.moving || o.drag || o.range)
                }, this.Cd = function() {
                    if (u.fm()) {
                        var e = !1;
                        if ("function" == typeof this.onAutoRefresh) {
                            var t = {};
                            t.i = this.K, t.preventDefault = function() {
                                this.preventDefault.value = !0
                            }, u.onAutoRefresh(t), t.preventDefault.value && (e = !0)
                        }!e && this.C() && this.commandCallBack(this.autoRefreshCommand), this.K++
                    }
                    this.K < this.autoRefreshMaxCount && (this.autoRefreshTimeout = window.setTimeout(function() {
                        u.Cd()
                    }, 1e3 * this.autoRefreshInterval))
                }, this.Dd = function() {
                    o.globalHandlers || (o.globalHandlers = !0, DayPilot.re(document, "mousemove", o.gMouseMove), DayPilot.re(document, "mouseup", o.gMouseUp), DayPilot.re(document, "mousedown", o.gMouseDown), DayPilot.re(document, "touchmove", o.gTouchMove), DayPilot.re(document, "touchend", o.gTouchEnd), DayPilot.re(window, "keyup", o.gKeyUp)), DayPilot.re(window, "resize", this._e)
                }, this.gm = function() {
                    this.nav.scroll.root = this, this.nav.scroll.onscroll = this.bh, u.dk = this.nav.scroll.scrollLeft, u.bk = this.nav.scroll.scrollTop, this.divNorth && (u.ek = this.divNorth.clientWidth)
                }, this.jg = function() {
                    if (this.nav.state) {
                        var e = {};
                        e.scrollX = this.nav.scroll.scrollLeft, e.scrollY = this.nav.scroll.scrollTop;
                        var t = u.Wi(e.scrollX, e.scrollY),
                            i = u.Xi(t),
                            n = u.Yi(t);
                        e.rangeStart = i.start, e.rangeEnd = i.end, e.resources = n, this.syncResourceTree && (e.tree = this.ca()), this.nav.state.value = DayPilot.he(JSON.stringify(e))
                    }
                }, this.Yg = function() {
                    if (this.separators)
                        for (var e = 0; e < this.separators.length; e++) this.Jd(e)
                }, this.hm = {}, this.hm.step = 300, this.hm.delay = 10, this.hm.mode = "display", this.hm.layers = !1, this.gk = function(e) {
                    if (u.Dg) return void S.calculateEventPositionsRow(e);
                    for (var t = 0, i = 0; i < e.lines.length; i++) {
                        var n = e.lines[i];
                        n.height = 0, n.top = t;
                        for (var a = 0; a < n.length; a++) {
                            var o = n[a];
                            if (!o.part.top, !0) {
                                o.part.line = i, o.part.height || (o.part.height = e.eventHeight);
                                var r = o.part.al();
                                r > n.height && (n.height = r), o.part.top = t + e.marginTop;
                                var l = "Above" === u.eventVersionPosition;
                                if (u.eventVersionsEnabled && !DayPilot.list(o.data.versions).isEmpty()) {
                                    var s = (o.data.versions.length, o.part.top);
                                    l || (s += o.part.height + u.eventVersionMargin), DayPilot.list(o.data.versions).forEach(function(e, t) {
                                        if (o.versions[t]) {
                                            var i = t * (u.eventVersionHeight + u.eventVersionMargin);
                                            o.versions[t].top = s + i, l && (o.part.top += u.eventVersionHeight, o.part.top += u.eventVersionMargin)
                                        }
                                    })
                                }
                                o.part.top += u.eventMarginBottom, o.part.right = o.part.left + o.part.width, o.part.fullTop = this.rowlist[o.part.dayIndex].top + o.part.top, o.part.fullBottom = o.part.fullTop + o.part.height
                            }
                        }
                        t += (n.height || e.eventHeight) * e.eventStackingLineHeight / 100
                    }
                };
                var S = {};
                S.loadRow = function(e) {
                    e.evColumns = DayPilot.list(u.itline).map(function(e, t) {
                        return {
                            "events": DayPilot.list()
                        }
                    }), DayPilot.list(e.events).forEach(function(t) {
                        var i = t.start(),
                            n = u.Vh(i);
                        e.evColumns[n.i].events.push(t)
                    })
                }, S.calculateEventPositions = function() {
                    var e = u.Eg,
                        t = 0;
                    DayPilot.list(u.rowlist).forEach(function(i) {
                        var n = 0;
                        i.evColumns.forEach(function(t, a) {
                            var o = u.itline[a],
                                r = u.rowMarginTop;
                            t.events.forEach(function(t) {
                                t.part.left = o.left, t.part.width = o.width, t.part.top = r, t.part.height || (e ? t.part.height = S.getEventAutoHeight(t) + u.durationBarHeight : t.part.height = i.eventHeight), r += t.part.height + u.eventMarginBottom
                            }), t.height = r, t.height > n && (n = t.height)
                        }), i.maxColumnHeight = n, i.top = t;
                        var a = i.height;
                        i.height = i.getHeight(), n > u.rowMarginTop && (i.height = n + u.rowMarginBottom), a !== i.height && (u.xi = !0), t += i.height
                    }), u.Hg = t
                }, S.getEventAutoHeight = function(e) {
                    var t = e.client.html(),
                        i = document.createElement("div");
                    i.style.position = "absolute", i.style.top = "-2000px", i.style.left = "-2000px", i.style.width = e.part.width + "px", i.className = u.A(T.event);
                    var n = document.createElement("div");
                    n.className = u.A(T.eventInner), n.innerHTML = t, n.style.position = "static", n.style.overflow = "auto", i.appendChild(n);
                    var a = u.divEvents;
                    a.appendChild(i);
                    var o = i.offsetHeight;
                    return a.removeChild(i), o
                }, S.calculateEventPositionsRow = function(e) {
                    S.calculateEventPositions()
                }, S.drawEventsWithoutCheckingOverflow = function() {
                    DayPilot.list(u.rowlist).forEach(function(e) {
                        S.drawEventsRow(e)
                    })
                }, S.drawEvents = function() {
                    S.drawEventsWithoutCheckingOverflow(), S.checkOverflow(), u.Tg(), u.ya()
                }, S.checkOverflow = function() {
                    if (u.Eg) {
                        var e = !1;
                        DayPilot.list(u.elements.events).forEach(function(t) {
                            var i = t.firstChild,
                                n = i.offsetHeight - i.clientHeight + t.offsetHeight - t.clientHeight,
                                a = i.scrollHeight + n,
                                o = t.event.part.height;
                            t.event.part.height = a, o !== a && (e = !0)
                        }), e && (u.Y(), S.calculateEventPositions(), S.drawEventsWithoutCheckingOverflow(), u.Ug(), u.Xg())
                    }
                }, S.drawEventsRow = function(e) {
                    e.evColumns.forEach(function(e, t) {
                        e.events.forEach(function(e) {
                            u.pc(e)
                        })
                    })
                }, this.li = null, this.Da = function(e) {
                    if (!u.Td) {
                        if (u.Dg) return void S.drawEvents();
                        var t = this.hm.step;
                        this.hm.layers && (u.divEvents = document.createElement("div"), u.divEvents.style.position = "absolute", u.gh.insertBefore(this.divEvents, this.divSeparatorsAbove)), "display" === this.hm.mode ? this.divEvents.style.display = "none" : "visibility" === this.hm.mode && (this.divEvents.style.visibility = "hidden"), this.divEvents.setAttribute("role", "region"), this.divEvents.setAttribute("aria-label", "scheduler events");
                        for (var i = "Progressive" === this.dynamicEventRendering, n = this.lh(), a = n.pixels.top, o = n.pixels.bottom, r = u.allowMultiMove || u.allowMultiResize, l = 0; l < this.rowlist.length; l++) {
                            var s = this.rowlist[l],
                                d = s.top - this.dynamicEventRenderingMargin,
                                c = d + s.height + 2 * this.dynamicEventRenderingMargin;
                            if (!i || r || !(o <= d || a >= c)) {
                                this.gk(s);
                                for (var h = 0; h < s.lines.length; h++)
                                    for (var f = s.lines[h], v = 0; v < f.length; v++) {
                                        var p = f[v],
                                            g = this.pc(p);
                                        if (e && g && (t--, t <= 0)) return this.divEvents.style.visibility = "", this.divEvents.style.display = "", void(u.li = window.setTimeout(function() {
                                            u.Da(e)
                                        }, u.hm.delay))
                                    }
                            }
                        }
                        this.divEvents.style.display = "", DayPilot.list(u.multiselect.xb).isEmpty() || u.multiselect.redraw(), this.oh(), m.load()
                    }
                }, this.zi = function(e) {
                    var t = this.rowlist[e];
                    if (u.Dg) return void S.drawEventsRow(t);
                    this.divEvents = document.createElement("div"), this.divEvents.style.position = "absolute", this.divEvents.style.display = "none", this.gh.insertBefore(this.divEvents, this.divSeparatorsAbove), this.gk(t);
                    for (var i = 0; i < t.lines.length; i++)
                        for (var n = t.lines[i], a = 0; a < n.length; a++) {
                            var o = n[a];
                            this.pc(o)
                        }
                    this.divEvents.style.display = ""
                }, this.Y = function() {
                    if (this.elements.events)
                        for (var e = this.elements.events.length, t = 0; t < e; t++) {
                            var i = this.elements.events[t];
                            this.zj(i)
                        }
                    this.elements.events = []
                }, this.yi = function(e) {
                    if (this.elements.events) {
                        for (var t = this.elements.events.length, i = [], n = 0; n < t; n++) {
                            var a = this.elements.events[n];
                            a.event.part.dayIndex === e && (this.zj(a), i.push(n))
                        }
                        for (var n = i.length - 1; n >= 0; n--) this.elements.events.splice(i[n], 1);
                    }
                }, this.zj = function(e) {
                    var t = e.domArgs;
                    if (e.domArgs = null, t && "function" == typeof u.onDomRemoveEvent && u.onDomRemoveEvent(t), t && "function" == typeof u.onBeforeEventDomRemove && u.onBeforeEventDomRemove(t), t && "function" == typeof u.onBeforeEventDomAdd && u.jj.reactDOM) {
                        var i = t && t.lj;
                        if (i) {
                            if (DayPilot.Util.isReactComponent(t.element)) {
                                if (!u.jj.reactDOM) throw new DayPilot.Exception("Can't reach ReactDOM");
                                u.jj.reactDOM.unmountComponentAtNode(i)
                            }
                        }
                    }
                    e.parentNode && e.parentNode.removeChild(e), e.onclick = null, e.oncontextmenu = null, e.onmouseover = null, e.onmouseout = null, e.onmousemove = null, e.onmousedown = null, e.ondblclick = null, e.event && (e.event.rendered = null, e.event = null), e.related && DayPilot.de(e.related)
                }, this.im = function(e) {
                    e.event && (e.event.rendered = !1), e.onclick = null, e.onmousedown = null, e.event = null, e.parentNode && e.parentNode.removeChild(e)
                }, this.jm = function() {
                    if ("Progressive" === this.dynamicEventRendering) {
                        if (u.dynamicEventRenderingCacheSweeping) {
                            var e = u.dynamicEventRenderingCacheSize || 0;
                            this.divEvents.style.display = "none";
                            for (var t = [], i = 0, n = this.elements.events.length, a = n - 1; a >= 0; a--) {
                                var o = this.elements.events[a];
                                this.km(o.event) ? e > 0 ? (e--, t.unshift(o)) : (this.zj(o), i++) : t.unshift(o)
                            }
                            this.elements.events = t, this.divEvents.style.display = ""
                        }
                    }
                }, this.lm = function(e) {
                    for (var t = [], i = 0, n = this.lh(), a = this.elements.cells.length, o = a - 1; o >= 0; o--) {
                        var r = this.elements.cells[o];
                        n.xStart < r.coords.x && r.coords.x <= n.xEnd && n.yStart < r.coords.y && r.coords.y <= n.yEnd ? t.unshift(r) : e > 0 ? (e--, t.unshift(r)) : (this.Hj(r), i++)
                    }
                }, this.Hj = function(e) {
                    if (e && e.coords) {
                        var t = e.coords.x,
                            i = e.coords.y;
                        DayPilot.rfa(u.elements.cells, e), DayPilot.de(e), u.J.cells[t + "_" + i] = null
                    }
                }, this.Vg = function() {
                    if (this.elements.separators)
                        for (var e = 0; e < this.elements.separators.length; e++) {
                            var t = this.elements.separators[e];
                            DayPilot.de(t)
                        }
                    this.elements.separators = []
                }, this.mm = function() {
                    var e = "Progressive" === this.dynamicEventRendering;
                    if (!this.nav.scroll) return !1;
                    for (var t = this.nav.scroll.scrollTop, i = t + this.nav.scroll.clientHeight, n = 0; n < this.rowlist.length; n++) {
                        var a = this.rowlist[n],
                            o = a.top,
                            r = a.top + a.height;
                        if (!e || !(i <= o || t >= r))
                            for (var l = 0; l < a.lines.length; l++)
                                for (var s = a.lines[l], d = 0; d < s.length; d++) {
                                    var c = s[d];
                                    if (this.nm(c)) return !0
                                }
                    }
                    return !1
                }, this.nm = function(e) {
                    if (e.rendered) return !1;
                    var t = "Progressive" === this.dynamicEventRendering,
                        i = this.nav.scroll.scrollLeft,
                        n = i + this.nav.scroll.clientWidth,
                        a = e.part.left,
                        o = e.part.left + e.part.width;
                    return !t || !(n <= a || i >= o)
                }, this.km = function(e) {
                    if (!e.rendered) return !0;
                    var t = this.lh(),
                        i = t.pixels.top,
                        n = t.pixels.bottom,
                        a = t.pixels.left - this.dynamicEventRenderingMargin,
                        o = t.pixels.right + this.dynamicEventRenderingMargin,
                        r = e.part.left,
                        l = e.part.right,
                        s = e.part.fullTop,
                        d = e.part.fullBottom;
                    return o <= r || a >= l || (n <= s || i >= d)
                }, this._k = DayPilot.list(), this.om = function(e) {
                    if (e.rendered) return !1;
                    if (e.row.hidden) return !1;
                    var t = e.min,
                        i = e.max - e.min,
                        n = u.eventHeight,
                        a = e.row.top,
                        o = document.createElement("div");
                    o.style.position = "absolute", o.style.left = t + "px", o.style.top = a + "px", o.style.width = i + "px", o.style.height = n + "px", o.className = u.A("_event_group"), o.style.cursor = "pointer";
                    var r = {};
                    r.group = {}, r.group.count = e.events.length, r.group.events = DayPilot.list(e.events, !0), r.group.html = "&#x1F7A7; " + e.events.length + " events", "function" == typeof u.onBeforeGroupRender && u.onBeforeGroupRender(r);
                    var l = document.createElement("div");
                    return l.innerHTML = r.group.html, o.appendChild(l), o.onmousedown = function(e) {
                        var e = e || window.event;
                        e.cancelBubble = !0
                    }, o.onclick = function(e) {
                        var t = o.event;
                        t.expanded = !0, u.im(o);
                        var i = DayPilot.indexOf(u.elements.events, o);
                        i !== -1 && u.elements.events.splice(i, 1);
                        var n = u._k;
                        DayPilot.list(t.events).forEach(function(e) {
                            n.push(e.id())
                        }), u.bi(), u.ci(t.part.dayIndex), u.ya();
                        var e = e || window.event;
                        e.cancelBubble = !0
                    }, e.part = {}, e.part.left = t, e.part.width = i, e.part.height = u.eventHeight, e.part.dayIndex = DayPilot.indexOf(u.rowlist, e.row), e.part.top = 0, e.part.isBlock = !0, e.client = {}, e.client.html = function() {
                        return r.group.html
                    }, e.data = {}, o.event = e, this.elements.events.push(o), this.divEvents.appendChild(o), e.rendered = !0, !0
                }, this.pc = function(e, t) {
                    t = t || {};
                    var i = t.forced;
                    if (e.rendered) return !1;
                    if (u.groupConcurrentEvents) {
                        var n = e.part.block;
                        if (n.events.length > 1 && !n.expanded) return u.om(n)
                    }
                    var a = "Progressive" === this.dynamicEventRendering,
                        o = e.part.dayIndex,
                        r = this.rowlist[o];
                    if (r.hidden) return !1;
                    var l = r.top,
                        s = this.lh(),
                        d = s.pixels.left - this.dynamicEventRenderingMargin,
                        c = s.pixels.right + this.dynamicEventRenderingMargin,
                        h = s.pixels.top,
                        f = s.pixels.bottom,
                        v = e.part.left,
                        p = e.part.left + e.part.width,
                        m = e.part.top + l,
                        g = m + e.part.height,
                        y = u.multiselect.Wb(e);
                    if (!i && !y && a && (c <= v || d >= p || f <= m || h >= g)) return !1;
                    var b = "Milestone" === e.data.type,
                        w = e.part.width,
                        D = e.part.height,
                        k = e.cache || e.data;
                    w = DayPilot.Util.atLeast(0, w), D = DayPilot.Util.atLeast(0, D);
                    var P = document.createElement("div");
                    if (P.related = [], function(t) {
                            u.eventVersionsEnabled && DayPilot.list(e.data.versions).forEach(function(i, n) {
                                if (i) {
                                    var a = e.versions[n];
                                    if (a) {
                                        var o = document.createElement("div");
                                        o.style.position = "absolute", o.style.left = a.left + "px", o.style.top = l + a.top + "px", o.style.width = a.width + "px", o.style.height = u.eventVersionHeight + "px", o.className = u.A(T.event) + " " + u.A("_event_previous") + " " + u.A("_event_version"), i.toolTip && (o.title = i.toolTip), i.cssClass && DayPilot.Util.addClass(o, i.cssClass);
                                        var r = document.createElement("div");
                                        r.setAttribute("unselectable", "on"), r.className = u.A(T.eventInner), r.innerHTML = i.html || i.text || "", i.backColor && (r.style.background = i.backColor, (DayPilot.browser.ie9 || DayPilot.browser.ielt9) && (r.style.filter = "")), i.fontColor && (r.style.color = i.fontColor), i.borderColor && (r.style.borderColor = i.borderColor), i.backImage && (r.style.backgroundImage = "url(" + i.backImage + ")", i.backRepeat && (r.style.backgroundRepeat = i.backRepeat)), o.appendChild(r), a.continueLeft && !b && DayPilot.Util.addClass(o, u.A("_event_continueleft")), a.continueRight && !b && DayPilot.Util.addClass(o, u.A("_event_continueright"));
                                        var s = u.durationBarVisible && !i.barHidden,
                                            d = a.width;
                                        if (s && d > 0) {
                                            var c = 100 * a.barLeft / d,
                                                h = Math.ceil(100 * a.barWidth / d);
                                            "PercentComplete" === u.durationBarMode && (c = 0, h = i.complete || 0);
                                            var f = document.createElement("div");
                                            f.setAttribute("unselectable", "on"), f.className = u.A(T.eventBar), f.style.position = "absolute", i.barBackColor && (f.style.backgroundColor = i.barBackColor);
                                            var v = document.createElement("div");
                                            v.setAttribute("unselectable", "on"), v.className = u.A(T.eventBarInner), v.style.left = c + "%", 0 < h && h <= 1 ? v.style.width = "1px" : v.style.width = h + "%", i.barColor && (v.style.backgroundColor = i.barColor), i.barImageUrl && (v.style.backgroundImage = "url(" + i.barImageUrl + ")"), f.appendChild(v), o.appendChild(f)
                                        }
                                        if (i.htmlLeft) {
                                            var p = u.eventHtmlLeftMargin,
                                                m = document.createElement("div");
                                            m.style.position = "absolute", m.style.right = -(a.left - p) + "px", m.style.top = l + a.top + "px", m.style.height = u.eventHeight + "px", m.style.boxSizing = "border-box", m.innerHTML = i.htmlLeft, m.className = u.A("_event_left"), m.type = "divLeft", m.versionPart = a, t.related.push(m), u.divEvents.appendChild(m)
                                        }
                                        if (i.htmlRight) {
                                            var p = u.eventHtmlRightMargin,
                                                g = document.createElement("div");
                                            g.style.position = "absolute", g.style.left = a.left + a.width + p + "px", g.style.top = l + a.top + "px", g.style.height = u.eventHeight + "px", g.style.boxSizing = "border-box", g.innerHTML = i.htmlRight, g.className = u.A("_event_right"), g.type = "divRight", g.versionPart = a, t.related.push(g), u.divEvents.appendChild(g)
                                        }
                                        o.versionPart = a, o.type = "version", t.related.push(o), u.divEvents.appendChild(o)
                                    }
                                }
                            })
                        }(P), k.htmlLeft) {
                        var x = u.eventHtmlLeftMargin,
                            C = document.createElement("div");
                        C.style.position = "absolute", C.style.right = -(e.part.left - x) + "px", C.style.top = l + e.part.top + "px", C.style.height = u.eventHeight + "px", C.style.boxSizing = "border-box", C.innerHTML = k.htmlLeft, C.className = u.A("_event_left"), C.type = "divLeft", P.related.push(C), this.divEvents.appendChild(C)
                    }
                    if (k.htmlRight) {
                        var x = u.eventHtmlRightMargin,
                            A = document.createElement("div");
                        A.style.position = "absolute", A.style.left = e.part.left + e.part.width + x + "px", A.style.top = l + e.part.top + "px", A.style.height = u.eventHeight + "px", A.style.boxSizing = "border-box", A.innerHTML = k.htmlRight, A.className = u.A("_event_right"), A.type = "divRight", P.related.push(A), this.divEvents.appendChild(A)
                    }
                    var h = l + e.part.top;
                    if (u.treeAnimation) {
                        var S = "number" == typeof r.forcedHeight ? r.forcedHeight : r.height;
                        e.part.top + e.part.height > S && (D = Math.max(0, S - e.part.top))
                    }
                    P.style.position = "absolute", P.style.left = e.part.left + u.eventMarginLeft + "px", P.style.top = l + e.part.top + "px", P.style.width = w - u.eventMarginLeft - u.eventMarginRight + "px", P.style.height = D + "px", u.eventTextWrappingEnabled || (P.style.whiteSpace = "nowrap"), P.style.overflow = "hidden", P.className = this.A(T.event), b && DayPilot.Util.addClass(P, u.A("_task_milestone")), "Group" === e.data.type && (DayPilot.Util.addClass(P, u.A("_task_parent")), DayPilot.Util.addClass(P, u.A("_task_group"))), k.cssClass && DayPilot.Util.addClass(P, k.cssClass);
                    "number" == typeof e.part.line && DayPilot.Util.addClass(P, this.A(T.eventLine + e.part.line)), P.setAttribute("unselectable", "on"), this.showToolTip && !this.bubble && (P.title = e.client.toolTip() || ""), P.onmousemove = this.qc, P.onmouseout = this.rc, P.onmousedown = this.sc, P.onmouseup = this.pm, P.ontouchstart = E.onEventTouchStart, P.ontouchmove = E.onEventTouchMove, P.ontouchend = E.onEventTouchEnd, e.client.clickEnabled() && (P.onclick = this.Ef), e.client.doubleClickEnabled() && (P.ondblclick = this.Ya), P.oncontextmenu = this.Za, "undefined" != typeof k.ariaLabel ? P.setAttribute("aria-label", k.ariaLabel) : P.setAttribute("aria-label", k.text), P.setAttribute("tabindex", "-1");
                    var H = document.createElement("div");
                    H.setAttribute("unselectable", "on"), H.className = u.A(T.eventInner), k.backColor && (H.style.background = k.backColor, (DayPilot.browser.ie9 || DayPilot.browser.ielt9) && (H.style.filter = "")), k.fontColor && (H.style.color = k.fontColor), k.borderColor && (H.style.borderColor = k.borderColor), k.backImage && (H.style.backgroundImage = "url(" + k.backImage + ")", k.backRepeat && (H.style.backgroundRepeat = k.backRepeat)), P.appendChild(H);
                    var M = e.start().getTime() === e.part.start.getTime(),
                        _ = e.rawend().getTime() === e.part.end.getTime();
                    if (M || b || DayPilot.Util.addClass(P, this.A("_event_continueleft")), _ || b || DayPilot.Util.addClass(P, this.A("_event_continueright")), e.client.barVisible() && w > 0 && !b) {
                        var R = 100 * e.part.barLeft / w,
                            B = Math.ceil(100 * e.part.barWidth / w);
                        "PercentComplete" === this.durationBarMode && (R = 0, B = k.complete || 0);
                        var U = document.createElement("div");
                        U.setAttribute("unselectable", "on"), U.className = this.A(T.eventBar), U.style.position = "absolute", k.barBackColor && (U.style.backgroundColor = k.barBackColor);
                        var N = document.createElement("div");
                        N.setAttribute("unselectable", "on"), N.className = this.A(T.eventBarInner), N.style.left = R + "%", 0 < B && B <= 1 ? N.style.width = "1px" : N.style.width = B + "%", k.barColor && (N.style.backgroundColor = k.barColor), k.barImageUrl && (N.style.backgroundImage = "url(" + k.barImageUrl + ")"), U.appendChild(N), P.appendChild(U)
                    }
                    if (P.row = o, k.areas)
                        for (var L = 0; L < k.areas.length; L++) {
                            var s = k.areas[L];
                            if (DayPilot.Areas.isVisible(s)) {
                                s.start && (s.left = u.getPixels(new DayPilot.Date(s.start)).left - e.part.left), s.end && (s.right = e.part.left + e.part.width - u.getPixels(new DayPilot.Date(s.end)).left);
                                var z = DayPilot.Areas.createArea(P, e, s);
                                P.appendChild(z)
                            }
                        }
                    if (P.event = e, y && (u.multiselect.add(P.event, !0), u.multiselect.gc(P)), function() {
                            if ("function" != typeof u.onBeforeEventDomAdd && "function" != typeof u.onBeforeEventDomRemove) return void(b || (H.innerHTML = e.client.innerHTML()));
                            var t = {};
                            if (t.control = u, t.e = e, t.element = null, P.domArgs = t, "function" == typeof u.onDomAddEvent && u.onDomAddEvent(t), "function" == typeof u.onBeforeEventDomAdd && u.onBeforeEventDomAdd(t), t.element) {
                                var i = H;
                                if (i) {
                                    t.lj = i;
                                    if (DayPilot.Util.isReactComponent(t.element)) {
                                        if (!u.jj.reactDOM) throw new DayPilot.Exception("Can't reach ReactDOM");
                                        u.jj.reactDOM.render(t.element, i)
                                    } else i.appendChild(t.element)
                                }
                            } else b || (H.innerHTML = e.client.innerHTML())
                        }(), this.elements.events.push(P), this.divEvents.appendChild(P), e.rendered = !0, u.Ha()) {
                        if ("function" == typeof u.onAfterEventRender) {
                            var O = {};
                            O.e = P.event, O.div = P, u.onAfterEventRender(O)
                        }
                    } else u.afterEventRender && u.afterEventRender(P.event, P);
                    return !0
                }, this.Ha = function() {
                    return 2 === u.api
                }, this.Ai = function() {
                    for (var e = 0; e < this.elements.events.length; e++) {
                        var t = this.elements.events[e],
                            i = t.event,
                            n = i.part.dayIndex,
                            a = this.rowlist[n],
                            o = a.top,
                            r = o + i.part.top,
                            l = "number" == typeof a.forcedHeight ? a.forcedHeight : a.height,
                            s = i.part.height,
                            d = !1;
                        i.part.top + i.part.height > l && (s = Math.max(0, l - i.part.top), d = !0), t.style.top = r + "px", t.style.height = s + "px", DayPilot.list(t.related).filter(function(e) {
                            return !!e.versionPart
                        }).forEach(function(e) {
                            var t = e.versionPart;
                            e.style.top = o + t.top + "px"
                        }), DayPilot.list(t.related).filter(function(e) {
                            return !e.versionPart && ("divLeft" === e.type || "divRight" === e.type)
                        }).forEach(function(e) {
                            e.style.top = r + "px"
                        })
                    }
                }, this.Od = function(e) {
                    if (!e) return null;
                    for (var t = 0; t < u.elements.events.length; t++) {
                        var i = u.elements.events[t];
                        if (i.event === e || i.event.data === e.data) return i
                    }
                    return null
                }, this.vj = function(e) {
                    var t = u.events.sj(e.data);
                    if (!t) return null;
                    var i = u.rowlist[t.part.dayIndex];
                    return u.gk(i), u.pc(t, {
                        "forced": !0
                    }), u.Od(t)
                }, this.rc = function(e) {
                    var t = this;
                    DayPilot.Areas.hideAreas(t, e), t.active || (DayPilot.Util.removeClass(t, u.A("_event_hover")), u.qm(t), c.source || m.hideLinkpointsWithDelay(), u.bubble && "Bubble" === u.eventHoverHandling && u.bubble.hideOnMouseOut())
                }, this.rm = function(e) {
                    if ("function" == typeof this.onEventMouseOver) {
                        var t = {};
                        t.div = e, t.e = e.event, this.onEventMouseOver(t)
                    }
                }, this.qm = function(e) {
                    if ("function" == typeof this.onEventMouseOut) {
                        var t = {};
                        t.div = e, t.e = e.event, this.onEventMouseOut(t)
                    }
                }, this.sm = function(e) {
                    var t = e.row;
                    if ("function" == typeof this.onRowMouseOver) {
                        var i = {};
                        i.div = e, i.row = u.Ji(t), this.onRowMouseOver(i)
                    }
                }, this.tm = function(e) {
                    var t = e.row;
                    if ("function" == typeof this.onRowMouseOut) {
                        var i = {};
                        i.div = e, i.row = u.Ji(t), this.onRowMouseOut(i)
                    }
                }, this.qc = function(e) {
                    e = e || window.event, u.cellBubble && u.cellBubble.delayedHide();
                    for (var t = this; t && !t.event;) t = t.parentNode;
                    u.um(t, e);
                    var i = t.event.cache ? t.event.cache.deleteDisabled : t.event.data.deleteDisabled;
                    if (!t.active) {
                        var n = [];
                        if ("Disabled" !== u.eventDeleteHandling && !i) {
                            var a = u.durationBarVisible ? u.durationBarHeight : 0;
                            n.push({
                                "action": "JavaScript",
                                "v": "Hover",
                                "w": 17,
                                "h": 17,
                                "top": a + 2,
                                "right": 2,
                                "css": u.A(T.eventDelete),
                                "js": function(e) {
                                    u.cb(e)
                                }
                            })
                        }
                        var o = t.event.cache ? t.event.cache.areas : t.event.data.areas;
                        o && o.length > 0 && (n = n.concat(o)), DayPilot.Areas.showAreas(t, t.event, null, n), DayPilot.Util.addClass(t, u.A("_event_hover")), u.rm(t)
                    }
                    "Disabled" === u.linkCreateHandling || c.source || (m.clearHideTimeout(), m.hideLinkpoints(), u.fm() && m.showLinkpoint(t)), u.vm(e), u.coords.insideEvent = !0
                }, this.Wh = {}, this.pm = function(e) {
                    var t = u.Wh;
                    if (u.ionicEventClickFix) {
                        var i = t.originalMouse;
                        if (i) {
                            var n = DayPilot.mc(e);
                            i.x === n.x && i.y === n.y && (u.Ef.call(this, e), e.preventDefault(), e.stopPropagation())
                        }
                    }
                }, this.sc = function(e) {
                    if (u.da(), "undefined" != typeof DayPilot.Bubble && (DayPilot.Bubble.hideActive(), DayPilot.Bubble.cancelShowing()), e = e || window.event, !u.coords) {
                        var t = u.gh;
                        u.coords = DayPilot.mo3(t, e)
                    }
                    var i = DayPilot.Util.mouseButton(e);
                    if (e.preventDefault(), e.stopPropagation(), i.left) {
                        var n = e.shiftKey;
                        if ("Disabled" !== u.multiSelectRectangle && n) return H.start(), !1;
                        "w-resize" === this.style.cursor || "e-resize" === this.style.cursor ? (o.preventEventClick = !0, o.resizing = this, o.resizingEvent = this.event, o.originalMouse = DayPilot.mc(e), document.body.style.cursor = this.style.cursor, m.hideLinkpoints()) : ("move" === this.style.cursor || "Full" === u.moveBy && this.event.client.moveEnabled()) && u.wm(this, e)
                    }
                    DayPilot.Menu && DayPilot.Menu.active && (DayPilot.Menu.active.hide(), DayPilot.Menu.active = null)
                }, this.wm = function(e, t) {
                    var i = u.Wh;
                    u.vm(t), i.start = !0, i.moving = e, i.movingEvent = e.event, i.originalMouse = DayPilot.mc(t), i.moveOffsetX = DayPilot.mo3(e, t).x, i.moveDragStart = u.getDate(u.coords.x, !0), m.hideLinkpoints()
                }, this.tc = {};
                var E = u.tc;
                "undefined" == typeof DayPilot.Global.touch && (DayPilot.Global.touch = {}), DayPilot.Global.touch.active = !1, DayPilot.Global.touch.start = !1, E.timeouts = [], E.onEventTouchStart = function(e) {
                    if (!DayPilot.Global.touch.active && !DayPilot.Global.touch.start) {
                        e.stopPropagation(), E.clearTimeouts(), DayPilot.Global.touch.start = !0, DayPilot.Global.touch.active = !1;
                        var t = this;
                        u.coords = E.relativeCoords(e);
                        var n = u.tapAndHoldTimeout;
                        E.timeouts.push(window.setTimeout(function() {
                            DayPilot.Global.touch.active = !0, DayPilot.Global.touch.start = !1, e.preventDefault();
                            var n = t.event;
                            switch (u.eventTapAndHoldHandling) {
                                case "Move":
                                    if (n.client.moveEnabled()) {
                                        var a = i(e);
                                        E.startMoving(t, a)
                                    }
                                    break;
                                case "ContextMenu":
                                    DayPilot.Menu && DayPilot.Menu.touchPosition(e);
                                    var o = n.client.contextMenu();
                                    o ? o.show(n) : u.contextMenu && u.contextMenu.show(n)
                            }
                        }, n))
                    }
                }, E.onEventTouchMove = function(e) {
                    E.clearTimeouts(), DayPilot.Global.touch.start = !1
                }, E.onEventTouchEnd = function(e) {
                    if (!DayPilot.Util.isMouseEvent(e)) {
                        if (E.clearTimeouts(), DayPilot.Global.touch.start) {
                            DayPilot.Global.touch.start = !1, e.preventDefault(), e.stopPropagation();
                            var t = this;
                            window.setTimeout(function() {
                                u.Va(t, e)
                            })
                        }
                        window.setTimeout(function() {
                            DayPilot.Global.touch.start = !1, DayPilot.Global.touch.active = !1
                        }, 500)
                    }
                }, E.onMainTouchStart = function(e) {
                    if (!(DayPilot.Global.touch.active || DayPilot.Global.touch.start || e.touches.length > 1 || "Disabled" === u.timeRangeSelectedHandling)) {
                        E.clearTimeouts(), DayPilot.Global.touch.start = !0, DayPilot.Global.touch.active = !1;
                        var t = u.tapAndHoldTimeout;
                        E.timeouts.push(window.setTimeout(function() {
                            DayPilot.Global.touch.active = !0, DayPilot.Global.touch.start = !1, e.preventDefault(), u.coords = E.relativeCoords(e), E.range = u.xm()
                        }, t));
                        u.coords = E.relativeCoords(e)
                    }
                }, E.onMainTouchMove = function(e) {
                    if (E.clearTimeouts(), DayPilot.Global.touch.start = !1, o.resizing) return e.preventDefault(), void E.updateResizing();
                    if (DayPilot.Global.touch.active) {
                        if (e.preventDefault(), u.coords = E.relativeCoords(e), o.moving) return void E.updateMoving();
                        if (E.range) {
                            var t = E.range;
                            t.end = {
                                x: Math.floor(u.coords.x / u.cellWidth),
                                "time": u.getDate(u.coords.x, !0)
                            }, u.Fi(t)
                        }
                    }
                }, E.debug = function(e) {}, E.onMainTouchEnd = function(e) {
                    E.clearTimeouts();
                    if (DayPilot.Global.touch.active) {
                        if (o.moving) {
                            e.preventDefault();
                            var t = o.movingEvent;
                            if (u !== o.movingShadow.calendar) return;
                            var i = o.movingShadow.start,
                                n = o.movingShadow.end,
                                a = "Days" !== u.viewType ? o.movingShadow.row.id : null,
                                r = o.drag && t.part.external,
                                l = o.movingShadow.overlapping,
                                s = !o.movingShadow.allowed;
                            if (DayPilot.Util.removeClass(o.moving, u.A(u.ym.eventMovingSource)), DayPilot.de(o.movingShadow), u.wk(), o.movingShadow.calendar = null, document.body.style.cursor = "", o.moving = null, o.movingEvent = null, o.movingShadow = null, u.qk.clear(), l || s || u.qk.forbidden || u.qk.invalid) return;
                            u.lb(t, i, n, a, r)
                        }
                        if (E.range) {
                            var d = E.range;
                            E.range = null;
                            var c = u.elements.range2;
                            c && c.overlapping ? u.clearSelection() : u.Ci(d)
                        }
                    } else if (DayPilot.Global.touch.start) {
                        if (u.coords.x < u.getScrollX()) return;
                        var d = u.xm();
                        u.Fi(d);
                        var c = u.elements.range2;
                        c && c.overlapping ? u.clearSelection() : u.Ci(d)
                    }
                    window.setTimeout(function() {
                        DayPilot.Global.touch.start = !1, DayPilot.Global.touch.active = !1
                    }, 500)
                }, E.clearTimeouts = function() {
                    for (var e = 0; e < E.timeouts.length; e++) clearTimeout(E.timeouts[e]);
                    E.timeouts = []
                }, E.relativeCoords = function(e) {
                    var t = u.gh,
                        i = e.touches ? e.touches[0] : e,
                        n = i.pageX,
                        a = i.pageY,
                        o = DayPilot.abs(t);
                    return {
                        x: n - o.x,
                        y: a - o.y,
                        toString: function() {
                            return "x: " + this.x + ", y:" + this.y
                        }
                    }
                }, E.startMoving = function(e, t) {
                    o.moving = e, o.movingEvent = e.event, o.originalMouse = t;
                    var i = DayPilot.abs(e);
                    o.moveOffsetX = t.x - i.x, o.moveDragStart = u.getDate(u.coords.x, !0), o.movingShadow = u.Ia(e), u.$j()
                }, E.startResizing = function(e, t) {
                    o.resizing = e, o.resizingEvent = e.event, o.resizing.dpBorder = t, o.resizingShadow || (o.resizingShadow = u.Ia(e)), u.rk()
                }, E.updateResizing = function() {
                    if (!o.resizingShadow) {
                        var e = o.resizing;
                        o.resizingShadow = u.Ia(e)
                    }
                    u.rk();
                    var t = {
                        x: u.coords.x,
                        y: u.coords.y
                    };
                    u.zm(t)
                }, E.updateMoving = function() {
                    if (o.movingShadow && o.movingShadow.calendar !== u && u.wk(), !o.movingShadow) {
                        var e = o.moving;
                        o.movingShadow = u.Ia(e)
                    }
                    o.movingShadow.calendar.$j();
                    var t = {
                        x: u.coords.x,
                        y: u.coords.y
                    };
                    u.zm(t)
                }, this.um = function(e, t) {
                    var i = this.eventResizeMargin,
                        n = this.eventMoveMargin,
                        a = e;
                    if ("undefined" != typeof o) {
                        var r = DayPilot.mo3(e, t);
                        if (r && (u.eventOffset = r, !o.resizing && !o.moving)) {
                            var l = a.event.part.start.toString() === a.event.start().toString(),
                                s = a.event.part.end.toString() === a.event.rawend().toString();
                            if ("Top" === u.moveBy && r.y <= n && a.event.client.moveEnabled() && "Disabled" !== u.eventMoveHandling ? e.style.cursor = "move" : ("Top" === u.moveBy || "Full" === u.moveBy) && r.x <= i && a.event.client.resizeEnabled() && "Disabled" !== u.eventResizeHandling ? l ? (e.style.cursor = "w-resize", e.dpBorder = "left") : e.style.cursor = "not-allowed" : "Left" === u.moveBy && r.x <= n && a.event.client.moveEnabled() && "Disabled" !== u.eventMoveHandling ? e.style.cursor = "move" : e.offsetWidth - r.x <= i && a.event.client.resizeEnabled() && "Disabled" !== u.eventResizeHandling ? s ? (e.style.cursor = "e-resize", e.dpBorder = "right") : e.style.cursor = "not-allowed" : o.resizing || o.moving || (a.event.client.clickEnabled() && "Disabled" !== u.eventClickHandling ? e.style.cursor = "pointer" : e.style.cursor = "default"), "undefined" != typeof DayPilot.Bubble && u.bubble && "Bubble" === u.eventHoverHandling && ("default" === e.style.cursor || "pointer" === e.style.cursor)) {
                                this.Fd && r.x === this.Fd.x && r.y === this.Fd.y;
                                this.Fd = r, u.bubble.showEvent(e.event)
                            }
                        }
                    }
                }, this.ck = function() {
                    return "Days" !== this.viewType ? this.itline.length : Math.floor(1440 / this.cellDuration)
                }, this.Di = function(e) {
                    var e = e || o.range || u.rangeHold;
                    if (!e) return null;
                    var t = u.rowlist[e.start.y];
                    if (!t) return null;
                    var i, n, a = e.Am ? e.Am : e,
                        r = a.end.x > a.start.x,
                        l = t.id,
                        s = r ? a.start.x : a.end.x,
                        d = r ? a.end.x : a.start.x,
                        c = t.start.getTime() - this.Pa().getTime(),
                        h = u.snapToGrid && u.snapToGridTimeRangeSelecting;
                    return h ? (i = this.itline[s].start.addTime(c), n = this.itline[d].end.addTime(c)) : r ? (i = a.start.time, n = a.end.time) : (i = a.end.time, n = a.start.time), new DayPilot.Selection(i, n, l, u)
                }, this.Rb = function(e) {
                    var t = e.parentNode,
                        i = u.eventEditMinWidth,
                        n = document.createElement("textarea");
                    return n.style.position = "absolute", n.style.width = (e.offsetWidth < i ? i : e.offsetWidth - 2) + "px", n.style.height = e.offsetHeight - 2 + "px", n.style.fontFamily = DayPilot.gs(e, "fontFamily") || DayPilot.gs(e, "font-family"), n.style.fontSize = DayPilot.gs(e, "fontSize") || DayPilot.gs(e, "font-size"), n.style.left = e.offsetLeft + "px", n.style.top = e.offsetTop + "px", n.style.border = "1px solid black", n.style.padding = "0px", n.style.marginTop = "0px", n.style.backgroundColor = "white", n.value = (e.event.text() || "").trim(), n.event = e.event, t.appendChild(n), n
                }, this.Bm = function(e) {
                    var t = f.events();
                    t.sort(function(e, t) {
                        var i = e.event,
                            n = t.event;
                        return i.part.dayIndex !== n.part.dayIndex ? i.part.dayIndex - n.part.dayIndex : i.start() !== n.start() ? i.start().getTime() - n.start().getTime() : n.end().getTime() - i.end().getTime()
                    });
                    var i = t.indexOf(e);
                    return i === -1 ? null : i + 1 < t.length ? t[i + 1] : t[0]
                }, this.Wa = function(e) {
                    if (e && (o.editing && o.editing.blur(), e.event)) {
                        var t = this.Rb(e);
                        o.editing = t, DayPilot.re(t, DayPilot.touch.start, function(e) {
                            e.stopPropagation()
                        }), t.onblur = function() {
                            if (t.onblur = null, o.editing === t && (o.editing = null), t.parentNode && t.parentNode.removeChild(t), e.event) {
                                var i = (e.event.text(), t.value);
                                u.vb(e.event, i, t.canceling)
                            }
                        }, t.onmousedown = function(e) {
                            e = e || window.event, e.stopPropagation && e.stopPropagation()
                        }, t.onkeypress = function(e) {
                            return 13 !== (window.event ? event.keyCode : e.keyCode) || (this.onblur(), !1)
                        }, t.cancel = function() {
                            o.editing && (o.editing.canceling = !0, o.editing.blur())
                        }, t.onkeydown = function(t) {
                            var i = window.event ? event.keyCode : t.keyCode;
                            if (27 === i) o.editing.cancel();
                            else if (9 === i) {
                                var n = u.Bm(e);
                                return o.editing.cancel(), n && (DayPilot.browser.ie ? setTimeout(function() {
                                    u.Wa(n)
                                }, 0) : u.Wa(n)), !1
                            }
                        }, t.select(), t.focus()
                    }
                }, this.Cm = {}, this.Cm.resource = function() {
                    return "undefined" != typeof DayPilot.Bubble ? new DayPilot.Bubble : {
                        "showResource": function() {},
                        "hideOnMouseOut": function() {}
                    }
                }(), this.Cm.cell = function() {
                    return "undefined" != typeof DayPilot.Bubble ? new DayPilot.Bubble : {
                        "showResource": function() {},
                        "hideOnMouseOut": function() {}
                    }
                }(), this.Lk = function(e) {
                    var t = this,
                        i = t.row;
                    if ("undefined" != typeof DayPilot.Bubble) {
                        u.cellBubble;
                        var n = u.Ji(i);
                        n.div = t, u.resourceBubble ? u.resourceBubble.showResource(n) : i.bubbleHtml && u.Cm.resource.showResource(n)
                    }
                }, this.Jk = function(e) {
                    var t = this;
                    t.active || (t.active = !0, u.sm(t))
                }, this.Kk = function(e) {
                    var t = this;
                    delete t.active, u.tm(t)
                }, this.Mk = function(e) {
                    var t = this;
                    "undefined" != typeof DayPilot.Bubble && u.resourceBubble ? u.resourceBubble.hideOnMouseOut() : u.Cm.resource.hideOnMouseOut();
                    var i = t.firstChild;
                    DayPilot.Areas.hideAreas(i, e), i.data = null
                }, this.Nk = function(e) {
                    d.row && (x.cancelClick = !0, setTimeout(function() {
                        x.cancelClick = !1
                    }, 100))
                }, this.Qg = function() {
                    if ("None" !== u.timeHeaderPosition && this.timeHeader) {
                        this.J.timeHeader = {}, u.elements.timeHeader.length > 0 && (u.hj(), u.elements.timeHeader = []);
                        var e = document.createElement("div");
                        e.style.position = "relative", this.nav.timeHeader = e;
                        for (var t = 0; t < this.timeHeader.length; t++)
                            for (var i = this.timeHeader[t], n = 0; n < i.length; n++) this.Dm(n, t);
                        var a = this.divNorth;
                        if (1 === a.childNodes.length) a.replaceChild(e, a.childNodes[0]);
                        else {
                            if (DayPilot.browser.ie && a && a.firstChild) {
                                for (var o = [], r = 0; r < a.firstChild.childNodes.length; r++) o.push(a.firstChild.childNodes[r]);
                                DayPilot.de(o)
                            }
                            a.innerHTML = "", a.appendChild(e)
                        }
                        var l = this.wh();
                        a.style.width = l + 5e3 + "px";
                        var s = {};
                        s.control = u, s.html = u.cornerHtml;
                        var d = null;
                        if ("function" == typeof u.onBeforeCornerRender && u.onBeforeCornerRender(s), u.fj(), "function" == typeof u.onBeforeCornerDomAdd && (s.element = null, u.onBeforeCornerDomAdd(s), d = s.element), d) {
                            var c = u.divCorner;
                            c.domArgs = s;
                            if (DayPilot.Util.isReactComponent(d)) {
                                if (!u.jj.reactDOM) throw new DayPilot.Exception("Can't reach ReactDOM");
                                u.jj.reactDOM.render(d, c)
                            } else c.appendChild(d)
                        } else u.divCorner && (u.divCorner.innerHTML = s.html || "");
                        l > 0 && (this.divStretch.style.width = l + "px")
                    }
                }, this.fj = function() {
                    if (u.divCorner) {
                        var e = u.divCorner && u.divCorner.domArgs;
                        if (u.divCorner.domArgs = null, e && ("function" == typeof u.onBeforeCornerDomRemove && u.onBeforeCornerDomRemove(e), "function" == typeof u.onBeforeCornerDomAdd && u.jj.reactDOM)) {
                            var t = u.divCorner;
                            if (t) {
                                if (DayPilot.Util.isReactComponent(e.element)) {
                                    if (!u.jj.reactDOM) throw new DayPilot.Exception("Can't reach ReactDOM");
                                    u.jj.reactDOM.unmountComponentAtNode(t)
                                }
                            }
                        }
                    }
                }, this.Rh = function(e, t) {
                    var i = null,
                        n = this.Uc.locale(),
                        t = t || this.cellGroupBy,
                        a = e.start;
                    e.end;
                    switch (t) {
                        case "Minute":
                            i = a.toString("m");
                            break;
                        case "Hour":
                            i = "Clock12Hours" === u.Uc.timeFormat() ? a.toString("h tt", n) : a.toString("H", n);
                            break;
                        case "Day":
                            i = a.toString(n.datePattern);
                            break;
                        case "Week":
                            i = 1 === R.weekStarts() ? a.weekNumberISO() : a.weekNumber();
                            break;
                        case "Month":
                            i = a.toString("MMMM yyyy", n);
                            break;
                        case "Quarter":
                            i = "Q" + Math.floor(a.getMonth() / 3 + 1);
                            break;
                        case "Year":
                            i = a.toString("yyyy");
                            break;
                        case "None":
                            i = "";
                            break;
                        case "Cell":
                            var o = (e.end.ticks - e.start.ticks) / 6e4;
                            i = this.Em(a, o);
                            break;
                        default:
                            throw new DayPilot.Exception("Invalid groupBy value: " + t)
                    }
                    return i
                }, this.Em = function(e, t) {
                    var i = this.Uc.locale(),
                        t = t || this.cellDuration;
                    return t < 1 ? e.toString("ss") : t < 60 ? e.toString("mm") : t < 1440 ? "Clock12Hours" === u.Uc.timeFormat() ? e.toString("h tt", i) : e.toString("H", i) : t < 10080 ? e.toString("d") : 10080 === t ? 1 === R.weekStarts() ? e.weekNumberISO() : e.weekNumber() : e.toString("MMMM yyyy", i)
                }, this.Nh = function(e) {
                    var t = this.scale;
                    switch (t) {
                        case "Cell":
                            throw "Invalid scale: Cell";
                        case "Manual":
                            throw "Internal error (addScaleSize in Manual mode)";
                        case "CellDuration":
                            return e.addMinutes(this.cellDuration);
                        default:
                            return this.Qh(e, t, !0)
                    }
                }, this.Qh = function(e, t, i) {
                    var n, a = "Days" !== this.viewType ? this.days : 1,
                        o = this.startDate.addDays(a);
                    "Manual" === u.scale && (o = u.Ph());
                    var t = t || this.cellGroupBy,
                        r = 60;
                    switch (t) {
                        case "Minute":
                            e.getMinutes() + e.getSeconds() + e.getMilliseconds() > 0 && (e = e.getDatePart().addHours(e.getHours()).addMinutes(e.getMinutes())), n = e.addMinutes(1);
                            break;
                        case "Hour":
                            e.getHours() + e.getMinutes() + e.getSeconds() + e.getMilliseconds() > 0 && (e = e.getDatePart().addHours(e.getHours())), n = e.addHours(1);
                            break;
                        case "Day":
                            n = e.getDatePart().addDays(1);
                            break;
                        case "Week":
                            for (n = e.getDatePart().addDays(1); n.dayOfWeek() !== R.weekStarts();) n = n.addDays(1);
                            break;
                        case "Month":
                            e = e.getDatePart(), n = e.addMonths(1), n = n.firstDayOfMonth();
                            for (var l = DayPilot.DateUtil.diff(n, e) / 6e4 % r === 0; !l;) n = n.addHours(1), l = DayPilot.DateUtil.diff(n, e) / 6e4 % r === 0;
                            break;
                        case "Quarter":
                            for (e = e.getDatePart(), n = e.addMonths(1), n = n.firstDayOfMonth(); n.getMonth() % 3;) n = n.addMonths(1);
                            for (var l = DayPilot.DateUtil.diff(n, e) / 6e4 % r === 0; !l;) n = n.addHours(1), l = DayPilot.DateUtil.diff(n, e) / 6e4 % r === 0;
                            break;
                        case "Year":
                            e = e.getDatePart(), n = e.addYears(1), n = n.firstDayOfYear();
                            for (var l = DayPilot.DateUtil.diff(n, e) / 6e4 % r === 0; !l;) n = n.addHours(1), l = DayPilot.DateUtil.diff(n, e) / 6e4 % r === 0;
                            break;
                        case "None":
                            n = o;
                            break;
                        case "Cell":
                            var s = this.Vh(e);
                            n = s.current ? s.current.end : s.past ? s.previous.end : s.next.start;
                            break;
                        default:
                            throw i ? new DayPilot.Exception("Invalid scale value: " + t) : new DayPilot.Exception("Invalid groupBy value: " + t)
                    }
                    return n.getTime() > o.getTime() && (n = o), n
                }, this.ym = {}, this.ym.timeheadercol = "_timeheadercol", this.ym.timeheadercolInner = "_timeheadercol_inner", this.ym.resourcedivider = "_resourcedivider", this.ym.eventFloat = "_event_float", this.ym.eventFloatInner = "_event_float_inner", this.ym.event = "_event", this.ym.eventInner = "_event_inner", this.ym.eventBar = "_event_bar", this.ym.eventBarInner = "_event_bar_inner", this.ym.eventDelete = "_event_delete", this.ym.eventLine = "_event_line", this.ym.eventMovingSource = "_event_moving_source";
                var T = this.ym;
                this.Dm = function(e, t) {
                    var i = this.nav.timeHeader,
                        n = this.timeHeader[t][e],
                        a = t < this.timeHeader.length - 1,
                        o = n.left,
                        r = n.width,
                        l = B.timeHeader(t),
                        s = l.top,
                        d = l.height,
                        c = document.createElement("div");
                    c.style.position = "absolute", c.style.top = s + "px", c.style.left = o + "px", c.style.width = r + "px", c.style.height = d + "px", n.toolTip && (c.title = n.toolTip), c.setAttribute("aria-hidden", "true"), n.cssClass && DayPilot.Util.addClass(c, n.cssClass), c.setAttribute("unselectable", "on"), c.style.KhtmlUserSelect = "none", c.style.MozUserSelect = "none", c.style.webkitUserSelect = "none", c.oncontextmenu = function() {
                        return !1
                    }, c.cell = {}, c.cell.start = n.start, c.cell.end = n.end, c.cell.level = t, c.cell.th = n, c.onclick = this.Sk, c.oncontextmenu = this.Tk, c.style.overflow = "hidden", u.timeHeaderTextWrappingEnabled || (c.style.whiteSpace = "nowrap");
                    var h = document.createElement("div");
                    h.setAttribute("unselectable", "on"), n.innerHTML && (h.innerHTML = n.innerHTML), n.backColor && (h.style.background = n.backColor), n.fontColor && (h.style.color = n.fontColor);
                    var f = this.A(T.timeheadercol),
                        v = this.A(T.timeheadercolInner);
                    a && (f = this.A("_timeheadergroup"), v = this.A("_timeheadergroup_inner")), DayPilot.Util.addClass(c, f), DayPilot.Util.addClass(h, v), DayPilot.Util.addClass(c, u.A("_timeheader_cell")), DayPilot.Util.addClass(h, u.A("_timeheader_cell_inner")), DayPilot.list(n.areas).forEach(function(e) {
                            e.start && (e.left = u.getPixels(new DayPilot.Date(e.start)).left - o, e.end && (e.width = u.getPixels(new DayPilot.Date(e.end)).left - e.left - o))
                        }),
                        function() {
                            if ("function" == typeof u.onBeforeTimeHeaderDomAdd || "function" == typeof u.onBeforeTimeHeaderDomRemove) {
                                var e = {};
                                if (e.control = u, e.header = {}, e.header.start = n.start, e.header.end = n.end, e.header.level = t, e.element = null, c.domArgs = e, "function" == typeof u.onBeforeTimeHeaderDomAdd) {
                                    u.onBeforeTimeHeaderDomAdd(e);
                                    var i = e.element;
                                    if (i) {
                                        var a = h;
                                        e.lj = a, h.innerHTML = "";
                                        if (DayPilot.Util.isReactComponent(i)) {
                                            if (!u.jj.reactDOM) throw new DayPilot.Exception("Can't reach ReactDOM");
                                            u.jj.reactDOM.render(i, a)
                                        } else a.appendChild(i)
                                    }
                                }
                            }
                        }(), c.appendChild(h), DayPilot.Areas.attach(c, n, {
                            "areas": n.areas
                        }), this.J.timeHeader[e + "_" + t] = c, this.elements.timeHeader.push(c), i.appendChild(c)
                }, this.bi = function() {
                    if (u.Dg) return void S.calculateEventPositions();
                    for (var e = 0; e < this.rowlist.length; e++) {
                        var t = this.rowlist[e],
                            i = t.getHeight() + t.marginBottom + t.marginTop;
                        t.height !== i && (this.xi = !0), t.height = i
                    }
                    u.xi && (u.J.drawArea = null)
                }, this.Tg = function() {
                    var e = this.divHeader;
                    if (!e) return !1;
                    for (var t = this.rowlist.length, i = (this.rowHeaderCols ? this.rowHeaderCols.length : 1, 0), n = 0; n < t; n++) {
                        var a = this.rowlist[n];
                        if (!a.hidden) {
                            var o = this.Ek ? n : i;
                            if (e.rows[o]) {
                                for (var r = 0; r < e.rows[o].cells.length; r++) {
                                    var l = e.rows[o].cells[r];
                                    this.Ek && (l.style.top = a.top + "px");
                                    var s = a.height;
                                    l && l.firstChild && parseInt(l.firstChild.style.height, 10) !== s && (l.firstChild.style.height = s + "px")
                                }
                                i++
                            }
                        }
                    }
                    this.Ek && u.nav.resScrollSpace && (u.nav.resScrollSpace.style.top = u.Hg + "px")
                }, this.Jd = function(e) {
                    var t = this.separators[e];
                    t.location = t.location || t.Location, t.color = t.color || t.Color, t.layer = t.layer || t.Layer,
                        t.width = t.width || t.Width, t.opacity = t.opacity || t.Opacity;
                    var i = new DayPilot.Date(t.location),
                        n = t.color,
                        a = t.width ? t.width : 1,
                        o = !!t.layer && "AboveEvents" === t.layer,
                        r = t.opacity ? t.opacity : 100;
                    if (!(i.getTime() < this.Pa().getTime() || i.getTime() >= this.Ph().getTime())) {
                        var l = this.getPixels(i);
                        if (!l.cut && !(l.left < 0 || l.left > u.wh())) {
                            var s = document.createElement("div");
                            s.style.width = a + "px", s.style.height = u.Hg + "px", s.style.position = "absolute", s.style.left = l.left - 1 + "px", s.style.top = "0px", s.style.backgroundColor = n, s.style.opacity = r / 100, s.style.filter = "alpha(opacity=" + r + ")", s.className = u.A("_separator"), t.cssClass && (s.className += " " + t.cssClass), o ? this.divSeparatorsAbove.appendChild(s) : this.divSeparators.appendChild(s), this.elements.separators.push(s)
                        }
                    }
                }, this.pd = function(e) {}, this.dm = function(e) {
                    if ("Disabled" === u.timeRangeDoubleClickHandling) return !1;
                    o.timeRangeTimeout && (clearTimeout(o.timeRangeTimeout), o.timeRangeTimeout = null);
                    if (!u.coords) {
                        var t = u.gh;
                        u.coords = DayPilot.mo3(t, e)
                    }
                    if (e = e || window.event, e.stopPropagation && e.stopPropagation(), e.cancelBubble = !0, u.Fm(u.coords)) {
                        var i = u.Di(u.rangeHold);
                        u.ub(i.start, i.end, i.resource)
                    } else if (o.range = u.xm(), o.range) {
                        o.rangeCalendar = u;
                        var i = u.Di(o.range);
                        u.ub(i.start, i.end, i.resource), u.rangeHold = o.range
                    }
                    o.range = null
                }, this._l = function(e) {
                    if (!DayPilot.Global.touch.start && !DayPilot.Global.touch.active) {
                        if (o.timeRangeTimeout, 1, u.Gm(), u.Zl(), !u.coords) {
                            var t = u.gh;
                            u.coords = DayPilot.mo3(t, e)
                        }
                        if (o.rectangleSelect) return !1;
                        e = e || window.event;
                        var i = DayPilot.Util.mouseButton(e);
                        if (i.middle || i.right && u.Fm(u.coords)) return !1;
                        if (u.Fm(u.coords)) return !1;
                        var n = i.left ? "left" : i.right ? "right" : i.middle ? "middle" : "unknown",
                            a = e.ctrlKey,
                            r = e.metaKey,
                            l = e.shiftKey,
                            s = a || r,
                            d = {};
                        if (d.action = "None", "Disabled" !== u.multiSelectRectangle && l ? d.action = "RectangleSelect" : "Disabled" !== u.timeRangeSelectedHandling && (d.action = "TimeRangeSelect"), d.shift = l, d.ctrl = l, d.meta = r, d.originalEvent = e, d.button = n, d.preventDefault = function() {
                                d.action = "None"
                            }, "function" == typeof u.onGridMouseDown && u.onGridMouseDown(d), "None" === d.action) return e.preventDefault(), e.stopPropagation(), !1;
                        if ("RectangleSelect" === d.action) {
                            var c = {};
                            return c.start = u.coords, c.calendar = u, o.rectangleSelect = c, !1
                        }
                        u.allowMultiRange && !s && M.clear();
                        var h = u.aj(u.coords.y).i;
                        return !u.rowlist[h].isNewRow && (o.range = u.xm(), o.range && (o.range.ctrl = s, o.rangeCalendar = u), !1)
                    }
                }, this.xm = function() {
                    var e = {},
                        t = this.Th(u.coords.x).x,
                        i = u.getDate(u.coords.x, !0);
                    return e.start = {
                        y: u.aj(u.coords.y).i,
                        x: t,
                        "time": i
                    }, e.end = {
                        x: t,
                        "time": i
                    }, this.nj(u.aj(u.coords.y).i) ? null : (e.calendar = u, u.Fi(e), e)
                }, this.sk = function() {
                    u.kd();
                    var e = o.resizingShadow,
                        t = o.resizing;
                    ! function() {
                        var i = u.Hm,
                            n = {
                                "start": e.start,
                                "end": u.Uf(e.end)
                            };
                        e.original = n;
                        var a = e.original;
                        if (!a || !i || i.start !== a.start || i.end !== u.Uf(a.end)) {
                            i && (DayPilot.Util.removeClass(e, i.cssClass), e.firstChild.innerHTML = "");
                            var r = t.event.part.dayIndex,
                                l = u.rowlist[r],
                                s = {};
                            s.start = n.start, s.end = n.end, s.duration = new DayPilot.Duration(s.start, s.end), s.row = u.Ji(l), s.e = t.event, s.allowed = !0, s.resizing = "left" === o.resizing.dpBorder ? "start" : "end", s.what = "left" === o.resizing.dpBorder ? "start" : "end", s.left = {}, s.left.html = s.start.toString(u.eventResizingStartEndFormat, R.locale()), s.left.enabled = u.eventResizingStartEndEnabled, s.left.space = 5, s.left.width = null, s.left.height = u.eventHeight, s.right = {}, s.right.html = s.end.toString(u.eventResizingStartEndFormat, R.locale()), s.right.enabled = u.eventResizingStartEndEnabled, s.right.space = 5, s.right.width = null, s.right.height = u.eventHeight, s.cssClass = null, s.html = null, s.overlapping = s.row.events.forRange(s.start, s.end).filter(function(e) {
                                return !u.Qd(e, s.e)
                            }).length > 0, s.multiresize = DayPilot.list(w.list);
                            var d = {};
                            d.event = t, d.start = s.start, d.end = s.end, s.multiresize.splice(0, 0, d), u.Hm = n, "function" == typeof u.onEventResizing && u.onEventResizing(s), e.allowed = s.allowed, DayPilot.Util.addClass(e, s.cssClass), s.html && (e.firstChild.innerHTML = s.html);
                            var c = s.start,
                                h = u.uf(s.end);
                            if (e.finalStart = c, e.finalEnd = h, "Days" === u.viewType) {
                                var f = l.start.getTime() - u.Pa().getTime();
                                c = c.addTime(-f), h = h.addTime(-f)
                            }
                            var v = DayPilot.DateUtil.diff(c, h);
                            v = DayPilot.Util.atLeast(v, 1);
                            var p = (R.useBox(v), u.snapToGrid && u.snapToGridEventResizing),
                                m = p ? u.getPixels(c).boxLeft : u.getPixels(c).left,
                                g = p ? u.getPixels(h).boxRight : u.getPixels(h).left;
                            e.style.left = m + "px", e.style.width = g - m + "px", e.left = m, e.width = g - m, u.tk(o.resizingShadow, s), u.uk(o.resizingShadow, s)
                        }
                    }()
                }, this.bm = function(e) {
                    if (o.rectangleSelect) {
                        var e = e || window.event;
                        return e.cancelBubble = !0, e.preventDefault && e.preventDefault(), o.gMouseUp(e), !1
                    }
                    if (u.Wh = {}, u.rangeHold) {
                        var t = DayPilot.Util.mouseButton(e);
                        if (t.left) {
                            var i = u.rangeHold;
                            if (u.Fm(u.coords)) {
                                var n = function(e) {
                                    return function() {
                                        o.timeRangeTimeout = null;
                                        var t = u.Di(e);
                                        if (t) {
                                            var i = {};
                                            i.start = t.start, i.end = t.end, i.resource = t.resource, i.preventDefault = function() {
                                                i.preventDefault.value = !0
                                            }, "function" == typeof u.onTimeRangeClick && u.onTimeRangeClick(i), i.preventDefault.value || "function" == typeof u.onTimeRangeClicked && u.onTimeRangeClicked(i)
                                        }
                                    }
                                };
                                "Disabled" != u.timeRangeClickHandling && ("Disabled" === u.timeRangeDoubleClickHandling ? n(i)() : (clearTimeout(o.timeRangeTimeout), o.timeRangeTimeout = setTimeout(n(i), u.doubleClickTimeout)))
                            }
                        }
                    }
                    var t = DayPilot.Util.mouseButton(e);
                    t.right && u.Im(e)
                }, this.Im = function(e) {
                    if ("Disabled" !== u.timeRangeSelectedHandling && "Disabled" !== u.timeRangeRightClickHandling) {
                        var t = u.aj(u.coords.y);
                        if (!u.nj(t.i)) {
                            var i = null;
                            if (i = u.Fm(u.coords) ? u.Di(u.rangeHold) : u.Di()) {
                                i.end = u.Uf(i.end);
                                var n = {};
                                n.start = i.start, n.end = i.end, n.resource = i.resource, n.ctrl = e.ctrlKey, n.shift = e.shiftKey, n.meta = e.metaKey, n.preventDefault = function() {
                                    this.preventDefault.value = !0
                                }, "function" == typeof u.onTimeRangeRightClick && (u.onTimeRangeRightClick(n), n.preventDefault.value) || ("ContextMenu" === u.timeRangeRightClickHandling && u.contextMenuSelection && u.contextMenuSelection.show(i), "function" == typeof u.onTimeRangeRightClicked && u.onTimeRangeRightClicked(n))
                            }
                        }
                    }
                }, this.Jm = function() {
                    return !!(o.resizing || o.moving || o.range) || !!u.Wh.start
                }, this.vm = function(e) {
                    var t = DayPilot.mo3(u.gh, e);
                    u.coords && u.coords.x === t.x && u.coords.y === t.y || (u.coords = t)
                }, this.getCoords = function() {
                    if (!u.coords) return null;
                    var e = {};
                    e.x = u.coords.x, e.y = u.coords.y;
                    var t = u.aj(e.y).i,
                        i = u.Ji(u.rowlist[t]);
                    return e.row = i, e.time = u.getDate(e.x, !0), e.cell = u.cells.findByPixels(e.x, e.y)[0], e
                }, this.Yl = !0, this.xk = function(e) {
                    if (!DayPilot.Global.touch.active) {
                        o.activeCalendar = u, e = e || window.event;
                        var t = DayPilot.mc(e);
                        if (u.vm(e), e.insideMainD = !0, u.Yl = !0, window.event && window.event.srcElement && (window.event.srcElement.inside = !0), u.Wh.start) {
                            DayPilot.distance(u.Wh.originalMouse, t) > 2 && (DayPilot.Util.copyProps(u.Wh, o), document.body.style.cursor = "move", u.Wh = {})
                        }
                        if (o.resizing && o.resizingEvent.calendar === u) o.resizing.event || (o.resizing.event = o.resizingEvent), u.Km();
                        else if (o.movingEvent) {
                            var i = o.movingEvent.calendar,
                                n = i !== u;
                            n && i && o.movingEvent.calendar.da(), o.movingEvent.part.external = n, u.Lm()
                        } else if (o.range && o.range.calendar === u) o.range.moved = !0, u.Mm();
                        else if (c.source) {
                            var a = c.source;
                            m.drawShadow(a.coords, u.coords)
                        } else o.rectangleSelect && (o.rectangleSelect.moved = !0, H.draw());
                        "Disabled" !== u.crosshairType && u.Nm(), u.Om();
                        var r = u.coords.insideEvent;
                        if (u.cellBubble && u.coords && u.rowlist && u.rowlist.length > 0 && !r) {
                            var l = u.Th(u.coords.x).x,
                                s = u.aj(u.coords.y).i;
                            if (0 <= s && s < u.rowlist.length && 0 <= l && l < u.itline.length) {
                                var d = {};
                                d.calendar = u, d.start = u.itline[l].start, d.end = u.itline[l].end, d.resource = u.rowlist[s].id, d.toJSON = function() {
                                    var e = {};
                                    return e.start = this.start, e.end = this.end, e.resource = this.resource, e
                                }, u.cellBubble.showCell(d)
                            }
                        }
                        if (o.drag) {
                            if (u.Gm(), o.gShadow && document.body.removeChild(o.gShadow), o.gShadow = null, !o.movingShadow && u.coords && u.rowlist.length > 0) {
                                if (!o.movingEvent) {
                                    o.moving = o.drag.schedulerSourceEvent || {};
                                    var h = o.drag.schedulerSourceEvent ? o.drag.schedulerSourceEvent.event : null,
                                        f = h || o.drag.event;
                                    if (f)
                                        if (u !== f.calendar) {
                                            var i = f.calendar,
                                                v = f,
                                                p = DayPilot.Util.copyProps(f.data);
                                            f = new DayPilot.Event(p), f.calendar = i, f.part.duration = i.Qj(v), f.part.external = !0
                                        } else f.part.external = !1;
                                    else {
                                        var g = u.itline[0].start,
                                            e = {
                                                "id": o.drag.id,
                                                "start": g,
                                                "end": g.addSeconds(o.drag.duration),
                                                "text": o.drag.text
                                            },
                                            y = o.drag.data;
                                        if (y) {
                                            var b = ["duration", "element", "remove", "duration", "id", "text"];
                                            for (var w in y) DayPilot.contains(b, w) || (e[w] = y[w])
                                        }
                                        f = new DayPilot.Event(e), f.calendar = u, f.calendar = null, f.part.duration = 1e3 * o.drag.duration, f.part.external = !0
                                    }
                                    o.moving.event || (o.moving.event = f), o.movingEvent = f
                                }
                                o.movingShadow = u.Ia(o.movingEvent)
                            }
                            e.cancelBubble = !0
                        }
                        var D = {
                            x: u.coords.x,
                            y: u.coords.y
                        };
                        u.zm(D)
                    }
                }, this.zm = function(e) {
                    var t = o.moving || o.resizing || o.range || o.rectangleSelect,
                        i = "Always" === u.autoScroll,
                        n = "Drag" === u.autoScroll && t,
                        a = i || n,
                        r = o.resizing || o.range;
                    if (a) {
                        var l = u.nav.scroll;
                        e.x -= l.scrollLeft, e.x += v.shiftX, e.y -= l.scrollTop;
                        var s = l.clientWidth,
                            d = l.clientHeight,
                            c = 30,
                            f = e.x < c ? e.x : 0,
                            p = s - e.x < c ? s - e.x : 0,
                            m = e.y < c ? e.y : 0,
                            g = d - e.y < c ? d - e.y : 0,
                            y = 0,
                            b = 0,
                            w = 50;
                        f && (y = -50 * h(f, c)), p && (y = w * h(p, c)), m && (b = -50 * h(m, c) / 2), g && (b = w * h(m, c) / 2), r && (b = 0), y || b ? u.Pm(y, b) : u.Zl()
                    }
                }, this.Mm = function() {
                    var e = o.range,
                        t = u.Th(u.coords.x).x,
                        i = u.getDate(u.coords.x, !0);
                    e.end = {
                        x: t,
                        "time": i
                    }, u.Fi(e)
                }, this.Km = function() {
                    o.resizingShadow || (o.resizingShadow = u.Ia(o.resizing)), u.rk()
                }, this.Lm = function() {
                    if (o.movingShadow && o.movingShadow.calendar !== u && (o.movingShadow.calendar.da(), o.movingShadow.calendar = null, DayPilot.de(o.movingShadow), o.movingShadow = null), !o.movingShadow) {
                        window.navigator.userAgent.indexOf("Chrome/61.0") > -1 || DayPilot.Util.addClass(o.moving, u.A(T.eventMovingSource));
                        var e = o.movingEvent;
                        o.movingShadow = u.Ia(e)
                    }
                    u.Yj(), u.$j()
                }, this.Qm = {};
                var H = this.Qm;
                H.start = function() {
                    var e = {};
                    e.start = u.coords, e.calendar = u, o.rectangleSelect = e
                }, H.draw = function() {
                    var e = o.rectangleSelect,
                        t = o.rectangleSelect.start,
                        i = u.coords;
                    H.clear();
                    var n, a, r, l, s, d, c, h, v = {
                        "x": e.x,
                        "y": e.y,
                        "width": e.width,
                        "height": e.height
                    };
                    if (function() {
                            s = Math.min(t.x, i.x), c = Math.max(t.x, i.x), "Free" === u.multiSelectRectangle ? (d = Math.min(t.y, i.y), h = Math.max(t.y, i.y)) : "Row" === u.multiSelectRectangle && (d = t.y, h = t.y)
                        }(), "Free" === u.multiSelectRectangle) n = s, a = d, r = c - s, l = h - d;
                    else {
                        if ("Row" !== u.multiSelectRectangle) throw "Invalid DayPilot.Scheduler.multiSelectRectangle value: " + u.multiSelectRectangle;
                        var p = u.aj(d).i,
                            m = u.rowlist[p];
                        a = m.top, l = m.height;
                        n = u.Th(s).cell.left;
                        var g = u.Th(c).cell;
                        r = g.left + g.width - n
                    }
                    var y = DayPilot.Util.div(u.divRectangle, n, a, r, l);
                    if (y.style.boxSizing = "border-box", y.className = u.A("_selectionrectangle"), e.x = n, e.y = a, e.width = r, e.height = l, (e.x !== v.x || e.y !== v.y || e.width !== v.width || e.height !== v.height) && "function" == typeof u.onRectangleEventSelecting) {
                        var b = {};
                        b.events = f.eventsInRectangle(e.x, e.y, e.width, e.height).map(function(e) {
                            return e.event
                        }), b.start = u.getDate(e.x, !0), b.end = u.getDate(e.x + e.width, !0), u.onRectangleEventSelecting(b)
                    }
                }, H.clear = function() {
                    u.divRectangle.innerHTML = "", u.elements.rectangle = []
                }, this.Rm = function() {
                    var e, t;
                    if (!(u.coords && u.rowlist && u.rowlist.length > 0 && u.itline && u.itline.length > 0)) return null;
                    if (e = u.Th(u.coords.x).x, t = u.aj(u.coords.y).i, !(t >= u.rowlist.length)) {
                        return u.cells.findXy(e, t)[0]
                    }
                }, this.Om = function() {
                    var e = this.Rm();
                    if (this.hover.cell) {
                        if (this.hover.cell.x === e.x && this.hover.cell.y === e.y) return;
                        this.$l()
                    }
                    if (this.hover.cell = e, "function" == typeof this.onCellMouseOver) {
                        var t = {};
                        t.cell = e, this.onCellMouseOver(t)
                    }
                }, this.$l = function() {
                    if (this.hover.cell) {
                        if ("function" == typeof this.onCellMouseOut) {
                            var e = {};
                            e.cell = this.hover.cell, this.onCellMouseOut(e)
                        }
                        this.hover.cell = null
                    }
                }, this.hover = {}, this.Nm = function() {
                    var e = this.Rm();
                    e && (this.hover.cell && this.hover.cell.x === e.x && this.hover.cell.y === e.y || this.jd())
                }, this.Gm = function() {
                    this.divCrosshair.innerHTML = "", this.Sm = null, this.Tm = null
                }, this.ea = function() {
                    if (this.Gm(), this.Um && this.Um.parentNode && (this.Um.parentNode.removeChild(this.Um), this.Um = null), this.Vm) {
                        for (var e = 0; e < this.Vm.length; e++) {
                            var t = this.Vm[e];
                            t.parentNode && t.parentNode.removeChild(t)
                        }
                        this.Vm = null
                    }
                    this.Gg = -1, this.Fg = -1
                }, this.jd = function() {
                    var e, t;
                    if (u.coords && u.rowlist && u.rowlist.length > 0 && (e = u.Th(u.coords.x).x, t = u.aj(u.coords.y).i, !(t >= u.rowlist.length))) {
                        var i = this.crosshairType,
                            n = u.rowlist[t];
                        if ("Full" === i) {
                            var a = this.itline[e],
                                o = a.left,
                                r = this.Sm;
                            if (!r) {
                                var r = document.createElement("div");
                                r.style.height = u.Hg + "px", r.style.position = "absolute", r.style.top = "0px", r.className = u.A("_crosshair_vertical"), this.Sm = r, this.divCrosshair.appendChild(r)
                            }
                            r.style.left = o + "px", r.style.width = a.width + "px";
                            var l = n.top,
                                s = n.height,
                                d = this.wh(),
                                r = this.Tm;
                            if (!r) {
                                var r = document.createElement("div");
                                r.style.width = d + "px", r.style.height = s + "px", r.style.position = "absolute", r.style.top = l + "px", r.style.left = "0px", r.className = u.A("_crosshair_horizontal"), this.Tm = r, this.divCrosshair.appendChild(r)
                            }
                            r.style.top = l + "px", r.style.height = s + "px"
                        }
                        var c = this.timeHeader ? this.timeHeader.length - 1 : 1;
                        "number" == typeof u.crosshairTimeHeaderLevel && u.crosshairTimeHeaderLevel < c && u.crosshairTimeHeaderLevel >= 0 && (c = u.crosshairTimeHeaderLevel);
                        var h = u.fk(c, u.coords.x);
                        if (h && this.Gg !== h.x) {
                            this.Um && this.Um.parentNode && (this.Um.parentNode.removeChild(this.Um), this.Um = null);
                            var s = B.timeHeader(c).height,
                                r = document.createElement("div");
                            r.style.width = h.cell.width + "px", r.style.height = s + "px", r.style.left = "0px", r.style.top = "0px", r.style.position = "absolute", r.className = u.A("_crosshair_top"), this.Um = r;
                            var f = this.divNorth,
                                v = c;
                            this.nav.timeHeader ? this.J.timeHeader[h.x + "_" + v].appendChild(r) : f && f.firstChild.rows[v].cells[e] && f.firstChild.rows[v].cells[e].firstChild.appendChild(r)
                        }
                        if (this.Fg !== t) {
                            if (this.Vm) {
                                for (var p = 0; p < this.Vm.length; p++) {
                                    var m = this.Vm[p];
                                    m.parentNode && m.parentNode.removeChild(m)
                                }
                                this.Vm = null
                            }
                            this.rowHeaderCols ? this.rowHeaderCols.length : 1;
                            if (this.Vm = [], this.divHeader.rows[t])
                                for (var p = 0; p < this.divHeader.rows[t].cells.length; p++) {
                                    var d = u.zh(),
                                        r = document.createElement("div");
                                    r.style.width = d + "px", r.style.height = n.height + "px", r.style.left = "0px", r.style.top = "0px", r.style.position = "absolute", r.className = u.A("_crosshair_left"), this.Vm.push(r), this.divHeader.rows[t].cells[p].firstChild.appendChild(r)
                                }
                        }
                        h && (this.Gg = h.x), this.Fg = t
                    }
                }, this.fk = function(e, t) {
                    var i = u.timeHeader[e];
                    if (!i) return null;
                    for (var n = 0; n < i.length; n++) {
                        var a = i[n];
                        if (t >= a.left && t < a.left + a.width) {
                            var o = {};
                            return o.cell = a, o.x = n, o
                        }
                    }
                    return null
                }, this.Wm = function(e) {
                    return u.fk(u.timeHeader.length - 1, e)
                }, this.cm = function(e) {
                    if (e.cancelBubble = !0, !u.allowDefaultContextMenu) return !1
                }, this.Fm = function(e) {
                    var t = u.rangeHold;
                    if (!t || !t.start || !t.end) return !1;
                    var i = this.tj(t.start.y),
                        n = t.start.x < t.end.x,
                        a = (n ? t.start.x : t.end.x) * this.cellWidth,
                        o = (n ? t.end.x : t.start.x) * this.cellWidth + this.cellWidth,
                        r = i.top,
                        l = i.bottom;
                    return e.x >= a && e.x <= o && e.y >= r && e.y <= l
                }, this.Fi = function(e, t) {
                    function i(e) {
                        var t, i, n, a, o = e.end.time > e.start.time,
                            r = e.start.y,
                            l = e.start.time && e.end.time;
                        if (u.snapToGrid && u.snapToGridTimeRangeSelecting || !l) {
                            var s = o ? e.start.x : e.end.x,
                                d = o ? e.end.x : e.start.x,
                                c = u.itline[s],
                                h = u.itline[d];
                            n = c.start, a = h.end, t = c.left, i = h.left + h.width
                        } else o ? (n = e.start.time, a = e.end.time) : (n = e.end.time, a = e.start.time), t = u.getPixels(n).left, i = u.getPixels(a).left;
                        var f = i - t,
                            v = u.elements.range2;
                        if (!v) {
                            v = document.createElement("div"), v.style.position = "absolute", v.setAttribute("unselectable", "on");
                            var p = document.createElement("div");
                            p.className = u.A("_shadow_inner"), v.appendChild(p), u.divShadow.appendChild(v)
                        }
                        return v.className = u.A("_shadow"), v.firstChild.innerHTML = "", v.style.left = t + "px", v.style.top = u.rowlist[r].top + "px", v.style.width = f + "px", v.style.height = u.rowlist[r].height - 1 + "px", v.calendar = u, u.elements.range2 = v,
                            function() {
                                v.overlapping = !1;
                                var i = u.rowlist[r];
                                u.nk(v, i, t, f, null);
                                var n = o ? e.start.time : e.end.time,
                                    a = o ? e.end.time : e.start.time;
                                u.ok(v, n, a, i.id)
                            }(), v
                    }
                    var e = e || o.range;
                    e && e.calendar === u && ! function() {
                        var n = e.end.time > e.start.time,
                            a = n ? e.start.x : e.end.x,
                            o = n ? e.end.x : e.start.x,
                            r = e.start.y,
                            l = u.rowlist[r];
                        if (l && !l.hidden) {
                            var s = u.itline[a],
                                d = u.itline[o],
                                c = u.Xm,
                                h = s.start.addTime(l.data.offset),
                                f = d.end.addTime(l.data.offset);
                            if (u.snapToGrid && u.snapToGridTimeRangeSelecting || (n ? (h = e.start.time, f = e.end.time) : (h = e.end.time, f = e.start.time)), t || !c || c.start.getTime() !== h.getTime() || c.end.getTime() !== f.getTime() || c.resource !== u.rowlist[r].id) {
                                var v = {
                                        "start": h,
                                        "end": u.Uf(f),
                                        "resource": u.rowlist[r].id
                                    },
                                    p = {};
                                p.start = v.start, p.end = v.end, p.duration = new DayPilot.Duration(h, f), p.resource = u.rowlist[r].id, p.row = u.Ji(l), p.allowed = !0, p.left = {}, p.left.html = p.start.toString(u.timeRangeSelectingStartEndFormat, R.locale()), p.left.enabled = u.timeRangeSelectingStartEndEnabled, p.left.space = 5, p.left.width = null, p.left.height = u.eventHeight, p.right = {}, p.right.html = p.end.toString(u.timeRangeSelectingStartEndFormat, R.locale()), p.right.enabled = u.timeRangeSelectingStartEndEnabled, p.right.space = 5, p.right.width = null, p.right.height = u.eventHeight, p.overlapping = p.row.events.forRange(h, f).length > 0, p.html = null, p.cssClass = null, u.Xm = v, "function" != typeof u.onTimeRangeSelecting || t || (u.onTimeRangeSelecting(p), p.resource = v.resource), p.end = u.uf(p.end), e.args = p;
                                var m = u.Ym(e);
                                u.Ei(m, p.start, p.end);
                                var g = i(m);
                                p.html && (g.firstChild.innerHTML = p.html), p.cssClass && DayPilot.Util.addClass(g, p.cssClass), u.tk(g, p), e.Am = m, e.disabled = !p.allowed, u.uk(g, p)
                            }
                        }
                    }()
                }, this.Ym = function(e) {
                    return {
                        "start": {
                            "x": e.start.x,
                            "y": e.start.y,
                            "time": e.start.time
                        },
                        "end": {
                            "x": e.end.x,
                            "time": e.end.time
                        },
                        "disabled": e.disabled,
                        "calendar": e.calendar,
                        "args": e.args
                    }
                }, this.range = {}, this.range.all = function() {
                    return M.get()
                }, this.Zm = {};
                var M = this.Zm;
                this.Zm.list = [], this.Zm.clear = function() {
                    DayPilot.de(DayPilot.list(M.list).map(function(e) {
                        return e.div
                    })), M.list = []
                }, this.Zm.add = function(e) {
                    e.div = u.elements.range2, u.elements.range2 = null, u.wk(), M.list.push(e)
                }, this.Zm.get = function() {
                    return DayPilot.list(M.list).map(function(e) {
                        return u.Di(e)
                    })
                }, this.Zm.dispatch = function() {
                    if (u.allowMultiRange && !o.range) {
                        var e = DayPilot.list(M.list).last();
                        u.Ci(e)
                    }
                }, this.$m = function(e) {
                    if ("Disabled" === u.timeRangeSelectedHandling) return !1;
                    if (!DayPilot.Global.touch.active && !DayPilot.Global.touch.start) {
                        e = e || window.event;
                        var t = DayPilot.Util.mouseButton(e);
                        if (!o.range && !o.rectangleSelect && !(u.rangeHold && u.Fm(u.coords) && (t.right || t.middle) || u.nj(u.aj(u.coords.y).i))) {
                            var i = {},
                                n = u.Th(u.coords.x).x;
                            i.start = {
                                y: u.aj(u.coords.y).i,
                                x: n
                            }, i.end = {
                                x: n
                            }, i.calendar = u, u.rangeHold = i, u.Ci(i)
                        }
                    }
                }, this.timeouts = {}, this.timeouts.drawEvents = null, this.timeouts.drawCells = null, this.timeouts.drawRows = null, this.timeouts.click = null, this.timeouts.resClick = [], this.timeouts.updateFloats = null, this.bh = function(e) {
                    u.Lg();
                    var t = u.nav.scroll;
                    if (u.dk = t.scrollLeft, u.bk = t.scrollTop, u.ek = t.clientWidth, u.divTimeScroll && (u.divTimeScroll.scrollLeft = u.dk), u.divResScroll.scrollTop = u.bk, v.isEnabled() && u.L && "Auto" != u.cellWidthSpec)
                        if (v.active) l();
                        else {
                            if (u.nav.scroll.scrollLeft < u.infiniteScrollingMargin) return v.active = !0, u.nav.scroll.style.overflowX = "hidden", void setTimeout(function() {
                                v.shiftStart(-u.infiniteScrollingStepDays)
                            }, 100);
                            if (u.nav.scroll.scrollWidth - (u.nav.scroll.scrollLeft + u.nav.scroll.clientWidth) < u.infiniteScrollingMargin) return v.active = !0, u.nav.scroll.style.overflowX = "hidden", void setTimeout(function() {
                                v.shiftStart(u.infiniteScrollingStepDays)
                            }, 100)
                        } if (u.navigatorBackSync && ! function() {
                            var e = DayPilot.Util.evalVariable(u.navigatorBackSync),
                                t = u.getViewPort().start;
                            e.select(t, {
                                "dontNotify": !0,
                                "dontFocus": !0
                            })
                        }(), u.timeouts.drawCells && (clearTimeout(u.timeouts.drawCells), u.timeouts.drawCells = null), u.scrollDelayCells > 0) u.timeouts.drawCells = setTimeout(u._m(), u.scrollDelayCells);
                    else {
                        u._m()()
                    }
                    return u.progressiveRowRendering && (u.timeouts.drawRows && (clearTimeout(u.timeouts.drawRows), u.timeouts.drawRows = null), u.scrollDelayRows > 0 ? u.timeouts.drawRows = setTimeout(function() {
                        u.ki()
                    }, u.scrollDelayRows) : u.ki()), u.dynamicLoading ? (u.jg(), void u.an()) : (u.timeouts.drawEvents && (clearTimeout(u.timeouts.drawEvents), u.timeouts.drawEvents = null), u.scrollDelayEvents > 0 ? u.timeouts.drawEvents = setTimeout(u.bn(), u.scrollDelayEvents) : u.Da(), u.timeouts.updateFloats && (clearTimeout(u.timeouts.updateFloats), u.timeouts.updateFloats = null), u.scrollDelayFloats > 0 ? u.timeouts.updateFloats = setTimeout(function() {
                        u._g()
                    }, u.scrollDelayFloats) : u._g(), void(u.onScrollCalled = !0))
                }, this._m = function() {
                    return function() {
                        u && (u.jg(), u.Xg())
                    }
                }, this.bn = function() {
                    return function() {
                        u && (u.mm() ? window.setTimeout(function() {
                            u.jm(), window.setTimeout(function() {
                                u.Da(!0)
                            }, 50)
                        }, 50) : u.oh())
                    }
                }, this.Lg = function() {
                    this.J.eventHeight = null, this.J.drawArea = null
                }, this.show = function() {
                    this.visible = !0, this.Jg = !0, u.nav.top.style.display = "", this.Ca(), this.Sg(), this.Fj(), u.bh()
                }, this.hide = function() {
                    this.visible = !1, this.Jg = !1, u.nav.top.style.display = "none"
                }, this.cn = function() {}, this.an = function() {
                    var e = u.nav.scroll;
                    u.dk = e.scrollLeft, u.bk = e.scrollTop, u.ek = e.clientWidth, u.divTimeScroll.scrollLeft = u.dk, u.divResScroll.scrollTop = u.bk, u.refreshTimeout && window.clearTimeout(u.refreshTimeout);
                    var t = u.scrollDelayDynamic;
                    u.refreshTimeout = window.setTimeout(u.dn(e.scrollLeft, e.scrollTop), t), u._g()
                }, this.Bj = function(e) {
                    if (!u.events.list) return null;
                    for (var t = 0; t < this.events.list.length; t++) {
                        var i = this.events.list[t];
                        if (u.Qd(i, e)) {
                            var n = {};
                            return n.ex = i, n.index = t, n.modified = !u.en(e, i), n
                        }
                    }
                    return null
                }, this.en = function(e, t) {
                    for (var i in e)
                        if (("object" != typeof e[i] || e[i] instanceof DayPilot.Date) && e[i] !== t[i]) return !1;
                    for (var i in t)
                        if ("object" != typeof t[i] && e[i] !== t[i]) return !1;
                    return !0
                }, this.Zg = function(e, t, i) {
                    var n = i && i.clearEvents,
                        a = i && i.remove,
                        o = i && i.dontForceCellRendering,
                        r = [];
                    if (u.events.list || (u.events.list = []), n) u.pa(e);
                    else {
                        var l = [];
                        DayPilot.list(a).forEach(function(e) {
                            var t = DayPilot.list(u.events.list).find(function(t) {
                                return t.id === e
                            });
                            t && l.push(t)
                        }), l.forEach(function(e) {
                            var t = u.events.$h(e);
                            r = r.concat(t), DayPilot.rfa(u.events.list, e)
                        });
                        for (var s = [], d = 0; d < e.length; d++) {
                            var c = e[d];
                            s[d] = u.Bj(c)
                        }
                        for (var d = 0; d < e.length; d++) {
                            var c = e[d],
                                h = s[d],
                                f = h && h.modified,
                                v = !h;
                            if (f) {
                                this.events.list[h.index] = c;
                                var p = u.events.$h(h.ex);
                                r = r.concat(p)
                            } else v && this.events.list.push(c);
                            (f || v) && (r = r.concat(u.events._h(c)))
                        }
                        u.ai(r), u.bi()
                    }
                    u.Rg(), u.ya();
                    if (n || o) {
                        u.Y();
                        var m = u.xi;
                        m && u.Ug(), u.Tg(), m ? u.Xg() : u.Fj(), u.Da()
                    } else u.ci(r, !1, function() {
                        t && t(), u.jm(), u.Da()
                    }), u.Fj()
                }, this.dn = function(e, t) {
                    return u.C() ? function() {
                        u.scrollX = e, u.scrollY = t, u.R("Scroll")
                    } : function() {
                        if ("function" == typeof u.onScroll) {
                            var e = function(e) {
                                    var t = function() {
                                        if (u.Ha() && "function" == typeof u.onAfterRender) {
                                            var e = {};
                                            e.isCallBack = !1, e.isScroll = !0, e.data = null, u.onAfterRender(e)
                                        }
                                    };
                                    u.Zg(e.events, t, e)
                                },
                                t = {};
                            t.viewport = u.getViewPort(), t.async = !1, t.events = [], t.remove = [], t.clearEvents = !0, t.dontForceCellRendering = !1, t.loaded = function() {
                                this.async && e(t)
                            }, u.onScroll(t), t.async || e(t)
                        }
                    }
                }, this.gn = function() {
                    var e = this.lh(),
                        t = e.xStart,
                        i = e.xEnd - e.xStart,
                        n = e.yStart,
                        a = e.yEnd - e.yStart;
                    this.cellProperties || (this.cellProperties = {});
                    for (var o = 0; o <= i; o++) {
                        for (var r = t + o, l = 0; l < a; l++) {
                            var s = n + l;
                            this.rowlist[s].hidden || this.Qf(r, s)
                        }
                        this.hn(r)
                    }
                    for (var d = this.Ak(), s = d.start; s < d.end; s++) this.rowlist[s].hidden || this.in(s)
                }, this.Xg = function() {
                    if (!u.Td) {
                        if (null !== this.rowlist && this.rowlist.length > 0) {
                            if (this.cellSweeping) {
                                var e = this.cellSweepingCacheSize;
                                this.lm(e)
                            }
                            this.gn(), this.jn()
                        }
                        this.xi = !1
                    }
                }, this.jn = function() {
                    for (var e = this.lh(), t = e.xStart; t < e.xEnd; t++) {
                        t < this.itline.length - 1 && this.itline[t + 1].breakBefore && this.kn(t)
                    }
                }, this.kn = function(e) {
                    var t = "x" + e;
                    if (!this.J.breaks[t]) {
                        var i = this.itline[e + 1].left - 1,
                            n = this.Hg,
                            a = document.createElement("div");
                        a.style.left = i + "px", a.style.top = "0px", a.style.width = "1px", a.style.height = n + "px", a.style.fontSize = "1px", a.style.lineHeight = "1px", a.style.overflow = "hidden", a.style.position = "absolute", a.setAttribute("unselectable", "on"), a.className = this.A("_matrix_vertical_break"), this.divBreaks.appendChild(a), this.elements.breaks.push(a), this.J.breaks[t] = a
                    }
                }, this.lh = function() {
                    if (u.J.drawArea) return u.J.drawArea;
                    if (!this.nav.scroll) return null;
                    var e = u.bk,
                        t = {},
                        i = null != this.dynamicEventRenderingMarginX ? this.dynamicEventRenderingMarginX : this.dynamicEventRenderingMargin,
                        n = null != this.dynamicEventRenderingMarginY ? this.dynamicEventRenderingMarginY : this.dynamicEventRenderingMargin,
                        a = u.dk - i - v.shiftX,
                        o = a + u.ek + 2 * i,
                        r = 0,
                        l = 0;
                    if (u.itline && u.itline.length > 0) {
                        r = u.Th(a).x, l = u.Th(o, !0).x;
                        var s = this.ck();
                        l = Math.min(l, s), r = DayPilot.Util.atLeast(r, 0)
                    }
                    var d = e - n,
                        c = e + this.nav.scroll.offsetHeight + 2 * n,
                        h = this.aj(d).i,
                        f = this.aj(c).i;
                    f < this.rowlist.length && f++, t.xStart = r, t.xEnd = l, t.yStart = h, t.yEnd = f;
                    var p = u.nav.scroll;
                    return 0 === p.clientWidth && (p = u.divTimeScroll), t.pixels = {}, t.pixels.left = p.scrollLeft - v.shiftX, t.pixels.right = p.scrollLeft - v.shiftX + p.clientWidth, t.pixels.top = p.scrollTop, t.pixels.bottom = p.scrollTop + p.clientHeight, t.pixels.width = p.scrollWidth, u.J.drawArea = t, t
                }, this.wh = function() {
                    var e = 0,
                        t = this.itline[this.itline.length - 1];
                    return e = t ? t.left + t.width : 0, (e < 0 || isNaN(e)) && (e = 0), e
                }, this.in = function(e) {
                    var t = "y" + e;
                    if (!this.J.linesHorizontal[t]) {
                        var i = u.rowlist[e],
                            n = "number" == typeof i.forcedHeight ? i.forcedHeight : i.height,
                            a = i.top + n - 1,
                            o = this.wh(),
                            r = document.createElement("div");
                        r.style.left = "0px", r.style.top = a + "px", r.style.width = o + "px", r.style.height = "1px", r.style.fontSize = "1px", r.style.lineHeight = "1px", r.style.overflow = "hidden", r.style.position = "absolute", r.setAttribute("unselectable", "on"), r.className = this.A("_matrix_horizontal_line"), this.divLines.appendChild(r), this.J.linesHorizontal[t] = r
                    }
                }, this.hn = function(e) {
                    var t = this.itline[e];
                    if (t) {
                        var i = "x" + e;
                        if (!this.J.linesVertical[i]) {
                            var n = t.left + t.width - 1,
                                a = document.createElement("div");
                            a.style.left = n + "px", a.style.top = "0px", a.style.width = "1px", a.style.height = u.Hg + "px", a.style.fontSize = "1px", a.style.lineHeight = "1px", a.style.overflow = "hidden", a.style.position = "absolute", a.setAttribute("unselectable", "on"), a.className = this.A("_matrix_vertical_line"), this.divLines.appendChild(a), this.elements.linesVertical.push(a), this.J.linesVertical[i] = a
                        }
                    }
                }, this.Zj = function(e) {
                    function t() {
                        var t = u.ln(e, i.expanded, !1);
                        if (!n)
                            for (var a = 0; a < t.length; a++) {
                                var o = t[a];
                                u.yi(o)
                            }
                        u.Wk(), u.jg();
                        var r = u.Ji(i, e);
                        n ? u.Si(r) : u.Ri(r)
                    }
                    u.ch.skip = !0;
                    var i = this.rowlist[e],
                        n = !i.expanded;
                    if (i.expanded = n, i.resource && (i.resource.expanded = n), u.treeAnimation) {
                        var a = this.ln(e, i.expanded, !0);
                        u.Vk(a, n ? "show" : "hide", function() {
                            t()
                        })
                    } else t()
                }, this.Wk = function() {
                    u.Rg(), u.Pg(), u.ya(), u.Lg(), u.Ai(), m.load(), u.Ug(), u.Xg(), u.ki(), u.$g(), u.Da(), u.Lg()
                }, this.Rk = function(e) {
                    var t = {};
                    if (t.index = e, "function" == typeof this.onLoadNode) {
                        var i = {},
                            n = this.rowlist[e].resource;
                        i.resource = n, i.async = !1, i.loaded = function() {
                            this.async && (n.dynamicChildren = !1, n.expanded = !0, u.update())
                        }, this.onLoadNode(i), i.async || (n.dynamicChildren = !1, n.expanded = !0, this.update())
                    } else this.R("LoadNode", t)
                }, this.ln = function(e, t, i) {
                    var n = this.rowlist[e],
                        a = [];
                    if (null === n.children || 0 === n.children.length) return a;
                    for (var o = 0; o < n.children.length; o++) {
                        var r = n.children[o],
                            l = this.rowlist[r],
                            s = t && n.expanded && !l.Bl;
                        t && l.hidden && (l.forcedHeight = 0), i && !t || (l.hidden = !s), i || delete l.forcedHeight, t === s && a.push(r);
                        var d = this.ln(r, t);
                        d.length > 0 && (a = a.concat(d))
                    }
                    return a
                }, this.Pm = function(e, t) {
                    this.Zl(), this.mn(e, t)
                }, this.nn = function(e) {
                    if (!e) return !1;
                    var t = this.nav.scroll.scrollWidth,
                        i = this.nav.scroll.scrollLeft,
                        n = this.nav.scroll.clientWidth,
                        a = i + n;
                    return !(e < 0 && i <= 0) && (!(e > 0 && a >= t) && (this.nav.scroll.scrollLeft += e, u.coords.x += e, u.on(), !0))
                }, this.pn = function(e) {
                    if (!e) return !1;
                    var t = this.nav.scroll.scrollHeight,
                        i = this.nav.scroll.scrollTop,
                        n = this.nav.scroll.clientHeight,
                        a = i + n;
                    return !(e < 0 && i <= 0) && (!(e > 0 && a >= t) && (this.nav.scroll.scrollTop += e, u.coords.y += e, u.on(), !0))
                }, this.on = function() {
                    o.resizing && o.resizing.event.calendar === u ? u.Km() : o.moving && (o.movingEvent.calendar === u || o.movingEvent.calendar.dragOutAllowed) ? (o.moving.event || (o.moving.event = o.movingEvent), u.Lm()) : o.range && o.range.calendar === u && u.Mm()
                }, this.mn = function(e, t) {
                    if (this.nn(e) || this.pn(t)) {
                        var i = function(e, t) {
                            return function() {
                                u.mn(e, t)
                            }
                        };
                        this.qn = window.setTimeout(i(e, t), 100)
                    }
                }, this.Zl = function() {
                    u.qn && (window.clearTimeout(u.qn), u.qn = null)
                }, this.Rg = function() {
                    for (var e = 0, t = 0, i = 0; i < this.rowlist.length; i++) {
                        var n = this.rowlist[i];
                        n.hidden || (n.top = e, n.displayY = t, e += "number" == typeof n.forcedHeight ? n.forcedHeight : n.height, t += 1)
                    }
                    this.Hg = e
                }, this.Ug = function() {
                    DayPilot.browser.ie && u.rn(), this.elements.cells = [], this.elements.breaks = [], this.J.cells = [], this.J.breaks = [], this.divCells.innerHTML = "", this.divBreaks.innerHTML = "", u.Hk()
                }, this.Hk = function() {
                    this.divLines.innerHTML = "", this.J.linesVertical = {}, this.J.linesHorizontal = {}, this.elements.linesVertical = []
                }, this.rn = function(e) {
                    var t = DayPilot.list();
                    for (var i in u.J.cells) t.push(u.J.cells[i]);
                    t.forEach(function(e) {
                        u.Hj(e)
                    })
                }, this.Bi = function(e) {
                    var t = DayPilot.list();
                    for (var i in u.J.cells) t.push(u.J.cells[i]);
                    t.filter(function(t) {
                        return t && t.coords && t.coords.y === e
                    }).forEach(function(e) {
                        u.Hj(e)
                    })
                }, this.sn = 0, this.tn = DayPilot.list(["html", "cssClass", "backColor", "backImage", "backRepeat", "areas", "disabled"]), this.un = u.tn.add("business"), this.Qf = function(e, t) {
                    if (this.L) {
                        var i = u.Xh(e);
                        if (i) {
                            var n = e + "_" + t;
                            if (!this.J.cells[n]) {
                                var a = this.Ij(e, t);
                                if (u.ik(e, t), !this.drawBlankCells) {
                                    var o = !1;
                                    if (this.Wj(t) ? o = !1 : this.vn(a, u.tn) || (o = !0), o) return
                                }
                                var r = document.createElement("div");
                                r.style.left = i.left + "px", r.style.top = this.rowlist[t].top + "px", r.style.width = i.width + "px", r.style.height = this.rowlist[t].height + "px", r.style.position = "absolute", a && a.backColor && (r.style.backgroundColor = a.backColor), r.setAttribute("unselectable", "on"), r.className = this.A("_cell"), r.coords = {}, r.coords.x = e, r.coords.y = t, this.Wj(t) && DayPilot.Util.addClass(r, this.A("_cellparent")), P.J[t] && DayPilot.Util.addClass(r, this.A("_cell_selected"));
                                var l = u.cells.findXy(e, t)[0];
                                a && (a.cssClass && DayPilot.Util.addClass(r, a.cssClass), DayPilot.Util.isNullOrUndefined(a.html) || (r.innerHTML = a.html), a.backImage && (r.style.backgroundImage = 'url("' + a.backImage + '")'), a.backRepeat && (r.style.backgroundRepeat = a.backRepeat), a.business && u.cellsMarkBusiness && DayPilot.Util.addClass(r, u.A("_cell_business")), a.disabled && DayPilot.Util.addClass(r, u.A("_cell_disabled")), DayPilot.list(a.areas).forEach(function(e) {
                                    (e.start || e.end) && (e.left = u.getPixels(new DayPilot.Date(e.start)).left - i.left, e.width = u.getPixels(new DayPilot.Date(e.end)).left - e.left - i.left)
                                }), DayPilot.Areas.attach(r, l, {
                                    "areas": a.areas
                                }));
                                var s = _.getCell();
                                if (s && s.x === e && s.y === t && DayPilot.Util.addClass(r, u.A("_cell_focus")), this.divCells.appendChild(r), this.elements.cells.push(r), this.J.cells[n] = r, "function" == typeof u.onAfterCellRender) {
                                    var d = {};
                                    d.cell = DayPilot.Util.copyProps(l, {}, ["x", "y", "displayY", "start", "end", "resource"]), d.div = r, u.onAfterCellRender(d)
                                }
                            }
                        }
                    }
                }, this.Mh = {}, this.Fj = function() {
                    u.wn().forEach(function(e) {
                        u.Bi(e)
                    }), u.Xg()
                }, this.wn = function() {
                    for (var e = DayPilot.list(), t = this.lh(), i = t.xStart, n = t.xEnd - t.xStart, a = t.yStart, o = t.yEnd - t.yStart, r = 0; r < o; r++)
                        for (var l = a + r, s = 0; s <= n; s++) {
                            var d = i + s;
                            if (!this.rowlist[l].hidden && !u.Mh[d + "_" + l]) {
                                e.push(l);
                                break
                            }
                        }
                    return e
                }, this.ik = function(e, t) {
                    if ("function" == typeof this.onBeforeCellRender) {
                        if (u.beforeCellRenderCaching && u.Mh[e + "_" + t]) return;
                        u.Mh[e + "_" + t] = !0;
                        var i = u.Xh(e);
                        if (!i) return;
                        var n = u.cells.findXy(e, t)[0],
                            a = {};
                        return a.cell = n, a.getPixels = function(e) {
                            var e = new DayPilot.Date(e);
                            return u.getPixels(e).left - i.left
                        }, this.onBeforeCellRender(a), DayPilot.Util.copyProps(a.cell, a.cell.properties, u.un), a.cell.properties.disabled && (u.Mh.vk = !0), a
                    }
                }, this.vn = function(e, t) {
                    if (t) {
                        for (var i = 0; i < t.length; i++)
                            if (!DayPilot.Util.isNullOrUndefined(e[t[i]])) return !0
                    } else
                        for (var n in e)
                            if (!DayPilot.Util.isNullOrUndefined(e[n])) return !0;
                    return !1
                }, this.clearSelection = function() {
                    this.$g(), M.clear()
                }, this.cleanSelection = this.clearSelection, this.selectTimeRange = function(e, t, i, n) {
                    e = new DayPilot.Date(e), t = new DayPilot.Date(t);
                    var a = u.jh(i),
                        o = u.Vh(e),
                        r = o.current || o.next;
                    if (!r) throw new DayPilot.Exception("Time range selection 'start' out of timeline");
                    var l = u.Vh(new DayPilot.Date(t).addMilliseconds(-1)),
                        s = l.current || l.previous;
                    if (!s) throw new DayPilot.Exception("Time range selection 'end' out of timeline");
                    var d = {};
                    d.start = {
                        y: a.index,
                        x: DayPilot.indexOf(u.itline, r),
                        "time": e
                    }, d.end = {
                        x: DayPilot.indexOf(u.itline, s),
                        "time": t
                    }, d.calendar = this, u.Fi(d), n || setTimeout(function() {
                        u.Ci(d)
                    }, 0)
                }, this.mb = function() {
                    DayPilot.de(o.movingShadow), o.movingShadow = null, u.wk(), u.qk.clear(), DayPilot.Global.movingLink && (DayPilot.Global.movingLink.clear(), DayPilot.Global.movingLink = null)
                }, this.$g = function() {
                    this.divShadow.innerHTML = '<div style="position:absolute; left:0px; top:0px; width:0px; height:0px;"></div>',
                        this.elements.range = [], this.elements.range2 = null, this.wk(), u.rangeHold = null
                };
                var _ = {};
                _.cell = null, _.focusCell = function(e, t) {
                    _.unfocusCell();
                    var i = _.cellDiv(e, t);
                    i && DayPilot.Util.addClass(i, u.A("_cell_focus")), _.cell = {
                        x: e,
                        y: t
                    };
                    var n = u.bj();
                    if (n.start.x >= e) {
                        var a = u.itline[e].start;
                        u.scrollTo(a)
                    } else if (n.end.x <= e) {
                        var o = u.itline[e].end;
                        u.scrollTo(o, !1, "right")
                    }
                }, _.unfocusCell = function() {
                    if (_.cell) {
                        var e = _.cellDiv(_.cell.x, _.cell.y);
                        e && DayPilot.Util.removeClass(e, u.A("_cell_focus")), _.cell = null
                    }
                }, _.cellDiv = function(e, t) {
                    var i = e + "_" + t;
                    return u.J.cells[i]
                }, _.getCell = function() {
                    return _.cell
                }, _.target = function() {
                    var e = u.temp.keyboardTarget;
                    switch (e) {
                        case "component":
                            return u.nav.top;
                        case "document":
                            return document
                    }
                    throw new DayPilot.Exception("Invalid keyboardTarget value: " + e)
                }, _.xn = null, _.activateGrid = function() {
                    var e = _.target();
                    e !== document && u.nav.top.setAttribute("tabindex", "-1"), e.addEventListener("keyup", function(e) {
                        if (16 === e.keyCode) {
                            var t = _.xn;
                            _.xn = null, _.timeRangeSelect(t.start.x, t.start.y, t.end.x)
                        }
                    }), e.addEventListener("keydown", function(e) {
                        var t = 37,
                            i = 38,
                            n = 39,
                            a = 40,
                            o = 13;
                        [t, i, n, a].indexOf(e.keyCode) !== -1 && e.preventDefault(), e.shiftKey && !_.xn && (_.xn = {
                            "calendar": u,
                            "start": {
                                x: _.cell.x,
                                y: _.cell.y
                            }
                        });
                        var r = !_.xn;
                        switch (e.keyCode) {
                            case n:
                                _.cell.x < u.itline.length - 1 && _.focusCell(_.cell.x + 1, _.cell.y);
                                break;
                            case t:
                                _.cell.x > 0 && _.focusCell(_.cell.x - 1, _.cell.y);
                                break;
                            case i:
                                _.cell.y > 0 && r && _.focusCell(_.cell.x, _.cell.y - 1);
                                break;
                            case a:
                                _.cell.y < u.rowlist.length - 1 && r && _.focusCell(_.cell.x, _.cell.y + 1);
                                break;
                            case o:
                                _.timeRangeSelect(_.cell.x, _.cell.y)
                        }
                        e.keyCode !== t && e.keyCode !== n || _.xn && (_.xn.end = {
                            x: _.cell.x,
                            y: _.cell.y
                        }, u.Fi(_.xn))
                    })
                }, _.timeRangeSelect = function(e, t, i) {
                    var n = {};
                    n.start = {
                        y: t,
                        x: e
                    }, n.end = {
                        x: "undefined" == typeof i ? e : i
                    }, n.calendar = u, u.rangeHold = n, u.Ci(n)
                }, _.initGrid = function() {
                    _.activateGrid();
                    var e = u.bj();
                    _.focusCell(e.start.x, e.start.y), _.target() !== document && u.nav.top.focus()
                }, this.yn = _, this.Uc = {};
                var R = this.Uc;
                R.clearCache = function() {
                    delete u.J.eventHeight, delete u.J.headerHeight
                }, R.locale = function() {
                    return DayPilot.Locale.find(u.locale)
                }, R.timeFormat = function() {
                    return "Auto" !== u.timeFormat ? u.timeFormat : R.locale().timeFormat
                }, R.weekStarts = function() {
                    if ("Auto" === u.weekStarts) {
                        var e = R.locale();
                        return e ? e.weekStarts : 0
                    }
                    return u.weekStarts || 0
                }, R.mobile = function() {
                    var e = navigator.userAgent.toLowerCase();
                    return e.indexOf("mobile") !== -1 || e.indexOf("android") != -1
                }, R.layout = function() {
                    var e = /MSIE 6/i.test(navigator.userAgent);
                    return "Auto" === u.layout ? e ? "TableBased" : "DivBased" : u.layout
                }, R.notifyType = function() {
                    var e;
                    if ("Immediate" === u.notifyCommit) e = "Notify";
                    else {
                        if ("Queue" !== u.notifyCommit) throw "Invalid notifyCommit value: " + u.notifyCommit;
                        e = "Queue"
                    }
                    return e
                }, R.isResourcesView = function() {
                    return "Days" !== u.viewType
                }, R.useBox = function(e) {
                    return "Always" === u.useEventBoxes || "Never" !== u.useEventBoxes && e < 60 * u.Oj() * 1e3
                }, R.eventHeight = function() {
                    if (u.J.eventHeight) return u.J.eventHeight;
                    var e = u.Wd("_event_height").height;
                    return e || (e = u.eventHeight), u.J.eventHeight = e, e
                }, R.headerHeight = function() {
                    if (u.J.headerHeight) return u.J.headerHeight;
                    var e = u.Wd("_header_height").height;
                    return e || (e = u.headerHeight), u.J.headerHeight = e, e
                }, R.splitterWidth = function() {
                    return u.rowHeaderScrolling ? u.rowHeaderSplitterWidth : 1
                }, this.zn = {};
                var B = this.zn;
                B.timeHeader = function(e) {
                    var t = {};
                    t.top = 0, t.height = 0;
                    for (var i = R.headerHeight(), n = 0; n <= e; n++) {
                        var a = u.timeHeaders[n];
                        t.top += t.height, t.height = a.height || i
                    }
                    return t
                }, this.ed = function(e, t) {
                    var i = e + "_" + t;
                    return this.cellProperties && this.cellProperties[i] ? this.cellProperties[i].backColor : null
                }, this.Ij = function(e, t) {
                    var i = e + "_" + t;
                    if (u.cellConfig)
                        for (var n = 0, a = 0; a < u.resources.length; a++)
                            if (!u.resources[a].hidden) {
                                if (n === t) {
                                    t = a;
                                    break
                                }
                                n += 1
                            } if (this.cellProperties || (this.cellProperties = {}), this.cellProperties[i]) return this.cellProperties[i];
                    if (this.Bg && (this.cellProperties[i] = u.An(e, t)), !this.cellProperties[i]) {
                        var o = u.rowlist[t],
                            r = o.id,
                            l = o.start.getTime() - u.Pa().getTime(),
                            s = u.Xh(e),
                            d = s.start.addTime(l),
                            c = s.end.addTime(l),
                            h = {};
                        h.start = d, h.end = c, h.resource = r;
                        var f = {};
                        f.business = u.isBusiness(h), o.cellsDisabled && (u.Mh.vk = !0, f.disabled = !0), this.cellProperties[i] = f
                    }
                    return this.cellProperties[i]
                }, this.Bn = function(e, t, i) {
                    var n = t + "_" + i;
                    return this.cellProperties[n] = {}, DayPilot.Util.copyProps(e, this.cellProperties[n], u.un), this.cellProperties[n]
                }, this.An = function(e, t) {
                    if (!this.cellConfig) return null;
                    var i = this.cellConfig,
                        n = this.cellProperties[e + "_" + t];
                    !n && i.vertical && (n = this.cellProperties[e + "_0"]), !n && i.horizontal && (n = this.cellProperties["0_" + t]), !n && i["default"] && (n = i["default"]);
                    var a = {};
                    return DayPilot.Util.copyProps(n, a, u.un), a
                }, this.oa = function() {
                    if (!this.Bg && !this.Cg && (this.Cg = !0, this.cellConfig)) {
                        var e = this.cellConfig;
                        if (e.vertical)
                            for (var t = 0; t < e.x; t++) {
                                var i = this.cellProperties[t + "_0"];
                                if (i)
                                    for (var n = 1; n < e.y; n++) this.Bn(i, t, n)
                            }
                        if (e.horizontal)
                            for (var n = 0; n < e.y; n++) {
                                var i = this.cellProperties["0_" + n];
                                if (i)
                                    for (var t = 1; t < e.x; t++) this.Bn(i, t, n)
                            }
                        if (e["default"])
                            for (var i = e["default"], n = 0; n < e.y; n++)
                                for (var t = 0; t < e.x; t++) this.cellProperties[t + "_" + n] || this.Bn(i, t, n)
                    }
                }, this.isBusiness = function(e, t) {
                    var i = e.start,
                        n = e.end,
                        a = (n.getTime() - i.getTime()) / 6e4;
                    if (a <= 1440 && !(u.businessWeekends || t || 0 !== e.start.dayOfWeek() && 6 !== e.start.dayOfWeek())) return !1;
                    if (a < 720) {
                        var o = i.getHours();
                        if (o += i.getMinutes() / 60, o += i.getSeconds() / 3600, o += i.getMilliseconds() / 36e5, o < this.businessBeginsHour) return !1;
                        if (this.businessEndsHour >= 24) return !0;
                        if (o >= this.businessEndsHour) return !1
                    }
                    return !0
                }, this.wc = function() {
                    switch (u.M) {
                        case "aspnet":
                            if (!this.W()) throw new DayPilot.Exception("ASP.NET WebForms environment required. https://doc.daypilot.org/common/asp-net-webforms-required/");
                            break;
                        case "netmvc":
                            if (!this.backendUrl) throw new DayPilot.Exception("DayPilot.Scheduler.backendUrl required. https://doc.daypilot.org/common/backendurl-required-asp-net-mvc/");
                            break;
                        case "javaxx":
                            if (!this.backendUrl) throw new DayPilot.Exception("DayPilot.Scheduler.backendUrl required. https://doc.daypilot.org/common/backendurl-required-java/")
                    }
                }, this.Ca = function() {
                    "hidden" === this.nav.top.style.visibility && (this.nav.top.style.visibility = "visible")
                }, this.zd = function() {
                    var e = u.nav.top;
                    return !!e && (e.offsetWidth > 0 && e.offsetHeight > 0)
                }, this.Ad = function() {
                    var e = u.zd;
                    e() || u.Bd || (u.Bd = setInterval(function() {
                        e() && (clearInterval(u.Bd), u.show(), u.Ck())
                    }, 100))
                }, this.Cn = function(e) {
                    "Parent100Pct" !== this.heightSpec && (this.heightSpec = "Fixed"), this.height = e - (this.Ah() + 2), this.ya()
                }, this.setHeight = this.Cn, this.jh = function(e) {
                    return u.Yk(e).first()
                }, this._d = function() {
                    if (this.id && this.id.tagName) this.nav.top = this.id;
                    else {
                        if ("string" != typeof this.id) throw "DayPilot.Scheduler() constructor requires the target element or its ID as a parameter";
                        if (this.nav.top = document.getElementById(this.id), !this.nav.top) throw "DayPilot.Scheduler: The placeholder element not found: '" + t + "'."
                    }
                }, this.Dn = function() {
                    this.rowHeaderColumnsMode = "Legacy", this.Rd(), this.Og(), this.ri(), this.Sg(), this.Dd(), this.ba(), o.register(this), this.ka(this.afterRenderData, !1), this.gm(), this.Ga(), this.R("Init")
                }, this.init = function() {
                    return this.wc(), this.En(), this.Fn(), this.Ad(), this.Sl(), this.Gn(), this
                }, this.Gn = function() {
                    u.temp.keyboard && _.initGrid()
                }, this.Hn = function() {
                    u.multiselect.Wg(u.selectedEvents)
                }, this.Fn = function() {
                    if (this._d(), !this.nav.top.dp) {
                        this.ni();
                        if (this.$d()) return this.Dn(), this.L = !0, void this.Lg();
                        this.Dd(), this.ba(), o.register(this), this.gm(), this.Hn(), u.zoomLevels && u.zoomLevels[u.zoom.active] && u.zoom.setActive(u.zoom.active), this.gc();
                        var angular = u.Pd.scope || u.ch.enabled;
                        u.scrollToDate ? u.scrollTo(u.scrollToDate) : u.scrollX || u.scrollY ? u.setScroll(u.scrollX, u.scrollY) : angular || u.bh(), u.scrollToResourceId && (u.scrollToResource(u.scrollToResourceId), u.scrollToResourceId = null);
                        var e = function() {
                            u.scrollY && u.setScroll(u.scrollX, u.scrollY)
                        };
                        window.setTimeout(e, 200), this.messageHTML && window.setTimeout(function() {
                            u.message(u.messageHTML)
                        }, 0), this.Ga(), this.Lg(), this.ka(this.afterRenderData, !1), u.initEventEnabled && setTimeout(function() {
                            u.R("Init")
                        }), this.be(), this.L = !0, this.dj = !0;
                        var t = u.eh;
                        t ? u.scrollTo(t.date, t.animated, t.position) : u.bh()
                    }
                }, this.En = function() {
                    u.C() && delete u.infinite
                }, this.ce = null, this.Ud = function(e) {
                    if (e) {
                        var t = {
                            "events": {
                                "preInit": function() {
                                    var e = this.data;
                                    e && (DayPilot.isArray(e.list) ? u.events.list = e.list : u.events.list = e)
                                },
                                "postInit": function() {}
                            },
                            "links": {
                                "preInit": function() {
                                    var e = this.data;
                                    e && (DayPilot.isArray(e.list) ? u.links.list = e.list : u.links.list = e)
                                },
                                "postInit": function() {}
                            },
                            "scrollTo": {
                                "preInit": function() {},
                                "postInit": function() {
                                    this.data && u.dh(this.data, e.scrollToAnimated, e.scrollToPosition)
                                }
                            },
                            "scrollX": {
                                "postInit": function() {
                                    this.data && u.hh(this.data)
                                }
                            },
                            "scrollY": {
                                "postInit": function() {
                                    this.data && u.xh(this.data)
                                }
                            },
                            "zoom": {
                                "preInit": function() {
                                    var e = this.data,
                                        t = e !== u.zoom.active,
                                        i = u.zoom.tg();
                                    u.zoom.ei(e, i);
                                    t ? this.date = i : this.date = null
                                },
                                "postInit": function() {
                                    this.date && u.dh(this.date, !1, u.zoomPosition)
                                }
                            }
                        };
                        u.ce = t, u.ch.scrollToRequested && (t.scrollTo.data = u.ch.scrollToRequested, u.ch.scrollToRequested = null), u.ch.scrollXRequested && (t.scrollX.data = u.ch.scrollXRequested, u.ch.scrollXRequested = null), u.ch.scrollYRequested && (t.scrollY.data = u.ch.scrollYRequested, u.ch.scrollYRequested = null);
                        for (var i in e) t[i] || (u[i] = e[i]);
                        for (var i in e)
                            if (t[i]) {
                                var n = t[i];
                                n.data = e[i], n.preInit && n.preInit()
                            }
                    }
                }, this.be = function() {
                    var e = u.ce;
                    for (var t in e) {
                        var i = e[t];
                        i.postInit && i.postInit()
                    }
                    u.ce = {}
                }, this.diag = function() {
                    var e = {};
                    return e.dataEvents = u.events.list && u.events.list.length, e.dataRows = u.rowlist && u.rowlist.length, e.dataTimeline = u.itline && u.itline.length, e.dataCells = e.dataTimeline * e.dataRows, e.renderedEvents = u.elements.events.length, e.renderedCells = u.elements.cells.length, e.renderedRows = u.divResScroll.firstChild.childNodes.length - 1, e.domEvents = u.divEvents.getElementsByTagName("*").length, e.domCells = u.divCells.getElementsByTagName("*").length, e.domRows = u.divResScroll.getElementsByTagName("*").length, e
                }, this.temp = {}, this.temp.getPosition = function() {
                    var e = Math.floor(u.coords.x / u.cellWidth),
                        t = u.aj(u.coords.y).i;
                    if (t < u.rowlist.length) {
                        var i = {};
                        return i.start = u.itline[e].start, i.end = u.itline[e].end, i.resource = u.rowlist[t].id, i
                    }
                    return null
                }, this.temp.keyboard = !1, this.temp.keyboardTarget = "document", this.temp.allowDuplicateEventIds = !1, this.internal = {}, this.internal.initialized = function() {
                    return u.L
                }, this.internal.dragInProgress = this.Jm, this.internal.startMoving = this.wm, this.internal.invokeEvent = this.db, this.internal.eventMenuClick = this.rb, this.internal.timeRangeMenuClick = this.sb, this.internal.resourceHeaderMenuClick = this.Hi, this.internal.linkMenuClick = this.Gi, this.internal.bubbleCallBack = this.pb, this.internal.findEventDiv = this.Od, this.internal.rowtools = this.Pi, this.internal.getNodeChildren = this.ia, this.internal.callback = function() {
                    u.R.apply(u, arguments)
                }, this.internal.createRowObject = this.Ji, this.internal.restools = this.sl, this.internal.gantt = null, this.internal.adjustEndIn = u.uf, this.internal.adjustEndNormalize = u.Wf, this.internal.touch = u.tc, this.internal.cssNames = u.ym, this.internal.enableCellStacking = function(e) {
                    u.Dg = !0, u.Eg = e
                }, this.internal.deleteDragSource = function() {
                    u.nb()
                }, this.internal.skipUpdate = u.ch.skipUpdate, this.internal.skipped = u.ch.skipped, this.internal.loadOptions = u.Ud, this.internal.postInit = u.be, this.internal.enableAngular2 = function() {
                    u.ch.enabled = !0
                }, this.internal.enableReact = function(e, t) {
                    u.jj.react = e, u.jj.reactDOM = t
                }, this.internal.reactRefs = function() {
                    return DayPilot.Util.copyProps(u.jj, {}, ["react", "reactDOM"])
                }, this.Init = this.init, this.Ud(s)
            }, s = "2019.4.4160" === (new DayPilot.Scheduler).v, DayPilot.Row = function(e, t) {
                if (!e) throw "Now row object supplied when creating DayPilot.Row";
                if (!t) throw "No parent control supplied when creating DayPilot.Row";
                var i = DayPilot.indexOf(t.rowlist, e);
                this.In = {};
                var n = this.In;
                n.id = e.id, n.name = e.name, n.data = e.resource, n.tags = e.tags;
                var a = this;
                a.isRow = !0, a.menuType = "resource", a.start = e.start, a.name = e.name, a.value = e.id, a.id = e.id, a.tags = e.tags, a.bubbleHtml = e.bubbleHtml, a.index = i, a.displayY = e.displayY, a.level = e.level, a.calendar = t, a.data = e.resource, a.Jn = e, a.$ = {}, a.$.row = e, a.toJSON = function(e) {
                    var t = {};
                    return t.start = this.start, t.name = this.name, t.value = this.value, t.id = this.id, t.index = this.index, t
                }, a.parent = function() {
                    return a.Jn.Cl ? t.Ji(a.Jn.Cl) : null
                }, a.children = function() {
                    var e = DayPilot.list(a.$.row.children).map(function(e) {
                        return t.Ji(t.rowlist[e])
                    });
                    return e.add = function(e) {
                        var t = a.$.row.resource;
                        t.children || (t.children = []), t.children.push(e)
                    }, e
                }, a.loaded = function() {
                    return a.Jn.loaded
                }, Object.defineProperty(a, "hidden", {
                    get: function() {
                        return a.Jn.hidden
                    }
                }), Object.defineProperty(a, "hiddenUsingFilter", {
                    get: function() {
                        return a.Jn.Bl
                    },
                    set: function(e) {
                        a.Jn.Bl = e, e || (a.Jn.hidden = !a.Jn.Dl())
                    }
                }), a.cells = {}, a.cells.all = function() {
                    for (var e = [], i = t.itline.length, n = a.index, o = 0; o < i; o++) {
                        var r = t.cells.findXy(o, n);
                        e.push(r[0])
                    }
                    return t.Jj(e)
                }, a.cells.forRange = function(e, i) {
                    var n = a,
                        o = n.start.getTime() - t.Pa().getTime();
                    e = new DayPilot.Date(e), i = new DayPilot.Date(i);
                    var r = t.Pa().addTime(o),
                        l = t.Ph().addTime(o);
                    e < r && (e = r), i > l && (i = l);
                    var s = t.cells.find(e, a)[0],
                        d = t.cells.find(i.addTime(-1), a)[0];
                    if (!s) return null;
                    if (!d) return null;
                    if (s.y !== d.y) return null;
                    for (var c = s.y, h = [], u = s.x; u <= d.x; u++) h.push(t.cells.Gj(u, c));
                    return t.Jj(h)
                }, a.cells.totalDuration = function() {
                    return new DayPilot.Duration(a.cells.all().map(function(e) {
                        return e.end.getTime() - e.start.getTime()
                    }).reduce(function(e, t) {
                        return e + t
                    }, 0))
                }, a.events = {}, a.events.all = function() {
                    for (var e = DayPilot.list(), t = 0; t < a.Jn.events.length; t++) e.push(a.Jn.events[t]);
                    return e
                }, a.events.isEmpty = function() {
                    return 0 === a.Jn.events.length
                }, a.events.forRange = function(e, t) {
                    return a.Jn.events.forRange(e, t)
                }, a.events.totalDuration = function() {
                    var e = 0;
                    return a.events.all().forEach(function(t) {
                        e += t.part.end.getTime() - t.part.start.getTime()
                    }), new DayPilot.Duration(e)
                }, a.groups = {}, a.groups.collapseAll = function() {
                    for (var e = 0; e < a.Jn.blocks.length; e++) {
                        new o(a.Jn.blocks[e]).Kn()
                    }
                    t.bi(), t.ci(a.index), t.ya()
                }, a.groups.expandAll = function() {
                    for (var e = 0; e < a.Jn.blocks.length; e++) {
                        new o(a.Jn.blocks[e]).Ln()
                    }
                    t.bi(), t.ci(a.index), t.ya()
                }, a.groups.expanded = function() {
                    for (var e = [], i = 0; i < a.Jn.blocks.length; i++) {
                        var n = a.Jn.blocks[i];
                        n.expanded && n.lines.length > t.groupConcurrentEventsLimit && e.push(new o(n))
                    }
                    return DayPilot.list(e)
                }, a.groups.collapsed = function() {
                    for (var e = [], t = 0; t < a.Jn.blocks.length; t++) {
                        var i = a.Jn.blocks[t];
                        i.expanded || e.push(new o(i))
                    }
                    return DayPilot.list(e)
                }, a.groups.all = function() {
                    for (var e = [], t = 0; t < a.Jn.blocks.length; t++) {
                        var i = a.Jn.blocks[t];
                        e.push(new o(i))
                    }
                    return DayPilot.list(e)
                }, a.events.collapseGroups = a.groups.collapseAll, a.events.expandGroups = a.groups.expandAll, a.column = function(e) {
                    return new r(a, e)
                }, a.toggle = function() {
                    t.Zj(a.index)
                }, a.collapse = function() {
                    a.$.row.expanded && a.toggle()
                }, a.expand = function() {
                    a.$.row.expanded || a.toggle()
                }, a.remove = function() {
                    t.rows.remove(a)
                }, a.edit = function() {
                    t.rows.edit(a)
                }, a.addClass = function(e) {
                    var i = a,
                        n = t.divHeader,
                        i = n.rows[i.index];
                    if (i) {
                        var o = DayPilot.list(i.cells).map(function(e) {
                            return e.cellDiv
                        });
                        DayPilot.Util.addClass(o, e)
                    }
                    a.$.row.cssClass = DayPilot.Util.addClassToString(a.$.row.cssClass, e), a.data.cssClass = e
                }, a.removeClass = function(e) {
                    var i = a,
                        n = t.divHeader,
                        i = n.rows[i.index];
                    if (i) {
                        var o = DayPilot.list(i.cells).map(function(e) {
                            return e.cellDiv
                        });
                        DayPilot.Util.removeClass(o, e)
                    }
                    a.$.row.cssClass = DayPilot.Util.removeClassFromString(a.$.row.cssClass, e), a.data.cssClass = DayPilot.Util.removeClassFromString(a.data.cssClass, e)
                };
                var o = function(e) {
                        var i = function(e) {
                            for (var i = 0; i < t.elements.events.length; i++) {
                                var n = t.elements.events[i];
                                if (n.event === e) return n
                            }
                            return null
                        };
                        this.Ln = function() {
                            e.expanded = !0;
                            var n = t._k;
                            DayPilot.list(e.events).forEach(function(e) {
                                n.push(e.id())
                            });
                            var a = i(e);
                            if (a) {
                                t.im(a);
                                var o = DayPilot.indexOf(t.elements.events, a);
                                o !== -1 && t.elements.events.splice(o, 1)
                            }
                        }, this.expand = function() {
                            this.Ln(), t.bi(), t.ci(e.row.index), t.ya()
                        }, this.Kn = function() {
                            if (e.lines.length > t.groupConcurrentEventsLimit) {
                                e.expanded = !1;
                                var i = DayPilot.list(e.events).map(function(e) {
                                    return e.id()
                                });
                                t._k = t._k.filter(function(e) {
                                    return !DayPilot.contains(i, e)
                                })
                            }
                        }, this.collapse = function() {
                            this.Kn(), t.bi(), t.ci(e.row.index), t.ya()
                        }
                    },
                    r = function(e, t) {
                        this.html = function(i) {
                            var n = e.calendar.divHeader,
                                a = n.rows[e.index].cells[t],
                                o = a.textDiv;
                            return "undefined" == typeof i ? o.innerHTML : void(o.innerHTML = i)
                        }
                    }
            }, o.moving = null, o.movingEvent = null, o.originalMouse = null, o.resizing = null, o.resizingEvent = null, o.preventEventClick = !1, o.globalHandlers = !1, o.timeRangeTimeout = null, o.selectedCells = null, o.dragStart = function(e, t, i, n) {
                DayPilot.us(e);
                var a = o.drag = {};
                return a.element = e, a.duration = t, a.text = n, a.id = i, a.data = {
                    "id": i,
                    "text": n,
                    "duration": t,
                    "externalHtml": n
                }, !1
            }, DayPilot.Scheduler.startDragging = function(e) {
                var e = e || {},
                    t = e.element,
                    i = e.keepElement ? null : t;
                DayPilot.us(t);
                var n = o.drag = {};
                return n.element = i, n.id = e.id, n.duration = e.duration || 60, n.text = e.text || "", n.data = e, !1
            }, DayPilot.Scheduler.makeDraggable = function(e) {
                function t() {
                    var t = e.duration || 60;
                    t instanceof DayPilot.Duration && (t = t.totalSeconds());
                    var i = o.drag = {};
                    i.element = n, i.id = e.id, i.duration = t, i.text = e.text || "", i.data = e
                }
                e = e || {};
                var i = e.element,
                    n = e.keepElement ? null : e.remove || i;
                if (!i) throw new DayPilot.Exception("makeDraggable(options): options.element must be specified");
                DayPilot.us(i), DayPilot.re(i, "mousedown", function(e) {
                    if (DayPilot.Util.mouseButton(e).left) {
                        t();
                        var i = e.target || e.srcElement;
                        if (i.tagName) {
                            var n = i.tagName.toLowerCase();
                            if ("textarea" === n || "select" === n || "input" === n) return !1
                        }
                        return e.preventDefault && e.preventDefault(), !1
                    }
                }), i.ontouchstart = function(e) {
                    window.setTimeout(function() {
                        t(), o.gTouchMove(e), e.preventDefault()
                    }, 0), e.preventDefault()
                }
            }, DayPilot.Scheduler.stopDragging = function() {
                if (o.drag && o.drag.schedulerSourceEvent) {
                    var e = o.drag.schedulerSourceEvent,
                        t = e.event.calendar;
                    t && DayPilot.Util.removeClass(e, t.A(i.ym.eventMovingSource))
                }
                if (o.dragStop(), o.resizing && (DayPilot.de(o.resizingShadow), o.resizing = null, o.resizingEvent = null, o.resizingShadow = null), o.moving) {
                    var i = o.movingEvent.calendar;
                    i && DayPilot.Util.removeClass(o.moving, i.A(i.ym.eventMovingSource)), DayPilot.de(o.movingShadow), o.moving = null, o.movingEvent = null, o.movingShadow = null
                }
                if (o.range) {
                    var i = o.range.calendar;
                    i.clearSelection(), o.range = null
                }
                document.body.style.cursor = "", DayPilot.list(o.registered).forEach(function(e) {
                    e.Zl(), e.wk(), e.Pi.resetMoving()
                })
            }, o.dragStop = function() {
                o.gShadow && (document.body.removeChild(o.gShadow), o.gShadow = null), o.drag = null
            }, o.register = function(e) {
                o.registered || (o.registered = DayPilot.list(), o.registered.out = function() {
                    o.registered.forEach(function(e) {
                        e.da()
                    })
                });
                for (var t = 0; t < o.registered.length; t++)
                    if (o.registered[t] === e) return;
                o.registered.push(e)
            }, o.unregister = function(e) {
                var t = o.registered;
                if (t) {
                    var i = DayPilot.indexOf(t, e);
                    i !== -1 && t.splice(i, 1), 0 === t.length && (t = null)
                }
                t || (DayPilot.ue(document, "mousemove", o.gMouseMove), DayPilot.ue(document, "mouseup", o.gMouseUp), DayPilot.ue(document, "mousedown", o.gMouseDown), DayPilot.ue(document, "touchmove", o.gTouchMove), DayPilot.ue(document, "touchend", o.gTouchEnd), DayPilot.ue(window, "keyup", o.gKeyUp), o.globalHandlers = !1)
            }, o.gTouchMove = function(e) {
                if (o.resizing) {
                    var n = o.resizing.event.calendar;
                    n.coords = n.tc.relativeCoords(e), n.tc.updateResizing(), e.preventDefault()
                }
                if (o.moving && !o.drag) {
                    var n = o.movingEvent.calendar;
                    n.coords = n.tc.relativeCoords(e), n.tc.updateMoving(), e.preventDefault(),
                        function() {
                            if (n.dragOutAllowed) {
                                var i = t(e);
                                if (!i || i !== n) {
                                    var a = o.movingEvent;
                                    o.drag = {};
                                    var r = o.drag;
                                    r.id = a.id(), r.text = a.text(), r.schedulerSourceEvent = o.moving, r.element = null, r.duration = (a.rawend().getTime() - a.start().getTime()) / 1e3, r.text = a.text(), r.id = a.id(), r.event = DayPilot.Util.copyProps(a, new DayPilot.Event), n.wk(), DayPilot.de(o.movingShadow), o.movingShadow.calendar = null, o.movingShadow = null, o.moveDragStart = null, o.registered.out()
                                }
                            }
                        }()
                }
                if (o.drag) {
                    e.preventDefault();
                    var a = i(e),
                        n = t(e);
                    if (n) {
                        if (o.gShadow && document.body.removeChild(o.gShadow), o.gShadow = null, n.coords = n.tc.relativeCoords(e), !o.movingShadow && n.rowlist.length > 0) {
                            if (!o.moving) {
                                o.moving = {};
                                var r = o.drag.event;
                                if (!r) {
                                    var l = n.itline[0].start,
                                        e = {
                                            "id": o.drag.id,
                                            "start": l,
                                            "end": l.addSeconds(o.drag.duration),
                                            "text": o.drag.text
                                        },
                                        s = o.drag.data;
                                    if (s) {
                                        var d = ["duration", "element", "remove", "id", "text"];
                                        for (var c in s) DayPilot.contains(d, c) || (e[c] = s[c])
                                    }
                                    r = new DayPilot.Event(e), r.calendar = n, r.part.duration = 1e3 * o.drag.duration
                                }
                                r.part.external = !0;
                                var h = o.drag.schedulerSourceEvent;
                                h && h.event && h.event.calendar === n && (r.part.external = !1), o.movingEvent = r
                            }
                            o.movingShadow = n.Ia(o.movingEvent)
                        }
                        o.moving && n.tc.updateMoving()
                    } else {
                        DayPilot.de(o.movingShadow);
                        var u = o.moving;
                        o.moving = null, o.movingEvent = null, o.movingShadow = null, o.gShadow || (o.gShadow = o.createGShadow(o.drag.data), o.gShadow.source = u);
                        var f = o.gShadow;
                        f.style.left = a.x + "px", f.style.top = a.y + "px", o.registered.out()
                    }
                }
            }, o.gTouchEnd = function(e) {
                o.gMouseUp(e)
            }, o.gMouseMove = function(e) {
                if ("undefined" != typeof o && !(DayPilot.Global.touch.active || DayPilot.Global.touch.start || (e = e || window.event, e.insideMainD || e.srcElement && e.srcElement.inside))) {
                    var t = DayPilot.mc(e);
                    if (o.drag) {
                        if (!o.drag.startFired) {
                            var i = o.drag.data || {},
                                n = i.onDragStart,
                                a = !1;
                            if ("function" == typeof n) {
                                var r = {};
                                r.data = i, r.preventDefault = function() {
                                    r.preventDefault.value = !0
                                }, n(r), a = r.preventDefault.value
                            }
                            if (o.drag.startFired = !0, a) return void(o.drag = null)
                        }
                        document.body.style.cursor = "move", o.gShadow || (o.gShadow = o.createGShadow(o.drag.data));
                        var l = o.gShadow;
                        if (l.style.left = t.x + "px", l.style.top = t.y + "px", o.moving = null, o.movingEvent = null, o.movingShadow) {
                            var s = o.movingShadow.calendar;
                            s && s.wk(), o.movingShadow.calendar = null, DayPilot.de(o.movingShadow), o.movingShadow = null
                        }
                    } else if (o.moving && o.movingEvent && o.movingEvent.calendar.dragOutAllowed && !o.drag) {
                        var s = o.movingEvent.calendar,
                            e = o.movingEvent;
                        document.body.style.cursor = "move", o.gShadow || (o.gShadow = o.createGShadow(e.data), o.gShadow.source = o.moving);
                        var l = o.gShadow;
                        l.style.left = t.x + "px", l.style.top = t.y + "px", o.drag = {};
                        var d = o.drag;
                        d.schedulerSourceEvent = o.moving, d.element = null, d.duration = (e.rawend().getTime() - e.start().getTime()) / 1e3, d.text = e.text(), d.id = e.value(), d.event = DayPilot.Util.copyProps(e, new DayPilot.Event), s.wk(), DayPilot.de(o.movingShadow), o.movingShadow.calendar = null, o.movingShadow = null
                    }
                    o.registered.out()
                }
            }, o.gUnload = function(e) {
                if (o.registered)
                    for (var t = 0; t < o.registered.length; t++) {
                        var i = o.registered[t];
                        o.unregister(i)
                    }
            }, o.gMouseDown = function(e) {
                o.editing && o.editing.blur()
            }, o.gKeyUp = function(e) {
                var e = e || window.event;
                17 === e.keyCode && o.rangeCalendar && o.rangeCalendar.Zm.dispatch()
            }, o.gMouseUp = function(e) {
                if (DayPilot.list(o.registered).forEach(function(e) {
                        e.Zl(), e.Wh = {}
                    }), o.resizing) {
                    var t = function() {
                        var e = o.resizingEvent,
                            t = e.calendar;
                        document.body.style.cursor = "", o.resizing = null, o.resizingEvent = null, DayPilot.de(o.resizingShadow), o.resizingShadow = null, t.cn(), t && (t.Hm = null)
                    };
                    if (setTimeout(function() {
                            o.preventEventClick = !1
                        }), !o.resizingShadow) return void t();
                    var i = o.resizingEvent,
                        n = i.calendar,
                        a = o.resizingShadow.finalStart,
                        r = o.resizingShadow.finalEnd,
                        s = o.resizingShadow.overlapping,
                        h = !o.resizingShadow.allowed,
                        u = n.kk.isInvalid();
                    n.wk(), n.kk.clear();
                    var f = "left" === o.resizing.dpBorder ? "start" : "end";
                    if (t(), s || h || u) return;
                    n.hb(i, a, r, f)
                } else if (o.movingEvent) {
                    var t = function() {
                        DayPilot.Global.movingAreaData = null;
                        var e = o.movingShadow && o.movingShadow.calendar;
                        o.movingShadow && (DayPilot.de(o.movingShadow), o.movingShadow.calendar = null), document.body.style.cursor = "", o.moving = null, o.movingEvent = null, o.drag = null, e.cn(), e && (e.fa = null)
                    };
                    if (!o.movingShadow) return void t();
                    var v = o.drag && o.drag.schedulerSourceEvent,
                        i = v ? v.event : o.movingEvent,
                        n = o.movingShadow.calendar;
                    if (!n) return void t();
                    if (i.calendar && i.calendar !== n) {
                        var p = i.calendar,
                            m = i,
                            g = DayPilot.Util.copyProps(i.data);
                        i = new DayPilot.Event(g, p), i.part = {
                            "external": !0,
                            "duration": p.Qj(m)
                        }
                    }
                    if (DayPilot.Util.removeClass(o.moving, n.A(n.ym.eventMovingSource)), function() {
                            if (o.drag && o.drag.schedulerSourceEvent) {
                                var e = o.drag.schedulerSourceEvent;
                                if (e && e.event) {
                                    var t = e.event.calendar;
                                    DayPilot.Util.removeClass(e, t.A(n.ym.eventMovingSource))
                                }
                            }
                        }(), !o.movingShadow.row) return void t();
                    clearTimeout(n.Xj.timeout);
                    var a = o.movingShadow.start,
                        r = o.movingShadow.end,
                        y = "Days" !== n.viewType ? o.movingShadow.row.id : null,
                        b = i.part.external,
                        w = o.movingShadow.line,
                        s = o.movingShadow.overlapping,
                        h = !o.movingShadow.allowed;
                    if (o.drag && (n.todo || (n.todo = {}), n.todo.del = o.drag.element, o.drag = null), o.movingShadow.calendar = null, document.body.style.cursor = "", o.moving = null, o.movingEvent = null, s || h || n.qk.forbidden || n.qk.invalid) return void n.mb();
                    var e = e || window.event;
                    n.lb(i, a, r, y, b, e, w), DayPilot.Global.movingAreaData = null
                } else if (o.range) {
                    e = e || window.event;
                    var D = DayPilot.Util.mouseButton(e),
                        k = o.range,
                        n = k.calendar,
                        t = function() {
                            n.cn()
                        };
                    n.Xm = null;
                    var P = e.ctrlKey || e.metaKey;
                    if (n.allowMultiRange) return n.elements.range2.overlapping ? (DayPilot.de(n.elements.range2), n.elements.range2 = null, n.wk()) : n.Zm.add(k), o.range = null, P || n.Zm.dispatch(), void t();
                    if (o.timeRangeTimeout) return clearTimeout(o.timeRangeTimeout), o.timeRangeTimeout = null, void t();
                    n.rangeHold = k, o.range = null;
                    var x = function(e) {
                            return function() {
                                o.timeRangeTimeout = null;
                                var t = n.elements.range2;
                                return t && t.overlapping ? void n.clearSelection() : (n.Ci(e), void("Hold" !== n.timeRangeSelectedHandling && "HoldForever" !== n.timeRangeSelectedHandling ? l() : n.rangeHold = e))
                            }
                        },
                        C = n.Ym(k);
                    if (t(), !D.left) return void(o.timeRangeTimeout = null);
                    if (k.moved || "Disabled" === n.timeRangeDoubleClickHandling) {
                        x(C)();
                        var e = e || window.event;
                        return e.cancelBubble = !0, !1
                    }
                    o.timeRangeTimeout = setTimeout(x(C), n.doubleClickTimeout)
                } else if (d.row) {
                    var n = d.calendar;
                    n && n.ol()
                } else if (c.source) {
                    var n = c.calendar;
                    n.oj.clearShadow(), n.oj.hideLinkpoints(), c.source = null, c.calendar = null
                } else if (o.splitting) {
                    var A = o.splitting;
                    A.cleanup(), o.splitting = null
                } else if (o.rectangleSelect) {
                    var S = o.rectangleSelect,
                        n = S.calendar;
                    if (!S.moved) return o.rectangleSelect = null, void(n.Fm(n.coords) || n.$m(e));
                    var E = S.x,
                        T = S.y,
                        H = S.width,
                        M = S.height,
                        _ = !1,
                        R = n.ph.eventsInRectangle(E, T, H, M).map(function(e) {
                            return e.event
                        });
                    if ("function" == typeof n.onRectangleEventSelect) {
                        var B = n.aj(T).i,
                            U = n.aj(T + M).i,
                            N = {
                                "start": {
                                    "y": B
                                },
                                "end": {
                                    "y": U
                                }
                            },
                            L = n.Yi(N),
                            z = {};
                        if (z.events = R, z.append = !1, z.start = n.getDate(E, !0), z.end = n.getDate(E + H, !0), z.resources = L, z.preventDefault = function() {
                                this.preventDefault.value = !0
                            }, n.onRectangleEventSelect(z), z.preventDefault.value) return n.Qm.clear(), void(o.rectangleSelect = null);
                        _ = z.append
                    }
                    if (_ || n.multiselect.clear(!0), R.forEach(function(e) {
                            n.multiselect.add(e, !0)
                        }), n.multiselect.redraw(), setTimeout(function() {
                            n.Qm.clear(), o.rectangleSelect = null
                        }, 0), "function" == typeof n.onRectangleEventSelected) {
                        var z = {};
                        z.events = R, n.onRectangleEventSelected(z)
                    }
                }
                if (o.drag && (o.drag.event && o.drag.event.part && delete o.drag.event.part.external, o.drag = null, document.body.style.cursor = ""), o.gShadow) {
                    if (o.gShadow.source) {
                        var n = o.gShadow.source.event.calendar;
                        DayPilot.Util.removeClass(o.gShadow.source, n.A(n.ym.eventMovingSource))
                    }
                    document.body.removeChild(o.gShadow), o.gShadow = null
                }
                o.moveOffsetX = null, o.moveDragStart = null
            }, o.createGShadow = function(e) {
                var e = e || {},
                    t = document.createElement("div");
                return t.setAttribute("unselectable", "on"), t.style.position = "absolute", t.style.width = "100px", t.style.height = "20px", t.style.zIndex = 101, t.style.pointerEvents = "none", t.style.backgroundColor = "#aaaaaa", t.style.opacity = .5, t.style.filter = "alpha(opacity=50)", t.className = e.externalCssClass, e.externalHtml && (t.innerHTML = e.externalHtml), document.body.appendChild(t), t
            };
            var d = {};
            DayPilot.Global.rowmoving = d;
            var c = {};
            DayPilot.Global.linking = c, "undefined" != typeof jQuery && ! function(e) {
                    e.fn.daypilotScheduler = function(e) {
                        var t = null,
                            i = this.forEach(function() {
                                if (!this.daypilot) {
                                    var i = new DayPilot.Scheduler(this.id || this, e);
                                    i.init(), this.daypilot = i, t || (t = i)
                                }
                            });
                        return 1 === this.length ? t : i
                    }
                }(jQuery),
                function() {
                    var e = DayPilot.am();
                    e && e.directive("daypilotScheduler", ["$parse", function(e) {
                        return {
                            "restrict": "E",
                            "template": "<div id='{{id}}'></div>",
                            "compile": function(t, i) {
                                return t[0].removeAttribute("id"), t[0].innerHTML = this["template"].replace("{{id}}", i["id"]),
                                    function(t, i, n) {
                                        var a = new DayPilot.Scheduler(i[0].firstChild);
                                        a.Pd.scope = t;
                                        var o = n["id"];
                                        o && (t[o] = a);
                                        var r = n["publishAs"];
                                        if (r) {
                                            (0, e(r).assign)(t, a)
                                        }
                                        for (var l in n)
                                            if (0 === l.indexOf("on")) {
                                                var s = DayPilot.Util.shouldApply(l);
                                                s ? ! function(i) {
                                                    a[i] = function(a) {
                                                        var o = e(n[i]);
                                                        DayPilot.Util.safeApply(t, function() {
                                                            o(t, {
                                                                "args": a
                                                            })
                                                        })
                                                    }
                                                }(l) : ! function(i) {
                                                    a[i] = function(a) {
                                                        e(n[i])(t, {
                                                            "args": a
                                                        })
                                                    }
                                                }(l)
                                            } var d = t["$watch"],
                                            c = n["config"] || n["daypilotConfig"],
                                            h = n["events"] || n["daypilotEvents"];
                                        c || a.init(), d.call(t, c, function(e, t) {
                                            a.Ud(e), a.L ? (a.update(), a.be()) : a.init()
                                        }, !0), h && d.call(t, h, function(e) {
                                            a.events.list = e, a.gc({
                                                "eventsOnly": !0
                                            })
                                        }, !0), t.$on("$destroy", function() {
                                            a.dispose()
                                        })
                                    }
                            }
                        }
                    }])
                }(), "undefined" != typeof Sys && Sys.Application && Sys.Application.notifyScriptLoaded && Sys.Application.notifyScriptLoaded()
        }
    }(), "undefined" == typeof DayPilot) var DayPilot = {};
"undefined" == typeof DayPilot.Global && (DayPilot.Global = {}),
    function() {
        "undefined" == typeof DayPilot.Year && (DayPilot.Year = function(e, t) {
            this.v = "2019.4.4160";
            this.startDate = new DayPilot.Date, this.cssOnly = !0, this.cssClassPrefix = null, this.columns = 4, this.cellWidth = 20, this.showWeekNumbers = !1, this.Mn = [], this.Xf = function() {
                this.root.dp = this, this.Oe = new DayPilot.Date(this.startDate.toString("yyyy-01-01", "en-us"))
            }, this.A = function(e) {
                return this.cssClassPrefix ? this.cssClassPrefix + e : ""
            }, this.Yf = function() {
                return this.showWeekNumbers ? this.cellWidth : 0
            }, this.Nn = function() {
                this.Mn = [];
                var e = this.columns,
                    t = 12 / e;
                this.root.className = this.A("_main"), this.root.style.width = e * (7 * this.cellWidth + this.Yf()) + "px";
                for (var i = 0; i < t; i++) {
                    for (var n = 0; n < e; n++) {
                        var a = i * e + n,
                            o = o + "_nav_" + a,
                            r = document.createElement("div");
                        r.id = o, r.style.float = "left", this.root.appendChild(r);
                        var l = new DayPilot.Navigator(o);
                        l.startDate = this.Oe.addMonths(a), l.cssOnly = this.cssOnly, l.cssClassPrefix = this.cssClassPrefix, l.cellWidth = this.cellWidth, l.showWeekNumbers = this.showWeekNumbers, l.internal.showLinks = {}, l.selectMode = "none", l.timeRangeSelectedHandling = "JavaScript", l.onTimeRangeSelected = this.On, l.init(), l.root.className = "", this.Mn.push(l)
                    }
                    var s = document.createElement("div");
                    s.style.clear = "left", this.root.appendChild(s)
                }
            }, this.On = function(e) {
                alert("clicked: " + e.day)
            }, this.init = function() {
                if (this.root = document.getElementById(e), !this.root.dp) return this.Xf(), this.Nn(), this
            }
        })
    }();