(e)
| 2139 | </div></div><div class='dhx_cal_larea'></div>`; |
| 2140 | } |
| 2141 | function Jt(e) { |
| 2142 | e._init_touch_events = function() { |
| 2143 | if ((this.config.touch && (navigator.userAgent.indexOf("Mobile") != -1 || navigator.userAgent.indexOf("iPad") != -1 || navigator.userAgent.indexOf("Android") != -1 || navigator.userAgent.indexOf("Touch") != -1) && !window.MSStream || navigator.platform === "MacIntel" && navigator.maxTouchPoints > 1) && (this.xy.scroll_width = 0, this._mobile = !0), this.config.touch) { |
| 2144 | var i = !0; |
| 2145 | try { |
| 2146 | document.createEvent("TouchEvent"); |
| 2147 | } catch { |
| 2148 | i = !1; |
| 2149 | } |
| 2150 | i ? this._touch_events(["touchmove", "touchstart", "touchend"], function(t) { |
| 2151 | return t.touches && t.touches.length > 1 ? null : t.touches[0] ? { target: t.target, pageX: t.touches[0].pageX, pageY: t.touches[0].pageY, clientX: t.touches[0].clientX, clientY: t.touches[0].clientY } : t; |
| 2152 | }, function() { |
| 2153 | return !1; |
| 2154 | }) : window.PointerEvent || window.navigator.pointerEnabled ? this._touch_events(["pointermove", "pointerdown", "pointerup"], function(t) { |
| 2155 | return t.pointerType == "mouse" ? null : t; |
| 2156 | }, function(t) { |
| 2157 | return !t || t.pointerType == "mouse"; |
| 2158 | }) : window.navigator.msPointerEnabled && this._touch_events(["MSPointerMove", "MSPointerDown", "MSPointerUp"], function(t) { |
| 2159 | return t.pointerType == t.MSPOINTER_TYPE_MOUSE ? null : t; |
| 2160 | }, function(t) { |
| 2161 | return !t || t.pointerType == t.MSPOINTER_TYPE_MOUSE; |
| 2162 | }); |
| 2163 | } |
| 2164 | }, e._touch_events = function(i, t, n) { |
| 2165 | var s, a, o, _, r, d, l = 0; |
| 2166 | function h(m, g, c) { |
| 2167 | e.event(m, g, function(u) { |
| 2168 | return !!e._is_lightbox_open() || (n(u) ? void 0 : c(u)); |
| 2169 | }, { passive: !1 }); |
| 2170 | } |
| 2171 | function p(m) { |
| 2172 | n(m) || (e._hide_global_tip(), _ && (e._on_mouse_up(t(m)), e._temp_touch_block = !1), e._drag_id = null, e._drag_mode = null, e._drag_pos = null, e._pointerDragId = null, clearTimeout(o), _ = d = !1, r = !0); |
| 2173 | } |
| 2174 | h(document.body, i[0], function(m) { |
| 2175 | if (!n(m)) { |
| 2176 | var g = t(m); |
| 2177 | if (g) { |
| 2178 | if (_) |
| 2179 | return function(c) { |
| 2180 | if (!n(c)) { |
| 2181 | var u = e.getState().drag_mode, f = !!e.matrix && e.matrix[e._mode], y = e.render_view_data; |
| 2182 | u == "create" && f && (e.render_view_data = function() { |
| 2183 | for (var w = e.getState().drag_id, D = e.getEvent(w), M = f.y_property, k = e.getEvents(D.start_date, D.end_date), N = 0; N < k.length; N++) |
| 2184 | k[N][M] != D[M] && (k.splice(N, 1), N--); |
| 2185 | D._sorder = k.length - 1, D._count = k.length, this.render_data([D], e.getState().mode); |
| 2186 | }), e._on_mouse_move(c), u == "create" && f && (e.render_view_data = y), c.preventDefault && c.preventDefault(), c.cancelBubble = !0; |
| 2187 | } |
| 2188 | }(g), m.preventDefault && m.preventDefault(), m.cancelBubble = !0, e._update_global_tip(), !1; |
| 2189 | a = t(m), d && (a ? (s.target != a.target || Math.abs(s.pageX - a.pageX) > 5 || Math.abs(s.pageY - a.pageY) > 5) && (r = !0, clearTimeout(o)) : r = !0); |
| 2190 | } |
| 2191 | } |
| 2192 | }), h(this._els.dhx_cal_data[0], "touchcancel", p), h(this._els.dhx_cal_data[0], "contextmenu", function(m) { |
| 2193 | if (!n(m)) |
| 2194 | return d ? (m && m.preventDefault && m.preventDefault(), m.cancelBubble = !0, !1) : void 0; |
| 2195 | }), h(this._obj, i[1], function(m) { |
| 2196 | var g; |
| 2197 | if (document && document.body && document.body.classList.add("dhx_cal_touch_active"), !n(m)) |
| 2198 | if (e._pointerDragId = m.pointerId, _ = r = !1, d = !0, g = a = t(m)) { |
no test coverage detected