Built files from Bizgaze WebServer
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

login.library.js 2.3MB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625
  1. /*! jQuery v3.5.0 | (c) JS Foundation and other contributors | jquery.org/license */
  2. function dropdownEffectData(n) { var r = null, u = null, f = $(n), t = $(".dropdown-menu", n), i = f.parents("ul.nav"); return i.length > 0 && (r = i.data("dropdown-in") || null, u = i.data("dropdown-out") || null), { target: n, dropdown: f, dropdownMenu: t, effectIn: t.data("dropdown-in") || r, effectOut: t.data("dropdown-out") || u } } function dropdownEffectStart(n, t) { t && (n.dropdown.addClass("dropdown-animating"), n.dropdownMenu.addClass("animated"), n.dropdownMenu.addClass(t)) } function dropdownEffectEnd(n, t) { n.dropdown.one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend", function () { n.dropdown.removeClass("dropdown-animating"); n.dropdownMenu.removeClass("animated"); n.dropdownMenu.removeClass(n.effectIn); n.dropdownMenu.removeClass(n.effectOut); typeof t == "function" && t() }) } function _toConsumableArray(n) { if (Array.isArray(n)) { for (var t = 0, i = Array(n.length); t < n.length; t++)i[t] = n[t]; return i } return Array.from(n) } function hasClass(n, t) { return (" " + n.className + " ").indexOf(" " + t + " ") > -1 } var _floatingLabelHelper, dropdownSelectors, jquerySwipeHandler, _slice, _typeof, idCount; !function (n, t) { "use strict"; "object" == typeof module && "object" == typeof module.exports ? module.exports = n.document ? t(n, !0) : function (n) { if (!n.document) throw new Error("jQuery requires a window with a document"); return t(n) } : t(n) }("undefined" != typeof window ? window : this, function (n, t) { "use strict"; function br(n, t, i) { var r, e, u = (i = i || f).createElement("script"); if (u.text = n, t) for (r in se) (e = t[r] || t.getAttribute && t.getAttribute(r)) && u.setAttribute(r, e); i.head.appendChild(u).parentNode.removeChild(u) } function ut(n) { return null == n ? n + "" : "object" == typeof n || "function" == typeof n ? ri[pr.call(n)] || "object" : typeof n } function pi(n) { var t = !!n && "length" in n && n.length, i = ut(n); return !u(n) && !rt(n) && ("array" === i || 0 === t || "number" == typeof t && 0 < t && t - 1 in n) } function c(n, t) { return n.nodeName && n.nodeName.toLowerCase() === t.toLowerCase() } function bi(n, t, r) { return u(t) ? i.grep(n, function (n, i) { return !!t.call(n, i, n) !== r }) : t.nodeType ? i.grep(n, function (n) { return n === t !== r }) : "string" != typeof t ? i.grep(n, function (n) { return -1 < ii.call(t, n) !== r }) : i.filter(t, n, r) } function uu(n, t) { while ((n = n[t]) && 1 !== n.nodeType); return n } function et(n) { return n } function fi(n) { throw n; } function fu(n, t, i, r) { var f; try { n && u(f = n.promise) ? f.call(n).done(t).fail(i) : n && u(f = n.then) ? f.call(n, t, i) : t.apply(void 0, [n].slice(r)) } catch (n) { i.apply(void 0, [n]) } } function oi() { f.removeEventListener("DOMContentLoaded", oi); n.removeEventListener("load", oi); i.ready() } function le(n, t) { return t.toUpperCase() } function y(n) { return n.replace(he, "ms-").replace(ce, le) } function bt() { this.expando = i.expando + bt.uid++ } function ou(n, t, i) { var u, r; if (void 0 === i && 1 === n.nodeType) if (u = "data-" + t.replace(ve, "-$&").toLowerCase(), "string" == typeof (i = n.getAttribute(u))) { try { i = "true" === (r = i) || "false" !== r && ("null" === r ? null : r === +r + "" ? +r : ae.test(r) ? JSON.parse(r) : r) } catch (n) { } o.set(n, t, i) } else i = void 0; return i } function hu(n, t, r, u) { var s, h, c = 20, l = u ? function () { return u.cur() } : function () { return i.css(n, t, "") }, o = l(), e = r && r[3] || (i.cssNumber[t] ? "" : "px"), f = n.nodeType && (i.cssNumber[t] || "px" !== e && +o) && kt.exec(i.css(n, t)); if (f && f[3] !== e) { for (o /= 2, e = e || f[3], f = +o || 1; c--;)i.style(n, t, f + e), (1 - h) * (1 - (h = l() / o || .5)) <= 0 && (c = 0), f /= h; f *= 2; i.style(n, t, f + e); r = r || [] } return r && (f = +f || +o || 0, s = r[1] ? f + (r[1] + 1) * r[2] : +r[2], u && (u.unit = e, u.start = f, u.end = s)), s } function ht(n, t) { for (var h, f, a, s, c, l, e, o = [], u = 0, v = n.length; u < v; u++)(f = n[u]).style && (h = f.style.display, t ? ("none" === h && (o[u] = r.get(f, "display") || null, o[u] || (f.style.display = "")), "" === f.style.display && dt(f) && (o[u] = (e = c = s = void 0, c = (a = f).ownerDocument, l = a.nodeName, (e = ki[l]) || (s = c.body.appendChild(c.createElement(l)), e = i.css(s, "display"), s.parentNode.removeChild(s), "none" === e && (e = "block"), ki[l] = e)))) : "none" !== h && (o[u] = "none", r.set(f, "display", h))); for (u = 0; u < v; u++)null != o[u] && (n[u].style.display = o[u]); return n } function s(n, t) { var r; return r = "undefined" != typeof n.getElementsByTagName ? n.getElementsByTagName(t || "*") : "undefined" != typeof n.querySelectorAll ? n.querySelectorAll(t || "*") : [], void 0 === t || t && c(n, t) ? i.merge([n], r) : r } function di(n, t) { for (var i = 0, u = n.length; i < u; i++)r.set(n[i], "globalEval", !t || r.get(t[i], "globalEval")) } function vu(n, t, r, u, f) { for (var e, o, p, a, w, v, c = t.createDocumentFragment(), y = [], l = 0, b = n.length; l < b; l++)if ((e = n[l]) || 0 === e) if ("object" === ut(e)) i.merge(y, e.nodeType ? [e] : e); else if (au.test(e)) { for (o = o || c.appendChild(t.createElement("div")), p = (cu.exec(e) || ["", ""])[1].toLowerCase(), a = h[p] || h._default, o.innerHTML = a[1] + i.htmlPrefilter(e) + a[2], v = a[0]; v--;)o = o.lastChild; i.merge(y, o.childNodes); (o = c.firstChild).textContent = "" } else y.push(t.createTextNode(e)); for (c.textContent = "", l = 0; e = y[l++];)if (u && -1 < i.inArray(e, u)) f && f.push(e); else if (w = st(e), o = s(c.appendChild(e), "script"), w && di(o), r) for (v = 0; e = o[v++];)lu.test(e.type || "") && r.push(e); return c } function ct() { return !0 } function lt() { return !1 } function be(n, t) { return n === function () { try { return f.activeElement } catch (n) { } }() == ("focus" === t) } function gi(n, t, r, u, f, e) { var o, s; if ("object" == typeof t) { for (s in "string" != typeof r && (u = u || r, r = void 0), t) gi(n, s, r, u, t[s], e); return n } if (null == u && null == f ? (f = r, u = r = void 0) : null == f && ("string" == typeof r ? (f = u, u = void 0) : (f = u, u = r, r = void 0)), !1 === f) f = lt; else if (!f) return n; return 1 === e && (o = f, (f = function (n) { return i().off(n), o.apply(this, arguments) }).guid = o.guid || (o.guid = i.guid++)), n.each(function () { i.event.add(this, t, f, u, r) }) } function hi(n, t, u) { u ? (r.set(n, t, !1), i.event.add(n, t, { namespace: !1, handler: function (n) { var o, e, f = r.get(this, t); if (1 & n.isTrigger && this[t]) { if (f.length) (i.event.special[t] || {}).delegateType && n.stopPropagation(); else if (f = k.call(arguments), r.set(this, t, f), o = u(this, t), this[t](), f !== (e = r.get(this, t)) || o ? r.set(this, t, !1) : e = {}, f !== e) return n.stopImmediatePropagation(), n.preventDefault(), e.value } else f.length && (r.set(this, t, { value: i.event.trigger(i.extend(f[0], i.Event.prototype), f.slice(1), this) }), n.stopImmediatePropagation()) } })) : void 0 === r.get(n, t) && i.event.add(n, t, ct) } function pu(n, t) { return c(n, "table") && c(11 !== t.nodeType ? t : t.firstChild, "tr") && i(n).children("tbody")[0] || n } function no(n) { return n.type = (null !== n.getAttribute("type")) + "/" + n.type, n } function to(n) { return "true/" === (n.type || "").slice(0, 5) ? n.type = n.type.slice(5) : n.removeAttribute("type"), n } function wu(n, t) { var u, s, f, h, c, e; if (1 === t.nodeType) { if (r.hasData(n) && (e = r.get(n).events)) for (f in r.remove(t, "handle events"), e) for (u = 0, s = e[f].length; u < s; u++)i.event.add(t, f, e[f][u]); o.hasData(n) && (h = o.access(n), c = i.extend({}, h), o.set(t, c)) } } function at(n, t, f, o) { t = yr(t); var a, b, l, v, h, y, c = 0, p = n.length, d = p - 1, w = t[0], k = u(w); if (k || 1 < p && "string" == typeof w && !e.checkClone && de.test(w)) return n.each(function (i) { var r = n.eq(i); k && (t[0] = w.call(this, i, r.html())); at(r, t, f, o) }); if (p && (b = (a = vu(t, n[0].ownerDocument, !1, n, o)).firstChild, 1 === a.childNodes.length && (a = b), b || o)) { for (v = (l = i.map(s(a, "script"), no)).length; c < p; c++)h = a, c !== d && (h = i.clone(h, !0, !0), v && i.merge(l, s(h, "script"))), f.call(n[c], h, c); if (v) for (y = l[l.length - 1].ownerDocument, i.map(l, to), c = 0; c < v; c++)h = l[c], lu.test(h.type || "") && !r.access(h, "globalEval") && i.contains(y, h) && (h.src && "module" !== (h.type || "").toLowerCase() ? i._evalUrl && !h.noModule && i._evalUrl(h.src, { nonce: h.nonce || h.getAttribute("nonce") }, y) : br(h.textContent.replace(ge, ""), h, y)) } return n } function bu(n, t, r) { for (var u, e = t ? i.filter(t, n) : n, f = 0; null != (u = e[f]); f++)r || 1 !== u.nodeType || i.cleanData(s(u)), u.parentNode && (r && st(u) && di(s(u, "script")), u.parentNode.removeChild(u)); return n } function ni(n, t, r) { var o, s, h, f, u = n.style; return (r = r || ci(n)) && ("" !== (f = r.getPropertyValue(t) || r[t]) || st(n) || (f = i.style(n, t)), !e.pixelBoxStyles() && nr.test(f) && io.test(t) && (o = u.width, s = u.minWidth, h = u.maxWidth, u.minWidth = u.maxWidth = u.width = f, f = r.width, u.width = o, u.minWidth = s, u.maxWidth = h)), void 0 !== f ? f + "" : f } function du(n, t) { return { get: function () { if (!n()) return (this.get = t).apply(this, arguments); delete this.get } } } function tr(n) { var t = i.cssProps[n] || tf[n]; return t || (n in nf ? n : tf[n] = function (n) { for (var i = n[0].toUpperCase() + n.slice(1), t = gu.length; t--;)if ((n = gu[t] + i) in nf) return n }(n) || n) } function ff(n, t, i) { var r = kt.exec(t); return r ? Math.max(0, r[2] - (i || 0)) + (r[3] || "px") : t } function ir(n, t, r, u, f, e) { var o = "width" === t ? 1 : 0, h = 0, s = 0; if (r === (u ? "border" : "content")) return 0; for (; o < 4; o += 2)"margin" === r && (s += i.css(n, r + b[o], !0, f)), u ? ("content" === r && (s -= i.css(n, "padding" + b[o], !0, f)), "margin" !== r && (s -= i.css(n, "border" + b[o] + "Width", !0, f))) : (s += i.css(n, "padding" + b[o], !0, f), "padding" !== r ? s += i.css(n, "border" + b[o] + "Width", !0, f) : h += i.css(n, "border" + b[o] + "Width", !0, f)); return !u && 0 <= e && (s += Math.max(0, Math.ceil(n["offset" + t[0].toUpperCase() + t.slice(1)] - e - s - h - .5)) || 0), s } function ef(n, t, r) { var f = ci(n), o = (!e.boxSizingReliable() || r) && "border-box" === i.css(n, "boxSizing", !1, f), s = o, u = ni(n, t, f), h = "offset" + t[0].toUpperCase() + t.slice(1); if (nr.test(u)) { if (!r) return u; u = "auto" } return (!e.boxSizingReliable() && o || !e.reliableTrDimensions() && c(n, "tr") || "auto" === u || !parseFloat(u) && "inline" === i.css(n, "display", !1, f)) && n.getClientRects().length && (o = "border-box" === i.css(n, "boxSizing", !1, f), (s = h in n) && (u = n[h])), (u = parseFloat(u) || 0) + ir(n, t, r || (o ? "border" : "content"), s, f, u) + "px" } function a(n, t, i, r, u) { return new a.prototype.init(n, t, i, r, u) } function rr() { li && (!1 === f.hidden && n.requestAnimationFrame ? n.requestAnimationFrame(rr) : n.setTimeout(rr, i.fx.interval), i.fx.tick()) } function lf() { return n.setTimeout(function () { vt = void 0 }), vt = Date.now() } function ai(n, t) { var u, r = 0, i = { height: n }; for (t = t ? 1 : 0; r < 4; r += 2 - t)i["margin" + (u = b[r])] = i["padding" + u] = n; return t && (i.opacity = i.width = n), i } function af(n, t, i) { for (var u, f = (v.tweeners[t] || []).concat(v.tweeners["*"]), r = 0, e = f.length; r < e; r++)if (u = f[r].call(i, t, n)) return u } function v(n, t, r) { var o, s, h = 0, a = v.prefilters.length, e = i.Deferred().always(function () { delete l.elem }), l = function () { if (s) return !1; for (var o = vt || lf(), t = Math.max(0, f.startTime + f.duration - o), i = 1 - (t / f.duration || 0), r = 0, u = f.tweens.length; r < u; r++)f.tweens[r].run(i); return e.notifyWith(n, [f, i, t]), i < 1 && u ? t : (u || e.notifyWith(n, [f, 1, 0]), e.resolveWith(n, [f]), !1) }, f = e.promise({ elem: n, props: i.extend({}, t), opts: i.extend(!0, { specialEasing: {}, easing: i.easing._default }, r), originalProperties: t, originalOptions: r, startTime: vt || lf(), duration: r.duration, tweens: [], createTween: function (t, r) { var u = i.Tween(n, f.opts, t, r, f.opts.specialEasing[t] || f.opts.easing); return f.tweens.push(u), u }, stop: function (t) { var i = 0, r = t ? f.tweens.length : 0; if (s) return this; for (s = !0; i < r; i++)f.tweens[i].run(1); return t ? (e.notifyWith(n, [f, 1, 0]), e.resolveWith(n, [f, t])) : e.rejectWith(n, [f, t]), this } }), c = f.props; for (!function (n, t) { var r, f, e, u, o; for (r in n) if (e = t[f = y(r)], u = n[r], Array.isArray(u) && (e = u[1], u = n[r] = u[0]), r !== f && (n[f] = u, delete n[r]), (o = i.cssHooks[f]) && "expand" in o) for (r in u = o.expand(u), delete n[f], u) r in n || (n[r] = u[r], t[r] = e); else t[f] = e }(c, f.opts.specialEasing); h < a; h++)if (o = v.prefilters[h].call(f, n, c, f.opts)) return u(o.stop) && (i._queueHooks(f.elem, f.opts.queue).stop = o.stop.bind(o)), o; return i.map(c, af, f), u(f.opts.start) && f.opts.start.call(n, f), f.progress(f.opts.progress).done(f.opts.done, f.opts.complete).fail(f.opts.fail).always(f.opts.always), i.fx.timer(i.extend(l, { elem: n, anim: f, queue: f.opts.queue })), f } function tt(n) { return (n.match(l) || []).join(" ") } function it(n) { return n.getAttribute && n.getAttribute("class") || "" } function ur(n) { return Array.isArray(n) ? n : "string" == typeof n && n.match(l) || [] } function sr(n, t, r, u) { var f; if (Array.isArray(t)) i.each(t, function (t, i) { r || fo.test(n) ? u(n, i) : sr(n + "[" + ("object" == typeof i && null != i ? t : "") + "]", i, r, u) }); else if (r || "object" !== ut(t)) u(n, t); else for (f in t) sr(n + "[" + f + "]", t[f], r, u) } function ne(n) { return function (t, i) { "string" != typeof t && (i = t, t = "*"); var r, f = 0, e = t.toLowerCase().match(l) || []; if (u(i)) while (r = e[f++]) "+" === r[0] ? (r = r.slice(1) || "*", (n[r] = n[r] || []).unshift(i)) : (n[r] = n[r] || []).push(i) } } function te(n, t, r, u) { function e(s) { var h; return f[s] = !0, i.each(n[s] || [], function (n, i) { var s = i(t, r, u); return "string" != typeof s || o || f[s] ? o ? !(h = s) : void 0 : (t.dataTypes.unshift(s), e(s), !1) }), h } var f = {}, o = n === hr; return e(t.dataTypes[0]) || !f["*"] && e("*") } function lr(n, t) { var r, u, f = i.ajaxSettings.flatOptions || {}; for (r in t) void 0 !== t[r] && ((f[r] ? n : u || (u = {}))[r] = t[r]); return u && i.extend(!0, n, u), n } var p = [], vr = Object.getPrototypeOf, k = p.slice, yr = p.flat ? function (n) { return p.flat.call(n) } : function (n) { return p.concat.apply([], n) }, yi = p.push, ii = p.indexOf, ri = {}, pr = ri.toString, ui = ri.hasOwnProperty, wr = ui.toString, oe = wr.call(Object), e = {}, u = function (n) { return "function" == typeof n && "number" != typeof n.nodeType }, rt = function (n) { return null != n && n === n.window }, f = n.document, se = { type: !0, src: !0, nonce: !0, noModule: !0 }, kr = "3.5.0", i = function (n, t) { return new i.fn.init(n, t) }, d, wi, nu, tu, iu, ru, l, eu, ei, ot, dt, ki, h, au, vt, li, yt, sf, hf, cf, vf, pt, yf, pf, wf, fr, er, ie, wt, re, ar, vi, ue, fe, ee; i.fn = i.prototype = { jquery: kr, constructor: i, length: 0, toArray: function () { return k.call(this) }, get: function (n) { return null == n ? k.call(this) : n < 0 ? this[n + this.length] : this[n] }, pushStack: function (n) { var t = i.merge(this.constructor(), n); return t.prevObject = this, t }, each: function (n) { return i.each(this, n) }, map: function (n) { return this.pushStack(i.map(this, function (t, i) { return n.call(t, i, t) })) }, slice: function () { return this.pushStack(k.apply(this, arguments)) }, first: function () { return this.eq(0) }, last: function () { return this.eq(-1) }, even: function () { return this.pushStack(i.grep(this, function (n, t) { return (t + 1) % 2 })) }, odd: function () { return this.pushStack(i.grep(this, function (n, t) { return t % 2 })) }, eq: function (n) { var i = this.length, t = +n + (n < 0 ? i : 0); return this.pushStack(0 <= t && t < i ? [this[t]] : []) }, end: function () { return this.prevObject || this.constructor() }, push: yi, sort: p.sort, splice: p.splice }; i.extend = i.fn.extend = function () { var s, f, e, t, o, c, n = arguments[0] || {}, r = 1, l = arguments.length, h = !1; for ("boolean" == typeof n && (h = n, n = arguments[r] || {}, r++), "object" == typeof n || u(n) || (n = {}), r === l && (n = this, r--); r < l; r++)if (null != (s = arguments[r])) for (f in s) t = s[f], "__proto__" !== f && n !== t && (h && t && (i.isPlainObject(t) || (o = Array.isArray(t))) ? (e = n[f], c = o && !Array.isArray(e) ? [] : o || i.isPlainObject(e) ? e : {}, o = !1, n[f] = i.extend(h, c, t)) : void 0 !== t && (n[f] = t)); return n }; i.extend({ expando: "jQuery" + (kr + Math.random()).replace(/\D/g, ""), isReady: !0, error: function (n) { throw new Error(n); }, noop: function () { }, isPlainObject: function (n) { var t, i; return !(!n || "[object Object]" !== pr.call(n)) && (!(t = vr(n)) || "function" == typeof (i = ui.call(t, "constructor") && t.constructor) && wr.call(i) === oe) }, isEmptyObject: function (n) { for (var t in n) return !1; return !0 }, globalEval: function (n, t, i) { br(n, { nonce: t && t.nonce }, i) }, each: function (n, t) { var r, i = 0; if (pi(n)) { for (r = n.length; i < r; i++)if (!1 === t.call(n[i], i, n[i])) break } else for (i in n) if (!1 === t.call(n[i], i, n[i])) break; return n }, makeArray: function (n, t) { var r = t || []; return null != n && (pi(Object(n)) ? i.merge(r, "string" == typeof n ? [n] : n) : yi.call(r, n)), r }, inArray: function (n, t, i) { return null == t ? -1 : ii.call(t, n, i) }, merge: function (n, t) { for (var u = +t.length, i = 0, r = n.length; i < u; i++)n[r++] = t[i]; return n.length = r, n }, grep: function (n, t, i) { for (var u = [], r = 0, f = n.length, e = !i; r < f; r++)!t(n[r], r) !== e && u.push(n[r]); return u }, map: function (n, t, i) { var e, u, r = 0, f = []; if (pi(n)) for (e = n.length; r < e; r++)null != (u = t(n[r], r, i)) && f.push(u); else for (r in n) null != (u = t(n[r], r, i)) && f.push(u); return yr(f) }, guid: 1, support: e }); "function" == typeof Symbol && (i.fn[Symbol.iterator] = p[Symbol.iterator]); i.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "), function (n, t) { ri["[object " + t + "]"] = t.toLowerCase() }); d = function (n) { function u(n, t, r, u) { var s, y, c, l, p, w, d, v = t && t.ownerDocument, a = t ? t.nodeType : 9; if (r = r || [], "string" != typeof n || !n || 1 !== a && 9 !== a && 11 !== a) return r; if (!u && (b(t), t = t || i, h)) { if (11 !== a && (p = ar.exec(n))) if (s = p[1]) { if (9 === a) { if (!(c = t.getElementById(s))) return r; if (c.id === s) return r.push(c), r } else if (v && (c = v.getElementById(s)) && et(t, c) && c.id === s) return r.push(c), r } else { if (p[2]) return k.apply(r, t.getElementsByTagName(n)), r; if ((s = p[3]) && f.getElementsByClassName && t.getElementsByClassName) return k.apply(r, t.getElementsByClassName(s)), r } if (f.qsa && !lt[n + " "] && (!o || !o.test(n)) && (1 !== a || "object" !== t.nodeName.toLowerCase())) { if (d = n, v = t, 1 === a && (er.test(n) || yi.test(n))) { for ((v = ti.test(n) && ri(t.parentNode) || t) === t && f.scope || ((l = t.getAttribute("id")) ? l = l.replace(pi, wi) : t.setAttribute("id", l = e)), y = (w = ft(n)).length; y--;)w[y] = (l ? "#" + l : ":scope") + " " + pt(w[y]); d = w.join(",") } try { return k.apply(r, v.querySelectorAll(d)), r } catch (t) { lt(n, !0) } finally { l === e && t.removeAttribute("id") } } } return si(n.replace(at, "$1"), t, r, u) } function yt() { var n = []; return function i(r, u) { return n.push(r + " ") > t.cacheLength && delete i[n.shift()], i[r + " "] = u } } function l(n) { return n[e] = !0, n } function a(n) { var t = i.createElement("fieldset"); try { return !!n(t) } catch (n) { return !1 } finally { t.parentNode && t.parentNode.removeChild(t); t = null } } function ii(n, i) { for (var r = n.split("|"), u = r.length; u--;)t.attrHandle[r[u]] = i } function ki(n, t) { var i = t && n, r = i && 1 === n.nodeType && 1 === t.nodeType && n.sourceIndex - t.sourceIndex; if (r) return r; if (i) while (i = i.nextSibling) if (i === t) return -1; return n ? 1 : -1 } function yr(n) { return function (t) { return "input" === t.nodeName.toLowerCase() && t.type === n } } function pr(n) { return function (t) { var i = t.nodeName.toLowerCase(); return ("input" === i || "button" === i) && t.type === n } } function di(n) { return function (t) { return "form" in t ? t.parentNode && !1 === t.disabled ? "label" in t ? "label" in t.parentNode ? t.parentNode.disabled === n : t.disabled === n : t.isDisabled === n || t.isDisabled !== !n && vr(t) === n : t.disabled === n : "label" in t && t.disabled === n } } function it(n) { return l(function (t) { return t = +t, l(function (i, r) { for (var u, f = n([], i.length, t), e = f.length; e--;)i[u = f[e]] && (i[u] = !(r[u] = i[u])) }) }) } function ri(n) { return n && "undefined" != typeof n.getElementsByTagName && n } function gi() { } function pt(n) { for (var t = 0, r = n.length, i = ""; t < r; t++)i += n[t].value; return i } function wt(n, t, i) { var r = t.dir, u = t.next, f = u || r, o = i && "parentNode" === f, s = nr++; return t.first ? function (t, i, u) { while (t = t[r]) if (1 === t.nodeType || o) return n(t, i, u); return !1 } : function (t, i, h) { var c, l, a, y = [v, s]; if (h) { while (t = t[r]) if ((1 === t.nodeType || o) && n(t, i, h)) return !0 } else while (t = t[r]) if (1 === t.nodeType || o) if (l = (a = t[e] || (t[e] = {}))[t.uniqueID] || (a[t.uniqueID] = {}), u && u === t.nodeName.toLowerCase()) t = t[r] || t; else { if ((c = l[f]) && c[0] === v && c[1] === s) return y[2] = c[2]; if ((l[f] = y)[2] = n(t, i, h)) return !0 } return !1 } } function ui(n) { return 1 < n.length ? function (t, i, r) { for (var u = n.length; u--;)if (!n[u](t, i, r)) return !1; return !0 } : n[0] } function bt(n, t, i, r, u) { for (var e, o = [], f = 0, s = n.length, h = null != t; f < s; f++)(e = n[f]) && (i && !i(e, r, u) || (o.push(e), h && t.push(f))); return o } function fi(n, t, i, r, f, o) { return r && !r[e] && (r = fi(r)), f && !f[e] && (f = fi(f, o)), l(function (e, o, s, h) { var a, l, v, w = [], p = [], b = o.length, d = e || function (n, t, i) { for (var r = 0, f = t.length; r < f; r++)u(n, t[r], i); return i }(t || "*", s.nodeType ? [s] : s, []), y = !n || !e && t ? d : bt(d, w, n, s, h), c = i ? f || (e ? n : b || r) ? [] : o : y; if (i && i(y, c, s, h), r) for (a = bt(c, p), r(a, [], s, h), l = a.length; l--;)(v = a[l]) && (c[p[l]] = !(y[p[l]] = v)); if (e) { if (f || n) { if (f) { for (a = [], l = c.length; l--;)(v = c[l]) && a.push(y[l] = v); f(null, c = [], a, h) } for (l = c.length; l--;)(v = c[l]) && -1 < (a = f ? nt(e, v) : w[l]) && (e[a] = !(o[a] = v)) } } else c = bt(c === o ? c.splice(b, c.length) : c), f ? f(null, o, c, h) : k.apply(o, c) }) } function ei(n) { for (var o, u, r, s = n.length, h = t.relative[n[0].type], c = h || t.relative[" "], i = h ? 1 : 0, l = wt(function (n) { return n === o }, c, !0), a = wt(function (n) { return -1 < nt(o, n) }, c, !0), f = [function (n, t, i) { var r = !h && (i || t !== ht) || ((o = t).nodeType ? l(n, t, i) : a(n, t, i)); return o = null, r }]; i < s; i++)if (u = t.relative[n[i].type]) f = [wt(ui(f), u)]; else { if ((u = t.filter[n[i].type].apply(null, n[i].matches))[e]) { for (r = ++i; r < s; r++)if (t.relative[n[r].type]) break; return fi(1 < i && ui(f), 1 < i && pt(n.slice(0, i - 1).concat({ value: " " === n[i - 2].type ? "*" : "" })).replace(at, "$1"), u, i < r && ei(n.slice(i, r)), r < s && ei(n = n.slice(r)), r < s && pt(n)) } f.push(u) } return ui(f) } var rt, f, t, st, oi, ft, kt, si, ht, w, ut, b, i, s, h, o, d, ct, et, e = "sizzle" + 1 * new Date, c = n.document, v = 0, nr = 0, hi = yt(), ci = yt(), li = yt(), lt = yt(), dt = function (n, t) { return n === t && (ut = !0), 0 }, tr = {}.hasOwnProperty, g = [], ir = g.pop, rr = g.push, k = g.push, ai = g.slice, nt = function (n, t) { for (var i = 0, r = n.length; i < r; i++)if (n[i] === t) return i; return -1 }, gt = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped", r = "[\\x20\\t\\r\\n\\f]", tt = "(?:\\\\[\\da-fA-F]{1,6}" + r + "?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+", vi = "\\[" + r + "*(" + tt + ")(?:" + r + "*([*^$|!~]?=)" + r + "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + tt + "))|)" + r + "*\\]", ni = ":(" + tt + ")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|" + vi + ")*)|.*)\\)|)", ur = new RegExp(r + "+", "g"), at = new RegExp("^" + r + "+|((?:^|[^\\\\])(?:\\\\.)*)" + r + "+$", "g"), fr = new RegExp("^" + r + "*," + r + "*"), yi = new RegExp("^" + r + "*([>+~]|" + r + ")" + r + "*"), er = new RegExp(r + "|>"), or = new RegExp(ni), sr = new RegExp("^" + tt + "$"), vt = { ID: new RegExp("^#(" + tt + ")"), CLASS: new RegExp("^\\.(" + tt + ")"), TAG: new RegExp("^(" + tt + "|[*])"), ATTR: new RegExp("^" + vi), PSEUDO: new RegExp("^" + ni), CHILD: new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + r + "*(even|odd|(([+-]|)(\\d*)n|)" + r + "*(?:([+-]|)" + r + "*(\\d+)|))" + r + "*\\)|)", "i"), bool: new RegExp("^(?:" + gt + ")$", "i"), needsContext: new RegExp("^" + r + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + r + "*((?:-\\d)?\\d*)" + r + "*\\)|)(?=[^-]|$)", "i") }, hr = /HTML$/i, cr = /^(?:input|select|textarea|button)$/i, lr = /^h\d$/i, ot = /^[^{]+\{\s*\[native \w/, ar = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, ti = /[+~]/, y = new RegExp("\\\\[\\da-fA-F]{1,6}" + r + "?|\\\\([^\\r\\n\\f])", "g"), p = function (n, t) { var i = "0x" + n.slice(1) - 65536; return t || (i < 0 ? String.fromCharCode(i + 65536) : String.fromCharCode(i >> 10 | 55296, 1023 & i | 56320)) }, pi = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g, wi = function (n, t) { return t ? "\0" === n ? "�" : n.slice(0, -1) + "\\" + n.charCodeAt(n.length - 1).toString(16) + " " : "\\" + n }, bi = function () { b() }, vr = wt(function (n) { return !0 === n.disabled && "fieldset" === n.nodeName.toLowerCase() }, { dir: "parentNode", next: "legend" }); try { k.apply(g = ai.call(c.childNodes), c.childNodes); g[c.childNodes.length].nodeType } catch (rt) { k = { apply: g.length ? function (n, t) { rr.apply(n, ai.call(t)) } : function (n, t) { for (var i = n.length, r = 0; n[i++] = t[r++];); n.length = i - 1 } } } for (rt in f = u.support = {}, oi = u.isXML = function (n) { var i = n.namespaceURI, t = (n.ownerDocument || n).documentElement; return !hr.test(i || t && t.nodeName || "HTML") }, b = u.setDocument = function (n) { var v, u, l = n ? n.ownerDocument || n : c; return l != i && 9 === l.nodeType && l.documentElement && (s = (i = l).documentElement, h = !oi(i), c != i && (u = i.defaultView) && u.top !== u && (u.addEventListener ? u.addEventListener("unload", bi, !1) : u.attachEvent && u.attachEvent("onunload", bi)), f.scope = a(function (n) { return s.appendChild(n).appendChild(i.createElement("div")), "undefined" != typeof n.querySelectorAll && !n.querySelectorAll(":scope fieldset div").length }), f.attributes = a(function (n) { return n.className = "i", !n.getAttribute("className") }), f.getElementsByTagName = a(function (n) { return n.appendChild(i.createComment("")), !n.getElementsByTagName("*").length }), f.getElementsByClassName = ot.test(i.getElementsByClassName), f.getById = a(function (n) { return s.appendChild(n).id = e, !i.getElementsByName || !i.getElementsByName(e).length }), f.getById ? (t.filter.ID = function (n) { var t = n.replace(y, p); return function (n) { return n.getAttribute("id") === t } }, t.find.ID = function (n, t) { if ("undefined" != typeof t.getElementById && h) { var i = t.getElementById(n); return i ? [i] : [] } }) : (t.filter.ID = function (n) { var t = n.replace(y, p); return function (n) { var i = "undefined" != typeof n.getAttributeNode && n.getAttributeNode("id"); return i && i.value === t } }, t.find.ID = function (n, t) { if ("undefined" != typeof t.getElementById && h) { var r, u, f, i = t.getElementById(n); if (i) { if ((r = i.getAttributeNode("id")) && r.value === n) return [i]; for (f = t.getElementsByName(n), u = 0; i = f[u++];)if ((r = i.getAttributeNode("id")) && r.value === n) return [i] } return [] } }), t.find.TAG = f.getElementsByTagName ? function (n, t) { return "undefined" != typeof t.getElementsByTagName ? t.getElementsByTagName(n) : f.qsa ? t.querySelectorAll(n) : void 0 } : function (n, t) { var i, r = [], f = 0, u = t.getElementsByTagName(n); if ("*" === n) { while (i = u[f++]) 1 === i.nodeType && r.push(i); return r } return u }, t.find.CLASS = f.getElementsByClassName && function (n, t) { if ("undefined" != typeof t.getElementsByClassName && h) return t.getElementsByClassName(n) }, d = [], o = [], (f.qsa = ot.test(i.querySelectorAll)) && (a(function (n) { var t; s.appendChild(n).innerHTML = "<a id='" + e + "'><\/a><select id='" + e + "-\r\\' msallowcapture=''><option selected=''><\/option><\/select>"; n.querySelectorAll("[msallowcapture^='']").length && o.push("[*^$]=" + r + "*(?:''|\"\")"); n.querySelectorAll("[selected]").length || o.push("\\[" + r + "*(?:value|" + gt + ")"); n.querySelectorAll("[id~=" + e + "-]").length || o.push("~="); (t = i.createElement("input")).setAttribute("name", ""); n.appendChild(t); n.querySelectorAll("[name='']").length || o.push("\\[" + r + "*name" + r + "*=" + r + "*(?:''|\"\")"); n.querySelectorAll(":checked").length || o.push(":checked"); n.querySelectorAll("a#" + e + "+*").length || o.push(".#.+[+~]"); n.querySelectorAll("\\\f"); o.push("[\\r\\n\\f]") }), a(function (n) { n.innerHTML = "<a href='' disabled='disabled'><\/a><select disabled='disabled'><option/><\/select>"; var t = i.createElement("input"); t.setAttribute("type", "hidden"); n.appendChild(t).setAttribute("name", "D"); n.querySelectorAll("[name=d]").length && o.push("name" + r + "*[*^$|!~]?="); 2 !== n.querySelectorAll(":enabled").length && o.push(":enabled", ":disabled"); s.appendChild(n).disabled = !0; 2 !== n.querySelectorAll(":disabled").length && o.push(":enabled", ":disabled"); n.querySelectorAll("*,:x"); o.push(",.*:") })), (f.matchesSelector = ot.test(ct = s.matches || s.webkitMatchesSelector || s.mozMatchesSelector || s.oMatchesSelector || s.msMatchesSelector)) && a(function (n) { f.disconnectedMatch = ct.call(n, "*"); ct.call(n, "[s!='']:x"); d.push("!=", ni) }), o = o.length && new RegExp(o.join("|")), d = d.length && new RegExp(d.join("|")), v = ot.test(s.compareDocumentPosition), et = v || ot.test(s.contains) ? function (n, t) { var r = 9 === n.nodeType ? n.documentElement : n, i = t && t.parentNode; return n === i || !(!i || 1 !== i.nodeType || !(r.contains ? r.contains(i) : n.compareDocumentPosition && 16 & n.compareDocumentPosition(i))) } : function (n, t) { if (t) while (t = t.parentNode) if (t === n) return !0; return !1 }, dt = v ? function (n, t) { if (n === t) return ut = !0, 0; var r = !n.compareDocumentPosition - !t.compareDocumentPosition; return r || (1 & (r = (n.ownerDocument || n) == (t.ownerDocument || t) ? n.compareDocumentPosition(t) : 1) || !f.sortDetached && t.compareDocumentPosition(n) === r ? n == i || n.ownerDocument == c && et(c, n) ? -1 : t == i || t.ownerDocument == c && et(c, t) ? 1 : w ? nt(w, n) - nt(w, t) : 0 : 4 & r ? -1 : 1) } : function (n, t) { if (n === t) return ut = !0, 0; var r, u = 0, o = n.parentNode, s = t.parentNode, f = [n], e = [t]; if (!o || !s) return n == i ? -1 : t == i ? 1 : o ? -1 : s ? 1 : w ? nt(w, n) - nt(w, t) : 0; if (o === s) return ki(n, t); for (r = n; r = r.parentNode;)f.unshift(r); for (r = t; r = r.parentNode;)e.unshift(r); while (f[u] === e[u]) u++; return u ? ki(f[u], e[u]) : f[u] == c ? -1 : e[u] == c ? 1 : 0 }), i }, u.matches = function (n, t) { return u(n, null, null, t) }, u.matchesSelector = function (n, t) { if (b(n), f.matchesSelector && h && !lt[t + " "] && (!d || !d.test(t)) && (!o || !o.test(t))) try { var r = ct.call(n, t); if (r || f.disconnectedMatch || n.document && 11 !== n.document.nodeType) return r } catch (n) { lt(t, !0) } return 0 < u(t, i, null, [n]).length }, u.contains = function (n, t) { return (n.ownerDocument || n) != i && b(n), et(n, t) }, u.attr = function (n, r) { (n.ownerDocument || n) != i && b(n); var e = t.attrHandle[r.toLowerCase()], u = e && tr.call(t.attrHandle, r.toLowerCase()) ? e(n, r, !h) : void 0; return void 0 !== u ? u : f.attributes || !h ? n.getAttribute(r) : (u = n.getAttributeNode(r)) && u.specified ? u.value : null }, u.escape = function (n) { return (n + "").replace(pi, wi) }, u.error = function (n) { throw new Error("Syntax error, unrecognized expression: " + n); }, u.uniqueSort = function (n) { var r, u = [], t = 0, i = 0; if (ut = !f.detectDuplicates, w = !f.sortStable && n.slice(0), n.sort(dt), ut) { while (r = n[i++]) r === n[i] && (t = u.push(i)); while (t--) n.splice(u[t], 1) } return w = null, n }, st = u.getText = function (n) { var r, i = "", u = 0, t = n.nodeType; if (t) { if (1 === t || 9 === t || 11 === t) { if ("string" == typeof n.textContent) return n.textContent; for (n = n.firstChild; n; n = n.nextSibling)i += st(n) } else if (3 === t || 4 === t) return n.nodeValue } else while (r = n[u++]) i += st(r); return i }, (t = u.selectors = { cacheLength: 50, createPseudo: l, match: vt, attrHandle: {}, find: {}, relative: { ">": { dir: "parentNode", first: !0 }, " ": { dir: "parentNode" }, "+": { dir: "previousSibling", first: !0 }, "~": { dir: "previousSibling" } }, preFilter: { ATTR: function (n) { return n[1] = n[1].replace(y, p), n[3] = (n[3] || n[4] || n[5] || "").replace(y, p), "~=" === n[2] && (n[3] = " " + n[3] + " "), n.slice(0, 4) }, CHILD: function (n) { return n[1] = n[1].toLowerCase(), "nth" === n[1].slice(0, 3) ? (n[3] || u.error(n[0]), n[4] = +(n[4] ? n[5] + (n[6] || 1) : 2 * ("even" === n[3] || "odd" === n[3])), n[5] = +(n[7] + n[8] || "odd" === n[3])) : n[3] && u.error(n[0]), n }, PSEUDO: function (n) { var i, t = !n[6] && n[2]; return vt.CHILD.test(n[0]) ? null : (n[3] ? n[2] = n[4] || n[5] || "" : t && or.test(t) && (i = ft(t, !0)) && (i = t.indexOf(")", t.length - i) - t.length) && (n[0] = n[0].slice(0, i), n[2] = t.slice(0, i)), n.slice(0, 3)) } }, filter: { TAG: function (n) { var t = n.replace(y, p).toLowerCase(); return "*" === n ? function () { return !0 } : function (n) { return n.nodeName && n.nodeName.toLowerCase() === t } }, CLASS: function (n) { var t = hi[n + " "]; return t || (t = new RegExp("(^|" + r + ")" + n + "(" + r + "|$)")) && hi(n, function (n) { return t.test("string" == typeof n.className && n.className || "undefined" != typeof n.getAttribute && n.getAttribute("class") || "") }) }, ATTR: function (n, t, i) { return function (r) { var f = u.attr(r, n); return null == f ? "!=" === t : !t || (f += "", "=" === t ? f === i : "!=" === t ? f !== i : "^=" === t ? i && 0 === f.indexOf(i) : "*=" === t ? i && -1 < f.indexOf(i) : "$=" === t ? i && f.slice(-i.length) === i : "~=" === t ? -1 < (" " + f.replace(ur, " ") + " ").indexOf(i) : "|=" === t && (f === i || f.slice(0, i.length + 1) === i + "-")) } }, CHILD: function (n, t, i, r, u) { var s = "nth" !== n.slice(0, 3), o = "last" !== n.slice(-4), f = "of-type" === t; return 1 === r && 0 === u ? function (n) { return !!n.parentNode } : function (t, i, h) { var p, d, y, c, a, w, b = s !== o ? "nextSibling" : "previousSibling", k = t.parentNode, nt = f && t.nodeName.toLowerCase(), g = !h && !f, l = !1; if (k) { if (s) { while (b) { for (c = t; c = c[b];)if (f ? c.nodeName.toLowerCase() === nt : 1 === c.nodeType) return !1; w = b = "only" === n && !w && "nextSibling" } return !0 } if (w = [o ? k.firstChild : k.lastChild], o && g) { for (l = (a = (p = (d = (y = (c = k)[e] || (c[e] = {}))[c.uniqueID] || (y[c.uniqueID] = {}))[n] || [])[0] === v && p[1]) && p[2], c = a && k.childNodes[a]; c = ++a && c && c[b] || (l = a = 0) || w.pop();)if (1 === c.nodeType && ++l && c === t) { d[n] = [v, a, l]; break } } else if (g && (l = a = (p = (d = (y = (c = t)[e] || (c[e] = {}))[c.uniqueID] || (y[c.uniqueID] = {}))[n] || [])[0] === v && p[1]), !1 === l) while (c = ++a && c && c[b] || (l = a = 0) || w.pop()) if ((f ? c.nodeName.toLowerCase() === nt : 1 === c.nodeType) && ++l && (g && ((d = (y = c[e] || (c[e] = {}))[c.uniqueID] || (y[c.uniqueID] = {}))[n] = [v, l]), c === t)) break; return (l -= u) === r || l % r == 0 && 0 <= l / r } } }, PSEUDO: function (n, i) { var f, r = t.pseudos[n] || t.setFilters[n.toLowerCase()] || u.error("unsupported pseudo: " + n); return r[e] ? r(i) : 1 < r.length ? (f = [n, n, "", i], t.setFilters.hasOwnProperty(n.toLowerCase()) ? l(function (n, t) { for (var e, u = r(n, i), f = u.length; f--;)n[e = nt(n, u[f])] = !(t[e] = u[f]) }) : function (n) { return r(n, 0, f) }) : r } }, pseudos: { not: l(function (n) { var t = [], r = [], i = kt(n.replace(at, "$1")); return i[e] ? l(function (n, t, r, u) { for (var e, o = i(n, null, u, []), f = n.length; f--;)(e = o[f]) && (n[f] = !(t[f] = e)) }) : function (n, u, f) { return t[0] = n, i(t, null, f, r), t[0] = null, !r.pop() } }), has: l(function (n) { return function (t) { return 0 < u(n, t).length } }), contains: l(function (n) { return n = n.replace(y, p), function (t) { return -1 < (t.textContent || st(t)).indexOf(n) } }), lang: l(function (n) { return sr.test(n || "") || u.error("unsupported lang: " + n), n = n.replace(y, p).toLowerCase(), function (t) { var i; do if (i = h ? t.lang : t.getAttribute("xml:lang") || t.getAttribute("lang")) return (i = i.toLowerCase()) === n || 0 === i.indexOf(n + "-"); while ((t = t.parentNode) && 1 === t.nodeType); return !1 } }), target: function (t) { var i = n.location && n.location.hash; return i && i.slice(1) === t.id }, root: function (n) { return n === s }, focus: function (n) { return n === i.activeElement && (!i.hasFocus || i.hasFocus()) && !!(n.type || n.href || ~n.tabIndex) }, enabled: di(!1), disabled: di(!0), checked: function (n) { var t = n.nodeName.toLowerCase(); return "input" === t && !!n.checked || "option" === t && !!n.selected }, selected: function (n) { return n.parentNode && n.parentNode.selectedIndex, !0 === n.selected }, empty: function (n) { for (n = n.firstChild; n; n = n.nextSibling)if (n.nodeType < 6) return !1; return !0 }, parent: function (n) { return !t.pseudos.empty(n) }, header: function (n) { return lr.test(n.nodeName) }, input: function (n) { return cr.test(n.nodeName) }, button: function (n) { var t = n.nodeName.toLowerCase(); return "input" === t && "button" === n.type || "button" === t }, text: function (n) { var t; return "input" === n.nodeName.toLowerCase() && "text" === n.type && (null == (t = n.getAttribute("type")) || "text" === t.toLowerCase()) }, first: it(function () { return [0] }), last: it(function (n, t) { return [t - 1] }), eq: it(function (n, t, i) { return [i < 0 ? i + t : i] }), even: it(function (n, t) { for (var i = 0; i < t; i += 2)n.push(i); return n }), odd: it(function (n, t) { for (var i = 1; i < t; i += 2)n.push(i); return n }), lt: it(function (n, t, i) { for (var r = i < 0 ? i + t : t < i ? t : i; 0 <= --r;)n.push(r); return n }), gt: it(function (n, t, i) { for (var r = i < 0 ? i + t : i; ++r < t;)n.push(r); return n }) } }).pseudos.nth = t.pseudos.eq, { radio: !0, checkbox: !0, file: !0, password: !0, image: !0 }) t.pseudos[rt] = yr(rt); for (rt in { submit: !0, reset: !0 }) t.pseudos[rt] = pr(rt); return gi.prototype = t.filters = t.pseudos, t.setFilters = new gi, ft = u.tokenize = function (n, i) { var e, f, s, o, r, h, c, l = ci[n + " "]; if (l) return i ? 0 : l.slice(0); for (r = n, h = [], c = t.preFilter; r;) { for (o in e && !(f = fr.exec(r)) || (f && (r = r.slice(f[0].length) || r), h.push(s = [])), e = !1, (f = yi.exec(r)) && (e = f.shift(), s.push({ value: e, type: f[0].replace(at, " ") }), r = r.slice(e.length)), t.filter) (f = vt[o].exec(r)) && (!c[o] || (f = c[o](f))) && (e = f.shift(), s.push({ value: e, type: o, matches: f }), r = r.slice(e.length)); if (!e) break } return i ? r.length : r ? u.error(n) : ci(n, h).slice(0) }, kt = u.compile = function (n, r) { var s, c, a, o, y, p, w = [], d = [], f = li[n + " "]; if (!f) { for (r || (r = ft(n)), s = r.length; s--;)(f = ei(r[s]))[e] ? w.push(f) : d.push(f); (f = li(n, (c = d, o = 0 < (a = w).length, y = 0 < c.length, p = function (n, r, f, e, s) { var l, nt, d, g = 0, p = "0", tt = n && [], w = [], it = ht, rt = n || y && t.find.TAG("*", s), ut = v += null == it ? 1 : Math.random() || .1, ft = rt.length; for (s && (ht = r == i || r || s); p !== ft && null != (l = rt[p]); p++) { if (y && l) { for (nt = 0, r || l.ownerDocument == i || (b(l), f = !h); d = c[nt++];)if (d(l, r || i, f)) { e.push(l); break } s && (v = ut) } o && ((l = !d && l) && g--, n && tt.push(l)) } if (g += p, o && p !== g) { for (nt = 0; d = a[nt++];)d(tt, w, r, f); if (n) { if (0 < g) while (p--) tt[p] || w[p] || (w[p] = ir.call(e)); w = bt(w) } k.apply(e, w); s && !n && 0 < w.length && 1 < g + a.length && u.uniqueSort(e) } return s && (v = ut, ht = it), tt }, o ? l(p) : p))).selector = n } return f }, si = u.select = function (n, i, r, u) { var o, f, e, l, a, c = "function" == typeof n && n, s = !u && ft(n = c.selector || n); if (r = r || [], 1 === s.length) { if (2 < (f = s[0] = s[0].slice(0)).length && "ID" === (e = f[0]).type && 9 === i.nodeType && h && t.relative[f[1].type]) { if (!(i = (t.find.ID(e.matches[0].replace(y, p), i) || [])[0])) return r; c && (i = i.parentNode); n = n.slice(f.shift().value.length) } for (o = vt.needsContext.test(n) ? 0 : f.length; o--;) { if (e = f[o], t.relative[l = e.type]) break; if ((a = t.find[l]) && (u = a(e.matches[0].replace(y, p), ti.test(f[0].type) && ri(i.parentNode) || i))) { if (f.splice(o, 1), !(n = u.length && pt(f))) return k.apply(r, u), r; break } } } return (c || kt(n, s))(u, i, !h, r, !i || ti.test(n) && ri(i.parentNode) || i), r }, f.sortStable = e.split("").sort(dt).join("") === e, f.detectDuplicates = !!ut, b(), f.sortDetached = a(function (n) { return 1 & n.compareDocumentPosition(i.createElement("fieldset")) }), a(function (n) { return n.innerHTML = "<a href='#'><\/a>", "#" === n.firstChild.getAttribute("href") }) || ii("type|href|height|width", function (n, t, i) { if (!i) return n.getAttribute(t, "type" === t.toLowerCase() ? 1 : 2) }), f.attributes && a(function (n) { return n.innerHTML = "<input/>", n.firstChild.setAttribute("value", ""), "" === n.firstChild.getAttribute("value") }) || ii("value", function (n, t, i) { if (!i && "input" === n.nodeName.toLowerCase()) return n.defaultValue }), a(function (n) { return null == n.getAttribute("disabled") }) || ii(gt, function (n, t, i) { var r; if (!i) return !0 === n[t] ? t.toLowerCase() : (r = n.getAttributeNode(t)) && r.specified ? r.value : null }), u }(n); i.find = d; i.expr = d.selectors; i.expr[":"] = i.expr.pseudos; i.uniqueSort = i.unique = d.uniqueSort; i.text = d.getText; i.isXMLDoc = d.isXML; i.contains = d.contains; i.escapeSelector = d.escape; var ft = function (n, t, r) { for (var u = [], f = void 0 !== r; (n = n[t]) && 9 !== n.nodeType;)if (1 === n.nodeType) { if (f && i(n).is(r)) break; u.push(n) } return u }, dr = function (n, t) { for (var i = []; n; n = n.nextSibling)1 === n.nodeType && n !== t && i.push(n); return i }, gr = i.expr.match.needsContext; wi = /^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i; i.filter = function (n, t, r) { var u = t[0]; return r && (n = ":not(" + n + ")"), 1 === t.length && 1 === u.nodeType ? i.find.matchesSelector(u, n) ? [u] : [] : i.find.matches(n, i.grep(t, function (n) { return 1 === n.nodeType })) }; i.fn.extend({ find: function (n) { var t, r, u = this.length, f = this; if ("string" != typeof n) return this.pushStack(i(n).filter(function () { for (t = 0; t < u; t++)if (i.contains(f[t], this)) return !0 })); for (r = this.pushStack([]), t = 0; t < u; t++)i.find(n, f[t], r); return 1 < u ? i.uniqueSort(r) : r }, filter: function (n) { return this.pushStack(bi(this, n || [], !1)) }, not: function (n) { return this.pushStack(bi(this, n || [], !0)) }, is: function (n) { return !!bi(this, "string" == typeof n && gr.test(n) ? i(n) : n || [], !1).length } }); tu = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/; (i.fn.init = function (n, t, r) { var e, o; if (!n) return this; if (r = r || nu, "string" == typeof n) { if (!(e = "<" === n[0] && ">" === n[n.length - 1] && 3 <= n.length ? [null, n, null] : tu.exec(n)) || !e[1] && t) return !t || t.jquery ? (t || r).find(n) : this.constructor(t).find(n); if (e[1]) { if (t = t instanceof i ? t[0] : t, i.merge(this, i.parseHTML(e[1], t && t.nodeType ? t.ownerDocument || t : f, !0)), wi.test(e[1]) && i.isPlainObject(t)) for (e in t) u(this[e]) ? this[e](t[e]) : this.attr(e, t[e]); return this } return (o = f.getElementById(e[2])) && (this[0] = o, this.length = 1), this } return n.nodeType ? (this[0] = n, this.length = 1, this) : u(n) ? void 0 !== r.ready ? r.ready(n) : n(i) : i.makeArray(n, this) }).prototype = i.fn; nu = i(f); iu = /^(?:parents|prev(?:Until|All))/; ru = { children: !0, contents: !0, next: !0, prev: !0 }; i.fn.extend({ has: function (n) { var t = i(n, this), r = t.length; return this.filter(function () { for (var n = 0; n < r; n++)if (i.contains(this, t[n])) return !0 }) }, closest: function (n, t) { var r, f = 0, o = this.length, u = [], e = "string" != typeof n && i(n); if (!gr.test(n)) for (; f < o; f++)for (r = this[f]; r && r !== t; r = r.parentNode)if (r.nodeType < 11 && (e ? -1 < e.index(r) : 1 === r.nodeType && i.find.matchesSelector(r, n))) { u.push(r); break } return this.pushStack(1 < u.length ? i.uniqueSort(u) : u) }, index: function (n) { return n ? "string" == typeof n ? ii.call(i(n), this[0]) : ii.call(this, n.jquery ? n[0] : n) : this[0] && this[0].parentNode ? this.first().prevAll().length : -1 }, add: function (n, t) { return this.pushStack(i.uniqueSort(i.merge(this.get(), i(n, t)))) }, addBack: function (n) { return this.add(null == n ? this.prevObject : this.prevObject.filter(n)) } }); i.each({ parent: function (n) { var t = n.parentNode; return t && 11 !== t.nodeType ? t : null }, parents: function (n) { return ft(n, "parentNode") }, parentsUntil: function (n, t, i) { return ft(n, "parentNode", i) }, next: function (n) { return uu(n, "nextSibling") }, prev: function (n) { return uu(n, "previousSibling") }, nextAll: function (n) { return ft(n, "nextSibling") }, prevAll: function (n) { return ft(n, "previousSibling") }, nextUntil: function (n, t, i) { return ft(n, "nextSibling", i) }, prevUntil: function (n, t, i) { return ft(n, "previousSibling", i) }, siblings: function (n) { return dr((n.parentNode || {}).firstChild, n) }, children: function (n) { return dr(n.firstChild) }, contents: function (n) { return null != n.contentDocument && vr(n.contentDocument) ? n.contentDocument : (c(n, "template") && (n = n.content || n), i.merge([], n.childNodes)) } }, function (n, t) { i.fn[n] = function (r, u) { var f = i.map(this, t, r); return "Until" !== n.slice(-5) && (u = r), u && "string" == typeof u && (f = i.filter(u, f)), 1 < this.length && (ru[n] || i.uniqueSort(f), iu.test(n) && f.reverse()), this.pushStack(f) } }); l = /[^\x20\t\r\n\f]+/g; i.Callbacks = function (n) { var a, h; n = "string" == typeof n ? (a = n, h = {}, i.each(a.match(l) || [], function (n, t) { h[t] = !0 }), h) : i.extend({}, n); var o, r, v, f, t = [], s = [], e = -1, y = function () { for (f = f || n.once, v = o = !0; s.length; e = -1)for (r = s.shift(); ++e < t.length;)!1 === t[e].apply(r[0], r[1]) && n.stopOnFalse && (e = t.length, r = !1); n.memory || (r = !1); o = !1; f && (t = r ? [] : "") }, c = { add: function () { return t && (r && !o && (e = t.length - 1, s.push(r)), function f(r) { i.each(r, function (i, r) { u(r) ? n.unique && c.has(r) || t.push(r) : r && r.length && "string" !== ut(r) && f(r) }) }(arguments), r && !o && y()), this }, remove: function () { return i.each(arguments, function (n, r) { for (var u; -1 < (u = i.inArray(r, t, u));)t.splice(u, 1), u <= e && e-- }), this }, has: function (n) { return n ? -1 < i.inArray(n, t) : 0 < t.length }, empty: function () { return t && (t = []), this }, disable: function () { return f = s = [], t = r = "", this }, disabled: function () { return !t }, lock: function () { return f = s = [], r || o || (t = r = ""), this }, locked: function () { return !!f }, fireWith: function (n, t) { return f || (t = [n, (t = t || []).slice ? t.slice() : t], s.push(t), o || y()), this }, fire: function () { return c.fireWith(this, arguments), this }, fired: function () { return !!v } }; return c }; i.extend({ Deferred: function (t) { var f = [["notify", "progress", i.Callbacks("memory"), i.Callbacks("memory"), 2], ["resolve", "done", i.Callbacks("once memory"), i.Callbacks("once memory"), 0, "resolved"], ["reject", "fail", i.Callbacks("once memory"), i.Callbacks("once memory"), 1, "rejected"]], o = "pending", e = { state: function () { return o }, always: function () { return r.done(arguments).fail(arguments), this }, "catch": function (n) { return e.then(null, n) }, pipe: function () { var n = arguments; return i.Deferred(function (t) { i.each(f, function (i, f) { var e = u(n[f[4]]) && n[f[4]]; r[f[1]](function () { var n = e && e.apply(this, arguments); n && u(n.promise) ? n.promise().progress(t.notify).done(t.resolve).fail(t.reject) : t[f[0] + "With"](this, e ? [n] : arguments) }) }); n = null }).promise() }, then: function (t, r, e) { function s(t, r, f, e) { return function () { var h = this, c = arguments, l = function () { var n, i; if (!(t < o)) { if ((n = f.apply(h, c)) === r.promise()) throw new TypeError("Thenable self-resolution"); i = n && ("object" == typeof n || "function" == typeof n) && n.then; u(i) ? e ? i.call(n, s(o, r, et, e), s(o, r, fi, e)) : (o++, i.call(n, s(o, r, et, e), s(o, r, fi, e), s(o, r, et, r.notifyWith))) : (f !== et && (h = void 0, c = [n]), (e || r.resolveWith)(h, c)) } }, a = e ? l : function () { try { l() } catch (l) { i.Deferred.exceptionHook && i.Deferred.exceptionHook(l, a.stackTrace); o <= t + 1 && (f !== fi && (h = void 0, c = [l]), r.rejectWith(h, c)) } }; t ? a() : (i.Deferred.getStackHook && (a.stackTrace = i.Deferred.getStackHook()), n.setTimeout(a)) } } var o = 0; return i.Deferred(function (n) { f[0][3].add(s(0, n, u(e) ? e : et, n.notifyWith)); f[1][3].add(s(0, n, u(t) ? t : et)); f[2][3].add(s(0, n, u(r) ? r : fi)) }).promise() }, promise: function (n) { return null != n ? i.extend(n, e) : e } }, r = {}; return i.each(f, function (n, t) { var i = t[2], u = t[5]; e[t[1]] = i.add; u && i.add(function () { o = u }, f[3 - n][2].disable, f[3 - n][3].disable, f[0][2].lock, f[0][3].lock); i.add(t[3].fire); r[t[0]] = function () { return r[t[0] + "With"](this === r ? void 0 : this, arguments), this }; r[t[0] + "With"] = i.fireWith }), e.promise(r), t && t.call(r, r), r }, when: function (n) { var e = arguments.length, t = e, o = Array(t), f = k.call(arguments), r = i.Deferred(), s = function (n) { return function (t) { o[n] = this; f[n] = 1 < arguments.length ? k.call(arguments) : t; --e || r.resolveWith(o, f) } }; if (e <= 1 && (fu(n, r.done(s(t)).resolve, r.reject, !e), "pending" === r.state() || u(f[t] && f[t].then))) return r.then(); while (t--) fu(f[t], s(t), r.reject); return r.promise() } }); eu = /^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/; i.Deferred.exceptionHook = function (t, i) { n.console && n.console.warn && t && eu.test(t.name) && n.console.warn("jQuery.Deferred exception: " + t.message, t.stack, i) }; i.readyException = function (t) { n.setTimeout(function () { throw t; }) }; ei = i.Deferred(); i.fn.ready = function (n) { return ei.then(n)["catch"](function (n) { i.readyException(n) }), this }; i.extend({ isReady: !1, readyWait: 1, ready: function (n) { (!0 === n ? --i.readyWait : i.isReady) || (i.isReady = !0) !== n && 0 < --i.readyWait || ei.resolveWith(f, [i]) } }); i.ready.then = ei.then; "complete" === f.readyState || "loading" !== f.readyState && !f.documentElement.doScroll ? n.setTimeout(i.ready) : (f.addEventListener("DOMContentLoaded", oi), n.addEventListener("load", oi)); var w = function (n, t, r, f, e, o, s) { var h = 0, l = n.length, c = null == r; if ("object" === ut(r)) for (h in e = !0, r) w(n, t, h, r[h], !0, o, s); else if (void 0 !== f && (e = !0, u(f) || (s = !0), c && (s ? (t.call(n, f), t = null) : (c = t, t = function (n, t, r) { return c.call(i(n), r) })), t)) for (; h < l; h++)t(n[h], r, s ? f : f.call(n[h], h, t(n[h], r))); return e ? n : c ? t.call(n) : l ? t(n[0], r) : o }, he = /^-ms-/, ce = /-([a-z])/g; ot = function (n) { return 1 === n.nodeType || 9 === n.nodeType || !+n.nodeType }; bt.uid = 1; bt.prototype = { cache: function (n) { var t = n[this.expando]; return t || (t = {}, ot(n) && (n.nodeType ? n[this.expando] = t : Object.defineProperty(n, this.expando, { value: t, configurable: !0 }))), t }, set: function (n, t, i) { var r, u = this.cache(n); if ("string" == typeof t) u[y(t)] = i; else for (r in t) u[y(r)] = t[r]; return u }, get: function (n, t) { return void 0 === t ? this.cache(n) : n[this.expando] && n[this.expando][y(t)] }, access: function (n, t, i) { return void 0 === t || t && "string" == typeof t && void 0 === i ? this.get(n, t) : (this.set(n, t, i), void 0 !== i ? i : t) }, remove: function (n, t) { var u, r = n[this.expando]; if (void 0 !== r) { if (void 0 !== t) for (u = (t = Array.isArray(t) ? t.map(y) : (t = y(t)) in r ? [t] : t.match(l) || []).length; u--;)delete r[t[u]]; (void 0 === t || i.isEmptyObject(r)) && (n.nodeType ? n[this.expando] = void 0 : delete n[this.expando]) } }, hasData: function (n) { var t = n[this.expando]; return void 0 !== t && !i.isEmptyObject(t) } }; var r = new bt, o = new bt, ae = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/, ve = /[A-Z]/g; i.extend({ hasData: function (n) { return o.hasData(n) || r.hasData(n) }, data: function (n, t, i) { return o.access(n, t, i) }, removeData: function (n, t) { o.remove(n, t) }, _data: function (n, t, i) { return r.access(n, t, i) }, _removeData: function (n, t) { r.remove(n, t) } }); i.fn.extend({ data: function (n, t) { var f, u, e, i = this[0], s = i && i.attributes; if (void 0 === n) { if (this.length && (e = o.get(i), 1 === i.nodeType && !r.get(i, "hasDataAttrs"))) { for (f = s.length; f--;)s[f] && 0 === (u = s[f].name).indexOf("data-") && (u = y(u.slice(5)), ou(i, u, e[u])); r.set(i, "hasDataAttrs", !0) } return e } return "object" == typeof n ? this.each(function () { o.set(this, n) }) : w(this, function (t) { var r; if (i && void 0 === t) return void 0 !== (r = o.get(i, n)) ? r : void 0 !== (r = ou(i, n)) ? r : void 0; this.each(function () { o.set(this, n, t) }) }, null, t, 1 < arguments.length, null, !0) }, removeData: function (n) { return this.each(function () { o.remove(this, n) }) } }); i.extend({ queue: function (n, t, u) { var f; if (n) return t = (t || "fx") + "queue", f = r.get(n, t), u && (!f || Array.isArray(u) ? f = r.access(n, t, i.makeArray(u)) : f.push(u)), f || [] }, dequeue: function (n, t) { t = t || "fx"; var r = i.queue(n, t), e = r.length, u = r.shift(), f = i._queueHooks(n, t); "inprogress" === u && (u = r.shift(), e--); u && ("fx" === t && r.unshift("inprogress"), delete f.stop, u.call(n, function () { i.dequeue(n, t) }, f)); !e && f && f.empty.fire() }, _queueHooks: function (n, t) { var u = t + "queueHooks"; return r.get(n, u) || r.access(n, u, { empty: i.Callbacks("once memory").add(function () { r.remove(n, [t + "queue", u]) }) }) } }); i.fn.extend({ queue: function (n, t) { var r = 2; return "string" != typeof n && (t = n, n = "fx", r--), arguments.length < r ? i.queue(this[0], n) : void 0 === t ? this : this.each(function () { var r = i.queue(this, n, t); i._queueHooks(this, n); "fx" === n && "inprogress" !== r[0] && i.dequeue(this, n) }) }, dequeue: function (n) { return this.each(function () { i.dequeue(this, n) }) }, clearQueue: function (n) { return this.queue(n || "fx", []) }, promise: function (n, t) { var u, e = 1, o = i.Deferred(), f = this, s = this.length, h = function () { --e || o.resolveWith(f, [f]) }; for ("string" != typeof n && (t = n, n = void 0), n = n || "fx"; s--;)(u = r.get(f[s], n + "queueHooks")) && u.empty && (e++, u.empty.add(h)); return h(), o.promise(t) } }); var su = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source, kt = new RegExp("^(?:([+-])=|)(" + su + ")([a-z%]*)$", "i"), b = ["Top", "Right", "Bottom", "Left"], g = f.documentElement, st = function (n) { return i.contains(n.ownerDocument, n) }, ye = { composed: !0 }; g.getRootNode && (st = function (n) { return i.contains(n.ownerDocument, n) || n.getRootNode(ye) === n.ownerDocument }); dt = function (n, t) { return "none" === (n = t || n).style.display || "" === n.style.display && st(n) && "none" === i.css(n, "display") }; ki = {}; i.fn.extend({ show: function () { return ht(this, !0) }, hide: function () { return ht(this) }, toggle: function (n) { return "boolean" == typeof n ? n ? this.show() : this.hide() : this.each(function () { dt(this) ? i(this).show() : i(this).hide() }) } }); var nt, si, gt = /^(?:checkbox|radio)$/i, cu = /<([a-z][^\/\0>\x20\t\r\n\f]*)/i, lu = /^$|^module$|\/(?:java|ecma)script/i; nt = f.createDocumentFragment().appendChild(f.createElement("div")); (si = f.createElement("input")).setAttribute("type", "radio"); si.setAttribute("checked", "checked"); si.setAttribute("name", "t"); nt.appendChild(si); e.checkClone = nt.cloneNode(!0).cloneNode(!0).lastChild.checked; nt.innerHTML = "<textarea>x<\/textarea>"; e.noCloneChecked = !!nt.cloneNode(!0).lastChild.defaultValue; nt.innerHTML = "<option><\/option>"; e.option = !!nt.lastChild; h = { thead: [1, "<table>", "<\/table>"], col: [2, "<table><colgroup>", "<\/colgroup><\/table>"], tr: [2, "<table><tbody>", "<\/tbody><\/table>"], td: [3, "<table><tbody><tr>", "<\/tr><\/tbody><\/table>"], _default: [0, "", ""] }; h.tbody = h.tfoot = h.colgroup = h.caption = h.thead; h.th = h.td; e.option || (h.optgroup = h.option = [1, "<select multiple='multiple'>", "<\/select>"]); au = /<|&#?\w+;/; var pe = /^key/, we = /^(?:mouse|pointer|contextmenu|drag|drop)|click/, yu = /^([^.]*)(?:\.(.+)|)/; i.event = { global: {}, add: function (n, t, u, f, e) { var p, a, k, v, w, h, s, c, o, b, d, y = r.get(n); if (ot(n)) for (u.handler && (u = (p = u).handler, e = p.selector), e && i.find.matchesSelector(g, e), u.guid || (u.guid = i.guid++), (v = y.events) || (v = y.events = Object.create(null)), (a = y.handle) || (a = y.handle = function (t) { if ("undefined" != typeof i && i.event.triggered !== t.type) return i.event.dispatch.apply(n, arguments) }), w = (t = (t || "").match(l) || [""]).length; w--;)o = d = (k = yu.exec(t[w]) || [])[1], b = (k[2] || "").split(".").sort(), o && (s = i.event.special[o] || {}, o = (e ? s.delegateType : s.bindType) || o, s = i.event.special[o] || {}, h = i.extend({ type: o, origType: d, data: f, handler: u, guid: u.guid, selector: e, needsContext: e && i.expr.match.needsContext.test(e), namespace: b.join(".") }, p), (c = v[o]) || ((c = v[o] = []).delegateCount = 0, s.setup && !1 !== s.setup.call(n, f, b, a) || n.addEventListener && n.addEventListener(o, a)), s.add && (s.add.call(n, h), h.handler.guid || (h.handler.guid = u.guid)), e ? c.splice(c.delegateCount++, 0, h) : c.push(h), i.event.global[o] = !0) }, remove: function (n, t, u, f, e) { var y, k, c, v, p, s, h, a, o, b, d, w = r.hasData(n) && r.get(n); if (w && (v = w.events)) { for (p = (t = (t || "").match(l) || [""]).length; p--;)if (o = d = (c = yu.exec(t[p]) || [])[1], b = (c[2] || "").split(".").sort(), o) { for (h = i.event.special[o] || {}, a = v[o = (f ? h.delegateType : h.bindType) || o] || [], c = c[2] && new RegExp("(^|\\.)" + b.join("\\.(?:.*\\.|)") + "(\\.|$)"), k = y = a.length; y--;)s = a[y], !e && d !== s.origType || u && u.guid !== s.guid || c && !c.test(s.namespace) || f && f !== s.selector && ("**" !== f || !s.selector) || (a.splice(y, 1), s.selector && a.delegateCount--, h.remove && h.remove.call(n, s)); k && !a.length && (h.teardown && !1 !== h.teardown.call(n, b, w.handle) || i.removeEvent(n, o, w.handle), delete v[o]) } else for (o in v) i.event.remove(n, o + t[p], u, f, !0); i.isEmptyObject(v) && r.remove(n, "handle events") } }, dispatch: function (n) { var u, h, c, e, f, l, s = new Array(arguments.length), t = i.event.fix(n), a = (r.get(this, "events") || Object.create(null))[t.type] || [], o = i.event.special[t.type] || {}; for (s[0] = t, u = 1; u < arguments.length; u++)s[u] = arguments[u]; if (t.delegateTarget = this, !o.preDispatch || !1 !== o.preDispatch.call(this, t)) { for (l = i.event.handlers.call(this, t, a), u = 0; (e = l[u++]) && !t.isPropagationStopped();)for (t.currentTarget = e.elem, h = 0; (f = e.handlers[h++]) && !t.isImmediatePropagationStopped();)t.rnamespace && !1 !== f.namespace && !t.rnamespace.test(f.namespace) || (t.handleObj = f, t.data = f.data, void 0 !== (c = ((i.event.special[f.origType] || {}).handle || f.handler).apply(e.elem, s)) && !1 === (t.result = c) && (t.preventDefault(), t.stopPropagation())); return o.postDispatch && o.postDispatch.call(this, t), t.result } }, handlers: function (n, t) { var f, h, u, e, o, c = [], s = t.delegateCount, r = n.target; if (s && r.nodeType && !("click" === n.type && 1 <= n.button)) for (; r !== this; r = r.parentNode || this)if (1 === r.nodeType && ("click" !== n.type || !0 !== r.disabled)) { for (e = [], o = {}, f = 0; f < s; f++)void 0 === o[u = (h = t[f]).selector + " "] && (o[u] = h.needsContext ? -1 < i(u, this).index(r) : i.find(u, this, null, [r]).length), o[u] && e.push(h); e.length && c.push({ elem: r, handlers: e }) } return r = this, s < t.length && c.push({ elem: r, handlers: t.slice(s) }), c }, addProp: function (n, t) { Object.defineProperty(i.Event.prototype, n, { enumerable: !0, configurable: !0, get: u(t) ? function () { if (this.originalEvent) return t(this.originalEvent) } : function () { if (this.originalEvent) return this.originalEvent[n] }, set: function (t) { Object.defineProperty(this, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) } }) }, fix: function (n) { return n[i.expando] ? n : new i.Event(n) }, special: { load: { noBubble: !0 }, click: { setup: function (n) { var t = this || n; return gt.test(t.type) && t.click && c(t, "input") && hi(t, "click", ct), !1 }, trigger: function (n) { var t = this || n; return gt.test(t.type) && t.click && c(t, "input") && hi(t, "click"), !0 }, _default: function (n) { var t = n.target; return gt.test(t.type) && t.click && c(t, "input") && r.get(t, "click") || c(t, "a") } }, beforeunload: { postDispatch: function (n) { void 0 !== n.result && n.originalEvent && (n.originalEvent.returnValue = n.result) } } } }; i.removeEvent = function (n, t, i) { n.removeEventListener && n.removeEventListener(t, i) }; i.Event = function (n, t) { if (!(this instanceof i.Event)) return new i.Event(n, t); n && n.type ? (this.originalEvent = n, this.type = n.type, this.isDefaultPrevented = n.defaultPrevented || void 0 === n.defaultPrevented && !1 === n.returnValue ? ct : lt, this.target = n.target && 3 === n.target.nodeType ? n.target.parentNode : n.target, this.currentTarget = n.currentTarget, this.relatedTarget = n.relatedTarget) : this.type = n; t && i.extend(this, t); this.timeStamp = n && n.timeStamp || Date.now(); this[i.expando] = !0 }; i.Event.prototype = { constructor: i.Event, isDefaultPrevented: lt, isPropagationStopped: lt, isImmediatePropagationStopped: lt, isSimulated: !1, preventDefault: function () { var n = this.originalEvent; this.isDefaultPrevented = ct; n && !this.isSimulated && n.preventDefault() }, stopPropagation: function () { var n = this.originalEvent; this.isPropagationStopped = ct; n && !this.isSimulated && n.stopPropagation() }, stopImmediatePropagation: function () { var n = this.originalEvent; this.isImmediatePropagationStopped = ct; n && !this.isSimulated && n.stopImmediatePropagation(); this.stopPropagation() } }; i.each({ altKey: !0, bubbles: !0, cancelable: !0, changedTouches: !0, ctrlKey: !0, detail: !0, eventPhase: !0, metaKey: !0, pageX: !0, pageY: !0, shiftKey: !0, view: !0, char: !0, code: !0, charCode: !0, key: !0, keyCode: !0, button: !0, buttons: !0, clientX: !0, clientY: !0, offsetX: !0, offsetY: !0, pointerId: !0, pointerType: !0, screenX: !0, screenY: !0, targetTouches: !0, toElement: !0, touches: !0, which: function (n) { var t = n.button; return null == n.which && pe.test(n.type) ? null != n.charCode ? n.charCode : n.keyCode : !n.which && void 0 !== t && we.test(n.type) ? 1 & t ? 1 : 2 & t ? 3 : 4 & t ? 2 : 0 : n.which } }, i.event.addProp); i.each({ focus: "focusin", blur: "focusout" }, function (n, t) { i.event.special[n] = { setup: function () { return hi(this, n, be), !1 }, trigger: function () { return hi(this, n), !0 }, delegateType: t } }); i.each({ mouseenter: "mouseover", mouseleave: "mouseout", pointerenter: "pointerover", pointerleave: "pointerout" }, function (n, t) { i.event.special[n] = { delegateType: t, bindType: t, handle: function (n) { var u, r = n.relatedTarget, f = n.handleObj; return r && (r === this || i.contains(this, r)) || (n.type = f.origType, u = f.handler.apply(this, arguments), n.type = t), u } } }); i.fn.extend({ on: function (n, t, i, r) { return gi(this, n, t, i, r) }, one: function (n, t, i, r) { return gi(this, n, t, i, r, 1) }, off: function (n, t, r) { var u, f; if (n && n.preventDefault && n.handleObj) return u = n.handleObj, i(n.delegateTarget).off(u.namespace ? u.origType + "." + u.namespace : u.origType, u.selector, u.handler), this; if ("object" == typeof n) { for (f in n) this.off(f, t, n[f]); return this } return !1 !== t && "function" != typeof t || (r = t, t = void 0), !1 === r && (r = lt), this.each(function () { i.event.remove(this, n, r, t) }) } }); var ke = /<script|<style|<link/i, de = /checked\s*(?:[^=]|=\s*.checked.)/i, ge = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g; i.extend({ htmlPrefilter: function (n) { return n }, clone: function (n, t, r) { var u, c, o, f, l, a, v, h = n.cloneNode(!0), y = st(n); if (!(e.noCloneChecked || 1 !== n.nodeType && 11 !== n.nodeType || i.isXMLDoc(n))) for (f = s(h), u = 0, c = (o = s(n)).length; u < c; u++)l = o[u], a = f[u], void 0, "input" === (v = a.nodeName.toLowerCase()) && gt.test(l.type) ? a.checked = l.checked : "input" !== v && "textarea" !== v || (a.defaultValue = l.defaultValue); if (t) if (r) for (o = o || s(n), f = f || s(h), u = 0, c = o.length; u < c; u++)wu(o[u], f[u]); else wu(n, h); return 0 < (f = s(h, "script")).length && di(f, !y && s(n, "script")), h }, cleanData: function (n) { for (var u, t, f, s = i.event.special, e = 0; void 0 !== (t = n[e]); e++)if (ot(t)) { if (u = t[r.expando]) { if (u.events) for (f in u.events) s[f] ? i.event.remove(t, f) : i.removeEvent(t, f, u.handle); t[r.expando] = void 0 } t[o.expando] && (t[o.expando] = void 0) } } }); i.fn.extend({ detach: function (n) { return bu(this, n, !0) }, remove: function (n) { return bu(this, n) }, text: function (n) { return w(this, function (n) { return void 0 === n ? i.text(this) : this.empty().each(function () { 1 !== this.nodeType && 11 !== this.nodeType && 9 !== this.nodeType || (this.textContent = n) }) }, null, n, arguments.length) }, append: function () { return at(this, arguments, function (n) { 1 !== this.nodeType && 11 !== this.nodeType && 9 !== this.nodeType || pu(this, n).appendChild(n) }) }, prepend: function () { return at(this, arguments, function (n) { if (1 === this.nodeType || 11 === this.nodeType || 9 === this.nodeType) { var t = pu(this, n); t.insertBefore(n, t.firstChild) } }) }, before: function () { return at(this, arguments, function (n) { this.parentNode && this.parentNode.insertBefore(n, this) }) }, after: function () { return at(this, arguments, function (n) { this.parentNode && this.parentNode.insertBefore(n, this.nextSibling) }) }, empty: function () { for (var n, t = 0; null != (n = this[t]); t++)1 === n.nodeType && (i.cleanData(s(n, !1)), n.textContent = ""); return this }, clone: function (n, t) { return n = null != n && n, t = null == t ? n : t, this.map(function () { return i.clone(this, n, t) }) }, html: function (n) { return w(this, function (n) { var t = this[0] || {}, r = 0, u = this.length; if (void 0 === n && 1 === t.nodeType) return t.innerHTML; if ("string" == typeof n && !ke.test(n) && !h[(cu.exec(n) || ["", ""])[1].toLowerCase()]) { n = i.htmlPrefilter(n); try { for (; r < u; r++)1 === (t = this[r] || {}).nodeType && (i.cleanData(s(t, !1)), t.innerHTML = n); t = 0 } catch (n) { } } t && this.empty().append(n) }, null, n, arguments.length) }, replaceWith: function () { var n = []; return at(this, arguments, function (t) { var r = this.parentNode; i.inArray(this, n) < 0 && (i.cleanData(s(this)), r && r.replaceChild(t, this)) }, n) } }); i.each({ appendTo: "append", prependTo: "prepend", insertBefore: "before", insertAfter: "after", replaceAll: "replaceWith" }, function (n, t) { i.fn[n] = function (n) { for (var u, f = [], e = i(n), o = e.length - 1, r = 0; r <= o; r++)u = r === o ? this : this.clone(!0), i(e[r])[t](u), yi.apply(f, u.get()); return this.pushStack(f) } }); var nr = new RegExp("^(" + su + ")(?!px)[a-z%]+$", "i"), ci = function (t) { var i = t.ownerDocument.defaultView; return i && i.opener || (i = n), i.getComputedStyle(t) }, ku = function (n, t, i) { var u, r, f = {}; for (r in t) f[r] = n.style[r], n.style[r] = t[r]; for (r in u = i.call(n), t) n.style[r] = f[r]; return u }, io = new RegExp(b.join("|"), "i"); !function () { function r() { if (t) { s.style.cssText = "position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0"; t.style.cssText = "position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%"; g.appendChild(s).appendChild(t); var i = n.getComputedStyle(t); h = "1%" !== i.top; v = 12 === u(i.marginLeft); t.style.right = "60%"; a = 36 === u(i.right); c = 36 === u(i.width); t.style.position = "absolute"; l = 12 === u(t.offsetWidth / 3); g.removeChild(s); t = null } } function u(n) { return Math.round(parseFloat(n)) } var h, c, l, a, o, v, s = f.createElement("div"), t = f.createElement("div"); t.style && (t.style.backgroundClip = "content-box", t.cloneNode(!0).style.backgroundClip = "", e.clearCloneStyle = "content-box" === t.style.backgroundClip, i.extend(e, { boxSizingReliable: function () { return r(), c }, pixelBoxStyles: function () { return r(), a }, pixelPosition: function () { return r(), h }, reliableMarginLeft: function () { return r(), v }, scrollboxSize: function () { return r(), l }, reliableTrDimensions: function () { var t, i, r, u; return null == o && (t = f.createElement("table"), i = f.createElement("tr"), r = f.createElement("div"), t.style.cssText = "position:absolute;left:-11111px", i.style.height = "1px", r.style.height = "9px", g.appendChild(t).appendChild(i).appendChild(r), u = n.getComputedStyle(i), o = 3 < parseInt(u.height), g.removeChild(t)), o } })) }(); var gu = ["Webkit", "Moz", "ms"], nf = f.createElement("div").style, tf = {}; var ro = /^(none|table(?!-c[ea]).+)/, rf = /^--/, uo = { position: "absolute", visibility: "hidden", display: "block" }, uf = { letterSpacing: "0", fontWeight: "400" }; i.extend({ cssHooks: { opacity: { get: function (n, t) { if (t) { var i = ni(n, "opacity"); return "" === i ? "1" : i } } } }, cssNumber: { animationIterationCount: !0, columnCount: !0, fillOpacity: !0, flexGrow: !0, flexShrink: !0, fontWeight: !0, gridArea: !0, gridColumn: !0, gridColumnEnd: !0, gridColumnStart: !0, gridRow: !0, gridRowEnd: !0, gridRowStart: !0, lineHeight: !0, opacity: !0, order: !0, orphans: !0, widows: !0, zIndex: !0, zoom: !0 }, cssProps: {}, style: function (n, t, r, u) { if (n && 3 !== n.nodeType && 8 !== n.nodeType && n.style) { var f, h, o, c = y(t), l = rf.test(t), s = n.style; if (l || (t = tr(c)), o = i.cssHooks[t] || i.cssHooks[c], void 0 === r) return o && "get" in o && void 0 !== (f = o.get(n, !1, u)) ? f : s[t]; "string" == (h = typeof r) && (f = kt.exec(r)) && f[1] && (r = hu(n, t, f), h = "number"); null != r && r == r && ("number" !== h || l || (r += f && f[3] || (i.cssNumber[c] ? "" : "px")), e.clearCloneStyle || "" !== r || 0 !== t.indexOf("background") || (s[t] = "inherit"), o && "set" in o && void 0 === (r = o.set(n, r, u)) || (l ? s.setProperty(t, r) : s[t] = r)) } }, css: function (n, t, r, u) { var f, e, o, s = y(t); return rf.test(t) || (t = tr(s)), (o = i.cssHooks[t] || i.cssHooks[s]) && "get" in o && (f = o.get(n, !0, r)), void 0 === f && (f = ni(n, t, u)), "normal" === f && t in uf && (f = uf[t]), "" === r || r ? (e = parseFloat(f), !0 === r || isFinite(e) ? e || 0 : f) : f } }); i.each(["height", "width"], function (n, t) { i.cssHooks[t] = { get: function (n, r, u) { if (r) return !ro.test(i.css(n, "display")) || n.getClientRects().length && n.getBoundingClientRect().width ? ef(n, t, u) : ku(n, uo, function () { return ef(n, t, u) }) }, set: function (n, r, u) { var s, f = ci(n), h = !e.scrollboxSize() && "absolute" === f.position, c = (h || u) && "border-box" === i.css(n, "boxSizing", !1, f), o = u ? ir(n, t, u, c, f) : 0; return c && h && (o -= Math.ceil(n["offset" + t[0].toUpperCase() + t.slice(1)] - parseFloat(f[t]) - ir(n, t, "border", !1, f) - .5)), o && (s = kt.exec(r)) && "px" !== (s[3] || "px") && (n.style[t] = r, r = i.css(n, t)), ff(0, r, o) } } }); i.cssHooks.marginLeft = du(e.reliableMarginLeft, function (n, t) { if (t) return (parseFloat(ni(n, "marginLeft")) || n.getBoundingClientRect().left - ku(n, { marginLeft: 0 }, function () { return n.getBoundingClientRect().left })) + "px" }); i.each({ margin: "", padding: "", border: "Width" }, function (n, t) { i.cssHooks[n + t] = { expand: function (i) { for (var r = 0, f = {}, u = "string" == typeof i ? i.split(" ") : [i]; r < 4; r++)f[n + b[r] + t] = u[r] || u[r - 2] || u[0]; return f } }; "margin" !== n && (i.cssHooks[n + t].set = ff) }); i.fn.extend({ css: function (n, t) { return w(this, function (n, t, r) { var f, e, o = {}, u = 0; if (Array.isArray(t)) { for (f = ci(n), e = t.length; u < e; u++)o[t[u]] = i.css(n, t[u], !1, f); return o } return void 0 !== r ? i.style(n, t, r) : i.css(n, t) }, n, t, 1 < arguments.length) } }); ((i.Tween = a).prototype = { constructor: a, init: function (n, t, r, u, f, e) { this.elem = n; this.prop = r; this.easing = f || i.easing._default; this.options = t; this.start = this.now = this.cur(); this.end = u; this.unit = e || (i.cssNumber[r] ? "" : "px") }, cur: function () { var n = a.propHooks[this.prop]; return n && n.get ? n.get(this) : a.propHooks._default.get(this) }, run: function (n) { var t, r = a.propHooks[this.prop]; return this.pos = this.options.duration ? t = i.easing[this.easing](n, this.options.duration * n, 0, 1, this.options.duration) : t = n, this.now = (this.end - this.start) * t + this.start, this.options.step && this.options.step.call(this.elem, this.now, this), r && r.set ? r.set(this) : a.propHooks._default.set(this), this } }).init.prototype = a.prototype; (a.propHooks = { _default: { get: function (n) { var t; return 1 !== n.elem.nodeType || null != n.elem[n.prop] && null == n.elem.style[n.prop] ? n.elem[n.prop] : (t = i.css(n.elem, n.prop, "")) && "auto" !== t ? t : 0 }, set: function (n) { i.fx.step[n.prop] ? i.fx.step[n.prop](n) : 1 !== n.elem.nodeType || !i.cssHooks[n.prop] && null == n.elem.style[tr(n.prop)] ? n.elem[n.prop] = n.now : i.style(n.elem, n.prop, n.now + n.unit) } } }).scrollTop = a.propHooks.scrollLeft = { set: function (n) { n.elem.nodeType && n.elem.parentNode && (n.elem[n.prop] = n.now) } }; i.easing = { linear: function (n) { return n }, swing: function (n) { return .5 - Math.cos(n * Math.PI) / 2 }, _default: "swing" }; i.fx = a.prototype.init; i.fx.step = {}; hf = /^(?:toggle|show|hide)$/; cf = /queueHooks$/; i.Animation = i.extend(v, { tweeners: { "*": [function (n, t) { var i = this.createTween(n, t); return hu(i.elem, n, kt.exec(t), i), i }] }, tweener: function (n, t) { u(n) ? (t = n, n = ["*"]) : n = n.match(l); for (var i, r = 0, f = n.length; r < f; r++)i = n[r], v.tweeners[i] = v.tweeners[i] || [], v.tweeners[i].unshift(t) }, prefilters: [function (n, t, u) { var f, y, w, c, b, h, o, l, k = "width" in t || "height" in t, v = this, p = {}, s = n.style, a = n.nodeType && dt(n), e = r.get(n, "fxshow"); for (f in u.queue || (null == (c = i._queueHooks(n, "fx")).unqueued && (c.unqueued = 0, b = c.empty.fire, c.empty.fire = function () { c.unqueued || b() }), c.unqueued++, v.always(function () { v.always(function () { c.unqueued--; i.queue(n, "fx").length || c.empty.fire() }) })), t) if (y = t[f], hf.test(y)) { if (delete t[f], w = w || "toggle" === y, y === (a ? "hide" : "show")) { if ("show" !== y || !e || void 0 === e[f]) continue; a = !0 } p[f] = e && e[f] || i.style(n, f) } if ((h = !i.isEmptyObject(t)) || !i.isEmptyObject(p)) for (f in k && 1 === n.nodeType && (u.overflow = [s.overflow, s.overflowX, s.overflowY], null == (o = e && e.display) && (o = r.get(n, "display")), "none" === (l = i.css(n, "display")) && (o ? l = o : (ht([n], !0), o = n.style.display || o, l = i.css(n, "display"), ht([n]))), ("inline" === l || "inline-block" === l && null != o) && "none" === i.css(n, "float") && (h || (v.done(function () { s.display = o }), null == o && (l = s.display, o = "none" === l ? "" : l)), s.display = "inline-block")), u.overflow && (s.overflow = "hidden", v.always(function () { s.overflow = u.overflow[0]; s.overflowX = u.overflow[1]; s.overflowY = u.overflow[2] })), h = !1, p) h || (e ? "hidden" in e && (a = e.hidden) : e = r.access(n, "fxshow", { display: o }), w && (e.hidden = !a), a && ht([n], !0), v.done(function () { for (f in a || ht([n]), r.remove(n, "fxshow"), p) i.style(n, f, p[f]) })), h = af(a ? e[f] : 0, f, v), f in e || (e[f] = h.start, a && (h.end = h.start, h.start = 0)) }], prefilter: function (n, t) { t ? v.prefilters.unshift(n) : v.prefilters.push(n) } }); i.speed = function (n, t, r) { var f = n && "object" == typeof n ? i.extend({}, n) : { complete: r || !r && t || u(n) && n, duration: n, easing: r && t || t && !u(t) && t }; return i.fx.off ? f.duration = 0 : "number" != typeof f.duration && (f.duration = f.duration in i.fx.speeds ? i.fx.speeds[f.duration] : i.fx.speeds._default), null != f.queue && !0 !== f.queue || (f.queue = "fx"), f.old = f.complete, f.complete = function () { u(f.old) && f.old.call(this); f.queue && i.dequeue(this, f.queue) }, f }; i.fn.extend({ fadeTo: function (n, t, i, r) { return this.filter(dt).css("opacity", 0).show().end().animate({ opacity: t }, n, i, r) }, animate: function (n, t, u, f) { var s = i.isEmptyObject(n), o = i.speed(t, u, f), e = function () { var t = v(this, i.extend({}, n), o); (s || r.get(this, "finish")) && t.stop(!0) }; return e.finish = e, s || !1 === o.queue ? this.each(e) : this.queue(o.queue, e) }, stop: function (n, t, u) { var f = function (n) { var t = n.stop; delete n.stop; t(u) }; return "string" != typeof n && (u = t, t = n, n = void 0), t && this.queue(n || "fx", []), this.each(function () { var s = !0, t = null != n && n + "queueHooks", o = i.timers, e = r.get(this); if (t) e[t] && e[t].stop && f(e[t]); else for (t in e) e[t] && e[t].stop && cf.test(t) && f(e[t]); for (t = o.length; t--;)o[t].elem !== this || null != n && o[t].queue !== n || (o[t].anim.stop(u), s = !1, o.splice(t, 1)); !s && u || i.dequeue(this, n) }) }, finish: function (n) { return !1 !== n && (n = n || "fx"), this.each(function () { var t, e = r.get(this), u = e[n + "queue"], o = e[n + "queueHooks"], f = i.timers, s = u ? u.length : 0; for (e.finish = !0, i.queue(this, n, []), o && o.stop && o.stop.call(this, !0), t = f.length; t--;)f[t].elem === this && f[t].queue === n && (f[t].anim.stop(!0), f.splice(t, 1)); for (t = 0; t < s; t++)u[t] && u[t].finish && u[t].finish.call(this); delete e.finish }) } }); i.each(["toggle", "show", "hide"], function (n, t) { var r = i.fn[t]; i.fn[t] = function (n, i, u) { return null == n || "boolean" == typeof n ? r.apply(this, arguments) : this.animate(ai(t, !0), n, i, u) } }); i.each({ slideDown: ai("show"), slideUp: ai("hide"), slideToggle: ai("toggle"), fadeIn: { opacity: "show" }, fadeOut: { opacity: "hide" }, fadeToggle: { opacity: "toggle" } }, function (n, t) { i.fn[n] = function (n, i, r) { return this.animate(t, n, i, r) } }); i.timers = []; i.fx.tick = function () { var r, n = 0, t = i.timers; for (vt = Date.now(); n < t.length; n++)(r = t[n])() || t[n] !== r || t.splice(n--, 1); t.length || i.fx.stop(); vt = void 0 }; i.fx.timer = function (n) { i.timers.push(n); i.fx.start() }; i.fx.interval = 13; i.fx.start = function () { li || (li = !0, rr()) }; i.fx.stop = function () { li = null }; i.fx.speeds = { slow: 600, fast: 200, _default: 400 }; i.fn.delay = function (t, r) { return t = i.fx && i.fx.speeds[t] || t, r = r || "fx", this.queue(r, function (i, r) { var u = n.setTimeout(i, t); r.stop = function () { n.clearTimeout(u) } }) }; yt = f.createElement("input"); sf = f.createElement("select").appendChild(f.createElement("option")); yt.type = "checkbox"; e.checkOn = "" !== yt.value; e.optSelected = sf.selected; (yt = f.createElement("input")).value = "t"; yt.type = "radio"; e.radioValue = "t" === yt.value; pt = i.expr.attrHandle; i.fn.extend({ attr: function (n, t) { return w(this, i.attr, n, t, 1 < arguments.length) }, removeAttr: function (n) { return this.each(function () { i.removeAttr(this, n) }) } }); i.extend({ attr: function (n, t, r) { var f, u, e = n.nodeType; if (3 !== e && 8 !== e && 2 !== e) return "undefined" == typeof n.getAttribute ? i.prop(n, t, r) : (1 === e && i.isXMLDoc(n) || (u = i.attrHooks[t.toLowerCase()] || (i.expr.match.bool.test(t) ? vf : void 0)), void 0 !== r ? null === r ? void i.removeAttr(n, t) : u && "set" in u && void 0 !== (f = u.set(n, r, t)) ? f : (n.setAttribute(t, r + ""), r) : u && "get" in u && null !== (f = u.get(n, t)) ? f : null == (f = i.find.attr(n, t)) ? void 0 : f) }, attrHooks: { type: { set: function (n, t) { if (!e.radioValue && "radio" === t && c(n, "input")) { var i = n.value; return n.setAttribute("type", t), i && (n.value = i), t } } } }, removeAttr: function (n, t) { var i, u = 0, r = t && t.match(l); if (r && 1 === n.nodeType) while (i = r[u++]) n.removeAttribute(i) } }); vf = { set: function (n, t, r) { return !1 === t ? i.removeAttr(n, r) : n.setAttribute(r, r), r } }; i.each(i.expr.match.bool.source.match(/\w+/g), function (n, t) { var r = pt[t] || i.find.attr; pt[t] = function (n, t, i) { var f, e, u = t.toLowerCase(); return i || (e = pt[u], pt[u] = f, f = null != r(n, t, i) ? u : null, pt[u] = e), f } }); yf = /^(?:input|select|textarea|button)$/i; pf = /^(?:a|area)$/i; i.fn.extend({ prop: function (n, t) { return w(this, i.prop, n, t, 1 < arguments.length) }, removeProp: function (n) { return this.each(function () { delete this[i.propFix[n] || n] }) } }); i.extend({ prop: function (n, t, r) { var f, u, e = n.nodeType; if (3 !== e && 8 !== e && 2 !== e) return 1 === e && i.isXMLDoc(n) || (t = i.propFix[t] || t, u = i.propHooks[t]), void 0 !== r ? u && "set" in u && void 0 !== (f = u.set(n, r, t)) ? f : n[t] = r : u && "get" in u && null !== (f = u.get(n, t)) ? f : n[t] }, propHooks: { tabIndex: { get: function (n) { var t = i.find.attr(n, "tabindex"); return t ? parseInt(t, 10) : yf.test(n.nodeName) || pf.test(n.nodeName) && n.href ? 0 : -1 } } }, propFix: { "for": "htmlFor", "class": "className" } }); e.optSelected || (i.propHooks.selected = { get: function (n) { var t = n.parentNode; return t && t.parentNode && t.parentNode.selectedIndex, null }, set: function (n) { var t = n.parentNode; t && (t.selectedIndex, t.parentNode && t.parentNode.selectedIndex) } }); i.each(["tabIndex", "readOnly", "maxLength", "cellSpacing", "cellPadding", "rowSpan", "colSpan", "useMap", "frameBorder", "contentEditable"], function () { i.propFix[this.toLowerCase()] = this }); i.fn.extend({ addClass: function (n) { var o, t, r, f, e, s, h, c = 0; if (u(n)) return this.each(function (t) { i(this).addClass(n.call(this, t, it(this))) }); if ((o = ur(n)).length) while (t = this[c++]) if (f = it(t), r = 1 === t.nodeType && " " + tt(f) + " ") { for (s = 0; e = o[s++];)r.indexOf(" " + e + " ") < 0 && (r += e + " "); f !== (h = tt(r)) && t.setAttribute("class", h) } return this }, removeClass: function (n) { var o, r, t, f, e, s, h, c = 0; if (u(n)) return this.each(function (t) { i(this).removeClass(n.call(this, t, it(this))) }); if (!arguments.length) return this.attr("class", ""); if ((o = ur(n)).length) while (r = this[c++]) if (f = it(r), t = 1 === r.nodeType && " " + tt(f) + " ") { for (s = 0; e = o[s++];)while (-1 < t.indexOf(" " + e + " ")) t = t.replace(" " + e + " ", " "); f !== (h = tt(t)) && r.setAttribute("class", h) } return this }, toggleClass: function (n, t) { var f = typeof n, e = "string" === f || Array.isArray(n); return "boolean" == typeof t && e ? t ? this.addClass(n) : this.removeClass(n) : u(n) ? this.each(function (r) { i(this).toggleClass(n.call(this, r, it(this), t), t) }) : this.each(function () { var t, o, u, s; if (e) for (o = 0, u = i(this), s = ur(n); t = s[o++];)u.hasClass(t) ? u.removeClass(t) : u.addClass(t); else void 0 !== n && "boolean" !== f || ((t = it(this)) && r.set(this, "__className__", t), this.setAttribute && this.setAttribute("class", t || !1 === n ? "" : r.get(this, "__className__") || "")) }) }, hasClass: function (n) { for (var t, r = 0, i = " " + n + " "; t = this[r++];)if (1 === t.nodeType && -1 < (" " + tt(it(t)) + " ").indexOf(i)) return !0; return !1 } }); wf = /\r/g; i.fn.extend({ val: function (n) { var t, r, e, f = this[0]; return arguments.length ? (e = u(n), this.each(function (r) { var u; 1 === this.nodeType && (null == (u = e ? n.call(this, r, i(this).val()) : n) ? u = "" : "number" == typeof u ? u += "" : Array.isArray(u) && (u = i.map(u, function (n) { return null == n ? "" : n + "" })), (t = i.valHooks[this.type] || i.valHooks[this.nodeName.toLowerCase()]) && "set" in t && void 0 !== t.set(this, u, "value") || (this.value = u)) })) : f ? (t = i.valHooks[f.type] || i.valHooks[f.nodeName.toLowerCase()]) && "get" in t && void 0 !== (r = t.get(f, "value")) ? r : "string" == typeof (r = f.value) ? r.replace(wf, "") : null == r ? "" : r : void 0 } }); i.extend({ valHooks: { option: { get: function (n) { var t = i.find.attr(n, "value"); return null != t ? t : tt(i.text(n)) } }, select: { get: function (n) { for (var e, t, o = n.options, u = n.selectedIndex, f = "select-one" === n.type, s = f ? null : [], h = f ? u + 1 : o.length, r = u < 0 ? h : f ? u : 0; r < h; r++)if (((t = o[r]).selected || r === u) && !t.disabled && (!t.parentNode.disabled || !c(t.parentNode, "optgroup"))) { if (e = i(t).val(), f) return e; s.push(e) } return s }, set: function (n, t) { for (var r, u, f = n.options, e = i.makeArray(t), o = f.length; o--;)((u = f[o]).selected = -1 < i.inArray(i.valHooks.option.get(u), e)) && (r = !0); return r || (n.selectedIndex = -1), e } } } }); i.each(["radio", "checkbox"], function () { i.valHooks[this] = { set: function (n, t) { if (Array.isArray(t)) return n.checked = -1 < i.inArray(i(n).val(), t) } }; e.checkOn || (i.valHooks[this].get = function (n) { return null === n.getAttribute("value") ? "on" : n.value }) }); e.focusin = "onfocusin" in n; fr = /^(?:focusinfocus|focusoutblur)$/; er = function (n) { n.stopPropagation() }; i.extend(i.event, { trigger: function (t, e, o, s) { var k, c, l, d, v, y, a, p, w = [o || f], h = ui.call(t, "type") ? t.type : t, b = ui.call(t, "namespace") ? t.namespace.split(".") : []; if (c = p = l = o = o || f, 3 !== o.nodeType && 8 !== o.nodeType && !fr.test(h + i.event.triggered) && (-1 < h.indexOf(".") && (h = (b = h.split(".")).shift(), b.sort()), v = h.indexOf(":") < 0 && "on" + h, (t = t[i.expando] ? t : new i.Event(h, "object" == typeof t && t)).isTrigger = s ? 2 : 3, t.namespace = b.join("."), t.rnamespace = t.namespace ? new RegExp("(^|\\.)" + b.join("\\.(?:.*\\.|)") + "(\\.|$)") : null, t.result = void 0, t.target || (t.target = o), e = null == e ? [t] : i.makeArray(e, [t]), a = i.event.special[h] || {}, s || !a.trigger || !1 !== a.trigger.apply(o, e))) { if (!s && !a.noBubble && !rt(o)) { for (d = a.delegateType || h, fr.test(d + h) || (c = c.parentNode); c; c = c.parentNode)w.push(c), l = c; l === (o.ownerDocument || f) && w.push(l.defaultView || l.parentWindow || n) } for (k = 0; (c = w[k++]) && !t.isPropagationStopped();)p = c, t.type = 1 < k ? d : a.bindType || h, (y = (r.get(c, "events") || Object.create(null))[t.type] && r.get(c, "handle")) && y.apply(c, e), (y = v && c[v]) && y.apply && ot(c) && (t.result = y.apply(c, e), !1 === t.result && t.preventDefault()); return t.type = h, s || t.isDefaultPrevented() || a._default && !1 !== a._default.apply(w.pop(), e) || !ot(o) || v && u(o[h]) && !rt(o) && ((l = o[v]) && (o[v] = null), i.event.triggered = h, t.isPropagationStopped() && p.addEventListener(h, er), o[h](), t.isPropagationStopped() && p.removeEventListener(h, er), i.event.triggered = void 0, l && (o[v] = l)), t.result } }, simulate: function (n, t, r) { var u = i.extend(new i.Event, r, { type: n, isSimulated: !0 }); i.event.trigger(u, null, t) } }); i.fn.extend({ trigger: function (n, t) { return this.each(function () { i.event.trigger(n, t, this) }) }, triggerHandler: function (n, t) { var r = this[0]; if (r) return i.event.trigger(n, t, r, !0) } }); e.focusin || i.each({ focus: "focusin", blur: "focusout" }, function (n, t) { var u = function (n) { i.event.simulate(t, n.target, i.event.fix(n)) }; i.event.special[t] = { setup: function () { var i = this.ownerDocument || this.document || this, f = r.access(i, t); f || i.addEventListener(n, u, !0); r.access(i, t, (f || 0) + 1) }, teardown: function () { var i = this.ownerDocument || this.document || this, f = r.access(i, t) - 1; f ? r.access(i, t, f) : (i.removeEventListener(n, u, !0), r.remove(i, t)) } } }); var ti = n.location, bf = { guid: Date.now() }, or = /\?/; i.parseXML = function (t) { var r; if (!t || "string" != typeof t) return null; try { r = (new n.DOMParser).parseFromString(t, "text/xml") } catch (t) { r = void 0 } return r && !r.getElementsByTagName("parsererror").length || i.error("Invalid XML: " + t), r }; var fo = /\[\]$/, kf = /\r?\n/g, eo = /^(?:submit|button|image|reset|file)$/i, oo = /^(?:input|select|textarea|keygen)/i; i.param = function (n, t) { var r, f = [], e = function (n, t) { var i = u(t) ? t() : t; f[f.length] = encodeURIComponent(n) + "=" + encodeURIComponent(null == i ? "" : i) }; if (null == n) return ""; if (Array.isArray(n) || n.jquery && !i.isPlainObject(n)) i.each(n, function () { e(this.name, this.value) }); else for (r in n) sr(r, n[r], t, e); return f.join("&") }; i.fn.extend({ serialize: function () { return i.param(this.serializeArray()) }, serializeArray: function () { return this.map(function () { var n = i.prop(this, "elements"); return n ? i.makeArray(n) : this }).filter(function () { var n = this.type; return this.name && !i(this).is(":disabled") && oo.test(this.nodeName) && !eo.test(n) && (this.checked || !gt.test(n)) }).map(function (n, t) { var r = i(this).val(); return null == r ? null : Array.isArray(r) ? i.map(r, function (n) { return { name: t.name, value: n.replace(kf, "\r\n") } }) : { name: t.name, value: r.replace(kf, "\r\n") } }).get() } }); var so = /%20/g, ho = /#.*$/, co = /([?&])_=[^&]*/, lo = /^(.*?):[ \t]*([^\r\n]*)$/gm, ao = /^(?:GET|HEAD)$/, vo = /^\/\//, df = {}, hr = {}, gf = "*/".concat("*"), cr = f.createElement("a"); return cr.href = ti.href, i.extend({ active: 0, lastModified: {}, etag: {}, ajaxSettings: { url: ti.href, type: "GET", isLocal: /^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(ti.protocol), global: !0, processData: !0, "async": !0, contentType: "application/x-www-form-urlencoded; charset=UTF-8", accepts: { "*": gf, text: "text/plain", html: "text/html", xml: "application/xml, text/xml", json: "application/json, text/javascript" }, contents: { xml: /\bxml\b/, html: /\bhtml/, json: /\bjson\b/ }, responseFields: { xml: "responseXML", text: "responseText", json: "responseJSON" }, converters: { "* text": String, "text html": !0, "text json": JSON.parse, "text xml": i.parseXML }, flatOptions: { url: !0, context: !0 } }, ajaxSetup: function (n, t) { return t ? lr(lr(n, i.ajaxSettings), t) : lr(i.ajaxSettings, n) }, ajaxPrefilter: ne(df), ajaxTransport: ne(hr), ajax: function (t, r) { function b(t, r, f, c) { var v, rt, b, p, g, l = r; s || (s = !0, d && n.clearTimeout(d), a = void 0, k = c || "", e.readyState = 0 < t ? 4 : 0, v = 200 <= t && t < 300 || 304 === t, f && (p = function (n, t, i) { for (var e, u, f, o, s = n.contents, r = n.dataTypes; "*" === r[0];)r.shift(), void 0 === e && (e = n.mimeType || t.getResponseHeader("Content-Type")); if (e) for (u in s) if (s[u] && s[u].test(e)) { r.unshift(u); break } if (r[0] in i) f = r[0]; else { for (u in i) { if (!r[0] || n.converters[u + " " + r[0]]) { f = u; break } o || (o = u) } f = f || o } if (f) return f !== r[0] && r.unshift(f), i[f] }(u, e, f)), !v && -1 < i.inArray("script", u.dataTypes) && (u.converters["text script"] = function () { }), p = function (n, t, i, r) { var h, u, f, s, e, o = {}, c = n.dataTypes.slice(); if (c[1]) for (f in n.converters) o[f.toLowerCase()] = n.converters[f]; for (u = c.shift(); u;)if (n.responseFields[u] && (i[n.responseFields[u]] = t), !e && r && n.dataFilter && (t = n.dataFilter(t, n.dataType)), e = u, u = c.shift()) if ("*" === u) u = e; else if ("*" !== e && e !== u) { if (!(f = o[e + " " + u] || o["* " + u])) for (h in o) if ((s = h.split(" "))[1] === u && (f = o[e + " " + s[0]] || o["* " + s[0]])) { !0 === f ? f = o[h] : !0 !== o[h] && (u = s[0], c.unshift(s[1])); break } if (!0 !== f) if (f && n.throws) t = f(t); else try { t = f(t) } catch (n) { return { state: "parsererror", error: f ? n : "No conversion from " + e + " to " + u } } } return { state: "success", data: t } }(u, p, e, v), v ? (u.ifModified && ((g = e.getResponseHeader("Last-Modified")) && (i.lastModified[o] = g), (g = e.getResponseHeader("etag")) && (i.etag[o] = g)), 204 === t || "HEAD" === u.type ? l = "nocontent" : 304 === t ? l = "notmodified" : (l = p.state, rt = p.data, v = !(b = p.error))) : (b = l, !t && l || (l = "error", t < 0 && (t = 0))), e.status = t, e.statusText = (r || l) + "", v ? tt.resolveWith(h, [rt, l, e]) : tt.rejectWith(h, [e, l, b]), e.statusCode(w), w = void 0, y && nt.trigger(v ? "ajaxSuccess" : "ajaxError", [e, u, v ? rt : b]), it.fireWith(h, [e, l]), y && (nt.trigger("ajaxComplete", [e, u]), --i.active || i.event.trigger("ajaxStop"))) } "object" == typeof t && (r = t, t = void 0); r = r || {}; var a, o, k, v, d, c, s, y, g, p, u = i.ajaxSetup({}, r), h = u.context || u, nt = u.context && (h.nodeType || h.jquery) ? i(h) : i.event, tt = i.Deferred(), it = i.Callbacks("once memory"), w = u.statusCode || {}, rt = {}, ut = {}, ft = "canceled", e = { readyState: 0, getResponseHeader: function (n) { var t; if (s) { if (!v) for (v = {}; t = lo.exec(k);)v[t[1].toLowerCase() + " "] = (v[t[1].toLowerCase() + " "] || []).concat(t[2]); t = v[n.toLowerCase() + " "] } return null == t ? null : t.join(", ") }, getAllResponseHeaders: function () { return s ? k : null }, setRequestHeader: function (n, t) { return null == s && (n = ut[n.toLowerCase()] = ut[n.toLowerCase()] || n, rt[n] = t), this }, overrideMimeType: function (n) { return null == s && (u.mimeType = n), this }, statusCode: function (n) { var t; if (n) if (s) e.always(n[e.status]); else for (t in n) w[t] = [w[t], n[t]]; return this }, abort: function (n) { var t = n || ft; return a && a.abort(t), b(0, t), this } }; if (tt.promise(e), u.url = ((t || u.url || ti.href) + "").replace(vo, ti.protocol + "//"), u.type = r.method || r.type || u.method || u.type, u.dataTypes = (u.dataType || "*").toLowerCase().match(l) || [""], null == u.crossDomain) { c = f.createElement("a"); try { c.href = u.url; c.href = c.href; u.crossDomain = cr.protocol + "//" + cr.host != c.protocol + "//" + c.host } catch (t) { u.crossDomain = !0 } } if (u.data && u.processData && "string" != typeof u.data && (u.data = i.param(u.data, u.traditional)), te(df, u, r, e), s) return e; for (g in (y = i.event && u.global) && 0 == i.active++ && i.event.trigger("ajaxStart"), u.type = u.type.toUpperCase(), u.hasContent = !ao.test(u.type), o = u.url.replace(ho, ""), u.hasContent ? u.data && u.processData && 0 === (u.contentType || "").indexOf("application/x-www-form-urlencoded") && (u.data = u.data.replace(so, "+")) : (p = u.url.slice(o.length), u.data && (u.processData || "string" == typeof u.data) && (o += (or.test(o) ? "&" : "?") + u.data, delete u.data), !1 === u.cache && (o = o.replace(co, "$1"), p = (or.test(o) ? "&" : "?") + "_=" + bf.guid++ + p), u.url = o + p), u.ifModified && (i.lastModified[o] && e.setRequestHeader("If-Modified-Since", i.lastModified[o]), i.etag[o] && e.setRequestHeader("If-None-Match", i.etag[o])), (u.data && u.hasContent && !1 !== u.contentType || r.contentType) && e.setRequestHeader("Content-Type", u.contentType), e.setRequestHeader("Accept", u.dataTypes[0] && u.accepts[u.dataTypes[0]] ? u.accepts[u.dataTypes[0]] + ("*" !== u.dataTypes[0] ? ", " + gf + "; q=0.01" : "") : u.accepts["*"]), u.headers) e.setRequestHeader(g, u.headers[g]); if (u.beforeSend && (!1 === u.beforeSend.call(h, e, u) || s)) return e.abort(); if (ft = "abort", it.add(u.complete), e.done(u.success), e.fail(u.error), a = te(hr, u, r, e)) { if (e.readyState = 1, y && nt.trigger("ajaxSend", [e, u]), s) return e; u.async && 0 < u.timeout && (d = n.setTimeout(function () { e.abort("timeout") }, u.timeout)); try { s = !1; a.send(rt, b) } catch (t) { if (s) throw t; b(-1, t) } } else b(-1, "No Transport"); return e }, getJSON: function (n, t, r) { return i.get(n, t, r, "json") }, getScript: function (n, t) { return i.get(n, void 0, t, "script") } }), i.each(["get", "post"], function (n, t) { i[t] = function (n, r, f, e) { return u(r) && (e = e || f, f = r, r = void 0), i.ajax(i.extend({ url: n, type: t, dataType: e, data: r, success: f }, i.isPlainObject(n) && n)) } }), i.ajaxPrefilter(function (n) { for (var t in n.headers) "content-type" === t.toLowerCase() && (n.contentType = n.headers[t] || "") }), i._evalUrl = function (n, t, r) { return i.ajax({ url: n, type: "GET", dataType: "script", cache: !0, "async": !1, global: !1, converters: { "text script": function () { } }, dataFilter: function (n) { i.globalEval(n, t, r) } }) }, i.fn.extend({ wrapAll: function (n) { var t; return this[0] && (u(n) && (n = n.call(this[0])), t = i(n, this[0].ownerDocument).eq(0).clone(!0), this[0].parentNode && t.insertBefore(this[0]), t.map(function () { for (var n = this; n.firstElementChild;)n = n.firstElementChild; return n }).append(this)), this }, wrapInner: function (n) { return u(n) ? this.each(function (t) { i(this).wrapInner(n.call(this, t)) }) : this.each(function () { var t = i(this), r = t.contents(); r.length ? r.wrapAll(n) : t.append(n) }) }, wrap: function (n) { var t = u(n); return this.each(function (r) { i(this).wrapAll(t ? n.call(this, r) : n) }) }, unwrap: function (n) { return this.parent(n).not("body").each(function () { i(this).replaceWith(this.childNodes) }), this } }), i.expr.pseudos.hidden = function (n) { return !i.expr.pseudos.visible(n) }, i.expr.pseudos.visible = function (n) { return !!(n.offsetWidth || n.offsetHeight || n.getClientRects().length) }, i.ajaxSettings.xhr = function () { try { return new n.XMLHttpRequest } catch (t) { } }, ie = { 0: 200, 1223: 204 }, wt = i.ajaxSettings.xhr(), e.cors = !!wt && "withCredentials" in wt, e.ajax = wt = !!wt, i.ajaxTransport(function (t) { var i, r; if (e.cors || wt && !t.crossDomain) return { send: function (u, f) { var o, e = t.xhr(); if (e.open(t.type, t.url, t.async, t.username, t.password), t.xhrFields) for (o in t.xhrFields) e[o] = t.xhrFields[o]; for (o in t.mimeType && e.overrideMimeType && e.overrideMimeType(t.mimeType), t.crossDomain || u["X-Requested-With"] || (u["X-Requested-With"] = "XMLHttpRequest"), u) e.setRequestHeader(o, u[o]); i = function (n) { return function () { i && (i = r = e.onload = e.onerror = e.onabort = e.ontimeout = e.onreadystatechange = null, "abort" === n ? e.abort() : "error" === n ? "number" != typeof e.status ? f(0, "error") : f(e.status, e.statusText) : f(ie[e.status] || e.status, e.statusText, "text" !== (e.responseType || "text") || "string" != typeof e.responseText ? { binary: e.response } : { text: e.responseText }, e.getAllResponseHeaders())) } }; e.onload = i(); r = e.onerror = e.ontimeout = i("error"); void 0 !== e.onabort ? e.onabort = r : e.onreadystatechange = function () { 4 === e.readyState && n.setTimeout(function () { i && r() }) }; i = i("abort"); try { e.send(t.hasContent && t.data || null) } catch (u) { if (i) throw u; } }, abort: function () { i && i() } } }), i.ajaxPrefilter(function (n) { n.crossDomain && (n.contents.script = !1) }), i.ajaxSetup({ accepts: { script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript" }, contents: { script: /\b(?:java|ecma)script\b/ }, converters: { "text script": function (n) { return i.globalEval(n), n } } }), i.ajaxPrefilter("script", function (n) { void 0 === n.cache && (n.cache = !1); n.crossDomain && (n.type = "GET") }), i.ajaxTransport("script", function (n) { var r, t; if (n.crossDomain || n.scriptAttrs) return { send: function (u, e) { r = i("<script>").attr(n.scriptAttrs || {}).prop({ charset: n.scriptCharset, src: n.url }).on("load error", t = function (n) { r.remove(); t = null; n && e("error" === n.type ? 404 : 200, n.type) }); f.head.appendChild(r[0]) }, abort: function () { t && t() } } }), ar = [], vi = /(=)\?(?=&|$)|\?\?/, i.ajaxSetup({ jsonp: "callback", jsonpCallback: function () { var n = ar.pop() || i.expando + "_" + bf.guid++; return this[n] = !0, n } }), i.ajaxPrefilter("json jsonp", function (t, r, f) { var e, o, s, h = !1 !== t.jsonp && (vi.test(t.url) ? "url" : "string" == typeof t.data && 0 === (t.contentType || "").indexOf("application/x-www-form-urlencoded") && vi.test(t.data) && "data"); if (h || "jsonp" === t.dataTypes[0]) return e = t.jsonpCallback = u(t.jsonpCallback) ? t.jsonpCallback() : t.jsonpCallback, h ? t[h] = t[h].replace(vi, "$1" + e) : !1 !== t.jsonp && (t.url += (or.test(t.url) ? "&" : "?") + t.jsonp + "=" + e), t.converters["script json"] = function () { return s || i.error(e + " was not called"), s[0] }, t.dataTypes[0] = "json", o = n[e], n[e] = function () { s = arguments }, f.always(function () { void 0 === o ? i(n).removeProp(e) : n[e] = o; t[e] && (t.jsonpCallback = r.jsonpCallback, ar.push(e)); s && u(o) && o(s[0]); s = o = void 0 }), "script" }), e.createHTMLDocument = ((re = f.implementation.createHTMLDocument("").body).innerHTML = "<form><\/form><form><\/form>", 2 === re.childNodes.length), i.parseHTML = function (n, t, r) { return "string" != typeof n ? [] : ("boolean" == typeof t && (r = t, t = !1), t || (e.createHTMLDocument ? ((s = (t = f.implementation.createHTMLDocument("")).createElement("base")).href = f.location.href, t.head.appendChild(s)) : t = f), u = !r && [], (o = wi.exec(n)) ? [t.createElement(o[1])] : (o = vu([n], t, u), u && u.length && i(u).remove(), i.merge([], o.childNodes))); var s, o, u }, i.fn.load = function (n, t, r) { var f, s, h, e = this, o = n.indexOf(" "); return -1 < o && (f = tt(n.slice(o)), n = n.slice(0, o)), u(t) ? (r = t, t = void 0) : t && "object" == typeof t && (s = "POST"), 0 < e.length && i.ajax({ url: n, type: s || "GET", dataType: "html", data: t }).done(function (n) { h = arguments; e.html(f ? i("<div>").append(i.parseHTML(n)).find(f) : n) }).always(r && function (n, t) { e.each(function () { r.apply(this, h || [n.responseText, t, n]) }) }), this }, i.expr.pseudos.animated = function (n) { return i.grep(i.timers, function (t) { return n === t.elem }).length }, i.offset = { setOffset: function (n, t, r) { var v, o, s, h, e, c, l = i.css(n, "position"), a = i(n), f = {}; "static" === l && (n.style.position = "relative"); e = a.offset(); s = i.css(n, "top"); c = i.css(n, "left"); ("absolute" === l || "fixed" === l) && -1 < (s + c).indexOf("auto") ? (h = (v = a.position()).top, o = v.left) : (h = parseFloat(s) || 0, o = parseFloat(c) || 0); u(t) && (t = t.call(n, r, i.extend({}, e))); null != t.top && (f.top = t.top - e.top + h); null != t.left && (f.left = t.left - e.left + o); "using" in t ? t.using.call(n, f) : ("number" == typeof f.top && (f.top += "px"), "number" == typeof f.left && (f.left += "px"), a.css(f)) } }, i.fn.extend({ offset: function (n) { if (arguments.length) return void 0 === n ? this : this.each(function (t) { i.offset.setOffset(this, n, t) }); var r, u, t = this[0]; if (t) return t.getClientRects().length ? (r = t.getBoundingClientRect(), u = t.ownerDocument.defaultView, { top: r.top + u.pageYOffset, left: r.left + u.pageXOffset }) : { top: 0, left: 0 } }, position: function () { if (this[0]) { var n, r, u, t = this[0], f = { top: 0, left: 0 }; if ("fixed" === i.css(t, "position")) r = t.getBoundingClientRect(); else { for (r = this.offset(), u = t.ownerDocument, n = t.offsetParent || u.documentElement; n && (n === u.body || n === u.documentElement) && "static" === i.css(n, "position");)n = n.parentNode; n && n !== t && 1 === n.nodeType && ((f = i(n).offset()).top += i.css(n, "borderTopWidth", !0), f.left += i.css(n, "borderLeftWidth", !0)) } return { top: r.top - f.top - i.css(t, "marginTop", !0), left: r.left - f.left - i.css(t, "marginLeft", !0) } } }, offsetParent: function () { return this.map(function () { for (var n = this.offsetParent; n && "static" === i.css(n, "position");)n = n.offsetParent; return n || g }) } }), i.each({ scrollLeft: "pageXOffset", scrollTop: "pageYOffset" }, function (n, t) { var r = "pageYOffset" === t; i.fn[n] = function (i) { return w(this, function (n, i, u) { var f; if (rt(n) ? f = n : 9 === n.nodeType && (f = n.defaultView), void 0 === u) return f ? f[t] : n[i]; f ? f.scrollTo(r ? f.pageXOffset : u, r ? u : f.pageYOffset) : n[i] = u }, n, i, arguments.length) } }), i.each(["top", "left"], function (n, t) { i.cssHooks[t] = du(e.pixelPosition, function (n, r) { if (r) return r = ni(n, t), nr.test(r) ? i(n).position()[t] + "px" : r }) }), i.each({ Height: "height", Width: "width" }, function (n, t) { i.each({ padding: "inner" + n, content: t, "": "outer" + n }, function (r, u) { i.fn[u] = function (f, e) { var o = arguments.length && (r || "boolean" != typeof f), s = r || (!0 === f || !0 === e ? "margin" : "border"); return w(this, function (t, r, f) { var e; return rt(t) ? 0 === u.indexOf("outer") ? t["inner" + n] : t.document.documentElement["client" + n] : 9 === t.nodeType ? (e = t.documentElement, Math.max(t.body["scroll" + n], e["scroll" + n], t.body["offset" + n], e["offset" + n], e["client" + n])) : void 0 === f ? i.css(t, r, s) : i.style(t, r, f, s) }, t, o ? f : void 0, o) } }) }), i.each(["ajaxStart", "ajaxStop", "ajaxComplete", "ajaxError", "ajaxSuccess", "ajaxSend"], function (n, t) { i.fn[t] = function (n) { return this.on(t, n) } }), i.fn.extend({ bind: function (n, t, i) { return this.on(n, null, t, i) }, unbind: function (n, t) { return this.off(n, null, t) }, delegate: function (n, t, i, r) { return this.on(t, n, i, r) }, undelegate: function (n, t, i) { return 1 === arguments.length ? this.off(n, "**") : this.off(t, n || "**", i) }, hover: function (n, t) { return this.mouseenter(n).mouseleave(t || n) } }), i.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "), function (n, t) { i.fn[t] = function (n, i) { return 0 < arguments.length ? this.on(t, null, n, i) : this.trigger(t) } }), ue = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, i.proxy = function (n, t) { var r, f, e; if ("string" == typeof t && (r = n[t], t = n, n = r), u(n)) return f = k.call(arguments, 2), (e = function () { return n.apply(t || this, f.concat(k.call(arguments))) }).guid = n.guid = n.guid || i.guid++, e }, i.holdReady = function (n) { n ? i.readyWait++ : i.ready(!0) }, i.isArray = Array.isArray, i.parseJSON = JSON.parse, i.nodeName = c, i.isFunction = u, i.isWindow = rt, i.camelCase = y, i.type = ut, i.now = Date.now, i.isNumeric = function (n) { var t = i.type(n); return ("number" === t || "string" === t) && !isNaN(n - parseFloat(n)) }, i.trim = function (n) { return null == n ? "" : (n + "").replace(ue, "") }, "function" == typeof define && define.amd && define("jquery", [], function () { return i }), fe = n.jQuery, ee = n.$, i.noConflict = function (t) { return n.$ === i && (n.$ = ee), t && n.jQuery === i && (n.jQuery = fe), i }, "undefined" == typeof t && (n.jQuery = n.$ = i), i }), function (n) { typeof define == "function" && define.amd ? define(["jquery"], n) : jQuery.sammy = window.Sammy = n(jQuery) }(function (n) { var t, p = "([^/]+)", s = /:([\w\d]+)/g, c = /\?([^#]*)?$/, r = function (n) { return Array.prototype.slice.call(n) }, i = function (n) { return Object.prototype.toString.call(n) === "[object Function]" }, u = function (n) { return Object.prototype.toString.call(n) === "[object Array]" }, l = function (n) { return Object.prototype.toString.call(n) === "[object RegExp]" }, e = function (n) { return decodeURIComponent((n || "").replace(/\+/g, " ")) }, a = encodeURIComponent, v = function (n) { return String(n).replace(/&(?!\w+;)/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;") }, f = function (n) { return function () { return this.route.apply(this, [n].concat(Array.prototype.slice.call(arguments))) } }, h = {}, o = !!(window.history && history.pushState), y = []; return t = function () { var u = r(arguments), f, e; return (t.apps = t.apps || {}, u.length === 0 || u[0] && i(u[0])) ? t.apply(t, ["body"].concat(u)) : typeof (e = u.shift()) == "string" ? (f = t.apps[e] || new t.Application, f.element_selector = e, u.length > 0 && n.each(u, function (n, t) { f.use(t) }), f.element_selector != e && delete t.apps[e], t.apps[f.element_selector] = f, f) : void 0 }, t.VERSION = "0.7.6", t.addLogger = function (n) { y.push(n) }, t.log = function () { var i = r(arguments); i.unshift("[" + Date() + "]"); n.each(y, function (n, r) { r.apply(t, i) }) }, typeof console != "undefined" ? typeof window.console.log == "function" && i(window.console.log.apply) ? t.addLogger(function () { window.console.log.apply(window.console, arguments) }) : t.addLogger(function () { window.console.log(arguments) }) : typeof console != "undefined" && t.addLogger(function () { console.log.apply(console, arguments) }), n.extend(t, { makeArray: r, isFunction: i, isArray: u }), t.Object = function (t) { return n.extend(this, t || {}) }, n.extend(t.Object.prototype, { escapeHTML: v, h: v, toHash: function () { var t = {}; return n.each(this, function (n, r) { i(r) || (t[n] = r) }), t }, toHTML: function () { var t = ""; return n.each(this, function (n, r) { i(r) || (t += "<strong>" + n + "<\/strong> " + r + "<br />") }), t }, keys: function (n) { var t = []; for (var r in this) i(this[r]) && n || t.push(r); return t }, has: function (t) { return this[t] && n.trim(this[t].toString()) !== "" }, join: function () { var n = r(arguments), t = n.shift(); return n.join(t) }, log: function () { t.log.apply(t, arguments) }, toString: function (t) { var r = []; return n.each(this, function (n, u) { (!i(u) || t) && r.push('"' + n + '": ' + u.toString()) }), "Sammy.Object: {" + r.join(",") + "}" } }), t.targetIsThisWindow = function (t, i) { var u = n(t.target).closest(i), r; return u.length === 0 ? !0 : (r = u.attr("target"), !r || r === window.name || r === "_self") ? !0 : r === "_blank" ? !1 : r === "top" && window === window.top ? !0 : !1 }, t.DefaultLocationProxy = function (n, t) { this.app = n; this.is_native = !1; this.has_history = o; this._startPolling(t) }, t.DefaultLocationProxy.fullPath = function (n) { var t = n.toString().match(/^[^#]*(#.+)$/), i = t ? t[1] : ""; return [n.pathname, n.search, i].join("") }, n.extend(t.DefaultLocationProxy.prototype, { bind: function () { var u = this, r = this.app, i = t.DefaultLocationProxy; n(window).bind("hashchange." + this.app.eventNamespace(), function (n, t) { u.is_native !== !1 || t || (u.is_native = !0, window.clearInterval(i._interval), i._interval = null); r.trigger("location-changed") }); o && !r.disable_push_state && (n(window).bind("popstate." + this.app.eventNamespace(), function () { r.trigger("location-changed") }), n(document).delegate("a", "click.history-" + this.app.eventNamespace(), function (n) { if (!n.isDefaultPrevented() && !n.metaKey && !n.ctrlKey) { var f = i.fullPath(this), e = this.hostname ? this.hostname : function (n) { var t = document.createElement("a"); return t.href = n.href, t.hostname }(this); if (e == window.location.hostname && r.lookupRoute("get", f) && t.targetIsThisWindow(n, "a")) return n.preventDefault(), u.setLocation(f), !1 } })); i._bindings || (i._bindings = 0); i._bindings++ }, unbind: function () { n(window).unbind("hashchange." + this.app.eventNamespace()); n(window).unbind("popstate." + this.app.eventNamespace()); n(document).undelegate("a", "click.history-" + this.app.eventNamespace()); t.DefaultLocationProxy._bindings--; t.DefaultLocationProxy._bindings <= 0 && (window.clearInterval(t.DefaultLocationProxy._interval), t.DefaultLocationProxy._interval = null) }, getLocation: function () { return t.DefaultLocationProxy.fullPath(window.location) }, setLocation: function (n) { if (/^([^#\/]|$)/.test(n) && (n = o && !this.app.disable_push_state ? "/" + n : "#!/" + n), n != this.getLocation()) if (o && !this.app.disable_push_state && /^\//.test(n)) history.pushState({ path: n }, window.title, n), this.app.trigger("location-changed"); else return window.location = n }, _startPolling: function (i) { var u = this, r; t.DefaultLocationProxy._interval || (i || (i = 10), r = function () { var i = u.getLocation(); (typeof t.DefaultLocationProxy._last_location == "undefined" || i != t.DefaultLocationProxy._last_location) && window.setTimeout(function () { n(window).trigger("hashchange", [!0]) }, 0); t.DefaultLocationProxy._last_location = i }, r(), t.DefaultLocationProxy._interval = window.setInterval(r, i)) } }), t.Application = function (n) { var r = this; this.routes = {}; this.listeners = new t.Object({}); this.arounds = []; this.befores = []; this.namespace = (new Date).getTime() + "-" + parseInt(Math.random() * 1e3, 10); this.context_prototype = function () { t.EventContext.apply(this, arguments) }; this.context_prototype.prototype = new t.EventContext; i(n) && n.apply(this, [this]); this._location_proxy || this.setLocationProxy(new t.DefaultLocationProxy(this, this.run_interval_every)); this.debug && this.bindToAllEvents(function (n, t) { r.log(r.toString(), n.cleaned_type, t || {}) }) }, t.Application.prototype = n.extend({}, t.Object.prototype, { ROUTE_VERBS: ["get", "post", "put", "delete"], APP_EVENTS: ["run", "unload", "lookup-route", "run-route", "route-found", "event-context-before", "event-context-after", "changed", "error", "check-form-submission", "redirect", "location-changed"], _last_route: null, _location_proxy: null, _running: !1, element_selector: "body", debug: !1, raise_errors: !1, run_interval_every: 50, disable_push_state: !1, template_engine: null, toString: function () { return "Sammy.Application:" + this.element_selector }, $element: function (t) { return t ? n(this.element_selector).find(t) : n(this.element_selector) }, use: function () { var u = r(arguments), n = u.shift(), f = n || ""; try { u.unshift(this); typeof n == "string" && (f = "Sammy." + n, n = t[n]); n.apply(this, u) } catch (e) { typeof n == "undefined" ? this.error("Plugin Error: called use() but plugin (" + f.toString() + ") is not defined", e) : i(n) ? this.error("Plugin Error", e) : this.error("Plugin Error: called use() but '" + f.toString() + "' is not a function", e) } return this }, setLocationProxy: function (n) { var t = this._location_proxy; this._location_proxy = n; this.isRunning() && (t && t.unbind(), this._location_proxy.bind()) }, log: function () { t.log.apply(t, Array.prototype.concat.apply([this.element_selector], arguments)) }, route: function (t, r) { var f = this, o = [], e, h, u = Array.prototype.slice.call(arguments, 2); if (u.length === 0 && i(r) && (u = [r], r = t, t = "any"), t = t.toLowerCase(), r.constructor == String) { for (s.lastIndex = 0; (h = s.exec(r)) !== null;)o.push(h[1]); r = new RegExp(r.replace(s, p) + "$") } return n.each(u, function (n, t) { typeof t == "string" && (u[n] = f[t]) }), e = function (n) { var t = { verb: n, path: r, callback: u, param_names: o }; f.routes[n] = f.routes[n] || []; f.routes[n].push(t) }, t === "any" ? n.each(this.ROUTE_VERBS, function (n, t) { e(t) }) : e(t), this }, get: f("get"), post: f("post"), put: f("put"), del: f("delete"), any: f("any"), mapRoutes: function (t) { var i = this; return n.each(t, function (n, t) { i.route.apply(i, t) }), this }, eventNamespace: function () { return ["sammy-app", this.namespace].join("-") }, bind: function (n, t, i) { var r = this, u; return typeof i == "undefined" && (i = t), u = function () { var t, u, n; t = arguments[0]; n = arguments[1]; n && n.context ? (u = n.context, delete n.context) : u = new r.context_prototype(r, "bind", t.type, n, t.target); t.cleaned_type = t.type.replace(r.eventNamespace(), ""); i.apply(u, [t, n]) }, this.listeners[n] || (this.listeners[n] = []), this.listeners[n].push(u), this.isRunning() && this._listen(n, u), this }, trigger: function (n, t) { return this.$element().trigger([n, this.eventNamespace()].join("."), [t]), this }, refresh: function () { return this.last_location = null, this.trigger("location-changed"), this }, before: function (n, t) { return i(n) && (t = n, n = {}), this.befores.push([n, t]), this }, after: function (n) { return this.bind("event-context-after", n) }, around: function (n) { return this.arounds.push(n), this }, onComplete: function (n) { return this._onComplete = n, this }, isRunning: function () { return this._running }, helpers: function (t) { return n.extend(this.context_prototype.prototype, t), this }, helper: function (n, t) { return this.context_prototype.prototype[n] = t, this }, run: function (i) { if (this.isRunning()) return !1; var r = this; return n.each(this.listeners.toHash(), function (t, i) { n.each(i, function (n, i) { r._listen(t, i) }) }), this.trigger("run", { start_url: i }), this._running = !0, this.last_location = null, /\#(.+)/.test(this.getLocation()) || typeof i == "undefined" || this.setLocation(i), this._checkLocation(), this._location_proxy.bind(), this.bind("location-changed", function () { r._checkLocation() }), this.bind("submit", function (i) { if (!t.targetIsThisWindow(i, "form")) return !0; var u = r._checkFormSubmission(n(i.target).closest("form")); return u === !1 ? i.preventDefault() : !1 }), n(window).bind("unload", function () { r.unload() }), this.trigger("changed") }, unload: function () { if (!this.isRunning()) return !1; var t = this; return this.trigger("unload"), this._location_proxy.unbind(), this.$element().unbind("submit").removeClass(t.eventNamespace()), n.each(this.listeners.toHash(), function (i, r) { n.each(r, function (n, r) { t._unlisten(i, r) }) }), this._running = !1, this }, destroy: function () { return this.unload(), delete t.apps[this.element_selector], this }, bindToAllEvents: function (t) { var i = this; return n.each(this.APP_EVENTS, function (n, r) { i.bind(r, t) }), n.each(this.listeners.keys(!0), function (r, u) { n.inArray(u, i.APP_EVENTS) == -1 && i.bind(u, t) }), this }, routablePath: function (n) { return n.replace(c, "") }, lookupRoute: function (n, t) { var e = this, u = !1, i = 0, f, r; if (typeof this.routes[n] != "undefined") for (f = this.routes[n].length; i < f; i++)if (r = this.routes[n][i], e.routablePath(t).match(r.path)) { u = r; break } return u }, runRoute: function (t, i, r, u) { var s = this, f = this.lookupRoute(t, i), o, c, y, l, a, h, v, p; if (this.debug && this.log("runRoute", [t, i].join(" ")), this.trigger("run-route", { verb: t, path: i, params: r }), typeof r == "undefined" && (r = {}), n.extend(r, this._parseQueryString(i)), f) { this.trigger("route-found", { route: f }); (v = f.path.exec(this.routablePath(i))) !== null && (v.shift(), n.each(v, function (n, t) { f.param_names[n] ? r[f.param_names[n]] = e(t) : (r.splat || (r.splat = []), r.splat.push(e(t))) })); o = new this.context_prototype(this, t, i, r, u); y = this.arounds.slice(0); l = this.befores.slice(0); h = [o]; r.splat && (h = h.concat(r.splat)); c = function () { for (var n, t, i; l.length > 0;)if (a = l.shift(), s.contextMatchesOptions(o, a[0]) && (n = a[1].apply(o, [o]), n === !1)) return !1; return s.last_route = f, o.trigger("event-context-before", { context: o }), typeof f.callback == "function" && (f.callback = [f.callback]), f.callback && f.callback.length && (t = -1, i = function () { t++; f.callback[t] ? n = f.callback[t].apply(o, h) : s._onComplete && typeof (s._onComplete === "function") && s._onComplete(o) }, h.push(i), i()), o.trigger("event-context-after", { context: o }), n }; n.each(y.reverse(), function (n, t) { var i = c; c = function () { return t.apply(o, [i]) } }); try { p = c() } catch (w) { this.error(["500 Error", t, i].join(" "), w) } return p } return this.notFound(t, i) }, contextMatchesOptions: function (t, i, r) { var f = i, h, e, a, v, c, o, s; if ((typeof f == "string" || l(f)) && (f = { path: f }), typeof r == "undefined" && (r = !0), n.isEmptyObject(f)) return !0; if (u(f.path)) { for (h = [], e = 0, v = f.path.length; e < v; e += 1)a = n.extend({}, f, { path: f.path[e] }), h.push(this.contextMatchesOptions(t, a)); return c = n.inArray(!0, h) > -1 ? !0 : !1, r ? c : !c } return f.only ? this.contextMatchesOptions(t, f.only, !0) : f.except ? this.contextMatchesOptions(t, f.except, !1) : (o = !0, s = !0, f.path && (l(f.path) || (f.path = new RegExp(f.path.toString() + "$")), o = f.path.test(t.path)), f.verb && (s = typeof f.verb == "string" ? f.verb === t.verb : f.verb.indexOf(t.verb) > -1), r ? s && o : !(s && o)) }, getLocation: function () { return this._location_proxy.getLocation() }, setLocation: function (n) { return this._location_proxy.setLocation(n) }, swap: function (n, t) { var r = this.$element().html(n); return i(t) && t(n), r }, templateCache: function (n, t) { return typeof t != "undefined" ? h[n] = t : h[n] }, clearTemplateCache: function () { return h = {} }, notFound: function (n, t) { var i = this.error(["404 Not Found", n, t].join(" ")); return n === "get" ? i : !0 }, error: function (n, t) { if (t || (t = new Error), t.message = [n, t.message].join(" "), this.trigger("error", { message: t.message, error: t }), this.raise_errors) throw t; else this.log(t.message, t) }, _checkLocation: function () { var n, t; return n = this.getLocation(), this.last_location && this.last_location[0] == "get" && this.last_location[1] == n || (this.last_location = ["get", n], t = this.runRoute("get", n)), t }, _getFormVerb: function (t) { var u = n(t), i, r; return r = u.find('input[name="_method"]'), r.length > 0 && (i = r.val()), i || (i = u[0].getAttribute("method")), i && i !== "" || (i = "get"), n.trim(i.toString().toLowerCase()) }, _checkFormSubmission: function (t) { var i, r, f, u, e; return this.trigger("check-form-submission", { form: t }), i = n(t), r = i.attr("action") || "", f = this._getFormVerb(i), this.debug && this.log("_checkFormSubmission", i, r, f), f === "get" ? (u = this._serializeFormParams(i), u !== "" && (r += "?" + u), this.setLocation(r), e = !1) : (u = n.extend({}, this._parseFormParams(i)), e = this.runRoute(f, r, u, t.get(0))), typeof e == "undefined" ? !1 : e }, _serializeFormParams: function (n) { var r = "", t = n.serializeArray(), i; if (t.length > 0) for (r = this._encodeFormPair(t[0].name, t[0].value), i = 1; i < t.length; i++)r = r + "&" + this._encodeFormPair(t[i].name, t[i].value); return r }, _encodeFormPair: function (n, t) { return a(n) + "=" + a(t) }, _parseFormParams: function (n) { for (var i = {}, r = n.serializeArray(), t = 0; t < r.length; t++)i = this._parseParamPair(i, r[t].name, r[t].value); return i }, _parseQueryString: function (n) { var r = {}, t, u, f, i; if (t = n.match(c), t && t[1]) for (u = t[1].split("&"), i = 0; i < u.length; i++)f = u[i].split("="), r = this._parseParamPair(r, e(f[0]), e(f[1] || "")); return r }, _parseParamPair: function (n, t, i) { return typeof n[t] != "undefined" ? u(n[t]) ? n[t].push(i) : n[t] = [n[t], i] : n[t] = i, n }, _listen: function (n, t) { return this.$element().bind([n, this.eventNamespace()].join("."), t) }, _unlisten: function (n, t) { return this.$element().unbind([n, this.eventNamespace()].join("."), t) } }), t.RenderContext = function (n) { this.event_context = n; this.callbacks = []; this.previous_content = null; this.content = null; this.next_engine = !1; this.waiting = !1 }, t.RenderContext.prototype = n.extend({}, t.Object.prototype, { then: function (n) { var r, t; if (!i(n)) if (typeof n == "string" && n in this.event_context) r = this.event_context[n], n = function (n) { return r.apply(this.event_context, [n]) }; else return this; return t = this, this.waiting ? this.callbacks.push(n) : (this.wait(), window.setTimeout(function () { var i = n.apply(t, [t.content, t.previous_content]); i !== !1 && t.next(i) }, 0)), this }, wait: function () { this.waiting = !0 }, next: function (n) { this.waiting = !1; typeof n != "undefined" && (this.previous_content = this.content, this.content = n); this.callbacks.length > 0 && this.then(this.callbacks.shift()) }, load: function (t, r, u) { var f = this; return this.then(function () { var e, s, o; return (i(r) ? (u = r, r = {}) : r = n.extend({}, r), u && this.then(u), typeof t == "string") ? (o = t.match(/\.json(\?|$)/) || r.json, e = o ? r.cache === !0 : r.cache !== !1, f.next_engine = f.event_context.engineFor(t), delete r.cache, delete r.json, r.engine && (f.next_engine = r.engine, delete r.engine), e && (s = this.event_context.app.templateCache(t))) ? s : (this.wait(), n.ajax(n.extend({ url: t, data: {}, dataType: o ? "json" : "text", type: "get", success: function (n) { e && f.event_context.app.templateCache(t, n); f.next(n) } }, r)), !1) : t.nodeType ? t.innerHTML : t.selector ? (f.next_engine = t.attr("data-engine"), r.clone === !1 ? t.remove()[0].innerHTML.toString() : t[0].innerHTML.toString()) : void 0 }) }, loadPartials: function (n) { var t; if (n) { this.partials = this.partials || {}; for (t in n) (function (t, i) { t.load(n[i]).then(function (n) { this.partials[i] = n }) })(this, t) } return this }, render: function (n, t, r, u) { return i(n) && !t ? this.then(n) : (i(t) ? (u = r, r = t, t = null) : r && !i(r) && (u = r, r = null), this.loadPartials(u).load(n).interpolate(t, n).then(r)) }, partial: function (n, t, r, u) { return i(r) ? this.render(n, t, u).swap(r) : i(t) ? this.render(n, {}, r).swap(t) : this.render(n, t, r).swap() }, send: function () { var t = this, n = r(arguments), i = n.shift(); return u(n[0]) && (n = n[0]), this.then(function () { return n.push(function (n) { t.next(n) }), t.wait(), i.apply(i, n), !1 }) }, collect: function (t, r, u) { var e = this, f = function () { i(t) && (r = t, t = this.content); var u = [], f = !1; return n.each(t, function (n, t) { var i = r.apply(e, [n, t]); return i.jquery && i.length == 1 && (i = i[0], f = !0), u.push(i), i }), f ? u : u.join("") }; return u ? f() : this.then(f) }, renderEach: function (t, i, r, f) { return u(i) && (f = r, r = i, i = null), this.load(t).then(function (e) { var o = this; if (r || (r = u(this.previous_content) ? this.previous_content : []), f) n.each(r, function (n, r) { var u = {}, s = this.next_engine || t; i ? u[i] = r : u = r; f(r, o.event_context.interpolate(e, u, s)) }); else return this.collect(r, function (n, r) { var u = {}, f = this.next_engine || t; return i ? u[i] = r : u = r, this.event_context.interpolate(e, u, f) }, !0) }) }, interpolate: function (n, t, i) { var r = this; return this.then(function (u, f) { !n && f && (n = f); this.next_engine && (t = this.next_engine, this.next_engine = !1); var e = r.event_context.interpolate(u, n, t, this.partials); return i ? f + e : e }) }, swap: function (n) { return this.then(function (t) { return this.event_context.swap(t, n), t }).trigger("changed", {}) }, appendTo: function (t) { return this.then(function (i) { n(t).append(i) }).trigger("changed", {}) }, prependTo: function (t) { return this.then(function (i) { n(t).prepend(i) }).trigger("changed", {}) }, replace: function (t) { return this.then(function (i) { n(t).html(i) }).trigger("changed", {}) }, trigger: function (n, t) { return this.then(function (i) { return typeof t == "undefined" && (t = { content: i }), this.event_context.trigger(n, t), i }) } }), t.EventContext = function (n, i, r, u, f) { this.app = n; this.verb = i; this.path = r; this.params = new t.Object(u); this.target = f }, t.EventContext.prototype = n.extend({}, t.Object.prototype, { $element: function () { return this.app.$element(r(arguments).shift()) }, engineFor: function (n) { var t = this, r; return i(n) ? n : (n = (n || t.app.template_engine).toString(), (r = n.match(/\.([^\.\?\#]+)(\?|$)/)) && (n = r[1]), n && i(t[n])) ? t[n] : t.app.template_engine ? this.engineFor(t.app.template_engine) : function (n) { return n } }, interpolate: function (n, t, i, r) { return this.engineFor(i).apply(this, [n, t, r]) }, render: function (n, i, r, u) { return new t.RenderContext(this).render(n, i, r, u) }, renderEach: function (n, i, r, u) { return new t.RenderContext(this).renderEach(n, i, r, u) }, load: function (n, i, r) { return new t.RenderContext(this).load(n, i, r) }, loadPartials: function (n) { return new t.RenderContext(this).loadPartials(n) }, partial: function (n, i, r, u) { return new t.RenderContext(this).partial(n, i, r, u) }, send: function () { var n = new t.RenderContext(this); return n.send.apply(n, arguments) }, redirect: function () { var t, i = r(arguments), l = this.app.getLocation(), o = i.length, e; if (o > 1) { for (var u = 0, s = [], h = [], f = {}, c = !1; u < o; u++)typeof i[u] == "string" ? s.push(i[u]) : (n.extend(f, i[u]), c = !0); if (t = s.join("/"), c) { for (e in f) h.push(this.app._encodeFormPair(e, f[e])); t += "?" + h.join("&") } } else t = i[0]; this.trigger("redirect", { to: t }); this.app.last_location = [this.verb, this.path]; this.app.setLocation(t); new RegExp(t).test(l) && this.app.trigger("location-changed") }, trigger: function (n, t) { return typeof t == "undefined" && (t = {}), t.context || (t.context = this), this.app.trigger(n, t) }, eventNamespace: function () { return this.app.eventNamespace() }, swap: function (n, t) { return this.app.swap(n, t) }, notFound: function () { return this.app.notFound(this.verb, this.path) }, json: function (t) { return n.parseJSON(t) }, toString: function () { return "Sammy.EventContext: " + [this.verb, this.path, this.params].join(" ") } }), t }); "function" != typeof Object.create && (Object.create = function (n) { function t() { } return t.prototype = n, new t }), function (n, t) { "use strict"; var i = { _positionClasses: ["bottom-left", "bottom-right", "top-right", "top-left", "bottom-center", "top-center", "mid-center"], _defaultIcons: ["success", "error", "info", "warning"], init: function (t) { this.prepareOptions(t, n.toast.options); this.process() }, prepareOptions: function (t, i) { var r = {}; "string" == typeof t || t instanceof Array ? r.text = t : r = t; this.options = n.extend({}, i, r) }, process: function () { this.setup(); this.addToDom(); this.position(); this.bindToast(); this.animate() }, setup: function () { var t = "", i; if (this._toastEl = this._toastEl || n("<div><\/div>", { "class": "jq-toast-single shadow" }), t += '<span class="jq-toast-loader"><\/span>', this.options.allowToastClose && (t += '<span class="close-jq-toast-single text-danger">&times;<\/span>'), this.options.text instanceof Array) { for (this.options.heading && (t += '<div class="d-flex list-inline"><div><i class="la la-check-circle text-success font-30"><\/i> <\/div><div class=""><h2 class="jq-toast-heading text-success">' + this.options.heading + "<\/h2> <\/div><\/div>"), t += '<ul class="jq-toast-ul">', i = 0; i < this.options.text.length; i++)t += '<li class="jq-toast-li" id="jq-toast-item-' + i + '">' + this.options.text[i] + "<\/li>"; t += "<\/ul>" } else this.options.heading && (t += '<div class="d-flex list-inline"><div class="mr-4"><i class="la la-check-circle text-success font-40"><\/i> <\/div><div><h3 class="jq-toast-heading text-success">' + this.options.heading + '<\/h3> <h3 class="font-14 font-weight-400 mt-1"> ' + this.options.text + " <h3> <\/div><\/div>"); this._toastEl.html(t); this.options.bgColor !== !1 && this._toastEl.css("background-color", this.options.bgColor); this.options.textColor !== !1 && this._toastEl.css("color", this.options.textColor); this.options.textAlign && this._toastEl.css("text-align", this.options.textAlign); this.options.icon !== !1 && (this._toastEl.addClass("jq-has-icon"), -1 !== n.inArray(this.options.icon, this._defaultIcons) && this._toastEl.addClass("jq-icon-" + this.options.icon)); this.options["class"] !== !1 && this._toastEl.addClass(this.options["class"]) }, position: function () { "string" == typeof this.options.position && -1 !== n.inArray(this.options.position, this._positionClasses) ? "bottom-center" === this.options.position ? this._container.css({ left: n(t).outerWidth() / 2 - this._container.outerWidth() / 2, bottom: 20 }) : "top-center" === this.options.position ? this._container.css({ left: n(t).outerWidth() / 2 - this._container.outerWidth() / 2, top: 20 }) : "mid-center" === this.options.position ? this._container.css({ left: n(t).outerWidth() / 2 - this._container.outerWidth() / 2, top: n(t).outerHeight() / 2 - this._container.outerHeight() / 2 }) : this._container.addClass(this.options.position) : "object" == typeof this.options.position ? this._container.css({ top: this.options.position.top ? this.options.position.top : "auto", bottom: this.options.position.bottom ? this.options.position.bottom : "auto", left: this.options.position.left ? this.options.position.left : "auto", right: this.options.position.right ? this.options.position.right : "auto" }) : this._container.addClass("bottom-left") }, bindToast: function () { var n = this; this._toastEl.on("afterShown", function () { n.processLoader() }); this._toastEl.find(".close-jq-toast-single").on("click", function (t) { t.preventDefault(); "fade" === n.options.showHideTransition ? (n._toastEl.trigger("beforeHide"), n._toastEl.fadeOut(function () { n._toastEl.trigger("afterHidden") })) : "slide" === n.options.showHideTransition ? (n._toastEl.trigger("beforeHide"), n._toastEl.slideUp(function () { n._toastEl.trigger("afterHidden") })) : (n._toastEl.trigger("beforeHide"), n._toastEl.hide(function () { n._toastEl.trigger("afterHidden") })) }); "function" == typeof this.options.beforeShow && this._toastEl.on("beforeShow", function () { n.options.beforeShow() }); "function" == typeof this.options.afterShown && this._toastEl.on("afterShown", function () { n.options.afterShown() }); "function" == typeof this.options.beforeHide && this._toastEl.on("beforeHide", function () { n.options.beforeHide() }); "function" == typeof this.options.afterHidden && this._toastEl.on("afterHidden", function () { n.options.afterHidden() }) }, addToDom: function () { var t = n(".jq-toast-wrap"), r, i; (0 === t.length ? (t = n("<div><\/div>", { "class": "jq-toast-wrap" }), n("body").append(t)) : (!this.options.stack || isNaN(parseInt(this.options.stack, 10))) && t.empty(), t.find(".jq-toast-single:hidden").remove(), t.append(this._toastEl), this.options.stack && !isNaN(parseInt(this.options.stack), 10)) && (r = t.find(".jq-toast-single").length, i = r - this.options.stack, i > 0 && n(".jq-toast-wrap").find(".jq-toast-single").slice(0, i).remove()); this._container = t }, canAutoHide: function () { return this.options.hideAfter !== !1 && !isNaN(parseInt(this.options.hideAfter, 10)) }, processLoader: function () { if (!this.canAutoHide() || this.options.loader === !1) return !1; var i = this._toastEl.find(".jq-toast-loader"), t = (this.options.hideAfter - 400) / 1e3 + "s", r = this.options.loaderBg, n = i.attr("style") || ""; n = n.substring(0, n.indexOf("-webkit-transition")); n += "-webkit-transition: width " + t + " ease-in; -o-transition: width " + t + " ease-in; transition: width " + t + " ease-in; background-color: " + r + ";"; i.attr("style", n).addClass("jq-toast-loaded") }, animate: function () { var n = this; (this._toastEl.hide(), this._toastEl.trigger("beforeShow"), "fade" === this.options.showHideTransition.toLowerCase() ? this._toastEl.fadeIn(function () { n._toastEl.trigger("afterShown") }) : "slide" === this.options.showHideTransition.toLowerCase() ? this._toastEl.slideDown(function () { n._toastEl.trigger("afterShown") }) : this._toastEl.show(function () { n._toastEl.trigger("afterShown") }), this.canAutoHide()) && (n = this, t.setTimeout(function () { "fade" === n.options.showHideTransition.toLowerCase() ? (n._toastEl.trigger("beforeHide"), n._toastEl.fadeOut(function () { n._toastEl.trigger("afterHidden") })) : "slide" === n.options.showHideTransition.toLowerCase() ? (n._toastEl.trigger("beforeHide"), n._toastEl.slideUp(function () { n._toastEl.trigger("afterHidden") })) : (n._toastEl.trigger("beforeHide"), n._toastEl.hide(function () { n._toastEl.trigger("afterHidden") })) }, this.options.hideAfter)) }, reset: function (t) { "all" === t ? n(".jq-toast-wrap").remove() : this._toastEl.remove() }, update: function (n) { this.prepareOptions(n, this.options); this.setup(); this.bindToast() } }; n.toast = function (n) { var t = Object.create(i); return t.init(n, this), { reset: function (n) { t.reset(n) }, update: function (n) { t.update(n) } } }; n.toast.options = { text: "", heading: "", showHideTransition: "fade", allowToastClose: !0, hideAfter: 3e3, loader: !0, loaderBg: "#75FFA3", stack: 5, position: "bottom-left", bgColor: !1, textColor: !1, textAlign: "left", icon: !1, beforeShow: function () { }, afterShown: function () { }, beforeHide: function () { }, afterHidden: function () { } } }(jQuery, window, document);
  3. /**!
  4. * @fileOverview Kickass library to create and place poppers near their reference elements.
  5. * @version 1.16.1
  6. * @license
  7. * Copyright (c) 2016 Federico Zivolo and contributors
  8. *
  9. * Permission is hereby granted, free of charge, to any person obtaining a copy
  10. * of this software and associated documentation files (the "Software"), to deal
  11. * in the Software without restriction, including without limitation the rights
  12. * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  13. * copies of the Software, and to permit persons to whom the Software is
  14. * furnished to do so, subject to the following conditions:
  15. *
  16. * The above copyright notice and this permission notice shall be included in all
  17. * copies or substantial portions of the Software.
  18. *
  19. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  20. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  21. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  22. * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  23. * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  24. * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  25. * SOFTWARE.
  26. */
  27. (function (n, t) { typeof exports == "object" && typeof module != "undefined" ? module.exports = t() : typeof define == "function" && define.amd ? define(t) : n.Popper = t() })(this, function () { "use strict"; function ii(n) { var t = !1; return function () { t || (t = !0, window.Promise.resolve().then(function () { t = !1; n() })) } } function ri(n) { var t = !1; return function () { t || (t = !0, setTimeout(function () { t = !1; n() }, ti)) } } function it(n) { return n && {}.toString.call(n) === "[object Function]" } function i(n, t) { if (n.nodeType !== 1) return []; var r = n.ownerDocument.defaultView, i = r.getComputedStyle(n, null); return t ? i[t] : i } function v(n) { return n.nodeName === "HTML" ? n : n.parentNode || n.host } function s(n) { if (!n) return document.body; switch (n.nodeName) { case "HTML": case "BODY": return n.ownerDocument.body; case "#document": return n.body }var t = i(n), r = t.overflow, u = t.overflowX, f = t.overflowY; return /(auto|scroll|overlay)/.test(r + f + u) ? n : s(v(n)) } function rt(n) { return n && n.referenceNode ? n.referenceNode : n } function r(n) { return n === 11 ? ut : n === 10 ? ft : ut || ft } function u(n) { var e, t, f; if (!n) return document.documentElement; for (e = r(10) ? document.body : null, t = n.offsetParent || null; t === e && n.nextElementSibling;)t = (n = n.nextElementSibling).offsetParent; return (f = t && t.nodeName, !f || f === "BODY" || f === "HTML") ? n ? n.ownerDocument.documentElement : document.documentElement : ["TH", "TD", "TABLE"].indexOf(t.nodeName) !== -1 && i(t, "position") === "static" ? u(t) : t } function ei(n) { var t = n.nodeName; return t === "BODY" ? !1 : t === "HTML" || u(n.firstElementChild) === n } function y(n) { return n.parentNode !== null ? y(n.parentNode) : n } function c(n, t) { var i, f; if (!n || !n.nodeType || !t || !t.nodeType) return document.documentElement; var e = n.compareDocumentPosition(t) & Node.DOCUMENT_POSITION_FOLLOWING, o = e ? n : t, s = e ? t : n, r = document.createRange(); return (r.setStart(o, 0), r.setEnd(s, 0), i = r.commonAncestorContainer, n !== i && t !== i || o.contains(s)) ? ei(i) ? i : u(i) : (f = y(n), f.host ? c(f.host, t) : c(n, y(t).host)) } function f(n) { var f = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "top", t = f === "top" ? "scrollTop" : "scrollLeft", i = n.nodeName, r, u; return i === "BODY" || i === "HTML" ? (r = n.ownerDocument.documentElement, u = n.ownerDocument.scrollingElement || r, u[t]) : n[t] } function oi(n, t) { var e = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : !1, r = f(t, "top"), u = f(t, "left"), i = e ? -1 : 1; return n.top += r * i, n.bottom += r * i, n.left += u * i, n.right += u * i, n } function et(n, t) { var i = t === "x" ? "Left" : "Top", r = i === "Left" ? "Right" : "Bottom"; return parseFloat(n["border" + i + "Width"]) + parseFloat(n["border" + r + "Width"]) } function ot(n, t, i, u) { return Math.max(t["offset" + n], t["scroll" + n], i["client" + n], i["offset" + n], i["scroll" + n], r(10) ? parseInt(i["offset" + n]) + parseInt(u["margin" + (n === "Height" ? "Top" : "Left")]) + parseInt(u["margin" + (n === "Height" ? "Bottom" : "Right")]) : 0) } function st(n) { var i = n.body, t = n.documentElement, u = r(10) && getComputedStyle(t); return { height: ot("Height", i, t, u), width: ot("Width", i, t, u) } } function t(t) { return n({}, t, { right: t.left + t.width, bottom: t.top + t.height }) } function p(n) { var u = {}, o, s, l; try { r(10) ? (u = n.getBoundingClientRect(), o = f(n, "top"), s = f(n, "left"), u.top += o, u.left += s, u.bottom += o, u.right += s) : u = n.getBoundingClientRect() } catch (p) { } var e = { left: u.left, top: u.top, width: u.right - u.left, height: u.bottom - u.top }, a = n.nodeName === "HTML" ? st(n.ownerDocument) : {}, v = a.width || n.clientWidth || e.width, y = a.height || n.clientHeight || e.height, h = n.offsetWidth - v, c = n.offsetHeight - y; return (h || c) && (l = i(n), h -= et(l, "x"), c -= et(l, "y"), e.width -= h, e.height -= c), t(e) } function w(n, u) { var w = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : !1, b = r(10), k = u.nodeName === "HTML", o = p(n), e = p(u), a = s(n), h = i(u), v = parseFloat(h.borderTopWidth), y = parseFloat(h.borderLeftWidth), f, c, l; return w && k && (e.top = Math.max(e.top, 0), e.left = Math.max(e.left, 0)), f = t({ top: o.top - e.top - v, left: o.left - e.left - y, width: o.width, height: o.height }), f.marginTop = 0, f.marginLeft = 0, !b && k && (c = parseFloat(h.marginTop), l = parseFloat(h.marginLeft), f.top -= v - c, f.bottom -= v - c, f.left -= y - l, f.right -= y - l, f.marginTop = c, f.marginLeft = l), (b && !w ? u.contains(a) : u === a && a.nodeName !== "BODY") && (f = oi(f, u)), f } function ci(n) { var u = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1, i = n.ownerDocument.documentElement, r = w(n, i), e = Math.max(i.clientWidth, window.innerWidth || 0), o = Math.max(i.clientHeight, window.innerHeight || 0), s = u ? 0 : f(i), h = u ? 0 : f(i, "left"), c = { top: s - r.top + r.marginTop, left: h - r.left + r.marginLeft, width: e, height: o }; return t(c) } function ht(n) { var r = n.nodeName, t; return r === "BODY" || r === "HTML" ? !1 : i(n, "position") === "fixed" ? !0 : (t = v(n), !t) ? !1 : ht(t) } function ct(n) { if (!n || !n.parentElement || r()) return document.documentElement; for (var t = n.parentElement; t && i(t, "transform") === "none";)t = t.parentElement; return t || document.documentElement } function b(n, t, i, r) { var h = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : !1, u = { top: 0, left: 0 }, l = h ? ct(n) : c(n, rt(t)), e, f, o; if (r === "viewport") u = ci(l, h); else if (e = void 0, r === "scrollParent" ? (e = s(v(t)), e.nodeName === "BODY" && (e = n.ownerDocument.documentElement)) : e = r === "window" ? n.ownerDocument.documentElement : r, f = w(e, l, h), e.nodeName !== "HTML" || ht(l)) u = f; else { var a = st(n.ownerDocument), y = a.height, p = a.width; u.top += f.top - f.marginTop; u.bottom = y + f.top; u.left += f.left - f.marginLeft; u.right = p + f.left } return i = i || 0, o = typeof i == "number", u.left += o ? i : i.left || 0, u.top += o ? i : i.top || 0, u.right -= o ? i : i.right || 0, u.bottom -= o ? i : i.bottom || 0, u } function li(n) { var t = n.width, i = n.height; return t * i } function lt(t, i, r, u, f) { var l = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 0; if (t.indexOf("auto") === -1) return t; var e = b(r, u, l, f), o = { top: { width: e.width, height: i.top - e.top }, right: { width: e.right - i.right, height: e.height }, bottom: { width: e.width, height: e.bottom - i.bottom }, left: { width: i.left - e.left, height: e.height } }, s = Object.keys(o).map(function (t) { return n({ key: t }, o[t], { area: li(o[t]) }) }).sort(function (n, t) { return t.area - n.area }), h = s.filter(function (n) { var t = n.width, i = n.height; return t >= r.clientWidth && i >= r.clientHeight }), a = h.length > 0 ? h[0].key : s[0].key, c = t.split("-")[1]; return a + (c ? "-" + c : "") } function at(n, t, i) { var r = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null, u = r ? ct(t) : c(t, rt(i)); return w(i, u, r) } function vt(n) { var i = n.ownerDocument.defaultView, t = i.getComputedStyle(n), r = parseFloat(t.marginTop || 0) + parseFloat(t.marginBottom || 0), u = parseFloat(t.marginLeft || 0) + parseFloat(t.marginRight || 0); return { width: n.offsetWidth + u, height: n.offsetHeight + r } } function l(n) { var t = { left: "right", right: "left", bottom: "top", top: "bottom" }; return n.replace(/left|right|bottom|top/g, function (n) { return t[n] }) } function yt(n, t, i) { i = i.split("-")[0]; var r = vt(n), e = { width: r.width, height: r.height }, u = ["right", "left"].indexOf(i) !== -1, o = u ? "top" : "left", f = u ? "left" : "top", s = u ? "height" : "width", h = u ? "width" : "height"; return e[o] = t[o] + t[s] / 2 - r[s] / 2, e[f] = i === f ? t[f] - r[h] : t[l(f)], e } function h(n, t) { return Array.prototype.find ? n.find(t) : n.filter(t)[0] } function ai(n, t, i) { if (Array.prototype.findIndex) return n.findIndex(function (n) { return n[t] === i }); var r = h(n, function (n) { return n[t] === i }); return n.indexOf(r) } function pt(n, i, r) { var u = r === undefined ? n : n.slice(0, ai(n, "name", r)); return u.forEach(function (n) { n["function"] && console.warn("`modifier.function` is deprecated, use `modifier.fn`!"); var r = n["function"] || n.fn; n.enabled && it(r) && (i.offsets.popper = t(i.offsets.popper), i.offsets.reference = t(i.offsets.reference), i = r(i, n)) }), i } function vi() { if (!this.state.isDestroyed) { var n = { instance: this, styles: {}, arrowStyles: {}, attributes: {}, flipped: !1, offsets: {} }; if (n.offsets.reference = at(this.state, this.popper, this.reference, this.options.positionFixed), n.placement = lt(this.options.placement, n.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding), n.originalPlacement = n.placement, n.positionFixed = this.options.positionFixed, n.offsets.popper = yt(this.popper, n.offsets.reference, n.placement), n.offsets.popper.position = this.options.positionFixed ? "fixed" : "absolute", n = pt(this.modifiers, n), this.state.isCreated) this.options.onUpdate(n); else { this.state.isCreated = !0; this.options.onCreate(n) } } } function wt(n, t) { return n.some(function (n) { var i = n.name, r = n.enabled; return r && i === t }) } function k(n) { for (var i, r, u = [!1, "ms", "Webkit", "Moz", "O"], f = n.charAt(0).toUpperCase() + n.slice(1), t = 0; t < u.length; t++)if (i = u[t], r = i ? "" + i + f : n, typeof document.body.style[r] != "undefined") return r; return null } function yi() { return this.state.isDestroyed = !0, wt(this.modifiers, "applyStyle") && (this.popper.removeAttribute("x-placement"), this.popper.style.position = "", this.popper.style.top = "", this.popper.style.left = "", this.popper.style.right = "", this.popper.style.bottom = "", this.popper.style.willChange = "", this.popper.style[k("transform")] = ""), this.disableEventListeners(), this.options.removeOnDestroy && this.popper.parentNode.removeChild(this.popper), this } function bt(n) { var t = n.ownerDocument; return t ? t.defaultView : window } function kt(n, t, i, r) { var f = n.nodeName === "BODY", u = f ? n.ownerDocument.defaultView : n; u.addEventListener(t, i, { passive: !0 }); f || kt(s(u.parentNode), t, i, r); r.push(u) } function pi(n, t, i, r) { i.updateBound = r; bt(n).addEventListener("resize", i.updateBound, { passive: !0 }); var u = s(n); return kt(u, "scroll", i.updateBound, i.scrollParents), i.scrollElement = u, i.eventsEnabled = !0, i } function wi() { this.state.eventsEnabled || (this.state = pi(this.reference, this.options, this.state, this.scheduleUpdate)) } function bi(n, t) { return bt(n).removeEventListener("resize", t.updateBound), t.scrollParents.forEach(function (n) { n.removeEventListener("scroll", t.updateBound) }), t.updateBound = null, t.scrollParents = [], t.scrollElement = null, t.eventsEnabled = !1, t } function ki() { this.state.eventsEnabled && (cancelAnimationFrame(this.scheduleUpdate), this.state = bi(this.reference, this.state)) } function d(n) { return n !== "" && !isNaN(parseFloat(n)) && isFinite(n) } function g(n, t) { Object.keys(t).forEach(function (i) { var r = "";["width", "height", "top", "right", "bottom", "left"].indexOf(i) !== -1 && d(t[i]) && (r = "px"); n.style[i] = t[i] + r }) } function di(n, t) { Object.keys(t).forEach(function (i) { var r = t[i]; r !== !1 ? n.setAttribute(i, t[i]) : n.removeAttribute(i) }) } function gi(n) { return g(n.instance.popper, n.styles), di(n.instance.popper, n.attributes), n.arrowElement && Object.keys(n.arrowStyles).length && g(n.arrowElement, n.arrowStyles), n } function nr(n, t, i, r, u) { var f = at(u, t, n, i.positionFixed), e = lt(i.placement, f, t, n, i.modifiers.flip.boundariesElement, i.modifiers.flip.padding); return t.setAttribute("x-placement", e), g(t, { position: i.positionFixed ? "fixed" : "absolute" }), i } function tr(n, t) { var u = n.offsets, i = u.popper, l = u.reference, r = Math.round, a = Math.floor, f = function (n) { return n }, e = r(l.width), o = r(i.width), v = ["left", "right"].indexOf(n.placement) !== -1, s = n.placement.indexOf("-") !== -1, y = e % 2 == o % 2, p = e % 2 == 1 && o % 2 == 1, h = t ? v || s || y ? r : a : f, c = t ? r : f; return { left: h(p && !s && t ? i.left - 1 : i.left), top: c(i.top), bottom: c(i.bottom), right: h(i.right) } } function rr(t, i) { var g = i.x, nt = i.y, tt = t.offsets.popper, c = h(t.instance.modifiers, function (n) { return n.name === "applyStyle" }).gpuAcceleration, w, b, d; c !== undefined && console.warn("WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!"); var it = c !== undefined ? c : i.gpuAcceleration, e = u(t.instance.popper), v = p(e), r = { position: tt.position }, f = tr(t, window.devicePixelRatio < 2 || !ir), o = g === "bottom" ? "top" : "bottom", s = nt === "right" ? "left" : "right", y = k("transform"), l = void 0, a = void 0; return a = o === "bottom" ? e.nodeName === "HTML" ? -e.clientHeight + f.bottom : -v.height + f.bottom : f.top, l = s === "right" ? e.nodeName === "HTML" ? -e.clientWidth + f.right : -v.width + f.right : f.left, it && y ? (r[y] = "translate3d(" + l + "px, " + a + "px, 0)", r[o] = 0, r[s] = 0, r.willChange = "transform") : (w = o === "bottom" ? -1 : 1, b = s === "right" ? -1 : 1, r[o] = a * w, r[s] = l * b, r.willChange = o + ", " + s), d = { "x-placement": t.placement }, t.attributes = n({}, d, t.attributes), t.styles = n({}, r, t.styles), t.arrowStyles = n({}, t.offsets.arrow, t.arrowStyles), t } function dt(n, t, i) { var u = h(n, function (n) { var i = n.name; return i === t }), f = !!u && n.some(function (n) { return n.name === i && n.enabled && n.order < u.order }), r, e; return f || (r = "`" + t + "`", e = "`" + i + "`", console.warn(e + " modifier is required by " + r + " modifier in order to work, be sure to include it before " + r + "!")), f } function ur(n, r) { var c, f; if (!dt(n.instance.modifiers, "arrow", "keepTogether")) return n; if (f = r.element, typeof f == "string") { if (f = n.instance.popper.querySelector(f), !f) return n } else if (!n.instance.popper.contains(f)) return console.warn("WARNING: `arrow.element` must be child of its popper element!"), n; var k = n.placement.split("-")[0], w = n.offsets, h = w.popper, o = w.reference, l = ["left", "right"].indexOf(k) !== -1, v = l ? "height" : "width", y = l ? "Top" : "Left", u = y.toLowerCase(), d = l ? "left" : "top", a = l ? "bottom" : "right", s = vt(f)[v]; o[a] - s < h[u] && (n.offsets.popper[u] -= h[u] - (o[a] - s)); o[u] + s > h[a] && (n.offsets.popper[u] += o[u] + s - h[a]); n.offsets.popper = t(n.offsets.popper); var g = o[u] + o[v] / 2 - s / 2, b = i(n.instance.popper), nt = parseFloat(b["margin" + y]), tt = parseFloat(b["border" + y + "Width"]), p = g - n.offsets.popper[u] - nt - tt; return p = Math.max(Math.min(h[v] - s, p), 0), n.arrowElement = f, n.offsets.arrow = (c = {}, e(c, u, Math.round(p)), e(c, d, ""), c), n } function fr(n) { return n === "end" ? "start" : n === "start" ? "end" : n } function ni(n) { var r = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1, t = nt.indexOf(n), i = nt.slice(t + 1).concat(nt.slice(0, t)); return r ? i.reverse() : i } function er(t, i) { if (wt(t.instance.modifiers, "inner") || t.flipped && t.placement === t.originalPlacement) return t; var e = b(t.instance.popper, t.instance.reference, i.padding, i.boundariesElement, t.positionFixed), r = t.placement.split("-")[0], o = l(r), u = t.placement.split("-")[1] || "", f = []; switch (i.behavior) { case tt.FLIP: f = [r, o]; break; case tt.CLOCKWISE: f = ni(r); break; case tt.COUNTERCLOCKWISE: f = ni(r, !0); break; default: f = i.behavior }return f.forEach(function (s, h) { if (r !== s || f.length === h + 1) return t; r = t.placement.split("-")[0]; o = l(r); var a = t.offsets.popper, y = t.offsets.reference, c = Math.floor, d = r === "left" && c(a.right) > c(y.left) || r === "right" && c(a.left) < c(y.right) || r === "top" && c(a.bottom) > c(y.top) || r === "bottom" && c(a.top) < c(y.bottom), p = c(a.left) < c(e.left), w = c(a.right) > c(e.right), b = c(a.top) < c(e.top), k = c(a.bottom) > c(e.bottom), g = r === "left" && p || r === "right" && w || r === "top" && b || r === "bottom" && k, v = ["top", "bottom"].indexOf(r) !== -1, tt = !!i.flipVariations && (v && u === "start" && p || v && u === "end" && w || !v && u === "start" && b || !v && u === "end" && k), it = !!i.flipVariationsByContent && (v && u === "start" && w || v && u === "end" && p || !v && u === "start" && k || !v && u === "end" && b), nt = tt || it; (d || g || nt) && (t.flipped = !0, (d || g) && (r = f[h + 1]), nt && (u = fr(u)), t.placement = r + (u ? "-" + u : ""), t.offsets.popper = n({}, t.offsets.popper, yt(t.instance.popper, t.offsets.reference, t.placement)), t = pt(t.instance.modifiers, t, "flip")) }), t } function or(n) { var o = n.offsets, u = o.popper, i = o.reference, s = n.placement.split("-")[0], r = Math.floor, f = ["top", "bottom"].indexOf(s) !== -1, e = f ? "right" : "bottom", t = f ? "left" : "top", h = f ? "width" : "height"; return u[e] < r(i[t]) && (n.offsets.popper[t] = r(i[t]) - u[h]), u[t] > r(i[e]) && (n.offsets.popper[t] = r(i[e])), n } function sr(n, i, r, u) { var h = n.match(/((?:\-|\+)?\d*\.?\d*)(.*)/), e = +h[1], f = h[2], o, c, s; if (!e) return n; if (f.indexOf("%") === 0) { o = void 0; switch (f) { case "%p": o = r; break; case "%": case "%r": default: o = u }return c = t(o), c[i] / 100 * e } return f === "vh" || f === "vw" ? (s = void 0, s = f === "vh" ? Math.max(document.documentElement.clientHeight, window.innerHeight || 0) : Math.max(document.documentElement.clientWidth, window.innerWidth || 0), s / 100 * e) : e } function hr(n, t, i, r) { var s = [0, 0], c = ["right", "left"].indexOf(r) !== -1, u = n.split(/(\+|\-)/).map(function (n) { return n.trim() }), f = u.indexOf(h(u, function (n) { return n.search(/,|\s/) !== -1 })), o, e; return u[f] && u[f].indexOf(",") === -1 && console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead."), o = /\s*,\s*|\s+/, e = f !== -1 ? [u.slice(0, f).concat([u[f].split(o)[0]]), [u[f].split(o)[1]].concat(u.slice(f + 1))] : [u], e = e.map(function (n, r) { var f = (r === 1 ? !c : c) ? "height" : "width", u = !1; return n.reduce(function (n, t) { return n[n.length - 1] === "" && ["+", "-"].indexOf(t) !== -1 ? (n[n.length - 1] = t, u = !0, n) : u ? (n[n.length - 1] += t, u = !1, n) : n.concat(t) }, []).map(function (n) { return sr(n, f, t, i) }) }), e.forEach(function (n, t) { n.forEach(function (i, r) { d(i) && (s[t] += i * (n[r - 1] === "-" ? -1 : 1)) }) }), s } function cr(n, t) { var f = t.offset, o = n.placement, e = n.offsets, i = e.popper, s = e.reference, u = o.split("-")[0], r = void 0; return r = d(+f) ? [+f, 0] : hr(f, i, s, u), u === "left" ? (i.top += r[0], i.left -= r[1]) : u === "right" ? (i.top += r[0], i.left += r[1]) : u === "top" ? (i.left += r[0], i.top -= r[1]) : u === "bottom" && (i.left += r[0], i.top += r[1]), n.popper = i, n } function lr(t, i) { var s = i.boundariesElement || u(t.instance.popper), o; t.instance.reference === s && (s = u(s)); var h = k("transform"), f = t.instance.popper.style, c = f.top, l = f.left, a = f[h]; f.top = ""; f.left = ""; f[h] = ""; o = b(t.instance.popper, t.instance.reference, i.padding, s, t.positionFixed); f.top = c; f.left = l; f[h] = a; i.boundaries = o; var v = i.priority, r = t.offsets.popper, y = { primary: function (n) { var t = r[n]; return r[n] < o[n] && !i.escapeWithReference && (t = Math.max(r[n], o[n])), e({}, n, t) }, secondary: function (n) { var t = n === "right" ? "left" : "top", u = r[t]; return r[n] > o[n] && !i.escapeWithReference && (u = Math.min(r[t], o[n] - (n === "right" ? r.width : r.height))), e({}, t, u) } }; return v.forEach(function (t) { var i = ["left", "top"].indexOf(t) !== -1 ? "primary" : "secondary"; r = n({}, r, y[i](t)) }), t.offsets.popper = r, t } function ar(t) { var u = t.placement, l = u.split("-")[0], f = u.split("-")[1]; if (f) { var o = t.offsets, r = o.reference, s = o.popper, h = ["bottom", "top"].indexOf(l) !== -1, i = h ? "left" : "top", c = h ? "width" : "height", a = { start: e({}, i, r[i]), end: e({}, i, r[i] + r[c] - s[c]) }; t.offsets.popper = n({}, s, a[f]) } return t } function vr(n) { if (!dt(n.instance.modifiers, "hide", "preventOverflow")) return n; var t = n.offsets.reference, i = h(n.instance.modifiers, function (n) { return n.name === "preventOverflow" }).boundaries; if (t.bottom < i.top || t.left > i.right || t.top > i.bottom || t.right < i.left) { if (n.hide === !0) return n; n.hide = !0; n.attributes["x-out-of-boundaries"] = "" } else { if (n.hide === !1) return n; n.hide = !1; n.attributes["x-out-of-boundaries"] = !1 } return n } function yr(n) { var u = n.placement, i = u.split("-")[0], f = n.offsets, r = f.popper, o = f.reference, e = ["left", "right"].indexOf(i) !== -1, s = ["top", "left"].indexOf(i) === -1; return r[e ? "left" : "top"] = o[i] - (s ? r[e ? "width" : "height"] : 0), n.placement = l(u), n.offsets.popper = t(r), n } var o = typeof window != "undefined" && typeof document != "undefined" && typeof navigator != "undefined", ti = function () { for (var t = ["Edge", "Trident", "Firefox"], n = 0; n < t.length; n += 1)if (o && navigator.userAgent.indexOf(t[n]) >= 0) return 1; return 0 }(), ui = o && window.Promise, fi = ui ? ii : ri, ut = o && !!(window.MSInputMethodContext && document.documentMode), ft = o && /MSIE 10/.test(navigator.userAgent), si = function (n, t) { if (!(n instanceof t)) throw new TypeError("Cannot call a class as a function"); }, hi = function () { function n(n, t) { for (var i, r = 0; r < t.length; r++)i = t[r], i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(n, i.key, i) } return function (t, i, r) { return i && n(t.prototype, i), r && n(t, r), t } }(), e = function (n, t, i) { return t in n ? Object.defineProperty(n, t, { value: i, enumerable: !0, configurable: !0, writable: !0 }) : n[t] = i, n }, n = Object.assign || function (n) { for (var i, r, t = 1; t < arguments.length; t++) { i = arguments[t]; for (r in i) Object.prototype.hasOwnProperty.call(i, r) && (n[r] = i[r]) } return n }, ir = o && /Firefox/i.test(navigator.userAgent), gt = ["auto-start", "auto", "auto-end", "top-start", "top", "top-end", "right-start", "right", "right-end", "bottom-end", "bottom", "bottom-start", "left-end", "left", "left-start"], nt = gt.slice(3), tt = { FLIP: "flip", CLOCKWISE: "clockwise", COUNTERCLOCKWISE: "counterclockwise" }, pr = { shift: { order: 100, enabled: !0, fn: ar }, offset: { order: 200, enabled: !0, fn: cr, offset: 0 }, preventOverflow: { order: 300, enabled: !0, fn: lr, priority: ["left", "right", "top", "bottom"], padding: 5, boundariesElement: "scrollParent" }, keepTogether: { order: 400, enabled: !0, fn: or }, arrow: { order: 500, enabled: !0, fn: ur, element: "[x-arrow]" }, flip: { order: 600, enabled: !0, fn: er, behavior: "flip", padding: 5, boundariesElement: "viewport", flipVariations: !1, flipVariationsByContent: !1 }, inner: { order: 700, enabled: !1, fn: yr }, hide: { order: 800, enabled: !0, fn: vr }, computeStyle: { order: 850, enabled: !0, fn: rr, gpuAcceleration: !0, x: "bottom", y: "right" }, applyStyle: { order: 900, enabled: !0, fn: gi, onLoad: nr, gpuAcceleration: undefined } }, wr = { placement: "bottom", positionFixed: !1, eventsEnabled: !0, removeOnDestroy: !1, onCreate: function () { }, onUpdate: function () { }, modifiers: pr }, a = function () { function t(i, r) { var u = this, f = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}, e; si(this, t); this.scheduleUpdate = function () { return requestAnimationFrame(u.update) }; this.update = fi(this.update.bind(this)); this.options = n({}, t.Defaults, f); this.state = { isDestroyed: !1, isCreated: !1, scrollParents: [] }; this.reference = i && i.jquery ? i[0] : i; this.popper = r && r.jquery ? r[0] : r; this.options.modifiers = {}; Object.keys(n({}, t.Defaults.modifiers, f.modifiers)).forEach(function (i) { u.options.modifiers[i] = n({}, t.Defaults.modifiers[i] || {}, f.modifiers ? f.modifiers[i] : {}) }); this.modifiers = Object.keys(this.options.modifiers).map(function (t) { return n({ name: t }, u.options.modifiers[t]) }).sort(function (n, t) { return n.order - t.order }); this.modifiers.forEach(function (n) { if (n.enabled && it(n.onLoad)) n.onLoad(u.reference, u.popper, u.options, n, u.state) }); this.update(); e = this.options.eventsEnabled; e && this.enableEventListeners(); this.state.eventsEnabled = e } return hi(t, [{ key: "update", value: function () { return vi.call(this) } }, { key: "destroy", value: function () { return yi.call(this) } }, { key: "enableEventListeners", value: function () { return wi.call(this) } }, { key: "disableEventListeners", value: function () { return ki.call(this) } }]), t }(); return a.Utils = (typeof window != "undefined" ? window : global).PopperUtils, a.placements = gt, a.Defaults = wr, a });
  28. /*!
  29. * Bootstrap v4.0.0 (https://getbootstrap.com)
  30. * Copyright 2011-2018 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
  31. * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
  32. */
  33. !function (n, t) { "object" == typeof exports && "undefined" != typeof module ? t(exports, require("jquery"), require("popper.js")) : "function" == typeof define && define.amd ? define(["exports", "jquery", "popper.js"], t) : t(n.bootstrap = {}, n.jQuery, n.Popper) }(this, function (n, t, i) { "use strict"; function it(n, t) { for (var i, r = 0; r < t.length; r++)i = t[r], i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(n, i.key, i) } function o(n, t, i) { return t && it(n.prototype, t), i && it(n, i), n } function f() { return (f = Object.assign || function (n) { for (var i, r, t = 1; t < arguments.length; t++) { i = arguments[t]; for (r in i) Object.prototype.hasOwnProperty.call(i, r) && (n[r] = i[r]) } return n }).apply(this, arguments) } t = t && t.hasOwnProperty("default") ? t.default : t; i = i && i.hasOwnProperty("default") ? i.default : i; var e, h, v, y, rt, p, ut, ft, et, s, u, c, w, b, k, ot, l, st, ht, g, ct, lt, at, nt, tt, a, r = function (n) { function r(i) { var u = this, r = !1; return n(this).one(t.TRANSITION_END, function () { r = !0 }), setTimeout(function () { r || t.triggerTransitionEnd(u) }, i), this } var i = !1, t = { TRANSITION_END: "bsTransitionEnd", getUID: function (n) { do n += ~~(1e6 * Math.random()); while (document.getElementById(n)); return n }, getSelectorFromElement: function (t) { var r, i = t.getAttribute("data-target"); i && "#" !== i || (i = t.getAttribute("href") || ""); "#" === i.charAt(0) && (r = i, i = r = "function" == typeof n.escapeSelector ? n.escapeSelector(r).substr(1) : r.replace(/(:|\.|\[|\]|,|=|@)/g, "\\$1")); try { return n(document).find(i).length > 0 ? i : null } catch (n) { return null } }, reflow: function (n) { return n.offsetHeight }, triggerTransitionEnd: function (t) { n(t).trigger(i.end) }, supportsTransitionEnd: function () { return Boolean(i) }, isElement: function (n) { return (n[0] || n).nodeType }, typeCheckConfig: function (n, i, r) { var u, s; for (u in r) if (Object.prototype.hasOwnProperty.call(r, u)) { var e = r[u], f = i[u], o = f && t.isElement(f) ? "element" : (s = f, {}.toString.call(s).match(/\s([a-zA-Z]+)/)[1].toLowerCase()); if (!new RegExp(e).test(o)) throw new Error(n.toUpperCase() + ': Option "' + u + '" provided type "' + o + '" but expected type "' + e + '".'); } } }; return i = ("undefined" == typeof window || !window.QUnit) && { end: "transitionend" }, n.fn.emulateTransitionEnd = r, t.supportsTransitionEnd() && (n.event.special[t.TRANSITION_END] = { bindType: i.end, delegateType: i.end, handle: function (t) { if (n(t.target).is(this)) return t.handleObj.handler.apply(this, arguments) } }), t }(t), vt = (h = "alert", y = "." + (v = "bs.alert"), rt = (e = t).fn[h], p = { CLOSE: "close" + y, CLOSED: "closed" + y, CLICK_DATA_API: "click" + y + ".data-api" }, ut = "alert", ft = "fade", et = "show", s = function () { function n(n) { this._element = n } var t = n.prototype; return t.close = function (n) { n = n || this._element; var t = this._getRootElement(n); this._triggerCloseEvent(t).isDefaultPrevented() || this._removeElement(t) }, t.dispose = function () { e.removeData(this._element, v); this._element = null }, t._getRootElement = function (n) { var i = r.getSelectorFromElement(n), t = !1; return i && (t = e(i)[0]), t || (t = e(n).closest("." + ut)[0]), t }, t._triggerCloseEvent = function (n) { var t = e.Event(p.CLOSE); return e(n).trigger(t), t }, t._removeElement = function (n) { var t = this; e(n).removeClass(et); r.supportsTransitionEnd() && e(n).hasClass(ft) ? e(n).one(r.TRANSITION_END, function (i) { return t._destroyElement(n, i) }).emulateTransitionEnd(150) : this._destroyElement(n) }, t._destroyElement = function (n) { e(n).detach().trigger(p.CLOSED).remove() }, n._jQueryInterface = function (t) { return this.each(function () { var r = e(this), i = r.data(v); i || (i = new n(this), r.data(v, i)); "close" === t && i[t](this) }) }, n._handleDismiss = function (n) { return function (t) { t && t.preventDefault(); n.close(this) } }, o(n, null, [{ key: "VERSION", get: function () { return "4.0.0" } }]), n }(), e(document).on(p.CLICK_DATA_API, '[data-dismiss="alert"]', s._handleDismiss(new s)), e.fn[h] = s._jQueryInterface, e.fn[h].Constructor = s, e.fn[h].noConflict = function () { return e.fn[h] = rt, s._jQueryInterface }, s), yt = (c = "button", b = "." + (w = "bs.button"), k = ".data-api", ot = (u = t).fn[c], l = "active", st = "btn", ht = "focus", g = '[data-toggle^="button"]', ct = '[data-toggle="buttons"]', lt = "input", at = ".active", nt = ".btn", tt = { CLICK_DATA_API: "click" + b + k, FOCUS_BLUR_DATA_API: "focus" + b + k + " blur" + b + k }, a = function () { function n(n) { this._element = n } var t = n.prototype; return t.toggle = function () { var i = !0, f = !0, t = u(this._element).closest(ct)[0], n, r; if (t && (n = u(this._element).find(lt)[0], n)) { if ("radio" === n.type && (n.checked && u(this._element).hasClass(l) ? i = !1 : (r = u(t).find(at)[0], r && u(r).removeClass(l))), i) { if (n.hasAttribute("disabled") || t.hasAttribute("disabled") || n.classList.contains("disabled") || t.classList.contains("disabled")) return; n.checked = !u(this._element).hasClass(l); u(n).trigger("change") } n.focus(); f = !1 } f && this._element.setAttribute("aria-pressed", !u(this._element).hasClass(l)); i && u(this._element).toggleClass(l) }, t.dispose = function () { u.removeData(this._element, w); this._element = null }, n._jQueryInterface = function (t) { return this.each(function () { var i = u(this).data(w); i || (i = new n(this), u(this).data(w, i)); "toggle" === t && i[t]() }) }, o(n, null, [{ key: "VERSION", get: function () { return "4.0.0" } }]), n }(), u(document).on(tt.CLICK_DATA_API, g, function (n) { n.preventDefault(); var t = n.target; u(t).hasClass(st) || (t = u(t).closest(nt)); a._jQueryInterface.call(u(t), "toggle") }).on(tt.FOCUS_BLUR_DATA_API, g, function (n) { var t = u(n.target).closest(nt)[0]; u(t).toggleClass(ht, /^focus(in)?$/.test(n.type)) }), u.fn[c] = a._jQueryInterface, u.fn[c].Constructor = a, u.fn[c].noConflict = function () { return u.fn[c] = ot, a._jQueryInterface }, a), pt = function (n) { var s = "carousel", c = "bs.carousel", t = "." + c, y = n.fn[s], v = { interval: 5e3, keyboard: !0, slide: !1, pause: "hover", wrap: !0 }, p = { interval: "(number|boolean)", keyboard: "boolean", slide: "(boolean|string)", pause: "(string|boolean)", wrap: "boolean" }, l = "next", a = "prev", w = "left", b = "right", i = { SLIDE: "slide" + t, SLID: "slid" + t, KEYDOWN: "keydown" + t, MOUSEENTER: "mouseenter" + t, MOUSELEAVE: "mouseleave" + t, TOUCHEND: "touchend" + t, LOAD_DATA_API: "load" + t + ".data-api", CLICK_DATA_API: "click" + t + ".data-api" }, k = "carousel", e = "active", d = "slide", g = "carousel-item-right", nt = "carousel-item-left", tt = "carousel-item-next", it = "carousel-item-prev", u = { ACTIVE: ".active", ACTIVE_ITEM: ".active.carousel-item", ITEM: ".carousel-item", NEXT_PREV: ".carousel-item-next, .carousel-item-prev", INDICATORS: ".carousel-indicators", DATA_SLIDE: "[data-slide], [data-slide-to]", DATA_RIDE: '[data-ride="carousel"]' }, h = function () { function y(t, i) { this._items = null; this._interval = null; this._activeElement = null; this._isPaused = !1; this._isSliding = !1; this.touchTimeout = null; this._config = this._getConfig(i); this._element = n(t)[0]; this._indicatorsElement = n(this._element).find(u.INDICATORS)[0]; this._addEventListeners() } var h = y.prototype; return h.next = function () { this._isSliding || this._slide(l) }, h.nextWhenVisible = function () { !document.hidden && n(this._element).is(":visible") && "hidden" !== n(this._element).css("visibility") && this.next() }, h.prev = function () { this._isSliding || this._slide(a) }, h.pause = function (t) { t || (this._isPaused = !0); n(this._element).find(u.NEXT_PREV)[0] && r.supportsTransitionEnd() && (r.triggerTransitionEnd(this._element), this.cycle(!0)); clearInterval(this._interval); this._interval = null }, h.cycle = function (n) { n || (this._isPaused = !1); this._interval && (clearInterval(this._interval), this._interval = null); this._config.interval && !this._isPaused && (this._interval = setInterval((document.visibilityState ? this.nextWhenVisible : this.next).bind(this), this._config.interval)) }, h.to = function (t) { var e = this, r, f; if (this._activeElement = n(this._element).find(u.ACTIVE_ITEM)[0], r = this._getItemIndex(this._activeElement), !(t > this._items.length - 1 || t < 0)) if (this._isSliding) n(this._element).one(i.SLID, function () { return e.to(t) }); else { if (r === t) return this.pause(), void this.cycle(); f = t > r ? l : a; this._slide(f, this._items[t]) } }, h.dispose = function () { n(this._element).off(t); n.removeData(this._element, c); this._items = null; this._config = null; this._element = null; this._interval = null; this._isPaused = null; this._isSliding = null; this._activeElement = null; this._indicatorsElement = null }, h._getConfig = function (n) { return n = f({}, v, n), r.typeCheckConfig(s, n, p), n }, h._addEventListeners = function () { var t = this; this._config.keyboard && n(this._element).on(i.KEYDOWN, function (n) { return t._keydown(n) }); "hover" === this._config.pause && (n(this._element).on(i.MOUSEENTER, function (n) { return t.pause(n) }).on(i.MOUSELEAVE, function (n) { return t.cycle(n) }), "ontouchstart" in document.documentElement && n(this._element).on(i.TOUCHEND, function () { t.pause(); t.touchTimeout && clearTimeout(t.touchTimeout); t.touchTimeout = setTimeout(function (n) { return t.cycle(n) }, 500 + t._config.interval) })) }, h._keydown = function (n) { if (!/input|textarea/i.test(n.target.tagName)) switch (n.which) { case 37: n.preventDefault(); this.prev(); break; case 39: n.preventDefault(); this.next() } }, h._getItemIndex = function (t) { return this._items = n.makeArray(n(t).parent().find(u.ITEM)), this._items.indexOf(t) }, h._getItemByDirection = function (n, t) { var u = n === l, f = n === a, i = this._getItemIndex(t), e = this._items.length - 1, r; return (f && 0 === i || u && i === e) && !this._config.wrap ? t : (r = (i + (n === a ? -1 : 1)) % this._items.length, -1 === r ? this._items[this._items.length - 1] : this._items[r]) }, h._triggerSlideEvent = function (t, r) { var e = this._getItemIndex(t), o = this._getItemIndex(n(this._element).find(u.ACTIVE_ITEM)[0]), f = n.Event(i.SLIDE, { relatedTarget: t, direction: r, from: o, to: e }); return n(this._element).trigger(f), f }, h._setActiveIndicatorElement = function (t) { if (this._indicatorsElement) { n(this._indicatorsElement).find(u.ACTIVE).removeClass(e); var i = this._indicatorsElement.children[this._getItemIndex(t)]; i && n(i).addClass(e) } }, h._slide = function (t, f) { var h, c, a, y = this, s = n(this._element).find(u.ACTIVE_ITEM)[0], k = this._getItemIndex(s), o = f || s && this._getItemByDirection(t, s), rt = this._getItemIndex(o), p = Boolean(this._interval), v; (t === l ? (h = nt, c = tt, a = w) : (h = g, c = it, a = b), o && n(o).hasClass(e)) ? this._isSliding = !1 : !this._triggerSlideEvent(o, a).isDefaultPrevented() && s && o && (this._isSliding = !0, p && this.pause(), this._setActiveIndicatorElement(o), v = n.Event(i.SLID, { relatedTarget: o, direction: a, from: k, to: rt }), r.supportsTransitionEnd() && n(this._element).hasClass(d) ? (n(o).addClass(c), r.reflow(o), n(s).addClass(h), n(o).addClass(h), n(s).one(r.TRANSITION_END, function () { n(o).removeClass(h + " " + c).addClass(e); n(s).removeClass(e + " " + c + " " + h); y._isSliding = !1; setTimeout(function () { return n(y._element).trigger(v) }, 0) }).emulateTransitionEnd(600)) : (n(s).removeClass(e), n(o).addClass(e), this._isSliding = !1, n(this._element).trigger(v)), p && this.cycle()) }, y._jQueryInterface = function (t) { return this.each(function () { var i = n(this).data(c), r = f({}, v, n(this).data()), u; if ("object" == typeof t && (r = f({}, r, t)), u = "string" == typeof t ? t : r.slide, i || (i = new y(this, r), n(this).data(c, i)), "number" == typeof t) i.to(t); else if ("string" == typeof u) { if ("undefined" == typeof i[u]) throw new TypeError('No method named "' + u + '"'); i[u]() } else r.interval && (i.pause(), i.cycle()) }) }, y._dataApiClickHandler = function (t) { var o = r.getSelectorFromElement(this), i, e, u; o && (i = n(o)[0], i && n(i).hasClass(k) && (e = f({}, n(i).data(), n(this).data()), u = this.getAttribute("data-slide-to"), u && (e.interval = !1), y._jQueryInterface.call(n(i), e), u && n(i).data(c).to(u), t.preventDefault())) }, o(y, null, [{ key: "VERSION", get: function () { return "4.0.0" } }, { key: "Default", get: function () { return v } }]), y }(); return n(document).on(i.CLICK_DATA_API, u.DATA_SLIDE, h._dataApiClickHandler), n(window).on(i.LOAD_DATA_API, function () { n(u.DATA_RIDE).each(function () { var t = n(this); h._jQueryInterface.call(t, t.data()) }) }), n.fn[s] = h._jQueryInterface, n.fn[s].Constructor = h, n.fn[s].noConflict = function () { return n.fn[s] = y, h._jQueryInterface }, h }(t), wt = function (n) { var u = "collapse", t = "bs.collapse", e = "." + t, w = n.fn[u], a = { toggle: !0, parent: "" }, b = { toggle: "boolean", parent: "(string|element)" }, s = { SHOW: "show" + e, SHOWN: "shown" + e, HIDE: "hide" + e, HIDDEN: "hidden" + e, CLICK_DATA_API: "click" + e + ".data-api" }, i = "show", c = "collapse", l = "collapsing", v = "collapsed", p = "width", k = "height", y = { ACTIVES: ".show, .collapsing", DATA_TOGGLE: '[data-toggle="collapse"]' }, h = function () { function h(t, i) { var e, u, o, f; for (this._isTransitioning = !1, this._element = t, this._config = this._getConfig(i), this._triggerArray = n.makeArray(n('[data-toggle="collapse"][href="#' + t.id + '"],[data-toggle="collapse"][data-target="#' + t.id + '"]')), e = n(y.DATA_TOGGLE), u = 0; u < e.length; u++)o = e[u], f = r.getSelectorFromElement(o), null !== f && n(f).filter(t).length > 0 && (this._selector = f, this._triggerArray.push(o)); this._parent = this._config.parent ? this._getParent() : null; this._config.parent || this._addAriaAndCollapsedClass(this._element, this._triggerArray); this._config.toggle && this.toggle() } var e = h.prototype; return e.toggle = function () { n(this._element).hasClass(i) ? this.hide() : this.show() }, e.show = function () { var u, o, e = this, a, f, p, w; this._isTransitioning || n(this._element).hasClass(i) || (this._parent && 0 === (u = n.makeArray(n(this._parent).find(y.ACTIVES).filter('[data-parent="' + this._config.parent + '"]'))).length && (u = null), u && (o = n(u).not(this._selector).data(t)) && o._isTransitioning) || (a = n.Event(s.SHOW), (n(this._element).trigger(a), a.isDefaultPrevented()) || (u && (h._jQueryInterface.call(n(u).not(this._selector), "hide"), o || n(u).data(t, null)), f = this._getDimension(), n(this._element).removeClass(c).addClass(l), this._element.style[f] = 0, this._triggerArray.length > 0 && n(this._triggerArray).removeClass(v).attr("aria-expanded", !0), this.setTransitioning(!0), p = function () { n(e._element).removeClass(l).addClass(c).addClass(i); e._element.style[f] = ""; e.setTransitioning(!1); n(e._element).trigger(s.SHOWN) }, r.supportsTransitionEnd() ? (w = "scroll" + (f[0].toUpperCase() + f.slice(1)), n(this._element).one(r.TRANSITION_END, p).emulateTransitionEnd(600), this._element.style[f] = this._element[w] + "px") : p())) }, e.hide = function () { var a = this, f, t, u, e, o, h; if (!this._isTransitioning && n(this._element).hasClass(i) && (f = n.Event(s.HIDE), n(this._element).trigger(f), !f.isDefaultPrevented())) { if (t = this._getDimension(), this._element.style[t] = this._element.getBoundingClientRect()[t] + "px", r.reflow(this._element), n(this._element).addClass(l).removeClass(c).removeClass(i), this._triggerArray.length > 0) for (u = 0; u < this._triggerArray.length; u++)e = this._triggerArray[u], o = r.getSelectorFromElement(e), null !== o && (n(o).hasClass(i) || n(e).addClass(v).attr("aria-expanded", !1)); this.setTransitioning(!0); h = function () { a.setTransitioning(!1); n(a._element).removeClass(l).addClass(c).trigger(s.HIDDEN) }; this._element.style[t] = ""; r.supportsTransitionEnd() ? n(this._element).one(r.TRANSITION_END, h).emulateTransitionEnd(600) : h() } }, e.setTransitioning = function (n) { this._isTransitioning = n }, e.dispose = function () { n.removeData(this._element, t); this._config = null; this._parent = null; this._element = null; this._triggerArray = null; this._isTransitioning = null }, e._getConfig = function (n) { return (n = f({}, a, n)).toggle = Boolean(n.toggle), r.typeCheckConfig(u, n, b), n }, e._getDimension = function () { return n(this._element).hasClass(p) ? p : k }, e._getParent = function () { var u = this, t = null, i; return r.isElement(this._config.parent) ? (t = this._config.parent, "undefined" != typeof this._config.parent.jquery && (t = this._config.parent[0])) : t = n(this._config.parent)[0], i = '[data-toggle="collapse"][data-parent="' + this._config.parent + '"]', n(t).find(i).each(function (n, t) { u._addAriaAndCollapsedClass(h._getTargetFromElement(t), [t]) }), t }, e._addAriaAndCollapsedClass = function (t, r) { if (t) { var u = n(t).hasClass(i); r.length > 0 && n(r).toggleClass(v, !u).attr("aria-expanded", u) } }, h._getTargetFromElement = function (t) { var i = r.getSelectorFromElement(t); return i ? n(i)[0] : null }, h._jQueryInterface = function (i) { return this.each(function () { var u = n(this), r = u.data(t), e = f({}, a, u.data(), "object" == typeof i && i); if (!r && e.toggle && /show|hide/.test(i) && (e.toggle = !1), r || (r = new h(this, e), u.data(t, r)), "string" == typeof i) { if ("undefined" == typeof r[i]) throw new TypeError('No method named "' + i + '"'); r[i]() } }) }, o(h, null, [{ key: "VERSION", get: function () { return "4.0.0" } }, { key: "Default", get: function () { return a } }]), h }(); return n(document).on(s.CLICK_DATA_API, y.DATA_TOGGLE, function (i) { "A" === i.currentTarget.tagName && i.preventDefault(); var u = n(this), f = r.getSelectorFromElement(this); n(f).each(function () { var i = n(this), r = i.data(t) ? "toggle" : u.data(); h._jQueryInterface.call(i, r) }) }), n.fn[u] = h._jQueryInterface, n.fn[u].Constructor = h, n.fn[u].noConflict = function () { return n.fn[u] = w, h._jQueryInterface }, h }(t), bt = function (n) { var h = "dropdown", c = "bs.dropdown", u = "." + c, a = ".data-api", b = n.fn[h], k = new RegExp("38|40|27"), t = { HIDE: "hide" + u, HIDDEN: "hidden" + u, SHOW: "show" + u, SHOWN: "shown" + u, CLICK: "click" + u, CLICK_DATA_API: "click" + u + a, KEYDOWN_DATA_API: "keydown" + u + a, KEYUP_DATA_API: "keyup" + u + a }, p = "disabled", s = "show", w = "dropup", d = "dropright", g = "dropleft", v = "dropdown-menu-right", nt = "dropdown-menu-left", tt = "position-static", l = '[data-toggle="dropdown"]', y = ".dropdown-menu", it = ".navbar-nav", rt = ".dropdown-menu .dropdown-item:not(.disabled)", ut = "top-start", ft = "top-end", et = "bottom-start", ot = "bottom-end", st = "right-start", ht = "left-start", ct = { offset: 0, flip: !0, boundary: "scrollParent" }, lt = { offset: "(number|string|function)", flip: "boolean", boundary: "(string|element)" }, e = function () { function e(n, t) { this._element = n; this._popper = null; this._config = this._getConfig(t); this._menu = this._getMenuElement(); this._inNavbar = this._detectNavbar(); this._addEventListeners() } var a = e.prototype; return a.toggle = function () { var r, h, u, f, o; if (!this._element.disabled && !n(this._element).hasClass(p) && (r = e._getParentFromElement(this._element), h = n(this._menu).hasClass(s), (e._clearMenus(), !h) && (u = { relatedTarget: this._element }, f = n.Event(t.SHOW, u), n(r).trigger(f), !f.isDefaultPrevented()))) { if (!this._inNavbar) { if ("undefined" == typeof i) throw new TypeError("Bootstrap dropdown require Popper.js (https://popper.js.org)"); o = this._element; n(r).hasClass(w) && (n(this._menu).hasClass(nt) || n(this._menu).hasClass(v)) && (o = r); "scrollParent" !== this._config.boundary && n(r).addClass(tt); this._popper = new i(o, this._menu, this._getPopperConfig()) } "ontouchstart" in document.documentElement && 0 === n(r).closest(it).length && n("body").children().on("mouseover", null, n.noop); this._element.focus(); this._element.setAttribute("aria-expanded", !0); n(this._menu).toggleClass(s); n(r).toggleClass(s).trigger(n.Event(t.SHOWN, u)) } }, a.dispose = function () { n.removeData(this._element, c); n(this._element).off(u); this._element = null; this._menu = null; null !== this._popper && (this._popper.destroy(), this._popper = null) }, a.update = function () { this._inNavbar = this._detectNavbar(); null !== this._popper && this._popper.scheduleUpdate() }, a._addEventListeners = function () { var i = this; n(this._element).on(t.CLICK, function (n) { n.preventDefault(); n.stopPropagation(); i.toggle() }) }, a._getConfig = function (t) { return t = f({}, this.constructor.Default, n(this._element).data(), t), r.typeCheckConfig(h, t, this.constructor.DefaultType), t }, a._getMenuElement = function () { if (!this._menu) { var t = e._getParentFromElement(this._element); this._menu = n(t).find(y)[0] } return this._menu }, a._getPlacement = function () { var i = n(this._element).parent(), t = et; return i.hasClass(w) ? (t = ut, n(this._menu).hasClass(v) && (t = ft)) : i.hasClass(d) ? t = st : i.hasClass(g) ? t = ht : n(this._menu).hasClass(v) && (t = ot), t }, a._detectNavbar = function () { return n(this._element).closest(".navbar").length > 0 }, a._getPopperConfig = function () { var t = this, n = {}; return "function" == typeof this._config.offset ? n.fn = function (n) { return n.offsets = f({}, n.offsets, t._config.offset(n.offsets) || {}), n } : n.offset = this._config.offset, { placement: this._getPlacement(), modifiers: { offset: n, flip: { enabled: this._config.flip }, preventOverflow: { boundariesElement: this._config.boundary } } } }, e._jQueryInterface = function (t) { return this.each(function () { var i = n(this).data(c); if (i || (i = new e(this, "object" == typeof t ? t : null), n(this).data(c, i)), "string" == typeof t) { if ("undefined" == typeof i[t]) throw new TypeError('No method named "' + t + '"'); i[t]() } }) }, e._clearMenus = function (i) { var u, r, v, o; if (!i || 3 !== i.which && ("keyup" !== i.type || 9 === i.which)) for (u = n.makeArray(n(l)), r = 0; r < u.length; r++) { var f = e._getParentFromElement(u[r]), h = n(u[r]).data(c), a = { relatedTarget: u[r] }; h && (v = h._menu, !n(f).hasClass(s) || i && ("click" === i.type && /input|textarea/i.test(i.target.tagName) || "keyup" === i.type && 9 === i.which) && n.contains(f, i.target) || (o = n.Event(t.HIDE, a), n(f).trigger(o), o.isDefaultPrevented() || ("ontouchstart" in document.documentElement && n("body").children().off("mouseover", null, n.noop), u[r].setAttribute("aria-expanded", "false"), n(v).removeClass(s), n(f).removeClass(s).trigger(n.Event(t.HIDDEN, a))))) } }, e._getParentFromElement = function (t) { var i, u = r.getSelectorFromElement(t); return u && (i = n(u)[0]), i || t.parentNode }, e._dataApiKeydownHandler = function (t) { var u, f, r, i, o; (/input|textarea/i.test(t.target.tagName) ? 32 === t.which || 27 !== t.which && (40 !== t.which && 38 !== t.which || n(t.target).closest(y).length) : !k.test(t.which)) || (t.preventDefault(), t.stopPropagation(), this.disabled || n(this).hasClass(p)) || (u = e._getParentFromElement(this), f = n(u).hasClass(s), (f || 27 === t.which && 32 === t.which) && (!f || 27 !== t.which && 32 !== t.which) ? (r = n(u).find(rt).get(), 0 !== r.length && (i = r.indexOf(t.target), 38 === t.which && i > 0 && i--, 40 === t.which && i < r.length - 1 && i++, i < 0 && (i = 0), r[i].focus())) : (27 === t.which && (o = n(u).find(l)[0], n(o).trigger("focus")), n(this).trigger("click"))) }, o(e, null, [{ key: "VERSION", get: function () { return "4.0.0" } }, { key: "Default", get: function () { return ct } }, { key: "DefaultType", get: function () { return lt } }]), e }(); return n(document).on(t.KEYDOWN_DATA_API, l, e._dataApiKeydownHandler).on(t.KEYDOWN_DATA_API, y, e._dataApiKeydownHandler).on(t.CLICK_DATA_API + " " + t.KEYUP_DATA_API, e._clearMenus).on(t.CLICK_DATA_API, l, function (t) { t.preventDefault(); t.stopPropagation(); e._jQueryInterface.call(n(this), "toggle") }).on(t.CLICK_DATA_API, ".dropdown form", function (n) { n.stopPropagation() }), n.fn[h] = e._jQueryInterface, n.fn[h].Constructor = e, n.fn[h].noConflict = function () { return n.fn[h] = b, e._jQueryInterface }, e }(t), kt = function (n) { var v = "modal", s = "bs.modal", i = "." + s, y = n.fn.modal, l = { backdrop: !0, keyboard: !0, focus: !0, show: !0 }, p = { backdrop: "(boolean|string)", keyboard: "boolean", focus: "boolean", show: "boolean" }, t = { HIDE: "hide" + i, HIDDEN: "hidden" + i, SHOW: "show" + i, SHOWN: "shown" + i, FOCUSIN: "focusin" + i, RESIZE: "resize" + i, CLICK_DISMISS: "click.dismiss" + i, KEYDOWN_DISMISS: "keydown.dismiss" + i, MOUSEUP_DISMISS: "mouseup.dismiss" + i, MOUSEDOWN_DISMISS: "mousedown.dismiss" + i, CLICK_DATA_API: "click" + i + ".data-api" }, w = "modal-scrollbar-measure", b = "modal-backdrop", a = "modal-open", e = "fade", c = "show", u = { DIALOG: ".modal-dialog", DATA_TOGGLE: '[data-toggle="modal"]', DATA_DISMISS: '[data-dismiss="modal"]', FIXED_CONTENT: ".fixed-top, .fixed-bottom, .is-fixed, .sticky-top", STICKY_CONTENT: ".sticky-top", NAVBAR_TOGGLER: ".navbar-toggler" }, h = function () { function y(t, i) { this._config = this._getConfig(i); this._element = t; this._dialog = n(t).find(u.DIALOG)[0]; this._backdrop = null; this._isShown = !1; this._isBodyOverflowing = !1; this._ignoreBackdropClick = !1; this._originalBodyPadding = 0; this._scrollbarWidth = 0 } var h = y.prototype; return h.toggle = function (n) { return this._isShown ? this.hide() : this.show(n) }, h.show = function (i) { var f = this, o; this._isTransitioning || this._isShown || (r.supportsTransitionEnd() && n(this._element).hasClass(e) && (this._isTransitioning = !0), o = n.Event(t.SHOW, { relatedTarget: i }), n(this._element).trigger(o), this._isShown || o.isDefaultPrevented() || (this._isShown = !0, this._checkScrollbar(), this._setScrollbar(), this._adjustDialog(), n(document.body).addClass(a), this._setEscapeEvent(), this._setResizeEvent(), n(this._element).on(t.CLICK_DISMISS, u.DATA_DISMISS, function (n) { return f.hide(n) }), n(this._dialog).on(t.MOUSEDOWN_DISMISS, function () { n(f._element).one(t.MOUSEUP_DISMISS, function (t) { n(t.target).is(f._element) && (f._ignoreBackdropClick = !0) }) }), this._showBackdrop(function () { return f._showElement(i) }))) }, h.hide = function (i) { var o = this, u, f; (i && i.preventDefault(), !this._isTransitioning && this._isShown) && (u = n.Event(t.HIDE), (n(this._element).trigger(u), this._isShown && !u.isDefaultPrevented()) && (this._isShown = !1, f = r.supportsTransitionEnd() && n(this._element).hasClass(e), f && (this._isTransitioning = !0), this._setEscapeEvent(), this._setResizeEvent(), n(document).off(t.FOCUSIN), n(this._element).removeClass(c), n(this._element).off(t.CLICK_DISMISS), n(this._dialog).off(t.MOUSEDOWN_DISMISS), f ? n(this._element).one(r.TRANSITION_END, function (n) { return o._hideModal(n) }).emulateTransitionEnd(300) : this._hideModal())) }, h.dispose = function () { n.removeData(this._element, s); n(window, document, this._element, this._backdrop).off(i); this._config = null; this._element = null; this._dialog = null; this._backdrop = null; this._isShown = null; this._isBodyOverflowing = null; this._ignoreBackdropClick = null; this._scrollbarWidth = null }, h.handleUpdate = function () { this._adjustDialog() }, h._getConfig = function (n) { return n = f({}, l, n), r.typeCheckConfig(v, n, p), n }, h._showElement = function (i) { var u = this, o = r.supportsTransitionEnd() && n(this._element).hasClass(e), s, f; this._element.parentNode && this._element.parentNode.nodeType === Node.ELEMENT_NODE || document.body.appendChild(this._element); this._element.style.display = "block"; this._element.removeAttribute("aria-hidden"); this._element.scrollTop = 0; o && r.reflow(this._element); n(this._element).addClass(c); this._config.focus && this._enforceFocus(); s = n.Event(t.SHOWN, { relatedTarget: i }); f = function () { u._config.focus && u._element.focus(); u._isTransitioning = !1; n(u._element).trigger(s) }; o ? n(this._dialog).one(r.TRANSITION_END, f).emulateTransitionEnd(300) : f() }, h._enforceFocus = function () { var i = this; n(document).off(t.FOCUSIN).on(t.FOCUSIN, function (t) { document !== t.target && i._element !== t.target && 0 === n(i._element).has(t.target).length && i._element.focus() }) }, h._setEscapeEvent = function () { var i = this; this._isShown && this._config.keyboard ? n(this._element).on(t.KEYDOWN_DISMISS, function (n) { 27 === n.which && (n.preventDefault(), i.hide()) }) : this._isShown || n(this._element).off(t.KEYDOWN_DISMISS) }, h._setResizeEvent = function () { var i = this; this._isShown ? n(window).on(t.RESIZE, function (n) { return i.handleUpdate(n) }) : n(window).off(t.RESIZE) }, h._hideModal = function () { var i = this; this._element.style.display = "none"; this._element.setAttribute("aria-hidden", !0); this._isTransitioning = !1; this._showBackdrop(function () { n(document.body).removeClass(a); i._resetAdjustments(); i._resetScrollbar(); n(i._element).trigger(t.HIDDEN) }) }, h._removeBackdrop = function () { this._backdrop && (n(this._backdrop).remove(), this._backdrop = null) }, h._showBackdrop = function (i) { var u = this, f = n(this._element).hasClass(e) ? e : "", o, s; if (this._isShown && this._config.backdrop) { if (o = r.supportsTransitionEnd() && f, this._backdrop = document.createElement("div"), this._backdrop.className = b, f && n(this._backdrop).addClass(f), n(this._backdrop).appendTo(document.body), n(this._element).on(t.CLICK_DISMISS, function (n) { u._ignoreBackdropClick ? u._ignoreBackdropClick = !1 : n.target === n.currentTarget && ("static" === u._config.backdrop ? u._element.focus() : u.hide()) }), o && r.reflow(this._backdrop), n(this._backdrop).addClass(c), !i) return; if (!o) return void i(); n(this._backdrop).one(r.TRANSITION_END, i).emulateTransitionEnd(150) } else !this._isShown && this._backdrop ? (n(this._backdrop).removeClass(c), s = function () { u._removeBackdrop(); i && i() }, r.supportsTransitionEnd() && n(this._element).hasClass(e) ? n(this._backdrop).one(r.TRANSITION_END, s).emulateTransitionEnd(150) : s()) : i && i() }, h._adjustDialog = function () { var n = this._element.scrollHeight > document.documentElement.clientHeight; !this._isBodyOverflowing && n && (this._element.style.paddingLeft = this._scrollbarWidth + "px"); this._isBodyOverflowing && !n && (this._element.style.paddingRight = this._scrollbarWidth + "px") }, h._resetAdjustments = function () { this._element.style.paddingLeft = ""; this._element.style.paddingRight = "" }, h._checkScrollbar = function () { var n = document.body.getBoundingClientRect(); this._isBodyOverflowing = n.left + n.right < window.innerWidth; this._scrollbarWidth = this._getScrollbarWidth() }, h._setScrollbar = function () { var t = this, i, r; this._isBodyOverflowing && (n(u.FIXED_CONTENT).each(function (i, r) { var u = n(r)[0].style.paddingRight, f = n(r).css("padding-right"); n(r).data("padding-right", u).css("padding-right", parseFloat(f) + t._scrollbarWidth + "px") }), n(u.STICKY_CONTENT).each(function (i, r) { var u = n(r)[0].style.marginRight, f = n(r).css("margin-right"); n(r).data("margin-right", u).css("margin-right", parseFloat(f) - t._scrollbarWidth + "px") }), n(u.NAVBAR_TOGGLER).each(function (i, r) { var u = n(r)[0].style.marginRight, f = n(r).css("margin-right"); n(r).data("margin-right", u).css("margin-right", parseFloat(f) + t._scrollbarWidth + "px") }), i = document.body.style.paddingRight, r = n("body").css("padding-right"), n("body").data("padding-right", i).css("padding-right", parseFloat(r) + this._scrollbarWidth + "px")) }, h._resetScrollbar = function () { n(u.FIXED_CONTENT).each(function (t, i) { var r = n(i).data("padding-right"); "undefined" != typeof r && n(i).css("padding-right", r).removeData("padding-right") }); n(u.STICKY_CONTENT + ", " + u.NAVBAR_TOGGLER).each(function (t, i) { var r = n(i).data("margin-right"); "undefined" != typeof r && n(i).css("margin-right", r).removeData("margin-right") }); var t = n("body").data("padding-right"); "undefined" != typeof t && n("body").css("padding-right", t).removeData("padding-right") }, h._getScrollbarWidth = function () { var n = document.createElement("div"), t; return n.className = w, document.body.appendChild(n), t = n.getBoundingClientRect().width - n.clientWidth, document.body.removeChild(n), t }, y._jQueryInterface = function (t, i) { return this.each(function () { var r = n(this).data(s), u = f({}, y.Default, n(this).data(), "object" == typeof t && t); if (r || (r = new y(this, u), n(this).data(s, r)), "string" == typeof t) { if ("undefined" == typeof r[t]) throw new TypeError('No method named "' + t + '"'); r[t](i) } else u.show && r.show(i) }) }, o(y, null, [{ key: "VERSION", get: function () { return "4.0.0" } }, { key: "Default", get: function () { return l } }]), y }(); return n(document).on(t.CLICK_DATA_API, u.DATA_TOGGLE, function (i) { var u, e = this, o = r.getSelectorFromElement(this), c, l; o && (u = n(o)[0]); c = n(u).data(s) ? "toggle" : f({}, n(u).data(), n(this).data()); "A" !== this.tagName && "AREA" !== this.tagName || i.preventDefault(); l = n(u).one(t.SHOW, function (i) { i.isDefaultPrevented() || l.one(t.HIDDEN, function () { n(e).is(":visible") && e.focus() }) }); h._jQueryInterface.call(n(u), c, this) }), n.fn.modal = h._jQueryInterface, n.fn.modal.Constructor = h, n.fn.modal.noConflict = function () { return n.fn.modal = y, h._jQueryInterface }, h }(t), d = function (n) { var u = "tooltip", l = "bs.tooltip", t = "." + l, p = n.fn[u], w = new RegExp("(^|\\s)bs-tooltip\\S+", "g"), b = { animation: "boolean", template: "string", title: "(string|element|function)", trigger: "string", delay: "(number|object)", html: "boolean", selector: "(string|boolean)", placement: "(string|function)", offset: "(number|string)", container: "(string|element|boolean)", fallbackPlacement: "(string|array)", boundary: "(string|element)" }, k = { AUTO: "auto", TOP: "top", RIGHT: "right", BOTTOM: "bottom", LEFT: "left" }, d = { animation: !0, template: '<div class="tooltip" role="tooltip"><div class="arrow"><\/div><div class="tooltip-inner"><\/div><\/div>', trigger: "hover focus", title: "", delay: 0, html: !1, selector: !1, placement: "top", offset: 0, container: !1, fallbackPlacement: "flip", boundary: "scrollParent" }, e = "show", v = "out", g = { HIDE: "hide" + t, HIDDEN: "hidden" + t, SHOW: "show" + t, SHOWN: "shown" + t, INSERTED: "inserted" + t, CLICK: "click" + t, FOCUSIN: "focusin" + t, FOCUSOUT: "focusout" + t, MOUSEENTER: "mouseenter" + t, MOUSELEAVE: "mouseleave" + t }, s = "fade", h = "show", nt = ".tooltip-inner", tt = ".arrow", c = "hover", y = "focus", it = "click", rt = "manual", a = function () { function p(n, t) { if ("undefined" == typeof i) throw new TypeError("Bootstrap tooltips require Popper.js (https://popper.js.org)"); this._isEnabled = !0; this._timeout = 0; this._hoverState = ""; this._activeTrigger = {}; this._popper = null; this.element = n; this.config = this._getConfig(t); this.tip = null; this._setListeners() } var a = p.prototype; return a.enable = function () { this._isEnabled = !0 }, a.disable = function () { this._isEnabled = !1 }, a.toggleEnabled = function () { this._isEnabled = !this._isEnabled }, a.toggle = function (t) { if (this._isEnabled) if (t) { var r = this.constructor.DATA_KEY, i = n(t.currentTarget).data(r); i || (i = new this.constructor(t.currentTarget, this._getDelegateConfig()), n(t.currentTarget).data(r, i)); i._activeTrigger.click = !i._activeTrigger.click; i._isWithActiveTrigger() ? i._enter(null, i) : i._leave(null, i) } else { if (n(this.getTipElement()).hasClass(h)) return void this._leave(null, this); this._enter(null, this) } }, a.dispose = function () { clearTimeout(this._timeout); n.removeData(this.element, this.constructor.DATA_KEY); n(this.element).off(this.constructor.EVENT_KEY); n(this.element).closest(".modal").off("hide.bs.modal"); this.tip && n(this.tip).remove(); this._isEnabled = null; this._timeout = null; this._hoverState = null; this._activeTrigger = null; null !== this._popper && this._popper.destroy(); this._popper = null; this.element = null; this.config = null; this.tip = null }, a.show = function () { var t = this, f, l, u, e, a, o, y, c; if ("none" === n(this.element).css("display")) throw new Error("Please use show on visible elements"); if (f = n.Event(this.constructor.Event.SHOW), this.isWithContent() && this._isEnabled) { if (n(this.element).trigger(f), l = n.contains(this.element.ownerDocument.documentElement, this.element), f.isDefaultPrevented() || !l) return; u = this.getTipElement(); e = r.getUID(this.constructor.NAME); u.setAttribute("id", e); this.element.setAttribute("aria-describedby", e); this.setContent(); this.config.animation && n(u).addClass(s); a = "function" == typeof this.config.placement ? this.config.placement.call(this, u, this.element) : this.config.placement; o = this._getAttachment(a); this.addAttachmentClass(o); y = !1 === this.config.container ? document.body : n(this.config.container); n(u).data(this.constructor.DATA_KEY, this); n.contains(this.element.ownerDocument.documentElement, this.tip) || n(u).appendTo(y); n(this.element).trigger(this.constructor.Event.INSERTED); this._popper = new i(this.element, u, { placement: o, modifiers: { offset: { offset: this.config.offset }, flip: { behavior: this.config.fallbackPlacement }, arrow: { element: tt }, preventOverflow: { boundariesElement: this.config.boundary } }, onCreate: function (n) { n.originalPlacement !== n.placement && t._handlePopperPlacementChange(n) }, onUpdate: function (n) { t._handlePopperPlacementChange(n) } }); n(u).addClass(h); "ontouchstart" in document.documentElement && n("body").children().on("mouseover", null, n.noop); c = function () { t.config.animation && t._fixTransition(); var i = t._hoverState; t._hoverState = null; n(t.element).trigger(t.constructor.Event.SHOWN); i === v && t._leave(null, t) }; r.supportsTransitionEnd() && n(this.tip).hasClass(s) ? n(this.tip).one(r.TRANSITION_END, c).emulateTransitionEnd(p._TRANSITION_DURATION) : c() } }, a.hide = function (t) { var i = this, u = this.getTipElement(), f = n.Event(this.constructor.Event.HIDE), o = function () { i._hoverState !== e && u.parentNode && u.parentNode.removeChild(u); i._cleanTipClass(); i.element.removeAttribute("aria-describedby"); n(i.element).trigger(i.constructor.Event.HIDDEN); null !== i._popper && i._popper.destroy(); t && t() }; n(this.element).trigger(f); f.isDefaultPrevented() || (n(u).removeClass(h), "ontouchstart" in document.documentElement && n("body").children().off("mouseover", null, n.noop), this._activeTrigger[it] = !1, this._activeTrigger[y] = !1, this._activeTrigger[c] = !1, r.supportsTransitionEnd() && n(this.tip).hasClass(s) ? n(u).one(r.TRANSITION_END, o).emulateTransitionEnd(150) : o(), this._hoverState = "") }, a.update = function () { null !== this._popper && this._popper.scheduleUpdate() }, a.isWithContent = function () { return Boolean(this.getTitle()) }, a.addAttachmentClass = function (t) { n(this.getTipElement()).addClass("bs-tooltip-" + t) }, a.getTipElement = function () { return this.tip = this.tip || n(this.config.template)[0], this.tip }, a.setContent = function () { var t = n(this.getTipElement()); this.setElementContent(t.find(nt), this.getTitle()); t.removeClass(s + " " + h) }, a.setElementContent = function (t, i) { var r = this.config.html; "object" == typeof i && (i.nodeType || i.jquery) ? r ? n(i).parent().is(t) || t.empty().append(i) : t.text(n(i).text()) : t[r ? "html" : "text"](i) }, a.getTitle = function () { var n = this.element.getAttribute("data-original-title"); return n || (n = "function" == typeof this.config.title ? this.config.title.call(this.element) : this.config.title), n }, a._getAttachment = function (n) { return k[n.toUpperCase()] }, a._setListeners = function () { var t = this; this.config.trigger.split(" ").forEach(function (i) { if ("click" === i) n(t.element).on(t.constructor.Event.CLICK, t.config.selector, function (n) { return t.toggle(n) }); else if (i !== rt) { var r = i === c ? t.constructor.Event.MOUSEENTER : t.constructor.Event.FOCUSIN, u = i === c ? t.constructor.Event.MOUSELEAVE : t.constructor.Event.FOCUSOUT; n(t.element).on(r, t.config.selector, function (n) { return t._enter(n) }).on(u, t.config.selector, function (n) { return t._leave(n) }) } n(t.element).closest(".modal").on("hide.bs.modal", function () { return t.hide() }) }); this.config.selector ? this.config = f({}, this.config, { trigger: "manual", selector: "" }) : this._fixTitle() }, a._fixTitle = function () { var n = typeof this.element.getAttribute("data-original-title"); (this.element.getAttribute("title") || "string" !== n) && (this.element.setAttribute("data-original-title", this.element.getAttribute("title") || ""), this.element.setAttribute("title", "")) }, a._enter = function (t, i) { var r = this.constructor.DATA_KEY; (i = i || n(t.currentTarget).data(r)) || (i = new this.constructor(t.currentTarget, this._getDelegateConfig()), n(t.currentTarget).data(r, i)); t && (i._activeTrigger["focusin" === t.type ? y : c] = !0); n(i.getTipElement()).hasClass(h) || i._hoverState === e ? i._hoverState = e : (clearTimeout(i._timeout), i._hoverState = e, i.config.delay && i.config.delay.show ? i._timeout = setTimeout(function () { i._hoverState === e && i.show() }, i.config.delay.show) : i.show()) }, a._leave = function (t, i) { var r = this.constructor.DATA_KEY; (i = i || n(t.currentTarget).data(r)) || (i = new this.constructor(t.currentTarget, this._getDelegateConfig()), n(t.currentTarget).data(r, i)); t && (i._activeTrigger["focusout" === t.type ? y : c] = !1); i._isWithActiveTrigger() || (clearTimeout(i._timeout), i._hoverState = v, i.config.delay && i.config.delay.hide ? i._timeout = setTimeout(function () { i._hoverState === v && i.hide() }, i.config.delay.hide) : i.hide()) }, a._isWithActiveTrigger = function () { for (var n in this._activeTrigger) if (this._activeTrigger[n]) return !0; return !1 }, a._getConfig = function (t) { return "number" == typeof (t = f({}, this.constructor.Default, n(this.element).data(), t)).delay && (t.delay = { show: t.delay, hide: t.delay }), "number" == typeof t.title && (t.title = t.title.toString()), "number" == typeof t.content && (t.content = t.content.toString()), r.typeCheckConfig(u, t, this.constructor.DefaultType), t }, a._getDelegateConfig = function () { var t = {}, n; if (this.config) for (n in this.config) this.constructor.Default[n] !== this.config[n] && (t[n] = this.config[n]); return t }, a._cleanTipClass = function () { var i = n(this.getTipElement()), t = i.attr("class").match(w); null !== t && t.length > 0 && i.removeClass(t.join("")) }, a._handlePopperPlacementChange = function (n) { this._cleanTipClass(); this.addAttachmentClass(this._getAttachment(n.placement)) }, a._fixTransition = function () { var t = this.getTipElement(), i = this.config.animation; null === t.getAttribute("x-placement") && (n(t).removeClass(s), this.config.animation = !1, this.hide(), this.show(), this.config.animation = i) }, p._jQueryInterface = function (t) { return this.each(function () { var i = n(this).data(l), r = "object" == typeof t && t; if ((i || !/dispose|hide/.test(t)) && (i || (i = new p(this, r), n(this).data(l, i)), "string" == typeof t)) { if ("undefined" == typeof i[t]) throw new TypeError('No method named "' + t + '"'); i[t]() } }) }, o(p, null, [{ key: "VERSION", get: function () { return "4.0.0" } }, { key: "Default", get: function () { return d } }, { key: "NAME", get: function () { return u } }, { key: "DATA_KEY", get: function () { return l } }, { key: "Event", get: function () { return g } }, { key: "EVENT_KEY", get: function () { return t } }, { key: "DefaultType", get: function () { return b } }]), p }(); return n.fn[u] = a._jQueryInterface, n.fn[u].Constructor = a, n.fn[u].noConflict = function () { return n.fn[u] = p, a._jQueryInterface }, a }(t), dt = function (n) { var i = "popover", r = "bs.popover", t = "." + r, e = n.fn[i], s = new RegExp("(^|\\s)bs-popover\\S+", "g"), h = f({}, d.Default, { placement: "right", trigger: "click", content: "", template: '<div class="popover" role="tooltip"><div class="arrow"><\/div><h3 class="popover-header"><\/h3><div class="popover-body"><\/div><\/div>' }), c = f({}, d.DefaultType, { content: "(string|element|function)" }), l = "fade", a = "show", v = ".popover-header", y = ".popover-body", p = { HIDE: "hide" + t, HIDDEN: "hidden" + t, SHOW: "show" + t, SHOWN: "shown" + t, INSERTED: "inserted" + t, CLICK: "click" + t, FOCUSIN: "focusin" + t, FOCUSOUT: "focusout" + t, MOUSEENTER: "mouseenter" + t, MOUSELEAVE: "mouseleave" + t }, u = function (u) { function e() { return u.apply(this, arguments) || this } var w, b, f; return b = u, (w = e).prototype = Object.create(b.prototype), w.prototype.constructor = w, w.__proto__ = b, f = e.prototype, f.isWithContent = function () { return this.getTitle() || this._getContent() }, f.addAttachmentClass = function (t) { n(this.getTipElement()).addClass("bs-popover-" + t) }, f.getTipElement = function () { return this.tip = this.tip || n(this.config.template)[0], this.tip }, f.setContent = function () { var i = n(this.getTipElement()), t; this.setElementContent(i.find(v), this.getTitle()); t = this._getContent(); "function" == typeof t && (t = t.call(this.element)); this.setElementContent(i.find(y), t); i.removeClass(l + " " + a) }, f._getContent = function () { return this.element.getAttribute("data-content") || this.config.content }, f._cleanTipClass = function () { var i = n(this.getTipElement()), t = i.attr("class").match(s); null !== t && t.length > 0 && i.removeClass(t.join("")) }, e._jQueryInterface = function (t) { return this.each(function () { var i = n(this).data(r), u = "object" == typeof t ? t : null; if ((i || !/destroy|hide/.test(t)) && (i || (i = new e(this, u), n(this).data(r, i)), "string" == typeof t)) { if ("undefined" == typeof i[t]) throw new TypeError('No method named "' + t + '"'); i[t]() } }) }, o(e, null, [{ key: "VERSION", get: function () { return "4.0.0" } }, { key: "Default", get: function () { return h } }, { key: "NAME", get: function () { return i } }, { key: "DATA_KEY", get: function () { return r } }, { key: "Event", get: function () { return p } }, { key: "EVENT_KEY", get: function () { return t } }, { key: "DefaultType", get: function () { return c } }]), e }(d); return n.fn[i] = u._jQueryInterface, n.fn[i].Constructor = u, n.fn[i].noConflict = function () { return n.fn[i] = e, u._jQueryInterface }, u }(t), gt = function (n) { var i = "scrollspy", s = "bs.scrollspy", h = "." + s, v = n.fn[i], l = { offset: 10, method: "auto", target: "" }, y = { offset: "number", method: "string", target: "(string|element)" }, c = { ACTIVATE: "activate" + h, SCROLL: "scroll" + h, LOAD_DATA_API: "load" + h + ".data-api" }, p = "dropdown-item", u = "active", t = { DATA_SPY: '[data-spy="scroll"]', ACTIVE: ".active", NAV_LIST_GROUP: ".nav, .list-group", NAV_LINKS: ".nav-link", NAV_ITEMS: ".nav-item", LIST_ITEMS: ".list-group-item", DROPDOWN: ".dropdown", DROPDOWN_ITEMS: ".dropdown-item", DROPDOWN_TOGGLE: ".dropdown-toggle" }, w = "offset", a = "position", e = function () { function v(i, r) { var u = this; this._element = i; this._scrollElement = "BODY" === i.tagName ? window : i; this._config = this._getConfig(r); this._selector = this._config.target + " " + t.NAV_LINKS + "," + this._config.target + " " + t.LIST_ITEMS + "," + this._config.target + " " + t.DROPDOWN_ITEMS; this._offsets = []; this._targets = []; this._activeTarget = null; this._scrollHeight = 0; n(this._scrollElement).on(c.SCROLL, function (n) { return u._process(n) }); this.refresh(); this._process() } var e = v.prototype; return e.refresh = function () { var t = this, u = this._scrollElement === this._scrollElement.window ? w : a, i = "auto" === this._config.method ? u : this._config.method, f = i === a ? this._getScrollTop() : 0; this._offsets = []; this._targets = []; this._scrollHeight = this._getScrollHeight(); n.makeArray(n(this._selector)).map(function (t) { var u, e = r.getSelectorFromElement(t), o; return (e && (u = n(e)[0]), u) && (o = u.getBoundingClientRect(), o.width || o.height) ? [n(u)[i]().top + f, e] : null }).filter(function (n) { return n }).sort(function (n, t) { return n[0] - t[0] }).forEach(function (n) { t._offsets.push(n[0]); t._targets.push(n[1]) }) }, e.dispose = function () { n.removeData(this._element, s); n(this._scrollElement).off(h); this._element = null; this._scrollElement = null; this._config = null; this._selector = null; this._offsets = null; this._targets = null; this._activeTarget = null; this._scrollHeight = null }, e._getConfig = function (t) { if ("string" != typeof (t = f({}, l, t)).target) { var u = n(t.target).attr("id"); u || (u = r.getUID(i), n(t.target).attr("id", u)); t.target = "#" + u } return r.typeCheckConfig(i, t, y), t }, e._getScrollTop = function () { return this._scrollElement === window ? this._scrollElement.pageYOffset : this._scrollElement.scrollTop }, e._getScrollHeight = function () { return this._scrollElement.scrollHeight || Math.max(document.body.scrollHeight, document.documentElement.scrollHeight) }, e._getOffsetHeight = function () { return this._scrollElement === window ? window.innerHeight : this._scrollElement.getBoundingClientRect().height }, e._process = function () { var t = this._getScrollTop() + this._config.offset, r = this._getScrollHeight(), u = this._config.offset + r - this._getOffsetHeight(), i, n; if (this._scrollHeight !== r && this.refresh(), t >= u) i = this._targets[this._targets.length - 1], this._activeTarget !== i && this._activate(i); else { if (this._activeTarget && t < this._offsets[0] && this._offsets[0] > 0) return this._activeTarget = null, void this._clear(); for (n = this._offsets.length; n--;)this._activeTarget !== this._targets[n] && t >= this._offsets[n] && ("undefined" == typeof this._offsets[n + 1] || t < this._offsets[n + 1]) && this._activate(this._targets[n]) } }, e._activate = function (i) { var f, r; this._activeTarget = i; this._clear(); f = this._selector.split(","); f = f.map(function (n) { return n + '[data-target="' + i + '"],' + n + '[href="' + i + '"]' }); r = n(f.join(",")); r.hasClass(p) ? (r.closest(t.DROPDOWN).find(t.DROPDOWN_TOGGLE).addClass(u), r.addClass(u)) : (r.addClass(u), r.parents(t.NAV_LIST_GROUP).prev(t.NAV_LINKS + ", " + t.LIST_ITEMS).addClass(u), r.parents(t.NAV_LIST_GROUP).prev(t.NAV_ITEMS).children(t.NAV_LINKS).addClass(u)); n(this._scrollElement).trigger(c.ACTIVATE, { relatedTarget: i }) }, e._clear = function () { n(this._selector).filter(t.ACTIVE).removeClass(u) }, v._jQueryInterface = function (t) { return this.each(function () { var i = n(this).data(s); if (i || (i = new v(this, "object" == typeof t && t), n(this).data(s, i)), "string" == typeof t) { if ("undefined" == typeof i[t]) throw new TypeError('No method named "' + t + '"'); i[t]() } }) }, o(v, null, [{ key: "VERSION", get: function () { return "4.0.0" } }, { key: "Default", get: function () { return l } }]), v }(); return n(window).on(c.LOAD_DATA_API, function () { for (var u, i = n.makeArray(n(t.DATA_SPY)), r = i.length; r--;)u = n(i[r]), e._jQueryInterface.call(u, u.data()) }), n.fn[i] = e._jQueryInterface, n.fn[i].Constructor = e, n.fn[i].noConflict = function () { return n.fn[i] = v, e._jQueryInterface }, e }(t), ni = function (n) { var f = "bs.tab", e = "." + f, l = n.fn.tab, t = { HIDE: "hide" + e, HIDDEN: "hidden" + e, SHOW: "show" + e, SHOWN: "shown" + e, CLICK_DATA_API: "click.bs.tab.data-api" }, a = "dropdown-menu", i = "active", v = "disabled", y = "fade", s = "show", p = ".dropdown", w = ".nav, .list-group", h = ".active", c = "> li > .active", b = ".dropdown-toggle", k = "> .dropdown-menu .active", u = function () { function u(n) { this._element = n } var e = u.prototype; return e.show = function () { var y = this, e, u, f, o, p, s, l, a; this._element.parentNode && this._element.parentNode.nodeType === Node.ELEMENT_NODE && n(this._element).hasClass(i) || n(this._element).hasClass(v) || (f = n(this._element).closest(w)[0], o = r.getSelectorFromElement(this._element), f && (p = "UL" === f.nodeName ? c : h, u = (u = n.makeArray(n(f).find(p)))[u.length - 1]), s = n.Event(t.HIDE, { relatedTarget: this._element }), l = n.Event(t.SHOW, { relatedTarget: u }), (u && n(u).trigger(s), n(this._element).trigger(l), l.isDefaultPrevented() || s.isDefaultPrevented()) || (o && (e = n(o)[0]), this._activate(this._element, f), a = function () { var i = n.Event(t.HIDDEN, { relatedTarget: y._element }), r = n.Event(t.SHOWN, { relatedTarget: u }); n(u).trigger(i); n(y._element).trigger(r) }, e ? this._activate(e, e.parentNode, a) : a())) }, e.dispose = function () { n.removeData(this._element, f); this._element = null }, e._activate = function (t, i, u) { var o = this, f = ("UL" === i.nodeName ? n(i).find(c) : n(i).children(h))[0], s = u && r.supportsTransitionEnd() && f && n(f).hasClass(y), e = function () { return o._transitionComplete(t, f, u) }; f && s ? n(f).one(r.TRANSITION_END, e).emulateTransitionEnd(150) : e() }, e._transitionComplete = function (t, u, f) { var e, o; u && (n(u).removeClass(s + " " + i), e = n(u.parentNode).find(k)[0], e && n(e).removeClass(i), "tab" === u.getAttribute("role") && u.setAttribute("aria-selected", !1)); (n(t).addClass(i), "tab" === t.getAttribute("role") && t.setAttribute("aria-selected", !0), r.reflow(t), n(t).addClass(s), t.parentNode && n(t.parentNode).hasClass(a)) && (o = n(t).closest(p)[0], o && n(o).find(b).addClass(i), t.setAttribute("aria-expanded", !0)); f && f() }, u._jQueryInterface = function (t) { return this.each(function () { var r = n(this), i = r.data(f); if (i || (i = new u(this), r.data(f, i)), "string" == typeof t) { if ("undefined" == typeof i[t]) throw new TypeError('No method named "' + t + '"'); i[t]() } }) }, o(u, null, [{ key: "VERSION", get: function () { return "4.0.0" } }]), u }(); return n(document).on(t.CLICK_DATA_API, '[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]', function (t) { t.preventDefault(); u._jQueryInterface.call(n(this), "show") }), n.fn.tab = u._jQueryInterface, n.fn.tab.Constructor = u, n.fn.tab.noConflict = function () { return n.fn.tab = l, u._jQueryInterface }, u }(t); !function (n) { if ("undefined" == typeof n) throw new TypeError("Bootstrap's JavaScript requires jQuery. jQuery must be included before Bootstrap's JavaScript."); var t = n.fn.jquery.split(" ")[0].split("."); if (t[0] < 2 && t[1] < 9 || 1 === t[0] && 9 === t[1] && t[2] < 1 || t[0] >= 4) throw new Error("Bootstrap's JavaScript requires at least jQuery v1.9.1 but less than v4.0.0"); }(t); n.Util = r; n.Alert = vt; n.Button = yt; n.Carousel = pt; n.Collapse = wt; n.Dropdown = bt; n.Modal = kt; n.Popover = dt; n.Scrollspy = gt; n.Tab = ni; n.Tooltip = d; Object.defineProperty(n, "__esModule", { value: !0 }) }); !function (n, t) { "use strict"; "function" == typeof define && define.amd ? define(["jquery"], t) : "object" == typeof exports ? module.exports = t(require("jquery")) : n.bootbox = t(n.jQuery) }(this, function t(n, t) { "use strict"; function w(t, i, r) { return n.extend(!0, {}, t, function (n, t) { var r = n.length, i = {}; if (r < 1 || 2 < r) throw new Error("Invalid argument length"); return 2 === r || "string" == typeof n[0] ? (i[t[0]] = n[0], i[t[1]] = n[1]) : i = n[0], i }(i, r)) } function h(n, i, r, o) { var c, s, l, h, a; return o && o[0] && (c = o[0].locale || f.locale, (o[0].swapButtonOrder || f.swapButtonOrder) && (i = i.reverse())), a = { className: "bootbox-" + n, buttons: function (n, t) { for (var r, s, u, f = {}, i = 0, h = n.length; i < h; i++) { var o = n[i], c = o.toLowerCase(), l = o.toUpperCase(); f[c] = { label: (r = l, s = t, void 0, u = e[s], u ? u[r] : e.en[r]) } } return f }(i, c) }, s = w(a, o, r), h = {}, u(l = i, function (n, t) { h[t] = !0 }), u(s.buttons, function (n) { if (h[n] === t) throw new Error('button key "' + n + '" is not allowed (options are ' + l.join(" ") + ")"); }), s } function v(n) { return Object.keys(n).length } function u(t, i) { var r = 0; n.each(t, function (n, t) { i(n, t, r++) }) } function c(t, i, r) { t.stopPropagation(); t.preventDefault(); n.isFunction(r) && !1 === r.call(i, t) || i.modal("hide") } function y(n) { return /([01][0-9]|2[0-3]):[0-5][0-9]?:[0-5][0-9]/.test(n) } function p(n) { return /(\d{4})-(\d{2})-(\d{2})/.test(n) } var o, l, s, a, i; Object.keys || (Object.keys = (o = Object.prototype.hasOwnProperty, l = !{ toString: null }.propertyIsEnumerable("toString"), a = (s = ["toString", "toLocaleString", "valueOf", "hasOwnProperty", "isPrototypeOf", "propertyIsEnumerable", "constructor"]).length, function (n) { if ("function" != typeof n && ("object" != typeof n || null === n)) throw new TypeError("Object.keys called on non-object"); var i, t, r = []; for (i in n) o.call(n, i) && r.push(i); if (l) for (t = 0; t < a; t++)o.call(n, s[t]) && r.push(s[t]); return r })); i = {}; i.VERSION = "5.0.0"; var e = {}, r = { dialog: '<div class="bootbox modal" tabindex="-1" role="dialog" aria-hidden="true"><div class="modal-dialog"><div class="modal-content"><div class="modal-body"><div class="bootbox-body"><\/div><\/div><\/div><\/div><\/div>', header: '<div class="modal-header"><h5 class="modal-title"><\/h5><\/div>', footer: '<div class="modal-footer"><\/div>', closeButton: '<button type="button" class="bootbox-close-button close" aria-hidden="true">&times;<\/button>', form: '<form class="bootbox-form"><\/form>', button: '<button type="button" class="btn"><\/button>', option: "<option><\/option>", promptMessage: '<div class="bootbox-prompt-message"><\/div>', inputs: { text: '<input class="bootbox-input bootbox-input-text form-control" autocomplete="off" type="text" />', textarea: '<textarea class="bootbox-input bootbox-input-textarea form-control"><\/textarea>', email: '<input class="bootbox-input bootbox-input-email form-control" autocomplete="off" type="email" />', select: '<select class="bootbox-input bootbox-input-select form-control"><\/select>', checkbox: '<div class="form-check checkbox"><label class="form-check-label"><input class="form-check-input bootbox-input bootbox-input-checkbox" type="checkbox" /><\/label><\/div>', radio: '<div class="form-check radio"><label class="form-check-label"><input class="form-check-input bootbox-input bootbox-input-radio" type="radio" name="bootbox-radio" /><\/label><\/div>', date: '<input class="bootbox-input bootbox-input-date form-control" autocomplete="off" type="date" />', time: '<input class="bootbox-input bootbox-input-time form-control" autocomplete="off" type="time" />', number: '<input class="bootbox-input bootbox-input-number form-control" autocomplete="off" type="number" />', password: '<input class="bootbox-input bootbox-input-password form-control" autocomplete="off" type="password" />', range: '<input class="bootbox-input bootbox-input-range form-control-range" autocomplete="off" type="range" />' } }, f = { locale: "en", backdrop: "static", animate: !0, className: null, closeButton: !0, show: !0, container: "body", value: "", inputType: "text", swapButtonOrder: !1, centerVertical: !1, multiple: !1, scrollable: !1 }; return i.locales = function (n) { return n ? e[n] : e }, i.addLocale = function (t, r) { return n.each(["OK", "CANCEL", "CONFIRM"], function (n, t) { if (!r[t]) throw new Error('Please supply a translation for "' + t + '"'); }), e[t] = { OK: r.OK, CANCEL: r.CANCEL, CONFIRM: r.CONFIRM }, i }, i.removeLocale = function (n) { if ("en" === n) throw new Error('"en" is used as the default and fallback locale and cannot be removed.'); return delete e[n], i }, i.setLocale = function (n) { return i.setDefaults("locale", n) }, i.setDefaults = function () { var t = {}; return 2 === arguments.length ? t[arguments[0]] = arguments[1] : t = arguments[0], n.extend(f, t), i }, i.hideAll = function () { return n(".bootbox").modal("hide"), i }, i.init = function (t) { return t(t || n) }, i.dialog = function (i) { var a, l; if (n.fn.modal === t) throw new Error('"$.fn.modal" is not defined; please double check you have included the Bootstrap JavaScript library. See http://getbootstrap.com/javascript/ for more details.'); (i = function (t) { var i, r; if ("object" != typeof t) throw new Error("Please supply an object of options"); if (!t.message) throw new Error('"message" option must not be null or an empty string.'); return (t = n.extend({}, f, t)).buttons || (t.buttons = {}), i = t.buttons, r = v(i), u(i, function (u, f, e) { if (n.isFunction(f) && (f = i[u] = { callback: f }), "object" !== n.type(f)) throw new Error('button with key "' + u + '" must be an object'); if (f.label || (f.label = u), !f.className) { var o = !1; o = t.swapButtonOrder ? 0 === e : e === r - 1; f.className = r <= 2 && o ? "btn-primary" : "btn-secondary btn-default" } }), t }(i), n.fn.modal.Constructor.VERSION) ? (i.fullBootstrapVersion = n.fn.modal.Constructor.VERSION, a = i.fullBootstrapVersion.indexOf("."), i.bootstrap = i.fullBootstrapVersion.substring(0, a)) : (i.bootstrap = "2", i.fullBootstrapVersion = "2.3.2", console.warn("Bootbox will *mostly* work with Bootstrap 2, but we do not officially support it. Please upgrade, if possible.")); var e = n(r.dialog), o = e.find(".modal-dialog"), h = e.find(".modal-body"), p = n(r.header), y = n(r.footer), w = i.buttons, s = { onEscape: i.onEscape }; if (h.find(".bootbox-body").html(i.message), 0 < v(i.buttons) && (u(w, function (t, i) { var u = n(r.button); switch (u.data("bb-handler", t), u.addClass(i.className), t) { case "ok": case "confirm": u.addClass("bootbox-accept"); break; case "cancel": u.addClass("bootbox-cancel") }u.html(i.label); y.append(u); s[t] = i.callback }), h.after(y)), !0 === i.animate && e.addClass("fade"), i.className && e.addClass(i.className), i.size) switch (i.fullBootstrapVersion.substring(0, 3) < "3.1" && console.warn('"size" requires Bootstrap 3.1.0 or higher. You appear to be using ' + i.fullBootstrapVersion + ". Please upgrade to use this option."), i.size) { case "small": case "sm": o.addClass("modal-sm"); break; case "large": case "lg": o.addClass("modal-lg"); break; case "xl": case "extra-large": i.fullBootstrapVersion.substring(0, 3) < "4.2" && console.warn('Using size "xl"/"extra-large" requires Bootstrap 4.2.0 or higher. You appear to be using ' + i.fullBootstrapVersion + ". Please upgrade to use this option."); o.addClass("modal-xl") }return (i.scrollable && (i.fullBootstrapVersion.substring(0, 3) < "4.3" && console.warn('Using "scrollable" requires Bootstrap 4.3.0 or higher. You appear to be using ' + i.fullBootstrapVersion + ". Please upgrade to use this option."), o.addClass("modal-dialog-scrollable")), i.title && (h.before(p), e.find(".modal-title").html(i.title)), i.closeButton) && (l = n(r.closeButton), i.title ? 3 < i.bootstrap ? e.find(".modal-header").append(l) : e.find(".modal-header").prepend(l) : l.prependTo(h)), i.centerVertical && (i.fullBootstrapVersion < "4.0.0" && console.warn('"centerVertical" requires Bootstrap 4.0.0-beta.3 or higher. You appear to be using ' + i.fullBootstrapVersion + ". Please upgrade to use this option."), o.addClass("modal-dialog-centered")), e.one("hide.bs.modal", function (n) { n.target === this && (e.off("escape.close.bb"), e.off("click")) }), e.one("hidden.bs.modal", function (n) { n.target === this && e.remove() }), e.one("shown.bs.modal", function () { e.find(".bootbox-accept:first").trigger("focus") }), "static" !== i.backdrop && e.on("click.dismiss.bs.modal", function (n) { e.children(".modal-backdrop").length && (n.currentTarget = e.children(".modal-backdrop").get(0)); n.target === n.currentTarget && e.trigger("escape.close.bb") }), e.on("escape.close.bb", function (n) { s.onEscape && c(n, e, s.onEscape) }), e.on("click", ".modal-footer button:not(.disabled)", function (i) { var r = n(this).data("bb-handler"); r !== t && c(i, e, s[r]) }), e.on("click", ".bootbox-close-button", function (n) { c(n, e, s.onEscape) }), e.on("keyup", function (n) { 27 === n.which && e.trigger("escape.close.bb") }), n(i.container).append(e), e.modal({ backdrop: !!i.backdrop && "static", keyboard: !1, show: !1 }), i.show && e.modal("show"), e }, i.alert = function () { var t; if ((t = h("alert", ["ok"], ["message", "callback"], arguments)).callback && !n.isFunction(t.callback)) throw new Error('alert requires the "callback" property to be a function when provided'); return t.buttons.ok.callback = t.onEscape = function () { return !n.isFunction(t.callback) || t.callback.call(this) }, i.dialog(t) }, i.confirm = function () { var t; if (t = h("confirm", ["cancel", "confirm"], ["message", "callback"], arguments), !n.isFunction(t.callback)) throw new Error("confirm requires a callback"); return t.buttons.cancel.callback = t.onEscape = function () { return t.callback.call(this, !1) }, t.buttons.confirm.callback = function () { return t.callback.call(this, !0) }, i.dialog(t) }, i.prompt = function () { var e, l, c, o, w, s, a, b, v, k; if (c = n(r.form), (e = h("prompt", ["cancel", "confirm"], ["title", "callback"], arguments)).value || (e.value = f.value), e.inputType || (e.inputType = f.inputType), w = e.show === t ? f.show : e.show, e.show = !1, e.buttons.cancel.callback = e.onEscape = function () { return e.callback.call(this, null) }, e.buttons.confirm.callback = function () { var t; if ("checkbox" === e.inputType) t = o.find("input:checked").map(function () { return n(this).val() }).get(); else if ("radio" === e.inputType) t = o.find("input:checked").val(); else { if (o[0].checkValidity && !o[0].checkValidity()) return !1; t = "select" === e.inputType && !0 === e.multiple ? o.find("option:selected").map(function () { return n(this).val() }).get() : o.val() } return e.callback.call(this, t) }, !e.title) throw new Error("prompt requires a title"); if (!n.isFunction(e.callback)) throw new Error("prompt requires a callback"); if (!r.inputs[e.inputType]) throw new Error("Invalid prompt type"); switch (o = n(r.inputs[e.inputType]), e.inputType) { case "text": case "textarea": case "email": case "password": o.val(e.value); e.placeholder && o.attr("placeholder", e.placeholder); e.pattern && o.attr("pattern", e.pattern); e.maxlength && o.attr("maxlength", e.maxlength); e.required && o.prop({ required: !0 }); e.rows && !isNaN(parseInt(e.rows)) && "textarea" === e.inputType && o.attr({ rows: e.rows }); break; case "date": case "time": case "number": case "range": if (o.val(e.value), e.placeholder && o.attr("placeholder", e.placeholder), e.pattern && o.attr("pattern", e.pattern), e.required && o.prop({ required: !0 }), "date" !== e.inputType && e.step) { if (!("any" === e.step || !isNaN(e.step) && 0 < parseInt(e.step))) throw new Error('"step" must be a valid positive number or the value "any". See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-step for more information.'); o.attr("step", e.step) } (function (n, i, r) { var e = !1, u = !0, f = !0; if ("date" === n) i === t || (u = p(i)) ? r === t || (f = p(r)) || console.warn('Browsers which natively support the "date" input type expect date values to be of the form "YYYY-MM-DD" (see ISO-8601 https://www.iso.org/iso-8601-date-and-time-format.html). Bootbox does not enforce this rule, but your max value may not be enforced by this browser.') : console.warn('Browsers which natively support the "date" input type expect date values to be of the form "YYYY-MM-DD" (see ISO-8601 https://www.iso.org/iso-8601-date-and-time-format.html). Bootbox does not enforce this rule, but your min value may not be enforced by this browser.'); else if ("time" === n) { if (i !== t && !(u = y(i))) throw new Error('"min" is not a valid time. See https://www.w3.org/TR/2012/WD-html-markup-20120315/datatypes.html#form.data.time for more information.'); if (r !== t && !(f = y(r))) throw new Error('"max" is not a valid time. See https://www.w3.org/TR/2012/WD-html-markup-20120315/datatypes.html#form.data.time for more information.'); } else { if (i !== t && isNaN(i)) throw new Error('"min" must be a valid number. See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-min for more information.'); if (r !== t && isNaN(r)) throw new Error('"max" must be a valid number. See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-max for more information.'); } if (u && f) { if (r <= i) throw new Error('"max" must be greater than "min". See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-max for more information.'); e = !0 } return e })(e.inputType, e.min, e.max) && (e.min !== t && o.attr("min", e.min), e.max !== t && o.attr("max", e.max)); break; case "select": if (a = {}, s = e.inputOptions || [], !n.isArray(s)) throw new Error("Please pass an array of input options"); if (!s.length) throw new Error('prompt with "inputType" set to "select" requires at least one option'); e.placeholder && o.attr("placeholder", e.placeholder); e.required && o.prop({ required: !0 }); e.multiple && o.prop({ multiple: !0 }); u(s, function (i, u) { var e = o, f; if (u.value === t || u.text === t) throw new Error('each option needs a "value" property and a "text" property'); u.group && (a[u.group] || (a[u.group] = n("<optgroup />").attr("label", u.group)), e = a[u.group]); f = n(r.option); f.attr("value", u.value).text(u.text); e.append(f) }); u(a, function (n, t) { o.append(t) }); o.val(e.value); break; case "checkbox": if (b = n.isArray(e.value) ? e.value : [e.value], !(s = e.inputOptions || []).length) throw new Error('prompt with "inputType" set to "checkbox" requires at least one option'); o = n('<div class="bootbox-checkbox-list"><\/div>'); u(s, function (i, f) { if (f.value === t || f.text === t) throw new Error('each option needs a "value" property and a "text" property'); var s = n(r.inputs[e.inputType]); s.find("input").attr("value", f.value); s.find("label").append("\n" + f.text); u(b, function (n, t) { t === f.value && s.find("input").prop("checked", !0) }); o.append(s) }); break; case "radio": if (e.value !== t && n.isArray(e.value)) throw new Error('prompt with "inputType" set to "radio" requires a single, non-array value for "value"'); if (!(s = e.inputOptions || []).length) throw new Error('prompt with "inputType" set to "radio" requires at least one option'); o = n('<div class="bootbox-radiobutton-list"><\/div>'); v = !0; u(s, function (i, u) { if (u.value === t || u.text === t) throw new Error('each option needs a "value" property and a "text" property'); var f = n(r.inputs[e.inputType]); f.find("input").attr("value", u.value); f.find("label").append("\n" + u.text); e.value !== t && u.value === e.value && (f.find("input").prop("checked", !0), v = !1); o.append(f) }); v && o.find('input[type="radio"]').first().prop("checked", !0) }return (c.append(o), c.on("submit", function (n) { n.preventDefault(); n.stopPropagation(); l.find(".bootbox-accept").trigger("click") }), "" !== n.trim(e.message)) ? (k = n(r.promptMessage).html(e.message), c.prepend(k), e.message = c) : e.message = c, (l = i.dialog(e)).off("shown.bs.modal"), l.on("shown.bs.modal", function () { o.focus() }), !0 === w && l.modal("show"), l }, i.addLocale("en", { OK: "OK", CANCEL: "Cancel", CONFIRM: "OK" }), i }), function (n, t) { typeof exports == "object" && typeof module == "object" ? module.exports = t() : typeof define == "function" && define.amd ? define([], t) : typeof exports == "object" ? exports.signalR = t() : n.signalR = t() }(window, function () {
  34. return function (n) { function t(r) { if (i[r]) return i[r].exports; var u = i[r] = { i: r, l: !1, exports: {} }; return n[r].call(u.exports, u, u.exports, t), u.l = !0, u.exports } var i = {}; return t.m = n, t.c = i, t.d = function (n, i, r) { t.o(n, i) || Object.defineProperty(n, i, { enumerable: !0, get: r }) }, t.r = function (n) { typeof Symbol != "undefined" && Symbol.toStringTag && Object.defineProperty(n, Symbol.toStringTag, { value: "Module" }); Object.defineProperty(n, "__esModule", { value: !0 }) }, t.t = function (n, i) { var r, u; if ((i & 1 && (n = t(n)), i & 8) || i & 4 && typeof n == "object" && n && n.__esModule) return n; if (r = Object.create(null), t.r(r), Object.defineProperty(r, "default", { enumerable: !0, value: n }), i & 2 && typeof n != "string") for (u in n) t.d(r, u, function (t) { return n[t] }.bind(null, u)); return r }, t.n = function (n) { var i = n && n.__esModule ? function () { return n["default"] } : function () { return n }; return t.d(i, "a", i), i }, t.o = function (n, t) { return Object.prototype.hasOwnProperty.call(n, t) }, t.p = "", t(t.s = 0) }([function (n, t, i) { "use strict"; i.r(t); var u = i(1), f = i.n(u), r = i(3); i.d(t, "VERSION", function () { return r.VERSION }); i.d(t, "AbortError", function () { return r.AbortError }); i.d(t, "HttpError", function () { return r.HttpError }); i.d(t, "TimeoutError", function () { return r.TimeoutError }); i.d(t, "HttpClient", function () { return r.HttpClient }); i.d(t, "HttpResponse", function () { return r.HttpResponse }); i.d(t, "DefaultHttpClient", function () { return r.DefaultHttpClient }); i.d(t, "HubConnection", function () { return r.HubConnection }); i.d(t, "HubConnectionState", function () { return r.HubConnectionState }); i.d(t, "HubConnectionBuilder", function () { return r.HubConnectionBuilder }); i.d(t, "MessageType", function () { return r.MessageType }); i.d(t, "LogLevel", function () { return r.LogLevel }); i.d(t, "HttpTransportType", function () { return r.HttpTransportType }); i.d(t, "TransferFormat", function () { return r.TransferFormat }); i.d(t, "NullLogger", function () { return r.NullLogger }); i.d(t, "JsonHubProtocol", function () { return r.JsonHubProtocol }); i.d(t, "Subject", function () { return r.Subject }); Uint8Array.prototype.indexOf || Object.defineProperty(Uint8Array.prototype, "indexOf", { value: Array.prototype.indexOf, writable: !0 }); Uint8Array.prototype.slice || Object.defineProperty(Uint8Array.prototype, "slice", { value: function (n, t) { return new Uint8Array(Array.prototype.slice.call(this, n, t)) }, writable: !0 }); Uint8Array.prototype.forEach || Object.defineProperty(Uint8Array.prototype, "forEach", { value: Array.prototype.forEach, writable: !0 }) }, function (n, t, i) {
  35. (function (t) {
  36. var r;
  37. /*!
  38. * @overview es6-promise - a tiny implementation of Promises/A+.
  39. * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)
  40. * @license Licensed under MIT license
  41. * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE
  42. * @version v4.2.2+97478eb6
  43. */
  44. (function (t, i) { n.exports = i() })(this, function () { "use strict"; function kt(n) { var t = typeof n; return n !== null && (t === "object" || t === "function") } function et(n) { return typeof n == "function" } function dt(n) { d = n } function gt(n) { e = n } function ii() { return function () { return process.nextTick(h) } } function ri() { return typeof k != "undefined" ? function () { k(h) } : g() } function ui() { var n = 0, i = new lt(h), t = document.createTextNode(""); return i.observe(t, { characterData: !0 }), function () { t.data = n = ++n % 2 } } function fi() { var n = new MessageChannel; return n.port1.onmessage = h, function () { return n.port2.postMessage(0) } } function g() { var n = setTimeout; return function () { return n(h, 1) } } function h() { for (var t, i, n = 0; n < s; n += 2)t = o[n], i = o[n + 1], t(i), o[n] = undefined, o[n + 1] = undefined; s = 0 } function ei() { try { var t = r, n = i(!function () { var n = new Error("Cannot find module 'vertx'"); n.code = "MODULE_NOT_FOUND"; throw n; }()); return k = n.runOnLoop || n.runOnContext, ri() } catch (f) { return g() } } function tt(n, t) { var u = this, i = new this.constructor(c), r, f; return i[v] === undefined && wt(i), r = u._state, r ? (f = arguments[r - 1], e(function () { return pt(r, i, f, u._result) })) : rt(u, i, n, t), i } function it(n) { var i = this, t; return n && typeof n == "object" && n.constructor === i ? n : (t = new i(c), w(t, n), t) } function c() { } function oi() { return new TypeError("You cannot resolve a promise with itself") } function si() { return new TypeError("A promises callback cannot return that same promise.") } function at(n) { try { return n.then } catch (t) { return p.error = t, p } } function hi(n, t, i, r) { try { n.call(t, i, r) } catch (u) { return u } } function ci(n, t, i) { e(function (n) { var r = !1, e = hi(i, t, function (i) { r || (r = !0, t !== i ? w(n, i) : f(n, i)) }, function (t) { r || (r = !0, u(n, t)) }, "Settle: " + (n._label || " unknown promise")); !r && e && (r = !0, u(n, e)) }, n) } function li(n, t) { t._state === y ? f(n, t._result) : t._state === a ? u(n, t._result) : rt(t, undefined, function (t) { return w(n, t) }, function (t) { return u(n, t) }) } function vt(n, t, i) { t.constructor === n.constructor && i === tt && t.constructor.resolve === it ? li(n, t) : i === p ? (u(n, p.error), p.error = null) : i === undefined ? f(n, t) : et(i) ? ci(n, t, i) : f(n, t) } function w(n, t) { n === t ? u(n, oi()) : kt(t) ? vt(n, t, at(t)) : f(n, t) } function ai(n) { n._onerror && n._onerror(n._result); ut(n) } function f(n, t) { n._state === l && (n._result = t, n._state = y, n._subscribers.length !== 0 && e(ut, n)) } function u(n, t) { n._state === l && (n._state = a, n._result = t, e(ai, n)) } function rt(n, t, i, r) { var u = n._subscribers, f = u.length; n._onerror = null; u[f] = t; u[f + y] = i; u[f + a] = r; f === 0 && n._state && e(ut, n) } function ut(n) { var i = n._subscribers, f = n._state, t; if (i.length !== 0) { var r = void 0, u = void 0, e = n._result; for (t = 0; t < i.length; t += 3)r = i[t], u = i[t + f], r ? pt(f, r, u, e) : u(e); n._subscribers.length = 0 } } function yt() { this.error = null } function vi(n, t) { try { return n(t) } catch (i) { return b.error = i, b } } function pt(n, t, i, r) { var s = et(i), e = void 0, h = void 0, o = void 0, c = void 0; if (s) { if (e = vi(i, r), e === b ? (c = !0, h = e.error, e.error = null) : o = !0, t === e) { u(t, si()); return } } else e = r, o = !0; t._state !== l || (s && o ? w(t, e) : c ? u(t, h) : n === y ? f(t, e) : n === a && u(t, e)) } function yi(n, t) { try { t(function (t) { w(n, t) }, function (t) { u(n, t) }) } catch (i) { u(n, i) } } function pi() { return ft++ } function wt(n) { n[v] = ft++; n._state = undefined; n._result = undefined; n._subscribers = [] } function wi() { return new Error("Array Methods must be provided an Array") } function wi() { return new Error("Array Methods must be provided an Array") } function bi(n) { return new bt(this, n).promise } function ki(n) { var t = this; return st(n) ? new t(function (i, r) { for (var f = n.length, u = 0; u < f; u++)t.resolve(n[u]).then(i, r) }) : new t(function (n, t) { return t(new TypeError("You must pass an array to race.")) }) } function di(n) { var i = this, t = new i(c); return u(t, n), t } function gi() { throw new TypeError("You must pass a resolver function as the first argument to the promise constructor"); } function nr() { throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function."); } function tr() { var i = void 0, r, u; if (typeof t != "undefined") i = t; else if (typeof self != "undefined") i = self; else try { i = Function("return this")() } catch (f) { throw new Error("polyfill failed because global object is unavailable in this environment"); } if (r = i.Promise, r) { u = null; try { u = Object.prototype.toString.call(r.resolve()) } catch (f) { } if (u === "[object Promise]" && !r.cast) return } i.Promise = n } var ot = void 0, o, nt, v, b, ft, bt, n; ot = Array.isArray ? Array.isArray : function (n) { return Object.prototype.toString.call(n) === "[object Array]" }; var st = ot, s = 0, k = void 0, d = void 0, e = function (n, t) { o[s] = n; o[s + 1] = t; s += 2; s === 2 && (d ? d(h) : nt()) }; var ht = typeof window != "undefined" ? window : undefined, ct = ht || {}, lt = ct.MutationObserver || ct.WebKitMutationObserver, ni = typeof self == "undefined" && typeof process != "undefined" && {}.toString.call(process) === "[object process]", ti = typeof Uint8ClampedArray != "undefined" && typeof importScripts != "undefined" && typeof MessageChannel != "undefined"; o = new Array(1e3); nt = void 0; nt = ni ? ii() : lt ? ui() : ti ? fi() : ht === undefined && !0 ? ei() : g(); v = Math.random().toString(36).substring(16); var l = void 0, y = 1, a = 2, p = new yt; return b = new yt, ft = 0, bt = function () { function t(n, t) { this._instanceConstructor = n; this.promise = new n(c); this.promise[v] || wt(this.promise); st(t) ? (this.length = t.length, this._remaining = t.length, this._result = new Array(this.length), this.length === 0 ? f(this.promise, this._result) : (this.length = this.length || 0, this._enumerate(t), this._remaining === 0 && f(this.promise, this._result))) : u(this.promise, wi()) } return t.prototype._enumerate = function (n) { for (var t = 0; this._state === l && t < n.length; t++)this._eachEntry(n[t], t) }, t.prototype._eachEntry = function (t, i) { var r = this._instanceConstructor, e = r.resolve, u, f; e === it ? (u = at(t), u === tt && t._state !== l ? this._settledAt(t._state, i, t._result) : typeof u != "function" ? (this._remaining--, this._result[i] = t) : r === n ? (f = new r(c), vt(f, t, u), this._willSettleAt(f, i)) : this._willSettleAt(new r(function (n) { return n(t) }), i)) : this._willSettleAt(e(t), i) }, t.prototype._settledAt = function (n, t, i) { var r = this.promise; r._state === l && (this._remaining--, n === a ? u(r, i) : this._result[t] = i); this._remaining === 0 && f(r, this._result) }, t.prototype._willSettleAt = function (n, t) { var i = this; rt(n, undefined, function (n) { return i._settledAt(y, t, n) }, function (n) { return i._settledAt(a, t, n) }) }, t }(), n = function () { function n(t) { this[v] = pi(); this._result = this._state = undefined; this._subscribers = []; c !== t && (typeof t != "function" && gi(), this instanceof n ? yi(this, t) : nr()) } return n.prototype.catch = function (n) { return this.then(null, n) }, n.prototype.finally = function (n) { var t = this, i = t.constructor; return t.then(function (t) { return i.resolve(n()).then(function () { return t }) }, function (t) { return i.resolve(n()).then(function () { throw t; }) }) }, n }(), n.prototype.then = tt, n.all = bi, n.race = ki, n.resolve = it, n.reject = di, n._setScheduler = dt, n._setAsap = gt, n._asap = e, n.polyfill = tr, n.Promise = n, n.polyfill(), n })
  45. }).call(this, i(2))
  46. }, function (n) { var t = function () { return this }(); try { t = t || new Function("return this")() } catch (i) { typeof window == "object" && (t = window) } n.exports = t }, function (n, t, i) { "use strict"; var r, u, o, f, s, h, c, e, l, a, v, y; i.r(t); i.d(t, "VERSION", function () { return y }); r = i(4); i.d(t, "AbortError", function () { return r.AbortError }); i.d(t, "HttpError", function () { return r.HttpError }); i.d(t, "TimeoutError", function () { return r.TimeoutError }); u = i(5); i.d(t, "HttpClient", function () { return u.HttpClient }); i.d(t, "HttpResponse", function () { return u.HttpResponse }); o = i(6); i.d(t, "DefaultHttpClient", function () { return o.DefaultHttpClient }); f = i(10); i.d(t, "HubConnection", function () { return f.HubConnection }); i.d(t, "HubConnectionState", function () { return f.HubConnectionState }); s = i(17); i.d(t, "HubConnectionBuilder", function () { return s.HubConnectionBuilder }); h = i(15); i.d(t, "MessageType", function () { return h.MessageType }); c = i(9); i.d(t, "LogLevel", function () { return c.LogLevel }); e = i(20); i.d(t, "HttpTransportType", function () { return e.HttpTransportType }); i.d(t, "TransferFormat", function () { return e.TransferFormat }); l = i(14); i.d(t, "NullLogger", function () { return l.NullLogger }); a = i(25); i.d(t, "JsonHubProtocol", function () { return a.JsonHubProtocol }); v = i(16); i.d(t, "Subject", function () { return v.Subject }); y = "3.1.8" }, function (n, t, i) { "use strict"; i.r(t); i.d(t, "HttpError", function () { return u }); i.d(t, "TimeoutError", function () { return f }); i.d(t, "AbortError", function () { return e }); var r = undefined && undefined.__extends || function () { var n = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function (n, t) { n.__proto__ = t } || function (n, t) { for (var i in t) t.hasOwnProperty(i) && (n[i] = t[i]) }; return function (t, i) { function r() { this.constructor = t } n(t, i); t.prototype = i === null ? Object.create(i) : (r.prototype = i.prototype, new r) } }(), u = function (n) { function t(t, i) { var u = this.constructor, r = this, f = u.prototype; return r = n.call(this, t) || this, r.statusCode = i, r.__proto__ = f, r } return r(t, n), t }(Error), f = function (n) { function t(t) { var u = this.constructor, i, r; return t === void 0 && (t = "A timeout occurred."), i = this, r = u.prototype, i = n.call(this, t) || this, i.__proto__ = r, i } return r(t, n), t }(Error), e = function (n) { function t(t) { var u = this.constructor, i, r; return t === void 0 && (t = "An abort occurred."), i = this, r = u.prototype, i = n.call(this, t) || this, i.__proto__ = r, i } return r(t, n), t }(Error) }, function (n, t, i) { "use strict"; i.r(t); i.d(t, "HttpResponse", function () { return u }); i.d(t, "HttpClient", function () { return f }); var r = undefined && undefined.__assign || Object.assign || function (n) { for (var t, r, i = 1, u = arguments.length; i < u; i++) { t = arguments[i]; for (r in t) Object.prototype.hasOwnProperty.call(t, r) && (n[r] = t[r]) } return n }, u = function () { function n(n, t, i) { this.statusCode = n; this.statusText = t; this.content = i } return n }(), f = function () { function n() { } return n.prototype.get = function (n, t) { return this.send(r({}, t, { method: "GET", url: n })) }, n.prototype.post = function (n, t) { return this.send(r({}, t, { method: "POST", url: n })) }, n.prototype.delete = function (n, t) { return this.send(r({}, t, { method: "DELETE", url: n })) }, n.prototype.getCookieString = function () { return "" }, n }() }, function (n, t, i) { "use strict"; i.r(t); i.d(t, "DefaultHttpClient", function () { return s }); var r = i(4), u = i(5), f = i(7), e = i(8), o = undefined && undefined.__extends || function () { var n = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function (n, t) { n.__proto__ = t } || function (n, t) { for (var i in t) t.hasOwnProperty(i) && (n[i] = t[i]) }; return function (t, i) { function r() { this.constructor = t } n(t, i); t.prototype = i === null ? Object.create(i) : (r.prototype = i.prototype, new r) } }(), s = function (n) { function t(t) { var i = n.call(this) || this; return i.httpClient = typeof XMLHttpRequest != "undefined" ? new e.XhrHttpClient(t) : new f.NodeHttpClient(t), i } return o(t, n), t.prototype.send = function (n) { return n.abortSignal && n.abortSignal.aborted ? Promise.reject(new r.AbortError) : n.method ? n.url ? this.httpClient.send(n) : Promise.reject(new Error("No url defined.")) : Promise.reject(new Error("No method defined.")) }, t.prototype.getCookieString = function (n) { return this.httpClient.getCookieString(n) }, t }(u.HttpClient) }, function (n, t, i) { "use strict"; i.r(t); i.d(t, "NodeHttpClient", function () { return f }); var r = i(5), u = undefined && undefined.__extends || function () { var n = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function (n, t) { n.__proto__ = t } || function (n, t) { for (var i in t) t.hasOwnProperty(i) && (n[i] = t[i]) }; return function (t, i) { function r() { this.constructor = t } n(t, i); t.prototype = i === null ? Object.create(i) : (r.prototype = i.prototype, new r) } }(), f = function (n) { function t() { return n.call(this) || this } return u(t, n), t.prototype.send = function () { return Promise.reject(new Error("If using Node either provide an XmlHttpRequest polyfill or consume the cjs or esm script instead of the browser/signalr.js one.")) }, t }(r.HttpClient) }, function (n, t, i) { "use strict"; i.r(t); i.d(t, "XhrHttpClient", function () { return o }); var r = i(4), u = i(5), f = i(9), e = undefined && undefined.__extends || function () { var n = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function (n, t) { n.__proto__ = t } || function (n, t) { for (var i in t) t.hasOwnProperty(i) && (n[i] = t[i]) }; return function (t, i) { function r() { this.constructor = t } n(t, i); t.prototype = i === null ? Object.create(i) : (r.prototype = i.prototype, new r) } }(), o = function (n) { function t(t) { var i = n.call(this) || this; return i.logger = t, i } return e(t, n), t.prototype.send = function (n) { var t = this; return n.abortSignal && n.abortSignal.aborted ? Promise.reject(new r.AbortError) : n.method ? n.url ? new Promise(function (i, e) { var o = new XMLHttpRequest, s; o.open(n.method, n.url, !0); o.withCredentials = !1; o.setRequestHeader("X-Requested-With", "XMLHttpRequest"); o.setRequestHeader("Content-Type", "text/plain;charset=UTF-8"); s = n.headers; s && Object.keys(s).forEach(function (n) { o.setRequestHeader(n, s[n]) }); n.responseType && (o.responseType = n.responseType); n.abortSignal && (n.abortSignal.onabort = function () { o.abort(); e(new r.AbortError) }); n.timeout && (o.timeout = n.timeout); o.onload = function () { n.abortSignal && (n.abortSignal.onabort = null); o.status >= 200 && o.status < 300 ? i(new u.HttpResponse(o.status, o.statusText, o.response || o.responseText)) : e(new r.HttpError(o.statusText, o.status)) }; o.onerror = function () { t.logger.log(f.LogLevel.Warning, "Error from HTTP request. " + o.status + ": " + o.statusText + "."); e(new r.HttpError(o.statusText, o.status)) }; o.ontimeout = function () { t.logger.log(f.LogLevel.Warning, "Timeout from HTTP request."); e(new r.TimeoutError) }; o.send(n.content || "") }) : Promise.reject(new Error("No url defined.")) : Promise.reject(new Error("No method defined.")) }, t }(u.HttpClient) }, function (n, t, i) { "use strict"; i.r(t); i.d(t, "LogLevel", function () { return r }); var r; (function (n) { n[n.Trace = 0] = "Trace"; n[n.Debug = 1] = "Debug"; n[n.Information = 2] = "Information"; n[n.Warning = 3] = "Warning"; n[n.Error = 4] = "Error"; n[n.Critical = 5] = "Critical"; n[n.None = 6] = "None" })(r || (r = {})) }, function (n, t, i) { "use strict"; var h; i.r(t); i.d(t, "HubConnectionState", function () { return u }); i.d(t, "HubConnection", function () { return h }); var c = i(11), f = i(15), r = i(9), l = i(16), s = i(13), e = undefined && undefined.__awaiter || function (n, t, i, r) { return new (i || (i = Promise))(function (u, f) { function o(n) { try { e(r.next(n)) } catch (t) { f(t) } } function s(n) { try { e(r["throw"](n)) } catch (t) { f(t) } } function e(n) { n.done ? u(n.value) : new i(function (t) { t(n.value) }).then(o, s) } e((r = r.apply(n, t || [])).next()) }) }, o = undefined && undefined.__generator || function (n, t) { function o(n) { return function (t) { return s([n, t]) } } function s(e) { if (f) throw new TypeError("Generator is already executing."); while (r) try { if (f = 1, u && (i = e[0] & 2 ? u["return"] : e[0] ? u["throw"] || ((i = u["return"]) && i.call(u), 0) : u.next) && !(i = i.call(u, e[1])).done) return i; (u = 0, i) && (e = [e[0] & 2, i.value]); switch (e[0]) { case 0: case 1: i = e; break; case 4: return r.label++, { value: e[1], done: !1 }; case 5: r.label++; u = e[1]; e = [0]; continue; case 7: e = r.ops.pop(); r.trys.pop(); continue; default: if (!(i = r.trys, i = i.length > 0 && i[i.length - 1]) && (e[0] === 6 || e[0] === 2)) { r = 0; continue } if (e[0] === 3 && (!i || e[1] > i[0] && e[1] < i[3])) { r.label = e[1]; break } if (e[0] === 6 && r.label < i[1]) { r.label = i[1]; i = e; break } if (i && r.label < i[2]) { r.label = i[2]; r.ops.push(e); break } i[2] && r.ops.pop(); r.trys.pop(); continue }e = t.call(n, r) } catch (o) { e = [6, o]; u = 0 } finally { f = i = 0 } if (e[0] & 5) throw e[1]; return { value: e[0] ? e[1] : void 0, done: !0 } } var r = { label: 0, sent: function () { if (i[0] & 1) throw i[1]; return i[1] }, trys: [], ops: [] }, f, u, i, e; return e = { next: o(0), "throw": o(1), "return": o(2) }, typeof Symbol == "function" && (e[Symbol.iterator] = function () { return this }), e }, a = 3e4, v = 15e3, u; (function (n) { n.Disconnected = "Disconnected"; n.Connecting = "Connecting"; n.Connected = "Connected"; n.Disconnecting = "Disconnecting"; n.Reconnecting = "Reconnecting" })(u || (u = {})); h = function () { function n(n, t, i, r) { var e = this; s.Arg.isRequired(n, "connection"); s.Arg.isRequired(t, "logger"); s.Arg.isRequired(i, "protocol"); this.serverTimeoutInMilliseconds = a; this.keepAliveIntervalInMilliseconds = v; this.logger = t; this.protocol = i; this.connection = n; this.reconnectPolicy = r; this.handshakeProtocol = new c.HandshakeProtocol; this.connection.onreceive = function (n) { return e.processIncomingData(n) }; this.connection.onclose = function (n) { return e.connectionClosed(n) }; this.callbacks = {}; this.methods = {}; this.closedCallbacks = []; this.reconnectingCallbacks = []; this.reconnectedCallbacks = []; this.invocationId = 0; this.receivedHandshakeResponse = !1; this.connectionState = u.Disconnected; this.connectionStarted = !1; this.cachedPingMessage = this.protocol.writeMessage({ type: f.MessageType.Ping }) } return n.create = function (t, i, r, u) { return new n(t, i, r, u) }, Object.defineProperty(n.prototype, "state", { get: function () { return this.connectionState }, enumerable: !0, configurable: !0 }), Object.defineProperty(n.prototype, "connectionId", { get: function () { return this.connection ? this.connection.connectionId || null : null }, enumerable: !0, configurable: !0 }), Object.defineProperty(n.prototype, "baseUrl", { get: function () { return this.connection.baseUrl || "" }, set: function (n) { if (this.connectionState !== u.Disconnected && this.connectionState !== u.Reconnecting) throw new Error("The HubConnection must be in the Disconnected or Reconnecting state to change the url."); if (!n) throw new Error("The HubConnection url must be a valid url."); this.connection.baseUrl = n }, enumerable: !0, configurable: !0 }), n.prototype.start = function () { return this.startPromise = this.startWithStateTransitions(), this.startPromise }, n.prototype.startWithStateTransitions = function () { return e(this, void 0, void 0, function () { var n; return o(this, function (t) { switch (t.label) { case 0: if (this.connectionState !== u.Disconnected) return [2, Promise.reject(new Error("Cannot start a HubConnection that is not in the 'Disconnected' state."))]; this.connectionState = u.Connecting; this.logger.log(r.LogLevel.Debug, "Starting HubConnection."); t.label = 1; case 1: return t.trys.push([1, 3, , 4]), [4, this.startInternal()]; case 2: return t.sent(), this.connectionState = u.Connected, this.connectionStarted = !0, this.logger.log(r.LogLevel.Debug, "HubConnection connected successfully."), [3, 4]; case 3: return n = t.sent(), this.connectionState = u.Disconnected, this.logger.log(r.LogLevel.Debug, "HubConnection failed to start successfully because of error '" + n + "'."), [2, Promise.reject(n)]; case 4: return [2] } }) }) }, n.prototype.startInternal = function () { return e(this, void 0, void 0, function () { var t, i, n, u = this; return o(this, function (f) { switch (f.label) { case 0: return this.stopDuringStartError = undefined, this.receivedHandshakeResponse = !1, t = new Promise(function (n, t) { u.handshakeResolver = n; u.handshakeRejecter = t }), [4, this.connection.start(this.protocol.transferFormat)]; case 1: f.sent(); f.label = 2; case 2: return f.trys.push([2, 5, , 7]), i = { protocol: this.protocol.name, version: this.protocol.version }, this.logger.log(r.LogLevel.Debug, "Sending handshake request."), [4, this.sendMessage(this.handshakeProtocol.writeHandshakeRequest(i))]; case 3: return f.sent(), this.logger.log(r.LogLevel.Information, "Using HubProtocol '" + this.protocol.name + "'."), this.cleanupTimeout(), this.resetTimeoutPeriod(), this.resetKeepAliveInterval(), [4, t]; case 4: if (f.sent(), this.stopDuringStartError) throw this.stopDuringStartError; return [3, 7]; case 5: return n = f.sent(), this.logger.log(r.LogLevel.Debug, "Hub handshake failed with error '" + n + "' during start(). Stopping HubConnection."), this.cleanupTimeout(), this.cleanupPingTimer(), [4, this.connection.stop(n)]; case 6: f.sent(); throw n; case 7: return [2] } }) }) }, n.prototype.stop = function () { return e(this, void 0, void 0, function () { var n, t; return o(this, function (i) { switch (i.label) { case 0: return n = this.startPromise, this.stopPromise = this.stopInternal(), [4, this.stopPromise]; case 1: i.sent(); i.label = 2; case 2: return i.trys.push([2, 4, , 5]), [4, n]; case 3: return i.sent(), [3, 5]; case 4: return t = i.sent(), [3, 5]; case 5: return [2] } }) }) }, n.prototype.stopInternal = function (n) { return this.connectionState === u.Disconnected ? (this.logger.log(r.LogLevel.Debug, "Call to HubConnection.stop(" + n + ") ignored because it is already in the disconnected state."), Promise.resolve()) : this.connectionState === u.Disconnecting ? (this.logger.log(r.LogLevel.Debug, "Call to HttpConnection.stop(" + n + ") ignored because the connection is already in the disconnecting state."), this.stopPromise) : (this.connectionState = u.Disconnecting, this.logger.log(r.LogLevel.Debug, "Stopping HubConnection."), this.reconnectDelayHandle) ? (this.logger.log(r.LogLevel.Debug, "Connection stopped during reconnect delay. Done reconnecting."), clearTimeout(this.reconnectDelayHandle), this.reconnectDelayHandle = undefined, this.completeClose(), Promise.resolve()) : (this.cleanupTimeout(), this.cleanupPingTimer(), this.stopDuringStartError = n || new Error("The connection was stopped before the hub handshake could complete."), this.connection.stop(n)) }, n.prototype.stream = function (n) { for (var r = this, e = [], u = 1; u < arguments.length; u++)e[u - 1] = arguments[u]; var s = this.replaceStreamingParams(e), h = s[0], c = s[1], i = this.createStreamInvocation(n, e, c), o, t = new l.Subject; return t.cancelCallback = function () { var n = r.createCancelInvocation(i.invocationId); return delete r.callbacks[i.invocationId], o.then(function () { return r.sendWithProtocol(n) }) }, this.callbacks[i.invocationId] = function (n, i) { if (i) { t.error(i); return } n && (n.type === f.MessageType.Completion ? n.error ? t.error(new Error(n.error)) : t.complete() : t.next(n.item)) }, o = this.sendWithProtocol(i).catch(function (n) { t.error(n); delete r.callbacks[i.invocationId] }), this.launchStreams(h, o), t }, n.prototype.sendMessage = function (n) { return this.resetKeepAliveInterval(), this.connection.send(n) }, n.prototype.sendWithProtocol = function (n) { return this.sendMessage(this.protocol.writeMessage(n)) }, n.prototype.send = function (n) { for (var i = [], t = 1; t < arguments.length; t++)i[t - 1] = arguments[t]; var r = this.replaceStreamingParams(i), f = r[0], e = r[1], u = this.sendWithProtocol(this.createInvocation(n, i, !0, e)); return this.launchStreams(f, u), u }, n.prototype.invoke = function (n) { for (var t = this, r = [], i = 1; i < arguments.length; i++)r[i - 1] = arguments[i]; var e = this.replaceStreamingParams(r), o = e[0], s = e[1], u = this.createInvocation(n, r, !1, s); return new Promise(function (n, i) { t.callbacks[u.invocationId] = function (t, r) { if (r) { i(r); return } t && (t.type === f.MessageType.Completion ? t.error ? i(new Error(t.error)) : n(t.result) : i(new Error("Unexpected message type: " + t.type))) }; var r = t.sendWithProtocol(u).catch(function (n) { i(n); delete t.callbacks[u.invocationId] }); t.launchStreams(o, r) }) }, n.prototype.on = function (n, t) { n && t && (n = n.toLowerCase(), this.methods[n] || (this.methods[n] = []), this.methods[n].indexOf(t) === -1) && this.methods[n].push(t) }, n.prototype.off = function (n, t) { var i, r; n && (n = n.toLowerCase(), i = this.methods[n], i) && (t ? (r = i.indexOf(t), r !== -1 && (i.splice(r, 1), i.length === 0 && delete this.methods[n])) : delete this.methods[n]) }, n.prototype.onclose = function (n) { n && this.closedCallbacks.push(n) }, n.prototype.onreconnecting = function (n) { n && this.reconnectingCallbacks.push(n) }, n.prototype.onreconnected = function (n) { n && this.reconnectedCallbacks.push(n) }, n.prototype.processIncomingData = function (n) { var s, i, u, t, e, o; if (this.cleanupTimeout(), this.receivedHandshakeResponse || (n = this.processHandshakeResponse(n), this.receivedHandshakeResponse = !0), n) for (s = this.protocol.parseMessages(n, this.logger), i = 0, u = s; i < u.length; i++) { t = u[i]; switch (t.type) { case f.MessageType.Invocation: this.invokeClientMethod(t); break; case f.MessageType.StreamItem: case f.MessageType.Completion: e = this.callbacks[t.invocationId]; e && (t.type === f.MessageType.Completion && delete this.callbacks[t.invocationId], e(t)); break; case f.MessageType.Ping: break; case f.MessageType.Close: this.logger.log(r.LogLevel.Information, "Close message received from server."); o = t.error ? new Error("Server returned an error on close: " + t.error) : undefined; t.allowReconnect === !0 ? this.connection.stop(o) : this.stopPromise = this.stopInternal(o); break; default: this.logger.log(r.LogLevel.Warning, "Invalid message type: " + t.type + ".") } } this.resetTimeoutPeriod() }, n.prototype.processHandshakeResponse = function (n) { var u, f, e, t, i; try { u = this.handshakeProtocol.parseHandshakeResponse(n); e = u[0]; f = u[1] } catch (o) { t = "Error parsing handshake response: " + o; this.logger.log(r.LogLevel.Error, t); i = new Error(t); this.handshakeRejecter(i); throw i; } if (f.error) { t = "Server returned handshake error: " + f.error; this.logger.log(r.LogLevel.Error, t); i = new Error(t); this.handshakeRejecter(i); throw i; } else this.logger.log(r.LogLevel.Debug, "Server handshake complete."); return this.handshakeResolver(), e }, n.prototype.resetKeepAliveInterval = function () { var n = this; this.cleanupPingTimer(); this.pingServerHandle = setTimeout(function () { return e(n, void 0, void 0, function () { var n; return o(this, function (t) { switch (t.label) { case 0: if (!(this.connectionState === u.Connected)) return [3, 4]; t.label = 1; case 1: return t.trys.push([1, 3, , 4]), [4, this.sendMessage(this.cachedPingMessage)]; case 2: return t.sent(), [3, 4]; case 3: return n = t.sent(), this.cleanupPingTimer(), [3, 4]; case 4: return [2] } }) }) }, this.keepAliveIntervalInMilliseconds) }, n.prototype.resetTimeoutPeriod = function () { var n = this; this.connection.features && this.connection.features.inherentKeepAlive || (this.timeoutHandle = setTimeout(function () { return n.serverTimeout() }, this.serverTimeoutInMilliseconds)) }, n.prototype.serverTimeout = function () { this.connection.stop(new Error("Server timeout elapsed without receiving a message from the server.")) }, n.prototype.invokeClientMethod = function (n) { var u = this, i = this.methods[n.target.toLowerCase()], t; if (i) { try { i.forEach(function (t) { return t.apply(u, n.arguments) }) } catch (f) { this.logger.log(r.LogLevel.Error, "A callback for the method " + n.target.toLowerCase() + " threw error '" + f + "'.") } n.invocationId && (t = "Server requested a response, which is not supported in this version of the client.", this.logger.log(r.LogLevel.Error, t), this.stopPromise = this.stopInternal(new Error(t))) } else this.logger.log(r.LogLevel.Warning, "No client method with the name '" + n.target + "' found.") }, n.prototype.connectionClosed = function (n) { this.logger.log(r.LogLevel.Debug, "HubConnection.connectionClosed(" + n + ") called while in state " + this.connectionState + "."); this.stopDuringStartError = this.stopDuringStartError || n || new Error("The underlying connection was closed before the hub handshake could complete."); this.handshakeResolver && this.handshakeResolver(); this.cancelCallbacksWithError(n || new Error("Invocation canceled due to the underlying connection being closed.")); this.cleanupTimeout(); this.cleanupPingTimer(); this.connectionState === u.Disconnecting ? this.completeClose(n) : this.connectionState === u.Connected && this.reconnectPolicy ? this.reconnect(n) : this.connectionState === u.Connected && this.completeClose(n) }, n.prototype.completeClose = function (n) { var t = this; if (this.connectionStarted) { this.connectionState = u.Disconnected; this.connectionStarted = !1; try { this.closedCallbacks.forEach(function (i) { return i.apply(t, [n]) }) } catch (i) { this.logger.log(r.LogLevel.Error, "An onclose callback called with error '" + n + "' threw error '" + i + "'.") } } }, n.prototype.reconnect = function (n) { return e(this, void 0, void 0, function () { var h, i, e, t, f, s = this; return o(this, function (o) { switch (o.label) { case 0: if (h = Date.now(), i = 0, e = n !== undefined ? n : new Error("Attempting to reconnect due to a unknown error."), t = this.getNextRetryDelay(i++, 0, e), t === null) return this.logger.log(r.LogLevel.Debug, "Connection not reconnecting because the IRetryPolicy returned null on the first reconnect attempt."), this.completeClose(n), [2]; if (this.connectionState = u.Reconnecting, n ? this.logger.log(r.LogLevel.Information, "Connection reconnecting because of error '" + n + "'.") : this.logger.log(r.LogLevel.Information, "Connection reconnecting."), this.onreconnecting) { try { this.reconnectingCallbacks.forEach(function (t) { return t.apply(s, [n]) }) } catch (c) { this.logger.log(r.LogLevel.Error, "An onreconnecting callback called with error '" + n + "' threw error '" + c + "'.") } if (this.connectionState !== u.Reconnecting) return this.logger.log(r.LogLevel.Debug, "Connection left the reconnecting state in onreconnecting callback. Done reconnecting."), [2] } o.label = 1; case 1: return (t !== null) ? (this.logger.log(r.LogLevel.Information, "Reconnect attempt number " + i + " will start in " + t + " ms."), [4, new Promise(function (n) { s.reconnectDelayHandle = setTimeout(n, t) })]) : [3, 7]; case 2: if (o.sent(), this.reconnectDelayHandle = undefined, this.connectionState !== u.Reconnecting) return this.logger.log(r.LogLevel.Debug, "Connection left the reconnecting state during reconnect delay. Done reconnecting."), [2]; o.label = 3; case 3: return o.trys.push([3, 5, , 6]), [4, this.startInternal()]; case 4: if (o.sent(), this.connectionState = u.Connected, this.logger.log(r.LogLevel.Information, "HubConnection reconnected successfully."), this.onreconnected) try { this.reconnectedCallbacks.forEach(function (n) { return n.apply(s, [s.connection.connectionId]) }) } catch (c) { this.logger.log(r.LogLevel.Error, "An onreconnected callback called with connectionId '" + this.connection.connectionId + "; threw error '" + c + "'.") } return [2]; case 5: return (f = o.sent(), this.logger.log(r.LogLevel.Information, "Reconnect attempt failed because of error '" + f + "'."), this.connectionState !== u.Reconnecting) ? (this.logger.log(r.LogLevel.Debug, "Connection left the reconnecting state during reconnect attempt. Done reconnecting."), [2]) : (e = f instanceof Error ? f : new Error(f.toString()), t = this.getNextRetryDelay(i++, Date.now() - h, e), [3, 6]); case 6: return [3, 1]; case 7: return this.logger.log(r.LogLevel.Information, "Reconnect retries have been exhausted after " + (Date.now() - h) + " ms and " + i + " failed attempts. Connection disconnecting."), this.completeClose(), [2] } }) }) }, n.prototype.getNextRetryDelay = function (n, t, i) { try { return this.reconnectPolicy.nextRetryDelayInMilliseconds({ elapsedMilliseconds: t, previousRetryCount: n, retryReason: i }) } catch (u) { return this.logger.log(r.LogLevel.Error, "IRetryPolicy.nextRetryDelayInMilliseconds(" + n + ", " + t + ") threw error '" + u + "'."), null } }, n.prototype.cancelCallbacksWithError = function (n) { var t = this.callbacks; this.callbacks = {}; Object.keys(t).forEach(function (i) { var r = t[i]; r(null, n) }) }, n.prototype.cleanupPingTimer = function () { this.pingServerHandle && clearTimeout(this.pingServerHandle) }, n.prototype.cleanupTimeout = function () { this.timeoutHandle && clearTimeout(this.timeoutHandle) }, n.prototype.createInvocation = function (n, t, i, r) { if (i) return { arguments: t, streamIds: r, target: n, type: f.MessageType.Invocation }; var u = this.invocationId; return this.invocationId++, { arguments: t, invocationId: u.toString(), streamIds: r, target: n, type: f.MessageType.Invocation } }, n.prototype.launchStreams = function (n, t) { var i = this, r, u; if (n.length !== 0) { t || (t = Promise.resolve()); r = function (r) { n[r].subscribe({ complete: function () { t = t.then(function () { return i.sendWithProtocol(i.createCompletionMessage(r)) }) }, error: function (n) { var u; u = n instanceof Error ? n.message : n && n.toString ? n.toString() : "Unknown error"; t = t.then(function () { return i.sendWithProtocol(i.createCompletionMessage(r, u)) }) }, next: function (n) { t = t.then(function () { return i.sendWithProtocol(i.createStreamItemMessage(r, n)) }) } }) }; for (u in n) r(u) } }, n.prototype.replaceStreamingParams = function (n) { for (var i, r, u = [], f = [], t = 0; t < n.length; t++)i = n[t], this.isObservable(i) && (r = this.invocationId, this.invocationId++, u[r] = i, f.push(r.toString()), n.splice(t, 1)); return [u, f] }, n.prototype.isObservable = function (n) { return n && n.subscribe && typeof n.subscribe == "function" }, n.prototype.createStreamInvocation = function (n, t, i) { var r = this.invocationId; return this.invocationId++, { arguments: t, invocationId: r.toString(), streamIds: i, target: n, type: f.MessageType.StreamInvocation } }, n.prototype.createCancelInvocation = function (n) { return { invocationId: n, type: f.MessageType.CancelInvocation } }, n.prototype.createStreamItemMessage = function (n, t) { return { invocationId: n, item: t, type: f.MessageType.StreamItem } }, n.prototype.createCompletionMessage = function (n, t, i) { return t ? { error: t, invocationId: n, type: f.MessageType.Completion } : { invocationId: n, result: i, type: f.MessageType.Completion } }, n }() }, function (n, t, i) { "use strict"; i.r(t); i.d(t, "HandshakeProtocol", function () { return f }); var r = i(12), u = i(13), f = function () { function n() { } return n.prototype.writeHandshakeRequest = function (n) { return r.TextMessageFormat.write(JSON.stringify(n)) }, n.prototype.parseHandshakeResponse = function (n) { var c, o, s, f, e, i, t, l, h; if (Object(u.isArrayBuffer)(n) || typeof Buffer != "undefined" && n instanceof Buffer) { if (f = new Uint8Array(n), i = f.indexOf(r.TextMessageFormat.RecordSeparatorCode), i === -1) throw new Error("Message is incomplete."); t = i + 1; o = String.fromCharCode.apply(null, f.slice(0, t)); s = f.byteLength > t ? f.slice(t).buffer : null } else { if (e = n, i = e.indexOf(r.TextMessageFormat.RecordSeparator), i === -1) throw new Error("Message is incomplete."); t = i + 1; o = e.substring(0, t); s = e.length > t ? e.substring(t) : null } if (l = r.TextMessageFormat.parse(o), h = JSON.parse(l[0]), h.type) throw new Error("Expected a handshake response from the server."); return c = h, [s, c] }, n }() }, function (n, t, i) { "use strict"; i.r(t); i.d(t, "TextMessageFormat", function () { return r }); var r = function () { function n() { } return n.write = function (t) { return "" + t + n.RecordSeparator }, n.parse = function (t) { if (t[t.length - 1] !== n.RecordSeparator) throw new Error("Message is incomplete."); var i = t.split(n.RecordSeparator); return i.pop(), i }, n.RecordSeparatorCode = 30, n.RecordSeparator = String.fromCharCode(n.RecordSeparatorCode), n }() }, function (n, t, i) { "use strict"; function e(n, t) { var i = ""; return f(n) ? (i = "Binary data of length " + n.byteLength, t && (i += ". Content: '" + o(n) + "'")) : typeof n == "string" && (i = "String data of length " + n.length, t && (i += ". Content: '" + n + "'")), i } function o(n) { var i = new Uint8Array(n), t = ""; return i.forEach(function (n) { var i = n < 16 ? "0" : ""; t += "0x" + i + n.toString(16) + " " }), t.substr(0, t.length - 1) } function f(n) { return n && typeof ArrayBuffer != "undefined" && (n instanceof ArrayBuffer || n.constructor && n.constructor.name === "ArrayBuffer") } function y(n, t, i, u, o, s, h) { return c(this, void 0, void 0, function () { var c, v, a, y, p; return l(this, function (l) { switch (l.label) { case 0: return o ? [4, o()] : [3, 2]; case 1: a = l.sent(); a && (v = (c = {}, c.Authorization = "Bearer " + a, c)); l.label = 2; case 2: return n.log(r.LogLevel.Trace, "(" + t + " transport) sending data. " + e(s, h) + "."), y = f(s) ? "arraybuffer" : "text", [4, i.post(u, { content: s, headers: v, responseType: y })]; case 3: return p = l.sent(), n.log(r.LogLevel.Trace, "(" + t + " transport) request complete. Response status: " + p.statusCode + "."), [2] } }) }) } function p(n) { return n === undefined ? new u(r.LogLevel.Information) : n === null ? h.NullLogger.instance : n.log ? n : new u(n) } var s, u; i.r(t); i.d(t, "Arg", function () { return a }); i.d(t, "Platform", function () { return v }); i.d(t, "getDataDetail", function () { return e }); i.d(t, "formatArrayBuffer", function () { return o }); i.d(t, "isArrayBuffer", function () { return f }); i.d(t, "sendMessage", function () { return y }); i.d(t, "createLogger", function () { return p }); i.d(t, "SubjectSubscription", function () { return s }); i.d(t, "ConsoleLogger", function () { return u }); var r = i(9), h = i(14), c = undefined && undefined.__awaiter || function (n, t, i, r) { return new (i || (i = Promise))(function (u, f) { function o(n) { try { e(r.next(n)) } catch (t) { f(t) } } function s(n) { try { e(r["throw"](n)) } catch (t) { f(t) } } function e(n) { n.done ? u(n.value) : new i(function (t) { t(n.value) }).then(o, s) } e((r = r.apply(n, t || [])).next()) }) }, l = undefined && undefined.__generator || function (n, t) { function o(n) { return function (t) { return s([n, t]) } } function s(e) { if (f) throw new TypeError("Generator is already executing."); while (r) try { if (f = 1, u && (i = e[0] & 2 ? u["return"] : e[0] ? u["throw"] || ((i = u["return"]) && i.call(u), 0) : u.next) && !(i = i.call(u, e[1])).done) return i; (u = 0, i) && (e = [e[0] & 2, i.value]); switch (e[0]) { case 0: case 1: i = e; break; case 4: return r.label++, { value: e[1], done: !1 }; case 5: r.label++; u = e[1]; e = [0]; continue; case 7: e = r.ops.pop(); r.trys.pop(); continue; default: if (!(i = r.trys, i = i.length > 0 && i[i.length - 1]) && (e[0] === 6 || e[0] === 2)) { r = 0; continue } if (e[0] === 3 && (!i || e[1] > i[0] && e[1] < i[3])) { r.label = e[1]; break } if (e[0] === 6 && r.label < i[1]) { r.label = i[1]; i = e; break } if (i && r.label < i[2]) { r.label = i[2]; r.ops.push(e); break } i[2] && r.ops.pop(); r.trys.pop(); continue }e = t.call(n, r) } catch (o) { e = [6, o]; u = 0 } finally { f = i = 0 } if (e[0] & 5) throw e[1]; return { value: e[0] ? e[1] : void 0, done: !0 } } var r = { label: 0, sent: function () { if (i[0] & 1) throw i[1]; return i[1] }, trys: [], ops: [] }, f, u, i, e; return e = { next: o(0), "throw": o(1), "return": o(2) }, typeof Symbol == "function" && (e[Symbol.iterator] = function () { return this }), e }, a = function () { function n() { } return n.isRequired = function (n, t) { if (n === null || n === undefined) throw new Error("The '" + t + "' argument is required."); }, n.isIn = function (n, t, i) { if (!(n in t)) throw new Error("Unknown " + i + " value: " + n + "."); }, n }(), v = function () { function n() { } return Object.defineProperty(n, "isBrowser", { get: function () { return typeof window == "object" }, enumerable: !0, configurable: !0 }), Object.defineProperty(n, "isWebWorker", { get: function () { return typeof self == "object" && "importScripts" in self }, enumerable: !0, configurable: !0 }), Object.defineProperty(n, "isNode", { get: function () { return !this.isBrowser && !this.isWebWorker }, enumerable: !0, configurable: !0 }), n }(); s = function () { function n(n, t) { this.subject = n; this.observer = t } return n.prototype.dispose = function () { var n = this.subject.observers.indexOf(this.observer); n > -1 && this.subject.observers.splice(n, 1); this.subject.observers.length === 0 && this.subject.cancelCallback && this.subject.cancelCallback().catch(function () { }) }, n }(); u = function () { function n(n) { this.minimumLogLevel = n; this.outputConsole = console } return n.prototype.log = function (n, t) { if (n >= this.minimumLogLevel) switch (n) { case r.LogLevel.Critical: case r.LogLevel.Error: this.outputConsole.error("[" + (new Date).toISOString() + "] " + r.LogLevel[n] + ": " + t); break; case r.LogLevel.Warning: this.outputConsole.warn("[" + (new Date).toISOString() + "] " + r.LogLevel[n] + ": " + t); break; case r.LogLevel.Information: this.outputConsole.info("[" + (new Date).toISOString() + "] " + r.LogLevel[n] + ": " + t); break; default: this.outputConsole.log("[" + (new Date).toISOString() + "] " + r.LogLevel[n] + ": " + t) } }, n }() }, function (n, t, i) { "use strict"; i.r(t); i.d(t, "NullLogger", function () { return r }); var r = function () { function n() { } return n.prototype.log = function () { }, n.instance = new n, n }() }, function (n, t, i) { "use strict"; i.r(t); i.d(t, "MessageType", function () { return r }); var r; (function (n) { n[n.Invocation = 1] = "Invocation"; n[n.StreamItem = 2] = "StreamItem"; n[n.Completion = 3] = "Completion"; n[n.StreamInvocation = 4] = "StreamInvocation"; n[n.CancelInvocation = 5] = "CancelInvocation"; n[n.Ping = 6] = "Ping"; n[n.Close = 7] = "Close" })(r || (r = {})) }, function (n, t, i) { "use strict"; i.r(t); i.d(t, "Subject", function () { return u }); var r = i(13), u = function () { function n() { this.observers = [] } return n.prototype.next = function (n) { for (var r, t = 0, i = this.observers; t < i.length; t++)r = i[t], r.next(n) }, n.prototype.error = function (n) { for (var r, t = 0, i = this.observers; t < i.length; t++)r = i[t], r.error && r.error(n) }, n.prototype.complete = function () { for (var i, n = 0, t = this.observers; n < t.length; n++)i = t[n], i.complete && i.complete() }, n.prototype.subscribe = function (n) { return this.observers.push(n), new r.SubjectSubscription(this, n) }, n }() }, function (n, t, i) { "use strict"; function v(n) { var t = a[n.toLowerCase()]; if (typeof t != "undefined") return t; throw new Error("Unknown log level: " + n); } function y(n) { return n.log !== undefined } var o; i.r(t); i.d(t, "HubConnectionBuilder", function () { return o }); var f = i(18), s = i(19), h = i(10), r = i(9), c = i(25), l = i(14), u = i(13), e = undefined && undefined.__assign || Object.assign || function (n) { for (var t, r, i = 1, u = arguments.length; i < u; i++) { t = arguments[i]; for (r in t) Object.prototype.hasOwnProperty.call(t, r) && (n[r] = t[r]) } return n }, a = { trace: r.LogLevel.Trace, debug: r.LogLevel.Debug, info: r.LogLevel.Information, information: r.LogLevel.Information, warn: r.LogLevel.Warning, warning: r.LogLevel.Warning, error: r.LogLevel.Error, critical: r.LogLevel.Critical, none: r.LogLevel.None }; o = function () { function n() { } return n.prototype.configureLogging = function (n) { if (u.Arg.isRequired(n, "logging"), y(n)) this.logger = n; else if (typeof n == "string") { var t = v(n); this.logger = new u.ConsoleLogger(t) } else this.logger = new u.ConsoleLogger(n); return this }, n.prototype.withUrl = function (n, t) { return u.Arg.isRequired(n, "url"), this.url = n, this.httpConnectionOptions = typeof t == "object" ? e({}, this.httpConnectionOptions, t) : e({}, this.httpConnectionOptions, { transport: t }), this }, n.prototype.withHubProtocol = function (n) { return u.Arg.isRequired(n, "protocol"), this.protocol = n, this }, n.prototype.withAutomaticReconnect = function (n) { if (this.reconnectPolicy) throw new Error("A reconnectPolicy has already been set."); return this.reconnectPolicy = n ? Array.isArray(n) ? new f.DefaultReconnectPolicy(n) : n : new f.DefaultReconnectPolicy, this }, n.prototype.build = function () { var n = this.httpConnectionOptions || {}, t; if (n.logger === undefined && (n.logger = this.logger), !this.url) throw new Error("The 'HubConnectionBuilder.withUrl' method must be called before building the connection."); return t = new s.HttpConnection(this.url, n), h.HubConnection.create(t, this.logger || l.NullLogger.instance, this.protocol || new c.JsonHubProtocol, this.reconnectPolicy) }, n }() }, function (n, t, i) { "use strict"; i.r(t); i.d(t, "DefaultReconnectPolicy", function () { return u }); var r = [0, 2e3, 1e4, 3e4, null], u = function () { function n(n) { this.retryDelays = n !== undefined ? n.concat([null]) : r } return n.prototype.nextRetryDelayInMilliseconds = function (n) { return this.retryDelays[n.previousRetryCount] }, n }() }, function (n, t, i) { "use strict"; function d(n, t) { return !n || (t & n) != 0 } var l, p, a, s; i.r(t); i.d(t, "HttpConnection", function () { return p }); i.d(t, "TransportSendQueue", function () { return a }); var w = i(6), r = i(9), u = i(20), v = i(21), b = i(23), f = i(13), k = i(24), o = undefined && undefined.__awaiter || function (n, t, i, r) { return new (i || (i = Promise))(function (u, f) { function o(n) { try { e(r.next(n)) } catch (t) { f(t) } } function s(n) { try { e(r["throw"](n)) } catch (t) { f(t) } } function e(n) { n.done ? u(n.value) : new i(function (t) { t(n.value) }).then(o, s) } e((r = r.apply(n, t || [])).next()) }) }, e = undefined && undefined.__generator || function (n, t) { function o(n) { return function (t) { return s([n, t]) } } function s(e) { if (f) throw new TypeError("Generator is already executing."); while (r) try { if (f = 1, u && (i = e[0] & 2 ? u["return"] : e[0] ? u["throw"] || ((i = u["return"]) && i.call(u), 0) : u.next) && !(i = i.call(u, e[1])).done) return i; (u = 0, i) && (e = [e[0] & 2, i.value]); switch (e[0]) { case 0: case 1: i = e; break; case 4: return r.label++, { value: e[1], done: !1 }; case 5: r.label++; u = e[1]; e = [0]; continue; case 7: e = r.ops.pop(); r.trys.pop(); continue; default: if (!(i = r.trys, i = i.length > 0 && i[i.length - 1]) && (e[0] === 6 || e[0] === 2)) { r = 0; continue } if (e[0] === 3 && (!i || e[1] > i[0] && e[1] < i[3])) { r.label = e[1]; break } if (e[0] === 6 && r.label < i[1]) { r.label = i[1]; i = e; break } if (i && r.label < i[2]) { r.label = i[2]; r.ops.push(e); break } i[2] && r.ops.pop(); r.trys.pop(); continue }e = t.call(n, r) } catch (o) { e = [6, o]; u = 0 } finally { f = i = 0 } if (e[0] & 5) throw e[1]; return { value: e[0] ? e[1] : void 0, done: !0 } } var r = { label: 0, sent: function () { if (i[0] & 1) throw i[1]; return i[1] }, trys: [], ops: [] }, f, u, i, e; return e = { next: o(0), "throw": o(1), "return": o(2) }, typeof Symbol == "function" && (e[Symbol.iterator] = function () { return this }), e }, y = 100, h = null, c = null; f.Platform.isNode && !0 && (l = require, h = l("ws"), c = l("eventsource")); p = function () { function n(n, t) { t === void 0 && (t = {}); this.features = {}; this.negotiateVersion = 1; f.Arg.isRequired(n, "url"); this.logger = Object(f.createLogger)(t.logger); this.baseUrl = this.resolveUrl(n); t = t || {}; t.logMessageContent = t.logMessageContent || !1; f.Platform.isNode || typeof WebSocket == "undefined" || t.WebSocket ? f.Platform.isNode && !t.WebSocket && h && (t.WebSocket = h) : t.WebSocket = WebSocket; f.Platform.isNode || typeof EventSource == "undefined" || t.EventSource ? f.Platform.isNode && !t.EventSource && typeof c != "undefined" && (t.EventSource = c) : t.EventSource = EventSource; this.httpClient = t.httpClient || new w.DefaultHttpClient(this.logger); this.connectionState = "Disconnected"; this.connectionStarted = !1; this.options = t; this.onreceive = null; this.onclose = null } return n.prototype.start = function (n) { return o(this, void 0, void 0, function () { var t; return e(this, function (i) { switch (i.label) { case 0: return (n = n || u.TransferFormat.Binary, f.Arg.isIn(n, u.TransferFormat, "transferFormat"), this.logger.log(r.LogLevel.Debug, "Starting connection with transfer format '" + u.TransferFormat[n] + "'."), this.connectionState !== "Disconnected") ? [2, Promise.reject(new Error("Cannot start an HttpConnection that is not in the 'Disconnected' state."))] : (this.connectionState = "Connecting ", this.startInternalPromise = this.startInternal(n), [4, this.startInternalPromise]); case 1: return (i.sent(), !(this.connectionState === "Disconnecting")) ? [3, 3] : (t = "Failed to start the HttpConnection before stop() was called.", this.logger.log(r.LogLevel.Error, t), [4, this.stopPromise]); case 2: return i.sent(), [2, Promise.reject(new Error(t))]; case 3: if (this.connectionState !== "Connected") return t = "HttpConnection.startInternal completed gracefully but didn't enter the connection into the connected state!", this.logger.log(r.LogLevel.Error, t), [2, Promise.reject(new Error(t))]; i.label = 4; case 4: return this.connectionStarted = !0, [2] } }) }) }, n.prototype.send = function (n) { return this.connectionState !== "Connected" ? Promise.reject(new Error("Cannot send data if the connection is not in the 'Connected' State.")) : (this.sendQueue || (this.sendQueue = new a(this.transport)), this.sendQueue.send(n)) }, n.prototype.stop = function (n) { return o(this, void 0, void 0, function () { var t = this; return e(this, function (i) { switch (i.label) { case 0: return this.connectionState === "Disconnected" ? (this.logger.log(r.LogLevel.Debug, "Call to HttpConnection.stop(" + n + ") ignored because the connection is already in the disconnected state."), [2, Promise.resolve()]) : this.connectionState === "Disconnecting" ? (this.logger.log(r.LogLevel.Debug, "Call to HttpConnection.stop(" + n + ") ignored because the connection is already in the disconnecting state."), [2, this.stopPromise]) : (this.connectionState = "Disconnecting", this.stopPromise = new Promise(function (n) { t.stopPromiseResolver = n }), [4, this.stopInternal(n)]); case 1: return i.sent(), [4, this.stopPromise]; case 2: return i.sent(), [2] } }) }) }, n.prototype.stopInternal = function (n) { return o(this, void 0, void 0, function () { var i, t; return e(this, function (u) { switch (u.label) { case 0: this.stopError = n; u.label = 1; case 1: return u.trys.push([1, 3, , 4]), [4, this.startInternalPromise]; case 2: return u.sent(), [3, 4]; case 3: return i = u.sent(), [3, 4]; case 4: if (!this.transport) return [3, 9]; u.label = 5; case 5: return u.trys.push([5, 7, , 8]), [4, this.transport.stop()]; case 6: return u.sent(), [3, 8]; case 7: return t = u.sent(), this.logger.log(r.LogLevel.Error, "HttpConnection.transport.stop() threw error '" + t + "'."), this.stopConnection(), [3, 8]; case 8: return this.transport = undefined, [3, 10]; case 9: this.logger.log(r.LogLevel.Debug, "HttpConnection.transport is undefined in HttpConnection.stop() because start() failed."); this.stopConnection(); u.label = 10; case 10: return [2] } }) }) }, n.prototype.startInternal = function (n) { return o(this, void 0, void 0, function () { var i, t, o, h, f, s; return e(this, function (c) { switch (c.label) { case 0: i = this.baseUrl; this.accessTokenFactory = this.options.accessTokenFactory; c.label = 1; case 1: return (c.trys.push([1, 12, , 13]), !this.options.skipNegotiation) ? [3, 5] : (this.options.transport === u.HttpTransportType.WebSockets) ? (this.transport = this.constructTransport(u.HttpTransportType.WebSockets), [4, this.startTransport(i, n)]) : [3, 3]; case 2: return c.sent(), [3, 4]; case 3: throw new Error("Negotiation can only be skipped when using the WebSocket transport directly."); case 4: return [3, 11]; case 5: t = null; o = 0; h = function () { var n; return e(this, function (r) { switch (r.label) { case 0: return [4, f.getNegotiationResponse(i)]; case 1: if (t = r.sent(), f.connectionState === "Disconnecting" || f.connectionState === "Disconnected") throw new Error("The connection was stopped during negotiation."); if (t.error) throw new Error(t.error); if (t.ProtocolVersion) throw new Error("Detected a connection attempt to an ASP.NET SignalR Server. This client only supports connecting to an ASP.NET Core SignalR Server. See https://aka.ms/signalr-core-differences for details."); return t.url && (i = t.url), t.accessToken && (n = t.accessToken, f.accessTokenFactory = function () { return n }), o++, [2] } }) }; f = this; c.label = 6; case 6: return [5, h()]; case 7: c.sent(); c.label = 8; case 8: if (t.url && o < y) return [3, 6]; c.label = 9; case 9: if (o === y && t.url) throw new Error("Negotiate redirection limit exceeded."); return [4, this.createTransport(i, this.options.transport, t, n)]; case 10: c.sent(); c.label = 11; case 11: return this.transport instanceof v.LongPollingTransport && (this.features.inherentKeepAlive = !0), this.connectionState === "Connecting " && (this.logger.log(r.LogLevel.Debug, "The HttpConnection connected successfully."), this.connectionState = "Connected"), [3, 13]; case 12: return s = c.sent(), this.logger.log(r.LogLevel.Error, "Failed to start the connection: " + s), this.connectionState = "Disconnected", this.transport = undefined, [2, Promise.reject(s)]; case 13: return [2] } }) }) }, n.prototype.getNegotiationResponse = function (n) { return o(this, void 0, void 0, function () { var u, h, f, o, i, t, s; return e(this, function (e) { switch (e.label) { case 0: return this.accessTokenFactory ? [4, this.accessTokenFactory()] : [3, 2]; case 1: f = e.sent(); f && (h = (u = {}, u.Authorization = "Bearer " + f, u)); e.label = 2; case 2: o = this.resolveNegotiateUrl(n); this.logger.log(r.LogLevel.Debug, "Sending negotiation request: " + o + "."); e.label = 3; case 3: return e.trys.push([3, 5, , 6]), [4, this.httpClient.post(o, { content: "", headers: h })]; case 4: return (i = e.sent(), i.statusCode !== 200) ? [2, Promise.reject(new Error("Unexpected status code returned from negotiate " + i.statusCode))] : (t = JSON.parse(i.content), (!t.negotiateVersion || t.negotiateVersion < 1) && (t.connectionToken = t.connectionId), [2, t]); case 5: return s = e.sent(), this.logger.log(r.LogLevel.Error, "Failed to complete negotiation with the server: " + s), [2, Promise.reject(s)]; case 6: return [2] } }) }) }, n.prototype.createConnectUrl = function (n, t) { return t ? n + (n.indexOf("?") === -1 ? "?" : "&") + ("id=" + t) : n }, n.prototype.createTransport = function (n, t, i, u) { return o(this, void 0, void 0, function () { var c, o, p, f, l, a, s, h, w, v, y; return e(this, function (e) { switch (e.label) { case 0: return (c = this.createConnectUrl(n, i.connectionToken), !this.isITransport(t)) ? [3, 2] : (this.logger.log(r.LogLevel.Debug, "Connection was provided an instance of ITransport, using that directly."), this.transport = t, [4, this.startTransport(c, u)]); case 1: return e.sent(), this.connectionId = i.connectionId, [2]; case 2: o = []; p = i.availableTransports || []; f = i; l = 0; a = p; e.label = 3; case 3: return (l < a.length) ? (s = a[l], h = this.resolveTransportOrError(s, t, u), !(h instanceof Error)) ? [3, 4] : (o.push(s.transport + " failed: " + h), [3, 12]) : [3, 13]; case 4: if (!this.isITransport(h)) return [3, 12]; if (this.transport = h, !!f) return [3, 9]; e.label = 5; case 5: return e.trys.push([5, 7, , 8]), [4, this.getNegotiationResponse(n)]; case 6: return f = e.sent(), [3, 8]; case 7: return w = e.sent(), [2, Promise.reject(w)]; case 8: c = this.createConnectUrl(n, f.connectionToken); e.label = 9; case 9: return e.trys.push([9, 11, , 12]), [4, this.startTransport(c, u)]; case 10: return e.sent(), this.connectionId = f.connectionId, [2]; case 11: return (v = e.sent(), this.logger.log(r.LogLevel.Error, "Failed to start the transport '" + s.transport + "': " + v), f = undefined, o.push(s.transport + " failed: " + v), this.connectionState !== "Connecting ") ? (y = "Failed to select transport before stop() was called.", this.logger.log(r.LogLevel.Debug, y), [2, Promise.reject(new Error(y))]) : [3, 12]; case 12: return l++, [3, 3]; case 13: return o.length > 0 ? [2, Promise.reject(new Error("Unable to connect to the server with any of the available transports. " + o.join(" ")))] : [2, Promise.reject(new Error("None of the transports supported by the client are supported by the server."))] } }) }) }, n.prototype.constructTransport = function (n) { switch (n) { case u.HttpTransportType.WebSockets: if (!this.options.WebSocket) throw new Error("'WebSocket' is not supported in your environment."); return new k.WebSocketTransport(this.httpClient, this.accessTokenFactory, this.logger, this.options.logMessageContent || !1, this.options.WebSocket); case u.HttpTransportType.ServerSentEvents: if (!this.options.EventSource) throw new Error("'EventSource' is not supported in your environment."); return new b.ServerSentEventsTransport(this.httpClient, this.accessTokenFactory, this.logger, this.options.logMessageContent || !1, this.options.EventSource); case u.HttpTransportType.LongPolling: return new v.LongPollingTransport(this.httpClient, this.accessTokenFactory, this.logger, this.options.logMessageContent || !1); default: throw new Error("Unknown transport: " + n + "."); } }, n.prototype.startTransport = function (n, t) { var i = this; return this.transport.onreceive = this.onreceive, this.transport.onclose = function (n) { return i.stopConnection(n) }, this.transport.connect(n, t) }, n.prototype.resolveTransportOrError = function (n, t, i) { var f = u.HttpTransportType[n.transport], e; if (f === null || f === undefined) return this.logger.log(r.LogLevel.Debug, "Skipping transport '" + n.transport + "' because it is not supported by this client."), new Error("Skipping transport '" + n.transport + "' because it is not supported by this client."); if (d(t, f)) if (e = n.transferFormats.map(function (n) { return u.TransferFormat[n] }), e.indexOf(i) >= 0) if ((f !== u.HttpTransportType.WebSockets || this.options.WebSocket) && (f !== u.HttpTransportType.ServerSentEvents || this.options.EventSource)) { this.logger.log(r.LogLevel.Debug, "Selecting transport '" + u.HttpTransportType[f] + "'."); try { return this.constructTransport(f) } catch (o) { return o } } else return this.logger.log(r.LogLevel.Debug, "Skipping transport '" + u.HttpTransportType[f] + "' because it is not supported in your environment.'"), new Error("'" + u.HttpTransportType[f] + "' is not supported in your environment."); else return this.logger.log(r.LogLevel.Debug, "Skipping transport '" + u.HttpTransportType[f] + "' because it does not support the requested transfer format '" + u.TransferFormat[i] + "'."), new Error("'" + u.HttpTransportType[f] + "' does not support " + u.TransferFormat[i] + "."); else return this.logger.log(r.LogLevel.Debug, "Skipping transport '" + u.HttpTransportType[f] + "' because it was disabled by the client."), new Error("'" + u.HttpTransportType[f] + "' is disabled by the client.") }, n.prototype.isITransport = function (n) { return n && typeof n == "object" && "connect" in n }, n.prototype.stopConnection = function (n) { var t = this; if (this.logger.log(r.LogLevel.Debug, "HttpConnection.stopConnection(" + n + ") called while in state " + this.connectionState + "."), this.transport = undefined, n = this.stopError || n, this.stopError = undefined, this.connectionState === "Disconnected") { this.logger.log(r.LogLevel.Debug, "Call to HttpConnection.stopConnection(" + n + ") was ignored because the connection is already in the disconnected state."); return } if (this.connectionState === "Connecting ") { this.logger.log(r.LogLevel.Warning, "Call to HttpConnection.stopConnection(" + n + ") was ignored because the connection hasn't yet left the in the connecting state."); return } if (this.connectionState === "Disconnecting" && this.stopPromiseResolver(), n ? this.logger.log(r.LogLevel.Error, "Connection disconnected with error '" + n + "'.") : this.logger.log(r.LogLevel.Information, "Connection disconnected."), this.sendQueue && (this.sendQueue.stop().catch(function (n) { t.logger.log(r.LogLevel.Error, "TransportSendQueue.stop() threw error '" + n + "'.") }), this.sendQueue = undefined), this.connectionId = undefined, this.connectionState = "Disconnected", this.connectionStarted) { this.connectionStarted = !1; try { if (this.onclose) this.onclose(n) } catch (i) { this.logger.log(r.LogLevel.Error, "HttpConnection.onclose(" + n + ") threw error '" + i + "'.") } } }, n.prototype.resolveUrl = function (n) { if (n.lastIndexOf("https://", 0) === 0 || n.lastIndexOf("http://", 0) === 0) return n; if (!f.Platform.isBrowser || !window.document) throw new Error("Cannot resolve '" + n + "'."); var t = window.document.createElement("a"); return t.href = n, this.logger.log(r.LogLevel.Information, "Normalizing '" + n + "' to '" + t.href + "'."), t.href }, n.prototype.resolveNegotiateUrl = function (n) { var i = n.indexOf("?"), t = n.substring(0, i === -1 ? n.length : i); return t[t.length - 1] !== "/" && (t += "/"), t += "negotiate", t += i === -1 ? "" : n.substring(i), t.indexOf("negotiateVersion") === -1 && (t += i === -1 ? "?" : "&", t += "negotiateVersion=" + this.negotiateVersion), t }, n }(); a = function () { function n(n) { this.transport = n; this.buffer = []; this.executing = !0; this.sendBufferedData = new s; this.transportResult = new s; this.sendLoopPromise = this.sendLoop() } return n.prototype.send = function (n) { return this.bufferData(n), this.transportResult || (this.transportResult = new s), this.transportResult.promise }, n.prototype.stop = function () { return this.executing = !1, this.sendBufferedData.resolve(), this.sendLoopPromise }, n.prototype.bufferData = function (n) { if (this.buffer.length && typeof this.buffer[0] != typeof n) throw new Error("Expected data to be of type " + typeof this.buffer + " but was of type " + typeof n); this.buffer.push(n); this.sendBufferedData.resolve() }, n.prototype.sendLoop = function () { return o(this, void 0, void 0, function () { var t, i, r; return e(this, function (u) { switch (u.label) { case 0: return [4, this.sendBufferedData.promise]; case 1: if (u.sent(), !this.executing) return this.transportResult && this.transportResult.reject("Connection stopped."), [3, 6]; this.sendBufferedData = new s; t = this.transportResult; this.transportResult = undefined; i = typeof this.buffer[0] == "string" ? this.buffer.join("") : n.concatBuffers(this.buffer); this.buffer.length = 0; u.label = 2; case 2: return u.trys.push([2, 4, , 5]), [4, this.transport.send(i)]; case 3: return u.sent(), t.resolve(), [3, 5]; case 4: return r = u.sent(), t.reject(r), [3, 5]; case 5: return [3, 0]; case 6: return [2] } }) }) }, n.concatBuffers = function (n) { for (var i, e = n.map(function (n) { return n.byteLength }).reduce(function (n, t) { return n + t }), r = new Uint8Array(e), u = 0, t = 0, f = n; t < f.length; t++)i = f[t], r.set(new Uint8Array(i), u), u += i.byteLength; return r }, n }(); s = function () { function n() { var n = this; this.promise = new Promise(function (t, i) { var r; return r = [t, i], n.resolver = r[0], n.rejecter = r[1], r }) } return n.prototype.resolve = function () { this.resolver() }, n.prototype.reject = function (n) { this.rejecter(n) }, n }() }, function (n, t, i) { "use strict"; var r, u; i.r(t); i.d(t, "HttpTransportType", function () { return r }); i.d(t, "TransferFormat", function () { return u }), function (n) { n[n.None = 0] = "None"; n[n.WebSockets = 1] = "WebSockets"; n[n.ServerSentEvents = 2] = "ServerSentEvents"; n[n.LongPolling = 4] = "LongPolling" }(r || (r = {})), function (n) { n[n.Text = 1] = "Text"; n[n.Binary = 2] = "Binary" }(u || (u = {})) }, function (n, t, i) { "use strict"; i.r(t); i.d(t, "LongPollingTransport", function () { return c }); var h = i(22), o = i(4), r = i(9), s = i(20), u = i(13), f = undefined && undefined.__awaiter || function (n, t, i, r) { return new (i || (i = Promise))(function (u, f) { function o(n) { try { e(r.next(n)) } catch (t) { f(t) } } function s(n) { try { e(r["throw"](n)) } catch (t) { f(t) } } function e(n) { n.done ? u(n.value) : new i(function (t) { t(n.value) }).then(o, s) } e((r = r.apply(n, t || [])).next()) }) }, e = undefined && undefined.__generator || function (n, t) { function o(n) { return function (t) { return s([n, t]) } } function s(e) { if (f) throw new TypeError("Generator is already executing."); while (r) try { if (f = 1, u && (i = e[0] & 2 ? u["return"] : e[0] ? u["throw"] || ((i = u["return"]) && i.call(u), 0) : u.next) && !(i = i.call(u, e[1])).done) return i; (u = 0, i) && (e = [e[0] & 2, i.value]); switch (e[0]) { case 0: case 1: i = e; break; case 4: return r.label++, { value: e[1], done: !1 }; case 5: r.label++; u = e[1]; e = [0]; continue; case 7: e = r.ops.pop(); r.trys.pop(); continue; default: if (!(i = r.trys, i = i.length > 0 && i[i.length - 1]) && (e[0] === 6 || e[0] === 2)) { r = 0; continue } if (e[0] === 3 && (!i || e[1] > i[0] && e[1] < i[3])) { r.label = e[1]; break } if (e[0] === 6 && r.label < i[1]) { r.label = i[1]; i = e; break } if (i && r.label < i[2]) { r.label = i[2]; r.ops.push(e); break } i[2] && r.ops.pop(); r.trys.pop(); continue }e = t.call(n, r) } catch (o) { e = [6, o]; u = 0 } finally { f = i = 0 } if (e[0] & 5) throw e[1]; return { value: e[0] ? e[1] : void 0, done: !0 } } var r = { label: 0, sent: function () { if (i[0] & 1) throw i[1]; return i[1] }, trys: [], ops: [] }, f, u, i, e; return e = { next: o(0), "throw": o(1), "return": o(2) }, typeof Symbol == "function" && (e[Symbol.iterator] = function () { return this }), e }, c = function () { function n(n, t, i, r) { this.httpClient = n; this.accessTokenFactory = t; this.logger = i; this.pollAbort = new h.AbortController; this.logMessageContent = r; this.running = !1; this.onreceive = null; this.onclose = null } return Object.defineProperty(n.prototype, "pollAborted", { get: function () { return this.pollAbort.aborted }, enumerable: !0, configurable: !0 }), n.prototype.connect = function (n, t) { return f(this, void 0, void 0, function () { var i, c, h, f; return e(this, function (e) { switch (e.label) { case 0: if (u.Arg.isRequired(n, "url"), u.Arg.isRequired(t, "transferFormat"), u.Arg.isIn(t, s.TransferFormat, "transferFormat"), this.url = n, this.logger.log(r.LogLevel.Trace, "(LongPolling transport) Connecting."), t === s.TransferFormat.Binary && typeof XMLHttpRequest != "undefined" && typeof (new XMLHttpRequest).responseType != "string") throw new Error("Binary protocols over XmlHttpRequest not implementing advanced features are not supported."); return i = { abortSignal: this.pollAbort.signal, headers: {}, timeout: 1e5 }, t === s.TransferFormat.Binary && (i.responseType = "arraybuffer"), [4, this.getAccessToken()]; case 1: return c = e.sent(), this.updateHeaderToken(i, c), h = n + "&_=" + Date.now(), this.logger.log(r.LogLevel.Trace, "(LongPolling transport) polling: " + h + "."), [4, this.httpClient.get(h, i)]; case 2: return f = e.sent(), f.statusCode !== 200 ? (this.logger.log(r.LogLevel.Error, "(LongPolling transport) Unexpected response code: " + f.statusCode + "."), this.closeError = new o.HttpError(f.statusText || "", f.statusCode), this.running = !1) : this.running = !0, this.receiving = this.poll(this.url, i), [2] } }) }) }, n.prototype.getAccessToken = function () { return f(this, void 0, void 0, function () { return e(this, function (n) { switch (n.label) { case 0: return this.accessTokenFactory ? [4, this.accessTokenFactory()] : [3, 2]; case 1: return [2, n.sent()]; case 2: return [2, null] } }) }) }, n.prototype.updateHeaderToken = function (n, t) { if (n.headers || (n.headers = {}), t) { n.headers.Authorization = "Bearer " + t; return } n.headers.Authorization && delete n.headers.Authorization }, n.prototype.poll = function (n, t) { return f(this, void 0, void 0, function () { var h, s, i, f; return e(this, function (e) { switch (e.label) { case 0: e.trys.push([0, , 8, 9]); e.label = 1; case 1: return this.running ? [4, this.getAccessToken()] : [3, 7]; case 2: h = e.sent(); this.updateHeaderToken(t, h); e.label = 3; case 3: return e.trys.push([3, 5, , 6]), s = n + "&_=" + Date.now(), this.logger.log(r.LogLevel.Trace, "(LongPolling transport) polling: " + s + "."), [4, this.httpClient.get(s, t)]; case 4: if (i = e.sent(), i.statusCode === 204) this.logger.log(r.LogLevel.Information, "(LongPolling transport) Poll terminated by server."), this.running = !1; else if (i.statusCode !== 200) this.logger.log(r.LogLevel.Error, "(LongPolling transport) Unexpected response code: " + i.statusCode + "."), this.closeError = new o.HttpError(i.statusText || "", i.statusCode), this.running = !1; else if (i.content) { if (this.logger.log(r.LogLevel.Trace, "(LongPolling transport) data received. " + Object(u.getDataDetail)(i.content, this.logMessageContent) + "."), this.onreceive) this.onreceive(i.content) } else this.logger.log(r.LogLevel.Trace, "(LongPolling transport) Poll timed out, reissuing."); return [3, 6]; case 5: return f = e.sent(), this.running ? f instanceof o.TimeoutError ? this.logger.log(r.LogLevel.Trace, "(LongPolling transport) Poll timed out, reissuing.") : (this.closeError = f, this.running = !1) : this.logger.log(r.LogLevel.Trace, "(LongPolling transport) Poll errored after shutdown: " + f.message), [3, 6]; case 6: return [3, 1]; case 7: return [3, 9]; case 8: return this.logger.log(r.LogLevel.Trace, "(LongPolling transport) Polling complete."), this.pollAborted || this.raiseOnClose(), [7]; case 9: return [2] } }) }) }, n.prototype.send = function (n) { return f(this, void 0, void 0, function () { return e(this, function () { return this.running ? [2, Object(u.sendMessage)(this.logger, "LongPolling", this.httpClient, this.url, this.accessTokenFactory, n, this.logMessageContent)] : [2, Promise.reject(new Error("Cannot send until the transport is connected"))] }) }) }, n.prototype.stop = function () { return f(this, void 0, void 0, function () { var n, t; return e(this, function (i) { switch (i.label) { case 0: this.logger.log(r.LogLevel.Trace, "(LongPolling transport) Stopping polling."); this.running = !1; this.pollAbort.abort(); i.label = 1; case 1: return i.trys.push([1, , 5, 6]), [4, this.receiving]; case 2: return i.sent(), this.logger.log(r.LogLevel.Trace, "(LongPolling transport) sending DELETE request to " + this.url + "."), n = { headers: {} }, [4, this.getAccessToken()]; case 3: return t = i.sent(), this.updateHeaderToken(n, t), [4, this.httpClient.delete(this.url, n)]; case 4: return i.sent(), this.logger.log(r.LogLevel.Trace, "(LongPolling transport) DELETE request sent."), [3, 6]; case 5: return this.logger.log(r.LogLevel.Trace, "(LongPolling transport) Stop finished."), this.raiseOnClose(), [7]; case 6: return [2] } }) }) }, n.prototype.raiseOnClose = function () { if (this.onclose) { var n = "(LongPolling transport) Firing onclose event."; this.closeError && (n += " Error: " + this.closeError); this.logger.log(r.LogLevel.Trace, n); this.onclose(this.closeError) } }, n }() }, function (n, t, i) { "use strict"; i.r(t); i.d(t, "AbortController", function () { return r }); var r = function () { function n() { this.isAborted = !1; this.onabort = null } return n.prototype.abort = function () { this.isAborted || (this.isAborted = !0, this.onabort && this.onabort()) }, Object.defineProperty(n.prototype, "signal", { get: function () { return this }, enumerable: !0, configurable: !0 }), Object.defineProperty(n.prototype, "aborted", { get: function () { return this.isAborted }, enumerable: !0, configurable: !0 }), n }() }, function (n, t, i) { "use strict"; i.r(t); i.d(t, "ServerSentEventsTransport", function () { return s }); var u = i(9), f = i(20), r = i(13), e = undefined && undefined.__awaiter || function (n, t, i, r) { return new (i || (i = Promise))(function (u, f) { function o(n) { try { e(r.next(n)) } catch (t) { f(t) } } function s(n) { try { e(r["throw"](n)) } catch (t) { f(t) } } function e(n) { n.done ? u(n.value) : new i(function (t) { t(n.value) }).then(o, s) } e((r = r.apply(n, t || [])).next()) }) }, o = undefined && undefined.__generator || function (n, t) { function o(n) { return function (t) { return s([n, t]) } } function s(e) { if (f) throw new TypeError("Generator is already executing."); while (r) try { if (f = 1, u && (i = e[0] & 2 ? u["return"] : e[0] ? u["throw"] || ((i = u["return"]) && i.call(u), 0) : u.next) && !(i = i.call(u, e[1])).done) return i; (u = 0, i) && (e = [e[0] & 2, i.value]); switch (e[0]) { case 0: case 1: i = e; break; case 4: return r.label++, { value: e[1], done: !1 }; case 5: r.label++; u = e[1]; e = [0]; continue; case 7: e = r.ops.pop(); r.trys.pop(); continue; default: if (!(i = r.trys, i = i.length > 0 && i[i.length - 1]) && (e[0] === 6 || e[0] === 2)) { r = 0; continue } if (e[0] === 3 && (!i || e[1] > i[0] && e[1] < i[3])) { r.label = e[1]; break } if (e[0] === 6 && r.label < i[1]) { r.label = i[1]; i = e; break } if (i && r.label < i[2]) { r.label = i[2]; r.ops.push(e); break } i[2] && r.ops.pop(); r.trys.pop(); continue }e = t.call(n, r) } catch (o) { e = [6, o]; u = 0 } finally { f = i = 0 } if (e[0] & 5) throw e[1]; return { value: e[0] ? e[1] : void 0, done: !0 } } var r = { label: 0, sent: function () { if (i[0] & 1) throw i[1]; return i[1] }, trys: [], ops: [] }, f, u, i, e; return e = { next: o(0), "throw": o(1), "return": o(2) }, typeof Symbol == "function" && (e[Symbol.iterator] = function () { return this }), e }, s = function () { function n(n, t, i, r, u) { this.httpClient = n; this.accessTokenFactory = t; this.logger = i; this.logMessageContent = r; this.eventSourceConstructor = u; this.onreceive = null; this.onclose = null } return n.prototype.connect = function (n, t) { return e(this, void 0, void 0, function () { var e, i = this; return o(this, function (o) { switch (o.label) { case 0: return (r.Arg.isRequired(n, "url"), r.Arg.isRequired(t, "transferFormat"), r.Arg.isIn(t, f.TransferFormat, "transferFormat"), this.logger.log(u.LogLevel.Trace, "(SSE transport) Connecting."), this.url = n, !this.accessTokenFactory) ? [3, 2] : [4, this.accessTokenFactory()]; case 1: e = o.sent(); e && (n += (n.indexOf("?") < 0 ? "?" : "&") + ("access_token=" + encodeURIComponent(e))); o.label = 2; case 2: return [2, new Promise(function (e, o) { var h = !1, s, c; if (t !== f.TransferFormat.Text) { o(new Error("The Server-Sent Events transport only supports the 'Text' transfer format")); return } r.Platform.isBrowser || r.Platform.isWebWorker ? s = new i.eventSourceConstructor(n, { withCredentials: !0 }) : (c = i.httpClient.getCookieString(n), s = new i.eventSourceConstructor(n, { withCredentials: !0, headers: { Cookie: c } })); try { s.onmessage = function (n) { if (i.onreceive) try { i.logger.log(u.LogLevel.Trace, "(SSE transport) data received. " + Object(r.getDataDetail)(n.data, i.logMessageContent) + "."); i.onreceive(n.data) } catch (t) { i.close(t); return } }; s.onerror = function (n) { var t = new Error(n.data || "Error occurred"); h ? i.close(t) : o(t) }; s.onopen = function () { i.logger.log(u.LogLevel.Information, "SSE connected to " + i.url); i.eventSource = s; h = !0; e() } } catch (l) { o(l); return } })] } }) }) }, n.prototype.send = function (n) { return e(this, void 0, void 0, function () { return o(this, function () { return this.eventSource ? [2, Object(r.sendMessage)(this.logger, "SSE", this.httpClient, this.url, this.accessTokenFactory, n, this.logMessageContent)] : [2, Promise.reject(new Error("Cannot send until the transport is connected"))] }) }) }, n.prototype.stop = function () { return this.close(), Promise.resolve() }, n.prototype.close = function (n) { if (this.eventSource && (this.eventSource.close(), this.eventSource = undefined, this.onclose)) this.onclose(n) }, n }() }, function (n, t, i) { "use strict"; i.r(t); i.d(t, "WebSocketTransport", function () { return s }); var u = i(9), f = i(20), r = i(13), e = undefined && undefined.__awaiter || function (n, t, i, r) { return new (i || (i = Promise))(function (u, f) { function o(n) { try { e(r.next(n)) } catch (t) { f(t) } } function s(n) { try { e(r["throw"](n)) } catch (t) { f(t) } } function e(n) { n.done ? u(n.value) : new i(function (t) { t(n.value) }).then(o, s) } e((r = r.apply(n, t || [])).next()) }) }, o = undefined && undefined.__generator || function (n, t) { function o(n) { return function (t) { return s([n, t]) } } function s(e) { if (f) throw new TypeError("Generator is already executing."); while (r) try { if (f = 1, u && (i = e[0] & 2 ? u["return"] : e[0] ? u["throw"] || ((i = u["return"]) && i.call(u), 0) : u.next) && !(i = i.call(u, e[1])).done) return i; (u = 0, i) && (e = [e[0] & 2, i.value]); switch (e[0]) { case 0: case 1: i = e; break; case 4: return r.label++, { value: e[1], done: !1 }; case 5: r.label++; u = e[1]; e = [0]; continue; case 7: e = r.ops.pop(); r.trys.pop(); continue; default: if (!(i = r.trys, i = i.length > 0 && i[i.length - 1]) && (e[0] === 6 || e[0] === 2)) { r = 0; continue } if (e[0] === 3 && (!i || e[1] > i[0] && e[1] < i[3])) { r.label = e[1]; break } if (e[0] === 6 && r.label < i[1]) { r.label = i[1]; i = e; break } if (i && r.label < i[2]) { r.label = i[2]; r.ops.push(e); break } i[2] && r.ops.pop(); r.trys.pop(); continue }e = t.call(n, r) } catch (o) { e = [6, o]; u = 0 } finally { f = i = 0 } if (e[0] & 5) throw e[1]; return { value: e[0] ? e[1] : void 0, done: !0 } } var r = { label: 0, sent: function () { if (i[0] & 1) throw i[1]; return i[1] }, trys: [], ops: [] }, f, u, i, e; return e = { next: o(0), "throw": o(1), "return": o(2) }, typeof Symbol == "function" && (e[Symbol.iterator] = function () { return this }), e }, s = function () { function n(n, t, i, r, u) { this.logger = i; this.accessTokenFactory = t; this.logMessageContent = r; this.webSocketConstructor = u; this.httpClient = n; this.onreceive = null; this.onclose = null } return n.prototype.connect = function (n, t) { return e(this, void 0, void 0, function () { var e, i = this; return o(this, function (o) { switch (o.label) { case 0: return (r.Arg.isRequired(n, "url"), r.Arg.isRequired(t, "transferFormat"), r.Arg.isIn(t, f.TransferFormat, "transferFormat"), this.logger.log(u.LogLevel.Trace, "(WebSockets transport) Connecting."), !this.accessTokenFactory) ? [3, 2] : [4, this.accessTokenFactory()]; case 1: e = o.sent(); e && (n += (n.indexOf("?") < 0 ? "?" : "&") + ("access_token=" + encodeURIComponent(e))); o.label = 2; case 2: return [2, new Promise(function (e, o) { n = n.replace(/^http/, "ws"); var s, h = i.httpClient.getCookieString(n), c = !1; r.Platform.isNode && h && (s = new i.webSocketConstructor(n, undefined, { headers: { Cookie: "" + h } })); s || (s = new i.webSocketConstructor(n)); t === f.TransferFormat.Binary && (s.binaryType = "arraybuffer"); s.onopen = function () { i.logger.log(u.LogLevel.Information, "WebSocket connected to " + n + "."); i.webSocket = s; c = !0; e() }; s.onerror = function (n) { var t = null; t = typeof ErrorEvent != "undefined" && n instanceof ErrorEvent ? n.error : new Error("There was an error with the transport."); o(t) }; s.onmessage = function (n) { if (i.logger.log(u.LogLevel.Trace, "(WebSockets transport) data received. " + Object(r.getDataDetail)(n.data, i.logMessageContent) + "."), i.onreceive) i.onreceive(n.data) }; s.onclose = function (n) { if (c) i.close(n); else { var t = null; t = typeof ErrorEvent != "undefined" && n instanceof ErrorEvent ? n.error : new Error("There was an error with the transport."); o(t) } } })] } }) }) }, n.prototype.send = function (n) { return this.webSocket && this.webSocket.readyState === this.webSocketConstructor.OPEN ? (this.logger.log(u.LogLevel.Trace, "(WebSockets transport) sending data. " + Object(r.getDataDetail)(n, this.logMessageContent) + "."), this.webSocket.send(n), Promise.resolve()) : Promise.reject("WebSocket is not in the OPEN state") }, n.prototype.stop = function () { return this.webSocket && this.close(undefined), Promise.resolve() }, n.prototype.close = function (n) { if (this.webSocket && (this.webSocket.onclose = function () { }, this.webSocket.onmessage = function () { }, this.webSocket.onerror = function () { }, this.webSocket.close(), this.webSocket = undefined), this.logger.log(u.LogLevel.Trace, "(WebSockets transport) socket closed."), this.onclose) if (n && (n.wasClean === !1 || n.code !== 1e3)) this.onclose(new Error("WebSocket closed with status code: " + n.code + " (" + n.reason + ").")); else this.onclose() }, n }() }, function (n, t, i) { "use strict"; i.r(t); i.d(t, "JsonHubProtocol", function () { return h }); var r = i(15), f = i(9), e = i(20), o = i(14), u = i(12), s = "json", h = function () { function n() { this.name = s; this.version = 1; this.transferFormat = e.TransferFormat.Text } return n.prototype.parseMessages = function (n, t) { var c, s, e, h, l, i; if (typeof n != "string") throw new Error("Invalid input for JSON hub protocol. Expected a string."); if (!n) return []; for (t === null && (t = o.NullLogger.instance), c = u.TextMessageFormat.parse(n), s = [], e = 0, h = c; e < h.length; e++) { if (l = h[e], i = JSON.parse(l), typeof i.type != "number") throw new Error("Invalid payload."); switch (i.type) { case r.MessageType.Invocation: this.isInvocationMessage(i); break; case r.MessageType.StreamItem: this.isStreamItemMessage(i); break; case r.MessageType.Completion: this.isCompletionMessage(i); break; case r.MessageType.Ping: break; case r.MessageType.Close: break; default: t.log(f.LogLevel.Information, "Unknown message type '" + i.type + "' ignored."); continue }s.push(i) } return s }, n.prototype.writeMessage = function (n) { return u.TextMessageFormat.write(JSON.stringify(n)) }, n.prototype.isInvocationMessage = function (n) { this.assertNotEmptyString(n.target, "Invalid payload for Invocation message."); n.invocationId !== undefined && this.assertNotEmptyString(n.invocationId, "Invalid payload for Invocation message.") }, n.prototype.isStreamItemMessage = function (n) { if (this.assertNotEmptyString(n.invocationId, "Invalid payload for StreamItem message."), n.item === undefined) throw new Error("Invalid payload for StreamItem message."); }, n.prototype.isCompletionMessage = function (n) { if (n.result && n.error) throw new Error("Invalid payload for Completion message."); !n.result && n.error && this.assertNotEmptyString(n.error, "Invalid payload for Completion message."); this.assertNotEmptyString(n.invocationId, "Invalid payload for Completion message.") }, n.prototype.assertNotEmptyString = function (n, t) { if (typeof n != "string" || n === "") throw new Error(t); }, n }() }])
  47. }); !function (n, t) { "object" == typeof exports && "undefined" != typeof module ? module.exports = t() : "function" == typeof define && define.amd ? define(t) : (n = n || self).SimpleBar = t() }(this, function () { "use strict"; function ht(n, t) { return n(t = { exports: {} }, t.exports), t.exports } function ya(n, t, i) { function v(t) { var i = f, r = e; return f = e = void 0, s = t, o = n.apply(r, i) } function w(n) { var i = n - u; return void 0 === u || i >= t || i < 0 || c && n - s >= h } function l() { var n = bu(); if (w(n)) return b(n); r = setTimeout(l, function (n) { var i = t - (n - u); return c ? va(i, h - (n - s)) : i }(n)) } function b(n) { return r = void 0, a && f ? v(n) : (f = e = void 0, o) } function y() { var n = bu(), i = w(n); if (f = arguments, e = this, u = n, i) { if (void 0 === r) return function (n) { return s = n, r = setTimeout(l, t), p ? v(n) : o }(u); if (c) return r = setTimeout(l, t), v(u) } return void 0 === r && (r = setTimeout(l, t)), o } var f, e, h, o, r, u, s = 0, p = !1, c = !1, a = !0; if ("function" != typeof n) throw new TypeError(bo); return t = go(t) || 0, fr(i) && (p = !!i.leading, h = (c = "maxWait" in i) ? aa(go(i.maxWait) || 0, t) : h, a = "trailing" in i ? !!i.trailing : a), y.cancel = function () { void 0 !== r && clearTimeout(r); s = 0; f = u = e = r = void 0 }, y.flush = function () { return void 0 === r ? o : b(bu()) }, y } function fr(n) { var t = typeof n; return !!n && ("object" == t || "function" == t) } function go(n) { var t, i; return "number" == typeof n ? n : function (n) { return "symbol" == typeof n || function (n) { return !!n && "object" == typeof n }(n) && la.call(n) == ia }(n) ? ko : (fr(n) && (t = "function" == typeof n.valueOf ? n.valueOf() : n, n = fr(t) ? t + "" : t), "string" != typeof n) ? 0 === n ? n : +n : (n = n.replace(ra, ""), i = fa.test(n), i || ea.test(n) ? oa(n.slice(2), i ? 2 : 8) : ua.test(n) ? ko : +n) } function du(n) { var t = typeof n; return !!n && ("object" == t || "function" == t) } function is(n) { var t, i; return "number" == typeof n ? n : function (n) { return "symbol" == typeof n || function (n) { return !!n && "object" == typeof n }(n) && uv.call(n) == wa }(n) ? ts : (du(n) && (t = "function" == typeof n.valueOf ? n.valueOf() : n, n = du(t) ? t + "" : t), "string" != typeof n) ? 0 === n ? n : +n : (n = n.replace(ba, ""), i = da.test(n), i || ga.test(n) ? nv(n.slice(2), i ? 2 : 8) : ka.test(n) ? ts : +n) } function k(n) { var i = -1, r = n ? n.length : 0, t; for (this.clear(); ++i < r;)t = n[i], this.set(t[0], t[1]) } function ot(n) { var i = -1, r = n ? n.length : 0, t; for (this.clear(); ++i < r;)t = n[i], this.set(t[0], t[1]) } function d(n) { var i = -1, r = n ? n.length : 0, t; for (this.clear(); ++i < r;)t = n[i], this.set(t[0], t[1]) } function er(n, t) { for (var i, r, u = n.length; u--;)if ((i = n[u][0]) === (r = t) || i != i && r != r) return u; return -1 } function dv(n) { return !(!cs(n) || (t = n, os && os in t)) && (function (n) { var t = cs(n) ? pv.call(n) : ""; return t == sv || t == hv }(n) || function (n) { var t = !1; if (null != n && "function" != typeof n.toString) try { t = !!(n + "") } catch (n) { } return t }(n) ? wv : cv).test(function (n) { if (null != n) { try { return ss.call(n) } catch (n) { } try { return n + "" } catch (n) { } } return "" }(n)); var t } function or(n, t) { var r, i, u = n.__data__; return ("string" == (i = typeof (r = t)) || "number" == i || "symbol" == i || "boolean" == i ? "__proto__" !== r : null === r) ? u["string" == typeof t ? "string" : "hash"] : u.map } function hs(n, t) { var i = function (n, t) { if (null != n) return n[t] }(n, t); if (dv(i)) return i } function tf(n, t) { if ("function" != typeof n || t && "function" != typeof t) throw new TypeError(ov); var i = function () { var r = arguments, u = t ? t.apply(this, r) : r[0], f = i.cache, e; return f.has(u) ? f.get(u) : (e = n.apply(this, r), i.cache = f.set(u, e), e) }; return i.cache = new (tf.Cache || d), i } function cs(n) { var t = typeof n; return !!n && ("object" == t || "function" == t) } function hr(n) { return parseFloat(n) || 0 } function ys(n) { for (var i = [], t = 1; t < arguments.length; t++)i[t - 1] = arguments[t]; return i.reduce(function (t, i) { return t + hr(n["border-" + i + "-width"]) }, 0) } function ey(n) { var f = n.clientWidth, e = n.clientHeight, h, c; if (!f && !e) return vs; var t = st(n).getComputedStyle(n), i = function (n) { for (var i, f, r = {}, t = 0, u = ["top", "right", "bottom", "left"]; t < u.length; t++)i = u[t], f = n["padding-" + i], r[i] = hr(f); return r }(t), o = i.left + i.right, s = i.top + i.bottom, r = hr(t.width), u = hr(t.height); return ("border-box" === t.boxSizing && (Math.round(r + o) !== f && (r -= ys(t, "left", "right") + o), Math.round(u + s) !== e && (u -= ys(t, "top", "bottom") + s)), function (n) { return n === st(n).document.documentElement }(n)) || (h = Math.round(r + o) - f, c = Math.round(u + s) - e, 1 !== Math.abs(h) && (r -= h), 1 !== Math.abs(c) && (u -= c)), cr(i.left, i.top, r, u) } function oy(n) { return rf ? ps(n) ? function (n) { var t = n.getBBox(); return cr(0, 0, t.width, t.height) }(n) : ey(n) : vs } function cr(n, t, i, r) { return { x: n, y: t, width: i, height: r } } function ds() { var t, n, i; if (null === dt) { if ("undefined" == typeof document) return dt = 0; t = document.body; n = document.createElement("div"); n.classList.add("simplebar-hide-scrollbar"); t.appendChild(n); i = n.getBoundingClientRect().right; t.removeChild(n); dt = i } return dt } function a(n) { return n && n.ownerDocument && n.ownerDocument.defaultView ? n.ownerDocument.defaultView : window } function af(n) { return n && n.ownerDocument ? n.ownerDocument : document } var f = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}, ti, ct, ii, ri = "object", ui = function (n) { return n && n.Math == Math && n }, t = ui(typeof globalThis == ri && globalThis) || ui(typeof window == ri && window) || ui(typeof self == ri && self) || ui(typeof f == ri && f) || Function("return this")(), r = function (n) { try { return !!n() } catch (n) { return !0 } }, v = !r(function () { return 7 != Object.defineProperty({}, "a", { get: function () { return 7 } }).a }), vf = {}.propertyIsEnumerable, yf = Object.getOwnPropertyDescriptor, pf = { f: yf && !vf.call({ 1: 2 }, 1) ? function (n) { var t = yf(this, n); return !!t && t.enumerable } : vf }, ar = function (n, t) { return { enumerable: !(1 & n), configurable: !(2 & n), writable: !(4 & n), value: t } }, rh = {}.toString, g = function (n) { return rh.call(n).slice(8, -1) }, uh = "".split, fi = r(function () { return !Object("z").propertyIsEnumerable(0) }) ? function (n) { return "String" == g(n) ? uh.call(n, "") : Object(n) } : Object, nt = function (n) { if (null == n) throw TypeError("Can't call method on " + n); return n }, ei = function (n) { return fi(nt(n)) }, n = function (n) { return "object" == typeof n ? null !== n : "function" == typeof n }, wf = function (t, i) { if (!n(t)) return t; var r, u; if (i && "function" == typeof (r = t.toString) && !n(u = r.call(t)) || "function" == typeof (r = t.valueOf) && !n(u = r.call(t)) || !i && "function" == typeof (r = t.toString) && !n(u = r.call(t))) return u; throw TypeError("Can't convert object to primitive value"); }, fh = {}.hasOwnProperty, u = function (n, t) { return fh.call(n, t) }, vr = t.document, eh = n(vr) && n(vr.createElement), bf = function (n) { return eh ? vr.createElement(n) : {} }, kf = !v && !r(function () { return 7 != Object.defineProperty(bf("div"), "a", { get: function () { return 7 } }).a }), df = Object.getOwnPropertyDescriptor, gf = { f: v ? df : function (n, t) { if (n = ei(n), t = wf(t, !0), kf) try { return df(n, t) } catch (n) { } if (u(n, t)) return ar(!pf.f.call(n, t), n[t]) } }, s = function (t) { if (!n(t)) throw TypeError(String(t) + " is not an object"); return t }, ne = Object.defineProperty, tt = { f: v ? ne : function (n, t, i) { if (s(n), t = wf(t, !0), s(i), kf) try { return ne(n, t, i) } catch (n) { } if ("get" in i || "set" in i) throw TypeError("Accessors not supported"); return "value" in i && (n[t] = i.value), n } }, o = v ? function (n, t, i) { return tt.f(n, t, ar(1, i)) } : function (n, t, i) { return n[t] = i, n }, yr = function (n, i) { try { o(t, n, i) } catch (r) { t[n] = i } return i }, oi = ht(function (n) { var i = t["__core-js_shared__"] || yr("__core-js_shared__", {}); (n.exports = function (n, t) { return i[n] || (i[n] = void 0 !== t ? t : {}) })("versions", []).push({ version: "3.2.1", mode: "global", copyright: "© 2019 Denis Pushkarev (zloirock.ru)" }) }), si = oi("native-function-to-string", Function.toString), te = t.WeakMap, ie = "function" == typeof te && /native code/.test(si.call(te)), oh = 0, sh = Math.random(), pr = function (n) { return "Symbol(" + String(void 0 === n ? "" : n) + ")_" + (++oh + sh).toString(36) }, re = oi("keys"), wr = function (n) { return re[n] || (re[n] = pr(n)) }, hi = {}, hh = t.WeakMap, rt, vi, we, dr, yt, wi, bi, bt, fu, ou, su, vo, au, ur, wu, h, b, ps, uf, gs, gt, ni, i; if (ie) { var it = new hh, ch = it.get, lh = it.has, ah = it.set; ti = function (n, t) { return ah.call(it, n, t), t }; ct = function (n) { return ch.call(it, n) || {} }; ii = function (n) { return lh.call(it, n) } } else rt = wr("state"), hi[rt] = !0, ti = function (n, t) { return o(n, rt, t), t }, ct = function (n) { return u(n, rt) ? n[rt] : {} }, ii = function (n) { return u(n, rt) }; var c = { set: ti, get: ct, has: ii, enforce: function (n) { return ii(n) ? ct(n) : ti(n, {}) }, getterFor: function (t) { return function (i) { var r; if (!n(i) || (r = ct(i)).type !== t) throw TypeError("Incompatible receiver, " + t + " required"); return r } } }, y = ht(function (n) { var i = c.get, r = c.enforce, f = String(si).split("toString"); oi("inspectSource", function (n) { return si.call(n) }); (n.exports = function (n, i, e, s) { var c = !!s && !!s.unsafe, h = !!s && !!s.enumerable, l = !!s && !!s.noTargetGet; "function" == typeof e && ("string" != typeof i || u(e, "name") || o(e, "name", i), r(e).source = f.join("string" == typeof i ? i : "")); n !== t ? (c ? !l && n[i] && (h = !0) : delete n[i], h ? n[i] = e : o(n, i, e)) : h ? n[i] = e : yr(i, e) })(Function.prototype, "toString", function () { return "function" == typeof this && i(this).source || si.call(this) }) }), br = t, ue = function (n) { if ("function" == typeof n) return n }, fe = function (n, i) { return arguments.length < 2 ? ue(br[n]) || ue(t[n]) : br[n] && br[n][i] || t[n] && t[n][i] }, vh = Math.ceil, yh = Math.floor, ci = function (n) { return isNaN(n = +n) ? 0 : (n > 0 ? yh : vh)(n) }, ph = Math.min, ut = function (n) { return n > 0 ? ph(ci(n), 9007199254740991) : 0 }, wh = Math.max, bh = Math.min, ee = function (n) { return function (t, i, r) { var o, f = ei(t), e = ut(f.length), u = function (n, t) { var i = ci(n); return i < 0 ? wh(i + t, 0) : bh(i, t) }(r, e); if (n && i != i) { for (; e > u;)if ((o = f[u++]) != o) return !0 } else for (; e > u; u++)if ((n || u in f) && f[u] === i) return n || u || 0; return !n && -1 } }, kh = { includes: ee(!0), indexOf: ee(!1) }.indexOf, oe = function (n, t) { var i, f = ei(n), e = 0, r = []; for (i in f) !u(hi, i) && u(f, i) && r.push(i); for (; t.length > e;)u(f, i = t[e++]) && (~kh(r, i) || r.push(i)); return r }, li = ["constructor", "hasOwnProperty", "isPrototypeOf", "propertyIsEnumerable", "toLocaleString", "toString", "valueOf"], dh = li.concat("length", "prototype"), gh = { f: Object.getOwnPropertyNames || function (n) { return oe(n, dh) } }, se = { f: Object.getOwnPropertySymbols }, nc = fe("Reflect", "ownKeys") || function (n) { var t = gh.f(s(n)), i = se.f; return i ? t.concat(i(n)) : t }, tc = function (n, t) { for (var i, f = nc(t), e = tt.f, o = gf.f, r = 0; r < f.length; r++)i = f[r], u(n, i) || e(n, i, o(t, i)) }, ic = /#|\.prototype\./, lt = function (n, t) { var i = uc[rc(n)]; return i == ec || i != fc && ("function" == typeof t ? r(t) : !!t) }, rc = lt.normalize = function (n) { return String(n).replace(ic, ".").toLowerCase() }, uc = lt.data = {}, fc = lt.NATIVE = "N", ec = lt.POLYFILL = "P", kr = lt, oc = gf.f, l = function (n, i) { var e, r, u, f, h, s = n.target, c = n.global, l = n.stat; if (e = c ? t : l ? t[s] || yr(s, {}) : (t[s] || {}).prototype) for (r in i) { if (f = i[r], u = n.noTargetGet ? (h = oc(e, r)) && h.value : e[r], !kr(c ? r : s + (l ? "." : "#") + r, n.forced) && void 0 !== u) { if (typeof f == typeof u) continue; tc(f, u) } (n.sham || u && u.sham) && o(f, "sham", !0); y(e, r, f, n) } }, he = function (n) { if ("function" != typeof n) throw TypeError(String(n) + " is not a function"); return n }, ce = function (n, t, i) { if (he(n), void 0 === t) return n; switch (i) { case 0: return function () { return n.call(t) }; case 1: return function (i) { return n.call(t, i) }; case 2: return function (i, r) { return n.call(t, i, r) }; case 3: return function (i, r, u) { return n.call(t, i, r, u) } }return function () { return n.apply(t, arguments) } }, at = function (n) { return Object(nt(n)) }, le = Array.isArray || function (n) { return "Array" == g(n) }, ae = !!Object.getOwnPropertySymbols && !r(function () { return !String(Symbol()) }), ve = t.Symbol, ye = oi("wks"), e = function (n) { return ye[n] || (ye[n] = ae && ve[n] || (ae ? ve : pr)("Symbol." + n)) }, sc = e("species"), hc = function (t, i) { var r; return le(t) && ("function" != typeof (r = t.constructor) || r !== Array && !le(r.prototype) ? n(r) && null === (r = r[sc]) && (r = void 0) : r = void 0), new (void 0 === r ? Array : r)(0 === i ? 0 : i) }, cc = [].push, p = function (n) { var i = 1 == n, u = 2 == n, f = 3 == n, t = 4 == n, r = 6 == n, e = 5 == n || r; return function (o, s, h, c) { for (var a, v, w = at(o), y = fi(w), d = ce(s, h, 3), b = ut(y.length), l = 0, k = c || hc, p = i ? k(o, b) : u ? k(o, 0) : void 0; b > l; l++)if ((e || l in y) && (v = d(a = y[l], l, w), n)) if (i) p[l] = v; else if (v) switch (n) { case 3: return !0; case 5: return a; case 6: return l; case 2: cc.call(p, a) } else if (t) return !1; return r ? -1 : f || t ? t : p } }, ai = { forEach: p(0), map: p(1), filter: p(2), some: p(3), every: p(4), find: p(5), findIndex: p(6) }, pe = function (n, t) { var i = [][n]; return !i || !r(function () { i.call(null, t || function () { throw 1; }, 1) }) }, lc = ai.forEach, vt = pe("forEach") ? function (n) { return lc(this, n, arguments.length > 1 ? arguments[1] : void 0) } : [].forEach; l({ target: "Array", proto: !0, forced: [].forEach != vt }, { forEach: vt }); vi = { CSSRuleList: 0, CSSStyleDeclaration: 0, CSSValueList: 0, ClientRectList: 0, DOMRectList: 0, DOMStringList: 0, DOMTokenList: 1, DataTransferItemList: 0, FileList: 0, HTMLAllCollection: 0, HTMLCollection: 0, HTMLFormElement: 0, HTMLSelectElement: 0, MediaList: 0, MimeTypeArray: 0, NamedNodeMap: 0, NodeList: 1, PaintRequestList: 0, Plugin: 0, PluginArray: 0, SVGLengthList: 0, SVGNumberList: 0, SVGPathSegList: 0, SVGPointList: 0, SVGStringList: 0, SVGTransformList: 0, SourceBufferList: 0, StyleSheetList: 0, TextTrackCueList: 0, TextTrackList: 0, TouchList: 0 }; for (we in vi) if (dr = t[we], yt = dr && dr.prototype, yt && yt.forEach !== vt) try { o(yt, "forEach", vt) } catch (f) { yt.forEach = vt } var gr = !("undefined" == typeof window || !window.document || !window.document.createElement), ac = e("species"), vc = ai.filter; l({ target: "Array", proto: !0, forced: !function (n) { return !r(function () { var t = []; return (t.constructor = {})[ac] = function () { return { foo: 1 } }, 1 !== t[n](Boolean).foo }) }("filter") }, { filter: function (n) { return vc(this, n, arguments.length > 1 ? arguments[1] : void 0) } }); var yi = Object.keys || function (n) { return oe(n, li) }, yc = v ? Object.defineProperties : function (n, t) { s(n); for (var i, r = yi(t), f = r.length, u = 0; f > u;)tt.f(n, i = r[u++], t[i]); return n }, pc = fe("document", "documentElement"), be = wr("IE_PROTO"), nu = function () { }, pi = function () { var n, t = bf("iframe"), i = li.length; for (t.style.display = "none", pc.appendChild(t), t.src = String("javascript:"), (n = t.contentWindow.document).open(), n.write("<script>document.F=Object<\/script>"), n.close(), pi = n.F; i--;)delete pi.prototype[li[i]]; return pi() }, ke = Object.create || function (n, t) { var i; return null !== n ? (nu.prototype = s(n), i = new nu, nu.prototype = null, i[be] = n) : i = pi(), void 0 === t ? i : yc(i, t) }; hi[be] = !0; wi = e("unscopables"); bi = Array.prototype; null == bi[wi] && o(bi, wi, ke(null)); var ft, de, ge, tu = function (n) { bi[wi][n] = !0 }, et = {}, wc = !r(function () { function n() { } return n.prototype.constructor = null, Object.getPrototypeOf(new n) !== n.prototype }), no = wr("IE_PROTO"), bc = Object.prototype, ki = wc ? Object.getPrototypeOf : function (n) { return n = at(n), u(n, no) ? n[no] : "function" == typeof n.constructor && n instanceof n.constructor ? n.constructor.prototype : n instanceof Object ? bc : null }, to = e("iterator"), io = !1;[].keys && ("next" in (ge = [].keys()) ? (de = ki(ki(ge))) !== Object.prototype && (ft = de) : io = !0); null == ft && (ft = {}); u(ft, to) || o(ft, to, function () { return this }); var iu = { IteratorPrototype: ft, BUGGY_SAFARI_ITERATORS: io }, kc = tt.f, ro = e("toStringTag"), ru = function (n, t, i) { n && !u(n = i ? n : n.prototype, ro) && kc(n, ro, { configurable: !0, value: t }) }, dc = iu.IteratorPrototype, gc = function () { return this }, di = Object.setPrototypeOf || ("__proto__" in {} ? function () { var t, i = !1, r = {}; try { (t = Object.getOwnPropertyDescriptor(Object.prototype, "__proto__").set).call(r, []); i = r instanceof Array } catch (t) { } return function (r, u) { return s(r), function (t) { if (!n(t) && null !== t) throw TypeError("Can't set " + String(t) + " as a prototype"); }(u), i ? t.call(r, u) : r.__proto__ = u, r } }() : void 0), uu = iu.IteratorPrototype, gi = iu.BUGGY_SAFARI_ITERATORS, pt = e("iterator"), nl = function () { return this }, uo = function (n, t, i, r, u, f, e) { !function (n, t, i) { var r = t + " Iterator"; n.prototype = ke(dc, { next: ar(1, i) }); ru(n, r, !1); et[r] = gc }(i, t, r); var h, a, p, w = function (n) { if (n === u && c) return c; if (!gi && n in s) return s[n]; switch (n) { case "keys": case "values": case "entries": return function () { return new i(this, n) } }return function () { return new i(this) } }, d = t + " Iterator", b = !1, s = n.prototype, v = s[pt] || s["@@iterator"] || u && s[u], c = !gi && v || w(u), k = "Array" == t && s.entries || v; if (k && (h = ki(k.call(new n)), uu !== Object.prototype && h.next && (ki(h) !== uu && (di ? di(h, uu) : "function" != typeof h[pt] && o(h, pt, nl)), ru(h, d, !0))), "values" == u && v && "values" !== v.name && (b = !0, c = function () { return v.call(this) }), s[pt] !== c && o(s, pt, c), et[t] = c, u) if (a = { values: w("values"), keys: f ? c : w("keys"), entries: w("entries") }, e) for (p in a) !gi && !b && p in s || y(s, p, a[p]); else l({ target: t, proto: !0, forced: gi || b }, a); return a }, tl = c.set, il = c.getterFor("Array Iterator"), wt = uo(Array, "Array", function (n, t) { tl(this, { type: "Array Iterator", target: ei(n), index: 0, kind: t }) }, function () { var t = il(this), i = t.target, r = t.kind, n = t.index++; return !i || n >= i.length ? (t.target = void 0, { value: void 0, done: !0 }) : "keys" == r ? { value: n, done: !1 } : "values" == r ? { value: i[n], done: !1 } : { value: [n, i[n]], done: !1 } }, "values"); et.Arguments = et.Array; tu("keys"); tu("values"); tu("entries"); bt = Object.assign; fu = !bt || r(function () { var n = {}, t = {}, i = Symbol(); return n[i] = 7, "abcdefghijklmnopqrst".split("").forEach(function (n) { t[n] = n }), 7 != bt({}, n)[i] || "abcdefghijklmnopqrst" != yi(bt({}, t)).join("") }) ? function (n) { for (var r = at(n), s = arguments.length, u = 1, f = se.f, h = pf.f; s > u;)for (var i, t = fi(arguments[u++]), e = f ? yi(t).concat(f(t)) : yi(t), c = e.length, o = 0; c > o;)i = e[o++], v && !h.call(t, i) || (r[i] = t[i]); return r } : bt; l({ target: "Object", stat: !0, forced: Object.assign !== fu }, { assign: fu }); var rl = e("toStringTag"), ul = "Arguments" == g(function () { return arguments }()), fo = function (n) { var t, i, r; return void 0 === n ? "Undefined" : null === n ? "Null" : "string" == typeof (i = function (n, t) { try { return n[t] } catch (n) { } }(t = Object(n), rl)) ? i : ul ? g(t) : "Object" == (r = g(t)) && "function" == typeof t.callee ? "Arguments" : r }, eu = {}; eu[e("toStringTag")] = "z"; ou = "[object z]" !== String(eu) ? function () { return "[object " + fo(this) + "]" } : eu.toString; su = Object.prototype; ou !== su.toString && y(su, "toString", ou, { unsafe: !0 }); var hu = "\t\n\v\f\r                \u2028\u2029\ufeff", nr = "[" + hu + "]", fl = RegExp("^" + nr + nr + "*"), el = RegExp(nr + nr + "*$"), cu = function (n) { return function (t) { var i = String(nt(t)); return 1 & n && (i = i.replace(fl, "")), 2 & n && (i = i.replace(el, "")), i } }, ol = { start: cu(1), end: cu(2), trim: cu(3) }.trim, tr = t.parseInt, sl = /^[+-]?0[Xx]/, eo = 8 !== tr(hu + "08") || 22 !== tr(hu + "0x16") ? function (n, t) { var i = ol(String(n)); return tr(i, t >>> 0 || (sl.test(i) ? 16 : 10)) } : tr; l({ global: !0, forced: parseInt != eo }, { parseInt: eo }); var oo = function (n) { return function (t, i) { var f, e, u = String(nt(t)), r = ci(i), o = u.length; return r < 0 || r >= o ? n ? "" : void 0 : (f = u.charCodeAt(r)) < 55296 || f > 56319 || r + 1 === o || (e = u.charCodeAt(r + 1)) < 56320 || e > 57343 ? n ? u.charAt(r) : f : n ? u.slice(r, r + 2) : e - 56320 + (f - 55296 << 10) + 65536 } }, so = { codeAt: oo(!1), charAt: oo(!0) }, hl = so.charAt, cl = c.set, ll = c.getterFor("String Iterator"); uo(String, "String", function (n) { cl(this, { type: "String Iterator", string: String(n), index: 0 }) }, function () { var n, t = ll(this), i = t.string, r = t.index; return r >= i.length ? { value: void 0, done: !0 } : (n = hl(i, r), t.index += n.length, { value: n, done: !1 }) }); var lu = function (n, t, i) { for (var r in t) y(n, r, t[r], i); return n }, al = !r(function () { return Object.isExtensible(Object.preventExtensions({})) }), w = ht(function (t) { var e = tt.f, i = pr("meta"), o = 0, r = Object.isExtensible || function () { return !0 }, f = function (n) { e(n, i, { value: { objectID: "O" + ++o, weakData: {} } }) }, s = t.exports = { REQUIRED: !1, fastKey: function (t, e) { if (!n(t)) return "symbol" == typeof t ? t : ("string" == typeof t ? "S" : "P") + t; if (!u(t, i)) { if (!r(t)) return "F"; if (!e) return "E"; f(t) } return t[i].objectID }, getWeakData: function (n, t) { if (!u(n, i)) { if (!r(n)) return !0; if (!t) return !1; f(n) } return n[i].weakData }, onFreeze: function (n) { return al && s.REQUIRED && r(n) && !u(n, i) && f(n), n } }; hi[i] = !0 }), vl = (w.REQUIRED, w.fastKey, w.getWeakData, w.onFreeze, e("iterator")), yl = Array.prototype, pl = e("iterator"), wl = function (n, t, i, r) { try { return r ? t(s(i)[0], i[1]) : t(i) } catch (t) { var u = n.return; throw void 0 !== u && s(u.call(n)), t; } }, ho = ht(function (n) { var t = function (n, t) { this.stopped = n; this.result = t }; (n.exports = function (n, i, r, u, f) { var h, l, o, y, e, c, a, v = ce(i, r, u ? 2 : 1); if (f) h = n; else { if ("function" != typeof (l = function (n) { if (null != n) return n[pl] || n["@@iterator"] || et[fo(n)] }(n))) throw TypeError("Target is not iterable"); if (void 0 !== (a = l) && (et.Array === a || yl[vl] === a)) { for (o = 0, y = ut(n.length); y > o; o++)if ((e = u ? v(s(c = n[o])[0], c[1]) : v(n[o])) && e instanceof t) return e; return new t(!1) } h = l.call(n) } for (; !(c = h.next()).done;)if ((e = wl(h, v, c.value, u)) && e instanceof t) return e; return new t(!1) }).stop = function (n) { return new t(!0, n) } }), co = function (n, t, i) { if (!(n instanceof t)) throw TypeError("Incorrect " + (i ? i + " " : "") + "invocation"); return n }, lo = e("iterator"), ao = !1; try { vo = 0; au = { next: function () { return { done: !!vo++ } }, "return": function () { ao = !0 } }; au[lo] = function () { return this }; Array.from(au, function () { throw 2; }) } catch (f) { } var bl = function (i, u, f, e, o) { var h = t[i], c = h && h.prototype, s = h, a = e ? "set" : "add", b = {}, v = function (t) { var i = c[t]; y(c, t, "add" == t ? function (n) { return i.call(this, 0 === n ? 0 : n), this } : "delete" == t ? function (t) { return !(o && !n(t)) && i.call(this, 0 === t ? 0 : t) } : "get" == t ? function (t) { if (!o || n(t)) return i.call(this, 0 === t ? 0 : t) } : "has" == t ? function (t) { return !(o && !n(t)) && i.call(this, 0 === t ? 0 : t) } : function (n, t) { return i.call(this, 0 === n ? 0 : n, t), this }) }; if (kr(i, "function" != typeof h || !(o || c.forEach && !r(function () { (new h).entries().next() })))) s = f.getConstructor(u, i, e, a), w.REQUIRED = !0; else if (kr(i, !0)) { var p = new s, d = p[a](o ? {} : -0, 1) != p, g = r(function () { p.has(1) }), nt = function (n, t) { var i, r; if (!t && !ao) return !1; i = !1; try { r = {}; r[lo] = function () { return { next: function () { return { done: i = !0 } } } }; n(r) } catch (n) { } return i }(function (n) { new h(n) }), k = !o && r(function () { for (var t = new h, n = 5; n--;)t[a](n, n); return !t.has(-0) }); nt || ((s = u(function (t, r) { co(t, s, i); var u = function (t, i, r) { var u, f; return di && "function" == typeof (u = i.constructor) && u !== r && n(f = u.prototype) && f !== r.prototype && di(t, f), t }(new h, t, s); return null != r && ho(r, u[a], u, e), u })).prototype = c, c.constructor = s); (g || k) && (v("delete"), v("has"), e && v("get")); (k || d) && v(a); o && c.clear && delete c.clear } return b[i] = s, l({ global: !0, forced: s != h }, b), ru(s, i), o || f.setStrong(s, i, e), s }, ir = w.getWeakData, kl = c.set, dl = c.getterFor, gl = ai.find, na = ai.findIndex, ta = 0, rr = function (n) { return n.frozen || (n.frozen = new yo) }, yo = function () { this.entries = [] }, vu = function (n, t) { return gl(n.entries, function (n) { return n[0] === t }) }; yo.prototype = { get: function (n) { var t = vu(this, n); if (t) return t[1] }, has: function (n) { return !!vu(this, n) }, set: function (n, t) { var i = vu(this, n); i ? i[1] = t : this.entries.push([n, t]) }, "delete": function (n) { var t = na(this.entries, function (t) { return t[0] === n }); return ~t && this.entries.splice(t, 1), !!~t } }; var po = { getConstructor: function (t, i, r, f) { var e = t(function (n, t) { co(n, e, i); kl(n, { type: i, id: ta++, frozen: void 0 }); null != t && ho(t, n[f], n, r) }), o = dl(i), h = function (n, t, i) { var r = o(n), u = ir(s(t), !0); return !0 === u ? rr(r).set(t, i) : u[r.id] = i, n }; return lu(e.prototype, { "delete": function (t) { var r = o(this), i; return n(t) ? (i = ir(t), !0 === i ? rr(r).delete(t) : i && u(i, r.id) && delete i[r.id]) : !1 }, has: function (t) { var r = o(this), i; return n(t) ? (i = ir(t), !0 === i ? rr(r).has(t) : i && u(i, r.id)) : !1 } }), lu(e.prototype, r ? { get: function (t) { var r = o(this), i; if (n(t)) return i = ir(t), !0 === i ? rr(r).get(t) : i ? i[r.id] : void 0 }, set: function (n, t) { return h(this, n, t) } } : { add: function (n) { return h(this, n, !0) } }), e } }, yu = (ht(function (i) { var r, f = c.enforce, v = !t.ActiveXObject && "ActiveXObject" in t, e = Object.isExtensible, s = function (n) { return function () { return n(this, arguments.length ? arguments[0] : void 0) } }, y = i.exports = bl("WeakMap", s, po, !0, !0); if (ie && v) { r = po.getConstructor(s, "WeakMap", !0); w.REQUIRED = !0; var u = y.prototype, h = u.delete, o = u.has, l = u.get, a = u.set; lu(u, { "delete": function (t) { if (n(t) && !e(t)) { var i = f(this); return i.frozen || (i.frozen = new r), h.call(this, t) || i.frozen.delete(t) } return h.call(this, t) }, has: function (t) { if (n(t) && !e(t)) { var i = f(this); return i.frozen || (i.frozen = new r), o.call(this, t) || i.frozen.has(t) } return o.call(this, t) }, get: function (t) { if (n(t) && !e(t)) { var i = f(this); return i.frozen || (i.frozen = new r), o.call(this, t) ? l.call(this, t) : i.frozen.get(t) } return l.call(this, t) }, set: function (t, i) { if (n(t) && !e(t)) { var u = f(this); u.frozen || (u.frozen = new r); o.call(this, t) ? a.call(this, t, i) : u.frozen.set(t, i) } else a.call(this, t, i); return this } }) } }), e("iterator")), wo = e("toStringTag"), pu = wt.values; for (ur in vi) if (wu = t[ur], h = wu && wu.prototype, h) { if (h[yu] !== pu) try { o(h, yu, pu) } catch (f) { h[yu] = pu } if (h[wo] || o(h, wo, ur), vi[ur]) for (b in wt) if (h[b] !== wt[b]) try { o(h, b, wt[b]) } catch (f) { h[b] = wt[b] } } var bo = "Expected a function", ko = NaN, ia = "[object Symbol]", ra = /^\s+|\s+$/g, ua = /^[-+]0x[0-9a-f]+$/i, fa = /^0b[01]+$/i, ea = /^0o[0-7]+$/i, oa = parseInt, sa = "object" == typeof f && f && f.Object === Object && f, ha = "object" == typeof self && self && self.Object === Object && self, ca = sa || ha || Function("return this")(), la = Object.prototype.toString, aa = Math.max, va = Math.min, bu = function () { return ca.Date.now() }; var ns = function (n, t, i) { var r = !0, u = !0; if ("function" != typeof n) throw new TypeError(bo); return fr(i) && (r = "leading" in i ? !!i.leading : r, u = "trailing" in i ? !!i.trailing : u), ya(n, t, { leading: r, maxWait: t, trailing: u }) }, pa = "Expected a function", ts = NaN, wa = "[object Symbol]", ba = /^\s+|\s+$/g, ka = /^[-+]0x[0-9a-f]+$/i, da = /^0b[01]+$/i, ga = /^0o[0-7]+$/i, nv = parseInt, tv = "object" == typeof f && f && f.Object === Object && f, iv = "object" == typeof self && self && self.Object === Object && self, rv = tv || iv || Function("return this")(), uv = Object.prototype.toString, fv = Math.max, ev = Math.min, ku = function () { return rv.Date.now() }; var rs = function (n, t, i) { function v(t) { var i = f, r = e; return f = e = void 0, s = t, o = n.apply(r, i) } function w(n) { var i = n - u; return void 0 === u || i >= t || i < 0 || c && n - s >= h } function l() { var n = ku(); if (w(n)) return b(n); r = setTimeout(l, function (n) { var i = t - (n - u); return c ? ev(i, h - (n - s)) : i }(n)) } function b(n) { return r = void 0, a && f ? v(n) : (f = e = void 0, o) } function y() { var n = ku(), i = w(n); if (f = arguments, e = this, u = n, i) { if (void 0 === r) return function (n) { return s = n, r = setTimeout(l, t), p ? v(n) : o }(u); if (c) return r = setTimeout(l, t), v(u) } return void 0 === r && (r = setTimeout(l, t)), o } var f, e, h, o, r, u, s = 0, p = !1, c = !1, a = !0; if ("function" != typeof n) throw new TypeError(pa); return t = is(t) || 0, du(i) && (p = !!i.leading, h = (c = "maxWait" in i) ? fv(is(i.maxWait) || 0, t) : h, a = "trailing" in i ? !!i.trailing : a), y.cancel = function () { void 0 !== r && clearTimeout(r); s = 0; f = u = e = r = void 0 }, y.flush = function () { return void 0 === r ? o : b(ku()) }, y }, ov = "Expected a function", us = "__lodash_hash_undefined__", sv = "[object Function]", hv = "[object GeneratorFunction]", cv = /^\[object .+?Constructor\]$/, lv = "object" == typeof f && f && f.Object === Object && f, av = "object" == typeof self && self && self.Object === Object && self, fs = lv || av || Function("return this")(), vv = Array.prototype, yv = Function.prototype, es = Object.prototype, gu = fs["__core-js_shared__"], os = function () { var n = /[^.]+$/.exec(gu && gu.keys && gu.keys.IE_PROTO || ""); return n ? "Symbol(src)_1." + n : "" }(), ss = yv.toString, nf = es.hasOwnProperty, pv = es.toString, wv = RegExp("^" + ss.call(nf).replace(/[\\^$.*+?()[\]{}|]/g, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"), bv = vv.splice, kv = hs(fs, "Map"), kt = hs(Object, "create"); k.prototype.clear = function () { this.__data__ = kt ? kt(null) : {} }; k.prototype.delete = function (n) { return this.has(n) && delete this.__data__[n] }; k.prototype.get = function (n) { var t = this.__data__, i; return kt ? (i = t[n], i === us ? void 0 : i) : nf.call(t, n) ? t[n] : void 0 }; k.prototype.has = function (n) { var t = this.__data__; return kt ? void 0 !== t[n] : nf.call(t, n) }; k.prototype.set = function (n, t) { return this.__data__[n] = kt && void 0 === t ? us : t, this }; ot.prototype.clear = function () { this.__data__ = [] }; ot.prototype.delete = function (n) { var t = this.__data__, i = er(t, n); return !(i < 0) && (i == t.length - 1 ? t.pop() : bv.call(t, i, 1), !0) }; ot.prototype.get = function (n) { var t = this.__data__, i = er(t, n); if (!(i < 0)) return t[i][1] }; ot.prototype.has = function (n) { return er(this.__data__, n) > -1 }; ot.prototype.set = function (n, t) { var i = this.__data__, r = er(i, n); return r < 0 ? i.push([n, t]) : i[r][1] = t, this }; d.prototype.clear = function () { this.__data__ = { hash: new k, map: new (kv || ot), string: new k } }; d.prototype.delete = function (n) { return or(this, n).delete(n) }; d.prototype.get = function (n) { return or(this, n).get(n) }; d.prototype.has = function (n) { return or(this, n).has(n) }; d.prototype.set = function (n, t) { return or(this, n).set(n, t), this }; tf.Cache = d; var gv = tf, ls = function () { function n(n, t) { var i = -1; return n.some(function (n, r) { return n[0] === t && (i = r, !0) }), i } return "undefined" != typeof Map ? Map : function () { function t() { this.__entries__ = [] } return Object.defineProperty(t.prototype, "size", { get: function () { return this.__entries__.length }, enumerable: !0, configurable: !0 }), t.prototype.get = function (t) { var r = n(this.__entries__, t), i = this.__entries__[r]; return i && i[1] }, t.prototype.set = function (t, i) { var r = n(this.__entries__, t); ~r ? this.__entries__[r][1] = i : this.__entries__.push([t, i]) }, t.prototype.delete = function (t) { var i = this.__entries__, r = n(i, t); ~r && i.splice(r, 1) }, t.prototype.has = function (t) { return !!~n(this.__entries__, t) }, t.prototype.clear = function () { this.__entries__.splice(0) }, t.prototype.forEach = function (n, t) { var i, r, u; for (void 0 === t && (t = null), i = 0, r = this.__entries__; i < r.length; i++)u = r[i], n.call(t, u[1], u[0]) }, t }() }(), rf = "undefined" != typeof window && "undefined" != typeof document && window.document === document, sr = "undefined" != typeof global && global.Math === Math ? global : "undefined" != typeof self && self.Math === Math ? self : "undefined" != typeof window && window.Math === Math ? window : Function("return this")(), ny = "function" == typeof requestAnimationFrame ? requestAnimationFrame.bind(sr) : function (n) { return setTimeout(function () { return n(Date.now()) }, 1e3 / 60) }, ty = 2, iy = 20, ry = ["top", "right", "bottom", "left", "width", "height", "size", "weight"], uy = "undefined" != typeof MutationObserver, fy = function () { function n() { this.connected_ = !1; this.mutationEventsAdded_ = !1; this.mutationsObserver_ = null; this.observers_ = []; this.onTransitionEnd_ = this.onTransitionEnd_.bind(this); this.refresh = function (n, t) { function e() { i && (i = !1, n()); r && f() } function o() { ny(e) } function f() { var n = Date.now(); if (i) { if (n - u < ty) return; r = !0 } else i = !0, r = !1, setTimeout(o, t); u = n } var i = !1, r = !1, u = 0; return f }(this.refresh.bind(this), iy) } return n.prototype.addObserver = function (n) { ~this.observers_.indexOf(n) || this.observers_.push(n); this.connected_ || this.connect_() }, n.prototype.removeObserver = function (n) { var t = this.observers_, i = t.indexOf(n); ~i && t.splice(i, 1); !t.length && this.connected_ && this.disconnect_() }, n.prototype.refresh = function () { this.updateObservers_() && this.refresh() }, n.prototype.updateObservers_ = function () { var n = this.observers_.filter(function (n) { return n.gatherActive(), n.hasActive() }); return n.forEach(function (n) { return n.broadcastActive() }), n.length > 0 }, n.prototype.connect_ = function () { rf && !this.connected_ && (document.addEventListener("transitionend", this.onTransitionEnd_), window.addEventListener("resize", this.refresh), uy ? (this.mutationsObserver_ = new MutationObserver(this.refresh), this.mutationsObserver_.observe(document, { attributes: !0, childList: !0, characterData: !0, subtree: !0 })) : (document.addEventListener("DOMSubtreeModified", this.refresh), this.mutationEventsAdded_ = !0), this.connected_ = !0) }, n.prototype.disconnect_ = function () { rf && this.connected_ && (document.removeEventListener("transitionend", this.onTransitionEnd_), window.removeEventListener("resize", this.refresh), this.mutationsObserver_ && this.mutationsObserver_.disconnect(), this.mutationEventsAdded_ && document.removeEventListener("DOMSubtreeModified", this.refresh), this.mutationsObserver_ = null, this.mutationEventsAdded_ = !1, this.connected_ = !1) }, n.prototype.onTransitionEnd_ = function (n) { var t = n.propertyName, i = void 0 === t ? "" : t; ry.some(function (n) { return !!~i.indexOf(n) }) && this.refresh() }, n.getInstance = function () { return this.instance_ || (this.instance_ = new n), this.instance_ }, n.instance_ = null, n }(), as = function (n, t) { for (var u, i = 0, r = Object.keys(t); i < r.length; i++)u = r[i], Object.defineProperty(n, u, { value: t[u], enumerable: !1, writable: !1, configurable: !0 }); return n }, st = function (n) { return n && n.ownerDocument && n.ownerDocument.defaultView || sr }, vs = cr(0, 0, 0, 0); ps = "undefined" != typeof SVGGraphicsElement ? function (n) { return n instanceof st(n).SVGGraphicsElement } : function (n) { return n instanceof st(n).SVGElement && "function" == typeof n.getBBox }; var sy = function () { function n(n) { this.broadcastWidth = 0; this.broadcastHeight = 0; this.contentRect_ = cr(0, 0, 0, 0); this.target = n } return n.prototype.isActive = function () { var n = oy(this.target); return this.contentRect_ = n, n.width !== this.broadcastWidth || n.height !== this.broadcastHeight }, n.prototype.broadcastRect = function () { var n = this.contentRect_; return this.broadcastWidth = n.width, this.broadcastHeight = n.height, n }, n }(), hy = function (n, t) { var i, r, u, f, e, s, o, h = (r = (i = t).x, u = i.y, f = i.width, e = i.height, s = "undefined" != typeof DOMRectReadOnly ? DOMRectReadOnly : Object, o = Object.create(s.prototype), as(o, { x: r, y: u, width: f, height: e, top: u, right: r + f, bottom: e + u, left: r }), o); as(this, { target: n, contentRect: h }) }, cy = function () { function n(n, t, i) { if (this.activeObservations_ = [], this.observations_ = new ls, "function" != typeof n) throw new TypeError("The callback provided as parameter 1 is not a function."); this.callback_ = n; this.controller_ = t; this.callbackCtx_ = i } return n.prototype.observe = function (n) { if (!arguments.length) throw new TypeError("1 argument required, but only 0 present."); if ("undefined" != typeof Element && Element instanceof Object) { if (!(n instanceof st(n).Element)) throw new TypeError('parameter 1 is not of type "Element".'); var t = this.observations_; t.has(n) || (t.set(n, new sy(n)), this.controller_.addObserver(this), this.controller_.refresh()) } }, n.prototype.unobserve = function (n) { if (!arguments.length) throw new TypeError("1 argument required, but only 0 present."); if ("undefined" != typeof Element && Element instanceof Object) { if (!(n instanceof st(n).Element)) throw new TypeError('parameter 1 is not of type "Element".'); var t = this.observations_; t.has(n) && (t.delete(n), t.size || this.controller_.removeObserver(this)) } }, n.prototype.disconnect = function () { this.clearActive(); this.observations_.clear(); this.controller_.removeObserver(this) }, n.prototype.gatherActive = function () { var n = this; this.clearActive(); this.observations_.forEach(function (t) { t.isActive() && n.activeObservations_.push(t) }) }, n.prototype.broadcastActive = function () { if (this.hasActive()) { var n = this.callbackCtx_, t = this.activeObservations_.map(function (n) { return new hy(n.target, n.broadcastRect()) }); this.callback_.call(n, t, n); this.clearActive() } }, n.prototype.clearActive = function () { this.activeObservations_.splice(0) }, n.prototype.hasActive = function () { return this.activeObservations_.length > 0 }, n }(), ws = "undefined" != typeof WeakMap ? new WeakMap : new ls, bs = function f(n) { if (!(this instanceof f)) throw new TypeError("Cannot call a class as a function."); if (!arguments.length) throw new TypeError("1 argument required, but only 0 present."); var t = fy.getInstance(), i = new cy(n, t, this); ws.set(this, i) };["observe", "unobserve", "disconnect"].forEach(function (n) { bs.prototype[n] = function () { var t; return (t = ws.get(this))[n].apply(t, arguments) } }); var ly = void 0 !== sr.ResizeObserver ? sr.ResizeObserver : bs, dt = null, ks = null; gr && window.addEventListener("resize", function () { ks !== window.devicePixelRatio && (ks = window.devicePixelRatio, dt = null) }); uf = function (n) { return function (t, i, r, u) { he(i); var o = at(t), e = fi(o), s = ut(o.length), f = n ? s - 1 : 0, h = n ? -1 : 1; if (r < 2) for (; ;) { if (f in e) { u = e[f]; f += h; break } if (f += h, n ? f < 0 : s <= f) throw TypeError("Reduce of empty array with no initial value"); } for (; n ? f >= 0 : s > f; f += h)f in e && (u = i(u, e[f], f, o)); return u } }; gs = { left: uf(!1), right: uf(!0) }.left; l({ target: "Array", proto: !0, forced: pe("reduce") }, { reduce: function (n) { return gs(this, n, arguments.length, arguments.length > 1 ? arguments[1] : void 0) } }); var ay = tt.f, ff = Function.prototype, vy = ff.toString, yy = /^\s*function ([^ (]*)/; !v || "name" in ff || ay(ff, "name", { configurable: !0, get: function () { try { return vy.call(this).match(yy)[1] } catch (n) { return "" } } }); var ef, sf, py = function () { var t = s(this), n = ""; return t.global && (n += "g"), t.ignoreCase && (n += "i"), t.multiline && (n += "m"), t.dotAll && (n += "s"), t.unicode && (n += "u"), t.sticky && (n += "y"), n }, lr = RegExp.prototype.exec, wy = String.prototype.replace, nh = lr, hf = (ef = /a/, sf = /b*/g, lr.call(ef, "a"), lr.call(sf, "a"), 0 !== ef.lastIndex || 0 !== sf.lastIndex), cf = void 0 !== /()??/.exec("")[1]; (hf || cf) && (nh = function (n) { var u, f, t, r, i = this; return cf && (f = new RegExp("^" + i.source + "$(?!\\s)", py.call(i))), hf && (u = i.lastIndex), t = lr.call(i, n), hf && t && (i.lastIndex = i.global ? t.index + t[0].length : u), cf && t && t.length > 1 && wy.call(t[0], f, function () { for (r = 1; r < arguments.length - 2; r++)void 0 === arguments[r] && (t[r] = void 0) }), t }); gt = nh; l({ target: "RegExp", proto: !0, forced: /./.exec !== gt }, { exec: gt }); var by = e("species"), ky = !r(function () { var n = /./; return n.exec = function () { var n = []; return n.groups = { a: "7" }, n }, "7" !== "".replace(n, "$<a>") }), dy = !r(function () { var t = /(?:)/, i = t.exec, n; return t.exec = function () { return i.apply(this, arguments) }, n = "ab".split(t), 2 !== n.length || "a" !== n[0] || "b" !== n[1] }), th = function (n, t, i, u) { var f = e(n), s = !r(function () { var t = {}; return t[f] = function () { return 7 }, 7 != ""[n](t) }), l = s && !r(function () { var i = !1, t = /a/; return t.exec = function () { return i = !0, null }, "split" === n && (t.constructor = {}, t.constructor[by] = function () { return t }), t[f](""), !i }); if (!s || !l || "replace" === n && !ky || "split" === n && !dy) { var a = /./[f], h = i(f, ""[n], function (n, t, i, r, u) { return t.exec === gt ? s && !u ? { done: !0, value: a.call(t, i, r) } : { done: !0, value: n.call(i, t, r) } : { done: !1 } }), v = h[0], c = h[1]; y(String.prototype, n, v); y(RegExp.prototype, f, 2 == t ? function (n, t) { return c.call(n, this, t) } : function (n) { return c.call(n, this) }); u && o(RegExp.prototype[f], "sham", !0) } }, gy = so.charAt, ih = function (n, t, i) { return t + (i ? gy(n, t).length : 1) }, lf = function (n, t) { var r = n.exec, i; if ("function" == typeof r) { if (i = r.call(n, t), "object" != typeof i) throw TypeError("RegExp exec method returned something other than an Object or null"); return i } if ("RegExp" !== g(n)) throw TypeError("RegExp#exec called on incompatible receiver"); return gt.call(n, t) }; th("match", 1, function (n, t, i) { return [function (t) { var i = nt(this), r = null == t ? void 0 : t[n]; return void 0 !== r ? r.call(t, i) : new RegExp(t)[n](String(i)) }, function (n) { var h = i(t, n, this), r, u, c, l, e, f, o; if (h.done) return h.value; if (r = s(n), u = String(this), !r.global) return lf(r, u); for (c = r.unicode, r.lastIndex = 0, e = [], f = 0; null !== (l = lf(r, u));)o = String(l[0]), e[f] = o, "" === o && (r.lastIndex = ih(u, ut(r.lastIndex), c)), f++; return 0 === f ? null : e }] }); var np = Math.max, tp = Math.min, ip = Math.floor, rp = /\$([$&'`]|\d\d?|<[^>]*>)/g, up = /\$([$&'`]|\d\d?)/g; return th("replace", 2, function (n, t, i) { function r(n, i, r, u, f, e) { var h = r + n.length, o = u.length, s = up; return void 0 !== f && (f = at(f), s = rp), t.call(e, s, function (t, e) { var l, s, c; switch (e.charAt(0)) { case "$": return "$"; case "&": return n; case "`": return i.slice(0, r); case "'": return i.slice(h); case "<": l = f[e.slice(1, -1)]; break; default: if (s = +e, 0 === s) return t; if (s > o) return c = ip(s / 10), 0 === c ? t : c <= o ? void 0 === u[c - 1] ? e.charAt(1) : u[c - 1] + e.charAt(1) : t; l = u[s - 1] }return void 0 === l ? "" : l }) } return [function (i, r) { var u = nt(this), f = null == i ? void 0 : i[n]; return void 0 !== f ? f.call(i, u, r) : t.call(String(u), i, r) }, function (n, u) { var nt = i(t, n, this, u), v, it, c, f, a, d, g; if (nt.done) return nt.value; var o = s(n), e = String(this), tt = "function" == typeof u; for (tt || (u = String(u)), v = o.global, v && (it = o.unicode, o.lastIndex = 0), c = []; ;) { if (f = lf(o, e), null === f) break; if (c.push(f), !v) break; "" === String(f[0]) && (o.lastIndex = ih(e, ut(o.lastIndex), it)) } for (var y, rt = "", l = 0, p = 0; p < c.length; p++) { f = c[p]; for (var w = String(f[0]), h = np(tp(ci(f.index), e.length), 0), b = [], k = 1; k < f.length; k++)b.push(void 0 === (y = f[k]) ? y : String(y)); a = f.groups; tt ? (d = [w].concat(b, h, e), void 0 !== a && d.push(a), g = String(u.apply(void 0, d))) : g = r(w, e, h, b, a, u); h >= l && (rt += e.slice(l, h) + g, l = h + w.length) } return rt + e.slice(l) }] }), ni = function (n) { return Array.prototype.reduce.call(n, function (n, t) { var r = t.name.match(/data-simplebar-(.+)/), i; if (r) { i = r[1].replace(/\W+(.)/g, function (n, t) { return t.toUpperCase() }); switch (t.value) { case "true": n[i] = !0; break; case "false": n[i] = !1; break; case void 0: n[i] = !0; break; default: n[i] = t.value } } return n }, {}) }, i = function () { function t(n, i) { var r = this; this.onScroll = function () { var n = a(r.el); r.scrollXTicking || (n.requestAnimationFrame(r.scrollX), r.scrollXTicking = !0); r.scrollYTicking || (n.requestAnimationFrame(r.scrollY), r.scrollYTicking = !0) }; this.scrollX = function () { r.axis.x.isOverflowing && (r.showScrollbar("x"), r.positionScrollbar("x")); r.scrollXTicking = !1 }; this.scrollY = function () { r.axis.y.isOverflowing && (r.showScrollbar("y"), r.positionScrollbar("y")); r.scrollYTicking = !1 }; this.onMouseEnter = function () { r.showScrollbar("x"); r.showScrollbar("y") }; this.onMouseMove = function (n) { r.mouseX = n.clientX; r.mouseY = n.clientY; (r.axis.x.isOverflowing || r.axis.x.forceVisible) && r.onMouseMoveForAxis("x"); (r.axis.y.isOverflowing || r.axis.y.forceVisible) && r.onMouseMoveForAxis("y") }; this.onMouseLeave = function () { r.onMouseMove.cancel(); (r.axis.x.isOverflowing || r.axis.x.forceVisible) && r.onMouseLeaveForAxis("x"); (r.axis.y.isOverflowing || r.axis.y.forceVisible) && r.onMouseLeaveForAxis("y"); r.mouseX = -1; r.mouseY = -1 }; this.onWindowResize = function () { r.scrollbarWidth = r.getScrollbarWidth(); r.hideNativeScrollbar() }; this.hideScrollbars = function () { r.axis.x.track.rect = r.axis.x.track.el.getBoundingClientRect(); r.axis.y.track.rect = r.axis.y.track.el.getBoundingClientRect(); r.isWithinBounds(r.axis.y.track.rect) || (r.axis.y.scrollbar.el.classList.remove(r.classNames.visible), r.axis.y.isVisible = !1); r.isWithinBounds(r.axis.x.track.rect) || (r.axis.x.scrollbar.el.classList.remove(r.classNames.visible), r.axis.x.isVisible = !1) }; this.onPointerEvent = function (n) { var t, i; r.axis.x.track.rect = r.axis.x.track.el.getBoundingClientRect(); r.axis.y.track.rect = r.axis.y.track.el.getBoundingClientRect(); (r.axis.x.isOverflowing || r.axis.x.forceVisible) && (t = r.isWithinBounds(r.axis.x.track.rect)); (r.axis.y.isOverflowing || r.axis.y.forceVisible) && (i = r.isWithinBounds(r.axis.y.track.rect)); (t || i) && (n.preventDefault(), n.stopPropagation(), "mousedown" === n.type && (t && (r.axis.x.scrollbar.rect = r.axis.x.scrollbar.el.getBoundingClientRect(), r.isWithinBounds(r.axis.x.scrollbar.rect) ? r.onDragStart(n, "x") : r.onTrackClick(n, "x")), i && (r.axis.y.scrollbar.rect = r.axis.y.scrollbar.el.getBoundingClientRect(), r.isWithinBounds(r.axis.y.scrollbar.rect) ? r.onDragStart(n, "y") : r.onTrackClick(n, "y")))) }; this.drag = function (n) { var u = r.axis[r.draggedAxis].track, f = u.rect[r.axis[r.draggedAxis].sizeAttr], e = r.axis[r.draggedAxis].scrollbar, o = r.contentWrapperEl[r.axis[r.draggedAxis].scrollSizeAttr], s = parseInt(r.elStyles[r.axis[r.draggedAxis].sizeAttr], 10), i; n.preventDefault(); n.stopPropagation(); i = (("y" === r.draggedAxis ? n.pageY : n.pageX) - u.rect[r.axis[r.draggedAxis].offsetAttr] - r.axis[r.draggedAxis].dragOffset) / (f - e.size) * (o - s); "x" === r.draggedAxis && (i = r.isRtl && t.getRtlHelpers().isRtlScrollbarInverted ? i - (f + e.size) : i, i = r.isRtl && t.getRtlHelpers().isRtlScrollingInverted ? -i : i); r.contentWrapperEl[r.axis[r.draggedAxis].scrollOffsetAttr] = i }; this.onEndDrag = function (n) { var t = af(r.el), i = a(r.el); n.preventDefault(); n.stopPropagation(); r.el.classList.remove(r.classNames.dragging); t.removeEventListener("mousemove", r.drag, !0); t.removeEventListener("mouseup", r.onEndDrag, !0); r.removePreventClickId = i.setTimeout(function () { t.removeEventListener("click", r.preventClick, !0); t.removeEventListener("dblclick", r.preventClick, !0); r.removePreventClickId = null }) }; this.preventClick = function (n) { n.preventDefault(); n.stopPropagation() }; this.el = n; this.minScrollbarWidth = 20; this.options = Object.assign({}, t.defaultOptions, {}, i); this.classNames = Object.assign({}, t.defaultOptions.classNames, {}, this.options.classNames); this.axis = { x: { scrollOffsetAttr: "scrollLeft", sizeAttr: "width", scrollSizeAttr: "scrollWidth", offsetSizeAttr: "offsetWidth", offsetAttr: "left", overflowAttr: "overflowX", dragOffset: 0, isOverflowing: !0, isVisible: !1, forceVisible: !1, track: {}, scrollbar: {} }, y: { scrollOffsetAttr: "scrollTop", sizeAttr: "height", scrollSizeAttr: "scrollHeight", offsetSizeAttr: "offsetHeight", offsetAttr: "top", overflowAttr: "overflowY", dragOffset: 0, isOverflowing: !0, isVisible: !1, forceVisible: !1, track: {}, scrollbar: {} } }; this.removePreventClickId = null; t.instances.has(this.el) || (this.recalculate = ns(this.recalculate.bind(this), 64), this.onMouseMove = ns(this.onMouseMove.bind(this), 64), this.hideScrollbars = rs(this.hideScrollbars.bind(this), this.options.timeout), this.onWindowResize = rs(this.onWindowResize.bind(this), 64, { leading: !0 }), t.getRtlHelpers = gv(t.getRtlHelpers), this.init()) } t.getRtlHelpers = function () { var f = document.createElement("div"), n, r, u, i, e; return f.innerHTML = '<div class="hs-dummy-scrollbar-size"><div style="height: 200%; width: 200%; margin: 10px 0;"><\/div><\/div>', n = f.firstElementChild, document.body.appendChild(n), r = n.firstElementChild, n.scrollLeft = 0, u = t.getOffset(n), i = t.getOffset(r), n.scrollLeft = 999, e = t.getOffset(r), { isRtlScrollingInverted: u.left !== i.left && i.left - e.left != 0, isRtlScrollbarInverted: u.left !== i.left } }; t.getOffset = function (n) { var t = n.getBoundingClientRect(), i = af(n), r = a(n); return { top: t.top + (r.pageYOffset || i.documentElement.scrollTop), left: t.left + (r.pageXOffset || i.documentElement.scrollLeft) } }; var n = t.prototype; return n.init = function () { t.instances.set(this.el, this); gr && (this.initDOM(), this.scrollbarWidth = this.getScrollbarWidth(), this.recalculate(), this.initListeners()) }, n.initDOM = function () { var i = this, n, t; if (Array.prototype.filter.call(this.el.children, function (n) { return n.classList.contains(i.classNames.wrapper) }).length) this.wrapperEl = this.el.querySelector("." + this.classNames.wrapper), this.contentWrapperEl = this.options.scrollableNode || this.el.querySelector("." + this.classNames.contentWrapper), this.contentEl = this.options.contentNode || this.el.querySelector("." + this.classNames.contentEl), this.offsetEl = this.el.querySelector("." + this.classNames.offset), this.maskEl = this.el.querySelector("." + this.classNames.mask), this.placeholderEl = this.findChild(this.wrapperEl, "." + this.classNames.placeholder), this.heightAutoObserverWrapperEl = this.el.querySelector("." + this.classNames.heightAutoObserverWrapperEl), this.heightAutoObserverEl = this.el.querySelector("." + this.classNames.heightAutoObserverEl), this.axis.x.track.el = this.findChild(this.el, "." + this.classNames.track + "." + this.classNames.horizontal), this.axis.y.track.el = this.findChild(this.el, "." + this.classNames.track + "." + this.classNames.vertical); else { for (this.wrapperEl = document.createElement("div"), this.contentWrapperEl = document.createElement("div"), this.offsetEl = document.createElement("div"), this.maskEl = document.createElement("div"), this.contentEl = document.createElement("div"), this.placeholderEl = document.createElement("div"), this.heightAutoObserverWrapperEl = document.createElement("div"), this.heightAutoObserverEl = document.createElement("div"), this.wrapperEl.classList.add(this.classNames.wrapper), this.contentWrapperEl.classList.add(this.classNames.contentWrapper), this.offsetEl.classList.add(this.classNames.offset), this.maskEl.classList.add(this.classNames.mask), this.contentEl.classList.add(this.classNames.contentEl), this.placeholderEl.classList.add(this.classNames.placeholder), this.heightAutoObserverWrapperEl.classList.add(this.classNames.heightAutoObserverWrapperEl), this.heightAutoObserverEl.classList.add(this.classNames.heightAutoObserverEl); this.el.firstChild;)this.contentEl.appendChild(this.el.firstChild); this.contentWrapperEl.appendChild(this.contentEl); this.offsetEl.appendChild(this.contentWrapperEl); this.maskEl.appendChild(this.offsetEl); this.heightAutoObserverWrapperEl.appendChild(this.heightAutoObserverEl); this.wrapperEl.appendChild(this.heightAutoObserverWrapperEl); this.wrapperEl.appendChild(this.maskEl); this.wrapperEl.appendChild(this.placeholderEl); this.el.appendChild(this.wrapperEl) } this.axis.x.track.el && this.axis.y.track.el || (n = document.createElement("div"), t = document.createElement("div"), n.classList.add(this.classNames.track), t.classList.add(this.classNames.scrollbar), n.appendChild(t), this.axis.x.track.el = n.cloneNode(!0), this.axis.x.track.el.classList.add(this.classNames.horizontal), this.axis.y.track.el = n.cloneNode(!0), this.axis.y.track.el.classList.add(this.classNames.vertical), this.el.appendChild(this.axis.x.track.el), this.el.appendChild(this.axis.y.track.el)); this.axis.x.scrollbar.el = this.axis.x.track.el.querySelector("." + this.classNames.scrollbar); this.axis.y.scrollbar.el = this.axis.y.track.el.querySelector("." + this.classNames.scrollbar); this.options.autoHide || (this.axis.x.scrollbar.el.classList.add(this.classNames.visible), this.axis.y.scrollbar.el.classList.add(this.classNames.visible)); this.el.setAttribute("data-simplebar", "init") }, n.initListeners = function () { var n = this, t = a(this.el), i, r; this.options.autoHide && this.el.addEventListener("mouseenter", this.onMouseEnter);["mousedown", "click", "dblclick"].forEach(function (t) { n.el.addEventListener(t, n.onPointerEvent, !0) });["touchstart", "touchend", "touchmove"].forEach(function (t) { n.el.addEventListener(t, n.onPointerEvent, { capture: !0, passive: !0 }) }); this.el.addEventListener("mousemove", this.onMouseMove); this.el.addEventListener("mouseleave", this.onMouseLeave); this.contentWrapperEl.addEventListener("scroll", this.onScroll); t.addEventListener("resize", this.onWindowResize); i = !1; r = t.ResizeObserver || ly; this.resizeObserver = new r(function () { i && n.recalculate() }); this.resizeObserver.observe(this.el); this.resizeObserver.observe(this.contentEl); t.requestAnimationFrame(function () { i = !0 }); this.mutationObserver = new t.MutationObserver(this.recalculate); this.mutationObserver.observe(this.contentEl, { childList: !0, subtree: !0, characterData: !0 }) }, n.recalculate = function () { var e = a(this.el), t, i, r, u, f; this.elStyles = e.getComputedStyle(this.el); this.isRtl = "rtl" === this.elStyles.direction; var n = this.contentEl.offsetWidth, o = this.heightAutoObserverEl.offsetHeight <= 1, s = this.heightAutoObserverEl.offsetWidth <= 1 || n > 0, h = this.contentWrapperEl.offsetWidth, c = this.elStyles.overflowX, l = this.elStyles.overflowY; this.contentEl.style.padding = this.elStyles.paddingTop + " " + this.elStyles.paddingRight + " " + this.elStyles.paddingBottom + " " + this.elStyles.paddingLeft; this.wrapperEl.style.margin = "-" + this.elStyles.paddingTop + " -" + this.elStyles.paddingRight + " -" + this.elStyles.paddingBottom + " -" + this.elStyles.paddingLeft; t = this.contentEl.scrollHeight; i = this.contentEl.scrollWidth; this.contentWrapperEl.style.height = o ? "auto" : "100%"; this.placeholderEl.style.width = s ? (n || i) + "px" : "auto"; this.placeholderEl.style.height = t + "px"; r = this.contentWrapperEl.offsetHeight; this.axis.x.isOverflowing = 0 !== n && i > n; this.axis.y.isOverflowing = t > r; this.axis.x.isOverflowing = "hidden" !== c && this.axis.x.isOverflowing; this.axis.y.isOverflowing = "hidden" !== l && this.axis.y.isOverflowing; this.axis.x.forceVisible = "x" === this.options.forceVisible || !0 === this.options.forceVisible; this.axis.y.forceVisible = "y" === this.options.forceVisible || !0 === this.options.forceVisible; this.hideNativeScrollbar(); u = this.axis.x.isOverflowing ? this.scrollbarWidth : 0; f = this.axis.y.isOverflowing ? this.scrollbarWidth : 0; this.axis.x.isOverflowing = this.axis.x.isOverflowing && i > h - f; this.axis.y.isOverflowing = this.axis.y.isOverflowing && t > r - u; this.axis.x.scrollbar.size = this.getScrollbarSize("x"); this.axis.y.scrollbar.size = this.getScrollbarSize("y"); this.axis.x.scrollbar.el.style.width = this.axis.x.scrollbar.size + "px"; this.axis.y.scrollbar.el.style.height = this.axis.y.scrollbar.size + "px"; this.positionScrollbar("x"); this.positionScrollbar("y"); this.toggleTrackVisibility("x"); this.toggleTrackVisibility("y") }, n.getScrollbarSize = function (n) { if (void 0 === n && (n = "y"), !this.axis[n].isOverflowing) return 0; var t, r = this.contentEl[this.axis[n].scrollSizeAttr], i = this.axis[n].track.el[this.axis[n].offsetSizeAttr], u = i / r; return t = Math.max(~~(u * i), this.options.scrollbarMinSize), this.options.scrollbarMaxSize && (t = Math.min(t, this.options.scrollbarMaxSize)), t }, n.positionScrollbar = function (n) { if (void 0 === n && (n = "y"), this.axis[n].isOverflowing) { var e = this.contentWrapperEl[this.axis[n].scrollSizeAttr], f = this.axis[n].track.el[this.axis[n].offsetSizeAttr], o = parseInt(this.elStyles[this.axis[n].sizeAttr], 10), r = this.axis[n].scrollbar, u = this.contentWrapperEl[this.axis[n].scrollOffsetAttr], s = (u = "x" === n && this.isRtl && t.getRtlHelpers().isRtlScrollingInverted ? -u : u) / (e - o), i = ~~((f - r.size) * s); i = "x" === n && this.isRtl && t.getRtlHelpers().isRtlScrollbarInverted ? i + (f - r.size) : i; r.el.style.transform = "x" === n ? "translate3d(" + i + "px, 0, 0)" : "translate3d(0, " + i + "px, 0)" } }, n.toggleTrackVisibility = function (n) { void 0 === n && (n = "y"); var t = this.axis[n].track.el, i = this.axis[n].scrollbar.el; this.axis[n].isOverflowing || this.axis[n].forceVisible ? (t.style.visibility = "visible", this.contentWrapperEl.style[this.axis[n].overflowAttr] = "scroll") : (t.style.visibility = "hidden", this.contentWrapperEl.style[this.axis[n].overflowAttr] = "hidden"); i.style.display = this.axis[n].isOverflowing ? "block" : "none" }, n.hideNativeScrollbar = function () { this.offsetEl.style[this.isRtl ? "left" : "right"] = this.axis.y.isOverflowing || this.axis.y.forceVisible ? "-" + this.scrollbarWidth + "px" : 0; this.offsetEl.style.bottom = this.axis.x.isOverflowing || this.axis.x.forceVisible ? "-" + this.scrollbarWidth + "px" : 0 }, n.onMouseMoveForAxis = function (n) { void 0 === n && (n = "y"); this.axis[n].track.rect = this.axis[n].track.el.getBoundingClientRect(); this.axis[n].scrollbar.rect = this.axis[n].scrollbar.el.getBoundingClientRect(); this.isWithinBounds(this.axis[n].scrollbar.rect) ? this.axis[n].scrollbar.el.classList.add(this.classNames.hover) : this.axis[n].scrollbar.el.classList.remove(this.classNames.hover); this.isWithinBounds(this.axis[n].track.rect) ? (this.showScrollbar(n), this.axis[n].track.el.classList.add(this.classNames.hover)) : this.axis[n].track.el.classList.remove(this.classNames.hover) }, n.onMouseLeaveForAxis = function (n) { void 0 === n && (n = "y"); this.axis[n].track.el.classList.remove(this.classNames.hover); this.axis[n].scrollbar.el.classList.remove(this.classNames.hover) }, n.showScrollbar = function (n) { void 0 === n && (n = "y"); var t = this.axis[n].scrollbar.el; this.axis[n].isVisible || (t.classList.add(this.classNames.visible), this.axis[n].isVisible = !0); this.options.autoHide && this.hideScrollbars() }, n.onDragStart = function (n, t) { void 0 === t && (t = "y"); var i = af(this.el), r = a(this.el), u = this.axis[t].scrollbar, f = "y" === t ? n.pageY : n.pageX; this.axis[t].dragOffset = f - u.rect[this.axis[t].offsetAttr]; this.draggedAxis = t; this.el.classList.add(this.classNames.dragging); i.addEventListener("mousemove", this.drag, !0); i.addEventListener("mouseup", this.onEndDrag, !0); null === this.removePreventClickId ? (i.addEventListener("click", this.preventClick, !0), i.addEventListener("dblclick", this.preventClick, !0)) : (r.clearTimeout(this.removePreventClickId), this.removePreventClickId = null) }, n.onTrackClick = function (n, t) { var r = this, u; if (void 0 === t && (t = "y"), this.options.clickOnTrack) { u = a(this.el); this.axis[t].scrollbar.rect = this.axis[t].scrollbar.el.getBoundingClientRect(); var f = this.axis[t].scrollbar.rect[this.axis[t].offsetAttr], e = parseInt(this.elStyles[this.axis[t].sizeAttr], 10), i = this.contentWrapperEl[this.axis[t].scrollOffsetAttr], o = ("y" === t ? this.mouseY - f : this.mouseX - f) < 0 ? -1 : 1, s = -1 === o ? i - e : i + e; !function n() { var f, e; -1 === o ? i > s && (i -= 40, r.contentWrapperEl.scrollTo(((f = {})[r.axis[t].offsetAttr] = i, f)), u.requestAnimationFrame(n)) : i < s && (i += 40, r.contentWrapperEl.scrollTo(((e = {})[r.axis[t].offsetAttr] = i, e)), u.requestAnimationFrame(n)) }() } }, n.getContentElement = function () { return this.contentEl }, n.getScrollElement = function () { return this.contentWrapperEl }, n.getScrollbarWidth = function () { try { return "none" === getComputedStyle(this.contentWrapperEl, "::-webkit-scrollbar").display || "scrollbarWidth" in document.documentElement.style || "-ms-overflow-style" in document.documentElement.style ? 0 : ds() } catch (n) { return ds() } }, n.removeListeners = function () { var n = this, t = a(this.el); this.options.autoHide && this.el.removeEventListener("mouseenter", this.onMouseEnter);["mousedown", "click", "dblclick"].forEach(function (t) { n.el.removeEventListener(t, n.onPointerEvent, !0) });["touchstart", "touchend", "touchmove"].forEach(function (t) { n.el.removeEventListener(t, n.onPointerEvent, { capture: !0, passive: !0 }) }); this.el.removeEventListener("mousemove", this.onMouseMove); this.el.removeEventListener("mouseleave", this.onMouseLeave); this.contentWrapperEl.removeEventListener("scroll", this.onScroll); t.removeEventListener("resize", this.onWindowResize); this.mutationObserver.disconnect(); this.resizeObserver.disconnect(); this.recalculate.cancel(); this.onMouseMove.cancel(); this.hideScrollbars.cancel(); this.onWindowResize.cancel() }, n.unMount = function () { this.removeListeners(); t.instances.delete(this.el) }, n.isWithinBounds = function (n) { return this.mouseX >= n.left && this.mouseX <= n.left + n.width && this.mouseY >= n.top && this.mouseY <= n.top + n.height }, n.findChild = function (n, t) { var i = n.matches || n.webkitMatchesSelector || n.mozMatchesSelector || n.msMatchesSelector; return Array.prototype.filter.call(n.children, function (n) { return i.call(n, t) })[0] }, t }(), i.defaultOptions = { autoHide: !0, forceVisible: !1, clickOnTrack: !0, classNames: { contentEl: "simplebar-content", contentWrapper: "simplebar-content-wrapper", offset: "simplebar-offset", mask: "simplebar-mask", wrapper: "simplebar-wrapper", placeholder: "simplebar-placeholder", scrollbar: "simplebar-scrollbar", track: "simplebar-track", heightAutoObserverWrapperEl: "simplebar-height-auto-observer-wrapper", heightAutoObserverEl: "simplebar-height-auto-observer", visible: "simplebar-visible", horizontal: "simplebar-horizontal", vertical: "simplebar-vertical", hover: "simplebar-hover", dragging: "simplebar-dragging" }, scrollbarMinSize: 25, scrollbarMaxSize: 0, timeout: 1e3 }, i.instances = new WeakMap, i.initDOMLoadedElements = function () { document.removeEventListener("DOMContentLoaded", this.initDOMLoadedElements); window.removeEventListener("load", this.initDOMLoadedElements); Array.prototype.forEach.call(document.querySelectorAll("[data-simplebar]"), function (n) { "init" === n.getAttribute("data-simplebar") || i.instances.has(n) || new i(n, ni(n.attributes)) }) }, i.removeObserver = function () { this.globalObserver.disconnect() }, i.initHtmlApi = function () { this.initDOMLoadedElements = this.initDOMLoadedElements.bind(this); "undefined" != typeof MutationObserver && (this.globalObserver = new MutationObserver(i.handleMutations), this.globalObserver.observe(document, { childList: !0, subtree: !0 })); "complete" === document.readyState || "loading" !== document.readyState && !document.documentElement.doScroll ? window.setTimeout(this.initDOMLoadedElements) : (document.addEventListener("DOMContentLoaded", this.initDOMLoadedElements), window.addEventListener("load", this.initDOMLoadedElements)) }, i.handleMutations = function (n) { n.forEach(function (n) { Array.prototype.forEach.call(n.addedNodes, function (n) { 1 === n.nodeType && (n.hasAttribute("data-simplebar") ? !i.instances.has(n) && new i(n, ni(n.attributes)) : Array.prototype.forEach.call(n.querySelectorAll("[data-simplebar]"), function (n) { "init" === n.getAttribute("data-simplebar") || i.instances.has(n) || new i(n, ni(n.attributes)) })) }); Array.prototype.forEach.call(n.removedNodes, function (n) { 1 === n.nodeType && (n.hasAttribute('[data-simplebar="init"]') ? i.instances.has(n) && i.instances.get(n).unMount() : Array.prototype.forEach.call(n.querySelectorAll('[data-simplebar="init"]'), function (n) { i.instances.has(n) && i.instances.get(n).unMount() })) }) }) }, i.getOptions = ni, gr && i.initHtmlApi(), i });
  48. /*! For license information please see summernote.min.js.LICENSE.txt */
  49. !function (n, t) { var i, r; if ("object" == typeof exports && "object" == typeof module) module.exports = t(require("jquery")); else if ("function" == typeof define && define.amd) define(["jquery"], t); else { i = "object" == typeof exports ? t(require("jquery")) : t(n.jQuery); for (r in i) ("object" == typeof exports ? exports : n)[r] = i[r] } }(window, function (n) { return function (n) { function t(r) { if (i[r]) return i[r].exports; var u = i[r] = { i: r, l: !1, exports: {} }; return n[r].call(u.exports, u, u.exports, t), u.l = !0, u.exports } var i = {}; return t.m = n, t.c = i, t.d = function (n, i, r) { t.o(n, i) || Object.defineProperty(n, i, { enumerable: !0, get: r }) }, t.r = function (n) { "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(n, Symbol.toStringTag, { value: "Module" }); Object.defineProperty(n, "__esModule", { value: !0 }) }, t.t = function (n, i) { var r, u; if ((1 & i && (n = t(n)), 8 & i) || 4 & i && "object" == typeof n && n && n.__esModule) return n; if (r = Object.create(null), t.r(r), Object.defineProperty(r, "default", { enumerable: !0, value: n }), 2 & i && "string" != typeof n) for (u in n) t.d(r, u, function (t) { return n[t] }.bind(null, u)); return r }, t.n = function (n) { var i = n && n.__esModule ? function () { return n.default } : function () { return n }; return t.d(i, "a", i), i }, t.o = function (n, t) { return Object.prototype.hasOwnProperty.call(n, t) }, t.p = "", t(t.s = 52) }({ 0: function (t) { t.exports = n }, 1: function (n, t, i) { "use strict"; function u(n) { return (u = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (n) { return typeof n } : function (n) { return n && "function" == typeof Symbol && n.constructor === Symbol && n !== Symbol.prototype ? "symbol" : typeof n })(n) } function f(n, t) { for (var i, r = 0; r < t.length; r++)i = t[r], i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(n, i.key, i) } var e = i(0), r = i.n(e), o = function () { function n(t, i, r, u) { !function (n, t) { if (!(n instanceof t)) throw new TypeError("Cannot call a class as a function"); }(this, n); this.markup = t; this.children = i; this.options = r; this.callback = u } var t, i, u; return t = n, (i = [{ key: "render", value: function (n) { var t = r()(this.markup), i; return (this.options && this.options.contents && t.html(this.options.contents), this.options && this.options.className && t.addClass(this.options.className), this.options && this.options.data && r.a.each(this.options.data, function (n, i) { t.attr("data-" + n, i) }), this.options && this.options.click && t.on("click", this.options.click), this.children) && (i = t.find(".note-children-container"), this.children.forEach(function (n) { n.render(i.length ? i : t) })), this.callback && this.callback(t, this.options), this.options && this.options.callback && this.options.callback(t), n && n.append(t), t } }]) && f(t.prototype, i), u && f(t, u), n }(); t.a = { create: function (n, t) { return function () { var i = "object" === u(arguments[1]) ? arguments[1] : arguments[0], r = Array.isArray(arguments[0]) ? arguments[0] : []; return i && i.children && (r = i.children), new o(n, r, i, t) } } } }, 2: function (n) { (function (t) { n.exports = t }).call(this, {}) }, 3: function (n, t, i) { "use strict"; function ui(n) { return -1 === u.a.inArray(n.toLowerCase(), yt) ? "'".concat(n, "'") : n } function ei(n) { return n[0] } function wt(n) { return n[n.length - 1] } function oi(n) { return n.slice(1) } function si(n, t) { if (n && n.length && t) { if (n.indexOf) return -1 !== n.indexOf(t); if (n.contains) return n.contains(t) } return !1 } function p(n) { return n && u()(n).hasClass("note-editable") } function l(n) { return n = n.toUpperCase(), function (t) { return t && t.nodeName.toUpperCase() === n } } function w(n) { return n && 3 === n.nodeType } function ot(n) { return n && /^BR|^IMG|^HR|^IFRAME|^BUTTON|^INPUT|^AUDIO|^VIDEO|^EMBED/.test(n.nodeName.toUpperCase()) } function d(n) { return !p(n) && n && /^DIV|^P|^LI|^H[1-7]/.test(n.nodeName.toUpperCase()) } function st(n) { return !(bt(n) || ai(n) || vi(n) || d(n) || ci(n) || ht(n) || li(n)) } function ai(n) { return n && /^UL|^OL/.test(n.nodeName.toUpperCase()) } function yi(n) { return n && /^TD|^TH/.test(n.nodeName.toUpperCase()) } function bt(n) { return yi(n) || ht(n) || p(n) } function v(n) { return w(n) ? n.nodeValue.length : n ? n.childNodes.length : 0 } function b(n) { var t = v(n); return 0 === t || !w(n) && 1 === t && n.innerHTML === ct || !(!f.all(n.childNodes, w) || "" !== n.innerHTML) } function wi(n) { ot(n) || v(n) || (n.innerHTML = ct) } function lt(n, t) { for (; n;) { if (t(n)) return n; if (p(n)) break; n = n.parentNode } return null } function g(n, t) { t = t || e.fail; var i = []; return lt(n, function (n) { return p(n) || i.push(n), t(n) }), i } function bi(n, t) { t = t || e.fail; for (var i = []; n && !t(n);)i.push(n), n = n.nextSibling; return i } function kt(n, t) { var i = t.nextSibling, r = t.parentNode; return i ? r.insertBefore(n, i) : r.appendChild(n), n } function dt(n, t) { return u.a.each(t, function (t, i) { n.appendChild(i) }), n } function at(n) { return 0 === n.offset } function vt(n) { return n.offset === v(n.node) } function ki(n) { return at(n) || vt(n) } function di(n, t) { for (; n && n !== t;) { if (0 !== k(n)) return !1; n = n.parentNode } return !0 } function gi(n, t) { if (!t) return !1; for (; n && n !== t;) { if (k(n) !== v(n.parentNode) - 1) return !1; n = n.parentNode } return !0 } function k(n) { for (var t = 0; n = n.previousSibling;)t += 1; return t } function it(n) { return !!(n && n.childNodes && n.childNodes.length) } function nr(n, t) { var i, r; if (0 === n.offset) { if (p(n.node)) return null; i = n.node.parentNode; r = k(n.node) } else it(n.node) ? r = v(i = n.node.childNodes[n.offset - 1]) : (i = n.node, r = t ? 0 : n.offset - 1); return { node: i, offset: r } } function tr(n, t) { var i, r, u; if (v(n.node) === n.offset) { if (p(n.node)) return null; u = gt(n.node); u ? (i = u, r = 0) : (i = n.node.parentNode, r = k(n.node) + 1) } else it(n.node) ? (i = n.node.childNodes[n.offset], r = 0) : (i = n.node, r = t ? v(n.node) : n.offset + 1); return { node: i, offset: r } } function ir(n, t) { var i, r, u; if (b(n.node)) return { node: i = n.node.nextSibling, offset: r = 0 }; if (v(n.node) === n.offset) { if (p(n.node)) return null; u = gt(n.node); u ? (i = u, r = 0) : (i = n.node.parentNode, r = k(n.node) + 1); p(i) && (i = n.node.nextSibling, r = 0) } else if (it(n.node)) { if (r = 0, b(i = n.node.childNodes[n.offset])) return null } else if (i = n.node, r = t ? v(n.node) : n.offset + 1, b(i)) return null; return { node: i, offset: r } } function gt(n) { if (n.nextSibling && n.parent === n.nextSibling.parent) return w(n.nextSibling) ? n.nextSibling : gt(n.nextSibling) } function rr(n, t) { return n.node === t.node && n.offset === t.offset } function ni(n, t) { var r = t && t.isSkipPaddingBlankHTML, e = t && t.isNotSplitEdgePoint, u = t && t.isDiscardEmptySplits, f, i; if (u && (r = !0), ki(n) && (w(n.node) || e)) { if (at(n)) return n.node; if (vt(n)) return n.node.nextSibling } return w(n.node) ? n.node.splitText(n.offset) : (f = n.node.childNodes[n.offset], i = kt(n.node.cloneNode(!1), n.node), dt(i, bi(f)), r || (wi(n.node), wi(i)), u && (b(n.node) && rt(n.node), b(i)) ? (rt(i), n.node.nextSibling) : i) } function ur(n, t, i) { var r = g(t.node, e.eq(n)); return r.length ? 1 === r.length ? ni(t, i) : r.reduce(function (n, r) { return n === t.node && (n = ni(t, i)), ni({ node: r, offset: n ? k(n) : v(r) }, i) }) : null } function fr(n) { return document.createElement(n) } function rt(n, t) { var r, i, e; if (n && n.parentNode) { if (n.removeNode) return n.removeNode(t); if (r = n.parentNode, !t) { for (var u = [], f = 0, o = n.childNodes.length; f < o; f++)u.push(n.childNodes[f]); for (i = 0, e = u.length; i < e; i++)r.insertBefore(u[i], n) } r.removeChild(n) } } function er(n, t) { var i = ti(n[0]) ? n.val() : n.html(); return t ? i.replace(/[\n\r]/g, "") : i } function or(n, t) { for (var i, r = 0; r < t.length; r++)i = t[r], i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(n, i.key, i) } function hr(n, t) { for (var i, r = 0; r < t.length; r++)i = t[r], i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(n, i.key, i) } function cr(n, t) { for (var o, s = n.parentElement(), a = document.body.createTextRange(), h = f.from(s.childNodes), c, i, l, e, u = 0; u < h.length; u++)if (!r.isText(h[u])) { if (a.moveToElementText(h[u]), a.compareEndPoints("StartToStart", n) >= 0) break; o = h[u] } if (0 !== u && r.isText(h[u - 1])) { for (c = document.body.createTextRange(), i = null, c.moveToElementText(o || s), c.collapse(!o), i = o ? o.nextSibling : s.firstChild, l = n.duplicate(), l.setEndPoint("StartToStart", c), e = l.text.replace(/[\r\n]/g, "").length; e > i.nodeValue.length && i.nextSibling;)e -= i.nodeValue.length, i = i.nextSibling; i.nodeValue; t && i.nextSibling && r.isText(i.nextSibling) && e === i.nodeValue.length && (e -= i.nodeValue.length, i = i.nextSibling); s = i; u = e } return { cont: s, offset: u } } function lr(n) { var t = document.body.createTextRange(), i = function n(t, i) { var u, o, s, h; if (r.isText(t)) s = r.listPrev(t, e.not(r.isText)), h = f.last(s).previousSibling, u = h || t.parentNode, i += f.sum(f.tail(s), r.nodeLength), o = !h; else { if (u = t.childNodes[i] || t, r.isText(u)) return n(u, 0); i = 0; o = !1 } return { node: u, collapseToStart: o, offset: i } }(n.node, n.offset); return t.moveToElementText(i.node), t.collapse(i.collapseToStart), t.moveStart("character", i.offset), t } function ar(n, t) { for (var i, r = 0; r < t.length; r++)i = t[r], i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(n, i.key, i) } function yr(n, t) { for (var i, r = 0; r < t.length; r++)i = t[r], i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(n, i.key, i) } function wr(n, t) { for (var i, r = 0; r < t.length; r++)i = t[r], i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(n, i.key, i) } function br(n, t) { for (var i, r = 0; r < t.length; r++)i = t[r], i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(n, i.key, i) } function dr(n, t) { for (var i, r = 0; r < t.length; r++)i = t[r], i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(n, i.key, i) } function nu(n, t) { for (var i, r = 0; r < t.length; r++)i = t[r], i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(n, i.key, i) } function iu(n, t) { for (var i, r = 0; r < t.length; r++)i = t[r], i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(n, i.key, i) } function uu(n, t) { for (var i, r = 0; r < t.length; r++)i = t[r], i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(n, i.key, i) } function le(n) { var i, r, t, e, u, f; if ("undefined" == typeof Symbol || null == n[Symbol.iterator]) { if (Array.isArray(n) || (n = function (n, t) { if (n) { if ("string" == typeof n) return eu(n, t); var i = Object.prototype.toString.call(n).slice(8, -1); return ("Object" === i && n.constructor && (i = n.constructor.name), "Map" === i || "Set" === i) ? Array.from(i) : "Arguments" === i || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i) ? eu(n, t) : void 0 } }(n))) return i = 0, r = function () { }, { s: r, n: function () { return i >= n.length ? { done: !0 } : { done: !1, value: n[i++] } }, e: function (n) { throw n; }, f: r }; throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } return u = !0, f = !1, { s: function () { t = n[Symbol.iterator]() }, n: function () { var n = t.next(); return u = n.done, n }, e: function (n) { f = !0; e = n }, f: function () { try { u || null == t.return || t.return() } finally { if (f) throw e; } } } } function eu(n, t) { (null == t || t > n.length) && (t = n.length); for (var i = 0, r = new Array(t); i < t; i++)r[i] = n[i]; return r } function ou(n, t) { for (var i, r = 0; r < t.length; r++)i = t[r], i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(n, i.key, i) } function hu(n, t) { for (var i, r = 0; r < t.length; r++)i = t[r], i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(n, i.key, i) } function lu(n, t) { for (var i, r = 0; r < t.length; r++)i = t[r], i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(n, i.key, i) } function vu(n, t) { for (var i, r = 0; r < t.length; r++)i = t[r], i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(n, i.key, i) } function pu(n, t) { for (var i, r = 0; r < t.length; r++)i = t[r], i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(n, i.key, i) } function ku(n, t) { for (var i, r = 0; r < t.length; r++)i = t[r], i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(n, i.key, i) } function gu(n, t) { for (var i, r = 0; r < t.length; r++)i = t[r], i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(n, i.key, i) } function tf(n, t) { for (var i, r = 0; r < t.length; r++)i = t[r], i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(n, i.key, i) } function uf(n, t) { for (var i, r = 0; r < t.length; r++)i = t[r], i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(n, i.key, i) } function ef(n, t) { for (var i, r = 0; r < t.length; r++)i = t[r], i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(n, i.key, i) } function hf(n, t) { for (var i, r = 0; r < t.length; r++)i = t[r], i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(n, i.key, i) } function lf(n, t) { for (var i, r = 0; r < t.length; r++)i = t[r], i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(n, i.key, i) } function vf(n, t) { for (var i, r = 0; r < t.length; r++)i = t[r], i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(n, i.key, i) } function pf(n, t) { for (var i, r = 0; r < t.length; r++)i = t[r], i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(n, i.key, i) } function bf(n, t) { for (var i, r = 0; r < t.length; r++)i = t[r], i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(n, i.key, i) } function df(n, t) { for (var i, r = 0; r < t.length; r++)i = t[r], i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(n, i.key, i) } function ne(n, t) { for (var i, r = 0; r < t.length; r++)i = t[r], i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(n, i.key, i) } function ie(n, t) { for (var i, r = 0; r < t.length; r++)i = t[r], i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(n, i.key, i) } function ue(n, t) { for (var i, r = 0; r < t.length; r++)i = t[r], i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(n, i.key, i) } var ee = i(0), u = i.n(ee), ri, yt, pt, y, ft, nt, f, et, vi, ht, ti, r, sr, vr, pr, ii, kr, h, gr, tu, ru, fu, su, cu, au, yu, wu, bu, du, nf, rf, ff, sf, cf, af, yf, wf, kf, gf, te, re, fe; u.a.summernote = u.a.summernote || { lang: {} }; u.a.extend(u.a.summernote.lang, { "en-US": { font: { bold: "Bold", italic: "Italic", underline: "Underline", clear: "Remove Font Style", height: "Line Height", name: "Font Family", strikethrough: "Strikethrough", subscript: "Subscript", superscript: "Superscript", size: "Font Size", sizeunit: "Font Size Unit" }, image: { image: "Picture", insert: "Insert Image", resizeFull: "Resize full", resizeHalf: "Resize half", resizeQuarter: "Resize quarter", resizeNone: "Original size", floatLeft: "Float Left", floatRight: "Float Right", floatNone: "Remove float", shapeRounded: "Shape: Rounded", shapeCircle: "Shape: Circle", shapeThumbnail: "Shape: Thumbnail", shapeNone: "Shape: None", dragImageHere: "Drag image or text here", dropImage: "Drop image or Text", selectFromFiles: "Select from files", maximumFileSize: "Maximum file size", maximumFileSizeError: "Maximum file size exceeded.", url: "Image URL", remove: "Remove Image", original: "Original" }, video: { video: "Video", videoLink: "Video Link", insert: "Insert Video", url: "Video URL", providers: "(YouTube, Vimeo, Vine, Instagram, DailyMotion or Youku)" }, link: { link: "Link", insert: "Insert Link", unlink: "Unlink", edit: "Edit", textToDisplay: "Text to display", url: "To what URL should this link go?", openInNewWindow: "Open in new window", useProtocol: "Use default protocol" }, table: { table: "Table", addRowAbove: "Add row above", addRowBelow: "Add row below", addColLeft: "Add column left", addColRight: "Add column right", delRow: "Delete row", delCol: "Delete column", delTable: "Delete table" }, hr: { insert: "Insert Horizontal Rule" }, style: { style: "Style", p: "Normal", blockquote: "Quote", pre: "Code", h1: "Header 1", h2: "Header 2", h3: "Header 3", h4: "Header 4", h5: "Header 5", h6: "Header 6" }, lists: { unordered: "Unordered list", ordered: "Ordered list" }, options: { help: "Help", fullscreen: "Full Screen", codeview: "Code View" }, paragraph: { paragraph: "Paragraph", outdent: "Outdent", indent: "Indent", left: "Align left", center: "Align center", right: "Align right", justify: "Justify full" }, color: { recent: "Recent Color", more: "More Color", background: "Background Color", foreground: "Text Color", transparent: "Transparent", setTransparent: "Set transparent", reset: "Reset", resetToDefault: "Reset to default", cpSelect: "Select" }, shortcut: { shortcuts: "Keyboard shortcuts", close: "Close", textFormatting: "Text formatting", action: "Action", paragraphFormatting: "Paragraph formatting", documentStyle: "Document Style", extraKeys: "Extra keys" }, help: { escape: "Escape", insertParagraph: "Insert Paragraph", undo: "Undo the last command", redo: "Redo the last command", tab: "Tab", untab: "Untab", bold: "Set a bold style", italic: "Set a italic style", underline: "Set a underline style", strikethrough: "Set a strikethrough style", removeFormat: "Clean a style", justifyLeft: "Set left align", justifyCenter: "Set center align", justifyRight: "Set right align", justifyFull: "Set full align", insertUnorderedList: "Toggle unordered list", insertOrderedList: "Toggle ordered list", outdent: "Outdent on current paragraph", indent: "Indent on current paragraph", formatPara: "Change current block's format as a paragraph(P tag)", formatH1: "Change current block's format as H1", formatH2: "Change current block's format as H2", formatH3: "Change current block's format as H3", formatH4: "Change current block's format as H4", formatH5: "Change current block's format as H5", formatH6: "Change current block's format as H6", insertHorizontalRule: "Insert horizontal rule", "linkDialog.show": "Show Link Dialog" }, history: { undo: "Undo", redo: "Redo" }, specialChar: { specialChar: "SPECIAL CHARACTERS", select: "Select Special characters" }, output: { noSelection: "No Selection Made!" } } }); ri = "function" == typeof define && i(2); yt = ["sans-serif", "serif", "monospace", "cursive", "fantasy"]; y = navigator.userAgent; ft = /MSIE|Trident/i.test(y); ft && (nt = /MSIE (\d+[.]\d+)/.exec(y), nt && (pt = parseFloat(nt[1])), (nt = /Trident\/.*rv:([0-9]{1,}[.0-9]{0,})/.exec(y)) && (pt = parseFloat(nt[1]))); var tt = /Edge\/\d+/.test(y), oe = "ontouchstart" in window || navigator.MaxTouchPoints > 0 || navigator.msMaxTouchPoints > 0, se = ft ? "DOMCharacterDataModified DOMSubtreeModified DOMNodeInserted" : "input", c = { isMac: navigator.appVersion.indexOf("Mac") > -1, isMSIE: ft, isEdge: tt, isFF: !tt && /firefox/i.test(y), isPhantom: /PhantomJS/i.test(y), isWebkit: !tt && /webkit/i.test(y), isChrome: !tt && /chrome/i.test(y), isSafari: !tt && /safari/i.test(y) && !/chrome/i.test(y), browserVersion: pt, jqueryVersion: parseFloat(u.a.fn.jquery), isSupportAmd: ri, isSupportTouch: oe, isFontInstalled: function (n) { var i = "Comic Sans MS" === n ? "Courier New" : "Comic Sans MS", t = document.createElement("canvas").getContext("2d"), r; return t.font = "200px '" + i + "'", r = t.measureText("mmmmmmmmmmwwwww").width, t.font = "200px " + ui(n) + ', "' + i + '"', r !== t.measureText("mmmmmmmmmmwwwww").width }, isW3CRangeSupport: !!document.createRange, inputEventName: se, genericFontFamilies: yt, validFontName: ui }, fi = 0, e = { eq: function (n) { return function (t) { return n === t } }, eq2: function (n, t) { return n === t }, peq2: function (n) { return function (t, i) { return t[n] === i[n] } }, ok: function () { return !0 }, fail: function () { return !1 }, self: function (n) { return n }, not: function (n) { return function () { return !n.apply(n, arguments) } }, and: function (n, t) { return function (i) { return n(i) && t(i) } }, invoke: function (n, t) { return function () { return n[t].apply(n, arguments) } }, resetUniqueId: function () { fi = 0 }, uniqueId: function (n) { var t = ++fi + ""; return n ? n + t : t }, rect2bnd: function (n) { var t = u()(document); return { top: n.top + t.scrollTop(), left: n.left + t.scrollLeft(), width: n.right - n.left, height: n.bottom - n.top } }, invertObject: function (n) { var i = {}; for (var t in n) Object.prototype.hasOwnProperty.call(n, t) && (i[n[t]] = t); return i }, namespaceToCamel: function (n, t) { return (t = t || "") + n.split(".").map(function (n) { return n.substring(0, 1).toUpperCase() + n.substring(1) }).join("") }, debounce: function (n, t, i) { var r; return function () { var u = this, f = arguments, e = function () { r = null; i || n.apply(u, f) }, o = i && !r; clearTimeout(r); r = setTimeout(e, t); o && n.apply(u, f) } }, isValidUrl: function (n) { return /[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/gi.test(n) } }; f = { head: ei, last: wt, initial: function (n) { return n.slice(0, n.length - 1) }, tail: oi, prev: function (n, t) { if (n && n.length && t) { var i = n.indexOf(t); return -1 === i ? null : n[i - 1] } return null }, next: function (n, t) { if (n && n.length && t) { var i = n.indexOf(t); return -1 === i ? null : n[i + 1] } return null }, find: function (n, t) { for (var r, i = 0, u = n.length; i < u; i++)if (r = n[i], t(r)) return r }, contains: si, all: function (n, t) { for (var i = 0, r = n.length; i < r; i++)if (!t(n[i])) return !1; return !0 }, sum: function (n, t) { return t = t || e.self, n.reduce(function (n, i) { return n + t(i) }, 0) }, from: function (n) { for (var i = [], r = n.length, t = -1; ++t < r;)i[t] = n[t]; return i }, isEmpty: function (n) { return !n || !n.length }, clusterBy: function (n, t) { return n.length ? oi(n).reduce(function (n, i) { var r = wt(n); return t(wt(r), i) ? r[r.length] = i : n[n.length] = [i], n }, [[ei(n)]]) : [] }, compact: function (n) { for (var i = [], t = 0, r = n.length; t < r; t++)n[t] && i.push(n[t]); return i }, unique: function (n) { for (var i = [], t = 0, r = n.length; t < r; t++)si(i, n[t]) || i.push(n[t]); return i } }; et = String.fromCharCode(160); var he = l("PRE"), hi = l("LI"), ci = l("TABLE"), li = l("DATA"); vi = l("HR"); ht = l("BLOCKQUOTE"); var pi = l("A"), ce = l("BODY"), ct = c.isMSIE && c.browserVersion < 11 ? "&nbsp;" : "<br>"; ti = l("TEXTAREA"); r = { NBSP_CHAR: et, ZERO_WIDTH_NBSP_CHAR: "", blank: ct, emptyPara: "<p>".concat(ct, "<\/p>"), makePredByNodeName: l, isEditable: p, isControlSizing: function (n) { return n && u()(n).hasClass("note-control-sizing") }, isText: w, isElement: function (n) { return n && 1 === n.nodeType }, isVoid: ot, isPara: d, isPurePara: function (n) { return d(n) && !hi(n) }, isHeading: function (n) { return n && /^H[1-7]/.test(n.nodeName.toUpperCase()) }, isInline: st, isBlock: e.not(st), isBodyInline: function (n) { return st(n) && !lt(n, d) }, isBody: ce, isParaInline: function (n) { return st(n) && !!lt(n, d) }, isPre: he, isList: ai, isTable: ci, isData: li, isCell: yi, isBlockquote: ht, isBodyContainer: bt, isAnchor: pi, isDiv: l("DIV"), isLi: hi, isBR: l("BR"), isSpan: l("SPAN"), isB: l("B"), isU: l("U"), isS: l("S"), isI: l("I"), isImg: l("IMG"), isTextarea: ti, deepestChildIsEmpty: function (n) { do if (null === n.firstElementChild || "" === n.firstElementChild.innerHTML) break; while (n = n.firstElementChild); return b(n) }, isEmpty: b, isEmptyAnchor: e.and(pi, b), isClosestSibling: function (n, t) { return n.nextSibling === t || n.previousSibling === t }, withClosestSiblings: function (n, t) { t = t || e.ok; var i = []; return n.previousSibling && t(n.previousSibling) && i.push(n.previousSibling), i.push(n), n.nextSibling && t(n.nextSibling) && i.push(n.nextSibling), i }, nodeLength: v, isLeftEdgePoint: at, isRightEdgePoint: vt, isEdgePoint: ki, isLeftEdgeOf: di, isRightEdgeOf: gi, isLeftEdgePointOf: function (n, t) { return at(n) && di(n.node, t) }, isRightEdgePointOf: function (n, t) { return vt(n) && gi(n.node, t) }, prevPoint: nr, nextPoint: tr, nextPointWithEmptyNode: ir, isSamePoint: rr, isVisiblePoint: function (n) { if (w(n.node) || !it(n.node) || b(n.node)) return !0; var t = n.node.childNodes[n.offset - 1], i = n.node.childNodes[n.offset]; return !(t && !ot(t) || i && !ot(i)) }, prevPointUntil: function (n, t) { for (; n;) { if (t(n)) return n; n = nr(n) } return null }, nextPointUntil: function (n, t) { for (; n;) { if (t(n)) return n; n = tr(n) } return null }, isCharPoint: function (n) { if (!w(n.node)) return !1; var t = n.node.nodeValue.charAt(n.offset - 1); return t && " " !== t && t !== et }, isSpacePoint: function (n) { if (!w(n.node)) return !1; var t = n.node.nodeValue.charAt(n.offset - 1); return " " === t || t === et }, walkPoint: function (n, t, i, r) { for (var u = n; u && (i(u), !rr(u, t));)u = ir(u, r && n.node !== u.node && t.node !== u.node) }, ancestor: lt, singleChildAncestor: function (n, t) { for (n = n.parentNode; n && 1 === v(n);) { if (t(n)) return n; if (p(n)) break; n = n.parentNode } return null }, listAncestor: g, lastAncestor: function (n, t) { var i = g(n); return f.last(i.filter(t)) }, listNext: bi, listPrev: function (n, t) { t = t || e.fail; for (var i = []; n && !t(n);)i.push(n), n = n.previousSibling; return i }, listDescendant: function (n, t) { var i = []; return t = t || e.ok, function r(u) { n !== u && t(u) && i.push(u); for (var f = 0, e = u.childNodes.length; f < e; f++)r(u.childNodes[f]) }(n), i }, commonAncestor: function (n, t) { for (var r = g(n), i = t; i; i = i.parentNode)if (r.indexOf(i) > -1) return i; return null }, wrap: function (n, t) { var r = n.parentNode, i = u()("<" + t + ">")[0]; return r.insertBefore(i, n), i.appendChild(n), i }, insertAfter: kt, appendChildNodes: dt, position: k, hasChildren: it, makeOffsetPath: function (n, t) { return g(t, e.eq(n)).map(k).reverse() }, fromOffsetPath: function (n, t) { for (var i = n, r = 0, u = t.length; r < u; r++)i = i.childNodes.length <= t[r] ? i.childNodes[i.childNodes.length - 1] : i.childNodes[t[r]]; return i }, splitTree: ur, splitPoint: function (n, t) { var i, r, s = t ? d : bt, e = g(n.node, s), o = f.last(e) || n.node, u; return s(o) ? (i = e[e.length - 2], r = o) : r = (i = o).parentNode, u = i && ur(i, n, { isSkipPaddingBlankHTML: t, isNotSplitEdgePoint: t }), u || r !== n.node || (u = n.node.childNodes[n.offset]), { rightNode: u, container: r } }, create: fr, createText: function (n) { return document.createTextNode(n) }, remove: rt, removeWhile: function (n, t) { for (; n && !p(n) && t(n);) { var i = n.parentNode; rt(n); n = i } }, replace: function (n, t) { if (n.nodeName.toUpperCase() === t.toUpperCase()) return n; var i = fr(t); return n.style.cssText && (i.style.cssText = n.style.cssText), dt(i, f.from(n.childNodes)), kt(i, n), rt(n), i }, html: function (n, t) { var i = er(n); return t && (i = (i = i.replace(/<(\/?)(\b(?!!)[^>\s]*)(.*?)(\s*\/?>)/g, function (n, t, i) { i = i.toUpperCase(); var r = /^DIV|^TD|^TH|^P|^LI|^H[1-7]/.test(i) && !!t, u = /^BLOCKQUOTE|^TABLE|^TBODY|^TR|^HR|^UL|^OL/.test(i); return n + (r || u ? "\n" : "") })).trim()), i }, value: er, posFromPlaceholder: function (n) { var t = u()(n), i = t.offset(), r = t.outerHeight(!0); return { left: i.left, top: i.top + r } }, attachEvents: function (n, t) { Object.keys(t).forEach(function (i) { n.on(i, t[i]) }) }, detachEvents: function (n, t) { Object.keys(t).forEach(function (i) { n.off(i, t[i]) }) }, isCustomStyleTag: function (n) { return n && !w(n) && f.contains(n.classList, "note-styletag") } }; sr = function () { function n(t, i) { !function (n, t) { if (!(n instanceof t)) throw new TypeError("Cannot call a class as a function"); }(this, n); this.$note = t; this.memos = {}; this.modules = {}; this.layoutInfo = {}; this.options = u.a.extend(!0, {}, i); u.a.summernote.ui = u.a.summernote.ui_template(this.options); this.ui = u.a.summernote.ui; this.initialize() } var t, i, o; return t = n, (i = [{ key: "initialize", value: function () { return this.layoutInfo = this.ui.createLayout(this.$note), this._initialize(), this.$note.hide(), this } }, { key: "destroy", value: function () { this._destroy(); this.$note.removeData("summernote"); this.ui.removeLayout(this.$note, this.layoutInfo) } }, { key: "reset", value: function () { var n = this.isDisabled(); this.code(r.emptyPara); this._destroy(); this._initialize(); n && this.disable() } }, { key: "_initialize", value: function () { var n = this, t, i; this.options.id = e.uniqueId(u.a.now()); this.options.container = this.options.container || this.layoutInfo.editor; t = u.a.extend({}, this.options.buttons); Object.keys(t).forEach(function (i) { n.memo("button." + i, t[i]) }); i = u.a.extend({}, this.options.modules, u.a.summernote.plugins || {}); Object.keys(i).forEach(function (t) { n.module(t, i[t], !0) }); Object.keys(this.modules).forEach(function (t) { n.initializeModule(t) }) } }, { key: "_destroy", value: function () { var n = this; Object.keys(this.modules).reverse().forEach(function (t) { n.removeModule(t) }); Object.keys(this.memos).forEach(function (t) { n.removeMemo(t) }); this.triggerEvent("destroy", this) } }, { key: "code", value: function (n) { var t = this.invoke("codeview.isActivated"); if (void 0 === n) return this.invoke("codeview.sync"), t ? this.layoutInfo.codable.val() : this.layoutInfo.editable.html(); t ? this.invoke("codeview.sync", n) : this.layoutInfo.editable.html(n); this.$note.val(n); this.triggerEvent("change", n, this.layoutInfo.editable) } }, { key: "isDisabled", value: function () { return "false" === this.layoutInfo.editable.attr("contenteditable") } }, { key: "enable", value: function () { this.layoutInfo.editable.attr("contenteditable", !0); this.invoke("toolbar.activate", !0); this.triggerEvent("disable", !1); this.options.editing = !0 } }, { key: "disable", value: function () { this.invoke("codeview.isActivated") && this.invoke("codeview.deactivate"); this.layoutInfo.editable.attr("contenteditable", !1); this.options.editing = !1; this.invoke("toolbar.deactivate", !0); this.triggerEvent("disable", !0) } }, { key: "triggerEvent", value: function () { var n = f.head(arguments), t = f.tail(f.from(arguments)), i = this.options.callbacks[e.namespaceToCamel(n, "on")]; i && i.apply(this.$note[0], t); this.$note.trigger("summernote." + n, t) } }, { key: "initializeModule", value: function (n) { var t = this.modules[n]; t.shouldInitialize = t.shouldInitialize || e.ok; t.shouldInitialize() && (t.initialize && t.initialize(), t.events && r.attachEvents(this.$note, t.events)) } }, { key: "module", value: function (n, t, i) { if (1 === arguments.length) return this.modules[n]; this.modules[n] = new t(this); i || this.initializeModule(n) } }, { key: "removeModule", value: function (n) { var t = this.modules[n]; t.shouldInitialize() && (t.events && r.detachEvents(this.$note, t.events), t.destroy && t.destroy()); delete this.modules[n] } }, { key: "memo", value: function (n, t) { if (1 === arguments.length) return this.memos[n]; this.memos[n] = t } }, { key: "removeMemo", value: function (n) { this.memos[n] && this.memos[n].destroy && this.memos[n].destroy(); delete this.memos[n] } }, { key: "createInvokeHandlerAndUpdateState", value: function (n, t) { var i = this; return function (r) { i.createInvokeHandler(n, t)(r); i.invoke("buttons.updateCurrentStyle") } } }, { key: "createInvokeHandler", value: function (n, t) { var i = this; return function (r) { r.preventDefault(); var f = u()(r.target); i.invoke(n, t || f.closest("[data-value]").data("value"), f) } } }, { key: "invoke", value: function () { var o = f.head(arguments), r = f.tail(f.from(arguments)), t = o.split("."), u = t.length > 1, e = u && f.head(t), i = u ? f.last(t) : f.head(t), n = this.modules[e || "editor"]; return !e && this[i] ? this[i].apply(this, r) : n && n[i] && n.shouldInitialize() ? n[i].apply(n, r) : void 0 } }]) && or(t.prototype, i), o && or(t, o), n }(); u.a.fn.extend({ summernote: function () { var r = u.a.type(f.head(arguments)), e = "string" === r, o = "object" === r, n = u.a.extend({}, u.a.summernote.options, o ? f.head(arguments) : {}), i, t; if (n.langInfo = u.a.extend(!0, {}, u.a.summernote.lang["en-US"], u.a.summernote.lang[n.lang]), n.icons = u.a.extend(!0, {}, u.a.summernote.options.icons, n.icons), n.tooltip = "auto" === n.tooltip ? !c.isSupportTouch : n.tooltip, this.each(function (t, i) { var r = u()(i), f; r.data("summernote") || (f = new sr(r, n), r.data("summernote", f), r.data("summernote").triggerEvent("init", f.layoutInfo)) }), i = this.first(), i.length) { if (t = i.data("summernote"), e) return t.invoke.apply(t, f.from(arguments)); n.focus && t.invoke("editor.focus") } return this } }); var ut = function () { function n(t, i, u, f) { !function (n, t) { if (!(n instanceof t)) throw new TypeError("Cannot call a class as a function"); }(this, n); this.sc = t; this.so = i; this.ec = u; this.eo = f; this.isOnEditable = this.makeIsOn(r.isEditable); this.isOnList = this.makeIsOn(r.isList); this.isOnAnchor = this.makeIsOn(r.isAnchor); this.isOnCell = this.makeIsOn(r.isCell); this.isOnData = this.makeIsOn(r.isData) } var t, i, o; return t = n, (i = [{ key: "nativeRange", value: function () { var n, t; return c.isW3CRangeSupport ? (n = document.createRange(), n.setStart(this.sc, this.so), n.setEnd(this.ec, this.eo), n) : (t = lr({ node: this.sc, offset: this.so }), t.setEndPoint("EndToEnd", lr({ node: this.ec, offset: this.eo })), t) } }, { key: "getPoints", value: function () { return { sc: this.sc, so: this.so, ec: this.ec, eo: this.eo } } }, { key: "getStartPoint", value: function () { return { node: this.sc, offset: this.so } } }, { key: "getEndPoint", value: function () { return { node: this.ec, offset: this.eo } } }, { key: "select", value: function () { var t = this.nativeRange(), n; return c.isW3CRangeSupport ? (n = document.getSelection(), n.rangeCount > 0 && n.removeAllRanges(), n.addRange(t)) : t.select(), this } }, { key: "scrollIntoView", value: function (n) { var t = u()(n).height(); return n.scrollTop + t < this.sc.offsetTop && (n.scrollTop += Math.abs(n.scrollTop + t - this.sc.offsetTop)), this } }, { key: "normalize", value: function () { var i = function (n, t) { var f, i, e, u, o; if (!n || r.isVisiblePoint(n) && (!r.isEdgePoint(n) || r.isRightEdgePoint(n) && !t || r.isLeftEdgePoint(n) && t || r.isRightEdgePoint(n) && t && r.isVoid(n.node.nextSibling) || r.isLeftEdgePoint(n) && !t && r.isVoid(n.node.previousSibling) || r.isBlock(n.node) && r.isEmpty(n.node))) return n; if (f = r.ancestor(n.node, r.isBlock), i = !1, i || (e = r.prevPoint(n) || { node: null }, i = (r.isLeftEdgePointOf(n, f) || r.isVoid(e.node)) && !t), u = !1, u || (o = r.nextPoint(n) || { node: null }, u = (r.isRightEdgePointOf(n, f) || r.isVoid(o.node)) && t), i || u) { if (r.isVisiblePoint(n)) return n; t = !t } return (t ? r.nextPointUntil(r.nextPoint(n), r.isVisiblePoint) : r.prevPointUntil(r.prevPoint(n), r.isVisiblePoint)) || n }, t = i(this.getEndPoint(), !1), u = this.isCollapsed() ? t : i(this.getStartPoint(), !0); return new n(u.node, u.offset, t.node, t.offset) } }, { key: "nodes", value: function (n, t) { n = n || e.ok; var o = t && t.includeAncestor, s = t && t.fullyContains, h = this.getStartPoint(), c = this.getEndPoint(), i = [], u = []; return r.walkPoint(h, c, function (t) { var e; r.isEditable(t.node) || (s ? (r.isLeftEdgePoint(t) && u.push(t.node), r.isRightEdgePoint(t) && f.contains(u, t.node) && (e = t.node)) : e = o ? r.ancestor(t.node, n) : t.node, e && n(e) && i.push(e)) }, !0), f.unique(i) } }, { key: "commonAncestor", value: function () { return r.commonAncestor(this.sc, this.ec) } }, { key: "expand", value: function (t) { var f = r.ancestor(this.sc, t), u = r.ancestor(this.ec, t), i; return !f && !u ? new n(this.sc, this.so, this.ec, this.eo) : (i = this.getPoints(), f && (i.sc = f, i.so = 0), u && (i.ec = u, i.eo = r.nodeLength(u)), new n(i.sc, i.so, i.ec, i.eo)) } }, { key: "collapse", value: function (t) { return t ? new n(this.sc, this.so, this.sc, this.so) : new n(this.ec, this.eo, this.ec, this.eo) } }, { key: "splitText", value: function () { var i = this.sc === this.ec, t = this.getPoints(); return r.isText(this.ec) && !r.isEdgePoint(this.getEndPoint()) && this.ec.splitText(this.eo), r.isText(this.sc) && !r.isEdgePoint(this.getStartPoint()) && (t.sc = this.sc.splitText(this.so), t.so = 0, i && (t.ec = t.sc, t.eo = this.eo - this.so)), new n(t.sc, t.so, t.ec, t.eo) } }, { key: "deleteContents", value: function () { if (this.isCollapsed()) return this; var i = this.splitText(), e = i.nodes(null, { fullyContains: !0 }), t = r.prevPointUntil(i.getStartPoint(), function (n) { return !f.contains(e, n.node) }), o = []; return u.a.each(e, function (n, i) { var u = i.parentNode; t.node !== u && 1 === r.nodeLength(u) && o.push(u); r.remove(i, !1) }), u.a.each(o, function (n, t) { r.remove(t, !1) }), new n(t.node, t.offset, t.node, t.offset).normalize() } }, { key: "makeIsOn", value: function (n) { return function () { var t = r.ancestor(this.sc, n); return !!t && t === r.ancestor(this.ec, n) } } }, { key: "isLeftEdgeOf", value: function (n) { if (!r.isLeftEdgePoint(this.getStartPoint())) return !1; var t = r.ancestor(this.sc, n); return t && r.isLeftEdgeOf(this.sc, t) } }, { key: "isCollapsed", value: function () { return this.sc === this.ec && this.so === this.eo } }, { key: "wrapBodyInlineWithPara", value: function () { var i, t, o, u, s; return r.isBodyContainer(this.sc) && r.isEmpty(this.sc) ? (this.sc.innerHTML = r.emptyPara, new n(this.sc.firstChild, 0, this.sc.firstChild, 0)) : (t = this.normalize(), r.isParaInline(this.sc) || r.isPara(this.sc)) ? t : (r.isInline(t.sc) ? (o = r.listAncestor(t.sc, e.not(r.isInline)), i = f.last(o), r.isInline(i) || (i = o[o.length - 2] || t.sc.childNodes[t.so])) : i = t.sc.childNodes[t.so > 0 ? t.so - 1 : 0], i && (u = r.listPrev(i, r.isParaInline).reverse(), (u = u.concat(r.listNext(i.nextSibling, r.isParaInline))).length && (s = r.wrap(f.head(u), "p"), r.appendChildNodes(s, f.tail(u)))), this.normalize()) } }, { key: "insertNode", value: function (n) { var i = this, t; return (r.isText(n) || r.isInline(n)) && (i = this.wrapBodyInlineWithPara().deleteContents()), t = r.splitPoint(i.getStartPoint(), r.isInline(n)), t.rightNode ? (t.rightNode.parentNode.insertBefore(n, t.rightNode), r.isEmpty(t.rightNode) && r.isPara(n) && t.rightNode.parentNode.removeChild(t.rightNode)) : t.container.appendChild(n), n } }, { key: "pasteHTML", value: function (n) { n = u.a.trim(n); var e = u()("<div><\/div>").html(n)[0], t = f.from(e.childNodes), i = this, r = !1; return i.so >= 0 && (t = t.reverse(), r = !0), t = t.map(function (n) { return i.insertNode(n) }), r && (t = t.reverse()), t } }, { key: "toString", value: function () { var n = this.nativeRange(); return c.isW3CRangeSupport ? n.toString() : n.text } }, { key: "getWordRange", value: function (t) { var i = this.getEndPoint(), u; return r.isCharPoint(i) ? (u = r.prevPointUntil(i, function (n) { return !r.isCharPoint(n) }), t && (i = r.nextPointUntil(i, function (n) { return !r.isCharPoint(n) })), new n(u.node, u.offset, i.node, i.offset)) : this } }, { key: "getWordsRange", value: function (t) { var i = this.getEndPoint(), u = function (n) { return !r.isCharPoint(n) && !r.isSpacePoint(n) }, f; return u(i) ? this : (f = r.prevPointUntil(i, u), t && (i = r.nextPointUntil(i, u)), new n(f.node, f.offset, i.node, i.offset)) } }, { key: "getWordsMatchRange", value: function (t) { var i = this.getEndPoint(), u = r.prevPointUntil(i, function (u) { if (!r.isCharPoint(u) && !r.isSpacePoint(u)) return !0; var e = new n(u.node, u.offset, i.node, i.offset), f = t.exec(e.toString()); return f && 0 === f.index }), f = new n(u.node, u.offset, i.node, i.offset), e = f.toString(), o = t.exec(e); return o && o[0].length === e.length ? f : null } }, { key: "bookmark", value: function (n) { return { s: { path: r.makeOffsetPath(n, this.sc), offset: this.so }, e: { path: r.makeOffsetPath(n, this.ec), offset: this.eo } } } }, { key: "paraBookmark", value: function (n) { return { s: { path: f.tail(r.makeOffsetPath(f.head(n), this.sc)), offset: this.so }, e: { path: f.tail(r.makeOffsetPath(f.last(n), this.ec)), offset: this.eo } } } }, { key: "getClientRects", value: function () { return this.nativeRange().getClientRects() } }]) && hr(t.prototype, i), o && hr(t, o), n }(), o = { create: function (n, t, i, u) { var e, f; return 4 === arguments.length ? new ut(n, t, i, u) : 2 === arguments.length ? new ut(n, t, i = n, u = t) : (e = this.createFromSelection(), !e && 1 === arguments.length) ? (f = arguments[0], r.isEditable(f) && (f = f.lastChild), this.createFromBodyElement(f, r.emptyPara === arguments[0].innerHTML)) : e }, createFromBodyElement: function (n) { var t = arguments.length > 1 && void 0 !== arguments[1] && arguments[1], i = this.createFromNode(n); return i.collapse(t) }, createFromSelection: function () { var f, e, o, s, i, u, h, l, a, n, t; if (c.isW3CRangeSupport) { if ((i = document.getSelection(), !i || 0 === i.rangeCount) || r.isBody(i.anchorNode)) return null; u = i.getRangeAt(0); f = u.startContainer; e = u.startOffset; o = u.endContainer; s = u.endOffset } else h = document.selection.createRange(), l = h.duplicate(), l.collapse(!1), a = h, a.collapse(!0), n = cr(a, !0), t = cr(l, !1), r.isText(n.node) && r.isLeftEdgePoint(n) && r.isTextNode(t.node) && r.isRightEdgePoint(t) && t.node.nextSibling === n.node && (n = t), f = n.cont, e = n.offset, o = t.cont, s = t.offset; return new ut(f, e, o, s) }, createFromNode: function (n) { var i = n, f = 0, t = n, u = r.nodeLength(t); return r.isVoid(i) && (f = r.listPrev(i).length - 1, i = i.parentNode), r.isBR(t) ? (u = r.listPrev(t).length - 1, t = t.parentNode) : r.isVoid(t) && (u = r.listPrev(t).length, t = t.parentNode), this.create(i, f, t, u) }, createFromNodeBefore: function (n) { return this.createFromNode(n).collapse(!0) }, createFromNodeAfter: function (n) { return this.createFromNode(n).collapse() }, createFromBookmark: function (n, t) { var i = r.fromOffsetPath(n, t.s.path), u = t.s.offset, f = r.fromOffsetPath(n, t.e.path), e = t.e.offset; return new ut(i, u, f, e) }, createFromParaBookmark: function (n, t) { var i = n.s.offset, u = n.e.offset, e = r.fromOffsetPath(f.head(t), n.s.path), o = r.fromOffsetPath(f.last(t), n.e.path); return new ut(e, i, o, u) } }, a = { BACKSPACE: 8, TAB: 9, ENTER: 13, ESCAPE: 27, SPACE: 32, DELETE: 46, LEFT: 37, UP: 38, RIGHT: 39, DOWN: 40, NUM0: 48, NUM1: 49, NUM2: 50, NUM3: 51, NUM4: 52, NUM5: 53, NUM6: 54, NUM7: 55, NUM8: 56, B: 66, E: 69, I: 73, J: 74, K: 75, L: 76, R: 82, S: 83, U: 85, V: 86, Y: 89, Z: 90, SLASH: 191, LEFTBRACKET: 219, BACKSLASH: 220, RIGHTBRACKET: 221, HOME: 36, END: 35, PAGEUP: 33, PAGEDOWN: 34 }, s = { isEdit: function (n) { return f.contains([a.BACKSPACE, a.TAB, a.ENTER, a.SPACE, a.DELETE], n) }, isMove: function (n) { return f.contains([a.LEFT, a.UP, a.RIGHT, a.DOWN], n) }, isNavigation: function (n) { return f.contains([a.HOME, a.END, a.PAGEUP, a.PAGEDOWN], n) }, nameFromCode: e.invertObject(a), code: a }; vr = function () { function n(t) { !function (n, t) { if (!(n instanceof t)) throw new TypeError("Cannot call a class as a function"); }(this, n); this.stack = []; this.stackOffset = -1; this.context = t; this.$editable = t.layoutInfo.editable; this.editable = this.$editable[0] } var t, i, r; return t = n, (i = [{ key: "makeSnapshot", value: function () { var n = o.create(this.editable); return { contents: this.$editable.html(), bookmark: n && n.isOnEditable() ? n.bookmark(this.editable) : { s: { path: [], offset: 0 }, e: { path: [], offset: 0 } } } } }, { key: "applySnapshot", value: function (n) { null !== n.contents && this.$editable.html(n.contents); null !== n.bookmark && o.createFromBookmark(this.editable, n.bookmark).select() } }, { key: "rewind", value: function () { this.$editable.html() !== this.stack[this.stackOffset].contents && this.recordUndo(); this.stackOffset = 0; this.applySnapshot(this.stack[this.stackOffset]) } }, { key: "commit", value: function () { this.stack = []; this.stackOffset = -1; this.recordUndo() } }, { key: "reset", value: function () { this.stack = []; this.stackOffset = -1; this.$editable.html(""); this.recordUndo() } }, { key: "undo", value: function () { this.$editable.html() !== this.stack[this.stackOffset].contents && this.recordUndo(); this.stackOffset > 0 && (this.stackOffset--, this.applySnapshot(this.stack[this.stackOffset])) } }, { key: "redo", value: function () { this.stack.length - 1 > this.stackOffset && (this.stackOffset++, this.applySnapshot(this.stack[this.stackOffset])) } }, { key: "recordUndo", value: function () { this.stackOffset++; this.stack.length > this.stackOffset && (this.stack = this.stack.slice(0, this.stackOffset)); this.stack.push(this.makeSnapshot()); this.stack.length > this.context.options.historyLimit && (this.stack.shift(), this.stackOffset -= 1) } }]) && ar(t.prototype, i), r && ar(t, r), n }(); pr = function () { function n() { !function (n, t) { if (!(n instanceof t)) throw new TypeError("Cannot call a class as a function"); }(this, n) } var t, i, o; return t = n, (i = [{ key: "jQueryCSS", value: function (n, t) { if (c.jqueryVersion < 1.9) { var i = {}; return u.a.each(t, function (t, r) { i[r] = n.css(r) }), i } return n.css(t) } }, { key: "fromNode", value: function (n) { var t = this.jQueryCSS(n, ["font-family", "font-size", "text-align", "list-style-type", "line-height"]) || {}, i = n[0].style.fontSize || t["font-size"]; return t["font-size"] = parseInt(i, 10), t["font-size-unit"] = i.match(/[a-z%]+$/), t } }, { key: "stylePara", value: function (n, t) { u.a.each(n.nodes(r.isPara, { includeAncestor: !0 }), function (n, i) { u()(i).css(t) }) } }, { key: "styleNodes", value: function (n, t) { var i, s, h; n = n.splitText(); var o = t && t.nodeName || "SPAN", c = !(!t || !t.expandClosestSibling), l = !(!t || !t.onlyPartialContains); return n.isCollapsed() ? [n.insertNode(r.create(o))] : (i = r.makePredByNodeName(o), s = n.nodes(r.isText, { fullyContains: !0 }).map(function (n) { return r.singleChildAncestor(n, i) || r.wrap(n, o) }), c) ? (l && (h = n.nodes(), i = e.and(i, function (n) { return f.contains(h, n) })), s.map(function (n) { var t = r.withClosestSiblings(n, i), e = f.head(t), o = f.tail(t); return u.a.each(o, function (n, t) { r.appendChildNodes(e, t.childNodes); r.remove(t) }), f.head(t) })) : s } }, { key: "current", value: function (n) { var o = u()(r.isElement(n.sc) ? n.sc : n.sc.parentNode), t = this.fromNode(o), f, i, e; try { t = u.a.extend(t, { "font-bold": document.queryCommandState("bold") ? "bold" : "normal", "font-italic": document.queryCommandState("italic") ? "italic" : "normal", "font-underline": document.queryCommandState("underline") ? "underline" : "normal", "font-subscript": document.queryCommandState("subscript") ? "subscript" : "normal", "font-superscript": document.queryCommandState("superscript") ? "superscript" : "normal", "font-strikethrough": document.queryCommandState("strikethrough") ? "strikethrough" : "normal", "font-family": document.queryCommandValue("fontname") || t["font-family"] }) } catch (n) { } return n.isOnList() ? (f = ["circle", "disc", "disc-leading-zero", "square"].indexOf(t["list-style-type"]) > -1, t["list-style"] = f ? "unordered" : "ordered") : t["list-style"] = "none", i = r.ancestor(n.sc, r.isPara), i && i.style["line-height"] ? t["line-height"] = i.style.lineHeight : (e = parseInt(t["line-height"], 10) / parseInt(t["font-size"], 10), t["line-height"] = e.toFixed(1)), t.anchor = n.isOnAnchor() && r.ancestor(n.sc, r.isAnchor), t.ancestors = r.listAncestor(n.sc, r.isEditable), t.range = n, t } }]) && yr(t.prototype, i), o && yr(t, o), n }(); ii = function () { function n() { !function (n, t) { if (!(n instanceof t)) throw new TypeError("Cannot call a class as a function"); }(this, n) } var t, i, s; return t = n, (i = [{ key: "insertOrderedList", value: function (n) { this.toggleList("OL", n) } }, { key: "insertUnorderedList", value: function (n) { this.toggleList("UL", n) } }, { key: "indent", value: function (n) { var t = this, i = o.create(n).wrapBodyInlineWithPara(), s = i.nodes(r.isPara, { includeAncestor: !0 }), h = f.clusterBy(s, e.peq2("parentNode")); u.a.each(h, function (n, i) { var e = f.head(i), o; r.isLi(e) ? (o = t.findList(e.previousSibling), o ? i.map(function (n) { return o.appendChild(n) }) : (t.wrapList(i, e.parentNode.nodeName), i.map(function (n) { return n.parentNode }).map(function (n) { return t.appendToPrevious(n) }))) : u.a.each(i, function (n, t) { u()(t).css("marginLeft", function (n, t) { return (parseInt(t, 10) || 0) + 25 }) }) }); i.select() } }, { key: "outdent", value: function (n) { var i = this, t = o.create(n).wrapBodyInlineWithPara(), s = t.nodes(r.isPara, { includeAncestor: !0 }), h = f.clusterBy(s, e.peq2("parentNode")); u.a.each(h, function (n, t) { var e = f.head(t); r.isLi(e) ? i.releaseList([t]) : u.a.each(t, function (n, t) { u()(t).css("marginLeft", function (n, t) { return (t = parseInt(t, 10) || 0) > 25 ? t - 25 : "" }) }) }); t.select() } }, { key: "toggleList", value: function (n, t) { var a = this, h = o.create(t).wrapBodyInlineWithPara(), i = h.nodes(r.isPara, { includeAncestor: !0 }), v = h.paraBookmark(i), l = f.clusterBy(i, e.peq2("parentNode")), s, c; f.find(i, r.isPurePara) ? (s = [], u.a.each(l, function (t, i) { s = s.concat(a.wrapList(i, n)) }), i = s) : (c = h.nodes(r.isList, { includeAncestor: !0 }).filter(function (t) { return !u.a.nodeName(t, n) }), c.length ? u.a.each(c, function (t, i) { r.replace(i, n) }) : i = this.releaseList(l, !0)); o.createFromParaBookmark(v, i).select() } }, { key: "wrapList", value: function (n, t) { var e = f.head(n), i = f.last(n), s = r.isList(e.previousSibling) && e.previousSibling, u = r.isList(i.nextSibling) && i.nextSibling, o = s || r.insertAfter(r.create(t || "UL"), i); return n = n.map(function (n) { return r.isPurePara(n) ? r.replace(n, "LI") : n }), r.appendChildNodes(o, n), u && (r.appendChildNodes(o, f.from(u.childNodes)), r.remove(u)), n } }, { key: "releaseList", value: function (n, t) { var e = this, i = []; return u.a.each(n, function (n, o) { var c = f.head(o), a = f.last(o), s = t ? r.lastAncestor(c, r.isList) : c.parentNode, h = s.parentNode, v, l, y; "LI" === s.parentNode.nodeName ? (o.map(function (n) { var t = e.findNextSiblings(n); h.nextSibling ? h.parentNode.insertBefore(n, h.nextSibling) : h.parentNode.appendChild(n); t.length && (e.wrapList(t, s.nodeName), n.appendChild(t[0].parentNode)) }), 0 === s.children.length && h.removeChild(s), 0 === h.childNodes.length && h.parentNode.removeChild(h)) : (v = s.childNodes.length > 1 ? r.splitTree(s, { node: a.parentNode, offset: r.position(a) + 1 }, { isSkipPaddingBlankHTML: !0 }) : null, l = r.splitTree(s, { node: c.parentNode, offset: r.position(c) }, { isSkipPaddingBlankHTML: !0 }), o = t ? r.listDescendant(l, r.isLi) : f.from(l.childNodes).filter(r.isLi), !t && r.isList(s.parentNode) || (o = o.map(function (n) { return r.replace(n, "P") })), u.a.each(f.from(o).reverse(), function (n, t) { r.insertAfter(t, s) }), y = f.compact([s, l, v]), u.a.each(y, function (n, t) { var i = [t].concat(r.listDescendant(t, r.isList)); u.a.each(i.reverse(), function (n, t) { r.nodeLength(t) || r.remove(t, !0) }) })); i = i.concat(o) }), i } }, { key: "appendToPrevious", value: function (n) { return n.previousSibling ? r.appendChildNodes(n.previousSibling, [n]) : this.wrapList([n], "LI") } }, { key: "findList", value: function (n) { return n ? f.find(n.children, function (n) { return ["OL", "UL"].indexOf(n.nodeName) > -1 }) : null } }, { key: "findNextSiblings", value: function (n) { for (var t = []; n.nextSibling;)t.push(n.nextSibling), n = n.nextSibling; return t } }]) && wr(t.prototype, i), s && wr(t, s), n }(); kr = function () { function n(t) { !function (n, t) { if (!(n instanceof t)) throw new TypeError("Cannot call a class as a function"); }(this, n); this.bullet = new ii; this.options = t.options } var t, i, f; return t = n, (i = [{ key: "insertTab", value: function (n, t) { var i = r.createText(new Array(t + 1).join(r.NBSP_CHAR)); (n = n.deleteContents()).insertNode(i, !0); (n = o.create(i, t)).select() } }, { key: "insertParagraph", value: function (n, t) { var i, f, e, s, h, c; if (t = (t = (t = t || o.create(n)).deleteContents()).wrapBodyInlineWithPara(), f = r.ancestor(t.sc, r.isPara), f) { if (r.isLi(f) && (r.isEmpty(f) || r.deepestChildIsEmpty(f))) return void this.bullet.toggleList(f.parentNode.nodeName); e = null; (1 === this.options.blockquoteBreakingLevel ? e = r.ancestor(f, r.isBlockquote) : 2 === this.options.blockquoteBreakingLevel && (e = r.lastAncestor(f, r.isBlockquote)), e) ? (i = u()(r.emptyPara)[0], r.isRightEdgePoint(t.getStartPoint()) && r.isBR(t.sc.nextSibling) && u()(t.sc.nextSibling).remove(), s = r.splitTree(e, t.getStartPoint(), { isDiscardEmptySplits: !0 }), s ? s.parentNode.insertBefore(i, s) : r.insertAfter(i, e)) : (i = r.splitTree(f, t.getStartPoint()), h = r.listDescendant(f, r.isEmptyAnchor), h = h.concat(r.listDescendant(i, r.isEmptyAnchor)), u.a.each(h, function (n, t) { r.remove(t) }), (r.isHeading(i) || r.isPre(i) || r.isCustomStyleTag(i)) && r.isEmpty(i) && (i = r.replace(i, "p"))) } else c = t.sc.childNodes[t.so], i = u()(r.emptyPara)[0], c ? t.sc.insertBefore(i, c) : t.sc.appendChild(i); o.create(i, 0).normalize().select().scrollIntoView(n) } }]) && br(t.prototype, i), f && br(t, f), n }(); h = function n(t, i, r, u) { function s(n, t, i, r, u, f, o) { var s = { baseRow: i, baseCell: r, isRowSpan: u, isColSpan: f, isVirtual: o }; e[n] || (e[n] = []); e[n][t] = s } function l(n, t, i, r) { return { baseCell: n.baseCell, action: t, virtualTable: { rowIndex: i, cellIndex: r } } } function h(n, t) { if (!e[n] || !e[n][t]) return t; for (var i = t; e[n][i];)if (i++, !e[n][i]) return i } function a(n, t) { var i = h(n.rowIndex, t.cellIndex), v = t.colSpan > 1, y = t.rowSpan > 1, p = n.rowIndex === f.rowPos && t.cellIndex === f.colPos, e, r, o, l, u, a; if (s(n.rowIndex, i, n, t, y, v, !1), e = t.attributes.rowSpan ? parseInt(t.attributes.rowSpan.value, 10) : 0, e > 1) for (r = 1; r < e; r++)o = n.rowIndex + r, c(o, i, t, p), s(o, i, n, t, !0, v, !0); if (l = t.attributes.colSpan ? parseInt(t.attributes.colSpan.value, 10) : 0, l > 1) for (u = 1; u < l; u++)a = h(n.rowIndex, i + u), c(n.rowIndex, a, t, p), s(n.rowIndex, a, n, t, y, !0, !0) } function c(n, t, i, r) { n === f.rowPos && f.colPos >= i.cellIndex && i.cellIndex <= t && !r && f.colPos++ } function v(t) { switch (i) { case n.where.Column: if (t.isColSpan) return n.resultAction.SubtractSpanCount; break; case n.where.Row: if (!t.isVirtual && t.isRowSpan) return n.resultAction.AddCell; if (t.isRowSpan) return n.resultAction.SubtractSpanCount }return n.resultAction.RemoveCell } function y(t) { switch (i) { case n.where.Column: if (t.isColSpan) return n.resultAction.SumSpanCount; if (t.isRowSpan && t.isVirtual) return n.resultAction.Ignore; break; case n.where.Row: if (t.isRowSpan) return n.resultAction.SumSpanCount; if (t.isColSpan && t.isVirtual) return n.resultAction.Ignore }return n.resultAction.AddCell } var f = { colPos: 0, rowPos: 0 }, e = [], o = []; this.getActionList = function () { for (var t, u, h = i === n.where.Row ? f.rowPos : -1, c = i === n.where.Column ? f.colPos : -1, s = 0, a = !0; a;) { var p = h >= 0 ? h : s, w = c >= 0 ? c : s, b = e[p]; if (!b || (t = b[w], !t)) return a = !1, o; u = n.resultAction.Ignore; switch (r) { case n.requestAction.Add: u = y(t); break; case n.requestAction.Delete: u = v(t) }o.push(l(t, u, p, w)); s++ } return o }; t && t.tagName && ("td" === t.tagName.toLowerCase() || "th" === t.tagName.toLowerCase()) && (f.colPos = t.cellIndex, t.parentElement && t.parentElement.tagName && "tr" === t.parentElement.tagName.toLowerCase() && (f.rowPos = t.parentElement.rowIndex)), function () { for (var r, i, t = u.rows, n = 0; n < t.length; n++)for (r = t[n].cells, i = 0; i < r.length; i++)a(t[n], r[i]) }() }; h.where = { Row: 0, Column: 1 }; h.requestAction = { Add: 0, Delete: 1 }; h.resultAction = { Ignore: 0, SubtractSpanCount: 1, RemoveCell: 2, AddCell: 3, SumSpanCount: 4 }; gr = function () { function n() { !function (n, t) { if (!(n instanceof t)) throw new TypeError("Cannot call a class as a function"); }(this, n) } var t, i, e; return t = n, (i = [{ key: "tab", value: function (n, t) { var i = r.ancestor(n.commonAncestor(), r.isCell), e = r.ancestor(i, r.isTable), s = r.listDescendant(e, r.isCell), u = f[t ? "prev" : "next"](s, i); u && o.create(u, 0).select() } }, { key: "addRow", value: function (n, t) { for (var f, c, v, l, y, o = r.ancestor(n.commonAncestor(), r.isCell), i = u()(o).closest("tr"), p = this.recoverAttributes(i), e = u()("<tr" + p + "><\/tr>"), a = new h(o, h.where.Row, h.requestAction.Add, u()(i).closest("table")[0]).getActionList(), s = 0; s < a.length; s++) { f = a[s]; c = this.recoverAttributes(f.baseCell); switch (f.action) { case h.resultAction.AddCell: e.append("<td" + c + ">" + r.blank + "<\/td>"); break; case h.resultAction.SumSpanCount: if ("top" === t && (f.baseCell.parent ? f.baseCell.closest("tr").rowIndex : 0) <= i[0].rowIndex) { v = u()("<div><\/div>").append(u()("<td" + c + ">" + r.blank + "<\/td>").removeAttr("rowspan")).html(); e.append(v); break } l = parseInt(f.baseCell.rowSpan, 10); l++; f.baseCell.setAttribute("rowSpan", l) } } if ("top" === t) i.before(e); else { if (o.rowSpan > 1) return y = i[0].rowIndex + (o.rowSpan - 2), void u()(u()(i).parent().find("tr")[y]).after(u()(e)); i.after(e) } } }, { key: "addCol", value: function (n, t) { var l = r.ancestor(n.commonAncestor(), r.isCell), o = u()(l).closest("tr"), s, f, i, e, c; for (u()(o).siblings().push(o), s = new h(l, h.where.Column, h.requestAction.Add, u()(o).closest("table")[0]).getActionList(), f = 0; f < s.length; f++) { i = s[f]; e = this.recoverAttributes(i.baseCell); switch (i.action) { case h.resultAction.AddCell: "right" === t ? u()(i.baseCell).after("<td" + e + ">" + r.blank + "<\/td>") : u()(i.baseCell).before("<td" + e + ">" + r.blank + "<\/td>"); break; case h.resultAction.SumSpanCount: "right" === t ? (c = parseInt(i.baseCell.colSpan, 10), c++, i.baseCell.setAttribute("colSpan", c)) : u()(i.baseCell).before("<td" + e + ">" + r.blank + "<\/td>") } } } }, { key: "recoverAttributes", value: function (n) { var r = "", i, t; if (!n) return r; for (i = n.attributes || [], t = 0; t < i.length; t++)"id" !== i[t].name.toLowerCase() && i[t].specified && (r += " " + i[t].name + "='" + i[t].value + "'"); return r } }, { key: "deleteRow", value: function (n) { for (var t, v, l = r.ancestor(n.commonAncestor(), r.isCell), o = u()(l).closest("tr"), i = o.children("td, th").index(u()(l)), y = o[0].rowIndex, c = new h(l, h.where.Row, h.requestAction.Delete, u()(o).closest("table")[0]).getActionList(), s = 0; s < c.length; s++)if (c[s]) { var f = c[s].baseCell, p = c[s].virtualTable, a = f.rowSpan && f.rowSpan > 1, e = a ? parseInt(f.rowSpan, 10) : 0; switch (c[s].action) { case h.resultAction.Ignore: continue; case h.resultAction.AddCell: if (t = o.next("tr")[0], !t) continue; v = o[0].cells[i]; a && (e > 2 ? (e--, t.insertBefore(v, t.cells[i]), t.cells[i].setAttribute("rowSpan", e), t.cells[i].innerHTML = "") : 2 === e && (t.insertBefore(v, t.cells[i]), t.cells[i].removeAttribute("rowSpan"), t.cells[i].innerHTML = "")); continue; case h.resultAction.SubtractSpanCount: a && (e > 2 ? (e--, f.setAttribute("rowSpan", e), p.rowIndex !== y && f.cellIndex === i && (f.innerHTML = "")) : 2 === e && (f.removeAttribute("rowSpan"), p.rowIndex !== y && f.cellIndex === i && (f.innerHTML = ""))); continue; case h.resultAction.RemoveCell: continue } } o.remove() } }, { key: "deleteCol", value: function (n) { for (var t, e, o = r.ancestor(n.commonAncestor(), r.isCell), s = u()(o).closest("tr"), c = s.children("td, th").index(u()(o)), f = new h(o, h.where.Column, h.requestAction.Delete, u()(s).closest("table")[0]).getActionList(), i = 0; i < f.length; i++)if (f[i]) switch (f[i].action) { case h.resultAction.Ignore: continue; case h.resultAction.SubtractSpanCount: t = f[i].baseCell; t.colSpan && t.colSpan > 1 && (e = t.colSpan ? parseInt(t.colSpan, 10) : 0, e > 2 ? (e--, t.setAttribute("colSpan", e), t.cellIndex === c && (t.innerHTML = "")) : 2 === e && (t.removeAttribute("colSpan"), t.cellIndex === c && (t.innerHTML = ""))); continue; case h.resultAction.RemoveCell: r.remove(f[i].baseCell, !0); continue } } }, { key: "createTable", value: function (n, t, i) { for (var c, l, o, s, h, f = [], e = 0; e < n; e++)f.push("<td>" + r.blank + "<\/td>"); for (c = f.join(""), o = [], s = 0; s < t; s++)o.push("<tr>" + c + "<\/tr>"); return l = o.join(""), h = u()("<table>" + l + "<\/table>"), i && i.tableClassName && h.addClass(i.tableClassName), h[0] } }, { key: "deleteTable", value: function (n) { var t = r.ancestor(n.commonAncestor(), r.isCell); u()(t).closest("table").remove() } }]) && dr(t.prototype, i), e && dr(t, e), n }(); tu = function () { function n(t) { var i = this, e; !function (n, t) { if (!(n instanceof t)) throw new TypeError("Cannot call a class as a function"); }(this, n); this.context = t; this.$note = t.layoutInfo.note; this.$editor = t.layoutInfo.editor; this.$editable = t.layoutInfo.editable; this.options = t.options; this.lang = this.options.langInfo; this.editable = this.$editable[0]; this.lastRange = null; this.snapshot = null; this.style = new pr; this.table = new gr; this.typing = new kr(t); this.bullet = new ii; this.history = new vr(t); this.context.memo("help.escape", this.lang.help.escape); this.context.memo("help.undo", this.lang.help.undo); this.context.memo("help.redo", this.lang.help.redo); this.context.memo("help.tab", this.lang.help.tab); this.context.memo("help.untab", this.lang.help.untab); this.context.memo("help.insertParagraph", this.lang.help.insertParagraph); this.context.memo("help.insertOrderedList", this.lang.help.insertOrderedList); this.context.memo("help.insertUnorderedList", this.lang.help.insertUnorderedList); this.context.memo("help.indent", this.lang.help.indent); this.context.memo("help.outdent", this.lang.help.outdent); this.context.memo("help.formatPara", this.lang.help.formatPara); this.context.memo("help.insertHorizontalRule", this.lang.help.insertHorizontalRule); this.context.memo("help.fontName", this.lang.help.fontName); for (var h = ["bold", "italic", "underline", "strikethrough", "superscript", "subscript", "justifyLeft", "justifyCenter", "justifyRight", "justifyFull", "formatBlock", "removeFormat", "backColor"], s = 0, l = h.length; s < l; s++)this[h[s]] = function (n) { return function (t) { i.beforeCommand(); document.execCommand(n, !1, t); i.afterCommand(!0) } }(h[s]), this.context.memo("help." + h[s], this.lang.help[h[s]]); for (this.fontName = this.wrapCommand(function (n) { return i.fontStyling("font-family", c.validFontName(n)) }), this.fontSize = this.wrapCommand(function (n) { var t = i.currentStyle()["font-size-unit"]; return i.fontStyling("font-size", n + t) }), this.fontSizeUnit = this.wrapCommand(function (n) { var t = i.currentStyle()["font-size"]; return i.fontStyling("font-size", t + n) }), e = 1; e <= 6; e++)this["formatH" + e] = function (n) { return function () { i.formatBlock("H" + n) } }(e), this.context.memo("help.formatH" + e, this.lang.help["formatH" + e]); this.insertParagraph = this.wrapCommand(function () { i.typing.insertParagraph(i.editable) }); this.insertOrderedList = this.wrapCommand(function () { i.bullet.insertOrderedList(i.editable) }); this.insertUnorderedList = this.wrapCommand(function () { i.bullet.insertUnorderedList(i.editable) }); this.indent = this.wrapCommand(function () { i.bullet.indent(i.editable) }); this.outdent = this.wrapCommand(function () { i.bullet.outdent(i.editable) }); this.insertNode = this.wrapCommand(function (n) { i.isLimited(u()(n).text().length) || (i.getLastRange().insertNode(n), i.setLastRange(o.createFromNodeAfter(n).select())) }); this.insertText = this.wrapCommand(function (n) { if (!i.isLimited(n.length)) { var t = i.getLastRange().insertNode(r.createText(n)); i.setLastRange(o.create(t, r.nodeLength(t)).select()) } }); this.pasteHTML = this.wrapCommand(function (n) { if (!i.isLimited(n.length)) { n = i.context.invoke("codeview.purify", n); var t = i.getLastRange().pasteHTML(n); i.setLastRange(o.createFromNodeAfter(f.last(t)).select()) } }); this.formatBlock = this.wrapCommand(function (n, t) { var r = i.options.callbacks.onApplyCustomStyle; r ? r.call(i, t, i.context, i.onFormatBlock) : i.onFormatBlock(n, t) }); this.insertHorizontalRule = this.wrapCommand(function () { var n = i.getLastRange().insertNode(r.create("HR")); n.nextSibling && i.setLastRange(o.create(n.nextSibling, 0).normalize().select()) }); this.lineHeight = this.wrapCommand(function (n) { i.style.stylePara(i.getLastRange(), { lineHeight: n }) }); this.createLink = this.wrapCommand(function (n) { var t = n.url, e = n.text, c = n.isNewWindow, l = n.checkProtocol, r = n.range || i.getLastRange(), o = e.length - r.toString().length, s, f, h; o > 0 && i.isLimited(o) || (s = r.toString() !== e, "string" == typeof t && (t = t.trim()), i.options.onCreateLink ? t = i.options.onCreateLink(t) : l && (t = /^([A-Za-z][A-Za-z0-9+-.]*\:|#|\/)/.test(t) ? t : i.options.defaultProtocol + t), f = [], s ? (h = (r = r.deleteContents()).insertNode(u()("<A>" + e + "<\/A>")[0]), f.push(h)) : f = i.style.styleNodes(r, { nodeName: "A", expandClosestSibling: !0, onlyPartialContains: !0 }), u.a.each(f, function (n, i) { u()(i).attr("href", t); c ? u()(i).attr("target", "_blank") : u()(i).removeAttr("target") }), i.setLastRange(i.createRangeFromList(f).select())) }); this.color = this.wrapCommand(function (n) { var t = n.foreColor, i = n.backColor; t && document.execCommand("foreColor", !1, t); i && document.execCommand("backColor", !1, i) }); this.foreColor = this.wrapCommand(function (n) { document.execCommand("foreColor", !1, n) }); this.insertTable = this.wrapCommand(function (n) { var t = n.split("x"); i.getLastRange().deleteContents().insertNode(i.table.createTable(t[0], t[1], i.options)) }); this.removeMedia = this.wrapCommand(function () { var n = u()(i.restoreTarget()).parent(); n.closest("figure").length ? n.closest("figure").remove() : n = u()(i.restoreTarget()).detach(); i.context.triggerEvent("media.delete", n, i.$editable) }); this.floatMe = this.wrapCommand(function (n) { var t = u()(i.restoreTarget()); t.toggleClass("note-float-left", "left" === n); t.toggleClass("note-float-right", "right" === n); t.css("float", "none" === n ? "" : n) }); this.resize = this.wrapCommand(function (n) { var t = u()(i.restoreTarget()); 0 === (n = parseFloat(n)) ? t.css("width", "") : t.css({ width: 100 * n + "%", height: "" }) }) } var t, i, h; return t = n, (i = [{ key: "initialize", value: function () { var n = this; this.$editable.on("keydown", function (t) { if (t.keyCode === s.code.ENTER && n.context.triggerEvent("enter", t), n.context.triggerEvent("keydown", t), n.snapshot = n.history.makeSnapshot(), n.hasKeyShortCut = !1, t.isDefaultPrevented() || (n.options.shortcuts ? n.hasKeyShortCut = n.handleKeyMap(t) : n.preventDefaultEditableShortCuts(t)), n.isLimited(1, t)) { var i = n.getLastRange(); if (i.eo - i.so == 0) return !1 } n.setLastRange(); n.options.recordEveryKeystroke && !1 === n.hasKeyShortCut && n.history.recordUndo() }).on("keyup", function (t) { n.setLastRange(); n.context.triggerEvent("keyup", t) }).on("focus", function (t) { n.setLastRange(); n.context.triggerEvent("focus", t) }).on("blur", function (t) { n.context.triggerEvent("blur", t) }).on("mousedown", function (t) { n.context.triggerEvent("mousedown", t) }).on("mouseup", function (t) { n.setLastRange(); n.history.recordUndo(); n.context.triggerEvent("mouseup", t) }).on("scroll", function (t) { n.context.triggerEvent("scroll", t) }).on("paste", function (t) { n.setLastRange(); n.context.triggerEvent("paste", t) }).on("input", function () { n.isLimited(0) && n.snapshot && n.history.applySnapshot(n.snapshot) }); this.$editable.attr("spellcheck", this.options.spellCheck); this.$editable.attr("autocorrect", this.options.spellCheck); this.options.disableGrammar && this.$editable.attr("data-gramm", !1); this.$editable.html(r.html(this.$note) || r.emptyPara); this.$editable.on(c.inputEventName, e.debounce(function () { n.context.triggerEvent("change", n.$editable.html(), n.$editable) }, 10)); this.$editable.on("focusin", function (t) { n.context.triggerEvent("focusin", t) }).on("focusout", function (t) { n.context.triggerEvent("focusout", t) }); this.options.airMode ? this.options.overrideContextMenu && this.$editor.on("contextmenu", function (t) { return n.context.triggerEvent("contextmenu", t), !1 }) : (this.options.width && this.$editor.outerWidth(this.options.width), this.options.height && this.$editable.outerHeight(this.options.height), this.options.maxHeight && this.$editable.css("max-height", this.options.maxHeight), this.options.minHeight && this.$editable.css("min-height", this.options.minHeight)); this.history.recordUndo(); this.setLastRange() } }, { key: "destroy", value: function () { this.$editable.off() } }, { key: "handleKeyMap", value: function (n) { var u = this.options.keyMap[c.isMac ? "mac" : "pc"], t = [], i, r; if (n.metaKey && t.push("CMD"), n.ctrlKey && !n.altKey && t.push("CTRL"), n.shiftKey && t.push("SHIFT"), i = s.nameFromCode[n.keyCode], i && t.push(i), r = u[t.join("+")], "TAB" !== i || this.options.tabDisable) if (r) { if (!1 !== this.context.invoke(r)) return n.preventDefault(), !0 } else s.isEdit(n.keyCode) && this.afterCommand(); else this.afterCommand(); return !1 } }, { key: "preventDefaultEditableShortCuts", value: function (n) { (n.ctrlKey || n.metaKey) && f.contains([66, 73, 85], n.keyCode) && n.preventDefault() } }, { key: "isLimited", value: function (n, t) { return n = n || 0, (void 0 === t || !(s.isMove(t.keyCode) || s.isNavigation(t.keyCode) || t.ctrlKey || t.metaKey || f.contains([s.code.BACKSPACE, s.code.DELETE], t.keyCode))) && this.options.maxTextLength > 0 && this.$editable.text().length + n > this.options.maxTextLength } }, { key: "createRange", value: function () { return this.focus(), this.setLastRange(), this.getLastRange() } }, { key: "createRangeFromList", value: function (n) { var t = o.createFromNodeBefore(f.head(n)).getStartPoint(), i = o.createFromNodeAfter(f.last(n)).getEndPoint(); return o.create(t.node, t.offset, i.node, i.offset) } }, { key: "setLastRange", value: function (n) { n ? this.lastRange = n : (this.lastRange = o.create(this.editable), 0 === u()(this.lastRange.sc).closest(".note-editable").length && (this.lastRange = o.createFromBodyElement(this.editable))) } }, { key: "getLastRange", value: function () { return this.lastRange || this.setLastRange(), this.lastRange } }, { key: "saveRange", value: function (n) { n && this.getLastRange().collapse().select() } }, { key: "restoreRange", value: function () { this.lastRange && (this.lastRange.select(), this.focus()) } }, { key: "saveTarget", value: function (n) { this.$editable.data("target", n) } }, { key: "clearTarget", value: function () { this.$editable.removeData("target") } }, { key: "restoreTarget", value: function () { return this.$editable.data("target") } }, { key: "currentStyle", value: function () { var n = o.create(); return n && (n = n.normalize()), n ? this.style.current(n) : this.style.fromNode(this.$editable) } }, { key: "styleFromNode", value: function (n) { return this.style.fromNode(n) } }, { key: "undo", value: function () { this.context.triggerEvent("before.command", this.$editable.html()); this.history.undo(); this.context.triggerEvent("change", this.$editable.html(), this.$editable) } }, { key: "commit", value: function () { this.context.triggerEvent("before.command", this.$editable.html()); this.history.commit(); this.context.triggerEvent("change", this.$editable.html(), this.$editable) } }, { key: "redo", value: function () { this.context.triggerEvent("before.command", this.$editable.html()); this.history.redo(); this.context.triggerEvent("change", this.$editable.html(), this.$editable) } }, { key: "beforeCommand", value: function () { this.context.triggerEvent("before.command", this.$editable.html()); document.execCommand("styleWithCSS", !1, this.options.styleWithCSS); this.focus() } }, { key: "afterCommand", value: function (n) { this.normalizeContent(); this.history.recordUndo(); n || this.context.triggerEvent("change", this.$editable.html(), this.$editable) } }, { key: "tab", value: function () { var n = this.getLastRange(); if (n.isCollapsed() && n.isOnCell()) this.table.tab(n); else { if (0 === this.options.tabSize) return !1; this.isLimited(this.options.tabSize) || (this.beforeCommand(), this.typing.insertTab(n, this.options.tabSize), this.afterCommand()) } } }, { key: "untab", value: function () { var n = this.getLastRange(); if (n.isCollapsed() && n.isOnCell()) this.table.tab(n, !0); else if (0 === this.options.tabSize) return !1 } }, { key: "wrapCommand", value: function (n) { return function () { this.beforeCommand(); n.apply(this, arguments); this.afterCommand() } } }, { key: "insertImage", value: function (n, t) { var r, i = this; return (r = n, u.a.Deferred(function (n) { var t = u()("<img>"); t.one("load", function () { t.off("error abort"); n.resolve(t) }).one("error abort", function () { t.off("load").detach(); n.reject(t) }).css({ display: "none" }).appendTo(document.body).attr("src", r) }).promise()).then(function (n) { i.beforeCommand(); "function" == typeof t ? t(n) : ("string" == typeof t && n.attr("data-filename", t), n.css("width", Math.min(i.$editable.width(), n.width()))); n.show(); i.getLastRange().insertNode(n[0]); i.setLastRange(o.createFromNodeAfter(n[0]).select()); i.afterCommand() }).fail(function (n) { i.context.triggerEvent("image.upload.error", n) }) } }, { key: "insertImagesAsDataURL", value: function (n) { var t = this; u.a.each(n, function (n, i) { var r = i.name; t.options.maximumImageFileSize && t.options.maximumImageFileSize < i.size ? t.context.triggerEvent("image.upload.error", t.lang.image.maximumFileSizeError) : function (n) { return u.a.Deferred(function (t) { u.a.extend(new FileReader, { onload: function (n) { var i = n.target.result; t.resolve(i) }, onerror: function (n) { t.reject(n) } }).readAsDataURL(n) }).promise() }(i).then(function (n) { return t.insertImage(n, r) }).fail(function () { t.context.triggerEvent("image.upload.error") }) }) } }, { key: "insertImagesOrCallback", value: function (n) { this.options.callbacks.onImageUpload ? this.context.triggerEvent("image.upload", n) : this.insertImagesAsDataURL(n) } }, { key: "getSelectedText", value: function () { var n = this.getLastRange(); return n.isOnAnchor() && (n = o.createFromNode(r.ancestor(n.sc, r.isAnchor))), n.toString() } }, { key: "onFormatBlock", value: function (n, t) { var i, r; (document.execCommand("FormatBlock", !1, c.isMSIE ? "<" + n + ">" : n), t && t.length && (t[0].tagName.toUpperCase() !== n.toUpperCase() && (t = t.find(n)), t && t.length)) && (i = t[0].className || "", i && (r = this.createRange(), u()([r.sc, r.ec]).closest(n).addClass(i))) } }, { key: "formatPara", value: function () { this.formatBlock("P") } }, { key: "fontStyling", value: function (n, t) { var s = this.getLastRange(), e, i, h; "" !== s ? (e = this.style.styleNodes(s), (this.$editor.find(".note-status-output").html(""), u()(e).css(n, t), s.isCollapsed()) ? (i = f.head(e), i && !r.nodeLength(i) && (i.innerHTML = r.ZERO_WIDTH_NBSP_CHAR, o.createFromNode(i.firstChild).select(), this.setLastRange(), this.$editable.data("bogus", i))) : this.setLastRange(this.createRangeFromList(e).select())) : (h = u.a.now(), this.$editor.find(".note-status-output").html('<div id="note-status-output-' + h + '" class="alert alert-info">' + this.lang.output.noSelection + "<\/div>"), setTimeout(function () { u()("#note-status-output-" + h).remove() }, 5e3)) } }, { key: "unlink", value: function () { var n = this.getLastRange(), t; n.isOnAnchor() && (t = r.ancestor(n.sc, r.isAnchor), (n = o.createFromNode(t)).select(), this.setLastRange(), this.beforeCommand(), document.execCommand("unlink"), this.afterCommand()) } }, { key: "getLinkInfo", value: function () { var t = this.getLastRange().expand(r.isAnchor), n = u()(f.head(t.nodes(r.isAnchor))), i = { range: t, text: t.toString(), url: n.length ? n.attr("href") : "" }; return n.length && (i.isNewWindow = "_blank" === n.attr("target")), i } }, { key: "addRow", value: function (n) { var t = this.getLastRange(this.$editable); t.isCollapsed() && t.isOnCell() && (this.beforeCommand(), this.table.addRow(t, n), this.afterCommand()) } }, { key: "addCol", value: function (n) { var t = this.getLastRange(this.$editable); t.isCollapsed() && t.isOnCell() && (this.beforeCommand(), this.table.addCol(t, n), this.afterCommand()) } }, { key: "deleteRow", value: function () { var n = this.getLastRange(this.$editable); n.isCollapsed() && n.isOnCell() && (this.beforeCommand(), this.table.deleteRow(n), this.afterCommand()) } }, { key: "deleteCol", value: function () { var n = this.getLastRange(this.$editable); n.isCollapsed() && n.isOnCell() && (this.beforeCommand(), this.table.deleteCol(n), this.afterCommand()) } }, { key: "deleteTable", value: function () { var n = this.getLastRange(this.$editable); n.isCollapsed() && n.isOnCell() && (this.beforeCommand(), this.table.deleteTable(n), this.afterCommand()) } }, { key: "resizeTo", value: function (n, t, i) { var u, f, r; i ? (f = n.y / n.x, r = t.data("ratio"), u = { width: r > f ? n.x : n.y / r, height: r > f ? n.x * r : n.y }) : u = { width: n.x, height: n.y }; t.css(u) } }, { key: "hasFocus", value: function () { return this.$editable.is(":focus") } }, { key: "focus", value: function () { this.hasFocus() || this.$editable.focus() } }, { key: "isEmpty", value: function () { return r.isEmpty(this.$editable[0]) || r.emptyPara === this.$editable.html() } }, { key: "empty", value: function () { this.context.invoke("code", r.emptyPara) } }, { key: "normalizeContent", value: function () { this.$editable[0].normalize() } }]) && nu(t.prototype, i), h && nu(t, h), n }(); ru = function () { function n(t) { !function (n, t) { if (!(n instanceof t)) throw new TypeError("Cannot call a class as a function"); }(this, n); this.context = t; this.$editable = t.layoutInfo.editable } var t, i, r; return t = n, (i = [{ key: "initialize", value: function () { this.$editable.on("paste", this.pasteByEvent.bind(this)) } }, { key: "pasteByEvent", value: function (n) { var u = this, t = n.originalEvent.clipboardData, i, r; t && t.items && t.items.length ? (i = t.items.length > 1 ? t.items[1] : f.head(t.items), "file" === i.kind && -1 !== i.type.indexOf("image/") ? (this.context.invoke("editor.insertImagesOrCallback", [i.getAsFile()]), n.preventDefault()) : "string" === i.kind && this.context.invoke("editor.isLimited", t.getData("Text").length) && n.preventDefault()) : window.clipboardData && (r = window.clipboardData.getData("text"), this.context.invoke("editor.isLimited", r.length) && n.preventDefault()); setTimeout(function () { u.context.invoke("editor.afterCommand") }, 10) } }]) && iu(t.prototype, i), r && iu(t, r), n }(); fu = function () { function n(t) { !function (n, t) { if (!(n instanceof t)) throw new TypeError("Cannot call a class as a function"); }(this, n); this.context = t; this.$eventListener = u()(document); this.$editor = t.layoutInfo.editor; this.$editable = t.layoutInfo.editable; this.options = t.options; this.lang = this.options.langInfo; this.documentEventHandlers = {}; this.$dropzone = u()('<div class="note-dropzone"><div class="note-dropzone-message"><\/div><\/div>').prependTo(this.$editor) } var t, i, r; return t = n, (i = [{ key: "initialize", value: function () { this.options.disableDragAndDrop ? (this.documentEventHandlers.onDrop = function (n) { n.preventDefault() }, this.$eventListener = this.$dropzone, this.$eventListener.on("drop", this.documentEventHandlers.onDrop)) : this.attachDragAndDropEvent() } }, { key: "attachDragAndDropEvent", value: function () { var n = this, t = u()(), i = this.$dropzone.find(".note-dropzone-message"); this.documentEventHandlers.onDragenter = function (r) { var u = n.context.invoke("codeview.isActivated"), f = n.$editor.width() > 0 && n.$editor.height() > 0; u || t.length || !f || (n.$editor.addClass("dragover"), n.$dropzone.width(n.$editor.width()), n.$dropzone.height(n.$editor.height()), i.text(n.lang.image.dragImageHere)); t = t.add(r.target) }; this.documentEventHandlers.onDragleave = function (i) { (t = t.not(i.target)).length && "BODY" !== i.target.nodeName || (t = u()(), n.$editor.removeClass("dragover")) }; this.documentEventHandlers.onDrop = function () { t = u()(); n.$editor.removeClass("dragover") }; this.$eventListener.on("dragenter", this.documentEventHandlers.onDragenter).on("dragleave", this.documentEventHandlers.onDragleave).on("drop", this.documentEventHandlers.onDrop); this.$dropzone.on("dragenter", function () { n.$dropzone.addClass("hover"); i.text(n.lang.image.dropImage) }).on("dragleave", function () { n.$dropzone.removeClass("hover"); i.text(n.lang.image.dragImageHere) }); this.$dropzone.on("drop", function (t) { var i = t.originalEvent.dataTransfer; t.preventDefault(); i && i.files && i.files.length ? (n.$editable.focus(), n.context.invoke("editor.insertImagesOrCallback", i.files)) : u.a.each(i.types, function (t, r) { if (!(r.toLowerCase().indexOf("_moz_") > -1)) { var f = i.getData(r); r.toLowerCase().indexOf("text") > -1 ? n.context.invoke("editor.pasteHTML", f) : u()(f).each(function (t, i) { n.context.invoke("editor.insertNode", i) }) } }) }).on("dragover", !1) } }, { key: "destroy", value: function () { var n = this; Object.keys(this.documentEventHandlers).forEach(function (t) { n.$eventListener.off(t.substr(2).toLowerCase(), n.documentEventHandlers[t]) }); this.documentEventHandlers = {} } }]) && uu(t.prototype, i), r && uu(t, r), n }(); su = function () { function n(t) { !function (n, t) { if (!(n instanceof t)) throw new TypeError("Cannot call a class as a function"); }(this, n); this.context = t; this.$editor = t.layoutInfo.editor; this.$editable = t.layoutInfo.editable; this.$codable = t.layoutInfo.codable; this.options = t.options; this.CodeMirrorConstructor = window.CodeMirror; this.options.codemirror.CodeMirrorConstructor && (this.CodeMirrorConstructor = this.options.codemirror.CodeMirrorConstructor) } var t, i, u; return t = n, (i = [{ key: "sync", value: function (n) { var i = this.isActivated(), t = this.CodeMirrorConstructor; i && (n ? t ? this.$codable.data("cmEditor").getDoc().setValue(n) : this.$codable.val(n) : t && this.$codable.data("cmEditor").save()) } }, { key: "initialize", value: function () { var n = this; this.$codable.on("keyup", function (t) { t.keyCode === s.code.ESCAPE && n.deactivate() }) } }, { key: "isActivated", value: function () { return this.$editor.hasClass("codeview") } }, { key: "toggle", value: function () { this.isActivated() ? this.deactivate() : this.activate(); this.context.triggerEvent("codeview.toggled") } }, { key: "purify", value: function (n) { if (this.options.codeviewFilter && (n = n.replace(this.options.codeviewFilterRegex, ""), this.options.codeviewIframeFilter)) { var t = this.options.codeviewIframeWhitelistSrc.concat(this.options.codeviewIframeWhitelistSrcBase); n = n.replace(/(<iframe.*?>.*?(?:<\/iframe>)?)/gi, function (n) { var r, i, u; if (/<.+src(?==?('|"|\s)?)[\s\S]+src(?=('|"|\s)?)[^>]*?>/i.test(n)) return ""; i = le(t); try { for (i.s(); !(r = i.n()).done;)if (u = r.value, new RegExp('src="(https?:)?//' + u.replace(/[-\/\\^$*+?.()|[\]{}]/g, "\\$&") + '/(.+)"').test(n)) return n } catch (n) { i.e(n) } finally { i.f() } return "" }) } return n } }, { key: "activate", value: function () { var t = this, i = this.CodeMirrorConstructor, n, u; (this.$codable.val(r.html(this.$editable, this.options.prettifyHtml)), this.$codable.height(this.$editable.height()), this.context.invoke("toolbar.updateCodeview", !0), this.context.invoke("airPopover.updateCodeview", !0), this.$editor.addClass("codeview"), this.$codable.focus(), i) ? (n = i.fromTextArea(this.$codable[0], this.options.codemirror), this.options.codemirror.tern && (u = new i.TernServer(this.options.codemirror.tern), n.ternServer = u, n.on("cursorActivity", function (n) { u.updateArgHints(n) })), n.on("blur", function (i) { t.context.triggerEvent("blur.codeview", n.getValue(), i) }), n.on("change", function () { t.context.triggerEvent("change.codeview", n.getValue(), n) }), n.setSize(null, this.$editable.outerHeight()), this.$codable.data("cmEditor", n)) : (this.$codable.on("blur", function (n) { t.context.triggerEvent("blur.codeview", t.$codable.val(), n) }), this.$codable.on("input", function () { t.context.triggerEvent("change.codeview", t.$codable.val(), t.$codable) })) } }, { key: "deactivate", value: function () { var n, t, i; this.CodeMirrorConstructor && (n = this.$codable.data("cmEditor"), this.$codable.val(n.getValue()), n.toTextArea()); t = this.purify(r.value(this.$codable, this.options.prettifyHtml) || r.emptyPara); i = this.$editable.html() !== t; this.$editable.html(t); this.$editable.height(this.options.height ? this.$codable.height() : "auto"); this.$editor.removeClass("codeview"); i && this.context.triggerEvent("change", this.$editable.html(), this.$editable); this.$editable.focus(); this.context.invoke("toolbar.updateCodeview", !1); this.context.invoke("airPopover.updateCodeview", !1) } }, { key: "destroy", value: function () { this.isActivated() && this.deactivate() } }]) && ou(t.prototype, i), u && ou(t, u), n }(); cu = function () { function n(t) { !function (n, t) { if (!(n instanceof t)) throw new TypeError("Cannot call a class as a function"); }(this, n); this.$document = u()(document); this.$statusbar = t.layoutInfo.statusbar; this.$editable = t.layoutInfo.editable; this.options = t.options } var t, i, r; return t = n, (i = [{ key: "initialize", value: function () { var n = this; this.options.airMode || this.options.disableResizeEditor ? this.destroy() : this.$statusbar.on("mousedown", function (t) { t.preventDefault(); t.stopPropagation(); var r = n.$editable.offset().top - n.$document.scrollTop(), i = function (t) { var i = t.clientY - (r + 24); i = n.options.minheight > 0 ? Math.max(i, n.options.minheight) : i; i = n.options.maxHeight > 0 ? Math.min(i, n.options.maxHeight) : i; n.$editable.height(i) }; n.$document.on("mousemove", i).one("mouseup", function () { n.$document.off("mousemove", i) }) }) } }, { key: "destroy", value: function () { this.$statusbar.off(); this.$statusbar.addClass("locked") } }]) && hu(t.prototype, i), r && hu(t, r), n }(); au = function () { function n(t) { var i = this; !function (n, t) { if (!(n instanceof t)) throw new TypeError("Cannot call a class as a function"); }(this, n); this.context = t; this.$editor = t.layoutInfo.editor; this.$toolbar = t.layoutInfo.toolbar; this.$editable = t.layoutInfo.editable; this.$codable = t.layoutInfo.codable; this.$window = u()(window); this.$scrollbar = u()("html, body"); this.onResize = function () { i.resizeTo({ h: i.$window.height() - i.$toolbar.outerHeight() }) } } var t, i, r; return t = n, (i = [{ key: "resizeTo", value: function (n) { this.$editable.css("height", n.h); this.$codable.css("height", n.h); this.$codable.data("cmeditor") && this.$codable.data("cmeditor").setsize(null, n.h) } }, { key: "toggle", value: function () { this.$editor.toggleClass("fullscreen"); this.isFullscreen() ? (this.$editable.data("orgHeight", this.$editable.css("height")), this.$editable.data("orgMaxHeight", this.$editable.css("maxHeight")), this.$editable.css("maxHeight", ""), this.$window.on("resize", this.onResize).trigger("resize"), this.$scrollbar.css("overflow", "hidden")) : (this.$window.off("resize", this.onResize), this.resizeTo({ h: this.$editable.data("orgHeight") }), this.$editable.css("maxHeight", this.$editable.css("orgMaxHeight")), this.$scrollbar.css("overflow", "visible")); this.context.invoke("toolbar.updateFullscreen", this.isFullscreen()) } }, { key: "isFullscreen", value: function () { return this.$editor.hasClass("fullscreen") } }]) && lu(t.prototype, i), r && lu(t, r), n }(); yu = function () { function n(t) { var i = this; !function (n, t) { if (!(n instanceof t)) throw new TypeError("Cannot call a class as a function"); }(this, n); this.context = t; this.$document = u()(document); this.$editingArea = t.layoutInfo.editingArea; this.options = t.options; this.lang = this.options.langInfo; this.events = { "summernote.mousedown": function (n, t) { i.update(t.target, t) && t.preventDefault() }, "summernote.keyup summernote.scroll summernote.change summernote.dialog.shown": function () { i.update() }, "summernote.disable summernote.blur": function () { i.hide() }, "summernote.codeview.toggled": function () { i.update() } } } var t, i, f; return t = n, (i = [{ key: "initialize", value: function () { var n = this; this.$handle = u()(['<div class="note-handle">', '<div class="note-control-selection">', '<div class="note-control-selection-bg"><\/div>', '<div class="note-control-holder note-control-nw"><\/div>', '<div class="note-control-holder note-control-ne"><\/div>', '<div class="note-control-holder note-control-sw"><\/div>', '<div class="', this.options.disableResizeImage ? "note-control-holder" : "note-control-sizing", ' note-control-se"><\/div>', this.options.disableResizeImage ? "" : '<div class="note-control-selection-info"><\/div>', "<\/div>", "<\/div>"].join("")).prependTo(this.$editingArea); this.$handle.on("mousedown", function (t) { if (r.isControlSizing(t.target)) { t.preventDefault(); t.stopPropagation(); var i = n.$handle.find(".note-control-selection").data("target"), u = i.offset(), e = n.$document.scrollTop(), f = function (t) { n.context.invoke("editor.resizeTo", { x: t.clientX - u.left, y: t.clientY - (u.top - e) }, i, !t.shiftKey); n.update(i[0], t) }; n.$document.on("mousemove", f).one("mouseup", function (t) { t.preventDefault(); n.$document.off("mousemove", f); n.context.invoke("editor.afterCommand") }); i.data("ratio") || i.data("ratio", i.height() / i.width()) } }); this.$handle.on("wheel", function (t) { t.preventDefault(); n.update() }) } }, { key: "destroy", value: function () { this.$handle.remove() } }, { key: "update", value: function (n, t) { var o, s, e, l; if (this.context.isDisabled()) return !1; if (o = r.isImg(n), s = this.$handle.find(".note-control-selection"), this.context.invoke("imagePopover.update", n, t), o) { var i = u()(n), h = i.position(), c = { left: h.left + parseInt(i.css("marginLeft"), 10), top: h.top + parseInt(i.css("marginTop"), 10) }, f = { w: i.outerWidth(!1), h: i.outerHeight(!1) }; s.css({ display: "block", left: c.left, top: c.top, width: f.w, height: f.h }).data("target", i); e = new Image; e.src = i.attr("src"); l = f.w + "x" + f.h + " (" + this.lang.image.original + ": " + e.width + "x" + e.height + ")"; s.find(".note-control-selection-info").text(l); this.context.invoke("editor.saveTarget", n) } else this.hide(); return o } }, { key: "hide", value: function () { this.context.invoke("editor.clearTarget"); this.$handle.children().hide() } }]) && vu(t.prototype, i), f && vu(t, f), n }(); wu = /^([A-Za-z][A-Za-z0-9+-.]*\:[\/]{2}|tel:|mailto:[A-Z0-9._%+-]+@)?(www\.)?(.+)$/i; bu = function () { function n(t) { var i = this; !function (n, t) { if (!(n instanceof t)) throw new TypeError("Cannot call a class as a function"); }(this, n); this.context = t; this.options = t.options; this.events = { "summernote.keyup": function (n, t) { t.isDefaultPrevented() || i.handleKeyup(t) }, "summernote.keydown": function (n, t) { i.handleKeydown(t) } } } var t, i, r; return t = n, (i = [{ key: "initialize", value: function () { this.lastWordRange = null } }, { key: "destroy", value: function () { this.lastWordRange = null } }, { key: "replace", value: function () { var n, t; if (this.lastWordRange && (n = this.lastWordRange.toString(), t = n.match(wu), t && (t[1] || t[2]))) { var r = t[1] ? n : "http://" + n, f = this.options.showDomainOnlyForAutolink ? n.replace(/^(?:https?:\/\/)?(?:tel?:?)?(?:mailto?:?)?(?:www\.)?/i, "").split("/")[0] : n, i = u()("<a />").html(f).attr("href", r)[0]; this.context.options.linkTargetBlank && u()(i).attr("target", "_blank"); this.lastWordRange.insertNode(i); this.lastWordRange = null; this.context.invoke("editor.focus") } } }, { key: "handleKeydown", value: function (n) { if (f.contains([s.code.ENTER, s.code.SPACE], n.keyCode)) { var t = this.context.invoke("editor.createRange").getWordRange(); this.lastWordRange = t } } }, { key: "handleKeyup", value: function (n) { f.contains([s.code.ENTER, s.code.SPACE], n.keyCode) && this.replace() } }]) && pu(t.prototype, i), r && pu(t, r), n }(); du = function () { function n(t) { var i = this; !function (n, t) { if (!(n instanceof t)) throw new TypeError("Cannot call a class as a function"); }(this, n); this.$note = t.layoutInfo.note; this.events = { "summernote.change": function () { i.$note.val(t.invoke("code")) } } } var t, i, u; return t = n, (i = [{ key: "shouldInitialize", value: function () { return r.isTextarea(this.$note[0]) } }]) && ku(t.prototype, i), u && ku(t, u), n }(); nf = function () { function n(t) { var i = this; !function (n, t) { if (!(n instanceof t)) throw new TypeError("Cannot call a class as a function"); }(this, n); this.context = t; this.options = t.options.replace || {}; this.keys = [s.code.ENTER, s.code.SPACE, s.code.PERIOD, s.code.COMMA, s.code.SEMICOLON, s.code.SLASH]; this.previousKeydownCode = null; this.events = { "summernote.keyup": function (n, t) { t.isDefaultPrevented() || i.handleKeyup(t) }, "summernote.keydown": function (n, t) { i.handleKeydown(t) } } } var t, i, u; return t = n, (i = [{ key: "shouldInitialize", value: function () { return !!this.options.match } }, { key: "initialize", value: function () { this.lastWord = null } }, { key: "destroy", value: function () { this.lastWord = null } }, { key: "replace", value: function () { if (this.lastWord) { var n = this, t = this.lastWord.toString(); this.options.match(t, function (t) { if (t) { var i = ""; if ("string" == typeof t ? i = r.createText(t) : t instanceof jQuery ? i = t[0] : t instanceof Node && (i = t), !i) return; n.lastWord.insertNode(i); n.lastWord = null; n.context.invoke("editor.focus") } }) } } }, { key: "handleKeydown", value: function (n) { if (this.previousKeydownCode && f.contains(this.keys, this.previousKeydownCode)) this.previousKeydownCode = n.keyCode; else { if (f.contains(this.keys, n.keyCode)) { var t = this.context.invoke("editor.createRange").getWordRange(); this.lastWord = t } this.previousKeydownCode = n.keyCode } } }, { key: "handleKeyup", value: function (n) { f.contains(this.keys, n.keyCode) && this.replace() } }]) && gu(t.prototype, i), u && gu(t, u), n }(); rf = function () { function n(t) { var i = this; !function (n, t) { if (!(n instanceof t)) throw new TypeError("Cannot call a class as a function"); }(this, n); this.context = t; this.$editingArea = t.layoutInfo.editingArea; this.options = t.options; !0 === this.options.inheritPlaceholder && (this.options.placeholder = this.context.$note.attr("placeholder") || this.options.placeholder); this.events = { "summernote.init summernote.change": function () { i.update() }, "summernote.codeview.toggled": function () { i.update() } } } var t, i, r; return t = n, (i = [{ key: "shouldInitialize", value: function () { return !!this.options.placeholder } }, { key: "initialize", value: function () { var n = this; this.$placeholder = u()('<div class="note-placeholder">'); this.$placeholder.on("click", function () { n.context.invoke("focus") }).html(this.options.placeholder).prependTo(this.$editingArea); this.update() } }, { key: "destroy", value: function () { this.$placeholder.remove() } }, { key: "update", value: function () { var n = !this.context.invoke("codeview.isActivated") && this.context.invoke("editor.isEmpty"); this.$placeholder.toggle(n) } }]) && tf(t.prototype, i), r && tf(t, r), n }(); ff = function () { function n(t) { !function (n, t) { if (!(n instanceof t)) throw new TypeError("Cannot call a class as a function"); }(this, n); this.ui = u.a.summernote.ui; this.context = t; this.$toolbar = t.layoutInfo.toolbar; this.options = t.options; this.lang = this.options.langInfo; this.invertedKeyMap = e.invertObject(this.options.keyMap[c.isMac ? "mac" : "pc"]) } var t, i, r; return t = n, (i = [{ key: "representShortcut", value: function (n) { var t = this.invertedKeyMap[n]; return this.options.shortcuts && t ? (c.isMac && (t = t.replace("CMD", "⌘").replace("SHIFT", "⇧")), " (" + (t = t.replace("BACKSLASH", "\\").replace("SLASH", "/").replace("LEFTBRACKET", "[").replace("RIGHTBRACKET", "]")) + ")") : "" } }, { key: "button", value: function (n) { return !this.options.tooltip && n.tooltip && delete n.tooltip, n.container = this.options.container, this.ui.button(n) } }, { key: "initialize", value: function () { this.addToolbarButtons(); this.addImagePopoverButtons(); this.addLinkPopoverButtons(); this.addTablePopoverButtons(); this.fontInstalledMap = {} } }, { key: "destroy", value: function () { delete this.fontInstalledMap } }, { key: "isFontInstalled", value: function (n) { return Object.prototype.hasOwnProperty.call(this.fontInstalledMap, n) || (this.fontInstalledMap[n] = c.isFontInstalled(n) || f.contains(this.options.fontNamesIgnoreCheck, n)), this.fontInstalledMap[n] } }, { key: "isFontDeservedToAdd", value: function (n) { return "" !== (n = n.toLowerCase()) && this.isFontInstalled(n) && -1 === c.genericFontFamilies.indexOf(n) } }, { key: "colorPalette", value: function (n, t, i, r) { var e = this; return this.ui.buttonGroup({ className: "note-color " + n, children: [this.button({ className: "note-current-color-button", contents: this.ui.icon(this.options.icons.font + " note-recent-color"), tooltip: t, click: function (n) { var t = u()(n.currentTarget); i && r ? e.context.invoke("editor.color", { backColor: t.attr("data-backColor"), foreColor: t.attr("data-foreColor") }) : i ? e.context.invoke("editor.color", { backColor: t.attr("data-backColor") }) : r && e.context.invoke("editor.color", { foreColor: t.attr("data-foreColor") }) }, callback: function (n) { var t = n.find(".note-recent-color"); i && (t.css("background-color", e.options.colorButton.backColor), n.attr("data-backColor", e.options.colorButton.backColor)); r ? (t.css("color", e.options.colorButton.foreColor), n.attr("data-foreColor", e.options.colorButton.foreColor)) : t.css("color", "transparent") } }), this.button({ className: "dropdown-toggle", contents: this.ui.dropdownButtonContents("", this.options), tooltip: this.lang.color.more, data: { toggle: "dropdown" } }), this.ui.dropdown({ items: (i ? ['<div class="note-palette">', '<div class="note-palette-title">' + this.lang.color.background + "<\/div>", "<div>", '<button type="button" class="note-color-reset btn btn-light btn-default" data-event="backColor" data-value="transparent">', this.lang.color.transparent, "<\/button>", "<\/div>", '<div class="note-holder" data-event="backColor"><!-- back colors --><\/div>', "<div>", '<button type="button" class="note-color-select btn btn-light btn-default" data-event="openPalette" data-value="backColorPicker">', this.lang.color.cpSelect, "<\/button>", '<input type="color" id="backColorPicker" class="note-btn note-color-select-btn" value="' + this.options.colorButton.backColor + '" data-event="backColorPalette">', "<\/div>", '<div class="note-holder-custom" id="backColorPalette" data-event="backColor"><\/div>', "<\/div>"].join("") : "") + (r ? ['<div class="note-palette">', '<div class="note-palette-title">' + this.lang.color.foreground + "<\/div>", "<div>", '<button type="button" class="note-color-reset btn btn-light btn-default" data-event="removeFormat" data-value="foreColor">', this.lang.color.resetToDefault, "<\/button>", "<\/div>", '<div class="note-holder" data-event="foreColor"><!-- fore colors --><\/div>', "<div>", '<button type="button" class="note-color-select btn btn-light btn-default" data-event="openPalette" data-value="foreColorPicker">', this.lang.color.cpSelect, "<\/button>", '<input type="color" id="foreColorPicker" class="note-btn note-color-select-btn" value="' + this.options.colorButton.foreColor + '" data-event="foreColorPalette">', "<\/div>", '<div class="note-holder-custom" id="foreColorPalette" data-event="foreColor"><\/div>', "<\/div>"].join("") : ""), callback: function (n) { n.find(".note-holder").each(function (n, t) { var i = u()(t); i.append(e.ui.palette({ colors: e.options.colors, colorsName: e.options.colorsName, eventName: i.data("event"), container: e.options.container, tooltip: e.options.tooltip }).render()) }); var t = [["#FFFFFF", "#FFFFFF", "#FFFFFF", "#FFFFFF", "#FFFFFF", "#FFFFFF", "#FFFFFF", "#FFFFFF"]]; n.find(".note-holder-custom").each(function (n, i) { var r = u()(i); r.append(e.ui.palette({ colors: t, colorsName: t, eventName: r.data("event"), container: e.options.container, tooltip: e.options.tooltip }).render()) }); n.find("input[type=color]").each(function (t, i) { u()(i).change(function () { var i = n.find("#" + u()(this).data("event")).find(".note-color-btn").first(), t = this.value.toUpperCase(); i.css("background-color", t).attr("aria-label", t).attr("data-value", t).attr("data-original-title", t); i.click() }) }) }, click: function (t) { t.stopPropagation(); var c = u()("." + n).find(".note-dropdown-menu"), r = u()(t.target), i = r.data("event"), o = r.attr("data-value"); if ("openPalette" === i) { var h = c.find("#" + o), l = u()(c.find("#" + h.data("event")).find(".note-color-row")[0]), a = l.find(".note-color-btn").last().detach(), s = h.val(); a.css("background-color", s).attr("aria-label", s).attr("data-value", s).attr("data-original-title", s); l.prepend(a); h.click() } else { if (f.contains(["backColor", "foreColor"], i)) { var v = "backColor" === i ? "background-color" : "color", y = r.closest(".note-color").find(".note-recent-color"), p = r.closest(".note-color").find(".note-current-color-button"); y.css(v, o); p.attr("data-" + i, o) } e.context.invoke("editor." + i, o) } } })] }).render() } }, { key: "addToolbarButtons", value: function () { var n = this; this.context.memo("button.style", function () { return n.ui.buttonGroup([n.button({ className: "dropdown-toggle", contents: n.ui.dropdownButtonContents(n.ui.icon(n.options.icons.magic), n.options), tooltip: n.lang.style.style, data: { toggle: "dropdown" } }), n.ui.dropdown({ className: "dropdown-style", items: n.options.styleTags, title: n.lang.style.style, template: function (t) { "string" == typeof t && (t = { tag: t, title: Object.prototype.hasOwnProperty.call(n.lang.style, t) ? n.lang.style[t] : t }); var i = t.tag, r = t.title; return "<" + i + (t.style ? ' style="' + t.style + '" ' : "") + (t.className ? ' class="' + t.className + '"' : "") + ">" + r + "<\/" + i + ">" }, click: n.context.createInvokeHandler("editor.formatBlock") })]).render() }); for (var l = function (t) { var i = n.options.styleTags[t]; n.context.memo("button.style." + i, function () { return n.button({ className: "note-btn-style-" + i, contents: '<div data-value="' + i + '">' + i.toUpperCase() + "<\/div>", tooltip: n.lang.style[i], click: n.context.createInvokeHandler("editor.formatBlock") }).render() }) }, t = 0, a = this.options.styleTags.length; t < a; t++)l(t); this.context.memo("button.bold", function () { return n.button({ className: "note-btn-bold", contents: n.ui.icon(n.options.icons.bold), tooltip: n.lang.font.bold + n.representShortcut("bold"), click: n.context.createInvokeHandlerAndUpdateState("editor.bold") }).render() }); this.context.memo("button.italic", function () { return n.button({ className: "note-btn-italic", contents: n.ui.icon(n.options.icons.italic), tooltip: n.lang.font.italic + n.representShortcut("italic"), click: n.context.createInvokeHandlerAndUpdateState("editor.italic") }).render() }); this.context.memo("button.underline", function () { return n.button({ className: "note-btn-underline", contents: n.ui.icon(n.options.icons.underline), tooltip: n.lang.font.underline + n.representShortcut("underline"), click: n.context.createInvokeHandlerAndUpdateState("editor.underline") }).render() }); this.context.memo("button.clear", function () { return n.button({ contents: n.ui.icon(n.options.icons.eraser), tooltip: n.lang.font.clear + n.representShortcut("removeFormat"), click: n.context.createInvokeHandler("editor.removeFormat") }).render() }); this.context.memo("button.strikethrough", function () { return n.button({ className: "note-btn-strikethrough", contents: n.ui.icon(n.options.icons.strikethrough), tooltip: n.lang.font.strikethrough + n.representShortcut("strikethrough"), click: n.context.createInvokeHandlerAndUpdateState("editor.strikethrough") }).render() }); this.context.memo("button.superscript", function () { return n.button({ className: "note-btn-superscript", contents: n.ui.icon(n.options.icons.superscript), tooltip: n.lang.font.superscript, click: n.context.createInvokeHandlerAndUpdateState("editor.superscript") }).render() }); this.context.memo("button.subscript", function () { return n.button({ className: "note-btn-subscript", contents: n.ui.icon(n.options.icons.subscript), tooltip: n.lang.font.subscript, click: n.context.createInvokeHandlerAndUpdateState("editor.subscript") }).render() }); this.context.memo("button.fontname", function () { var t = n.context.invoke("editor.currentStyle"); return n.options.addDefaultFonts && u.a.each(t["font-family"].split(","), function (t, i) { i = i.trim().replace(/['"]+/g, ""); n.isFontDeservedToAdd(i) && -1 === n.options.fontNames.indexOf(i) && n.options.fontNames.push(i) }), n.ui.buttonGroup([n.button({ className: "dropdown-toggle", contents: n.ui.dropdownButtonContents('<span class="note-current-fontname"><\/span>', n.options), tooltip: n.lang.font.name, data: { toggle: "dropdown" } }), n.ui.dropdownCheck({ className: "dropdown-fontname", checkClassName: n.options.icons.menuCheck, items: n.options.fontNames.filter(n.isFontInstalled.bind(n)), title: n.lang.font.name, template: function (n) { return '<span style="font-family: ' + c.validFontName(n) + '">' + n + "<\/span>" }, click: n.context.createInvokeHandlerAndUpdateState("editor.fontName") })]).render() }); this.context.memo("button.fontsize", function () { return n.ui.buttonGroup([n.button({ className: "dropdown-toggle", contents: n.ui.dropdownButtonContents('<span class="note-current-fontsize"><\/span>', n.options), tooltip: n.lang.font.size, data: { toggle: "dropdown" } }), n.ui.dropdownCheck({ className: "dropdown-fontsize", checkClassName: n.options.icons.menuCheck, items: n.options.fontSizes, title: n.lang.font.size, click: n.context.createInvokeHandlerAndUpdateState("editor.fontSize") })]).render() }); this.context.memo("button.fontsizeunit", function () { return n.ui.buttonGroup([n.button({ className: "dropdown-toggle", contents: n.ui.dropdownButtonContents('<span class="note-current-fontsizeunit"><\/span>', n.options), tooltip: n.lang.font.sizeunit, data: { toggle: "dropdown" } }), n.ui.dropdownCheck({ className: "dropdown-fontsizeunit", checkClassName: n.options.icons.menuCheck, items: n.options.fontSizeUnits, title: n.lang.font.sizeunit, click: n.context.createInvokeHandlerAndUpdateState("editor.fontSizeUnit") })]).render() }); this.context.memo("button.color", function () { return n.colorPalette("note-color-all", n.lang.color.recent, !0, !0) }); this.context.memo("button.forecolor", function () { return n.colorPalette("note-color-fore", n.lang.color.foreground, !1, !0) }); this.context.memo("button.backcolor", function () { return n.colorPalette("note-color-back", n.lang.color.background, !0, !1) }); this.context.memo("button.ul", function () { return n.button({ contents: n.ui.icon(n.options.icons.unorderedlist), tooltip: n.lang.lists.unordered + n.representShortcut("insertUnorderedList"), click: n.context.createInvokeHandler("editor.insertUnorderedList") }).render() }); this.context.memo("button.ol", function () { return n.button({ contents: n.ui.icon(n.options.icons.orderedlist), tooltip: n.lang.lists.ordered + n.representShortcut("insertOrderedList"), click: n.context.createInvokeHandler("editor.insertOrderedList") }).render() }); var i = this.button({ contents: this.ui.icon(this.options.icons.alignLeft), tooltip: this.lang.paragraph.left + this.representShortcut("justifyLeft"), click: this.context.createInvokeHandler("editor.justifyLeft") }), r = this.button({ contents: this.ui.icon(this.options.icons.alignCenter), tooltip: this.lang.paragraph.center + this.representShortcut("justifyCenter"), click: this.context.createInvokeHandler("editor.justifyCenter") }), f = this.button({ contents: this.ui.icon(this.options.icons.alignRight), tooltip: this.lang.paragraph.right + this.representShortcut("justifyRight"), click: this.context.createInvokeHandler("editor.justifyRight") }), o = this.button({ contents: this.ui.icon(this.options.icons.alignJustify), tooltip: this.lang.paragraph.justify + this.representShortcut("justifyFull"), click: this.context.createInvokeHandler("editor.justifyFull") }), s = this.button({ contents: this.ui.icon(this.options.icons.outdent), tooltip: this.lang.paragraph.outdent + this.representShortcut("outdent"), click: this.context.createInvokeHandler("editor.outdent") }), h = this.button({ contents: this.ui.icon(this.options.icons.indent), tooltip: this.lang.paragraph.indent + this.representShortcut("indent"), click: this.context.createInvokeHandler("editor.indent") }); this.context.memo("button.justifyLeft", e.invoke(i, "render")); this.context.memo("button.justifyCenter", e.invoke(r, "render")); this.context.memo("button.justifyRight", e.invoke(f, "render")); this.context.memo("button.justifyFull", e.invoke(o, "render")); this.context.memo("button.outdent", e.invoke(s, "render")); this.context.memo("button.indent", e.invoke(h, "render")); this.context.memo("button.paragraph", function () { return n.ui.buttonGroup([n.button({ className: "dropdown-toggle", contents: n.ui.dropdownButtonContents(n.ui.icon(n.options.icons.alignLeft), n.options), tooltip: n.lang.paragraph.paragraph, data: { toggle: "dropdown" } }), n.ui.dropdown([n.ui.buttonGroup({ className: "note-align", children: [i, r, f, o] }), n.ui.buttonGroup({ className: "note-list", children: [s, h] })])]).render() }); this.context.memo("button.height", function () { return n.ui.buttonGroup([n.button({ className: "dropdown-toggle", contents: n.ui.dropdownButtonContents(n.ui.icon(n.options.icons.textHeight), n.options), tooltip: n.lang.font.height, data: { toggle: "dropdown" } }), n.ui.dropdownCheck({ items: n.options.lineHeights, checkClassName: n.options.icons.menuCheck, className: "dropdown-line-height", title: n.lang.font.height, click: n.context.createInvokeHandler("editor.lineHeight") })]).render() }); this.context.memo("button.table", function () { return n.ui.buttonGroup([n.button({ className: "dropdown-toggle", contents: n.ui.dropdownButtonContents(n.ui.icon(n.options.icons.table), n.options), tooltip: n.lang.table.table, data: { toggle: "dropdown" } }), n.ui.dropdown({ title: n.lang.table.table, className: "note-table", items: '<div class="note-dimension-picker"><div class="note-dimension-picker-mousecatcher" data-event="insertTable" data-value="1x1"><\/div><div class="note-dimension-picker-highlighted"><\/div><div class="note-dimension-picker-unhighlighted"><\/div><\/div><div class="note-dimension-display">1 x 1<\/div>' })], { callback: function (t) { t.find(".note-dimension-picker-mousecatcher").css({ width: n.options.insertTableMaxSize.col + "em", height: n.options.insertTableMaxSize.row + "em" }).mousedown(n.context.createInvokeHandler("editor.insertTable")).on("mousemove", n.tableMoveHandler.bind(n)) } }).render() }); this.context.memo("button.link", function () { return n.button({ contents: n.ui.icon(n.options.icons.link), tooltip: n.lang.link.link + n.representShortcut("linkDialog.show"), click: n.context.createInvokeHandler("linkDialog.show") }).render() }); this.context.memo("button.picture", function () { return n.button({ contents: n.ui.icon(n.options.icons.picture), tooltip: n.lang.image.image, click: n.context.createInvokeHandler("imageDialog.show") }).render() }); this.context.memo("button.video", function () { return n.button({ contents: n.ui.icon(n.options.icons.video), tooltip: n.lang.video.video, click: n.context.createInvokeHandler("videoDialog.show") }).render() }); this.context.memo("button.hr", function () { return n.button({ contents: n.ui.icon(n.options.icons.minus), tooltip: n.lang.hr.insert + n.representShortcut("insertHorizontalRule"), click: n.context.createInvokeHandler("editor.insertHorizontalRule") }).render() }); this.context.memo("button.fullscreen", function () { return n.button({ className: "btn-fullscreen note-codeview-keep", contents: n.ui.icon(n.options.icons.arrowsAlt), tooltip: n.lang.options.fullscreen, click: n.context.createInvokeHandler("fullscreen.toggle") }).render() }); this.context.memo("button.codeview", function () { return n.button({ className: "btn-codeview note-codeview-keep", contents: n.ui.icon(n.options.icons.code), tooltip: n.lang.options.codeview, click: n.context.createInvokeHandler("codeview.toggle") }).render() }); this.context.memo("button.redo", function () { return n.button({ contents: n.ui.icon(n.options.icons.redo), tooltip: n.lang.history.redo + n.representShortcut("redo"), click: n.context.createInvokeHandler("editor.redo") }).render() }); this.context.memo("button.undo", function () { return n.button({ contents: n.ui.icon(n.options.icons.undo), tooltip: n.lang.history.undo + n.representShortcut("undo"), click: n.context.createInvokeHandler("editor.undo") }).render() }); this.context.memo("button.help", function () { return n.button({ contents: n.ui.icon(n.options.icons.question), tooltip: n.lang.options.help, click: n.context.createInvokeHandler("helpDialog.show") }).render() }) } }, { key: "addImagePopoverButtons", value: function () { var n = this; this.context.memo("button.resizeFull", function () { return n.button({ contents: '<span class="note-fontsize-10">100%<\/span>', tooltip: n.lang.image.resizeFull, click: n.context.createInvokeHandler("editor.resize", "1") }).render() }); this.context.memo("button.resizeHalf", function () { return n.button({ contents: '<span class="note-fontsize-10">50%<\/span>', tooltip: n.lang.image.resizeHalf, click: n.context.createInvokeHandler("editor.resize", "0.5") }).render() }); this.context.memo("button.resizeQuarter", function () { return n.button({ contents: '<span class="note-fontsize-10">25%<\/span>', tooltip: n.lang.image.resizeQuarter, click: n.context.createInvokeHandler("editor.resize", "0.25") }).render() }); this.context.memo("button.resizeNone", function () { return n.button({ contents: n.ui.icon(n.options.icons.rollback), tooltip: n.lang.image.resizeNone, click: n.context.createInvokeHandler("editor.resize", "0") }).render() }); this.context.memo("button.floatLeft", function () { return n.button({ contents: n.ui.icon(n.options.icons.floatLeft), tooltip: n.lang.image.floatLeft, click: n.context.createInvokeHandler("editor.floatMe", "left") }).render() }); this.context.memo("button.floatRight", function () { return n.button({ contents: n.ui.icon(n.options.icons.floatRight), tooltip: n.lang.image.floatRight, click: n.context.createInvokeHandler("editor.floatMe", "right") }).render() }); this.context.memo("button.floatNone", function () { return n.button({ contents: n.ui.icon(n.options.icons.rollback), tooltip: n.lang.image.floatNone, click: n.context.createInvokeHandler("editor.floatMe", "none") }).render() }); this.context.memo("button.removeMedia", function () { return n.button({ contents: n.ui.icon(n.options.icons.trash), tooltip: n.lang.image.remove, click: n.context.createInvokeHandler("editor.removeMedia") }).render() }) } }, { key: "addLinkPopoverButtons", value: function () { var n = this; this.context.memo("button.linkDialogShow", function () { return n.button({ contents: n.ui.icon(n.options.icons.link), tooltip: n.lang.link.edit, click: n.context.createInvokeHandler("linkDialog.show") }).render() }); this.context.memo("button.unlink", function () { return n.button({ contents: n.ui.icon(n.options.icons.unlink), tooltip: n.lang.link.unlink, click: n.context.createInvokeHandler("editor.unlink") }).render() }) } }, { key: "addTablePopoverButtons", value: function () { var n = this; this.context.memo("button.addRowUp", function () { return n.button({ className: "btn-md", contents: n.ui.icon(n.options.icons.rowAbove), tooltip: n.lang.table.addRowAbove, click: n.context.createInvokeHandler("editor.addRow", "top") }).render() }); this.context.memo("button.addRowDown", function () { return n.button({ className: "btn-md", contents: n.ui.icon(n.options.icons.rowBelow), tooltip: n.lang.table.addRowBelow, click: n.context.createInvokeHandler("editor.addRow", "bottom") }).render() }); this.context.memo("button.addColLeft", function () { return n.button({ className: "btn-md", contents: n.ui.icon(n.options.icons.colBefore), tooltip: n.lang.table.addColLeft, click: n.context.createInvokeHandler("editor.addCol", "left") }).render() }); this.context.memo("button.addColRight", function () { return n.button({ className: "btn-md", contents: n.ui.icon(n.options.icons.colAfter), tooltip: n.lang.table.addColRight, click: n.context.createInvokeHandler("editor.addCol", "right") }).render() }); this.context.memo("button.deleteRow", function () { return n.button({ className: "btn-md", contents: n.ui.icon(n.options.icons.rowRemove), tooltip: n.lang.table.delRow, click: n.context.createInvokeHandler("editor.deleteRow") }).render() }); this.context.memo("button.deleteCol", function () { return n.button({ className: "btn-md", contents: n.ui.icon(n.options.icons.colRemove), tooltip: n.lang.table.delCol, click: n.context.createInvokeHandler("editor.deleteCol") }).render() }); this.context.memo("button.deleteTable", function () { return n.button({ className: "btn-md", contents: n.ui.icon(n.options.icons.trash), tooltip: n.lang.table.delTable, click: n.context.createInvokeHandler("editor.deleteTable") }).render() }) } }, { key: "build", value: function (n, t) { for (var r, u = 0, e = t.length; u < e; u++) { for (var i = t[u], h = Array.isArray(i) ? i[0] : i, o = Array.isArray(i) ? 1 === i.length ? [i[0]] : i[1] : [i], s = this.ui.buttonGroup({ className: "note-" + h }).render(), f = 0, c = o.length; f < c; f++)r = this.context.memo("button." + o[f]), r && s.append("function" == typeof r ? r(this.context) : r); s.appendTo(n) } } }, { key: "updateCurrentStyle", value: function (n) { var c = this, i = n || this.$toolbar, t = this.context.invoke("editor.currentStyle"), s, r, e, o, h; (this.updateBtnStates(i, { ".note-btn-bold": function () { return "bold" === t["font-bold"] }, ".note-btn-italic": function () { return "italic" === t["font-italic"] }, ".note-btn-underline": function () { return "underline" === t["font-underline"] }, ".note-btn-subscript": function () { return "subscript" === t["font-subscript"] }, ".note-btn-superscript": function () { return "superscript" === t["font-superscript"] }, ".note-btn-strikethrough": function () { return "strikethrough" === t["font-strikethrough"] } }), t["font-family"]) && (s = t["font-family"].split(",").map(function (n) { return n.replace(/[\'\"]/g, "").replace(/\s+$/, "").replace(/^\s+/, "") }), r = f.find(s, this.isFontInstalled.bind(this)), i.find(".dropdown-fontname a").each(function (n, t) { var i = u()(t), f = i.data("value") + "" == r + ""; i.toggleClass("checked", f) }), i.find(".note-current-fontname").text(r).css("font-family", r)); t["font-size"] && (e = t["font-size"], i.find(".dropdown-fontsize a").each(function (n, t) { var i = u()(t), r = i.data("value") + "" == e + ""; i.toggleClass("checked", r) }), i.find(".note-current-fontsize").text(e), o = t["font-size-unit"], i.find(".dropdown-fontsizeunit a").each(function (n, t) { var i = u()(t), r = i.data("value") + "" == o + ""; i.toggleClass("checked", r) }), i.find(".note-current-fontsizeunit").text(o)); t["line-height"] && (h = t["line-height"], i.find(".dropdown-line-height li a").each(function (n, t) { var i = u()(t).data("value") + "" == h + ""; c.className = i ? "checked" : "" })) } }, { key: "updateBtnStates", value: function (n, t) { var i = this; u.a.each(t, function (t, r) { i.ui.toggleBtnActive(n.find(t), r()) }) } }, { key: "tableMoveHandler", value: function (n) { var r, f = u()(n.target.parentNode), s = f.next(), h = f.find(".note-dimension-picker-mousecatcher"), c = f.find(".note-dimension-picker-highlighted"), o = f.find(".note-dimension-picker-unhighlighted"), e, t, i; void 0 === n.offsetX ? (e = u()(n.target).offset(), r = { x: n.pageX - e.left, y: n.pageY - e.top }) : r = { x: n.offsetX, y: n.offsetY }; t = Math.ceil(r.x / 18) || 1; i = Math.ceil(r.y / 18) || 1; c.css({ width: t + "em", height: i + "em" }); h.data("value", t + "x" + i); t > 3 && t < this.options.insertTableMaxSize.col && o.css({ width: t + 1 + "em" }); i > 3 && i < this.options.insertTableMaxSize.row && o.css({ height: i + 1 + "em" }); s.html(t + " x " + i) } }]) && uf(t.prototype, i), r && uf(t, r), n }(); sf = function () { function n(t) { !function (n, t) { if (!(n instanceof t)) throw new TypeError("Cannot call a class as a function"); }(this, n); this.context = t; this.$window = u()(window); this.$document = u()(document); this.ui = u.a.summernote.ui; this.$note = t.layoutInfo.note; this.$editor = t.layoutInfo.editor; this.$toolbar = t.layoutInfo.toolbar; this.$editable = t.layoutInfo.editable; this.$statusbar = t.layoutInfo.statusbar; this.options = t.options; this.isFollowing = !1; this.followScroll = this.followScroll.bind(this) } var t, i, r; return t = n, (i = [{ key: "shouldInitialize", value: function () { return !this.options.airMode } }, { key: "initialize", value: function () { var n = this; this.options.toolbar = this.options.toolbar || []; this.options.toolbar.length ? this.context.invoke("buttons.build", this.$toolbar, this.options.toolbar) : this.$toolbar.hide(); this.options.toolbarContainer && this.$toolbar.appendTo(this.options.toolbarContainer); this.changeContainer(!1); this.$note.on("summernote.keyup summernote.mouseup summernote.change", function () { n.context.invoke("buttons.updateCurrentStyle") }); this.context.invoke("buttons.updateCurrentStyle"); this.options.followingToolbar && this.$window.on("scroll resize", this.followScroll) } }, { key: "destroy", value: function () { this.$toolbar.children().remove(); this.options.followingToolbar && this.$window.off("scroll resize", this.followScroll) } }, { key: "followScroll", value: function () { if (this.$editor.hasClass("fullscreen")) return !1; var o = this.$editor.outerHeight(), s = this.$editor.width(), i = this.$toolbar.height(), h = this.$statusbar.height(), n = 0; this.options.otherStaticBar && (n = u()(this.options.otherStaticBar).outerHeight()); var t = this.$document.scrollTop(), r = this.$editor.offset().top, f = r - n, e = r + o - n - i - h; !this.isFollowing && t > f && t < e - i ? (this.isFollowing = !0, this.$editable.css({ marginTop: this.$toolbar.outerHeight() }), this.$toolbar.css({ position: "fixed", top: n, width: s, zIndex: 1e3 })) : this.isFollowing && (t < f || t > e) && (this.isFollowing = !1, this.$toolbar.css({ position: "relative", top: 0, width: "100%", zIndex: "auto" }), this.$editable.css({ marginTop: "" })) } }, { key: "changeContainer", value: function (n) { n ? this.$toolbar.prependTo(this.$editor) : this.options.toolbarContainer && this.$toolbar.appendTo(this.options.toolbarContainer); this.options.followingToolbar && this.followScroll() } }, { key: "updateFullscreen", value: function (n) { this.ui.toggleBtnActive(this.$toolbar.find(".btn-fullscreen"), n); this.changeContainer(n) } }, { key: "updateCodeview", value: function (n) { this.ui.toggleBtnActive(this.$toolbar.find(".btn-codeview"), n); n ? this.deactivate() : this.activate() } }, { key: "activate", value: function (n) { var t = this.$toolbar.find("button"); n || (t = t.not(".note-codeview-keep")); this.ui.toggleBtn(t, !0) } }, { key: "deactivate", value: function (n) { var t = this.$toolbar.find("button"); n || (t = t.not(".note-codeview-keep")); this.ui.toggleBtn(t, !1) } }]) && ef(t.prototype, i), r && ef(t, r), n }(); cf = function () { function n(t) { !function (n, t) { if (!(n instanceof t)) throw new TypeError("Cannot call a class as a function"); }(this, n); this.context = t; this.ui = u.a.summernote.ui; this.$body = u()(document.body); this.$editor = t.layoutInfo.editor; this.options = t.options; this.lang = this.options.langInfo; t.memo("help.linkDialog.show", this.options.langInfo.help["linkDialog.show"]) } var t, i, r; return t = n, (i = [{ key: "initialize", value: function () { var n = this.options.dialogsInBody ? this.$body : this.options.container, t = ['<div class="form-group note-form-group">', '<label for="note-dialog-link-txt-'.concat(this.options.id, '" class="note-form-label">').concat(this.lang.link.textToDisplay, "<\/label>"), '<input id="note-dialog-link-txt-'.concat(this.options.id, '" class="note-link-text form-control note-form-control note-input" type="text"/>'), "<\/div>", '<div class="form-group note-form-group">', '<label for="note-dialog-link-url-'.concat(this.options.id, '" class="note-form-label">').concat(this.lang.link.url, "<\/label>"), '<input id="note-dialog-link-url-'.concat(this.options.id, '" class="note-link-url form-control note-form-control note-input" type="text" value="http://"/>'), "<\/div>", this.options.disableLinkTarget ? "" : u()("<div/>").append(this.ui.checkbox({ className: "sn-checkbox-open-in-new-window", text: this.lang.link.openInNewWindow, checked: !0 }).render()).html(), u()("<div/>").append(this.ui.checkbox({ className: "sn-checkbox-use-protocol", text: this.lang.link.useProtocol, checked: !0 }).render()).html()].join(""), i = '<input type="button" href="#" class="'.concat("btn btn-primary note-btn note-btn-primary note-link-btn", '" value="').concat(this.lang.link.insert, '" disabled>'); this.$dialog = this.ui.dialog({ className: "link-dialog", title: this.lang.link.insert, fade: this.options.dialogsFade, body: t, footer: i }).render().appendTo(n) } }, { key: "destroy", value: function () { this.ui.hideDialog(this.$dialog); this.$dialog.remove() } }, { key: "bindEnterKey", value: function (n, t) { n.on("keypress", function (n) { n.keyCode === s.code.ENTER && (n.preventDefault(), t.trigger("click")) }) } }, { key: "toggleLinkBtn", value: function (n, t, i) { this.ui.toggleBtn(n, t.val() && i.val()) } }, { key: "showLinkDialog", value: function (n) { var t = this; return u.a.Deferred(function (i) { var r = t.$dialog.find(".note-link-text"), u = t.$dialog.find(".note-link-url"), f = t.$dialog.find(".note-link-btn"), o = t.$dialog.find(".sn-checkbox-open-in-new-window input[type=checkbox]"), s = t.$dialog.find(".sn-checkbox-use-protocol input[type=checkbox]"); t.ui.onDialogShown(t.$dialog, function () { var h, l; t.context.triggerEvent("dialog.shown"); !n.url && e.isValidUrl(n.text) && (n.url = n.text); r.on("input paste propertychange", function () { n.text = r.val(); t.toggleLinkBtn(f, r, u) }).val(n.text); u.on("input paste propertychange", function () { n.text || r.val(u.val()); t.toggleLinkBtn(f, r, u) }).val(n.url); c.isSupportTouch || u.trigger("focus"); t.toggleLinkBtn(f, r, u); t.bindEnterKey(u, f); t.bindEnterKey(r, f); h = void 0 !== n.isNewWindow ? n.isNewWindow : t.context.options.linkTargetBlank; o.prop("checked", h); l = !n.url && t.context.options.useProtocol; s.prop("checked", l); f.one("click", function (f) { f.preventDefault(); i.resolve({ range: n.range, url: u.val(), text: r.val(), isNewWindow: o.is(":checked"), checkProtocol: s.is(":checked") }); t.ui.hideDialog(t.$dialog) }) }); t.ui.onDialogHidden(t.$dialog, function () { r.off(); u.off(); f.off(); "pending" === i.state() && i.reject() }); t.ui.showDialog(t.$dialog) }).promise() } }, { key: "show", value: function () { var n = this, t = this.context.invoke("editor.getLinkInfo"); this.context.invoke("editor.saveRange"); this.showLinkDialog(t).then(function (t) { n.context.invoke("editor.restoreRange"); n.context.invoke("editor.createLink", t) }).fail(function () { n.context.invoke("editor.restoreRange") }) } }]) && hf(t.prototype, i), r && hf(t, r), n }(); af = function () { function n(t) { var i = this; !function (n, t) { if (!(n instanceof t)) throw new TypeError("Cannot call a class as a function"); }(this, n); this.context = t; this.ui = u.a.summernote.ui; this.options = t.options; this.events = { "summernote.keyup summernote.mouseup summernote.change summernote.scroll": function () { i.update() }, "summernote.disable summernote.dialog.shown summernote.blur": function () { i.hide() } } } var t, i, e; return t = n, (i = [{ key: "shouldInitialize", value: function () { return !f.isEmpty(this.options.popover.link) } }, { key: "initialize", value: function () { this.$popover = this.ui.popover({ className: "note-link-popover", callback: function (n) { n.find(".popover-content,.note-popover-content").prepend('<span><a target="_blank"><\/a>&nbsp;<\/span>') } }).render().appendTo(this.options.container); var n = this.$popover.find(".popover-content,.note-popover-content"); this.context.invoke("buttons.build", n, this.options.popover.link); this.$popover.on("mousedown", function (n) { n.preventDefault() }) } }, { key: "destroy", value: function () { this.$popover.remove() } }, { key: "update", value: function () { var t, i, f, n, e; this.context.invoke("editor.hasFocus") ? (t = this.context.invoke("editor.getLastRange"), t.isCollapsed() && t.isOnAnchor() ? (i = r.ancestor(t.sc, r.isAnchor), f = u()(i).attr("href"), this.$popover.find("a").attr("href", f).text(f), n = r.posFromPlaceholder(i), e = u()(this.options.container).offset(), n.top -= e.top, n.left -= e.left, this.$popover.css({ display: "block", left: n.left, top: n.top })) : this.hide()) : this.hide() } }, { key: "hide", value: function () { this.$popover.hide() } }]) && lf(t.prototype, i), e && lf(t, e), n }(); yf = function () { function n(t) { !function (n, t) { if (!(n instanceof t)) throw new TypeError("Cannot call a class as a function"); }(this, n); this.context = t; this.ui = u.a.summernote.ui; this.$body = u()(document.body); this.$editor = t.layoutInfo.editor; this.options = t.options; this.lang = this.options.langInfo } var t, i, r; return t = n, (i = [{ key: "initialize", value: function () { var t = "", n, i; this.options.maximumImageFileSize && (n = Math.floor(Math.log(this.options.maximumImageFileSize) / Math.log(1024)), i = 1 * (this.options.maximumImageFileSize / Math.pow(1024, n)).toFixed(2) + " " + " KMGTP"[n] + "B", t = "<small>".concat(this.lang.image.maximumFileSize + " : " + i, "<\/small>")); var r = this.options.dialogsInBody ? this.$body : this.options.container, u = ['<div class="form-group note-form-group note-group-select-from-files">', '<label for="note-dialog-image-file-' + this.options.id + '" class="note-form-label">' + this.lang.image.selectFromFiles + "<\/label>", '<input id="note-dialog-image-file-' + this.options.id + '" class="note-image-input form-control-file note-form-control note-input" ', ' type="file" name="files" accept="image/*" multiple="multiple"/>', t, "<\/div>", '<div class="form-group note-group-image-url">', '<label for="note-dialog-image-url-' + this.options.id + '" class="note-form-label">' + this.lang.image.url + "<\/label>", '<input id="note-dialog-image-url-' + this.options.id + '" class="note-image-url form-control note-form-control note-input" type="text"/>', "<\/div>"].join(""), f = '<input type="button" href="#" class="'.concat("btn btn-primary note-btn note-btn-primary note-image-btn", '" value="').concat(this.lang.image.insert, '" disabled>'); this.$dialog = this.ui.dialog({ title: this.lang.image.insert, fade: this.options.dialogsFade, body: u, footer: f }).render().appendTo(r) } }, { key: "destroy", value: function () { this.ui.hideDialog(this.$dialog); this.$dialog.remove() } }, { key: "bindEnterKey", value: function (n, t) { n.on("keypress", function (n) { n.keyCode === s.code.ENTER && (n.preventDefault(), t.trigger("click")) }) } }, { key: "show", value: function () { var n = this; this.context.invoke("editor.saveRange"); this.showImageDialog().then(function (t) { n.ui.hideDialog(n.$dialog); n.context.invoke("editor.restoreRange"); "string" == typeof t ? n.options.callbacks.onImageLinkInsert ? n.context.triggerEvent("image.link.insert", t) : n.context.invoke("editor.insertImage", t) : n.context.invoke("editor.insertImagesOrCallback", t) }).fail(function () { n.context.invoke("editor.restoreRange") }) } }, { key: "showImageDialog", value: function () { var n = this; return u.a.Deferred(function (t) { var u = n.$dialog.find(".note-image-input"), i = n.$dialog.find(".note-image-url"), r = n.$dialog.find(".note-image-btn"); n.ui.onDialogShown(n.$dialog, function () { n.context.triggerEvent("dialog.shown"); u.replaceWith(u.clone().on("change", function (n) { t.resolve(n.target.files || n.target.value) }).val("")); i.on("input paste propertychange", function () { n.ui.toggleBtn(r, i.val()) }).val(""); c.isSupportTouch || i.trigger("focus"); r.click(function (n) { n.preventDefault(); t.resolve(i.val()) }); n.bindEnterKey(i, r) }); n.ui.onDialogHidden(n.$dialog, function () { u.off(); i.off(); r.off(); "pending" === t.state() && t.reject() }); n.ui.showDialog(n.$dialog) }) } }]) && vf(t.prototype, i), r && vf(t, r), n }(); wf = function () { function n(t) { var i = this; !function (n, t) { if (!(n instanceof t)) throw new TypeError("Cannot call a class as a function"); }(this, n); this.context = t; this.ui = u.a.summernote.ui; this.editable = t.layoutInfo.editable[0]; this.options = t.options; this.events = { "summernote.disable summernote.blur": function () { i.hide() } } } var t, i, e; return t = n, (i = [{ key: "shouldInitialize", value: function () { return !f.isEmpty(this.options.popover.image) } }, { key: "initialize", value: function () { this.$popover = this.ui.popover({ className: "note-image-popover" }).render().appendTo(this.options.container); var n = this.$popover.find(".popover-content,.note-popover-content"); this.context.invoke("buttons.build", n, this.options.popover.image); this.$popover.on("mousedown", function (n) { n.preventDefault() }) } }, { key: "destroy", value: function () { this.$popover.remove() } }, { key: "update", value: function (n, t) { if (r.isImg(n)) { var e = u()(n).offset(), f = u()(this.options.container).offset(), i = {}; this.options.popatmouse ? (i.left = t.pageX - 20, i.top = t.pageY) : i = e; i.top -= f.top; i.left -= f.left; this.$popover.css({ display: "block", left: i.left, top: i.top }) } else this.hide() } }, { key: "hide", value: function () { this.$popover.hide() } }]) && pf(t.prototype, i), e && pf(t, e), n }(); kf = function () { function n(t) { var i = this; !function (n, t) { if (!(n instanceof t)) throw new TypeError("Cannot call a class as a function"); }(this, n); this.context = t; this.ui = u.a.summernote.ui; this.options = t.options; this.events = { "summernote.mousedown": function (n, t) { i.update(t.target) }, "summernote.keyup summernote.scroll summernote.change": function () { i.update() }, "summernote.disable summernote.blur": function () { i.hide() } } } var t, i, e; return t = n, (i = [{ key: "shouldInitialize", value: function () { return !f.isEmpty(this.options.popover.table) } }, { key: "initialize", value: function () { this.$popover = this.ui.popover({ className: "note-table-popover" }).render().appendTo(this.options.container); var n = this.$popover.find(".popover-content,.note-popover-content"); this.context.invoke("buttons.build", n, this.options.popover.table); c.isFF && document.execCommand("enableInlineTableEditing", !1, !1); this.$popover.on("mousedown", function (n) { n.preventDefault() }) } }, { key: "destroy", value: function () { this.$popover.remove() } }, { key: "update", value: function (n) { var i, t, f; return this.context.isDisabled() ? !1 : (i = r.isCell(n), i ? (t = r.posFromPlaceholder(n), f = u()(this.options.container).offset(), t.top -= f.top, t.left -= f.left, this.$popover.css({ display: "block", left: t.left, top: t.top })) : this.hide(), i) } }, { key: "hide", value: function () { this.$popover.hide() } }]) && bf(t.prototype, i), e && bf(t, e), n }(); gf = function () { function n(t) { !function (n, t) { if (!(n instanceof t)) throw new TypeError("Cannot call a class as a function"); }(this, n); this.context = t; this.ui = u.a.summernote.ui; this.$body = u()(document.body); this.$editor = t.layoutInfo.editor; this.options = t.options; this.lang = this.options.langInfo } var t, i, r; return t = n, (i = [{ key: "initialize", value: function () { var n = this.options.dialogsInBody ? this.$body : this.options.container, t = ['<div class="form-group note-form-group row-fluid">', '<label for="note-dialog-video-url-'.concat(this.options.id, '" class="note-form-label">').concat(this.lang.video.url, ' <small class="text-muted">').concat(this.lang.video.providers, "<\/small><\/label>"), '<input id="note-dialog-video-url-'.concat(this.options.id, '" class="note-video-url form-control note-form-control note-input" type="text"/>'), "<\/div>"].join(""), i = '<input type="button" href="#" class="'.concat("btn btn-primary note-btn note-btn-primary note-video-btn", '" value="').concat(this.lang.video.insert, '" disabled>'); this.$dialog = this.ui.dialog({ title: this.lang.video.insert, fade: this.options.dialogsFade, body: t, footer: i }).render().appendTo(n) } }, { key: "destroy", value: function () { this.ui.hideDialog(this.$dialog); this.$dialog.remove() } }, { key: "bindEnterKey", value: function (n, t) { n.on("keypress", function (n) { n.keyCode === s.code.ENTER && (n.preventDefault(), t.trigger("click")) }) } }, { key: "createVideoNode", value: function (n) { var t, i = n.match(/\/\/(?:(?:www|m)\.)?(?:youtu\.be\/|youtube\.com\/(?:embed\/|v\/|watch\?v=|watch\?.+&v=))([\w|-]{11})(?:(?:[\?&]t=)(\S+))?$/), s = n.match(/(?:www\.|\/\/)instagram\.com\/p\/(.[a-zA-Z0-9_-]*)/), h = n.match(/\/\/vine\.co\/v\/([a-zA-Z0-9]+)/), c = n.match(/\/\/(player\.)?vimeo\.com\/([a-z]*\/)*(\d+)[?]?.*/), l = n.match(/.+dailymotion.com\/(video|hub)\/([^_]+)[^#]*(#video=([^_&]+))?/), a = n.match(/\/\/v\.youku\.com\/v_show\/id_(\w+)=*\.html/), r = n.match(/\/\/v\.qq\.com.*?vid=(.+)/), v = n.match(/\/\/v\.qq\.com\/x?\/?(page|cover).*?\/([^\/]+)\.html\??.*/), k = n.match(/^.+.(mp4|m4v)$/), d = n.match(/^.+.(ogg|ogv)$/), g = n.match(/^.+.(webm)$/), y = n.match(/(?:www\.|\/\/)facebook\.com\/([^\/]+)\/videos\/([0-9]+)/), p, e, o, b; if (i && 11 === i[1].length) { if (p = i[1], e = 0, void 0 !== i[2] && (o = i[2].match(/^(?:(\d+)h)?(?:(\d+)m)?(?:(\d+)s)?$/), o)) for (var w = [3600, 60, 1], f = 0, nt = w.length; f < nt; f++)e += void 0 !== o[f + 1] ? w[f] * parseInt(o[f + 1], 10) : 0; t = u()("<iframe>").attr("frameborder", 0).attr("src", "//www.youtube.com/embed/" + p + (e > 0 ? "?start=" + e : "")).attr("width", "640").attr("height", "360") } else if (s && s[0].length) t = u()("<iframe>").attr("frameborder", 0).attr("src", "https://instagram.com/p/" + s[1] + "/embed/").attr("width", "612").attr("height", "710").attr("scrolling", "no").attr("allowtransparency", "true"); else if (h && h[0].length) t = u()("<iframe>").attr("frameborder", 0).attr("src", h[0] + "/embed/simple").attr("width", "600").attr("height", "600").attr("class", "vine-embed"); else if (c && c[3].length) t = u()("<iframe webkitallowfullscreen mozallowfullscreen allowfullscreen>").attr("frameborder", 0).attr("src", "//player.vimeo.com/video/" + c[3]).attr("width", "640").attr("height", "360"); else if (l && l[2].length) t = u()("<iframe>").attr("frameborder", 0).attr("src", "//www.dailymotion.com/embed/video/" + l[2]).attr("width", "640").attr("height", "360"); else if (a && a[1].length) t = u()("<iframe webkitallowfullscreen mozallowfullscreen allowfullscreen>").attr("frameborder", 0).attr("height", "498").attr("width", "510").attr("src", "//player.youku.com/embed/" + a[1]); else if (r && r[1].length || v && v[2].length) b = r && r[1].length ? r[1] : v[2], t = u()("<iframe webkitallowfullscreen mozallowfullscreen allowfullscreen>").attr("frameborder", 0).attr("height", "310").attr("width", "500").attr("src", "https://v.qq.com/txp/iframe/player.html?vid=" + b + "&amp;auto=0"); else if (k || d || g) t = u()("<video controls>").attr("src", n).attr("width", "640").attr("height", "360"); else { if (!y || !y[0].length) return !1; t = u()("<iframe>").attr("frameborder", 0).attr("src", "https://www.facebook.com/plugins/video.php?href=" + encodeURIComponent(y[0]) + "&show_text=0&width=560").attr("width", "560").attr("height", "301").attr("scrolling", "no").attr("allowtransparency", "true") } return t.addClass("note-video-clip"), t[0] } }, { key: "show", value: function () { var n = this, t = this.context.invoke("editor.getSelectedText"); this.context.invoke("editor.saveRange"); this.showVideoDialog(t).then(function (t) { n.ui.hideDialog(n.$dialog); n.context.invoke("editor.restoreRange"); var i = n.createVideoNode(t); i && n.context.invoke("editor.insertNode", i) }).fail(function () { n.context.invoke("editor.restoreRange") }) } }, { key: "showVideoDialog", value: function () { var n = this; return u.a.Deferred(function (t) { var i = n.$dialog.find(".note-video-url"), r = n.$dialog.find(".note-video-btn"); n.ui.onDialogShown(n.$dialog, function () { n.context.triggerEvent("dialog.shown"); i.on("input paste propertychange", function () { n.ui.toggleBtn(r, i.val()) }); c.isSupportTouch || i.trigger("focus"); r.click(function (n) { n.preventDefault(); t.resolve(i.val()) }); n.bindEnterKey(i, r) }); n.ui.onDialogHidden(n.$dialog, function () { i.off(); r.off(); "pending" === t.state() && t.reject() }); n.ui.showDialog(n.$dialog) }) } }]) && df(t.prototype, i), r && df(t, r), n }(); te = function () { function n(t) { !function (n, t) { if (!(n instanceof t)) throw new TypeError("Cannot call a class as a function"); }(this, n); this.context = t; this.ui = u.a.summernote.ui; this.$body = u()(document.body); this.$editor = t.layoutInfo.editor; this.options = t.options; this.lang = this.options.langInfo } var t, i, r; return t = n, (i = [{ key: "initialize", value: function () { var n = this.options.dialogsInBody ? this.$body : this.options.container, t = '<p class="text-center"><a href="http://summernote.org/" target="_blank">Summernote 0.8.18<\/a> · <a href="https://github.com/summernote/summernote" target="_blank">Project<\/a> · <a href="https://github.com/summernote/summernote/issues" target="_blank">Issues<\/a><\/p>'; this.$dialog = this.ui.dialog({ title: this.lang.options.help, fade: this.options.dialogsFade, body: this.createShortcutList(), footer: t, callback: function (n) { n.find(".modal-body,.note-modal-body").css({ "max-height": 300, overflow: "scroll" }) } }).render().appendTo(n) } }, { key: "destroy", value: function () { this.ui.hideDialog(this.$dialog); this.$dialog.remove() } }, { key: "createShortcutList", value: function () { var t = this, n = this.options.keyMap[c.isMac ? "mac" : "pc"]; return Object.keys(n).map(function (i) { var r = n[i], f = u()('<div><div class="help-list-item"><\/div><\/div>'); return f.append(u()("<label><kbd>" + i + "<\/kdb><\/label>").css({ width: 180, "margin-right": 10 })).append(u()("<span/>").html(t.context.memo("help." + r) || r)), f.html() }).join("") } }, { key: "showHelpDialog", value: function () { var n = this; return u.a.Deferred(function (t) { n.ui.onDialogShown(n.$dialog, function () { n.context.triggerEvent("dialog.shown"); t.resolve() }); n.ui.showDialog(n.$dialog) }).promise() } }, { key: "show", value: function () { var n = this; this.context.invoke("editor.saveRange"); this.showHelpDialog().then(function () { n.context.invoke("editor.restoreRange") }) } }]) && ne(t.prototype, i), r && ne(t, r), n }(); re = function () { function n(t) { var i = this; !function (n, t) { if (!(n instanceof t)) throw new TypeError("Cannot call a class as a function"); }(this, n); this.context = t; this.ui = u.a.summernote.ui; this.options = t.options; this.hidable = !0; this.onContextmenu = !1; this.pageX = null; this.pageY = null; this.events = { "summernote.contextmenu": function (n) { i.options.editing && (n.preventDefault(), n.stopPropagation(), i.onContextmenu = !0, i.update(!0)) }, "summernote.mousedown": function (n, t) { i.pageX = t.pageX; i.pageY = t.pageY }, "summernote.keyup summernote.mouseup summernote.scroll": function (n, t) { i.options.editing && !i.onContextmenu && (i.pageX = t.pageX, i.pageY = t.pageY, i.update()); i.onContextmenu = !1 }, "summernote.disable summernote.change summernote.dialog.shown summernote.blur": function () { i.hide() }, "summernote.focusout": function () { i.$popover.is(":active,:focus") || i.hide() } } } var t, i, r; return t = n, (i = [{ key: "shouldInitialize", value: function () { return this.options.airMode && !f.isEmpty(this.options.popover.air) } }, { key: "initialize", value: function () { var n = this, t; this.$popover = this.ui.popover({ className: "note-air-popover" }).render().appendTo(this.options.container); t = this.$popover.find(".popover-content"); this.context.invoke("buttons.build", t, this.options.popover.air); this.$popover.on("mousedown", function () { n.hidable = !1 }); this.$popover.on("mouseup", function () { n.hidable = !0 }) } }, { key: "destroy", value: function () { this.$popover.remove() } }, { key: "update", value: function (n) { var r = this.context.invoke("editor.currentStyle"), t, i; r.range && (!r.range.isCollapsed() || n) ? (t = { left: this.pageX, top: this.pageY }, i = u()(this.options.container).offset(), t.top -= i.top, t.left -= i.left, this.$popover.css({ display: "block", left: Math.max(t.left, 0) + -5, top: t.top + 5 }), this.context.invoke("buttons.updateCurrentStyle", this.$popover)) : this.hide() } }, { key: "updateCodeview", value: function (n) { this.ui.toggleBtnActive(this.$popover.find(".btn-codeview"), n); n && this.hide() } }, { key: "hide", value: function () { this.hidable && this.$popover.hide() } }]) && ie(t.prototype, i), r && ie(t, r), n }(); fe = function () { function n(t) { var i = this; !function (n, t) { if (!(n instanceof t)) throw new TypeError("Cannot call a class as a function"); }(this, n); this.context = t; this.ui = u.a.summernote.ui; this.$editable = t.layoutInfo.editable; this.options = t.options; this.hint = this.options.hint || []; this.direction = this.options.hintDirection || "bottom"; this.hints = Array.isArray(this.hint) ? this.hint : [this.hint]; this.events = { "summernote.keyup": function (n, t) { t.isDefaultPrevented() || i.handleKeyup(t) }, "summernote.keydown": function (n, t) { i.handleKeydown(t) }, "summernote.disable summernote.dialog.shown summernote.blur": function () { i.hide() } } } var t, i, h; return t = n, (i = [{ key: "shouldInitialize", value: function () { return this.hints.length > 0 } }, { key: "initialize", value: function () { var n = this; this.lastWordRange = null; this.matchingWord = null; this.$popover = this.ui.popover({ className: "note-hint-popover", hideArrow: !0, direction: "" }).render().appendTo(this.options.container); this.$popover.hide(); this.$content = this.$popover.find(".popover-content,.note-popover-content"); this.$content.on("click", ".note-hint-item", function (t) { n.$content.find(".active").removeClass("active"); u()(t.currentTarget).addClass("active"); n.replace() }); this.$popover.on("mousedown", function (n) { n.preventDefault() }) } }, { key: "destroy", value: function () { this.$popover.remove() } }, { key: "selectItem", value: function (n) { this.$content.find(".active").removeClass("active"); n.addClass("active"); this.$content[0].scrollTop = n[0].offsetTop - this.$content.innerHeight() / 2 } }, { key: "moveDown", value: function () { var t = this.$content.find(".note-hint-item.active"), i = t.next(), n; i.length ? this.selectItem(i) : (n = t.parent().next(), n.length || (n = this.$content.find(".note-hint-group").first()), this.selectItem(n.find(".note-hint-item").first())) } }, { key: "moveUp", value: function () { var t = this.$content.find(".note-hint-item.active"), i = t.prev(), n; i.length ? this.selectItem(i) : (n = t.parent().prev(), n.length || (n = this.$content.find(".note-hint-group").last()), this.selectItem(n.find(".note-hint-item").last())) } }, { key: "replace", value: function () { var r = this.$content.find(".note-hint-item.active"), n, t, i; r.length && (n = this.nodeFromItem(r), null !== this.matchingWord && 0 === this.matchingWord.length ? this.lastWordRange.so = this.lastWordRange.eo : null !== this.matchingWord && this.matchingWord.length > 0 && !this.lastWordRange.isCollapsed() && (t = this.lastWordRange.eo - this.lastWordRange.so - this.matchingWord.length, t > 0 && (this.lastWordRange.so += t)), (this.lastWordRange.insertNode(n), "next" === this.options.hintSelect) ? (i = document.createTextNode(""), u()(n).after(i), o.createFromNodeBefore(i).select()) : o.createFromNodeAfter(n).select(), this.lastWordRange = null, this.hide(), this.context.invoke("editor.focus")) } }, { key: "nodeFromItem", value: function (n) { var i = this.hints[n.data("index")], u = n.data("item"), t = i.content ? i.content(u) : u; return "string" == typeof t && (t = r.createText(t)), t } }, { key: "createItemTemplates", value: function (n, t) { var i = this.hints[n]; return t.map(function (t) { var r = u()('<div class="note-hint-item"/>'); return r.append(i.template ? i.template(t) : t + ""), r.data({ index: n, item: t }), r }) } }, { key: "handleKeydown", value: function (n) { this.$popover.is(":visible") && (n.keyCode === s.code.ENTER ? (n.preventDefault(), this.replace()) : n.keyCode === s.code.UP ? (n.preventDefault(), this.moveUp()) : n.keyCode === s.code.DOWN && (n.preventDefault(), this.moveDown())) } }, { key: "searchKeyword", value: function (n, t, i) { var r = this.hints[n], u; r && r.match.test(t) && r.search ? (u = r.match.exec(t), this.matchingWord = u[0], r.search(u[1], i)) : i() } }, { key: "createGroup", value: function (n, t) { var i = this, r = u()('<div class="note-hint-group note-hint-group-' + n + '"><\/div>'); return this.searchKeyword(n, t, function (t) { (t = t || []).length && (r.html(i.createItemTemplates(n, t)), i.show()) }), r } }, { key: "handleKeyup", value: function (n) { var c = this, t, r, o, i, h; if (!f.contains([s.code.ENTER, s.code.UP, s.code.DOWN], n.keyCode)) { if (o = this.context.invoke("editor.getLastRange"), "words" === this.options.hintMode) { if (t = o.getWordsRange(o), r = t.toString(), this.hints.forEach(function (n) { if (n.match.test(r)) return t = o.getWordsMatchRange(n.match), !1 }), !t) return void this.hide(); r = t.toString() } else t = o.getWordRange(), r = t.toString(); this.hints.length && r ? (this.$content.empty(), i = e.rect2bnd(f.last(t.getClientRects())), h = u()(this.options.container).offset(), i && (i.top -= h.top, i.left -= h.left, this.$popover.hide(), this.lastWordRange = t, this.hints.forEach(function (n, t) { n.match.test(r) && c.createGroup(t, r).appendTo(c.$content) }), this.$content.find(".note-hint-item:first").addClass("active"), "top" === this.direction ? this.$popover.css({ left: i.left, top: i.top - this.$popover.outerHeight() - 5 }) : this.$popover.css({ left: i.left, top: i.top + i.height + 5 }))) : this.hide() } } }, { key: "show", value: function () { this.$popover.show() } }, { key: "hide", value: function () { this.$popover.hide() } }]) && ue(t.prototype, i), h && ue(t, h), n }(); u.a.summernote = u.a.extend(u.a.summernote, { version: "0.8.18", plugins: {}, dom: r, range: o, lists: f, options: { langInfo: u.a.summernote.lang["en-US"], editing: !0, modules: { editor: tu, clipboard: ru, dropzone: fu, codeview: su, statusbar: cu, fullscreen: au, handle: yu, hintPopover: fe, autoLink: bu, autoSync: du, autoReplace: nf, placeholder: rf, buttons: ff, toolbar: sf, linkDialog: cf, linkPopover: af, imageDialog: yf, imagePopover: wf, tablePopover: kf, videoDialog: gf, helpDialog: te, airPopover: re }, buttons: {}, lang: "en-US", followingToolbar: !1, toolbarPosition: "top", otherStaticBar: "", codeviewKeepButton: !1, toolbar: [["style", ["style"]], ["font", ["bold", "underline", "clear"]], ["fontname", ["fontname"]], ["color", ["color"]], ["para", ["ul", "ol", "paragraph"]], ["table", ["table"]], ["insert", ["link", "picture", "video"]], ["view", ["fullscreen", "codeview", "help"]]], popatmouse: !0, popover: { image: [["resize", ["resizeFull", "resizeHalf", "resizeQuarter", "resizeNone"]], ["float", ["floatLeft", "floatRight", "floatNone"]], ["remove", ["removeMedia"]]], link: [["link", ["linkDialogShow", "unlink"]]], table: [["add", ["addRowDown", "addRowUp", "addColLeft", "addColRight"]], ["delete", ["deleteRow", "deleteCol", "deleteTable"]]], air: [["color", ["color"]], ["font", ["bold", "underline", "clear"]], ["para", ["ul", "paragraph"]], ["table", ["table"]], ["insert", ["link", "picture"]], ["view", ["fullscreen", "codeview"]]] }, airMode: !1, overrideContextMenu: !1, width: null, height: null, linkTargetBlank: !0, useProtocol: !0, defaultProtocol: "http://", focus: !1, tabDisabled: !1, tabSize: 4, styleWithCSS: !1, shortcuts: !0, textareaAutoSync: !0, tooltip: "auto", container: null, maxTextLength: 0, blockquoteBreakingLevel: 2, spellCheck: !0, disableGrammar: !1, placeholder: null, inheritPlaceholder: !1, recordEveryKeystroke: !1, historyLimit: 200, showDomainOnlyForAutolink: !1, hintMode: "word", hintSelect: "after", hintDirection: "bottom", styleTags: ["p", "blockquote", "pre", "h1", "h2", "h3", "h4", "h5", "h6"], fontNames: ["Arial", "Arial Black", "Comic Sans MS", "Courier New", "Helvetica Neue", "Helvetica", "Impact", "Lucida Grande", "Tahoma", "Times New Roman", "Verdana"], fontNamesIgnoreCheck: [], addDefaultFonts: !0, fontSizes: ["8", "9", "10", "11", "12", "14", "18", "24", "36"], fontSizeUnits: ["px", "pt"], colors: [["#000000", "#424242", "#636363", "#9C9C94", "#CEC6CE", "#EFEFEF", "#F7F7F7", "#FFFFFF"], ["#FF0000", "#FF9C00", "#FFFF00", "#00FF00", "#00FFFF", "#0000FF", "#9C00FF", "#FF00FF"], ["#F7C6CE", "#FFE7CE", "#FFEFC6", "#D6EFD6", "#CEDEE7", "#CEE7F7", "#D6D6E7", "#E7D6DE"], ["#E79C9C", "#FFC69C", "#FFE79C", "#B5D6A5", "#A5C6CE", "#9CC6EF", "#B5A5D6", "#D6A5BD"], ["#E76363", "#F7AD6B", "#FFD663", "#94BD7B", "#73A5AD", "#6BADDE", "#8C7BC6", "#C67BA5"], ["#CE0000", "#E79439", "#EFC631", "#6BA54A", "#4A7B8C", "#3984C6", "#634AA5", "#A54A7B"], ["#9C0000", "#B56308", "#BD9400", "#397B21", "#104A5A", "#085294", "#311873", "#731842"], ["#630000", "#7B3900", "#846300", "#295218", "#083139", "#003163", "#21104A", "#4A1031"]], colorsName: [["Black", "Tundora", "Dove Gray", "Star Dust", "Pale Slate", "Gallery", "Alabaster", "White"], ["Red", "Orange Peel", "Yellow", "Green", "Cyan", "Blue", "Electric Violet", "Magenta"], ["Azalea", "Karry", "Egg White", "Zanah", "Botticelli", "Tropical Blue", "Mischka", "Twilight"], ["Tonys Pink", "Peach Orange", "Cream Brulee", "Sprout", "Casper", "Perano", "Cold Purple", "Careys Pink"], ["Mandy", "Rajah", "Dandelion", "Olivine", "Gulf Stream", "Viking", "Blue Marguerite", "Puce"], ["Guardsman Red", "Fire Bush", "Golden Dream", "Chelsea Cucumber", "Smalt Blue", "Boston Blue", "Butterfly Bush", "Cadillac"], ["Sangria", "Mai Tai", "Buddha Gold", "Forest Green", "Eden", "Venice Blue", "Meteorite", "Claret"], ["Rosewood", "Cinnamon", "Olive", "Parsley", "Tiber", "Midnight Blue", "Valentino", "Loulou"]], colorButton: { foreColor: "#000000", backColor: "#FFFF00" }, lineHeights: ["1.0", "1.2", "1.4", "1.5", "1.6", "1.8", "2.0", "3.0"], tableClassName: "table table-bordered", insertTableMaxSize: { col: 10, row: 10 }, dialogsInBody: !1, dialogsFade: !1, maximumImageFileSize: null, callbacks: { onBeforeCommand: null, onBlur: null, onBlurCodeview: null, onChange: null, onChangeCodeview: null, onDialogShown: null, onEnter: null, onFocus: null, onImageLinkInsert: null, onImageUpload: null, onImageUploadError: null, onInit: null, onKeydown: null, onKeyup: null, onMousedown: null, onMouseup: null, onPaste: null, onScroll: null }, codemirror: { mode: "text/html", htmlMode: !0, lineNumbers: !0 }, codeviewFilter: !1, codeviewFilterRegex: /<\/*(?:applet|b(?:ase|gsound|link)|embed|frame(?:set)?|ilayer|l(?:ayer|ink)|meta|object|s(?:cript|tyle)|t(?:itle|extarea)|xml)[^>]*?>/gi, codeviewIframeFilter: !0, codeviewIframeWhitelistSrc: [], codeviewIframeWhitelistSrcBase: ["www.youtube.com", "www.youtube-nocookie.com", "www.facebook.com", "vine.co", "instagram.com", "player.vimeo.com", "www.dailymotion.com", "player.youku.com", "v.qq.com"], keyMap: { pc: { ESC: "escape", ENTER: "insertParagraph", "CTRL+Z": "undo", "CTRL+Y": "redo", TAB: "tab", "SHIFT+TAB": "untab", "CTRL+B": "bold", "CTRL+I": "italic", "CTRL+U": "underline", "CTRL+SHIFT+S": "strikethrough", "CTRL+BACKSLASH": "removeFormat", "CTRL+SHIFT+L": "justifyLeft", "CTRL+SHIFT+E": "justifyCenter", "CTRL+SHIFT+R": "justifyRight", "CTRL+SHIFT+J": "justifyFull", "CTRL+SHIFT+NUM7": "insertUnorderedList", "CTRL+SHIFT+NUM8": "insertOrderedList", "CTRL+LEFTBRACKET": "outdent", "CTRL+RIGHTBRACKET": "indent", "CTRL+NUM0": "formatPara", "CTRL+NUM1": "formatH1", "CTRL+NUM2": "formatH2", "CTRL+NUM3": "formatH3", "CTRL+NUM4": "formatH4", "CTRL+NUM5": "formatH5", "CTRL+NUM6": "formatH6", "CTRL+ENTER": "insertHorizontalRule", "CTRL+K": "linkDialog.show" }, mac: { ESC: "escape", ENTER: "insertParagraph", "CMD+Z": "undo", "CMD+SHIFT+Z": "redo", TAB: "tab", "SHIFT+TAB": "untab", "CMD+B": "bold", "CMD+I": "italic", "CMD+U": "underline", "CMD+SHIFT+S": "strikethrough", "CMD+BACKSLASH": "removeFormat", "CMD+SHIFT+L": "justifyLeft", "CMD+SHIFT+E": "justifyCenter", "CMD+SHIFT+R": "justifyRight", "CMD+SHIFT+J": "justifyFull", "CMD+SHIFT+NUM7": "insertUnorderedList", "CMD+SHIFT+NUM8": "insertOrderedList", "CMD+LEFTBRACKET": "outdent", "CMD+RIGHTBRACKET": "indent", "CMD+NUM0": "formatPara", "CMD+NUM1": "formatH1", "CMD+NUM2": "formatH2", "CMD+NUM3": "formatH3", "CMD+NUM4": "formatH4", "CMD+NUM5": "formatH5", "CMD+NUM6": "formatH6", "CMD+ENTER": "insertHorizontalRule", "CMD+K": "linkDialog.show" } }, icons: { align: "note-icon-align", alignCenter: "note-icon-align-center", alignJustify: "note-icon-align-justify", alignLeft: "note-icon-align-left", alignRight: "note-icon-align-right", rowBelow: "note-icon-row-below", colBefore: "note-icon-col-before", colAfter: "note-icon-col-after", rowAbove: "note-icon-row-above", rowRemove: "note-icon-row-remove", colRemove: "note-icon-col-remove", indent: "note-icon-align-indent", outdent: "note-icon-align-outdent", arrowsAlt: "note-icon-arrows-alt", bold: "note-icon-bold", caret: "note-icon-caret", circle: "note-icon-circle", close: "note-icon-close", code: "note-icon-code", eraser: "note-icon-eraser", floatLeft: "note-icon-float-left", floatRight: "note-icon-float-right", font: "note-icon-font", frame: "note-icon-frame", italic: "note-icon-italic", link: "note-icon-link", unlink: "note-icon-chain-broken", magic: "note-icon-magic", menuCheck: "note-icon-menu-check", minus: "note-icon-minus", orderedlist: "note-icon-orderedlist", pencil: "note-icon-pencil", picture: "note-icon-picture", question: "note-icon-question", redo: "note-icon-redo", rollback: "note-icon-rollback", square: "note-icon-square", strikethrough: "note-icon-strikethrough", subscript: "note-icon-subscript", superscript: "note-icon-superscript", table: "note-icon-table", textHeight: "note-icon-text-height", trash: "note-icon-trash", underline: "note-icon-underline", undo: "note-icon-undo", unorderedlist: "note-icon-unorderedlist", video: "note-icon-video" } } }) }, 4: function () { }, 52: function (n, t, i) { "use strict"; function a(n) { return (a = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (n) { return typeof n } : function (n) { return n && "function" == typeof Symbol && n.constructor === Symbol && n !== Symbol.prototype ? "symbol" : typeof n })(n) } i.r(t); var p = i(0), u = i.n(p), r = i(1); var o = r.a.create('<div class="note-editor note-frame panel panel-default"/>'), s = r.a.create('<div class="panel-heading note-toolbar" role="toolbar"/>'), f = r.a.create('<div class="note-editing-area"/>'), e = r.a.create('<textarea class="note-codable" aria-multiline="true"/>'), h = r.a.create('<div class="note-editable" contentEditable="true" role="textbox" aria-multiline="true"/>'), c = r.a.create('<output class="note-status-output" role="status" aria-live="polite"><\/output><div class="note-statusbar" role="status"><div class="note-resizebar" aria-label="Resize"><div class="note-icon-bar"><\/div><div class="note-icon-bar"><\/div><div class="note-icon-bar"><\/div><\/div><\/div>'), v = r.a.create('<div class="note-editor note-airframe"/>'), y = r.a.create('<div class="note-editable" contentEditable="true" role="textbox" aria-multiline="true"><\/div><output class="note-status-output" role="status" aria-live="polite"><\/output>'), w = r.a.create('<div class="note-btn-group btn-group">'), b = r.a.create('<ul class="note-dropdown-menu dropdown-menu">', function (n, t) { var i = Array.isArray(t.items) ? t.items.map(function (n) { var i = "string" == typeof n ? n : n.value || "", u = t.template ? t.template(n) : n, r = "object" === a(n) ? n.option : void 0; return '<li aria-label="' + i + '"><a href="#" ' + ('data-value="' + i + '"' + (void 0 !== r ? ' data-option="' + r + '"' : "")) + ">" + u + "<\/a><\/li>" }).join("") : t.items; n.html(i).attr({ "aria-label": t.title }); t && t.codeviewKeepButton && n.addClass("note-codeview-keep") }), k = function (n, t) { return n + " " + l(t.icons.caret, "span") }, d = r.a.create('<ul class="note-dropdown-menu dropdown-menu note-check">', function (n, t) { var i = Array.isArray(t.items) ? t.items.map(function (n) { var i = "string" == typeof n ? n : n.value || "", r = t.template ? t.template(n) : n; return '<li aria-label="' + n + '"><a href="#" data-value="' + i + '">' + l(t.checkClassName) + " " + r + "<\/a><\/li>" }).join("") : t.items; n.html(i).attr({ "aria-label": t.title }); t && t.codeviewKeepButton && n.addClass("note-codeview-keep") }), g = r.a.create('<div class="modal note-modal" aria-hidden="false" tabindex="-1" role="dialog"/>', function (n, t) { t.fade && n.addClass("fade"); n.attr({ "aria-label": t.title }); n.html(['<div class="modal-dialog">', '<div class="modal-content">', t.title ? '<div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-label="Close" aria-hidden="true">&times;<\/button><h4 class="modal-title">' + t.title + "<\/h4><\/div>" : "", '<div class="modal-body">' + t.body + "<\/div>", t.footer ? '<div class="modal-footer">' + t.footer + "<\/div>" : "", "<\/div>", "<\/div>"].join("")) }), nt = r.a.create('<div class="note-popover popover in"><div class="arrow"><\/div><div class="popover-content note-children-container"><\/div><\/div>', function (n, t) { var i = void 0 !== t.direction ? t.direction : "bottom"; n.addClass(i); t.hideArrow && n.find(".arrow").hide() }), tt = r.a.create('<div class="checkbox"><\/div>', function (n, t) { n.html(["<label" + (t.id ? ' for="note-' + t.id + '"' : "") + ">", '<input type="checkbox"' + (t.id ? ' id="note-' + t.id + '"' : ""), t.checked ? " checked" : "", ' aria-checked="' + (t.checked ? "true" : "false") + '"/>', t.text ? t.text : "", "<\/label>"].join("")) }), l = function (n, t) { return "<" + (t = t || "i") + ' class="' + n + '"><\/' + t + ">" }, it = function (n) { return { editor: o, toolbar: s, editingArea: f, codable: e, editable: h, statusbar: c, airEditor: v, airEditable: y, buttonGroup: w, dropdown: b, dropdownButtonContents: k, dropdownCheck: d, dialog: g, popover: nt, checkbox: tt, icon: l, options: n, palette: function (t, i) { return r.a.create('<div class="note-color-palette"/>', function (t, i) { for (var f, e, o = [], r = 0, c = i.colors.length; r < c; r++) { for (var l = i.eventName, s = i.colors[r], a = i.colorsName[r], h = [], u = 0, v = s.length; u < v; u++)f = s[u], e = a[u], h.push(['<button type="button" class="note-color-btn"', 'style="background-color:', f, '" ', 'data-event="', l, '" ', 'data-value="', f, '" ', 'title="', e, '" ', 'aria-label="', e, '" ', 'data-toggle="button" tabindex="-1"><\/button>'].join("")); o.push('<div class="note-color-row">' + h.join("") + "<\/div>") } t.html(o.join("")); i.tooltip && t.find(".note-color-btn").tooltip({ container: i.container || n.container, trigger: "hover", placement: "bottom" }) })(t, i) }, button: function (t, i) { return r.a.create('<button type="button" class="note-btn btn btn-default btn-sm" tabindex="-1">', function (t, i) { i && i.tooltip && t.attr({ title: i.tooltip, "aria-label": i.tooltip }).tooltip({ container: i.container || n.container, trigger: "hover", placement: "bottom" }).on("click", function (n) { u()(n.currentTarget).tooltip("hide") }); i && i.codeviewButton && t.addClass("note-codeview-keep") })(t, i) }, toggleBtn: function (n, t) { n.toggleClass("disabled", !t); n.attr("disabled", !t) }, toggleBtnActive: function (n, t) { n.toggleClass("active", t) }, onDialogShown: function (n, t) { n.one("shown.bs.modal", t) }, onDialogHidden: function (n, t) { n.one("hidden.bs.modal", t) }, showDialog: function (n) { n.modal("show") }, hideDialog: function (n) { n.modal("hide") }, createLayout: function (t) { var i = (n.airMode ? v([f([e(), y()])]) : "bottom" === n.toolbarPosition ? o([f([e(), h()]), s(), c()]) : o([s(), f([e(), h()]), c()])).render(); return i.insertAfter(t), { note: t, editor: i, toolbar: i.find(".note-toolbar"), editingArea: i.find(".note-editing-area"), editable: i.find(".note-editable"), codable: i.find(".note-codable"), statusbar: i.find(".note-statusbar") } }, removeLayout: function (n, t) { n.html(t.editable.html()); t.editor.remove(); n.show() } } }; i(3); i(4); u.a.summernote = u.a.extend(u.a.summernote, { ui_template: it, "interface": "bs3" }) } }) }), function (n) { var t, i = n(); n.fn.sortable = function (r) { var u = String(r); return r = n.extend({ connectWith: !1 }, r), this.each(function () { var o, s, e, f; if (/^enable|disable|destroy$/.test(u)) { e = n(this).children(n(this).data("items")).attr("draggable", u == "enable"); u == "destroy" && e.add(this).removeData("connectWith items").off("dragstart.h5s dragend.h5s selectstart.h5s dragover.h5s dragenter.h5s drop.h5s"); return } e = n(this).children(r.items); f = n("<" + (/^ul|ol$/i.test(this.tagName) ? "li" : "div") + ' class="sortable-placeholder">'); e.find(r.handle).mousedown(function () { o = !0 }).mouseup(function () { o = !1 }); n(this).data("items", r.items); i = i.add(f); r.connectWith && n(r.connectWith).add(this).data("connectWith", r.connectWith); e.attr("draggable", "true").on("dragstart.h5s", function (i) { if (r.handle && !o) return !1; o = !1; var u = i.originalEvent.dataTransfer; u.effectAllowed = "move"; u.setData("Text", "dummy"); s = (t = n(this)).addClass("sortable-dragging").index() }).on("dragend.h5s", function () { t && (t.removeClass("sortable-dragging").show(), i.detach(), s != t.index() && t.parent().trigger("sortupdate", { item: t }), t = null) }).not("a[href], img").on("selectstart.h5s", function () { return this.dragDrop && this.dragDrop(), !1 }).end().add([this, f]).on("dragover.h5s dragenter.h5s drop.h5s", function (u) { return !e.is(t) && r.connectWith !== n(t).parent().data("connectWith") ? !0 : u.type == "drop" ? (u.stopPropagation(), i.filter(":visible").after(t), t.trigger("dragend.h5s"), !1) : (u.preventDefault(), u.originalEvent.dataTransfer.dropEffect = "move", e.is(this) ? (r.forcePlaceholderSize && f.height(t.outerHeight()), t.hide(), n(this)[f.index() < n(this).index() ? "after" : "before"](f), i.not(f).detach()) : i.is(this) || n(this).children(r.items).length || (i.detach(), n(this).append(f)), !1) }) }) } }(jQuery);
  50. /*! jQuery UI - v1.12.1 - 2016-09-14
  51. * http://jqueryui.com
  52. * Includes: widget.js, position.js, data.js, disable-selection.js, effect.js, effects/effect-blind.js, effects/effect-bounce.js, effects/effect-clip.js, effects/effect-drop.js, effects/effect-explode.js, effects/effect-fade.js, effects/effect-fold.js, effects/effect-highlight.js, effects/effect-puff.js, effects/effect-pulsate.js, effects/effect-scale.js, effects/effect-shake.js, effects/effect-size.js, effects/effect-slide.js, effects/effect-transfer.js, focusable.js, form-reset-mixin.js, jquery-1-7.js, keycode.js, labels.js, scroll-parent.js, tabbable.js, unique-id.js, widgets/accordion.js, widgets/autocomplete.js, widgets/button.js, widgets/checkboxradio.js, widgets/controlgroup.js, widgets/datepicker.js, widgets/dialog.js, widgets/draggable.js, widgets/droppable.js, widgets/menu.js, widgets/mouse.js, widgets/progressbar.js, widgets/resizable.js, widgets/selectable.js, widgets/selectmenu.js, widgets/slider.js, widgets/sortable.js, widgets/spinner.js, widgets/tabs.js, widgets/tooltip.js
  53. * Copyright jQuery Foundation and other contributors; Licensed MIT */
  54. (function (n) { "function" == typeof define && define.amd ? define(["jquery"], n) : n(jQuery) })(function (n) { function b(n) { for (var t = n.css("visibility"); "inherit" === t;)n = n.parent(), t = n.css("visibility"); return "hidden" !== t } function k(n) { for (var t, i; n.length && n[0] !== document;) { if (t = n.css("position"), ("absolute" === t || "relative" === t || "fixed" === t) && (i = parseInt(n.css("zIndex"), 10), !isNaN(i) && 0 !== i)) return i; n = n.parent() } return 0 } function c() { this._curInst = null; this._keyEvent = !1; this._disabledInputs = []; this._datepickerShowing = !1; this._inDialog = !1; this._mainDivId = "ui-datepicker-div"; this._inlineClass = "ui-datepicker-inline"; this._appendClass = "ui-datepicker-append"; this._triggerClass = "ui-datepicker-trigger"; this._dialogClass = "ui-datepicker-dialog"; this._disableClass = "ui-datepicker-disabled"; this._unselectableClass = "ui-datepicker-unselectable"; this._currentClass = "ui-datepicker-current-day"; this._dayOverClass = "ui-datepicker-days-cell-over"; this.regional = []; this.regional[""] = { closeText: "Done", prevText: "Prev", nextText: "Next", currentText: "Today", 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"], dayNames: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], dayNamesShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], dayNamesMin: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"], weekHeader: "Wk", dateFormat: "mm/dd/yy", firstDay: 0, isRTL: !1, showMonthAfterYear: !1, yearSuffix: "" }; this._defaults = { showOn: "focus", showAnim: "fadeIn", showOptions: {}, defaultDate: null, appendText: "", buttonText: "...", buttonImage: "", buttonImageOnly: !1, hideIfNoPrevNext: !1, navigationAsDateFormat: !1, gotoCurrent: !1, changeMonth: !1, changeYear: !1, yearRange: "c-10:c+10", showOtherMonths: !1, selectOtherMonths: !1, showWeek: !1, calculateWeek: this.iso8601Week, shortYearCutoff: "+10", minDate: null, maxDate: null, duration: "fast", beforeShowDay: null, beforeShow: null, onSelect: null, onChangeMonthYear: null, onClose: null, numberOfMonths: 1, showCurrentAtPos: 0, stepMonths: 1, stepBigMonths: 12, altField: "", altFormat: "", constrainInput: !0, showButtonPanel: !1, autoSize: !1, disabled: !1 }; n.extend(this._defaults, this.regional[""]); this.regional.en = n.extend(!0, {}, this.regional[""]); this.regional["en-US"] = n.extend(!0, {}, this.regional.en); this.dpDiv = l(n("<div id='" + this._mainDivId + "' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'><\/div>")) } function l(t) { var i = "button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a"; return t.on("mouseout", i, function () { n(this).removeClass("ui-state-hover"); -1 !== this.className.indexOf("ui-datepicker-prev") && n(this).removeClass("ui-datepicker-prev-hover"); -1 !== this.className.indexOf("ui-datepicker-next") && n(this).removeClass("ui-datepicker-next-hover") }).on("mouseover", i, a) } function a() { n.datepicker._isDisabledDatepicker(i.inline ? i.dpDiv.parent()[0] : i.input[0]) || (n(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"), n(this).addClass("ui-state-hover"), -1 !== this.className.indexOf("ui-datepicker-prev") && n(this).addClass("ui-datepicker-prev-hover"), -1 !== this.className.indexOf("ui-datepicker-next") && n(this).addClass("ui-datepicker-next-hover")) } function u(t, i) { n.extend(t, i); for (var r in i) null == i[r] && (t[r] = i[r]); return t } function t(n) { return function () { var t = this.element.val(); n.apply(this, arguments); this._refresh(); t !== this.element.val() && this._trigger("change") } } var v, o, p, w, i, r, e; n.ui = n.ui || {}; n.ui.version = "1.12.1"; v = 0; o = Array.prototype.slice; n.cleanData = function (t) { return function (i) { for (var r, u, f = 0; null != (u = i[f]); f++)try { r = n._data(u, "events"); r && r.remove && n(u).triggerHandler("remove") } catch (e) { } t(i) } }(n.cleanData); n.widget = function (t, i, r) { var f, u, o, h = {}, e = t.split(".")[0], s; return t = t.split(".")[1], s = e + "-" + t, r || (r = i, i = n.Widget), n.isArray(r) && (r = n.extend.apply(null, [{}].concat(r))), n.expr[":"][s.toLowerCase()] = function (t) { return !!n.data(t, s) }, n[e] = n[e] || {}, f = n[e][t], u = n[e][t] = function (n, t) { return this._createWidget ? (arguments.length && this._createWidget(n, t), void 0) : new u(n, t) }, n.extend(u, f, { version: r.version, _proto: n.extend({}, r), _childConstructors: [] }), o = new i, o.options = n.widget.extend({}, o.options), n.each(r, function (t, r) { return n.isFunction(r) ? (h[t] = function () { function n() { return i.prototype[t].apply(this, arguments) } function u(n) { return i.prototype[t].apply(this, n) } return function () { var t, i = this._super, f = this._superApply; return this._super = n, this._superApply = u, t = r.apply(this, arguments), this._super = i, this._superApply = f, t } }(), void 0) : (h[t] = r, void 0) }), u.prototype = n.widget.extend(o, { widgetEventPrefix: f ? o.widgetEventPrefix || t : t }, h, { constructor: u, namespace: e, widgetName: t, widgetFullName: s }), f ? (n.each(f._childConstructors, function (t, i) { var r = i.prototype; n.widget(r.namespace + "." + r.widgetName, u, i._proto) }), delete f._childConstructors) : i._childConstructors.push(u), n.widget.bridge(t, u), u }; n.widget.extend = function (t) { for (var i, r, f = o.call(arguments, 1), u = 0, e = f.length; e > u; u++)for (i in f[u]) r = f[u][i], f[u].hasOwnProperty(i) && void 0 !== r && (t[i] = n.isPlainObject(r) ? n.isPlainObject(t[i]) ? n.widget.extend({}, t[i], r) : n.widget.extend({}, r) : r); return t }; n.widget.bridge = function (t, i) { var r = i.prototype.widgetFullName || t; n.fn[t] = function (u) { var s = "string" == typeof u, e = o.call(arguments, 1), f = this; return s ? this.length || "instance" !== u ? this.each(function () { var i, o = n.data(this, r); return "instance" === u ? (f = o, !1) : o ? n.isFunction(o[u]) && "_" !== u.charAt(0) ? (i = o[u].apply(o, e), i !== o && void 0 !== i ? (f = i && i.jquery ? f.pushStack(i.get()) : i, !1) : void 0) : n.error("no such method '" + u + "' for " + t + " widget instance") : n.error("cannot call methods on " + t + " prior to initialization; attempted to call method '" + u + "'") }) : f = void 0 : (e.length && (u = n.widget.extend.apply(null, [u].concat(e))), this.each(function () { var t = n.data(this, r); t ? (t.option(u || {}), t._init && t._init()) : n.data(this, r, new i(u, this)) })), f } }; n.Widget = function () { }; n.Widget._childConstructors = []; n.Widget.prototype = { widgetName: "widget", widgetEventPrefix: "", defaultElement: "<div>", options: { classes: {}, disabled: !1, create: null }, _createWidget: function (t, i) { i = n(i || this.defaultElement || this)[0]; this.element = n(i); this.uuid = v++; this.eventNamespace = "." + this.widgetName + this.uuid; this.bindings = n(); this.hoverable = n(); this.focusable = n(); this.classesElementLookup = {}; i !== this && (n.data(i, this.widgetFullName, this), this._on(!0, this.element, { remove: function (n) { n.target === i && this.destroy() } }), this.document = n(i.style ? i.ownerDocument : i.document || i), this.window = n(this.document[0].defaultView || this.document[0].parentWindow)); this.options = n.widget.extend({}, this.options, this._getCreateOptions(), t); this._create(); this.options.disabled && this._setOptionDisabled(this.options.disabled); this._trigger("create", null, this._getCreateEventData()); this._init() }, _getCreateOptions: function () { return {} }, _getCreateEventData: n.noop, _create: n.noop, _init: n.noop, destroy: function () { var t = this; this._destroy(); n.each(this.classesElementLookup, function (n, i) { t._removeClass(i, n) }); this.element.off(this.eventNamespace).removeData(this.widgetFullName); this.widget().off(this.eventNamespace).removeAttr("aria-disabled"); this.bindings.off(this.eventNamespace) }, _destroy: n.noop, widget: function () { return this.element }, option: function (t, i) { var r, u, f, e = t; if (0 === arguments.length) return n.widget.extend({}, this.options); if ("string" == typeof t) if (e = {}, r = t.split("."), t = r.shift(), r.length) { for (u = e[t] = n.widget.extend({}, this.options[t]), f = 0; r.length - 1 > f; f++)u[r[f]] = u[r[f]] || {}, u = u[r[f]]; if (t = r.pop(), 1 === arguments.length) return void 0 === u[t] ? null : u[t]; u[t] = i } else { if (1 === arguments.length) return void 0 === this.options[t] ? null : this.options[t]; e[t] = i } return this._setOptions(e), this }, _setOptions: function (n) { for (var t in n) this._setOption(t, n[t]); return this }, _setOption: function (n, t) { return "classes" === n && this._setOptionClasses(t), this.options[n] = t, "disabled" === n && this._setOptionDisabled(t), this }, _setOptionClasses: function (t) { var i, u, r; for (i in t) r = this.classesElementLookup[i], t[i] !== this.options.classes[i] && r && r.length && (u = n(r.get()), this._removeClass(r, i), u.addClass(this._classes({ element: u, keys: i, classes: t, add: !0 }))) }, _setOptionDisabled: function (n) { this._toggleClass(this.widget(), this.widgetFullName + "-disabled", null, !!n); n && (this._removeClass(this.hoverable, null, "ui-state-hover"), this._removeClass(this.focusable, null, "ui-state-focus")) }, enable: function () { return this._setOptions({ disabled: !1 }) }, disable: function () { return this._setOptions({ disabled: !0 }) }, _classes: function (t) { function r(r, f) { for (var o, e = 0; r.length > e; e++)o = u.classesElementLookup[r[e]] || n(), o = t.add ? n(n.unique(o.get().concat(t.element.get()))) : n(o.not(t.element).get()), u.classesElementLookup[r[e]] = o, i.push(r[e]), f && t.classes[r[e]] && i.push(t.classes[r[e]]) } var i = [], u = this; return t = n.extend({ element: this.element, classes: this.options.classes || {} }, t), this._on(t.element, { remove: "_untrackClassesElement" }), t.keys && r(t.keys.match(/\S+/g) || [], !0), t.extra && r(t.extra.match(/\S+/g) || []), i.join(" ") }, _untrackClassesElement: function (t) { var i = this; n.each(i.classesElementLookup, function (r, u) { -1 !== n.inArray(t.target, u) && (i.classesElementLookup[r] = n(u.not(t.target).get())) }) }, _removeClass: function (n, t, i) { return this._toggleClass(n, t, i, !1) }, _addClass: function (n, t, i) { return this._toggleClass(n, t, i, !0) }, _toggleClass: function (n, t, i, r) { r = "boolean" == typeof r ? r : i; var u = "string" == typeof n || null === n, f = { extra: u ? t : i, keys: u ? n : t, element: u ? this.element : n, add: r }; return f.element.toggleClass(this._classes(f), r), this }, _on: function (t, i, r) { var f, u = this; "boolean" != typeof t && (r = i, i = t, t = !1); r ? (i = f = n(i), this.bindings = this.bindings.add(i)) : (r = i, i = this.element, f = this.widget()); n.each(r, function (r, e) { function o() { if (t || u.options.disabled !== !0 && !n(this).hasClass("ui-state-disabled")) return ("string" == typeof e ? u[e] : e).apply(u, arguments) } "string" != typeof e && (o.guid = e.guid = e.guid || o.guid || n.guid++); var s = r.match(/^([\w:-]*)\s*(.*)$/), h = s[1] + u.eventNamespace, c = s[2]; c ? f.on(h, c, o) : i.on(h, o) }) }, _off: function (t, i) { i = (i || "").split(" ").join(this.eventNamespace + " ") + this.eventNamespace; t.off(i).off(i); this.bindings = n(this.bindings.not(t).get()); this.focusable = n(this.focusable.not(t).get()); this.hoverable = n(this.hoverable.not(t).get()) }, _delay: function (n, t) { function r() { return ("string" == typeof n ? i[n] : n).apply(i, arguments) } var i = this; return setTimeout(r, t || 0) }, _hoverable: function (t) { this.hoverable = this.hoverable.add(t); this._on(t, { mouseenter: function (t) { this._addClass(n(t.currentTarget), null, "ui-state-hover") }, mouseleave: function (t) { this._removeClass(n(t.currentTarget), null, "ui-state-hover") } }) }, _focusable: function (t) { this.focusable = this.focusable.add(t); this._on(t, { focusin: function (t) { this._addClass(n(t.currentTarget), null, "ui-state-focus") }, focusout: function (t) { this._removeClass(n(t.currentTarget), null, "ui-state-focus") } }) }, _trigger: function (t, i, r) { var u, f, e = this.options[t]; if (r = r || {}, i = n.Event(i), i.type = (t === this.widgetEventPrefix ? t : this.widgetEventPrefix + t).toLowerCase(), i.target = this.element[0], f = i.originalEvent) for (u in f) u in i || (i[u] = f[u]); return this.element.trigger(i, r), !(n.isFunction(e) && e.apply(this.element[0], [i].concat(r)) === !1 || i.isDefaultPrevented()) } }; n.each({ show: "fadeIn", hide: "fadeOut" }, function (t, i) { n.Widget.prototype["_" + t] = function (r, u, f) { "string" == typeof u && (u = { effect: u }); var o, e = u ? u === !0 || "number" == typeof u ? i : u.effect || i : t; u = u || {}; "number" == typeof u && (u = { duration: u }); o = !n.isEmptyObject(u); u.complete = f; u.delay && r.delay(u.delay); o && n.effects && n.effects.effect[e] ? r[t](u) : e !== t && r[e] ? r[e](u.duration, u.easing, f) : r.queue(function (i) { n(this)[t](); f && f.call(r[0]); i() }) } }); n.widget, function () { function f(n, t, i) { return [parseFloat(n[0]) * (c.test(n[0]) ? t / 100 : 1), parseFloat(n[1]) * (c.test(n[1]) ? i / 100 : 1)] } function i(t, i) { return parseInt(n.css(t, i), 10) || 0 } function l(t) { var i = t[0]; return 9 === i.nodeType ? { width: t.width(), height: t.height(), offset: { top: 0, left: 0 } } : n.isWindow(i) ? { width: t.width(), height: t.height(), offset: { top: t.scrollTop(), left: t.scrollLeft() } } : i.preventDefault ? { width: 0, height: 0, offset: { top: i.pageY, left: i.pageX } } : { width: t.outerWidth(), height: t.outerHeight(), offset: t.offset() } } var u, r = Math.max, t = Math.abs, e = /left|center|right/, o = /top|center|bottom/, s = /[\+\-]\d+(\.[\d]+)?%?/, h = /^\w+/, c = /%$/, a = n.fn.position; n.position = { scrollbarWidth: function () { if (void 0 !== u) return u; var r, i, t = n("<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'><\/div><\/div>"), f = t.children()[0]; return n("body").append(t), r = f.offsetWidth, t.css("overflow", "scroll"), i = f.offsetWidth, r === i && (i = t[0].clientWidth), t.remove(), u = r - i }, getScrollInfo: function (t) { var i = t.isWindow || t.isDocument ? "" : t.element.css("overflow-x"), r = t.isWindow || t.isDocument ? "" : t.element.css("overflow-y"), u = "scroll" === i || "auto" === i && t.width < t.element[0].scrollWidth, f = "scroll" === r || "auto" === r && t.height < t.element[0].scrollHeight; return { width: f ? n.position.scrollbarWidth() : 0, height: u ? n.position.scrollbarWidth() : 0 } }, getWithinInfo: function (t) { var i = n(t || window), r = n.isWindow(i[0]), u = !!i[0] && 9 === i[0].nodeType, f = !r && !u; return { element: i, isWindow: r, isDocument: u, offset: f ? n(t).offset() : { left: 0, top: 0 }, scrollLeft: i.scrollLeft(), scrollTop: i.scrollTop(), width: i.outerWidth(), height: i.outerHeight() } } }; n.fn.position = function (u) { if (!u || !u.of) return a.apply(this, arguments); u = n.extend({}, u); var w, c, v, p, y, k, d = n(u.of), nt = n.position.getWithinInfo(u.within), tt = n.position.getScrollInfo(nt), b = (u.collision || "flip").split(" "), g = {}; return k = l(d), d[0].preventDefault && (u.at = "left top"), c = k.width, v = k.height, p = k.offset, y = n.extend({}, p), n.each(["my", "at"], function () { var t, i, n = (u[this] || "").split(" "); 1 === n.length && (n = e.test(n[0]) ? n.concat(["center"]) : o.test(n[0]) ? ["center"].concat(n) : ["center", "center"]); n[0] = e.test(n[0]) ? n[0] : "center"; n[1] = o.test(n[1]) ? n[1] : "center"; t = s.exec(n[0]); i = s.exec(n[1]); g[this] = [t ? t[0] : 0, i ? i[0] : 0]; u[this] = [h.exec(n[0])[0], h.exec(n[1])[0]] }), 1 === b.length && (b[1] = b[0]), "right" === u.at[0] ? y.left += c : "center" === u.at[0] && (y.left += c / 2), "bottom" === u.at[1] ? y.top += v : "center" === u.at[1] && (y.top += v / 2), w = f(g.at, c, v), y.left += w[0], y.top += w[1], this.each(function () { var a, k, o = n(this), s = o.outerWidth(), h = o.outerHeight(), it = i(this, "marginLeft"), rt = i(this, "marginTop"), ut = s + it + i(this, "marginRight") + tt.width, ft = h + rt + i(this, "marginBottom") + tt.height, e = n.extend({}, y), l = f(g.my, o.outerWidth(), o.outerHeight()); "right" === u.my[0] ? e.left -= s : "center" === u.my[0] && (e.left -= s / 2); "bottom" === u.my[1] ? e.top -= h : "center" === u.my[1] && (e.top -= h / 2); e.left += l[0]; e.top += l[1]; a = { marginLeft: it, marginTop: rt }; n.each(["left", "top"], function (t, i) { n.ui.position[b[t]] && n.ui.position[b[t]][i](e, { targetWidth: c, targetHeight: v, elemWidth: s, elemHeight: h, collisionPosition: a, collisionWidth: ut, collisionHeight: ft, offset: [w[0] + l[0], w[1] + l[1]], my: u.my, at: u.at, within: nt, elem: o }) }); u.using && (k = function (n) { var i = p.left - e.left, a = i + c - s, f = p.top - e.top, y = f + v - h, l = { target: { element: d, left: p.left, top: p.top, width: c, height: v }, element: { element: o, left: e.left, top: e.top, width: s, height: h }, horizontal: 0 > a ? "left" : i > 0 ? "right" : "center", vertical: 0 > y ? "top" : f > 0 ? "bottom" : "middle" }; s > c && c > t(i + a) && (l.horizontal = "center"); h > v && v > t(f + y) && (l.vertical = "middle"); l.important = r(t(i), t(a)) > r(t(f), t(y)) ? "horizontal" : "vertical"; u.using.call(this, n, l) }); o.offset(n.extend(e, { using: k })) }) }; n.ui.position = { fit: { left: function (n, t) { var h, e = t.within, u = e.isWindow ? e.scrollLeft : e.offset.left, o = e.width, s = n.left - t.collisionPosition.marginLeft, i = u - s, f = s + t.collisionWidth - o - u; t.collisionWidth > o ? i > 0 && 0 >= f ? (h = n.left + i + t.collisionWidth - o - u, n.left += i - h) : n.left = f > 0 && 0 >= i ? u : i > f ? u + o - t.collisionWidth : u : i > 0 ? n.left += i : f > 0 ? n.left -= f : n.left = r(n.left - s, n.left) }, top: function (n, t) { var h, o = t.within, u = o.isWindow ? o.scrollTop : o.offset.top, e = t.within.height, s = n.top - t.collisionPosition.marginTop, i = u - s, f = s + t.collisionHeight - e - u; t.collisionHeight > e ? i > 0 && 0 >= f ? (h = n.top + i + t.collisionHeight - e - u, n.top += i - h) : n.top = f > 0 && 0 >= i ? u : i > f ? u + e - t.collisionHeight : u : i > 0 ? n.top += i : f > 0 ? n.top -= f : n.top = r(n.top - s, n.top) } }, flip: { left: function (n, i) { var o, s, r = i.within, y = r.offset.left + r.scrollLeft, c = r.width, h = r.isWindow ? r.scrollLeft : r.offset.left, l = n.left - i.collisionPosition.marginLeft, a = l - h, v = l + i.collisionWidth - c - h, u = "left" === i.my[0] ? -i.elemWidth : "right" === i.my[0] ? i.elemWidth : 0, f = "left" === i.at[0] ? i.targetWidth : "right" === i.at[0] ? -i.targetWidth : 0, e = -2 * i.offset[0]; 0 > a ? (o = n.left + u + f + e + i.collisionWidth - c - y, (0 > o || t(a) > o) && (n.left += u + f + e)) : v > 0 && (s = n.left - i.collisionPosition.marginLeft + u + f + e - h, (s > 0 || v > t(s)) && (n.left += u + f + e)) }, top: function (n, i) { var o, s, r = i.within, y = r.offset.top + r.scrollTop, c = r.height, h = r.isWindow ? r.scrollTop : r.offset.top, l = n.top - i.collisionPosition.marginTop, a = l - h, v = l + i.collisionHeight - c - h, p = "top" === i.my[1], u = p ? -i.elemHeight : "bottom" === i.my[1] ? i.elemHeight : 0, f = "top" === i.at[1] ? i.targetHeight : "bottom" === i.at[1] ? -i.targetHeight : 0, e = -2 * i.offset[1]; 0 > a ? (s = n.top + u + f + e + i.collisionHeight - c - y, (0 > s || t(a) > s) && (n.top += u + f + e)) : v > 0 && (o = n.top - i.collisionPosition.marginTop + u + f + e - h, (o > 0 || v > t(o)) && (n.top += u + f + e)) } }, flipfit: { left: function () { n.ui.position.flip.left.apply(this, arguments); n.ui.position.fit.left.apply(this, arguments) }, top: function () { n.ui.position.flip.top.apply(this, arguments); n.ui.position.fit.top.apply(this, arguments) } } } }(); n.ui.position; n.extend(n.expr[":"], { data: n.expr.createPseudo ? n.expr.createPseudo(function (t) { return function (i) { return !!n.data(i, t) } }) : function (t, i, r) { return !!n.data(t, r[3]) } }); n.fn.extend({ disableSelection: function () { var n = "onselectstart" in document.createElement("div") ? "selectstart" : "mousedown"; return function () { return this.on(n + ".ui-disableSelection", function (n) { n.preventDefault() }) } }(), enableSelection: function () { return this.off(".ui-disableSelection") } }); var f = "ui-effects-", s = "ui-effects-style", h = "ui-effects-animated", y = n; n.effects = { effect: {} }, function (n, t) { function f(n, t, i) { var r = h[t.type] || {}; return null == n ? i || !t.def ? null : t.def : (n = r.floor ? ~~n : parseFloat(n), isNaN(n) ? t.def : r.mod ? (n + r.mod) % r.mod : 0 > n ? 0 : n > r.max ? r.max : n) } function s(f) { var o = i(), s = o._rgba = []; return f = f.toLowerCase(), r(v, function (n, i) { var r, h = i.re.exec(f), c = h && i.parse(h), e = i.space || "rgba"; return c ? (r = o[e](c), o[u[e].cache] = r[u[e].cache], s = o._rgba = r._rgba, !1) : t }), s.length ? ("0,0,0,0" === s.join() && n.extend(s, e.transparent), o) : e[f] } function o(n, t, i) { return i = (i + 1) % 1, 1 > 6 * i ? n + 6 * (t - n) * i : 1 > 2 * i ? t : 2 > 3 * i ? n + 6 * (t - n) * (2 / 3 - i) : n } var e, a = /^([\-+])=\s*(\d+\.?\d*)/, v = [{ re: /rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/, parse: function (n) { return [n[1], n[2], n[3], n[4]] } }, { re: /rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/, parse: function (n) { return [2.55 * n[1], 2.55 * n[2], 2.55 * n[3], n[4]] } }, { re: /#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/, parse: function (n) { return [parseInt(n[1], 16), parseInt(n[2], 16), parseInt(n[3], 16)] } }, { re: /#([a-f0-9])([a-f0-9])([a-f0-9])/, parse: function (n) { return [parseInt(n[1] + n[1], 16), parseInt(n[2] + n[2], 16), parseInt(n[3] + n[3], 16)] } }, { re: /hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/, space: "hsla", parse: function (n) { return [n[1], n[2] / 100, n[3] / 100, n[4]] } }], i = n.Color = function (t, i, r, u) { return new n.Color.fn.parse(t, i, r, u) }, u = { rgba: { props: { red: { idx: 0, type: "byte" }, green: { idx: 1, type: "byte" }, blue: { idx: 2, type: "byte" } } }, hsla: { props: { hue: { idx: 0, type: "degrees" }, saturation: { idx: 1, type: "percent" }, lightness: { idx: 2, type: "percent" } } } }, h = { byte: { floor: !0, max: 255 }, percent: { max: 1 }, degrees: { mod: 360, floor: !0 } }, c = i.support = {}, l = n("<p>")[0], r = n.each; l.style.cssText = "background-color:rgba(1,1,1,.5)"; c.rgba = l.style.backgroundColor.indexOf("rgba") > -1; r(u, function (n, t) { t.cache = "_" + n; t.props.alpha = { idx: 3, type: "percent", def: 1 } }); i.fn = n.extend(i.prototype, { parse: function (o, h, c, l) { if (o === t) return this._rgba = [null, null, null, null], this; (o.jquery || o.nodeType) && (o = n(o).css(h), h = t); var a = this, v = n.type(o), y = this._rgba = []; return h !== t && (o = [o, h, c, l], v = "array"), "string" === v ? this.parse(s(o) || e._default) : "array" === v ? (r(u.rgba.props, function (n, t) { y[t.idx] = f(o[t.idx], t) }), this) : "object" === v ? (o instanceof i ? r(u, function (n, t) { o[t.cache] && (a[t.cache] = o[t.cache].slice()) }) : r(u, function (t, i) { var u = i.cache; r(i.props, function (n, t) { if (!a[u] && i.to) { if ("alpha" === n || null == o[n]) return; a[u] = i.to(a._rgba) } a[u][t.idx] = f(o[n], t, !0) }); a[u] && 0 > n.inArray(null, a[u].slice(0, 3)) && (a[u][3] = 1, i.from && (a._rgba = i.from(a[u]))) }), this) : t }, is: function (n) { var o = i(n), f = !0, e = this; return r(u, function (n, i) { var s, u = o[i.cache]; return u && (s = e[i.cache] || i.to && i.to(e._rgba) || [], r(i.props, function (n, i) { return null != u[i.idx] ? f = u[i.idx] === s[i.idx] : t })), f }), f }, _space: function () { var n = [], t = this; return r(u, function (i, r) { t[r.cache] && n.push(i) }), n.pop() }, transition: function (n, t) { var e = i(n), c = e._space(), o = u[c], l = 0 === this.alpha() ? i("transparent") : this, a = l[o.cache] || o.to(l._rgba), s = a.slice(); return e = e[o.cache], r(o.props, function (n, i) { var c = i.idx, r = a[c], u = e[c], o = h[i.type] || {}; null !== u && (null === r ? s[c] = u : (o.mod && (u - r > o.mod / 2 ? r += o.mod : r - u > o.mod / 2 && (r -= o.mod)), s[c] = f((u - r) * t + r, i))) }), this[c](s) }, blend: function (t) { if (1 === this._rgba[3]) return this; var r = this._rgba.slice(), u = r.pop(), f = i(t)._rgba; return i(n.map(r, function (n, t) { return (1 - u) * f[t] + u * n })) }, toRgbaString: function () { var i = "rgba(", t = n.map(this._rgba, function (n, t) { return null == n ? t > 2 ? 1 : 0 : n }); return 1 === t[3] && (t.pop(), i = "rgb("), i + t.join() + ")" }, toHslaString: function () { var i = "hsla(", t = n.map(this.hsla(), function (n, t) { return null == n && (n = t > 2 ? 1 : 0), t && 3 > t && (n = Math.round(100 * n) + "%"), n }); return 1 === t[3] && (t.pop(), i = "hsl("), i + t.join() + ")" }, toHexString: function (t) { var i = this._rgba.slice(), r = i.pop(); return t && i.push(~~(255 * r)), "#" + n.map(i, function (n) { return n = (n || 0).toString(16), 1 === n.length ? "0" + n : n }).join("") }, toString: function () { return 0 === this._rgba[3] ? "transparent" : this.toRgbaString() } }); i.fn.parse.prototype = i.fn; u.hsla.to = function (n) { if (null == n[0] || null == n[1] || null == n[2]) return [null, null, null, n[3]]; var s, h, i = n[0] / 255, r = n[1] / 255, f = n[2] / 255, c = n[3], u = Math.max(i, r, f), e = Math.min(i, r, f), t = u - e, o = u + e, l = .5 * o; return s = e === u ? 0 : i === u ? 60 * (r - f) / t + 360 : r === u ? 60 * (f - i) / t + 120 : 60 * (i - r) / t + 240, h = 0 === t ? 0 : .5 >= l ? t / o : t / (2 - o), [Math.round(s) % 360, h, l, null == c ? 1 : c] }; u.hsla.from = function (n) { if (null == n[0] || null == n[1] || null == n[2]) return [null, null, null, n[3]]; var r = n[0] / 360, u = n[1], t = n[2], e = n[3], i = .5 >= t ? t * (1 + u) : t + u - t * u, f = 2 * t - i; return [Math.round(255 * o(f, i, r + 1 / 3)), Math.round(255 * o(f, i, r)), Math.round(255 * o(f, i, r - 1 / 3)), e] }; r(u, function (u, e) { var s = e.props, o = e.cache, h = e.to, c = e.from; i.fn[u] = function (u) { if (h && !this[o] && (this[o] = h(this._rgba)), u === t) return this[o].slice(); var l, a = n.type(u), v = "array" === a || "object" === a ? u : arguments, e = this[o].slice(); return r(s, function (n, t) { var i = v["object" === a ? n : t.idx]; null == i && (i = e[t.idx]); e[t.idx] = f(i, t) }), c ? (l = i(c(e)), l[o] = e, l) : i(e) }; r(s, function (t, r) { i.fn[t] || (i.fn[t] = function (i) { var f, e = n.type(i), h = "alpha" === t ? this._hsla ? "hsla" : "rgba" : u, o = this[h](), s = o[r.idx]; return "undefined" === e ? s : ("function" === e && (i = i.call(this, s), e = n.type(i)), null == i && r.empty ? this : ("string" === e && (f = a.exec(i), f && (i = s + parseFloat(f[2]) * ("+" === f[1] ? 1 : -1))), o[r.idx] = i, this[h](o))) }) }) }); i.hook = function (t) { var u = t.split(" "); r(u, function (t, r) { n.cssHooks[r] = { set: function (t, u) { var o, f, e = ""; if ("transparent" !== u && ("string" !== n.type(u) || (o = s(u)))) { if (u = i(o || u), !c.rgba && 1 !== u._rgba[3]) { for (f = "backgroundColor" === r ? t.parentNode : t; ("" === e || "transparent" === e) && f && f.style;)try { e = n.css(f, "backgroundColor"); f = f.parentNode } catch (h) { } u = u.blend(e && "transparent" !== e ? e : "_default") } u = u.toRgbaString() } try { t.style[r] = u } catch (h) { } } }; n.fx.step[r] = function (t) { t.colorInit || (t.start = i(t.elem, r), t.end = i(t.end), t.colorInit = !0); n.cssHooks[r].set(t.elem, t.start.transition(t.end, t.pos)) } }) }; i.hook("backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor"); n.cssHooks.borderColor = { expand: function (n) { var t = {}; return r(["Top", "Right", "Bottom", "Left"], function (i, r) { t["border" + r + "Color"] = n }), t } }; e = n.Color.names = { aqua: "#00ffff", black: "#000000", blue: "#0000ff", fuchsia: "#ff00ff", gray: "#808080", green: "#008000", lime: "#00ff00", maroon: "#800000", navy: "#000080", olive: "#808000", purple: "#800080", red: "#ff0000", silver: "#c0c0c0", teal: "#008080", white: "#ffffff", yellow: "#ffff00", transparent: [null, null, null, 0], _default: "#ffffff" } }(y), function () { function t(t) { var r, u, i = t.ownerDocument.defaultView ? t.ownerDocument.defaultView.getComputedStyle(t, null) : t.currentStyle, f = {}; if (i && i.length && i[0] && i[i[0]]) for (u = i.length; u--;)r = i[u], "string" == typeof i[r] && (f[n.camelCase(r)] = i[r]); else for (r in i) "string" == typeof i[r] && (f[r] = i[r]); return f } function i(t, i) { var r, f, e = {}; for (r in i) f = i[r], t[r] !== f && (u[r] || (n.fx.step[r] || !isNaN(parseFloat(f))) && (e[r] = f)); return e } var r = ["add", "remove", "toggle"], u = { border: 1, borderBottom: 1, borderColor: 1, borderLeft: 1, borderRight: 1, borderTop: 1, borderWidth: 1, margin: 1, padding: 1 }; n.each(["borderLeftStyle", "borderRightStyle", "borderBottomStyle", "borderTopStyle"], function (t, i) { n.fx.step[i] = function (n) { ("none" === n.end || n.setAttr) && (1 !== n.pos || n.setAttr) || (y.style(n.elem, i, n.end), n.setAttr = !0) } }); n.fn.addBack || (n.fn.addBack = function (n) { return this.add(null == n ? this.prevObject : this.prevObject.filter(n)) }); n.effects.animateClass = function (u, f, e, o) { var s = n.speed(f, e, o); return this.queue(function () { var o, e = n(this), h = e.attr("class") || "", f = s.children ? e.find("*").addBack() : e; f = f.map(function () { var i = n(this); return { el: i, start: t(this) } }); o = function () { n.each(r, function (n, t) { u[t] && e[t + "Class"](u[t]) }) }; o(); f = f.map(function () { return this.end = t(this.el[0]), this.diff = i(this.start, this.end), this }); e.attr("class", h); f = f.map(function () { var i = this, t = n.Deferred(), r = n.extend({}, s, { queue: !1, complete: function () { t.resolve(i) } }); return this.el.animate(this.diff, r), t.promise() }); n.when.apply(n, f.get()).done(function () { o(); n.each(arguments, function () { var t = this.el; n.each(this.diff, function (n) { t.css(n, "") }) }); s.complete.call(e[0]) }) }) }; n.fn.extend({ addClass: function (t) { return function (i, r, u, f) { return r ? n.effects.animateClass.call(this, { add: i }, r, u, f) : t.apply(this, arguments) } }(n.fn.addClass), removeClass: function (t) { return function (i, r, u, f) { return arguments.length > 1 ? n.effects.animateClass.call(this, { remove: i }, r, u, f) : t.apply(this, arguments) } }(n.fn.removeClass), toggleClass: function (t) { return function (i, r, u, f, e) { return "boolean" == typeof r || void 0 === r ? u ? n.effects.animateClass.call(this, r ? { add: i } : { remove: i }, u, f, e) : t.apply(this, arguments) : n.effects.animateClass.call(this, { toggle: i }, r, u, f) } }(n.fn.toggleClass), switchClass: function (t, i, r, u, f) { return n.effects.animateClass.call(this, { add: i, remove: t }, r, u, f) } }) }(), function () { function t(t, i, r, u) { return n.isPlainObject(t) && (i = t, t = t.effect), t = { effect: t }, null == i && (i = {}), n.isFunction(i) && (u = i, r = null, i = {}), ("number" == typeof i || n.fx.speeds[i]) && (u = r, r = i, i = {}), n.isFunction(r) && (u = r, r = null), i && n.extend(t, i), r = r || i.duration, t.duration = n.fx.off ? 0 : "number" == typeof r ? r : r in n.fx.speeds ? n.fx.speeds[r] : n.fx.speeds._default, t.complete = u || i.complete, t } function i(t) { return !t || "number" == typeof t || n.fx.speeds[t] ? !0 : "string" != typeof t || n.effects.effect[t] ? n.isFunction(t) ? !0 : "object" != typeof t || t.effect ? !1 : !0 : !0 } function r(n, t) { var r = t.outerWidth(), u = t.outerHeight(), i = /^rect\((-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto)\)$/.exec(n) || ["", 0, r, u, 0]; return { top: parseFloat(i[1]) || 0, right: "auto" === i[2] ? r : parseFloat(i[2]), bottom: "auto" === i[3] ? u : parseFloat(i[3]), left: parseFloat(i[4]) || 0 } } n.expr && n.expr.filters && n.expr.filters.animated && (n.expr.filters.animated = function (t) { return function (i) { return !!n(i).data(h) || t(i) } }(n.expr.filters.animated)); n.uiBackCompat !== !1 && n.extend(n.effects, { save: function (n, t) { for (var i = 0, r = t.length; r > i; i++)null !== t[i] && n.data(f + t[i], n[0].style[t[i]]) }, restore: function (n, t) { for (var r, i = 0, u = t.length; u > i; i++)null !== t[i] && (r = n.data(f + t[i]), n.css(t[i], r)) }, setMode: function (n, t) { return "toggle" === t && (t = n.is(":hidden") ? "show" : "hide"), t }, createWrapper: function (t) { if (t.parent().is(".ui-effects-wrapper")) return t.parent(); var i = { width: t.outerWidth(!0), height: t.outerHeight(!0), float: t.css("float") }, u = n("<div><\/div>").addClass("ui-effects-wrapper").css({ fontSize: "100%", background: "transparent", border: "none", margin: 0, padding: 0 }), f = { width: t.width(), height: t.height() }, r = document.activeElement; try { r.id } catch (e) { r = document.body } return t.wrap(u), (t[0] === r || n.contains(t[0], r)) && n(r).trigger("focus"), u = t.parent(), "static" === t.css("position") ? (u.css({ position: "relative" }), t.css({ position: "relative" })) : (n.extend(i, { position: t.css("position"), zIndex: t.css("z-index") }), n.each(["top", "left", "bottom", "right"], function (n, r) { i[r] = t.css(r); isNaN(parseInt(i[r], 10)) && (i[r] = "auto") }), t.css({ position: "relative", top: 0, left: 0, right: "auto", bottom: "auto" })), t.css(f), u.css(i).show() }, removeWrapper: function (t) { var i = document.activeElement; return t.parent().is(".ui-effects-wrapper") && (t.parent().replaceWith(t), (t[0] === i || n.contains(t[0], i)) && n(i).trigger("focus")), t } }); n.extend(n.effects, { version: "1.12.1", define: function (t, i, r) { return r || (r = i, i = "effect"), n.effects.effect[t] = r, n.effects.effect[t].mode = i, r }, scaledDimensions: function (n, t, i) { if (0 === t) return { height: 0, width: 0, outerHeight: 0, outerWidth: 0 }; var r = "horizontal" !== i ? (t || 100) / 100 : 1, u = "vertical" !== i ? (t || 100) / 100 : 1; return { height: n.height() * u, width: n.width() * r, outerHeight: n.outerHeight() * u, outerWidth: n.outerWidth() * r } }, clipToBox: function (n) { return { width: n.clip.right - n.clip.left, height: n.clip.bottom - n.clip.top, left: n.clip.left, top: n.clip.top } }, unshift: function (n, t, i) { var r = n.queue(); t > 1 && r.splice.apply(r, [1, 0].concat(r.splice(t, i))); n.dequeue() }, saveStyle: function (n) { n.data(s, n[0].style.cssText) }, restoreStyle: function (n) { n[0].style.cssText = n.data(s) || ""; n.removeData(s) }, mode: function (n, t) { var i = n.is(":hidden"); return "toggle" === t && (t = i ? "show" : "hide"), (i ? "hide" === t : "show" === t) && (t = "none"), t }, getBaseline: function (n, t) { var i, r; switch (n[0]) { case "top": i = 0; break; case "middle": i = .5; break; case "bottom": i = 1; break; default: i = n[0] / t.height }switch (n[1]) { case "left": r = 0; break; case "center": r = .5; break; case "right": r = 1; break; default: r = n[1] / t.width }return { x: r, y: i } }, createPlaceholder: function (t) { var i, r = t.css("position"), u = t.position(); return t.css({ marginTop: t.css("marginTop"), marginBottom: t.css("marginBottom"), marginLeft: t.css("marginLeft"), marginRight: t.css("marginRight") }).outerWidth(t.outerWidth()).outerHeight(t.outerHeight()), /^(static|relative)/.test(r) && (r = "absolute", i = n("<" + t[0].nodeName + ">").insertAfter(t).css({ display: /^(inline|ruby)/.test(t.css("display")) ? "inline-block" : "block", visibility: "hidden", marginTop: t.css("marginTop"), marginBottom: t.css("marginBottom"), marginLeft: t.css("marginLeft"), marginRight: t.css("marginRight"), float: t.css("float") }).outerWidth(t.outerWidth()).outerHeight(t.outerHeight()).addClass("ui-effects-placeholder"), t.data(f + "placeholder", i)), t.css({ position: r, left: u.left, top: u.top }), i }, removePlaceholder: function (n) { var t = f + "placeholder", i = n.data(t); i && (i.remove(), n.removeData(t)) }, cleanUp: function (t) { n.effects.restoreStyle(t); n.effects.removePlaceholder(t) }, setTransition: function (t, i, r, u) { return u = u || {}, n.each(i, function (n, i) { var f = t.cssUnit(i); f[0] > 0 && (u[i] = f[0] * r + f[1]) }), u } }); n.fn.extend({ effect: function () { function o(t) { function c() { o.removeData(h); n.effects.cleanUp(o); "hide" === i.mode && o.hide(); s() } function s() { n.isFunction(f) && f.call(o[0]); n.isFunction(t) && t() } var o = n(this); i.mode = l.shift(); n.uiBackCompat === !1 || u ? "none" === i.mode ? (o[r](), s()) : e.call(o[0], i, c) : (o.is(":hidden") ? "hide" === r : "show" === r) ? (o[r](), s()) : e.call(o[0], i, s) } var i = t.apply(this, arguments), e = n.effects.effect[i.effect], u = e.mode, s = i.queue, c = s || "fx", f = i.complete, r = i.mode, l = [], a = function (t) { var f = n(this), i = n.effects.mode(f, r) || u; f.data(h, !0); l.push(i); u && ("show" === i || i === u && "hide" === i) && f.show(); u && "none" === i || n.effects.saveStyle(f); n.isFunction(t) && t() }; return n.fx.off || !e ? r ? this[r](i.duration, f) : this.each(function () { f && f.call(this) }) : s === !1 ? this.each(a).each(o) : this.queue(c, a).queue(c, o) }, show: function (n) { return function (r) { if (i(r)) return n.apply(this, arguments); var u = t.apply(this, arguments); return u.mode = "show", this.effect.call(this, u) } }(n.fn.show), hide: function (n) { return function (r) { if (i(r)) return n.apply(this, arguments); var u = t.apply(this, arguments); return u.mode = "hide", this.effect.call(this, u) } }(n.fn.hide), toggle: function (n) { return function (r) { if (i(r) || "boolean" == typeof r) return n.apply(this, arguments); var u = t.apply(this, arguments); return u.mode = "toggle", this.effect.call(this, u) } }(n.fn.toggle), cssUnit: function (t) { var i = this.css(t), r = []; return n.each(["em", "px", "%", "pt"], function (n, t) { i.indexOf(t) > 0 && (r = [parseFloat(i), t]) }), r }, cssClip: function (n) { return n ? this.css("clip", "rect(" + n.top + "px " + n.right + "px " + n.bottom + "px " + n.left + "px)") : r(this.css("clip"), this) }, transfer: function (t, i) { var u = n(this), r = n(t.to), f = "fixed" === r.css("position"), e = n("body"), o = f ? e.scrollTop() : 0, s = f ? e.scrollLeft() : 0, h = r.offset(), l = { top: h.top - o, left: h.left - s, height: r.innerHeight(), width: r.innerWidth() }, c = u.offset(), a = n("<div class='ui-effects-transfer'><\/div>").appendTo("body").addClass(t.className).css({ top: c.top - o, left: c.left - s, height: u.innerHeight(), width: u.innerWidth(), position: f ? "fixed" : "absolute" }).animate(l, t.duration, t.easing, function () { a.remove(); n.isFunction(i) && i() }) } }); n.fx.step.clip = function (t) { t.clipInit || (t.start = n(t.elem).cssClip(), "string" == typeof t.end && (t.end = r(t.end, t.elem)), t.clipInit = !0); n(t.elem).cssClip({ top: t.pos * (t.end.top - t.start.top) + t.start.top, right: t.pos * (t.end.right - t.start.right) + t.start.right, bottom: t.pos * (t.end.bottom - t.start.bottom) + t.start.bottom, left: t.pos * (t.end.left - t.start.left) + t.start.left }) } }(), function () { var t = {}; n.each(["Quad", "Cubic", "Quart", "Quint", "Expo"], function (n, i) { t[i] = function (t) { return Math.pow(t, n + 2) } }); n.extend(t, { Sine: function (n) { return 1 - Math.cos(n * Math.PI / 2) }, Circ: function (n) { return 1 - Math.sqrt(1 - n * n) }, Elastic: function (n) { return 0 === n || 1 === n ? n : -Math.pow(2, 8 * (n - 1)) * Math.sin((80 * (n - 1) - 7.5) * Math.PI / 15) }, Back: function (n) { return n * n * (3 * n - 2) }, Bounce: function (n) { for (var t, i = 4; ((t = Math.pow(2, --i)) - 1) / 11 > n;); return 1 / Math.pow(4, 3 - i) - 7.5625 * Math.pow((3 * t - 2) / 22 - n, 2) } }); n.each(t, function (t, i) { n.easing["easeIn" + t] = i; n.easing["easeOut" + t] = function (n) { return 1 - i(1 - n) }; n.easing["easeInOut" + t] = function (n) { return .5 > n ? i(2 * n) / 2 : 1 - i(-2 * n + 2) / 2 } }) }(); p = n.effects; n.effects.define("blind", "hide", function (t, i) { var e = { up: ["bottom", "top"], vertical: ["bottom", "top"], down: ["top", "bottom"], left: ["right", "left"], horizontal: ["right", "left"], right: ["left", "right"] }, u = n(this), o = t.direction || "up", s = u.cssClip(), r = { clip: n.extend({}, s) }, f = n.effects.createPlaceholder(u); r.clip[e[o][0]] = r.clip[e[o][1]]; "show" === t.mode && (u.cssClip(r.clip), f && f.css(n.effects.clipToBox(r)), r.clip = s); f && f.animate(n.effects.clipToBox(r), t.duration, t.easing); u.animate(r, { queue: !1, duration: t.duration, easing: t.easing, complete: i }) }); n.effects.define("bounce", function (t, i) { var e, o, a, u = n(this), p = t.mode, s = "hide" === p, w = "show" === p, h = t.direction || "up", r = t.distance, v = t.times || 5, b = 2 * v + (w || s ? 1 : 0), c = t.duration / b, l = t.easing, f = "up" === h || "down" === h ? "top" : "left", y = "up" === h || "left" === h, k = 0, d = u.queue().length; for (n.effects.createPlaceholder(u), a = u.css(f), r || (r = u["top" === f ? "outerHeight" : "outerWidth"]() / 3), w && (o = { opacity: 1 }, o[f] = a, u.css("opacity", 0).css(f, y ? 2 * -r : 2 * r).animate(o, c, l)), s && (r /= Math.pow(2, v - 1)), o = {}, o[f] = a; v > k; k++)e = {}, e[f] = (y ? "-=" : "+=") + r, u.animate(e, c, l).animate(o, c, l), r = s ? 2 * r : r / 2; s && (e = { opacity: 0 }, e[f] = (y ? "-=" : "+=") + r, u.animate(e, c, l)); u.queue(i); n.effects.unshift(u, d, b + 1) }); n.effects.define("clip", "hide", function (t, i) { var r, u = {}, f = n(this), e = t.direction || "vertical", o = "both" === e, s = o || "horizontal" === e, h = o || "vertical" === e; r = f.cssClip(); u.clip = { top: h ? (r.bottom - r.top) / 2 : r.top, right: s ? (r.right - r.left) / 2 : r.right, bottom: h ? (r.bottom - r.top) / 2 : r.bottom, left: s ? (r.right - r.left) / 2 : r.left }; n.effects.createPlaceholder(f); "show" === t.mode && (f.cssClip(u.clip), u.clip = r); f.animate(u, { queue: !1, duration: t.duration, easing: t.easing, complete: i }) }); n.effects.define("drop", "hide", function (t, i) { var e, u = n(this), h = t.mode, c = "show" === h, f = t.direction || "left", o = "up" === f || "down" === f ? "top" : "left", s = "up" === f || "left" === f ? "-=" : "+=", l = "+=" === s ? "-=" : "+=", r = { opacity: 0 }; n.effects.createPlaceholder(u); e = t.distance || u["top" === o ? "outerHeight" : "outerWidth"](!0) / 2; r[o] = s + e; c && (u.css(r), r[o] = l + e, r.opacity = 1); u.animate(r, { queue: !1, duration: t.duration, easing: t.easing, complete: i }) }); n.effects.define("explode", "hide", function (t, i) { function b() { p.push(this); p.length === e * c && k() } function k() { o.css({ visibility: "visible" }); n(p).remove(); i() } for (var u, l, a, v, y, e = t.pieces ? Math.round(Math.sqrt(t.pieces)) : 3, c = e, o = n(this), d = t.mode, f = "show" === d, w = o.show().css("visibility", "hidden").offset(), s = Math.ceil(o.outerWidth() / c), h = Math.ceil(o.outerHeight() / e), p = [], r = 0; e > r; r++)for (a = w.top + r * h, y = r - (e - 1) / 2, u = 0; c > u; u++)l = w.left + u * s, v = u - (c - 1) / 2, o.clone().appendTo("body").wrap("<div><\/div>").css({ position: "absolute", visibility: "visible", left: -u * s, top: -r * h }).parent().addClass("ui-effects-explode").css({ position: "absolute", overflow: "hidden", width: s, height: h, left: l + (f ? v * s : 0), top: a + (f ? y * h : 0), opacity: f ? 0 : 1 }).animate({ left: l + (f ? 0 : v * s), top: a + (f ? 0 : y * h), opacity: f ? 1 : 0 }, t.duration || 500, t.easing, b) }); n.effects.define("fade", "toggle", function (t, i) { var r = "show" === t.mode; n(this).css("opacity", r ? 0 : 1).animate({ opacity: r ? 1 : 0 }, { queue: !1, duration: t.duration, easing: t.easing, complete: i }) }); n.effects.define("fold", "hide", function (t, i) { var u = n(this), l = t.mode, v = "show" === l, y = "hide" === l, o = t.size || 15, a = /([0-9]+)%/.exec(o), p = !!t.horizFirst, f = p ? ["right", "bottom"] : ["bottom", "right"], s = t.duration / 2, h = n.effects.createPlaceholder(u), e = u.cssClip(), c = { clip: n.extend({}, e) }, r = { clip: n.extend({}, e) }, w = [e[f[0]], e[f[1]]], b = u.queue().length; a && (o = parseInt(a[1], 10) / 100 * w[y ? 0 : 1]); c.clip[f[0]] = o; r.clip[f[0]] = o; r.clip[f[1]] = 0; v && (u.cssClip(r.clip), h && h.css(n.effects.clipToBox(r)), r.clip = e); u.queue(function (i) { h && h.animate(n.effects.clipToBox(c), s, t.easing).animate(n.effects.clipToBox(r), s, t.easing); i() }).animate(c, s, t.easing).animate(r, s, t.easing).queue(i); n.effects.unshift(u, b, 4) }); n.effects.define("highlight", "show", function (t, i) { var r = n(this), u = { backgroundColor: r.css("backgroundColor") }; "hide" === t.mode && (u.opacity = 0); n.effects.saveStyle(r); r.css({ backgroundImage: "none", backgroundColor: t.color || "#ffff99" }).animate(u, { queue: !1, duration: t.duration, easing: t.easing, complete: i }) }); n.effects.define("size", function (t, i) { var l, r, p, u = n(this), v = ["fontSize"], s = ["borderTopWidth", "borderBottomWidth", "paddingTop", "paddingBottom"], h = ["borderLeftWidth", "borderRightWidth", "paddingLeft", "paddingRight"], w = t.mode, y = "effect" !== w, c = t.scale || "both", b = t.origin || ["middle", "center"], k = u.css("position"), a = u.position(), o = n.effects.scaledDimensions(u), f = t.from || o, e = t.to || n.effects.scaledDimensions(u, 0); n.effects.createPlaceholder(u); "show" === w && (p = f, f = e, e = p); r = { from: { y: f.height / o.height, x: f.width / o.width }, to: { y: e.height / o.height, x: e.width / o.width } }; ("box" === c || "both" === c) && (r.from.y !== r.to.y && (f = n.effects.setTransition(u, s, r.from.y, f), e = n.effects.setTransition(u, s, r.to.y, e)), r.from.x !== r.to.x && (f = n.effects.setTransition(u, h, r.from.x, f), e = n.effects.setTransition(u, h, r.to.x, e))); ("content" === c || "both" === c) && r.from.y !== r.to.y && (f = n.effects.setTransition(u, v, r.from.y, f), e = n.effects.setTransition(u, v, r.to.y, e)); b && (l = n.effects.getBaseline(b, o), f.top = (o.outerHeight - f.outerHeight) * l.y + a.top, f.left = (o.outerWidth - f.outerWidth) * l.x + a.left, e.top = (o.outerHeight - e.outerHeight) * l.y + a.top, e.left = (o.outerWidth - e.outerWidth) * l.x + a.left); u.css(f); ("content" === c || "both" === c) && (s = s.concat(["marginTop", "marginBottom"]).concat(v), h = h.concat(["marginLeft", "marginRight"]), u.find("*[width]").each(function () { var i = n(this), u = n.effects.scaledDimensions(i), f = { height: u.height * r.from.y, width: u.width * r.from.x, outerHeight: u.outerHeight * r.from.y, outerWidth: u.outerWidth * r.from.x }, e = { height: u.height * r.to.y, width: u.width * r.to.x, outerHeight: u.height * r.to.y, outerWidth: u.width * r.to.x }; r.from.y !== r.to.y && (f = n.effects.setTransition(i, s, r.from.y, f), e = n.effects.setTransition(i, s, r.to.y, e)); r.from.x !== r.to.x && (f = n.effects.setTransition(i, h, r.from.x, f), e = n.effects.setTransition(i, h, r.to.x, e)); y && n.effects.saveStyle(i); i.css(f); i.animate(e, t.duration, t.easing, function () { y && n.effects.restoreStyle(i) }) })); u.animate(e, { queue: !1, duration: t.duration, easing: t.easing, complete: function () { var t = u.offset(); 0 === e.opacity && u.css("opacity", f.opacity); y || (u.css("position", "static" === k ? "relative" : k).offset(t), n.effects.saveStyle(u)); i() } }) }); n.effects.define("scale", function (t, i) { var u = n(this), f = t.mode, e = parseInt(t.percent, 10) || (0 === parseInt(t.percent, 10) ? 0 : "effect" !== f ? 0 : 100), r = n.extend(!0, { from: n.effects.scaledDimensions(u), to: n.effects.scaledDimensions(u, e, t.direction || "both"), origin: t.origin || ["middle", "center"] }, t); t.fade && (r.from.opacity = 1, r.to.opacity = 0); n.effects.effect.size.call(this, r, i) }); n.effects.define("puff", "hide", function (t, i) { var r = n.extend(!0, {}, t, { fade: !0, percent: parseInt(t.percent, 10) || 150 }); n.effects.effect.scale.call(this, r, i) }); n.effects.define("pulsate", "show", function (t, i) { var r = n(this), e = t.mode, o = "show" === e, c = "hide" === e, l = o || c, f = 2 * (t.times || 5) + (l ? 1 : 0), s = t.duration / f, u = 0, h = 1, a = r.queue().length; for ((o || !r.is(":visible")) && (r.css("opacity", 0).show(), u = 1); f > h; h++)r.animate({ opacity: u }, s, t.easing), u = 1 - u; r.animate({ opacity: u }, s, t.easing); r.queue(i); n.effects.unshift(r, a, f + 1) }); n.effects.define("shake", function (t, i) { var l = 1, r = n(this), f = t.direction || "left", e = t.distance || 20, a = t.times || 3, v = 2 * a + 1, u = Math.round(t.duration / v), o = "up" === f || "down" === f ? "top" : "left", s = "up" === f || "left" === f, h = {}, c = {}, y = {}, p = r.queue().length; for (n.effects.createPlaceholder(r), h[o] = (s ? "-=" : "+=") + e, c[o] = (s ? "+=" : "-=") + 2 * e, y[o] = (s ? "-=" : "+=") + 2 * e, r.animate(h, u, t.easing); a > l; l++)r.animate(c, u, t.easing).animate(y, u, t.easing); r.animate(c, u, t.easing).animate(h, u / 2, t.easing).queue(i); n.effects.unshift(r, p, v + 1) }); n.effects.define("slide", "show", function (t, i) { var s, o, u = n(this), h = { up: ["bottom", "top"], down: ["top", "bottom"], left: ["right", "left"], right: ["left", "right"] }, c = t.mode, f = t.direction || "left", e = "up" === f || "down" === f ? "top" : "left", l = "up" === f || "left" === f, a = t.distance || u["top" === e ? "outerHeight" : "outerWidth"](!0), r = {}; n.effects.createPlaceholder(u); s = u.cssClip(); o = u.position()[e]; r[e] = (l ? -1 : 1) * a + o; r.clip = u.cssClip(); r.clip[h[f][1]] = r.clip[h[f][0]]; "show" === c && (u.cssClip(r.clip), u.css(e, r[e]), r.clip = s, r[e] = o); u.animate(r, { queue: !1, duration: t.duration, easing: t.easing, complete: i }) }); n.uiBackCompat !== !1 && (p = n.effects.define("transfer", function (t, i) { n(this).transfer(t, i) })); n.ui.focusable = function (t, i) { var u, f, e, r, o, s = t.nodeName.toLowerCase(); return "area" === s ? (u = t.parentNode, f = u.name, t.href && f && "map" === u.nodeName.toLowerCase() ? (e = n("img[usemap='#" + f + "']"), e.length > 0 && e.is(":visible")) : !1) : (/^(input|select|textarea|button|object)$/.test(s) ? (r = !t.disabled, r && (o = n(t).closest("fieldset")[0], o && (r = !o.disabled))) : r = "a" === s ? t.href || i : i, r && n(t).is(":visible") && b(n(t))) }; n.extend(n.expr[":"], { focusable: function (t) { return n.ui.focusable(t, null != n.attr(t, "tabindex")) } }); n.ui.focusable; n.fn.form = function () { return "string" == typeof this[0].form ? this.closest("form") : n(this[0].form) }; n.ui.formResetMixin = { _formResetHandler: function () { var t = n(this); setTimeout(function () { var i = t.data("ui-form-reset-instances"); n.each(i, function () { this.refresh() }) }) }, _bindFormResetHandler: function () { if (this.form = this.element.form(), this.form.length) { var n = this.form.data("ui-form-reset-instances") || []; n.length || this.form.on("reset.ui-form-reset", this._formResetHandler); n.push(this); this.form.data("ui-form-reset-instances", n) } }, _unbindFormResetHandler: function () { if (this.form.length) { var t = this.form.data("ui-form-reset-instances"); t.splice(n.inArray(this, t), 1); t.length ? this.form.data("ui-form-reset-instances", t) : this.form.removeData("ui-form-reset-instances").off("reset.ui-form-reset") } } }; "1.7" === n.fn.jquery.substring(0, 3) && (n.each(["Width", "Height"], function (t, i) { function r(t, i, r, u) { return n.each(e, function () { i -= parseFloat(n.css(t, "padding" + this)) || 0; r && (i -= parseFloat(n.css(t, "border" + this + "Width")) || 0); u && (i -= parseFloat(n.css(t, "margin" + this)) || 0) }), i } var e = "Width" === i ? ["Left", "Right"] : ["Top", "Bottom"], u = i.toLowerCase(), f = { innerWidth: n.fn.innerWidth, innerHeight: n.fn.innerHeight, outerWidth: n.fn.outerWidth, outerHeight: n.fn.outerHeight }; n.fn["inner" + i] = function (t) { return void 0 === t ? f["inner" + i].call(this) : this.each(function () { n(this).css(u, r(this, t) + "px") }) }; n.fn["outer" + i] = function (t, e) { return "number" != typeof t ? f["outer" + i].call(this, t) : this.each(function () { n(this).css(u, r(this, t, !0, e) + "px") }) } }), n.fn.addBack = function (n) { return this.add(null == n ? this.prevObject : this.prevObject.filter(n)) }); n.ui.keyCode = { BACKSPACE: 8, COMMA: 188, DELETE: 46, DOWN: 40, END: 35, ENTER: 13, ESCAPE: 27, HOME: 36, LEFT: 37, PAGE_DOWN: 34, PAGE_UP: 33, PERIOD: 190, RIGHT: 39, SPACE: 32, TAB: 9, UP: 38 }; n.ui.escapeSelector = function () { var n = /([!"#$%&'()*+,.\/:;<=>?@[\]^`{|}~])/g; return function (t) { return t.replace(n, "\\$1") } }(); n.fn.labels = function () { var t, r, u, i, f; return this[0].labels && this[0].labels.length ? this.pushStack(this[0].labels) : (i = this.eq(0).parents("label"), u = this.attr("id"), u && (t = this.eq(0).parents().last(), f = t.add(t.length ? t.siblings() : this.siblings()), r = "label[for='" + n.ui.escapeSelector(u) + "']", i = i.add(f.find(r).addBack(r))), this.pushStack(i)) }; n.fn.scrollParent = function (t) { var i = this.css("position"), u = "absolute" === i, f = t ? /(auto|scroll|hidden)/ : /(auto|scroll)/, r = this.parents().filter(function () { var t = n(this); return u && "static" === t.css("position") ? !1 : f.test(t.css("overflow") + t.css("overflow-y") + t.css("overflow-x")) }).eq(0); return "fixed" !== i && r.length ? r : n(this[0].ownerDocument || document) }; n.extend(n.expr[":"], { tabbable: function (t) { var i = n.attr(t, "tabindex"), r = null != i; return (!r || i >= 0) && n.ui.focusable(t, r) } }); n.fn.extend({ uniqueId: function () { var n = 0; return function () { return this.each(function () { this.id || (this.id = "ui-id-" + ++n) }) } }(), removeUniqueId: function () { return this.each(function () { /^ui-id-\d+$/.test(this.id) && n(this).removeAttr("id") }) } }); n.widget("ui.accordion", { version: "1.12.1", options: { active: 0, animate: {}, classes: { "ui-accordion-header": "ui-corner-top", "ui-accordion-header-collapsed": "ui-corner-all", "ui-accordion-content": "ui-corner-bottom" }, collapsible: !1, event: "click", header: "> li > :first-child, > :not(li):even", heightStyle: "auto", icons: { activeHeader: "ui-icon-triangle-1-s", header: "ui-icon-triangle-1-e" }, activate: null, beforeActivate: null }, hideProps: { borderTopWidth: "hide", borderBottomWidth: "hide", paddingTop: "hide", paddingBottom: "hide", height: "hide" }, showProps: { borderTopWidth: "show", borderBottomWidth: "show", paddingTop: "show", paddingBottom: "show", height: "show" }, _create: function () { var t = this.options; this.prevShow = this.prevHide = n(); this._addClass("ui-accordion", "ui-widget ui-helper-reset"); this.element.attr("role", "tablist"); t.collapsible || t.active !== !1 && null != t.active || (t.active = 0); this._processPanels(); 0 > t.active && (t.active += this.headers.length); this._refresh() }, _getCreateEventData: function () { return { header: this.active, panel: this.active.length ? this.active.next() : n() } }, _createIcons: function () { var i, r, t = this.options.icons; t && (i = n("<span>"), this._addClass(i, "ui-accordion-header-icon", "ui-icon " + t.header), i.prependTo(this.headers), r = this.active.children(".ui-accordion-header-icon"), this._removeClass(r, t.header)._addClass(r, null, t.activeHeader)._addClass(this.headers, "ui-accordion-icons")) }, _destroyIcons: function () { this._removeClass(this.headers, "ui-accordion-icons"); this.headers.children(".ui-accordion-header-icon").remove() }, _destroy: function () { var n; this.element.removeAttr("role"); this.headers.removeAttr("role aria-expanded aria-selected aria-controls tabIndex").removeUniqueId(); this._destroyIcons(); n = this.headers.next().css("display", "").removeAttr("role aria-hidden aria-labelledby").removeUniqueId(); "content" !== this.options.heightStyle && n.css("height", "") }, _setOption: function (n, t) { return "active" === n ? (this._activate(t), void 0) : ("event" === n && (this.options.event && this._off(this.headers, this.options.event), this._setupEvents(t)), this._super(n, t), "collapsible" !== n || t || this.options.active !== !1 || this._activate(0), "icons" === n && (this._destroyIcons(), t && this._createIcons()), void 0) }, _setOptionDisabled: function (n) { this._super(n); this.element.attr("aria-disabled", n); this._toggleClass(null, "ui-state-disabled", !!n); this._toggleClass(this.headers.add(this.headers.next()), null, "ui-state-disabled", !!n) }, _keydown: function (t) { if (!t.altKey && !t.ctrlKey) { var i = n.ui.keyCode, u = this.headers.length, f = this.headers.index(t.target), r = !1; switch (t.keyCode) { case i.RIGHT: case i.DOWN: r = this.headers[(f + 1) % u]; break; case i.LEFT: case i.UP: r = this.headers[(f - 1 + u) % u]; break; case i.SPACE: case i.ENTER: this._eventHandler(t); break; case i.HOME: r = this.headers[0]; break; case i.END: r = this.headers[u - 1] }r && (n(t.target).attr("tabIndex", -1), n(r).attr("tabIndex", 0), n(r).trigger("focus"), t.preventDefault()) } }, _panelKeyDown: function (t) { t.keyCode === n.ui.keyCode.UP && t.ctrlKey && n(t.currentTarget).prev().trigger("focus") }, refresh: function () { var t = this.options; this._processPanels(); t.active === !1 && t.collapsible === !0 || !this.headers.length ? (t.active = !1, this.active = n()) : t.active === !1 ? this._activate(0) : this.active.length && !n.contains(this.element[0], this.active[0]) ? this.headers.length === this.headers.find(".ui-state-disabled").length ? (t.active = !1, this.active = n()) : this._activate(Math.max(0, t.active - 1)) : t.active = this.headers.index(this.active); this._destroyIcons(); this._refresh() }, _processPanels: function () { var t = this.headers, n = this.panels; this.headers = this.element.find(this.options.header); this._addClass(this.headers, "ui-accordion-header ui-accordion-header-collapsed", "ui-state-default"); this.panels = this.headers.next().filter(":not(.ui-accordion-content-active)").hide(); this._addClass(this.panels, "ui-accordion-content", "ui-helper-reset ui-widget-content"); n && (this._off(t.not(this.headers)), this._off(n.not(this.panels))) }, _refresh: function () { var t, i = this.options, r = i.heightStyle, u = this.element.parent(); this.active = this._findActive(i.active); this._addClass(this.active, "ui-accordion-header-active", "ui-state-active")._removeClass(this.active, "ui-accordion-header-collapsed"); this._addClass(this.active.next(), "ui-accordion-content-active"); this.active.next().show(); this.headers.attr("role", "tab").each(function () { var t = n(this), r = t.uniqueId().attr("id"), i = t.next(), u = i.uniqueId().attr("id"); t.attr("aria-controls", u); i.attr("aria-labelledby", r) }).next().attr("role", "tabpanel"); this.headers.not(this.active).attr({ "aria-selected": "false", "aria-expanded": "false", tabIndex: -1 }).next().attr({ "aria-hidden": "true" }).hide(); this.active.length ? this.active.attr({ "aria-selected": "true", "aria-expanded": "true", tabIndex: 0 }).next().attr({ "aria-hidden": "false" }) : this.headers.eq(0).attr("tabIndex", 0); this._createIcons(); this._setupEvents(i.event); "fill" === r ? (t = u.height(), this.element.siblings(":visible").each(function () { var i = n(this), r = i.css("position"); "absolute" !== r && "fixed" !== r && (t -= i.outerHeight(!0)) }), this.headers.each(function () { t -= n(this).outerHeight(!0) }), this.headers.next().each(function () { n(this).height(Math.max(0, t - n(this).innerHeight() + n(this).height())) }).css("overflow", "auto")) : "auto" === r && (t = 0, this.headers.next().each(function () { var i = n(this).is(":visible"); i || n(this).show(); t = Math.max(t, n(this).css("height", "").height()); i || n(this).hide() }).height(t)) }, _activate: function (t) { var i = this._findActive(t)[0]; i !== this.active[0] && (i = i || this.active[0], this._eventHandler({ target: i, currentTarget: i, preventDefault: n.noop })) }, _findActive: function (t) { return "number" == typeof t ? this.headers.eq(t) : n() }, _setupEvents: function (t) { var i = { keydown: "_keydown" }; t && n.each(t.split(" "), function (n, t) { i[t] = "_eventHandler" }); this._off(this.headers.add(this.headers.next())); this._on(this.headers, i); this._on(this.headers.next(), { keydown: "_panelKeyDown" }); this._hoverable(this.headers); this._focusable(this.headers) }, _eventHandler: function (t) { var e, o, i = this.options, u = this.active, r = n(t.currentTarget), f = r[0] === u[0], s = f && i.collapsible, c = s ? n() : r.next(), l = u.next(), h = { oldHeader: u, oldPanel: l, newHeader: s ? n() : r, newPanel: c }; t.preventDefault(); f && !i.collapsible || this._trigger("beforeActivate", t, h) === !1 || (i.active = s ? !1 : this.headers.index(r), this.active = f ? n() : r, this._toggle(h), this._removeClass(u, "ui-accordion-header-active", "ui-state-active"), i.icons && (e = u.children(".ui-accordion-header-icon"), this._removeClass(e, null, i.icons.activeHeader)._addClass(e, null, i.icons.header)), f || (this._removeClass(r, "ui-accordion-header-collapsed")._addClass(r, "ui-accordion-header-active", "ui-state-active"), i.icons && (o = r.children(".ui-accordion-header-icon"), this._removeClass(o, null, i.icons.header)._addClass(o, null, i.icons.activeHeader)), this._addClass(r.next(), "ui-accordion-content-active"))) }, _toggle: function (t) { var r = t.newPanel, i = this.prevShow.length ? this.prevShow : t.oldPanel; this.prevShow.add(this.prevHide).stop(!0, !0); this.prevShow = r; this.prevHide = i; this.options.animate ? this._animate(r, i, t) : (i.hide(), r.show(), this._toggleComplete(t)); i.attr({ "aria-hidden": "true" }); i.prev().attr({ "aria-selected": "false", "aria-expanded": "false" }); r.length && i.length ? i.prev().attr({ tabIndex: -1, "aria-expanded": "false" }) : r.length && this.headers.filter(function () { return 0 === parseInt(n(this).attr("tabIndex"), 10) }).attr("tabIndex", -1); r.attr("aria-hidden", "false").prev().attr({ "aria-selected": "true", "aria-expanded": "true", tabIndex: 0 }) }, _animate: function (n, t, i) { var h, r, u, c = this, o = 0, l = n.css("box-sizing"), a = n.length && (!t.length || n.index() < t.index()), e = this.options.animate || {}, f = a && e.down || e, s = function () { c._toggleComplete(i) }; return "number" == typeof f && (u = f), "string" == typeof f && (r = f), r = r || f.easing || e.easing, u = u || f.duration || e.duration, t.length ? n.length ? (h = n.show().outerHeight(), t.animate(this.hideProps, { duration: u, easing: r, step: function (n, t) { t.now = Math.round(n) } }), n.hide().animate(this.showProps, { duration: u, easing: r, complete: s, step: function (n, i) { i.now = Math.round(n); "height" !== i.prop ? "content-box" === l && (o += i.now) : "content" !== c.options.heightStyle && (i.now = Math.round(h - t.outerHeight() - o), o = 0) } }), void 0) : t.animate(this.hideProps, u, r, s) : n.animate(this.showProps, u, r, s) }, _toggleComplete: function (n) { var t = n.oldPanel, i = t.prev(); this._removeClass(t, "ui-accordion-content-active"); this._removeClass(i, "ui-accordion-header-active")._addClass(i, "ui-accordion-header-collapsed"); t.length && (t.parent()[0].className = t.parent()[0].className); this._trigger("activate", null, n) } }); n.ui.safeActiveElement = function (n) { var t; try { t = n.activeElement } catch (i) { t = n.body } return t || (t = n.body), t.nodeName || (t = n.body), t }; n.widget("ui.menu", { version: "1.12.1", defaultElement: "<ul>", delay: 300, options: { icons: { submenu: "ui-icon-caret-1-e" }, items: "> *", menus: "ul", position: { my: "left top", at: "right top" }, role: "menu", blur: null, focus: null, select: null }, _create: function () { this.activeMenu = this.element; this.mouseHandled = !1; this.element.uniqueId().attr({ role: this.options.role, tabIndex: 0 }); this._addClass("ui-menu", "ui-widget ui-widget-content"); this._on({ "mousedown .ui-menu-item": function (n) { n.preventDefault() }, "click .ui-menu-item": function (t) { var i = n(t.target), r = n(n.ui.safeActiveElement(this.document[0])); !this.mouseHandled && i.not(".ui-state-disabled").length && (this.select(t), t.isPropagationStopped() || (this.mouseHandled = !0), i.has(".ui-menu").length ? this.expand(t) : !this.element.is(":focus") && r.closest(".ui-menu").length && (this.element.trigger("focus", [!0]), this.active && 1 === this.active.parents(".ui-menu").length && clearTimeout(this.timer))) }, "mouseenter .ui-menu-item": function (t) { if (!this.previousFilter) { var r = n(t.target).closest(".ui-menu-item"), i = n(t.currentTarget); r[0] === i[0] && (this._removeClass(i.siblings().children(".ui-state-active"), null, "ui-state-active"), this.focus(t, i)) } }, mouseleave: "collapseAll", "mouseleave .ui-menu": "collapseAll", focus: function (n, t) { var i = this.active || this.element.find(this.options.items).eq(0); t || this.focus(n, i) }, blur: function (t) { this._delay(function () { var i = !n.contains(this.element[0], n.ui.safeActiveElement(this.document[0])); i && this.collapseAll(t) }) }, keydown: "_keydown" }); this.refresh(); this._on(this.document, { click: function (n) { this._closeOnDocumentClick(n) && this.collapseAll(n); this.mouseHandled = !1 } }) }, _destroy: function () { var t = this.element.find(".ui-menu-item").removeAttr("role aria-disabled"), i = t.children(".ui-menu-item-wrapper").removeUniqueId().removeAttr("tabIndex role aria-haspopup"); this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeAttr("role aria-labelledby aria-expanded aria-hidden aria-disabled tabIndex").removeUniqueId().show(); i.children().each(function () { var t = n(this); t.data("ui-menu-submenu-caret") && t.remove() }) }, _keydown: function (t) { var i, u, r, f, e = !0; switch (t.keyCode) { case n.ui.keyCode.PAGE_UP: this.previousPage(t); break; case n.ui.keyCode.PAGE_DOWN: this.nextPage(t); break; case n.ui.keyCode.HOME: this._move("first", "first", t); break; case n.ui.keyCode.END: this._move("last", "last", t); break; case n.ui.keyCode.UP: this.previous(t); break; case n.ui.keyCode.DOWN: this.next(t); break; case n.ui.keyCode.LEFT: this.collapse(t); break; case n.ui.keyCode.RIGHT: this.active && !this.active.is(".ui-state-disabled") && this.expand(t); break; case n.ui.keyCode.ENTER: case n.ui.keyCode.SPACE: this._activate(t); break; case n.ui.keyCode.ESCAPE: this.collapse(t); break; default: e = !1; u = this.previousFilter || ""; f = !1; r = t.keyCode >= 96 && 105 >= t.keyCode ? "" + (t.keyCode - 96) : String.fromCharCode(t.keyCode); clearTimeout(this.filterTimer); r === u ? f = !0 : r = u + r; i = this._filterMenuItems(r); i = f && -1 !== i.index(this.active.next()) ? this.active.nextAll(".ui-menu-item") : i; i.length || (r = String.fromCharCode(t.keyCode), i = this._filterMenuItems(r)); i.length ? (this.focus(t, i), this.previousFilter = r, this.filterTimer = this._delay(function () { delete this.previousFilter }, 1e3)) : delete this.previousFilter }e && t.preventDefault() }, _activate: function (n) { this.active && !this.active.is(".ui-state-disabled") && (this.active.children("[aria-haspopup='true']").length ? this.expand(n) : this.select(n)) }, refresh: function () { var u, t, f, i, e, r = this, s = this.options.icons.submenu, o = this.element.find(this.options.menus); this._toggleClass("ui-menu-icons", null, !!this.element.find(".ui-icon").length); f = o.filter(":not(.ui-menu)").hide().attr({ role: this.options.role, "aria-hidden": "true", "aria-expanded": "false" }).each(function () { var t = n(this), i = t.prev(), u = n("<span>").data("ui-menu-submenu-caret", !0); r._addClass(u, "ui-menu-icon", "ui-icon " + s); i.attr("aria-haspopup", "true").prepend(u); t.attr("aria-labelledby", i.attr("id")) }); this._addClass(f, "ui-menu", "ui-widget ui-widget-content ui-front"); u = o.add(this.element); t = u.find(this.options.items); t.not(".ui-menu-item").each(function () { var t = n(this); r._isDivider(t) && r._addClass(t, "ui-menu-divider", "ui-widget-content") }); i = t.not(".ui-menu-item, .ui-menu-divider"); e = i.children().not(".ui-menu").uniqueId().attr({ tabIndex: -1, role: this._itemRole() }); this._addClass(i, "ui-menu-item")._addClass(e, "ui-menu-item-wrapper"); t.filter(".ui-state-disabled").attr("aria-disabled", "true"); this.active && !n.contains(this.element[0], this.active[0]) && this.blur() }, _itemRole: function () { return { menu: "menuitem", listbox: "option" }[this.options.role] }, _setOption: function (n, t) { if ("icons" === n) { var i = this.element.find(".ui-menu-icon"); this._removeClass(i, null, this.options.icons.submenu)._addClass(i, null, t.submenu) } this._super(n, t) }, _setOptionDisabled: function (n) { this._super(n); this.element.attr("aria-disabled", n + ""); this._toggleClass(null, "ui-state-disabled", !!n) }, focus: function (n, t) { var i, r, u; this.blur(n, n && "focus" === n.type); this._scrollIntoView(t); this.active = t.first(); r = this.active.children(".ui-menu-item-wrapper"); this._addClass(r, null, "ui-state-active"); this.options.role && this.element.attr("aria-activedescendant", r.attr("id")); u = this.active.parent().closest(".ui-menu-item").children(".ui-menu-item-wrapper"); this._addClass(u, null, "ui-state-active"); n && "keydown" === n.type ? this._close() : this.timer = this._delay(function () { this._close() }, this.delay); i = t.children(".ui-menu"); i.length && n && /^mouse/.test(n.type) && this._startOpening(i); this.activeMenu = t.parent(); this._trigger("focus", n, { item: t }) }, _scrollIntoView: function (t) { var e, o, i, r, u, f; this._hasScroll() && (e = parseFloat(n.css(this.activeMenu[0], "borderTopWidth")) || 0, o = parseFloat(n.css(this.activeMenu[0], "paddingTop")) || 0, i = t.offset().top - this.activeMenu.offset().top - e - o, r = this.activeMenu.scrollTop(), u = this.activeMenu.height(), f = t.outerHeight(), 0 > i ? this.activeMenu.scrollTop(r + i) : i + f > u && this.activeMenu.scrollTop(r + i - u + f)) }, blur: function (n, t) { t || clearTimeout(this.timer); this.active && (this._removeClass(this.active.children(".ui-menu-item-wrapper"), null, "ui-state-active"), this._trigger("blur", n, { item: this.active }), this.active = null) }, _startOpening: function (n) { clearTimeout(this.timer); "true" === n.attr("aria-hidden") && (this.timer = this._delay(function () { this._close(); this._open(n) }, this.delay)) }, _open: function (t) { var i = n.extend({ "of": this.active }, this.options.position); clearTimeout(this.timer); this.element.find(".ui-menu").not(t.parents(".ui-menu")).hide().attr("aria-hidden", "true"); t.show().removeAttr("aria-hidden").attr("aria-expanded", "true").position(i) }, collapseAll: function (t, i) { clearTimeout(this.timer); this.timer = this._delay(function () { var r = i ? this.element : n(t && t.target).closest(this.element.find(".ui-menu")); r.length || (r = this.element); this._close(r); this.blur(t); this._removeClass(r.find(".ui-state-active"), null, "ui-state-active"); this.activeMenu = r }, this.delay) }, _close: function (n) { n || (n = this.active ? this.active.parent() : this.element); n.find(".ui-menu").hide().attr("aria-hidden", "true").attr("aria-expanded", "false") }, _closeOnDocumentClick: function (t) { return !n(t.target).closest(".ui-menu").length }, _isDivider: function (n) { return !/[^\-\u2014\u2013\s]/.test(n.text()) }, collapse: function (n) { var t = this.active && this.active.parent().closest(".ui-menu-item", this.element); t && t.length && (this._close(), this.focus(n, t)) }, expand: function (n) { var t = this.active && this.active.children(".ui-menu ").find(this.options.items).first(); t && t.length && (this._open(t.parent()), this._delay(function () { this.focus(n, t) })) }, next: function (n) { this._move("next", "first", n) }, previous: function (n) { this._move("prev", "last", n) }, isFirstItem: function () { return this.active && !this.active.prevAll(".ui-menu-item").length }, isLastItem: function () { return this.active && !this.active.nextAll(".ui-menu-item").length }, _move: function (n, t, i) { var r; this.active && (r = "first" === n || "last" === n ? this.active["first" === n ? "prevAll" : "nextAll"](".ui-menu-item").eq(-1) : this.active[n + "All"](".ui-menu-item").eq(0)); r && r.length && this.active || (r = this.activeMenu.find(this.options.items)[t]()); this.focus(i, r) }, nextPage: function (t) { var i, r, u; return this.active ? (this.isLastItem() || (this._hasScroll() ? (r = this.active.offset().top, u = this.element.height(), this.active.nextAll(".ui-menu-item").each(function () { return i = n(this), 0 > i.offset().top - r - u }), this.focus(t, i)) : this.focus(t, this.activeMenu.find(this.options.items)[this.active ? "last" : "first"]())), void 0) : (this.next(t), void 0) }, previousPage: function (t) { var i, r, u; return this.active ? (this.isFirstItem() || (this._hasScroll() ? (r = this.active.offset().top, u = this.element.height(), this.active.prevAll(".ui-menu-item").each(function () { return i = n(this), i.offset().top - r + u > 0 }), this.focus(t, i)) : this.focus(t, this.activeMenu.find(this.options.items).first())), void 0) : (this.next(t), void 0) }, _hasScroll: function () { return this.element.outerHeight() < this.element.prop("scrollHeight") }, select: function (t) { this.active = this.active || n(t.target).closest(".ui-menu-item"); var i = { item: this.active }; this.active.has(".ui-menu").length || this.collapseAll(t, !0); this._trigger("select", t, i) }, _filterMenuItems: function (t) { var i = t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&"), r = RegExp("^" + i, "i"); return this.activeMenu.find(this.options.items).filter(".ui-menu-item").filter(function () { return r.test(n.trim(n(this).children(".ui-menu-item-wrapper").text())) }) } }); n.widget("ui.autocomplete", { version: "1.12.1", defaultElement: "<input>", options: { appendTo: null, autoFocus: !1, delay: 300, minLength: 1, position: { my: "left top", at: "left bottom", collision: "none" }, source: null, change: null, close: null, focus: null, open: null, response: null, search: null, select: null }, requestIndex: 0, pending: 0, _create: function () { var t, i, r, u = this.element[0].nodeName.toLowerCase(), f = "textarea" === u, e = "input" === u; this.isMultiLine = f || !e && this._isContentEditable(this.element); this.valueMethod = this.element[f || e ? "val" : "text"]; this.isNewMenu = !0; this._addClass("ui-autocomplete-input"); this.element.attr("autocomplete", "off"); this._on(this.element, { keydown: function (u) { if (this.element.prop("readOnly")) return t = !0, r = !0, i = !0, void 0; t = !1; r = !1; i = !1; var f = n.ui.keyCode; switch (u.keyCode) { case f.PAGE_UP: t = !0; this._move("previousPage", u); break; case f.PAGE_DOWN: t = !0; this._move("nextPage", u); break; case f.UP: t = !0; this._keyEvent("previous", u); break; case f.DOWN: t = !0; this._keyEvent("next", u); break; case f.ENTER: this.menu.active && (t = !0, u.preventDefault(), this.menu.select(u)); break; case f.TAB: this.menu.active && this.menu.select(u); break; case f.ESCAPE: this.menu.element.is(":visible") && (this.isMultiLine || this._value(this.term), this.close(u), u.preventDefault()); break; default: i = !0; this._searchTimeout(u) } }, keypress: function (r) { if (t) return t = !1, (!this.isMultiLine || this.menu.element.is(":visible")) && r.preventDefault(), void 0; if (!i) { var u = n.ui.keyCode; switch (r.keyCode) { case u.PAGE_UP: this._move("previousPage", r); break; case u.PAGE_DOWN: this._move("nextPage", r); break; case u.UP: this._keyEvent("previous", r); break; case u.DOWN: this._keyEvent("next", r) } } }, input: function (n) { return r ? (r = !1, n.preventDefault(), void 0) : (this._searchTimeout(n), void 0) }, focus: function () { this.selectedItem = null; this.previous = this._value() }, blur: function (n) { return this.cancelBlur ? (delete this.cancelBlur, void 0) : (clearTimeout(this.searching), this.close(n), this._change(n), void 0) } }); this._initSource(); this.menu = n("<ul>").appendTo(this._appendTo()).menu({ role: null }).hide().menu("instance"); this._addClass(this.menu.element, "ui-autocomplete", "ui-front"); this._on(this.menu.element, { mousedown: function (t) { t.preventDefault(); this.cancelBlur = !0; this._delay(function () { delete this.cancelBlur; this.element[0] !== n.ui.safeActiveElement(this.document[0]) && this.element.trigger("focus") }) }, menufocus: function (t, i) { var r, u; return this.isNewMenu && (this.isNewMenu = !1, t.originalEvent && /^mouse/.test(t.originalEvent.type)) ? (this.menu.blur(), this.document.one("mousemove", function () { n(t.target).trigger(t.originalEvent) }), void 0) : (u = i.item.data("ui-autocomplete-item"), !1 !== this._trigger("focus", t, { item: u }) && t.originalEvent && /^key/.test(t.originalEvent.type) && this._value(u.value), r = i.item.attr("aria-label") || u.value, r && n.trim(r).length && (this.liveRegion.children().hide(), n("<div>").text(r).appendTo(this.liveRegion)), void 0) }, menuselect: function (t, i) { var r = i.item.data("ui-autocomplete-item"), u = this.previous; this.element[0] !== n.ui.safeActiveElement(this.document[0]) && (this.element.trigger("focus"), this.previous = u, this._delay(function () { this.previous = u; this.selectedItem = r })); !1 !== this._trigger("select", t, { item: r }) && this._value(r.value); this.term = this._value(); this.close(t); this.selectedItem = r } }); this.liveRegion = n("<div>", { role: "status", "aria-live": "assertive", "aria-relevant": "additions" }).appendTo(this.document[0].body); this._addClass(this.liveRegion, null, "ui-helper-hidden-accessible"); this._on(this.window, { beforeunload: function () { this.element.removeAttr("autocomplete") } }) }, _destroy: function () { clearTimeout(this.searching); this.element.removeAttr("autocomplete"); this.menu.element.remove(); this.liveRegion.remove() }, _setOption: function (n, t) { this._super(n, t); "source" === n && this._initSource(); "appendTo" === n && this.menu.element.appendTo(this._appendTo()); "disabled" === n && t && this.xhr && this.xhr.abort() }, _isEventTargetInWidget: function (t) { var i = this.menu.element[0]; return t.target === this.element[0] || t.target === i || n.contains(i, t.target) }, _closeOnClickOutside: function (n) { this._isEventTargetInWidget(n) || this.close() }, _appendTo: function () { var t = this.options.appendTo; return t && (t = t.jquery || t.nodeType ? n(t) : this.document.find(t).eq(0)), t && t[0] || (t = this.element.closest(".ui-front, dialog")), t.length || (t = this.document[0].body), t }, _initSource: function () { var i, r, t = this; n.isArray(this.options.source) ? (i = this.options.source, this.source = function (t, r) { r(n.ui.autocomplete.filter(i, t.term)) }) : "string" == typeof this.options.source ? (r = this.options.source, this.source = function (i, u) { t.xhr && t.xhr.abort(); t.xhr = n.ajax({ url: r, data: i, dataType: "json", success: function (n) { u(n) }, error: function () { u([]) } }) }) : this.source = this.options.source }, _searchTimeout: function (n) { clearTimeout(this.searching); this.searching = this._delay(function () { var t = this.term === this._value(), i = this.menu.element.is(":visible"), r = n.altKey || n.ctrlKey || n.metaKey || n.shiftKey; t && (!t || i || r) || (this.selectedItem = null, this.search(null, n)) }, this.options.delay) }, search: function (n, t) { return n = null != n ? n : this._value(), this.term = this._value(), n.length < this.options.minLength ? this.close(t) : this._trigger("search", t) !== !1 ? this._search(n) : void 0 }, _search: function (n) { this.pending++; this._addClass("ui-autocomplete-loading"); this.cancelSearch = !1; this.source({ term: n }, this._response()) }, _response: function () { var t = ++this.requestIndex; return n.proxy(function (n) { t === this.requestIndex && this.__response(n); this.pending--; this.pending || this._removeClass("ui-autocomplete-loading") }, this) }, __response: function (n) { n && (n = this._normalize(n)); this._trigger("response", null, { content: n }); !this.options.disabled && n && n.length && !this.cancelSearch ? (this._suggest(n), this._trigger("open")) : this._close() }, close: function (n) { this.cancelSearch = !0; this._close(n) }, _close: function (n) { this._off(this.document, "mousedown"); this.menu.element.is(":visible") && (this.menu.element.hide(), this.menu.blur(), this.isNewMenu = !0, this._trigger("close", n)) }, _change: function (n) { this.previous !== this._value() && this._trigger("change", n, { item: this.selectedItem }) }, _normalize: function (t) { return t.length && t[0].label && t[0].value ? t : n.map(t, function (t) { return "string" == typeof t ? { label: t, value: t } : n.extend({}, t, { label: t.label || t.value, value: t.value || t.label }) }) }, _suggest: function (t) { var i = this.menu.element.empty(); this._renderMenu(i, t); this.isNewMenu = !0; this.menu.refresh(); i.show(); this._resizeMenu(); i.position(n.extend({ "of": this.element }, this.options.position)); this.options.autoFocus && this.menu.next(); this._on(this.document, { mousedown: "_closeOnClickOutside" }) }, _resizeMenu: function () { var n = this.menu.element; n.outerWidth(Math.max(n.width("").outerWidth() + 1, this.element.outerWidth())) }, _renderMenu: function (t, i) { var r = this; n.each(i, function (n, i) { r._renderItemData(t, i) }) }, _renderItemData: function (n, t) { return this._renderItem(n, t).data("ui-autocomplete-item", t) }, _renderItem: function (t, i) { return n("<li>").append(n("<div>").text(i.label)).appendTo(t) }, _move: function (n, t) { return this.menu.element.is(":visible") ? this.menu.isFirstItem() && /^previous/.test(n) || this.menu.isLastItem() && /^next/.test(n) ? (this.isMultiLine || this._value(this.term), this.menu.blur(), void 0) : (this.menu[n](t), void 0) : (this.search(null, t), void 0) }, widget: function () { return this.menu.element }, _value: function () { return this.valueMethod.apply(this.element, arguments) }, _keyEvent: function (n, t) { (!this.isMultiLine || this.menu.element.is(":visible")) && (this._move(n, t), t.preventDefault()) }, _isContentEditable: function (n) { if (!n.length) return !1; var t = n.prop("contentEditable"); return "inherit" === t ? this._isContentEditable(n.parent()) : "true" === t } }); n.extend(n.ui.autocomplete, { escapeRegex: function (n) { return n.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&") }, filter: function (t, i) { var r = RegExp(n.ui.autocomplete.escapeRegex(i), "i"); return n.grep(t, function (n) { return r.test(n.label || n.value || n) }) } }); n.widget("ui.autocomplete", n.ui.autocomplete, { options: { messages: { noResults: "No search results.", results: function (n) { return n + (n > 1 ? " results are" : " result is") + " available, use up and down arrow keys to navigate." } } }, __response: function (t) { var i; this._superApply(arguments); this.options.disabled || this.cancelSearch || (i = t && t.length ? this.options.messages.results(t.length) : this.options.messages.noResults, this.liveRegion.children().hide(), n("<div>").text(i).appendTo(this.liveRegion)) } }); n.ui.autocomplete; w = /ui-corner-([a-z]){2,6}/g; n.widget("ui.controlgroup", { version: "1.12.1", defaultElement: "<div>", options: { direction: "horizontal", disabled: null, onlyVisible: !0, items: { button: "input[type=button], input[type=submit], input[type=reset], button, a", controlgroupLabel: ".ui-controlgroup-label", checkboxradio: "input[type='checkbox'], input[type='radio']", selectmenu: "select", spinner: ".ui-spinner-input" } }, _create: function () { this._enhance() }, _enhance: function () { this.element.attr("role", "toolbar"); this.refresh() }, _destroy: function () { this._callChildMethod("destroy"); this.childWidgets.removeData("ui-controlgroup-data"); this.element.removeAttr("role"); this.options.items.controlgroupLabel && this.element.find(this.options.items.controlgroupLabel).find(".ui-controlgroup-label-contents").contents().unwrap() }, _initWidgets: function () { var t = this, i = []; n.each(this.options.items, function (r, u) { var f, e = {}; if (u) return "controlgroupLabel" === r ? (f = t.element.find(u), f.each(function () { var t = n(this); t.children(".ui-controlgroup-label-contents").length || t.contents().wrapAll("<span class='ui-controlgroup-label-contents'><\/span>") }), t._addClass(f, null, "ui-widget ui-widget-content ui-state-default"), i = i.concat(f.get()), void 0) : (n.fn[r] && (e = t["_" + r + "Options"] ? t["_" + r + "Options"]("middle") : { classes: {} }, t.element.find(u).each(function () { var u = n(this), f = u[r]("instance"), o = n.widget.extend({}, e), s; "button" === r && u.parent(".ui-spinner").length || (f || (f = u[r]()[r]("instance")), f && (o.classes = t._resolveClassesValues(o.classes, f)), u[r](o), s = u[r]("widget"), n.data(s[0], "ui-controlgroup-data", f ? f : u[r]("instance")), i.push(s[0])) })), void 0) }); this.childWidgets = n(n.unique(i)); this._addClass(this.childWidgets, "ui-controlgroup-item") }, _callChildMethod: function (t) { this.childWidgets.each(function () { var r = n(this), i = r.data("ui-controlgroup-data"); i && i[t] && i[t]() }) }, _updateCornerClass: function (n, t) { var i = this._buildSimpleOptions(t, "label").classes.label; this._removeClass(n, null, "ui-corner-top ui-corner-bottom ui-corner-left ui-corner-right ui-corner-all"); this._addClass(n, null, i) }, _buildSimpleOptions: function (n, t) { var i = "vertical" === this.options.direction, r = { classes: {} }; return r.classes[t] = { middle: "", first: "ui-corner-" + (i ? "top" : "left"), last: "ui-corner-" + (i ? "bottom" : "right"), only: "ui-corner-all" }[n], r }, _spinnerOptions: function (n) { var t = this._buildSimpleOptions(n, "ui-spinner"); return t.classes["ui-spinner-up"] = "", t.classes["ui-spinner-down"] = "", t }, _buttonOptions: function (n) { return this._buildSimpleOptions(n, "ui-button") }, _checkboxradioOptions: function (n) { return this._buildSimpleOptions(n, "ui-checkboxradio-label") }, _selectmenuOptions: function (n) { var t = "vertical" === this.options.direction; return { width: t ? "auto" : !1, classes: { middle: { "ui-selectmenu-button-open": "", "ui-selectmenu-button-closed": "" }, first: { "ui-selectmenu-button-open": "ui-corner-" + (t ? "top" : "tl"), "ui-selectmenu-button-closed": "ui-corner-" + (t ? "top" : "left") }, last: { "ui-selectmenu-button-open": t ? "" : "ui-corner-tr", "ui-selectmenu-button-closed": "ui-corner-" + (t ? "bottom" : "right") }, only: { "ui-selectmenu-button-open": "ui-corner-top", "ui-selectmenu-button-closed": "ui-corner-all" } }[n] } }, _resolveClassesValues: function (t, i) { var r = {}; return n.each(t, function (u) { var f = i.options.classes[u] || ""; f = n.trim(f.replace(w, "")); r[u] = (f + " " + t[u]).replace(/\s+/g, " ") }), r }, _setOption: function (n, t) { return "direction" === n && this._removeClass("ui-controlgroup-" + this.options.direction), this._super(n, t), "disabled" === n ? (this._callChildMethod(t ? "disable" : "enable"), void 0) : (this.refresh(), void 0) }, refresh: function () { var t, i = this; this._addClass("ui-controlgroup ui-controlgroup-" + this.options.direction); "horizontal" === this.options.direction && this._addClass(null, "ui-helper-clearfix"); this._initWidgets(); t = this.childWidgets; this.options.onlyVisible && (t = t.filter(":visible")); t.length && (n.each(["first", "last"], function (n, r) { var u = t[r]().data("ui-controlgroup-data"), f; u && i["_" + u.widgetName + "Options"] ? (f = i["_" + u.widgetName + "Options"](1 === t.length ? "only" : r), f.classes = i._resolveClassesValues(f.classes, u), u.element[u.widgetName](f)) : i._updateCornerClass(t[r](), r) }), this._callChildMethod("refresh")) } }); n.widget("ui.checkboxradio", [n.ui.formResetMixin, { version: "1.12.1", options: { disabled: null, label: null, icon: !0, classes: { "ui-checkboxradio-label": "ui-corner-all", "ui-checkboxradio-icon": "ui-corner-all" } }, _getCreateOptions: function () { var t, i, u = this, r = this._super() || {}; return this._readType(), i = this.element.labels(), this.label = n(i[i.length - 1]), this.label.length || n.error("No label found for checkboxradio widget"), this.originalLabel = "", this.label.contents().not(this.element[0]).each(function () { u.originalLabel += 3 === this.nodeType ? n(this).text() : this.outerHTML }), this.originalLabel && (r.label = this.originalLabel), t = this.element[0].disabled, null != t && (r.disabled = t), r }, _create: function () { var n = this.element[0].checked; this._bindFormResetHandler(); null == this.options.disabled && (this.options.disabled = this.element[0].disabled); this._setOption("disabled", this.options.disabled); this._addClass("ui-checkboxradio", "ui-helper-hidden-accessible"); this._addClass(this.label, "ui-checkboxradio-label", "ui-button ui-widget"); "radio" === this.type && this._addClass(this.label, "ui-checkboxradio-radio-label"); this.options.label && this.options.label !== this.originalLabel ? this._updateLabel() : this.originalLabel && (this.options.label = this.originalLabel); this._enhance(); n && (this._addClass(this.label, "ui-checkboxradio-checked", "ui-state-active"), this.icon && this._addClass(this.icon, null, "ui-state-hover")); this._on({ change: "_toggleClasses", focus: function () { this._addClass(this.label, null, "ui-state-focus ui-visual-focus") }, blur: function () { this._removeClass(this.label, null, "ui-state-focus ui-visual-focus") } }) }, _readType: function () { var t = this.element[0].nodeName.toLowerCase(); this.type = this.element[0].type; "input" === t && /radio|checkbox/.test(this.type) || n.error("Can't create checkboxradio on element.nodeName=" + t + " and element.type=" + this.type) }, _enhance: function () { this._updateIcon(this.element[0].checked) }, widget: function () { return this.label }, _getRadioGroup: function () { var t, i = this.element[0].name, r = "input[name='" + n.ui.escapeSelector(i) + "']"; return i ? (t = this.form.length ? n(this.form[0].elements).filter(r) : n(r).filter(function () { return 0 === n(this).form().length }), t.not(this.element)) : n([]) }, _toggleClasses: function () { var t = this.element[0].checked; this._toggleClass(this.label, "ui-checkboxradio-checked", "ui-state-active", t); this.options.icon && "checkbox" === this.type && this._toggleClass(this.icon, null, "ui-icon-check ui-state-checked", t)._toggleClass(this.icon, null, "ui-icon-blank", !t); "radio" === this.type && this._getRadioGroup().each(function () { var t = n(this).checkboxradio("instance"); t && t._removeClass(t.label, "ui-checkboxradio-checked", "ui-state-active") }) }, _destroy: function () { this._unbindFormResetHandler(); this.icon && (this.icon.remove(), this.iconSpace.remove()) }, _setOption: function (n, t) { if ("label" !== n || t) return (this._super(n, t), "disabled" === n ? (this._toggleClass(this.label, null, "ui-state-disabled", t), this.element[0].disabled = t, void 0) : (this.refresh(), void 0)) }, _updateIcon: function (t) { var i = "ui-icon ui-icon-background "; this.options.icon ? (this.icon || (this.icon = n("<span>"), this.iconSpace = n("<span> <\/span>"), this._addClass(this.iconSpace, "ui-checkboxradio-icon-space")), "checkbox" === this.type ? (i += t ? "ui-icon-check ui-state-checked" : "ui-icon-blank", this._removeClass(this.icon, null, t ? "ui-icon-blank" : "ui-icon-check")) : i += "ui-icon-blank", this._addClass(this.icon, "ui-checkboxradio-icon", i), t || this._removeClass(this.icon, null, "ui-icon-check ui-state-checked"), this.icon.prependTo(this.label).after(this.iconSpace)) : void 0 !== this.icon && (this.icon.remove(), this.iconSpace.remove(), delete this.icon) }, _updateLabel: function () { var n = this.label.contents().not(this.element[0]); this.icon && (n = n.not(this.icon[0])); this.iconSpace && (n = n.not(this.iconSpace[0])); n.remove(); this.label.append(this.options.label) }, refresh: function () { var n = this.element[0].checked, t = this.element[0].disabled; this._updateIcon(n); this._toggleClass(this.label, "ui-checkboxradio-checked", "ui-state-active", n); null !== this.options.label && this._updateLabel(); t !== this.options.disabled && this._setOptions({ disabled: t }) } }]); n.ui.checkboxradio; n.widget("ui.button", { version: "1.12.1", defaultElement: "<button>", options: { classes: { "ui-button": "ui-corner-all" }, disabled: null, icon: null, iconPosition: "beginning", label: null, showLabel: !0 }, _getCreateOptions: function () { var n, t = this._super() || {}; return this.isInput = this.element.is("input"), n = this.element[0].disabled, null != n && (t.disabled = n), this.originalLabel = this.isInput ? this.element.val() : this.element.html(), this.originalLabel && (t.label = this.originalLabel), t }, _create: function () { !this.option.showLabel & !this.options.icon && (this.options.showLabel = !0); null == this.options.disabled && (this.options.disabled = this.element[0].disabled || !1); this.hasTitle = !!this.element.attr("title"); this.options.label && this.options.label !== this.originalLabel && (this.isInput ? this.element.val(this.options.label) : this.element.html(this.options.label)); this._addClass("ui-button", "ui-widget"); this._setOption("disabled", this.options.disabled); this._enhance(); this.element.is("a") && this._on({ keyup: function (t) { t.keyCode === n.ui.keyCode.SPACE && (t.preventDefault(), this.element[0].click ? this.element[0].click() : this.element.trigger("click")) } }) }, _enhance: function () { this.element.is("button") || this.element.attr("role", "button"); this.options.icon && (this._updateIcon("icon", this.options.icon), this._updateTooltip()) }, _updateTooltip: function () { this.title = this.element.attr("title"); this.options.showLabel || this.title || this.element.attr("title", this.options.label) }, _updateIcon: function (t, i) { var u = "iconPosition" !== t, r = u ? this.options.iconPosition : i, f = "top" === r || "bottom" === r; this.icon ? u && this._removeClass(this.icon, null, this.options.icon) : (this.icon = n("<span>"), this._addClass(this.icon, "ui-button-icon", "ui-icon"), this.options.showLabel || this._addClass("ui-button-icon-only")); u && this._addClass(this.icon, null, i); this._attachIcon(r); f ? (this._addClass(this.icon, null, "ui-widget-icon-block"), this.iconSpace && this.iconSpace.remove()) : (this.iconSpace || (this.iconSpace = n("<span> <\/span>"), this._addClass(this.iconSpace, "ui-button-icon-space")), this._removeClass(this.icon, null, "ui-wiget-icon-block"), this._attachIconSpace(r)) }, _destroy: function () { this.element.removeAttr("role"); this.icon && this.icon.remove(); this.iconSpace && this.iconSpace.remove(); this.hasTitle || this.element.removeAttr("title") }, _attachIconSpace: function (n) { this.icon[/^(?:end|bottom)/.test(n) ? "before" : "after"](this.iconSpace) }, _attachIcon: function (n) { this.element[/^(?:end|bottom)/.test(n) ? "append" : "prepend"](this.icon) }, _setOptions: function (n) { var t = void 0 === n.showLabel ? this.options.showLabel : n.showLabel, i = void 0 === n.icon ? this.options.icon : n.icon; t || i || (n.showLabel = !0); this._super(n) }, _setOption: function (n, t) { "icon" === n && (t ? this._updateIcon(n, t) : this.icon && (this.icon.remove(), this.iconSpace && this.iconSpace.remove())); "iconPosition" === n && this._updateIcon(n, t); "showLabel" === n && (this._toggleClass("ui-button-icon-only", null, !t), this._updateTooltip()); "label" === n && (this.isInput ? this.element.val(t) : (this.element.html(t), this.icon && (this._attachIcon(this.options.iconPosition), this._attachIconSpace(this.options.iconPosition)))); this._super(n, t); "disabled" === n && (this._toggleClass(null, "ui-state-disabled", t), this.element[0].disabled = t, t && this.element.blur()) }, refresh: function () { var n = this.element.is("input, button") ? this.element[0].disabled : this.element.hasClass("ui-button-disabled"); n !== this.options.disabled && this._setOptions({ disabled: n }); this._updateTooltip() } }); n.uiBackCompat !== !1 && (n.widget("ui.button", n.ui.button, { options: { text: !0, icons: { primary: null, secondary: null } }, _create: function () { this.options.showLabel && !this.options.text && (this.options.showLabel = this.options.text); !this.options.showLabel && this.options.text && (this.options.text = this.options.showLabel); this.options.icon || !this.options.icons.primary && !this.options.icons.secondary ? this.options.icon && (this.options.icons.primary = this.options.icon) : this.options.icons.primary ? this.options.icon = this.options.icons.primary : (this.options.icon = this.options.icons.secondary, this.options.iconPosition = "end"); this._super() }, _setOption: function (n, t) { return "text" === n ? (this._super("showLabel", t), void 0) : ("showLabel" === n && (this.options.text = t), "icon" === n && (this.options.icons.primary = t), "icons" === n && (t.primary ? (this._super("icon", t.primary), this._super("iconPosition", "beginning")) : t.secondary && (this._super("icon", t.secondary), this._super("iconPosition", "end"))), this._superApply(arguments), void 0) } }), n.fn.button = function (t) { return function () { return !this.length || this.length && "INPUT" !== this[0].tagName || this.length && "INPUT" === this[0].tagName && "checkbox" !== this.attr("type") && "radio" !== this.attr("type") ? t.apply(this, arguments) : (n.ui.checkboxradio || n.error("Checkboxradio widget missing"), 0 === arguments.length ? this.checkboxradio({ icon: !1 }) : this.checkboxradio.apply(this, arguments)) } }(n.fn.button), n.fn.buttonset = function () { return n.ui.controlgroup || n.error("Controlgroup widget missing"), "option" === arguments[0] && "items" === arguments[1] && arguments[2] ? this.controlgroup.apply(this, [arguments[0], "items.button", arguments[2]]) : "option" === arguments[0] && "items" === arguments[1] ? this.controlgroup.apply(this, [arguments[0], "items.button"]) : ("object" == typeof arguments[0] && arguments[0].items && (arguments[0].items = { button: arguments[0].items }), this.controlgroup.apply(this, arguments)) }); n.ui.button; n.extend(n.ui, { datepicker: { version: "1.12.1" } }); n.extend(c.prototype, { markerClassName: "hasDatepicker", maxRows: 4, _widgetDatepicker: function () { return this.dpDiv }, setDefaults: function (n) { return u(this._defaults, n || {}), this }, _attachDatepicker: function (t, i) { var r, f, u; r = t.nodeName.toLowerCase(); f = "div" === r || "span" === r; t.id || (this.uuid += 1, t.id = "dp" + this.uuid); u = this._newInst(n(t), f); u.settings = n.extend({}, i || {}); "input" === r ? this._connectDatepicker(t, u) : f && this._inlineDatepicker(t, u) }, _newInst: function (t, i) { var r = t[0].id.replace(/([^A-Za-z0-9_\-])/g, "\\\\$1"); return { id: r, input: t, selectedDay: 0, selectedMonth: 0, selectedYear: 0, drawMonth: 0, drawYear: 0, inline: i, dpDiv: i ? l(n("<div class='" + this._inlineClass + " ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'><\/div>")) : this.dpDiv } }, _connectDatepicker: function (t, i) { var r = n(t); i.append = n([]); i.trigger = n([]); r.hasClass(this.markerClassName) || (this._attachments(r, i), r.addClass(this.markerClassName).on("keydown", this._doKeyDown).on("keypress", this._doKeyPress).on("keyup", this._doKeyUp), this._autoSize(i), n.data(t, "datepicker", i), i.settings.disabled && this._disableDatepicker(t)) }, _attachments: function (t, i) { var u, r, f, e = this._get(i, "appendText"), o = this._get(i, "isRTL"); i.append && i.append.remove(); e && (i.append = n("<span class='" + this._appendClass + "'>" + e + "<\/span>"), t[o ? "before" : "after"](i.append)); t.off("focus", this._showDatepicker); i.trigger && i.trigger.remove(); u = this._get(i, "showOn"); ("focus" === u || "both" === u) && t.on("focus", this._showDatepicker); ("button" === u || "both" === u) && (r = this._get(i, "buttonText"), f = this._get(i, "buttonImage"), i.trigger = n(this._get(i, "buttonImageOnly") ? n("<img/>").addClass(this._triggerClass).attr({ src: f, alt: r, title: r }) : n("<button type='button'><\/button>").addClass(this._triggerClass).html(f ? n("<img/>").attr({ src: f, alt: r, title: r }) : r)), t[o ? "before" : "after"](i.trigger), i.trigger.on("click", function () { return n.datepicker._datepickerShowing && n.datepicker._lastInput === t[0] ? n.datepicker._hideDatepicker() : n.datepicker._datepickerShowing && n.datepicker._lastInput !== t[0] ? (n.datepicker._hideDatepicker(), n.datepicker._showDatepicker(t[0])) : n.datepicker._showDatepicker(t[0]), !1 })) }, _autoSize: function (n) { if (this._get(n, "autoSize") && !n.inline) { var r, u, f, t, i = new Date(2009, 11, 20), e = this._get(n, "dateFormat"); e.match(/[DM]/) && (r = function (n) { for (u = 0, f = 0, t = 0; n.length > t; t++)n[t].length > u && (u = n[t].length, f = t); return f }, i.setMonth(r(this._get(n, e.match(/MM/) ? "monthNames" : "monthNamesShort"))), i.setDate(r(this._get(n, e.match(/DD/) ? "dayNames" : "dayNamesShort")) + 20 - i.getDay())); n.input.attr("size", this._formatDate(n, i).length) } }, _inlineDatepicker: function (t, i) { var r = n(t); r.hasClass(this.markerClassName) || (r.addClass(this.markerClassName).append(i.dpDiv), n.data(t, "datepicker", i), this._setDate(i, this._getDefaultDate(i), !0), this._updateDatepicker(i), this._updateAlternate(i), i.settings.disabled && this._disableDatepicker(t), i.dpDiv.css("display", "block")) }, _dialogDatepicker: function (t, i, r, f, e) { var s, h, c, l, a, o = this._dialogInst; return o || (this.uuid += 1, s = "dp" + this.uuid, this._dialogInput = n("<input type='text' id='" + s + "' style='position: absolute; top: -100px; width: 0px;'/>"), this._dialogInput.on("keydown", this._doKeyDown), n("body").append(this._dialogInput), o = this._dialogInst = this._newInst(this._dialogInput, !1), o.settings = {}, n.data(this._dialogInput[0], "datepicker", o)), u(o.settings, f || {}), i = i && i.constructor === Date ? this._formatDate(o, i) : i, this._dialogInput.val(i), this._pos = e ? e.length ? e : [e.pageX, e.pageY] : null, this._pos || (h = document.documentElement.clientWidth, c = document.documentElement.clientHeight, l = document.documentElement.scrollLeft || document.body.scrollLeft, a = document.documentElement.scrollTop || document.body.scrollTop, this._pos = [h / 2 - 100 + l, c / 2 - 150 + a]), this._dialogInput.css("left", this._pos[0] + 20 + "px").css("top", this._pos[1] + "px"), o.settings.onSelect = r, this._inDialog = !0, this.dpDiv.addClass(this._dialogClass), this._showDatepicker(this._dialogInput[0]), n.blockUI && n.blockUI(this.dpDiv), n.data(this._dialogInput[0], "datepicker", o), this }, _destroyDatepicker: function (t) { var r, u = n(t), f = n.data(t, "datepicker"); u.hasClass(this.markerClassName) && (r = t.nodeName.toLowerCase(), n.removeData(t, "datepicker"), "input" === r ? (f.append.remove(), f.trigger.remove(), u.removeClass(this.markerClassName).off("focus", this._showDatepicker).off("keydown", this._doKeyDown).off("keypress", this._doKeyPress).off("keyup", this._doKeyUp)) : ("div" === r || "span" === r) && u.removeClass(this.markerClassName).empty(), i === f && (i = null)) }, _enableDatepicker: function (t) { var i, r, u = n(t), f = n.data(t, "datepicker"); u.hasClass(this.markerClassName) && (i = t.nodeName.toLowerCase(), "input" === i ? (t.disabled = !1, f.trigger.filter("button").each(function () { this.disabled = !1 }).end().filter("img").css({ opacity: "1.0", cursor: "" })) : ("div" === i || "span" === i) && (r = u.children("." + this._inlineClass), r.children().removeClass("ui-state-disabled"), r.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled", !1)), this._disabledInputs = n.map(this._disabledInputs, function (n) { return n === t ? null : n })) }, _disableDatepicker: function (t) { var i, r, u = n(t), f = n.data(t, "datepicker"); u.hasClass(this.markerClassName) && (i = t.nodeName.toLowerCase(), "input" === i ? (t.disabled = !0, f.trigger.filter("button").each(function () { this.disabled = !0 }).end().filter("img").css({ opacity: "0.5", cursor: "default" })) : ("div" === i || "span" === i) && (r = u.children("." + this._inlineClass), r.children().addClass("ui-state-disabled"), r.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled", !0)), this._disabledInputs = n.map(this._disabledInputs, function (n) { return n === t ? null : n }), this._disabledInputs[this._disabledInputs.length] = t) }, _isDisabledDatepicker: function (n) { if (!n) return !1; for (var t = 0; this._disabledInputs.length > t; t++)if (this._disabledInputs[t] === n) return !0; return !1 }, _getInst: function (t) { try { return n.data(t, "datepicker") } catch (i) { throw "Missing instance data for this datepicker"; } }, _optionDatepicker: function (t, i, r) { var e, h, o, s, f = this._getInst(t); return 2 === arguments.length && "string" == typeof i ? "defaults" === i ? n.extend({}, n.datepicker._defaults) : f ? "all" === i ? n.extend({}, f.settings) : this._get(f, i) : null : (e = i || {}, "string" == typeof i && (e = {}, e[i] = r), f && (this._curInst === f && this._hideDatepicker(), h = this._getDateDatepicker(t, !0), o = this._getMinMaxDate(f, "min"), s = this._getMinMaxDate(f, "max"), u(f.settings, e), null !== o && void 0 !== e.dateFormat && void 0 === e.minDate && (f.settings.minDate = this._formatDate(f, o)), null !== s && void 0 !== e.dateFormat && void 0 === e.maxDate && (f.settings.maxDate = this._formatDate(f, s)), "disabled" in e && (e.disabled ? this._disableDatepicker(t) : this._enableDatepicker(t)), this._attachments(n(t), f), this._autoSize(f), this._setDate(f, h), this._updateAlternate(f), this._updateDatepicker(f)), void 0) }, _changeDatepicker: function (n, t, i) { this._optionDatepicker(n, t, i) }, _refreshDatepicker: function (n) { var t = this._getInst(n); t && this._updateDatepicker(t) }, _setDateDatepicker: function (n, t) { var i = this._getInst(n); i && (this._setDate(i, t), this._updateDatepicker(i), this._updateAlternate(i)) }, _getDateDatepicker: function (n, t) { var i = this._getInst(n); return i && !i.inline && this._setDateFromField(i, t), i ? this._getDate(i) : null }, _doKeyDown: function (t) { var u, e, f, i = n.datepicker._getInst(t.target), r = !0, o = i.dpDiv.is(".ui-datepicker-rtl"); if (i._keyEvent = !0, n.datepicker._datepickerShowing) switch (t.keyCode) { case 9: n.datepicker._hideDatepicker(); r = !1; break; case 13: return f = n("td." + n.datepicker._dayOverClass + ":not(." + n.datepicker._currentClass + ")", i.dpDiv), f[0] && n.datepicker._selectDay(t.target, i.selectedMonth, i.selectedYear, f[0]), u = n.datepicker._get(i, "onSelect"), u ? (e = n.datepicker._formatDate(i), u.apply(i.input ? i.input[0] : null, [e, i])) : n.datepicker._hideDatepicker(), !1; case 27: n.datepicker._hideDatepicker(); break; case 33: n.datepicker._adjustDate(t.target, t.ctrlKey ? -n.datepicker._get(i, "stepBigMonths") : -n.datepicker._get(i, "stepMonths"), "M"); break; case 34: n.datepicker._adjustDate(t.target, t.ctrlKey ? +n.datepicker._get(i, "stepBigMonths") : +n.datepicker._get(i, "stepMonths"), "M"); break; case 35: (t.ctrlKey || t.metaKey) && n.datepicker._clearDate(t.target); r = t.ctrlKey || t.metaKey; break; case 36: (t.ctrlKey || t.metaKey) && n.datepicker._gotoToday(t.target); r = t.ctrlKey || t.metaKey; break; case 37: (t.ctrlKey || t.metaKey) && n.datepicker._adjustDate(t.target, o ? 1 : -1, "D"); r = t.ctrlKey || t.metaKey; t.originalEvent.altKey && n.datepicker._adjustDate(t.target, t.ctrlKey ? -n.datepicker._get(i, "stepBigMonths") : -n.datepicker._get(i, "stepMonths"), "M"); break; case 38: (t.ctrlKey || t.metaKey) && n.datepicker._adjustDate(t.target, -7, "D"); r = t.ctrlKey || t.metaKey; break; case 39: (t.ctrlKey || t.metaKey) && n.datepicker._adjustDate(t.target, o ? -1 : 1, "D"); r = t.ctrlKey || t.metaKey; t.originalEvent.altKey && n.datepicker._adjustDate(t.target, t.ctrlKey ? +n.datepicker._get(i, "stepBigMonths") : +n.datepicker._get(i, "stepMonths"), "M"); break; case 40: (t.ctrlKey || t.metaKey) && n.datepicker._adjustDate(t.target, 7, "D"); r = t.ctrlKey || t.metaKey; break; default: r = !1 } else 36 === t.keyCode && t.ctrlKey ? n.datepicker._showDatepicker(this) : r = !1; r && (t.preventDefault(), t.stopPropagation()) }, _doKeyPress: function (t) { var i, r, u = n.datepicker._getInst(t.target); if (n.datepicker._get(u, "constrainInput")) return (i = n.datepicker._possibleChars(n.datepicker._get(u, "dateFormat")), r = String.fromCharCode(null == t.charCode ? t.keyCode : t.charCode), t.ctrlKey || t.metaKey || " " > r || !i || i.indexOf(r) > -1) }, _doKeyUp: function (t) { var r, i = n.datepicker._getInst(t.target); if (i.input.val() !== i.lastVal) try { r = n.datepicker.parseDate(n.datepicker._get(i, "dateFormat"), i.input ? i.input.val() : null, n.datepicker._getFormatConfig(i)); r && (n.datepicker._setDateFromField(i), n.datepicker._updateAlternate(i), n.datepicker._updateDatepicker(i)) } catch (u) { } return !0 }, _showDatepicker: function (t) { if (t = t.target || t, "input" !== t.nodeName.toLowerCase() && (t = n("input", t.parentNode)[0]), !n.datepicker._isDisabledDatepicker(t) && n.datepicker._lastInput !== t) { var i, o, s, r, f, e, h; i = n.datepicker._getInst(t); n.datepicker._curInst && n.datepicker._curInst !== i && (n.datepicker._curInst.dpDiv.stop(!0, !0), i && n.datepicker._datepickerShowing && n.datepicker._hideDatepicker(n.datepicker._curInst.input[0])); o = n.datepicker._get(i, "beforeShow"); s = o ? o.apply(t, [t, i]) : {}; s !== !1 && (u(i.settings, s), i.lastVal = null, n.datepicker._lastInput = t, n.datepicker._setDateFromField(i), n.datepicker._inDialog && (t.value = ""), n.datepicker._pos || (n.datepicker._pos = n.datepicker._findPos(t), n.datepicker._pos[1] += t.offsetHeight), r = !1, n(t).parents().each(function () { return r |= "fixed" === n(this).css("position"), !r }), f = { left: n.datepicker._pos[0], top: n.datepicker._pos[1] }, n.datepicker._pos = null, i.dpDiv.empty(), i.dpDiv.css({ position: "absolute", display: "block", top: "-1000px" }), n.datepicker._updateDatepicker(i), f = n.datepicker._checkOffset(i, f, r), i.dpDiv.css({ position: n.datepicker._inDialog && n.blockUI ? "static" : r ? "fixed" : "absolute", display: "none", left: f.left + "px", top: f.top + "px" }), i.inline || (e = n.datepicker._get(i, "showAnim"), h = n.datepicker._get(i, "duration"), i.dpDiv.css("z-index", k(n(t)) + 1), n.datepicker._datepickerShowing = !0, n.effects && n.effects.effect[e] ? i.dpDiv.show(e, n.datepicker._get(i, "showOptions"), h) : i.dpDiv[e || "show"](e ? h : null), n.datepicker._shouldFocusInput(i) && i.input.trigger("focus"), n.datepicker._curInst = i)) } }, _updateDatepicker: function (t) { this.maxRows = 4; i = t; t.dpDiv.empty().append(this._generateHTML(t)); this._attachHandlers(t); var r, u = this._getNumberOfMonths(t), f = u[1], e = t.dpDiv.find("." + this._dayOverClass + " a"); e.length > 0 && a.apply(e.get(0)); t.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""); f > 1 && t.dpDiv.addClass("ui-datepicker-multi-" + f).css("width", 17 * f + "em"); t.dpDiv[(1 !== u[0] || 1 !== u[1] ? "add" : "remove") + "Class"]("ui-datepicker-multi"); t.dpDiv[(this._get(t, "isRTL") ? "add" : "remove") + "Class"]("ui-datepicker-rtl"); t === n.datepicker._curInst && n.datepicker._datepickerShowing && n.datepicker._shouldFocusInput(t) && t.input.trigger("focus"); t.yearshtml && (r = t.yearshtml, setTimeout(function () { r === t.yearshtml && t.yearshtml && t.dpDiv.find("select.ui-datepicker-year:first").replaceWith(t.yearshtml); r = t.yearshtml = null }, 0)) }, _shouldFocusInput: function (n) { return n.input && n.input.is(":visible") && !n.input.is(":disabled") && !n.input.is(":focus") }, _checkOffset: function (t, i, r) { var u = t.dpDiv.outerWidth(), f = t.dpDiv.outerHeight(), h = t.input ? t.input.outerWidth() : 0, o = t.input ? t.input.outerHeight() : 0, e = document.documentElement.clientWidth + (r ? 0 : n(document).scrollLeft()), s = document.documentElement.clientHeight + (r ? 0 : n(document).scrollTop()); return i.left -= this._get(t, "isRTL") ? u - h : 0, i.left -= r && i.left === t.input.offset().left ? n(document).scrollLeft() : 0, i.top -= r && i.top === t.input.offset().top + o ? n(document).scrollTop() : 0, i.left -= Math.min(i.left, i.left + u > e && e > u ? Math.abs(i.left + u - e) : 0), i.top -= Math.min(i.top, i.top + f > s && s > f ? Math.abs(f + o) : 0), i }, _findPos: function (t) { for (var i, r = this._getInst(t), u = this._get(r, "isRTL"); t && ("hidden" === t.type || 1 !== t.nodeType || n.expr.filters.hidden(t));)t = t[u ? "previousSibling" : "nextSibling"]; return i = n(t).offset(), [i.left, i.top] }, _hideDatepicker: function (t) { var r, f, u, e, i = this._curInst; !i || t && i !== n.data(t, "datepicker") || this._datepickerShowing && (r = this._get(i, "showAnim"), f = this._get(i, "duration"), u = function () { n.datepicker._tidyDialog(i) }, n.effects && (n.effects.effect[r] || n.effects[r]) ? i.dpDiv.hide(r, n.datepicker._get(i, "showOptions"), f, u) : i.dpDiv["slideDown" === r ? "slideUp" : "fadeIn" === r ? "fadeOut" : "hide"](r ? f : null, u), r || u(), this._datepickerShowing = !1, e = this._get(i, "onClose"), e && e.apply(i.input ? i.input[0] : null, [i.input ? i.input.val() : "", i]), this._lastInput = null, this._inDialog && (this._dialogInput.css({ position: "absolute", left: "0", top: "-100px" }), n.blockUI && (n.unblockUI(), n("body").append(this.dpDiv))), this._inDialog = !1) }, _tidyDialog: function (n) { n.dpDiv.removeClass(this._dialogClass).off(".ui-datepicker-calendar") }, _checkExternalClick: function (t) { if (n.datepicker._curInst) { var i = n(t.target), r = n.datepicker._getInst(i[0]); (i[0].id === n.datepicker._mainDivId || 0 !== i.parents("#" + n.datepicker._mainDivId).length || i.hasClass(n.datepicker.markerClassName) || i.closest("." + n.datepicker._triggerClass).length || !n.datepicker._datepickerShowing || n.datepicker._inDialog && n.blockUI) && (!i.hasClass(n.datepicker.markerClassName) || n.datepicker._curInst === r) || n.datepicker._hideDatepicker() } }, _adjustDate: function (t, i, r) { var f = n(t), u = this._getInst(f[0]); this._isDisabledDatepicker(f[0]) || (this._adjustInstDate(u, i + ("M" === r ? this._get(u, "showCurrentAtPos") : 0), r), this._updateDatepicker(u)) }, _gotoToday: function (t) { var r, u = n(t), i = this._getInst(u[0]); this._get(i, "gotoCurrent") && i.currentDay ? (i.selectedDay = i.currentDay, i.drawMonth = i.selectedMonth = i.currentMonth, i.drawYear = i.selectedYear = i.currentYear) : (r = new Date, i.selectedDay = r.getDate(), i.drawMonth = i.selectedMonth = r.getMonth(), i.drawYear = i.selectedYear = r.getFullYear()); this._notifyChange(i); this._adjustDate(u) }, _selectMonthYear: function (t, i, r) { var f = n(t), u = this._getInst(f[0]); u["selected" + ("M" === r ? "Month" : "Year")] = u["draw" + ("M" === r ? "Month" : "Year")] = parseInt(i.options[i.selectedIndex].value, 10); this._notifyChange(u); this._adjustDate(f) }, _selectDay: function (t, i, r, u) { var f, e = n(t); n(u).hasClass(this._unselectableClass) || this._isDisabledDatepicker(e[0]) || (f = this._getInst(e[0]), f.selectedDay = f.currentDay = n("a", u).html(), f.selectedMonth = f.currentMonth = i, f.selectedYear = f.currentYear = r, this._selectDate(t, this._formatDate(f, f.currentDay, f.currentMonth, f.currentYear))) }, _clearDate: function (t) { var i = n(t); this._selectDate(i, "") }, _selectDate: function (t, i) { var u, f = n(t), r = this._getInst(f[0]); i = null != i ? i : this._formatDate(r); r.input && r.input.val(i); this._updateAlternate(r); u = this._get(r, "onSelect"); u ? u.apply(r.input ? r.input[0] : null, [i, r]) : r.input && r.input.trigger("change"); r.inline ? this._updateDatepicker(r) : (this._hideDatepicker(), this._lastInput = r.input[0], "object" != typeof r.input[0] && r.input.trigger("focus"), this._lastInput = null) }, _updateAlternate: function (t) { var i, r, u, f = this._get(t, "altField"); f && (i = this._get(t, "altFormat") || this._get(t, "dateFormat"), r = this._getDate(t), u = this.formatDate(i, r, this._getFormatConfig(t)), n(f).val(u)) }, noWeekends: function (n) { var t = n.getDay(); return [t > 0 && 6 > t, ""] }, iso8601Week: function (n) { var i, t = new Date(n.getTime()); return t.setDate(t.getDate() + 4 - (t.getDay() || 7)), i = t.getTime(), t.setMonth(0), t.setDate(1), Math.floor(Math.round((i - t) / 864e5) / 7) + 1 }, parseDate: function (t, i, r) { if (null == t || null == i) throw "Invalid arguments"; if (i = "object" == typeof i ? "" + i : i + "", "" === i) return null; for (var a, v, u, f = 0, y = (r ? r.shortYearCutoff : null) || this._defaults.shortYearCutoff, d = "string" != typeof y ? y : (new Date).getFullYear() % 100 + parseInt(y, 10), g = (r ? r.dayNamesShort : null) || this._defaults.dayNamesShort, nt = (r ? r.dayNames : null) || this._defaults.dayNames, tt = (r ? r.monthNamesShort : null) || this._defaults.monthNamesShort, it = (r ? r.monthNames : null) || this._defaults.monthNames, e = -1, s = -1, h = -1, p = -1, w = !1, l = function (n) { var i = t.length > o + 1 && t.charAt(o + 1) === n; return i && o++, i }, c = function (n) { var u = l(n), r = "@" === n ? 14 : "!" === n ? 20 : "y" === n && u ? 4 : "o" === n ? 3 : 2, e = "y" === n ? r : 1, o = RegExp("^\\d{" + e + "," + r + "}"), t = i.substring(f).match(o); if (!t) throw "Missing number at position " + f; return f += t[0].length, parseInt(t[0], 10) }, k = function (t, r, u) { var e = -1, o = n.map(l(t) ? u : r, function (n, t) { return [[t, n]] }).sort(function (n, t) { return -(n[1].length - t[1].length) }); if (n.each(o, function (n, t) { var r = t[1]; if (i.substr(f, r.length).toLowerCase() === r.toLowerCase()) return (e = t[0], f += r.length, !1) }), -1 !== e) return e + 1; throw "Unknown name at position " + f; }, b = function () { if (i.charAt(f) !== t.charAt(o)) throw "Unexpected literal at position " + f; f++ }, o = 0; t.length > o; o++)if (w) "'" !== t.charAt(o) || l("'") ? b() : w = !1; else switch (t.charAt(o)) { case "d": h = c("d"); break; case "D": k("D", g, nt); break; case "o": p = c("o"); break; case "m": s = c("m"); break; case "M": s = k("M", tt, it); break; case "y": e = c("y"); break; case "@": u = new Date(c("@")); e = u.getFullYear(); s = u.getMonth() + 1; h = u.getDate(); break; case "!": u = new Date((c("!") - this._ticksTo1970) / 1e4); e = u.getFullYear(); s = u.getMonth() + 1; h = u.getDate(); break; case "'": l("'") ? b() : w = !0; break; default: b() }if (i.length > f && (v = i.substr(f), !/^\s+/.test(v))) throw "Extra/unparsed characters found in date: " + v; if (-1 === e ? e = (new Date).getFullYear() : 100 > e && (e += (new Date).getFullYear() - (new Date).getFullYear() % 100 + (d >= e ? 0 : -100)), p > -1) for (s = 1, h = p; ;) { if (a = this._getDaysInMonth(e, s - 1), a >= h) break; s++; h -= a } if (u = this._daylightSavingAdjust(new Date(e, s - 1, h)), u.getFullYear() !== e || u.getMonth() + 1 !== s || u.getDate() !== h) throw "Invalid date"; return u }, ATOM: "yy-mm-dd", COOKIE: "D, dd M yy", ISO_8601: "yy-mm-dd", RFC_822: "D, d M y", RFC_850: "DD, dd-M-y", RFC_1036: "D, d M y", RFC_1123: "D, d M yy", RFC_2822: "D, d M yy", RSS: "D, d M y", TICKS: "!", TIMESTAMP: "@", W3C: "yy-mm-dd", _ticksTo1970: 864e9 * (718685 + Math.floor(492.5) - Math.floor(19.7) + Math.floor(4.925)), formatDate: function (n, t, i) { if (!t) return ""; var u, h = (i ? i.dayNamesShort : null) || this._defaults.dayNamesShort, c = (i ? i.dayNames : null) || this._defaults.dayNames, l = (i ? i.monthNamesShort : null) || this._defaults.monthNamesShort, a = (i ? i.monthNames : null) || this._defaults.monthNames, f = function (t) { var i = n.length > u + 1 && n.charAt(u + 1) === t; return i && u++, i }, e = function (n, t, i) { var r = "" + t; if (f(n)) for (; i > r.length;)r = "0" + r; return r }, s = function (n, t, i, r) { return f(n) ? r[t] : i[t] }, r = "", o = !1; if (t) for (u = 0; n.length > u; u++)if (o) "'" !== n.charAt(u) || f("'") ? r += n.charAt(u) : o = !1; else switch (n.charAt(u)) { case "d": r += e("d", t.getDate(), 2); break; case "D": r += s("D", t.getDay(), h, c); break; case "o": r += e("o", Math.round((new Date(t.getFullYear(), t.getMonth(), t.getDate()).getTime() - new Date(t.getFullYear(), 0, 0).getTime()) / 864e5), 3); break; case "m": r += e("m", t.getMonth() + 1, 2); break; case "M": r += s("M", t.getMonth(), l, a); break; case "y": r += f("y") ? t.getFullYear() : (10 > t.getFullYear() % 100 ? "0" : "") + t.getFullYear() % 100; break; case "@": r += t.getTime(); break; case "!": r += 1e4 * t.getTime() + this._ticksTo1970; break; case "'": f("'") ? r += "'" : o = !0; break; default: r += n.charAt(u) }return r }, _possibleChars: function (n) { for (var i = "", r = !1, u = function (i) { var r = n.length > t + 1 && n.charAt(t + 1) === i; return r && t++, r }, t = 0; n.length > t; t++)if (r) "'" !== n.charAt(t) || u("'") ? i += n.charAt(t) : r = !1; else switch (n.charAt(t)) { case "d": case "m": case "y": case "@": i += "0123456789"; break; case "D": case "M": return null; case "'": u("'") ? i += "'" : r = !0; break; default: i += n.charAt(t) }return i }, _get: function (n, t) { return void 0 !== n.settings[t] ? n.settings[t] : this._defaults[t] }, _setDateFromField: function (n, t) { if (n.input.val() !== n.lastVal) { var f = this._get(n, "dateFormat"), r = n.lastVal = n.input ? n.input.val() : null, u = this._getDefaultDate(n), i = u, e = this._getFormatConfig(n); try { i = this.parseDate(f, r, e) || u } catch (o) { r = t ? "" : r } n.selectedDay = i.getDate(); n.drawMonth = n.selectedMonth = i.getMonth(); n.drawYear = n.selectedYear = i.getFullYear(); n.currentDay = r ? i.getDate() : 0; n.currentMonth = r ? i.getMonth() : 0; n.currentYear = r ? i.getFullYear() : 0; this._adjustInstDate(n) } }, _getDefaultDate: function (n) { return this._restrictMinMax(n, this._determineDate(n, this._get(n, "defaultDate"), new Date)) }, _determineDate: function (t, i, r) { var f = function (n) { var t = new Date; return t.setDate(t.getDate() + n), t }, e = function (i) { try { return n.datepicker.parseDate(n.datepicker._get(t, "dateFormat"), i, n.datepicker._getFormatConfig(t)) } catch (h) { } for (var o = (i.toLowerCase().match(/^c/) ? n.datepicker._getDate(t) : null) || new Date, f = o.getFullYear(), e = o.getMonth(), r = o.getDate(), s = /([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g, u = s.exec(i); u;) { switch (u[2] || "d") { case "d": case "D": r += parseInt(u[1], 10); break; case "w": case "W": r += 7 * parseInt(u[1], 10); break; case "m": case "M": e += parseInt(u[1], 10); r = Math.min(r, n.datepicker._getDaysInMonth(f, e)); break; case "y": case "Y": f += parseInt(u[1], 10); r = Math.min(r, n.datepicker._getDaysInMonth(f, e)) }u = s.exec(i) } return new Date(f, e, r) }, u = null == i || "" === i ? r : "string" == typeof i ? e(i) : "number" == typeof i ? isNaN(i) ? r : f(i) : new Date(i.getTime()); return u = u && "Invalid Date" == "" + u ? r : u, u && (u.setHours(0), u.setMinutes(0), u.setSeconds(0), u.setMilliseconds(0)), this._daylightSavingAdjust(u) }, _daylightSavingAdjust: function (n) { return n ? (n.setHours(n.getHours() > 12 ? n.getHours() + 2 : 0), n) : null }, _setDate: function (n, t, i) { var u = !t, f = n.selectedMonth, e = n.selectedYear, r = this._restrictMinMax(n, this._determineDate(n, t, new Date)); n.selectedDay = n.currentDay = r.getDate(); n.drawMonth = n.selectedMonth = n.currentMonth = r.getMonth(); n.drawYear = n.selectedYear = n.currentYear = r.getFullYear(); f === n.selectedMonth && e === n.selectedYear || i || this._notifyChange(n); this._adjustInstDate(n); n.input && n.input.val(u ? "" : this._formatDate(n)) }, _getDate: function (n) { return !n.currentYear || n.input && "" === n.input.val() ? null : this._daylightSavingAdjust(new Date(n.currentYear, n.currentMonth, n.currentDay)) }, _attachHandlers: function (t) { var r = this._get(t, "stepMonths"), i = "#" + t.id.replace(/\\\\/g, "\\"); t.dpDiv.find("[data-handler]").map(function () { var t = { prev: function () { n.datepicker._adjustDate(i, -r, "M") }, next: function () { n.datepicker._adjustDate(i, +r, "M") }, hide: function () { n.datepicker._hideDatepicker() }, today: function () { n.datepicker._gotoToday(i) }, selectDay: function () { return n.datepicker._selectDay(i, +this.getAttribute("data-month"), +this.getAttribute("data-year"), this), !1 }, selectMonth: function () { return n.datepicker._selectMonthYear(i, this, "M"), !1 }, selectYear: function () { return n.datepicker._selectMonthYear(i, this, "Y"), !1 } }; n(this).on(this.getAttribute("data-event"), t[this.getAttribute("data-handler")]) }) }, _generateHTML: function (n) { var b, s, rt, h, ut, k, ft, et, ri, c, ot, ui, fi, ei, oi, st, g, si, ht, nt, o, y, ct, p, lt, l, u, at, vt, yt, pt, tt, wt, i, bt, kt, d, a, it, dt = new Date, gt = this._daylightSavingAdjust(new Date(dt.getFullYear(), dt.getMonth(), dt.getDate())), f = this._get(n, "isRTL"), li = this._get(n, "showButtonPanel"), hi = this._get(n, "hideIfNoPrevNext"), ni = this._get(n, "navigationAsDateFormat"), e = this._getNumberOfMonths(n), ai = this._get(n, "showCurrentAtPos"), ci = this._get(n, "stepMonths"), ti = 1 !== e[0] || 1 !== e[1], ii = this._daylightSavingAdjust(n.currentDay ? new Date(n.currentYear, n.currentMonth, n.currentDay) : new Date(9999, 9, 9)), w = this._getMinMaxDate(n, "min"), v = this._getMinMaxDate(n, "max"), t = n.drawMonth - ai, r = n.drawYear; if (0 > t && (t += 12, r--), v) for (b = this._daylightSavingAdjust(new Date(v.getFullYear(), v.getMonth() - e[0] * e[1] + 1, v.getDate())), b = w && w > b ? w : b; this._daylightSavingAdjust(new Date(r, t, 1)) > b;)t--, 0 > t && (t = 11, r--); for (n.drawMonth = t, n.drawYear = r, s = this._get(n, "prevText"), s = ni ? this.formatDate(s, this._daylightSavingAdjust(new Date(r, t - ci, 1)), this._getFormatConfig(n)) : s, rt = this._canAdjustMonth(n, -1, r, t) ? "<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click' title='" + s + "'><span class='ui-icon ui-icon-circle-triangle-" + (f ? "e" : "w") + "'>" + s + "<\/span><\/a>" : hi ? "" : "<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='" + s + "'><span class='ui-icon ui-icon-circle-triangle-" + (f ? "e" : "w") + "'>" + s + "<\/span><\/a>", h = this._get(n, "nextText"), h = ni ? this.formatDate(h, this._daylightSavingAdjust(new Date(r, t + ci, 1)), this._getFormatConfig(n)) : h, ut = this._canAdjustMonth(n, 1, r, t) ? "<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click' title='" + h + "'><span class='ui-icon ui-icon-circle-triangle-" + (f ? "w" : "e") + "'>" + h + "<\/span><\/a>" : hi ? "" : "<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='" + h + "'><span class='ui-icon ui-icon-circle-triangle-" + (f ? "w" : "e") + "'>" + h + "<\/span><\/a>", k = this._get(n, "currentText"), ft = this._get(n, "gotoCurrent") && n.currentDay ? ii : gt, k = ni ? this.formatDate(k, ft, this._getFormatConfig(n)) : k, et = n.inline ? "" : "<button type='button' class='ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all' data-handler='hide' data-event='click'>" + this._get(n, "closeText") + "<\/button>", ri = li ? "<div class='ui-datepicker-buttonpane ui-widget-content'>" + (f ? et : "") + (this._isInRange(n, ft) ? "<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'>" + k + "<\/button>" : "") + (f ? "" : et) + "<\/div>" : "", c = parseInt(this._get(n, "firstDay"), 10), c = isNaN(c) ? 0 : c, ot = this._get(n, "showWeek"), ui = this._get(n, "dayNames"), fi = this._get(n, "dayNamesMin"), ei = this._get(n, "monthNames"), oi = this._get(n, "monthNamesShort"), st = this._get(n, "beforeShowDay"), g = this._get(n, "showOtherMonths"), si = this._get(n, "selectOtherMonths"), ht = this._getDefaultDate(n), nt = "", y = 0; e[0] > y; y++) { for (ct = "", this.maxRows = 4, p = 0; e[1] > p; p++) { if (lt = this._daylightSavingAdjust(new Date(r, t, n.selectedDay)), l = " ui-corner-all", u = "", ti) { if (u += "<div class='ui-datepicker-group", e[1] > 1) switch (p) { case 0: u += " ui-datepicker-group-first"; l = " ui-corner-" + (f ? "right" : "left"); break; case e[1] - 1: u += " ui-datepicker-group-last"; l = " ui-corner-" + (f ? "left" : "right"); break; default: u += " ui-datepicker-group-middle"; l = "" }u += "'>" } for (u += "<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix" + l + "'>" + (/all|left/.test(l) && 0 === y ? f ? ut : rt : "") + (/all|right/.test(l) && 0 === y ? f ? rt : ut : "") + this._generateMonthYearHeader(n, t, r, w, v, y > 0 || p > 0, ei, oi) + "<\/div><table class='ui-datepicker-calendar'><thead><tr>", at = ot ? "<th class='ui-datepicker-week-col'>" + this._get(n, "weekHeader") + "<\/th>" : "", o = 0; 7 > o; o++)vt = (o + c) % 7, at += "<th scope='col'" + ((o + c + 6) % 7 >= 5 ? " class='ui-datepicker-week-end'" : "") + "><span title='" + ui[vt] + "'>" + fi[vt] + "<\/span><\/th>"; for (u += at + "<\/tr><\/thead><tbody>", yt = this._getDaysInMonth(r, t), r === n.selectedYear && t === n.selectedMonth && (n.selectedDay = Math.min(n.selectedDay, yt)), pt = (this._getFirstDayOfMonth(r, t) - c + 7) % 7, tt = Math.ceil((pt + yt) / 7), wt = ti ? this.maxRows > tt ? this.maxRows : tt : tt, this.maxRows = wt, i = this._daylightSavingAdjust(new Date(r, t, 1 - pt)), bt = 0; wt > bt; bt++) { for (u += "<tr>", kt = ot ? "<td class='ui-datepicker-week-col'>" + this._get(n, "calculateWeek")(i) + "<\/td>" : "", o = 0; 7 > o; o++)d = st ? st.apply(n.input ? n.input[0] : null, [i]) : [!0, ""], a = i.getMonth() !== t, it = a && !si || !d[0] || w && w > i || v && i > v, kt += "<td class='" + ((o + c + 6) % 7 >= 5 ? " ui-datepicker-week-end" : "") + (a ? " ui-datepicker-other-month" : "") + (i.getTime() === lt.getTime() && t === n.selectedMonth && n._keyEvent || ht.getTime() === i.getTime() && ht.getTime() === lt.getTime() ? " " + this._dayOverClass : "") + (it ? " " + this._unselectableClass + " ui-state-disabled" : "") + (a && !g ? "" : " " + d[1] + (i.getTime() === ii.getTime() ? " " + this._currentClass : "") + (i.getTime() === gt.getTime() ? " ui-datepicker-today" : "")) + "'" + (a && !g || !d[2] ? "" : " title='" + d[2].replace(/'/g, "&#39;") + "'") + (it ? "" : " data-handler='selectDay' data-event='click' data-month='" + i.getMonth() + "' data-year='" + i.getFullYear() + "'") + ">" + (a && !g ? "&#xa0;" : it ? "<span class='ui-state-default'>" + i.getDate() + "<\/span>" : "<a class='ui-state-default" + (i.getTime() === gt.getTime() ? " ui-state-highlight" : "") + (i.getTime() === ii.getTime() ? " ui-state-active" : "") + (a ? " ui-priority-secondary" : "") + "' href='#'>" + i.getDate() + "<\/a>") + "<\/td>", i.setDate(i.getDate() + 1), i = this._daylightSavingAdjust(i); u += kt + "<\/tr>" } t++; t > 11 && (t = 0, r++); u += "<\/tbody><\/table>" + (ti ? "<\/div>" + (e[0] > 0 && p === e[1] - 1 ? "<div class='ui-datepicker-row-break'><\/div>" : "") : ""); ct += u } nt += ct } return nt += ri, n._keyEvent = !1, nt }, _generateMonthYearHeader: function (n, t, i, r, u, f, e, o) { var k, d, h, v, y, p, s, a, w = this._get(n, "changeMonth"), b = this._get(n, "changeYear"), g = this._get(n, "showMonthAfterYear"), c = "<div class='ui-datepicker-title'>", l = ""; if (f || !w) l += "<span class='ui-datepicker-month'>" + e[t] + "<\/span>"; else { for (k = r && r.getFullYear() === i, d = u && u.getFullYear() === i, l += "<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>", h = 0; 12 > h; h++)(!k || h >= r.getMonth()) && (!d || u.getMonth() >= h) && (l += "<option value='" + h + "'" + (h === t ? " selected='selected'" : "") + ">" + o[h] + "<\/option>"); l += "<\/select>" } if (g || (c += l + (!f && w && b ? "" : "&#xa0;")), !n.yearshtml) if (n.yearshtml = "", f || !b) c += "<span class='ui-datepicker-year'>" + i + "<\/span>"; else { for (v = this._get(n, "yearRange").split(":"), y = (new Date).getFullYear(), p = function (n) { var t = n.match(/c[+\-].*/) ? i + parseInt(n.substring(1), 10) : n.match(/[+\-].*/) ? y + parseInt(n, 10) : parseInt(n, 10); return isNaN(t) ? y : t }, s = p(v[0]), a = Math.max(s, p(v[1] || "")), s = r ? Math.max(s, r.getFullYear()) : s, a = u ? Math.min(a, u.getFullYear()) : a, n.yearshtml += "<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>"; a >= s; s++)n.yearshtml += "<option value='" + s + "'" + (s === i ? " selected='selected'" : "") + ">" + s + "<\/option>"; n.yearshtml += "<\/select>"; c += n.yearshtml; n.yearshtml = null } return c += this._get(n, "yearSuffix"), g && (c += (!f && w && b ? "" : "&#xa0;") + l), c + "<\/div>" }, _adjustInstDate: function (n, t, i) { var u = n.selectedYear + ("Y" === i ? t : 0), f = n.selectedMonth + ("M" === i ? t : 0), e = Math.min(n.selectedDay, this._getDaysInMonth(u, f)) + ("D" === i ? t : 0), r = this._restrictMinMax(n, this._daylightSavingAdjust(new Date(u, f, e))); n.selectedDay = r.getDate(); n.drawMonth = n.selectedMonth = r.getMonth(); n.drawYear = n.selectedYear = r.getFullYear(); ("M" === i || "Y" === i) && this._notifyChange(n) }, _restrictMinMax: function (n, t) { var i = this._getMinMaxDate(n, "min"), r = this._getMinMaxDate(n, "max"), u = i && i > t ? i : t; return r && u > r ? r : u }, _notifyChange: function (n) { var t = this._get(n, "onChangeMonthYear"); t && t.apply(n.input ? n.input[0] : null, [n.selectedYear, n.selectedMonth + 1, n]) }, _getNumberOfMonths: function (n) { var t = this._get(n, "numberOfMonths"); return null == t ? [1, 1] : "number" == typeof t ? [1, t] : t }, _getMinMaxDate: function (n, t) { return this._determineDate(n, this._get(n, t + "Date"), null) }, _getDaysInMonth: function (n, t) { return 32 - this._daylightSavingAdjust(new Date(n, t, 32)).getDate() }, _getFirstDayOfMonth: function (n, t) { return new Date(n, t, 1).getDay() }, _canAdjustMonth: function (n, t, i, r) { var f = this._getNumberOfMonths(n), u = this._daylightSavingAdjust(new Date(i, r + (0 > t ? t : f[0] * f[1]), 1)); return 0 > t && u.setDate(this._getDaysInMonth(u.getFullYear(), u.getMonth())), this._isInRange(n, u) }, _isInRange: function (n, t) { var i, f, e = this._getMinMaxDate(n, "min"), o = this._getMinMaxDate(n, "max"), r = null, u = null, s = this._get(n, "yearRange"); return s && (i = s.split(":"), f = (new Date).getFullYear(), r = parseInt(i[0], 10), u = parseInt(i[1], 10), i[0].match(/[+\-].*/) && (r += f), i[1].match(/[+\-].*/) && (u += f)), (!e || t.getTime() >= e.getTime()) && (!o || t.getTime() <= o.getTime()) && (!r || t.getFullYear() >= r) && (!u || u >= t.getFullYear()) }, _getFormatConfig: function (n) { var t = this._get(n, "shortYearCutoff"); return t = "string" != typeof t ? t : (new Date).getFullYear() % 100 + parseInt(t, 10), { shortYearCutoff: t, dayNamesShort: this._get(n, "dayNamesShort"), dayNames: this._get(n, "dayNames"), monthNamesShort: this._get(n, "monthNamesShort"), monthNames: this._get(n, "monthNames") } }, _formatDate: function (n, t, i, r) { t || (n.currentDay = n.selectedDay, n.currentMonth = n.selectedMonth, n.currentYear = n.selectedYear); var u = t ? "object" == typeof t ? t : this._daylightSavingAdjust(new Date(r, i, t)) : this._daylightSavingAdjust(new Date(n.currentYear, n.currentMonth, n.currentDay)); return this.formatDate(this._get(n, "dateFormat"), u, this._getFormatConfig(n)) } }); n.fn.datepicker = function (t) { if (!this.length) return this; n.datepicker.initialized || (n(document).on("mousedown", n.datepicker._checkExternalClick), n.datepicker.initialized = !0); 0 === n("#" + n.datepicker._mainDivId).length && n("body").append(n.datepicker.dpDiv); var i = Array.prototype.slice.call(arguments, 1); return "string" != typeof t || "isDisabled" !== t && "getDate" !== t && "widget" !== t ? "option" === t && 2 === arguments.length && "string" == typeof arguments[1] ? n.datepicker["_" + t + "Datepicker"].apply(n.datepicker, [this[0]].concat(i)) : this.each(function () { "string" == typeof t ? n.datepicker["_" + t + "Datepicker"].apply(n.datepicker, [this].concat(i)) : n.datepicker._attachDatepicker(this, t) }) : n.datepicker["_" + t + "Datepicker"].apply(n.datepicker, [this[0]].concat(i)) }; n.datepicker = new c; n.datepicker.initialized = !1; n.datepicker.uuid = (new Date).getTime(); n.datepicker.version = "1.12.1"; n.datepicker; n.ui.ie = !!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()); r = !1; n(document).on("mouseup", function () { r = !1 }); n.widget("ui.mouse", { version: "1.12.1", options: { cancel: "input, textarea, button, select, option", distance: 1, delay: 0 }, _mouseInit: function () { var t = this; this.element.on("mousedown." + this.widgetName, function (n) { return t._mouseDown(n) }).on("click." + this.widgetName, function (i) { if (!0 === n.data(i.target, t.widgetName + ".preventClickEvent")) return (n.removeData(i.target, t.widgetName + ".preventClickEvent"), i.stopImmediatePropagation(), !1) }); this.started = !1 }, _mouseDestroy: function () { this.element.off("." + this.widgetName); this._mouseMoveDelegate && this.document.off("mousemove." + this.widgetName, this._mouseMoveDelegate).off("mouseup." + this.widgetName, this._mouseUpDelegate) }, _mouseDown: function (t) { if (!r) { this._mouseMoved = !1; this._mouseStarted && this._mouseUp(t); this._mouseDownEvent = t; var i = this, u = 1 === t.which, f = "string" == typeof this.options.cancel && t.target.nodeName ? n(t.target).closest(this.options.cancel).length : !1; return u && !f && this._mouseCapture(t) ? (this.mouseDelayMet = !this.options.delay, this.mouseDelayMet || (this._mouseDelayTimer = setTimeout(function () { i.mouseDelayMet = !0 }, this.options.delay)), this._mouseDistanceMet(t) && this._mouseDelayMet(t) && (this._mouseStarted = this._mouseStart(t) !== !1, !this._mouseStarted) ? (t.preventDefault(), !0) : (!0 === n.data(t.target, this.widgetName + ".preventClickEvent") && n.removeData(t.target, this.widgetName + ".preventClickEvent"), this._mouseMoveDelegate = function (n) { return i._mouseMove(n) }, this._mouseUpDelegate = function (n) { return i._mouseUp(n) }, this.document.on("mousemove." + this.widgetName, this._mouseMoveDelegate).on("mouseup." + this.widgetName, this._mouseUpDelegate), t.preventDefault(), r = !0, !0)) : !0 } }, _mouseMove: function (t) { if (this._mouseMoved) { if (n.ui.ie && (!document.documentMode || 9 > document.documentMode) && !t.button) return this._mouseUp(t); if (!t.which) if (t.originalEvent.altKey || t.originalEvent.ctrlKey || t.originalEvent.metaKey || t.originalEvent.shiftKey) this.ignoreMissingWhich = !0; else if (!this.ignoreMissingWhich) return this._mouseUp(t) } return (t.which || t.button) && (this._mouseMoved = !0), this._mouseStarted ? (this._mouseDrag(t), t.preventDefault()) : (this._mouseDistanceMet(t) && this._mouseDelayMet(t) && (this._mouseStarted = this._mouseStart(this._mouseDownEvent, t) !== !1, this._mouseStarted ? this._mouseDrag(t) : this._mouseUp(t)), !this._mouseStarted) }, _mouseUp: function (t) { this.document.off("mousemove." + this.widgetName, this._mouseMoveDelegate).off("mouseup." + this.widgetName, this._mouseUpDelegate); this._mouseStarted && (this._mouseStarted = !1, t.target === this._mouseDownEvent.target && n.data(t.target, this.widgetName + ".preventClickEvent", !0), this._mouseStop(t)); this._mouseDelayTimer && (clearTimeout(this._mouseDelayTimer), delete this._mouseDelayTimer); this.ignoreMissingWhich = !1; r = !1; t.preventDefault() }, _mouseDistanceMet: function (n) { return Math.max(Math.abs(this._mouseDownEvent.pageX - n.pageX), Math.abs(this._mouseDownEvent.pageY - n.pageY)) >= this.options.distance }, _mouseDelayMet: function () { return this.mouseDelayMet }, _mouseStart: function () { }, _mouseDrag: function () { }, _mouseStop: function () { }, _mouseCapture: function () { return !0 } }); n.ui.plugin = { add: function (t, i, r) { var u, f = n.ui[t].prototype; for (u in r) f.plugins[u] = f.plugins[u] || [], f.plugins[u].push([i, r[u]]) }, call: function (n, t, i, r) { var u, f = n.plugins[t]; if (f && (r || n.element[0].parentNode && 11 !== n.element[0].parentNode.nodeType)) for (u = 0; f.length > u; u++)n.options[f[u][0]] && f[u][1].apply(n.element, i) } }; n.ui.safeBlur = function (t) { t && "body" !== t.nodeName.toLowerCase() && n(t).trigger("blur") }; n.widget("ui.draggable", n.ui.mouse, { version: "1.12.1", widgetEventPrefix: "drag", options: { addClasses: !0, appendTo: "parent", axis: !1, connectToSortable: !1, containment: !1, cursor: "auto", cursorAt: !1, grid: !1, handle: !1, helper: "original", iframeFix: !1, opacity: !1, refreshPositions: !1, revert: !1, revertDuration: 500, scope: "default", scroll: !0, scrollSensitivity: 20, scrollSpeed: 20, snap: !1, snapMode: "both", snapTolerance: 20, stack: !1, zIndex: !1, drag: null, start: null, stop: null }, _create: function () { "original" === this.options.helper && this._setPositionRelative(); this.options.addClasses && this._addClass("ui-draggable"); this._setHandleClassName(); this._mouseInit() }, _setOption: function (n, t) { this._super(n, t); "handle" === n && (this._removeHandleClassName(), this._setHandleClassName()) }, _destroy: function () { return (this.helper || this.element).is(".ui-draggable-dragging") ? (this.destroyOnClear = !0, void 0) : (this._removeHandleClassName(), this._mouseDestroy(), void 0) }, _mouseCapture: function (t) { var i = this.options; return this.helper || i.disabled || n(t.target).closest(".ui-resizable-handle").length > 0 ? !1 : (this.handle = this._getHandle(t), this.handle ? (this._blurActiveElement(t), this._blockFrames(i.iframeFix === !0 ? "iframe" : i.iframeFix), !0) : !1) }, _blockFrames: function (t) { this.iframeBlocks = this.document.find(t).map(function () { var t = n(this); return n("<div>").css("position", "absolute").appendTo(t.parent()).outerWidth(t.outerWidth()).outerHeight(t.outerHeight()).offset(t.offset())[0] }) }, _unblockFrames: function () { this.iframeBlocks && (this.iframeBlocks.remove(), delete this.iframeBlocks) }, _blurActiveElement: function (t) { var i = n.ui.safeActiveElement(this.document[0]), r = n(t.target); r.closest(i).length || n.ui.safeBlur(i) }, _mouseStart: function (t) { var i = this.options; return this.helper = this._createHelper(t), this._addClass(this.helper, "ui-draggable-dragging"), this._cacheHelperProportions(), n.ui.ddmanager && (n.ui.ddmanager.current = this), this._cacheMargins(), this.cssPosition = this.helper.css("position"), this.scrollParent = this.helper.scrollParent(!0), this.offsetParent = this.helper.offsetParent(), this.hasFixedAncestor = this.helper.parents().filter(function () { return "fixed" === n(this).css("position") }).length > 0, this.positionAbs = this.element.offset(), this._refreshOffsets(t), this.originalPosition = this.position = this._generatePosition(t, !1), this.originalPageX = t.pageX, this.originalPageY = t.pageY, i.cursorAt && this._adjustOffsetFromHelper(i.cursorAt), this._setContainment(), this._trigger("start", t) === !1 ? (this._clear(), !1) : (this._cacheHelperProportions(), n.ui.ddmanager && !i.dropBehaviour && n.ui.ddmanager.prepareOffsets(this, t), this._mouseDrag(t, !0), n.ui.ddmanager && n.ui.ddmanager.dragStart(this, t), !0) }, _refreshOffsets: function (n) { this.offset = { top: this.positionAbs.top - this.margins.top, left: this.positionAbs.left - this.margins.left, scroll: !1, parent: this._getParentOffset(), relative: this._getRelativeOffset() }; this.offset.click = { left: n.pageX - this.offset.left, top: n.pageY - this.offset.top } }, _mouseDrag: function (t, i) { if (this.hasFixedAncestor && (this.offset.parent = this._getParentOffset()), this.position = this._generatePosition(t, !0), this.positionAbs = this._convertPositionTo("absolute"), !i) { var r = this._uiHash(); if (this._trigger("drag", t, r) === !1) return this._mouseUp(new n.Event("mouseup", t)), !1; this.position = r.position } return this.helper[0].style.left = this.position.left + "px", this.helper[0].style.top = this.position.top + "px", n.ui.ddmanager && n.ui.ddmanager.drag(this, t), !1 }, _mouseStop: function (t) { var r = this, i = !1; return n.ui.ddmanager && !this.options.dropBehaviour && (i = n.ui.ddmanager.drop(this, t)), this.dropped && (i = this.dropped, this.dropped = !1), "invalid" === this.options.revert && !i || "valid" === this.options.revert && i || this.options.revert === !0 || n.isFunction(this.options.revert) && this.options.revert.call(this.element, i) ? n(this.helper).animate(this.originalPosition, parseInt(this.options.revertDuration, 10), function () { r._trigger("stop", t) !== !1 && r._clear() }) : this._trigger("stop", t) !== !1 && this._clear(), !1 }, _mouseUp: function (t) { return this._unblockFrames(), n.ui.ddmanager && n.ui.ddmanager.dragStop(this, t), this.handleElement.is(t.target) && this.element.trigger("focus"), n.ui.mouse.prototype._mouseUp.call(this, t) }, cancel: function () { return this.helper.is(".ui-draggable-dragging") ? this._mouseUp(new n.Event("mouseup", { target: this.element[0] })) : this._clear(), this }, _getHandle: function (t) { return this.options.handle ? !!n(t.target).closest(this.element.find(this.options.handle)).length : !0 }, _setHandleClassName: function () { this.handleElement = this.options.handle ? this.element.find(this.options.handle) : this.element; this._addClass(this.handleElement, "ui-draggable-handle") }, _removeHandleClassName: function () { this._removeClass(this.handleElement, "ui-draggable-handle") }, _createHelper: function (t) { var r = this.options, u = n.isFunction(r.helper), i = u ? n(r.helper.apply(this.element[0], [t])) : "clone" === r.helper ? this.element.clone().removeAttr("id") : this.element; return i.parents("body").length || i.appendTo("parent" === r.appendTo ? this.element[0].parentNode : r.appendTo), u && i[0] === this.element[0] && this._setPositionRelative(), i[0] === this.element[0] || /(fixed|absolute)/.test(i.css("position")) || i.css("position", "absolute"), i }, _setPositionRelative: function () { /^(?:r|a|f)/.test(this.element.css("position")) || (this.element[0].style.position = "relative") }, _adjustOffsetFromHelper: function (t) { "string" == typeof t && (t = t.split(" ")); n.isArray(t) && (t = { left: +t[0], top: +t[1] || 0 }); "left" in t && (this.offset.click.left = t.left + this.margins.left); "right" in t && (this.offset.click.left = this.helperProportions.width - t.right + this.margins.left); "top" in t && (this.offset.click.top = t.top + this.margins.top); "bottom" in t && (this.offset.click.top = this.helperProportions.height - t.bottom + this.margins.top) }, _isRootNode: function (n) { return /(html|body)/i.test(n.tagName) || n === this.document[0] }, _getParentOffset: function () { var t = this.offsetParent.offset(), i = this.document[0]; return "absolute" === this.cssPosition && this.scrollParent[0] !== i && n.contains(this.scrollParent[0], this.offsetParent[0]) && (t.left += this.scrollParent.scrollLeft(), t.top += this.scrollParent.scrollTop()), this._isRootNode(this.offsetParent[0]) && (t = { top: 0, left: 0 }), { top: t.top + (parseInt(this.offsetParent.css("borderTopWidth"), 10) || 0), left: t.left + (parseInt(this.offsetParent.css("borderLeftWidth"), 10) || 0) } }, _getRelativeOffset: function () { if ("relative" !== this.cssPosition) return { top: 0, left: 0 }; var n = this.element.position(), t = this._isRootNode(this.scrollParent[0]); return { top: n.top - (parseInt(this.helper.css("top"), 10) || 0) + (t ? 0 : this.scrollParent.scrollTop()), left: n.left - (parseInt(this.helper.css("left"), 10) || 0) + (t ? 0 : this.scrollParent.scrollLeft()) } }, _cacheMargins: function () { this.margins = { left: parseInt(this.element.css("marginLeft"), 10) || 0, top: parseInt(this.element.css("marginTop"), 10) || 0, right: parseInt(this.element.css("marginRight"), 10) || 0, bottom: parseInt(this.element.css("marginBottom"), 10) || 0 } }, _cacheHelperProportions: function () { this.helperProportions = { width: this.helper.outerWidth(), height: this.helper.outerHeight() } }, _setContainment: function () { var f, t, i, r = this.options, u = this.document[0]; return this.relativeContainer = null, r.containment ? "window" === r.containment ? (this.containment = [n(window).scrollLeft() - this.offset.relative.left - this.offset.parent.left, n(window).scrollTop() - this.offset.relative.top - this.offset.parent.top, n(window).scrollLeft() + n(window).width() - this.helperProportions.width - this.margins.left, n(window).scrollTop() + (n(window).height() || u.body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top], void 0) : "document" === r.containment ? (this.containment = [0, 0, n(u).width() - this.helperProportions.width - this.margins.left, (n(u).height() || u.body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top], void 0) : r.containment.constructor === Array ? (this.containment = r.containment, void 0) : ("parent" === r.containment && (r.containment = this.helper[0].parentNode), t = n(r.containment), i = t[0], i && (f = /(scroll|auto)/.test(t.css("overflow")), this.containment = [(parseInt(t.css("borderLeftWidth"), 10) || 0) + (parseInt(t.css("paddingLeft"), 10) || 0), (parseInt(t.css("borderTopWidth"), 10) || 0) + (parseInt(t.css("paddingTop"), 10) || 0), (f ? Math.max(i.scrollWidth, i.offsetWidth) : i.offsetWidth) - (parseInt(t.css("borderRightWidth"), 10) || 0) - (parseInt(t.css("paddingRight"), 10) || 0) - this.helperProportions.width - this.margins.left - this.margins.right, (f ? Math.max(i.scrollHeight, i.offsetHeight) : i.offsetHeight) - (parseInt(t.css("borderBottomWidth"), 10) || 0) - (parseInt(t.css("paddingBottom"), 10) || 0) - this.helperProportions.height - this.margins.top - this.margins.bottom], this.relativeContainer = t), void 0) : (this.containment = null, void 0) }, _convertPositionTo: function (n, t) { t || (t = this.position); var i = "absolute" === n ? 1 : -1, r = this._isRootNode(this.scrollParent[0]); return { top: t.top + this.offset.relative.top * i + this.offset.parent.top * i - ("fixed" === this.cssPosition ? -this.offset.scroll.top : r ? 0 : this.offset.scroll.top) * i, left: t.left + this.offset.relative.left * i + this.offset.parent.left * i - ("fixed" === this.cssPosition ? -this.offset.scroll.left : r ? 0 : this.offset.scroll.left) * i } }, _generatePosition: function (n, t) { var i, s, u, f, r = this.options, h = this._isRootNode(this.scrollParent[0]), e = n.pageX, o = n.pageY; return h && this.offset.scroll || (this.offset.scroll = { top: this.scrollParent.scrollTop(), left: this.scrollParent.scrollLeft() }), t && (this.containment && (this.relativeContainer ? (s = this.relativeContainer.offset(), i = [this.containment[0] + s.left, this.containment[1] + s.top, this.containment[2] + s.left, this.containment[3] + s.top]) : i = this.containment, n.pageX - this.offset.click.left < i[0] && (e = i[0] + this.offset.click.left), n.pageY - this.offset.click.top < i[1] && (o = i[1] + this.offset.click.top), n.pageX - this.offset.click.left > i[2] && (e = i[2] + this.offset.click.left), n.pageY - this.offset.click.top > i[3] && (o = i[3] + this.offset.click.top)), r.grid && (u = r.grid[1] ? this.originalPageY + Math.round((o - this.originalPageY) / r.grid[1]) * r.grid[1] : this.originalPageY, o = i ? u - this.offset.click.top >= i[1] || u - this.offset.click.top > i[3] ? u : u - this.offset.click.top >= i[1] ? u - r.grid[1] : u + r.grid[1] : u, f = r.grid[0] ? this.originalPageX + Math.round((e - this.originalPageX) / r.grid[0]) * r.grid[0] : this.originalPageX, e = i ? f - this.offset.click.left >= i[0] || f - this.offset.click.left > i[2] ? f : f - this.offset.click.left >= i[0] ? f - r.grid[0] : f + r.grid[0] : f), "y" === r.axis && (e = this.originalPageX), "x" === r.axis && (o = this.originalPageY)), { top: o - this.offset.click.top - this.offset.relative.top - this.offset.parent.top + ("fixed" === this.cssPosition ? -this.offset.scroll.top : h ? 0 : this.offset.scroll.top), left: e - this.offset.click.left - this.offset.relative.left - this.offset.parent.left + ("fixed" === this.cssPosition ? -this.offset.scroll.left : h ? 0 : this.offset.scroll.left) } }, _clear: function () { this._removeClass(this.helper, "ui-draggable-dragging"); this.helper[0] === this.element[0] || this.cancelHelperRemoval || this.helper.remove(); this.helper = null; this.cancelHelperRemoval = !1; this.destroyOnClear && this.destroy() }, _trigger: function (t, i, r) { return r = r || this._uiHash(), n.ui.plugin.call(this, t, [i, r, this], !0), /^(drag|start|stop)/.test(t) && (this.positionAbs = this._convertPositionTo("absolute"), r.offset = this.positionAbs), n.Widget.prototype._trigger.call(this, t, i, r) }, plugins: {}, _uiHash: function () { return { helper: this.helper, position: this.position, originalPosition: this.originalPosition, offset: this.positionAbs } } }); n.ui.plugin.add("draggable", "connectToSortable", { start: function (t, i, r) { var u = n.extend({}, i, { item: r.element }); r.sortables = []; n(r.options.connectToSortable).each(function () { var i = n(this).sortable("instance"); i && !i.options.disabled && (r.sortables.push(i), i.refreshPositions(), i._trigger("activate", t, u)) }) }, stop: function (t, i, r) { var u = n.extend({}, i, { item: r.element }); r.cancelHelperRemoval = !1; n.each(r.sortables, function () { var n = this; n.isOver ? (n.isOver = 0, r.cancelHelperRemoval = !0, n.cancelHelperRemoval = !1, n._storedCSS = { position: n.placeholder.css("position"), top: n.placeholder.css("top"), left: n.placeholder.css("left") }, n._mouseStop(t), n.options.helper = n.options._helper) : (n.cancelHelperRemoval = !0, n._trigger("deactivate", t, u)) }) }, drag: function (t, i, r) { n.each(r.sortables, function () { var f = !1, u = this; u.positionAbs = r.positionAbs; u.helperProportions = r.helperProportions; u.offset.click = r.offset.click; u._intersectsWith(u.containerCache) && (f = !0, n.each(r.sortables, function () { return this.positionAbs = r.positionAbs, this.helperProportions = r.helperProportions, this.offset.click = r.offset.click, this !== u && this._intersectsWith(this.containerCache) && n.contains(u.element[0], this.element[0]) && (f = !1), f })); f ? (u.isOver || (u.isOver = 1, r._parent = i.helper.parent(), u.currentItem = i.helper.appendTo(u.element).data("ui-sortable-item", !0), u.options._helper = u.options.helper, u.options.helper = function () { return i.helper[0] }, t.target = u.currentItem[0], u._mouseCapture(t, !0), u._mouseStart(t, !0, !0), u.offset.click.top = r.offset.click.top, u.offset.click.left = r.offset.click.left, u.offset.parent.left -= r.offset.parent.left - u.offset.parent.left, u.offset.parent.top -= r.offset.parent.top - u.offset.parent.top, r._trigger("toSortable", t), r.dropped = u.element, n.each(r.sortables, function () { this.refreshPositions() }), r.currentItem = r.element, u.fromOutside = r), u.currentItem && (u._mouseDrag(t), i.position = u.position)) : u.isOver && (u.isOver = 0, u.cancelHelperRemoval = !0, u.options._revert = u.options.revert, u.options.revert = !1, u._trigger("out", t, u._uiHash(u)), u._mouseStop(t, !0), u.options.revert = u.options._revert, u.options.helper = u.options._helper, u.placeholder && u.placeholder.remove(), i.helper.appendTo(r._parent), r._refreshOffsets(t), i.position = r._generatePosition(t, !0), r._trigger("fromSortable", t), r.dropped = !1, n.each(r.sortables, function () { this.refreshPositions() })) }) } }); n.ui.plugin.add("draggable", "cursor", { start: function (t, i, r) { var u = n("body"), f = r.options; u.css("cursor") && (f._cursor = u.css("cursor")); u.css("cursor", f.cursor) }, stop: function (t, i, r) { var u = r.options; u._cursor && n("body").css("cursor", u._cursor) } }); n.ui.plugin.add("draggable", "opacity", { start: function (t, i, r) { var u = n(i.helper), f = r.options; u.css("opacity") && (f._opacity = u.css("opacity")); u.css("opacity", f.opacity) }, stop: function (t, i, r) { var u = r.options; u._opacity && n(i.helper).css("opacity", u._opacity) } }); n.ui.plugin.add("draggable", "scroll", { start: function (n, t, i) { i.scrollParentNotHidden || (i.scrollParentNotHidden = i.helper.scrollParent(!1)); i.scrollParentNotHidden[0] !== i.document[0] && "HTML" !== i.scrollParentNotHidden[0].tagName && (i.overflowOffset = i.scrollParentNotHidden.offset()) }, drag: function (t, i, r) { var u = r.options, o = !1, e = r.scrollParentNotHidden[0], f = r.document[0]; e !== f && "HTML" !== e.tagName ? (u.axis && "x" === u.axis || (r.overflowOffset.top + e.offsetHeight - t.pageY < u.scrollSensitivity ? e.scrollTop = o = e.scrollTop + u.scrollSpeed : t.pageY - r.overflowOffset.top < u.scrollSensitivity && (e.scrollTop = o = e.scrollTop - u.scrollSpeed)), u.axis && "y" === u.axis || (r.overflowOffset.left + e.offsetWidth - t.pageX < u.scrollSensitivity ? e.scrollLeft = o = e.scrollLeft + u.scrollSpeed : t.pageX - r.overflowOffset.left < u.scrollSensitivity && (e.scrollLeft = o = e.scrollLeft - u.scrollSpeed))) : (u.axis && "x" === u.axis || (t.pageY - n(f).scrollTop() < u.scrollSensitivity ? o = n(f).scrollTop(n(f).scrollTop() - u.scrollSpeed) : n(window).height() - (t.pageY - n(f).scrollTop()) < u.scrollSensitivity && (o = n(f).scrollTop(n(f).scrollTop() + u.scrollSpeed))), u.axis && "y" === u.axis || (t.pageX - n(f).scrollLeft() < u.scrollSensitivity ? o = n(f).scrollLeft(n(f).scrollLeft() - u.scrollSpeed) : n(window).width() - (t.pageX - n(f).scrollLeft()) < u.scrollSensitivity && (o = n(f).scrollLeft(n(f).scrollLeft() + u.scrollSpeed)))); o !== !1 && n.ui.ddmanager && !u.dropBehaviour && n.ui.ddmanager.prepareOffsets(r, t) } }); n.ui.plugin.add("draggable", "snap", { start: function (t, i, r) { var u = r.options; r.snapElements = []; n(u.snap.constructor !== String ? u.snap.items || ":data(ui-draggable)" : u.snap).each(function () { var t = n(this), i = t.offset(); this !== r.element[0] && r.snapElements.push({ item: this, width: t.outerWidth(), height: t.outerHeight(), top: i.top, left: i.left }) }) }, drag: function (t, i, r) { for (var e, o, s, h, c, a, l, v, w, b = r.options, f = b.snapTolerance, y = i.offset.left, k = y + r.helperProportions.width, p = i.offset.top, d = p + r.helperProportions.height, u = r.snapElements.length - 1; u >= 0; u--)c = r.snapElements[u].left - r.margins.left, a = c + r.snapElements[u].width, l = r.snapElements[u].top - r.margins.top, v = l + r.snapElements[u].height, c - f > k || y > a + f || l - f > d || p > v + f || !n.contains(r.snapElements[u].item.ownerDocument, r.snapElements[u].item) ? (r.snapElements[u].snapping && r.options.snap.release && r.options.snap.release.call(r.element, t, n.extend(r._uiHash(), { snapItem: r.snapElements[u].item })), r.snapElements[u].snapping = !1) : ("inner" !== b.snapMode && (e = f >= Math.abs(l - d), o = f >= Math.abs(v - p), s = f >= Math.abs(c - k), h = f >= Math.abs(a - y), e && (i.position.top = r._convertPositionTo("relative", { top: l - r.helperProportions.height, left: 0 }).top), o && (i.position.top = r._convertPositionTo("relative", { top: v, left: 0 }).top), s && (i.position.left = r._convertPositionTo("relative", { top: 0, left: c - r.helperProportions.width }).left), h && (i.position.left = r._convertPositionTo("relative", { top: 0, left: a }).left)), w = e || o || s || h, "outer" !== b.snapMode && (e = f >= Math.abs(l - p), o = f >= Math.abs(v - d), s = f >= Math.abs(c - y), h = f >= Math.abs(a - k), e && (i.position.top = r._convertPositionTo("relative", { top: l, left: 0 }).top), o && (i.position.top = r._convertPositionTo("relative", { top: v - r.helperProportions.height, left: 0 }).top), s && (i.position.left = r._convertPositionTo("relative", { top: 0, left: c }).left), h && (i.position.left = r._convertPositionTo("relative", { top: 0, left: a - r.helperProportions.width }).left)), !r.snapElements[u].snapping && (e || o || s || h || w) && r.options.snap.snap && r.options.snap.snap.call(r.element, t, n.extend(r._uiHash(), { snapItem: r.snapElements[u].item })), r.snapElements[u].snapping = e || o || s || h || w) } }); n.ui.plugin.add("draggable", "stack", { start: function (t, i, r) { var f, e = r.options, u = n.makeArray(n(e.stack)).sort(function (t, i) { return (parseInt(n(t).css("zIndex"), 10) || 0) - (parseInt(n(i).css("zIndex"), 10) || 0) }); u.length && (f = parseInt(n(u[0]).css("zIndex"), 10) || 0, n(u).each(function (t) { n(this).css("zIndex", f + t) }), this.css("zIndex", f + u.length)) } }); n.ui.plugin.add("draggable", "zIndex", { start: function (t, i, r) { var u = n(i.helper), f = r.options; u.css("zIndex") && (f._zIndex = u.css("zIndex")); u.css("zIndex", f.zIndex) }, stop: function (t, i, r) { var u = r.options; u._zIndex && n(i.helper).css("zIndex", u._zIndex) } }); n.ui.draggable; n.widget("ui.resizable", n.ui.mouse, { version: "1.12.1", widgetEventPrefix: "resize", options: { alsoResize: !1, animate: !1, animateDuration: "slow", animateEasing: "swing", aspectRatio: !1, autoHide: !1, classes: { "ui-resizable-se": "ui-icon ui-icon-gripsmall-diagonal-se" }, containment: !1, ghost: !1, grid: !1, handles: "e,s,se", helper: !1, maxHeight: null, maxWidth: null, minHeight: 10, minWidth: 10, zIndex: 90, resize: null, start: null, stop: null }, _num: function (n) { return parseFloat(n) || 0 }, _isNumber: function (n) { return !isNaN(parseFloat(n)) }, _hasScroll: function (t, i) { if ("hidden" === n(t).css("overflow")) return !1; var r = i && "left" === i ? "scrollLeft" : "scrollTop", u = !1; return t[r] > 0 ? !0 : (t[r] = 1, u = t[r] > 0, t[r] = 0, u) }, _create: function () { var r, t = this.options, i = this; this._addClass("ui-resizable"); n.extend(this, { _aspectRatio: !!t.aspectRatio, aspectRatio: t.aspectRatio, originalElement: this.element, _proportionallyResizeElements: [], _helper: t.helper || t.ghost || t.animate ? t.helper || "ui-resizable-helper" : null }); this.element[0].nodeName.match(/^(canvas|textarea|input|select|button|img)$/i) && (this.element.wrap(n("<div class='ui-wrapper' style='overflow: hidden;'><\/div>").css({ position: this.element.css("position"), width: this.element.outerWidth(), height: this.element.outerHeight(), top: this.element.css("top"), left: this.element.css("left") })), this.element = this.element.parent().data("ui-resizable", this.element.resizable("instance")), this.elementIsWrapper = !0, r = { marginTop: this.originalElement.css("marginTop"), marginRight: this.originalElement.css("marginRight"), marginBottom: this.originalElement.css("marginBottom"), marginLeft: this.originalElement.css("marginLeft") }, this.element.css(r), this.originalElement.css("margin", 0), this.originalResizeStyle = this.originalElement.css("resize"), this.originalElement.css("resize", "none"), this._proportionallyResizeElements.push(this.originalElement.css({ position: "static", zoom: 1, display: "block" })), this.originalElement.css(r), this._proportionallyResize()); this._setupHandles(); t.autoHide && n(this.element).on("mouseenter", function () { t.disabled || (i._removeClass("ui-resizable-autohide"), i._handles.show()) }).on("mouseleave", function () { t.disabled || i.resizing || (i._addClass("ui-resizable-autohide"), i._handles.hide()) }); this._mouseInit() }, _destroy: function () { this._mouseDestroy(); var t, i = function (t) { n(t).removeData("resizable").removeData("ui-resizable").off(".resizable").find(".ui-resizable-handle").remove() }; return this.elementIsWrapper && (i(this.element), t = this.element, this.originalElement.css({ position: t.css("position"), width: t.outerWidth(), height: t.outerHeight(), top: t.css("top"), left: t.css("left") }).insertAfter(t), t.remove()), this.originalElement.css("resize", this.originalResizeStyle), i(this.originalElement), this }, _setOption: function (n, t) { switch (this._super(n, t), n) { case "handles": this._removeHandles(); this._setupHandles() } }, _setupHandles: function () { var i, r, u, o, t, f = this.options, e = this; if (this.handles = f.handles || (n(".ui-resizable-handle", this.element).length ? { n: ".ui-resizable-n", e: ".ui-resizable-e", s: ".ui-resizable-s", w: ".ui-resizable-w", se: ".ui-resizable-se", sw: ".ui-resizable-sw", ne: ".ui-resizable-ne", nw: ".ui-resizable-nw" } : "e,s,se"), this._handles = n(), this.handles.constructor === String) for ("all" === this.handles && (this.handles = "n,e,s,w,se,sw,ne,nw"), u = this.handles.split(","), this.handles = {}, r = 0; u.length > r; r++)i = n.trim(u[r]), o = "ui-resizable-" + i, t = n("<div>"), this._addClass(t, "ui-resizable-handle " + o), t.css({ zIndex: f.zIndex }), this.handles[i] = ".ui-resizable-" + i, this.element.append(t); this._renderAxis = function (t) { var i, r, u, f; t = t || this.element; for (i in this.handles) this.handles[i].constructor === String ? this.handles[i] = this.element.children(this.handles[i]).first().show() : (this.handles[i].jquery || this.handles[i].nodeType) && (this.handles[i] = n(this.handles[i]), this._on(this.handles[i], { mousedown: e._mouseDown })), this.elementIsWrapper && this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i) && (r = n(this.handles[i], this.element), f = /sw|ne|nw|se|n|s/.test(i) ? r.outerHeight() : r.outerWidth(), u = ["padding", /ne|nw|n/.test(i) ? "Top" : /se|sw|s/.test(i) ? "Bottom" : /^e$/.test(i) ? "Right" : "Left"].join(""), t.css(u, f), this._proportionallyResize()), this._handles = this._handles.add(this.handles[i]) }; this._renderAxis(this.element); this._handles = this._handles.add(this.element.find(".ui-resizable-handle")); this._handles.disableSelection(); this._handles.on("mouseover", function () { e.resizing || (this.className && (t = this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)), e.axis = t && t[1] ? t[1] : "se") }); f.autoHide && (this._handles.hide(), this._addClass("ui-resizable-autohide")) }, _removeHandles: function () { this._handles.remove() }, _mouseCapture: function (t) { var r, i, u = !1; for (r in this.handles) i = n(this.handles[r])[0], (i === t.target || n.contains(i, t.target)) && (u = !0); return !this.options.disabled && u }, _mouseStart: function (t) { var u, f, e, r = this.options, i = this.element; return this.resizing = !0, this._renderProxy(), u = this._num(this.helper.css("left")), f = this._num(this.helper.css("top")), r.containment && (u += n(r.containment).scrollLeft() || 0, f += n(r.containment).scrollTop() || 0), this.offset = this.helper.offset(), this.position = { left: u, top: f }, this.size = this._helper ? { width: this.helper.width(), height: this.helper.height() } : { width: i.width(), height: i.height() }, this.originalSize = this._helper ? { width: i.outerWidth(), height: i.outerHeight() } : { width: i.width(), height: i.height() }, this.sizeDiff = { width: i.outerWidth() - i.width(), height: i.outerHeight() - i.height() }, this.originalPosition = { left: u, top: f }, this.originalMousePosition = { left: t.pageX, top: t.pageY }, this.aspectRatio = "number" == typeof r.aspectRatio ? r.aspectRatio : this.originalSize.width / this.originalSize.height || 1, e = n(".ui-resizable-" + this.axis).css("cursor"), n("body").css("cursor", "auto" === e ? this.axis + "-resize" : e), this._addClass("ui-resizable-resizing"), this._propagate("start", t), !0 }, _mouseDrag: function (t) { var i, r, u = this.originalMousePosition, e = this.axis, o = t.pageX - u.left || 0, s = t.pageY - u.top || 0, f = this._change[e]; return this._updatePrevProperties(), f ? (i = f.apply(this, [t, o, s]), this._updateVirtualBoundaries(t.shiftKey), (this._aspectRatio || t.shiftKey) && (i = this._updateRatio(i, t)), i = this._respectSize(i, t), this._updateCache(i), this._propagate("resize", t), r = this._applyChanges(), !this._helper && this._proportionallyResizeElements.length && this._proportionallyResize(), n.isEmptyObject(r) || (this._updatePrevProperties(), this._trigger("resize", t, this.ui()), this._applyChanges()), !1) : !1 }, _mouseStop: function (t) { this.resizing = !1; var r, u, f, e, o, s, h, c = this.options, i = this; return this._helper && (r = this._proportionallyResizeElements, u = r.length && /textarea/i.test(r[0].nodeName), f = u && this._hasScroll(r[0], "left") ? 0 : i.sizeDiff.height, e = u ? 0 : i.sizeDiff.width, o = { width: i.helper.width() - e, height: i.helper.height() - f }, s = parseFloat(i.element.css("left")) + (i.position.left - i.originalPosition.left) || null, h = parseFloat(i.element.css("top")) + (i.position.top - i.originalPosition.top) || null, c.animate || this.element.css(n.extend(o, { top: h, left: s })), i.helper.height(i.size.height), i.helper.width(i.size.width), this._helper && !c.animate && this._proportionallyResize()), n("body").css("cursor", "auto"), this._removeClass("ui-resizable-resizing"), this._propagate("stop", t), this._helper && this.helper.remove(), !1 }, _updatePrevProperties: function () { this.prevPosition = { top: this.position.top, left: this.position.left }; this.prevSize = { width: this.size.width, height: this.size.height } }, _applyChanges: function () { var n = {}; return this.position.top !== this.prevPosition.top && (n.top = this.position.top + "px"), this.position.left !== this.prevPosition.left && (n.left = this.position.left + "px"), this.size.width !== this.prevSize.width && (n.width = this.size.width + "px"), this.size.height !== this.prevSize.height && (n.height = this.size.height + "px"), this.helper.css(n), n }, _updateVirtualBoundaries: function (n) { var r, u, f, e, t, i = this.options; t = { minWidth: this._isNumber(i.minWidth) ? i.minWidth : 0, maxWidth: this._isNumber(i.maxWidth) ? i.maxWidth : 1 / 0, minHeight: this._isNumber(i.minHeight) ? i.minHeight : 0, maxHeight: this._isNumber(i.maxHeight) ? i.maxHeight : 1 / 0 }; (this._aspectRatio || n) && (r = t.minHeight * this.aspectRatio, f = t.minWidth / this.aspectRatio, u = t.maxHeight * this.aspectRatio, e = t.maxWidth / this.aspectRatio, r > t.minWidth && (t.minWidth = r), f > t.minHeight && (t.minHeight = f), t.maxWidth > u && (t.maxWidth = u), t.maxHeight > e && (t.maxHeight = e)); this._vBoundaries = t }, _updateCache: function (n) { this.offset = this.helper.offset(); this._isNumber(n.left) && (this.position.left = n.left); this._isNumber(n.top) && (this.position.top = n.top); this._isNumber(n.height) && (this.size.height = n.height); this._isNumber(n.width) && (this.size.width = n.width) }, _updateRatio: function (n) { var t = this.position, i = this.size, r = this.axis; return this._isNumber(n.height) ? n.width = n.height * this.aspectRatio : this._isNumber(n.width) && (n.height = n.width / this.aspectRatio), "sw" === r && (n.left = t.left + (i.width - n.width), n.top = null), "nw" === r && (n.top = t.top + (i.height - n.height), n.left = t.left + (i.width - n.width)), n }, _respectSize: function (n) { var t = this._vBoundaries, i = this.axis, r = this._isNumber(n.width) && t.maxWidth && t.maxWidth < n.width, u = this._isNumber(n.height) && t.maxHeight && t.maxHeight < n.height, f = this._isNumber(n.width) && t.minWidth && t.minWidth > n.width, e = this._isNumber(n.height) && t.minHeight && t.minHeight > n.height, o = this.originalPosition.left + this.originalSize.width, s = this.originalPosition.top + this.originalSize.height, h = /sw|nw|w/.test(i), c = /nw|ne|n/.test(i); return f && (n.width = t.minWidth), e && (n.height = t.minHeight), r && (n.width = t.maxWidth), u && (n.height = t.maxHeight), f && h && (n.left = o - t.minWidth), r && h && (n.left = o - t.maxWidth), e && c && (n.top = s - t.minHeight), u && c && (n.top = s - t.maxHeight), n.width || n.height || n.left || !n.top ? n.width || n.height || n.top || !n.left || (n.left = null) : n.top = null, n }, _getPaddingPlusBorderDimensions: function (n) { for (var t = 0, i = [], r = [n.css("borderTopWidth"), n.css("borderRightWidth"), n.css("borderBottomWidth"), n.css("borderLeftWidth")], u = [n.css("paddingTop"), n.css("paddingRight"), n.css("paddingBottom"), n.css("paddingLeft")]; 4 > t; t++)i[t] = parseFloat(r[t]) || 0, i[t] += parseFloat(u[t]) || 0; return { height: i[0] + i[2], width: i[1] + i[3] } }, _proportionallyResize: function () { if (this._proportionallyResizeElements.length) for (var n, t = 0, i = this.helper || this.element; this._proportionallyResizeElements.length > t; t++)n = this._proportionallyResizeElements[t], this.outerDimensions || (this.outerDimensions = this._getPaddingPlusBorderDimensions(n)), n.css({ height: i.height() - this.outerDimensions.height || 0, width: i.width() - this.outerDimensions.width || 0 }) }, _renderProxy: function () { var t = this.element, i = this.options; this.elementOffset = t.offset(); this._helper ? (this.helper = this.helper || n("<div style='overflow:hidden;'><\/div>"), this._addClass(this.helper, this._helper), this.helper.css({ width: this.element.outerWidth(), height: this.element.outerHeight(), position: "absolute", left: this.elementOffset.left + "px", top: this.elementOffset.top + "px", zIndex: ++i.zIndex }), this.helper.appendTo("body").disableSelection()) : this.helper = this.element }, _change: { e: function (n, t) { return { width: this.originalSize.width + t } }, w: function (n, t) { var i = this.originalSize, r = this.originalPosition; return { left: r.left + t, width: i.width - t } }, n: function (n, t, i) { var r = this.originalSize, u = this.originalPosition; return { top: u.top + i, height: r.height - i } }, s: function (n, t, i) { return { height: this.originalSize.height + i } }, se: function (t, i, r) { return n.extend(this._change.s.apply(this, arguments), this._change.e.apply(this, [t, i, r])) }, sw: function (t, i, r) { return n.extend(this._change.s.apply(this, arguments), this._change.w.apply(this, [t, i, r])) }, ne: function (t, i, r) { return n.extend(this._change.n.apply(this, arguments), this._change.e.apply(this, [t, i, r])) }, nw: function (t, i, r) { return n.extend(this._change.n.apply(this, arguments), this._change.w.apply(this, [t, i, r])) } }, _propagate: function (t, i) { n.ui.plugin.call(this, t, [i, this.ui()]); "resize" !== t && this._trigger(t, i, this.ui()) }, plugins: {}, ui: function () { return { originalElement: this.originalElement, element: this.element, helper: this.helper, position: this.position, size: this.size, originalSize: this.originalSize, originalPosition: this.originalPosition } } }); n.ui.plugin.add("resizable", "animate", { stop: function (t) { var i = n(this).resizable("instance"), u = i.options, r = i._proportionallyResizeElements, f = r.length && /textarea/i.test(r[0].nodeName), s = f && i._hasScroll(r[0], "left") ? 0 : i.sizeDiff.height, h = f ? 0 : i.sizeDiff.width, c = { width: i.size.width - h, height: i.size.height - s }, e = parseFloat(i.element.css("left")) + (i.position.left - i.originalPosition.left) || null, o = parseFloat(i.element.css("top")) + (i.position.top - i.originalPosition.top) || null; i.element.animate(n.extend(c, o && e ? { top: o, left: e } : {}), { duration: u.animateDuration, easing: u.animateEasing, step: function () { var u = { width: parseFloat(i.element.css("width")), height: parseFloat(i.element.css("height")), top: parseFloat(i.element.css("top")), left: parseFloat(i.element.css("left")) }; r && r.length && n(r[0]).css({ width: u.width, height: u.height }); i._updateCache(u); i._propagate("resize", t) } }) } }); n.ui.plugin.add("resizable", "containment", { start: function () { var r, f, e, o, s, h, c, t = n(this).resizable("instance"), l = t.options, a = t.element, u = l.containment, i = u instanceof n ? u.get(0) : /parent/.test(u) ? a.parent().get(0) : u; i && (t.containerElement = n(i), /document/.test(u) || u === document ? (t.containerOffset = { left: 0, top: 0 }, t.containerPosition = { left: 0, top: 0 }, t.parentData = { element: n(document), left: 0, top: 0, width: n(document).width(), height: n(document).height() || document.body.parentNode.scrollHeight }) : (r = n(i), f = [], n(["Top", "Right", "Left", "Bottom"]).each(function (n, i) { f[n] = t._num(r.css("padding" + i)) }), t.containerOffset = r.offset(), t.containerPosition = r.position(), t.containerSize = { height: r.innerHeight() - f[3], width: r.innerWidth() - f[1] }, e = t.containerOffset, o = t.containerSize.height, s = t.containerSize.width, h = t._hasScroll(i, "left") ? i.scrollWidth : s, c = t._hasScroll(i) ? i.scrollHeight : o, t.parentData = { element: i, left: e.left, top: e.top, width: h, height: c })) }, resize: function (t) { var o, s, h, c, i = n(this).resizable("instance"), v = i.options, r = i.containerOffset, l = i.position, f = i._aspectRatio || t.shiftKey, e = { top: 0, left: 0 }, a = i.containerElement, u = !0; a[0] !== document && /static/.test(a.css("position")) && (e = r); l.left < (i._helper ? r.left : 0) && (i.size.width = i.size.width + (i._helper ? i.position.left - r.left : i.position.left - e.left), f && (i.size.height = i.size.width / i.aspectRatio, u = !1), i.position.left = v.helper ? r.left : 0); l.top < (i._helper ? r.top : 0) && (i.size.height = i.size.height + (i._helper ? i.position.top - r.top : i.position.top), f && (i.size.width = i.size.height * i.aspectRatio, u = !1), i.position.top = i._helper ? r.top : 0); h = i.containerElement.get(0) === i.element.parent().get(0); c = /relative|absolute/.test(i.containerElement.css("position")); h && c ? (i.offset.left = i.parentData.left + i.position.left, i.offset.top = i.parentData.top + i.position.top) : (i.offset.left = i.element.offset().left, i.offset.top = i.element.offset().top); o = Math.abs(i.sizeDiff.width + (i._helper ? i.offset.left - e.left : i.offset.left - r.left)); s = Math.abs(i.sizeDiff.height + (i._helper ? i.offset.top - e.top : i.offset.top - r.top)); o + i.size.width >= i.parentData.width && (i.size.width = i.parentData.width - o, f && (i.size.height = i.size.width / i.aspectRatio, u = !1)); s + i.size.height >= i.parentData.height && (i.size.height = i.parentData.height - s, f && (i.size.width = i.size.height * i.aspectRatio, u = !1)); u || (i.position.left = i.prevPosition.left, i.position.top = i.prevPosition.top, i.size.width = i.prevSize.width, i.size.height = i.prevSize.height) }, stop: function () { var t = n(this).resizable("instance"), r = t.options, u = t.containerOffset, f = t.containerPosition, e = t.containerElement, i = n(t.helper), o = i.offset(), s = i.outerWidth() - t.sizeDiff.width, h = i.outerHeight() - t.sizeDiff.height; t._helper && !r.animate && /relative/.test(e.css("position")) && n(this).css({ left: o.left - f.left - u.left, width: s, height: h }); t._helper && !r.animate && /static/.test(e.css("position")) && n(this).css({ left: o.left - f.left - u.left, width: s, height: h }) } }); n.ui.plugin.add("resizable", "alsoResize", { start: function () { var t = n(this).resizable("instance"), i = t.options; n(i.alsoResize).each(function () { var t = n(this); t.data("ui-resizable-alsoresize", { width: parseFloat(t.width()), height: parseFloat(t.height()), left: parseFloat(t.css("left")), top: parseFloat(t.css("top")) }) }) }, resize: function (t, i) { var r = n(this).resizable("instance"), e = r.options, u = r.originalSize, f = r.originalPosition, o = { height: r.size.height - u.height || 0, width: r.size.width - u.width || 0, top: r.position.top - f.top || 0, left: r.position.left - f.left || 0 }; n(e.alsoResize).each(function () { var t = n(this), u = n(this).data("ui-resizable-alsoresize"), r = {}, f = t.parents(i.originalElement[0]).length ? ["width", "height"] : ["width", "height", "top", "left"]; n.each(f, function (n, t) { var i = (u[t] || 0) + (o[t] || 0); i && i >= 0 && (r[t] = i || null) }); t.css(r) }) }, stop: function () { n(this).removeData("ui-resizable-alsoresize") } }); n.ui.plugin.add("resizable", "ghost", { start: function () { var t = n(this).resizable("instance"), i = t.size; t.ghost = t.originalElement.clone(); t.ghost.css({ opacity: .25, display: "block", position: "relative", height: i.height, width: i.width, margin: 0, left: 0, top: 0 }); t._addClass(t.ghost, "ui-resizable-ghost"); n.uiBackCompat !== !1 && "string" == typeof t.options.ghost && t.ghost.addClass(this.options.ghost); t.ghost.appendTo(t.helper) }, resize: function () { var t = n(this).resizable("instance"); t.ghost && t.ghost.css({ position: "relative", height: t.size.height, width: t.size.width }) }, stop: function () { var t = n(this).resizable("instance"); t.ghost && t.helper && t.helper.get(0).removeChild(t.ghost.get(0)) } }); n.ui.plugin.add("resizable", "grid", { resize: function () { var h, t = n(this).resizable("instance"), i = t.options, y = t.size, o = t.originalSize, s = t.originalPosition, c = t.axis, l = "number" == typeof i.grid ? [i.grid, i.grid] : i.grid, f = l[0] || 1, e = l[1] || 1, a = Math.round((y.width - o.width) / f) * f, v = Math.round((y.height - o.height) / e) * e, r = o.width + a, u = o.height + v, p = i.maxWidth && r > i.maxWidth, w = i.maxHeight && u > i.maxHeight, b = i.minWidth && i.minWidth > r, k = i.minHeight && i.minHeight > u; i.grid = l; b && (r += f); k && (u += e); p && (r -= f); w && (u -= e); /^(se|s|e)$/.test(c) ? (t.size.width = r, t.size.height = u) : /^(ne)$/.test(c) ? (t.size.width = r, t.size.height = u, t.position.top = s.top - v) : /^(sw)$/.test(c) ? (t.size.width = r, t.size.height = u, t.position.left = s.left - a) : ((0 >= u - e || 0 >= r - f) && (h = t._getPaddingPlusBorderDimensions(this)), u - e > 0 ? (t.size.height = u, t.position.top = s.top - v) : (u = e - h.height, t.size.height = u, t.position.top = s.top + o.height - u), r - f > 0 ? (t.size.width = r, t.position.left = s.left - a) : (r = f - h.width, t.size.width = r, t.position.left = s.left + o.width - r)) } }); n.ui.resizable; n.widget("ui.dialog", { version: "1.12.1", options: { appendTo: "body", autoOpen: !0, buttons: [], classes: { "ui-dialog": "ui-corner-all", "ui-dialog-titlebar": "ui-corner-all" }, closeOnEscape: !0, closeText: "Close", draggable: !0, hide: null, height: "auto", maxHeight: null, maxWidth: null, minHeight: 150, minWidth: 150, modal: !1, position: { my: "center", at: "center", "of": window, collision: "fit", using: function (t) { var i = n(this).css(t).offset().top; 0 > i && n(this).css("top", t.top - i) } }, resizable: !0, show: null, title: null, width: 300, beforeClose: null, close: null, drag: null, dragStart: null, dragStop: null, focus: null, open: null, resize: null, resizeStart: null, resizeStop: null }, sizeRelatedOptions: { buttons: !0, height: !0, maxHeight: !0, maxWidth: !0, minHeight: !0, minWidth: !0, width: !0 }, resizableRelatedOptions: { maxHeight: !0, maxWidth: !0, minHeight: !0, minWidth: !0 }, _create: function () { this.originalCss = { display: this.element[0].style.display, width: this.element[0].style.width, minHeight: this.element[0].style.minHeight, maxHeight: this.element[0].style.maxHeight, height: this.element[0].style.height }; this.originalPosition = { parent: this.element.parent(), index: this.element.parent().children().index(this.element) }; this.originalTitle = this.element.attr("title"); null == this.options.title && null != this.originalTitle && (this.options.title = this.originalTitle); this.options.disabled && (this.options.disabled = !1); this._createWrapper(); this.element.show().removeAttr("title").appendTo(this.uiDialog); this._addClass("ui-dialog-content", "ui-widget-content"); this._createTitlebar(); this._createButtonPane(); this.options.draggable && n.fn.draggable && this._makeDraggable(); this.options.resizable && n.fn.resizable && this._makeResizable(); this._isOpen = !1; this._trackFocus() }, _init: function () { this.options.autoOpen && this.open() }, _appendTo: function () { var t = this.options.appendTo; return t && (t.jquery || t.nodeType) ? n(t) : this.document.find(t || "body").eq(0) }, _destroy: function () { var n, t = this.originalPosition; this._untrackInstance(); this._destroyOverlay(); this.element.removeUniqueId().css(this.originalCss).detach(); this.uiDialog.remove(); this.originalTitle && this.element.attr("title", this.originalTitle); n = t.parent.children().eq(t.index); n.length && n[0] !== this.element[0] ? n.before(this.element) : t.parent.append(this.element) }, widget: function () { return this.uiDialog }, disable: n.noop, enable: n.noop, close: function (t) { var i = this; this._isOpen && this._trigger("beforeClose", t) !== !1 && (this._isOpen = !1, this._focusedElement = null, this._destroyOverlay(), this._untrackInstance(), this.opener.filter(":focusable").trigger("focus").length || n.ui.safeBlur(n.ui.safeActiveElement(this.document[0])), this._hide(this.uiDialog, this.options.hide, function () { i._trigger("close", t) })) }, isOpen: function () { return this._isOpen }, moveToTop: function () { this._moveToTop() }, _moveToTop: function (t, i) { var r = !1, f = this.uiDialog.siblings(".ui-front:visible").map(function () { return +n(this).css("z-index") }).get(), u = Math.max.apply(null, f); return u >= +this.uiDialog.css("z-index") && (this.uiDialog.css("z-index", u + 1), r = !0), r && !i && this._trigger("focus", t), r }, open: function () { var t = this; return this._isOpen ? (this._moveToTop() && this._focusTabbable(), void 0) : (this._isOpen = !0, this.opener = n(n.ui.safeActiveElement(this.document[0])), this._size(), this._position(), this._createOverlay(), this._moveToTop(null, !0), this.overlay && this.overlay.css("z-index", this.uiDialog.css("z-index") - 1), this._show(this.uiDialog, this.options.show, function () { t._focusTabbable(); t._trigger("focus") }), this._makeFocusTarget(), this._trigger("open"), void 0) }, _focusTabbable: function () { var n = this._focusedElement; n || (n = this.element.find("[autofocus]")); n.length || (n = this.element.find(":tabbable")); n.length || (n = this.uiDialogButtonPane.find(":tabbable")); n.length || (n = this.uiDialogTitlebarClose.filter(":tabbable")); n.length || (n = this.uiDialog); n.eq(0).trigger("focus") }, _keepFocus: function (t) { function i() { var t = n.ui.safeActiveElement(this.document[0]), i = this.uiDialog[0] === t || n.contains(this.uiDialog[0], t); i || this._focusTabbable() } t.preventDefault(); i.call(this); this._delay(i) }, _createWrapper: function () { this.uiDialog = n("<div>").hide().attr({ tabIndex: -1, role: "dialog" }).appendTo(this._appendTo()); this._addClass(this.uiDialog, "ui-dialog", "ui-widget ui-widget-content ui-front"); this._on(this.uiDialog, { keydown: function (t) { if (this.options.closeOnEscape && !t.isDefaultPrevented() && t.keyCode && t.keyCode === n.ui.keyCode.ESCAPE) return t.preventDefault(), this.close(t), void 0; if (t.keyCode === n.ui.keyCode.TAB && !t.isDefaultPrevented()) { var i = this.uiDialog.find(":tabbable"), r = i.filter(":first"), u = i.filter(":last"); t.target !== u[0] && t.target !== this.uiDialog[0] || t.shiftKey ? t.target !== r[0] && t.target !== this.uiDialog[0] || !t.shiftKey || (this._delay(function () { u.trigger("focus") }), t.preventDefault()) : (this._delay(function () { r.trigger("focus") }), t.preventDefault()) } }, mousedown: function (n) { this._moveToTop(n) && this._focusTabbable() } }); this.element.find("[aria-describedby]").length || this.uiDialog.attr({ "aria-describedby": this.element.uniqueId().attr("id") }) }, _createTitlebar: function () { var t; this.uiDialogTitlebar = n("<div>"); this._addClass(this.uiDialogTitlebar, "ui-dialog-titlebar", "ui-widget-header ui-helper-clearfix"); this._on(this.uiDialogTitlebar, { mousedown: function (t) { n(t.target).closest(".ui-dialog-titlebar-close") || this.uiDialog.trigger("focus") } }); this.uiDialogTitlebarClose = n("<button type='button'><\/button>").button({ label: n("<a>").text(this.options.closeText).html(), icon: "ui-icon-closethick", showLabel: !1 }).appendTo(this.uiDialogTitlebar); this._addClass(this.uiDialogTitlebarClose, "ui-dialog-titlebar-close"); this._on(this.uiDialogTitlebarClose, { click: function (n) { n.preventDefault(); this.close(n) } }); t = n("<span>").uniqueId().prependTo(this.uiDialogTitlebar); this._addClass(t, "ui-dialog-title"); this._title(t); this.uiDialogTitlebar.prependTo(this.uiDialog); this.uiDialog.attr({ "aria-labelledby": t.attr("id") }) }, _title: function (n) { this.options.title ? n.text(this.options.title) : n.html("&#160;") }, _createButtonPane: function () { this.uiDialogButtonPane = n("<div>"); this._addClass(this.uiDialogButtonPane, "ui-dialog-buttonpane", "ui-widget-content ui-helper-clearfix"); this.uiButtonSet = n("<div>").appendTo(this.uiDialogButtonPane); this._addClass(this.uiButtonSet, "ui-dialog-buttonset"); this._createButtons() }, _createButtons: function () { var i = this, t = this.options.buttons; return this.uiDialogButtonPane.remove(), this.uiButtonSet.empty(), n.isEmptyObject(t) || n.isArray(t) && !t.length ? (this._removeClass(this.uiDialog, "ui-dialog-buttons"), void 0) : (n.each(t, function (t, r) { var u, f; r = n.isFunction(r) ? { click: r, text: t } : r; r = n.extend({ type: "button" }, r); u = r.click; f = { icon: r.icon, iconPosition: r.iconPosition, showLabel: r.showLabel, icons: r.icons, text: r.text }; delete r.click; delete r.icon; delete r.iconPosition; delete r.showLabel; delete r.icons; "boolean" == typeof r.text && delete r.text; n("<button><\/button>", r).button(f).appendTo(i.uiButtonSet).on("click", function () { u.apply(i.element[0], arguments) }) }), this._addClass(this.uiDialog, "ui-dialog-buttons"), this.uiDialogButtonPane.appendTo(this.uiDialog), void 0) }, _makeDraggable: function () { function i(n) { return { position: n.position, offset: n.offset } } var t = this, r = this.options; this.uiDialog.draggable({ cancel: ".ui-dialog-content, .ui-dialog-titlebar-close", handle: ".ui-dialog-titlebar", containment: "document", start: function (r, u) { t._addClass(n(this), "ui-dialog-dragging"); t._blockFrames(); t._trigger("dragStart", r, i(u)) }, drag: function (n, r) { t._trigger("drag", n, i(r)) }, stop: function (u, f) { var e = f.offset.left - t.document.scrollLeft(), o = f.offset.top - t.document.scrollTop(); r.position = { my: "left top", at: "left" + (e >= 0 ? "+" : "") + e + " top" + (o >= 0 ? "+" : "") + o, "of": t.window }; t._removeClass(n(this), "ui-dialog-dragging"); t._unblockFrames(); t._trigger("dragStop", u, i(f)) } }) }, _makeResizable: function () { function r(n) { return { originalPosition: n.originalPosition, originalSize: n.originalSize, position: n.position, size: n.size } } var t = this, i = this.options, u = i.resizable, f = this.uiDialog.css("position"), e = "string" == typeof u ? u : "n,e,s,w,se,sw,ne,nw"; this.uiDialog.resizable({ cancel: ".ui-dialog-content", containment: "document", alsoResize: this.element, maxWidth: i.maxWidth, maxHeight: i.maxHeight, minWidth: i.minWidth, minHeight: this._minHeight(), handles: e, start: function (i, u) { t._addClass(n(this), "ui-dialog-resizing"); t._blockFrames(); t._trigger("resizeStart", i, r(u)) }, resize: function (n, i) { t._trigger("resize", n, r(i)) }, stop: function (u, f) { var e = t.uiDialog.offset(), o = e.left - t.document.scrollLeft(), s = e.top - t.document.scrollTop(); i.height = t.uiDialog.height(); i.width = t.uiDialog.width(); i.position = { my: "left top", at: "left" + (o >= 0 ? "+" : "") + o + " top" + (s >= 0 ? "+" : "") + s, "of": t.window }; t._removeClass(n(this), "ui-dialog-resizing"); t._unblockFrames(); t._trigger("resizeStop", u, r(f)) } }).css("position", f) }, _trackFocus: function () { this._on(this.widget(), { focusin: function (t) { this._makeFocusTarget(); this._focusedElement = n(t.target) } }) }, _makeFocusTarget: function () { this._untrackInstance(); this._trackingInstances().unshift(this) }, _untrackInstance: function () { var t = this._trackingInstances(), i = n.inArray(this, t); -1 !== i && t.splice(i, 1) }, _trackingInstances: function () { var n = this.document.data("ui-dialog-instances"); return n || (n = [], this.document.data("ui-dialog-instances", n)), n }, _minHeight: function () { var n = this.options; return "auto" === n.height ? n.minHeight : Math.min(n.minHeight, n.height) }, _position: function () { var n = this.uiDialog.is(":visible"); n || this.uiDialog.show(); this.uiDialog.position(this.options.position); n || this.uiDialog.hide() }, _setOptions: function (t) { var i = this, r = !1, u = {}; n.each(t, function (n, t) { i._setOption(n, t); n in i.sizeRelatedOptions && (r = !0); n in i.resizableRelatedOptions && (u[n] = t) }); r && (this._size(), this._position()); this.uiDialog.is(":data(ui-resizable)") && this.uiDialog.resizable("option", u) }, _setOption: function (t, i) { var f, u, r = this.uiDialog; "disabled" !== t && (this._super(t, i), "appendTo" === t && this.uiDialog.appendTo(this._appendTo()), "buttons" === t && this._createButtons(), "closeText" === t && this.uiDialogTitlebarClose.button({ label: n("<a>").text("" + this.options.closeText).html() }), "draggable" === t && (f = r.is(":data(ui-draggable)"), f && !i && r.draggable("destroy"), !f && i && this._makeDraggable()), "position" === t && this._position(), "resizable" === t && (u = r.is(":data(ui-resizable)"), u && !i && r.resizable("destroy"), u && "string" == typeof i && r.resizable("option", "handles", i), u || i === !1 || this._makeResizable()), "title" === t && this._title(this.uiDialogTitlebar.find(".ui-dialog-title"))) }, _size: function () { var t, i, r, n = this.options; this.element.show().css({ width: "auto", minHeight: 0, maxHeight: "none", height: 0 }); n.minWidth > n.width && (n.width = n.minWidth); t = this.uiDialog.css({ height: "auto", width: n.width }).outerHeight(); i = Math.max(0, n.minHeight - t); r = "number" == typeof n.maxHeight ? Math.max(0, n.maxHeight - t) : "none"; "auto" === n.height ? this.element.css({ minHeight: i, maxHeight: r, height: "auto" }) : this.element.height(Math.max(0, n.height - t)); this.uiDialog.is(":data(ui-resizable)") && this.uiDialog.resizable("option", "minHeight", this._minHeight()) }, _blockFrames: function () { this.iframeBlocks = this.document.find("iframe").map(function () { var t = n(this); return n("<div>").css({ position: "absolute", width: t.outerWidth(), height: t.outerHeight() }).appendTo(t.parent()).offset(t.offset())[0] }) }, _unblockFrames: function () { this.iframeBlocks && (this.iframeBlocks.remove(), delete this.iframeBlocks) }, _allowInteraction: function (t) { return n(t.target).closest(".ui-dialog").length ? !0 : !!n(t.target).closest(".ui-datepicker").length }, _createOverlay: function () { if (this.options.modal) { var t = !0; this._delay(function () { t = !1 }); this.document.data("ui-dialog-overlays") || this._on(this.document, { focusin: function (n) { t || this._allowInteraction(n) || (n.preventDefault(), this._trackingInstances()[0]._focusTabbable()) } }); this.overlay = n("<div>").appendTo(this._appendTo()); this._addClass(this.overlay, null, "ui-widget-overlay ui-front"); this._on(this.overlay, { mousedown: "_keepFocus" }); this.document.data("ui-dialog-overlays", (this.document.data("ui-dialog-overlays") || 0) + 1) } }, _destroyOverlay: function () { if (this.options.modal && this.overlay) { var n = this.document.data("ui-dialog-overlays") - 1; n ? this.document.data("ui-dialog-overlays", n) : (this._off(this.document, "focusin"), this.document.removeData("ui-dialog-overlays")); this.overlay.remove(); this.overlay = null } } }); n.uiBackCompat !== !1 && n.widget("ui.dialog", n.ui.dialog, { options: { dialogClass: "" }, _createWrapper: function () { this._super(); this.uiDialog.addClass(this.options.dialogClass) }, _setOption: function (n, t) { "dialogClass" === n && this.uiDialog.removeClass(this.options.dialogClass).addClass(t); this._superApply(arguments) } }); n.ui.dialog; n.widget("ui.droppable", { version: "1.12.1", widgetEventPrefix: "drop", options: { accept: "*", addClasses: !0, greedy: !1, scope: "default", tolerance: "intersect", activate: null, deactivate: null, drop: null, out: null, over: null }, _create: function () { var t, i = this.options, r = i.accept; this.isover = !1; this.isout = !0; this.accept = n.isFunction(r) ? r : function (n) { return n.is(r) }; this.proportions = function () { return arguments.length ? (t = arguments[0], void 0) : t ? t : t = { width: this.element[0].offsetWidth, height: this.element[0].offsetHeight } }; this._addToManager(i.scope); i.addClasses && this._addClass("ui-droppable") }, _addToManager: function (t) { n.ui.ddmanager.droppables[t] = n.ui.ddmanager.droppables[t] || []; n.ui.ddmanager.droppables[t].push(this) }, _splice: function (n) { for (var t = 0; n.length > t; t++)n[t] === this && n.splice(t, 1) }, _destroy: function () { var t = n.ui.ddmanager.droppables[this.options.scope]; this._splice(t) }, _setOption: function (t, i) { if ("accept" === t) this.accept = n.isFunction(i) ? i : function (n) { return n.is(i) }; else if ("scope" === t) { var r = n.ui.ddmanager.droppables[this.options.scope]; this._splice(r); this._addToManager(i) } this._super(t, i) }, _activate: function (t) { var i = n.ui.ddmanager.current; this._addActiveClass(); i && this._trigger("activate", t, this.ui(i)) }, _deactivate: function (t) { var i = n.ui.ddmanager.current; this._removeActiveClass(); i && this._trigger("deactivate", t, this.ui(i)) }, _over: function (t) { var i = n.ui.ddmanager.current; i && (i.currentItem || i.element)[0] !== this.element[0] && this.accept.call(this.element[0], i.currentItem || i.element) && (this._addHoverClass(), this._trigger("over", t, this.ui(i))) }, _out: function (t) { var i = n.ui.ddmanager.current; i && (i.currentItem || i.element)[0] !== this.element[0] && this.accept.call(this.element[0], i.currentItem || i.element) && (this._removeHoverClass(), this._trigger("out", t, this.ui(i))) }, _drop: function (t, i) { var r = i || n.ui.ddmanager.current, u = !1; return r && (r.currentItem || r.element)[0] !== this.element[0] ? (this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function () { var i = n(this).droppable("instance"); if (i.options.greedy && !i.options.disabled && i.options.scope === r.options.scope && i.accept.call(i.element[0], r.currentItem || r.element) && e(r, n.extend(i, { offset: i.element.offset() }), i.options.tolerance, t)) return (u = !0, !1) }), u ? !1 : this.accept.call(this.element[0], r.currentItem || r.element) ? (this._removeActiveClass(), this._removeHoverClass(), this._trigger("drop", t, this.ui(r)), this.element) : !1) : !1 }, ui: function (n) { return { draggable: n.currentItem || n.element, helper: n.helper, position: n.position, offset: n.positionAbs } }, _addHoverClass: function () { this._addClass("ui-droppable-hover") }, _removeHoverClass: function () { this._removeClass("ui-droppable-hover") }, _addActiveClass: function () { this._addClass("ui-droppable-active") }, _removeActiveClass: function () { this._removeClass("ui-droppable-active") } }); e = n.ui.intersect = function () { function n(n, t, i) { return n >= t && t + i > n } return function (t, i, r, u) { if (!i.offset) return !1; var o = (t.positionAbs || t.position.absolute).left + t.margins.left, s = (t.positionAbs || t.position.absolute).top + t.margins.top, h = o + t.helperProportions.width, c = s + t.helperProportions.height, f = i.offset.left, e = i.offset.top, l = f + i.proportions().width, a = e + i.proportions().height; switch (r) { case "fit": return o >= f && l >= h && s >= e && a >= c; case "intersect": return o + t.helperProportions.width / 2 > f && l > h - t.helperProportions.width / 2 && s + t.helperProportions.height / 2 > e && a > c - t.helperProportions.height / 2; case "pointer": return n(u.pageY, e, i.proportions().height) && n(u.pageX, f, i.proportions().width); case "touch": return (s >= e && a >= s || c >= e && a >= c || e > s && c > a) && (o >= f && l >= o || h >= f && l >= h || f > o && h > l); default: return !1 } } }(); n.ui.ddmanager = { current: null, droppables: { "default": [] }, prepareOffsets: function (t, i) { var r, f, u = n.ui.ddmanager.droppables[t.options.scope] || [], o = i ? i.type : null, e = (t.currentItem || t.element).find(":data(ui-droppable)").addBack(); n: for (r = 0; u.length > r; r++)if (!(u[r].options.disabled || t && !u[r].accept.call(u[r].element[0], t.currentItem || t.element))) { for (f = 0; e.length > f; f++)if (e[f] === u[r].element[0]) { u[r].proportions().height = 0; continue n } u[r].visible = "none" !== u[r].element.css("display"); u[r].visible && ("mousedown" === o && u[r]._activate.call(u[r], i), u[r].offset = u[r].element.offset(), u[r].proportions({ width: u[r].element[0].offsetWidth, height: u[r].element[0].offsetHeight })) } }, drop: function (t, i) { var r = !1; return n.each((n.ui.ddmanager.droppables[t.options.scope] || []).slice(), function () { this.options && (!this.options.disabled && this.visible && e(t, this, this.options.tolerance, i) && (r = this._drop.call(this, i) || r), !this.options.disabled && this.visible && this.accept.call(this.element[0], t.currentItem || t.element) && (this.isout = !0, this.isover = !1, this._deactivate.call(this, i))) }), r }, dragStart: function (t, i) { t.element.parentsUntil("body").on("scroll.droppable", function () { t.options.refreshPositions || n.ui.ddmanager.prepareOffsets(t, i) }) }, drag: function (t, i) { t.options.refreshPositions && n.ui.ddmanager.prepareOffsets(t, i); n.each(n.ui.ddmanager.droppables[t.options.scope] || [], function () { if (!this.options.disabled && !this.greedyChild && this.visible) { var r, o, f, s = e(t, this, this.options.tolerance, i), u = !s && this.isover ? "isout" : s && !this.isover ? "isover" : null; u && (this.options.greedy && (o = this.options.scope, f = this.element.parents(":data(ui-droppable)").filter(function () { return n(this).droppable("instance").options.scope === o }), f.length && (r = n(f[0]).droppable("instance"), r.greedyChild = "isover" === u)), r && "isover" === u && (r.isover = !1, r.isout = !0, r._out.call(r, i)), this[u] = !0, this["isout" === u ? "isover" : "isout"] = !1, this["isover" === u ? "_over" : "_out"].call(this, i), r && "isout" === u && (r.isout = !1, r.isover = !0, r._over.call(r, i))) } }) }, dragStop: function (t, i) { t.element.parentsUntil("body").off("scroll.droppable"); t.options.refreshPositions || n.ui.ddmanager.prepareOffsets(t, i) } }; n.uiBackCompat !== !1 && n.widget("ui.droppable", n.ui.droppable, { options: { hoverClass: !1, activeClass: !1 }, _addActiveClass: function () { this._super(); this.options.activeClass && this.element.addClass(this.options.activeClass) }, _removeActiveClass: function () { this._super(); this.options.activeClass && this.element.removeClass(this.options.activeClass) }, _addHoverClass: function () { this._super(); this.options.hoverClass && this.element.addClass(this.options.hoverClass) }, _removeHoverClass: function () { this._super(); this.options.hoverClass && this.element.removeClass(this.options.hoverClass) } }); n.ui.droppable; n.widget("ui.progressbar", { version: "1.12.1", options: { classes: { "ui-progressbar": "ui-corner-all", "ui-progressbar-value": "ui-corner-left", "ui-progressbar-complete": "ui-corner-right" }, max: 100, value: 0, change: null, complete: null }, min: 0, _create: function () { this.oldValue = this.options.value = this._constrainedValue(); this.element.attr({ role: "progressbar", "aria-valuemin": this.min }); this._addClass("ui-progressbar", "ui-widget ui-widget-content"); this.valueDiv = n("<div>").appendTo(this.element); this._addClass(this.valueDiv, "ui-progressbar-value", "ui-widget-header"); this._refreshValue() }, _destroy: function () { this.element.removeAttr("role aria-valuemin aria-valuemax aria-valuenow"); this.valueDiv.remove() }, value: function (n) { return void 0 === n ? this.options.value : (this.options.value = this._constrainedValue(n), this._refreshValue(), void 0) }, _constrainedValue: function (n) { return void 0 === n && (n = this.options.value), this.indeterminate = n === !1, "number" != typeof n && (n = 0), this.indeterminate ? !1 : Math.min(this.options.max, Math.max(this.min, n)) }, _setOptions: function (n) { var t = n.value; delete n.value; this._super(n); this.options.value = this._constrainedValue(t); this._refreshValue() }, _setOption: function (n, t) { "max" === n && (t = Math.max(this.min, t)); this._super(n, t) }, _setOptionDisabled: function (n) { this._super(n); this.element.attr("aria-disabled", n); this._toggleClass(null, "ui-state-disabled", !!n) }, _percentage: function () { return this.indeterminate ? 100 : 100 * (this.options.value - this.min) / (this.options.max - this.min) }, _refreshValue: function () { var t = this.options.value, i = this._percentage(); this.valueDiv.toggle(this.indeterminate || t > this.min).width(i.toFixed(0) + "%"); this._toggleClass(this.valueDiv, "ui-progressbar-complete", null, t === this.options.max)._toggleClass("ui-progressbar-indeterminate", null, this.indeterminate); this.indeterminate ? (this.element.removeAttr("aria-valuenow"), this.overlayDiv || (this.overlayDiv = n("<div>").appendTo(this.valueDiv), this._addClass(this.overlayDiv, "ui-progressbar-overlay"))) : (this.element.attr({ "aria-valuemax": this.options.max, "aria-valuenow": t }), this.overlayDiv && (this.overlayDiv.remove(), this.overlayDiv = null)); this.oldValue !== t && (this.oldValue = t, this._trigger("change")); t === this.options.max && this._trigger("complete") } }); n.widget("ui.selectable", n.ui.mouse, { version: "1.12.1", options: { appendTo: "body", autoRefresh: !0, distance: 0, filter: "*", tolerance: "touch", selected: null, selecting: null, start: null, stop: null, unselected: null, unselecting: null }, _create: function () { var t = this; this._addClass("ui-selectable"); this.dragged = !1; this.refresh = function () { t.elementPos = n(t.element[0]).offset(); t.selectees = n(t.options.filter, t.element[0]); t._addClass(t.selectees, "ui-selectee"); t.selectees.each(function () { var i = n(this), u = i.offset(), r = { left: u.left - t.elementPos.left, top: u.top - t.elementPos.top }; n.data(this, "selectable-item", { element: this, $element: i, left: r.left, top: r.top, right: r.left + i.outerWidth(), bottom: r.top + i.outerHeight(), startselected: !1, selected: i.hasClass("ui-selected"), selecting: i.hasClass("ui-selecting"), unselecting: i.hasClass("ui-unselecting") }) }) }; this.refresh(); this._mouseInit(); this.helper = n("<div>"); this._addClass(this.helper, "ui-selectable-helper") }, _destroy: function () { this.selectees.removeData("selectable-item"); this._mouseDestroy() }, _mouseStart: function (t) { var i = this, r = this.options; this.opos = [t.pageX, t.pageY]; this.elementPos = n(this.element[0]).offset(); this.options.disabled || (this.selectees = n(r.filter, this.element[0]), this._trigger("start", t), n(r.appendTo).append(this.helper), this.helper.css({ left: t.pageX, top: t.pageY, width: 0, height: 0 }), r.autoRefresh && this.refresh(), this.selectees.filter(".ui-selected").each(function () { var r = n.data(this, "selectable-item"); r.startselected = !0; t.metaKey || t.ctrlKey || (i._removeClass(r.$element, "ui-selected"), r.selected = !1, i._addClass(r.$element, "ui-unselecting"), r.unselecting = !0, i._trigger("unselecting", t, { unselecting: r.element })) }), n(t.target).parents().addBack().each(function () { var u, r = n.data(this, "selectable-item"); if (r) return (u = !t.metaKey && !t.ctrlKey || !r.$element.hasClass("ui-selected"), i._removeClass(r.$element, u ? "ui-unselecting" : "ui-selected")._addClass(r.$element, u ? "ui-selecting" : "ui-unselecting"), r.unselecting = !u, r.selecting = u, r.selected = u, u ? i._trigger("selecting", t, { selecting: r.element }) : i._trigger("unselecting", t, { unselecting: r.element }), !1) })) }, _mouseDrag: function (t) { if (this.dragged = !0, !this.options.disabled) { var o, i = this, s = this.options, r = this.opos[0], u = this.opos[1], f = t.pageX, e = t.pageY; return r > f && (o = f, f = r, r = o), u > e && (o = e, e = u, u = o), this.helper.css({ left: r, top: u, width: f - r, height: e - u }), this.selectees.each(function () { var o = n.data(this, "selectable-item"), c = !1, h = {}; o && o.element !== i.element[0] && (h.left = o.left + i.elementPos.left, h.right = o.right + i.elementPos.left, h.top = o.top + i.elementPos.top, h.bottom = o.bottom + i.elementPos.top, "touch" === s.tolerance ? c = !(h.left > f || r > h.right || h.top > e || u > h.bottom) : "fit" === s.tolerance && (c = h.left > r && f > h.right && h.top > u && e > h.bottom), c ? (o.selected && (i._removeClass(o.$element, "ui-selected"), o.selected = !1), o.unselecting && (i._removeClass(o.$element, "ui-unselecting"), o.unselecting = !1), o.selecting || (i._addClass(o.$element, "ui-selecting"), o.selecting = !0, i._trigger("selecting", t, { selecting: o.element }))) : (o.selecting && ((t.metaKey || t.ctrlKey) && o.startselected ? (i._removeClass(o.$element, "ui-selecting"), o.selecting = !1, i._addClass(o.$element, "ui-selected"), o.selected = !0) : (i._removeClass(o.$element, "ui-selecting"), o.selecting = !1, o.startselected && (i._addClass(o.$element, "ui-unselecting"), o.unselecting = !0), i._trigger("unselecting", t, { unselecting: o.element }))), o.selected && (t.metaKey || t.ctrlKey || o.startselected || (i._removeClass(o.$element, "ui-selected"), o.selected = !1, i._addClass(o.$element, "ui-unselecting"), o.unselecting = !0, i._trigger("unselecting", t, { unselecting: o.element }))))) }), !1 } }, _mouseStop: function (t) { var i = this; return this.dragged = !1, n(".ui-unselecting", this.element[0]).each(function () { var r = n.data(this, "selectable-item"); i._removeClass(r.$element, "ui-unselecting"); r.unselecting = !1; r.startselected = !1; i._trigger("unselected", t, { unselected: r.element }) }), n(".ui-selecting", this.element[0]).each(function () { var r = n.data(this, "selectable-item"); i._removeClass(r.$element, "ui-selecting")._addClass(r.$element, "ui-selected"); r.selecting = !1; r.selected = !0; r.startselected = !0; i._trigger("selected", t, { selected: r.element }) }), this._trigger("stop", t), this.helper.remove(), !1 } }); n.widget("ui.selectmenu", [n.ui.formResetMixin, { version: "1.12.1", defaultElement: "<select>", options: { appendTo: null, classes: { "ui-selectmenu-button-open": "ui-corner-top", "ui-selectmenu-button-closed": "ui-corner-all" }, disabled: null, icons: { button: "ui-icon-triangle-1-s" }, position: { my: "left top", at: "left bottom", collision: "none" }, width: !1, change: null, close: null, focus: null, open: null, select: null }, _create: function () { var t = this.element.uniqueId().attr("id"); this.ids = { element: t, button: t + "-button", menu: t + "-menu" }; this._drawButton(); this._drawMenu(); this._bindFormResetHandler(); this._rendered = !1; this.menuItems = n() }, _drawButton: function () { var t, i = this, r = this._parseOption(this.element.find("option:selected"), this.element[0].selectedIndex); this.labels = this.element.labels().attr("for", this.ids.button); this._on(this.labels, { click: function (n) { this.button.focus(); n.preventDefault() } }); this.element.hide(); this.button = n("<span>", { tabindex: this.options.disabled ? -1 : 0, id: this.ids.button, role: "combobox", "aria-expanded": "false", "aria-autocomplete": "list", "aria-owns": this.ids.menu, "aria-haspopup": "true", title: this.element.attr("title") }).insertAfter(this.element); this._addClass(this.button, "ui-selectmenu-button ui-selectmenu-button-closed", "ui-button ui-widget"); t = n("<span>").appendTo(this.button); this._addClass(t, "ui-selectmenu-icon", "ui-icon " + this.options.icons.button); this.buttonItem = this._renderButtonItem(r).appendTo(this.button); this.options.width !== !1 && this._resizeButton(); this._on(this.button, this._buttonEvents); this.button.one("focusin", function () { i._rendered || i._refreshMenu() }) }, _drawMenu: function () { var t = this; this.menu = n("<ul>", { "aria-hidden": "true", "aria-labelledby": this.ids.button, id: this.ids.menu }); this.menuWrap = n("<div>").append(this.menu); this._addClass(this.menuWrap, "ui-selectmenu-menu", "ui-front"); this.menuWrap.appendTo(this._appendTo()); this.menuInstance = this.menu.menu({ classes: { "ui-menu": "ui-corner-bottom" }, role: "listbox", select: function (n, i) { n.preventDefault(); t._setSelection(); t._select(i.item.data("ui-selectmenu-item"), n) }, focus: function (n, i) { var r = i.item.data("ui-selectmenu-item"); null != t.focusIndex && r.index !== t.focusIndex && (t._trigger("focus", n, { item: r }), t.isOpen || t._select(r, n)); t.focusIndex = r.index; t.button.attr("aria-activedescendant", t.menuItems.eq(r.index).attr("id")) } }).menu("instance"); this.menuInstance._off(this.menu, "mouseleave"); this.menuInstance._closeOnDocumentClick = function () { return !1 }; this.menuInstance._isDivider = function () { return !1 } }, refresh: function () { this._refreshMenu(); this.buttonItem.replaceWith(this.buttonItem = this._renderButtonItem(this._getSelectedItem().data("ui-selectmenu-item") || {})); null === this.options.width && this._resizeButton() }, _refreshMenu: function () { var n, t = this.element.find("option"); this.menu.empty(); this._parseOptions(t); this._renderMenu(this.menu, this.items); this.menuInstance.refresh(); this.menuItems = this.menu.find("li").not(".ui-selectmenu-optgroup").find(".ui-menu-item-wrapper"); this._rendered = !0; t.length && (n = this._getSelectedItem(), this.menuInstance.focus(null, n), this._setAria(n.data("ui-selectmenu-item")), this._setOption("disabled", this.element.prop("disabled"))) }, open: function (n) { this.options.disabled || (this._rendered ? (this._removeClass(this.menu.find(".ui-state-active"), null, "ui-state-active"), this.menuInstance.focus(null, this._getSelectedItem())) : this._refreshMenu(), this.menuItems.length && (this.isOpen = !0, this._toggleAttr(), this._resizeMenu(), this._position(), this._on(this.document, this._documentClick), this._trigger("open", n))) }, _position: function () { this.menuWrap.position(n.extend({ "of": this.button }, this.options.position)) }, close: function (n) { this.isOpen && (this.isOpen = !1, this._toggleAttr(), this.range = null, this._off(this.document), this._trigger("close", n)) }, widget: function () { return this.button }, menuWidget: function () { return this.menu }, _renderButtonItem: function (t) { var i = n("<span>"); return this._setText(i, t.label), this._addClass(i, "ui-selectmenu-text"), i }, _renderMenu: function (t, i) { var r = this, u = ""; n.each(i, function (i, f) { var e; f.optgroup !== u && (e = n("<li>", { text: f.optgroup }), r._addClass(e, "ui-selectmenu-optgroup", "ui-menu-divider" + (f.element.parent("optgroup").prop("disabled") ? " ui-state-disabled" : "")), e.appendTo(t), u = f.optgroup); r._renderItemData(t, f) }) }, _renderItemData: function (n, t) { return this._renderItem(n, t).data("ui-selectmenu-item", t) }, _renderItem: function (t, i) { var r = n("<li>"), u = n("<div>", { title: i.element.attr("title") }); return i.disabled && this._addClass(r, null, "ui-state-disabled"), this._setText(u, i.label), r.append(u).appendTo(t) }, _setText: function (n, t) { t ? n.text(t) : n.html("&#160;") }, _move: function (n, t) { var i, r, u = ".ui-menu-item"; this.isOpen ? i = this.menuItems.eq(this.focusIndex).parent("li") : (i = this.menuItems.eq(this.element[0].selectedIndex).parent("li"), u += ":not(.ui-state-disabled)"); r = "first" === n || "last" === n ? i["first" === n ? "prevAll" : "nextAll"](u).eq(-1) : i[n + "All"](u).eq(0); r.length && this.menuInstance.focus(t, r) }, _getSelectedItem: function () { return this.menuItems.eq(this.element[0].selectedIndex).parent("li") }, _toggle: function (n) { this[this.isOpen ? "close" : "open"](n) }, _setSelection: function () { var n; this.range && (window.getSelection ? (n = window.getSelection(), n.removeAllRanges(), n.addRange(this.range)) : this.range.select(), this.button.focus()) }, _documentClick: { mousedown: function (t) { this.isOpen && (n(t.target).closest(".ui-selectmenu-menu, #" + n.ui.escapeSelector(this.ids.button)).length || this.close(t)) } }, _buttonEvents: { mousedown: function () { var n; window.getSelection ? (n = window.getSelection(), n.rangeCount && (this.range = n.getRangeAt(0))) : this.range = document.selection.createRange() }, click: function (n) { this._setSelection(); this._toggle(n) }, keydown: function (t) { var i = !0; switch (t.keyCode) { case n.ui.keyCode.TAB: case n.ui.keyCode.ESCAPE: this.close(t); i = !1; break; case n.ui.keyCode.ENTER: this.isOpen && this._selectFocusedItem(t); break; case n.ui.keyCode.UP: t.altKey ? this._toggle(t) : this._move("prev", t); break; case n.ui.keyCode.DOWN: t.altKey ? this._toggle(t) : this._move("next", t); break; case n.ui.keyCode.SPACE: this.isOpen ? this._selectFocusedItem(t) : this._toggle(t); break; case n.ui.keyCode.LEFT: this._move("prev", t); break; case n.ui.keyCode.RIGHT: this._move("next", t); break; case n.ui.keyCode.HOME: case n.ui.keyCode.PAGE_UP: this._move("first", t); break; case n.ui.keyCode.END: case n.ui.keyCode.PAGE_DOWN: this._move("last", t); break; default: this.menu.trigger(t); i = !1 }i && t.preventDefault() } }, _selectFocusedItem: function (n) { var t = this.menuItems.eq(this.focusIndex).parent("li"); t.hasClass("ui-state-disabled") || this._select(t.data("ui-selectmenu-item"), n) }, _select: function (n, t) { var i = this.element[0].selectedIndex; this.element[0].selectedIndex = n.index; this.buttonItem.replaceWith(this.buttonItem = this._renderButtonItem(n)); this._setAria(n); this._trigger("select", t, { item: n }); n.index !== i && this._trigger("change", t, { item: n }); this.close(t) }, _setAria: function (n) { var t = this.menuItems.eq(n.index).attr("id"); this.button.attr({ "aria-labelledby": t, "aria-activedescendant": t }); this.menu.attr("aria-activedescendant", t) }, _setOption: function (n, t) { if ("icons" === n) { var i = this.button.find("span.ui-icon"); this._removeClass(i, null, this.options.icons.button)._addClass(i, null, t.button) } this._super(n, t); "appendTo" === n && this.menuWrap.appendTo(this._appendTo()); "width" === n && this._resizeButton() }, _setOptionDisabled: function (n) { this._super(n); this.menuInstance.option("disabled", n); this.button.attr("aria-disabled", n); this._toggleClass(this.button, null, "ui-state-disabled", n); this.element.prop("disabled", n); n ? (this.button.attr("tabindex", -1), this.close()) : this.button.attr("tabindex", 0) }, _appendTo: function () { var t = this.options.appendTo; return t && (t = t.jquery || t.nodeType ? n(t) : this.document.find(t).eq(0)), t && t[0] || (t = this.element.closest(".ui-front, dialog")), t.length || (t = this.document[0].body), t }, _toggleAttr: function () { this.button.attr("aria-expanded", this.isOpen); this._removeClass(this.button, "ui-selectmenu-button-" + (this.isOpen ? "closed" : "open"))._addClass(this.button, "ui-selectmenu-button-" + (this.isOpen ? "open" : "closed"))._toggleClass(this.menuWrap, "ui-selectmenu-open", null, this.isOpen); this.menu.attr("aria-hidden", !this.isOpen) }, _resizeButton: function () { var n = this.options.width; return n === !1 ? (this.button.css("width", ""), void 0) : (null === n && (n = this.element.show().outerWidth(), this.element.hide()), this.button.outerWidth(n), void 0) }, _resizeMenu: function () { this.menu.outerWidth(Math.max(this.button.outerWidth(), this.menu.width("").outerWidth() + 1)) }, _getCreateOptions: function () { var n = this._super(); return n.disabled = this.element.prop("disabled"), n }, _parseOptions: function (t) { var r = this, i = []; t.each(function (t, u) { i.push(r._parseOption(n(u), t)) }); this.items = i }, _parseOption: function (n, t) { var i = n.parent("optgroup"); return { element: n, index: t, value: n.val(), label: n.text(), optgroup: i.attr("label") || "", disabled: i.prop("disabled") || n.prop("disabled") } }, _destroy: function () { this._unbindFormResetHandler(); this.menuWrap.remove(); this.button.remove(); this.element.show(); this.element.removeUniqueId(); this.labels.attr("for", this.ids.element) } }]); n.widget("ui.slider", n.ui.mouse, { version: "1.12.1", widgetEventPrefix: "slide", options: { animate: !1, classes: { "ui-slider": "ui-corner-all", "ui-slider-handle": "ui-corner-all", "ui-slider-range": "ui-corner-all ui-widget-header" }, distance: 0, max: 100, min: 0, orientation: "horizontal", range: !1, step: 1, value: 0, values: null, change: null, slide: null, start: null, stop: null }, numPages: 5, _create: function () { this._keySliding = !1; this._mouseSliding = !1; this._animateOff = !0; this._handleIndex = null; this._detectOrientation(); this._mouseInit(); this._calculateNewMax(); this._addClass("ui-slider ui-slider-" + this.orientation, "ui-widget ui-widget-content"); this._refresh(); this._animateOff = !1 }, _refresh: function () { this._createRange(); this._createHandles(); this._setupEvents(); this._refreshValue() }, _createHandles: function () { var r, i, u = this.options, t = this.element.find(".ui-slider-handle"), f = []; for (i = u.values && u.values.length || 1, t.length > i && (t.slice(i).remove(), t = t.slice(0, i)), r = t.length; i > r; r++)f.push("<span tabindex='0'><\/span>"); this.handles = t.add(n(f.join("")).appendTo(this.element)); this._addClass(this.handles, "ui-slider-handle", "ui-state-default"); this.handle = this.handles.eq(0); this.handles.each(function (t) { n(this).data("ui-slider-handle-index", t).attr("tabIndex", 0) }) }, _createRange: function () { var t = this.options; t.range ? (t.range === !0 && (t.values ? t.values.length && 2 !== t.values.length ? t.values = [t.values[0], t.values[0]] : n.isArray(t.values) && (t.values = t.values.slice(0)) : t.values = [this._valueMin(), this._valueMin()]), this.range && this.range.length ? (this._removeClass(this.range, "ui-slider-range-min ui-slider-range-max"), this.range.css({ left: "", bottom: "" })) : (this.range = n("<div>").appendTo(this.element), this._addClass(this.range, "ui-slider-range")), ("min" === t.range || "max" === t.range) && this._addClass(this.range, "ui-slider-range-" + t.range)) : (this.range && this.range.remove(), this.range = null) }, _setupEvents: function () { this._off(this.handles); this._on(this.handles, this._handleEvents); this._hoverable(this.handles); this._focusable(this.handles) }, _destroy: function () { this.handles.remove(); this.range && this.range.remove(); this._mouseDestroy() }, _mouseCapture: function (t) { var s, f, r, i, u, h, e, c, o = this, l = this.options; return l.disabled ? !1 : (this.elementSize = { width: this.element.outerWidth(), height: this.element.outerHeight() }, this.elementOffset = this.element.offset(), s = { x: t.pageX, y: t.pageY }, f = this._normValueFromMouse(s), r = this._valueMax() - this._valueMin() + 1, this.handles.each(function (t) { var e = Math.abs(f - o.values(t)); (r > e || r === e && (t === o._lastChangedValue || o.values(t) === l.min)) && (r = e, i = n(this), u = t) }), h = this._start(t, u), h === !1 ? !1 : (this._mouseSliding = !0, this._handleIndex = u, this._addClass(i, null, "ui-state-active"), i.trigger("focus"), e = i.offset(), c = !n(t.target).parents().addBack().is(".ui-slider-handle"), this._clickOffset = c ? { left: 0, top: 0 } : { left: t.pageX - e.left - i.width() / 2, top: t.pageY - e.top - i.height() / 2 - (parseInt(i.css("borderTopWidth"), 10) || 0) - (parseInt(i.css("borderBottomWidth"), 10) || 0) + (parseInt(i.css("marginTop"), 10) || 0) }, this.handles.hasClass("ui-state-hover") || this._slide(t, u, f), this._animateOff = !0, !0)) }, _mouseStart: function () { return !0 }, _mouseDrag: function (n) { var t = { x: n.pageX, y: n.pageY }, i = this._normValueFromMouse(t); return this._slide(n, this._handleIndex, i), !1 }, _mouseStop: function (n) { return this._removeClass(this.handles, null, "ui-state-active"), this._mouseSliding = !1, this._stop(n, this._handleIndex), this._change(n, this._handleIndex), this._handleIndex = null, this._clickOffset = null, this._animateOff = !1, !1 }, _detectOrientation: function () { this.orientation = "vertical" === this.options.orientation ? "vertical" : "horizontal" }, _normValueFromMouse: function (n) { var i, r, t, u, f; return "horizontal" === this.orientation ? (i = this.elementSize.width, r = n.x - this.elementOffset.left - (this._clickOffset ? this._clickOffset.left : 0)) : (i = this.elementSize.height, r = n.y - this.elementOffset.top - (this._clickOffset ? this._clickOffset.top : 0)), t = r / i, t > 1 && (t = 1), 0 > t && (t = 0), "vertical" === this.orientation && (t = 1 - t), u = this._valueMax() - this._valueMin(), f = this._valueMin() + t * u, this._trimAlignValue(f) }, _uiHash: function (n, t, i) { var r = { handle: this.handles[n], handleIndex: n, value: void 0 !== t ? t : this.value() }; return this._hasMultipleValues() && (r.value = void 0 !== t ? t : this.values(n), r.values = i || this.values()), r }, _hasMultipleValues: function () { return this.options.values && this.options.values.length }, _start: function (n, t) { return this._trigger("start", n, this._uiHash(t)) }, _slide: function (n, t, i) { var u, r, f = this.value(), e = this.values(); this._hasMultipleValues() && (r = this.values(t ? 0 : 1), f = this.values(t), 2 === this.options.values.length && this.options.range === !0 && (i = 0 === t ? Math.min(r, i) : Math.max(r, i)), e[t] = i); i !== f && (u = this._trigger("slide", n, this._uiHash(t, i, e)), u !== !1 && (this._hasMultipleValues() ? this.values(t, i) : this.value(i))) }, _stop: function (n, t) { this._trigger("stop", n, this._uiHash(t)) }, _change: function (n, t) { this._keySliding || this._mouseSliding || (this._lastChangedValue = t, this._trigger("change", n, this._uiHash(t))) }, value: function (n) { return arguments.length ? (this.options.value = this._trimAlignValue(n), this._refreshValue(), this._change(null, 0), void 0) : this._value() }, values: function (t, i) { var u, f, r; if (arguments.length > 1) return this.options.values[t] = this._trimAlignValue(i), this._refreshValue(), this._change(null, t), void 0; if (!arguments.length) return this._values(); if (!n.isArray(arguments[0])) return this._hasMultipleValues() ? this._values(t) : this.value(); for (u = this.options.values, f = arguments[0], r = 0; u.length > r; r += 1)u[r] = this._trimAlignValue(f[r]), this._change(null, r); this._refreshValue() }, _setOption: function (t, i) { var r, u = 0; switch ("range" === t && this.options.range === !0 && ("min" === i ? (this.options.value = this._values(0), this.options.values = null) : "max" === i && (this.options.value = this._values(this.options.values.length - 1), this.options.values = null)), n.isArray(this.options.values) && (u = this.options.values.length), this._super(t, i), t) { case "orientation": this._detectOrientation(); this._removeClass("ui-slider-horizontal ui-slider-vertical")._addClass("ui-slider-" + this.orientation); this._refreshValue(); this.options.range && this._refreshRange(i); this.handles.css("horizontal" === i ? "bottom" : "left", ""); break; case "value": this._animateOff = !0; this._refreshValue(); this._change(null, 0); this._animateOff = !1; break; case "values": for (this._animateOff = !0, this._refreshValue(), r = u - 1; r >= 0; r--)this._change(null, r); this._animateOff = !1; break; case "step": case "min": case "max": this._animateOff = !0; this._calculateNewMax(); this._refreshValue(); this._animateOff = !1; break; case "range": this._animateOff = !0; this._refresh(); this._animateOff = !1 } }, _setOptionDisabled: function (n) { this._super(n); this._toggleClass(null, "ui-state-disabled", !!n) }, _value: function () { var n = this.options.value; return this._trimAlignValue(n) }, _values: function (n) { var r, t, i; if (arguments.length) return r = this.options.values[n], r = this._trimAlignValue(r); if (this._hasMultipleValues()) { for (t = this.options.values.slice(), i = 0; t.length > i; i += 1)t[i] = this._trimAlignValue(t[i]); return t } return [] }, _trimAlignValue: function (n) { if (this._valueMin() >= n) return this._valueMin(); if (n >= this._valueMax()) return this._valueMax(); var t = this.options.step > 0 ? this.options.step : 1, i = (n - this._valueMin()) % t, r = n - i; return 2 * Math.abs(i) >= t && (r += i > 0 ? t : -t), parseFloat(r.toFixed(5)) }, _calculateNewMax: function () { var n = this.options.max, i = this._valueMin(), t = this.options.step, r = Math.round((n - i) / t) * t; n = r + i; n > this.options.max && (n -= t); this.max = parseFloat(n.toFixed(this._precision())) }, _precision: function () { var n = this._precisionOf(this.options.step); return null !== this.options.min && (n = Math.max(n, this._precisionOf(this.options.min))), n }, _precisionOf: function (n) { var t = "" + n, i = t.indexOf("."); return -1 === i ? 0 : t.length - i - 1 }, _valueMin: function () { return this.options.min }, _valueMax: function () { return this.max }, _refreshRange: function (n) { "vertical" === n && this.range.css({ width: "", left: "" }); "horizontal" === n && this.range.css({ height: "", bottom: "" }) }, _refreshValue: function () { var s, t, c, f, h, e = this.options.range, i = this.options, r = this, u = this._animateOff ? !1 : i.animate, o = {}; this._hasMultipleValues() ? this.handles.each(function (f) { t = 100 * ((r.values(f) - r._valueMin()) / (r._valueMax() - r._valueMin())); o["horizontal" === r.orientation ? "left" : "bottom"] = t + "%"; n(this).stop(1, 1)[u ? "animate" : "css"](o, i.animate); r.options.range === !0 && ("horizontal" === r.orientation ? (0 === f && r.range.stop(1, 1)[u ? "animate" : "css"]({ left: t + "%" }, i.animate), 1 === f && r.range[u ? "animate" : "css"]({ width: t - s + "%" }, { queue: !1, duration: i.animate })) : (0 === f && r.range.stop(1, 1)[u ? "animate" : "css"]({ bottom: t + "%" }, i.animate), 1 === f && r.range[u ? "animate" : "css"]({ height: t - s + "%" }, { queue: !1, duration: i.animate }))); s = t }) : (c = this.value(), f = this._valueMin(), h = this._valueMax(), t = h !== f ? 100 * ((c - f) / (h - f)) : 0, o["horizontal" === this.orientation ? "left" : "bottom"] = t + "%", this.handle.stop(1, 1)[u ? "animate" : "css"](o, i.animate), "min" === e && "horizontal" === this.orientation && this.range.stop(1, 1)[u ? "animate" : "css"]({ width: t + "%" }, i.animate), "max" === e && "horizontal" === this.orientation && this.range.stop(1, 1)[u ? "animate" : "css"]({ width: 100 - t + "%" }, i.animate), "min" === e && "vertical" === this.orientation && this.range.stop(1, 1)[u ? "animate" : "css"]({ height: t + "%" }, i.animate), "max" === e && "vertical" === this.orientation && this.range.stop(1, 1)[u ? "animate" : "css"]({ height: 100 - t + "%" }, i.animate)) }, _handleEvents: { keydown: function (t) { var e, r, i, u, f = n(t.target).data("ui-slider-handle-index"); switch (t.keyCode) { case n.ui.keyCode.HOME: case n.ui.keyCode.END: case n.ui.keyCode.PAGE_UP: case n.ui.keyCode.PAGE_DOWN: case n.ui.keyCode.UP: case n.ui.keyCode.RIGHT: case n.ui.keyCode.DOWN: case n.ui.keyCode.LEFT: if (t.preventDefault(), !this._keySliding && (this._keySliding = !0, this._addClass(n(t.target), null, "ui-state-active"), e = this._start(t, f), e === !1)) return }switch (u = this.options.step, r = i = this._hasMultipleValues() ? this.values(f) : this.value(), t.keyCode) { case n.ui.keyCode.HOME: i = this._valueMin(); break; case n.ui.keyCode.END: i = this._valueMax(); break; case n.ui.keyCode.PAGE_UP: i = this._trimAlignValue(r + (this._valueMax() - this._valueMin()) / this.numPages); break; case n.ui.keyCode.PAGE_DOWN: i = this._trimAlignValue(r - (this._valueMax() - this._valueMin()) / this.numPages); break; case n.ui.keyCode.UP: case n.ui.keyCode.RIGHT: if (r === this._valueMax()) return; i = this._trimAlignValue(r + u); break; case n.ui.keyCode.DOWN: case n.ui.keyCode.LEFT: if (r === this._valueMin()) return; i = this._trimAlignValue(r - u) }this._slide(t, f, i) }, keyup: function (t) { var i = n(t.target).data("ui-slider-handle-index"); this._keySliding && (this._keySliding = !1, this._stop(t, i), this._change(t, i), this._removeClass(n(t.target), null, "ui-state-active")) } } }); n.widget("ui.sortable", n.ui.mouse, { version: "1.12.1", widgetEventPrefix: "sort", ready: !1, options: { appendTo: "parent", axis: !1, connectWith: !1, containment: !1, cursor: "auto", cursorAt: !1, dropOnEmpty: !0, forcePlaceholderSize: !1, forceHelperSize: !1, grid: !1, handle: !1, helper: "original", items: "> *", opacity: !1, placeholder: !1, revert: !1, scroll: !0, scrollSensitivity: 20, scrollSpeed: 20, scope: "default", tolerance: "intersect", zIndex: 1e3, activate: null, beforeStop: null, change: null, deactivate: null, out: null, over: null, receive: null, remove: null, sort: null, start: null, stop: null, update: null }, _isOverAxis: function (n, t, i) { return n >= t && t + i > n }, _isFloating: function (n) { return /left|right/.test(n.css("float")) || /inline|table-cell/.test(n.css("display")) }, _create: function () { this.containerCache = {}; this._addClass("ui-sortable"); this.refresh(); this.offset = this.element.offset(); this._mouseInit(); this._setHandleClassName(); this.ready = !0 }, _setOption: function (n, t) { this._super(n, t); "handle" === n && this._setHandleClassName() }, _setHandleClassName: function () { var t = this; this._removeClass(this.element.find(".ui-sortable-handle"), "ui-sortable-handle"); n.each(this.items, function () { t._addClass(this.instance.options.handle ? this.item.find(this.instance.options.handle) : this.item, "ui-sortable-handle") }) }, _destroy: function () { this._mouseDestroy(); for (var n = this.items.length - 1; n >= 0; n--)this.items[n].item.removeData(this.widgetName + "-item"); return this }, _mouseCapture: function (t, i) { var r = null, f = !1, u = this; return this.reverting ? !1 : this.options.disabled || "static" === this.options.type ? !1 : (this._refreshItems(t), n(t.target).parents().each(function () { if (n.data(this, u.widgetName + "-item") === u) return (r = n(this), !1) }), n.data(t.target, u.widgetName + "-item") === u && (r = n(t.target)), r ? !this.options.handle || i || (n(this.options.handle, r).find("*").addBack().each(function () { this === t.target && (f = !0) }), f) ? (this.currentItem = r, this._removeCurrentsFromItems(), !0) : !1 : !1) }, _mouseStart: function (t, i, r) { var f, e, u = this.options; if (this.currentContainer = this, this.refreshPositions(), this.helper = this._createHelper(t), this._cacheHelperProportions(), this._cacheMargins(), this.scrollParent = this.helper.scrollParent(), this.offset = this.currentItem.offset(), this.offset = { top: this.offset.top - this.margins.top, left: this.offset.left - this.margins.left }, n.extend(this.offset, { click: { left: t.pageX - this.offset.left, top: t.pageY - this.offset.top }, parent: this._getParentOffset(), relative: this._getRelativeOffset() }), this.helper.css("position", "absolute"), this.cssPosition = this.helper.css("position"), this.originalPosition = this._generatePosition(t), this.originalPageX = t.pageX, this.originalPageY = t.pageY, u.cursorAt && this._adjustOffsetFromHelper(u.cursorAt), this.domPosition = { prev: this.currentItem.prev()[0], parent: this.currentItem.parent()[0] }, this.helper[0] !== this.currentItem[0] && this.currentItem.hide(), this._createPlaceholder(), u.containment && this._setContainment(), u.cursor && "auto" !== u.cursor && (e = this.document.find("body"), this.storedCursor = e.css("cursor"), e.css("cursor", u.cursor), this.storedStylesheet = n("<style>*{ cursor: " + u.cursor + " !important; }<\/style>").appendTo(e)), u.opacity && (this.helper.css("opacity") && (this._storedOpacity = this.helper.css("opacity")), this.helper.css("opacity", u.opacity)), u.zIndex && (this.helper.css("zIndex") && (this._storedZIndex = this.helper.css("zIndex")), this.helper.css("zIndex", u.zIndex)), this.scrollParent[0] !== this.document[0] && "HTML" !== this.scrollParent[0].tagName && (this.overflowOffset = this.scrollParent.offset()), this._trigger("start", t, this._uiHash()), this._preserveHelperProportions || this._cacheHelperProportions(), !r) for (f = this.containers.length - 1; f >= 0; f--)this.containers[f]._trigger("activate", t, this._uiHash(this)); return n.ui.ddmanager && (n.ui.ddmanager.current = this), n.ui.ddmanager && !u.dropBehaviour && n.ui.ddmanager.prepareOffsets(this, t), this.dragging = !0, this._addClass(this.helper, "ui-sortable-helper"), this._mouseDrag(t), !0 }, _mouseDrag: function (t) { var e, u, f, o, i = this.options, r = !1; for (this.position = this._generatePosition(t), this.positionAbs = this._convertPositionTo("absolute"), this.lastPositionAbs || (this.lastPositionAbs = this.positionAbs), this.options.scroll && (this.scrollParent[0] !== this.document[0] && "HTML" !== this.scrollParent[0].tagName ? (this.overflowOffset.top + this.scrollParent[0].offsetHeight - t.pageY < i.scrollSensitivity ? this.scrollParent[0].scrollTop = r = this.scrollParent[0].scrollTop + i.scrollSpeed : t.pageY - this.overflowOffset.top < i.scrollSensitivity && (this.scrollParent[0].scrollTop = r = this.scrollParent[0].scrollTop - i.scrollSpeed), this.overflowOffset.left + this.scrollParent[0].offsetWidth - t.pageX < i.scrollSensitivity ? this.scrollParent[0].scrollLeft = r = this.scrollParent[0].scrollLeft + i.scrollSpeed : t.pageX - this.overflowOffset.left < i.scrollSensitivity && (this.scrollParent[0].scrollLeft = r = this.scrollParent[0].scrollLeft - i.scrollSpeed)) : (t.pageY - this.document.scrollTop() < i.scrollSensitivity ? r = this.document.scrollTop(this.document.scrollTop() - i.scrollSpeed) : this.window.height() - (t.pageY - this.document.scrollTop()) < i.scrollSensitivity && (r = this.document.scrollTop(this.document.scrollTop() + i.scrollSpeed)), t.pageX - this.document.scrollLeft() < i.scrollSensitivity ? r = this.document.scrollLeft(this.document.scrollLeft() - i.scrollSpeed) : this.window.width() - (t.pageX - this.document.scrollLeft()) < i.scrollSensitivity && (r = this.document.scrollLeft(this.document.scrollLeft() + i.scrollSpeed))), r !== !1 && n.ui.ddmanager && !i.dropBehaviour && n.ui.ddmanager.prepareOffsets(this, t)), this.positionAbs = this._convertPositionTo("absolute"), this.options.axis && "y" === this.options.axis || (this.helper[0].style.left = this.position.left + "px"), this.options.axis && "x" === this.options.axis || (this.helper[0].style.top = this.position.top + "px"), e = this.items.length - 1; e >= 0; e--)if (u = this.items[e], f = u.item[0], o = this._intersectsWithPointer(u), o && u.instance === this.currentContainer && f !== this.currentItem[0] && this.placeholder[1 === o ? "next" : "prev"]()[0] !== f && !n.contains(this.placeholder[0], f) && ("semi-dynamic" === this.options.type ? !n.contains(this.element[0], f) : !0)) { if (this.direction = 1 === o ? "down" : "up", "pointer" !== this.options.tolerance && !this._intersectsWithSides(u)) break; this._rearrange(t, u); this._trigger("change", t, this._uiHash()); break } return this._contactContainers(t), n.ui.ddmanager && n.ui.ddmanager.drag(this, t), this._trigger("sort", t, this._uiHash()), this.lastPositionAbs = this.positionAbs, !1 }, _mouseStop: function (t, i) { if (t) { if (n.ui.ddmanager && !this.options.dropBehaviour && n.ui.ddmanager.drop(this, t), this.options.revert) { var e = this, f = this.placeholder.offset(), r = this.options.axis, u = {}; r && "x" !== r || (u.left = f.left - this.offset.parent.left - this.margins.left + (this.offsetParent[0] === this.document[0].body ? 0 : this.offsetParent[0].scrollLeft)); r && "y" !== r || (u.top = f.top - this.offset.parent.top - this.margins.top + (this.offsetParent[0] === this.document[0].body ? 0 : this.offsetParent[0].scrollTop)); this.reverting = !0; n(this.helper).animate(u, parseInt(this.options.revert, 10) || 500, function () { e._clear(t) }) } else this._clear(t, i); return !1 } }, cancel: function () { if (this.dragging) { this._mouseUp(new n.Event("mouseup", { target: null })); "original" === this.options.helper ? (this.currentItem.css(this._storedCSS), this._removeClass(this.currentItem, "ui-sortable-helper")) : this.currentItem.show(); for (var t = this.containers.length - 1; t >= 0; t--)this.containers[t]._trigger("deactivate", null, this._uiHash(this)), this.containers[t].containerCache.over && (this.containers[t]._trigger("out", null, this._uiHash(this)), this.containers[t].containerCache.over = 0) } return this.placeholder && (this.placeholder[0].parentNode && this.placeholder[0].parentNode.removeChild(this.placeholder[0]), "original" !== this.options.helper && this.helper && this.helper[0].parentNode && this.helper.remove(), n.extend(this, { helper: null, dragging: !1, reverting: !1, _noFinalSort: null }), this.domPosition.prev ? n(this.domPosition.prev).after(this.currentItem) : n(this.domPosition.parent).prepend(this.currentItem)), this }, serialize: function (t) { var r = this._getItemsAsjQuery(t && t.connected), i = []; return t = t || {}, n(r).each(function () { var r = (n(t.item || this).attr(t.attribute || "id") || "").match(t.expression || /(.+)[\-=_](.+)/); r && i.push((t.key || r[1] + "[]") + "=" + (t.key && t.expression ? r[1] : r[2])) }), !i.length && t.key && i.push(t.key + "="), i.join("&") }, toArray: function (t) { var r = this._getItemsAsjQuery(t && t.connected), i = []; return t = t || {}, r.each(function () { i.push(n(t.item || this).attr(t.attribute || "id") || "") }), i }, _intersectsWith: function (n) { var t = this.positionAbs.left, h = t + this.helperProportions.width, i = this.positionAbs.top, c = i + this.helperProportions.height, r = n.left, f = r + n.width, u = n.top, e = u + n.height, o = this.offset.click.top, s = this.offset.click.left, l = "x" === this.options.axis || i + o > u && e > i + o, a = "y" === this.options.axis || t + s > r && f > t + s, v = l && a; return "pointer" === this.options.tolerance || this.options.forcePointerForContainers || "pointer" !== this.options.tolerance && this.helperProportions[this.floating ? "width" : "height"] > n[this.floating ? "width" : "height"] ? v : t + this.helperProportions.width / 2 > r && f > h - this.helperProportions.width / 2 && i + this.helperProportions.height / 2 > u && e > c - this.helperProportions.height / 2 }, _intersectsWithPointer: function (n) { var t, i, r = "x" === this.options.axis || this._isOverAxis(this.positionAbs.top + this.offset.click.top, n.top, n.height), u = "y" === this.options.axis || this._isOverAxis(this.positionAbs.left + this.offset.click.left, n.left, n.width), f = r && u; return f ? (t = this._getDragVerticalDirection(), i = this._getDragHorizontalDirection(), this.floating ? "right" === i || "down" === t ? 2 : 1 : t && ("down" === t ? 2 : 1)) : !1 }, _intersectsWithSides: function (n) { var r = this._isOverAxis(this.positionAbs.top + this.offset.click.top, n.top + n.height / 2, n.height), u = this._isOverAxis(this.positionAbs.left + this.offset.click.left, n.left + n.width / 2, n.width), t = this._getDragVerticalDirection(), i = this._getDragHorizontalDirection(); return this.floating && i ? "right" === i && u || "left" === i && !u : t && ("down" === t && r || "up" === t && !r) }, _getDragVerticalDirection: function () { var n = this.positionAbs.top - this.lastPositionAbs.top; return 0 !== n && (n > 0 ? "down" : "up") }, _getDragHorizontalDirection: function () { var n = this.positionAbs.left - this.lastPositionAbs.left; return 0 !== n && (n > 0 ? "right" : "left") }, refresh: function (n) { return this._refreshItems(n), this._setHandleClassName(), this.refreshPositions(), this }, _connectWith: function () { var n = this.options; return n.connectWith.constructor === String ? [n.connectWith] : n.connectWith }, _getItemsAsjQuery: function (t) { function h() { s.push(this) } var r, u, e, i, s = [], f = [], o = this._connectWith(); if (o && t) for (r = o.length - 1; r >= 0; r--)for (e = n(o[r], this.document[0]), u = e.length - 1; u >= 0; u--)i = n.data(e[u], this.widgetFullName), i && i !== this && !i.options.disabled && f.push([n.isFunction(i.options.items) ? i.options.items.call(i.element) : n(i.options.items, i.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"), i]); for (f.push([n.isFunction(this.options.items) ? this.options.items.call(this.element, null, { options: this.options, item: this.currentItem }) : n(this.options.items, this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"), this]), r = f.length - 1; r >= 0; r--)f[r][0].each(h); return n(s) }, _removeCurrentsFromItems: function () { var t = this.currentItem.find(":data(" + this.widgetName + "-item)"); this.items = n.grep(this.items, function (n) { for (var i = 0; t.length > i; i++)if (t[i] === n.item[0]) return !1; return !0 }) }, _refreshItems: function (t) { this.items = []; this.containers = [this]; var r, u, e, i, o, s, h, l, a = this.items, f = [[n.isFunction(this.options.items) ? this.options.items.call(this.element[0], t, { item: this.currentItem }) : n(this.options.items, this.element), this]], c = this._connectWith(); if (c && this.ready) for (r = c.length - 1; r >= 0; r--)for (e = n(c[r], this.document[0]), u = e.length - 1; u >= 0; u--)i = n.data(e[u], this.widgetFullName), i && i !== this && !i.options.disabled && (f.push([n.isFunction(i.options.items) ? i.options.items.call(i.element[0], t, { item: this.currentItem }) : n(i.options.items, i.element), i]), this.containers.push(i)); for (r = f.length - 1; r >= 0; r--)for (o = f[r][1], s = f[r][0], u = 0, l = s.length; l > u; u++)h = n(s[u]), h.data(this.widgetName + "-item", o), a.push({ item: h, instance: o, width: 0, height: 0, left: 0, top: 0 }) }, refreshPositions: function (t) { this.floating = this.items.length ? "x" === this.options.axis || this._isFloating(this.items[0].item) : !1; this.offsetParent && this.helper && (this.offset.parent = this._getParentOffset()); for (var r, f, u, i = this.items.length - 1; i >= 0; i--)r = this.items[i], r.instance !== this.currentContainer && this.currentContainer && r.item[0] !== this.currentItem[0] || (f = this.options.toleranceElement ? n(this.options.toleranceElement, r.item) : r.item, t || (r.width = f.outerWidth(), r.height = f.outerHeight()), u = f.offset(), r.left = u.left, r.top = u.top); if (this.options.custom && this.options.custom.refreshContainers) this.options.custom.refreshContainers.call(this); else for (i = this.containers.length - 1; i >= 0; i--)u = this.containers[i].element.offset(), this.containers[i].containerCache.left = u.left, this.containers[i].containerCache.top = u.top, this.containers[i].containerCache.width = this.containers[i].element.outerWidth(), this.containers[i].containerCache.height = this.containers[i].element.outerHeight(); return this }, _createPlaceholder: function (t) { t = t || this; var r, i = t.options; i.placeholder && i.placeholder.constructor !== String || (r = i.placeholder, i.placeholder = { element: function () { var u = t.currentItem[0].nodeName.toLowerCase(), i = n("<" + u + ">", t.document[0]); return t._addClass(i, "ui-sortable-placeholder", r || t.currentItem[0].className)._removeClass(i, "ui-sortable-helper"), "tbody" === u ? t._createTrPlaceholder(t.currentItem.find("tr").eq(0), n("<tr>", t.document[0]).appendTo(i)) : "tr" === u ? t._createTrPlaceholder(t.currentItem, i) : "img" === u && i.attr("src", t.currentItem.attr("src")), r || i.css("visibility", "hidden"), i }, update: function (n, u) { (!r || i.forcePlaceholderSize) && (u.height() || u.height(t.currentItem.innerHeight() - parseInt(t.currentItem.css("paddingTop") || 0, 10) - parseInt(t.currentItem.css("paddingBottom") || 0, 10)), u.width() || u.width(t.currentItem.innerWidth() - parseInt(t.currentItem.css("paddingLeft") || 0, 10) - parseInt(t.currentItem.css("paddingRight") || 0, 10))) } }); t.placeholder = n(i.placeholder.element.call(t.element, t.currentItem)); t.currentItem.after(t.placeholder); i.placeholder.update(t, t.placeholder) }, _createTrPlaceholder: function (t, i) { var r = this; t.children().each(function () { n("<td>&#160;<\/td>", r.document[0]).attr("colspan", n(this).attr("colspan") || 1).appendTo(i) }) }, _contactContainers: function (t) { for (var u, c, f, a, v, o, l, s, h, e = null, i = null, r = this.containers.length - 1; r >= 0; r--)if (!n.contains(this.currentItem[0], this.containers[r].element[0])) if (this._intersectsWith(this.containers[r].containerCache)) { if (e && n.contains(this.containers[r].element[0], e.element[0])) continue; e = this.containers[r]; i = r } else this.containers[r].containerCache.over && (this.containers[r]._trigger("out", t, this._uiHash(this)), this.containers[r].containerCache.over = 0); if (e) if (1 === this.containers.length) this.containers[i].containerCache.over || (this.containers[i]._trigger("over", t, this._uiHash(this)), this.containers[i].containerCache.over = 1); else { for (c = 1e4, f = null, s = e.floating || this._isFloating(this.currentItem), a = s ? "left" : "top", v = s ? "width" : "height", h = s ? "pageX" : "pageY", u = this.items.length - 1; u >= 0; u--)n.contains(this.containers[i].element[0], this.items[u].item[0]) && this.items[u].item[0] !== this.currentItem[0] && (o = this.items[u].item.offset()[a], l = !1, t[h] - o > this.items[u][v] / 2 && (l = !0), c > Math.abs(t[h] - o) && (c = Math.abs(t[h] - o), f = this.items[u], this.direction = l ? "up" : "down")); if (!f && !this.options.dropOnEmpty) return; if (this.currentContainer === this.containers[i]) return this.currentContainer.containerCache.over || (this.containers[i]._trigger("over", t, this._uiHash()), this.currentContainer.containerCache.over = 1), void 0; f ? this._rearrange(t, f, null, !0) : this._rearrange(t, null, this.containers[i].element, !0); this._trigger("change", t, this._uiHash()); this.containers[i]._trigger("change", t, this._uiHash(this)); this.currentContainer = this.containers[i]; this.options.placeholder.update(this.currentContainer, this.placeholder); this.containers[i]._trigger("over", t, this._uiHash(this)); this.containers[i].containerCache.over = 1 } }, _createHelper: function (t) { var r = this.options, i = n.isFunction(r.helper) ? n(r.helper.apply(this.element[0], [t, this.currentItem])) : "clone" === r.helper ? this.currentItem.clone() : this.currentItem; return i.parents("body").length || n("parent" !== r.appendTo ? r.appendTo : this.currentItem[0].parentNode)[0].appendChild(i[0]), i[0] === this.currentItem[0] && (this._storedCSS = { width: this.currentItem[0].style.width, height: this.currentItem[0].style.height, position: this.currentItem.css("position"), top: this.currentItem.css("top"), left: this.currentItem.css("left") }), (!i[0].style.width || r.forceHelperSize) && i.width(this.currentItem.width()), (!i[0].style.height || r.forceHelperSize) && i.height(this.currentItem.height()), i }, _adjustOffsetFromHelper: function (t) { "string" == typeof t && (t = t.split(" ")); n.isArray(t) && (t = { left: +t[0], top: +t[1] || 0 }); "left" in t && (this.offset.click.left = t.left + this.margins.left); "right" in t && (this.offset.click.left = this.helperProportions.width - t.right + this.margins.left); "top" in t && (this.offset.click.top = t.top + this.margins.top); "bottom" in t && (this.offset.click.top = this.helperProportions.height - t.bottom + this.margins.top) }, _getParentOffset: function () { this.offsetParent = this.helper.offsetParent(); var t = this.offsetParent.offset(); return "absolute" === this.cssPosition && this.scrollParent[0] !== this.document[0] && n.contains(this.scrollParent[0], this.offsetParent[0]) && (t.left += this.scrollParent.scrollLeft(), t.top += this.scrollParent.scrollTop()), (this.offsetParent[0] === this.document[0].body || this.offsetParent[0].tagName && "html" === this.offsetParent[0].tagName.toLowerCase() && n.ui.ie) && (t = { top: 0, left: 0 }), { top: t.top + (parseInt(this.offsetParent.css("borderTopWidth"), 10) || 0), left: t.left + (parseInt(this.offsetParent.css("borderLeftWidth"), 10) || 0) } }, _getRelativeOffset: function () { if ("relative" === this.cssPosition) { var n = this.currentItem.position(); return { top: n.top - (parseInt(this.helper.css("top"), 10) || 0) + this.scrollParent.scrollTop(), left: n.left - (parseInt(this.helper.css("left"), 10) || 0) + this.scrollParent.scrollLeft() } } return { top: 0, left: 0 } }, _cacheMargins: function () { this.margins = { left: parseInt(this.currentItem.css("marginLeft"), 10) || 0, top: parseInt(this.currentItem.css("marginTop"), 10) || 0 } }, _cacheHelperProportions: function () { this.helperProportions = { width: this.helper.outerWidth(), height: this.helper.outerHeight() } }, _setContainment: function () { var t, r, u, i = this.options; "parent" === i.containment && (i.containment = this.helper[0].parentNode); ("document" === i.containment || "window" === i.containment) && (this.containment = [0 - this.offset.relative.left - this.offset.parent.left, 0 - this.offset.relative.top - this.offset.parent.top, "document" === i.containment ? this.document.width() : this.window.width() - this.helperProportions.width - this.margins.left, ("document" === i.containment ? this.document.height() || document.body.parentNode.scrollHeight : this.window.height() || this.document[0].body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top]); /^(document|window|parent)$/.test(i.containment) || (t = n(i.containment)[0], r = n(i.containment).offset(), u = "hidden" !== n(t).css("overflow"), this.containment = [r.left + (parseInt(n(t).css("borderLeftWidth"), 10) || 0) + (parseInt(n(t).css("paddingLeft"), 10) || 0) - this.margins.left, r.top + (parseInt(n(t).css("borderTopWidth"), 10) || 0) + (parseInt(n(t).css("paddingTop"), 10) || 0) - this.margins.top, r.left + (u ? Math.max(t.scrollWidth, t.offsetWidth) : t.offsetWidth) - (parseInt(n(t).css("borderLeftWidth"), 10) || 0) - (parseInt(n(t).css("paddingRight"), 10) || 0) - this.helperProportions.width - this.margins.left, r.top + (u ? Math.max(t.scrollHeight, t.offsetHeight) : t.offsetHeight) - (parseInt(n(t).css("borderTopWidth"), 10) || 0) - (parseInt(n(t).css("paddingBottom"), 10) || 0) - this.helperProportions.height - this.margins.top]) }, _convertPositionTo: function (t, i) { i || (i = this.position); var r = "absolute" === t ? 1 : -1, u = "absolute" !== this.cssPosition || this.scrollParent[0] !== this.document[0] && n.contains(this.scrollParent[0], this.offsetParent[0]) ? this.scrollParent : this.offsetParent, f = /(html|body)/i.test(u[0].tagName); return { top: i.top + this.offset.relative.top * r + this.offset.parent.top * r - ("fixed" === this.cssPosition ? -this.scrollParent.scrollTop() : f ? 0 : u.scrollTop()) * r, left: i.left + this.offset.relative.left * r + this.offset.parent.left * r - ("fixed" === this.cssPosition ? -this.scrollParent.scrollLeft() : f ? 0 : u.scrollLeft()) * r } }, _generatePosition: function (t) { var r, u, i = this.options, f = t.pageX, e = t.pageY, o = "absolute" !== this.cssPosition || this.scrollParent[0] !== this.document[0] && n.contains(this.scrollParent[0], this.offsetParent[0]) ? this.scrollParent : this.offsetParent, s = /(html|body)/i.test(o[0].tagName); return "relative" !== this.cssPosition || this.scrollParent[0] !== this.document[0] && this.scrollParent[0] !== this.offsetParent[0] || (this.offset.relative = this._getRelativeOffset()), this.originalPosition && (this.containment && (t.pageX - this.offset.click.left < this.containment[0] && (f = this.containment[0] + this.offset.click.left), t.pageY - this.offset.click.top < this.containment[1] && (e = this.containment[1] + this.offset.click.top), t.pageX - this.offset.click.left > this.containment[2] && (f = this.containment[2] + this.offset.click.left), t.pageY - this.offset.click.top > this.containment[3] && (e = this.containment[3] + this.offset.click.top)), i.grid && (r = this.originalPageY + Math.round((e - this.originalPageY) / i.grid[1]) * i.grid[1], e = this.containment ? r - this.offset.click.top >= this.containment[1] && r - this.offset.click.top <= this.containment[3] ? r : r - this.offset.click.top >= this.containment[1] ? r - i.grid[1] : r + i.grid[1] : r, u = this.originalPageX + Math.round((f - this.originalPageX) / i.grid[0]) * i.grid[0], f = this.containment ? u - this.offset.click.left >= this.containment[0] && u - this.offset.click.left <= this.containment[2] ? u : u - this.offset.click.left >= this.containment[0] ? u - i.grid[0] : u + i.grid[0] : u)), { top: e - this.offset.click.top - this.offset.relative.top - this.offset.parent.top + ("fixed" === this.cssPosition ? -this.scrollParent.scrollTop() : s ? 0 : o.scrollTop()), left: f - this.offset.click.left - this.offset.relative.left - this.offset.parent.left + ("fixed" === this.cssPosition ? -this.scrollParent.scrollLeft() : s ? 0 : o.scrollLeft()) } }, _rearrange: function (n, t, i, r) { i ? i[0].appendChild(this.placeholder[0]) : t.item[0].parentNode.insertBefore(this.placeholder[0], "down" === this.direction ? t.item[0] : t.item[0].nextSibling); this.counter = this.counter ? ++this.counter : 1; var u = this.counter; this._delay(function () { u === this.counter && this.refreshPositions(!r) }) }, _clear: function (n, t) { function u(n, t, i) { return function (r) { i._trigger(n, r, t._uiHash(t)) } } this.reverting = !1; var i, r = []; if (!this._noFinalSort && this.currentItem.parent().length && this.placeholder.before(this.currentItem), this._noFinalSort = null, this.helper[0] === this.currentItem[0]) { for (i in this._storedCSS) ("auto" === this._storedCSS[i] || "static" === this._storedCSS[i]) && (this._storedCSS[i] = ""); this.currentItem.css(this._storedCSS); this._removeClass(this.currentItem, "ui-sortable-helper") } else this.currentItem.show(); for (this.fromOutside && !t && r.push(function (n) { this._trigger("receive", n, this._uiHash(this.fromOutside)) }), !this.fromOutside && this.domPosition.prev === this.currentItem.prev().not(".ui-sortable-helper")[0] && this.domPosition.parent === this.currentItem.parent()[0] || t || r.push(function (n) { this._trigger("update", n, this._uiHash()) }), this !== this.currentContainer && (t || (r.push(function (n) { this._trigger("remove", n, this._uiHash()) }), r.push(function (n) { return function (t) { n._trigger("receive", t, this._uiHash(this)) } }.call(this, this.currentContainer)), r.push(function (n) { return function (t) { n._trigger("update", t, this._uiHash(this)) } }.call(this, this.currentContainer)))), i = this.containers.length - 1; i >= 0; i--)t || r.push(u("deactivate", this, this.containers[i])), this.containers[i].containerCache.over && (r.push(u("out", this, this.containers[i])), this.containers[i].containerCache.over = 0); if (this.storedCursor && (this.document.find("body").css("cursor", this.storedCursor), this.storedStylesheet.remove()), this._storedOpacity && this.helper.css("opacity", this._storedOpacity), this._storedZIndex && this.helper.css("zIndex", "auto" === this._storedZIndex ? "" : this._storedZIndex), this.dragging = !1, t || this._trigger("beforeStop", n, this._uiHash()), this.placeholder[0].parentNode.removeChild(this.placeholder[0]), this.cancelHelperRemoval || (this.helper[0] !== this.currentItem[0] && this.helper.remove(), this.helper = null), !t) { for (i = 0; r.length > i; i++)r[i].call(this, n); this._trigger("stop", n, this._uiHash()) } return this.fromOutside = !1, !this.cancelHelperRemoval }, _trigger: function () { n.Widget.prototype._trigger.apply(this, arguments) === !1 && this.cancel() }, _uiHash: function (t) { var i = t || this; return { helper: i.helper, placeholder: i.placeholder || n([]), position: i.position, originalPosition: i.originalPosition, offset: i.positionAbs, item: i.currentItem, sender: t ? t.element : null } } }); n.widget("ui.spinner", { version: "1.12.1", defaultElement: "<input>", widgetEventPrefix: "spin", options: { classes: { "ui-spinner": "ui-corner-all", "ui-spinner-down": "ui-corner-br", "ui-spinner-up": "ui-corner-tr" }, culture: null, icons: { down: "ui-icon-triangle-1-s", up: "ui-icon-triangle-1-n" }, incremental: !0, max: null, min: null, numberFormat: null, page: 10, step: 1, change: null, spin: null, start: null, stop: null }, _create: function () { this._setOption("max", this.options.max); this._setOption("min", this.options.min); this._setOption("step", this.options.step); "" !== this.value() && this._value(this.element.val(), !0); this._draw(); this._on(this._events); this._refresh(); this._on(this.window, { beforeunload: function () { this.element.removeAttr("autocomplete") } }) }, _getCreateOptions: function () { var t = this._super(), i = this.element; return n.each(["min", "max", "step"], function (n, r) { var u = i.attr(r); null != u && u.length && (t[r] = u) }), t }, _events: { keydown: function (n) { this._start(n) && this._keydown(n) && n.preventDefault() }, keyup: "_stop", focus: function () { this.previous = this.element.val() }, blur: function (n) { return this.cancelBlur ? (delete this.cancelBlur, void 0) : (this._stop(), this._refresh(), this.previous !== this.element.val() && this._trigger("change", n), void 0) }, mousewheel: function (n, t) { if (t) { if (!this.spinning && !this._start(n)) return !1; this._spin((t > 0 ? 1 : -1) * this.options.step, n); clearTimeout(this.mousewheelTimer); this.mousewheelTimer = this._delay(function () { this.spinning && this._stop(n) }, 100); n.preventDefault() } }, "mousedown .ui-spinner-button": function (t) { function r() { var t = this.element[0] === n.ui.safeActiveElement(this.document[0]); t || (this.element.trigger("focus"), this.previous = i, this._delay(function () { this.previous = i })) } var i; i = this.element[0] === n.ui.safeActiveElement(this.document[0]) ? this.previous : this.element.val(); t.preventDefault(); r.call(this); this.cancelBlur = !0; this._delay(function () { delete this.cancelBlur; r.call(this) }); this._start(t) !== !1 && this._repeat(null, n(t.currentTarget).hasClass("ui-spinner-up") ? 1 : -1, t) }, "mouseup .ui-spinner-button": "_stop", "mouseenter .ui-spinner-button": function (t) { if (n(t.currentTarget).hasClass("ui-state-active")) return this._start(t) === !1 ? !1 : (this._repeat(null, n(t.currentTarget).hasClass("ui-spinner-up") ? 1 : -1, t), void 0) }, "mouseleave .ui-spinner-button": "_stop" }, _enhance: function () { this.uiSpinner = this.element.attr("autocomplete", "off").wrap("<span>").parent().append("<a><\/a><a><\/a>") }, _draw: function () { this._enhance(); this._addClass(this.uiSpinner, "ui-spinner", "ui-widget ui-widget-content"); this._addClass("ui-spinner-input"); this.element.attr("role", "spinbutton"); this.buttons = this.uiSpinner.children("a").attr("tabIndex", -1).attr("aria-hidden", !0).button({ classes: { "ui-button": "" } }); this._removeClass(this.buttons, "ui-corner-all"); this._addClass(this.buttons.first(), "ui-spinner-button ui-spinner-up"); this._addClass(this.buttons.last(), "ui-spinner-button ui-spinner-down"); this.buttons.first().button({ icon: this.options.icons.up, showLabel: !1 }); this.buttons.last().button({ icon: this.options.icons.down, showLabel: !1 }); this.buttons.height() > Math.ceil(.5 * this.uiSpinner.height()) && this.uiSpinner.height() > 0 && this.uiSpinner.height(this.uiSpinner.height()) }, _keydown: function (t) { var r = this.options, i = n.ui.keyCode; switch (t.keyCode) { case i.UP: return this._repeat(null, 1, t), !0; case i.DOWN: return this._repeat(null, -1, t), !0; case i.PAGE_UP: return this._repeat(null, r.page, t), !0; case i.PAGE_DOWN: return this._repeat(null, -r.page, t), !0 }return !1 }, _start: function (n) { return this.spinning || this._trigger("start", n) !== !1 ? (this.counter || (this.counter = 1), this.spinning = !0, !0) : !1 }, _repeat: function (n, t, i) { n = n || 500; clearTimeout(this.timer); this.timer = this._delay(function () { this._repeat(40, t, i) }, n); this._spin(t * this.options.step, i) }, _spin: function (n, t) { var i = this.value() || 0; this.counter || (this.counter = 1); i = this._adjustValue(i + n * this._increment(this.counter)); this.spinning && this._trigger("spin", t, { value: i }) === !1 || (this._value(i), this.counter++) }, _increment: function (t) { var i = this.options.incremental; return i ? n.isFunction(i) ? i(t) : Math.floor(t * t * t / 5e4 - t * t / 500 + 17 * t / 200 + 1) : 1 }, _precision: function () { var n = this._precisionOf(this.options.step); return null !== this.options.min && (n = Math.max(n, this._precisionOf(this.options.min))), n }, _precisionOf: function (n) { var t = "" + n, i = t.indexOf("."); return -1 === i ? 0 : t.length - i - 1 }, _adjustValue: function (n) { var r, i, t = this.options; return r = null !== t.min ? t.min : 0, i = n - r, i = Math.round(i / t.step) * t.step, n = r + i, n = parseFloat(n.toFixed(this._precision())), null !== t.max && n > t.max ? t.max : null !== t.min && t.min > n ? t.min : n }, _stop: function (n) { this.spinning && (clearTimeout(this.timer), clearTimeout(this.mousewheelTimer), this.counter = 0, this.spinning = !1, this._trigger("stop", n)) }, _setOption: function (n, t) { var u, i, r; return "culture" === n || "numberFormat" === n ? (u = this._parse(this.element.val()), this.options[n] = t, this.element.val(this._format(u)), void 0) : (("max" === n || "min" === n || "step" === n) && "string" == typeof t && (t = this._parse(t)), "icons" === n && (i = this.buttons.first().find(".ui-icon"), this._removeClass(i, null, this.options.icons.up), this._addClass(i, null, t.up), r = this.buttons.last().find(".ui-icon"), this._removeClass(r, null, this.options.icons.down), this._addClass(r, null, t.down)), this._super(n, t), void 0) }, _setOptionDisabled: function (n) { this._super(n); this._toggleClass(this.uiSpinner, null, "ui-state-disabled", !!n); this.element.prop("disabled", !!n); this.buttons.button(n ? "disable" : "enable") }, _setOptions: t(function (n) { this._super(n) }), _parse: function (n) { return "string" == typeof n && "" !== n && (n = window.Globalize && this.options.numberFormat ? Globalize.parseFloat(n, 10, this.options.culture) : +n), "" === n || isNaN(n) ? null : n }, _format: function (n) { return "" === n ? "" : window.Globalize && this.options.numberFormat ? Globalize.format(n, this.options.numberFormat, this.options.culture) : n }, _refresh: function () { this.element.attr({ "aria-valuemin": this.options.min, "aria-valuemax": this.options.max, "aria-valuenow": this._parse(this.element.val()) }) }, isValid: function () { var n = this.value(); return null === n ? !1 : n === this._adjustValue(n) }, _value: function (n, t) { var i; "" !== n && (i = this._parse(n), null !== i && (t || (i = this._adjustValue(i)), n = this._format(i))); this.element.val(n); this._refresh() }, _destroy: function () { this.element.prop("disabled", !1).removeAttr("autocomplete role aria-valuemin aria-valuemax aria-valuenow"); this.uiSpinner.replaceWith(this.element) }, stepUp: t(function (n) { this._stepUp(n) }), _stepUp: function (n) { this._start() && (this._spin((n || 1) * this.options.step), this._stop()) }, stepDown: t(function (n) { this._stepDown(n) }), _stepDown: function (n) { this._start() && (this._spin((n || 1) * -this.options.step), this._stop()) }, pageUp: t(function (n) { this._stepUp((n || 1) * this.options.page) }), pageDown: t(function (n) { this._stepDown((n || 1) * this.options.page) }), value: function (n) { return arguments.length ? (t(this._value).call(this, n), void 0) : this._parse(this.element.val()) }, widget: function () { return this.uiSpinner } }); n.uiBackCompat !== !1 && n.widget("ui.spinner", n.ui.spinner, { _enhance: function () { this.uiSpinner = this.element.attr("autocomplete", "off").wrap(this._uiSpinnerHtml()).parent().append(this._buttonHtml()) }, _uiSpinnerHtml: function () { return "<span>" }, _buttonHtml: function () { return "<a><\/a><a><\/a>" } }); n.ui.spinner; n.widget("ui.tabs", { version: "1.12.1", delay: 300, options: { active: null, classes: { "ui-tabs": "ui-corner-all", "ui-tabs-nav": "ui-corner-all", "ui-tabs-panel": "ui-corner-bottom", "ui-tabs-tab": "ui-corner-top" }, collapsible: !1, event: "click", heightStyle: "content", hide: null, show: null, activate: null, beforeActivate: null, beforeLoad: null, load: null }, _isLocal: function () { var n = /#.*$/; return function (t) { var i, r; i = t.href.replace(n, ""); r = location.href.replace(n, ""); try { i = decodeURIComponent(i) } catch (u) { } try { r = decodeURIComponent(r) } catch (u) { } return t.hash.length > 1 && i === r } }(), _create: function () { var i = this, t = this.options; this.running = !1; this._addClass("ui-tabs", "ui-widget ui-widget-content"); this._toggleClass("ui-tabs-collapsible", null, t.collapsible); this._processTabs(); t.active = this._initialActive(); n.isArray(t.disabled) && (t.disabled = n.unique(t.disabled.concat(n.map(this.tabs.filter(".ui-state-disabled"), function (n) { return i.tabs.index(n) }))).sort()); this.active = this.options.active !== !1 && this.anchors.length ? this._findActive(t.active) : n(); this._refresh(); this.active.length && this.load(t.active) }, _initialActive: function () { var t = this.options.active, i = this.options.collapsible, r = location.hash.substring(1); return null === t && (r && this.tabs.each(function (i, u) { if (n(u).attr("aria-controls") === r) return (t = i, !1) }), null === t && (t = this.tabs.index(this.tabs.filter(".ui-tabs-active"))), (null === t || -1 === t) && (t = this.tabs.length ? 0 : !1)), t !== !1 && (t = this.tabs.index(this.tabs.eq(t)), -1 === t && (t = i ? !1 : 0)), !i && t === !1 && this.anchors.length && (t = 0), t }, _getCreateEventData: function () { return { tab: this.active, panel: this.active.length ? this._getPanelForTab(this.active) : n() } }, _tabKeydown: function (t) { var r = n(n.ui.safeActiveElement(this.document[0])).closest("li"), i = this.tabs.index(r), u = !0; if (!this._handlePageNav(t)) { switch (t.keyCode) { case n.ui.keyCode.RIGHT: case n.ui.keyCode.DOWN: i++; break; case n.ui.keyCode.UP: case n.ui.keyCode.LEFT: u = !1; i--; break; case n.ui.keyCode.END: i = this.anchors.length - 1; break; case n.ui.keyCode.HOME: i = 0; break; case n.ui.keyCode.SPACE: return t.preventDefault(), clearTimeout(this.activating), this._activate(i), void 0; case n.ui.keyCode.ENTER: return t.preventDefault(), clearTimeout(this.activating), this._activate(i === this.options.active ? !1 : i), void 0; default: return }t.preventDefault(); clearTimeout(this.activating); i = this._focusNextTab(i, u); t.ctrlKey || t.metaKey || (r.attr("aria-selected", "false"), this.tabs.eq(i).attr("aria-selected", "true"), this.activating = this._delay(function () { this.option("active", i) }, this.delay)) } }, _panelKeydown: function (t) { this._handlePageNav(t) || t.ctrlKey && t.keyCode === n.ui.keyCode.UP && (t.preventDefault(), this.active.trigger("focus")) }, _handlePageNav: function (t) { return t.altKey && t.keyCode === n.ui.keyCode.PAGE_UP ? (this._activate(this._focusNextTab(this.options.active - 1, !1)), !0) : t.altKey && t.keyCode === n.ui.keyCode.PAGE_DOWN ? (this._activate(this._focusNextTab(this.options.active + 1, !0)), !0) : void 0 }, _findNextTab: function (t, i) { function u() { return t > r && (t = 0), 0 > t && (t = r), t } for (var r = this.tabs.length - 1; -1 !== n.inArray(u(), this.options.disabled);)t = i ? t + 1 : t - 1; return t }, _focusNextTab: function (n, t) { return n = this._findNextTab(n, t), this.tabs.eq(n).trigger("focus"), n }, _setOption: function (n, t) { return "active" === n ? (this._activate(t), void 0) : (this._super(n, t), "collapsible" === n && (this._toggleClass("ui-tabs-collapsible", null, t), t || this.options.active !== !1 || this._activate(0)), "event" === n && this._setupEvents(t), "heightStyle" === n && this._setupHeightStyle(t), void 0) }, _sanitizeSelector: function (n) { return n ? n.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g, "\\$&") : "" }, refresh: function () { var t = this.options, i = this.tablist.children(":has(a[href])"); t.disabled = n.map(i.filter(".ui-state-disabled"), function (n) { return i.index(n) }); this._processTabs(); t.active !== !1 && this.anchors.length ? this.active.length && !n.contains(this.tablist[0], this.active[0]) ? this.tabs.length === t.disabled.length ? (t.active = !1, this.active = n()) : this._activate(this._findNextTab(Math.max(0, t.active - 1), !1)) : t.active = this.tabs.index(this.active) : (t.active = !1, this.active = n()); this._refresh() }, _refresh: function () { this._setOptionDisabled(this.options.disabled); this._setupEvents(this.options.event); this._setupHeightStyle(this.options.heightStyle); this.tabs.not(this.active).attr({ "aria-selected": "false", "aria-expanded": "false", tabIndex: -1 }); this.panels.not(this._getPanelForTab(this.active)).hide().attr({ "aria-hidden": "true" }); this.active.length ? (this.active.attr({ "aria-selected": "true", "aria-expanded": "true", tabIndex: 0 }), this._addClass(this.active, "ui-tabs-active", "ui-state-active"), this._getPanelForTab(this.active).show().attr({ "aria-hidden": "false" })) : this.tabs.eq(0).attr("tabIndex", 0) }, _processTabs: function () { var t = this, i = this.tabs, r = this.anchors, u = this.panels; this.tablist = this._getList().attr("role", "tablist"); this._addClass(this.tablist, "ui-tabs-nav", "ui-helper-reset ui-helper-clearfix ui-widget-header"); this.tablist.on("mousedown" + this.eventNamespace, "> li", function (t) { n(this).is(".ui-state-disabled") && t.preventDefault() }).on("focus" + this.eventNamespace, ".ui-tabs-anchor", function () { n(this).closest("li").is(".ui-state-disabled") && this.blur() }); this.tabs = this.tablist.find("> li:has(a[href])").attr({ role: "tab", tabIndex: -1 }); this._addClass(this.tabs, "ui-tabs-tab", "ui-state-default"); this.anchors = this.tabs.map(function () { return n("a", this)[0] }).attr({ role: "presentation", tabIndex: -1 }); this._addClass(this.anchors, "ui-tabs-anchor"); this.panels = n(); this.anchors.each(function (i, r) { var f, u, e, s = n(r).uniqueId().attr("id"), o = n(r).closest("li"), h = o.attr("aria-controls"); t._isLocal(r) ? (f = r.hash, e = f.substring(1), u = t.element.find(t._sanitizeSelector(f))) : (e = o.attr("aria-controls") || n({}).uniqueId()[0].id, f = "#" + e, u = t.element.find(f), u.length || (u = t._createPanel(e), u.insertAfter(t.panels[i - 1] || t.tablist)), u.attr("aria-live", "polite")); u.length && (t.panels = t.panels.add(u)); h && o.data("ui-tabs-aria-controls", h); o.attr({ "aria-controls": e, "aria-labelledby": s }); u.attr("aria-labelledby", s) }); this.panels.attr("role", "tabpanel"); this._addClass(this.panels, "ui-tabs-panel", "ui-widget-content"); i && (this._off(i.not(this.tabs)), this._off(r.not(this.anchors)), this._off(u.not(this.panels))) }, _getList: function () { return this.tablist || this.element.find("ol, ul").eq(0) }, _createPanel: function (t) { return n("<div>").attr("id", t).data("ui-tabs-destroy", !0) }, _setOptionDisabled: function (t) { var i, u, r; for (n.isArray(t) && (t.length ? t.length === this.anchors.length && (t = !0) : t = !1), r = 0; u = this.tabs[r]; r++)i = n(u), t === !0 || -1 !== n.inArray(r, t) ? (i.attr("aria-disabled", "true"), this._addClass(i, null, "ui-state-disabled")) : (i.removeAttr("aria-disabled"), this._removeClass(i, null, "ui-state-disabled")); this.options.disabled = t; this._toggleClass(this.widget(), this.widgetFullName + "-disabled", null, t === !0) }, _setupEvents: function (t) { var i = {}; t && n.each(t.split(" "), function (n, t) { i[t] = "_eventHandler" }); this._off(this.anchors.add(this.tabs).add(this.panels)); this._on(!0, this.anchors, { click: function (n) { n.preventDefault() } }); this._on(this.anchors, i); this._on(this.tabs, { keydown: "_tabKeydown" }); this._on(this.panels, { keydown: "_panelKeydown" }); this._focusable(this.tabs); this._hoverable(this.tabs) }, _setupHeightStyle: function (t) { var i, r = this.element.parent(); "fill" === t ? (i = r.height(), i -= this.element.outerHeight() - this.element.height(), this.element.siblings(":visible").each(function () { var t = n(this), r = t.css("position"); "absolute" !== r && "fixed" !== r && (i -= t.outerHeight(!0)) }), this.element.children().not(this.panels).each(function () { i -= n(this).outerHeight(!0) }), this.panels.each(function () { n(this).height(Math.max(0, i - n(this).innerHeight() + n(this).height())) }).css("overflow", "auto")) : "auto" === t && (i = 0, this.panels.each(function () { i = Math.max(i, n(this).height("").height()) }).height(i)) }, _eventHandler: function (t) { var u = this.options, r = this.active, c = n(t.currentTarget), i = c.closest("li"), f = i[0] === r[0], e = f && u.collapsible, o = e ? n() : this._getPanelForTab(i), s = r.length ? this._getPanelForTab(r) : n(), h = { oldTab: r, oldPanel: s, newTab: e ? n() : i, newPanel: o }; t.preventDefault(); i.hasClass("ui-state-disabled") || i.hasClass("ui-tabs-loading") || this.running || f && !u.collapsible || this._trigger("beforeActivate", t, h) === !1 || (u.active = e ? !1 : this.tabs.index(i), this.active = f ? n() : i, this.xhr && this.xhr.abort(), s.length || o.length || n.error("jQuery UI Tabs: Mismatching fragment identifier."), o.length && this.load(this.tabs.index(i), t), this._toggle(t, h)) }, _toggle: function (t, i) { function e() { r.running = !1; r._trigger("activate", t, i) } function o() { r._addClass(i.newTab.closest("li"), "ui-tabs-active", "ui-state-active"); u.length && r.options.show ? r._show(u, r.options.show, e) : (u.show(), e()) } var r = this, u = i.newPanel, f = i.oldPanel; this.running = !0; f.length && this.options.hide ? this._hide(f, this.options.hide, function () { r._removeClass(i.oldTab.closest("li"), "ui-tabs-active", "ui-state-active"); o() }) : (this._removeClass(i.oldTab.closest("li"), "ui-tabs-active", "ui-state-active"), f.hide(), o()); f.attr("aria-hidden", "true"); i.oldTab.attr({ "aria-selected": "false", "aria-expanded": "false" }); u.length && f.length ? i.oldTab.attr("tabIndex", -1) : u.length && this.tabs.filter(function () { return 0 === n(this).attr("tabIndex") }).attr("tabIndex", -1); u.attr("aria-hidden", "false"); i.newTab.attr({ "aria-selected": "true", "aria-expanded": "true", tabIndex: 0 }) }, _activate: function (t) { var r, i = this._findActive(t); i[0] !== this.active[0] && (i.length || (i = this.active), r = i.find(".ui-tabs-anchor")[0], this._eventHandler({ target: r, currentTarget: r, preventDefault: n.noop })) }, _findActive: function (t) { return t === !1 ? n() : this.tabs.eq(t) }, _getIndex: function (t) { return "string" == typeof t && (t = this.anchors.index(this.anchors.filter("[href$='" + n.ui.escapeSelector(t) + "']"))), t }, _destroy: function () { this.xhr && this.xhr.abort(); this.tablist.removeAttr("role").off(this.eventNamespace); this.anchors.removeAttr("role tabIndex").removeUniqueId(); this.tabs.add(this.panels).each(function () { n.data(this, "ui-tabs-destroy") ? n(this).remove() : n(this).removeAttr("role tabIndex aria-live aria-busy aria-selected aria-labelledby aria-hidden aria-expanded") }); this.tabs.each(function () { var t = n(this), i = t.data("ui-tabs-aria-controls"); i ? t.attr("aria-controls", i).removeData("ui-tabs-aria-controls") : t.removeAttr("aria-controls") }); this.panels.show(); "content" !== this.options.heightStyle && this.panels.css("height", "") }, enable: function (t) { var i = this.options.disabled; i !== !1 && (void 0 === t ? i = !1 : (t = this._getIndex(t), i = n.isArray(i) ? n.map(i, function (n) { return n !== t ? n : null }) : n.map(this.tabs, function (n, i) { return i !== t ? i : null })), this._setOptionDisabled(i)) }, disable: function (t) { var i = this.options.disabled; if (i !== !0) { if (void 0 === t) i = !0; else { if (t = this._getIndex(t), -1 !== n.inArray(t, i)) return; i = n.isArray(i) ? n.merge([t], i).sort() : [t] } this._setOptionDisabled(i) } }, load: function (t, i) { t = this._getIndex(t); var r = this, u = this.tabs.eq(t), e = u.find(".ui-tabs-anchor"), f = this._getPanelForTab(u), o = { tab: u, panel: f }, s = function (n, t) { "abort" === t && r.panels.stop(!1, !0); r._removeClass(u, "ui-tabs-loading"); f.removeAttr("aria-busy"); n === r.xhr && delete r.xhr }; this._isLocal(e[0]) || (this.xhr = n.ajax(this._ajaxSettings(e, i, o)), this.xhr && "canceled" !== this.xhr.statusText && (this._addClass(u, "ui-tabs-loading"), f.attr("aria-busy", "true"), this.xhr.done(function (n, t, u) { setTimeout(function () { f.html(n); r._trigger("load", i, o); s(u, t) }, 1) }).fail(function (n, t) { setTimeout(function () { s(n, t) }, 1) }))) }, _ajaxSettings: function (t, i, r) { var u = this; return { url: t.attr("href").replace(/#.*$/, ""), beforeSend: function (t, f) { return u._trigger("beforeLoad", i, n.extend({ jqXHR: t, ajaxSettings: f }, r)) } } }, _getPanelForTab: function (t) { var i = n(t).attr("aria-controls"); return this.element.find(this._sanitizeSelector("#" + i)) } }); n.uiBackCompat !== !1 && n.widget("ui.tabs", n.ui.tabs, { _processTabs: function () { this._superApply(arguments); this._addClass(this.tabs, "ui-tab") } }); n.ui.tabs; n.widget("ui.tooltip", { version: "1.12.1", options: { classes: { "ui-tooltip": "ui-corner-all ui-widget-shadow" }, content: function () { var t = n(this).attr("title") || ""; return n("<a>").text(t).html() }, hide: !0, items: "[title]:not([disabled])", position: { my: "left top+15", at: "left bottom", collision: "flipfit flip" }, show: !0, track: !1, close: null, open: null }, _addDescribedBy: function (t, i) { var r = (t.attr("aria-describedby") || "").split(/\s+/); r.push(i); t.data("ui-tooltip-id", i).attr("aria-describedby", n.trim(r.join(" "))) }, _removeDescribedBy: function (t) { var u = t.data("ui-tooltip-id"), i = (t.attr("aria-describedby") || "").split(/\s+/), r = n.inArray(u, i); -1 !== r && i.splice(r, 1); t.removeData("ui-tooltip-id"); i = n.trim(i.join(" ")); i ? t.attr("aria-describedby", i) : t.removeAttr("aria-describedby") }, _create: function () { this._on({ mouseover: "open", focusin: "open" }); this.tooltips = {}; this.parents = {}; this.liveRegion = n("<div>").attr({ role: "log", "aria-live": "assertive", "aria-relevant": "additions" }).appendTo(this.document[0].body); this._addClass(this.liveRegion, null, "ui-helper-hidden-accessible"); this.disabledTitles = n([]) }, _setOption: function (t, i) { var r = this; this._super(t, i); "content" === t && n.each(this.tooltips, function (n, t) { r._updateContent(t.element) }) }, _setOptionDisabled: function (n) { this[n ? "_disable" : "_enable"]() }, _disable: function () { var t = this; n.each(this.tooltips, function (i, r) { var u = n.Event("blur"); u.target = u.currentTarget = r.element[0]; t.close(u, !0) }); this.disabledTitles = this.disabledTitles.add(this.element.find(this.options.items).addBack().filter(function () { var t = n(this); if (t.is("[title]")) return t.data("ui-tooltip-title", t.attr("title")).removeAttr("title") })) }, _enable: function () { this.disabledTitles.each(function () { var t = n(this); t.data("ui-tooltip-title") && t.attr("title", t.data("ui-tooltip-title")) }); this.disabledTitles = n([]) }, open: function (t) { var r = this, i = n(t ? t.target : this.element).closest(this.options.items); i.length && !i.data("ui-tooltip-id") && (i.attr("title") && i.data("ui-tooltip-title", i.attr("title")), i.data("ui-tooltip-open", !0), t && "mouseover" === t.type && i.parents().each(function () { var i, t = n(this); t.data("ui-tooltip-open") && (i = n.Event("blur"), i.target = i.currentTarget = this, r.close(i, !0)); t.attr("title") && (t.uniqueId(), r.parents[this.id] = { element: this, title: t.attr("title") }, t.attr("title", "")) }), this._registerCloseHandlers(t, i), this._updateContent(i, t)) }, _updateContent: function (n, t) { var r, i = this.options.content, u = this, f = t ? t.type : null; return "string" == typeof i || i.nodeType || i.jquery ? this._open(t, n, i) : (r = i.call(n[0], function (i) { u._delay(function () { n.data("ui-tooltip-open") && (t && (t.type = f), this._open(t, n, i)) }) }), r && this._open(t, n, r), void 0) }, _open: function (t, i, r) { function o(n) { s.of = n; u.is(":hidden") || u.position(s) } var f, u, h, e, s = n.extend({}, this.options.position); if (r) { if (f = this._find(i)) return f.tooltip.find(".ui-tooltip-content").html(r), void 0; i.is("[title]") && (t && "mouseover" === t.type ? i.attr("title", "") : i.removeAttr("title")); f = this._tooltip(i); u = f.tooltip; this._addDescribedBy(i, u.attr("id")); u.find(".ui-tooltip-content").html(r); this.liveRegion.children().hide(); e = n("<div>").html(u.find(".ui-tooltip-content").html()); e.removeAttr("name").find("[name]").removeAttr("name"); e.removeAttr("id").find("[id]").removeAttr("id"); e.appendTo(this.liveRegion); this.options.track && t && /^mouse/.test(t.type) ? (this._on(this.document, { mousemove: o }), o(t)) : u.position(n.extend({ "of": i }, this.options.position)); u.hide(); this._show(u, this.options.show); this.options.track && this.options.show && this.options.show.delay && (h = this.delayedShow = setInterval(function () { u.is(":visible") && (o(s.of), clearInterval(h)) }, n.fx.interval)); this._trigger("open", t, { tooltip: u }) } }, _registerCloseHandlers: function (t, i) { var r = { keyup: function (t) { if (t.keyCode === n.ui.keyCode.ESCAPE) { var r = n.Event(t); r.currentTarget = i[0]; this.close(r, !0) } } }; i[0] !== this.element[0] && (r.remove = function () { this._removeTooltip(this._find(i).tooltip) }); t && "mouseover" !== t.type || (r.mouseleave = "close"); t && "focusin" !== t.type || (r.focusout = "close"); this._on(!0, i, r) }, close: function (t) { var u, f = this, i = n(t ? t.currentTarget : this.element), r = this._find(i); return r ? (u = r.tooltip, r.closing || (clearInterval(this.delayedShow), i.data("ui-tooltip-title") && !i.attr("title") && i.attr("title", i.data("ui-tooltip-title")), this._removeDescribedBy(i), r.hiding = !0, u.stop(!0), this._hide(u, this.options.hide, function () { f._removeTooltip(n(this)) }), i.removeData("ui-tooltip-open"), this._off(i, "mouseleave focusout keyup"), i[0] !== this.element[0] && this._off(i, "remove"), this._off(this.document, "mousemove"), t && "mouseleave" === t.type && n.each(this.parents, function (t, i) { n(i.element).attr("title", i.title); delete f.parents[t] }), r.closing = !0, this._trigger("close", t, { tooltip: u }), r.hiding || (r.closing = !1)), void 0) : (i.removeData("ui-tooltip-open"), void 0) }, _tooltip: function (t) { var i = n("<div>").attr("role", "tooltip"), r = n("<div>").appendTo(i), u = i.uniqueId().attr("id"); return this._addClass(r, "ui-tooltip-content"), this._addClass(i, "ui-tooltip", "ui-widget ui-widget-content"), i.appendTo(this._appendTo(t)), this.tooltips[u] = { element: t, tooltip: i } }, _find: function (n) { var t = n.data("ui-tooltip-id"); return t ? this.tooltips[t] : null }, _removeTooltip: function (n) { n.remove(); delete this.tooltips[n.attr("id")] }, _appendTo: function (n) { var t = n.closest(".ui-front, dialog"); return t.length || (t = this.document[0].body), t }, _destroy: function () { var t = this; n.each(this.tooltips, function (i, r) { var f = n.Event("blur"), u = r.element; f.target = f.currentTarget = u[0]; t.close(f, !0); n("#" + i).remove(); u.data("ui-tooltip-title") && (u.attr("title") || u.attr("title", u.data("ui-tooltip-title")), u.removeData("ui-tooltip-title")) }); this.liveRegion.remove() } }); n.uiBackCompat !== !1 && n.widget("ui.tooltip", n.ui.tooltip, { options: { tooltipClass: null }, _tooltip: function () { var n = this._superApply(arguments); return this.options.tooltipClass && n.tooltip.addClass(this.options.tooltipClass), n } }); n.ui.tooltip }); $(function () { $("body").on("input propertychange", ".floating-label-form-group", function () { }).on("focus", ".floating-label-form-group", function () { $(this).addClass("floating-label-form-group-with-value") }).on("blur", ".floating-label-form-group", function () { $(this).find(".floating-label-control").val() != "" ? $(this).addClass("floating-label-form-group-with-value") : $(this).find(".floating-label-control").val() == "" && $(this).removeClass("floating-label-form-group-with-value") }).on("focusin", ".floating-label-control", function () { $(this).attr("placeholder", $(this).data("placeholder")) }).on("focusout", ".floating-label-control", function () { $(this).attr("placeholder", $(this).data("label")) }) }); _floatingLabelHelper = { init: function () { $("div.floating-label-form-group > input,textarea,select").each(function () { $(this).val() && !$(this).parent(".floating-label-form-group").hasClass("floating-label-form-group-with-value") && $(this).parent(".floating-label-form-group").addClass("floating-label-form-group-with-value") }) } }; dropdownSelectors = $(".dropdown, .dropup"); dropdownSelectors.on({ "show.bs.dropdown": function () { var n = dropdownEffectData(this); dropdownEffectStart(n, n.effectIn) }, "shown.bs.dropdown": function () { var n = dropdownEffectData(this); n.effectIn && n.effectOut && dropdownEffectEnd(n, function () { }) }, "hide.bs.dropdown": function (n) { var t = dropdownEffectData(this); t.effectOut && (n.preventDefault(), dropdownEffectStart(t, t.effectOut), dropdownEffectEnd(t, function () { t.dropdown.removeClass("show"); t.dropdownMenu.removeClass("show") })) } }); (function (n) { function t(t) { var i = n.Toggles = function (n, i) { var b = this, y, p, u; if ("boolean" == typeof i && n.data("toggles")) n.data("toggles").toggle(i); else { for (var h = "on drag click width height animate easing type checkbox".split(" "), u = {}, c = 0; c < h.length; c++)y = n.data("toggle-" + h[c]), "undefined" != typeof y && (u[h[c]] = y); i = t.extend({ drag: !0, click: !0, text: { on: "ON", off: "OFF" }, on: !1, animate: 250, easing: "swing", checkbox: null, clicker: null, width: 0, height: 0, type: "compact", event: "toggle" }, i || {}, u); n.data("toggles", b); var f = !i.on, l = "select" === i.type, tt = t(i.checkbox), h = i.clicker && t(i.clicker), r = i.height || n.height() || 20, s = i.width || n.width() || 50; n.height(r); n.width(s); var u = function (n) { return t('<div class="toggle-' + n + '">') }, a = u("slide"), v = u("inner"), k = u("on"), d = u("off"), o = u("blob"), u = r / 2, c = s - u, y = i.text; if (k.css({ height: r, width: c, textIndent: l ? "" : -r / 3, lineHeight: r + "px" }).html(y.on), d.css({ height: r, width: c, marginLeft: l ? "" : -u, textIndent: l ? "" : r / 3, lineHeight: r + "px" }).html(y.off), o.css({ height: r, width: r, marginLeft: -u }), v.css({ width: 2 * s - r, marginLeft: l ? 0 : -s + r }), l && (a.addClass("toggle-select"), n.css("width", 2 * c), o.hide()), v.append(k, o, d), a.html(v), n.html(a), p = b.toggle = function (t, u, e) { f !== t && (f = b.active = !f, n.data("toggle-active", f), d.toggleClass("active", !f), k.toggleClass("active", f), tt.prop("checked", f), e || n.trigger(i.event, f), l || (t = f ? 0 : -s + r, v.stop().animate({ marginLeft: t }, u ? 0 : i.animate, i.easing))) }, u = function (t) { n.hasClass("disabled") || t.target === o[0] && i.drag || p() }, i.click && (!h || !h.has(n).length)) n.on("click", u); if (h) h.on("click", u); if (i.drag && !l) { var e, g = (s - r) / 4, nt = function (t) { n.off("mousemove"); a.off("mouseleave"); o.off("mouseup"); !e && i.click && "mouseleave" !== t.type ? p() : (f ? e < -g : e > g) ? p() : v.stop().animate({ marginLeft: f ? 0 : -s + r }, i.animate / 2, i.easing) }, w = -s + r; o.on("mousedown", function (t) { if (!n.hasClass("disabled")) { e = 0; o.off("mouseup"); a.off("mouseleave"); var i = t.pageX; n.on("mousemove", o, function (n) { e = n.pageX - i; f ? (n = e, 0 < e && (n = 0), e < w && (n = w)) : (n = e + w, 0 > e && (n = w), e > -w && (n = 0)); v.css("margin-left", n) }); o.on("mouseup", nt); a.on("mouseleave", nt) } }) } p(i.on, !0, !0) } }; t.fn.toggles = function (n) { return this.each(function () { new i(t(this), n) }) } } "function" == typeof define && define.amd ? define(["jquery"], t) : t(n.jQuery || n.Zepto || n.ender || n.$ || $) })(this);
  55. /**!
  56. @license
  57. handlebars v4.7.6
  58. Copyright (C) 2011-2019 by Yehuda Katz
  59. Permission is hereby granted, free of charge, to any person obtaining a copy
  60. of this software and associated documentation files (the "Software"), to deal
  61. in the Software without restriction, including without limitation the rights
  62. to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  63. copies of the Software, and to permit persons to whom the Software is
  64. furnished to do so, subject to the following conditions:
  65. The above copyright notice and this permission notice shall be included in
  66. all copies or substantial portions of the Software.
  67. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  68. IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  69. FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  70. AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  71. LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  72. OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  73. THE SOFTWARE.
  74. */
  75. !function (n, t) { "object" == typeof exports && "object" == typeof module ? module.exports = t() : "function" == typeof define && define.amd ? define([], t) : "object" == typeof exports ? exports.Handlebars = t() : n.Handlebars = t() }(this, function () { return function (n) { function t(r) { if (i[r]) return i[r].exports; var u = i[r] = { exports: {}, id: r, loaded: !1 }; return n[r].call(u.exports, u, u.exports, t), u.loaded = !0, u.exports } var i = {}; return t.m = n, t.c = i, t.p = "", t(0) }([function (n, t, i) { "use strict"; function o() { var n = k(); return n.compile = function (t, i) { return e.compile(t, i, n) }, n.precompile = function (t, i) { return e.precompile(t, i, n) }, n.AST = l["default"], n.Compiler = e.Compiler, n.JavaScriptCompiler = v["default"], n.Parser = f.parser, n.parse = f.parse, n.parseWithoutProcessing = f.parseWithoutProcessing, n } var u = i(1)["default"]; t.__esModule = !0; var s = i(2), h = u(s), c = i(45), l = u(c), f = i(46), e = i(51), a = i(52), v = u(a), y = i(49), p = u(y), w = i(44), b = u(w), k = h["default"].create, r = o(); r.create = o; b["default"](r); r.Visitor = p["default"]; r["default"] = r; t["default"] = r; n.exports = t["default"] }, function (n, t) { "use strict"; t["default"] = function (n) { return n && n.__esModule ? n : { "default": n } }; t.__esModule = !0 }, function (n, t, i) { "use strict"; function o() { var n = new s.HandlebarsEnvironment; return e.extend(n, s), n.SafeString = a["default"], n.Exception = y["default"], n.Utils = e, n.escapeExpression = e.escapeExpression, n.VM = h, n.template = function (t) { return h.template(t, n) }, n } var u = i(3)["default"], f = i(1)["default"]; t.__esModule = !0; var c = i(4), s = u(c), l = i(37), a = f(l), v = i(6), y = f(v), p = i(5), e = u(p), w = i(38), h = u(w), b = i(44), k = f(b), r = o(); r.create = o; k["default"](r); r["default"] = r; t["default"] = r; n.exports = t["default"] }, function (n, t) { "use strict"; t["default"] = function (n) { var t, i; if (n && n.__esModule) return n; if (t = {}, null != n) for (i in n) Object.prototype.hasOwnProperty.call(n, i) && (t[i] = n[i]); return t["default"] = n, t }; t.__esModule = !0 }, function (n, t, i) { "use strict"; function e(n, t, i) { this.helpers = n || {}; this.partials = t || {}; this.decorators = i || {}; y.registerDefaultHelpers(this); p.registerDefaultDecorators(this) } var s = i(1)["default"], h, c, l, f, a; t.__esModule = !0; t.HandlebarsEnvironment = e; var r = i(5), v = i(6), o = s(v), y = i(10), p = i(30), w = i(32), u = s(w), b = i(33); t.VERSION = "4.7.6"; h = 8; t.COMPILER_REVISION = h; c = 7; t.LAST_COMPATIBLE_COMPILER_REVISION = c; l = { 1: "<= 1.0.rc.2", 2: "== 1.0.0-rc.3", 3: "== 1.0.0-rc.4", 4: "== 1.x.x", 5: "== 2.0.0-alpha.x", 6: ">= 2.0.0-beta.1", 7: ">= 4.0.0 <4.3.0", 8: ">= 4.3.0" }; t.REVISION_CHANGES = l; f = "[object Object]"; e.prototype = { constructor: e, logger: u["default"], log: u["default"].log, registerHelper: function (n, t) { if (r.toString.call(n) === f) { if (t) throw new o["default"]("Arg not supported with multiple helpers"); r.extend(this.helpers, n) } else this.helpers[n] = t }, unregisterHelper: function (n) { delete this.helpers[n] }, registerPartial: function (n, t) { if (r.toString.call(n) === f) r.extend(this.partials, n); else { if ("undefined" == typeof t) throw new o["default"]('Attempting to register a partial called "' + n + '" as undefined'); this.partials[n] = t } }, unregisterPartial: function (n) { delete this.partials[n] }, registerDecorator: function (n, t) { if (r.toString.call(n) === f) { if (t) throw new o["default"]("Arg not supported with multiple decorators"); r.extend(this.decorators, n) } else this.decorators[n] = t }, unregisterDecorator: function (n) { delete this.decorators[n] }, resetLoggedPropertyAccesses: function () { b.resetLoggedProperties() } }; a = u["default"].log; t.log = a; t.createFrame = r.createFrame; t.logger = u["default"] }, function (n, t) { "use strict"; function e(n) { return v[n] } function f(n) { for (var i, t = 1; t < arguments.length; t++)for (i in arguments[t]) Object.prototype.hasOwnProperty.call(arguments[t], i) && (n[i] = arguments[t][i]); return n } function o(n, t) { for (var i = 0, r = n.length; i < r; i++)if (n[i] === t) return i; return -1 } function s(n) { if ("string" != typeof n) { if (n && n.toHTML) return n.toHTML(); if (null == n) return ""; if (!n) return n + ""; n = "" + n } return p.test(n) ? n.replace(y, e) : n } function h(n) { return !n && 0 !== n || !(!u(n) || 0 !== n.length) } function c(n) { var t = f({}, n); return t._parent = n, t } function l(n, t) { return n.path = t, n } function a(n, t) { return (n ? n + "." : "") + t } var i, u; t.__esModule = !0; t.extend = f; t.indexOf = o; t.escapeExpression = s; t.isEmpty = h; t.createFrame = c; t.blockParams = l; t.appendContextPath = a; var v = { "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#x27;", "`": "&#x60;", "=": "&#x3D;" }, y = /[&<>"'`=]/g, p = /[&<>"'`=]/, r = Object.prototype.toString; t.toString = r; i = function (n) { return "function" == typeof n }; i(/x/) && (t.isFunction = i = function (n) { return "function" == typeof n && "[object Function]" === r.call(n) }); t.isFunction = i; u = Array.isArray || function (n) { return !(!n || "object" != typeof n) && "[object Array]" === r.call(n) }; t.isArray = u }, function (n, t, i) { "use strict"; function u(n, t) { var i = t && t.loc, s = void 0, c = void 0, o = void 0, h = void 0, l, e; for (i && (s = i.start.line, c = i.end.line, o = i.start.column, h = i.end.column, n += " - " + s + ":" + o), l = Error.prototype.constructor.call(this, n), e = 0; e < r.length; e++)this[r[e]] = l[r[e]]; Error.captureStackTrace && Error.captureStackTrace(this, u); try { i && (this.lineNumber = s, this.endLineNumber = c, f ? (Object.defineProperty(this, "column", { value: o, enumerable: !0 }), Object.defineProperty(this, "endColumn", { value: h, enumerable: !0 })) : (this.column = o, this.endColumn = h)) } catch (a) { } } var f = i(7)["default"], r; t.__esModule = !0; r = ["description", "fileName", "lineNumber", "endLineNumber", "message", "name", "number", "stack"]; u.prototype = new Error; t["default"] = u; n.exports = t["default"] }, function (n, t, i) { n.exports = { "default": i(8), __esModule: !0 } }, function (n, t, i) { var r = i(9); n.exports = function (n, t, i) { return r.setDesc(n, t, i) } }, function (n) { var t = Object; n.exports = { create: t.create, getProto: t.getPrototypeOf, isEnum: {}.propertyIsEnumerable, getDesc: t.getOwnPropertyDescriptor, setDesc: t.defineProperty, setDescs: t.defineProperties, getKeys: t.keys, getNames: t.getOwnPropertyNames, getSymbols: t.getOwnPropertySymbols, each: [].forEach } }, function (n, t, i) { "use strict"; function u(n) { o["default"](n); h["default"](n); l["default"](n); v["default"](n); p["default"](n); b["default"](n); d["default"](n) } function f(n, t, i) { n.helpers[t] && (n.hooks[t] = n.helpers[t], i || delete n.helpers[t]) } var r = i(1)["default"]; t.__esModule = !0; t.registerDefaultHelpers = u; t.moveHelperToHooks = f; var e = i(11), o = r(e), s = i(12), h = r(s), c = i(25), l = r(c), a = i(26), v = r(a), y = i(27), p = r(y), w = i(28), b = r(w), k = i(29), d = r(k) }, function (n, t, i) { "use strict"; t.__esModule = !0; var r = i(5); t["default"] = function (n) { n.registerHelper("blockHelperMissing", function (t, i) { var f = i.inverse, e = i.fn, u; return t === !0 ? e(this) : t === !1 || null == t ? f(this) : r.isArray(t) ? t.length > 0 ? (i.ids && (i.ids = [i.name]), n.helpers.each(t, i)) : f(this) : (i.data && i.ids && (u = r.createFrame(i.data), u.contextPath = r.appendContextPath(i.data.contextPath, i.name), i = { data: u }), e(t, i)) }) }; n.exports = t["default"] }, function (n, t, i) { (function (r) { "use strict"; var f = i(13)["default"], e = i(1)["default"]; t.__esModule = !0; var u = i(5), o = i(6), s = e(o); t["default"] = function (n) { n.registerHelper("each", function (n, t) { function o(t, i, r) { e && (e.key = t, e.index = i, e.first = 0 === i, e.last = !!r, h && (e.contextPath = h + t)); l += p(n[t], { data: e, blockParams: u.blockParams([n[t], t], [h + t, null]) }) } var c; if (!t) throw new s["default"]("Must pass iterator to #each"); var p = t.fn, w = t.inverse, i = 0, l = "", e = void 0, h = void 0; if (t.data && t.ids && (h = u.appendContextPath(t.data.contextPath, t.ids[0]) + "."), u.isFunction(n) && (n = n.call(this)), t.data && (e = u.createFrame(t.data)), n && "object" == typeof n) if (u.isArray(n)) for (c = n.length; i < c; i++)i in n && o(i, i, i === n.length - 1); else if (r.Symbol && n[r.Symbol.iterator]) { for (var v = [], y = n[r.Symbol.iterator](), a = y.next(); !a.done; a = y.next())v.push(a.value); for (n = v, c = n.length; i < c; i++)o(i, i, i === n.length - 1) } else !function () { var t = void 0; f(n).forEach(function (n) { void 0 !== t && o(t, i - 1); t = n; i++ }); void 0 !== t && o(t, i - 1, !0) }(); return 0 === i && (l = w(this)), l }) }; n.exports = t["default"] }).call(t, function () { return this }()) }, function (n, t, i) { n.exports = { "default": i(14), __esModule: !0 } }, function (n, t, i) { i(15); n.exports = i(21).Object.keys }, function (n, t, i) { var r = i(16); i(18)("keys", function (n) { return function (t) { return n(r(t)) } }) }, function (n, t, i) { var r = i(17); n.exports = function (n) { return Object(r(n)) } }, function (n) { n.exports = function (n) { if (void 0 == n) throw TypeError("Can't call method on " + n); return n } }, function (n, t, i) { var r = i(19), u = i(21), f = i(24); n.exports = function (n, t) { var i = (u.Object || {})[n] || Object[n], e = {}; e[n] = t(i); r(r.S + r.F * f(function () { i(1) }), "Object", e) } }, function (n, t, i) { var f = i(20), e = i(21), o = i(22), u = "prototype", r = function (n, t, i) { var s, l, h, p = n & r.F, a = n & r.G, w = n & r.S, y = n & r.P, b = n & r.B, k = n & r.W, v = a ? e : e[t] || (e[t] = {}), c = a ? f : w ? f[t] : (f[t] || {})[u]; a && (i = t); for (s in i) l = !p && c && s in c, l && s in v || (h = l ? c[s] : i[s], v[s] = a && "function" != typeof c[s] ? i[s] : b && l ? o(h, f) : k && c[s] == h ? function (n) { var t = function (t) { return this instanceof n ? new n(t) : n(t) }; return t[u] = n[u], t }(h) : y && "function" == typeof h ? o(Function.call, h) : h, y && ((v[u] || (v[u] = {}))[s] = h)) }; r.F = 1; r.G = 2; r.S = 4; r.P = 8; r.B = 16; r.W = 32; n.exports = r }, function (n) { var t = n.exports = "undefined" != typeof window && window.Math == Math ? window : "undefined" != typeof self && self.Math == Math ? self : Function("return this")(); "number" == typeof __g && (__g = t) }, function (n) { var t = n.exports = { version: "1.2.6" }; "number" == typeof __e && (__e = t) }, function (n, t, i) { var r = i(23); n.exports = function (n, t, i) { if (r(n), void 0 === t) return n; switch (i) { case 1: return function (i) { return n.call(t, i) }; case 2: return function (i, r) { return n.call(t, i, r) }; case 3: return function (i, r, u) { return n.call(t, i, r, u) } }return function () { return n.apply(t, arguments) } } }, function (n) { n.exports = function (n) { if ("function" != typeof n) throw TypeError(n + " is not a function!"); return n } }, function (n) { n.exports = function (n) { try { return !!n() } catch (t) { return !0 } } }, function (n, t, i) { "use strict"; var f = i(1)["default"], r, u; t.__esModule = !0; r = i(6); u = f(r); t["default"] = function (n) { n.registerHelper("helperMissing", function () { if (1 !== arguments.length) throw new u["default"]('Missing helper: "' + arguments[arguments.length - 1].name + '"'); }) }; n.exports = t["default"] }, function (n, t, i) { "use strict"; var f = i(1)["default"]; t.__esModule = !0; var r = i(5), e = i(6), u = f(e); t["default"] = function (n) { n.registerHelper("if", function (n, t) { if (2 != arguments.length) throw new u["default"]("#if requires exactly one argument"); return r.isFunction(n) && (n = n.call(this)), !t.hash.includeZero && !n || r.isEmpty(n) ? t.inverse(this) : t.fn(this) }); n.registerHelper("unless", function (t, i) { if (2 != arguments.length) throw new u["default"]("#unless requires exactly one argument"); return n.helpers["if"].call(this, t, { fn: i.inverse, inverse: i.fn, hash: i.hash }) }) }; n.exports = t["default"] }, function (n, t) { "use strict"; t.__esModule = !0; t["default"] = function (n) { n.registerHelper("log", function () { for (var i, r = [void 0], t = arguments[arguments.length - 1], u = 0; u < arguments.length - 1; u++)r.push(arguments[u]); i = 1; null != t.hash.level ? i = t.hash.level : t.data && null != t.data.level && (i = t.data.level); r[0] = i; n.log.apply(n, r) }) }; n.exports = t["default"] }, function (n, t) { "use strict"; t.__esModule = !0; t["default"] = function (n) { n.registerHelper("lookup", function (n, t, i) { return n ? i.lookupProperty(n, t) : n }) }; n.exports = t["default"] }, function (n, t, i) { "use strict"; var u = i(1)["default"]; t.__esModule = !0; var r = i(5), f = i(6), e = u(f); t["default"] = function (n) { n.registerHelper("with", function (n, t) { var u, i; if (2 != arguments.length) throw new e["default"]("#with requires exactly one argument"); return (r.isFunction(n) && (n = n.call(this)), u = t.fn, r.isEmpty(n)) ? t.inverse(this) : (i = t.data, t.data && t.ids && (i = r.createFrame(t.data), i.contextPath = r.appendContextPath(t.data.contextPath, t.ids[0])), u(n, { data: i, blockParams: r.blockParams([n], [i && i.contextPath]) })) }) }; n.exports = t["default"] }, function (n, t, i) { "use strict"; function f(n) { u["default"](n) } var e = i(1)["default"], r, u; t.__esModule = !0; t.registerDefaultDecorators = f; r = i(31); u = e(r) }, function (n, t, i) { "use strict"; t.__esModule = !0; var r = i(5); t["default"] = function (n) { n.registerDecorator("inline", function (n, t, i, u) { var f = n; return t.partials || (t.partials = {}, f = function (u, f) { var e = i.partials, o; return i.partials = r.extend({}, e, t.partials), o = n(u, f), i.partials = e, o }), t.partials[u.args[0]] = u.fn, f }) }; n.exports = t["default"] }, function (n, t, i) { "use strict"; t.__esModule = !0; var u = i(5), r = { methodMap: ["debug", "info", "warn", "error"], level: "info", lookupLevel: function (n) { if ("string" == typeof n) { var t = u.indexOf(r.methodMap, n.toLowerCase()); n = t >= 0 ? t : parseInt(n, 10) } return n }, log: function (n) { var t; if (n = r.lookupLevel(n), "undefined" != typeof console && r.lookupLevel(r.level) <= n) { t = r.methodMap[n]; console[t] || (t = "log"); for (var u = arguments.length, f = Array(u > 1 ? u - 1 : 0), i = 1; i < u; i++)f[i - 1] = arguments[i]; console[t].apply(console, f) } } }; t["default"] = r; n.exports = t["default"] }, function (n, t, i) { "use strict"; function o(n) { var t = u(null), i; return t.constructor = !1, t.__defineGetter__ = !1, t.__defineSetter__ = !1, t.__lookupGetter__ = !1, i = u(null), i.__proto__ = !1, { properties: { whitelist: e.createNewLookupObject(i, n.allowedProtoProperties), defaultValue: n.allowProtoPropertiesByDefault }, methods: { whitelist: e.createNewLookupObject(t, n.allowedProtoMethods), defaultValue: n.allowProtoMethodsByDefault } } } function s(n, t, i) { return "function" == typeof n ? f(t.methods, i) : f(t.properties, i) } function f(n, t) { return void 0 !== n.whitelist[t] ? n.whitelist[t] === !0 : void 0 !== n.defaultValue ? n.defaultValue : (h(t), !1) } function h(n) { r[n] !== !0 && (r[n] = !0, y.log("error", 'Handlebars: Access has been denied to resolve the property "' + n + '" because it is not an "own property" of its parent.\nYou can add a runtime option to disable the check or this warning:\nSee https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details')) } function c() { l(r).forEach(function (n) { delete r[n] }) } var u = i(34)["default"], l = i(13)["default"], a = i(3)["default"]; t.__esModule = !0; t.createProtoAccessControl = o; t.resultIsAllowed = s; t.resetLoggedProperties = c; var e = i(36), v = i(32), y = a(v), r = u(null) }, function (n, t, i) { n.exports = { "default": i(35), __esModule: !0 } }, function (n, t, i) { var r = i(9); n.exports = function (n, t) { return r.create(n, t) } }, function (n, t, i) { "use strict"; function u() { for (var t = arguments.length, i = Array(t), n = 0; n < t; n++)i[n] = arguments[n]; return r.extend.apply(void 0, [f(null)].concat(i)) } var f = i(34)["default"], r; t.__esModule = !0; t.createNewLookupObject = u; r = i(5) }, function (n, t) { "use strict"; function i(n) { this.string = n } t.__esModule = !0; i.prototype.toString = i.prototype.toHTML = function () { return "" + this.string }; t["default"] = i; n.exports = t["default"] }, function (n, t, i) { "use strict"; function l(n) { var t = n && n[0] || 1, e = f.COMPILER_REVISION, i, r; if (!(t >= f.LAST_COMPATIBLE_COMPILER_REVISION && t <= f.COMPILER_REVISION)) { if (t < f.LAST_COMPATIBLE_COMPILER_REVISION) { i = f.REVISION_CHANGES[e]; r = f.REVISION_CHANGES[t]; throw new u["default"]("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version (" + i + ") or downgrade your runtime to an older version (" + r + ")."); } throw new u["default"]("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version (" + n[1] + ")."); } } function a(n, t) { function o(i, f, e) { var c, o; if (e.hash && (f = r.extend({}, f, e.hash), e.ids && (e.ids[0] = !0)), i = t.VM.resolvePartial.call(this, i, f, e), c = r.extend({}, e, { hooks: this.hooks, protoAccessControl: this.protoAccessControl }), o = t.VM.invokePartial.call(this, i, f, c), null == o && t.compile && (e.partials[e.name] = t.compile(i, n.compilerOptions, t), o = e.partials[e.name](f, c)), null != o) { if (e.indent) { for (var h = o.split("\n"), s = 0, l = h.length; s < l && (h[s] || s + 1 !== l); s++)h[s] = e.indent + h[s]; o = h.join("\n") } return o } throw new u["default"]("The partial " + e.name + " could not be compiled when running in runtime-only mode"); } function f(t) { function h(t) { return "" + n.main(i, t, i.helpers, i.partials, u, o, e) } var r = arguments.length <= 1 || void 0 === arguments[1] ? {} : arguments[1], u = r.data, e, o; return f._setup(r), !r.partial && n.useData && (u = p(t, u)), e = void 0, o = n.useBlockParams ? [] : void 0, n.useDepths && (e = r.depths ? t != r.depths[0] ? [t].concat(r.depths) : r.depths : [t]), (h = s(n.main, h, i, r.depths || [], u, o))(t, r) } if (!t) throw new u["default"]("No environment passed to template"); if (!n || !n.main) throw new u["default"]("Unknown template object: " + typeof n); n.main.decorator = n.main_d; t.VM.checkRevision(n.compiler); var l = n.compiler && 7 === n.compiler[0], i = { strict: function (n, t, i) { if (!(n && t in n)) throw new u["default"]('"' + t + '" not defined in ' + n, { loc: i }); return n[t] }, lookupProperty: function (n, t) { var r = n[t]; return null == r ? r : Object.prototype.hasOwnProperty.call(n, t) ? r : c.resultIsAllowed(r, i.protoAccessControl, t) ? r : void 0 }, lookup: function (n, t) { for (var f, u = n.length, r = 0; r < u; r++)if (f = n[r] && i.lookupProperty(n[r], t), null != f) return n[r][t] }, lambda: function (n, t) { return "function" == typeof n ? n.call(t) : n }, escapeExpression: r.escapeExpression, invokePartial: o, fn: function (t) { var i = n[t]; return i.decorator = n[t + "_d"], i }, programs: [], program: function (n, t, i, r, u) { var f = this.programs[n], o = this.fn(n); return t || u || r || i ? f = e(this, n, o, t, i, r, u) : f || (f = this.programs[n] = e(this, n, o)), f }, data: function (n, t) { for (; n && t--;)n = n._parent; return n }, mergeIfNeeded: function (n, t) { var i = n || t; return n && t && n !== t && (i = r.extend({}, t, n)), i }, nullContext: k({}), noop: t.VM.noop, compilerInfo: n.compiler }; return f.isTop = !0, f._setup = function (u) { var f, e; u.partial ? (i.protoAccessControl = u.protoAccessControl, i.helpers = u.helpers, i.partials = u.partials, i.decorators = u.decorators, i.hooks = u.hooks) : (f = r.extend({}, t.helpers, u.helpers), w(f, i), i.helpers = f, n.usePartial && (i.partials = i.mergeIfNeeded(u.partials, t.partials)), (n.usePartial || n.useDecorators) && (i.decorators = r.extend({}, t.decorators, u.decorators)), i.hooks = {}, i.protoAccessControl = c.createProtoAccessControl(u), e = u.allowCallsToHelperMissing || l, h.moveHelperToHooks(i, "helperMissing", e), h.moveHelperToHooks(i, "blockHelperMissing", e)) }, f._child = function (t, r, f, o) { if (n.useBlockParams && !f) throw new u["default"]("must pass block params"); if (n.useDepths && !o) throw new u["default"]("must pass parent depths"); return e(i, t, n[t], r, 0, f, o) }, f } function e(n, t, i, r, u, f, e) { function o(t) { var u = arguments.length <= 1 || void 0 === arguments[1] ? {} : arguments[1], o = e; return !e || t == e[0] || t === n.nullContext && null === e[0] || (o = [t].concat(e)), i(n, t, n.helpers, n.partials, u.data || r, f && [u.blockParams].concat(f), o) } return o = s(i, o, n, e, r, f), o.program = t, o.depth = e ? e.length : 0, o.blockParams = u || 0, o } function v(n, t, i) { return n ? n.call || i.name || (i.name = n, n = i.partials[n]) : n = "@partial-block" === i.name ? i.data["partial-block"] : i.partials[i.name], n } function y(n, t, i) { var s = i.data && i.data["partial-block"], e; if (i.partial = !0, i.ids && (i.data.contextPath = i.ids[0] || i.data.contextPath), e = void 0, i.fn && i.fn !== o && !function () { i.data = f.createFrame(i.data); var n = i.fn; e = i.data["partial-block"] = function (t) { var i = arguments.length <= 1 || void 0 === arguments[1] ? {} : arguments[1]; return i.data = f.createFrame(i.data), i.data["partial-block"] = s, n(t, i) }; n.partials && (i.partials = r.extend({}, i.partials, n.partials)) }(), void 0 === n && e && (n = e), void 0 === n) throw new u["default"]("The partial " + i.name + " could not be found"); if (n instanceof Function) return n(t, i) } function o() { return "" } function p(n, t) { return t && "root" in t || (t = t ? f.createFrame(t) : {}, t.root = n), t } function s(n, t, i, u, f, e) { if (n.decorator) { var o = {}; t = n.decorator(t, o, i, u && u[0], f, e, u); r.extend(t, o) } return t } function w(n, t) { d(n).forEach(function (i) { var r = n[i]; n[i] = b(r, t) }) } function b(n, t) { var i = t.lookupProperty; return rt.wrapHelper(n, function (n) { return r.extend({ lookupProperty: i }, n) }) } var k = i(39)["default"], d = i(13)["default"], g = i(3)["default"], nt = i(1)["default"]; t.__esModule = !0; t.checkRevision = l; t.template = a; t.wrapProgram = e; t.resolvePartial = v; t.invokePartial = y; t.noop = o; var tt = i(5), r = g(tt), it = i(6), u = nt(it), f = i(4), h = i(10), rt = i(43), c = i(33) }, function (n, t, i) { n.exports = { "default": i(40), __esModule: !0 } }, function (n, t, i) { i(41); n.exports = i(21).Object.seal }, function (n, t, i) { var r = i(42); i(18)("seal", function (n) { return function (t) { return n && r(t) ? n(t) : t } }) }, function (n) { n.exports = function (n) { return "object" == typeof n ? null !== n : "function" == typeof n } }, function (n, t) { "use strict"; function i(n, t) { if ("function" != typeof n) return n; return function () { var i = arguments[arguments.length - 1]; return arguments[arguments.length - 1] = t(i), n.apply(this, arguments) } } t.__esModule = !0; t.wrapHelper = i }, function (n, t) { (function (i) { "use strict"; t.__esModule = !0; t["default"] = function (n) { var t = "undefined" != typeof i ? i : window, r = t.Handlebars; n.noConflict = function () { return t.Handlebars === n && (t.Handlebars = r), n } }; n.exports = t["default"] }).call(t, function () { return this }()) }, function (n, t) { "use strict"; t.__esModule = !0; var i = { helpers: { helperExpression: function (n) { return "SubExpression" === n.type || ("MustacheStatement" === n.type || "BlockStatement" === n.type) && !!(n.params && n.params.length || n.hash) }, scopedId: function (n) { return /^\.|this\b/.test(n.original) }, simpleId: function (n) { return 1 === n.parts.length && !i.helpers.scopedId(n) && !n.depth } } }; t["default"] = i; n.exports = t["default"] }, function (n, t, i) { "use strict"; function f(n, t) { if ("Program" === n.type) return n; u["default"].yy = r; r.locInfo = function (n) { return new r.SourceLocation(t && t.srcName, n) }; return u["default"].parse(n) } function o(n, t) { var i = f(n, t), r = new l["default"](t); return r.accept(i) } var e = i(1)["default"], s = i(3)["default"], r; t.__esModule = !0; t.parseWithoutProcessing = f; t.parse = o; var h = i(47), u = e(h), c = i(48), l = e(c), a = i(50), v = s(a), y = i(5); t.parser = u["default"]; r = {}; y.extend(r, v) }, function (n, t) { "use strict"; t.__esModule = !0; var i = function () { function n() { this.yy = {} } var t = { trace: function () { }, yy: {}, symbols_: { error: 2, root: 3, program: 4, EOF: 5, program_repetition0: 6, statement: 7, mustache: 8, block: 9, rawBlock: 10, partial: 11, partialBlock: 12, content: 13, COMMENT: 14, CONTENT: 15, openRawBlock: 16, rawBlock_repetition0: 17, END_RAW_BLOCK: 18, OPEN_RAW_BLOCK: 19, helperName: 20, openRawBlock_repetition0: 21, openRawBlock_option0: 22, CLOSE_RAW_BLOCK: 23, openBlock: 24, block_option0: 25, closeBlock: 26, openInverse: 27, block_option1: 28, OPEN_BLOCK: 29, openBlock_repetition0: 30, openBlock_option0: 31, openBlock_option1: 32, CLOSE: 33, OPEN_INVERSE: 34, openInverse_repetition0: 35, openInverse_option0: 36, openInverse_option1: 37, openInverseChain: 38, OPEN_INVERSE_CHAIN: 39, openInverseChain_repetition0: 40, openInverseChain_option0: 41, openInverseChain_option1: 42, inverseAndProgram: 43, INVERSE: 44, inverseChain: 45, inverseChain_option0: 46, OPEN_ENDBLOCK: 47, OPEN: 48, mustache_repetition0: 49, mustache_option0: 50, OPEN_UNESCAPED: 51, mustache_repetition1: 52, mustache_option1: 53, CLOSE_UNESCAPED: 54, OPEN_PARTIAL: 55, partialName: 56, partial_repetition0: 57, partial_option0: 58, openPartialBlock: 59, OPEN_PARTIAL_BLOCK: 60, openPartialBlock_repetition0: 61, openPartialBlock_option0: 62, param: 63, sexpr: 64, OPEN_SEXPR: 65, sexpr_repetition0: 66, sexpr_option0: 67, CLOSE_SEXPR: 68, hash: 69, hash_repetition_plus0: 70, hashSegment: 71, ID: 72, EQUALS: 73, blockParams: 74, OPEN_BLOCK_PARAMS: 75, blockParams_repetition_plus0: 76, CLOSE_BLOCK_PARAMS: 77, path: 78, dataName: 79, STRING: 80, NUMBER: 81, BOOLEAN: 82, UNDEFINED: 83, NULL: 84, DATA: 85, pathSegments: 86, SEP: 87, $accept: 0, $end: 1 }, terminals_: { 2: "error", 5: "EOF", 14: "COMMENT", 15: "CONTENT", 18: "END_RAW_BLOCK", 19: "OPEN_RAW_BLOCK", 23: "CLOSE_RAW_BLOCK", 29: "OPEN_BLOCK", 33: "CLOSE", 34: "OPEN_INVERSE", 39: "OPEN_INVERSE_CHAIN", 44: "INVERSE", 47: "OPEN_ENDBLOCK", 48: "OPEN", 51: "OPEN_UNESCAPED", 54: "CLOSE_UNESCAPED", 55: "OPEN_PARTIAL", 60: "OPEN_PARTIAL_BLOCK", 65: "OPEN_SEXPR", 68: "CLOSE_SEXPR", 72: "ID", 73: "EQUALS", 75: "OPEN_BLOCK_PARAMS", 77: "CLOSE_BLOCK_PARAMS", 80: "STRING", 81: "NUMBER", 82: "BOOLEAN", 83: "UNDEFINED", 84: "NULL", 85: "DATA", 87: "SEP" }, productions_: [0, [3, 2], [4, 1], [7, 1], [7, 1], [7, 1], [7, 1], [7, 1], [7, 1], [7, 1], [13, 1], [10, 3], [16, 5], [9, 4], [9, 4], [24, 6], [27, 6], [38, 6], [43, 2], [45, 3], [45, 1], [26, 3], [8, 5], [8, 5], [11, 5], [12, 3], [59, 5], [63, 1], [63, 1], [64, 5], [69, 1], [71, 3], [74, 3], [20, 1], [20, 1], [20, 1], [20, 1], [20, 1], [20, 1], [20, 1], [56, 1], [56, 1], [79, 2], [78, 1], [86, 3], [86, 1], [6, 0], [6, 2], [17, 0], [17, 2], [21, 0], [21, 2], [22, 0], [22, 1], [25, 0], [25, 1], [28, 0], [28, 1], [30, 0], [30, 2], [31, 0], [31, 1], [32, 0], [32, 1], [35, 0], [35, 2], [36, 0], [36, 1], [37, 0], [37, 1], [40, 0], [40, 2], [41, 0], [41, 1], [42, 0], [42, 1], [46, 0], [46, 1], [49, 0], [49, 2], [50, 0], [50, 1], [52, 0], [52, 2], [53, 0], [53, 1], [57, 0], [57, 2], [58, 0], [58, 1], [61, 0], [61, 2], [62, 0], [62, 1], [66, 0], [66, 2], [67, 0], [67, 1], [70, 1], [70, 2], [76, 1], [76, 2]], performAction: function (n, t, i, r, u, f) { var e = f.length - 1, s, o; switch (u) { case 1: return f[e - 1]; case 2: this.$ = r.prepareProgram(f[e]); break; case 3: this.$ = f[e]; break; case 4: this.$ = f[e]; break; case 5: this.$ = f[e]; break; case 6: this.$ = f[e]; break; case 7: this.$ = f[e]; break; case 8: this.$ = f[e]; break; case 9: this.$ = { type: "CommentStatement", value: r.stripComment(f[e]), strip: r.stripFlags(f[e], f[e]), loc: r.locInfo(this._$) }; break; case 10: this.$ = { type: "ContentStatement", original: f[e], value: f[e], loc: r.locInfo(this._$) }; break; case 11: this.$ = r.prepareRawBlock(f[e - 2], f[e - 1], f[e], this._$); break; case 12: this.$ = { path: f[e - 3], params: f[e - 2], hash: f[e - 1] }; break; case 13: this.$ = r.prepareBlock(f[e - 3], f[e - 2], f[e - 1], f[e], !1, this._$); break; case 14: this.$ = r.prepareBlock(f[e - 3], f[e - 2], f[e - 1], f[e], !0, this._$); break; case 15: this.$ = { open: f[e - 5], path: f[e - 4], params: f[e - 3], hash: f[e - 2], blockParams: f[e - 1], strip: r.stripFlags(f[e - 5], f[e]) }; break; case 16: this.$ = { path: f[e - 4], params: f[e - 3], hash: f[e - 2], blockParams: f[e - 1], strip: r.stripFlags(f[e - 5], f[e]) }; break; case 17: this.$ = { path: f[e - 4], params: f[e - 3], hash: f[e - 2], blockParams: f[e - 1], strip: r.stripFlags(f[e - 5], f[e]) }; break; case 18: this.$ = { strip: r.stripFlags(f[e - 1], f[e - 1]), program: f[e] }; break; case 19: s = r.prepareBlock(f[e - 2], f[e - 1], f[e], f[e], !1, this._$); o = r.prepareProgram([s], f[e - 1].loc); o.chained = !0; this.$ = { strip: f[e - 2].strip, program: o, chain: !0 }; break; case 20: this.$ = f[e]; break; case 21: this.$ = { path: f[e - 1], strip: r.stripFlags(f[e - 2], f[e]) }; break; case 22: this.$ = r.prepareMustache(f[e - 3], f[e - 2], f[e - 1], f[e - 4], r.stripFlags(f[e - 4], f[e]), this._$); break; case 23: this.$ = r.prepareMustache(f[e - 3], f[e - 2], f[e - 1], f[e - 4], r.stripFlags(f[e - 4], f[e]), this._$); break; case 24: this.$ = { type: "PartialStatement", name: f[e - 3], params: f[e - 2], hash: f[e - 1], indent: "", strip: r.stripFlags(f[e - 4], f[e]), loc: r.locInfo(this._$) }; break; case 25: this.$ = r.preparePartialBlock(f[e - 2], f[e - 1], f[e], this._$); break; case 26: this.$ = { path: f[e - 3], params: f[e - 2], hash: f[e - 1], strip: r.stripFlags(f[e - 4], f[e]) }; break; case 27: this.$ = f[e]; break; case 28: this.$ = f[e]; break; case 29: this.$ = { type: "SubExpression", path: f[e - 3], params: f[e - 2], hash: f[e - 1], loc: r.locInfo(this._$) }; break; case 30: this.$ = { type: "Hash", pairs: f[e], loc: r.locInfo(this._$) }; break; case 31: this.$ = { type: "HashPair", key: r.id(f[e - 2]), value: f[e], loc: r.locInfo(this._$) }; break; case 32: this.$ = r.id(f[e - 1]); break; case 33: this.$ = f[e]; break; case 34: this.$ = f[e]; break; case 35: this.$ = { type: "StringLiteral", value: f[e], original: f[e], loc: r.locInfo(this._$) }; break; case 36: this.$ = { type: "NumberLiteral", value: Number(f[e]), original: Number(f[e]), loc: r.locInfo(this._$) }; break; case 37: this.$ = { type: "BooleanLiteral", value: "true" === f[e], original: "true" === f[e], loc: r.locInfo(this._$) }; break; case 38: this.$ = { type: "UndefinedLiteral", original: void 0, value: void 0, loc: r.locInfo(this._$) }; break; case 39: this.$ = { type: "NullLiteral", original: null, value: null, loc: r.locInfo(this._$) }; break; case 40: this.$ = f[e]; break; case 41: this.$ = f[e]; break; case 42: this.$ = r.preparePath(!0, f[e], this._$); break; case 43: this.$ = r.preparePath(!1, f[e], this._$); break; case 44: f[e - 2].push({ part: r.id(f[e]), original: f[e], separator: f[e - 1] }); this.$ = f[e - 2]; break; case 45: this.$ = [{ part: r.id(f[e]), original: f[e] }]; break; case 46: this.$ = []; break; case 47: f[e - 1].push(f[e]); break; case 48: this.$ = []; break; case 49: f[e - 1].push(f[e]); break; case 50: this.$ = []; break; case 51: f[e - 1].push(f[e]); break; case 58: this.$ = []; break; case 59: f[e - 1].push(f[e]); break; case 64: this.$ = []; break; case 65: f[e - 1].push(f[e]); break; case 70: this.$ = []; break; case 71: f[e - 1].push(f[e]); break; case 78: this.$ = []; break; case 79: f[e - 1].push(f[e]); break; case 82: this.$ = []; break; case 83: f[e - 1].push(f[e]); break; case 86: this.$ = []; break; case 87: f[e - 1].push(f[e]); break; case 90: this.$ = []; break; case 91: f[e - 1].push(f[e]); break; case 94: this.$ = []; break; case 95: f[e - 1].push(f[e]); break; case 98: this.$ = [f[e]]; break; case 99: f[e - 1].push(f[e]); break; case 100: this.$ = [f[e]]; break; case 101: f[e - 1].push(f[e]) } }, table: [{ 3: 1, 4: 2, 5: [2, 46], 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 1: [3] }, { 5: [1, 4] }, { 5: [2, 2], 7: 5, 8: 6, 9: 7, 10: 8, 11: 9, 12: 10, 13: 11, 14: [1, 12], 15: [1, 20], 16: 17, 19: [1, 23], 24: 15, 27: 16, 29: [1, 21], 34: [1, 22], 39: [2, 2], 44: [2, 2], 47: [2, 2], 48: [1, 13], 51: [1, 14], 55: [1, 18], 59: 19, 60: [1, 24] }, { 1: [2, 1] }, { 5: [2, 47], 14: [2, 47], 15: [2, 47], 19: [2, 47], 29: [2, 47], 34: [2, 47], 39: [2, 47], 44: [2, 47], 47: [2, 47], 48: [2, 47], 51: [2, 47], 55: [2, 47], 60: [2, 47] }, { 5: [2, 3], 14: [2, 3], 15: [2, 3], 19: [2, 3], 29: [2, 3], 34: [2, 3], 39: [2, 3], 44: [2, 3], 47: [2, 3], 48: [2, 3], 51: [2, 3], 55: [2, 3], 60: [2, 3] }, { 5: [2, 4], 14: [2, 4], 15: [2, 4], 19: [2, 4], 29: [2, 4], 34: [2, 4], 39: [2, 4], 44: [2, 4], 47: [2, 4], 48: [2, 4], 51: [2, 4], 55: [2, 4], 60: [2, 4] }, { 5: [2, 5], 14: [2, 5], 15: [2, 5], 19: [2, 5], 29: [2, 5], 34: [2, 5], 39: [2, 5], 44: [2, 5], 47: [2, 5], 48: [2, 5], 51: [2, 5], 55: [2, 5], 60: [2, 5] }, { 5: [2, 6], 14: [2, 6], 15: [2, 6], 19: [2, 6], 29: [2, 6], 34: [2, 6], 39: [2, 6], 44: [2, 6], 47: [2, 6], 48: [2, 6], 51: [2, 6], 55: [2, 6], 60: [2, 6] }, { 5: [2, 7], 14: [2, 7], 15: [2, 7], 19: [2, 7], 29: [2, 7], 34: [2, 7], 39: [2, 7], 44: [2, 7], 47: [2, 7], 48: [2, 7], 51: [2, 7], 55: [2, 7], 60: [2, 7] }, { 5: [2, 8], 14: [2, 8], 15: [2, 8], 19: [2, 8], 29: [2, 8], 34: [2, 8], 39: [2, 8], 44: [2, 8], 47: [2, 8], 48: [2, 8], 51: [2, 8], 55: [2, 8], 60: [2, 8] }, { 5: [2, 9], 14: [2, 9], 15: [2, 9], 19: [2, 9], 29: [2, 9], 34: [2, 9], 39: [2, 9], 44: [2, 9], 47: [2, 9], 48: [2, 9], 51: [2, 9], 55: [2, 9], 60: [2, 9] }, { 20: 25, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 36, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 4: 37, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 39: [2, 46], 44: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 4: 38, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 44: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 15: [2, 48], 17: 39, 18: [2, 48] }, { 20: 41, 56: 40, 64: 42, 65: [1, 43], 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 4: 44, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 5: [2, 10], 14: [2, 10], 15: [2, 10], 18: [2, 10], 19: [2, 10], 29: [2, 10], 34: [2, 10], 39: [2, 10], 44: [2, 10], 47: [2, 10], 48: [2, 10], 51: [2, 10], 55: [2, 10], 60: [2, 10] }, { 20: 45, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 46, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 47, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 41, 56: 48, 64: 42, 65: [1, 43], 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 33: [2, 78], 49: 49, 65: [2, 78], 72: [2, 78], 80: [2, 78], 81: [2, 78], 82: [2, 78], 83: [2, 78], 84: [2, 78], 85: [2, 78] }, { 23: [2, 33], 33: [2, 33], 54: [2, 33], 65: [2, 33], 68: [2, 33], 72: [2, 33], 75: [2, 33], 80: [2, 33], 81: [2, 33], 82: [2, 33], 83: [2, 33], 84: [2, 33], 85: [2, 33] }, { 23: [2, 34], 33: [2, 34], 54: [2, 34], 65: [2, 34], 68: [2, 34], 72: [2, 34], 75: [2, 34], 80: [2, 34], 81: [2, 34], 82: [2, 34], 83: [2, 34], 84: [2, 34], 85: [2, 34] }, { 23: [2, 35], 33: [2, 35], 54: [2, 35], 65: [2, 35], 68: [2, 35], 72: [2, 35], 75: [2, 35], 80: [2, 35], 81: [2, 35], 82: [2, 35], 83: [2, 35], 84: [2, 35], 85: [2, 35] }, { 23: [2, 36], 33: [2, 36], 54: [2, 36], 65: [2, 36], 68: [2, 36], 72: [2, 36], 75: [2, 36], 80: [2, 36], 81: [2, 36], 82: [2, 36], 83: [2, 36], 84: [2, 36], 85: [2, 36] }, { 23: [2, 37], 33: [2, 37], 54: [2, 37], 65: [2, 37], 68: [2, 37], 72: [2, 37], 75: [2, 37], 80: [2, 37], 81: [2, 37], 82: [2, 37], 83: [2, 37], 84: [2, 37], 85: [2, 37] }, { 23: [2, 38], 33: [2, 38], 54: [2, 38], 65: [2, 38], 68: [2, 38], 72: [2, 38], 75: [2, 38], 80: [2, 38], 81: [2, 38], 82: [2, 38], 83: [2, 38], 84: [2, 38], 85: [2, 38] }, { 23: [2, 39], 33: [2, 39], 54: [2, 39], 65: [2, 39], 68: [2, 39], 72: [2, 39], 75: [2, 39], 80: [2, 39], 81: [2, 39], 82: [2, 39], 83: [2, 39], 84: [2, 39], 85: [2, 39] }, { 23: [2, 43], 33: [2, 43], 54: [2, 43], 65: [2, 43], 68: [2, 43], 72: [2, 43], 75: [2, 43], 80: [2, 43], 81: [2, 43], 82: [2, 43], 83: [2, 43], 84: [2, 43], 85: [2, 43], 87: [1, 50] }, { 72: [1, 35], 86: 51 }, { 23: [2, 45], 33: [2, 45], 54: [2, 45], 65: [2, 45], 68: [2, 45], 72: [2, 45], 75: [2, 45], 80: [2, 45], 81: [2, 45], 82: [2, 45], 83: [2, 45], 84: [2, 45], 85: [2, 45], 87: [2, 45] }, { 52: 52, 54: [2, 82], 65: [2, 82], 72: [2, 82], 80: [2, 82], 81: [2, 82], 82: [2, 82], 83: [2, 82], 84: [2, 82], 85: [2, 82] }, { 25: 53, 38: 55, 39: [1, 57], 43: 56, 44: [1, 58], 45: 54, 47: [2, 54] }, { 28: 59, 43: 60, 44: [1, 58], 47: [2, 56] }, { 13: 62, 15: [1, 20], 18: [1, 61] }, { 33: [2, 86], 57: 63, 65: [2, 86], 72: [2, 86], 80: [2, 86], 81: [2, 86], 82: [2, 86], 83: [2, 86], 84: [2, 86], 85: [2, 86] }, { 33: [2, 40], 65: [2, 40], 72: [2, 40], 80: [2, 40], 81: [2, 40], 82: [2, 40], 83: [2, 40], 84: [2, 40], 85: [2, 40] }, { 33: [2, 41], 65: [2, 41], 72: [2, 41], 80: [2, 41], 81: [2, 41], 82: [2, 41], 83: [2, 41], 84: [2, 41], 85: [2, 41] }, { 20: 64, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 26: 65, 47: [1, 66] }, { 30: 67, 33: [2, 58], 65: [2, 58], 72: [2, 58], 75: [2, 58], 80: [2, 58], 81: [2, 58], 82: [2, 58], 83: [2, 58], 84: [2, 58], 85: [2, 58] }, { 33: [2, 64], 35: 68, 65: [2, 64], 72: [2, 64], 75: [2, 64], 80: [2, 64], 81: [2, 64], 82: [2, 64], 83: [2, 64], 84: [2, 64], 85: [2, 64] }, { 21: 69, 23: [2, 50], 65: [2, 50], 72: [2, 50], 80: [2, 50], 81: [2, 50], 82: [2, 50], 83: [2, 50], 84: [2, 50], 85: [2, 50] }, { 33: [2, 90], 61: 70, 65: [2, 90], 72: [2, 90], 80: [2, 90], 81: [2, 90], 82: [2, 90], 83: [2, 90], 84: [2, 90], 85: [2, 90] }, { 20: 74, 33: [2, 80], 50: 71, 63: 72, 64: 75, 65: [1, 43], 69: 73, 70: 76, 71: 77, 72: [1, 78], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 72: [1, 79] }, { 23: [2, 42], 33: [2, 42], 54: [2, 42], 65: [2, 42], 68: [2, 42], 72: [2, 42], 75: [2, 42], 80: [2, 42], 81: [2, 42], 82: [2, 42], 83: [2, 42], 84: [2, 42], 85: [2, 42], 87: [1, 50] }, { 20: 74, 53: 80, 54: [2, 84], 63: 81, 64: 75, 65: [1, 43], 69: 82, 70: 76, 71: 77, 72: [1, 78], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 26: 83, 47: [1, 66] }, { 47: [2, 55] }, { 4: 84, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 39: [2, 46], 44: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 47: [2, 20] }, { 20: 85, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 4: 86, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 26: 87, 47: [1, 66] }, { 47: [2, 57] }, { 5: [2, 11], 14: [2, 11], 15: [2, 11], 19: [2, 11], 29: [2, 11], 34: [2, 11], 39: [2, 11], 44: [2, 11], 47: [2, 11], 48: [2, 11], 51: [2, 11], 55: [2, 11], 60: [2, 11] }, { 15: [2, 49], 18: [2, 49] }, { 20: 74, 33: [2, 88], 58: 88, 63: 89, 64: 75, 65: [1, 43], 69: 90, 70: 76, 71: 77, 72: [1, 78], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 65: [2, 94], 66: 91, 68: [2, 94], 72: [2, 94], 80: [2, 94], 81: [2, 94], 82: [2, 94], 83: [2, 94], 84: [2, 94], 85: [2, 94] }, { 5: [2, 25], 14: [2, 25], 15: [2, 25], 19: [2, 25], 29: [2, 25], 34: [2, 25], 39: [2, 25], 44: [2, 25], 47: [2, 25], 48: [2, 25], 51: [2, 25], 55: [2, 25], 60: [2, 25] }, { 20: 92, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 74, 31: 93, 33: [2, 60], 63: 94, 64: 75, 65: [1, 43], 69: 95, 70: 76, 71: 77, 72: [1, 78], 75: [2, 60], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 74, 33: [2, 66], 36: 96, 63: 97, 64: 75, 65: [1, 43], 69: 98, 70: 76, 71: 77, 72: [1, 78], 75: [2, 66], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 74, 22: 99, 23: [2, 52], 63: 100, 64: 75, 65: [1, 43], 69: 101, 70: 76, 71: 77, 72: [1, 78], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 74, 33: [2, 92], 62: 102, 63: 103, 64: 75, 65: [1, 43], 69: 104, 70: 76, 71: 77, 72: [1, 78], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 33: [1, 105] }, { 33: [2, 79], 65: [2, 79], 72: [2, 79], 80: [2, 79], 81: [2, 79], 82: [2, 79], 83: [2, 79], 84: [2, 79], 85: [2, 79] }, { 33: [2, 81] }, { 23: [2, 27], 33: [2, 27], 54: [2, 27], 65: [2, 27], 68: [2, 27], 72: [2, 27], 75: [2, 27], 80: [2, 27], 81: [2, 27], 82: [2, 27], 83: [2, 27], 84: [2, 27], 85: [2, 27] }, { 23: [2, 28], 33: [2, 28], 54: [2, 28], 65: [2, 28], 68: [2, 28], 72: [2, 28], 75: [2, 28], 80: [2, 28], 81: [2, 28], 82: [2, 28], 83: [2, 28], 84: [2, 28], 85: [2, 28] }, { 23: [2, 30], 33: [2, 30], 54: [2, 30], 68: [2, 30], 71: 106, 72: [1, 107], 75: [2, 30] }, { 23: [2, 98], 33: [2, 98], 54: [2, 98], 68: [2, 98], 72: [2, 98], 75: [2, 98] }, { 23: [2, 45], 33: [2, 45], 54: [2, 45], 65: [2, 45], 68: [2, 45], 72: [2, 45], 73: [1, 108], 75: [2, 45], 80: [2, 45], 81: [2, 45], 82: [2, 45], 83: [2, 45], 84: [2, 45], 85: [2, 45], 87: [2, 45] }, { 23: [2, 44], 33: [2, 44], 54: [2, 44], 65: [2, 44], 68: [2, 44], 72: [2, 44], 75: [2, 44], 80: [2, 44], 81: [2, 44], 82: [2, 44], 83: [2, 44], 84: [2, 44], 85: [2, 44], 87: [2, 44] }, { 54: [1, 109] }, { 54: [2, 83], 65: [2, 83], 72: [2, 83], 80: [2, 83], 81: [2, 83], 82: [2, 83], 83: [2, 83], 84: [2, 83], 85: [2, 83] }, { 54: [2, 85] }, { 5: [2, 13], 14: [2, 13], 15: [2, 13], 19: [2, 13], 29: [2, 13], 34: [2, 13], 39: [2, 13], 44: [2, 13], 47: [2, 13], 48: [2, 13], 51: [2, 13], 55: [2, 13], 60: [2, 13] }, { 38: 55, 39: [1, 57], 43: 56, 44: [1, 58], 45: 111, 46: 110, 47: [2, 76] }, { 33: [2, 70], 40: 112, 65: [2, 70], 72: [2, 70], 75: [2, 70], 80: [2, 70], 81: [2, 70], 82: [2, 70], 83: [2, 70], 84: [2, 70], 85: [2, 70] }, { 47: [2, 18] }, { 5: [2, 14], 14: [2, 14], 15: [2, 14], 19: [2, 14], 29: [2, 14], 34: [2, 14], 39: [2, 14], 44: [2, 14], 47: [2, 14], 48: [2, 14], 51: [2, 14], 55: [2, 14], 60: [2, 14] }, { 33: [1, 113] }, { 33: [2, 87], 65: [2, 87], 72: [2, 87], 80: [2, 87], 81: [2, 87], 82: [2, 87], 83: [2, 87], 84: [2, 87], 85: [2, 87] }, { 33: [2, 89] }, { 20: 74, 63: 115, 64: 75, 65: [1, 43], 67: 114, 68: [2, 96], 69: 116, 70: 76, 71: 77, 72: [1, 78], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 33: [1, 117] }, { 32: 118, 33: [2, 62], 74: 119, 75: [1, 120] }, { 33: [2, 59], 65: [2, 59], 72: [2, 59], 75: [2, 59], 80: [2, 59], 81: [2, 59], 82: [2, 59], 83: [2, 59], 84: [2, 59], 85: [2, 59] }, { 33: [2, 61], 75: [2, 61] }, { 33: [2, 68], 37: 121, 74: 122, 75: [1, 120] }, { 33: [2, 65], 65: [2, 65], 72: [2, 65], 75: [2, 65], 80: [2, 65], 81: [2, 65], 82: [2, 65], 83: [2, 65], 84: [2, 65], 85: [2, 65] }, { 33: [2, 67], 75: [2, 67] }, { 23: [1, 123] }, { 23: [2, 51], 65: [2, 51], 72: [2, 51], 80: [2, 51], 81: [2, 51], 82: [2, 51], 83: [2, 51], 84: [2, 51], 85: [2, 51] }, { 23: [2, 53] }, { 33: [1, 124] }, { 33: [2, 91], 65: [2, 91], 72: [2, 91], 80: [2, 91], 81: [2, 91], 82: [2, 91], 83: [2, 91], 84: [2, 91], 85: [2, 91] }, { 33: [2, 93] }, { 5: [2, 22], 14: [2, 22], 15: [2, 22], 19: [2, 22], 29: [2, 22], 34: [2, 22], 39: [2, 22], 44: [2, 22], 47: [2, 22], 48: [2, 22], 51: [2, 22], 55: [2, 22], 60: [2, 22] }, { 23: [2, 99], 33: [2, 99], 54: [2, 99], 68: [2, 99], 72: [2, 99], 75: [2, 99] }, { 73: [1, 108] }, { 20: 74, 63: 125, 64: 75, 65: [1, 43], 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 5: [2, 23], 14: [2, 23], 15: [2, 23], 19: [2, 23], 29: [2, 23], 34: [2, 23], 39: [2, 23], 44: [2, 23], 47: [2, 23], 48: [2, 23], 51: [2, 23], 55: [2, 23], 60: [2, 23] }, { 47: [2, 19] }, { 47: [2, 77] }, { 20: 74, 33: [2, 72], 41: 126, 63: 127, 64: 75, 65: [1, 43], 69: 128, 70: 76, 71: 77, 72: [1, 78], 75: [2, 72], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 5: [2, 24], 14: [2, 24], 15: [2, 24], 19: [2, 24], 29: [2, 24], 34: [2, 24], 39: [2, 24], 44: [2, 24], 47: [2, 24], 48: [2, 24], 51: [2, 24], 55: [2, 24], 60: [2, 24] }, { 68: [1, 129] }, { 65: [2, 95], 68: [2, 95], 72: [2, 95], 80: [2, 95], 81: [2, 95], 82: [2, 95], 83: [2, 95], 84: [2, 95], 85: [2, 95] }, { 68: [2, 97] }, { 5: [2, 21], 14: [2, 21], 15: [2, 21], 19: [2, 21], 29: [2, 21], 34: [2, 21], 39: [2, 21], 44: [2, 21], 47: [2, 21], 48: [2, 21], 51: [2, 21], 55: [2, 21], 60: [2, 21] }, { 33: [1, 130] }, { 33: [2, 63] }, { 72: [1, 132], 76: 131 }, { 33: [1, 133] }, { 33: [2, 69] }, { 15: [2, 12], 18: [2, 12] }, { 14: [2, 26], 15: [2, 26], 19: [2, 26], 29: [2, 26], 34: [2, 26], 47: [2, 26], 48: [2, 26], 51: [2, 26], 55: [2, 26], 60: [2, 26] }, { 23: [2, 31], 33: [2, 31], 54: [2, 31], 68: [2, 31], 72: [2, 31], 75: [2, 31] }, { 33: [2, 74], 42: 134, 74: 135, 75: [1, 120] }, { 33: [2, 71], 65: [2, 71], 72: [2, 71], 75: [2, 71], 80: [2, 71], 81: [2, 71], 82: [2, 71], 83: [2, 71], 84: [2, 71], 85: [2, 71] }, { 33: [2, 73], 75: [2, 73] }, { 23: [2, 29], 33: [2, 29], 54: [2, 29], 65: [2, 29], 68: [2, 29], 72: [2, 29], 75: [2, 29], 80: [2, 29], 81: [2, 29], 82: [2, 29], 83: [2, 29], 84: [2, 29], 85: [2, 29] }, { 14: [2, 15], 15: [2, 15], 19: [2, 15], 29: [2, 15], 34: [2, 15], 39: [2, 15], 44: [2, 15], 47: [2, 15], 48: [2, 15], 51: [2, 15], 55: [2, 15], 60: [2, 15] }, { 72: [1, 137], 77: [1, 136] }, { 72: [2, 100], 77: [2, 100] }, { 14: [2, 16], 15: [2, 16], 19: [2, 16], 29: [2, 16], 34: [2, 16], 44: [2, 16], 47: [2, 16], 48: [2, 16], 51: [2, 16], 55: [2, 16], 60: [2, 16] }, { 33: [1, 138] }, { 33: [2, 75] }, { 33: [2, 32] }, { 72: [2, 101], 77: [2, 101] }, { 14: [2, 17], 15: [2, 17], 19: [2, 17], 29: [2, 17], 34: [2, 17], 39: [2, 17], 44: [2, 17], 47: [2, 17], 48: [2, 17], 51: [2, 17], 55: [2, 17], 60: [2, 17] }], defaultActions: { 4: [2, 1], 54: [2, 55], 56: [2, 20], 60: [2, 57], 73: [2, 81], 82: [2, 85], 86: [2, 18], 90: [2, 89], 101: [2, 53], 104: [2, 93], 110: [2, 19], 111: [2, 77], 116: [2, 97], 119: [2, 63], 122: [2, 69], 135: [2, 75], 136: [2, 32] }, parseError: function (n) { throw new Error(n); }, parse: function (n) { function it() { var n; return n = k.lexer.lex() || 1, "number" != typeof n && (n = k.symbols_[n] || n), n } var k = this, r = [0], e = [null], t = [], h = this.table, d = "", c = 0, g = 0, y = 0, l, nt, i, p, o, u, w, a, f, tt, v, s, b; for (this.lexer.setInput(n), this.lexer.yy = this.yy, this.yy.lexer = this.lexer, this.yy.parser = this, "undefined" == typeof this.lexer.yylloc && (this.lexer.yylloc = {}), l = this.lexer.yylloc, t.push(l), nt = this.lexer.options && this.lexer.options.ranges, "function" == typeof this.yy.parseError && (this.parseError = this.yy.parseError), s = {}; ;) { if ((o = r[r.length - 1], this.defaultActions[o] ? u = this.defaultActions[o] : (null !== i && "undefined" != typeof i || (i = it()), u = h[o] && h[o][i]), "undefined" == typeof u || !u.length || !u[0]) && (b = "", !y)) { v = []; for (a in h[o]) this.terminals_[a] && a > 2 && v.push("'" + this.terminals_[a] + "'"); b = this.lexer.showPosition ? "Parse error on line " + (c + 1) + ":\n" + this.lexer.showPosition() + "\nExpecting " + v.join(", ") + ", got '" + (this.terminals_[i] || i) + "'" : "Parse error on line " + (c + 1) + ": Unexpected " + (1 == i ? "end of input" : "'" + (this.terminals_[i] || i) + "'"); this.parseError(b, { text: this.lexer.match, token: this.terminals_[i] || i, line: this.lexer.yylineno, loc: l, expected: v }) } if (u[0] instanceof Array && u.length > 1) throw new Error("Parse Error: multiple actions possible at state: " + o + ", token: " + i); switch (u[0]) { case 1: r.push(i); e.push(this.lexer.yytext); t.push(this.lexer.yylloc); r.push(u[1]); i = null; p ? (i = p, p = null) : (g = this.lexer.yyleng, d = this.lexer.yytext, c = this.lexer.yylineno, l = this.lexer.yylloc, y > 0 && y--); break; case 2: if (f = this.productions_[u[1]][1], s.$ = e[e.length - f], s._$ = { first_line: t[t.length - (f || 1)].first_line, last_line: t[t.length - 1].last_line, first_column: t[t.length - (f || 1)].first_column, last_column: t[t.length - 1].last_column }, nt && (s._$.range = [t[t.length - (f || 1)].range[0], t[t.length - 1].range[1]]), w = this.performAction.call(s, d, g, c, this.yy, u[1], e, t), "undefined" != typeof w) return w; f && (r = r.slice(0, -2 * f), e = e.slice(0, -1 * f), t = t.slice(0, -1 * f)); r.push(this.productions_[u[1]][0]); e.push(s.$); t.push(s._$); tt = h[r[r.length - 2]][r[r.length - 1]]; r.push(tt); break; case 3: return !0 } } return !0 } }, i = function () { var n = { EOF: 1, parseError: function (n, t) { if (!this.yy.parser) throw new Error(n); this.yy.parser.parseError(n, t) }, setInput: function (n) { return this._input = n, this._more = this._less = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = { first_line: 1, first_column: 0, last_line: 1, last_column: 0 }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this }, input: function () { var n = this._input[0], t; return this.yytext += n, this.yyleng++, this.offset++, this.match += n, this.matched += n, t = n.match(/(?:\r\n?|\n).*/g), t ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), n }, unput: function (n) { var i = n.length, t = n.split(/(?:\r\n?|\n)/g), r, u; return this._input = n + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - i - 1), this.offset -= i, r = this.match.split(/(?:\r\n?|\n)/g), this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), t.length - 1 && (this.yylineno -= t.length - 1), u = this.yylloc.range, this.yylloc = { first_line: this.yylloc.first_line, last_line: this.yylineno + 1, first_column: this.yylloc.first_column, last_column: t ? (t.length === r.length ? this.yylloc.first_column : 0) + r[r.length - t.length].length - t[0].length : this.yylloc.first_column - i }, this.options.ranges && (this.yylloc.range = [u[0], u[0] + this.yyleng - i]), this }, more: function () { return this._more = !0, this }, less: function (n) { this.unput(this.match.slice(n)) }, pastInput: function () { var n = this.matched.substr(0, this.matched.length - this.match.length); return (n.length > 20 ? "..." : "") + n.substr(-20).replace(/\n/g, "") }, upcomingInput: function () { var n = this.match; return n.length < 20 && (n += this._input.substr(0, 20 - n.length)), (n.substr(0, 20) + (n.length > 20 ? "..." : "")).replace(/\n/g, "") }, showPosition: function () { var n = this.pastInput(), t = new Array(n.length + 1).join("-"); return n + this.upcomingInput() + "\n" + t + "^" }, next: function () { var f, n, r, e, t, u, i; if (this.done) return this.EOF; for (this._input || (this.done = !0), this._more || (this.yytext = "", this.match = ""), u = this._currentRules(), i = 0; i < u.length && (r = this._input.match(this.rules[u[i]]), !r || n && !(r[0].length > n[0].length) || (n = r, e = i, this.options.flex)); i++); return n ? (t = n[0].match(/(?:\r\n?|\n).*/g), t && (this.yylineno += t.length), this.yylloc = { first_line: this.yylloc.last_line, last_line: this.yylineno + 1, first_column: this.yylloc.last_column, last_column: t ? t[t.length - 1].length - t[t.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + n[0].length }, this.yytext += n[0], this.match += n[0], this.matches = n, this.yyleng = this.yytext.length, this.options.ranges && (this.yylloc.range = [this.offset, this.offset += this.yyleng]), this._more = !1, this._input = this._input.slice(n[0].length), this.matched += n[0], f = this.performAction.call(this, this.yy, this, u[e], this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), f ? f : void 0) : "" === this._input ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), { text: "", token: null, line: this.yylineno }) }, lex: function () { var n = this.next(); return "undefined" != typeof n ? n : this.lex() }, begin: function (n) { this.conditionStack.push(n) }, popState: function () { return this.conditionStack.pop() }, _currentRules: function () { return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules }, topState: function () { return this.conditionStack[this.conditionStack.length - 2] }, pushState: function (n) { this.begin(n) } }; return n.options = {}, n.performAction = function (n, t, i) { function r(n, i) { return t.yytext = t.yytext.substring(n, t.yyleng - i + n) } switch (i) { case 0: if ("\\\\" === t.yytext.slice(-2) ? (r(0, 1), this.begin("mu")) : "\\" === t.yytext.slice(-1) ? (r(0, 1), this.begin("emu")) : this.begin("mu"), t.yytext) return 15; break; case 1: return 15; case 2: return this.popState(), 15; case 3: return this.begin("raw"), 15; case 4: return this.popState(), "raw" === this.conditionStack[this.conditionStack.length - 1] ? 15 : (r(5, 9), "END_RAW_BLOCK"); case 5: return 15; case 6: return this.popState(), 14; case 7: return 65; case 8: return 68; case 9: return 19; case 10: return this.popState(), this.begin("raw"), 23; case 11: return 55; case 12: return 60; case 13: return 29; case 14: return 47; case 15: return this.popState(), 44; case 16: return this.popState(), 44; case 17: return 34; case 18: return 39; case 19: return 51; case 20: return 48; case 21: this.unput(t.yytext); this.popState(); this.begin("com"); break; case 22: return this.popState(), 14; case 23: return 48; case 24: return 73; case 25: return 72; case 26: return 72; case 27: return 87; case 29: return this.popState(), 54; case 30: return this.popState(), 33; case 31: return t.yytext = r(1, 2).replace(/\\"/g, '"'), 80; case 32: return t.yytext = r(1, 2).replace(/\\'/g, "'"), 80; case 33: return 85; case 34: return 82; case 35: return 82; case 36: return 83; case 37: return 84; case 38: return 81; case 39: return 75; case 40: return 77; case 41: return 72; case 42: return t.yytext = t.yytext.replace(/\\([\\\]])/g, "$1"), 72; case 43: return "INVALID"; case 44: return 5 } }, n.rules = [/^(?:[^\x00]*?(?=(\{\{)))/, /^(?:[^\x00]+)/, /^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/, /^(?:\{\{\{\{(?=[^\/]))/, /^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/, /^(?:[^\x00]+?(?=(\{\{\{\{)))/, /^(?:[\s\S]*?--(~)?\}\})/, /^(?:\()/, /^(?:\))/, /^(?:\{\{\{\{)/, /^(?:\}\}\}\})/, /^(?:\{\{(~)?>)/, /^(?:\{\{(~)?#>)/, /^(?:\{\{(~)?#\*?)/, /^(?:\{\{(~)?\/)/, /^(?:\{\{(~)?\^\s*(~)?\}\})/, /^(?:\{\{(~)?\s*else\s*(~)?\}\})/, /^(?:\{\{(~)?\^)/, /^(?:\{\{(~)?\s*else\b)/, /^(?:\{\{(~)?\{)/, /^(?:\{\{(~)?&)/, /^(?:\{\{(~)?!--)/, /^(?:\{\{(~)?![\s\S]*?\}\})/, /^(?:\{\{(~)?\*?)/, /^(?:=)/, /^(?:\.\.)/, /^(?:\.(?=([=~}\s\/.)|])))/, /^(?:[\/.])/, /^(?:\s+)/, /^(?:\}(~)?\}\})/, /^(?:(~)?\}\})/, /^(?:"(\\["]|[^"])*")/, /^(?:'(\\[']|[^'])*')/, /^(?:@)/, /^(?:true(?=([~}\s)])))/, /^(?:false(?=([~}\s)])))/, /^(?:undefined(?=([~}\s)])))/, /^(?:null(?=([~}\s)])))/, /^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/, /^(?:as\s+\|)/, /^(?:\|)/, /^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/, /^(?:\[(\\\]|[^\]])*\])/, /^(?:.)/, /^(?:$)/], n.conditions = { mu: { rules: [7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44], inclusive: !1 }, emu: { rules: [2], inclusive: !1 }, com: { rules: [6], inclusive: !1 }, raw: { rules: [3, 4, 5], inclusive: !1 }, INITIAL: { rules: [0, 1, 44], inclusive: !0 } }, n }(); return t.lexer = i, n.prototype = t, t.Parser = n, new n }(); t["default"] = i; n.exports = t["default"] }, function (n, t, i) { "use strict"; function r() { var n = arguments.length <= 0 || void 0 === arguments[0] ? {} : arguments[0]; this.options = n } function e(n, t, i) { void 0 === t && (t = n.length); var r = n[t - 1], u = n[t - 2]; return r ? "ContentStatement" === r.type ? (u || !i ? /\r?\n\s*?$/ : /(^|\r?\n)\s*?$/).test(r.original) : void 0 : i } function o(n, t, i) { void 0 === t && (t = -1); var r = n[t + 1], u = n[t + 2]; return r ? "ContentStatement" === r.type ? (u || !i ? /^\s*?\r?\n/ : /^\s*?(\r?\n|$)/).test(r.original) : void 0 : i } function f(n, t, i) { var r = n[null == t ? 0 : t + 1], u; r && "ContentStatement" === r.type && (i || !r.rightStripped) && (u = r.value, r.value = r.value.replace(i ? /^\s+/ : /^[ \t]*\r?\n?/, ""), r.rightStripped = r.value !== u) } function u(n, t, i) { var r = n[null == t ? n.length - 1 : t - 1], u; if (r && "ContentStatement" === r.type && (i || !r.leftStripped)) return u = r.value, r.value = r.value.replace(i ? /\s+$/ : /[ \t]+$/, ""), r.leftStripped = r.value !== u, r.leftStripped } var c = i(1)["default"], s, h; t.__esModule = !0; s = i(49); h = c(s); r.prototype = new h["default"]; r.prototype.Program = function (n) { var h = !this.options.ignoreStandalone, c = !this.isRootSeen, r, s; this.isRootSeen = !0; for (var i = n.body, t = 0, v = i.length; t < v; t++)if (r = i[t], s = this.accept(r), s) { var l = e(i, t, c), a = o(i, t, c), y = s.openStandalone && l, p = s.closeStandalone && a, w = s.inlineStandalone && l && a; s.close && f(i, t, !0); s.open && u(i, t, !0); h && w && (f(i, t), u(i, t) && "PartialStatement" === r.type && (r.indent = /([ \t]+$)/.exec(i[t - 1].original)[1])); h && y && (f((r.program || r.inverse).body), u(i, t)); h && p && (f(i, t), u((r.inverse || r.program).body)) } return n }; r.prototype.BlockStatement = r.prototype.DecoratorBlock = r.prototype.PartialBlockStatement = function (n) { var c, h; this.accept(n.program); this.accept(n.inverse); var t = n.program || n.inverse, i = n.program && n.inverse, r = i, s = i; if (i && i.chained) for (r = i.body[0].program; s.chained;)s = s.body[s.body.length - 1].program; return c = { open: n.openStrip.open, close: n.closeStrip.close, openStandalone: o(t.body), closeStandalone: e((r || t).body) }, (n.openStrip.close && f(t.body, null, !0), i) ? (h = n.inverseStrip, h.open && u(t.body, null, !0), h.close && f(r.body, null, !0), n.closeStrip.open && u(s.body, null, !0), !this.options.ignoreStandalone && e(t.body) && o(r.body) && (u(t.body), f(r.body))) : n.closeStrip.open && u(t.body, null, !0), c }; r.prototype.Decorator = r.prototype.MustacheStatement = function (n) { return n.strip }; r.prototype.PartialStatement = r.prototype.CommentStatement = function (n) { var t = n.strip || {}; return { inlineStandalone: !0, open: t.open, close: t.close } }; t["default"] = r; n.exports = t["default"] }, function (n, t, i) { "use strict"; function r() { this.parents = [] } function u(n) { this.acceptRequired(n, "path"); this.acceptArray(n.params); this.acceptKey(n, "hash") } function e(n) { u.call(this, n); this.acceptKey(n, "program"); this.acceptKey(n, "inverse") } function o(n) { this.acceptRequired(n, "name"); this.acceptArray(n.params); this.acceptKey(n, "hash") } var h = i(1)["default"], s, f; t.__esModule = !0; s = i(6); f = h(s); r.prototype = { constructor: r, mutating: !1, acceptKey: function (n, t) { var i = this.accept(n[t]); if (this.mutating) { if (i && !r.prototype[i.type]) throw new f["default"]('Unexpected node type "' + i.type + '" found when accepting ' + t + " on " + n.type); n[t] = i } }, acceptRequired: function (n, t) { if (this.acceptKey(n, t), !n[t]) throw new f["default"](n.type + " requires " + t); }, acceptArray: function (n) { for (var t = 0, i = n.length; t < i; t++)this.acceptKey(n, t), n[t] || (n.splice(t, 1), t--, i--) }, accept: function (n) { if (n) { if (!this[n.type]) throw new f["default"]("Unknown type: " + n.type, n); this.current && this.parents.unshift(this.current); this.current = n; var t = this[n.type](n); return this.current = this.parents.shift(), !this.mutating || t ? t : t !== !1 ? n : void 0 } }, Program: function (n) { this.acceptArray(n.body) }, MustacheStatement: u, Decorator: u, BlockStatement: e, DecoratorBlock: e, PartialStatement: o, PartialBlockStatement: function (n) { o.call(this, n); this.acceptKey(n, "program") }, ContentStatement: function () { }, CommentStatement: function () { }, SubExpression: u, PathExpression: function () { }, StringLiteral: function () { }, NumberLiteral: function () { }, BooleanLiteral: function () { }, UndefinedLiteral: function () { }, NullLiteral: function () { }, Hash: function (n) { this.acceptArray(n.pairs) }, HashPair: function (n) { this.acceptRequired(n, "value") } }; t["default"] = r; n.exports = t["default"] }, function (n, t, i) { "use strict"; function u(n, t) { if (t = t.path ? t.path.original : t, n.path.original !== t) { var i = { loc: n.path.loc }; throw new r["default"](n.path.original + " doesn't match " + t, i); } } function e(n, t) { this.source = n; this.start = { line: t.first_line, column: t.first_column }; this.end = { line: t.last_line, column: t.last_column } } function o(n) { return /^\[.*\]$/.test(n) ? n.substring(1, n.length - 1) : n } function s(n, t) { return { open: "~" === n.charAt(2), close: "~" === t.charAt(t.length - 3) } } function h(n) { return n.replace(/^\{\{~?!-?-?/, "").replace(/-?-?~?\}\}$/, "") } function c(n, t, i) { var u, h; i = this.locInfo(i); for (var e = n ? "@" : "", o = [], s = 0, f = 0, c = t.length; f < c; f++)if (u = t[f].part, h = t[f].original !== u, e += (t[f].separator || "") + u, h || ".." !== u && "." !== u && "this" !== u) o.push(u); else { if (o.length > 0) throw new r["default"]("Invalid path: " + e, { loc: i }); ".." === u && s++ } return { type: "PathExpression", data: n, depth: s, parts: o, original: e, loc: i } } function l(n, t, i, r, u, f) { var e = r.charAt(3) || r.charAt(2), o = "{" !== e && "&" !== e, s = /\*/.test(r); return { type: s ? "Decorator" : "MustacheStatement", path: n, params: t, hash: i, escaped: o, strip: u, loc: this.locInfo(f) } } function a(n, t, i, r) { u(n, i); r = this.locInfo(r); var f = { type: "Program", body: t, strip: {}, loc: r }; return { type: "BlockStatement", path: n.path, params: n.params, hash: n.hash, program: f, openStrip: {}, inverseStrip: {}, closeStrip: {}, loc: r } } function v(n, t, i, f, e, o) { var h, s, c; if (f && f.path && u(n, f), h = /\*/.test(n.open), t.blockParams = n.blockParams, s = void 0, c = void 0, i) { if (h) throw new r["default"]("Unexpected inverse block on decorator", i); i.chain && (i.program.body[0].closeStrip = f.strip); c = i.strip; s = i.program } return e && (e = s, s = t, t = e), { type: h ? "DecoratorBlock" : "BlockStatement", path: n.path, params: n.params, hash: n.hash, program: t, inverse: s, openStrip: n.strip, inverseStrip: c, closeStrip: f && f.strip, loc: this.locInfo(o) } } function y(n, t) { if (!t && n.length) { var i = n[0].loc, r = n[n.length - 1].loc; i && r && (t = { source: i.source, start: { line: i.start.line, column: i.start.column }, end: { line: r.end.line, column: r.end.column } }) } return { type: "Program", body: n, strip: {}, loc: t } } function p(n, t, i, r) { return u(n, i), { type: "PartialBlockStatement", name: n.path, params: n.params, hash: n.hash, program: t, openStrip: n.strip, closeStrip: i && i.strip, loc: this.locInfo(r) } } var w = i(1)["default"], f, r; t.__esModule = !0; t.SourceLocation = e; t.id = o; t.stripFlags = s; t.stripComment = h; t.preparePath = c; t.prepareMustache = l; t.prepareRawBlock = a; t.prepareBlock = v; t.prepareProgram = y; t.preparePartialBlock = p; f = i(6); r = w(f) }, function (n, t, i) { "use strict"; function e() { } function c(n, t, i) { if (null == n || "string" != typeof n && "Program" !== n.type) throw new r["default"]("You must pass a string or Handlebars AST to Handlebars.precompile. You passed " + n); t = t || {}; "data" in t || (t.data = !0); t.compat && (t.useDepths = !0); var u = i.parse(n, t), f = (new i.Compiler).compile(u, t); return (new i.JavaScriptCompiler).compile(f, t) } function l(n, t, i) { function e() { var r = i.parse(n, t), u = (new i.Compiler).compile(r, t), f = (new i.JavaScriptCompiler).compile(u, t, void 0, !0); return i.template(f) } function o(n, t) { return f || (f = e()), f.call(this, n, t) } if (void 0 === t && (t = {}), null == n || "string" != typeof n && "Program" !== n.type) throw new r["default"]("You must pass a string or Handlebars AST to Handlebars.compile. You passed " + n); t = u.extend({}, t); "data" in t || (t.data = !0); t.compat && (t.useDepths = !0); var f = void 0; return o._setup = function (n) { return f || (f = e()), f._setup(n) }, o._child = function (n, t, i, r) { return f || (f = e()), f._child(n, t, i, r) }, o } function o(n, t) { if (n === t) return !0; if (u.isArray(n) && u.isArray(t) && n.length === t.length) { for (var i = 0; i < n.length; i++)if (!o(n[i], t[i])) return !1; return !0 } } function s(n) { if (!n.path.parts) { var t = n.path; n.path = { type: "PathExpression", data: !1, depth: 0, parts: [t.original + ""], original: t.original + "", loc: t.loc } } } var a = i(34)["default"], h = i(1)["default"]; t.__esModule = !0; t.Compiler = e; t.precompile = c; t.compile = l; var v = i(6), r = h(v), u = i(5), y = i(45), f = h(y), p = [].slice; e.prototype = { compiler: e, equals: function (n) { var i = this.opcodes.length, r, u, t; if (n.opcodes.length !== i) return !1; for (t = 0; t < i; t++)if (r = this.opcodes[t], u = n.opcodes[t], r.opcode !== u.opcode || !o(r.args, u.args)) return !1; for (i = this.children.length, t = 0; t < i; t++)if (!this.children[t].equals(n.children[t])) return !1; return !0 }, guid: 0, compile: function (n, t) { return this.sourceNode = [], this.opcodes = [], this.children = [], this.options = t, this.stringParams = t.stringParams, this.trackIds = t.trackIds, t.blockParams = t.blockParams || [], t.knownHelpers = u.extend(a(null), { helperMissing: !0, blockHelperMissing: !0, each: !0, "if": !0, unless: !0, "with": !0, log: !0, lookup: !0 }, t.knownHelpers), this.accept(n) }, compileProgram: function (n) { var r = new this.compiler, t = r.compile(n, this.options), i = this.guid++; return this.usePartial = this.usePartial || t.usePartial, this.children[i] = t, this.useDepths = this.useDepths || t.useDepths, i }, accept: function (n) { if (!this[n.type]) throw new r["default"]("Unknown type: " + n.type, n); this.sourceNode.unshift(n); var t = this[n.type](n); return this.sourceNode.shift(), t }, Program: function (n) { this.options.blockParams.unshift(n.blockParams); for (var i = n.body, r = i.length, t = 0; t < r; t++)this.accept(i[t]); return this.options.blockParams.shift(), this.isSimple = 1 === r, this.blockParams = n.blockParams ? n.blockParams.length : 0, this }, BlockStatement: function (n) { var t, i, r; s(n); t = n.program; i = n.inverse; t = t && this.compileProgram(t); i = i && this.compileProgram(i); r = this.classifySexpr(n); "helper" === r ? this.helperSexpr(n, t, i) : "simple" === r ? (this.simpleSexpr(n), this.opcode("pushProgram", t), this.opcode("pushProgram", i), this.opcode("emptyHash"), this.opcode("blockValue", n.path.original)) : (this.ambiguousSexpr(n, t, i), this.opcode("pushProgram", t), this.opcode("pushProgram", i), this.opcode("emptyHash"), this.opcode("ambiguousBlockValue")); this.opcode("append") }, DecoratorBlock: function (n) { var t = n.program && this.compileProgram(n.program), i = this.setupFullMustacheParams(n, t, void 0), r = n.path; this.useDecorators = !0; this.opcode("registerDecorator", i.length, r.original) }, PartialStatement: function (n) { var u, t, e, f, i; if (this.usePartial = !0, u = n.program, u && (u = this.compileProgram(n.program)), t = n.params, t.length > 1) throw new r["default"]("Unsupported number of partial arguments: " + t.length, n); t.length || (this.options.explicitPartialContext ? this.opcode("pushLiteral", "undefined") : t.push({ type: "PathExpression", parts: [], depth: 0 })); e = n.name.original; f = "SubExpression" === n.name.type; f && this.accept(n.name); this.setupFullMustacheParams(n, u, void 0, !0); i = n.indent || ""; this.options.preventIndent && i && (this.opcode("appendContent", i), i = ""); this.opcode("invokePartial", f, e, i); this.opcode("append") }, PartialBlockStatement: function (n) { this.PartialStatement(n) }, MustacheStatement: function (n) { this.SubExpression(n); n.escaped && !this.options.noEscape ? this.opcode("appendEscaped") : this.opcode("append") }, Decorator: function (n) { this.DecoratorBlock(n) }, ContentStatement: function (n) { n.value && this.opcode("appendContent", n.value) }, CommentStatement: function () { }, SubExpression: function (n) { s(n); var t = this.classifySexpr(n); "simple" === t ? this.simpleSexpr(n) : "helper" === t ? this.helperSexpr(n) : this.ambiguousSexpr(n) }, ambiguousSexpr: function (n, t, i) { var r = n.path, u = r.parts[0], f = null != t || null != i; this.opcode("getContext", r.depth); this.opcode("pushProgram", t); this.opcode("pushProgram", i); r.strict = !0; this.accept(r); this.opcode("invokeAmbiguous", u, f) }, simpleSexpr: function (n) { var t = n.path; t.strict = !0; this.accept(t); this.opcode("resolvePossibleLambda") }, helperSexpr: function (n, t, i) { var o = this.setupFullMustacheParams(n, t, i), u = n.path, e = u.parts[0]; if (this.options.knownHelpers[e]) this.opcode("invokeKnownHelper", o.length, e); else { if (this.options.knownHelpersOnly) throw new r["default"]("You specified knownHelpersOnly, but used the unknown helper " + e, n); u.strict = !0; u.falsy = !0; this.accept(u); this.opcode("invokeHelper", o.length, u.original, f["default"].helpers.simpleId(u)) } }, PathExpression: function (n) { this.addDepth(n.depth); this.opcode("getContext", n.depth); var t = n.parts[0], i = f["default"].helpers.scopedId(n), r = !n.depth && !i && this.blockParamIndex(t); r ? this.opcode("lookupBlockParam", r, n.parts) : t ? n.data ? (this.options.data = !0, this.opcode("lookupData", n.depth, n.parts, n.strict)) : this.opcode("lookupOnContext", n.parts, n.falsy, n.strict, i) : this.opcode("pushContext") }, StringLiteral: function (n) { this.opcode("pushString", n.value) }, NumberLiteral: function (n) { this.opcode("pushLiteral", n.value) }, BooleanLiteral: function (n) { this.opcode("pushLiteral", n.value) }, UndefinedLiteral: function () { this.opcode("pushLiteral", "undefined") }, NullLiteral: function () { this.opcode("pushLiteral", "null") }, Hash: function (n) { var i = n.pairs, t = 0, r = i.length; for (this.opcode("pushHash"); t < r; t++)this.pushParam(i[t].value); for (; t--;)this.opcode("assignToHash", i[t].key); this.opcode("popHash") }, opcode: function (n) { this.opcodes.push({ opcode: n, args: p.call(arguments, 1), loc: this.sourceNode[0].loc }) }, addDepth: function (n) { n && (this.useDepths = !0) }, classifySexpr: function (n) { var u = f["default"].helpers.simpleId(n.path), e = u && !!this.blockParamIndex(n.path.parts[0]), t = !e && f["default"].helpers.helperExpression(n), i = !e && (t || u), o, r; return i && !t && (o = n.path.parts[0], r = this.options, r.knownHelpers[o] ? t = !0 : r.knownHelpersOnly && (i = !1)), t ? "helper" : i ? "ambiguous" : "simple" }, pushParams: function (n) { for (var t = 0, i = n.length; t < i; t++)this.pushParam(n[t]) }, pushParam: function (n) { var t = null != n.value ? n.value : n.original || "", i, r; this.stringParams ? (t.replace && (t = t.replace(/^(\.?\.\/)*/g, "").replace(/\//g, ".")), n.depth && this.addDepth(n.depth), this.opcode("getContext", n.depth || 0), this.opcode("pushStringParam", t, n.type), "SubExpression" === n.type && this.accept(n)) : (this.trackIds && (i = void 0, (!n.parts || f["default"].helpers.scopedId(n) || n.depth || (i = this.blockParamIndex(n.parts[0])), i) ? (r = n.parts.slice(1).join("."), this.opcode("pushId", "BlockParam", i, r)) : (t = n.original || t, t.replace && (t = t.replace(/^this(?:\.|$)/, "").replace(/^\.\//, "").replace(/^\.$/, "")), this.opcode("pushId", n.type, t))), this.accept(n)) }, setupFullMustacheParams: function (n, t, i, r) { var u = n.params; return this.pushParams(u), this.opcode("pushProgram", t), this.opcode("pushProgram", i), n.hash ? this.accept(n.hash) : this.opcode("emptyHash", r), u }, blockParamIndex: function (n) { for (var i, r, t = 0, f = this.options.blockParams.length; t < f; t++)if (i = this.options.blockParams[t], r = i && u.indexOf(i, n), i && r >= 0) return [t, r] } } }, function (n, t, i) { "use strict"; function r(n) { this.value = n } function u() { } function h(n, t, i, r) { var u = t.popStack(), f = 0, e = i.length; for (n && e--; f < e; f++)u = t.nameLookup(u, i[f], r); return n ? [t.aliasable("container.strict"), "(", u, ", ", t.quotedString(i[f]), ", ", JSON.stringify(t.source.currentLocation), " )"] : u } var c = i(13)["default"], e = i(1)["default"]; t.__esModule = !0; var o = i(4), l = i(6), f = e(l), a = i(5), v = i(53), s = e(v); u.prototype = { nameLookup: function (n, t) { return this.internalNameLookup(n, t) }, depthedLookup: function (n) { return [this.aliasable("container.lookup"), '(depths, "', n, '")'] }, compilerInfo: function () { var n = o.COMPILER_REVISION, t = o.REVISION_CHANGES[n]; return [n, t] }, appendToBuffer: function (n, t, i) { return a.isArray(n) || (n = [n]), n = this.source.wrap(n, t), this.environment.isSimple ? ["return ", n, ";"] : i ? ["buffer += ", n, ";"] : (n.appendToBuffer = !0, n) }, initializeBuffer: function () { return this.quotedString("") }, internalNameLookup: function (n, t) { return this.lookupPropertyFunctionIsUsed = !0, ["lookupProperty(", n, ",", JSON.stringify(t), ")"] }, lookupPropertyFunctionIsUsed: !1, compile: function (n, t, i, r) { var c, u; this.environment = n; this.options = t; this.stringParams = this.options.stringParams; this.trackIds = this.options.trackIds; this.precompile = !r; this.name = this.environment.name; this.isChild = !!i; this.context = i || { decorators: [], programs: [], environments: [] }; this.preamble(); this.stackSlot = 0; this.stackVars = []; this.aliases = {}; this.registers = { list: [] }; this.hashes = []; this.compileStack = []; this.inlineStack = []; this.blockParams = []; this.compileChildren(n, t); this.useDepths = this.useDepths || n.useDepths || n.useDecorators || this.options.compat; this.useBlockParams = this.useBlockParams || n.useBlockParams; for (var a = n.opcodes, o = void 0, h = void 0, e = void 0, s = void 0, e = 0, s = a.length; e < s; e++)o = a[e], this.source.currentLocation = o.loc, h = h || o.loc, this[o.opcode].apply(this, o.args); if (this.source.currentLocation = h, this.pushSource(""), this.stackSlot || this.inlineStack.length || this.compileStack.length) throw new f["default"]("Compile completed with content left on stack"); if (this.decorators.isEmpty() ? this.decorators = void 0 : (this.useDecorators = !0, this.decorators.prepend(["var decorators = container.decorators, ", this.lookupPropertyFunctionVarDeclaration(), ";\n"]), this.decorators.push("return fn;"), r ? this.decorators = Function.apply(this, ["fn", "props", "container", "depth0", "data", "blockParams", "depths", this.decorators.merge()]) : (this.decorators.prepend("function(fn, props, container, depth0, data, blockParams, depths) {\n"), this.decorators.push("}\n"), this.decorators = this.decorators.merge())), c = this.createFunctionContext(r), this.isChild) return c; u = { compiler: this.compilerInfo(), main: c }; this.decorators && (u.main_d = this.decorators, u.useDecorators = !0); var v = this.context, l = v.programs, y = v.decorators; for (e = 0, s = l.length; e < s; e++)l[e] && (u[e] = l[e], y[e] && (u[e + "_d"] = y[e], u.useDecorators = !0)); return this.environment.usePartial && (u.usePartial = !0), this.options.data && (u.useData = !0), this.useDepths && (u.useDepths = !0), this.useBlockParams && (u.useBlockParams = !0), this.options.compat && (u.compat = !0), r ? u.compilerOptions = this.options : (u.compiler = JSON.stringify(u.compiler), this.source.currentLocation = { start: { line: 1, column: 0 } }, u = this.objectLiteral(u), t.srcName ? (u = u.toStringWithSourceMap({ file: t.destName }), u.map = u.map && u.map.toString()) : u = u.toString()), u }, preamble: function () { this.lastContext = 0; this.source = new s["default"](this.options.srcName); this.decorators = new s["default"](this.options.srcName) }, createFunctionContext: function (n) { var e = this, i = "", f = this.stackVars.concat(this.registers.list), r, t, u; return f.length > 0 && (i += ", " + f.join(", ")), r = 0, c(this.aliases).forEach(function (n) { var t = e.aliases[n]; t.children && t.referenceCount > 1 && (i += ", alias" + ++r + "=" + n, t.children[0] = "alias" + r) }), this.lookupPropertyFunctionIsUsed && (i += ", " + this.lookupPropertyFunctionVarDeclaration()), t = ["container", "depth0", "helpers", "partials", "data"], (this.useBlockParams || this.useDepths) && t.push("blockParams"), this.useDepths && t.push("depths"), u = this.mergeSource(i), n ? (t.push(u), Function.apply(this, t)) : this.source.wrap(["function(", t.join(","), ") {\n ", u, "}"]) }, mergeSource: function (n) { var e = this.environment.isSimple, f = !this.forceBuffer, r = void 0, u = void 0, t = void 0, i = void 0; return this.source.each(function (n) { n.appendToBuffer ? (t ? n.prepend(" + ") : t = n, i = n) : (t && (u ? t.prepend("buffer += ") : r = !0, i.add(";"), t = i = void 0), u = !0, e || (f = !1)) }), f ? t ? (t.prepend("return "), i.add(";")) : u || this.source.push('return "";') : (n += ", buffer = " + (r ? "" : this.initializeBuffer()), t ? (t.prepend("return buffer + "), i.add(";")) : this.source.push("return buffer;")), n && this.source.prepend("var " + n.substring(2) + (r ? "" : ";\n")), this.source.merge() }, lookupPropertyFunctionVarDeclaration: function () { return "\n lookupProperty = container.lookupProperty || function(parent, propertyName) {\n if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {\n return parent[propertyName];\n }\n return undefined\n }\n ".trim() }, blockValue: function (n) { var r = this.aliasable("container.hooks.blockHelperMissing"), t = [this.contextName(0)], i; this.setupHelperArgs(n, 0, t); i = this.popStack(); t.splice(1, 0, i); this.push(this.source.functionCall(r, "call", t)) }, ambiguousBlockValue: function () { var i = this.aliasable("container.hooks.blockHelperMissing"), n = [this.contextName(0)], t; this.setupHelperArgs("", 0, n, !0); this.flushInline(); t = this.topStack(); n.splice(1, 0, t); this.pushSource(["if (!", this.lastHelper, ") { ", t, " = ", this.source.functionCall(i, "call", n), "}"]) }, appendContent: function (n) { this.pendingContent ? n = this.pendingContent + n : this.pendingLocation = this.source.currentLocation; this.pendingContent = n }, append: function () { if (this.isInline()) this.replaceStack(function (n) { return [" != null ? ", n, ' : ""'] }), this.pushSource(this.appendToBuffer(this.popStack())); else { var n = this.popStack(); this.pushSource(["if (", n, " != null) { ", this.appendToBuffer(n, void 0, !0), " }"]); this.environment.isSimple && this.pushSource(["else { ", this.appendToBuffer("''", void 0, !0), " }"]) } }, appendEscaped: function () { this.pushSource(this.appendToBuffer([this.aliasable("container.escapeExpression"), "(", this.popStack(), ")"])) }, getContext: function (n) { this.lastContext = n }, pushContext: function () { this.pushStackLiteral(this.contextName(this.lastContext)) }, lookupOnContext: function (n, t, i, r) { var u = 0; r || !this.options.compat || this.lastContext ? this.pushContext() : this.push(this.depthedLookup(n[u++])); this.resolvePath("context", n, u, t, i) }, lookupBlockParam: function (n, t) { this.useBlockParams = !0; this.push(["blockParams[", n[0], "][", n[1], "]"]); this.resolvePath("context", t, 1) }, lookupData: function (n, t, i) { n ? this.pushStackLiteral("container.data(data, " + n + ")") : this.pushStackLiteral("data"); this.resolvePath("data", t, 0, !0, i) }, resolvePath: function (n, t, i, r, u) { var e = this, f; if (this.options.strict || this.options.assumeObjects) return void this.push(h(this.options.strict && u, this, t, n)); for (f = t.length; i < f; i++)this.replaceStack(function (u) { var f = e.nameLookup(u, t[i], n); return r ? [" && ", f] : [" != null ? ", f, " : ", u] }) }, resolvePossibleLambda: function () { this.push([this.aliasable("container.lambda"), "(", this.popStack(), ", ", this.contextName(0), ")"]) }, pushStringParam: function (n, t) { this.pushContext(); this.pushString(t); "SubExpression" !== t && ("string" == typeof n ? this.pushString(n) : this.pushStackLiteral(n)) }, emptyHash: function (n) { this.trackIds && this.push("{}"); this.stringParams && (this.push("{}"), this.push("{}")); this.pushStackLiteral(n ? "undefined" : "{}") }, pushHash: function () { this.hash && this.hashes.push(this.hash); this.hash = { values: {}, types: [], contexts: [], ids: [] } }, popHash: function () { var n = this.hash; this.hash = this.hashes.pop(); this.trackIds && this.push(this.objectLiteral(n.ids)); this.stringParams && (this.push(this.objectLiteral(n.contexts)), this.push(this.objectLiteral(n.types))); this.push(this.objectLiteral(n.values)) }, pushString: function (n) { this.pushStackLiteral(this.quotedString(n)) }, pushLiteral: function (n) { this.pushStackLiteral(n) }, pushProgram: function (n) { null != n ? this.pushStackLiteral(this.programExpression(n)) : this.pushStackLiteral(null) }, registerDecorator: function (n, t) { var i = this.nameLookup("decorators", t, "decorator"), r = this.setupHelperArgs(t, n); this.decorators.push(["fn = ", this.decorators.functionCall(i, "", ["fn", "props", "container", r]), " || fn;"]) }, invokeHelper: function (n, t, i) { var o = this.popStack(), u = this.setupHelper(n, t), r = [], f, e; i && r.push(u.name); r.push(o); this.options.strict || r.push(this.aliasable("container.hooks.helperMissing")); f = ["(", this.itemsSeparatedBy(r, "||"), ")"]; e = this.source.functionCall(f, "call", u.callParams); this.push(e) }, itemsSeparatedBy: function (n, t) { var r = [], i; for (r.push(n[0]), i = 1; i < n.length; i++)r.push(t, n[i]); return r }, invokeKnownHelper: function (n, t) { var i = this.setupHelper(n, t); this.push(this.source.functionCall(i.name, "call", i.callParams)) }, invokeAmbiguous: function (n, t) { var u; this.useRegister("helper"); u = this.popStack(); this.emptyHash(); var i = this.setupHelper(0, n, t), f = this.lastHelper = this.nameLookup("helpers", n, "helper"), r = ["(", "(helper = ", f, " || ", u, ")"]; this.options.strict || (r[0] = "(helper = ", r.push(" != null ? helper : ", this.aliasable("container.hooks.helperMissing"))); this.push(["(", r, i.paramsInit ? ["),(", i.paramsInit] : [], "),", "(typeof helper === ", this.aliasable('"function"'), " ? ", this.source.functionCall("helper", "call", i.callParams), " : helper))"]) }, invokePartial: function (n, t, i) { var u = [], r = this.setupParams(t, 1, u); n && (t = this.popStack(), delete r.name); i && (r.indent = JSON.stringify(i)); r.helpers = "helpers"; r.partials = "partials"; r.decorators = "container.decorators"; n ? u.unshift(t) : u.unshift(this.nameLookup("partials", t, "partial")); this.options.compat && (r.depths = "depths"); r = this.objectLiteral(r); u.push(r); this.push(this.source.functionCall("container.invokePartial", "", u)) }, assignToHash: function (n) { var f = this.popStack(), i = void 0, r = void 0, u = void 0, t; this.trackIds && (u = this.popStack()); this.stringParams && (r = this.popStack(), i = this.popStack()); t = this.hash; i && (t.contexts[n] = i); r && (t.types[n] = r); u && (t.ids[n] = u); t.values[n] = f }, pushId: function (n, t, i) { "BlockParam" === n ? this.pushStackLiteral("blockParams[" + t[0] + "].path[" + t[1] + "]" + (i ? " + " + JSON.stringify("." + i) : "")) : "PathExpression" === n ? this.pushString(t) : "SubExpression" === n ? this.pushStackLiteral("true") : this.pushStackLiteral("null") }, compiler: u, compileChildren: function (n, t) { for (var r, u, o = n.children, i = void 0, f = void 0, e = 0, s = o.length; e < s; e++)i = o[e], f = new this.compiler, r = this.matchExistingProgram(i), null == r ? (this.context.programs.push(""), u = this.context.programs.length, i.index = u, i.name = "program" + u, this.context.programs[u] = f.compile(i, t, this.context, !this.precompile), this.context.decorators[u] = f.decorators, this.context.environments[u] = i, this.useDepths = this.useDepths || f.useDepths, this.useBlockParams = this.useBlockParams || f.useBlockParams, i.useDepths = this.useDepths, i.useBlockParams = this.useBlockParams) : (i.index = r.index, i.name = "program" + r.index, this.useDepths = this.useDepths || r.useDepths, this.useBlockParams = this.useBlockParams || r.useBlockParams) }, matchExistingProgram: function (n) { for (var i, t = 0, r = this.context.environments.length; t < r; t++)if (i = this.context.environments[t], i && i.equals(n)) return i }, programExpression: function (n) { var i = this.environment.children[n], t = [i.index, "data", i.blockParams]; return (this.useBlockParams || this.useDepths) && t.push("blockParams"), this.useDepths && t.push("depths"), "container.program(" + t.join(", ") + ")" }, useRegister: function (n) { this.registers[n] || (this.registers[n] = !0, this.registers.list.push(n)) }, push: function (n) { return n instanceof r || (n = this.source.wrap(n)), this.inlineStack.push(n), n }, pushStackLiteral: function (n) { this.push(new r(n)) }, pushSource: function (n) { this.pendingContent && (this.source.push(this.appendToBuffer(this.source.quotedString(this.pendingContent), this.pendingLocation)), this.pendingContent = void 0); n && this.source.push(n) }, replaceStack: function (n) { var u = ["("], t = void 0, e = void 0, o = void 0, i, s, h; if (!this.isInline()) throw new f["default"]("replaceStack on non-inline"); i = this.popStack(!0); i instanceof r ? (t = [i.value], u = ["(", t], o = !0) : (e = !0, s = this.incrStack(), u = ["((", this.push(s), " = ", i, ")"], t = this.topStack()); h = n.call(this, t); o || this.popStack(); e && this.stackSlot--; this.push(u.concat(h, ")")) }, incrStack: function () { return this.stackSlot++, this.stackSlot > this.stackVars.length && this.stackVars.push("stack" + this.stackSlot), this.topStackName() }, topStackName: function () { return "stack" + this.stackSlot }, flushInline: function () { var u = this.inlineStack, n, f, t, i; for (this.inlineStack = [], n = 0, f = u.length; n < f; n++)t = u[n], t instanceof r ? this.compileStack.push(t) : (i = this.incrStack(), this.pushSource([i, " = ", t, ";"]), this.compileStack.push(i)) }, isInline: function () { return this.inlineStack.length }, popStack: function (n) { var i = this.isInline(), t = (i ? this.inlineStack : this.compileStack).pop(); if (!n && t instanceof r) return t.value; if (!i) { if (!this.stackSlot) throw new f["default"]("Invalid stack pop"); this.stackSlot-- } return t }, topStack: function () { var t = this.isInline() ? this.inlineStack : this.compileStack, n = t[t.length - 1]; return n instanceof r ? n.value : n }, contextName: function (n) { return this.useDepths && n ? "depths[" + n + "]" : "depth" + n }, quotedString: function (n) { return this.source.quotedString(n) }, objectLiteral: function (n) { return this.source.objectLiteral(n) }, aliasable: function (n) { var t = this.aliases[n]; return t ? (t.referenceCount++, t) : (t = this.aliases[n] = this.source.wrap(n), t.aliasable = !0, t.referenceCount = 1, t) }, setupHelper: function (n, t, i) { var r = [], u = this.setupHelperArgs(t, n, r, i), f = this.nameLookup("helpers", t, "helper"), e = this.aliasable(this.contextName(0) + " != null ? " + this.contextName(0) + " : (container.nullContext || {})"); return { params: r, paramsInit: u, name: f, callParams: [e].concat(r) } }, setupParams: function (n, t, i) { var r = {}, o = [], s = [], h = [], c = !i, l = void 0, f, e, u; for (c && (i = []), r.name = this.quotedString(n), r.hash = this.popStack(), this.trackIds && (r.hashIds = this.popStack()), this.stringParams && (r.hashTypes = this.popStack(), r.hashContexts = this.popStack()), f = this.popStack(), e = this.popStack(), (e || f) && (r.fn = e || "container.noop", r.inverse = f || "container.noop"), u = t; u--;)l = this.popStack(), i[u] = l, this.trackIds && (h[u] = this.popStack()), this.stringParams && (s[u] = this.popStack(), o[u] = this.popStack()); return c && (r.args = this.source.generateArray(i)), this.trackIds && (r.ids = this.source.generateArray(h)), this.stringParams && (r.types = this.source.generateArray(s), r.contexts = this.source.generateArray(o)), this.options.data && (r.data = "data"), this.useBlockParams && (r.blockParams = "blockParams"), r }, setupHelperArgs: function (n, t, i, r) { var u = this.setupParams(n, t, i); return u.loc = JSON.stringify(this.source.currentLocation), u = this.objectLiteral(u), r ? (this.useRegister("options"), i.push("options"), ["options=", u]) : i ? (i.push(u), "") : u } }, function () { for (var t = "break else new var case finally return void catch for switch while continue function this with default if throw delete in try do instanceof typeof abstract enum int short boolean export interface static byte extends long super char final native synchronized class float package throws const goto private transient implements protected volatile double import public let yield await null true false".split(" "), i = u.RESERVED_WORDS = {}, n = 0, r = t.length; n < r; n++)i[t[n]] = !0 }(); u.isValidJavaScriptVariableName = function (n) { return !u.RESERVED_WORDS[n] && /^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(n) }; t["default"] = u; n.exports = t["default"] }, function (n, t, i) { "use strict"; function f(n, t, i) { if (u.isArray(n)) { for (var f = [], r = 0, e = n.length; r < e; r++)f.push(t.wrap(n[r], i)); return f } return "boolean" == typeof n || "number" == typeof n ? n + "" : n } function e(n) { this.srcFile = n; this.source = [] } var o = i(13)["default"], u, r; t.__esModule = !0; u = i(5); r = void 0; try { } catch (s) { } r || (r = function (n, t, i, r) { this.src = ""; r && this.add(r) }, r.prototype = { add: function (n) { u.isArray(n) && (n = n.join("")); this.src += n }, prepend: function (n) { u.isArray(n) && (n = n.join("")); this.src = n + this.src }, toStringWithSourceMap: function () { return { code: this.toString() } }, toString: function () { return this.src } }); e.prototype = { isEmpty: function () { return !this.source.length }, prepend: function (n, t) { this.source.unshift(this.wrap(n, t)) }, push: function (n, t) { this.source.push(this.wrap(n, t)) }, merge: function () { var n = this.empty(); return this.each(function (t) { n.add([" ", t, "\n"]) }), n }, each: function (n) { for (var t = 0, i = this.source.length; t < i; t++)n(this.source[t]) }, empty: function () { var n = this.currentLocation || { start: {} }; return new r(n.start.line, n.start.column, this.srcFile) }, wrap: function (n) { var t = arguments.length <= 1 || void 0 === arguments[1] ? this.currentLocation || { start: {} } : arguments[1]; return n instanceof r ? n : (n = f(n, this, t), new r(t.start.line, t.start.column, this.srcFile, n)) }, functionCall: function (n, t, i) { return i = this.generateList(i), this.wrap([n, t ? "." + t + "(" : "(", i, ")"]) }, quotedString: function (n) { return '"' + (n + "").replace(/\\/g, "\\\\").replace(/"/g, '\\"').replace(/\n/g, "\\n").replace(/\r/g, "\\r").replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029") + '"' }, objectLiteral: function (n) { var i = this, r = [], t; return o(n).forEach(function (t) { var u = f(n[t], i); "undefined" !== u && r.push([i.quotedString(t), ":", u]) }), t = this.generateList(r), t.prepend("{"), t.add("}"), t }, generateList: function (n) { for (var i = this.empty(), t = 0, r = n.length; t < r; t++)t && i.add(","), i.add(f(n[t], this)); return i }, generateArray: function (n) { var t = this.generateList(n); return t.prepend("["), t.add("]"), t } }; t["default"] = e; n.exports = t["default"] }]) }), function (n) { "use strict"; n.fn.counterUp = function (t) { var i = n.extend({ time: 400, delay: 10, offset: 100, beginAt: 0, formatter: !1, context: "window", callback: function () { } }, t), r; return this.each(function () { var t = n(this), u = { time: n(this).data("counterup-time") || i.time, delay: n(this).data("counterup-delay") || i.delay, offset: n(this).data("counterup-offset") || i.offset, beginAt: n(this).data("counterup-beginat") || i.beginAt, context: n(this).data("counterup-context") || i.context }, f = function () { var p = [], s = u.time / u.delay, e = n(this).attr("data-num") ? n(this).attr("data-num") : t.text(), k = /[0-9]+,[0-9]+/.test(e), w, h, c, l, o, f, b; if (e = e.replace(/,/g, ""), w = (e.split(".")[1] || []).length, u.beginAt > e && (u.beginAt = e), h = /[0-9]+:[0-9]+:[0-9]+/.test(e), h) for (c = e.split(":"), l = 1, r = 0; c.length > 0;)r += l * parseInt(c.pop(), 10), l *= 60; for (o = s; o >= u.beginAt / e * s; o--) { if (f = parseFloat(e / s * o).toFixed(w), h) { f = parseInt(r / s * o); var a = parseInt(f / 3600) % 24, v = parseInt(f / 60) % 60, y = parseInt(f % 60, 10); f = (a < 10 ? "0" + a : a) + ":" + (v < 10 ? "0" + v : v) + ":" + (y < 10 ? "0" + y : y) } if (k) while (/(\d+)(\d{3})/.test(f.toString())) f = f.toString().replace(/(\d+)(\d{3})/, "$1,$2"); i.formatter && (f = i.formatter.call(this, f)); p.unshift(f) } t.data("counterup-nums", p); t.text(u.beginAt); b = function () { if (!t.data("counterup-nums")) { i.callback.call(this); return } t.html(t.data("counterup-nums").shift()); t.data("counterup-nums").length ? setTimeout(t.data("counterup-func"), u.delay) : (t.data("counterup-nums", null), t.data("counterup-func", null), i.callback.call(this)) }; t.data("counterup-func", b); setTimeout(t.data("counterup-func"), u.delay) }; t.waypoint(function () { f(); this.destroy() }, { offset: u.offset + "%", context: u.context }) }) } }(jQuery);
  76. /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
  77. !function (n) { "function" == typeof define && define.amd ? define(["jquery"], n) : "object" == typeof module && module.exports ? module.exports = function (t, i) { return void 0 === i && (i = "undefined" != typeof window ? require("jquery") : require("jquery")(t)), n(i), i } : n(jQuery) }(function (n) { var t = function () { function u(n, t) { return d.call(n, t) } function l(n, t) { var e, o, s, f, h, y, c, p, i, l, b, u = t && t.split("/"), a = r.map, v = a && a["*"] || {}; if (n) { for (h = (n = n.split("/")).length - 1, r.nodeIdCompat && w.test(n[h]) && (n[h] = n[h].replace(w, "")), "." === n[0].charAt(0) && u && (n = u.slice(0, u.length - 1).concat(n)), i = 0; i < n.length; i++)if ("." === (b = n[i])) n.splice(i, 1), --i; else if (".." === b) { if (0 === i || 1 === i && ".." === n[2] || ".." === n[i - 1]) continue; 0 < i && (n.splice(i - 1, 2), i -= 2) } n = n.join("/") } if ((u || v) && a) { for (i = (e = n.split("/")).length; 0 < i; --i) { if (o = e.slice(0, i).join("/"), u) for (l = u.length; 0 < l; --l)if (s = (s = a[u.slice(0, l).join("/")]) && s[o]) { f = s; y = i; break } if (f) break; !c && v && v[o] && (c = v[o], p = i) } !f && c && (f = c, y = p); f && (e.splice(0, y, f), n = e.join("/")) } return n } function nt(n, t) { return function () { var i = g.call(arguments, 0); return "string" != typeof i[0] && 1 === i.length && i.push(null), o.apply(f, i.concat([n, t])) } } function it(n) { return function (t) { i[n] = t } } function a(n) { if (u(e, n)) { var t = e[n]; delete e[n]; c[n] = !0; h.apply(f, t) } if (!u(i, n) && !u(c, n)) throw new Error("No " + n); return i[n] } function b(n) { var i, t = n ? n.indexOf("!") : -1; return -1 < t && (i = n.substring(0, t), n = n.substring(t + 1, n.length)), [i, n] } function tt(n) { return n ? b(n) : [] } var t, v, y, k, f, h, o, p, s, i, e, r, c, d, g, w; return n && n.fn && n.fn.select2 && n.fn.select2.amd && (t = n.fn.select2.amd), t && t.requirejs || (t ? y = t : t = {}, i = {}, e = {}, r = {}, c = {}, d = Object.prototype.hasOwnProperty, g = [].slice, w = /\.js$/, p = function (n, t) { var r, e, u = b(n), i = u[0], f = t[1]; return n = u[1], i && (r = a(i = l(i, f))), i ? n = r && r.normalize ? r.normalize(n, (e = f, function (n) { return l(n, e) })) : l(n, f) : (i = (u = b(n = l(n, f)))[0], n = u[1], i && (r = a(i))), { f: i ? i + "!" + n : n, n: n, pr: i, p: r } }, s = { require: function (n) { return nt(n) }, exports: function (n) { var t = i[n]; return void 0 !== t ? t : i[n] = {} }, module: function (n) { return { id: n, uri: "", exports: i[n], config: (t = n, function () { return r && r.config && r.config[t] || {} }) }; var t } }, h = function (n, t, r, o) { var y, h, b, w, l, k, d, v = [], g = typeof r; if (k = tt(o = o || n), "undefined" == g || "function" == g) { for (t = !t.length && r.length ? ["require", "exports", "module"] : t, l = 0; l < t.length; l += 1)if ("require" === (h = (w = p(t[l], k)).f)) v[l] = s.require(n); else if ("exports" === h) v[l] = s.exports(n), d = !0; else if ("module" === h) y = v[l] = s.module(n); else if (u(i, h) || u(e, h) || u(c, h)) v[l] = a(h); else { if (!w.p) throw new Error(n + " missing " + h); w.p.load(w.n, nt(o, !0), it(h), {}); v[l] = i[h] } b = r ? r.apply(i[n], v) : void 0; n && (y && y.exports !== f && y.exports !== i[n] ? i[n] = y.exports : b === f && d || (i[n] = b)) } else n && (i[n] = r) }, v = y = o = function (n, t, i, u, e) { if ("string" == typeof n) return s[n] ? s[n](t) : a(p(n, tt(t)).f); if (!n.splice) { if ((r = n).deps && o(r.deps, r.callback), !t) return; t.splice ? (n = t, t = i, i = null) : n = f } return t = t || function () { }, "function" == typeof i && (i = u, u = e), u ? h(f, n, t, i) : setTimeout(function () { h(f, n, t, i) }, 4), o }, o.config = function (n) { return o(n) }, v._defined = i, (k = function (n, t, r) { if ("string" != typeof n) throw new Error("See almond README: incorrect module build, no module name"); t.splice || (r = t, t = []); u(i, n) || u(e, n) || (e[n] = [n, t, r]) }).amd = { jQuery: !0 }, t.requirejs = v, t.require = y, t.define = k), t.define("almond", function () { }), t.define("jquery", [], function () { var t = n || $; return null == t && console && console.error && console.error("Select2: An instance of jQuery or a jQuery-compatible library was not found. Make sure that you are including jQuery before Select2 on your web page."), t }), t.define("select2/utils", ["jquery"], function (n) { function u(n) { var i = n.prototype, r = []; for (var t in i) "function" == typeof i[t] && "constructor" !== t && r.push(t); return r } function i() { this.listeners = {} } var t = {}, r; return t.Extend = function (n, t) { function r() { this.constructor = n } var u = {}.hasOwnProperty; for (var i in t) u.call(t, i) && (n[i] = t[i]); return r.prototype = t.prototype, n.prototype = new r, n.__super__ = t.prototype, n }, t.Decorate = function (n, t) { function i() { var r = Array.prototype.unshift, u = t.prototype.constructor.length, i = n.prototype.constructor; 0 < u && (r.call(arguments, n.prototype.constructor), i = t.prototype.constructor); i.apply(this, arguments) } function c(n) { var r = function () { }, u; return n in i.prototype && (r = i.prototype[n]), u = t.prototype[n], function () { return Array.prototype.unshift.call(arguments, r), u.apply(this, arguments) } } var s = u(t), h = u(n), r, e, f, o; for (t.displayName = n.displayName, i.prototype = new function () { this.constructor = i }, r = 0; r < h.length; r++)e = h[r], i.prototype[e] = n.prototype[e]; for (f = 0; f < s.length; f++)o = s[f], i.prototype[o] = c(o); return i }, i.prototype.on = function (n, t) { this.listeners = this.listeners || {}; n in this.listeners ? this.listeners[n].push(t) : this.listeners[n] = [t] }, i.prototype.trigger = function (n) { var i = Array.prototype.slice, t = i.call(arguments, 1); this.listeners = this.listeners || {}; null == t && (t = []); 0 === t.length && t.push({}); (t[0]._type = n) in this.listeners && this.invoke(this.listeners[n], i.call(arguments, 1)); "*" in this.listeners && this.invoke(this.listeners["*"], arguments) }, i.prototype.invoke = function (n, t) { for (var i = 0, r = n.length; i < r; i++)n[i].apply(this, t) }, t.Observable = i, t.generateChars = function (n) { for (var t = "", i = 0; i < n; i++)t += Math.floor(36 * Math.random()).toString(36); return t }, t.bind = function (n, t) { return function () { n.apply(t, arguments) } }, t._convertData = function (n) { var f, r, i, u, t; for (f in n) if (r = f.split("-"), i = n, 1 !== r.length) { for (u = 0; u < r.length; u++)t = r[u], (t = t.substring(0, 1).toLowerCase() + t.substring(1)) in i || (i[t] = {}), u == r.length - 1 && (i[t] = n[f]), i = i[t]; delete n[f] } return n }, t.hasScroll = function (t, i) { var u = n(i), f = i.style.overflowX, r = i.style.overflowY; return (f !== r || "hidden" !== r && "visible" !== r) && ("scroll" === f || "scroll" === r || u.innerHeight() < i.scrollHeight || u.innerWidth() < i.scrollWidth) }, t.escapeMarkup = function (n) { var t = { "\\": "&#92;", "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;", "/": "&#47;" }; return "string" != typeof n ? n : String(n).replace(/[&<>"'\/\\]/g, function (n) { return t[n] }) }, t.appendMany = function (t, i) { if ("1.7" === n.fn.jquery.substr(0, 3)) { var r = n(); n.map(i, function (n) { r = r.add(n) }); i = r } t.append(i) }, t.__cache = {}, r = 0, t.GetUniqueElementId = function (n) { var t = n.getAttribute("data-select2-id"); return null == t && (n.id ? (t = n.id, n.setAttribute("data-select2-id", t)) : (n.setAttribute("data-select2-id", ++r), t = r.toString())), t }, t.StoreData = function (n, i, r) { var u = t.GetUniqueElementId(n); t.__cache[u] || (t.__cache[u] = {}); t.__cache[u][i] = r }, t.GetData = function (i, r) { var u = t.GetUniqueElementId(i); return r ? t.__cache[u] && null != t.__cache[u][r] ? t.__cache[u][r] : n(i).data(r) : t.__cache[u] }, t.RemoveData = function (n) { var i = t.GetUniqueElementId(n); null != t.__cache[i] && delete t.__cache[i]; n.removeAttribute("data-select2-id") }, t }), t.define("select2/results", ["jquery", "./utils"], function (n, t) { function i(n, t, r) { this.$element = n; this.data = r; this.options = t; i.__super__.constructor.call(this) } return t.Extend(i, t.Observable), i.prototype.render = function () { var t = n('<ul class="select2-results__options" role="listbox"><\/ul>'); return this.options.get("multiple") && t.attr("aria-multiselectable", "true"), this.$results = t }, i.prototype.clear = function () { this.$results.empty() }, i.prototype.displayMessage = function (t) { var u = this.options.get("escapeMarkup"), i, r; this.clear(); this.hideLoading(); i = n('<li role="alert" aria-live="assertive" class="select2-results__option"><\/li>'); r = this.options.get("translations").get(t.message); i.append(u(r(t.args))); i[0].className += " select2-results__message"; this.$results.append(i) }, i.prototype.hideMessages = function () { this.$results.find(".select2-results__message").remove() }, i.prototype.append = function (n) { var i, t, r, u; if (this.hideLoading(), i = [], null != n.results && 0 !== n.results.length) { for (n.results = this.sort(n.results), t = 0; t < n.results.length; t++)r = n.results[t], u = this.option(r), i.push(u); this.$results.append(i) } else 0 === this.$results.children().length && this.trigger("results:message", { message: "noResults" }) }, i.prototype.position = function (n, t) { t.find(".select2-results").append(n) }, i.prototype.sort = function (n) { return this.options.get("sorter")(n) }, i.prototype.highlightFirstItem = function () { var n = this.$results.find(".select2-results__option[aria-selected]"), t = n.filter("[aria-selected=true]"); 0 < t.length ? t.first().trigger("mouseenter") : n.first().trigger("mouseenter"); this.ensureHighlightVisible() }, i.prototype.setClasses = function () { var i = this; this.data.current(function (r) { var u = n.map(r, function (n) { return n.id.toString() }); i.$results.find(".select2-results__option[aria-selected]").each(function () { var r = n(this), i = t.GetData(this, "data"), f = "" + i.id; null != i.element && i.element.selected || null == i.element && -1 < n.inArray(f, u) ? r.attr("aria-selected", "true") : r.attr("aria-selected", "false") }) }) }, i.prototype.showLoading = function (n) { this.hideLoading(); var i = { disabled: !0, loading: !0, text: this.options.get("translations").get("searching")(n) }, t = this.option(i); t.className += " loading-results"; this.$results.prepend(t) }, i.prototype.hideLoading = function () { this.$results.find(".loading-results").remove() }, i.prototype.option = function (i) { var u = document.createElement("li"), r, l, o, a, s, f, h, e, v, y, c; u.className = "select2-results__option"; r = { role: "option", "aria-selected": "false" }; l = window.Element.prototype.matches || window.Element.prototype.msMatchesSelector || window.Element.prototype.webkitMatchesSelector; for (o in (null != i.element && l.call(i.element, ":disabled") || null == i.element && i.disabled) && (delete r["aria-selected"], r["aria-disabled"] = "true"), null == i.id && delete r["aria-selected"], null != i._resultId && (u.id = i._resultId), i.title && (u.title = i.title), i.children && (r.role = "group", r["aria-label"] = i.text, delete r["aria-selected"]), r) a = r[o], u.setAttribute(o, a); if (i.children) { for (s = n(u), f = document.createElement("strong"), f.className = "select2-results__group", n(f), this.template(i, f), h = [], e = 0; e < i.children.length; e++)v = i.children[e], y = this.option(v), h.push(y); c = n("<ul><\/ul>", { "class": "select2-results__options select2-results__options--nested" }); c.append(h); s.append(f); s.append(c) } else this.template(i, u); return t.StoreData(u, "data", i), u }, i.prototype.bind = function (i) { var r = this, u = i.id + "-results"; this.$results.attr("id", u); i.on("results:all", function (n) { r.clear(); r.append(n.data); i.isOpen() && (r.setClasses(), r.highlightFirstItem()) }); i.on("results:append", function (n) { r.append(n.data); i.isOpen() && r.setClasses() }); i.on("query", function (n) { r.hideMessages(); r.showLoading(n) }); i.on("select", function () { i.isOpen() && (r.setClasses(), r.options.get("scrollAfterSelect") && r.highlightFirstItem()) }); i.on("unselect", function () { i.isOpen() && (r.setClasses(), r.options.get("scrollAfterSelect") && r.highlightFirstItem()) }); i.on("open", function () { r.$results.attr("aria-expanded", "true"); r.$results.attr("aria-hidden", "false"); r.setClasses(); r.ensureHighlightVisible() }); i.on("close", function () { r.$results.attr("aria-expanded", "false"); r.$results.attr("aria-hidden", "true"); r.$results.removeAttr("aria-activedescendant") }); i.on("results:toggle", function () { var n = r.getHighlightedResults(); 0 !== n.length && n.trigger("mouseup") }); i.on("results:select", function () { var n = r.getHighlightedResults(), i; 0 !== n.length && (i = t.GetData(n[0], "data"), "true" == n.attr("aria-selected") ? r.trigger("close", {}) : r.trigger("select", { data: i })) }); i.on("results:previous", function () { var i = r.getHighlightedResults(), u = r.$results.find("[aria-selected]"), f = u.index(i), n, t; if (!(f <= 0)) { n = f - 1; 0 === i.length && (n = 0); t = u.eq(n); t.trigger("mouseenter"); var e = r.$results.offset().top, o = t.offset().top, s = r.$results.scrollTop() + (o - e); 0 === n ? r.$results.scrollTop(0) : o - e < 0 && r.$results.scrollTop(s) } }); i.on("results:next", function () { var e = r.getHighlightedResults(), t = r.$results.find("[aria-selected]"), i = t.index(e) + 1, n; if (!(i >= t.length)) { n = t.eq(i); n.trigger("mouseenter"); var u = r.$results.offset().top + r.$results.outerHeight(!1), f = n.offset().top + n.outerHeight(!1), o = r.$results.scrollTop() + f - u; 0 === i ? r.$results.scrollTop(0) : u < f && r.$results.scrollTop(o) } }); i.on("results:focus", function (n) { n.element.addClass("select2-results__option--highlighted") }); i.on("results:message", function (n) { r.displayMessage(n) }); n.fn.mousewheel && this.$results.on("mousewheel", function (n) { var t = r.$results.scrollTop(), i = r.$results.get(0).scrollHeight - t + n.deltaY, u = 0 < n.deltaY && t - n.deltaY <= 0, f = n.deltaY < 0 && i <= r.$results.height(); u ? (r.$results.scrollTop(0), n.preventDefault(), n.stopPropagation()) : f && (r.$results.scrollTop(r.$results.get(0).scrollHeight - r.$results.height()), n.preventDefault(), n.stopPropagation()) }); this.$results.on("mouseup", ".select2-results__option[aria-selected]", function (i) { var f = n(this), u = t.GetData(this, "data"); "true" !== f.attr("aria-selected") ? r.trigger("select", { originalEvent: i, data: u }) : r.options.get("multiple") ? r.trigger("unselect", { originalEvent: i, data: u }) : r.trigger("close", {}) }); this.$results.on("mouseenter", ".select2-results__option[aria-selected]", function () { var i = t.GetData(this, "data"); r.getHighlightedResults().removeClass("select2-results__option--highlighted"); r.trigger("results:focus", { data: i, element: n(this) }) }) }, i.prototype.getHighlightedResults = function () { return this.$results.find(".select2-results__option--highlighted") }, i.prototype.destroy = function () { this.$results.remove() }, i.prototype.ensureHighlightVisible = function () { var n = this.getHighlightedResults(); if (0 !== n.length) { var f = this.$results.find("[aria-selected]").index(n), t = this.$results.offset().top, i = n.offset().top, r = this.$results.scrollTop() + (i - t), u = i - t; r -= 2 * n.outerHeight(!1); f <= 2 ? this.$results.scrollTop(0) : (u > this.$results.outerHeight() || u < 0) && this.$results.scrollTop(r) } }, i.prototype.template = function (t, i) { var u = this.options.get("templateResult"), f = this.options.get("escapeMarkup"), r = u(t, i); null == r ? i.style.display = "none" : "string" == typeof r ? i.innerHTML = f(r) : n(i).append(r) }, i }), t.define("select2/keys", [], function () { return { BACKSPACE: 8, TAB: 9, ENTER: 13, SHIFT: 16, CTRL: 17, ALT: 18, ESC: 27, SPACE: 32, PAGE_UP: 33, PAGE_DOWN: 34, END: 35, HOME: 36, LEFT: 37, UP: 38, RIGHT: 39, DOWN: 40, DELETE: 46 } }), t.define("select2/selection/base", ["jquery", "../utils", "../keys"], function (n, t, i) { function r(n, t) { this.$element = n; this.options = t; r.__super__.constructor.call(this) } return t.Extend(r, t.Observable), r.prototype.render = function () { var i = n('<span class="select2-selection" role="combobox" aria-haspopup="true" aria-expanded="false"><\/span>'); return this._tabindex = 0, null != t.GetData(this.$element[0], "old-tabindex") ? this._tabindex = t.GetData(this.$element[0], "old-tabindex") : null != this.$element.attr("tabindex") && (this._tabindex = this.$element.attr("tabindex")), i.attr("title", this.$element.attr("title")), i.attr("tabindex", this._tabindex), i.attr("aria-disabled", "false"), this.$selection = i }, r.prototype.bind = function (n) { var t = this, r = n.id + "-results"; this.container = n; this.$selection.on("focus", function (n) { t.trigger("focus", n) }); this.$selection.on("blur", function (n) { t._handleBlur(n) }); this.$selection.on("keydown", function (n) { t.trigger("keypress", n); n.which === i.SPACE && n.preventDefault() }); n.on("results:focus", function (n) { t.$selection.attr("aria-activedescendant", n.data._resultId) }); n.on("selection:update", function (n) { t.update(n.data) }); n.on("open", function () { t.$selection.attr("aria-expanded", "true"); t.$selection.attr("aria-owns", r); t._attachCloseHandler(n) }); n.on("close", function () { t.$selection.attr("aria-expanded", "false"); t.$selection.removeAttr("aria-activedescendant"); t.$selection.removeAttr("aria-owns"); t.$selection.trigger("focus"); t._detachCloseHandler(n) }); n.on("enable", function () { t.$selection.attr("tabindex", t._tabindex); t.$selection.attr("aria-disabled", "false") }); n.on("disable", function () { t.$selection.attr("tabindex", "-1"); t.$selection.attr("aria-disabled", "true") }) }, r.prototype._handleBlur = function (t) { var i = this; window.setTimeout(function () { document.activeElement == i.$selection[0] || n.contains(i.$selection[0], document.activeElement) || i.trigger("blur", t) }, 1) }, r.prototype._attachCloseHandler = function (i) { n(document.body).on("mousedown.select2." + i.id, function (i) { var r = n(i.target).closest(".select2"); n(".select2.select2-container--open").each(function () { this != r[0] && t.GetData(this, "element").select2("close") }) }) }, r.prototype._detachCloseHandler = function (t) { n(document.body).off("mousedown.select2." + t.id) }, r.prototype.position = function (n, t) { t.find(".selection").append(n) }, r.prototype.destroy = function () { this._detachCloseHandler(this.container) }, r.prototype.update = function () { throw new Error("The `update` method must be defined in child classes."); }, r.prototype.isEnabled = function () { return !this.isDisabled() }, r.prototype.isDisabled = function () { return this.options.get("disabled") }, r }), t.define("select2/selection/single", ["jquery", "./base", "../utils", "../keys"], function (n, t, i) { function r() { r.__super__.constructor.apply(this, arguments) } return i.Extend(r, t), r.prototype.render = function () { var n = r.__super__.render.call(this); return n.addClass("select2-selection--single"), n.html('<span class="select2-selection__rendered"><\/span><span class="select2-selection__arrow" role="presentation"><b role="presentation"><\/b><\/span>'), n }, r.prototype.bind = function (n) { var i = this, t; r.__super__.bind.apply(this, arguments); t = n.id + "-container"; this.$selection.find(".select2-selection__rendered").attr("id", t).attr("role", "textbox").attr("aria-readonly", "true"); this.$selection.attr("aria-labelledby", t); this.$selection.on("mousedown", function (n) { 1 === n.which && i.trigger("toggle", { originalEvent: n }) }); this.$selection.on("focus", function () { }); this.$selection.on("blur", function () { }); n.on("focus", function () { n.isOpen() || i.$selection.trigger("focus") }) }, r.prototype.clear = function () { var n = this.$selection.find(".select2-selection__rendered"); n.empty(); n.removeAttr("title") }, r.prototype.display = function (n, t) { var i = this.options.get("templateSelection"); return this.options.get("escapeMarkup")(i(n, t)) }, r.prototype.selectionContainer = function () { return n("<span><\/span>") }, r.prototype.update = function (n) { var r; if (0 !== n.length) { var i = n[0], t = this.$selection.find(".select2-selection__rendered"), u = this.display(i, t); t.empty().append(u); r = i.title || i.text; r ? t.attr("title", r) : t.removeAttr("title") } else this.clear() }, r }), t.define("select2/selection/multiple", ["jquery", "./base", "../utils"], function (n, t, i) { function r() { r.__super__.constructor.apply(this, arguments) } return i.Extend(r, t), r.prototype.render = function () { var n = r.__super__.render.call(this); return n.addClass("select2-selection--multiple"), n.html('<ul class="select2-selection__rendered"><\/ul>'), n }, r.prototype.bind = function () { var t = this; r.__super__.bind.apply(this, arguments); this.$selection.on("click", function (n) { t.trigger("toggle", { originalEvent: n }) }); this.$selection.on("click", ".select2-selection__choice__remove", function (r) { if (!t.isDisabled()) { var u = n(this).parent(), f = i.GetData(u[0], "data"); t.trigger("unselect", { originalEvent: r, data: f }) } }) }, r.prototype.clear = function () { var n = this.$selection.find(".select2-selection__rendered"); n.empty(); n.removeAttr("title") }, r.prototype.display = function (n, t) { var i = this.options.get("templateSelection"); return this.options.get("escapeMarkup")(i(n, t)) }, r.prototype.selectionContainer = function () { return n('<li class="select2-selection__choice"><span class="select2-selection__choice__remove" role="presentation">&times;<\/span><\/li>') }, r.prototype.update = function (n) { var f, r, e, o; if (this.clear(), 0 !== n.length) { for (f = [], r = 0; r < n.length; r++) { var u = n[r], t = this.selectionContainer(), s = this.display(u, t); t.append(s); e = u.title || u.text; e && t.attr("title", e); i.StoreData(t[0], "data", u); f.push(t) } o = this.$selection.find(".select2-selection__rendered"); i.appendMany(o, f) } }, r }), t.define("select2/selection/placeholder", ["../utils"], function () { function n(n, t, i) { this.placeholder = this.normalizePlaceholder(i.get("placeholder")); n.call(this, t, i) } return n.prototype.normalizePlaceholder = function (n, t) { return "string" == typeof t && (t = { id: "", text: t }), t }, n.prototype.createPlaceholder = function (n, t) { var i = this.selectionContainer(); return i.html(this.display(t)), i.addClass("select2-selection__placeholder").removeClass("select2-selection__choice"), i }, n.prototype.update = function (n, t) { var r = 1 == t.length && t[0].id != this.placeholder.id, i; if (1 < t.length || r) return n.call(this, t); this.clear(); i = this.createPlaceholder(this.placeholder); this.$selection.find(".select2-selection__rendered").append(i) }, n }), t.define("select2/selection/allowClear", ["jquery", "../keys", "../utils"], function (n, t, i) { function r() { } return r.prototype.bind = function (n, t, i) { var r = this; n.call(this, t, i); null == this.placeholder && this.options.get("debug") && window.console && console.error && console.error("Select2: The `allowClear` option should be used in combination with the `placeholder` option."); this.$selection.on("mousedown", ".select2-selection__clear", function (n) { r._handleClear(n) }); t.on("keypress", function (n) { r._handleKeyboardClear(n, t) }) }, r.prototype._handleClear = function (n, t) { var e, u, o, r, f; if (!this.isDisabled() && (e = this.$selection.find(".select2-selection__clear"), 0 !== e.length)) if (t.stopPropagation(), u = i.GetData(e[0], "data"), o = this.$element.val(), this.$element.val(this.placeholder.id), r = { data: u }, this.trigger("clear", r), r.prevented) this.$element.val(o); else { for (f = 0; f < u.length; f++)if (r = { data: u[f] }, this.trigger("unselect", r), r.prevented) return void this.$element.val(o); this.$element.trigger("input").trigger("change"); this.trigger("toggle", {}) } }, r.prototype._handleKeyboardClear = function (n, i, r) { r.isOpen() || i.which != t.DELETE && i.which != t.BACKSPACE || this._handleClear(i) }, r.prototype.update = function (t, r) { if (t.call(this, r), !(0 < this.$selection.find(".select2-selection__placeholder").length || 0 === r.length)) { var f = this.options.get("translations").get("removeAllItems"), u = n('<span class="select2-selection__clear" title="' + f() + '">&times;<\/span>'); i.StoreData(u[0], "data", r); this.$selection.find(".select2-selection__rendered").prepend(u) } }, r }), t.define("select2/selection/search", ["jquery", "../utils", "../keys"], function (n, t, i) { function r(n, t, i) { n.call(this, t, i) } return r.prototype.render = function (t) { var i = n('<li class="select2-search select2-search--inline"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="none" spellcheck="false" role="searchbox" aria-autocomplete="list" /><\/li>'), r; return this.$searchContainer = i, this.$search = i.find("input"), r = t.call(this), this._transferTabIndex(), r }, r.prototype.bind = function (n, r, u) { var f = this, s = r.id + "-results", e, o; n.call(this, r, u); r.on("open", function () { f.$search.attr("aria-controls", s); f.$search.trigger("focus") }); r.on("close", function () { f.$search.val(""); f.$search.removeAttr("aria-controls"); f.$search.removeAttr("aria-activedescendant"); f.$search.trigger("focus") }); r.on("enable", function () { f.$search.prop("disabled", !1); f._transferTabIndex() }); r.on("disable", function () { f.$search.prop("disabled", !0) }); r.on("focus", function () { f.$search.trigger("focus") }); r.on("results:focus", function (n) { n.data._resultId ? f.$search.attr("aria-activedescendant", n.data._resultId) : f.$search.removeAttr("aria-activedescendant") }); this.$selection.on("focusin", ".select2-search--inline", function (n) { f.trigger("focus", n) }); this.$selection.on("focusout", ".select2-search--inline", function (n) { f._handleBlur(n) }); this.$selection.on("keydown", ".select2-search--inline", function (n) { var r, u; (n.stopPropagation(), f.trigger("keypress", n), f._keyUpPrevented = n.isDefaultPrevented(), n.which === i.BACKSPACE && "" === f.$search.val()) && (r = f.$searchContainer.prev(".select2-selection__choice"), 0 < r.length && (u = t.GetData(r[0], "data"), f.searchRemoveChoice(u), n.preventDefault())) }); this.$selection.on("click", ".select2-search--inline", function (n) { f.$search.val() && n.stopPropagation() }); e = document.documentMode; o = e && e <= 11; this.$selection.on("input.searchcheck", ".select2-search--inline", function () { o ? f.$selection.off("input.search input.searchcheck") : f.$selection.off("keyup.search") }); this.$selection.on("keyup.search input.search", ".select2-search--inline", function (n) { if (o && "input" === n.type) f.$selection.off("input.search input.searchcheck"); else { var t = n.which; t != i.SHIFT && t != i.CTRL && t != i.ALT && t != i.TAB && f.handleSearch(n) } }) }, r.prototype._transferTabIndex = function () { this.$search.attr("tabindex", this.$selection.attr("tabindex")); this.$selection.attr("tabindex", "-1") }, r.prototype.createPlaceholder = function (n, t) { this.$search.attr("placeholder", t.text) }, r.prototype.update = function (n, t) { var i = this.$search[0] == document.activeElement; this.$search.attr("placeholder", ""); n.call(this, t); this.$selection.find(".select2-selection__rendered").append(this.$searchContainer); this.resizeSearch(); i && this.$search.trigger("focus") }, r.prototype.handleSearch = function () { if (this.resizeSearch(), !this._keyUpPrevented) { var n = this.$search.val(); this.trigger("query", { term: n }) } this._keyUpPrevented = !1 }, r.prototype.searchRemoveChoice = function (n, t) { this.trigger("unselect", { data: t }); this.$search.val(t.text); this.handleSearch() }, r.prototype.resizeSearch = function () { this.$search.css("width", "25px"); var n = ""; n = "" !== this.$search.attr("placeholder") ? this.$selection.find(".select2-selection__rendered").width() : .75 * (this.$search.val().length + 1) + "em"; this.$search.css("width", n) }, r }), t.define("select2/selection/eventRelay", ["jquery"], function (n) { function t() { } return t.prototype.bind = function (t, i, r) { var u = this, f = ["open", "opening", "close", "closing", "select", "selecting", "unselect", "unselecting", "clear", "clearing"], e = ["opening", "closing", "selecting", "unselecting", "clearing"]; t.call(this, i, r); i.on("*", function (t, i) { if (-1 !== n.inArray(t, f)) { i = i || {}; var r = n.Event("select2:" + t, { params: i }); u.$element.trigger(r); -1 !== n.inArray(t, e) && (i.prevented = r.isDefaultPrevented()) } }) }, t }), t.define("select2/translation", ["jquery", "require"], function (n, t) { function i(n) { this.dict = n || {} } return i.prototype.all = function () { return this.dict }, i.prototype.get = function (n) { return this.dict[n] }, i.prototype.extend = function (t) { this.dict = n.extend({}, t.all(), this.dict) }, i._cache = {}, i.loadPath = function (n) { if (!(n in i._cache)) { var r = t(n); i._cache[n] = r } return new i(i._cache[n]) }, i }), t.define("select2/diacritics", [], function () { return { "Ⓐ": "A", "A": "A", "À": "A", "Á": "A", "Â": "A", "Ầ": "A", "Ấ": "A", "Ẫ": "A", "Ẩ": "A", "Ã": "A", "Ā": "A", "Ă": "A", "Ằ": "A", "Ắ": "A", "Ẵ": "A", "Ẳ": "A", "Ȧ": "A", "Ǡ": "A", "Ä": "A", "Ǟ": "A", "Ả": "A", "Å": "A", "Ǻ": "A", "Ǎ": "A", "Ȁ": "A", "Ȃ": "A", "Ạ": "A", "Ậ": "A", "Ặ": "A", "Ḁ": "A", "Ą": "A", "Ⱥ": "A", "Ɐ": "A", "Ꜳ": "AA", "Æ": "AE", "Ǽ": "AE", "Ǣ": "AE", "Ꜵ": "AO", "Ꜷ": "AU", "Ꜹ": "AV", "Ꜻ": "AV", "Ꜽ": "AY", "Ⓑ": "B", "B": "B", "Ḃ": "B", "Ḅ": "B", "Ḇ": "B", "Ƀ": "B", "Ƃ": "B", "Ɓ": "B", "Ⓒ": "C", "C": "C", "Ć": "C", "Ĉ": "C", "Ċ": "C", "Č": "C", "Ç": "C", "Ḉ": "C", "Ƈ": "C", "Ȼ": "C", "Ꜿ": "C", "Ⓓ": "D", "D": "D", "Ḋ": "D", "Ď": "D", "Ḍ": "D", "Ḑ": "D", "Ḓ": "D", "Ḏ": "D", "Đ": "D", "Ƌ": "D", "Ɗ": "D", "Ɖ": "D", "Ꝺ": "D", "DZ": "DZ", "DŽ": "DZ", "Dz": "Dz", "Dž": "Dz", "Ⓔ": "E", "E": "E", "È": "E", "É": "E", "Ê": "E", "Ề": "E", "Ế": "E", "Ễ": "E", "Ể": "E", "Ẽ": "E", "Ē": "E", "Ḕ": "E", "Ḗ": "E", "Ĕ": "E", "Ė": "E", "Ë": "E", "Ẻ": "E", "Ě": "E", "Ȅ": "E", "Ȇ": "E", "Ẹ": "E", "Ệ": "E", "Ȩ": "E", "Ḝ": "E", "Ę": "E", "Ḙ": "E", "Ḛ": "E", "Ɛ": "E", "Ǝ": "E", "Ⓕ": "F", "F": "F", "Ḟ": "F", "Ƒ": "F", "Ꝼ": "F", "Ⓖ": "G", "G": "G", "Ǵ": "G", "Ĝ": "G", "Ḡ": "G", "Ğ": "G", "Ġ": "G", "Ǧ": "G", "Ģ": "G", "Ǥ": "G", "Ɠ": "G", "Ꞡ": "G", "Ᵹ": "G", "Ꝿ": "G", "Ⓗ": "H", "H": "H", "Ĥ": "H", "Ḣ": "H", "Ḧ": "H", "Ȟ": "H", "Ḥ": "H", "Ḩ": "H", "Ḫ": "H", "Ħ": "H", "Ⱨ": "H", "Ⱶ": "H", "Ɥ": "H", "Ⓘ": "I", "I": "I", "Ì": "I", "Í": "I", "Î": "I", "Ĩ": "I", "Ī": "I", "Ĭ": "I", "İ": "I", "Ï": "I", "Ḯ": "I", "Ỉ": "I", "Ǐ": "I", "Ȉ": "I", "Ȋ": "I", "Ị": "I", "Į": "I", "Ḭ": "I", "Ɨ": "I", "Ⓙ": "J", "J": "J", "Ĵ": "J", "Ɉ": "J", "Ⓚ": "K", "K": "K", "Ḱ": "K", "Ǩ": "K", "Ḳ": "K", "Ķ": "K", "Ḵ": "K", "Ƙ": "K", "Ⱪ": "K", "Ꝁ": "K", "Ꝃ": "K", "Ꝅ": "K", "Ꞣ": "K", "Ⓛ": "L", "L": "L", "Ŀ": "L", "Ĺ": "L", "Ľ": "L", "Ḷ": "L", "Ḹ": "L", "Ļ": "L", "Ḽ": "L", "Ḻ": "L", "Ł": "L", "Ƚ": "L", "Ɫ": "L", "Ⱡ": "L", "Ꝉ": "L", "Ꝇ": "L", "Ꞁ": "L", "LJ": "LJ", "Lj": "Lj", "Ⓜ": "M", "M": "M", "Ḿ": "M", "Ṁ": "M", "Ṃ": "M", "Ɱ": "M", "Ɯ": "M", "Ⓝ": "N", "N": "N", "Ǹ": "N", "Ń": "N", "Ñ": "N", "Ṅ": "N", "Ň": "N", "Ṇ": "N", "Ņ": "N", "Ṋ": "N", "Ṉ": "N", "Ƞ": "N", "Ɲ": "N", "Ꞑ": "N", "Ꞥ": "N", "NJ": "NJ", "Nj": "Nj", "Ⓞ": "O", "O": "O", "Ò": "O", "Ó": "O", "Ô": "O", "Ồ": "O", "Ố": "O", "Ỗ": "O", "Ổ": "O", "Õ": "O", "Ṍ": "O", "Ȭ": "O", "Ṏ": "O", "Ō": "O", "Ṑ": "O", "Ṓ": "O", "Ŏ": "O", "Ȯ": "O", "Ȱ": "O", "Ö": "O", "Ȫ": "O", "Ỏ": "O", "Ő": "O", "Ǒ": "O", "Ȍ": "O", "Ȏ": "O", "Ơ": "O", "Ờ": "O", "Ớ": "O", "Ỡ": "O", "Ở": "O", "Ợ": "O", "Ọ": "O", "Ộ": "O", "Ǫ": "O", "Ǭ": "O", "Ø": "O", "Ǿ": "O", "Ɔ": "O", "Ɵ": "O", "Ꝋ": "O", "Ꝍ": "O", "Œ": "OE", "Ƣ": "OI", "Ꝏ": "OO", "Ȣ": "OU", "Ⓟ": "P", "P": "P", "Ṕ": "P", "Ṗ": "P", "Ƥ": "P", "Ᵽ": "P", "Ꝑ": "P", "Ꝓ": "P", "Ꝕ": "P", "Ⓠ": "Q", "Q": "Q", "Ꝗ": "Q", "Ꝙ": "Q", "Ɋ": "Q", "Ⓡ": "R", "R": "R", "Ŕ": "R", "Ṙ": "R", "Ř": "R", "Ȑ": "R", "Ȓ": "R", "Ṛ": "R", "Ṝ": "R", "Ŗ": "R", "Ṟ": "R", "Ɍ": "R", "Ɽ": "R", "Ꝛ": "R", "Ꞧ": "R", "Ꞃ": "R", "Ⓢ": "S", "S": "S", "ẞ": "S", "Ś": "S", "Ṥ": "S", "Ŝ": "S", "Ṡ": "S", "Š": "S", "Ṧ": "S", "Ṣ": "S", "Ṩ": "S", "Ș": "S", "Ş": "S", "Ȿ": "S", "Ꞩ": "S", "Ꞅ": "S", "Ⓣ": "T", "T": "T", "Ṫ": "T", "Ť": "T", "Ṭ": "T", "Ț": "T", "Ţ": "T", "Ṱ": "T", "Ṯ": "T", "Ŧ": "T", "Ƭ": "T", "Ʈ": "T", "Ⱦ": "T", "Ꞇ": "T", "Ꜩ": "TZ", "Ⓤ": "U", "U": "U", "Ù": "U", "Ú": "U", "Û": "U", "Ũ": "U", "Ṹ": "U", "Ū": "U", "Ṻ": "U", "Ŭ": "U", "Ü": "U", "Ǜ": "U", "Ǘ": "U", "Ǖ": "U", "Ǚ": "U", "Ủ": "U", "Ů": "U", "Ű": "U", "Ǔ": "U", "Ȕ": "U", "Ȗ": "U", "Ư": "U", "Ừ": "U", "Ứ": "U", "Ữ": "U", "Ử": "U", "Ự": "U", "Ụ": "U", "Ṳ": "U", "Ų": "U", "Ṷ": "U", "Ṵ": "U", "Ʉ": "U", "Ⓥ": "V", "V": "V", "Ṽ": "V", "Ṿ": "V", "Ʋ": "V", "Ꝟ": "V", "Ʌ": "V", "Ꝡ": "VY", "Ⓦ": "W", "W": "W", "Ẁ": "W", "Ẃ": "W", "Ŵ": "W", "Ẇ": "W", "Ẅ": "W", "Ẉ": "W", "Ⱳ": "W", "Ⓧ": "X", "X": "X", "Ẋ": "X", "Ẍ": "X", "Ⓨ": "Y", "Y": "Y", "Ỳ": "Y", "Ý": "Y", "Ŷ": "Y", "Ỹ": "Y", "Ȳ": "Y", "Ẏ": "Y", "Ÿ": "Y", "Ỷ": "Y", "Ỵ": "Y", "Ƴ": "Y", "Ɏ": "Y", "Ỿ": "Y", "Ⓩ": "Z", "Z": "Z", "Ź": "Z", "Ẑ": "Z", "Ż": "Z", "Ž": "Z", "Ẓ": "Z", "Ẕ": "Z", "Ƶ": "Z", "Ȥ": "Z", "Ɀ": "Z", "Ⱬ": "Z", "Ꝣ": "Z", "ⓐ": "a", "a": "a", "ẚ": "a", "à": "a", "á": "a", "â": "a", "ầ": "a", "ấ": "a", "ẫ": "a", "ẩ": "a", "ã": "a", "ā": "a", "ă": "a", "ằ": "a", "ắ": "a", "ẵ": "a", "ẳ": "a", "ȧ": "a", "ǡ": "a", "ä": "a", "ǟ": "a", "ả": "a", "å": "a", "ǻ": "a", "ǎ": "a", "ȁ": "a", "ȃ": "a", "ạ": "a", "ậ": "a", "ặ": "a", "ḁ": "a", "ą": "a", "ⱥ": "a", "ɐ": "a", "ꜳ": "aa", "æ": "ae", "ǽ": "ae", "ǣ": "ae", "ꜵ": "ao", "ꜷ": "au", "ꜹ": "av", "ꜻ": "av", "ꜽ": "ay", "ⓑ": "b", "b": "b", "ḃ": "b", "ḅ": "b", "ḇ": "b", "ƀ": "b", "ƃ": "b", "ɓ": "b", "ⓒ": "c", "c": "c", "ć": "c", "ĉ": "c", "ċ": "c", "č": "c", "ç": "c", "ḉ": "c", "ƈ": "c", "ȼ": "c", "ꜿ": "c", "ↄ": "c", "ⓓ": "d", "d": "d", "ḋ": "d", "ď": "d", "ḍ": "d", "ḑ": "d", "ḓ": "d", "ḏ": "d", "đ": "d", "ƌ": "d", "ɖ": "d", "ɗ": "d", "ꝺ": "d", "dz": "dz", "dž": "dz", "ⓔ": "e", "e": "e", "è": "e", "é": "e", "ê": "e", "ề": "e", "ế": "e", "ễ": "e", "ể": "e", "ẽ": "e", "ē": "e", "ḕ": "e", "ḗ": "e", "ĕ": "e", "ė": "e", "ë": "e", "ẻ": "e", "ě": "e", "ȅ": "e", "ȇ": "e", "ẹ": "e", "ệ": "e", "ȩ": "e", "ḝ": "e", "ę": "e", "ḙ": "e", "ḛ": "e", "ɇ": "e", "ɛ": "e", "ǝ": "e", "ⓕ": "f", "f": "f", "ḟ": "f", "ƒ": "f", "ꝼ": "f", "ⓖ": "g", "g": "g", "ǵ": "g", "ĝ": "g", "ḡ": "g", "ğ": "g", "ġ": "g", "ǧ": "g", "ģ": "g", "ǥ": "g", "ɠ": "g", "ꞡ": "g", "ᵹ": "g", "ꝿ": "g", "ⓗ": "h", "h": "h", "ĥ": "h", "ḣ": "h", "ḧ": "h", "ȟ": "h", "ḥ": "h", "ḩ": "h", "ḫ": "h", "ẖ": "h", "ħ": "h", "ⱨ": "h", "ⱶ": "h", "ɥ": "h", "ƕ": "hv", "ⓘ": "i", "i": "i", "ì": "i", "í": "i", "î": "i", "ĩ": "i", "ī": "i", "ĭ": "i", "ï": "i", "ḯ": "i", "ỉ": "i", "ǐ": "i", "ȉ": "i", "ȋ": "i", "ị": "i", "į": "i", "ḭ": "i", "ɨ": "i", "ı": "i", "ⓙ": "j", "j": "j", "ĵ": "j", "ǰ": "j", "ɉ": "j", "ⓚ": "k", "k": "k", "ḱ": "k", "ǩ": "k", "ḳ": "k", "ķ": "k", "ḵ": "k", "ƙ": "k", "ⱪ": "k", "ꝁ": "k", "ꝃ": "k", "ꝅ": "k", "ꞣ": "k", "ⓛ": "l", "l": "l", "ŀ": "l", "ĺ": "l", "ľ": "l", "ḷ": "l", "ḹ": "l", "ļ": "l", "ḽ": "l", "ḻ": "l", "ſ": "l", "ł": "l", "ƚ": "l", "ɫ": "l", "ⱡ": "l", "ꝉ": "l", "ꞁ": "l", "ꝇ": "l", "lj": "lj", "ⓜ": "m", "m": "m", "ḿ": "m", "ṁ": "m", "ṃ": "m", "ɱ": "m", "ɯ": "m", "ⓝ": "n", "n": "n", "ǹ": "n", "ń": "n", "ñ": "n", "ṅ": "n", "ň": "n", "ṇ": "n", "ņ": "n", "ṋ": "n", "ṉ": "n", "ƞ": "n", "ɲ": "n", "ʼn": "n", "ꞑ": "n", "ꞥ": "n", "nj": "nj", "ⓞ": "o", "o": "o", "ò": "o", "ó": "o", "ô": "o", "ồ": "o", "ố": "o", "ỗ": "o", "ổ": "o", "õ": "o", "ṍ": "o", "ȭ": "o", "ṏ": "o", "ō": "o", "ṑ": "o", "ṓ": "o", "ŏ": "o", "ȯ": "o", "ȱ": "o", "ö": "o", "ȫ": "o", "ỏ": "o", "ő": "o", "ǒ": "o", "ȍ": "o", "ȏ": "o", "ơ": "o", "ờ": "o", "ớ": "o", "ỡ": "o", "ở": "o", "ợ": "o", "ọ": "o", "ộ": "o", "ǫ": "o", "ǭ": "o", "ø": "o", "ǿ": "o", "ɔ": "o", "ꝋ": "o", "ꝍ": "o", "ɵ": "o", "œ": "oe", "ƣ": "oi", "ȣ": "ou", "ꝏ": "oo", "ⓟ": "p", "p": "p", "ṕ": "p", "ṗ": "p", "ƥ": "p", "ᵽ": "p", "ꝑ": "p", "ꝓ": "p", "ꝕ": "p", "ⓠ": "q", "q": "q", "ɋ": "q", "ꝗ": "q", "ꝙ": "q", "ⓡ": "r", "r": "r", "ŕ": "r", "ṙ": "r", "ř": "r", "ȑ": "r", "ȓ": "r", "ṛ": "r", "ṝ": "r", "ŗ": "r", "ṟ": "r", "ɍ": "r", "ɽ": "r", "ꝛ": "r", "ꞧ": "r", "ꞃ": "r", "ⓢ": "s", "s": "s", "ß": "s", "ś": "s", "ṥ": "s", "ŝ": "s", "ṡ": "s", "š": "s", "ṧ": "s", "ṣ": "s", "ṩ": "s", "ș": "s", "ş": "s", "ȿ": "s", "ꞩ": "s", "ꞅ": "s", "ẛ": "s", "ⓣ": "t", "t": "t", "ṫ": "t", "ẗ": "t", "ť": "t", "ṭ": "t", "ț": "t", "ţ": "t", "ṱ": "t", "ṯ": "t", "ŧ": "t", "ƭ": "t", "ʈ": "t", "ⱦ": "t", "ꞇ": "t", "ꜩ": "tz", "ⓤ": "u", "u": "u", "ù": "u", "ú": "u", "û": "u", "ũ": "u", "ṹ": "u", "ū": "u", "ṻ": "u", "ŭ": "u", "ü": "u", "ǜ": "u", "ǘ": "u", "ǖ": "u", "ǚ": "u", "ủ": "u", "ů": "u", "ű": "u", "ǔ": "u", "ȕ": "u", "ȗ": "u", "ư": "u", "ừ": "u", "ứ": "u", "ữ": "u", "ử": "u", "ự": "u", "ụ": "u", "ṳ": "u", "ų": "u", "ṷ": "u", "ṵ": "u", "ʉ": "u", "ⓥ": "v", "v": "v", "ṽ": "v", "ṿ": "v", "ʋ": "v", "ꝟ": "v", "ʌ": "v", "ꝡ": "vy", "ⓦ": "w", "w": "w", "ẁ": "w", "ẃ": "w", "ŵ": "w", "ẇ": "w", "ẅ": "w", "ẘ": "w", "ẉ": "w", "ⱳ": "w", "ⓧ": "x", "x": "x", "ẋ": "x", "ẍ": "x", "ⓨ": "y", "y": "y", "ỳ": "y", "ý": "y", "ŷ": "y", "ỹ": "y", "ȳ": "y", "ẏ": "y", "ÿ": "y", "ỷ": "y", "ẙ": "y", "ỵ": "y", "ƴ": "y", "ɏ": "y", "ỿ": "y", "ⓩ": "z", "z": "z", "ź": "z", "ẑ": "z", "ż": "z", "ž": "z", "ẓ": "z", "ẕ": "z", "ƶ": "z", "ȥ": "z", "ɀ": "z", "ⱬ": "z", "ꝣ": "z", "Ά": "Α", "Έ": "Ε", "Ή": "Η", "Ί": "Ι", "Ϊ": "Ι", "Ό": "Ο", "Ύ": "Υ", "Ϋ": "Υ", "Ώ": "Ω", "ά": "α", "έ": "ε", "ή": "η", "ί": "ι", "ϊ": "ι", "ΐ": "ι", "ό": "ο", "ύ": "υ", "ϋ": "υ", "ΰ": "υ", "ώ": "ω", "ς": "σ", "’": "'" } }), t.define("select2/data/base", ["../utils"], function (n) { function t() { t.__super__.constructor.call(this) } return n.Extend(t, n.Observable), t.prototype.current = function () { throw new Error("The `current` method must be defined in child classes."); }, t.prototype.query = function () { throw new Error("The `query` method must be defined in child classes."); }, t.prototype.bind = function () { }, t.prototype.destroy = function () { }, t.prototype.generateResultId = function (t, i) { var r = t.id + "-result-"; return r += n.generateChars(4), r += null != i.id ? "-" + i.id.toString() : "-" + n.generateChars(4), r }, t }), t.define("select2/data/select", ["./base", "../utils", "jquery"], function (n, t, i) { function r(n, t) { this.$element = n; this.options = t; r.__super__.constructor.call(this) } return t.Extend(r, n), r.prototype.current = function (n) { var t = [], r = this; this.$element.find(":selected").each(function () { var n = i(this), u = r.item(n); t.push(u) }); n(t) }, r.prototype.select = function (n) { var t = this, r; if (n.selected = !0, i(n.element).is("option")) return n.element.selected = !0, void this.$element.trigger("input").trigger("change"); this.$element.prop("multiple") ? this.current(function (r) { var f = [], u, e; for ((n = [n]).push.apply(n, r), u = 0; u < n.length; u++)e = n[u].id, -1 === i.inArray(e, f) && f.push(e); t.$element.val(f); t.$element.trigger("input").trigger("change") }) : (r = n.id, this.$element.val(r), this.$element.trigger("input").trigger("change")) }, r.prototype.unselect = function (n) { var t = this; if (this.$element.prop("multiple")) { if (n.selected = !1, i(n.element).is("option")) return n.element.selected = !1, void this.$element.trigger("input").trigger("change"); this.current(function (r) { for (var e, u = [], f = 0; f < r.length; f++)e = r[f].id, e !== n.id && -1 === i.inArray(e, u) && u.push(e); t.$element.val(u); t.$element.trigger("input").trigger("change") }) } }, r.prototype.bind = function (n) { var t = this; (this.container = n).on("select", function (n) { t.select(n.data) }); n.on("unselect", function (n) { t.unselect(n.data) }) }, r.prototype.destroy = function () { this.$element.find("*").each(function () { t.RemoveData(this) }) }, r.prototype.query = function (n, t) { var r = [], u = this; this.$element.children().each(function () { var t = i(this), e, f; (t.is("option") || t.is("optgroup")) && (e = u.item(t), f = u.matches(n, e), null !== f && r.push(f)) }); t({ results: r }) }, r.prototype.addOptions = function (n) { t.appendMany(this.$element, n) }, r.prototype.option = function (n) { var r, f, u; return n.children ? (r = document.createElement("optgroup")).label = n.text : void 0 !== (r = document.createElement("option")).textContent ? r.textContent = n.text : r.innerText = n.text, void 0 !== n.id && (r.value = n.id), n.disabled && (r.disabled = !0), n.selected && (r.selected = !0), n.title && (r.title = n.title), f = i(r), u = this._normalizeItem(n), u.element = r, t.StoreData(r, "data", u), f }, r.prototype.item = function (n) { var r = {}, o, s; if (null != (r = t.GetData(n[0], "data"))) return r; if (n.is("option")) r = { id: n.val(), text: n.text(), disabled: n.prop("disabled"), selected: n.prop("selected"), title: n.prop("title") }; else if (n.is("optgroup")) { r = { text: n.prop("label"), children: [], title: n.prop("title") }; for (var f = n.children("option"), e = [], u = 0; u < f.length; u++)o = i(f[u]), s = this.item(o), e.push(s); r.children = e } return (r = this._normalizeItem(r)).element = n[0], t.StoreData(n[0], "data", r), r }, r.prototype._normalizeItem = function (n) { return n !== Object(n) && (n = { id: n, text: n }), null != (n = i.extend({}, { text: "" }, n)).id && (n.id = n.id.toString()), null != n.text && (n.text = n.text.toString()), null == n._resultId && n.id && null != this.container && (n._resultId = this.generateResultId(this.container, n)), i.extend({}, { selected: !1, disabled: !1 }, n) }, r.prototype.matches = function (n, t) { return this.options.get("matcher")(n, t) }, r }), t.define("select2/data/array", ["./select", "../utils", "jquery"], function (n, t, i) { function r(n, t) { this._dataToConvert = t.get("data") || []; r.__super__.constructor.call(this, n, t) } return t.Extend(r, n), r.prototype.bind = function (n, t) { r.__super__.bind.call(this, n, t); this.addOptions(this.convertToOptions(this._dataToConvert)) }, r.prototype.select = function (n) { var t = this.$element.find("option").filter(function (t, i) { return i.value == n.id.toString() }); 0 === t.length && (t = this.option(n), this.addOptions(t)); r.__super__.select.call(this, n) }, r.prototype.convertToOptions = function (n) { function a(n) { return function () { return i(this).val() == n.id } } for (var r, f, h, c = this, e = this.$element.find("option"), l = e.map(function () { return c.item(i(this)).id }).get(), o = [], u = 0; u < n.length; u++)if (r = this._normalizeItem(n[u]), 0 <= i.inArray(r.id, l)) { var s = e.filter(a(r)), v = this.item(s), y = i.extend(!0, {}, r, v), p = this.option(y); s.replaceWith(p) } else f = this.option(r), r.children && (h = this.convertToOptions(r.children), t.appendMany(f, h)), o.push(f); return o }, r }), t.define("select2/data/ajax", ["./array", "../utils", "jquery"], function (n, t, i) { function r(n, t) { this.ajaxOptions = this._applyDefaults(t.get("ajax")); null != this.ajaxOptions.processResults && (this.processResults = this.ajaxOptions.processResults); r.__super__.constructor.call(this, n, t) } return t.Extend(r, n), r.prototype._applyDefaults = function (n) { var t = { data: function (n) { return i.extend({}, n, { q: n.term }) }, transport: function (n, t, r) { var u = i.ajax(n); return u.then(t), u.fail(r), u } }; return i.extend({}, t, n, !0) }, r.prototype.processResults = function (n) { return n }, r.prototype.query = function (n, t) { function f() { var f = r.transport(r, function (r) { var f = u.processResults(r, n); u.options.get("debug") && window.console && console.error && (f && f.results && i.isArray(f.results) || console.error("Select2: The AJAX results did not return an array in the `results` key of the response.")); t(f) }, function () { "status" in f && (0 === f.status || "0" === f.status) || u.trigger("results:message", { message: "errorLoading" }) }); u._request = f } var u = this, r; null != this._request && (i.isFunction(this._request.abort) && this._request.abort(), this._request = null); r = i.extend({ type: "GET" }, this.ajaxOptions); "function" == typeof r.url && (r.url = r.url.call(this.$element, n)); "function" == typeof r.data && (r.data = r.data.call(this.$element, n)); this.ajaxOptions.delay && null != n.term ? (this._queryTimeout && window.clearTimeout(this._queryTimeout), this._queryTimeout = window.setTimeout(f, this.ajaxOptions.delay)) : f() }, r }), t.define("select2/data/tags", ["jquery"], function (n) { function t(t, i, r) { var f = r.get("tags"), o = r.get("createTag"), e, u; if (void 0 !== o && (this.createTag = o), e = r.get("insertTag"), void 0 !== e && (this.insertTag = e), t.call(this, i, r), n.isArray(f)) for (u = 0; u < f.length; u++) { var s = f[u], h = this._normalizeItem(s), c = this.option(h); this.$element.append(c) } } return t.prototype.query = function (n, t, i) { var r = this; this._removeOldTags(); null != t.term && null == t.page ? n.call(this, t, function n(u, f) { for (var s, l, h, c, e = u.results, o = 0; o < e.length; o++)if (s = e[o], l = null != s.children && !n({ results: s.children }, !0), (s.text || "").toUpperCase() === (t.term || "").toUpperCase() || l) return !f && (u.data = e, void i(u)); if (f) return !0; h = r.createTag(t); null != h && (c = r.option(h), c.attr("data-select2-tag", !0), r.addOptions([c]), r.insertTag(e, h)); u.results = e; i(u) }) : n.call(this, t, i) }, t.prototype.createTag = function (t, i) { var r = n.trim(i.term); return "" === r ? null : { id: r, text: r } }, t.prototype.insertTag = function (n, t, i) { t.unshift(i) }, t.prototype._removeOldTags = function () { this.$element.find("option[data-select2-tag]").each(function () { this.selected || n(this).remove() }) }, t }), t.define("select2/data/tokenizer", ["jquery"], function (n) { function t(n, t, i) { var r = i.get("tokenizer"); void 0 !== r && (this.tokenizer = r); n.call(this, t, i) } return t.prototype.bind = function (n, t, i) { n.call(this, t, i); this.$search = t.dropdown.$search || t.selection.$search || i.find(".select2-search__field") }, t.prototype.query = function (t, i, r) { var u = this, f; i.term = i.term || ""; f = this.tokenizer(i, this.options, function (t) { var f, i = u._normalizeItem(t), r; u.$element.find("option").filter(function () { return n(this).val() === i.id }).length || (r = u.option(i), r.attr("data-select2-tag", !0), u._removeOldTags(), u.addOptions([r])); f = i; u.trigger("select", { data: f }) }); f.term !== i.term && (this.$search.length && (this.$search.val(f.term), this.$search.trigger("focus")), i.term = f.term); t.call(this, i, r) }, t.prototype.tokenizer = function (t, i, r, u) { for (var s, h, o, c = r.get("tokenSeparators") || [], e = i.term, f = 0, l = this.createTag || function (n) { return { id: n.term, text: n.term } }; f < e.length;)s = e[f], -1 !== n.inArray(s, c) ? (h = e.substr(0, f), o = l(n.extend({}, i, { term: h })), null != o ? (u(o), e = e.substr(f + 1) || "", f = 0) : f++) : f++; return { term: e } }, t }), t.define("select2/data/minimumInputLength", [], function () { function n(n, t, i) { this.minimumInputLength = i.get("minimumInputLength"); n.call(this, t, i) } return n.prototype.query = function (n, t, i) { t.term = t.term || ""; t.term.length < this.minimumInputLength ? this.trigger("results:message", { message: "inputTooShort", args: { minimum: this.minimumInputLength, input: t.term, params: t } }) : n.call(this, t, i) }, n }), t.define("select2/data/maximumInputLength", [], function () { function n(n, t, i) { this.maximumInputLength = i.get("maximumInputLength"); n.call(this, t, i) } return n.prototype.query = function (n, t, i) { t.term = t.term || ""; 0 < this.maximumInputLength && t.term.length > this.maximumInputLength ? this.trigger("results:message", { message: "inputTooLong", args: { maximum: this.maximumInputLength, input: t.term, params: t } }) : n.call(this, t, i) }, n }), t.define("select2/data/maximumSelectionLength", [], function () { function n(n, t, i) { this.maximumSelectionLength = i.get("maximumSelectionLength"); n.call(this, t, i) } return n.prototype.bind = function (n, t, i) { var r = this; n.call(this, t, i); t.on("select", function () { r._checkIfMaximumSelected() }) }, n.prototype.query = function (n, t, i) { var r = this; this._checkIfMaximumSelected(function () { n.call(r, t, i) }) }, n.prototype._checkIfMaximumSelected = function (n, t) { var i = this; this.current(function (n) { var r = null != n ? n.length : 0; 0 < i.maximumSelectionLength && r >= i.maximumSelectionLength ? i.trigger("results:message", { message: "maximumSelected", args: { maximum: i.maximumSelectionLength } }) : t && t() }) }, n }), t.define("select2/dropdown", ["jquery", "./utils"], function (n, t) { function i(n, t) { this.$element = n; this.options = t; i.__super__.constructor.call(this) } return t.Extend(i, t.Observable), i.prototype.render = function () { var t = n('<span class="select2-dropdown"><span class="select2-results"><\/span><\/span>'); return t.attr("dir", this.options.get("dir")), this.$dropdown = t }, i.prototype.bind = function () { }, i.prototype.position = function () { }, i.prototype.destroy = function () { this.$dropdown.remove() }, i }), t.define("select2/dropdown/search", ["jquery", "../utils"], function (n) { function t() { } return t.prototype.render = function (t) { var r = t.call(this), i = n('<span class="select2-search select2-search--dropdown"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="none" spellcheck="false" role="searchbox" aria-autocomplete="list" /><\/span>'); return this.$searchContainer = i, this.$search = i.find("input"), r.prepend(i), r }, t.prototype.bind = function (t, i, r) { var u = this, f = i.id + "-results"; t.call(this, i, r); this.$search.on("keydown", function (n) { u.trigger("keypress", n); u._keyUpPrevented = n.isDefaultPrevented() }); this.$search.on("input", function () { n(this).off("keyup") }); this.$search.on("keyup input", function (n) { u.handleSearch(n) }); i.on("open", function () { u.$search.attr("tabindex", 0); u.$search.attr("aria-controls", f); u.$search.trigger("focus"); window.setTimeout(function () { u.$search.trigger("focus") }, 0) }); i.on("close", function () { u.$search.attr("tabindex", -1); u.$search.removeAttr("aria-controls"); u.$search.removeAttr("aria-activedescendant"); u.$search.val(""); u.$search.trigger("blur") }); i.on("focus", function () { i.isOpen() || u.$search.trigger("focus") }); i.on("results:all", function (n) { null != n.query.term && "" !== n.query.term || (u.showSearch(n) ? u.$searchContainer.removeClass("select2-search--hide") : u.$searchContainer.addClass("select2-search--hide")) }); i.on("results:focus", function (n) { n.data._resultId ? u.$search.attr("aria-activedescendant", n.data._resultId) : u.$search.removeAttr("aria-activedescendant") }) }, t.prototype.handleSearch = function () { if (!this._keyUpPrevented) { var n = this.$search.val(); this.trigger("query", { term: n }) } this._keyUpPrevented = !1 }, t.prototype.showSearch = function () { return !0 }, t }), t.define("select2/dropdown/hidePlaceholder", [], function () { function n(n, t, i, r) { this.placeholder = this.normalizePlaceholder(i.get("placeholder")); n.call(this, t, i, r) } return n.prototype.append = function (n, t) { t.results = this.removePlaceholder(t.results); n.call(this, t) }, n.prototype.normalizePlaceholder = function (n, t) { return "string" == typeof t && (t = { id: "", text: t }), t }, n.prototype.removePlaceholder = function (n, t) { for (var u, r = t.slice(0), i = t.length - 1; 0 <= i; i--)u = t[i], this.placeholder.id === u.id && r.splice(i, 1); return r }, n }), t.define("select2/dropdown/infiniteScroll", ["jquery"], function (n) { function t(n, t, i, r) { this.lastParams = {}; n.call(this, t, i, r); this.$loadingMore = this.createLoadingMore(); this.loading = !1 } return t.prototype.append = function (n, t) { this.$loadingMore.remove(); this.loading = !1; n.call(this, t); this.showLoadingMore(t) && (this.$results.append(this.$loadingMore), this.loadMoreIfNeeded()) }, t.prototype.bind = function (n, t, i) { var r = this; n.call(this, t, i); t.on("query", function (n) { r.lastParams = n; r.loading = !0 }); t.on("query:append", function (n) { r.lastParams = n; r.loading = !0 }); this.$results.on("scroll", this.loadMoreIfNeeded.bind(this)) }, t.prototype.loadMoreIfNeeded = function () { var i = n.contains(document.documentElement, this.$loadingMore[0]), t; !this.loading && i && (t = this.$results.offset().top + this.$results.outerHeight(!1), this.$loadingMore.offset().top + this.$loadingMore.outerHeight(!1) <= t + 50 && this.loadMore()) }, t.prototype.loadMore = function () { this.loading = !0; var t = n.extend({}, { page: 1 }, this.lastParams); t.page++; this.trigger("query:append", t) }, t.prototype.showLoadingMore = function (n, t) { return t.pagination && t.pagination.more }, t.prototype.createLoadingMore = function () { var t = n('<li class="select2-results__option select2-results__option--load-more"role="option" aria-disabled="true"><\/li>'), i = this.options.get("translations").get("loadingMore"); return t.html(i(this.lastParams)), t }, t }), t.define("select2/dropdown/attachBody", ["jquery", "../utils"], function (n, t) { function i(t, i, r) { this.$dropdownParent = n(r.get("dropdownParent") || document.body); t.call(this, i, r) } return i.prototype.bind = function (n, t, i) { var r = this; n.call(this, t, i); t.on("open", function () { r._showDropdown(); r._attachPositioningHandler(t); r._bindContainerResultHandlers(t) }); t.on("close", function () { r._hideDropdown(); r._detachPositioningHandler(t) }); this.$dropdownContainer.on("mousedown", function (n) { n.stopPropagation() }) }, i.prototype.destroy = function (n) { n.call(this); this.$dropdownContainer.remove() }, i.prototype.position = function (n, t, i) { t.attr("class", i.attr("class")); t.removeClass("select2"); t.addClass("select2-container--open"); t.css({ position: "absolute", top: -999999 }); this.$container = i }, i.prototype.render = function (t) { var i = n("<span><\/span>"), r = t.call(this); return i.append(r), this.$dropdownContainer = i }, i.prototype._hideDropdown = function () { this.$dropdownContainer.detach() }, i.prototype._bindContainerResultHandlers = function (n, t) { if (!this._containerResultsHandlersBound) { var i = this; t.on("results:all", function () { i._positionDropdown(); i._resizeDropdown() }); t.on("results:append", function () { i._positionDropdown(); i._resizeDropdown() }); t.on("results:message", function () { i._positionDropdown(); i._resizeDropdown() }); t.on("select", function () { i._positionDropdown(); i._resizeDropdown() }); t.on("unselect", function () { i._positionDropdown(); i._resizeDropdown() }); this._containerResultsHandlersBound = !0 } }, i.prototype._attachPositioningHandler = function (i, r) { var u = this, f = "scroll.select2." + r.id, o = "resize.select2." + r.id, s = "orientationchange.select2." + r.id, e = this.$container.parents().filter(t.hasScroll); e.each(function () { t.StoreData(this, "select2-scroll-position", { x: n(this).scrollLeft(), y: n(this).scrollTop() }) }); e.on(f, function () { var i = t.GetData(this, "select2-scroll-position"); n(this).scrollTop(i.y) }); n(window).on(f + " " + o + " " + s, function () { u._positionDropdown(); u._resizeDropdown() }) }, i.prototype._detachPositioningHandler = function (i, r) { var u = "scroll.select2." + r.id, f = "resize.select2." + r.id, e = "orientationchange.select2." + r.id; this.$container.parents().filter(t.hasScroll).off(u); n(window).off(u + " " + f + " " + e) }, i.prototype._positionDropdown = function () { var s = n(window), e = this.$dropdown.hasClass("select2-dropdown--above"), a = this.$dropdown.hasClass("select2-dropdown--below"), t = null, i = this.$container.offset(), r, f; i.bottom = i.top + this.$container.outerHeight(!1); r = { height: this.$container.outerHeight(!1) }; r.top = i.top; r.bottom = i.top + r.height; var h = this.$dropdown.outerHeight(!1), v = s.scrollTop(), y = s.scrollTop() + s.height(), c = v < i.top - h, l = y > i.bottom + h, o = { left: i.left, top: r.bottom }, u = this.$dropdownParent; "static" === u.css("position") && (u = u.offsetParent()); f = { top: 0, left: 0 }; (n.contains(document.body, u[0]) || u[0].isConnected) && (f = u.offset()); o.top -= f.top; o.left -= f.left; e || a || (t = "below"); l || !c || e ? !c && l && e && (t = "below") : t = "above"; ("above" == t || e && "below" !== t) && (o.top = r.top - f.top - h); null != t && (this.$dropdown.removeClass("select2-dropdown--below select2-dropdown--above").addClass("select2-dropdown--" + t), this.$container.removeClass("select2-container--below select2-container--above").addClass("select2-container--" + t)); this.$dropdownContainer.css(o) }, i.prototype._resizeDropdown = function () { var n = { width: this.$container.outerWidth(!1) + "px" }; this.options.get("dropdownAutoWidth") && (n.minWidth = n.width, n.position = "relative", n.width = "auto"); this.$dropdown.css(n) }, i.prototype._showDropdown = function () { this.$dropdownContainer.appendTo(this.$dropdownParent); this._positionDropdown(); this._resizeDropdown() }, i }), t.define("select2/dropdown/minimumResultsForSearch", [], function () { function n(n, t, i, r) { this.minimumResultsForSearch = i.get("minimumResultsForSearch"); this.minimumResultsForSearch < 0 && (this.minimumResultsForSearch = 1 / 0); n.call(this, t, i, r) } return n.prototype.showSearch = function (n, t) { return !(function n(t) { for (var u, i = 0, r = 0; r < t.length; r++)u = t[r], u.children ? i += n(u.children) : i++; return i }(t.data.results) < this.minimumResultsForSearch) && n.call(this, t) }, n }), t.define("select2/dropdown/selectOnClose", ["../utils"], function (n) { function t() { } return t.prototype.bind = function (n, t, i) { var r = this; n.call(this, t, i); t.on("close", function (n) { r._handleSelectOnClose(n) }) }, t.prototype._handleSelectOnClose = function (t, i) { var u, f, r; i && null != i.originalSelect2Event && (u = i.originalSelect2Event, "select" === u._type || "unselect" === u._type) || (f = this.getHighlightedResults(), f.length < 1 || (r = n.GetData(f[0], "data"), null != r.element && r.element.selected || null == r.element && r.selected || this.trigger("select", { data: r }))) }, t }), t.define("select2/dropdown/closeOnSelect", [], function () { function n() { } return n.prototype.bind = function (n, t, i) { var r = this; n.call(this, t, i); t.on("select", function (n) { r._selectTriggered(n) }); t.on("unselect", function (n) { r._selectTriggered(n) }) }, n.prototype._selectTriggered = function (n, t) { var i = t.originalEvent; i && (i.ctrlKey || i.metaKey) || this.trigger("close", { originalEvent: i, originalSelect2Event: t }) }, n }), t.define("select2/i18n/en", [], function () { return { errorLoading: function () { return "The results could not be loaded." }, inputTooLong: function (n) { var t = n.input.length - n.maximum, i = "Please delete " + t + " character"; return 1 != t && (i += "s"), i }, inputTooShort: function (n) { return "Please enter " + (n.minimum - n.input.length) + " or more characters" }, loadingMore: function () { return "Loading more results…" }, maximumSelected: function (n) { var t = "You can only select " + n.maximum + " item"; return 1 != n.maximum && (t += "s"), t }, noResults: function () { return "No results found" }, searching: function () { return "Searching…" }, removeAllItems: function () { return "Remove all items" } } }), t.define("select2/defaults", ["jquery", "require", "./results", "./selection/single", "./selection/multiple", "./selection/placeholder", "./selection/allowClear", "./selection/search", "./selection/eventRelay", "./utils", "./translation", "./diacritics", "./data/select", "./data/array", "./data/ajax", "./data/tags", "./data/tokenizer", "./data/minimumInputLength", "./data/maximumInputLength", "./data/maximumSelectionLength", "./dropdown", "./dropdown/search", "./dropdown/hidePlaceholder", "./dropdown/infiniteScroll", "./dropdown/attachBody", "./dropdown/minimumResultsForSearch", "./dropdown/selectOnClose", "./dropdown/closeOnSelect", "./i18n/en"], function (n, t, i, r, u, f, e, o, s, h, c, l, a, v, y, p, w, b, k, d, g, nt, tt, it, rt, ut, ft, et) { function ot() { this.reset() } return ot.prototype.apply = function (c) { var ht, ct, lt, at, vt, l, ot, st; for (null == (c = n.extend(!0, {}, this.defaults, c)).dataAdapter && ((c.dataAdapter = null != c.ajax ? y : null != c.data ? v : a, 0 < c.minimumInputLength && (c.dataAdapter = h.Decorate(c.dataAdapter, b)), 0 < c.maximumInputLength && (c.dataAdapter = h.Decorate(c.dataAdapter, k)), 0 < c.maximumSelectionLength && (c.dataAdapter = h.Decorate(c.dataAdapter, d)), c.tags && (c.dataAdapter = h.Decorate(c.dataAdapter, p)), null == c.tokenSeparators && null == c.tokenizer || (c.dataAdapter = h.Decorate(c.dataAdapter, w)), null != c.query) && (ht = t(c.amdBase + "compat/query"), c.dataAdapter = h.Decorate(c.dataAdapter, ht)), null != c.initSelection && (ct = t(c.amdBase + "compat/initSelection"), c.dataAdapter = h.Decorate(c.dataAdapter, ct))), (null == c.resultsAdapter && (c.resultsAdapter = i, null != c.ajax && (c.resultsAdapter = h.Decorate(c.resultsAdapter, it)), null != c.placeholder && (c.resultsAdapter = h.Decorate(c.resultsAdapter, tt)), c.selectOnClose && (c.resultsAdapter = h.Decorate(c.resultsAdapter, ft))), null == c.dropdownAdapter) && (c.multiple ? c.dropdownAdapter = g : (lt = h.Decorate(g, nt), c.dropdownAdapter = lt), (0 !== c.minimumResultsForSearch && (c.dropdownAdapter = h.Decorate(c.dropdownAdapter, ut)), c.closeOnSelect && (c.dropdownAdapter = h.Decorate(c.dropdownAdapter, et)), null != c.dropdownCssClass || null != c.dropdownCss || null != c.adaptDropdownCssClass) && (at = t(c.amdBase + "compat/dropdownCss"), c.dropdownAdapter = h.Decorate(c.dropdownAdapter, at)), c.dropdownAdapter = h.Decorate(c.dropdownAdapter, rt)), null == c.selectionAdapter && ((c.selectionAdapter = c.multiple ? u : r, null != c.placeholder && (c.selectionAdapter = h.Decorate(c.selectionAdapter, f)), c.allowClear && (c.selectionAdapter = h.Decorate(c.selectionAdapter, e)), c.multiple && (c.selectionAdapter = h.Decorate(c.selectionAdapter, o)), null != c.containerCssClass || null != c.containerCss || null != c.adaptContainerCssClass) && (vt = t(c.amdBase + "compat/containerCss"), c.selectionAdapter = h.Decorate(c.selectionAdapter, vt)), c.selectionAdapter = h.Decorate(c.selectionAdapter, s)), c.language = this._resolveLanguage(c.language), c.language.push("en"), l = [], ot = 0; ot < c.language.length; ot++)st = c.language[ot], -1 === l.indexOf(st) && l.push(st); return c.language = l, c.translations = this._processTranslations(c.language, c.debug), c }, ot.prototype.reset = function () { function t(n) { return n.replace(/[^\u0000-\u007E]/g, function (n) { return l[n] || n }) } this.defaults = { amdBase: "./", amdLanguageBase: "./i18n/", closeOnSelect: !0, debug: !1, dropdownAutoWidth: !1, escapeMarkup: h.escapeMarkup, language: {}, matcher: function i(r, u) { var f, e, o, s; if ("" === n.trim(r.term)) return u; if (u.children && 0 < u.children.length) { for (f = n.extend(!0, {}, u), e = u.children.length - 1; 0 <= e; e--)null == i(r, u.children[e]) && f.children.splice(e, 1); return 0 < f.children.length ? f : i(r, f) } return o = t(u.text).toUpperCase(), s = t(r.term).toUpperCase(), -1 < o.indexOf(s) ? u : null }, minimumInputLength: 0, maximumInputLength: 0, maximumSelectionLength: 0, minimumResultsForSearch: 0, selectOnClose: !1, scrollAfterSelect: !1, sorter: function (n) { return n }, templateResult: function (n) { return n.text }, templateSelection: function (n) { return n.text }, theme: "default", width: "resolve" } }, ot.prototype.applyFromElement = function (n, t) { var i = n.language, r = this.defaults.language, u = t.prop("lang"), f = t.closest("[lang]").prop("lang"), e = Array.prototype.concat.call(this._resolveLanguage(u), this._resolveLanguage(i), this._resolveLanguage(r), this._resolveLanguage(f)); return n.language = e, n }, ot.prototype._resolveLanguage = function (t) { var r, u, i, f; if (!t) return []; if (n.isEmptyObject(t)) return []; if (n.isPlainObject(t)) return [t]; for (r = n.isArray(t) ? t : [t], u = [], i = 0; i < r.length; i++)(u.push(r[i]), "string" == typeof r[i] && 0 < r[i].indexOf("-")) && (f = r[i].split("-")[0], u.push(f)); return u }, ot.prototype._processTranslations = function (t, i) { for (var u, r, e = new c, f = 0; f < t.length; f++) { if (u = new c, r = t[f], "string" == typeof r) try { u = c.loadPath(r) } catch (t) { try { r = this.defaults.amdLanguageBase + r; u = c.loadPath(r) } catch (t) { i && window.console && console.warn && console.warn('Select2: The language file for "' + r + '" could not be automatically loaded. A fallback will be used instead.') } } else u = n.isPlainObject(r) ? new c(r) : r; e.extend(u) } return e }, ot.prototype.set = function (t, i) { var r = {}, u; r[n.camelCase(t)] = i; u = h._convertData(r); n.extend(!0, this.defaults, u) }, new ot }), t.define("select2/options", ["require", "jquery", "./defaults", "./utils"], function (n, t, i, r) { function u(t, u) { if (this.options = t, null != u && this.fromElement(u), null != u && (this.options = i.applyFromElement(this.options, u)), this.options = i.apply(this.options), u && u.is("input")) { var f = n(this.get("amdBase") + "compat/inputData"); this.options.dataAdapter = r.Decorate(this.options.dataAdapter, f) } } return u.prototype.fromElement = function (n) { function a(n, t) { return t.toUpperCase() } var l = ["select2"], u, e, s, o, h, c, f, i; for (null == this.options.multiple && (this.options.multiple = n.prop("multiple")), null == this.options.disabled && (this.options.disabled = n.prop("disabled")), null == this.options.dir && (this.options.dir = n.prop("dir") ? n.prop("dir") : n.closest("[dir]").prop("dir") ? n.closest("[dir]").prop("dir") : "ltr"), n.prop("disabled", this.options.disabled), n.prop("multiple", this.options.multiple), r.GetData(n[0], "select2Tags") && (this.options.debug && window.console && console.warn && console.warn('Select2: The `data-select2-tags` attribute has been changed to use the `data-data` and `data-tags="true"` attributes and will be removed in future versions of Select2.'), r.StoreData(n[0], "data", r.GetData(n[0], "select2Tags")), r.StoreData(n[0], "tags", !0)), r.GetData(n[0], "ajaxUrl") && (this.options.debug && window.console && console.warn && console.warn("Select2: The `data-ajax-url` attribute has been changed to `data-ajax--url` and support for the old attribute will be removed in future versions of Select2."), n.attr("ajax--url", r.GetData(n[0], "ajaxUrl")), r.StoreData(n[0], "ajax-Url", r.GetData(n[0], "ajaxUrl"))), u = {}, e = 0; e < n[0].attributes.length; e++)s = n[0].attributes[e].name, o = "data-", s.substr(0, o.length) == o && (h = s.substring(o.length), c = r.GetData(n[0], h), u[h.replace(/-([a-z])/g, a)] = c); t.fn.jquery && "1." == t.fn.jquery.substr(0, 2) && n[0].dataset && (u = t.extend(!0, {}, n[0].dataset, u)); f = t.extend(!0, {}, r.GetData(n[0]), u); for (i in f = r._convertData(f)) -1 < t.inArray(i, l) || (t.isPlainObject(this.options[i]) ? t.extend(this.options[i], f[i]) : this.options[i] = f[i]); return this }, u.prototype.get = function (n) { return this.options[n] }, u.prototype.set = function (n, t) { this.options[n] = t }, u }), t.define("select2/core", ["jquery", "./options", "./utils", "./keys"], function (n, t, i, r) { var u = function (n, r) { var e, o, f, s, h, c, l; null != i.GetData(n[0], "select2") && i.GetData(n[0], "select2").destroy(); this.$element = n; this.id = this._generateId(n); r = r || {}; this.options = new t(r, n); u.__super__.constructor.call(this); e = n.attr("tabindex") || 0; i.StoreData(n[0], "old-tabindex", e); n.attr("tabindex", "-1"); o = this.options.get("dataAdapter"); this.dataAdapter = new o(n, this.options); f = this.render(); this._placeContainer(f); s = this.options.get("selectionAdapter"); this.selection = new s(n, this.options); this.$selection = this.selection.render(); this.selection.position(this.$selection, f); h = this.options.get("dropdownAdapter"); this.dropdown = new h(n, this.options); this.$dropdown = this.dropdown.render(); this.dropdown.position(this.$dropdown, f); c = this.options.get("resultsAdapter"); this.results = new c(n, this.options, this.dataAdapter); this.$results = this.results.render(); this.results.position(this.$results, this.$dropdown); l = this; this._bindAdapters(); this._registerDomEvents(); this._registerDataEvents(); this._registerSelectionEvents(); this._registerDropdownEvents(); this._registerResultsEvents(); this._registerEvents(); this.dataAdapter.current(function (n) { l.trigger("selection:update", { data: n }) }); n.addClass("select2-hidden-accessible"); n.attr("aria-hidden", "true"); this._syncAttributes(); i.StoreData(n[0], "select2", this); n.data("select2", this) }; return i.Extend(u, i.Observable), u.prototype._generateId = function (n) { return "select2-" + (null != n.attr("id") ? n.attr("id") : null != n.attr("name") ? n.attr("name") + "-" + i.generateChars(2) : i.generateChars(4)).replace(/(:|\.|\[|\]|,)/g, "") }, u.prototype._placeContainer = function (n) { n.insertAfter(this.$element); var t = this._resolveWidth(this.$element, this.options.get("width")); null != t && n.css("width", t) }, u.prototype._resolveWidth = function (n, t) { var r, u, f, i; if ("resolve" == t) return r = this._resolveWidth(n, "style"), null != r ? r : this._resolveWidth(n, "element"); if ("element" == t) return u = n.outerWidth(!1), u <= 0 ? "auto" : u + "px"; if ("style" != t) return "computedstyle" != t ? t : window.getComputedStyle(n[0]).width; if (f = n.attr("style"), "string" != typeof f) return null; for (var o = f.split(";"), e = 0, s = o.length; e < s; e += 1)if (i = o[e].replace(/\s/g, "").match(/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i), null !== i && 1 <= i.length) return i[1]; return null }, u.prototype._bindAdapters = function () { this.dataAdapter.bind(this, this.$container); this.selection.bind(this, this.$container); this.dropdown.bind(this, this.$container); this.results.bind(this, this.$container) }, u.prototype._registerDomEvents = function () { var n = this, t; this.$element.on("change.select2", function () { n.dataAdapter.current(function (t) { n.trigger("selection:update", { data: t }) }) }); this.$element.on("focus.select2", function (t) { n.trigger("focus", t) }); this._syncA = i.bind(this._syncAttributes, this); this._syncS = i.bind(this._syncSubtree, this); this.$element[0].attachEvent && this.$element[0].attachEvent("onpropertychange", this._syncA); t = window.MutationObserver || window.WebKitMutationObserver || window.MozMutationObserver; null != t ? (this._observer = new t(function (t) { n._syncA(); n._syncS(null, t) }), this._observer.observe(this.$element[0], { attributes: !0, childList: !0, subtree: !1 })) : this.$element[0].addEventListener && (this.$element[0].addEventListener("DOMAttrModified", n._syncA, !1), this.$element[0].addEventListener("DOMNodeInserted", n._syncS, !1), this.$element[0].addEventListener("DOMNodeRemoved", n._syncS, !1)) }, u.prototype._registerDataEvents = function () { var n = this; this.dataAdapter.on("*", function (t, i) { n.trigger(t, i) }) }, u.prototype._registerSelectionEvents = function () { var t = this, i = ["toggle", "focus"]; this.selection.on("toggle", function () { t.toggleDropdown() }); this.selection.on("focus", function (n) { t.focus(n) }); this.selection.on("*", function (r, u) { -1 === n.inArray(r, i) && t.trigger(r, u) }) }, u.prototype._registerDropdownEvents = function () { var n = this; this.dropdown.on("*", function (t, i) { n.trigger(t, i) }) }, u.prototype._registerResultsEvents = function () { var n = this; this.results.on("*", function (t, i) { n.trigger(t, i) }) }, u.prototype._registerEvents = function () { var n = this; this.on("open", function () { n.$container.addClass("select2-container--open") }); this.on("close", function () { n.$container.removeClass("select2-container--open") }); this.on("enable", function () { n.$container.removeClass("select2-container--disabled") }); this.on("disable", function () { n.$container.addClass("select2-container--disabled") }); this.on("blur", function () { n.$container.removeClass("select2-container--focus") }); this.on("query", function (t) { n.isOpen() || n.trigger("open", {}); this.dataAdapter.query(t, function (i) { n.trigger("results:all", { data: i, query: t }) }) }); this.on("query:append", function (t) { this.dataAdapter.query(t, function (i) { n.trigger("results:append", { data: i, query: t }) }) }); this.on("keypress", function (t) { var i = t.which; n.isOpen() ? i === r.ESC || i === r.TAB || i === r.UP && t.altKey ? (n.close(t), t.preventDefault()) : i === r.ENTER ? (n.trigger("results:select", {}), t.preventDefault()) : i === r.SPACE && t.ctrlKey ? (n.trigger("results:toggle", {}), t.preventDefault()) : i === r.UP ? (n.trigger("results:previous", {}), t.preventDefault()) : i === r.DOWN && (n.trigger("results:next", {}), t.preventDefault()) : (i === r.ENTER || i === r.SPACE || i === r.DOWN && t.altKey) && (n.open(), t.preventDefault()) }) }, u.prototype._syncAttributes = function () { this.options.set("disabled", this.$element.prop("disabled")); this.isDisabled() ? (this.isOpen() && this.close(), this.trigger("disable", {})) : this.trigger("enable", {}) }, u.prototype._isChangeMutation = function (t, i) { var r = !1, f = this, u; if (!t || !t.target || "OPTION" === t.target.nodeName || "OPTGROUP" === t.target.nodeName) { if (i) if (i.addedNodes && 0 < i.addedNodes.length) for (u = 0; u < i.addedNodes.length; u++)i.addedNodes[u].selected && (r = !0); else i.removedNodes && 0 < i.removedNodes.length ? r = !0 : n.isArray(i) && n.each(i, function (n, t) { if (f._isChangeMutation(n, t)) return !(r = !0) }); else r = !0; return r } }, u.prototype._syncSubtree = function (n, t) { var i = this._isChangeMutation(n, t), r = this; i && this.dataAdapter.current(function (n) { r.trigger("selection:update", { data: n }) }) }, u.prototype.trigger = function (n, t) { var r = u.__super__.trigger, f = { open: "opening", close: "closing", select: "selecting", unselect: "unselecting", clear: "clearing" }, e, i; if ((void 0 === t && (t = {}), n in f) && (e = f[n], i = { prevented: !1, name: n, args: t }, r.call(this, e, i), i.prevented)) return void (t.prevented = !0); r.call(this, n, t) }, u.prototype.toggleDropdown = function () { this.isDisabled() || (this.isOpen() ? this.close() : this.open()) }, u.prototype.open = function () { this.isOpen() || this.isDisabled() || this.trigger("query", {}) }, u.prototype.close = function (n) { this.isOpen() && this.trigger("close", { originalEvent: n }) }, u.prototype.isEnabled = function () { return !this.isDisabled() }, u.prototype.isDisabled = function () { return this.options.get("disabled") }, u.prototype.isOpen = function () { return this.$container.hasClass("select2-container--open") }, u.prototype.hasFocus = function () { return this.$container.hasClass("select2-container--focus") }, u.prototype.focus = function () { this.hasFocus() || (this.$container.addClass("select2-container--focus"), this.trigger("focus", {})) }, u.prototype.enable = function (n) { this.options.get("debug") && window.console && console.warn && console.warn('Select2: The `select2("enable")` method has been deprecated and will be removed in later Select2 versions. Use $element.prop("disabled") instead.'); null != n && 0 !== n.length || (n = [!0]); var t = !n[0]; this.$element.prop("disabled", t) }, u.prototype.data = function () { this.options.get("debug") && 0 < arguments.length && window.console && console.warn && console.warn('Select2: Data can no longer be set using `select2("data")`. You should consider setting the value instead using `$element.val()`.'); var n = []; return this.dataAdapter.current(function (t) { n = t }), n }, u.prototype.val = function (t) { if (this.options.get("debug") && window.console && console.warn && console.warn('Select2: The `select2("val")` method has been deprecated and will be removed in later Select2 versions. Use $element.val() instead.'), null == t || 0 === t.length) return this.$element.val(); var i = t[0]; n.isArray(i) && (i = n.map(i, function (n) { return n.toString() })); this.$element.val(i).trigger("input").trigger("change") }, u.prototype.destroy = function () { this.$container.remove(); this.$element[0].detachEvent && this.$element[0].detachEvent("onpropertychange", this._syncA); null != this._observer ? (this._observer.disconnect(), this._observer = null) : this.$element[0].removeEventListener && (this.$element[0].removeEventListener("DOMAttrModified", this._syncA, !1), this.$element[0].removeEventListener("DOMNodeInserted", this._syncS, !1), this.$element[0].removeEventListener("DOMNodeRemoved", this._syncS, !1)); this._syncA = null; this._syncS = null; this.$element.off(".select2"); this.$element.attr("tabindex", i.GetData(this.$element[0], "old-tabindex")); this.$element.removeClass("select2-hidden-accessible"); this.$element.attr("aria-hidden", "false"); i.RemoveData(this.$element[0]); this.$element.removeData("select2"); this.dataAdapter.destroy(); this.selection.destroy(); this.dropdown.destroy(); this.results.destroy(); this.dataAdapter = null; this.selection = null; this.dropdown = null; this.results = null }, u.prototype.render = function () { var t = n('<span class="select2 select2-container"><span class="selection"><\/span><span class="dropdown-wrapper" aria-hidden="true"><\/span><\/span>'); return t.attr("dir", this.options.get("dir")), this.$container = t, this.$container.addClass("select2-container--" + this.options.get("theme")), i.StoreData(t[0], "element", this.$element), t }, u }), t.define("jquery-mousewheel", ["jquery"], function (n) { return n }), t.define("jquery.select2", ["jquery", "jquery-mousewheel", "./select2/core", "./select2/defaults", "./select2/utils"], function (n, t, i, r, u) { if (null == n.fn.select2) { var f = ["open", "close", "destroy"]; n.fn.select2 = function (t) { if ("object" == typeof (t = t || {})) return this.each(function () { var r = n.extend(!0, {}, t); new i(n(this), r) }), this; if ("string" != typeof t) throw new Error("Invalid arguments for Select2: " + t); var r, e = Array.prototype.slice.call(arguments, 1); return this.each(function () { var n = u.GetData(this, "select2"); null == n && window.console && console.error && console.error("The select2('" + t + "') method was called on an element that is not using Select2."); r = n[t].apply(n, e) }), -1 < n.inArray(t, f) ? this : r } } return null == n.fn.select2.defaults && (n.fn.select2.defaults = r), i }), { define: t.define, require: t.require } }(), i = t.require("jquery.select2"); return n.fn.select2.amd = t, i }); !function (n, t) { "object" == typeof exports && "undefined" != typeof module ? module.exports = t() : "function" == typeof define && define.amd ? define(t) : n.moment = t() }(this, function () { "use strict"; function t() { return df.apply(null, arguments) } function rt(n) { return n instanceof Array || "[object Array]" === Object.prototype.toString.call(n) } function ti(n) { return null != n && "[object Object]" === Object.prototype.toString.call(n) } function s(n, t) { return Object.prototype.hasOwnProperty.call(n, t) } function eu(n) { if (Object.getOwnPropertyNames) return 0 === Object.getOwnPropertyNames(n).length; for (var t in n) if (s(n, t)) return; return 1 } function k(n) { return void 0 === n } function at(n) { return "number" == typeof n || "[object Number]" === Object.prototype.toString.call(n) } function yi(n) { return n instanceof Date || "[object Date]" === Object.prototype.toString.call(n) } function ne(n, t) { for (var r = [], i = 0; i < n.length; ++i)r.push(t(n[i], i)); return r } function dt(n, t) { for (var i in t) s(t, i) && (n[i] = t[i]); return s(t, "toString") && (n.toString = t.toString), s(t, "valueOf") && (n.valueOf = t.valueOf), n } function ot(n, t, i, r) { return ro(n, t, i, r, !0).utc() } function u(n) { return null == n._pf && (n._pf = { empty: !1, unusedTokens: [], unusedInput: [], overflow: -2, charsLeftOver: 0, nullInput: !1, invalidEra: null, invalidMonth: null, invalidFormat: !1, userInvalidated: !1, iso: !1, parsedDateParts: [], era: null, meridiem: null, rfc2822: !1, weekdayMismatch: !1 }), n._pf } function ou(n) { if (null == n._isValid) { var t = u(n), r = gf.call(t.parsedDateParts, function (n) { return null != n }), i = !isNaN(n._d.getTime()) && t.overflow < 0 && !t.empty && !t.invalidEra && !t.invalidMonth && !t.invalidWeekday && !t.weekdayMismatch && !t.nullInput && !t.invalidFormat && !t.userInvalidated && (!t.meridiem || t.meridiem && r); if (n._strict && (i = i && 0 === t.charsLeftOver && 0 === t.unusedTokens.length && void 0 === t.bigHour), null != Object.isFrozen && Object.isFrozen(n)) return i; n._isValid = i } return n._isValid } function ir(n) { var t = ot(NaN); return null != n ? dt(u(t), n) : u(t).userInvalidated = !0, t } function su(n, t) { var i, r, f; if (k(t._isAMomentObject) || (n._isAMomentObject = t._isAMomentObject), k(t._i) || (n._i = t._i), k(t._f) || (n._f = t._f), k(t._l) || (n._l = t._l), k(t._strict) || (n._strict = t._strict), k(t._tzm) || (n._tzm = t._tzm), k(t._isUTC) || (n._isUTC = t._isUTC), k(t._offset) || (n._offset = t._offset), k(t._pf) || (n._pf = u(t)), k(t._locale) || (n._locale = t._locale), 0 < rr.length) for (i = 0; i < rr.length; i++)k(f = t[r = rr[i]]) || (n[r] = f); return n } function pi(n) { su(this, n); this._d = new Date(null != n._d ? n._d.getTime() : NaN); this.isValid() || (this._d = new Date(NaN)); !1 === ur && (ur = !0, t.updateOffset(this), ur = !1) } function ut(n) { return n instanceof pi || null != n && null != n._isAMomentObject } function te(n) { !1 === t.suppressDeprecationWarnings && "undefined" != typeof console && console.warn && console.warn("Deprecation warning: " + n) } function nt(n, i) { var r = !0; return dt(function () { if (null != t.deprecationHandler && t.deprecationHandler(null, n), r) { for (var u, e, o = [], f = 0; f < arguments.length; f++) { if (u = "", "object" == typeof arguments[f]) { for (e in u += "\n[" + f + "] ", arguments[0]) s(arguments[0], e) && (u += e + ": " + arguments[0][e] + ", "); u = u.slice(0, -2) } else u = arguments[f]; o.push(u) } te(n + "\nArguments: " + Array.prototype.slice.call(o).join("") + "\n" + (new Error).stack); r = !1 } return i.apply(this, arguments) }, i) } function re(n, i) { null != t.deprecationHandler && t.deprecationHandler(n, i); hu[n] || (te(i), hu[n] = !0) } function st(n) { return "undefined" != typeof Function && n instanceof Function || "[object Function]" === Object.prototype.toString.call(n) } function cu(n, t) { var i, r = dt({}, n); for (i in t) s(t, i) && (ti(n[i]) && ti(t[i]) ? (r[i] = {}, dt(r[i], n[i]), dt(r[i], t[i])) : null != t[i] ? r[i] = t[i] : delete r[i]); for (i in n) s(n, i) && !s(t, i) && ti(n[i]) && (r[i] = dt({}, r[i])); return r } function lu(n) { null != n && this.set(n) } function ht(n, t, i) { var r = "" + Math.abs(n), u = t - r.length; return (0 <= n ? i ? "+" : "" : "-") + Math.pow(10, Math.max(0, u)).toString().substr(1) + r } function r(n, t, i, r) { var u = r; "string" == typeof r && (u = function () { return this[r]() }); n && (fi[n] = u); t && (fi[t[0]] = function () { return ht(u.apply(this, arguments), t[1], t[2]) }); i && (fi[i] = function () { return this.localeData().ordinal(u.apply(this, arguments), n) }) } function er(n, t) { return n.isValid() ? (t = ue(t, n.localeData()), vu[t] = vu[t] || function (n) { for (var u, t = n.match(au), i = 0, r = t.length; i < r; i++)t[i] = fi[t[i]] ? fi[t[i]] : (u = t[i]).match(/\[[\s\S]/) ? u.replace(/^\[|\]$/g, "") : u.replace(/\\/g, ""); return function (i) { for (var f = "", u = 0; u < r; u++)f += st(t[u]) ? t[u].call(i, n) : t[u]; return f } }(t), vu[t](n)) : n.localeData().invalidDate() } function ue(n, t) { function r(n) { return t.longDateFormat(n) || n } var i = 5; for (fr.lastIndex = 0; 0 <= i && fr.test(n);)n = n.replace(fr, r), fr.lastIndex = 0, --i; return n } function p(n, t) { var i = n.toLowerCase(); ei[i] = ei[i + "s"] = ei[t] = n } function tt(n) { if ("string" == typeof n) return ei[n] || ei[n.toLowerCase()] } function yu(n) { var i, t, r = {}; for (t in n) s(n, t) && (i = tt(t)) && (r[i] = n[t]); return r } function w(n, t) { pu[n] = t } function or(n) { return n % 4 == 0 && n % 100 != 0 || n % 400 == 0 } function it(n) { return n < 0 ? Math.ceil(n) || 0 : Math.floor(n) } function f(n) { var t = +n, i = 0; return 0 != t && isFinite(t) && (i = it(t)), i } function oi(n, i) { return function (r) { return null != r ? (fe(this, n, r), t.updateOffset(this, i), this) : sr(this, n) } } function sr(n, t) { return n.isValid() ? n._d["get" + (n._isUTC ? "UTC" : "") + t]() : NaN } function fe(n, t, i) { n.isValid() && !isNaN(i) && ("FullYear" === t && or(n.year()) && 1 === n.month() && 29 === n.date() ? (i = f(i), n._d["set" + (n._isUTC ? "UTC" : "") + t](i, n.month(), wr(i, n.month()))) : n._d["set" + (n._isUTC ? "UTC" : "") + t](i)) } function i(n, t, i) { hr[n] = st(t) ? t : function (n) { return n && i ? i : t } } function as(n, t) { return s(hr, n) ? hr[n](t._strict, t._locale) : new RegExp(g(n.replace("\\", "").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g, function (n, t, i, r, u) { return t || i || r || u }))) } function g(n) { return n.replace(/[-\/\\^$*+?.()|[\]{}]/g, "\\$&") } function h(n, t) { var i, r = t; for ("string" == typeof n && (n = [n]), at(t) && (r = function (n, i) { i[t] = f(n) }), i = 0; i < n.length; i++)pr[n[i]] = r } function bi(n, t) { h(n, function (n, i, r, u) { r._w = r._w || {}; t(n, r._w, r, u) }) } function wr(n, t) { if (isNaN(n) || isNaN(t)) return NaN; var i, r = (t % (i = 12) + i) % i; return n += (t - r) / 12, 1 == r ? or(n) ? 29 : 28 : 31 - r % 7 % 2 } function ae(n, t) { var i; if (!n.isValid()) return n; if ("string" == typeof t) if (/^\d+$/.test(t)) t = f(t); else if (!at(t = n.localeData().monthsParse(t))) return n; return i = Math.min(n.date(), wr(n.year(), t)), n._d["set" + (n._isUTC ? "UTC" : "") + "Month"](t, i), n } function ve(n) { return null != n ? (ae(this, n), t.updateOffset(this, !0), this) : sr(this, "Month") } function ye() { function f(n, t) { return t.length - n.length } for (var i, r = [], u = [], t = [], n = 0; n < 12; n++)i = ot([2e3, n]), r.push(this.monthsShort(i, "")), u.push(this.months(i, "")), t.push(this.months(i, "")), t.push(this.monthsShort(i, "")); for (r.sort(f), u.sort(f), t.sort(f), n = 0; n < 12; n++)r[n] = g(r[n]), u[n] = g(u[n]); for (n = 0; n < 24; n++)t[n] = g(t[n]); this._monthsRegex = new RegExp("^(" + t.join("|") + ")", "i"); this._monthsShortRegex = this._monthsRegex; this._monthsStrictRegex = new RegExp("^(" + u.join("|") + ")", "i"); this._monthsShortStrictRegex = new RegExp("^(" + r.join("|") + ")", "i") } function ki(n) { return or(n) ? 366 : 365 } function di(n) { var t, i; return n < 100 && 0 <= n ? ((i = Array.prototype.slice.call(arguments))[0] = n + 400, t = new Date(Date.UTC.apply(null, i)), isFinite(t.getUTCFullYear()) && t.setUTCFullYear(n)) : t = new Date(Date.UTC.apply(null, arguments)), t } function br(n, t, i) { var r = 7 + t - i; return r - (7 + di(n, 0, r).getUTCDay() - t) % 7 - 1 } function pe(n, t, i, r, u) { var e, o, f = 1 + 7 * (t - 1) + (7 + i - r) % 7 + br(n, r, u); return o = f <= 0 ? ki(e = n - 1) + f : f > ki(n) ? (e = n + 1, f - ki(n)) : (e = n, f), { year: e, dayOfYear: o } } function gi(n, t, i) { var u, f, e = br(n.year(), t, i), r = Math.floor((n.dayOfYear() - e - 1) / 7) + 1; return r < 1 ? u = r + pt(f = n.year() - 1, t, i) : r > pt(n.year(), t, i) ? (u = r - pt(n.year(), t, i), f = n.year() + 1) : (f = n.year(), u = r), { week: u, year: f } } function pt(n, t, i) { var r = br(n, t, i), u = br(n + 1, t, i); return (ki(n) - r + u) / 7 } function du(n, t) { return n.slice(t, 7).concat(n.slice(0, t)) } function gu() { function t(n, t) { return t.length - n.length } for (var r, u, f, e, o = [], s = [], h = [], n = [], i = 0; i < 7; i++)r = ot([2e3, 1]).day(i), u = g(this.weekdaysMin(r, "")), f = g(this.weekdaysShort(r, "")), e = g(this.weekdays(r, "")), o.push(u), s.push(f), h.push(e), n.push(u), n.push(f), n.push(e); o.sort(t); s.sort(t); h.sort(t); n.sort(t); this._weekdaysRegex = new RegExp("^(" + n.join("|") + ")", "i"); this._weekdaysShortRegex = this._weekdaysRegex; this._weekdaysMinRegex = this._weekdaysRegex; this._weekdaysStrictRegex = new RegExp("^(" + h.join("|") + ")", "i"); this._weekdaysShortStrictRegex = new RegExp("^(" + s.join("|") + ")", "i"); this._weekdaysMinStrictRegex = new RegExp("^(" + o.join("|") + ")", "i") } function nf() { return this.hours() % 12 || 12 } function be(n, t) { r(n, 0, 0, function () { return this.localeData().meridiem(this.hours(), this.minutes(), t) }) } function ke(n, t) { return t._meridiemParse } function rh(n, t) { for (var r = Math.min(n.length, t.length), i = 0; i < r; i += 1)if (n[i] !== t[i]) return i; return r } function ge(n) { return n ? n.toLowerCase().replace("_", "-") : n } function kr(n) { var t = null; if (void 0 === a[n] && "undefined" != typeof module && module && module.exports) try { t = nr._abbr; require("./locale/" + n); gt(t) } catch (t) { a[n] = null } return a[n] } function gt(n, t) { var i; return n && ((i = k(t) ? wt(n) : tf(n, t)) ? nr = i : "undefined" != typeof console && console.warn && console.warn("Locale " + n + " not found. Did you forget to load it?")), nr._abbr } function tf(n, t) { if (null === t) return delete a[n], null; var r, i = de; if (t.abbr = n, null != a[n]) re("defineLocaleOverride", "use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."), i = a[n]._config; else if (null != t.parentLocale) if (null != a[t.parentLocale]) i = a[t.parentLocale]._config; else { if (null == (r = kr(t.parentLocale))) return tr[t.parentLocale] || (tr[t.parentLocale] = []), tr[t.parentLocale].push({ name: n, config: t }), null; i = r._config } return a[n] = new lu(cu(i, t)), tr[n] && tr[n].forEach(function (n) { tf(n.name, n.config) }), gt(n), a[n] } function wt(n) { var t; if (n && n._locale && n._locale._abbr && (n = n._locale._abbr), !n) return nr; if (!rt(n)) { if (t = kr(n)) return t; n = [n] } return function (n) { for (var t, i, f, u, r = 0; r < n.length;) { for (t = (u = ge(n[r]).split("-")).length, i = (i = ge(n[r + 1])) ? i.split("-") : null; 0 < t;) { if (f = kr(u.slice(0, t).join("-"))) return f; if (i && i.length >= t && rh(u, i) >= t - 1) break; t-- } r++ } return nr }(n) } function rf(n) { var i, t = n._a; return t && -2 === u(n).overflow && (i = t[vt] < 0 || 11 < t[vt] ? vt : t[ct] < 1 || t[ct] > wr(t[b], t[vt]) ? ct : t[y] < 0 || 24 < t[y] || 24 === t[y] && (0 !== t[ft] || 0 !== t[yt] || 0 !== t[ii]) ? y : t[ft] < 0 || 59 < t[ft] ? ft : t[yt] < 0 || 59 < t[yt] ? yt : t[ii] < 0 || 999 < t[ii] ? ii : -1, u(n)._overflowDayOfYear && (i < b || ct < i) && (i = ct), u(n)._overflowWeeks && -1 === i && (i = vs), u(n)._overflowWeekday && -1 === i && (i = ys), u(n).overflow = i), n } function no(n) { var t, r, o, e, f, s, h = n._i, i = uh.exec(h) || fh.exec(h); if (i) { for (u(n).iso = !0, t = 0, r = dr.length; t < r; t++)if (dr[t][1].exec(i[1])) { e = dr[t][0]; o = !1 !== dr[t][2]; break } if (null == e) return void (n._isValid = !1); if (i[3]) { for (t = 0, r = uf.length; t < r; t++)if (uf[t][1].exec(i[3])) { f = (i[2] || " ") + uf[t][0]; break } if (null == f) return void (n._isValid = !1) } if (!o && null != f) return void (n._isValid = !1); if (i[4]) { if (!eh.exec(i[4])) return void (n._isValid = !1); s = "Z" } n._f = e + (f || "") + (s || ""); ef(n) } else n._isValid = !1 } function ch(n, t, i, r, u, f) { var e = [function (n) { var t = parseInt(n, 10); return t <= 49 ? 2e3 + t : t <= 999 ? 1900 + t : t }(n), ce.indexOf(t), parseInt(i, 10), parseInt(r, 10), parseInt(u, 10)]; return f && e.push(parseInt(f, 10)), e } function to(n) { var r, f, i, e, t = sh.exec(n._i.replace(/\([^)]*\)|[\n\t]/g, " ").replace(/(\s\s+)/g, " ").replace(/^\s\s*/, "").replace(/\s\s*$/, "")); if (t) { if (r = ch(t[4], t[3], t[2], t[5], t[6], t[7]), f = t[1], i = r, e = n, f && we.indexOf(f) !== new Date(i[0], i[1], i[2]).getDay() && (u(e).weekdayMismatch = !0, !void (e._isValid = !1))) return; n._a = r; n._tzm = function (n, t, i) { if (n) return hh[n]; if (t) return 0; var r = parseInt(i, 10), u = r % 100; return 60 * ((r - u) / 100) + u }(t[8], t[9], t[10]); n._d = di.apply(null, n._a); n._d.setUTCMinutes(n._d.getUTCMinutes() - n._tzm); u(n).rfc2822 = !0 } else n._isValid = !1 } function hi(n, t, i) { return null != n ? n : null != t ? t : i } function ff(n) { var i, f, e, h, o, s = [], c, r; if (!n._d) { for (c = n, r = new Date(t.now()), e = c._useUTC ? [r.getUTCFullYear(), r.getUTCMonth(), r.getUTCDate()] : [r.getFullYear(), r.getMonth(), r.getDate()], n._w && null == n._a[ct] && null == n._a[vt] && function (n) { var t, o, f, i, r, e, h, s, c; null != (t = n._w).GG || null != t.W || null != t.E ? (r = 1, e = 4, o = hi(t.GG, n._a[b], gi(l(), 1, 4).year), f = hi(t.W, 1), ((i = hi(t.E, 1)) < 1 || 7 < i) && (s = !0)) : (r = n._locale._week.dow, e = n._locale._week.doy, c = gi(l(), r, e), o = hi(t.gg, n._a[b], c.year), f = hi(t.w, c.week), null != t.d ? ((i = t.d) < 0 || 6 < i) && (s = !0) : null != t.e ? (i = t.e + r, (t.e < 0 || 6 < t.e) && (s = !0)) : i = r); f < 1 || f > pt(o, r, e) ? u(n)._overflowWeeks = !0 : null != s ? u(n)._overflowWeekday = !0 : (h = pe(o, f, i, r, e), n._a[b] = h.year, n._dayOfYear = h.dayOfYear) }(n), null != n._dayOfYear && (o = hi(n._a[b], e[b]), (n._dayOfYear > ki(o) || 0 === n._dayOfYear) && (u(n)._overflowDayOfYear = !0), f = di(o, 0, n._dayOfYear), n._a[vt] = f.getUTCMonth(), n._a[ct] = f.getUTCDate()), i = 0; i < 3 && null == n._a[i]; ++i)n._a[i] = s[i] = e[i]; for (; i < 7; i++)n._a[i] = s[i] = null == n._a[i] ? 2 === i ? 1 : 0 : n._a[i]; 24 === n._a[y] && 0 === n._a[ft] && 0 === n._a[yt] && 0 === n._a[ii] && (n._nextDay = !0, n._a[y] = 0); n._d = (n._useUTC ? di : function (n, t, i, r, u, f, e) { var o; return n < 100 && 0 <= n ? (o = new Date(n + 400, t, i, r, u, f, e), isFinite(o.getFullYear()) && o.setFullYear(n)) : o = new Date(n, t, i, r, u, f, e), o }).apply(null, s); h = n._useUTC ? n._d.getUTCDay() : n._d.getDay(); null != n._tzm && n._d.setUTCMinutes(n._d.getUTCMinutes() - n._tzm); n._nextDay && (n._a[y] = 24); n._w && void 0 !== n._w.d && n._w.d !== h && (u(n).weekdayMismatch = !0) } } function ef(n) { if (n._f !== t.ISO_8601) if (n._f !== t.RFC_2822) { n._a = []; u(n).empty = !0; for (var r, f, l, a, o, v, c, i = "" + n._i, w = i.length, p = 0, h = ue(n._f, n._locale).match(au) || [], e = 0; e < h.length; e++)f = h[e], (r = (i.match(as(f, n)) || [])[0]) && (0 < (l = i.substr(0, i.indexOf(r))).length && u(n).unusedInput.push(l), i = i.slice(i.indexOf(r) + r.length), p += r.length), fi[f] ? (r ? u(n).empty = !1 : u(n).unusedTokens.push(f), o = f, c = n, null != (v = r) && s(pr, o) && pr[o](v, c._a, c, o)) : n._strict && !r && u(n).unusedTokens.push(f); u(n).charsLeftOver = w - p; 0 < i.length && u(n).unusedInput.push(i); n._a[y] <= 12 && !0 === u(n).bigHour && 0 < n._a[y] && (u(n).bigHour = void 0); u(n).parsedDateParts = n._a.slice(0); u(n).meridiem = n._meridiem; n._a[y] = function (n, t, i) { var r; return null == i ? t : null != n.meridiemHour ? n.meridiemHour(t, i) : (null != n.isPM && ((r = n.isPM(i)) && t < 12 && (t += 12), r || 12 !== t || (t = 0)), t) }(n._locale, n._a[y], n._meridiem); null !== (a = u(n).era) && (n._a[b] = n._locale.erasConvertYear(a, n._a[b])); ff(n); rf(n) } else to(n); else no(n) } function io(n) { var i, r, f = n._i, e = n._f; return n._locale = n._locale || wt(n._l), null === f || void 0 === e && "" === f ? ir({ nullInput: !0 }) : ("string" == typeof f && (n._i = f = n._locale.preparse(f)), ut(f) ? new pi(rf(f)) : (yi(f) ? n._d = f : rt(e) ? function (n) { var t, o, r, f, i, e, s = !1; if (0 === n._f.length) return u(n).invalidFormat = !0, n._d = new Date(NaN); for (f = 0; f < n._f.length; f++)i = 0, e = !1, t = su({}, n), null != n._useUTC && (t._useUTC = n._useUTC), t._f = n._f[f], ef(t), ou(t) && (e = !0), i += u(t).charsLeftOver, i += 10 * u(t).unusedTokens.length, u(t).score = i, s ? i < r && (r = i, o = t) : (null == r || i < r || e) && (r = i, o = t, e && (s = !0)); dt(n, o || t) }(n) : e ? ef(n) : k(r = (i = n)._i) ? i._d = new Date(t.now()) : yi(r) ? i._d = new Date(r.valueOf()) : "string" == typeof r ? function (n) { var i = oh.exec(n._i); null === i ? (no(n), !1 === n._isValid && (delete n._isValid, to(n), !1 === n._isValid && (delete n._isValid, n._strict ? n._isValid = !1 : t.createFromInputFallback(n)))) : n._d = new Date(+i[1]) }(i) : rt(r) ? (i._a = ne(r.slice(0), function (n) { return parseInt(n, 10) }), ff(i)) : ti(r) ? function (n) { if (!n._d) { var t = yu(n._i), i = void 0 === t.day ? t.date : t.day; n._a = ne([t.year, t.month, i, t.hour, t.minute, t.second, t.millisecond], function (n) { return n && parseInt(n, 10) }); ff(n) } }(i) : at(r) ? i._d = new Date(r) : t.createFromInputFallback(i), ou(n) || (n._d = null), n)) } function ro(n, t, i, r, u) { var e, f = {}; return !0 !== t && !1 !== t || (r = t, t = void 0), !0 !== i && !1 !== i || (r = i, i = void 0), (ti(n) && eu(n) || rt(n) && 0 === n.length) && (n = void 0), f._isAMomentObject = !0, f._useUTC = f._isUTC = u, f._l = i, f._i = n, f._f = t, f._strict = r, (e = new pi(rf(io(f))))._nextDay && (e.add(1, "d"), e._nextDay = void 0), e } function l(n, t, i, r) { return ro(n, t, i, r, !1) } function eo(n, t) { var r, i; if (1 === t.length && rt(t[0]) && (t = t[0]), !t.length) return l(); for (r = t[0], i = 1; i < t.length; ++i)t[i].isValid() && !t[i][n](r) || (r = t[i]); return r } function gr(n) { var t = yu(n), i = t.year || 0, r = t.quarter || 0, u = t.month || 0, e = t.week || t.isoWeek || 0, o = t.day || 0, h = t.hour || 0, c = t.minute || 0, l = t.second || 0, a = t.millisecond || 0; this._isValid = function (n) { var i, t, r = !1; for (i in n) if (s(n, i) && (-1 === v.call(ci, i) || null != n[i] && isNaN(n[i]))) return !1; for (t = 0; t < ci.length; ++t)if (n[ci[t]]) { if (r) return !1; parseFloat(n[ci[t]]) !== f(n[ci[t]]) && (r = !0) } return !0 }(t); this._milliseconds = +a + 1e3 * l + 6e4 * c + 36e5 * h; this._days = +o + 7 * e; this._months = +u + 3 * r + 12 * i; this._data = {}; this._locale = wt(); this._bubble() } function nu(n) { return n instanceof gr } function sf(n) { return n < 0 ? -1 * Math.round(-1 * n) : Math.round(n) } function oo(n, t) { r(n, 0, 0, function () { var n = this.utcOffset(), i = "+"; return n < 0 && (n = -n, i = "-"), i + ht(~~(n / 60), 2) + t + ht(~~n % 60, 2) }) } function hf(n, t) { var i, r, u = (t || "").match(n); return null === u ? null : 0 === (r = 60 * (i = ((u[u.length - 1] || []) + "").match(so) || ["-", 0, 0])[1] + f(i[2])) ? 0 : "+" === i[0] ? r : -r } function cf(n, i) { var r, u; return i._isUTC ? (r = i.clone(), u = (ut(n) || yi(n) ? n.valueOf() : l(n).valueOf()) - r.valueOf(), r._d.setTime(r._d.valueOf() + u), t.updateOffset(r, !1), r) : l(n).local() } function lf(n) { return -Math.round(n._d.getTimezoneOffset()) } function ho() { return !!this.isValid() && this._isUTC && 0 === this._offset } function et(n, t) { var u, e, o, i = n, r = null; return nu(n) ? i = { ms: n._milliseconds, d: n._days, M: n._months } : at(n) || !isNaN(+n) ? (i = {}, t ? i[t] = +n : i.milliseconds = +n) : (r = co.exec(n)) ? (u = "-" === r[1] ? -1 : 1, i = { y: 0, d: f(r[ct]) * u, h: f(r[y]) * u, m: f(r[ft]) * u, s: f(r[yt]) * u, ms: f(sf(1e3 * r[ii])) * u }) : (r = lo.exec(n)) ? (u = "-" === r[1] ? -1 : 1, i = { y: ri(r[2], u), M: ri(r[3], u), w: ri(r[4], u), d: ri(r[5], u), h: ri(r[6], u), m: ri(r[7], u), s: ri(r[8], u) }) : null == i ? i = {} : "object" == typeof i && ("from" in i || "to" in i) && (o = function (n, t) { var i; return !n.isValid() || !t.isValid() ? { milliseconds: 0, months: 0 } : (t = cf(t, n), n.isBefore(t) ? i = ao(n, t) : ((i = ao(t, n)).milliseconds = -i.milliseconds, i.months = -i.months), i) }(l(i.from), l(i.to)), (i = {}).ms = o.milliseconds, i.M = o.months), e = new gr(i), nu(n) && s(n, "_locale") && (e._locale = n._locale), nu(n) && s(n, "_isValid") && (e._isValid = n._isValid), e } function ri(n, t) { var i = n && parseFloat(n.replace(",", ".")); return (isNaN(i) ? 0 : i) * t } function ao(n, t) { var i = {}; return i.months = t.month() - n.month() + 12 * (t.year() - n.year()), n.clone().add(i.months, "M").isAfter(t) && --i.months, i.milliseconds = t - n.clone().add(i.months, "M"), i } function vo(n, t) { return function (i, r) { var u; return null === r || isNaN(+r) || (re(t, "moment()." + t + "(period, number) is deprecated. Please use moment()." + t + "(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."), u = i, i = r, r = u), yo(this, et(i, r), n), this } } function yo(n, i, r, u) { var o = i._milliseconds, f = sf(i._days), e = sf(i._months); n.isValid() && (u = null == u || u, e && ae(n, sr(n, "Month") + e * r), f && fe(n, "Date", sr(n, "Date") + f * r), o && n._d.setTime(n._d.valueOf() + o * r), u && t.updateOffset(n, f || e)) } function bo(n) { return "string" == typeof n || n instanceof String } function lh(n) { return ut(n) || yi(n) || bo(n) || at(n) || function (n) { var t = rt(n), i = !1; return t && (i = 0 === n.filter(function (t) { return !at(t) && bo(n) }).length), t && i }(n) || function (n) { for (var r, f = ti(n) && !eu(n), i = !1, u = ["years", "year", "y", "months", "month", "M", "days", "day", "d", "dates", "date", "D", "hours", "hour", "h", "minutes", "minute", "m", "seconds", "second", "s", "milliseconds", "millisecond", "ms"], t = 0; t < u.length; t += 1)r = u[t], i = i || s(n, r); return f && i }(n) || null == n } function tu(n, t) { if (n.date() < t.date()) return -tu(t, n); var r = 12 * (t.year() - n.year()) + (t.month() - n.month()), i = n.clone().add(r, "months"); return -(r + (t - i < 0 ? (t - i) / (i - n.clone().add(r - 1, "months")) : (t - i) / (n.clone().add(1 + r, "months") - i))) || 0 } function ko(n) { var t; return void 0 === n ? this._locale._abbr : (null != (t = wt(n)) && (this._locale = t), this) } function go() { return this._locale } function li(n, t) { return (n % t + t) % t } function ns(n, t, i) { return n < 100 && 0 <= n ? new Date(n + 400, t, i) - vf : new Date(n, t, i).valueOf() } function ts(n, t, i) { return n < 100 && 0 <= n ? Date.UTC(n + 400, t, i) - vf : Date.UTC(n, t, i) } function yf(n, t) { return t.erasAbbrRegex(n) } function pf() { for (var u = [], f = [], e = [], i = [], t = this.eras(), n = 0, r = t.length; n < r; ++n)f.push(g(t[n].name)), u.push(g(t[n].abbr)), e.push(g(t[n].narrow)), i.push(g(t[n].name)), i.push(g(t[n].abbr)), i.push(g(t[n].narrow)); this._erasRegex = new RegExp("^(" + i.join("|") + ")", "i"); this._erasNameRegex = new RegExp("^(" + f.join("|") + ")", "i"); this._erasAbbrRegex = new RegExp("^(" + u.join("|") + ")", "i"); this._erasNarrowRegex = new RegExp("^(" + e.join("|") + ")", "i") } function iu(n, t) { r(0, [n, n.length], 0, t) } function is(n, t, i, r, u) { var f; return null == n ? gi(this, r, u).year : ((f = pt(n, r, u)) < t && (t = f), function (n, t, i, r, u) { var e = pe(n, t, i, r, u), f = di(e.year, 0, e.dayOfYear); return this.year(f.getUTCFullYear()), this.month(f.getUTCMonth()), this.date(f.getUTCDate()), this }.call(this, n, t, i, r, u)) } function ah(n, t) { t[ii] = f(1e3 * ("0." + n)) } function es(n) { return n } function ru(n, t, i, r) { var u = wt(), f = ot().set(r, t); return u[i](f, n) } function os(n, t, i) { if (at(n) && (t = n, n = void 0), n = n || "", null != t) return ru(n, t, i, "month"); for (var u = [], r = 0; r < 12; r++)u[r] = ru(n, r, i, "month"); return u } function bf(n, t, i, r) { t = ("boolean" == typeof n ? at(t) && (i = t, t = void 0) : (t = n, n = !1, at(i = t) && (i = t, t = void 0)), t || ""); var u, o = wt(), f = n ? o._week.dow : 0, e = []; if (null != i) return ru(t, (i + f) % 7, r, "day"); for (u = 0; u < 7; u++)e[u] = ru(t, (u + f) % 7, r, "day"); return e } function ss(n, t, i, r) { var u = et(t, i); return n._milliseconds += r * u._milliseconds, n._days += r * u._days, n._months += r * u._months, n._bubble() } function hs(n) { return n < 0 ? Math.floor(n) : Math.ceil(n) } function cs(n) { return 4800 * n / 146097 } function kf(n) { return 146097 * n / 4800 } function bt(n) { return function () { return this.as(n) } } function ui(n) { return function () { return this.isValid() ? this._data[n] : NaN } } function sc(n, t, i, r) { var u = et(n).abs(), e = kt(u.as("s")), o = kt(u.as("m")), s = kt(u.as("h")), h = kt(u.as("d")), c = kt(u.as("M")), l = kt(u.as("w")), a = kt(u.as("y")), f = (e <= i.ss ? ["s", e] : e < i.s && ["ss", e]) || o <= 1 && ["m"] || o < i.m && ["mm", o] || s <= 1 && ["h"] || s < i.h && ["hh", s] || h <= 1 && ["d"] || h < i.d && ["dd", h]; return null != i.w && (f = f || l <= 1 && ["w"] || l < i.w && ["ww", l]), (f = f || c <= 1 && ["M"] || c < i.M && ["MM", c] || a <= 1 && ["y"] || ["yy", a])[2] = t, f[3] = 0 < +n, f[4] = r, function (n, t, i, r, u) { return u.relativeTime(t || 1, !!i, n, r) }.apply(null, f) } function vi(n) { return (0 < n) - (n < 0) || +n } function fu() { if (!this.isValid()) return this.localeData().invalidDate(); var n, r, e, s, h, o, c, u, t = uu(this._milliseconds) / 1e3, l = uu(this._days), f = uu(this._months), i = this.asSeconds(); return i ? (n = it(t / 60), r = it(n / 60), t %= 60, n %= 60, e = it(f / 12), f %= 12, s = t ? t.toFixed(3).replace(/\.?0+$/, "") : "", h = i < 0 ? "-" : "", o = vi(this._months) !== vi(i) ? "-" : "", c = vi(this._days) !== vi(i) ? "-" : "", u = vi(this._milliseconds) !== vi(i) ? "-" : "", h + "P" + (e ? o + e + "Y" : "") + (f ? o + f + "M" : "") + (l ? c + l + "D" : "") + (r || n || t ? "T" : "") + (r ? u + r + "H" : "") + (n ? u + n + "M" : "") + (t ? u + s + "S" : "")) : "P0D" } var df, gf, rr, ur, ie, hu, ei, pu, pr, ku, uo, fo, ci, so, co, lo, po, wo, af, vf, wf, rs, ni, us, fs, n, o, lt, uu, e; gf = Array.prototype.some ? Array.prototype.some : function (n) { for (var i = Object(this), r = i.length >>> 0, t = 0; t < r; t++)if (t in i && n.call(this, i[t], t, i)) return !0; return !1 }; rr = t.momentProperties = []; ur = !1; hu = {}; t.suppressDeprecationWarnings = !1; t.deprecationHandler = null; ie = Object.keys ? Object.keys : function (n) { var t, i = []; for (t in n) s(n, t) && i.push(t); return i }; var au = /(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g, fr = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g, vu = {}, fi = {}; ei = {}; pu = {}; var hr, ee = /\d/, d = /\d\d/, oe = /\d{3}/, wu = /\d{4}/, cr = /[+-]?\d{6}/, c = /\d\d?/, se = /\d\d\d\d?/, he = /\d\d\d\d\d\d?/, lr = /\d{1,3}/, bu = /\d{1,4}/, ar = /[+-]?\d{1,6}/, si = /\d+/, vr = /[+-]?\d+/, ls = /Z|[+-]\d\d:?\d\d/gi, yr = /Z|[+-]\d\d(?::?\d\d)?/gi, wi = /[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i; hr = {}; pr = {}; var v, b = 0, vt = 1, ct = 2, y = 3, ft = 4, yt = 5, ii = 6, vs = 7, ys = 8; v = Array.prototype.indexOf ? Array.prototype.indexOf : function (n) { for (var t = 0; t < this.length; ++t)if (this[t] === n) return t; return -1 }; r("M", ["MM", 2], "Mo", function () { return this.month() + 1 }); r("MMM", 0, 0, function (n) { return this.localeData().monthsShort(this, n) }); r("MMMM", 0, 0, function (n) { return this.localeData().months(this, n) }); p("month", "M"); w("month", 8); i("M", c); i("MM", c, d); i("MMM", function (n, t) { return t.monthsShortRegex(n) }); i("MMMM", function (n, t) { return t.monthsRegex(n) }); h(["M", "MM"], function (n, t) { t[vt] = f(n) - 1 }); h(["MMM", "MMMM"], function (n, t, i, r) { var f = i._locale.monthsParse(n, r, i._strict); null != f ? t[vt] = f : u(i).invalidMonth = n }); var ps = "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ce = "Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"), le = /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/, ws = wi, bs = wi; r("Y", 0, 0, function () { var n = this.year(); return n <= 9999 ? ht(n, 4) : "+" + n }); r(0, ["YY", 2], 0, function () { return this.year() % 100 }); r(0, ["YYYY", 4], 0, "year"); r(0, ["YYYYY", 5], 0, "year"); r(0, ["YYYYYY", 6, !0], 0, "year"); p("year", "y"); w("year", 1); i("Y", vr); i("YY", c, d); i("YYYY", bu, wu); i("YYYYY", ar, cr); i("YYYYYY", ar, cr); h(["YYYYY", "YYYYYY"], b); h("YYYY", function (n, i) { i[b] = 2 === n.length ? t.parseTwoDigitYear(n) : f(n) }); h("YY", function (n, i) { i[b] = t.parseTwoDigitYear(n) }); h("Y", function (n, t) { t[b] = parseInt(n, 10) }); t.parseTwoDigitYear = function (n) { return f(n) + (68 < f(n) ? 1900 : 2e3) }; ku = oi("FullYear", !0); r("w", ["ww", 2], "wo", "week"); r("W", ["WW", 2], "Wo", "isoWeek"); p("week", "w"); p("isoWeek", "W"); w("week", 5); w("isoWeek", 5); i("w", c); i("ww", c, d); i("W", c); i("WW", c, d); bi(["w", "ww", "W", "WW"], function (n, t, i, r) { t[r.substr(0, 1)] = f(n) }); r("d", 0, "do", "day"); r("dd", 0, 0, function (n) { return this.localeData().weekdaysMin(this, n) }); r("ddd", 0, 0, function (n) { return this.localeData().weekdaysShort(this, n) }); r("dddd", 0, 0, function (n) { return this.localeData().weekdays(this, n) }); r("e", 0, 0, "weekday"); r("E", 0, 0, "isoWeekday"); p("day", "d"); p("weekday", "e"); p("isoWeekday", "E"); w("day", 11); w("weekday", 11); w("isoWeekday", 11); i("d", c); i("e", c); i("E", c); i("dd", function (n, t) { return t.weekdaysMinRegex(n) }); i("ddd", function (n, t) { return t.weekdaysShortRegex(n) }); i("dddd", function (n, t) { return t.weekdaysRegex(n) }); bi(["dd", "ddd", "dddd"], function (n, t, i, r) { var f = i._locale.weekdaysParse(n, r, i._strict); null != f ? t.d = f : u(i).invalidWeekday = n }); bi(["d", "e", "E"], function (n, t, i, r) { t[r] = f(n) }); var ks = "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), we = "Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"), ds = "Su_Mo_Tu_We_Th_Fr_Sa".split("_"), gs = wi, nh = wi, th = wi; r("H", ["HH", 2], 0, "hour"); r("h", ["hh", 2], 0, nf); r("k", ["kk", 2], 0, function () { return this.hours() || 24 }); r("hmm", 0, 0, function () { return "" + nf.apply(this) + ht(this.minutes(), 2) }); r("hmmss", 0, 0, function () { return "" + nf.apply(this) + ht(this.minutes(), 2) + ht(this.seconds(), 2) }); r("Hmm", 0, 0, function () { return "" + this.hours() + ht(this.minutes(), 2) }); r("Hmmss", 0, 0, function () { return "" + this.hours() + ht(this.minutes(), 2) + ht(this.seconds(), 2) }); be("a", !0); be("A", !1); p("hour", "h"); w("hour", 13); i("a", ke); i("A", ke); i("H", c); i("h", c); i("k", c); i("HH", c, d); i("hh", c, d); i("kk", c, d); i("hmm", se); i("hmmss", he); i("Hmm", se); i("Hmmss", he); h(["H", "HH"], y); h(["k", "kk"], function (n, t) { var i = f(n); t[y] = 24 === i ? 0 : i }); h(["a", "A"], function (n, t, i) { i._isPm = i._locale.isPM(n); i._meridiem = n }); h(["h", "hh"], function (n, t, i) { t[y] = f(n); u(i).bigHour = !0 }); h("hmm", function (n, t, i) { var r = n.length - 2; t[y] = f(n.substr(0, r)); t[ft] = f(n.substr(r)); u(i).bigHour = !0 }); h("hmmss", function (n, t, i) { var r = n.length - 4, e = n.length - 2; t[y] = f(n.substr(0, r)); t[ft] = f(n.substr(r, 2)); t[yt] = f(n.substr(e)); u(i).bigHour = !0 }); h("Hmm", function (n, t) { var i = n.length - 2; t[y] = f(n.substr(0, i)); t[ft] = f(n.substr(i)) }); h("Hmmss", function (n, t) { var i = n.length - 4, r = n.length - 2; t[y] = f(n.substr(0, i)); t[ft] = f(n.substr(i, 2)); t[yt] = f(n.substr(r)) }); var ih = oi("Hours", !0), nr, de = { calendar: { sameDay: "[Today at] LT", nextDay: "[Tomorrow at] LT", nextWeek: "dddd [at] LT", lastDay: "[Yesterday at] LT", lastWeek: "[Last] dddd [at] LT", sameElse: "L" }, longDateFormat: { LTS: "h:mm:ss A", LT: "h:mm A", L: "MM/DD/YYYY", LL: "MMMM D, YYYY", LLL: "MMMM D, YYYY h:mm A", LLLL: "dddd, MMMM D, YYYY h:mm A" }, invalidDate: "Invalid date", ordinal: "%d", dayOfMonthOrdinalParse: /\d{1,2}/, relativeTime: { future: "in %s", past: "%s ago", s: "a few seconds", ss: "%d seconds", m: "a minute", mm: "%d minutes", h: "an hour", hh: "%d hours", d: "a day", dd: "%d days", w: "a week", ww: "%d weeks", M: "a month", MM: "%d months", y: "a year", yy: "%d years" }, months: ps, monthsShort: ce, week: { dow: 0, doy: 6 }, weekdays: ks, weekdaysMin: ds, weekdaysShort: we, meridiemParse: /[ap]\.?m?\.?/i }, a = {}, tr = {}; var uh = /^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/, fh = /^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/, eh = /Z|[+-]\d\d(?::?\d\d)?/, dr = [["YYYYYY-MM-DD", /[+-]\d{6}-\d\d-\d\d/], ["YYYY-MM-DD", /\d{4}-\d\d-\d\d/], ["GGGG-[W]WW-E", /\d{4}-W\d\d-\d/], ["GGGG-[W]WW", /\d{4}-W\d\d/, !1], ["YYYY-DDD", /\d{4}-\d{3}/], ["YYYY-MM", /\d{4}-\d\d/, !1], ["YYYYYYMMDD", /[+-]\d{10}/], ["YYYYMMDD", /\d{8}/], ["GGGG[W]WWE", /\d{4}W\d{3}/], ["GGGG[W]WW", /\d{4}W\d{2}/, !1], ["YYYYDDD", /\d{7}/], ["YYYYMM", /\d{6}/, !1], ["YYYY", /\d{4}/, !1]], uf = [["HH:mm:ss.SSSS", /\d\d:\d\d:\d\d\.\d+/], ["HH:mm:ss,SSSS", /\d\d:\d\d:\d\d,\d+/], ["HH:mm:ss", /\d\d:\d\d:\d\d/], ["HH:mm", /\d\d:\d\d/], ["HHmmss.SSSS", /\d\d\d\d\d\d\.\d+/], ["HHmmss,SSSS", /\d\d\d\d\d\d,\d+/], ["HHmmss", /\d\d\d\d\d\d/], ["HHmm", /\d\d\d\d/], ["HH", /\d\d/]], oh = /^\/?Date\((-?\d+)/i, sh = /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/, hh = { UT: 0, GMT: 0, EDT: -240, EST: -300, CDT: -300, CST: -360, MDT: -360, MST: -420, PDT: -420, PST: -480 }; for (t.createFromInputFallback = nt("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.", function (n) { n._d = new Date(n._i + (n._useUTC ? " UTC" : "")) }), t.ISO_8601 = function () { }, t.RFC_2822 = function () { }, uo = nt("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/", function () { var n = l.apply(null, arguments); return this.isValid() && n.isValid() ? n < this ? this : n : ir() }), fo = nt("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/", function () { var n = l.apply(null, arguments); return this.isValid() && n.isValid() ? this < n ? this : n : ir() }), ci = ["year", "quarter", "month", "week", "day", "hour", "minute", "second", "millisecond"], oo("Z", ":"), oo("ZZ", ""), i("Z", yr), i("ZZ", yr), h(["Z", "ZZ"], function (n, t, i) { i._useUTC = !0; i._tzm = hf(yr, n) }), so = /([\+\-]|\d\d)/gi, t.updateOffset = function () { }, co = /^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/, lo = /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/, et.fn = gr.prototype, et.invalid = function () { return et(NaN) }, po = vo(1, "add"), wo = vo(-1, "subtract"), t.defaultFormat = "YYYY-MM-DDTHH:mm:ssZ", t.defaultFormatUtc = "YYYY-MM-DDTHH:mm:ss[Z]", af = nt("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.", function (n) { return void 0 === n ? this.localeData() : this.locale(n) }), vf = 126227808e5, r("N", 0, 0, "eraAbbr"), r("NN", 0, 0, "eraAbbr"), r("NNN", 0, 0, "eraAbbr"), r("NNNN", 0, 0, "eraName"), r("NNNNN", 0, 0, "eraNarrow"), r("y", ["y", 1], "yo", "eraYear"), r("y", ["yy", 2], 0, "eraYear"), r("y", ["yyy", 3], 0, "eraYear"), r("y", ["yyyy", 4], 0, "eraYear"), i("N", yf), i("NN", yf), i("NNN", yf), i("NNNN", function (n, t) { return t.erasNameRegex(n) }), i("NNNNN", function (n, t) { return t.erasNarrowRegex(n) }), h(["N", "NN", "NNN", "NNNN", "NNNNN"], function (n, t, i, r) { var f = i._locale.erasParse(n, r, i._strict); f ? u(i).era = f : u(i).invalidEra = n }), i("y", si), i("yy", si), i("yyy", si), i("yyyy", si), i("yo", function (n, t) { return t._eraYearOrdinalRegex || si }), h(["y", "yy", "yyy", "yyyy"], b), h(["yo"], function (n, t, i) { var r; i._locale._eraYearOrdinalRegex && (r = n.match(i._locale._eraYearOrdinalRegex)); t[b] = i._locale.eraYearOrdinalParse ? i._locale.eraYearOrdinalParse(n, r) : parseInt(n, 10) }), r(0, ["gg", 2], 0, function () { return this.weekYear() % 100 }), r(0, ["GG", 2], 0, function () { return this.isoWeekYear() % 100 }), iu("gggg", "weekYear"), iu("ggggg", "weekYear"), iu("GGGG", "isoWeekYear"), iu("GGGGG", "isoWeekYear"), p("weekYear", "gg"), p("isoWeekYear", "GG"), w("weekYear", 1), w("isoWeekYear", 1), i("G", vr), i("g", vr), i("GG", c, d), i("gg", c, d), i("GGGG", bu, wu), i("gggg", bu, wu), i("GGGGG", ar, cr), i("ggggg", ar, cr), bi(["gggg", "ggggg", "GGGG", "GGGGG"], function (n, t, i, r) { t[r.substr(0, 2)] = f(n) }), bi(["gg", "GG"], function (n, i, r, u) { i[u] = t.parseTwoDigitYear(n) }), r("Q", 0, "Qo", "quarter"), p("quarter", "Q"), w("quarter", 7), i("Q", ee), h("Q", function (n, t) { t[vt] = 3 * (f(n) - 1) }), r("D", ["DD", 2], "Do", "date"), p("date", "D"), w("date", 9), i("D", c), i("DD", c, d), i("Do", function (n, t) { return n ? t._dayOfMonthOrdinalParse || t._ordinalParse : t._dayOfMonthOrdinalParseLenient }), h(["D", "DD"], ct), h("Do", function (n, t) { t[ct] = f(n.match(c)[0]) }), wf = oi("Date", !0), r("DDD", ["DDDD", 3], "DDDo", "dayOfYear"), p("dayOfYear", "DDD"), w("dayOfYear", 4), i("DDD", lr), i("DDDD", oe), h(["DDD", "DDDD"], function (n, t, i) { i._dayOfYear = f(n) }), r("m", ["mm", 2], 0, "minute"), p("minute", "m"), w("minute", 14), i("m", c), i("mm", c, d), h(["m", "mm"], ft), rs = oi("Minutes", !1), r("s", ["ss", 2], 0, "second"), p("second", "s"), w("second", 15), i("s", c), i("ss", c, d), h(["s", "ss"], yt), fs = oi("Seconds", !1), r("S", 0, 0, function () { return ~~(this.millisecond() / 100) }), r(0, ["SS", 2], 0, function () { return ~~(this.millisecond() / 10) }), r(0, ["SSS", 3], 0, "millisecond"), r(0, ["SSSS", 4], 0, function () { return 10 * this.millisecond() }), r(0, ["SSSSS", 5], 0, function () { return 100 * this.millisecond() }), r(0, ["SSSSSS", 6], 0, function () { return 1e3 * this.millisecond() }), r(0, ["SSSSSSS", 7], 0, function () { return 1e4 * this.millisecond() }), r(0, ["SSSSSSSS", 8], 0, function () { return 1e5 * this.millisecond() }), r(0, ["SSSSSSSSS", 9], 0, function () { return 1e6 * this.millisecond() }), p("millisecond", "ms"), w("millisecond", 16), i("S", lr, ee), i("SS", lr, d), i("SSS", lr, oe), ni = "SSSS"; ni.length <= 9; ni += "S")i(ni, si); for (ni = "S"; ni.length <= 9; ni += "S")h(ni, ah); us = oi("Milliseconds", !1); r("z", 0, 0, "zoneAbbr"); r("zz", 0, 0, "zoneName"); n = pi.prototype; n.add = po; n.calendar = function (n, i) { 1 === arguments.length && (lh(arguments[0]) ? (n = arguments[0], i = void 0) : function (n) { for (var u = ti(n) && !eu(n), i = !1, r = ["sameDay", "nextDay", "lastDay", "nextWeek", "lastWeek", "sameElse"], t = 0; t < r.length; t += 1)i = i || s(n, r[t]); return u && i }(arguments[0]) && (i = arguments[0], n = void 0)); var u = n || l(), f = cf(u, this).startOf("day"), r = t.calendarFormat(this, f) || "sameElse", e = i && (st(i[r]) ? i[r].call(this, u) : i[r]); return this.format(e || this.localeData().calendar(r, this, l(u))) }; n.clone = function () { return new pi(this) }; n.diff = function (n, t, i) { var r, f, u; if (!this.isValid()) return NaN; if (!(r = cf(n, this)).isValid()) return NaN; switch (f = 6e4 * (r.utcOffset() - this.utcOffset()), t = tt(t)) { case "year": u = tu(this, r) / 12; break; case "month": u = tu(this, r); break; case "quarter": u = tu(this, r) / 3; break; case "second": u = (this - r) / 1e3; break; case "minute": u = (this - r) / 6e4; break; case "hour": u = (this - r) / 36e5; break; case "day": u = (this - r - f) / 864e5; break; case "week": u = (this - r - f) / 6048e5; break; default: u = this - r }return i ? u : it(u) }; n.endOf = function (n) { var i, r; if (void 0 === (n = tt(n)) || "millisecond" === n || !this.isValid()) return this; switch (r = this._isUTC ? ts : ns, n) { case "year": i = r(this.year() + 1, 0, 1) - 1; break; case "quarter": i = r(this.year(), this.month() - this.month() % 3 + 3, 1) - 1; break; case "month": i = r(this.year(), this.month() + 1, 1) - 1; break; case "week": i = r(this.year(), this.month(), this.date() - this.weekday() + 7) - 1; break; case "isoWeek": i = r(this.year(), this.month(), this.date() - (this.isoWeekday() - 1) + 7) - 1; break; case "day": case "date": i = r(this.year(), this.month(), this.date() + 1) - 1; break; case "hour": i = this._d.valueOf(); i += 3599999 - li(i + (this._isUTC ? 0 : 6e4 * this.utcOffset()), 36e5); break; case "minute": i = this._d.valueOf(); i += 59999 - li(i, 6e4); break; case "second": i = this._d.valueOf(); i += 999 - li(i, 1e3) }return this._d.setTime(i), t.updateOffset(this, !0), this }; n.format = function (n) { n = n || (this.isUtc() ? t.defaultFormatUtc : t.defaultFormat); var i = er(this, n); return this.localeData().postformat(i) }; n.from = function (n, t) { return this.isValid() && (ut(n) && n.isValid() || l(n).isValid()) ? et({ to: this, from: n }).locale(this.locale()).humanize(!t) : this.localeData().invalidDate() }; n.fromNow = function (n) { return this.from(l(), n) }; n.to = function (n, t) { return this.isValid() && (ut(n) && n.isValid() || l(n).isValid()) ? et({ from: this, to: n }).locale(this.locale()).humanize(!t) : this.localeData().invalidDate() }; n.toNow = function (n) { return this.to(l(), n) }; n.get = function (n) { return st(this[n = tt(n)]) ? this[n]() : this }; n.invalidAt = function () { return u(this).overflow }; n.isAfter = function (n, t) { var i = ut(n) ? n : l(n); return !(!this.isValid() || !i.isValid()) && ("millisecond" === (t = tt(t) || "millisecond") ? this.valueOf() > i.valueOf() : i.valueOf() < this.clone().startOf(t).valueOf()) }; n.isBefore = function (n, t) { var i = ut(n) ? n : l(n); return !(!this.isValid() || !i.isValid()) && ("millisecond" === (t = tt(t) || "millisecond") ? this.valueOf() < i.valueOf() : this.clone().endOf(t).valueOf() < i.valueOf()) }; n.isBetween = function (n, t, i, r) { var u = ut(n) ? n : l(n), f = ut(t) ? t : l(t); return !!(this.isValid() && u.isValid() && f.isValid()) && ("(" === (r = r || "()")[0] ? this.isAfter(u, i) : !this.isBefore(u, i)) && (")" === r[1] ? this.isBefore(f, i) : !this.isAfter(f, i)) }; n.isSame = function (n, t) { var i, r = ut(n) ? n : l(n); return !(!this.isValid() || !r.isValid()) && ("millisecond" === (t = tt(t) || "millisecond") ? this.valueOf() === r.valueOf() : (i = r.valueOf(), this.clone().startOf(t).valueOf() <= i && i <= this.clone().endOf(t).valueOf())) }; n.isSameOrAfter = function (n, t) { return this.isSame(n, t) || this.isAfter(n, t) }; n.isSameOrBefore = function (n, t) { return this.isSame(n, t) || this.isBefore(n, t) }; n.isValid = function () { return ou(this) }; n.lang = af; n.locale = ko; n.localeData = go; n.max = fo; n.min = uo; n.parsingFlags = function () { return dt({}, u(this)) }; n.set = function (n, t) { if ("object" == typeof n) for (var r = function (n) { var t, i = []; for (t in n) s(n, t) && i.push({ unit: t, priority: pu[t] }); return i.sort(function (n, t) { return n.priority - t.priority }), i }(n = yu(n)), i = 0; i < r.length; i++)this[r[i].unit](n[r[i].unit]); else if (st(this[n = tt(n)])) return this[n](t); return this }; n.startOf = function (n) { var i, r; if (void 0 === (n = tt(n)) || "millisecond" === n || !this.isValid()) return this; switch (r = this._isUTC ? ts : ns, n) { case "year": i = r(this.year(), 0, 1); break; case "quarter": i = r(this.year(), this.month() - this.month() % 3, 1); break; case "month": i = r(this.year(), this.month(), 1); break; case "week": i = r(this.year(), this.month(), this.date() - this.weekday()); break; case "isoWeek": i = r(this.year(), this.month(), this.date() - (this.isoWeekday() - 1)); break; case "day": case "date": i = r(this.year(), this.month(), this.date()); break; case "hour": i = this._d.valueOf(); i -= li(i + (this._isUTC ? 0 : 6e4 * this.utcOffset()), 36e5); break; case "minute": i = this._d.valueOf(); i -= li(i, 6e4); break; case "second": i = this._d.valueOf(); i -= li(i, 1e3) }return this._d.setTime(i), t.updateOffset(this, !0), this }; n.subtract = wo; n.toArray = function () { var n = this; return [n.year(), n.month(), n.date(), n.hour(), n.minute(), n.second(), n.millisecond()] }; n.toObject = function () { var n = this; return { years: n.year(), months: n.month(), date: n.date(), hours: n.hours(), minutes: n.minutes(), seconds: n.seconds(), milliseconds: n.milliseconds() } }; n.toDate = function () { return new Date(this.valueOf()) }; n.toISOString = function (n) { if (!this.isValid()) return null; var i = !0 !== n, t = i ? this.clone().utc() : this; return t.year() < 0 || 9999 < t.year() ? er(t, i ? "YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]" : "YYYYYY-MM-DD[T]HH:mm:ss.SSSZ") : st(Date.prototype.toISOString) ? i ? this.toDate().toISOString() : new Date(this.valueOf() + 6e4 * this.utcOffset()).toISOString().replace("Z", er(t, "Z")) : er(t, i ? "YYYY-MM-DD[T]HH:mm:ss.SSS[Z]" : "YYYY-MM-DD[T]HH:mm:ss.SSSZ") }; n.inspect = function () { if (!this.isValid()) return "moment.invalid(/* " + this._i + " */)"; var n, t, i, r = "moment", u = ""; return this.isLocal() || (r = 0 === this.utcOffset() ? "moment.utc" : "moment.parseZone", u = "Z"), n = "[" + r + '("]', t = 0 <= this.year() && this.year() <= 9999 ? "YYYY" : "YYYYYY", i = u + '[")]', this.format(n + t + "-MM-DD[T]HH:mm:ss.SSS" + i) }; "undefined" != typeof Symbol && null != Symbol.for && (n[Symbol.for("nodejs.util.inspect.custom")] = function () { return "Moment<" + this.format() + ">" }); n.toJSON = function () { return this.isValid() ? this.toISOString() : null }; n.toString = function () { return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ") }; n.unix = function () { return Math.floor(this.valueOf() / 1e3) }; n.valueOf = function () { return this._d.valueOf() - 6e4 * (this._offset || 0) }; n.creationData = function () { return { input: this._i, format: this._f, locale: this._locale, isUTC: this._isUTC, strict: this._strict } }; n.eraName = function () { for (var i, t = this.localeData().eras(), n = 0, r = t.length; n < r; ++n)if ((i = this.startOf("day").valueOf(), t[n].since <= i && i <= t[n].until) || t[n].until <= i && i <= t[n].since) return t[n].name; return "" }; n.eraNarrow = function () { for (var i, t = this.localeData().eras(), n = 0, r = t.length; n < r; ++n)if ((i = this.startOf("day").valueOf(), t[n].since <= i && i <= t[n].until) || t[n].until <= i && i <= t[n].since) return t[n].narrow; return "" }; n.eraAbbr = function () { for (var i, t = this.localeData().eras(), n = 0, r = t.length; n < r; ++n)if ((i = this.startOf("day").valueOf(), t[n].since <= i && i <= t[n].until) || t[n].until <= i && i <= t[n].since) return t[n].abbr; return "" }; n.eraYear = function () { for (var f, r, i = this.localeData().eras(), n = 0, u = i.length; n < u; ++n)if (f = i[n].since <= i[n].until ? 1 : -1, r = this.startOf("day").valueOf(), i[n].since <= r && r <= i[n].until || i[n].until <= r && r <= i[n].since) return (this.year() - t(i[n].since).year()) * f + i[n].offset; return this.year() }; n.year = ku; n.isLeapYear = function () { return or(this.year()) }; n.weekYear = function (n) { return is.call(this, n, this.week(), this.weekday(), this.localeData()._week.dow, this.localeData()._week.doy) }; n.isoWeekYear = function (n) { return is.call(this, n, this.isoWeek(), this.isoWeekday(), 1, 4) }; n.quarter = n.quarters = function (n) { return null == n ? Math.ceil((this.month() + 1) / 3) : this.month(3 * (n - 1) + this.month() % 3) }; n.month = ve; n.daysInMonth = function () { return wr(this.year(), this.month()) }; n.week = n.weeks = function (n) { var t = this.localeData().week(this); return null == n ? t : this.add(7 * (n - t), "d") }; n.isoWeek = n.isoWeeks = function (n) { var t = gi(this, 1, 4).week; return null == n ? t : this.add(7 * (n - t), "d") }; n.weeksInYear = function () { var n = this.localeData()._week; return pt(this.year(), n.dow, n.doy) }; n.weeksInWeekYear = function () { var n = this.localeData()._week; return pt(this.weekYear(), n.dow, n.doy) }; n.isoWeeksInYear = function () { return pt(this.year(), 1, 4) }; n.isoWeeksInISOWeekYear = function () { return pt(this.isoWeekYear(), 1, 4) }; n.date = wf; n.day = n.days = function (n) { if (!this.isValid()) return null != n ? this : NaN; var t, i, r = this._isUTC ? this._d.getUTCDay() : this._d.getDay(); return null != n ? (t = n, i = this.localeData(), n = "string" != typeof t ? t : isNaN(t) ? "number" == typeof (t = i.weekdaysParse(t)) ? t : null : parseInt(t, 10), this.add(n - r, "d")) : r }; n.weekday = function (n) { if (!this.isValid()) return null != n ? this : NaN; var t = (this.day() + 7 - this.localeData()._week.dow) % 7; return null == n ? t : this.add(n - t, "d") }; n.isoWeekday = function (n) { if (!this.isValid()) return null != n ? this : NaN; if (null == n) return this.day() || 7; var t, i, r = (t = n, i = this.localeData(), "string" == typeof t ? i.weekdaysParse(t) % 7 || 7 : isNaN(t) ? null : t); return this.day(this.day() % 7 ? r : r - 7) }; n.dayOfYear = function (n) { var t = Math.round((this.clone().startOf("day") - this.clone().startOf("year")) / 864e5) + 1; return null == n ? t : this.add(n - t, "d") }; n.hour = n.hours = ih; n.minute = n.minutes = rs; n.second = n.seconds = fs; n.millisecond = n.milliseconds = us; n.utcOffset = function (n, i, r) { var u, f = this._offset || 0; if (!this.isValid()) return null != n ? this : NaN; if (null == n) return this._isUTC ? f : lf(this); if ("string" == typeof n) { if (null === (n = hf(yr, n))) return this } else Math.abs(n) < 16 && !r && (n *= 60); return !this._isUTC && i && (u = lf(this)), this._offset = n, this._isUTC = !0, null != u && this.add(u, "m"), f !== n && (!i || this._changeInProgress ? yo(this, et(n - f, "m"), 1, !1) : this._changeInProgress || (this._changeInProgress = !0, t.updateOffset(this, !0), this._changeInProgress = null)), this }; n.utc = function (n) { return this.utcOffset(0, n) }; n.local = function (n) { return this._isUTC && (this.utcOffset(0, n), this._isUTC = !1, n && this.subtract(lf(this), "m")), this }; n.parseZone = function () { if (null != this._tzm) this.utcOffset(this._tzm, !1, !0); else if ("string" == typeof this._i) { var n = hf(ls, this._i); null != n ? this.utcOffset(n) : this.utcOffset(0, !0) } return this }; n.hasAlignedHourOffset = function (n) { return !!this.isValid() && (n = n ? l(n).utcOffset() : 0, (this.utcOffset() - n) % 60 == 0) }; n.isDST = function () { return this.utcOffset() > this.clone().month(0).utcOffset() || this.utcOffset() > this.clone().month(5).utcOffset() }; n.isLocal = function () { return !!this.isValid() && !this._isUTC }; n.isUtcOffset = function () { return !!this.isValid() && this._isUTC }; n.isUtc = ho; n.isUTC = ho; n.zoneAbbr = function () { return this._isUTC ? "UTC" : "" }; n.zoneName = function () { return this._isUTC ? "Coordinated Universal Time" : "" }; n.dates = nt("dates accessor is deprecated. Use date instead.", wf); n.months = nt("months accessor is deprecated. Use month instead", ve); n.years = nt("years accessor is deprecated. Use year instead", ku); n.zone = nt("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/", function (n, t) { return null != n ? ("string" != typeof n && (n = -n), this.utcOffset(n, t), this) : -this.utcOffset() }); n.isDSTShifted = nt("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information", function () { if (!k(this._isDSTShifted)) return this._isDSTShifted; var t, n = {}; return su(n, this), (n = io(n))._a ? (t = (n._isUTC ? ot : l)(n._a), this._isDSTShifted = this.isValid() && 0 < function (n, t, i) { for (var e = Math.min(n.length, t.length), o = Math.abs(n.length - t.length), u = 0, r = 0; r < e; r++)(i && n[r] !== t[r] || !i && f(n[r]) !== f(t[r])) && u++; return u + o }(n._a, t.toArray())) : this._isDSTShifted = !1, this._isDSTShifted }); o = lu.prototype; o.calendar = function (n, t, i) { var r = this._calendar[n] || this._calendar.sameElse; return st(r) ? r.call(t, i) : r }; o.longDateFormat = function (n) { var t = this._longDateFormat[n], i = this._longDateFormat[n.toUpperCase()]; return t || !i ? t : (this._longDateFormat[n] = i.match(au).map(function (n) { return "MMMM" === n || "MM" === n || "DD" === n || "dddd" === n ? n.slice(1) : n }).join(""), this._longDateFormat[n]) }; o.invalidDate = function () { return this._invalidDate }; o.ordinal = function (n) { return this._ordinal.replace("%d", n) }; o.preparse = es; o.postformat = es; o.relativeTime = function (n, t, i, r) { var u = this._relativeTime[i]; return st(u) ? u(n, t, i, r) : u.replace(/%d/i, n) }; o.pastFuture = function (n, t) { var i = this._relativeTime[0 < n ? "future" : "past"]; return st(i) ? i(t) : i.replace(/%s/i, t) }; o.set = function (n) { var i; for (var t in n) s(n, t) && (st(i = n[t]) ? this[t] = i : this["_" + t] = i); this._config = n; this._dayOfMonthOrdinalParseLenient = new RegExp((this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) + "|" + /\d{1,2}/.source) }; o.eras = function () { for (var r, i = this._eras || wt("en")._eras, n = 0, u = i.length; n < u; ++n) { switch (typeof i[n].since) { case "string": r = t(i[n].since).startOf("day"); i[n].since = r.valueOf() }switch (typeof i[n].until) { case "undefined": i[n].until = 1 / 0; break; case "string": r = t(i[n].until).startOf("day").valueOf(); i[n].until = r.valueOf() } } return i }; o.erasParse = function (n, t, i) { var r, s, f, e, o, u = this.eras(); for (n = n.toUpperCase(), r = 0, s = u.length; r < s; ++r)if (f = u[r].name.toUpperCase(), e = u[r].abbr.toUpperCase(), o = u[r].narrow.toUpperCase(), i) switch (t) { case "N": case "NN": case "NNN": if (e === n) return u[r]; break; case "NNNN": if (f === n) return u[r]; break; case "NNNNN": if (o === n) return u[r] } else if (0 <= [f, e, o].indexOf(n)) return u[r] }; o.erasConvertYear = function (n, i) { var r = n.since <= n.until ? 1 : -1; return void 0 === i ? t(n.since).year() : t(n.since).year() + (i - n.offset) * r }; o.erasAbbrRegex = function (n) { return s(this, "_erasAbbrRegex") || pf.call(this), n ? this._erasAbbrRegex : this._erasRegex }; o.erasNameRegex = function (n) { return s(this, "_erasNameRegex") || pf.call(this), n ? this._erasNameRegex : this._erasRegex }; o.erasNarrowRegex = function (n) { return s(this, "_erasNarrowRegex") || pf.call(this), n ? this._erasNarrowRegex : this._erasRegex }; o.months = function (n, t) { return n ? rt(this._months) ? this._months[n.month()] : this._months[(this._months.isFormat || le).test(t) ? "format" : "standalone"][n.month()] : rt(this._months) ? this._months : this._months.standalone }; o.monthsShort = function (n, t) { return n ? rt(this._monthsShort) ? this._monthsShort[n.month()] : this._monthsShort[le.test(t) ? "format" : "standalone"][n.month()] : rt(this._monthsShort) ? this._monthsShort : this._monthsShort.standalone }; o.monthsParse = function (n, t, i) { var r, u, f; if (this._monthsParseExact) return function (n, t, i) { var u, r, e, f = n.toLocaleLowerCase(); if (!this._monthsParse) for (this._monthsParse = [], this._longMonthsParse = [], this._shortMonthsParse = [], u = 0; u < 12; ++u)e = ot([2e3, u]), this._shortMonthsParse[u] = this.monthsShort(e, "").toLocaleLowerCase(), this._longMonthsParse[u] = this.months(e, "").toLocaleLowerCase(); return i ? "MMM" === t ? -1 !== (r = v.call(this._shortMonthsParse, f)) ? r : null : -1 !== (r = v.call(this._longMonthsParse, f)) ? r : null : "MMM" === t ? -1 !== (r = v.call(this._shortMonthsParse, f)) || -1 !== (r = v.call(this._longMonthsParse, f)) ? r : null : -1 !== (r = v.call(this._longMonthsParse, f)) || -1 !== (r = v.call(this._shortMonthsParse, f)) ? r : null }.call(this, n, t, i); for (this._monthsParse || (this._monthsParse = [], this._longMonthsParse = [], this._shortMonthsParse = []), r = 0; r < 12; r++)if ((u = ot([2e3, r]), i && !this._longMonthsParse[r] && (this._longMonthsParse[r] = new RegExp("^" + this.months(u, "").replace(".", "") + "$", "i"), this._shortMonthsParse[r] = new RegExp("^" + this.monthsShort(u, "").replace(".", "") + "$", "i")), i || this._monthsParse[r] || (f = "^" + this.months(u, "") + "|^" + this.monthsShort(u, ""), this._monthsParse[r] = new RegExp(f.replace(".", ""), "i")), i && "MMMM" === t && this._longMonthsParse[r].test(n)) || i && "MMM" === t && this._shortMonthsParse[r].test(n) || !i && this._monthsParse[r].test(n)) return r }; o.monthsRegex = function (n) { return this._monthsParseExact ? (s(this, "_monthsRegex") || ye.call(this), n ? this._monthsStrictRegex : this._monthsRegex) : (s(this, "_monthsRegex") || (this._monthsRegex = bs), this._monthsStrictRegex && n ? this._monthsStrictRegex : this._monthsRegex) }; o.monthsShortRegex = function (n) { return this._monthsParseExact ? (s(this, "_monthsRegex") || ye.call(this), n ? this._monthsShortStrictRegex : this._monthsShortRegex) : (s(this, "_monthsShortRegex") || (this._monthsShortRegex = ws), this._monthsShortStrictRegex && n ? this._monthsShortStrictRegex : this._monthsShortRegex) }; o.week = function (n) { return gi(n, this._week.dow, this._week.doy).week }; o.firstDayOfYear = function () { return this._week.doy }; o.firstDayOfWeek = function () { return this._week.dow }; o.weekdays = function (n, t) { var i = rt(this._weekdays) ? this._weekdays : this._weekdays[n && !0 !== n && this._weekdays.isFormat.test(t) ? "format" : "standalone"]; return !0 === n ? du(i, this._week.dow) : n ? i[n.day()] : i }; o.weekdaysMin = function (n) { return !0 === n ? du(this._weekdaysMin, this._week.dow) : n ? this._weekdaysMin[n.day()] : this._weekdaysMin }; o.weekdaysShort = function (n) { return !0 === n ? du(this._weekdaysShort, this._week.dow) : n ? this._weekdaysShort[n.day()] : this._weekdaysShort }; o.weekdaysParse = function (n, t, i) { var r, u, f; if (this._weekdaysParseExact) return function (n, t, i) { var f, r, e, u = n.toLocaleLowerCase(); if (!this._weekdaysParse) for (this._weekdaysParse = [], this._shortWeekdaysParse = [], this._minWeekdaysParse = [], f = 0; f < 7; ++f)e = ot([2e3, 1]).day(f), this._minWeekdaysParse[f] = this.weekdaysMin(e, "").toLocaleLowerCase(), this._shortWeekdaysParse[f] = this.weekdaysShort(e, "").toLocaleLowerCase(), this._weekdaysParse[f] = this.weekdays(e, "").toLocaleLowerCase(); return i ? "dddd" === t ? -1 !== (r = v.call(this._weekdaysParse, u)) ? r : null : "ddd" === t ? -1 !== (r = v.call(this._shortWeekdaysParse, u)) ? r : null : -1 !== (r = v.call(this._minWeekdaysParse, u)) ? r : null : "dddd" === t ? -1 !== (r = v.call(this._weekdaysParse, u)) || -1 !== (r = v.call(this._shortWeekdaysParse, u)) || -1 !== (r = v.call(this._minWeekdaysParse, u)) ? r : null : "ddd" === t ? -1 !== (r = v.call(this._shortWeekdaysParse, u)) || -1 !== (r = v.call(this._weekdaysParse, u)) || -1 !== (r = v.call(this._minWeekdaysParse, u)) ? r : null : -1 !== (r = v.call(this._minWeekdaysParse, u)) || -1 !== (r = v.call(this._weekdaysParse, u)) || -1 !== (r = v.call(this._shortWeekdaysParse, u)) ? r : null }.call(this, n, t, i); for (this._weekdaysParse || (this._weekdaysParse = [], this._minWeekdaysParse = [], this._shortWeekdaysParse = [], this._fullWeekdaysParse = []), r = 0; r < 7; r++)if ((u = ot([2e3, 1]).day(r), i && !this._fullWeekdaysParse[r] && (this._fullWeekdaysParse[r] = new RegExp("^" + this.weekdays(u, "").replace(".", "\\.?") + "$", "i"), this._shortWeekdaysParse[r] = new RegExp("^" + this.weekdaysShort(u, "").replace(".", "\\.?") + "$", "i"), this._minWeekdaysParse[r] = new RegExp("^" + this.weekdaysMin(u, "").replace(".", "\\.?") + "$", "i")), this._weekdaysParse[r] || (f = "^" + this.weekdays(u, "") + "|^" + this.weekdaysShort(u, "") + "|^" + this.weekdaysMin(u, ""), this._weekdaysParse[r] = new RegExp(f.replace(".", ""), "i")), i && "dddd" === t && this._fullWeekdaysParse[r].test(n)) || i && "ddd" === t && this._shortWeekdaysParse[r].test(n) || i && "dd" === t && this._minWeekdaysParse[r].test(n) || !i && this._weekdaysParse[r].test(n)) return r }; o.weekdaysRegex = function (n) { return this._weekdaysParseExact ? (s(this, "_weekdaysRegex") || gu.call(this), n ? this._weekdaysStrictRegex : this._weekdaysRegex) : (s(this, "_weekdaysRegex") || (this._weekdaysRegex = gs), this._weekdaysStrictRegex && n ? this._weekdaysStrictRegex : this._weekdaysRegex) }; o.weekdaysShortRegex = function (n) { return this._weekdaysParseExact ? (s(this, "_weekdaysRegex") || gu.call(this), n ? this._weekdaysShortStrictRegex : this._weekdaysShortRegex) : (s(this, "_weekdaysShortRegex") || (this._weekdaysShortRegex = nh), this._weekdaysShortStrictRegex && n ? this._weekdaysShortStrictRegex : this._weekdaysShortRegex) }; o.weekdaysMinRegex = function (n) { return this._weekdaysParseExact ? (s(this, "_weekdaysRegex") || gu.call(this), n ? this._weekdaysMinStrictRegex : this._weekdaysMinRegex) : (s(this, "_weekdaysMinRegex") || (this._weekdaysMinRegex = th), this._weekdaysMinStrictRegex && n ? this._weekdaysMinStrictRegex : this._weekdaysMinRegex) }; o.isPM = function (n) { return "p" === (n + "").toLowerCase().charAt(0) }; o.meridiem = function (n, t, i) { return 11 < n ? i ? "pm" : "PM" : i ? "am" : "AM" }; gt("en", { eras: [{ since: "0001-01-01", until: 1 / 0, offset: 1, name: "Anno Domini", narrow: "AD", abbr: "AD" }, { since: "0000-12-31", until: -1 / 0, offset: 1, name: "Before Christ", narrow: "BC", abbr: "BC" }], dayOfMonthOrdinalParse: /\d{1,2}(th|st|nd|rd)/, ordinal: function (n) { var t = n % 10; return n + (1 === f(n % 100 / 10) ? "th" : 1 == t ? "st" : 2 == t ? "nd" : 3 == t ? "rd" : "th") } }); t.lang = nt("moment.lang is deprecated. Use moment.locale instead.", gt); t.langData = nt("moment.langData is deprecated. Use moment.localeData instead.", wt); lt = Math.abs; var vh = bt("ms"), yh = bt("s"), ph = bt("m"), wh = bt("h"), bh = bt("d"), kh = bt("w"), dh = bt("M"), gh = bt("Q"), nc = bt("y"); var tc = ui("milliseconds"), ic = ui("seconds"), rc = ui("minutes"), uc = ui("hours"), fc = ui("days"), ec = ui("months"), oc = ui("years"), kt = Math.round, ai = { ss: 44, s: 45, m: 45, h: 22, d: 26, w: null, M: 11 }; return uu = Math.abs, e = gr.prototype, e.isValid = function () { return this._isValid }, e.abs = function () { var n = this._data; return this._milliseconds = lt(this._milliseconds), this._days = lt(this._days), this._months = lt(this._months), n.milliseconds = lt(n.milliseconds), n.seconds = lt(n.seconds), n.minutes = lt(n.minutes), n.hours = lt(n.hours), n.months = lt(n.months), n.years = lt(n.years), this }, e.add = function (n, t) { return ss(this, n, t, 1) }, e.subtract = function (n, t) { return ss(this, n, t, -1) }, e.as = function (n) { if (!this.isValid()) return NaN; var t, r, i = this._milliseconds; if ("month" === (n = tt(n)) || "quarter" === n || "year" === n) switch (t = this._days + i / 864e5, r = this._months + cs(t), n) { case "month": return r; case "quarter": return r / 3; case "year": return r / 12 } else switch (t = this._days + Math.round(kf(this._months)), n) { case "week": return t / 7 + i / 6048e5; case "day": return t + i / 864e5; case "hour": return 24 * t + i / 36e5; case "minute": return 1440 * t + i / 6e4; case "second": return 86400 * t + i / 1e3; case "millisecond": return Math.floor(864e5 * t) + i; default: throw new Error("Unknown unit " + n); } }, e.asMilliseconds = vh, e.asSeconds = yh, e.asMinutes = ph, e.asHours = wh, e.asDays = bh, e.asWeeks = kh, e.asMonths = dh, e.asQuarters = gh, e.asYears = nc, e.valueOf = function () { return this.isValid() ? this._milliseconds + 864e5 * this._days + this._months % 12 * 2592e6 + 31536e6 * f(this._months / 12) : NaN }, e._bubble = function () { var u, f, e, o, s, r = this._milliseconds, n = this._days, t = this._months, i = this._data; return 0 <= r && 0 <= n && 0 <= t || r <= 0 && n <= 0 && t <= 0 || (r += 864e5 * hs(kf(t) + n), t = n = 0), i.milliseconds = r % 1e3, u = it(r / 1e3), i.seconds = u % 60, f = it(u / 60), i.minutes = f % 60, e = it(f / 60), i.hours = e % 24, n += it(e / 24), t += s = it(cs(n)), n -= hs(kf(s)), o = it(t / 12), t %= 12, i.days = n, i.months = t, i.years = o, this }, e.clone = function () { return et(this) }, e.get = function (n) { return n = tt(n), this.isValid() ? this[n + "s"]() : NaN }, e.milliseconds = tc, e.seconds = ic, e.minutes = rc, e.hours = uc, e.days = fc, e.weeks = function () { return it(this.days() / 7) }, e.months = ec, e.years = oc, e.humanize = function (n, t) { if (!this.isValid()) return this.localeData().invalidDate(); var i, r, u = !1, f = ai; return "object" == typeof n && (t = n, n = !1), "boolean" == typeof n && (u = n), "object" == typeof t && (f = Object.assign({}, ai, t), null != t.s && null == t.ss && (f.ss = t.s - 1)), i = this.localeData(), r = sc(this, !u, f, i), u && (r = i.pastFuture(+this, r)), i.postformat(r) }, e.toISOString = fu, e.toString = fu, e.toJSON = fu, e.locale = ko, e.localeData = go, e.toIsoString = nt("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)", fu), e.lang = af, r("X", 0, 0, "unix"), r("x", 0, 0, "valueOf"), i("x", vr), i("X", /[+-]?\d+(\.\d{1,3})?/), h("X", function (n, t, i) { i._d = new Date(1e3 * parseFloat(n)) }), h("x", function (n, t, i) { i._d = new Date(f(n)) }), t.version = "2.25.3", df = l, t.fn = n, t.min = function () { return eo("isBefore", [].slice.call(arguments, 0)) }, t.max = function () { return eo("isAfter", [].slice.call(arguments, 0)) }, t.now = function () { return Date.now ? Date.now() : +new Date }, t.utc = ot, t.unix = function (n) { return l(1e3 * n) }, t.months = function (n, t) { return os(n, t, "months") }, t.isDate = yi, t.locale = gt, t.invalid = ir, t.duration = et, t.isMoment = ut, t.weekdays = function (n, t, i) { return bf(n, t, i, "weekdays") }, t.parseZone = function () { return l.apply(null, arguments).parseZone() }, t.localeData = wt, t.isDuration = nu, t.monthsShort = function (n, t) { return os(n, t, "monthsShort") }, t.weekdaysMin = function (n, t, i) { return bf(n, t, i, "weekdaysMin") }, t.defineLocale = tf, t.updateLocale = function (n, t) { if (null != t) { var r, i, u = de; null != a[n] && null != a[n].parentLocale ? a[n].set(cu(a[n]._config, t)) : (null != (i = kr(n)) && (u = i._config), t = cu(u, t), null == i && (t.abbr = n), (r = new lu(t)).parentLocale = a[n], a[n] = r); gt(n) } else null != a[n] && (null != a[n].parentLocale ? (a[n] = a[n].parentLocale, n === gt() && gt(n)) : null != a[n] && delete a[n]); return a[n] }, t.locales = function () { return ie(a) }, t.weekdaysShort = function (n, t, i) { return bf(n, t, i, "weekdaysShort") }, t.normalizeUnits = tt, t.relativeTimeRounding = function (n) { return void 0 === n ? kt : "function" == typeof n && (kt = n, !0) }, t.relativeTimeThreshold = function (n, t) { return void 0 !== ai[n] && (void 0 === t ? ai[n] : (ai[n] = t, "s" === n && (ai.ss = t - 1), !0)) }, t.calendarFormat = function (n, t) { var i = n.diff(t, "days", !0); return i < -6 ? "sameElse" : i < -1 ? "lastWeek" : i < 0 ? "lastDay" : i < 1 ? "sameDay" : i < 2 ? "nextDay" : i < 7 ? "nextWeek" : "sameElse" }, t.prototype = n, t.HTML5_FMT = { DATETIME_LOCAL: "YYYY-MM-DDTHH:mm", DATETIME_LOCAL_SECONDS: "YYYY-MM-DDTHH:mm:ss", DATETIME_LOCAL_MS: "YYYY-MM-DDTHH:mm:ss.SSS", DATE: "YYYY-MM-DD", TIME: "HH:mm", TIME_SECONDS: "HH:mm:ss", TIME_MS: "HH:mm:ss.SSS", WEEK: "GGGG-[W]WW", MONTH: "YYYY-MM" }, t });
  78. /**
  79. * @version: 3.0.3
  80. * @author: Dan Grossman http://www.dangrossman.info/
  81. * @copyright: Copyright (c) 2012-2018 Dan Grossman. All rights reserved.
  82. * @license: Licensed under the MIT license. See http://www.opensource.org/licenses/mit-license.php
  83. * @website: http://www.daterangepicker.com/
  84. */
  85. (function (n, t) { var i, r; typeof define == "function" && define.amd ? define(["moment", "jquery"], function (n, i) { return i.fn || (i.fn = {}), t(n, i) }) : typeof module == "object" && module.exports ? (i = typeof window != "undefined" ? window.jQuery : undefined, i || (i = require("jquery"), i.fn || (i.fn = {})), r = typeof window != "undefined" && typeof window.moment != "undefined" ? window.moment : require("moment"), module.exports = t(r, i)) : n.daterangepicker = t(n.moment, n.jQuery) })(this, function (n, t) { var r = !1, i = function (i, r, u) { var y, f, o, e, c, v, s, h, a, l; if (this.parentEl = "body", this.element = t(i), this.startDate = n().startOf("day"), this.endDate = n().endOf("day"), this.minDate = !1, this.maxDate = !1, this.maxSpan = !1, this.autoApply = !1, this.singleDatePicker = !1, this.showDropdowns = !1, this.minYear = n().subtract(100, "year").format("YYYY"), this.maxYear = n().add(100, "year").format("YYYY"), this.showWeekNumbers = !1, this.showISOWeekNumbers = !1, this.showCustomRangeLabel = !0, this.timePicker = !1, this.timePicker24Hour = !1, this.timePickerIncrement = 1, this.timePickerSeconds = !1, this.linkedCalendars = !0, this.autoUpdateInput = !0, this.alwaysShowCalendars = !1, this.ranges = {}, this.opens = "left", this.element.hasClass("pull-right") && (this.opens = "left"), this.drops = "up", this.element.hasClass("dropup") && (this.drops = "up"), this.buttonClasses = "btn btn-sm", this.applyButtonClasses = "btn-primary", this.cancelButtonClasses = "btn-default", this.locale = { direction: "ltr", format: n.localeData().longDateFormat("L"), separator: " - ", applyLabel: "Apply", cancelLabel: "Cancel", weekLabel: "W", customRangeLabel: "Custom Range", daysOfWeek: n.weekdaysMin(), monthNames: n.monthsShort(), firstDay: n.localeData().firstDayOfWeek() }, this.callback = function () { }, this.isShowing = !1, this.leftCalendar = {}, this.rightCalendar = {}, (typeof r != "object" || r === null) && (r = {}), r = t.extend(this.element.data(), r), typeof r.template == "string" || r.template instanceof t || (r.template = '<div class="daterangepicker"><div class="ranges"><\/div><div class="drp-calendar left"><div class="calendar-table"><\/div><div class="calendar-time"><\/div><\/div><div class="drp-calendar right"><div class="calendar-table"><\/div><div class="calendar-time"><\/div><\/div><div class="drp-buttons"><span class="drp-selected"><\/span><button class="cancelBtn" type="button"><\/button><button class="applyBtn" disabled="disabled" type="button"><\/button> <\/div><\/div>'), this.parentEl = r.parentEl && t(r.parentEl).length ? t(r.parentEl) : t(this.parentEl), this.container = t(r.template).appendTo(this.parentEl), typeof r.locale == "object" && (typeof r.locale.direction == "string" && (this.locale.direction = r.locale.direction), typeof r.locale.format == "string" && (this.locale.format = r.locale.format), typeof r.locale.separator == "string" && (this.locale.separator = r.locale.separator), typeof r.locale.daysOfWeek == "object" && (this.locale.daysOfWeek = r.locale.daysOfWeek.slice()), typeof r.locale.monthNames == "object" && (this.locale.monthNames = r.locale.monthNames.slice()), typeof r.locale.firstDay == "number" && (this.locale.firstDay = r.locale.firstDay), typeof r.locale.applyLabel == "string" && (this.locale.applyLabel = r.locale.applyLabel), typeof r.locale.cancelLabel == "string" && (this.locale.cancelLabel = r.locale.cancelLabel), typeof r.locale.weekLabel == "string" && (this.locale.weekLabel = r.locale.weekLabel), typeof r.locale.customRangeLabel == "string" && (h = document.createElement("textarea"), h.innerHTML = r.locale.customRangeLabel, a = h.value, this.locale.customRangeLabel = a)), this.container.addClass(this.locale.direction), t(".cancelBtn").click(function () { t(".CancelBtnFloating").addClass("floating-label-form-group-with-value") }), typeof r.startDate == "string" && (this.startDate = n(r.startDate, this.locale.format)), typeof r.endDate == "string" && (this.endDate = n(r.endDate, this.locale.format)), typeof r.minDate == "string" && (this.minDate = n(r.minDate, this.locale.format)), typeof r.maxDate == "string" && (this.maxDate = n(r.maxDate, this.locale.format)), typeof r.startDate == "object" && (this.startDate = n(r.startDate)), typeof r.endDate == "object" && (this.endDate = n(r.endDate)), typeof r.minDate == "object" && (this.minDate = n(r.minDate)), typeof r.maxDate == "object" && (this.maxDate = n(r.maxDate)), this.minDate && this.startDate.isBefore(this.minDate) && (this.startDate = this.minDate.clone()), this.maxDate && this.endDate.isAfter(this.maxDate) && (this.endDate = this.maxDate.clone()), typeof r.applyButtonClasses == "string" && (this.applyButtonClasses = r.applyButtonClasses), typeof r.applyClass == "string" && (this.applyButtonClasses = r.applyClass), typeof r.cancelButtonClasses == "string" && (this.cancelButtonClasses = r.cancelButtonClasses), typeof r.cancelClass == "string" && (this.cancelButtonClasses = r.cancelClass), typeof r.maxSpan == "object" && (this.maxSpan = r.maxSpan), typeof r.dateLimit == "object" && (this.maxSpan = r.dateLimit), typeof r.opens == "string" && (this.opens = r.opens), typeof r.drops == "string" && (this.drops = r.drops), typeof r.showWeekNumbers == "boolean" && (this.showWeekNumbers = r.showWeekNumbers), typeof r.showISOWeekNumbers == "boolean" && (this.showISOWeekNumbers = r.showISOWeekNumbers), typeof r.buttonClasses == "string" && (this.buttonClasses = r.buttonClasses), typeof r.buttonClasses == "object" && (this.buttonClasses = r.buttonClasses.join(" ")), typeof r.showDropdowns == "boolean" && (this.showDropdowns = r.showDropdowns), typeof r.minYear == "number" && (this.minYear = r.minYear), typeof r.maxYear == "number" && (this.maxYear = r.maxYear), typeof r.showCustomRangeLabel == "boolean" && (this.showCustomRangeLabel = r.showCustomRangeLabel), typeof r.singleDatePicker == "boolean" && (this.singleDatePicker = r.singleDatePicker, this.singleDatePicker && (this.endDate = this.startDate.clone())), typeof r.timePicker == "boolean" && (this.timePicker = r.timePicker), typeof r.timePickerSeconds == "boolean" && (this.timePickerSeconds = r.timePickerSeconds), typeof r.timePickerIncrement == "number" && (this.timePickerIncrement = r.timePickerIncrement), typeof r.timePicker24Hour == "boolean" && (this.timePicker24Hour = r.timePicker24Hour), typeof r.autoApply == "boolean" && (this.autoApply = r.autoApply), typeof r.autoUpdateInput == "boolean" && (this.autoUpdateInput = r.autoUpdateInput), typeof r.linkedCalendars == "boolean" && (this.linkedCalendars = r.linkedCalendars), typeof r.isInvalidDate == "function" && (this.isInvalidDate = r.isInvalidDate), typeof r.isCustomDate == "function" && (this.isCustomDate = r.isCustomDate), typeof r.alwaysShowCalendars == "boolean" && (this.alwaysShowCalendars = r.alwaysShowCalendars), this.locale.firstDay != 0) for (y = this.locale.firstDay; y > 0;)this.locale.daysOfWeek.push(this.locale.daysOfWeek.shift()), y--; if (typeof r.startDate == "undefined" && typeof r.endDate == "undefined" && t(this.element).is(":text") && (c = t(this.element).val(), v = c.split(this.locale.separator), f = o = null, v.length == 2 ? (f = n(v[0], this.locale.format), o = n(v[1], this.locale.format)) : this.singleDatePicker && c !== "" && (f = n(c, this.locale.format), o = n(c, this.locale.format)), f !== null && o !== null && (this.setStartDate(f), this.setEndDate(o))), typeof r.ranges == "object") { for (e in r.ranges) (f = typeof r.ranges[e][0] == "string" ? n(r.ranges[e][0], this.locale.format) : n(r.ranges[e][0]), o = typeof r.ranges[e][1] == "string" ? n(r.ranges[e][1], this.locale.format) : n(r.ranges[e][1]), this.minDate && f.isBefore(this.minDate) && (f = this.minDate.clone()), s = this.maxDate, this.maxSpan && s && f.clone().add(this.maxSpan).isAfter(s) && (s = f.clone().add(this.maxSpan)), s && o.isAfter(s) && (o = s.clone()), this.minDate && o.isBefore(this.minDate, this.timepicker ? "minute" : "day") || s && f.isAfter(s, this.timepicker ? "minute" : "day")) || (h = document.createElement("textarea"), h.innerHTML = e, a = h.value, this.ranges[a] = [f, o]); l = "<ul>"; for (e in this.ranges) l += '<li data-range-key="' + e + '">' + e + "<\/li>"; this.showCustomRangeLabel && (l += '<li data-range-key="' + this.locale.customRangeLabel + '">' + this.locale.customRangeLabel + "<\/li>"); l += "<\/ul>"; this.container.find(".ranges").prepend(l) } typeof u == "function" && (this.callback = u); this.timePicker || (this.startDate = this.startDate.startOf("day"), this.endDate = this.endDate.endOf("day"), this.container.find(".calendar-time").hide()); this.timePicker && this.autoApply && (this.autoApply = !1); this.autoApply && this.container.addClass("auto-apply"); typeof r.ranges == "object" && this.container.addClass("show-ranges"); this.singleDatePicker && (this.container.addClass("single"), this.container.find(".drp-calendar.left").addClass("single"), this.container.find(".drp-calendar.left").show(), this.container.find(".drp-calendar.right").hide(), this.timePicker || this.container.addClass("auto-apply")); (typeof r.ranges == "undefined" && !this.singleDatePicker || this.alwaysShowCalendars) && this.container.addClass("show-calendar"); this.container.addClass("opens" + this.opens); this.container.find(".applyBtn, .cancelBtn").addClass(this.buttonClasses); this.applyButtonClasses.length && this.container.find(".applyBtn").addClass(this.applyButtonClasses); this.cancelButtonClasses.length && this.container.find(".cancelBtn").addClass(this.cancelButtonClasses); this.container.find(".applyBtn").html(this.locale.applyLabel); this.container.find(".cancelBtn").html(this.locale.cancelLabel); this.container.find(".drp-calendar").on("click.daterangepicker", ".prev", t.proxy(this.clickPrev, this)).on("click.daterangepicker", ".next", t.proxy(this.clickNext, this)).on("mousedown.daterangepicker", "td.available", t.proxy(this.clickDate, this)).on("mouseenter.daterangepicker", "td.available", t.proxy(this.hoverDate, this)).on("change.daterangepicker", "select.yearselect", t.proxy(this.monthOrYearChanged, this)).on("change.daterangepicker", "select.monthselect", t.proxy(this.monthOrYearChanged, this)).on("change.daterangepicker", "select.hourselect,select.minuteselect,select.secondselect,select.ampmselect", t.proxy(this.timeChanged, this)); this.container.find(".ranges").on("click.daterangepicker", "li", t.proxy(this.clickRange, this)); this.container.find(".drp-buttons").on("click.daterangepicker", "button.applyBtn", t.proxy(this.clickApply, this)).on("click.daterangepicker", "button.cancelBtn", t.proxy(this.clickCancel, this)); if (this.element.is("input") || this.element.is("button")) this.element.on({ "click.daterangepicker": t.proxy(this.show, this), "focus.daterangepicker": t.proxy(this.show, this), "keyup.daterangepicker": t.proxy(this.elementChanged, this), "keydown.daterangepicker": t.proxy(this.keydown, this) }); else { this.element.on("click.daterangepicker", t.proxy(this.toggle, this)); this.element.on("keydown.daterangepicker", t.proxy(this.toggle, this)) } this.updateElement() }; return i.prototype = { constructor: i, setStartDate: function (t) { typeof t == "string" && (this.startDate = n(t, this.locale.format)); typeof t == "object" && (this.startDate = n(t)); this.timePicker || (this.startDate = this.startDate.startOf("day")); this.timePicker && this.timePickerIncrement && this.startDate.minute(Math.round(this.startDate.minute() / this.timePickerIncrement) * this.timePickerIncrement); this.minDate && this.startDate.isBefore(this.minDate) && (this.startDate = this.minDate.clone(), this.timePicker && this.timePickerIncrement && this.startDate.minute(Math.round(this.startDate.minute() / this.timePickerIncrement) * this.timePickerIncrement)); this.maxDate && this.startDate.isAfter(this.maxDate) && (this.startDate = this.maxDate.clone(), this.timePicker && this.timePickerIncrement && this.startDate.minute(Math.floor(this.startDate.minute() / this.timePickerIncrement) * this.timePickerIncrement)); this.isShowing || this.updateElement(); this.updateMonthsInView() }, setEndDate: function (t) { typeof t == "string" && (this.endDate = n(t, this.locale.format)); typeof t == "object" && (this.endDate = n(t)); this.timePicker || (this.endDate = this.endDate.add(1, "d").startOf("day").subtract(1, "second")); this.timePicker && this.timePickerIncrement && this.endDate.minute(Math.round(this.endDate.minute() / this.timePickerIncrement) * this.timePickerIncrement); this.endDate.isBefore(this.startDate) && (this.endDate = this.startDate.clone()); this.maxDate && this.endDate.isAfter(this.maxDate) && (this.endDate = this.maxDate.clone()); this.maxSpan && this.startDate.clone().add(this.maxSpan).isBefore(this.endDate) && (this.endDate = this.startDate.clone().add(this.maxSpan)); this.previousRightTime = this.endDate.clone(); this.container.find(".drp-selected").html(this.startDate.format(this.locale.format) + this.locale.separator + this.endDate.format(this.locale.format)); this.isShowing || this.updateElement(); this.updateMonthsInView() }, isInvalidDate: function () { return !1 }, isCustomDate: function () { return !1 }, updateView: function () { this.timePicker && (this.renderTimePicker("left"), this.renderTimePicker("right"), this.endDate ? this.container.find(".right .calendar-time select").removeAttr("disabled").removeClass("disabled") : this.container.find(".right .calendar-time select").attr("disabled", "disabled").addClass("disabled")); this.endDate && this.container.find(".drp-selected").html(this.startDate.format(this.locale.format) + this.locale.separator + this.endDate.format(this.locale.format)); this.updateMonthsInView(); this.updateCalendars(); this.updateFormInputs() }, updateMonthsInView: function () { if (this.endDate) { if (!this.singleDatePicker && this.leftCalendar.month && this.rightCalendar.month && (this.startDate.format("YYYY-MM") == this.leftCalendar.month.format("YYYY-MM") || this.startDate.format("YYYY-MM") == this.rightCalendar.month.format("YYYY-MM")) && (this.endDate.format("YYYY-MM") == this.leftCalendar.month.format("YYYY-MM") || this.endDate.format("YYYY-MM") == this.rightCalendar.month.format("YYYY-MM"))) return; this.leftCalendar.month = this.startDate.clone().date(2); this.rightCalendar.month = this.linkedCalendars || this.endDate.month() == this.startDate.month() && this.endDate.year() == this.startDate.year() ? this.startDate.clone().date(2).add(1, "month") : this.endDate.clone().date(2) } else this.leftCalendar.month.format("YYYY-MM") != this.startDate.format("YYYY-MM") && this.rightCalendar.month.format("YYYY-MM") != this.startDate.format("YYYY-MM") && (this.leftCalendar.month = this.startDate.clone().date(2), this.rightCalendar.month = this.startDate.clone().date(2).add(1, "month")); this.maxDate && this.linkedCalendars && !this.singleDatePicker && this.rightCalendar.month > this.maxDate && (this.rightCalendar.month = this.maxDate.clone().date(2), this.leftCalendar.month = this.maxDate.clone().date(2).subtract(1, "month")) }, updateCalendars: function () { var n, i, r, t; (this.timePicker && (this.endDate ? (n = parseInt(this.container.find(".left .hourselect").val(), 10), i = parseInt(this.container.find(".left .minuteselect").val(), 10), r = this.timePickerSeconds ? parseInt(this.container.find(".left .secondselect").val(), 10) : 0, this.timePicker24Hour || (t = this.container.find(".left .ampmselect").val(), t === "PM" && n < 12 && (n += 12), t === "AM" && n === 12 && (n = 0))) : (n = parseInt(this.container.find(".right .hourselect").val(), 10), i = parseInt(this.container.find(".right .minuteselect").val(), 10), r = this.timePickerSeconds ? parseInt(this.container.find(".right .secondselect").val(), 10) : 0, this.timePicker24Hour || (t = this.container.find(".right .ampmselect").val(), t === "PM" && n < 12 && (n += 12), t === "AM" && n === 12 && (n = 0))), this.leftCalendar.month.hour(n).minute(i).second(r), this.rightCalendar.month.hour(n).minute(i).second(r)), this.renderCalendar("left"), this.renderCalendar("right"), this.container.find(".ranges li").removeClass("active"), this.endDate != null) && this.calculateChosenLabel() }, renderCalendar: function (i) { var r = i == "left" ? this.leftCalendar : this.rightCalendar, d = r.month.month(), g = r.month.year(), yt = r.month.hour(), et = r.month.minute(), ot = r.month.second(), pt = n([g, d]).daysInMonth(), w = n([g, d, 1]), wt = n([g, d, pt]), st = n(w).subtract(1, "month").month(), ht = n(w).subtract(1, "month").year(), nt = n([ht, st]).daysInMonth(), ct = w.day(), r = [], a, v, tt, h, b, l, ut, f, u, o, p, k, ft, s; for (r.firstDay = w, r.lastDay = wt, s = 0; s < 6; s++)r[s] = []; a = nt - ct + this.locale.firstDay + 1; a > nt && (a -= 7); ct == this.locale.firstDay && (a = nt - 6); v = n([ht, st, a, 12, et, ot]); for (var s = 0, u = 0, f = 0; s < 42; s++, u++, v = n(v).add(24, "hour"))s > 0 && u % 7 == 0 && (u = 0, f++), r[f][u] = v.clone().hour(yt).minute(et).second(ot), v.hour(12), this.minDate && r[f][u].format("YYYY-MM-DD") == this.minDate.format("YYYY-MM-DD") && r[f][u].isBefore(this.minDate) && i == "left" && (r[f][u] = this.minDate.clone()), this.maxDate && r[f][u].format("YYYY-MM-DD") == this.maxDate.format("YYYY-MM-DD") && r[f][u].isAfter(this.maxDate) && i == "right" && (r[f][u] = this.maxDate.clone()); i == "left" ? this.leftCalendar.calendar = r : this.rightCalendar.calendar = r; var y = i == "left" ? this.minDate : this.startDate, c = this.maxDate, dt = i == "left" ? this.startDate : this.endDate, gt = this.locale.direction == "ltr" ? { left: "chevron-left", right: "chevron-right" } : { left: "chevron-right", right: "chevron-left" }, e = '<table class="table-condensed">'; if (e += "<thead>", e += "<tr>", (this.showWeekNumbers || this.showISOWeekNumbers) && (e += "<th><\/th>"), e += y && !y.isBefore(r.firstDay) || this.linkedCalendars && i != "left" ? "<th><\/th>" : '<th class="prev available"><span><\/span><\/th>', tt = this.locale.monthNames[r[1][1].month()] + r[1][1].format(" YYYY"), this.showDropdowns) { var lt = r[1][1].month(), it = r[1][1].year(), at = c && c.year() || this.maxYear, vt = y && y.year() || this.minYear, bt = it == vt, kt = it == at, rt = '<select class="monthselect">'; for (h = 0; h < 12; h++)rt += (!bt || h >= y.month()) && (!kt || h <= c.month()) ? "<option value='" + h + "'" + (h === lt ? " selected='selected'" : "") + ">" + this.locale.monthNames[h] + "<\/option>" : "<option value='" + h + "'" + (h === lt ? " selected='selected'" : "") + " disabled='disabled'>" + this.locale.monthNames[h] + "<\/option>"; for (rt += "<\/select>", b = '<select class="yearselect">', l = vt; l <= at; l++)b += '<option value="' + l + '"' + (l === it ? ' selected="selected"' : "") + ">" + l + "<\/option>"; b += "<\/select>"; tt = rt + b } for (e += '<th colspan="5" class="month">' + tt + "<\/th>", e += (!c || c.isAfter(r.lastDay)) && (!this.linkedCalendars || i == "right" || this.singleDatePicker) ? '<th class="next available"><span><\/span><\/th>' : "<th><\/th>", e += "<\/tr>", e += "<tr>", (this.showWeekNumbers || this.showISOWeekNumbers) && (e += '<th class="week">' + this.locale.weekLabel + "<\/th>"), t.each(this.locale.daysOfWeek, function (n, t) { e += "<th>" + t + "<\/th>" }), e += "<\/tr>", e += "<\/thead>", e += "<tbody>", this.endDate == null && this.maxSpan && (ut = this.startDate.clone().add(this.maxSpan).endOf("day"), (!c || ut.isBefore(c)) && (c = ut)), f = 0; f < 6; f++) { for (e += "<tr>", this.showWeekNumbers ? e += '<td class="week">' + r[f][0].week() + "<\/td>" : this.showISOWeekNumbers && (e += '<td class="week">' + r[f][0].isoWeek() + "<\/td>"), u = 0; u < 7; u++) { for (o = [], r[f][u].isSame(new Date, "day") && o.push("today"), r[f][u].isoWeekday() > 5 && o.push("weekend"), r[f][u].month() != r[1][1].month() && o.push("off"), this.minDate && r[f][u].isBefore(this.minDate, "day") && o.push("off", "disabled"), c && r[f][u].isAfter(c, "day") && o.push("off", "disabled"), this.isInvalidDate(r[f][u]) && o.push("off", "disabled"), r[f][u].format("YYYY-MM-DD") == this.startDate.format("YYYY-MM-DD") && o.push("active", "start-date"), this.endDate != null && r[f][u].format("YYYY-MM-DD") == this.endDate.format("YYYY-MM-DD") && o.push("active", "end-date"), this.endDate != null && r[f][u] > this.startDate && r[f][u] < this.endDate && o.push("in-range"), p = this.isCustomDate(r[f][u]), p !== !1 && (typeof p == "string" ? o.push(p) : Array.prototype.push.apply(o, p)), k = "", ft = !1, s = 0; s < o.length; s++)k += o[s] + " ", o[s] == "disabled" && (ft = !0); ft || (k += "available"); e += '<td class="' + k.replace(/^\s+|\s+$/g, "") + '" data-title="r' + f + "c" + u + '">' + r[f][u].date() + "<\/td>" } e += "<\/tr>" } e += "<\/tbody>"; e += "<\/table>"; this.container.find(".drp-calendar." + i + " .calendar-table").html(e) }, renderTimePicker: function (n) { var r, i, e, u, s, v, y, p, c, o, f, t, l, a; if (n != "right" || this.endDate) { for (u = this.maxDate, this.maxSpan && (!this.maxDate || this.startDate.clone().add(this.maxSpan).isAfter(this.maxDate)) && (u = this.startDate.clone().add(this.maxSpan)), n == "left" ? (i = this.startDate.clone(), e = this.minDate) : n == "right" && (i = this.endDate.clone(), e = this.startDate, s = this.container.find(".drp-calendar.right .calendar-time"), s.html() != "" && (i.hour(i.hour() || s.find(".hourselect option:selected").val()), i.minute(i.minute() || s.find(".minuteselect option:selected").val()), i.second(i.second() || s.find(".secondselect option:selected").val()), this.timePicker24Hour || (v = s.find(".ampmselect option:selected").val(), v === "PM" && i.hour() < 12 && i.hour(i.hour() + 12), v === "AM" && i.hour() === 12 && i.hour(0))), i.isBefore(this.startDate) && (i = this.startDate.clone()), u && i.isAfter(u) && (i = u.clone())), r = '<select class="hourselect">', y = this.timePicker24Hour ? 0 : 1, p = this.timePicker24Hour ? 23 : 12, t = y; t <= p; t++)c = t, this.timePicker24Hour || (c = i.hour() >= 12 ? t == 12 ? 12 : t + 12 : t == 12 ? 0 : t), o = i.clone().hour(c), f = !1, e && o.minute(59).isBefore(e) && (f = !0), u && o.minute(0).isAfter(u) && (f = !0), r += c != i.hour() || f ? f ? '<option value="' + t + '" disabled="disabled" class="disabled">' + t + "<\/option>" : '<option value="' + t + '">' + t + "<\/option>" : '<option value="' + t + '" selected="selected">' + t + "<\/option>"; for (r += "<\/select> ", r += ': <select class="minuteselect">', t = 0; t < 60; t += this.timePickerIncrement) { var h = t < 10 ? "0" + t : t, o = i.clone().minute(t), f = !1; e && o.second(59).isBefore(e) && (f = !0); u && o.second(0).isAfter(u) && (f = !0); r += i.minute() != t || f ? f ? '<option value="' + t + '" disabled="disabled" class="disabled">' + h + "<\/option>" : '<option value="' + t + '">' + h + "<\/option>" : '<option value="' + t + '" selected="selected">' + h + "<\/option>" } if (r += "<\/select> ", this.timePickerSeconds) { for (r += ': <select class="secondselect">', t = 0; t < 60; t++) { var h = t < 10 ? "0" + t : t, o = i.clone().second(t), f = !1; e && o.isBefore(e) && (f = !0); u && o.isAfter(u) && (f = !0); r += i.second() != t || f ? f ? '<option value="' + t + '" disabled="disabled" class="disabled">' + h + "<\/option>" : '<option value="' + t + '">' + h + "<\/option>" : '<option value="' + t + '" selected="selected">' + h + "<\/option>" } r += "<\/select> " } this.timePicker24Hour || (r += '<select class="ampmselect">', l = "", a = "", e && i.clone().hour(12).minute(0).second(0).isBefore(e) && (l = ' disabled="disabled" class="disabled"'), u && i.clone().hour(0).minute(0).second(0).isAfter(u) && (a = ' disabled="disabled" class="disabled"'), r += i.hour() >= 12 ? '<option value="AM"' + l + '>AM<\/option><option value="PM" selected="selected"' + a + ">PM<\/option>" : '<option value="AM" selected="selected"' + l + '>AM<\/option><option value="PM"' + a + ">PM<\/option>", r += "<\/select>"); this.container.find(".drp-calendar." + n + " .calendar-time").html(r) } }, updateFormInputs: function () { this.singleDatePicker || this.endDate && (this.startDate.isBefore(this.endDate) || this.startDate.isSame(this.endDate)) ? this.container.find("button.applyBtn").removeAttr("disabled") : this.container.find("button.applyBtn").attr("disabled", "disabled") }, move: function () { var n = { top: 0, left: 0 }, i, r = t(window).width(); this.parentEl.is("body") || (n = { top: this.parentEl.offset().top - this.parentEl.scrollTop(), left: this.parentEl.offset().left - this.parentEl.scrollLeft() }, r = this.parentEl[0].clientWidth + this.parentEl.offset().left); i = this.drops == "up" ? this.element.offset().top - this.container.outerHeight() - n.top : this.element.offset().top + this.element.outerHeight() - n.top; this.container[this.drops == "up" ? "addClass" : "removeClass"]("drop-up"); this.opens = "left"; this.opens == "left" ? (this.container.css({ top: Math.abs(i), right: r - this.element.offset().left - this.element.outerWidth(), left: "auto" }), this.container.offset().left < 0 && this.container.css({ right: "auto", left: 9 })) : this.opens == "center" ? (this.container.css({ top: i, left: this.element.offset().left - n.left + this.element.outerWidth() / 2 - this.container.outerWidth() / 2, right: "auto" }), this.container.offset().left < 0 && this.container.css({ right: "auto", left: 9 })) : (this.container.css({ top: Math.abs(i), left: this.element.offset().left - n.left, right: "auto" }), this.container.offset().left + this.container.outerWidth() > t(window).width() && this.container.css({ left: "auto", right: 0 })) }, show: function () { if (!this.isShowing) { this._outsideClickProxy = t.proxy(function (n) { this.outsideClick(n) }, this); t(document).on("mousedown.daterangepicker", this._outsideClickProxy).on("touchend.daterangepicker", this._outsideClickProxy).on("click.daterangepicker", "[data-toggle=dropdown]", this._outsideClickProxy).on("focusin.daterangepicker", this._outsideClickProxy); t(window).on("resize.daterangepicker", t.proxy(function (n) { this.move(n) }, this)); this.oldStartDate = this.startDate.clone(); this.oldEndDate = this.endDate.clone(); this.previousRightTime = this.endDate.clone(); this.updateView(); this.container.show(); this.move(); this.element.trigger("show.daterangepicker", this); this.isShowing = !0 } }, hide: function () { this.isShowing && (this.endDate || (this.startDate = this.oldStartDate.clone(), this.endDate = this.oldEndDate.clone()), this.startDate.isSame(this.oldStartDate) && this.endDate.isSame(this.oldEndDate) || this.callback(this.startDate.clone(), this.endDate.clone(), this.chosenLabel), this.updateElement(), t(document).off(".daterangepicker"), t(window).off(".daterangepicker"), this.container.hide(), this.element.trigger("hide.daterangepicker", this), this.isShowing = !1) }, toggle: function () { this.isShowing ? this.hide() : this.show() }, outsideClick: function (n) { this.autoUpdateInput = !1; var i = t(n.target); n.type == "focusin" || i.closest(this.element).length || i.closest(this.container).length || i.closest(".calendar-table").length || (this.hide(), this.element.trigger("outsideClick.daterangepicker", this)) }, showCalendars: function () { this.container.addClass("show-calendar"); this.move(); this.element.trigger("showCalendar.daterangepicker", this) }, hideCalendars: function () { this.container.removeClass("show-calendar"); this.element.trigger("hideCalendar.daterangepicker", this) }, clickRange: function (n) { var t = n.target.getAttribute("data-range-key"), i; this.chosenLabel = t; t == this.locale.customRangeLabel ? this.showCalendars() : (i = this.ranges[t], this.startDate = i[0], this.endDate = i[1], this.timePicker || (this.startDate.startOf("day"), this.endDate.endOf("day")), this.alwaysShowCalendars || this.hideCalendars(), this.clickApply()) }, RefreshCalendars: function () { var t, i, n, u; this.container.find(".ranges li").removeClass("active"); t = !0; i = 0; for (n in this.ranges) this.timePicker ? this.startDate.isSame(this.ranges[n][0]) && this.endDate.isSame(this.ranges[n][1]) && (t = !1, this.chosenLabel = this.container.find(".ranges li:eq(" + i + ")").addClass("active").html()) : this.startDate.format("YYYY-MM-DD") == this.ranges[n][0].format("YYYY-MM-DD") && this.endDate.format("YYYY-MM-DD") == this.ranges[n][1].format("YYYY-MM-DD") && (t = !1, this.chosenLabel = this.container.find(".ranges li:eq(" + i + ")").addClass("active").html()), i++; t ? (this.chosenLabel = this.container.find(".ranges li:last").addClass("active").html(), this.showCalendars(), u = this.container.find(".ranges li.active").html(), this.DateFilterChange(u)) : r != !0 && (u = this.container.find(".ranges li.active").html(), this.DateFilterChange(u)); r = !1 }, DateFilterChange: function (n) { var u = "YYYY/MM/DD", i = "", r = "", f = []; this.element[0].id == "report-daterange" ? (n == "Custom Range" && (i = this.startDate.format(u), r = this.endDate.format(u), t("#hfBizgaze_FromDate").val(i), t("#hfBizgaze_ToDate").val(r)), f = { UserId: t("#hfBizgaze_LoginId").val(), ReportFilterDate: n, ReportFromDate: i, ReportToDate: r, FilterType: 1 }) : (n == "Custom Range" && (i = this.startDate.format(u), r = this.endDate.format(u), t("#hfBizgaze_CompareFromDate").val(i), t("#hfBizgaze_CompareToDate").val(r)), f = { UserId: t("#hfBizgaze_LoginId").val(), CompareFilterDate: n, CompareFromDate: i, CompareToDate: r, FilterType: 2 }) }, clickPrev: function (n) { n.stopPropagation(); var i = t(n.target).parents(".drp-calendar"); i.hasClass("left") ? (this.leftCalendar.month.subtract(1, "month"), this.linkedCalendars && this.rightCalendar.month.subtract(1, "month")) : this.rightCalendar.month.subtract(1, "month"); this.updateCalendars() }, clickNext: function (n) { n.stopPropagation(); var i = t(n.target).parents(".drp-calendar"); i.hasClass("left") ? this.leftCalendar.month.add(1, "month") : (this.rightCalendar.month.add(1, "month"), this.linkedCalendars && this.leftCalendar.month.add(1, "month")); this.updateCalendars() }, hoverDate: function (n) { if (t(n.target).hasClass("available")) { var i = t(n.target).attr("data-title"), r = i.substr(1, 1), u = i.substr(3, 1), e = t(n.target).parents(".drp-calendar"), f = e.hasClass("left") ? this.leftCalendar.calendar[r][u] : this.rightCalendar.calendar[r][u], o = this.leftCalendar, s = this.rightCalendar, h = this.startDate; this.endDate || this.container.find(".drp-calendar tbody td").each(function (n, i) { if (!t(i).hasClass("week")) { var u = t(i).attr("data-title"), e = u.substr(1, 1), c = u.substr(3, 1), l = t(i).parents(".drp-calendar"), r = l.hasClass("left") ? o.calendar[e][c] : s.calendar[e][c]; r.isAfter(h) && r.isBefore(f) || r.isSame(f, "day") ? t(i).addClass("in-range") : t(i).removeClass("in-range") } }) } }, clickDate: function (n) { var i, u, f, e, c; if (t(n.target).hasClass("available")) { var o = t(n.target).attr("data-title"), s = o.substr(1, 1), h = o.substr(3, 1), l = t(n.target).parents(".drp-calendar"), r = l.hasClass("left") ? this.leftCalendar.calendar[s][h] : this.rightCalendar.calendar[s][h]; this.endDate || r.isBefore(this.startDate, "day") ? (this.timePicker && (i = parseInt(this.container.find(".left .hourselect").val(), 10), this.timePicker24Hour || (u = this.container.find(".left .ampmselect").val(), u === "PM" && i < 12 && (i += 12), u === "AM" && i === 12 && (i = 0)), f = parseInt(this.container.find(".left .minuteselect").val(), 10), e = this.timePickerSeconds ? parseInt(this.container.find(".left .secondselect").val(), 10) : 0, r = r.clone().hour(i).minute(f).second(e)), this.endDate = null, this.setStartDate(r.clone())) : !this.endDate && r.isBefore(this.startDate) ? this.setEndDate(this.startDate.clone()) : (this.timePicker && (i = parseInt(this.container.find(".right .hourselect").val(), 10), this.timePicker24Hour || (u = this.container.find(".right .ampmselect").val(), u === "PM" && i < 12 && (i += 12), u === "AM" && i === 12 && (i = 0)), f = parseInt(this.container.find(".right .minuteselect").val(), 10), e = this.timePickerSeconds ? parseInt(this.container.find(".right .secondselect").val(), 10) : 0, r = r.clone().hour(i).minute(f).second(e)), this.setEndDate(r.clone()), this.autoApply && (this.calculateChosenLabel(), this.clickApply())); this.singleDatePicker && (this.setEndDate(this.startDate), this.timePicker || this.clickApply()); this.updateView(); n.stopPropagation(); c = this.element[0].id.split("date_")[1]; t(".CancelBtnFloating_" + c).addClass("floating-label-form-group-with-value") } }, calculateChosenLabel: function () { var i = !0, r = 0, n, t; for (n in this.ranges) { if (this.timePicker) { if (t = this.timePickerSeconds ? "YYYY-MM-DD hh:mm:ss" : "YYYY-MM-DD hh:mm", this.startDate.format(t) == this.ranges[n][0].format(t) && this.endDate.format(t) == this.ranges[n][1].format(t)) { i = !1; this.chosenLabel = this.container.find(".ranges li:eq(" + r + ")").addClass("active").attr("data-range-key"); break } } else if (this.startDate.format("YYYY-MM-DD") == this.ranges[n][0].format("YYYY-MM-DD") && this.endDate.format("YYYY-MM-DD") == this.ranges[n][1].format("YYYY-MM-DD")) { i = !1; this.chosenLabel = this.container.find(".ranges li:eq(" + r + ")").addClass("active").attr("data-range-key"); break } r++ } i && (this.chosenLabel = this.showCustomRangeLabel ? this.container.find(".ranges li:last").addClass("active").attr("data-range-key") : null, this.showCalendars()) }, clickApply: function () { this.autoUpdateInput = !0; this.RefreshCalendars(); this.hide(); this.element.trigger("apply.daterangepicker", this); this.autoUpdateInput = !1 }, clickCancel: function () { this.startDate = this.oldStartDate; this.endDate = this.oldEndDate; this.hide(); this.element.trigger("cancel.daterangepicker", this) }, monthOrYearChanged: function (n) { var u = t(n.target).closest(".drp-calendar").hasClass("left"), e = u ? "left" : "right", f = this.container.find(".drp-calendar." + e), r = parseInt(f.find(".monthselect").val(), 10), i = f.find(".yearselect").val(); u || (i < this.startDate.year() || i == this.startDate.year() && r < this.startDate.month()) && (r = this.startDate.month(), i = this.startDate.year()); this.minDate && (i < this.minDate.year() || i == this.minDate.year() && r < this.minDate.month()) && (r = this.minDate.month(), i = this.minDate.year()); this.maxDate && (i > this.maxDate.year() || i == this.maxDate.year() && r > this.maxDate.month()) && (r = this.maxDate.month(), i = this.maxDate.year()); u ? (this.leftCalendar.month.month(r).year(i), this.linkedCalendars && (this.rightCalendar.month = this.leftCalendar.month.clone().add(1, "month"))) : (this.rightCalendar.month.month(r).year(i), this.linkedCalendars && (this.leftCalendar.month = this.rightCalendar.month.clone().subtract(1, "month"))); this.updateCalendars() }, timeChanged: function (n) { var u = t(n.target).closest(".drp-calendar"), h = u.hasClass("left"), r = parseInt(u.find(".hourselect").val(), 10), o = parseInt(u.find(".minuteselect").val(), 10), s = this.timePickerSeconds ? parseInt(u.find(".secondselect").val(), 10) : 0, e, i, f; this.timePicker24Hour || (e = u.find(".ampmselect").val(), e === "PM" && r < 12 && (r += 12), e === "AM" && r === 12 && (r = 0)); h ? (i = this.startDate.clone(), i.hour(r), i.minute(o), i.second(s), this.setStartDate(i), this.singleDatePicker ? this.endDate = this.startDate.clone() : this.endDate && this.endDate.format("YYYY-MM-DD") == i.format("YYYY-MM-DD") && this.endDate.isBefore(i) && this.setEndDate(i.clone())) : this.endDate && (f = this.endDate.clone(), f.hour(r), f.minute(o), f.second(s), this.setEndDate(f)); this.updateCalendars(); this.updateFormInputs(); this.renderTimePicker("left"); this.renderTimePicker("right") }, elementChanged: function () { if (this.element.is("input") && this.element.val().length) { var r = this.element.val().split(this.locale.separator), t = null, i = null; (r.length === 2 && (t = n(r[0], this.locale.format), i = n(r[1], this.locale.format)), (this.singleDatePicker || t === null || i === null) && (t = n(this.element.val(), this.locale.format), i = t), t.isValid() && i.isValid()) && (this.setStartDate(t), this.setEndDate(i), this.updateView()) } }, keydown: function (n) { (n.keyCode === 9 || n.keyCode === 13) && this.hide(); n.keyCode === 27 && (n.preventDefault(), n.stopPropagation(), this.hide()) }, updateElement: function () { if (this.element.is("input") && this.autoUpdateInput) { var n = this.startDate.format(this.locale.format); this.singleDatePicker || (n += this.locale.separator + this.endDate.format(this.locale.format)); n !== this.element.val() && this.element.val(n).trigger("change") } }, remove: function () { this.container.remove(); this.element.off(".daterangepicker"); this.element.removeData() } }, t.fn.daterangepicker = function (n, r) { var u = t.extend(!0, {}, t.fn.daterangepicker.defaultOptions, n); return this.each(function () { var n = t(this); n.data("daterangepicker") && n.data("daterangepicker").remove(); n.data("daterangepicker", new i(n, u, r)) }), this }, i });
  86. /**
  87. * jQuery Geocoding and Places Autocomplete Plugin - V 1.7.0
  88. *
  89. * @author Martin Kleppe <kleppe@ubilabs.net>, 2016
  90. * @author Ubilabs http://ubilabs.net, 2016
  91. * @license MIT License <http://www.opensource.org/licenses/mit-license.php>
  92. */
  93. (function (n, t, i, r) { function e(t, i) { this.options = n.extend(!0, {}, u, i); i && i.types && (this.options.types = i.types); this.input = t; this.$input = n(t); this._defaults = u; this._name = "geocomplete"; this.init() } var u = { bounds: !0, country: null, map: !1, details: !1, detailsAttribute: "name", detailsScope: null, autoselect: !0, location: !1, mapOptions: { zoom: 14, scrollwheel: !0, mapTypeId: "roadmap" }, markerOptions: { draggable: !1 }, maxZoom: 16, types: ["geocode"], blur: !1, geocodeAfterResult: !1, restoreValueAfterBlur: !1 }, o = "street_address route intersection political country administrative_area_level_1 administrative_area_level_2 administrative_area_level_3 colloquial_area locality sublocality neighborhood premise subpremise postal_code natural_feature airport park point_of_interest post_box street_number floor room lat lng viewport location formatted_address location_type bounds".split(" "), f = "id place_id url website vicinity reference name rating international_phone_number icon formatted_phone_number".split(" "); n.extend(e.prototype, { init: function () { this.initMap(); this.initMarker(); this.initGeocoder(); this.initDetails(); this.initLocation() }, initMap: function () { if (this.options.map) { if (typeof this.options.map.setCenter == "function") { this.map = this.options.map; return } this.map = new google.maps.Map(n(this.options.map)[0], this.options.mapOptions); google.maps.event.addListener(this.map, "click", n.proxy(this.mapClicked, this)); google.maps.event.addListener(this.map, "dragend", n.proxy(this.mapDragged, this)); google.maps.event.addListener(this.map, "idle", n.proxy(this.mapIdle, this)); google.maps.event.addListener(this.map, "zoom_changed", n.proxy(this.mapZoomed, this)) } }, initMarker: function () { if (this.map) { var t = n.extend(this.options.markerOptions, { map: this.map }); t.disabled || (this.marker = new google.maps.Marker(t), google.maps.event.addListener(this.marker, "dragend", n.proxy(this.markerDragged, this))) } }, initGeocoder: function () { var t = { types: this.options.types, bounds: this.options.bounds === !0 ? null : this.options.bounds, componentRestrictions: this.options.componentRestrictions }; this.options.country && (t.componentRestrictions = { country: this.options.country }); this.autocomplete = new google.maps.places.Autocomplete(this.input, t); this.geocoder = new google.maps.Geocoder; this.map && this.options.bounds === !0 && this.autocomplete.bindTo("bounds", this.map); google.maps.event.addListener(this.autocomplete, "place_changed", n.proxy(this.placeChanged, this)); this.$input.on("keypress." + this._name, function (n) { if (n.keyCode === 13) return !1 }); if (this.options.geocodeAfterResult === !0 && this.$input.bind("keypress." + this._name, n.proxy(function () { event.keyCode != 9 && this.selected === !0 && (this.selected = !1) }, this)), this.$input.bind("geocode." + this._name, n.proxy(function () { this.find() }, this)), this.$input.bind("geocode:result." + this._name, n.proxy(function () { this.lastInputVal = this.$input.val() }, this)), this.options.blur === !0) this.$input.on("blur." + this._name, n.proxy(function () { (this.options.geocodeAfterResult !== !0 || this.selected !== !0) && (this.options.restoreValueAfterBlur === !0 && this.selected === !0 ? setTimeout(n.proxy(this.restoreLastValue, this), 0) : this.find()) }, this)) }, initDetails: function () { function r(n) { i[n] = t.find("[" + u + "=" + n + "]") } var t, u, i; this.options.details && (t = this.options.detailsScope ? n(this.input).parents(this.options.detailsScope).find(this.options.details) : n(this.options.details), u = this.options.detailsAttribute, i = {}, n.each(o, function (n, t) { r(t); r(t + "_short") }), n.each(f, function (n, t) { r(t) }), this.$details = t, this.details = i) }, initLocation: function () { var n = this.options.location, t; if (n) { if (typeof n == "string") { this.find(n); return } n instanceof Array && (t = new google.maps.LatLng(n[0], n[1])); n instanceof google.maps.LatLng && (t = n); t && (this.map && this.map.setCenter(t), this.marker && this.marker.setPosition(t)) } }, destroy: function () { this.map && (google.maps.event.clearInstanceListeners(this.map), google.maps.event.clearInstanceListeners(this.marker)); this.autocomplete.unbindAll(); google.maps.event.clearInstanceListeners(this.autocomplete); google.maps.event.clearInstanceListeners(this.input); this.$input.removeData(); this.$input.off(this._name); this.$input.unbind("." + this._name) }, find: function (n) { this.geocode({ address: n || this.$input.val() }) }, geocode: function (t) { t.address && (this.options.bounds && !t.bounds && (t.bounds = this.options.bounds === !0 ? this.map && this.map.getBounds() : this.options.bounds), this.options.country && (t.region = this.options.country), this.geocoder.geocode(t, n.proxy(this.handleGeocode, this))) }, selectFirstResult: function () { var t = ""; n(".pac-item-selected")[0] && (t = "-selected"); var u = n(".pac-container:visible .pac-item" + t + ":first span:nth-child(2)").text(), r = n(".pac-container:visible .pac-item" + t + ":first span:nth-child(3)").text(), i = u; return r && (i += " - " + r), this.$input.val(i), i }, restoreLastValue: function () { this.lastInputVal && this.$input.val(this.lastInputVal) }, handleGeocode: function (n, t) { if (t === google.maps.GeocoderStatus.OK) { var i = n[0]; this.$input.val(i.formatted_address); this.update(i); n.length > 1 && this.trigger("geocode:multiple", n) } else this.trigger("geocode:error", t) }, trigger: function (n, t) { this.$input.trigger(n, [t]) }, center: function (n) { n.viewport ? (this.map.fitBounds(n.viewport), this.map.getZoom() > this.options.maxZoom && this.map.setZoom(this.options.maxZoom)) : (this.map.setZoom(this.options.maxZoom), this.map.setCenter(n.location)); this.marker && (this.marker.setPosition(n.location), this.marker.setAnimation(this.options.markerOptions.animation)) }, update: function (n) { this.map && this.center(n.geometry); this.$details && this.fillDetails(n); this.trigger("geocode:result", n) }, fillDetails: function (t) { var i = {}, r = t.geometry, u = r.viewport, e = r.bounds; n.each(t.address_components, function (t, r) { var u = r.types[0]; n.each(r.types, function (n, t) { i[t] = r.long_name; i[t + "_short"] = r.short_name }) }); n.each(f, function (n, r) { i[r] = t[r] }); n.extend(i, { formatted_address: t.formatted_address, location_type: r.location_type || "PLACES", viewport: u, bounds: e, location: r.location, lat: r.location.lat(), lng: r.location.lng() }); n.each(this.details, n.proxy(function (n, t) { var r = i[n]; this.setDetail(t, r) }, this)); this.data = i }, setDetail: function (n, t) { t === r ? t = "" : typeof t.toUrlValue == "function" && (t = t.toUrlValue()); n.is(":input") ? n.val(t) : n.text(t) }, markerDragged: function (n) { this.trigger("geocode:dragged", n.latLng) }, markerPositionChanged: function (n) { this.trigger("geocode:dragged", n.latLng) }, mapClicked: function (n) { this.trigger("geocode:click", n.latLng) }, mapDragged: function () { this.trigger("geocode:mapdragged", this.map.getCenter()) }, mapIdle: function () { this.trigger("geocode:idle", this.map.getCenter()) }, mapZoomed: function () { this.trigger("geocode:zoom", this.map.getZoom()) }, resetMarker: function () { this.marker.setPosition(this.data.location); this.setDetail(this.details.lat, this.data.location.lat()); this.setDetail(this.details.lng, this.data.location.lng()) }, placeChanged: function () { var n = this.autocomplete.getPlace(), t; this.selected = !0; n.geometry ? this.update(n) : this.options.autoselect && (t = this.selectFirstResult(), this.find(t)) } }); n.fn.geocomplete = function (t) { var r = "plugin_geocomplete", u, i; return typeof t == "string" ? (u = n(this).data(r) || n(this).geocomplete().data(r), i = u[t], typeof i == "function" ? (i.apply(u, Array.prototype.slice.call(arguments, 1)), n(this)) : (arguments.length == 2 && (i = arguments[1]), i)) : this.each(function () { var i = n.data(this, r); i || (i = new e(this, t), n.data(this, r, i)) }) } })(jQuery, window, document);
  94. /*! jQuery UI - v1.12.1 - 2016-09-14
  95. * http://jqueryui.com
  96. * Includes: widget.js, position.js, data.js, disable-selection.js, effect.js, effects/effect-blind.js, effects/effect-bounce.js, effects/effect-clip.js, effects/effect-drop.js, effects/effect-explode.js, effects/effect-fade.js, effects/effect-fold.js, effects/effect-highlight.js, effects/effect-puff.js, effects/effect-pulsate.js, effects/effect-scale.js, effects/effect-shake.js, effects/effect-size.js, effects/effect-slide.js, effects/effect-transfer.js, focusable.js, form-reset-mixin.js, jquery-1-7.js, keycode.js, labels.js, scroll-parent.js, tabbable.js, unique-id.js, widgets/accordion.js, widgets/autocomplete.js, widgets/button.js, widgets/checkboxradio.js, widgets/controlgroup.js, widgets/datepicker.js, widgets/dialog.js, widgets/draggable.js, widgets/droppable.js, widgets/menu.js, widgets/mouse.js, widgets/progressbar.js, widgets/resizable.js, widgets/selectable.js, widgets/selectmenu.js, widgets/slider.js, widgets/sortable.js, widgets/spinner.js, widgets/tabs.js, widgets/tooltip.js
  97. * Copyright jQuery Foundation and other contributors; Licensed MIT */
  98. (function (n) { typeof define == "function" && define.amd ? define(["jquery"], n) : n(jQuery) })(function (n) {
  99. function wt(n) { for (var t = n.css("visibility"); t === "inherit";)n = n.parent(), t = n.css("visibility"); return t !== "hidden" } function ai(n) { for (var t, i; n.length && n[0] !== document;) { if (t = n.css("position"), (t === "absolute" || t === "relative" || t === "fixed") && (i = parseInt(n.css("zIndex"), 10), !isNaN(i) && i !== 0)) return i; n = n.parent() } return 0 } function y() { this._curInst = null; this._keyEvent = !1; this._disabledInputs = []; this._datepickerShowing = !1; this._inDialog = !1; this._mainDivId = "ui-datepicker-div"; this._inlineClass = "ui-datepicker-inline"; this._appendClass = "ui-datepicker-append"; this._triggerClass = "ui-datepicker-trigger"; this._dialogClass = "ui-datepicker-dialog"; this._disableClass = "ui-datepicker-disabled"; this._unselectableClass = "ui-datepicker-unselectable"; this._currentClass = "ui-datepicker-current-day"; this._dayOverClass = "ui-datepicker-days-cell-over"; this.regional = []; this.regional[""] = { closeText: "Done", prevText: "Prev", nextText: "Next", currentText: "Today", 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"], dayNames: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], dayNamesShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], dayNamesMin: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"], weekHeader: "Wk", dateFormat: "mm/dd/yy", firstDay: 0, isRTL: !1, showMonthAfterYear: !1, yearSuffix: "" }; this._defaults = { showOn: "focus", showAnim: "fadeIn", showOptions: {}, defaultDate: null, appendText: "", buttonText: "...", buttonImage: "", buttonImageOnly: !1, hideIfNoPrevNext: !1, navigationAsDateFormat: !1, gotoCurrent: !1, changeMonth: !1, changeYear: !1, yearRange: "c-10:c+10", showOtherMonths: !1, selectOtherMonths: !1, showWeek: !1, calculateWeek: this.iso8601Week, shortYearCutoff: "+10", minDate: null, maxDate: null, duration: "fast", beforeShowDay: null, beforeShow: null, onSelect: null, onChangeMonthYear: null, onClose: null, numberOfMonths: 1, showCurrentAtPos: 0, stepMonths: 1, stepBigMonths: 12, altField: "", altFormat: "", constrainInput: !0, showButtonPanel: !1, autoSize: !1, disabled: !1 }; n.extend(this._defaults, this.regional[""]); this.regional.en = n.extend(!0, {}, this.regional[""]); this.regional["en-US"] = n.extend(!0, {}, this.regional.en); this.dpDiv = p(n("<div id='" + this._mainDivId + "' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'><\/div>")) } function p(t) { var i = "button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a"; return t.on("mouseout", i, function () { n(this).removeClass("ui-state-hover"); this.className.indexOf("ui-datepicker-prev") !== -1 && n(this).removeClass("ui-datepicker-prev-hover"); this.className.indexOf("ui-datepicker-next") !== -1 && n(this).removeClass("ui-datepicker-next-hover") }).on("mouseover", i, w) } function w() { n.datepicker._isDisabledDatepicker(t.inline ? t.dpDiv.parent()[0] : t.input[0]) || (n(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"), n(this).addClass("ui-state-hover"), this.className.indexOf("ui-datepicker-prev") !== -1 && n(this).addClass("ui-datepicker-prev-hover"), this.className.indexOf("ui-datepicker-next") !== -1 && n(this).addClass("ui-datepicker-next-hover")) } function f(t, i) { n.extend(t, i); for (var r in i) i[r] == null && (t[r] = i[r]); return t } function i(n) { return function () { var t = this.element.val(); n.apply(this, arguments); this._refresh(); t !== this.element.val() && this._trigger("change") } } var b, l, o, k, d, g, nt, tt, it, rt, ut, ft, et, ot, st, ht, ct, lt, at, vt, yt, c, pt, bt, kt, dt, gt, ni, ti, ii, ri, ui, fi, ei, oi, si, v, hi, ci, li, t, vi, yi, r, pi, wi, bi, e, ki, di, gi, nr, tr, ir, rr, ur, fr; n.ui = n.ui || {}; b = n.ui.version = "1.12.1";
  100. /*!
  101. * jQuery UI Widget 1.12.1
  102. * http://jqueryui.com
  103. *
  104. * Copyright jQuery Foundation and other contributors
  105. * Released under the MIT license.
  106. * http://jquery.org/license
  107. */
  108. l = 0; o = Array.prototype.slice; n.cleanData = function (t) { return function (i) { for (var r, u, f = 0; (u = i[f]) != null; f++)try { r = n._data(u, "events"); r && r.remove && n(u).triggerHandler("remove") } catch (e) { } t(i) } }(n.cleanData); n.widget = function (t, i, r) { var f, u, o, h = {}, e = t.split(".")[0], s; return t = t.split(".")[1], s = e + "-" + t, r || (r = i, i = n.Widget), n.isArray(r) && (r = n.extend.apply(null, [{}].concat(r))), n.expr[":"][s.toLowerCase()] = function (t) { return !!n.data(t, s) }, n[e] = n[e] || {}, f = n[e][t], u = n[e][t] = function (n, t) { if (!this._createWidget) return new u(n, t); arguments.length && this._createWidget(n, t) }, n.extend(u, f, { version: r.version, _proto: n.extend({}, r), _childConstructors: [] }), o = new i, o.options = n.widget.extend({}, o.options), n.each(r, function (t, r) { if (!n.isFunction(r)) { h[t] = r; return } h[t] = function () { function n() { return i.prototype[t].apply(this, arguments) } function u(n) { return i.prototype[t].apply(this, n) } return function () { var i = this._super, f = this._superApply, t; return this._super = n, this._superApply = u, t = r.apply(this, arguments), this._super = i, this._superApply = f, t } }() }), u.prototype = n.widget.extend(o, { widgetEventPrefix: f ? o.widgetEventPrefix || t : t }, h, { constructor: u, namespace: e, widgetName: t, widgetFullName: s }), f ? (n.each(f._childConstructors, function (t, i) { var r = i.prototype; n.widget(r.namespace + "." + r.widgetName, u, i._proto) }), delete f._childConstructors) : i._childConstructors.push(u), n.widget.bridge(t, u), u }; n.widget.extend = function (t) { for (var f = o.call(arguments, 1), u = 0, e = f.length, i, r; u < e; u++)for (i in f[u]) r = f[u][i], f[u].hasOwnProperty(i) && r !== undefined && (t[i] = n.isPlainObject(r) ? n.isPlainObject(t[i]) ? n.widget.extend({}, t[i], r) : n.widget.extend({}, r) : r); return t }; n.widget.bridge = function (t, i) { var r = i.prototype.widgetFullName || t; n.fn[t] = function (u) { var s = typeof u == "string", e = o.call(arguments, 1), f = this; return s ? this.length || u !== "instance" ? this.each(function () { var i, o = n.data(this, r); return u === "instance" ? (f = o, !1) : o ? !n.isFunction(o[u]) || u.charAt(0) === "_" ? n.error("no such method '" + u + "' for " + t + " widget instance") : (i = o[u].apply(o, e), i !== o && i !== undefined ? (f = i && i.jquery ? f.pushStack(i.get()) : i, !1) : void 0) : n.error("cannot call methods on " + t + " prior to initialization; attempted to call method '" + u + "'") }) : f = undefined : (e.length && (u = n.widget.extend.apply(null, [u].concat(e))), this.each(function () { var t = n.data(this, r); t ? (t.option(u || {}), t._init && t._init()) : n.data(this, r, new i(u, this)) })), f } }; n.Widget = function () { }; n.Widget._childConstructors = []; n.Widget.prototype = { widgetName: "widget", widgetEventPrefix: "", defaultElement: "<div>", options: { classes: {}, disabled: !1, create: null }, _createWidget: function (t, i) { i = n(i || this.defaultElement || this)[0]; this.element = n(i); this.uuid = l++; this.eventNamespace = "." + this.widgetName + this.uuid; this.bindings = n(); this.hoverable = n(); this.focusable = n(); this.classesElementLookup = {}; i !== this && (n.data(i, this.widgetFullName, this), this._on(!0, this.element, { remove: function (n) { n.target === i && this.destroy() } }), this.document = n(i.style ? i.ownerDocument : i.document || i), this.window = n(this.document[0].defaultView || this.document[0].parentWindow)); this.options = n.widget.extend({}, this.options, this._getCreateOptions(), t); this._create(); this.options.disabled && this._setOptionDisabled(this.options.disabled); this._trigger("create", null, this._getCreateEventData()); this._init() }, _getCreateOptions: function () { return {} }, _getCreateEventData: n.noop, _create: n.noop, _init: n.noop, destroy: function () { var t = this; this._destroy(); n.each(this.classesElementLookup, function (n, i) { t._removeClass(i, n) }); this.element.off(this.eventNamespace).removeData(this.widgetFullName); this.widget().off(this.eventNamespace).removeAttr("aria-disabled"); this.bindings.off(this.eventNamespace) }, _destroy: n.noop, widget: function () { return this.element }, option: function (t, i) { var e = t, r, u, f; if (arguments.length === 0) return n.widget.extend({}, this.options); if (typeof t == "string") if (e = {}, r = t.split("."), t = r.shift(), r.length) { for (u = e[t] = n.widget.extend({}, this.options[t]), f = 0; f < r.length - 1; f++)u[r[f]] = u[r[f]] || {}, u = u[r[f]]; if (t = r.pop(), arguments.length === 1) return u[t] === undefined ? null : u[t]; u[t] = i } else { if (arguments.length === 1) return this.options[t] === undefined ? null : this.options[t]; e[t] = i } return this._setOptions(e), this }, _setOptions: function (n) { for (var t in n) this._setOption(t, n[t]); return this }, _setOption: function (n, t) { return n === "classes" && this._setOptionClasses(t), this.options[n] = t, n === "disabled" && this._setOptionDisabled(t), this }, _setOptionClasses: function (t) { var i, u, r; for (i in t) (r = this.classesElementLookup[i], t[i] !== this.options.classes[i] && r && r.length) && (u = n(r.get()), this._removeClass(r, i), u.addClass(this._classes({ element: u, keys: i, classes: t, add: !0 }))) }, _setOptionDisabled: function (n) { this._toggleClass(this.widget(), this.widgetFullName + "-disabled", null, !!n); n && (this._removeClass(this.hoverable, null, "ui-state-hover"), this._removeClass(this.focusable, null, "ui-state-focus")) }, enable: function () { return this._setOptions({ disabled: !1 }) }, disable: function () { return this._setOptions({ disabled: !0 }) }, _classes: function (t) { function u(u, f) { for (var o, e = 0; e < u.length; e++)o = r.classesElementLookup[u[e]] || n(), o = t.add ? n(n.unique(o.get().concat(t.element.get()))) : n(o.not(t.element).get()), r.classesElementLookup[u[e]] = o, i.push(u[e]), f && t.classes[u[e]] && i.push(t.classes[u[e]]) } var i = [], r = this; return t = n.extend({ element: this.element, classes: this.options.classes || {} }, t), this._on(t.element, { remove: "_untrackClassesElement" }), t.keys && u(t.keys.match(/\S+/g) || [], !0), t.extra && u(t.extra.match(/\S+/g) || []), i.join(" ") }, _untrackClassesElement: function (t) { var i = this; n.each(i.classesElementLookup, function (r, u) { n.inArray(t.target, u) !== -1 && (i.classesElementLookup[r] = n(u.not(t.target).get())) }) }, _removeClass: function (n, t, i) { return this._toggleClass(n, t, i, !1) }, _addClass: function (n, t, i) { return this._toggleClass(n, t, i, !0) }, _toggleClass: function (n, t, i, r) { r = typeof r == "boolean" ? r : i; var u = typeof n == "string" || n === null, f = { extra: u ? t : i, keys: u ? n : t, element: u ? this.element : n, add: r }; return f.element.toggleClass(this._classes(f), r), this }, _on: function (t, i, r) { var f, u = this; typeof t != "boolean" && (r = i, i = t, t = !1); r ? (i = f = n(i), this.bindings = this.bindings.add(i)) : (r = i, i = this.element, f = this.widget()); n.each(r, function (r, e) { function o() { if (t || u.options.disabled !== !0 && !n(this).hasClass("ui-state-disabled")) return (typeof e == "string" ? u[e] : e).apply(u, arguments) } typeof e != "string" && (o.guid = e.guid = e.guid || o.guid || n.guid++); var s = r.match(/^([\w:-]*)\s*(.*)$/), h = s[1] + u.eventNamespace, c = s[2]; if (c) f.on(h, c, o); else i.on(h, o) }) }, _off: function (t, i) { i = (i || "").split(" ").join(this.eventNamespace + " ") + this.eventNamespace; t.off(i).off(i); this.bindings = n(this.bindings.not(t).get()); this.focusable = n(this.focusable.not(t).get()); this.hoverable = n(this.hoverable.not(t).get()) }, _delay: function (n, t) { function r() { return (typeof n == "string" ? i[n] : n).apply(i, arguments) } var i = this; return setTimeout(r, t || 0) }, _hoverable: function (t) { this.hoverable = this.hoverable.add(t); this._on(t, { mouseenter: function (t) { this._addClass(n(t.currentTarget), null, "ui-state-hover") }, mouseleave: function (t) { this._removeClass(n(t.currentTarget), null, "ui-state-hover") } }) }, _focusable: function (t) { this.focusable = this.focusable.add(t); this._on(t, { focusin: function (t) { this._addClass(n(t.currentTarget), null, "ui-state-focus") }, focusout: function (t) { this._removeClass(n(t.currentTarget), null, "ui-state-focus") } }) }, _trigger: function (t, i, r) { var u, f, e = this.options[t]; if (r = r || {}, i = n.Event(i), i.type = (t === this.widgetEventPrefix ? t : this.widgetEventPrefix + t).toLowerCase(), i.target = this.element[0], f = i.originalEvent, f) for (u in f) u in i || (i[u] = f[u]); return this.element.trigger(i, r), !(n.isFunction(e) && e.apply(this.element[0], [i].concat(r)) === !1 || i.isDefaultPrevented()) } }; n.each({ show: "fadeIn", hide: "fadeOut" }, function (t, i) { n.Widget.prototype["_" + t] = function (r, u, f) { typeof u == "string" && (u = { effect: u }); var o, e = u ? u === !0 || typeof u == "number" ? i : u.effect || i : t; u = u || {}; typeof u == "number" && (u = { duration: u }); o = !n.isEmptyObject(u); u.complete = f; u.delay && r.delay(u.delay); o && n.effects && n.effects.effect[e] ? r[t](u) : e !== t && r[e] ? r[e](u.duration, u.easing, f) : r.queue(function (i) { n(this)[t](); f && f.call(r[0]); i() }) } }); k = n.widget;
  109. /*!
  110. * jQuery UI Position 1.12.1
  111. * http://jqueryui.com
  112. *
  113. * Copyright jQuery Foundation and other contributors
  114. * Released under the MIT license.
  115. * http://jquery.org/license
  116. *
  117. * http://api.jqueryui.com/position/
  118. */
  119. (function () { function c(n, t, i) { return [parseFloat(n[0]) * (h.test(n[0]) ? t / 100 : 1), parseFloat(n[1]) * (h.test(n[1]) ? i / 100 : 1)] } function r(t, i) { return parseInt(n.css(t, i), 10) || 0 } function a(t) { var i = t[0]; return i.nodeType === 9 ? { width: t.width(), height: t.height(), offset: { top: 0, left: 0 } } : n.isWindow(i) ? { width: t.width(), height: t.height(), offset: { top: t.scrollTop(), left: t.scrollLeft() } } : i.preventDefault ? { width: 0, height: 0, offset: { top: i.pageY, left: i.pageX } } : { width: t.outerWidth(), height: t.outerHeight(), offset: t.offset() } } var u, i = Math.max, t = Math.abs, f = /left|center|right/, e = /top|center|bottom/, o = /[\+\-]\d+(\.[\d]+)?%?/, s = /^\w+/, h = /%$/, l = n.fn.position; n.position = { scrollbarWidth: function () { if (u !== undefined) return u; var r, i, t = n("<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'><\/div><\/div>"), f = t.children()[0]; return n("body").append(t), r = f.offsetWidth, t.css("overflow", "scroll"), i = f.offsetWidth, r === i && (i = t[0].clientWidth), t.remove(), u = r - i }, getScrollInfo: function (t) { var i = t.isWindow || t.isDocument ? "" : t.element.css("overflow-x"), r = t.isWindow || t.isDocument ? "" : t.element.css("overflow-y"), u = i === "scroll" || i === "auto" && t.width < t.element[0].scrollWidth, f = r === "scroll" || r === "auto" && t.height < t.element[0].scrollHeight; return { width: f ? n.position.scrollbarWidth() : 0, height: u ? n.position.scrollbarWidth() : 0 } }, getWithinInfo: function (t) { var i = n(t || window), r = n.isWindow(i[0]), u = !!i[0] && i[0].nodeType === 9, f = !r && !u; return { element: i, isWindow: r, isDocument: u, offset: f ? n(t).offset() : { left: 0, top: 0 }, scrollLeft: i.scrollLeft(), scrollTop: i.scrollTop(), width: i.outerWidth(), height: i.outerHeight() } } }; n.fn.position = function (u) { if (!u || !u.of) return l.apply(this, arguments); u = n.extend({}, u); var w, h, v, p, y, k, d = n(u.of), nt = n.position.getWithinInfo(u.within), tt = n.position.getScrollInfo(nt), b = (u.collision || "flip").split(" "), g = {}; return k = a(d), d[0].preventDefault && (u.at = "left top"), h = k.width, v = k.height, p = k.offset, y = n.extend({}, p), n.each(["my", "at"], function () { var n = (u[this] || "").split(" "), t, i; n.length === 1 && (n = f.test(n[0]) ? n.concat(["center"]) : e.test(n[0]) ? ["center"].concat(n) : ["center", "center"]); n[0] = f.test(n[0]) ? n[0] : "center"; n[1] = e.test(n[1]) ? n[1] : "center"; t = o.exec(n[0]); i = o.exec(n[1]); g[this] = [t ? t[0] : 0, i ? i[0] : 0]; u[this] = [s.exec(n[0])[0], s.exec(n[1])[0]] }), b.length === 1 && (b[1] = b[0]), u.at[0] === "right" ? y.left += h : u.at[0] === "center" && (y.left += h / 2), u.at[1] === "bottom" ? y.top += v : u.at[1] === "center" && (y.top += v / 2), w = c(g.at, h, v), y.left += w[0], y.top += w[1], this.each(function () { var a, k, e = n(this), o = e.outerWidth(), s = e.outerHeight(), it = r(this, "marginLeft"), rt = r(this, "marginTop"), ut = o + it + r(this, "marginRight") + tt.width, ft = s + rt + r(this, "marginBottom") + tt.height, f = n.extend({}, y), l = c(g.my, e.outerWidth(), e.outerHeight()); u.my[0] === "right" ? f.left -= o : u.my[0] === "center" && (f.left -= o / 2); u.my[1] === "bottom" ? f.top -= s : u.my[1] === "center" && (f.top -= s / 2); f.left += l[0]; f.top += l[1]; a = { marginLeft: it, marginTop: rt }; n.each(["left", "top"], function (t, i) { n.ui.position[b[t]] && n.ui.position[b[t]][i](f, { targetWidth: h, targetHeight: v, elemWidth: o, elemHeight: s, collisionPosition: a, collisionWidth: ut, collisionHeight: ft, offset: [w[0] + l[0], w[1] + l[1]], my: u.my, at: u.at, within: nt, elem: e }) }); u.using && (k = function (n) { var r = p.left - f.left, a = r + h - o, c = p.top - f.top, y = c + v - s, l = { target: { element: d, left: p.left, top: p.top, width: h, height: v }, element: { element: e, left: f.left, top: f.top, width: o, height: s }, horizontal: a < 0 ? "left" : r > 0 ? "right" : "center", vertical: y < 0 ? "top" : c > 0 ? "bottom" : "middle" }; h < o && t(r + a) < h && (l.horizontal = "center"); v < s && t(c + y) < v && (l.vertical = "middle"); l.important = i(t(r), t(a)) > i(t(c), t(y)) ? "horizontal" : "vertical"; u.using.call(this, n, l) }); e.offset(n.extend(f, { using: k })) }) }; n.ui.position = { fit: { left: function (n, t) { var e = t.within, u = e.isWindow ? e.scrollLeft : e.offset.left, o = e.width, s = n.left - t.collisionPosition.marginLeft, r = u - s, f = s + t.collisionWidth - o - u, h; t.collisionWidth > o ? r > 0 && f <= 0 ? (h = n.left + r + t.collisionWidth - o - u, n.left += r - h) : n.left = f > 0 && r <= 0 ? u : r > f ? u + o - t.collisionWidth : u : r > 0 ? n.left += r : f > 0 ? n.left -= f : n.left = i(n.left - s, n.left) }, top: function (n, t) { var o = t.within, u = o.isWindow ? o.scrollTop : o.offset.top, e = t.within.height, s = n.top - t.collisionPosition.marginTop, r = u - s, f = s + t.collisionHeight - e - u, h; t.collisionHeight > e ? r > 0 && f <= 0 ? (h = n.top + r + t.collisionHeight - e - u, n.top += r - h) : n.top = f > 0 && r <= 0 ? u : r > f ? u + e - t.collisionHeight : u : r > 0 ? n.top += r : f > 0 ? n.top -= f : n.top = i(n.top - s, n.top) } }, flip: { left: function (n, i) { var r = i.within, y = r.offset.left + r.scrollLeft, c = r.width, o = r.isWindow ? r.scrollLeft : r.offset.left, l = n.left - i.collisionPosition.marginLeft, a = l - o, v = l + i.collisionWidth - c - o, u = i.my[0] === "left" ? -i.elemWidth : i.my[0] === "right" ? i.elemWidth : 0, f = i.at[0] === "left" ? i.targetWidth : i.at[0] === "right" ? -i.targetWidth : 0, e = -2 * i.offset[0], s, h; a < 0 ? (s = n.left + u + f + e + i.collisionWidth - c - y, (s < 0 || s < t(a)) && (n.left += u + f + e)) : v > 0 && (h = n.left - i.collisionPosition.marginLeft + u + f + e - o, (h > 0 || t(h) < v) && (n.left += u + f + e)) }, top: function (n, i) { var r = i.within, y = r.offset.top + r.scrollTop, c = r.height, o = r.isWindow ? r.scrollTop : r.offset.top, l = n.top - i.collisionPosition.marginTop, a = l - o, v = l + i.collisionHeight - c - o, p = i.my[1] === "top", u = p ? -i.elemHeight : i.my[1] === "bottom" ? i.elemHeight : 0, f = i.at[1] === "top" ? i.targetHeight : i.at[1] === "bottom" ? -i.targetHeight : 0, e = -2 * i.offset[1], s, h; a < 0 ? (h = n.top + u + f + e + i.collisionHeight - c - y, (h < 0 || h < t(a)) && (n.top += u + f + e)) : v > 0 && (s = n.top - i.collisionPosition.marginTop + u + f + e - o, (s > 0 || t(s) < v) && (n.top += u + f + e)) } }, flipfit: { left: function () { n.ui.position.flip.left.apply(this, arguments); n.ui.position.fit.left.apply(this, arguments) }, top: function () { n.ui.position.flip.top.apply(this, arguments); n.ui.position.fit.top.apply(this, arguments) } } } })(); d = n.ui.position;
  120. /*!
  121. * jQuery UI :data 1.12.1
  122. * http://jqueryui.com
  123. *
  124. * Copyright jQuery Foundation and other contributors
  125. * Released under the MIT license.
  126. * http://jquery.org/license
  127. */
  128. g = n.extend(n.expr[":"], { data: n.expr.createPseudo ? n.expr.createPseudo(function (t) { return function (i) { return !!n.data(i, t) } }) : function (t, i, r) { return !!n.data(t, r[3]) } });
  129. /*!
  130. * jQuery UI Disable Selection 1.12.1
  131. * http://jqueryui.com
  132. *
  133. * Copyright jQuery Foundation and other contributors
  134. * Released under the MIT license.
  135. * http://jquery.org/license
  136. */
  137. nt = n.fn.extend({ disableSelection: function () { var n = "onselectstart" in document.createElement("div") ? "selectstart" : "mousedown"; return function () { return this.on(n + ".ui-disableSelection", function (n) { n.preventDefault() }) } }(), enableSelection: function () { return this.off(".ui-disableSelection") } });
  138. /*!
  139. * jQuery UI Effects 1.12.1
  140. * http://jqueryui.com
  141. *
  142. * Copyright jQuery Foundation and other contributors
  143. * Released under the MIT license.
  144. * http://jquery.org/license
  145. */
  146. var u = "ui-effects-", s = "ui-effects-style", h = "ui-effects-animated", a = n; n.effects = { effect: {} };
  147. /*!
  148. * jQuery Color Animations v2.1.2
  149. * https://github.com/jquery/jquery-color
  150. *
  151. * Copyright 2014 jQuery Foundation and other contributors
  152. * Released under the MIT license.
  153. * http://jquery.org/license
  154. *
  155. * Date: Wed Jan 16 08:47:09 2013 -0600
  156. */
  157. (function (n, t) { function e(n, t, i) { var r = s[t.type] || {}; return n == null ? i || !t.def ? null : t.def : (n = r.floor ? ~~n : parseFloat(n), isNaN(n)) ? t.def : r.mod ? (n + r.mod) % r.mod : 0 > n ? 0 : r.max < n ? r.max : n } function l(t) { var e = i(), o = e._rgba = []; return (t = t.toLowerCase(), r(v, function (n, i) { var r, s = i.re.exec(t), h = s && i.parse(s), f = i.space || "rgba"; if (h) return r = e[f](h), e[u[f].cache] = r[u[f].cache], o = e._rgba = r._rgba, !1 }), o.length) ? (o.join() === "0,0,0,0" && n.extend(o, f.transparent), e) : f[t] } function o(n, t, i) { return (i = (i + 1) % 1, i * 6 < 1) ? n + (t - n) * i * 6 : i * 2 < 1 ? t : i * 3 < 2 ? n + (t - n) * (2 / 3 - i) * 6 : n } var a = /^([\-+])=\s*(\d+\.?\d*)/, v = [{ re: /rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/, parse: function (n) { return [n[1], n[2], n[3], n[4]] } }, { re: /rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/, parse: function (n) { return [n[1] * 2.55, n[2] * 2.55, n[3] * 2.55, n[4]] } }, { re: /#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/, parse: function (n) { return [parseInt(n[1], 16), parseInt(n[2], 16), parseInt(n[3], 16)] } }, { re: /#([a-f0-9])([a-f0-9])([a-f0-9])/, parse: function (n) { return [parseInt(n[1] + n[1], 16), parseInt(n[2] + n[2], 16), parseInt(n[3] + n[3], 16)] } }, { re: /hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/, space: "hsla", parse: function (n) { return [n[1], n[2] / 100, n[3] / 100, n[4]] } }], i = n.Color = function (t, i, r, u) { return new n.Color.fn.parse(t, i, r, u) }, u = { rgba: { props: { red: { idx: 0, type: "byte" }, green: { idx: 1, type: "byte" }, blue: { idx: 2, type: "byte" } } }, hsla: { props: { hue: { idx: 0, type: "degrees" }, saturation: { idx: 1, type: "percent" }, lightness: { idx: 2, type: "percent" } } } }, s = { byte: { floor: !0, max: 255 }, percent: { max: 1 }, degrees: { mod: 360, floor: !0 } }, h = i.support = {}, c = n("<p>")[0], f, r = n.each; c.style.cssText = "background-color:rgba(1,1,1,.5)"; h.rgba = c.style.backgroundColor.indexOf("rgba") > -1; r(u, function (n, t) { t.cache = "_" + n; t.props.alpha = { idx: 3, type: "percent", def: 1 } }); i.fn = n.extend(i.prototype, { parse: function (o, s, h, c) { if (o === t) return this._rgba = [null, null, null, null], this; (o.jquery || o.nodeType) && (o = n(o).css(s), s = t); var a = this, v = n.type(o), y = this._rgba = []; return (s !== t && (o = [o, s, h, c], v = "array"), v === "string") ? this.parse(l(o) || f._default) : v === "array" ? (r(u.rgba.props, function (n, t) { y[t.idx] = e(o[t.idx], t) }), this) : v === "object" ? (o instanceof i ? r(u, function (n, t) { o[t.cache] && (a[t.cache] = o[t.cache].slice()) }) : r(u, function (t, i) { var u = i.cache; r(i.props, function (n, t) { if (!a[u] && i.to) { if (n === "alpha" || o[n] == null) return; a[u] = i.to(a._rgba) } a[u][t.idx] = e(o[n], t, !0) }); a[u] && n.inArray(null, a[u].slice(0, 3)) < 0 && (a[u][3] = 1, i.from && (a._rgba = i.from(a[u]))) }), this) : void 0 }, is: function (n) { var e = i(n), t = !0, f = this; return r(u, function (n, i) { var o, u = e[i.cache]; return u && (o = f[i.cache] || i.to && i.to(f._rgba) || [], r(i.props, function (n, i) { if (u[i.idx] != null) return t = u[i.idx] === o[i.idx] })), t }), t }, _space: function () { var n = [], t = this; return r(u, function (i, r) { t[r.cache] && n.push(i) }), n.pop() }, transition: function (n, t) { var f = i(n), c = f._space(), o = u[c], l = this.alpha() === 0 ? i("transparent") : this, a = l[o.cache] || o.to(l._rgba), h = a.slice(); return f = f[o.cache], r(o.props, function (n, i) { var c = i.idx, r = a[c], u = f[c], o = s[i.type] || {}; u !== null && (r === null ? h[c] = u : (o.mod && (u - r > o.mod / 2 ? r += o.mod : r - u > o.mod / 2 && (r -= o.mod)), h[c] = e((u - r) * t + r, i))) }), this[c](h) }, blend: function (t) { if (this._rgba[3] === 1) return this; var r = this._rgba.slice(), u = r.pop(), f = i(t)._rgba; return i(n.map(r, function (n, t) { return (1 - u) * f[t] + u * n })) }, toRgbaString: function () { var i = "rgba(", t = n.map(this._rgba, function (n, t) { return n == null ? t > 2 ? 1 : 0 : n }); return t[3] === 1 && (t.pop(), i = "rgb("), i + t.join() + ")" }, toHslaString: function () { var i = "hsla(", t = n.map(this.hsla(), function (n, t) { return n == null && (n = t > 2 ? 1 : 0), t && t < 3 && (n = Math.round(n * 100) + "%"), n }); return t[3] === 1 && (t.pop(), i = "hsl("), i + t.join() + ")" }, toHexString: function (t) { var i = this._rgba.slice(), r = i.pop(); return t && i.push(~~(r * 255)), "#" + n.map(i, function (n) { return n = (n || 0).toString(16), n.length === 1 ? "0" + n : n }).join("") }, toString: function () { return this._rgba[3] === 0 ? "transparent" : this.toRgbaString() } }); i.fn.parse.prototype = i.fn; u.hsla.to = function (n) { if (n[0] == null || n[1] == null || n[2] == null) return [null, null, null, n[3]]; var i = n[0] / 255, r = n[1] / 255, f = n[2] / 255, s = n[3], u = Math.max(i, r, f), e = Math.min(i, r, f), t = u - e, o = u + e, h = o * .5, c, l; return c = e === u ? 0 : i === u ? 60 * (r - f) / t + 360 : r === u ? 60 * (f - i) / t + 120 : 60 * (i - r) / t + 240, l = t === 0 ? 0 : h <= .5 ? t / o : t / (2 - o), [Math.round(c) % 360, l, h, s == null ? 1 : s] }; u.hsla.from = function (n) { if (n[0] == null || n[1] == null || n[2] == null) return [null, null, null, n[3]]; var r = n[0] / 360, u = n[1], t = n[2], e = n[3], i = t <= .5 ? t * (1 + u) : t + u - t * u, f = 2 * t - i; return [Math.round(o(f, i, r + 1 / 3) * 255), Math.round(o(f, i, r) * 255), Math.round(o(f, i, r - 1 / 3) * 255), e] }; r(u, function (u, f) { var s = f.props, o = f.cache, h = f.to, c = f.from; i.fn[u] = function (u) { if (h && !this[o] && (this[o] = h(this._rgba)), u === t) return this[o].slice(); var l, a = n.type(u), v = a === "array" || a === "object" ? u : arguments, f = this[o].slice(); return r(s, function (n, t) { var i = v[a === "object" ? n : t.idx]; i == null && (i = f[t.idx]); f[t.idx] = e(i, t) }), c ? (l = i(c(f)), l[o] = f, l) : i(f) }; r(s, function (t, r) { i.fn[t] || (i.fn[t] = function (i) { var f = n.type(i), h = t === "alpha" ? this._hsla ? "hsla" : "rgba" : u, o = this[h](), s = o[r.idx], e; return f === "undefined" ? s : (f === "function" && (i = i.call(this, s), f = n.type(i)), i == null && r.empty) ? this : (f === "string" && (e = a.exec(i), e && (i = s + parseFloat(e[2]) * (e[1] === "+" ? 1 : -1))), o[r.idx] = i, this[h](o)) }) }) }); i.hook = function (t) { var u = t.split(" "); r(u, function (t, r) { n.cssHooks[r] = { set: function (t, u) { var o, f, e = ""; if (u !== "transparent" && (n.type(u) !== "string" || (o = l(u)))) { if (u = i(o || u), !h.rgba && u._rgba[3] !== 1) { for (f = r === "backgroundColor" ? t.parentNode : t; (e === "" || e === "transparent") && f && f.style;)try { e = n.css(f, "backgroundColor"); f = f.parentNode } catch (s) { } u = u.blend(e && e !== "transparent" ? e : "_default") } u = u.toRgbaString() } try { t.style[r] = u } catch (s) { } } }; n.fx.step[r] = function (t) { t.colorInit || (t.start = i(t.elem, r), t.end = i(t.end), t.colorInit = !0); n.cssHooks[r].set(t.elem, t.start.transition(t.end, t.pos)) } }) }; i.hook("backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor"); n.cssHooks.borderColor = { expand: function (n) { var t = {}; return r(["Top", "Right", "Bottom", "Left"], function (i, r) { t["border" + r + "Color"] = n }), t } }; f = n.Color.names = { aqua: "#00ffff", black: "#000000", blue: "#0000ff", fuchsia: "#ff00ff", gray: "#808080", green: "#008000", lime: "#00ff00", maroon: "#800000", navy: "#000080", olive: "#808000", purple: "#800080", red: "#ff0000", silver: "#c0c0c0", teal: "#008080", white: "#ffffff", yellow: "#ffff00", transparent: [null, null, null, 0], _default: "#ffffff" } })(a), function () { function t(t) { var r, u, i = t.ownerDocument.defaultView ? t.ownerDocument.defaultView.getComputedStyle(t, null) : t.currentStyle, f = {}; if (i && i.length && i[0] && i[i[0]]) for (u = i.length; u--;)r = i[u], typeof i[r] == "string" && (f[n.camelCase(r)] = i[r]); else for (r in i) typeof i[r] == "string" && (f[r] = i[r]); return f } function u(t, i) { var e = {}, u, f; for (u in i) f = i[u], t[u] !== f && (r[u] || (n.fx.step[u] || !isNaN(parseFloat(f))) && (e[u] = f)); return e } var i = ["add", "remove", "toggle"], r = { border: 1, borderBottom: 1, borderColor: 1, borderLeft: 1, borderRight: 1, borderTop: 1, borderWidth: 1, margin: 1, padding: 1 }; n.each(["borderLeftStyle", "borderRightStyle", "borderBottomStyle", "borderTopStyle"], function (t, i) { n.fx.step[i] = function (n) { (n.end === "none" || n.setAttr) && (n.pos !== 1 || n.setAttr) || (a.style(n.elem, i, n.end), n.setAttr = !0) } }); n.fn.addBack || (n.fn.addBack = function (n) { return this.add(n == null ? this.prevObject : this.prevObject.filter(n)) }); n.effects.animateClass = function (r, f, e, o) { var s = n.speed(f, e, o); return this.queue(function () { var e = n(this), h = e.attr("class") || "", o, f = s.children ? e.find("*").addBack() : e; f = f.map(function () { var i = n(this); return { el: i, start: t(this) } }); o = function () { n.each(i, function (n, t) { r[t] && e[t + "Class"](r[t]) }) }; o(); f = f.map(function () { return this.end = t(this.el[0]), this.diff = u(this.start, this.end), this }); e.attr("class", h); f = f.map(function () { var i = this, t = n.Deferred(), r = n.extend({}, s, { queue: !1, complete: function () { t.resolve(i) } }); return this.el.animate(this.diff, r), t.promise() }); n.when.apply(n, f.get()).done(function () { o(); n.each(arguments, function () { var t = this.el; n.each(this.diff, function (n) { t.css(n, "") }) }); s.complete.call(e[0]) }) }) }; n.fn.extend({ addClass: function (t) { return function (i, r, u, f) { return r ? n.effects.animateClass.call(this, { add: i }, r, u, f) : t.apply(this, arguments) } }(n.fn.addClass), removeClass: function (t) { return function (i, r, u, f) { return arguments.length > 1 ? n.effects.animateClass.call(this, { remove: i }, r, u, f) : t.apply(this, arguments) } }(n.fn.removeClass), toggleClass: function (t) { return function (i, r, u, f, e) { return typeof r == "boolean" || r === undefined ? u ? n.effects.animateClass.call(this, r ? { add: i } : { remove: i }, u, f, e) : t.apply(this, arguments) : n.effects.animateClass.call(this, { toggle: i }, r, u, f) } }(n.fn.toggleClass), switchClass: function (t, i, r, u, f) { return n.effects.animateClass.call(this, { add: i, remove: t }, r, u, f) } }) }(), function () { function t(t, i, r, u) { return n.isPlainObject(t) && (i = t, t = t.effect), t = { effect: t }, i == null && (i = {}), n.isFunction(i) && (u = i, r = null, i = {}), (typeof i == "number" || n.fx.speeds[i]) && (u = r, r = i, i = {}), n.isFunction(r) && (u = r, r = null), i && n.extend(t, i), r = r || i.duration, t.duration = n.fx.off ? 0 : typeof r == "number" ? r : r in n.fx.speeds ? n.fx.speeds[r] : n.fx.speeds._default, t.complete = u || i.complete, t } function i(t) { return !t || typeof t == "number" || n.fx.speeds[t] ? !0 : typeof t == "string" && !n.effects.effect[t] ? !0 : n.isFunction(t) ? !0 : typeof t == "object" && !t.effect ? !0 : !1 } function r(n, t) { var r = t.outerWidth(), u = t.outerHeight(), i = /^rect\((-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto)\)$/.exec(n) || ["", 0, r, u, 0]; return { top: parseFloat(i[1]) || 0, right: i[2] === "auto" ? r : parseFloat(i[2]), bottom: i[3] === "auto" ? u : parseFloat(i[3]), left: parseFloat(i[4]) || 0 } } n.expr && n.expr.filters && n.expr.filters.animated && (n.expr.filters.animated = function (t) { return function (i) { return !!n(i).data(h) || t(i) } }(n.expr.filters.animated)); n.uiBackCompat !== !1 && n.extend(n.effects, { save: function (n, t) { for (var i = 0, r = t.length; i < r; i++)t[i] !== null && n.data(u + t[i], n[0].style[t[i]]) }, restore: function (n, t) { for (var r, i = 0, f = t.length; i < f; i++)t[i] !== null && (r = n.data(u + t[i]), n.css(t[i], r)) }, setMode: function (n, t) { return t === "toggle" && (t = n.is(":hidden") ? "show" : "hide"), t }, createWrapper: function (t) { if (t.parent().is(".ui-effects-wrapper")) return t.parent(); var i = { width: t.outerWidth(!0), height: t.outerHeight(!0), float: t.css("float") }, u = n("<div><\/div>").addClass("ui-effects-wrapper").css({ fontSize: "100%", background: "transparent", border: "none", margin: 0, padding: 0 }), f = { width: t.width(), height: t.height() }, r = document.activeElement; try { r.id } catch (e) { r = document.body } return t.wrap(u), (t[0] === r || n.contains(t[0], r)) && n(r).trigger("focus"), u = t.parent(), t.css("position") === "static" ? (u.css({ position: "relative" }), t.css({ position: "relative" })) : (n.extend(i, { position: t.css("position"), zIndex: t.css("z-index") }), n.each(["top", "left", "bottom", "right"], function (n, r) { i[r] = t.css(r); isNaN(parseInt(i[r], 10)) && (i[r] = "auto") }), t.css({ position: "relative", top: 0, left: 0, right: "auto", bottom: "auto" })), t.css(f), u.css(i).show() }, removeWrapper: function (t) { var i = document.activeElement; return t.parent().is(".ui-effects-wrapper") && (t.parent().replaceWith(t), (t[0] === i || n.contains(t[0], i)) && n(i).trigger("focus")), t } }); n.extend(n.effects, { version: "1.12.1", define: function (t, i, r) { return r || (r = i, i = "effect"), n.effects.effect[t] = r, n.effects.effect[t].mode = i, r }, scaledDimensions: function (n, t, i) { if (t === 0) return { height: 0, width: 0, outerHeight: 0, outerWidth: 0 }; var r = i !== "horizontal" ? (t || 100) / 100 : 1, u = i !== "vertical" ? (t || 100) / 100 : 1; return { height: n.height() * u, width: n.width() * r, outerHeight: n.outerHeight() * u, outerWidth: n.outerWidth() * r } }, clipToBox: function (n) { return { width: n.clip.right - n.clip.left, height: n.clip.bottom - n.clip.top, left: n.clip.left, top: n.clip.top } }, unshift: function (n, t, i) { var r = n.queue(); t > 1 && r.splice.apply(r, [1, 0].concat(r.splice(t, i))); n.dequeue() }, saveStyle: function (n) { n.data(s, n[0].style.cssText) }, restoreStyle: function (n) { n[0].style.cssText = n.data(s) || ""; n.removeData(s) }, mode: function (n, t) { var i = n.is(":hidden"); return t === "toggle" && (t = i ? "show" : "hide"), (i ? t === "hide" : t === "show") && (t = "none"), t }, getBaseline: function (n, t) { var i, r; switch (n[0]) { case "top": i = 0; break; case "middle": i = .5; break; case "bottom": i = 1; break; default: i = n[0] / t.height }switch (n[1]) { case "left": r = 0; break; case "center": r = .5; break; case "right": r = 1; break; default: r = n[1] / t.width }return { x: r, y: i } }, createPlaceholder: function (t) { var i, r = t.css("position"), f = t.position(); return t.css({ marginTop: t.css("marginTop"), marginBottom: t.css("marginBottom"), marginLeft: t.css("marginLeft"), marginRight: t.css("marginRight") }).outerWidth(t.outerWidth()).outerHeight(t.outerHeight()), /^(static|relative)/.test(r) && (r = "absolute", i = n("<" + t[0].nodeName + ">").insertAfter(t).css({ display: /^(inline|ruby)/.test(t.css("display")) ? "inline-block" : "block", visibility: "hidden", marginTop: t.css("marginTop"), marginBottom: t.css("marginBottom"), marginLeft: t.css("marginLeft"), marginRight: t.css("marginRight"), float: t.css("float") }).outerWidth(t.outerWidth()).outerHeight(t.outerHeight()).addClass("ui-effects-placeholder"), t.data(u + "placeholder", i)), t.css({ position: r, left: f.left, top: f.top }), i }, removePlaceholder: function (n) { var t = u + "placeholder", i = n.data(t); i && (i.remove(), n.removeData(t)) }, cleanUp: function (t) { n.effects.restoreStyle(t); n.effects.removePlaceholder(t) }, setTransition: function (t, i, r, u) { return u = u || {}, n.each(i, function (n, i) { var f = t.cssUnit(i); f[0] > 0 && (u[i] = f[0] * r + f[1]) }), u } }); n.fn.extend({ effect: function () { function a(t) { function l() { o.removeData(h); n.effects.cleanUp(o); i.mode === "hide" && o.hide(); s() } function s() { n.isFunction(f) && f.call(o[0]); n.isFunction(t) && t() } var o = n(this); i.mode = c.shift(); n.uiBackCompat === !1 || u ? i.mode === "none" ? (o[r](), s()) : e.call(o[0], i, l) : (o.is(":hidden") ? r === "hide" : r === "show") ? (o[r](), s()) : e.call(o[0], i, s) } var i = t.apply(this, arguments), e = n.effects.effect[i.effect], u = e.mode, o = i.queue, s = o || "fx", f = i.complete, r = i.mode, c = [], l = function (t) { var f = n(this), i = n.effects.mode(f, r) || u; f.data(h, !0); c.push(i); u && (i === "show" || i === u && i === "hide") && f.show(); u && i === "none" || n.effects.saveStyle(f); n.isFunction(t) && t() }; return n.fx.off || !e ? r ? this[r](i.duration, f) : this.each(function () { f && f.call(this) }) : o === !1 ? this.each(l).each(a) : this.queue(s, l).queue(s, a) }, show: function (n) { return function (r) { if (i(r)) return n.apply(this, arguments); var u = t.apply(this, arguments); return u.mode = "show", this.effect.call(this, u) } }(n.fn.show), hide: function (n) { return function (r) { if (i(r)) return n.apply(this, arguments); var u = t.apply(this, arguments); return u.mode = "hide", this.effect.call(this, u) } }(n.fn.hide), toggle: function (n) { return function (r) { if (i(r) || typeof r == "boolean") return n.apply(this, arguments); var u = t.apply(this, arguments); return u.mode = "toggle", this.effect.call(this, u) } }(n.fn.toggle), cssUnit: function (t) { var i = this.css(t), r = []; return n.each(["em", "px", "%", "pt"], function (n, t) { i.indexOf(t) > 0 && (r = [parseFloat(i), t]) }), r }, cssClip: function (n) { return n ? this.css("clip", "rect(" + n.top + "px " + n.right + "px " + n.bottom + "px " + n.left + "px)") : r(this.css("clip"), this) }, transfer: function (t, i) { var u = n(this), r = n(t.to), f = r.css("position") === "fixed", e = n("body"), o = f ? e.scrollTop() : 0, s = f ? e.scrollLeft() : 0, h = r.offset(), l = { top: h.top - o, left: h.left - s, height: r.innerHeight(), width: r.innerWidth() }, c = u.offset(), a = n("<div class='ui-effects-transfer'><\/div>").appendTo("body").addClass(t.className).css({ top: c.top - o, left: c.left - s, height: u.innerHeight(), width: u.innerWidth(), position: f ? "fixed" : "absolute" }).animate(l, t.duration, t.easing, function () { a.remove(); n.isFunction(i) && i() }) } }); n.fx.step.clip = function (t) { t.clipInit || (t.start = n(t.elem).cssClip(), typeof t.end == "string" && (t.end = r(t.end, t.elem)), t.clipInit = !0); n(t.elem).cssClip({ top: t.pos * (t.end.top - t.start.top) + t.start.top, right: t.pos * (t.end.right - t.start.right) + t.start.right, bottom: t.pos * (t.end.bottom - t.start.bottom) + t.start.bottom, left: t.pos * (t.end.left - t.start.left) + t.start.left }) } }(), function () { var t = {}; n.each(["Quad", "Cubic", "Quart", "Quint", "Expo"], function (n, i) { t[i] = function (t) { return Math.pow(t, n + 2) } }); n.extend(t, { Sine: function (n) { return 1 - Math.cos(n * Math.PI / 2) }, Circ: function (n) { return 1 - Math.sqrt(1 - n * n) }, Elastic: function (n) { return n === 0 || n === 1 ? n : -Math.pow(2, 8 * (n - 1)) * Math.sin(((n - 1) * 80 - 7.5) * Math.PI / 15) }, Back: function (n) { return n * n * (3 * n - 2) }, Bounce: function (n) { for (var t, i = 4; n < ((t = Math.pow(2, --i)) - 1) / 11;); return 1 / Math.pow(4, 3 - i) - 7.5625 * Math.pow((t * 3 - 2) / 22 - n, 2) } }); n.each(t, function (t, i) { n.easing["easeIn" + t] = i; n.easing["easeOut" + t] = function (n) { return 1 - i(1 - n) }; n.easing["easeInOut" + t] = function (n) { return n < .5 ? i(n * 2) / 2 : 1 - i(n * -2 + 2) / 2 } }) }(); c = n.effects;
  158. /*!
  159. * jQuery UI Effects Blind 1.12.1
  160. * http://jqueryui.com
  161. *
  162. * Copyright jQuery Foundation and other contributors
  163. * Released under the MIT license.
  164. * http://jquery.org/license
  165. */
  166. tt = n.effects.define("blind", "hide", function (t, i) { var e = { up: ["bottom", "top"], vertical: ["bottom", "top"], down: ["top", "bottom"], left: ["right", "left"], horizontal: ["right", "left"], right: ["left", "right"] }, u = n(this), o = t.direction || "up", s = u.cssClip(), r = { clip: n.extend({}, s) }, f = n.effects.createPlaceholder(u); r.clip[e[o][0]] = r.clip[e[o][1]]; t.mode === "show" && (u.cssClip(r.clip), f && f.css(n.effects.clipToBox(r)), r.clip = s); f && f.animate(n.effects.clipToBox(r), t.duration, t.easing); u.animate(r, { queue: !1, duration: t.duration, easing: t.easing, complete: i }) });
  167. /*!
  168. * jQuery UI Effects Bounce 1.12.1
  169. * http://jqueryui.com
  170. *
  171. * Copyright jQuery Foundation and other contributors
  172. * Released under the MIT license.
  173. * http://jquery.org/license
  174. */
  175. it = n.effects.define("bounce", function (t, i) { var e, o, a, u = n(this), p = t.mode, s = p === "hide", w = p === "show", h = t.direction || "up", r = t.distance, v = t.times || 5, b = v * 2 + (w || s ? 1 : 0), c = t.duration / b, l = t.easing, f = h === "up" || h === "down" ? "top" : "left", y = h === "up" || h === "left", k = 0, d = u.queue().length; for (n.effects.createPlaceholder(u), a = u.css(f), r || (r = u[f === "top" ? "outerHeight" : "outerWidth"]() / 3), w && (o = { opacity: 1 }, o[f] = a, u.css("opacity", 0).css(f, y ? -r * 2 : r * 2).animate(o, c, l)), s && (r = r / Math.pow(2, v - 1)), o = {}, o[f] = a; k < v; k++)e = {}, e[f] = (y ? "-=" : "+=") + r, u.animate(e, c, l).animate(o, c, l), r = s ? r * 2 : r / 2; s && (e = { opacity: 0 }, e[f] = (y ? "-=" : "+=") + r, u.animate(e, c, l)); u.queue(i); n.effects.unshift(u, d, b + 1) });
  176. /*!
  177. * jQuery UI Effects Clip 1.12.1
  178. * http://jqueryui.com
  179. *
  180. * Copyright jQuery Foundation and other contributors
  181. * Released under the MIT license.
  182. * http://jquery.org/license
  183. */
  184. rt = n.effects.define("clip", "hide", function (t, i) { var r, u = {}, f = n(this), e = t.direction || "vertical", o = e === "both", s = o || e === "horizontal", h = o || e === "vertical"; r = f.cssClip(); u.clip = { top: h ? (r.bottom - r.top) / 2 : r.top, right: s ? (r.right - r.left) / 2 : r.right, bottom: h ? (r.bottom - r.top) / 2 : r.bottom, left: s ? (r.right - r.left) / 2 : r.left }; n.effects.createPlaceholder(f); t.mode === "show" && (f.cssClip(u.clip), u.clip = r); f.animate(u, { queue: !1, duration: t.duration, easing: t.easing, complete: i }) });
  185. /*!
  186. * jQuery UI Effects Drop 1.12.1
  187. * http://jqueryui.com
  188. *
  189. * Copyright jQuery Foundation and other contributors
  190. * Released under the MIT license.
  191. * http://jquery.org/license
  192. */
  193. ut = n.effects.define("drop", "hide", function (t, i) { var e, u = n(this), h = t.mode, c = h === "show", f = t.direction || "left", o = f === "up" || f === "down" ? "top" : "left", s = f === "up" || f === "left" ? "-=" : "+=", l = s === "+=" ? "-=" : "+=", r = { opacity: 0 }; n.effects.createPlaceholder(u); e = t.distance || u[o === "top" ? "outerHeight" : "outerWidth"](!0) / 2; r[o] = s + e; c && (u.css(r), r[o] = l + e, r.opacity = 1); u.animate(r, { queue: !1, duration: t.duration, easing: t.easing, complete: i }) });
  194. /*!
  195. * jQuery UI Effects Explode 1.12.1
  196. * http://jqueryui.com
  197. *
  198. * Copyright jQuery Foundation and other contributors
  199. * Released under the MIT license.
  200. * http://jquery.org/license
  201. */
  202. ft = n.effects.define("explode", "hide", function (t, i) { function k() { p.push(this); p.length === e * c && d() } function d() { o.css({ visibility: "visible" }); n(p).remove(); i() } for (var u, l, a, v, y, e = t.pieces ? Math.round(Math.sqrt(t.pieces)) : 3, c = e, o = n(this), b = t.mode, f = b === "show", w = o.show().css("visibility", "hidden").offset(), s = Math.ceil(o.outerWidth() / c), h = Math.ceil(o.outerHeight() / e), p = [], r = 0; r < e; r++)for (a = w.top + r * h, y = r - (e - 1) / 2, u = 0; u < c; u++)l = w.left + u * s, v = u - (c - 1) / 2, o.clone().appendTo("body").wrap("<div><\/div>").css({ position: "absolute", visibility: "visible", left: -u * s, top: -r * h }).parent().addClass("ui-effects-explode").css({ position: "absolute", overflow: "hidden", width: s, height: h, left: l + (f ? v * s : 0), top: a + (f ? y * h : 0), opacity: f ? 0 : 1 }).animate({ left: l + (f ? 0 : v * s), top: a + (f ? 0 : y * h), opacity: f ? 1 : 0 }, t.duration || 500, t.easing, k) });
  203. /*!
  204. * jQuery UI Effects Fade 1.12.1
  205. * http://jqueryui.com
  206. *
  207. * Copyright jQuery Foundation and other contributors
  208. * Released under the MIT license.
  209. * http://jquery.org/license
  210. */
  211. et = n.effects.define("fade", "toggle", function (t, i) { var r = t.mode === "show"; n(this).css("opacity", r ? 0 : 1).animate({ opacity: r ? 1 : 0 }, { queue: !1, duration: t.duration, easing: t.easing, complete: i }) });
  212. /*!
  213. * jQuery UI Effects Fold 1.12.1
  214. * http://jqueryui.com
  215. *
  216. * Copyright jQuery Foundation and other contributors
  217. * Released under the MIT license.
  218. * http://jquery.org/license
  219. */
  220. ot = n.effects.define("fold", "hide", function (t, i) { var u = n(this), l = t.mode, v = l === "show", y = l === "hide", o = t.size || 15, a = /([0-9]+)%/.exec(o), p = !!t.horizFirst, f = p ? ["right", "bottom"] : ["bottom", "right"], s = t.duration / 2, h = n.effects.createPlaceholder(u), e = u.cssClip(), c = { clip: n.extend({}, e) }, r = { clip: n.extend({}, e) }, w = [e[f[0]], e[f[1]]], b = u.queue().length; a && (o = parseInt(a[1], 10) / 100 * w[y ? 0 : 1]); c.clip[f[0]] = o; r.clip[f[0]] = o; r.clip[f[1]] = 0; v && (u.cssClip(r.clip), h && h.css(n.effects.clipToBox(r)), r.clip = e); u.queue(function (i) { h && h.animate(n.effects.clipToBox(c), s, t.easing).animate(n.effects.clipToBox(r), s, t.easing); i() }).animate(c, s, t.easing).animate(r, s, t.easing).queue(i); n.effects.unshift(u, b, 4) });
  221. /*!
  222. * jQuery UI Effects Highlight 1.12.1
  223. * http://jqueryui.com
  224. *
  225. * Copyright jQuery Foundation and other contributors
  226. * Released under the MIT license.
  227. * http://jquery.org/license
  228. */
  229. st = n.effects.define("highlight", "show", function (t, i) { var r = n(this), u = { backgroundColor: r.css("backgroundColor") }; t.mode === "hide" && (u.opacity = 0); n.effects.saveStyle(r); r.css({ backgroundImage: "none", backgroundColor: t.color || "#ffff99" }).animate(u, { queue: !1, duration: t.duration, easing: t.easing, complete: i }) });
  230. /*!
  231. * jQuery UI Effects Size 1.12.1
  232. * http://jqueryui.com
  233. *
  234. * Copyright jQuery Foundation and other contributors
  235. * Released under the MIT license.
  236. * http://jquery.org/license
  237. */
  238. ht = n.effects.define("size", function (t, i) { var l, r, p, u = n(this), v = ["fontSize"], s = ["borderTopWidth", "borderBottomWidth", "paddingTop", "paddingBottom"], h = ["borderLeftWidth", "borderRightWidth", "paddingLeft", "paddingRight"], w = t.mode, y = w !== "effect", c = t.scale || "both", b = t.origin || ["middle", "center"], k = u.css("position"), a = u.position(), o = n.effects.scaledDimensions(u), f = t.from || o, e = t.to || n.effects.scaledDimensions(u, 0); n.effects.createPlaceholder(u); w === "show" && (p = f, f = e, e = p); r = { from: { y: f.height / o.height, x: f.width / o.width }, to: { y: e.height / o.height, x: e.width / o.width } }; (c === "box" || c === "both") && (r.from.y !== r.to.y && (f = n.effects.setTransition(u, s, r.from.y, f), e = n.effects.setTransition(u, s, r.to.y, e)), r.from.x !== r.to.x && (f = n.effects.setTransition(u, h, r.from.x, f), e = n.effects.setTransition(u, h, r.to.x, e))); (c === "content" || c === "both") && r.from.y !== r.to.y && (f = n.effects.setTransition(u, v, r.from.y, f), e = n.effects.setTransition(u, v, r.to.y, e)); b && (l = n.effects.getBaseline(b, o), f.top = (o.outerHeight - f.outerHeight) * l.y + a.top, f.left = (o.outerWidth - f.outerWidth) * l.x + a.left, e.top = (o.outerHeight - e.outerHeight) * l.y + a.top, e.left = (o.outerWidth - e.outerWidth) * l.x + a.left); u.css(f); (c === "content" || c === "both") && (s = s.concat(["marginTop", "marginBottom"]).concat(v), h = h.concat(["marginLeft", "marginRight"]), u.find("*[width]").each(function () { var i = n(this), u = n.effects.scaledDimensions(i), f = { height: u.height * r.from.y, width: u.width * r.from.x, outerHeight: u.outerHeight * r.from.y, outerWidth: u.outerWidth * r.from.x }, e = { height: u.height * r.to.y, width: u.width * r.to.x, outerHeight: u.height * r.to.y, outerWidth: u.width * r.to.x }; r.from.y !== r.to.y && (f = n.effects.setTransition(i, s, r.from.y, f), e = n.effects.setTransition(i, s, r.to.y, e)); r.from.x !== r.to.x && (f = n.effects.setTransition(i, h, r.from.x, f), e = n.effects.setTransition(i, h, r.to.x, e)); y && n.effects.saveStyle(i); i.css(f); i.animate(e, t.duration, t.easing, function () { y && n.effects.restoreStyle(i) }) })); u.animate(e, { queue: !1, duration: t.duration, easing: t.easing, complete: function () { var t = u.offset(); e.opacity === 0 && u.css("opacity", f.opacity); y || (u.css("position", k === "static" ? "relative" : k).offset(t), n.effects.saveStyle(u)); i() } }) });
  239. /*!
  240. * jQuery UI Effects Scale 1.12.1
  241. * http://jqueryui.com
  242. *
  243. * Copyright jQuery Foundation and other contributors
  244. * Released under the MIT license.
  245. * http://jquery.org/license
  246. */
  247. ct = n.effects.define("scale", function (t, i) { var u = n(this), f = t.mode, e = parseInt(t.percent, 10) || (parseInt(t.percent, 10) === 0 ? 0 : f !== "effect" ? 0 : 100), r = n.extend(!0, { from: n.effects.scaledDimensions(u), to: n.effects.scaledDimensions(u, e, t.direction || "both"), origin: t.origin || ["middle", "center"] }, t); t.fade && (r.from.opacity = 1, r.to.opacity = 0); n.effects.effect.size.call(this, r, i) });
  248. /*!
  249. * jQuery UI Effects Puff 1.12.1
  250. * http://jqueryui.com
  251. *
  252. * Copyright jQuery Foundation and other contributors
  253. * Released under the MIT license.
  254. * http://jquery.org/license
  255. */
  256. lt = n.effects.define("puff", "hide", function (t, i) { var r = n.extend(!0, {}, t, { fade: !0, percent: parseInt(t.percent, 10) || 150 }); n.effects.effect.scale.call(this, r, i) });
  257. /*!
  258. * jQuery UI Effects Pulsate 1.12.1
  259. * http://jqueryui.com
  260. *
  261. * Copyright jQuery Foundation and other contributors
  262. * Released under the MIT license.
  263. * http://jquery.org/license
  264. */
  265. at = n.effects.define("pulsate", "show", function (t, i) { var r = n(this), e = t.mode, o = e === "show", c = e === "hide", l = o || c, f = (t.times || 5) * 2 + (l ? 1 : 0), s = t.duration / f, u = 0, h = 1, a = r.queue().length; for ((o || !r.is(":visible")) && (r.css("opacity", 0).show(), u = 1); h < f; h++)r.animate({ opacity: u }, s, t.easing), u = 1 - u; r.animate({ opacity: u }, s, t.easing); r.queue(i); n.effects.unshift(r, a, f + 1) });
  266. /*!
  267. * jQuery UI Effects Shake 1.12.1
  268. * http://jqueryui.com
  269. *
  270. * Copyright jQuery Foundation and other contributors
  271. * Released under the MIT license.
  272. * http://jquery.org/license
  273. */
  274. vt = n.effects.define("shake", function (t, i) { var l = 1, r = n(this), f = t.direction || "left", e = t.distance || 20, a = t.times || 3, v = a * 2 + 1, u = Math.round(t.duration / v), o = f === "up" || f === "down" ? "top" : "left", s = f === "up" || f === "left", h = {}, c = {}, y = {}, p = r.queue().length; for (n.effects.createPlaceholder(r), h[o] = (s ? "-=" : "+=") + e, c[o] = (s ? "+=" : "-=") + e * 2, y[o] = (s ? "-=" : "+=") + e * 2, r.animate(h, u, t.easing); l < a; l++)r.animate(c, u, t.easing).animate(y, u, t.easing); r.animate(c, u, t.easing).animate(h, u / 2, t.easing).queue(i); n.effects.unshift(r, p, v + 1) });
  275. /*!
  276. * jQuery UI Effects Slide 1.12.1
  277. * http://jqueryui.com
  278. *
  279. * Copyright jQuery Foundation and other contributors
  280. * Released under the MIT license.
  281. * http://jquery.org/license
  282. */
  283. yt = n.effects.define("slide", "show", function (t, i) { var s, o, u = n(this), h = { up: ["bottom", "top"], down: ["top", "bottom"], left: ["right", "left"], right: ["left", "right"] }, c = t.mode, f = t.direction || "left", e = f === "up" || f === "down" ? "top" : "left", l = f === "up" || f === "left", a = t.distance || u[e === "top" ? "outerHeight" : "outerWidth"](!0), r = {}; n.effects.createPlaceholder(u); s = u.cssClip(); o = u.position()[e]; r[e] = (l ? -1 : 1) * a + o; r.clip = u.cssClip(); r.clip[h[f][1]] = r.clip[h[f][0]]; c === "show" && (u.cssClip(r.clip), u.css(e, r[e]), r.clip = s, r[e] = o); u.animate(r, { queue: !1, duration: t.duration, easing: t.easing, complete: i }) });
  284. /*!
  285. * jQuery UI Effects Transfer 1.12.1
  286. * http://jqueryui.com
  287. *
  288. * Copyright jQuery Foundation and other contributors
  289. * Released under the MIT license.
  290. * http://jquery.org/license
  291. */
  292. n.uiBackCompat !== !1 && (c = n.effects.define("transfer", function (t, i) { n(this).transfer(t, i) })); pt = c;
  293. /*!
  294. * jQuery UI Focusable 1.12.1
  295. * http://jqueryui.com
  296. *
  297. * Copyright jQuery Foundation and other contributors
  298. * Released under the MIT license.
  299. * http://jquery.org/license
  300. */
  301. n.ui.focusable = function (t, i) { var u, f, e, r, o, s = t.nodeName.toLowerCase(); return "area" === s ? (u = t.parentNode, f = u.name, !t.href || !f || u.nodeName.toLowerCase() !== "map") ? !1 : (e = n("img[usemap='#" + f + "']"), e.length > 0 && e.is(":visible")) : (/^(input|select|textarea|button|object)$/.test(s) ? (r = !t.disabled, r && (o = n(t).closest("fieldset")[0], o && (r = !o.disabled))) : r = "a" === s ? t.href || i : i, r && n(t).is(":visible") && wt(n(t))) }; n.extend(n.expr[":"], { focusable: function (t) { return n.ui.focusable(t, n.attr(t, "tabindex") != null) } }); bt = n.ui.focusable; kt = n.fn.form = function () { return typeof this[0].form == "string" ? this.closest("form") : n(this[0].form) };
  302. /*!
  303. * jQuery UI Form Reset Mixin 1.12.1
  304. * http://jqueryui.com
  305. *
  306. * Copyright jQuery Foundation and other contributors
  307. * Released under the MIT license.
  308. * http://jquery.org/license
  309. */
  310. dt = n.ui.formResetMixin = { _formResetHandler: function () { var t = n(this); setTimeout(function () { var i = t.data("ui-form-reset-instances"); n.each(i, function () { this.refresh() }) }) }, _bindFormResetHandler: function () { if (this.form = this.element.form(), this.form.length) { var n = this.form.data("ui-form-reset-instances") || []; if (!n.length) this.form.on("reset.ui-form-reset", this._formResetHandler); n.push(this); this.form.data("ui-form-reset-instances", n) } }, _unbindFormResetHandler: function () { if (this.form.length) { var t = this.form.data("ui-form-reset-instances"); t.splice(n.inArray(this, t), 1); t.length ? this.form.data("ui-form-reset-instances", t) : this.form.removeData("ui-form-reset-instances").off("reset.ui-form-reset") } } };
  311. /*!
  312. * jQuery UI Support for jQuery core 1.7.x 1.12.1
  313. * http://jqueryui.com
  314. *
  315. * Copyright jQuery Foundation and other contributors
  316. * Released under the MIT license.
  317. * http://jquery.org/license
  318. *
  319. */
  320. n.fn.jquery.substring(0, 3) === "1.7" && (n.each(["Width", "Height"], function (t, i) { function f(t, i, r, u) { return n.each(e, function () { i -= parseFloat(n.css(t, "padding" + this)) || 0; r && (i -= parseFloat(n.css(t, "border" + this + "Width")) || 0); u && (i -= parseFloat(n.css(t, "margin" + this)) || 0) }), i } var e = i === "Width" ? ["Left", "Right"] : ["Top", "Bottom"], r = i.toLowerCase(), u = { innerWidth: n.fn.innerWidth, innerHeight: n.fn.innerHeight, outerWidth: n.fn.outerWidth, outerHeight: n.fn.outerHeight }; n.fn["inner" + i] = function (t) { return t === undefined ? u["inner" + i].call(this) : this.each(function () { n(this).css(r, f(this, t) + "px") }) }; n.fn["outer" + i] = function (t, e) { return typeof t != "number" ? u["outer" + i].call(this, t) : this.each(function () { n(this).css(r, f(this, t, !0, e) + "px") }) } }), n.fn.addBack = function (n) { return this.add(n == null ? this.prevObject : this.prevObject.filter(n)) });
  321. /*!
  322. * jQuery UI Keycode 1.12.1
  323. * http://jqueryui.com
  324. *
  325. * Copyright jQuery Foundation and other contributors
  326. * Released under the MIT license.
  327. * http://jquery.org/license
  328. */
  329. gt = n.ui.keyCode = { BACKSPACE: 8, COMMA: 188, DELETE: 46, DOWN: 40, END: 35, ENTER: 13, ESCAPE: 27, HOME: 36, LEFT: 37, PAGE_DOWN: 34, PAGE_UP: 33, PERIOD: 190, RIGHT: 39, SPACE: 32, TAB: 9, UP: 38 }; ni = n.ui.escapeSelector = function () { var n = /([!"#$%&'()*+,./:;<=>?@[\]^`{|}~])/g; return function (t) { return t.replace(n, "\\$1") } }();
  330. /*!
  331. * jQuery UI Labels 1.12.1
  332. * http://jqueryui.com
  333. *
  334. * Copyright jQuery Foundation and other contributors
  335. * Released under the MIT license.
  336. * http://jquery.org/license
  337. */
  338. ti = n.fn.labels = function () { var t, r, u, i, f; return this[0].labels && this[0].labels.length ? this.pushStack(this[0].labels) : (i = this.eq(0).parents("label"), u = this.attr("id"), u && (t = this.eq(0).parents().last(), f = t.add(t.length ? t.siblings() : this.siblings()), r = "label[for='" + n.ui.escapeSelector(u) + "']", i = i.add(f.find(r).addBack(r))), this.pushStack(i)) };
  339. /*!
  340. * jQuery UI Scroll Parent 1.12.1
  341. * http://jqueryui.com
  342. *
  343. * Copyright jQuery Foundation and other contributors
  344. * Released under the MIT license.
  345. * http://jquery.org/license
  346. */
  347. ii = n.fn.scrollParent = function (t) { var i = this.css("position"), u = i === "absolute", f = t ? /(auto|scroll|hidden)/ : /(auto|scroll)/, r = this.parents().filter(function () { var t = n(this); return u && t.css("position") === "static" ? !1 : f.test(t.css("overflow") + t.css("overflow-y") + t.css("overflow-x")) }).eq(0); return i === "fixed" || !r.length ? n(this[0].ownerDocument || document) : r };
  348. /*!
  349. * jQuery UI Tabbable 1.12.1
  350. * http://jqueryui.com
  351. *
  352. * Copyright jQuery Foundation and other contributors
  353. * Released under the MIT license.
  354. * http://jquery.org/license
  355. */
  356. ri = n.extend(n.expr[":"], { tabbable: function (t) { var i = n.attr(t, "tabindex"), r = i != null; return (!r || i >= 0) && n.ui.focusable(t, r) } });
  357. /*!
  358. * jQuery UI Unique ID 1.12.1
  359. * http://jqueryui.com
  360. *
  361. * Copyright jQuery Foundation and other contributors
  362. * Released under the MIT license.
  363. * http://jquery.org/license
  364. */
  365. ui = n.fn.extend({ uniqueId: function () { var n = 0; return function () { return this.each(function () { this.id || (this.id = "ui-id-" + ++n) }) } }(), removeUniqueId: function () { return this.each(function () { /^ui-id-\d+$/.test(this.id) && n(this).removeAttr("id") }) } });
  366. /*!
  367. * jQuery UI Accordion 1.12.1
  368. * http://jqueryui.com
  369. *
  370. * Copyright jQuery Foundation and other contributors
  371. * Released under the MIT license.
  372. * http://jquery.org/license
  373. */
  374. fi = n.widget("ui.accordion", { version: "1.12.1", options: { active: 0, animate: {}, classes: { "ui-accordion-header": "ui-corner-top", "ui-accordion-header-collapsed": "ui-corner-all", "ui-accordion-content": "ui-corner-bottom" }, collapsible: !1, event: "click", header: "> li > :first-child, > :not(li):even", heightStyle: "auto", icons: { activeHeader: "ui-icon-triangle-1-s", header: "ui-icon-triangle-1-e" }, activate: null, beforeActivate: null }, hideProps: { borderTopWidth: "hide", borderBottomWidth: "hide", paddingTop: "hide", paddingBottom: "hide", height: "hide" }, showProps: { borderTopWidth: "show", borderBottomWidth: "show", paddingTop: "show", paddingBottom: "show", height: "show" }, _create: function () { var t = this.options; this.prevShow = this.prevHide = n(); this._addClass("ui-accordion", "ui-widget ui-helper-reset"); this.element.attr("role", "tablist"); t.collapsible || t.active !== !1 && t.active != null || (t.active = 0); this._processPanels(); t.active < 0 && (t.active += this.headers.length); this._refresh() }, _getCreateEventData: function () { return { header: this.active, panel: this.active.length ? this.active.next() : n() } }, _createIcons: function () { var i, r, t = this.options.icons; t && (i = n("<span>"), this._addClass(i, "ui-accordion-header-icon", "ui-icon " + t.header), i.prependTo(this.headers), r = this.active.children(".ui-accordion-header-icon"), this._removeClass(r, t.header)._addClass(r, null, t.activeHeader)._addClass(this.headers, "ui-accordion-icons")) }, _destroyIcons: function () { this._removeClass(this.headers, "ui-accordion-icons"); this.headers.children(".ui-accordion-header-icon").remove() }, _destroy: function () { var n; this.element.removeAttr("role"); this.headers.removeAttr("role aria-expanded aria-selected aria-controls tabIndex").removeUniqueId(); this._destroyIcons(); n = this.headers.next().css("display", "").removeAttr("role aria-hidden aria-labelledby").removeUniqueId(); this.options.heightStyle !== "content" && n.css("height", "") }, _setOption: function (n, t) { if (n === "active") { this._activate(t); return } n === "event" && (this.options.event && this._off(this.headers, this.options.event), this._setupEvents(t)); this._super(n, t); n !== "collapsible" || t || this.options.active !== !1 || this._activate(0); n === "icons" && (this._destroyIcons(), t && this._createIcons()) }, _setOptionDisabled: function (n) { this._super(n); this.element.attr("aria-disabled", n); this._toggleClass(null, "ui-state-disabled", !!n); this._toggleClass(this.headers.add(this.headers.next()), null, "ui-state-disabled", !!n) }, _keydown: function (t) { if (!t.altKey && !t.ctrlKey) { var i = n.ui.keyCode, u = this.headers.length, f = this.headers.index(t.target), r = !1; switch (t.keyCode) { case i.RIGHT: case i.DOWN: r = this.headers[(f + 1) % u]; break; case i.LEFT: case i.UP: r = this.headers[(f - 1 + u) % u]; break; case i.SPACE: case i.ENTER: this._eventHandler(t); break; case i.HOME: r = this.headers[0]; break; case i.END: r = this.headers[u - 1] }r && (n(t.target).attr("tabIndex", -1), n(r).attr("tabIndex", 0), n(r).trigger("focus"), t.preventDefault()) } }, _panelKeyDown: function (t) { t.keyCode === n.ui.keyCode.UP && t.ctrlKey && n(t.currentTarget).prev().trigger("focus") }, refresh: function () { var t = this.options; this._processPanels(); (t.active !== !1 || t.collapsible !== !0) && this.headers.length ? t.active === !1 ? this._activate(0) : this.active.length && !n.contains(this.element[0], this.active[0]) ? this.headers.length === this.headers.find(".ui-state-disabled").length ? (t.active = !1, this.active = n()) : this._activate(Math.max(0, t.active - 1)) : t.active = this.headers.index(this.active) : (t.active = !1, this.active = n()); this._destroyIcons(); this._refresh() }, _processPanels: function () { var t = this.headers, n = this.panels; this.headers = this.element.find(this.options.header); this._addClass(this.headers, "ui-accordion-header ui-accordion-header-collapsed", "ui-state-default"); this.panels = this.headers.next().filter(":not(.ui-accordion-content-active)").hide(); this._addClass(this.panels, "ui-accordion-content", "ui-helper-reset ui-widget-content"); n && (this._off(t.not(this.headers)), this._off(n.not(this.panels))) }, _refresh: function () { var t, i = this.options, r = i.heightStyle, u = this.element.parent(); this.active = this._findActive(i.active); this._addClass(this.active, "ui-accordion-header-active", "ui-state-active")._removeClass(this.active, "ui-accordion-header-collapsed"); this._addClass(this.active.next(), "ui-accordion-content-active"); this.active.next().show(); this.headers.attr("role", "tab").each(function () { var t = n(this), r = t.uniqueId().attr("id"), i = t.next(), u = i.uniqueId().attr("id"); t.attr("aria-controls", u); i.attr("aria-labelledby", r) }).next().attr("role", "tabpanel"); this.headers.not(this.active).attr({ "aria-selected": "false", "aria-expanded": "false", tabIndex: -1 }).next().attr({ "aria-hidden": "true" }).hide(); this.active.length ? this.active.attr({ "aria-selected": "true", "aria-expanded": "true", tabIndex: 0 }).next().attr({ "aria-hidden": "false" }) : this.headers.eq(0).attr("tabIndex", 0); this._createIcons(); this._setupEvents(i.event); r === "fill" ? (t = u.height(), this.element.siblings(":visible").each(function () { var i = n(this), r = i.css("position"); r !== "absolute" && r !== "fixed" && (t -= i.outerHeight(!0)) }), this.headers.each(function () { t -= n(this).outerHeight(!0) }), this.headers.next().each(function () { n(this).height(Math.max(0, t - n(this).innerHeight() + n(this).height())) }).css("overflow", "auto")) : r === "auto" && (t = 0, this.headers.next().each(function () { var i = n(this).is(":visible"); i || n(this).show(); t = Math.max(t, n(this).css("height", "").height()); i || n(this).hide() }).height(t)) }, _activate: function (t) { var i = this._findActive(t)[0]; i !== this.active[0] && (i = i || this.active[0], this._eventHandler({ target: i, currentTarget: i, preventDefault: n.noop })) }, _findActive: function (t) { return typeof t == "number" ? this.headers.eq(t) : n() }, _setupEvents: function (t) { var i = { keydown: "_keydown" }; t && n.each(t.split(" "), function (n, t) { i[t] = "_eventHandler" }); this._off(this.headers.add(this.headers.next())); this._on(this.headers, i); this._on(this.headers.next(), { keydown: "_panelKeyDown" }); this._hoverable(this.headers); this._focusable(this.headers) }, _eventHandler: function (t) { var e, o, i = this.options, u = this.active, r = n(t.currentTarget), f = r[0] === u[0], s = f && i.collapsible, c = s ? n() : r.next(), l = u.next(), h = { oldHeader: u, oldPanel: l, newHeader: s ? n() : r, newPanel: c }; (t.preventDefault(), (!f || i.collapsible) && this._trigger("beforeActivate", t, h) !== !1) && (i.active = s ? !1 : this.headers.index(r), this.active = f ? n() : r, this._toggle(h), this._removeClass(u, "ui-accordion-header-active", "ui-state-active"), i.icons && (e = u.children(".ui-accordion-header-icon"), this._removeClass(e, null, i.icons.activeHeader)._addClass(e, null, i.icons.header)), f || (this._removeClass(r, "ui-accordion-header-collapsed")._addClass(r, "ui-accordion-header-active", "ui-state-active"), i.icons && (o = r.children(".ui-accordion-header-icon"), this._removeClass(o, null, i.icons.header)._addClass(o, null, i.icons.activeHeader)), this._addClass(r.next(), "ui-accordion-content-active"))) }, _toggle: function (t) { var r = t.newPanel, i = this.prevShow.length ? this.prevShow : t.oldPanel; this.prevShow.add(this.prevHide).stop(!0, !0); this.prevShow = r; this.prevHide = i; this.options.animate ? this._animate(r, i, t) : (i.hide(), r.show(), this._toggleComplete(t)); i.attr({ "aria-hidden": "true" }); i.prev().attr({ "aria-selected": "false", "aria-expanded": "false" }); r.length && i.length ? i.prev().attr({ tabIndex: -1, "aria-expanded": "false" }) : r.length && this.headers.filter(function () { return parseInt(n(this).attr("tabIndex"), 10) === 0 }).attr("tabIndex", -1); r.attr("aria-hidden", "false").prev().attr({ "aria-selected": "true", "aria-expanded": "true", tabIndex: 0 }) }, _animate: function (n, t, i) { var h, r, u, c = this, o = 0, l = n.css("box-sizing"), a = n.length && (!t.length || n.index() < t.index()), e = this.options.animate || {}, f = a && e.down || e, s = function () { c._toggleComplete(i) }; if (typeof f == "number" && (u = f), typeof f == "string" && (r = f), r = r || f.easing || e.easing, u = u || f.duration || e.duration, !t.length) return n.animate(this.showProps, u, r, s); if (!n.length) return t.animate(this.hideProps, u, r, s); h = n.show().outerHeight(); t.animate(this.hideProps, { duration: u, easing: r, step: function (n, t) { t.now = Math.round(n) } }); n.hide().animate(this.showProps, { duration: u, easing: r, complete: s, step: function (n, i) { i.now = Math.round(n); i.prop !== "height" ? l === "content-box" && (o += i.now) : c.options.heightStyle !== "content" && (i.now = Math.round(h - t.outerHeight() - o), o = 0) } }) }, _toggleComplete: function (n) { var t = n.oldPanel, i = t.prev(); this._removeClass(t, "ui-accordion-content-active"); this._removeClass(i, "ui-accordion-header-active")._addClass(i, "ui-accordion-header-collapsed"); t.length && (t.parent()[0].className = t.parent()[0].className); this._trigger("activate", null, n) } }); ei = n.ui.safeActiveElement = function (n) { var t; try { t = n.activeElement } catch (i) { t = n.body } return t || (t = n.body), t.nodeName || (t = n.body), t };
  375. /*!
  376. * jQuery UI Menu 1.12.1
  377. * http://jqueryui.com
  378. *
  379. * Copyright jQuery Foundation and other contributors
  380. * Released under the MIT license.
  381. * http://jquery.org/license
  382. */
  383. oi = n.widget("ui.menu", { version: "1.12.1", defaultElement: "<ul>", delay: 300, options: { icons: { submenu: "ui-icon-caret-1-e" }, items: "> *", menus: "ul", position: { my: "left top", at: "right top" }, role: "menu", blur: null, focus: null, select: null }, _create: function () { this.activeMenu = this.element; this.mouseHandled = !1; this.element.uniqueId().attr({ role: this.options.role, tabIndex: 0 }); this._addClass("ui-menu", "ui-widget ui-widget-content"); this._on({ "mousedown .ui-menu-item": function (n) { n.preventDefault() }, "click .ui-menu-item": function (t) { var i = n(t.target), r = n(n.ui.safeActiveElement(this.document[0])); !this.mouseHandled && i.not(".ui-state-disabled").length && (this.select(t), t.isPropagationStopped() || (this.mouseHandled = !0), i.has(".ui-menu").length ? this.expand(t) : !this.element.is(":focus") && r.closest(".ui-menu").length && (this.element.trigger("focus", [!0]), this.active && this.active.parents(".ui-menu").length === 1 && clearTimeout(this.timer))) }, "mouseenter .ui-menu-item": function (t) { if (!this.previousFilter) { var r = n(t.target).closest(".ui-menu-item"), i = n(t.currentTarget); r[0] === i[0] && (this._removeClass(i.siblings().children(".ui-state-active"), null, "ui-state-active"), this.focus(t, i)) } }, mouseleave: "collapseAll", "mouseleave .ui-menu": "collapseAll", focus: function (n, t) { var i = this.active || this.element.find(this.options.items).eq(0); t || this.focus(n, i) }, blur: function (t) { this._delay(function () { var i = !n.contains(this.element[0], n.ui.safeActiveElement(this.document[0])); i && this.collapseAll(t) }) }, keydown: "_keydown" }); this.refresh(); this._on(this.document, { click: function (n) { this._closeOnDocumentClick(n) && this.collapseAll(n); this.mouseHandled = !1 } }) }, _destroy: function () { var t = this.element.find(".ui-menu-item").removeAttr("role aria-disabled"), i = t.children(".ui-menu-item-wrapper").removeUniqueId().removeAttr("tabIndex role aria-haspopup"); this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeAttr("role aria-labelledby aria-expanded aria-hidden aria-disabled tabIndex").removeUniqueId().show(); i.children().each(function () { var t = n(this); t.data("ui-menu-submenu-caret") && t.remove() }) }, _keydown: function (t) { var i, u, r, f, e = !0; switch (t.keyCode) { case n.ui.keyCode.PAGE_UP: this.previousPage(t); break; case n.ui.keyCode.PAGE_DOWN: this.nextPage(t); break; case n.ui.keyCode.HOME: this._move("first", "first", t); break; case n.ui.keyCode.END: this._move("last", "last", t); break; case n.ui.keyCode.UP: this.previous(t); break; case n.ui.keyCode.DOWN: this.next(t); break; case n.ui.keyCode.LEFT: this.collapse(t); break; case n.ui.keyCode.RIGHT: this.active && !this.active.is(".ui-state-disabled") && this.expand(t); break; case n.ui.keyCode.ENTER: case n.ui.keyCode.SPACE: this._activate(t); break; case n.ui.keyCode.ESCAPE: this.collapse(t); break; default: e = !1; u = this.previousFilter || ""; f = !1; r = t.keyCode >= 96 && t.keyCode <= 105 ? (t.keyCode - 96).toString() : String.fromCharCode(t.keyCode); clearTimeout(this.filterTimer); r === u ? f = !0 : r = u + r; i = this._filterMenuItems(r); i = f && i.index(this.active.next()) !== -1 ? this.active.nextAll(".ui-menu-item") : i; i.length || (r = String.fromCharCode(t.keyCode), i = this._filterMenuItems(r)); i.length ? (this.focus(t, i), this.previousFilter = r, this.filterTimer = this._delay(function () { delete this.previousFilter }, 1e3)) : delete this.previousFilter }e && t.preventDefault() }, _activate: function (n) { this.active && !this.active.is(".ui-state-disabled") && (this.active.children("[aria-haspopup='true']").length ? this.expand(n) : this.select(n)) }, refresh: function () { var u, t, f, i, e, r = this, s = this.options.icons.submenu, o = this.element.find(this.options.menus); this._toggleClass("ui-menu-icons", null, !!this.element.find(".ui-icon").length); f = o.filter(":not(.ui-menu)").hide().attr({ role: this.options.role, "aria-hidden": "true", "aria-expanded": "false" }).each(function () { var t = n(this), i = t.prev(), u = n("<span>").data("ui-menu-submenu-caret", !0); r._addClass(u, "ui-menu-icon", "ui-icon " + s); i.attr("aria-haspopup", "true").prepend(u); t.attr("aria-labelledby", i.attr("id")) }); this._addClass(f, "ui-menu", "ui-widget ui-widget-content ui-front"); u = o.add(this.element); t = u.find(this.options.items); t.not(".ui-menu-item").each(function () { var t = n(this); r._isDivider(t) && r._addClass(t, "ui-menu-divider", "ui-widget-content") }); i = t.not(".ui-menu-item, .ui-menu-divider"); e = i.children().not(".ui-menu").uniqueId().attr({ tabIndex: -1, role: this._itemRole() }); this._addClass(i, "ui-menu-item")._addClass(e, "ui-menu-item-wrapper"); t.filter(".ui-state-disabled").attr("aria-disabled", "true"); this.active && !n.contains(this.element[0], this.active[0]) && this.blur() }, _itemRole: function () { return { menu: "menuitem", listbox: "option" }[this.options.role] }, _setOption: function (n, t) { if (n === "icons") { var i = this.element.find(".ui-menu-icon"); this._removeClass(i, null, this.options.icons.submenu)._addClass(i, null, t.submenu) } this._super(n, t) }, _setOptionDisabled: function (n) { this._super(n); this.element.attr("aria-disabled", String(n)); this._toggleClass(null, "ui-state-disabled", !!n) }, focus: function (n, t) { var i, r, u; this.blur(n, n && n.type === "focus"); this._scrollIntoView(t); this.active = t.first(); r = this.active.children(".ui-menu-item-wrapper"); this._addClass(r, null, "ui-state-active"); this.options.role && this.element.attr("aria-activedescendant", r.attr("id")); u = this.active.parent().closest(".ui-menu-item").children(".ui-menu-item-wrapper"); this._addClass(u, null, "ui-state-active"); n && n.type === "keydown" ? this._close() : this.timer = this._delay(function () { this._close() }, this.delay); i = t.children(".ui-menu"); i.length && n && /^mouse/.test(n.type) && this._startOpening(i); this.activeMenu = t.parent(); this._trigger("focus", n, { item: t }) }, _scrollIntoView: function (t) { var e, o, i, r, u, f; this._hasScroll() && (e = parseFloat(n.css(this.activeMenu[0], "borderTopWidth")) || 0, o = parseFloat(n.css(this.activeMenu[0], "paddingTop")) || 0, i = t.offset().top - this.activeMenu.offset().top - e - o, r = this.activeMenu.scrollTop(), u = this.activeMenu.height(), f = t.outerHeight(), i < 0 ? this.activeMenu.scrollTop(r + i) : i + f > u && this.activeMenu.scrollTop(r + i - u + f)) }, blur: function (n, t) { (t || clearTimeout(this.timer), this.active) && (this._removeClass(this.active.children(".ui-menu-item-wrapper"), null, "ui-state-active"), this._trigger("blur", n, { item: this.active }), this.active = null) }, _startOpening: function (n) { (clearTimeout(this.timer), n.attr("aria-hidden") === "true") && (this.timer = this._delay(function () { this._close(); this._open(n) }, this.delay)) }, _open: function (t) { var i = n.extend({ "of": this.active }, this.options.position); clearTimeout(this.timer); this.element.find(".ui-menu").not(t.parents(".ui-menu")).hide().attr("aria-hidden", "true"); t.show().removeAttr("aria-hidden").attr("aria-expanded", "true").position(i) }, collapseAll: function (t, i) { clearTimeout(this.timer); this.timer = this._delay(function () { var r = i ? this.element : n(t && t.target).closest(this.element.find(".ui-menu")); r.length || (r = this.element); this._close(r); this.blur(t); this._removeClass(r.find(".ui-state-active"), null, "ui-state-active"); this.activeMenu = r }, this.delay) }, _close: function (n) { n || (n = this.active ? this.active.parent() : this.element); n.find(".ui-menu").hide().attr("aria-hidden", "true").attr("aria-expanded", "false") }, _closeOnDocumentClick: function (t) { return !n(t.target).closest(".ui-menu").length }, _isDivider: function (n) { return !/[^\-\u2014\u2013\s]/.test(n.text()) }, collapse: function (n) { var t = this.active && this.active.parent().closest(".ui-menu-item", this.element); t && t.length && (this._close(), this.focus(n, t)) }, expand: function (n) { var t = this.active && this.active.children(".ui-menu ").find(this.options.items).first(); t && t.length && (this._open(t.parent()), this._delay(function () { this.focus(n, t) })) }, next: function (n) { this._move("next", "first", n) }, previous: function (n) { this._move("prev", "last", n) }, isFirstItem: function () { return this.active && !this.active.prevAll(".ui-menu-item").length }, isLastItem: function () { return this.active && !this.active.nextAll(".ui-menu-item").length }, _move: function (n, t, i) { var r; this.active && (r = n === "first" || n === "last" ? this.active[n === "first" ? "prevAll" : "nextAll"](".ui-menu-item").eq(-1) : this.active[n + "All"](".ui-menu-item").eq(0)); r && r.length && this.active || (r = this.activeMenu.find(this.options.items)[t]()); this.focus(i, r) }, nextPage: function (t) { var i, r, u; if (!this.active) { this.next(t); return } this.isLastItem() || (this._hasScroll() ? (r = this.active.offset().top, u = this.element.height(), this.active.nextAll(".ui-menu-item").each(function () { return i = n(this), i.offset().top - r - u < 0 }), this.focus(t, i)) : this.focus(t, this.activeMenu.find(this.options.items)[this.active ? "last" : "first"]())) }, previousPage: function (t) { var i, r, u; if (!this.active) { this.next(t); return } this.isFirstItem() || (this._hasScroll() ? (r = this.active.offset().top, u = this.element.height(), this.active.prevAll(".ui-menu-item").each(function () { return i = n(this), i.offset().top - r + u > 0 }), this.focus(t, i)) : this.focus(t, this.activeMenu.find(this.options.items).first())) }, _hasScroll: function () { return this.element.outerHeight() < this.element.prop("scrollHeight") }, select: function (t) { this.active = this.active || n(t.target).closest(".ui-menu-item"); var i = { item: this.active }; this.active.has(".ui-menu").length || this.collapseAll(t, !0); this._trigger("select", t, i) }, _filterMenuItems: function (t) { var i = t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&"), r = new RegExp("^" + i, "i"); return this.activeMenu.find(this.options.items).filter(".ui-menu-item").filter(function () { return r.test(n.trim(n(this).children(".ui-menu-item-wrapper").text())) }) } });
  384. /*!
  385. * jQuery UI Autocomplete 1.12.1
  386. * http://jqueryui.com
  387. *
  388. * Copyright jQuery Foundation and other contributors
  389. * Released under the MIT license.
  390. * http://jquery.org/license
  391. */
  392. n.widget("ui.autocomplete", { version: "1.12.1", defaultElement: "<input>", options: { appendTo: null, autoFocus: !1, delay: 300, minLength: 1, position: { my: "left top", at: "left bottom", collision: "none" }, source: null, change: null, close: null, focus: null, open: null, response: null, search: null, select: null }, requestIndex: 0, pending: 0, _create: function () { var t, i, r, u = this.element[0].nodeName.toLowerCase(), f = u === "textarea", e = u === "input"; this.isMultiLine = f || !e && this._isContentEditable(this.element); this.valueMethod = this.element[f || e ? "val" : "text"]; this.isNewMenu = !0; this._addClass("ui-autocomplete-input"); this.element.attr("autocomplete", "off"); this._on(this.element, { keydown: function (u) { if (this.element.prop("readOnly")) { t = !0; r = !0; i = !0; return } t = !1; r = !1; i = !1; var f = n.ui.keyCode; switch (u.keyCode) { case f.PAGE_UP: t = !0; this._move("previousPage", u); break; case f.PAGE_DOWN: t = !0; this._move("nextPage", u); break; case f.UP: t = !0; this._keyEvent("previous", u); break; case f.DOWN: t = !0; this._keyEvent("next", u); break; case f.ENTER: this.menu.active && (t = !0, u.preventDefault(), this.menu.select(u)); break; case f.TAB: this.menu.active && this.menu.select(u); break; case f.ESCAPE: this.menu.element.is(":visible") && (this.isMultiLine || this._value(this.term), this.close(u), u.preventDefault()); break; default: i = !0; this._searchTimeout(u) } }, keypress: function (r) { if (t) { t = !1; (!this.isMultiLine || this.menu.element.is(":visible")) && r.preventDefault(); return } if (!i) { var u = n.ui.keyCode; switch (r.keyCode) { case u.PAGE_UP: this._move("previousPage", r); break; case u.PAGE_DOWN: this._move("nextPage", r); break; case u.UP: this._keyEvent("previous", r); break; case u.DOWN: this._keyEvent("next", r) } } }, input: function (n) { if (r) { r = !1; n.preventDefault(); return } this._searchTimeout(n) }, focus: function () { this.selectedItem = null; this.previous = this._value() }, blur: function (n) { if (this.cancelBlur) { delete this.cancelBlur; return } clearTimeout(this.searching); this.close(n); this._change(n) } }); this._initSource(); this.menu = n("<ul>").appendTo(this._appendTo()).menu({ role: null }).hide().menu("instance"); this._addClass(this.menu.element, "ui-autocomplete", "ui-front"); this._on(this.menu.element, { mousedown: function (t) { t.preventDefault(); this.cancelBlur = !0; this._delay(function () { delete this.cancelBlur; this.element[0] !== n.ui.safeActiveElement(this.document[0]) && this.element.trigger("focus") }) }, menufocus: function (t, i) { var r, u; if (this.isNewMenu && (this.isNewMenu = !1, t.originalEvent && /^mouse/.test(t.originalEvent.type))) { this.menu.blur(); this.document.one("mousemove", function () { n(t.target).trigger(t.originalEvent) }); return } u = i.item.data("ui-autocomplete-item"); !1 !== this._trigger("focus", t, { item: u }) && t.originalEvent && /^key/.test(t.originalEvent.type) && this._value(u.value); r = i.item.attr("aria-label") || u.value; r && n.trim(r).length && (this.liveRegion.children().hide(), n("<div>").text(r).appendTo(this.liveRegion)) }, menuselect: function (t, i) { var r = i.item.data("ui-autocomplete-item"), u = this.previous; this.element[0] !== n.ui.safeActiveElement(this.document[0]) && (this.element.trigger("focus"), this.previous = u, this._delay(function () { this.previous = u; this.selectedItem = r })); !1 !== this._trigger("select", t, { item: r }) && this._value(r.value); this.term = this._value(); this.close(t); this.selectedItem = r } }); this.liveRegion = n("<div>", { role: "status", "aria-live": "assertive", "aria-relevant": "additions" }).appendTo(this.document[0].body); this._addClass(this.liveRegion, null, "ui-helper-hidden-accessible"); this._on(this.window, { beforeunload: function () { this.element.removeAttr("autocomplete") } }) }, _destroy: function () { clearTimeout(this.searching); this.element.removeAttr("autocomplete"); this.menu.element.remove(); this.liveRegion.remove() }, _setOption: function (n, t) { this._super(n, t); n === "source" && this._initSource(); n === "appendTo" && this.menu.element.appendTo(this._appendTo()); n === "disabled" && t && this.xhr && this.xhr.abort() }, _isEventTargetInWidget: function (t) { var i = this.menu.element[0]; return t.target === this.element[0] || t.target === i || n.contains(i, t.target) }, _closeOnClickOutside: function (n) { this._isEventTargetInWidget(n) || this.close() }, _appendTo: function () { var t = this.options.appendTo; return t && (t = t.jquery || t.nodeType ? n(t) : this.document.find(t).eq(0)), t && t[0] || (t = this.element.closest(".ui-front, dialog")), t.length || (t = this.document[0].body), t }, _initSource: function () { var i, r, t = this; n.isArray(this.options.source) ? (i = this.options.source, this.source = function (t, r) { r(n.ui.autocomplete.filter(i, t.term)) }) : typeof this.options.source == "string" ? (r = this.options.source, this.source = function (i, u) { t.xhr && t.xhr.abort(); t.xhr = n.ajax({ url: r, data: i, dataType: "json", success: function (n) { u(n) }, error: function () { u([]) } }) }) : this.source = this.options.source }, _searchTimeout: function (n) { clearTimeout(this.searching); this.searching = this._delay(function () { var t = this.term === this._value(), i = this.menu.element.is(":visible"), r = n.altKey || n.ctrlKey || n.metaKey || n.shiftKey; t && (!t || i || r) || (this.selectedItem = null, this.search(null, n)) }, this.options.delay) }, search: function (n, t) { return (n = n != null ? n : this._value(), this.term = this._value(), n.length < this.options.minLength) ? this.close(t) : this._trigger("search", t) === !1 ? void 0 : this._search(n) }, _search: function (n) { this.pending++; this._addClass("ui-autocomplete-loading"); this.cancelSearch = !1; this.source({ term: n }, this._response()) }, _response: function () { var t = ++this.requestIndex; return n.proxy(function (n) { t === this.requestIndex && this.__response(n); this.pending--; this.pending || this._removeClass("ui-autocomplete-loading") }, this) }, __response: function (n) { n && (n = this._normalize(n)); this._trigger("response", null, { content: n }); !this.options.disabled && n && n.length && !this.cancelSearch ? (this._suggest(n), this._trigger("open")) : this._close() }, close: function (n) { this.cancelSearch = !0; this._close(n) }, _close: function (n) { this._off(this.document, "mousedown"); this.menu.element.is(":visible") && (this.menu.element.hide(), this.menu.blur(), this.isNewMenu = !0, this._trigger("close", n)) }, _change: function (n) { this.previous !== this._value() && this._trigger("change", n, { item: this.selectedItem }) }, _normalize: function (t) { return t.length && t[0].label && t[0].value ? t : n.map(t, function (t) { return typeof t == "string" ? { label: t, value: t } : n.extend({}, t, { label: t.label || t.value, value: t.value || t.label }) }) }, _suggest: function (t) { var i = this.menu.element.empty(); this._renderMenu(i, t); this.isNewMenu = !0; this.menu.refresh(); i.show(); this._resizeMenu(); i.position(n.extend({ "of": this.element }, this.options.position)); this.options.autoFocus && this.menu.next(); this._on(this.document, { mousedown: "_closeOnClickOutside" }) }, _resizeMenu: function () { var n = this.menu.element; n.outerWidth(Math.max(n.width("").outerWidth() + 1, this.element.outerWidth())) }, _renderMenu: function (t, i) { var r = this; n.each(i, function (n, i) { r._renderItemData(t, i) }) }, _renderItemData: function (n, t) { return this._renderItem(n, t).data("ui-autocomplete-item", t) }, _renderItem: function (t, i) { return n("<li>").append(n("<div>").text(i.label)).appendTo(t) }, _move: function (n, t) { if (!this.menu.element.is(":visible")) { this.search(null, t); return } if (this.menu.isFirstItem() && /^previous/.test(n) || this.menu.isLastItem() && /^next/.test(n)) { this.isMultiLine || this._value(this.term); this.menu.blur(); return } this.menu[n](t) }, widget: function () { return this.menu.element }, _value: function () { return this.valueMethod.apply(this.element, arguments) }, _keyEvent: function (n, t) { (!this.isMultiLine || this.menu.element.is(":visible")) && (this._move(n, t), t.preventDefault()) }, _isContentEditable: function (n) { if (!n.length) return !1; var t = n.prop("contentEditable"); return t === "inherit" ? this._isContentEditable(n.parent()) : t === "true" } }); n.extend(n.ui.autocomplete, { escapeRegex: function (n) { return n.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&") }, filter: function (t, i) { var r = new RegExp(n.ui.autocomplete.escapeRegex(i), "i"); return n.grep(t, function (n) { return r.test(n.label || n.value || n) }) } }); n.widget("ui.autocomplete", n.ui.autocomplete, { options: { messages: { noResults: "No search results.", results: function (n) { return n + (n > 1 ? " results are" : " result is") + " available, use up and down arrow keys to navigate." } } }, __response: function (t) { var i; (this._superApply(arguments), this.options.disabled || this.cancelSearch) || (i = t && t.length ? this.options.messages.results(t.length) : this.options.messages.noResults, this.liveRegion.children().hide(), n("<div>").text(i).appendTo(this.liveRegion)) } }); si = n.ui.autocomplete;
  393. /*!
  394. * jQuery UI Controlgroup 1.12.1
  395. * http://jqueryui.com
  396. *
  397. * Copyright jQuery Foundation and other contributors
  398. * Released under the MIT license.
  399. * http://jquery.org/license
  400. */
  401. v = /ui-corner-([a-z]){2,6}/g; hi = n.widget("ui.controlgroup", { version: "1.12.1", defaultElement: "<div>", options: { direction: "horizontal", disabled: null, onlyVisible: !0, items: { button: "input[type=button], input[type=submit], input[type=reset], button, a", controlgroupLabel: ".ui-controlgroup-label", checkboxradio: "input[type='checkbox'], input[type='radio']", selectmenu: "select", spinner: ".ui-spinner-input" } }, _create: function () { this._enhance() }, _enhance: function () { this.element.attr("role", "toolbar"); this.refresh() }, _destroy: function () { this._callChildMethod("destroy"); this.childWidgets.removeData("ui-controlgroup-data"); this.element.removeAttr("role"); this.options.items.controlgroupLabel && this.element.find(this.options.items.controlgroupLabel).find(".ui-controlgroup-label-contents").contents().unwrap() }, _initWidgets: function () { var t = this, i = []; n.each(this.options.items, function (r, u) { var f, e = {}; if (u) { if (r === "controlgroupLabel") { f = t.element.find(u); f.each(function () { var t = n(this); t.children(".ui-controlgroup-label-contents").length || t.contents().wrapAll("<span class='ui-controlgroup-label-contents'><\/span>") }); t._addClass(f, null, "ui-widget ui-widget-content ui-state-default"); i = i.concat(f.get()); return } n.fn[r] && (e = t["_" + r + "Options"] ? t["_" + r + "Options"]("middle") : { classes: {} }, t.element.find(u).each(function () { var u = n(this), f = u[r]("instance"), o = n.widget.extend({}, e), s; r === "button" && u.parent(".ui-spinner").length || (f || (f = u[r]()[r]("instance")), f && (o.classes = t._resolveClassesValues(o.classes, f)), u[r](o), s = u[r]("widget"), n.data(s[0], "ui-controlgroup-data", f ? f : u[r]("instance")), i.push(s[0])) })) } }); this.childWidgets = n(n.unique(i)); this._addClass(this.childWidgets, "ui-controlgroup-item") }, _callChildMethod: function (t) { this.childWidgets.each(function () { var r = n(this), i = r.data("ui-controlgroup-data"); i && i[t] && i[t]() }) }, _updateCornerClass: function (n, t) { var i = this._buildSimpleOptions(t, "label").classes.label; this._removeClass(n, null, "ui-corner-top ui-corner-bottom ui-corner-left ui-corner-right ui-corner-all"); this._addClass(n, null, i) }, _buildSimpleOptions: function (n, t) { var i = this.options.direction === "vertical", r = { classes: {} }; return r.classes[t] = { middle: "", first: "ui-corner-" + (i ? "top" : "left"), last: "ui-corner-" + (i ? "bottom" : "right"), only: "ui-corner-all" }[n], r }, _spinnerOptions: function (n) { var t = this._buildSimpleOptions(n, "ui-spinner"); return t.classes["ui-spinner-up"] = "", t.classes["ui-spinner-down"] = "", t }, _buttonOptions: function (n) { return this._buildSimpleOptions(n, "ui-button") }, _checkboxradioOptions: function (n) { return this._buildSimpleOptions(n, "ui-checkboxradio-label") }, _selectmenuOptions: function (n) { var t = this.options.direction === "vertical"; return { width: t ? "auto" : !1, classes: { middle: { "ui-selectmenu-button-open": "", "ui-selectmenu-button-closed": "" }, first: { "ui-selectmenu-button-open": "ui-corner-" + (t ? "top" : "tl"), "ui-selectmenu-button-closed": "ui-corner-" + (t ? "top" : "left") }, last: { "ui-selectmenu-button-open": t ? "" : "ui-corner-tr", "ui-selectmenu-button-closed": "ui-corner-" + (t ? "bottom" : "right") }, only: { "ui-selectmenu-button-open": "ui-corner-top", "ui-selectmenu-button-closed": "ui-corner-all" } }[n] } }, _resolveClassesValues: function (t, i) { var r = {}; return n.each(t, function (u) { var f = i.options.classes[u] || ""; f = n.trim(f.replace(v, "")); r[u] = (f + " " + t[u]).replace(/\s+/g, " ") }), r }, _setOption: function (n, t) { if (n === "direction" && this._removeClass("ui-controlgroup-" + this.options.direction), this._super(n, t), n === "disabled") { this._callChildMethod(t ? "disable" : "enable"); return } this.refresh() }, refresh: function () { var t, i = this; this._addClass("ui-controlgroup ui-controlgroup-" + this.options.direction); this.options.direction === "horizontal" && this._addClass(null, "ui-helper-clearfix"); this._initWidgets(); t = this.childWidgets; this.options.onlyVisible && (t = t.filter(":visible")); t.length && (n.each(["first", "last"], function (n, r) { var u = t[r]().data("ui-controlgroup-data"), f; u && i["_" + u.widgetName + "Options"] ? (f = i["_" + u.widgetName + "Options"](t.length === 1 ? "only" : r), f.classes = i._resolveClassesValues(f.classes, u), u.element[u.widgetName](f)) : i._updateCornerClass(t[r](), r) }), this._callChildMethod("refresh")) } });
  402. /*!
  403. * jQuery UI Checkboxradio 1.12.1
  404. * http://jqueryui.com
  405. *
  406. * Copyright jQuery Foundation and other contributors
  407. * Released under the MIT license.
  408. * http://jquery.org/license
  409. */
  410. n.widget("ui.checkboxradio", [n.ui.formResetMixin, { version: "1.12.1", options: { disabled: null, label: null, icon: !0, classes: { "ui-checkboxradio-label": "ui-corner-all", "ui-checkboxradio-icon": "ui-corner-all" } }, _getCreateOptions: function () { var t, i, u = this, r = this._super() || {}; return this._readType(), i = this.element.labels(), this.label = n(i[i.length - 1]), this.label.length || n.error("No label found for checkboxradio widget"), this.originalLabel = "", this.label.contents().not(this.element[0]).each(function () { u.originalLabel += this.nodeType === 3 ? n(this).text() : this.outerHTML }), this.originalLabel && (r.label = this.originalLabel), t = this.element[0].disabled, t != null && (r.disabled = t), r }, _create: function () { var n = this.element[0].checked; this._bindFormResetHandler(); this.options.disabled == null && (this.options.disabled = this.element[0].disabled); this._setOption("disabled", this.options.disabled); this._addClass("ui-checkboxradio", "ui-helper-hidden-accessible"); this._addClass(this.label, "ui-checkboxradio-label", "ui-button ui-widget"); this.type === "radio" && this._addClass(this.label, "ui-checkboxradio-radio-label"); this.options.label && this.options.label !== this.originalLabel ? this._updateLabel() : this.originalLabel && (this.options.label = this.originalLabel); this._enhance(); n && (this._addClass(this.label, "ui-checkboxradio-checked", "ui-state-active"), this.icon && this._addClass(this.icon, null, "ui-state-hover")); this._on({ change: "_toggleClasses", focus: function () { this._addClass(this.label, null, "ui-state-focus ui-visual-focus") }, blur: function () { this._removeClass(this.label, null, "ui-state-focus ui-visual-focus") } }) }, _readType: function () { var t = this.element[0].nodeName.toLowerCase(); this.type = this.element[0].type; t === "input" && /radio|checkbox/.test(this.type) || n.error("Can't create checkboxradio on element.nodeName=" + t + " and element.type=" + this.type) }, _enhance: function () { this._updateIcon(this.element[0].checked) }, widget: function () { return this.label }, _getRadioGroup: function () { var t, i = this.element[0].name, r = "input[name='" + n.ui.escapeSelector(i) + "']"; return i ? (t = this.form.length ? n(this.form[0].elements).filter(r) : n(r).filter(function () { return n(this).form().length === 0 }), t.not(this.element)) : n([]) }, _toggleClasses: function () { var t = this.element[0].checked; this._toggleClass(this.label, "ui-checkboxradio-checked", "ui-state-active", t); this.options.icon && this.type === "checkbox" && this._toggleClass(this.icon, null, "ui-icon-check ui-state-checked", t)._toggleClass(this.icon, null, "ui-icon-blank", !t); this.type === "radio" && this._getRadioGroup().each(function () { var t = n(this).checkboxradio("instance"); t && t._removeClass(t.label, "ui-checkboxradio-checked", "ui-state-active") }) }, _destroy: function () { this._unbindFormResetHandler(); this.icon && (this.icon.remove(), this.iconSpace.remove()) }, _setOption: function (n, t) { if (n !== "label" || t) { if (this._super(n, t), n === "disabled") { this._toggleClass(this.label, null, "ui-state-disabled", t); this.element[0].disabled = t; return } this.refresh() } }, _updateIcon: function (t) { var i = "ui-icon ui-icon-background "; this.options.icon ? (this.icon || (this.icon = n("<span>"), this.iconSpace = n("<span> <\/span>"), this._addClass(this.iconSpace, "ui-checkboxradio-icon-space")), this.type === "checkbox" ? (i += t ? "ui-icon-check ui-state-checked" : "ui-icon-blank", this._removeClass(this.icon, null, t ? "ui-icon-blank" : "ui-icon-check")) : i += "ui-icon-blank", this._addClass(this.icon, "ui-checkboxradio-icon", i), t || this._removeClass(this.icon, null, "ui-icon-check ui-state-checked"), this.icon.prependTo(this.label).after(this.iconSpace)) : this.icon !== undefined && (this.icon.remove(), this.iconSpace.remove(), delete this.icon) }, _updateLabel: function () { var n = this.label.contents().not(this.element[0]); this.icon && (n = n.not(this.icon[0])); this.iconSpace && (n = n.not(this.iconSpace[0])); n.remove(); this.label.append(this.options.label) }, refresh: function () { var n = this.element[0].checked, t = this.element[0].disabled; this._updateIcon(n); this._toggleClass(this.label, "ui-checkboxradio-checked", "ui-state-active", n); this.options.label !== null && this._updateLabel(); t !== this.options.disabled && this._setOptions({ disabled: t }) } }]); ci = n.ui.checkboxradio;
  411. /*!
  412. * jQuery UI Button 1.12.1
  413. * http://jqueryui.com
  414. *
  415. * Copyright jQuery Foundation and other contributors
  416. * Released under the MIT license.
  417. * http://jquery.org/license
  418. */
  419. n.widget("ui.button", { version: "1.12.1", defaultElement: "<button>", options: { classes: { "ui-button": "ui-corner-all" }, disabled: null, icon: null, iconPosition: "beginning", label: null, showLabel: !0 }, _getCreateOptions: function () { var n, t = this._super() || {}; return this.isInput = this.element.is("input"), n = this.element[0].disabled, n != null && (t.disabled = n), this.originalLabel = this.isInput ? this.element.val() : this.element.html(), this.originalLabel && (t.label = this.originalLabel), t }, _create: function () { !this.option.showLabel & !this.options.icon && (this.options.showLabel = !0); this.options.disabled == null && (this.options.disabled = this.element[0].disabled || !1); this.hasTitle = !!this.element.attr("title"); this.options.label && this.options.label !== this.originalLabel && (this.isInput ? this.element.val(this.options.label) : this.element.html(this.options.label)); this._addClass("ui-button", "ui-widget"); this._setOption("disabled", this.options.disabled); this._enhance(); this.element.is("a") && this._on({ keyup: function (t) { t.keyCode === n.ui.keyCode.SPACE && (t.preventDefault(), this.element[0].click ? this.element[0].click() : this.element.trigger("click")) } }) }, _enhance: function () { this.element.is("button") || this.element.attr("role", "button"); this.options.icon && (this._updateIcon("icon", this.options.icon), this._updateTooltip()) }, _updateTooltip: function () { this.title = this.element.attr("title"); this.options.showLabel || this.title || this.element.attr("title", this.options.label) }, _updateIcon: function (t, i) { var u = t !== "iconPosition", r = u ? this.options.iconPosition : i, f = r === "top" || r === "bottom"; this.icon ? u && this._removeClass(this.icon, null, this.options.icon) : (this.icon = n("<span>"), this._addClass(this.icon, "ui-button-icon", "ui-icon"), this.options.showLabel || this._addClass("ui-button-icon-only")); u && this._addClass(this.icon, null, i); this._attachIcon(r); f ? (this._addClass(this.icon, null, "ui-widget-icon-block"), this.iconSpace && this.iconSpace.remove()) : (this.iconSpace || (this.iconSpace = n("<span> <\/span>"), this._addClass(this.iconSpace, "ui-button-icon-space")), this._removeClass(this.icon, null, "ui-wiget-icon-block"), this._attachIconSpace(r)) }, _destroy: function () { this.element.removeAttr("role"); this.icon && this.icon.remove(); this.iconSpace && this.iconSpace.remove(); this.hasTitle || this.element.removeAttr("title") }, _attachIconSpace: function (n) { this.icon[/^(?:end|bottom)/.test(n) ? "before" : "after"](this.iconSpace) }, _attachIcon: function (n) { this.element[/^(?:end|bottom)/.test(n) ? "append" : "prepend"](this.icon) }, _setOptions: function (n) { var t = n.showLabel === undefined ? this.options.showLabel : n.showLabel, i = n.icon === undefined ? this.options.icon : n.icon; t || i || (n.showLabel = !0); this._super(n) }, _setOption: function (n, t) { n === "icon" && (t ? this._updateIcon(n, t) : this.icon && (this.icon.remove(), this.iconSpace && this.iconSpace.remove())); n === "iconPosition" && this._updateIcon(n, t); n === "showLabel" && (this._toggleClass("ui-button-icon-only", null, !t), this._updateTooltip()); n === "label" && (this.isInput ? this.element.val(t) : (this.element.html(t), this.icon && (this._attachIcon(this.options.iconPosition), this._attachIconSpace(this.options.iconPosition)))); this._super(n, t); n === "disabled" && (this._toggleClass(null, "ui-state-disabled", t), this.element[0].disabled = t, t && this.element.blur()) }, refresh: function () { var n = this.element.is("input, button") ? this.element[0].disabled : this.element.hasClass("ui-button-disabled"); n !== this.options.disabled && this._setOptions({ disabled: n }); this._updateTooltip() } }); n.uiBackCompat !== !1 && (n.widget("ui.button", n.ui.button, { options: { text: !0, icons: { primary: null, secondary: null } }, _create: function () { this.options.showLabel && !this.options.text && (this.options.showLabel = this.options.text); !this.options.showLabel && this.options.text && (this.options.text = this.options.showLabel); !this.options.icon && (this.options.icons.primary || this.options.icons.secondary) ? this.options.icons.primary ? this.options.icon = this.options.icons.primary : (this.options.icon = this.options.icons.secondary, this.options.iconPosition = "end") : this.options.icon && (this.options.icons.primary = this.options.icon); this._super() }, _setOption: function (n, t) { if (n === "text") { this._super("showLabel", t); return } n === "showLabel" && (this.options.text = t); n === "icon" && (this.options.icons.primary = t); n === "icons" && (t.primary ? (this._super("icon", t.primary), this._super("iconPosition", "beginning")) : t.secondary && (this._super("icon", t.secondary), this._super("iconPosition", "end"))); this._superApply(arguments) } }), n.fn.button = function (t) { return function () { return !this.length || this.length && this[0].tagName !== "INPUT" || this.length && this[0].tagName === "INPUT" && this.attr("type") !== "checkbox" && this.attr("type") !== "radio" ? t.apply(this, arguments) : (n.ui.checkboxradio || n.error("Checkboxradio widget missing"), arguments.length === 0) ? this.checkboxradio({ icon: !1 }) : this.checkboxradio.apply(this, arguments) } }(n.fn.button), n.fn.buttonset = function () { return (n.ui.controlgroup || n.error("Controlgroup widget missing"), arguments[0] === "option" && arguments[1] === "items" && arguments[2]) ? this.controlgroup.apply(this, [arguments[0], "items.button", arguments[2]]) : arguments[0] === "option" && arguments[1] === "items" ? this.controlgroup.apply(this, [arguments[0], "items.button"]) : (typeof arguments[0] == "object" && arguments[0].items && (arguments[0].items = { button: arguments[0].items }), this.controlgroup.apply(this, arguments)) }); li = n.ui.button;
  420. /*!
  421. * jQuery UI Datepicker 1.12.1
  422. * http://jqueryui.com
  423. *
  424. * Copyright jQuery Foundation and other contributors
  425. * Released under the MIT license.
  426. * http://jquery.org/license
  427. */
  428. n.extend(n.ui, { datepicker: { version: "1.12.1" } }); n.extend(y.prototype, { markerClassName: "hasDatepicker", maxRows: 4, _widgetDatepicker: function () { return this.dpDiv }, setDefaults: function (n) { return f(this._defaults, n || {}), this }, _attachDatepicker: function (t, i) { var r, f, u; r = t.nodeName.toLowerCase(); f = r === "div" || r === "span"; t.id || (this.uuid += 1, t.id = "dp" + this.uuid); u = this._newInst(n(t), f); u.settings = n.extend({}, i || {}); r === "input" ? this._connectDatepicker(t, u) : f && this._inlineDatepicker(t, u) }, _newInst: function (t, i) { var r = t[0].id.replace(/([^A-Za-z0-9_\-])/g, "\\\\$1"); return { id: r, input: t, selectedDay: 0, selectedMonth: 0, selectedYear: 0, drawMonth: 0, drawYear: 0, inline: i, dpDiv: i ? p(n("<div class='" + this._inlineClass + " ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'><\/div>")) : this.dpDiv } }, _connectDatepicker: function (t, i) { var r = n(t); if (i.append = n([]), i.trigger = n([]), !r.hasClass(this.markerClassName)) { this._attachments(r, i); r.addClass(this.markerClassName).on("keydown", this._doKeyDown).on("keypress", this._doKeyPress).on("keyup", this._doKeyUp); this._autoSize(i); n.data(t, "datepicker", i); i.settings.disabled && this._disableDatepicker(t) } }, _attachments: function (t, i) { var u, r, f, e = this._get(i, "appendText"), o = this._get(i, "isRTL"); if (i.append && i.append.remove(), e && (i.append = n("<span class='" + this._appendClass + "'>" + e + "<\/span>"), t[o ? "before" : "after"](i.append)), t.off("focus", this._showDatepicker), i.trigger && i.trigger.remove(), u = this._get(i, "showOn"), u === "focus" || u === "both") t.on("focus", this._showDatepicker); if (u === "button" || u === "both") { r = this._get(i, "buttonText"); f = this._get(i, "buttonImage"); i.trigger = n(this._get(i, "buttonImageOnly") ? n("<img/>").addClass(this._triggerClass).attr({ src: f, alt: r, title: r }) : n("<button type='button'><\/button>").addClass(this._triggerClass).html(f ? n("<img/>").attr({ src: f, alt: r, title: r }) : r)); t[o ? "before" : "after"](i.trigger); i.trigger.on("click", function () { return n.datepicker._datepickerShowing && n.datepicker._lastInput === t[0] ? n.datepicker._hideDatepicker() : n.datepicker._datepickerShowing && n.datepicker._lastInput !== t[0] ? (n.datepicker._hideDatepicker(), n.datepicker._showDatepicker(t[0])) : n.datepicker._showDatepicker(t[0]), !1 }) } }, _autoSize: function (n) { if (this._get(n, "autoSize") && !n.inline) { var r, u, f, t, i = new Date(2009, 11, 20), e = this._get(n, "dateFormat"); e.match(/[DM]/) && (r = function (n) { for (u = 0, f = 0, t = 0; t < n.length; t++)n[t].length > u && (u = n[t].length, f = t); return f }, i.setMonth(r(this._get(n, e.match(/MM/) ? "monthNames" : "monthNamesShort"))), i.setDate(r(this._get(n, e.match(/DD/) ? "dayNames" : "dayNamesShort")) + 20 - i.getDay())); n.input.attr("size", this._formatDate(n, i).length) } }, _inlineDatepicker: function (t, i) { var r = n(t); r.hasClass(this.markerClassName) || (r.addClass(this.markerClassName).append(i.dpDiv), n.data(t, "datepicker", i), this._setDate(i, this._getDefaultDate(i), !0), this._updateDatepicker(i), this._updateAlternate(i), i.settings.disabled && this._disableDatepicker(t), i.dpDiv.css("display", "block")) }, _dialogDatepicker: function (t, i, r, u, e) { var s, h, c, l, a, o = this._dialogInst; if (!o) { this.uuid += 1; s = "dp" + this.uuid; this._dialogInput = n("<input type='text' id='" + s + "' style='position: absolute; top: -100px; width: 0px;'/>"); this._dialogInput.on("keydown", this._doKeyDown); n("body").append(this._dialogInput); o = this._dialogInst = this._newInst(this._dialogInput, !1); o.settings = {}; n.data(this._dialogInput[0], "datepicker", o) } return f(o.settings, u || {}), i = i && i.constructor === Date ? this._formatDate(o, i) : i, this._dialogInput.val(i), this._pos = e ? e.length ? e : [e.pageX, e.pageY] : null, this._pos || (h = document.documentElement.clientWidth, c = document.documentElement.clientHeight, l = document.documentElement.scrollLeft || document.body.scrollLeft, a = document.documentElement.scrollTop || document.body.scrollTop, this._pos = [h / 2 - 100 + l, c / 2 - 150 + a]), this._dialogInput.css("left", this._pos[0] + 20 + "px").css("top", this._pos[1] + "px"), o.settings.onSelect = r, this._inDialog = !0, this.dpDiv.addClass(this._dialogClass), this._showDatepicker(this._dialogInput[0]), n.blockUI && n.blockUI(this.dpDiv), n.data(this._dialogInput[0], "datepicker", o), this }, _destroyDatepicker: function (i) { var r, u = n(i), f = n.data(i, "datepicker"); u.hasClass(this.markerClassName) && (r = i.nodeName.toLowerCase(), n.removeData(i, "datepicker"), r === "input" ? (f.append.remove(), f.trigger.remove(), u.removeClass(this.markerClassName).off("focus", this._showDatepicker).off("keydown", this._doKeyDown).off("keypress", this._doKeyPress).off("keyup", this._doKeyUp)) : (r === "div" || r === "span") && u.removeClass(this.markerClassName).empty(), t === f && (t = null)) }, _enableDatepicker: function (t) { var i, r, u = n(t), f = n.data(t, "datepicker"); u.hasClass(this.markerClassName) && (i = t.nodeName.toLowerCase(), i === "input" ? (t.disabled = !1, f.trigger.filter("button").each(function () { this.disabled = !1 }).end().filter("img").css({ opacity: "1.0", cursor: "" })) : (i === "div" || i === "span") && (r = u.children("." + this._inlineClass), r.children().removeClass("ui-state-disabled"), r.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled", !1)), this._disabledInputs = n.map(this._disabledInputs, function (n) { return n === t ? null : n })) }, _disableDatepicker: function (t) { var i, r, u = n(t), f = n.data(t, "datepicker"); u.hasClass(this.markerClassName) && (i = t.nodeName.toLowerCase(), i === "input" ? (t.disabled = !0, f.trigger.filter("button").each(function () { this.disabled = !0 }).end().filter("img").css({ opacity: "0.5", cursor: "default" })) : (i === "div" || i === "span") && (r = u.children("." + this._inlineClass), r.children().addClass("ui-state-disabled"), r.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled", !0)), this._disabledInputs = n.map(this._disabledInputs, function (n) { return n === t ? null : n }), this._disabledInputs[this._disabledInputs.length] = t) }, _isDisabledDatepicker: function (n) { if (!n) return !1; for (var t = 0; t < this._disabledInputs.length; t++)if (this._disabledInputs[t] === n) return !0; return !1 }, _getInst: function (t) { try { return n.data(t, "datepicker") } catch (i) { throw "Missing instance data for this datepicker"; } }, _optionDatepicker: function (t, i, r) { var e, h, o, s, u = this._getInst(t); if (arguments.length === 2 && typeof i == "string") return i === "defaults" ? n.extend({}, n.datepicker._defaults) : u ? i === "all" ? n.extend({}, u.settings) : this._get(u, i) : null; e = i || {}; typeof i == "string" && (e = {}, e[i] = r); u && (this._curInst === u && this._hideDatepicker(), h = this._getDateDatepicker(t, !0), o = this._getMinMaxDate(u, "min"), s = this._getMinMaxDate(u, "max"), f(u.settings, e), o !== null && e.dateFormat !== undefined && e.minDate === undefined && (u.settings.minDate = this._formatDate(u, o)), s !== null && e.dateFormat !== undefined && e.maxDate === undefined && (u.settings.maxDate = this._formatDate(u, s)), "disabled" in e && (e.disabled ? this._disableDatepicker(t) : this._enableDatepicker(t)), this._attachments(n(t), u), this._autoSize(u), this._setDate(u, h), this._updateAlternate(u), this._updateDatepicker(u)) }, _changeDatepicker: function (n, t, i) { this._optionDatepicker(n, t, i) }, _refreshDatepicker: function (n) { var t = this._getInst(n); t && this._updateDatepicker(t) }, _setDateDatepicker: function (n, t) { var i = this._getInst(n); i && (this._setDate(i, t), this._updateDatepicker(i), this._updateAlternate(i)) }, _getDateDatepicker: function (n, t) { var i = this._getInst(n); return i && !i.inline && this._setDateFromField(i, t), i ? this._getDate(i) : null }, _doKeyDown: function (t) { var u, e, f, i = n.datepicker._getInst(t.target), r = !0, o = i.dpDiv.is(".ui-datepicker-rtl"); if (i._keyEvent = !0, n.datepicker._datepickerShowing) switch (t.keyCode) { case 9: n.datepicker._hideDatepicker(); r = !1; break; case 13: return f = n("td." + n.datepicker._dayOverClass + ":not(." + n.datepicker._currentClass + ")", i.dpDiv), f[0] && n.datepicker._selectDay(t.target, i.selectedMonth, i.selectedYear, f[0]), u = n.datepicker._get(i, "onSelect"), u ? (e = n.datepicker._formatDate(i), u.apply(i.input ? i.input[0] : null, [e, i])) : n.datepicker._hideDatepicker(), !1; case 27: n.datepicker._hideDatepicker(); break; case 33: n.datepicker._adjustDate(t.target, t.ctrlKey ? -n.datepicker._get(i, "stepBigMonths") : -n.datepicker._get(i, "stepMonths"), "M"); break; case 34: n.datepicker._adjustDate(t.target, t.ctrlKey ? +n.datepicker._get(i, "stepBigMonths") : +n.datepicker._get(i, "stepMonths"), "M"); break; case 35: (t.ctrlKey || t.metaKey) && n.datepicker._clearDate(t.target); r = t.ctrlKey || t.metaKey; break; case 36: (t.ctrlKey || t.metaKey) && n.datepicker._gotoToday(t.target); r = t.ctrlKey || t.metaKey; break; case 37: (t.ctrlKey || t.metaKey) && n.datepicker._adjustDate(t.target, o ? 1 : -1, "D"); r = t.ctrlKey || t.metaKey; t.originalEvent.altKey && n.datepicker._adjustDate(t.target, t.ctrlKey ? -n.datepicker._get(i, "stepBigMonths") : -n.datepicker._get(i, "stepMonths"), "M"); break; case 38: (t.ctrlKey || t.metaKey) && n.datepicker._adjustDate(t.target, -7, "D"); r = t.ctrlKey || t.metaKey; break; case 39: (t.ctrlKey || t.metaKey) && n.datepicker._adjustDate(t.target, o ? -1 : 1, "D"); r = t.ctrlKey || t.metaKey; t.originalEvent.altKey && n.datepicker._adjustDate(t.target, t.ctrlKey ? +n.datepicker._get(i, "stepBigMonths") : +n.datepicker._get(i, "stepMonths"), "M"); break; case 40: (t.ctrlKey || t.metaKey) && n.datepicker._adjustDate(t.target, 7, "D"); r = t.ctrlKey || t.metaKey; break; default: r = !1 } else t.keyCode === 36 && t.ctrlKey ? n.datepicker._showDatepicker(this) : r = !1; r && (t.preventDefault(), t.stopPropagation()) }, _doKeyPress: function (t) { var i, r, u = n.datepicker._getInst(t.target); if (n.datepicker._get(u, "constrainInput")) return i = n.datepicker._possibleChars(n.datepicker._get(u, "dateFormat")), r = String.fromCharCode(t.charCode == null ? t.keyCode : t.charCode), t.ctrlKey || t.metaKey || r < " " || !i || i.indexOf(r) > -1 }, _doKeyUp: function (t) { var r, i = n.datepicker._getInst(t.target); if (i.input.val() !== i.lastVal) try { r = n.datepicker.parseDate(n.datepicker._get(i, "dateFormat"), i.input ? i.input.val() : null, n.datepicker._getFormatConfig(i)); r && (n.datepicker._setDateFromField(i), n.datepicker._updateAlternate(i), n.datepicker._updateDatepicker(i)) } catch (u) { } return !0 }, _showDatepicker: function (t) { if (t = t.target || t, t.nodeName.toLowerCase() !== "input" && (t = n("input", t.parentNode)[0]), !n.datepicker._isDisabledDatepicker(t) && n.datepicker._lastInput !== t) { var i, o, s, r, u, e, h; (i = n.datepicker._getInst(t), n.datepicker._curInst && n.datepicker._curInst !== i && (n.datepicker._curInst.dpDiv.stop(!0, !0), i && n.datepicker._datepickerShowing && n.datepicker._hideDatepicker(n.datepicker._curInst.input[0])), o = n.datepicker._get(i, "beforeShow"), s = o ? o.apply(t, [t, i]) : {}, s !== !1) && (f(i.settings, s), i.lastVal = null, n.datepicker._lastInput = t, n.datepicker._setDateFromField(i), n.datepicker._inDialog && (t.value = ""), n.datepicker._pos || (n.datepicker._pos = n.datepicker._findPos(t), n.datepicker._pos[1] += t.offsetHeight), r = !1, n(t).parents().each(function () { return r |= n(this).css("position") === "fixed", !r }), u = { left: n.datepicker._pos[0], top: n.datepicker._pos[1] }, n.datepicker._pos = null, i.dpDiv.empty(), i.dpDiv.css({ position: "absolute", display: "block", top: "-1000px" }), n.datepicker._updateDatepicker(i), u = n.datepicker._checkOffset(i, u, r), i.dpDiv.css({ position: n.datepicker._inDialog && n.blockUI ? "static" : r ? "fixed" : "absolute", display: "none", left: u.left + "px", top: u.top + "px" }), i.inline || (e = n.datepicker._get(i, "showAnim"), h = n.datepicker._get(i, "duration"), i.dpDiv.css("z-index", ai(n(t)) + 1), n.datepicker._datepickerShowing = !0, n.effects && n.effects.effect[e] ? i.dpDiv.show(e, n.datepicker._get(i, "showOptions"), h) : i.dpDiv[e || "show"](e ? h : null), n.datepicker._shouldFocusInput(i) && i.input.trigger("focus"), n.datepicker._curInst = i)) } }, _updateDatepicker: function (i) { this.maxRows = 4; t = i; i.dpDiv.empty().append(this._generateHTML(i)); this._attachHandlers(i); var r, u = this._getNumberOfMonths(i), f = u[1], e = i.dpDiv.find("." + this._dayOverClass + " a"); e.length > 0 && w.apply(e.get(0)); i.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""); f > 1 && i.dpDiv.addClass("ui-datepicker-multi-" + f).css("width", 17 * f + "em"); i.dpDiv[(u[0] !== 1 || u[1] !== 1 ? "add" : "remove") + "Class"]("ui-datepicker-multi"); i.dpDiv[(this._get(i, "isRTL") ? "add" : "remove") + "Class"]("ui-datepicker-rtl"); i === n.datepicker._curInst && n.datepicker._datepickerShowing && n.datepicker._shouldFocusInput(i) && i.input.trigger("focus"); i.yearshtml && (r = i.yearshtml, setTimeout(function () { r === i.yearshtml && i.yearshtml && i.dpDiv.find("select.ui-datepicker-year:first").replaceWith(i.yearshtml); r = i.yearshtml = null }, 0)) }, _shouldFocusInput: function (n) { return n.input && n.input.is(":visible") && !n.input.is(":disabled") && !n.input.is(":focus") }, _checkOffset: function (t, i, r) { var u = t.dpDiv.outerWidth(), f = t.dpDiv.outerHeight(), h = t.input ? t.input.outerWidth() : 0, o = t.input ? t.input.outerHeight() : 0, e = document.documentElement.clientWidth + (r ? 0 : n(document).scrollLeft()), s = document.documentElement.clientHeight + (r ? 0 : n(document).scrollTop()); return i.left -= this._get(t, "isRTL") ? u - h : 0, i.left -= r && i.left === t.input.offset().left ? n(document).scrollLeft() : 0, i.top -= r && i.top === t.input.offset().top + o ? n(document).scrollTop() : 0, i.left -= Math.min(i.left, i.left + u > e && e > u ? Math.abs(i.left + u - e) : 0), i.top -= Math.min(i.top, i.top + f > s && s > f ? Math.abs(f + o) : 0), i }, _findPos: function (t) { for (var i, r = this._getInst(t), u = this._get(r, "isRTL"); t && (t.type === "hidden" || t.nodeType !== 1 || n.expr.filters.hidden(t));)t = t[u ? "previousSibling" : "nextSibling"]; return i = n(t).offset(), [i.left, i.top] }, _hideDatepicker: function (t) { var r, f, u, e, i = this._curInst; i && (!t || i === n.data(t, "datepicker")) && this._datepickerShowing && (r = this._get(i, "showAnim"), f = this._get(i, "duration"), u = function () { n.datepicker._tidyDialog(i) }, n.effects && (n.effects.effect[r] || n.effects[r]) ? i.dpDiv.hide(r, n.datepicker._get(i, "showOptions"), f, u) : i.dpDiv[r === "slideDown" ? "slideUp" : r === "fadeIn" ? "fadeOut" : "hide"](r ? f : null, u), r || u(), this._datepickerShowing = !1, e = this._get(i, "onClose"), e && e.apply(i.input ? i.input[0] : null, [i.input ? i.input.val() : "", i]), this._lastInput = null, this._inDialog && (this._dialogInput.css({ position: "absolute", left: "0", top: "-100px" }), n.blockUI && (n.unblockUI(), n("body").append(this.dpDiv))), this._inDialog = !1) }, _tidyDialog: function (n) { n.dpDiv.removeClass(this._dialogClass).off(".ui-datepicker-calendar") }, _checkExternalClick: function (t) { if (n.datepicker._curInst) { var i = n(t.target), r = n.datepicker._getInst(i[0]); (i[0].id === n.datepicker._mainDivId || i.parents("#" + n.datepicker._mainDivId).length !== 0 || i.hasClass(n.datepicker.markerClassName) || i.closest("." + n.datepicker._triggerClass).length || !n.datepicker._datepickerShowing || n.datepicker._inDialog && n.blockUI) && (!i.hasClass(n.datepicker.markerClassName) || n.datepicker._curInst === r) || n.datepicker._hideDatepicker() } }, _adjustDate: function (t, i, r) { var f = n(t), u = this._getInst(f[0]); this._isDisabledDatepicker(f[0]) || (this._adjustInstDate(u, i + (r === "M" ? this._get(u, "showCurrentAtPos") : 0), r), this._updateDatepicker(u)) }, _gotoToday: function (t) { var r, u = n(t), i = this._getInst(u[0]); this._get(i, "gotoCurrent") && i.currentDay ? (i.selectedDay = i.currentDay, i.drawMonth = i.selectedMonth = i.currentMonth, i.drawYear = i.selectedYear = i.currentYear) : (r = new Date, i.selectedDay = r.getDate(), i.drawMonth = i.selectedMonth = r.getMonth(), i.drawYear = i.selectedYear = r.getFullYear()); this._notifyChange(i); this._adjustDate(u) }, _selectMonthYear: function (t, i, r) { var f = n(t), u = this._getInst(f[0]); u["selected" + (r === "M" ? "Month" : "Year")] = u["draw" + (r === "M" ? "Month" : "Year")] = parseInt(i.options[i.selectedIndex].value, 10); this._notifyChange(u); this._adjustDate(f) }, _selectDay: function (t, i, r, u) { var f, e = n(t); n(u).hasClass(this._unselectableClass) || this._isDisabledDatepicker(e[0]) || (f = this._getInst(e[0]), f.selectedDay = f.currentDay = n("a", u).html(), f.selectedMonth = f.currentMonth = i, f.selectedYear = f.currentYear = r, this._selectDate(t, this._formatDate(f, f.currentDay, f.currentMonth, f.currentYear))) }, _clearDate: function (t) { var i = n(t); this._selectDate(i, "") }, _selectDate: function (t, i) { var u, f = n(t), r = this._getInst(f[0]); i = i != null ? i : this._formatDate(r); r.input && r.input.val(i); this._updateAlternate(r); u = this._get(r, "onSelect"); u ? u.apply(r.input ? r.input[0] : null, [i, r]) : r.input && r.input.trigger("change"); r.inline ? this._updateDatepicker(r) : (this._hideDatepicker(), this._lastInput = r.input[0], typeof r.input[0] != "object" && r.input.trigger("focus"), this._lastInput = null) }, _updateAlternate: function (t) { var i, r, u, f = this._get(t, "altField"); f && (i = this._get(t, "altFormat") || this._get(t, "dateFormat"), r = this._getDate(t), u = this.formatDate(i, r, this._getFormatConfig(t)), n(f).val(u)) }, noWeekends: function (n) { var t = n.getDay(); return [t > 0 && t < 6, ""] }, iso8601Week: function (n) { var i, t = new Date(n.getTime()); return t.setDate(t.getDate() + 4 - (t.getDay() || 7)), i = t.getTime(), t.setMonth(0), t.setDate(1), Math.floor(Math.round((i - t) / 864e5) / 7) + 1 }, parseDate: function (t, i, r) { if (t == null || i == null) throw "Invalid arguments"; if (i = typeof i == "object" ? i.toString() : i + "", i === "") return null; for (var a, v, f = 0, y = (r ? r.shortYearCutoff : null) || this._defaults.shortYearCutoff, d = typeof y != "string" ? y : (new Date).getFullYear() % 100 + parseInt(y, 10), g = (r ? r.dayNamesShort : null) || this._defaults.dayNamesShort, nt = (r ? r.dayNames : null) || this._defaults.dayNames, tt = (r ? r.monthNamesShort : null) || this._defaults.monthNamesShort, it = (r ? r.monthNames : null) || this._defaults.monthNames, e = -1, s = -1, h = -1, p = -1, w = !1, u, l = function (n) { var i = o + 1 < t.length && t.charAt(o + 1) === n; return i && o++, i }, c = function (n) { var u = l(n), r = n === "@" ? 14 : n === "!" ? 20 : n === "y" && u ? 4 : n === "o" ? 3 : 2, e = n === "y" ? r : 1, o = new RegExp("^\\d{" + e + "," + r + "}"), t = i.substring(f).match(o); if (!t) throw "Missing number at position " + f; return f += t[0].length, parseInt(t[0], 10) }, k = function (t, r, u) { var e = -1, o = n.map(l(t) ? u : r, function (n, t) { return [[t, n]] }).sort(function (n, t) { return -(n[1].length - t[1].length) }); if (n.each(o, function (n, t) { var r = t[1]; if (i.substr(f, r.length).toLowerCase() === r.toLowerCase()) return e = t[0], f += r.length, !1 }), e !== -1) return e + 1; throw "Unknown name at position " + f; }, b = function () { if (i.charAt(f) !== t.charAt(o)) throw "Unexpected literal at position " + f; f++ }, o = 0; o < t.length; o++)if (w) t.charAt(o) !== "'" || l("'") ? b() : w = !1; else switch (t.charAt(o)) { case "d": h = c("d"); break; case "D": k("D", g, nt); break; case "o": p = c("o"); break; case "m": s = c("m"); break; case "M": s = k("M", tt, it); break; case "y": e = c("y"); break; case "@": u = new Date(c("@")); e = u.getFullYear(); s = u.getMonth() + 1; h = u.getDate(); break; case "!": u = new Date((c("!") - this._ticksTo1970) / 1e4); e = u.getFullYear(); s = u.getMonth() + 1; h = u.getDate(); break; case "'": l("'") ? b() : w = !0; break; default: b() }if (f < i.length && (v = i.substr(f), !/^\s+/.test(v))) throw "Extra/unparsed characters found in date: " + v; if (e === -1 ? e = (new Date).getFullYear() : e < 100 && (e += (new Date).getFullYear() - (new Date).getFullYear() % 100 + (e <= d ? 0 : -100)), p > -1) { s = 1; h = p; do { if (a = this._getDaysInMonth(e, s - 1), h <= a) break; s++; h -= a } while (1) } if (u = this._daylightSavingAdjust(new Date(e, s - 1, h)), u.getFullYear() !== e || u.getMonth() + 1 !== s || u.getDate() !== h) throw "Invalid date"; return u }, ATOM: "yy-mm-dd", COOKIE: "D, dd M yy", ISO_8601: "yy-mm-dd", RFC_822: "D, d M y", RFC_850: "DD, dd-M-y", RFC_1036: "D, d M y", RFC_1123: "D, d M yy", RFC_2822: "D, d M yy", RSS: "D, d M y", TICKS: "!", TIMESTAMP: "@", W3C: "yy-mm-dd", _ticksTo1970: (718685 + Math.floor(1970 / 4) - Math.floor(1970 / 100) + Math.floor(1970 / 400)) * 864e9, formatDate: function (n, t, i) { if (!t) return ""; var u, h = (i ? i.dayNamesShort : null) || this._defaults.dayNamesShort, c = (i ? i.dayNames : null) || this._defaults.dayNames, l = (i ? i.monthNamesShort : null) || this._defaults.monthNamesShort, a = (i ? i.monthNames : null) || this._defaults.monthNames, f = function (t) { var i = u + 1 < n.length && n.charAt(u + 1) === t; return i && u++, i }, e = function (n, t, i) { var r = "" + t; if (f(n)) while (r.length < i) r = "0" + r; return r }, s = function (n, t, i, r) { return f(n) ? r[t] : i[t] }, r = "", o = !1; if (t) for (u = 0; u < n.length; u++)if (o) n.charAt(u) !== "'" || f("'") ? r += n.charAt(u) : o = !1; else switch (n.charAt(u)) { case "d": r += e("d", t.getDate(), 2); break; case "D": r += s("D", t.getDay(), h, c); break; case "o": r += e("o", Math.round((new Date(t.getFullYear(), t.getMonth(), t.getDate()).getTime() - new Date(t.getFullYear(), 0, 0).getTime()) / 864e5), 3); break; case "m": r += e("m", t.getMonth() + 1, 2); break; case "M": r += s("M", t.getMonth(), l, a); break; case "y": r += f("y") ? t.getFullYear() : (t.getFullYear() % 100 < 10 ? "0" : "") + t.getFullYear() % 100; break; case "@": r += t.getTime(); break; case "!": r += t.getTime() * 1e4 + this._ticksTo1970; break; case "'": f("'") ? r += "'" : o = !0; break; default: r += n.charAt(u) }return r }, _possibleChars: function (n) { for (var i = "", r = !1, u = function (i) { var r = t + 1 < n.length && n.charAt(t + 1) === i; return r && t++, r }, t = 0; t < n.length; t++)if (r) n.charAt(t) !== "'" || u("'") ? i += n.charAt(t) : r = !1; else switch (n.charAt(t)) { case "d": case "m": case "y": case "@": i += "0123456789"; break; case "D": case "M": return null; case "'": u("'") ? i += "'" : r = !0; break; default: i += n.charAt(t) }return i }, _get: function (n, t) { return n.settings[t] !== undefined ? n.settings[t] : this._defaults[t] }, _setDateFromField: function (n, t) { if (n.input.val() !== n.lastVal) { var f = this._get(n, "dateFormat"), r = n.lastVal = n.input ? n.input.val() : null, u = this._getDefaultDate(n), i = u, e = this._getFormatConfig(n); try { i = this.parseDate(f, r, e) || u } catch (o) { r = t ? "" : r } n.selectedDay = i.getDate(); n.drawMonth = n.selectedMonth = i.getMonth(); n.drawYear = n.selectedYear = i.getFullYear(); n.currentDay = r ? i.getDate() : 0; n.currentMonth = r ? i.getMonth() : 0; n.currentYear = r ? i.getFullYear() : 0; this._adjustInstDate(n) } }, _getDefaultDate: function (n) { return this._restrictMinMax(n, this._determineDate(n, this._get(n, "defaultDate"), new Date)) }, _determineDate: function (t, i, r) { var f = function (n) { var t = new Date; return t.setDate(t.getDate() + n), t }, e = function (i) { try { return n.datepicker.parseDate(n.datepicker._get(t, "dateFormat"), i, n.datepicker._getFormatConfig(t)) } catch (h) { } for (var o = (i.toLowerCase().match(/^c/) ? n.datepicker._getDate(t) : null) || new Date, f = o.getFullYear(), e = o.getMonth(), r = o.getDate(), s = /([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g, u = s.exec(i); u;) { switch (u[2] || "d") { case "d": case "D": r += parseInt(u[1], 10); break; case "w": case "W": r += parseInt(u[1], 10) * 7; break; case "m": case "M": e += parseInt(u[1], 10); r = Math.min(r, n.datepicker._getDaysInMonth(f, e)); break; case "y": case "Y": f += parseInt(u[1], 10); r = Math.min(r, n.datepicker._getDaysInMonth(f, e)) }u = s.exec(i) } return new Date(f, e, r) }, u = i == null || i === "" ? r : typeof i == "string" ? e(i) : typeof i == "number" ? isNaN(i) ? r : f(i) : new Date(i.getTime()); return u = u && u.toString() === "Invalid Date" ? r : u, u && (u.setHours(0), u.setMinutes(0), u.setSeconds(0), u.setMilliseconds(0)), this._daylightSavingAdjust(u) }, _daylightSavingAdjust: function (n) { return n ? (n.setHours(n.getHours() > 12 ? n.getHours() + 2 : 0), n) : null }, _setDate: function (n, t, i) { var u = !t, f = n.selectedMonth, e = n.selectedYear, r = this._restrictMinMax(n, this._determineDate(n, t, new Date)); n.selectedDay = n.currentDay = r.getDate(); n.drawMonth = n.selectedMonth = n.currentMonth = r.getMonth(); n.drawYear = n.selectedYear = n.currentYear = r.getFullYear(); f === n.selectedMonth && e === n.selectedYear || i || this._notifyChange(n); this._adjustInstDate(n); n.input && n.input.val(u ? "" : this._formatDate(n)) }, _getDate: function (n) { return !n.currentYear || n.input && n.input.val() === "" ? null : this._daylightSavingAdjust(new Date(n.currentYear, n.currentMonth, n.currentDay)) }, _attachHandlers: function (t) { var r = this._get(t, "stepMonths"), i = "#" + t.id.replace(/\\\\/g, "\\"); t.dpDiv.find("[data-handler]").map(function () { var t = { prev: function () { n.datepicker._adjustDate(i, -r, "M") }, next: function () { n.datepicker._adjustDate(i, +r, "M") }, hide: function () { n.datepicker._hideDatepicker() }, today: function () { n.datepicker._gotoToday(i) }, selectDay: function () { return n.datepicker._selectDay(i, +this.getAttribute("data-month"), +this.getAttribute("data-year"), this), !1 }, selectMonth: function () { return n.datepicker._selectMonthYear(i, this, "M"), !1 }, selectYear: function () { return n.datepicker._selectMonthYear(i, this, "Y"), !1 } }; n(this).on(this.getAttribute("data-event"), t[this.getAttribute("data-handler")]) }) }, _generateHTML: function (n) { var b, s, rt, h, ut, k, ft, et, ri, c, ot, ui, fi, ei, oi, st, g, si, ht, nt, o, y, ct, p, lt, l, u, at, vt, yt, pt, tt, wt, i, bt, kt, d, a, it, dt = new Date, gt = this._daylightSavingAdjust(new Date(dt.getFullYear(), dt.getMonth(), dt.getDate())), f = this._get(n, "isRTL"), li = this._get(n, "showButtonPanel"), hi = this._get(n, "hideIfNoPrevNext"), ni = this._get(n, "navigationAsDateFormat"), e = this._getNumberOfMonths(n), ai = this._get(n, "showCurrentAtPos"), ci = this._get(n, "stepMonths"), ti = e[0] !== 1 || e[1] !== 1, ii = this._daylightSavingAdjust(n.currentDay ? new Date(n.currentYear, n.currentMonth, n.currentDay) : new Date(9999, 9, 9)), w = this._getMinMaxDate(n, "min"), v = this._getMinMaxDate(n, "max"), t = n.drawMonth - ai, r = n.drawYear; if (t < 0 && (t += 12, r--), v) for (b = this._daylightSavingAdjust(new Date(v.getFullYear(), v.getMonth() - e[0] * e[1] + 1, v.getDate())), b = w && b < w ? w : b; this._daylightSavingAdjust(new Date(r, t, 1)) > b;)t--, t < 0 && (t = 11, r--); for (n.drawMonth = t, n.drawYear = r, s = this._get(n, "prevText"), s = ni ? this.formatDate(s, this._daylightSavingAdjust(new Date(r, t - ci, 1)), this._getFormatConfig(n)) : s, rt = this._canAdjustMonth(n, -1, r, t) ? "<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click' title='" + s + "'><span class='ui-icon ui-icon-circle-triangle-" + (f ? "e" : "w") + "'>" + s + "<\/span><\/a>" : hi ? "" : "<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='" + s + "'><span class='ui-icon ui-icon-circle-triangle-" + (f ? "e" : "w") + "'>" + s + "<\/span><\/a>", h = this._get(n, "nextText"), h = ni ? this.formatDate(h, this._daylightSavingAdjust(new Date(r, t + ci, 1)), this._getFormatConfig(n)) : h, ut = this._canAdjustMonth(n, 1, r, t) ? "<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click' title='" + h + "'><span class='ui-icon ui-icon-circle-triangle-" + (f ? "w" : "e") + "'>" + h + "<\/span><\/a>" : hi ? "" : "<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='" + h + "'><span class='ui-icon ui-icon-circle-triangle-" + (f ? "w" : "e") + "'>" + h + "<\/span><\/a>", k = this._get(n, "currentText"), ft = this._get(n, "gotoCurrent") && n.currentDay ? ii : gt, k = ni ? this.formatDate(k, ft, this._getFormatConfig(n)) : k, et = n.inline ? "" : "<button type='button' class='ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all' data-handler='hide' data-event='click'>" + this._get(n, "closeText") + "<\/button>", ri = li ? "<div class='ui-datepicker-buttonpane ui-widget-content'>" + (f ? et : "") + (this._isInRange(n, ft) ? "<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'>" + k + "<\/button>" : "") + (f ? "" : et) + "<\/div>" : "", c = parseInt(this._get(n, "firstDay"), 10), c = isNaN(c) ? 0 : c, ot = this._get(n, "showWeek"), ui = this._get(n, "dayNames"), fi = this._get(n, "dayNamesMin"), ei = this._get(n, "monthNames"), oi = this._get(n, "monthNamesShort"), st = this._get(n, "beforeShowDay"), g = this._get(n, "showOtherMonths"), si = this._get(n, "selectOtherMonths"), ht = this._getDefaultDate(n), nt = "", y = 0; y < e[0]; y++) { for (ct = "", this.maxRows = 4, p = 0; p < e[1]; p++) { if (lt = this._daylightSavingAdjust(new Date(r, t, n.selectedDay)), l = " ui-corner-all", u = "", ti) { if (u += "<div class='ui-datepicker-group", e[1] > 1) switch (p) { case 0: u += " ui-datepicker-group-first"; l = " ui-corner-" + (f ? "right" : "left"); break; case e[1] - 1: u += " ui-datepicker-group-last"; l = " ui-corner-" + (f ? "left" : "right"); break; default: u += " ui-datepicker-group-middle"; l = "" }u += "'>" } for (u += "<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix" + l + "'>" + (/all|left/.test(l) && y === 0 ? f ? ut : rt : "") + (/all|right/.test(l) && y === 0 ? f ? rt : ut : "") + this._generateMonthYearHeader(n, t, r, w, v, y > 0 || p > 0, ei, oi) + "<\/div><table class='ui-datepicker-calendar'><thead><tr>", at = ot ? "<th class='ui-datepicker-week-col'>" + this._get(n, "weekHeader") + "<\/th>" : "", o = 0; o < 7; o++)vt = (o + c) % 7, at += "<th scope='col'" + ((o + c + 6) % 7 >= 5 ? " class='ui-datepicker-week-end'" : "") + "><span title='" + ui[vt] + "'>" + fi[vt] + "<\/span><\/th>"; for (u += at + "<\/tr><\/thead><tbody>", yt = this._getDaysInMonth(r, t), r === n.selectedYear && t === n.selectedMonth && (n.selectedDay = Math.min(n.selectedDay, yt)), pt = (this._getFirstDayOfMonth(r, t) - c + 7) % 7, tt = Math.ceil((pt + yt) / 7), wt = ti ? this.maxRows > tt ? this.maxRows : tt : tt, this.maxRows = wt, i = this._daylightSavingAdjust(new Date(r, t, 1 - pt)), bt = 0; bt < wt; bt++) { for (u += "<tr>", kt = ot ? "<td class='ui-datepicker-week-col'>" + this._get(n, "calculateWeek")(i) + "<\/td>" : "", o = 0; o < 7; o++)d = st ? st.apply(n.input ? n.input[0] : null, [i]) : [!0, ""], a = i.getMonth() !== t, it = a && !si || !d[0] || w && i < w || v && i > v, kt += "<td class='" + ((o + c + 6) % 7 >= 5 ? " ui-datepicker-week-end" : "") + (a ? " ui-datepicker-other-month" : "") + (i.getTime() === lt.getTime() && t === n.selectedMonth && n._keyEvent || ht.getTime() === i.getTime() && ht.getTime() === lt.getTime() ? " " + this._dayOverClass : "") + (it ? " " + this._unselectableClass + " ui-state-disabled" : "") + (a && !g ? "" : " " + d[1] + (i.getTime() === ii.getTime() ? " " + this._currentClass : "") + (i.getTime() === gt.getTime() ? " ui-datepicker-today" : "")) + "'" + ((!a || g) && d[2] ? " title='" + d[2].replace(/'/g, "&#39;") + "'" : "") + (it ? "" : " data-handler='selectDay' data-event='click' data-month='" + i.getMonth() + "' data-year='" + i.getFullYear() + "'") + ">" + (a && !g ? "&#xa0;" : it ? "<span class='ui-state-default'>" + i.getDate() + "<\/span>" : "<a class='ui-state-default" + (i.getTime() === gt.getTime() ? " ui-state-highlight" : "") + (i.getTime() === ii.getTime() ? " ui-state-active" : "") + (a ? " ui-priority-secondary" : "") + "' href='#'>" + i.getDate() + "<\/a>") + "<\/td>", i.setDate(i.getDate() + 1), i = this._daylightSavingAdjust(i); u += kt + "<\/tr>" } t++; t > 11 && (t = 0, r++); u += "<\/tbody><\/table>" + (ti ? "<\/div>" + (e[0] > 0 && p === e[1] - 1 ? "<div class='ui-datepicker-row-break'><\/div>" : "") : ""); ct += u } nt += ct } return nt += ri, n._keyEvent = !1, nt }, _generateMonthYearHeader: function (n, t, i, r, u, f, e, o) { var k, d, h, v, y, p, s, a, w = this._get(n, "changeMonth"), b = this._get(n, "changeYear"), g = this._get(n, "showMonthAfterYear"), c = "<div class='ui-datepicker-title'>", l = ""; if (f || !w) l += "<span class='ui-datepicker-month'>" + e[t] + "<\/span>"; else { for (k = r && r.getFullYear() === i, d = u && u.getFullYear() === i, l += "<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>", h = 0; h < 12; h++)(!k || h >= r.getMonth()) && (!d || h <= u.getMonth()) && (l += "<option value='" + h + "'" + (h === t ? " selected='selected'" : "") + ">" + o[h] + "<\/option>"); l += "<\/select>" } if (g || (c += l + (f || !(w && b) ? "&#xa0;" : "")), !n.yearshtml) if (n.yearshtml = "", f || !b) c += "<span class='ui-datepicker-year'>" + i + "<\/span>"; else { for (v = this._get(n, "yearRange").split(":"), y = (new Date).getFullYear(), p = function (n) { var t = n.match(/c[+\-].*/) ? i + parseInt(n.substring(1), 10) : n.match(/[+\-].*/) ? y + parseInt(n, 10) : parseInt(n, 10); return isNaN(t) ? y : t }, s = p(v[0]), a = Math.max(s, p(v[1] || "")), s = r ? Math.max(s, r.getFullYear()) : s, a = u ? Math.min(a, u.getFullYear()) : a, n.yearshtml += "<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>"; s <= a; s++)n.yearshtml += "<option value='" + s + "'" + (s === i ? " selected='selected'" : "") + ">" + s + "<\/option>"; n.yearshtml += "<\/select>"; c += n.yearshtml; n.yearshtml = null } return c += this._get(n, "yearSuffix"), g && (c += (f || !(w && b) ? "&#xa0;" : "") + l), c + "<\/div>" }, _adjustInstDate: function (n, t, i) { var u = n.selectedYear + (i === "Y" ? t : 0), f = n.selectedMonth + (i === "M" ? t : 0), e = Math.min(n.selectedDay, this._getDaysInMonth(u, f)) + (i === "D" ? t : 0), r = this._restrictMinMax(n, this._daylightSavingAdjust(new Date(u, f, e))); n.selectedDay = r.getDate(); n.drawMonth = n.selectedMonth = r.getMonth(); n.drawYear = n.selectedYear = r.getFullYear(); (i === "M" || i === "Y") && this._notifyChange(n) }, _restrictMinMax: function (n, t) { var i = this._getMinMaxDate(n, "min"), r = this._getMinMaxDate(n, "max"), u = i && t < i ? i : t; return r && u > r ? r : u }, _notifyChange: function (n) { var t = this._get(n, "onChangeMonthYear"); t && t.apply(n.input ? n.input[0] : null, [n.selectedYear, n.selectedMonth + 1, n]) }, _getNumberOfMonths: function (n) { var t = this._get(n, "numberOfMonths"); return t == null ? [1, 1] : typeof t == "number" ? [1, t] : t }, _getMinMaxDate: function (n, t) { return this._determineDate(n, this._get(n, t + "Date"), null) }, _getDaysInMonth: function (n, t) { return 32 - this._daylightSavingAdjust(new Date(n, t, 32)).getDate() }, _getFirstDayOfMonth: function (n, t) { return new Date(n, t, 1).getDay() }, _canAdjustMonth: function (n, t, i, r) { var f = this._getNumberOfMonths(n), u = this._daylightSavingAdjust(new Date(i, r + (t < 0 ? t : f[0] * f[1]), 1)); return t < 0 && u.setDate(this._getDaysInMonth(u.getFullYear(), u.getMonth())), this._isInRange(n, u) }, _isInRange: function (n, t) { var i, f, e = this._getMinMaxDate(n, "min"), o = this._getMinMaxDate(n, "max"), r = null, u = null, s = this._get(n, "yearRange"); return s && (i = s.split(":"), f = (new Date).getFullYear(), r = parseInt(i[0], 10), u = parseInt(i[1], 10), i[0].match(/[+\-].*/) && (r += f), i[1].match(/[+\-].*/) && (u += f)), (!e || t.getTime() >= e.getTime()) && (!o || t.getTime() <= o.getTime()) && (!r || t.getFullYear() >= r) && (!u || t.getFullYear() <= u) }, _getFormatConfig: function (n) { var t = this._get(n, "shortYearCutoff"); return t = typeof t != "string" ? t : (new Date).getFullYear() % 100 + parseInt(t, 10), { shortYearCutoff: t, dayNamesShort: this._get(n, "dayNamesShort"), dayNames: this._get(n, "dayNames"), monthNamesShort: this._get(n, "monthNamesShort"), monthNames: this._get(n, "monthNames") } }, _formatDate: function (n, t, i, r) { t || (n.currentDay = n.selectedDay, n.currentMonth = n.selectedMonth, n.currentYear = n.selectedYear); var u = t ? typeof t == "object" ? t : this._daylightSavingAdjust(new Date(r, i, t)) : this._daylightSavingAdjust(new Date(n.currentYear, n.currentMonth, n.currentDay)); return this.formatDate(this._get(n, "dateFormat"), u, this._getFormatConfig(n)) } }); n.fn.datepicker = function (t) { if (!this.length) return this; if (!n.datepicker.initialized) { n(document).on("mousedown", n.datepicker._checkExternalClick); n.datepicker.initialized = !0 } n("#" + n.datepicker._mainDivId).length === 0 && n("body").append(n.datepicker.dpDiv); var i = Array.prototype.slice.call(arguments, 1); return typeof t == "string" && (t === "isDisabled" || t === "getDate" || t === "widget") ? n.datepicker["_" + t + "Datepicker"].apply(n.datepicker, [this[0]].concat(i)) : t === "option" && arguments.length === 2 && typeof arguments[1] == "string" ? n.datepicker["_" + t + "Datepicker"].apply(n.datepicker, [this[0]].concat(i)) : this.each(function () { typeof t == "string" ? n.datepicker["_" + t + "Datepicker"].apply(n.datepicker, [this].concat(i)) : n.datepicker._attachDatepicker(this, t) }) }; n.datepicker = new y; n.datepicker.initialized = !1; n.datepicker.uuid = (new Date).getTime(); n.datepicker.version = "1.12.1"; vi = n.datepicker; yi = n.ui.ie = !!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase());
  429. /*!
  430. * jQuery UI Mouse 1.12.1
  431. * http://jqueryui.com
  432. *
  433. * Copyright jQuery Foundation and other contributors
  434. * Released under the MIT license.
  435. * http://jquery.org/license
  436. */
  437. r = !1; n(document).on("mouseup", function () { r = !1 }); var er = n.widget("ui.mouse", { version: "1.12.1", options: { cancel: "input, textarea, button, select, option", distance: 1, delay: 0 }, _mouseInit: function () { var t = this; this.element.on("mousedown." + this.widgetName, function (n) { return t._mouseDown(n) }).on("click." + this.widgetName, function (i) { if (!0 === n.data(i.target, t.widgetName + ".preventClickEvent")) return n.removeData(i.target, t.widgetName + ".preventClickEvent"), i.stopImmediatePropagation(), !1 }); this.started = !1 }, _mouseDestroy: function () { this.element.off("." + this.widgetName); this._mouseMoveDelegate && this.document.off("mousemove." + this.widgetName, this._mouseMoveDelegate).off("mouseup." + this.widgetName, this._mouseUpDelegate) }, _mouseDown: function (t) { if (!r) { this._mouseMoved = !1; this._mouseStarted && this._mouseUp(t); this._mouseDownEvent = t; var i = this, u = t.which === 1, f = typeof this.options.cancel == "string" && t.target.nodeName ? n(t.target).closest(this.options.cancel).length : !1; if (!u || f || !this._mouseCapture(t)) return !0; if (this.mouseDelayMet = !this.options.delay, this.mouseDelayMet || (this._mouseDelayTimer = setTimeout(function () { i.mouseDelayMet = !0 }, this.options.delay)), this._mouseDistanceMet(t) && this._mouseDelayMet(t) && (this._mouseStarted = this._mouseStart(t) !== !1, !this._mouseStarted)) return t.preventDefault(), !0; !0 === n.data(t.target, this.widgetName + ".preventClickEvent") && n.removeData(t.target, this.widgetName + ".preventClickEvent"); this._mouseMoveDelegate = function (n) { return i._mouseMove(n) }; this._mouseUpDelegate = function (n) { return i._mouseUp(n) }; this.document.on("mousemove." + this.widgetName, this._mouseMoveDelegate).on("mouseup." + this.widgetName, this._mouseUpDelegate); return t.preventDefault(), r = !0, !0 } }, _mouseMove: function (t) { if (this._mouseMoved) { if (n.ui.ie && (!document.documentMode || document.documentMode < 9) && !t.button) return this._mouseUp(t); if (!t.which) if (t.originalEvent.altKey || t.originalEvent.ctrlKey || t.originalEvent.metaKey || t.originalEvent.shiftKey) this.ignoreMissingWhich = !0; else if (!this.ignoreMissingWhich) return this._mouseUp(t) } return ((t.which || t.button) && (this._mouseMoved = !0), this._mouseStarted) ? (this._mouseDrag(t), t.preventDefault()) : (this._mouseDistanceMet(t) && this._mouseDelayMet(t) && (this._mouseStarted = this._mouseStart(this._mouseDownEvent, t) !== !1, this._mouseStarted ? this._mouseDrag(t) : this._mouseUp(t)), !this._mouseStarted) }, _mouseUp: function (t) { this.document.off("mousemove." + this.widgetName, this._mouseMoveDelegate).off("mouseup." + this.widgetName, this._mouseUpDelegate); this._mouseStarted && (this._mouseStarted = !1, t.target === this._mouseDownEvent.target && n.data(t.target, this.widgetName + ".preventClickEvent", !0), this._mouseStop(t)); this._mouseDelayTimer && (clearTimeout(this._mouseDelayTimer), delete this._mouseDelayTimer); this.ignoreMissingWhich = !1; r = !1; t.preventDefault() }, _mouseDistanceMet: function (n) { return Math.max(Math.abs(this._mouseDownEvent.pageX - n.pageX), Math.abs(this._mouseDownEvent.pageY - n.pageY)) >= this.options.distance }, _mouseDelayMet: function () { return this.mouseDelayMet }, _mouseStart: function () { }, _mouseDrag: function () { }, _mouseStop: function () { }, _mouseCapture: function () { return !0 } }), or = n.ui.plugin = { add: function (t, i, r) { var u, f = n.ui[t].prototype; for (u in r) f.plugins[u] = f.plugins[u] || [], f.plugins[u].push([i, r[u]]) }, call: function (n, t, i, r) { var u, f = n.plugins[t]; if (f && (r || n.element[0].parentNode && n.element[0].parentNode.nodeType !== 11)) for (u = 0; u < f.length; u++)n.options[f[u][0]] && f[u][1].apply(n.element, i) } }, sr = n.ui.safeBlur = function (t) { t && t.nodeName.toLowerCase() !== "body" && n(t).trigger("blur") };
  438. /*!
  439. * jQuery UI Draggable 1.12.1
  440. * http://jqueryui.com
  441. *
  442. * Copyright jQuery Foundation and other contributors
  443. * Released under the MIT license.
  444. * http://jquery.org/license
  445. */
  446. n.widget("ui.draggable", n.ui.mouse, { version: "1.12.1", widgetEventPrefix: "drag", options: { addClasses: !0, appendTo: "parent", axis: !1, connectToSortable: !1, containment: !1, cursor: "auto", cursorAt: !1, grid: !1, handle: !1, helper: "original", iframeFix: !1, opacity: !1, refreshPositions: !1, revert: !1, revertDuration: 500, scope: "default", scroll: !0, scrollSensitivity: 20, scrollSpeed: 20, snap: !1, snapMode: "both", snapTolerance: 20, stack: !1, zIndex: !1, drag: null, start: null, stop: null }, _create: function () { this.options.helper === "original" && this._setPositionRelative(); this.options.addClasses && this._addClass("ui-draggable"); this._setHandleClassName(); this._mouseInit() }, _setOption: function (n, t) { this._super(n, t); n === "handle" && (this._removeHandleClassName(), this._setHandleClassName()) }, _destroy: function () { if ((this.helper || this.element).is(".ui-draggable-dragging")) { this.destroyOnClear = !0; return } this._removeHandleClassName(); this._mouseDestroy() }, _mouseCapture: function (t) { var i = this.options; return this.helper || i.disabled || n(t.target).closest(".ui-resizable-handle").length > 0 ? !1 : (this.handle = this._getHandle(t), !this.handle) ? !1 : (this._blurActiveElement(t), this._blockFrames(i.iframeFix === !0 ? "iframe" : i.iframeFix), !0) }, _blockFrames: function (t) { this.iframeBlocks = this.document.find(t).map(function () { var t = n(this); return n("<div>").css("position", "absolute").appendTo(t.parent()).outerWidth(t.outerWidth()).outerHeight(t.outerHeight()).offset(t.offset())[0] }) }, _unblockFrames: function () { this.iframeBlocks && (this.iframeBlocks.remove(), delete this.iframeBlocks) }, _blurActiveElement: function (t) { var i = n.ui.safeActiveElement(this.document[0]), r = n(t.target); r.closest(i).length || n.ui.safeBlur(i) }, _mouseStart: function (t) { var i = this.options; return (this.helper = this._createHelper(t), this._addClass(this.helper, "ui-draggable-dragging"), this._cacheHelperProportions(), n.ui.ddmanager && (n.ui.ddmanager.current = this), this._cacheMargins(), this.cssPosition = this.helper.css("position"), this.scrollParent = this.helper.scrollParent(!0), this.offsetParent = this.helper.offsetParent(), this.hasFixedAncestor = this.helper.parents().filter(function () { return n(this).css("position") === "fixed" }).length > 0, this.positionAbs = this.element.offset(), this._refreshOffsets(t), this.originalPosition = this.position = this._generatePosition(t, !1), this.originalPageX = t.pageX, this.originalPageY = t.pageY, i.cursorAt && this._adjustOffsetFromHelper(i.cursorAt), this._setContainment(), this._trigger("start", t) === !1) ? (this._clear(), !1) : (this._cacheHelperProportions(), n.ui.ddmanager && !i.dropBehaviour && n.ui.ddmanager.prepareOffsets(this, t), this._mouseDrag(t, !0), n.ui.ddmanager && n.ui.ddmanager.dragStart(this, t), !0) }, _refreshOffsets: function (n) { this.offset = { top: this.positionAbs.top - this.margins.top, left: this.positionAbs.left - this.margins.left, scroll: !1, parent: this._getParentOffset(), relative: this._getRelativeOffset() }; this.offset.click = { left: n.pageX - this.offset.left, top: n.pageY - this.offset.top } }, _mouseDrag: function (t, i) { if (this.hasFixedAncestor && (this.offset.parent = this._getParentOffset()), this.position = this._generatePosition(t, !0), this.positionAbs = this._convertPositionTo("absolute"), !i) { var r = this._uiHash(); if (this._trigger("drag", t, r) === !1) return this._mouseUp(new n.Event("mouseup", t)), !1; this.position = r.position } return this.helper[0].style.left = this.position.left + "px", this.helper[0].style.top = this.position.top + "px", n.ui.ddmanager && n.ui.ddmanager.drag(this, t), !1 }, _mouseStop: function (t) { var r = this, i = !1; return n.ui.ddmanager && !this.options.dropBehaviour && (i = n.ui.ddmanager.drop(this, t)), this.dropped && (i = this.dropped, this.dropped = !1), this.options.revert === "invalid" && !i || this.options.revert === "valid" && i || this.options.revert === !0 || n.isFunction(this.options.revert) && this.options.revert.call(this.element, i) ? n(this.helper).animate(this.originalPosition, parseInt(this.options.revertDuration, 10), function () { r._trigger("stop", t) !== !1 && r._clear() }) : this._trigger("stop", t) !== !1 && this._clear(), !1 }, _mouseUp: function (t) { return this._unblockFrames(), n.ui.ddmanager && n.ui.ddmanager.dragStop(this, t), this.handleElement.is(t.target) && this.element.trigger("focus"), n.ui.mouse.prototype._mouseUp.call(this, t) }, cancel: function () { return this.helper.is(".ui-draggable-dragging") ? this._mouseUp(new n.Event("mouseup", { target: this.element[0] })) : this._clear(), this }, _getHandle: function (t) { return this.options.handle ? !!n(t.target).closest(this.element.find(this.options.handle)).length : !0 }, _setHandleClassName: function () { this.handleElement = this.options.handle ? this.element.find(this.options.handle) : this.element; this._addClass(this.handleElement, "ui-draggable-handle") }, _removeHandleClassName: function () { this._removeClass(this.handleElement, "ui-draggable-handle") }, _createHelper: function (t) { var r = this.options, u = n.isFunction(r.helper), i = u ? n(r.helper.apply(this.element[0], [t])) : r.helper === "clone" ? this.element.clone().removeAttr("id") : this.element; return i.parents("body").length || i.appendTo(r.appendTo === "parent" ? this.element[0].parentNode : r.appendTo), u && i[0] === this.element[0] && this._setPositionRelative(), i[0] === this.element[0] || /(fixed|absolute)/.test(i.css("position")) || i.css("position", "absolute"), i }, _setPositionRelative: function () { /^(?:r|a|f)/.test(this.element.css("position")) || (this.element[0].style.position = "relative") }, _adjustOffsetFromHelper: function (t) { typeof t == "string" && (t = t.split(" ")); n.isArray(t) && (t = { left: +t[0], top: +t[1] || 0 }); "left" in t && (this.offset.click.left = t.left + this.margins.left); "right" in t && (this.offset.click.left = this.helperProportions.width - t.right + this.margins.left); "top" in t && (this.offset.click.top = t.top + this.margins.top); "bottom" in t && (this.offset.click.top = this.helperProportions.height - t.bottom + this.margins.top) }, _isRootNode: function (n) { return /(html|body)/i.test(n.tagName) || n === this.document[0] }, _getParentOffset: function () { var t = this.offsetParent.offset(), i = this.document[0]; return this.cssPosition === "absolute" && this.scrollParent[0] !== i && n.contains(this.scrollParent[0], this.offsetParent[0]) && (t.left += this.scrollParent.scrollLeft(), t.top += this.scrollParent.scrollTop()), this._isRootNode(this.offsetParent[0]) && (t = { top: 0, left: 0 }), { top: t.top + (parseInt(this.offsetParent.css("borderTopWidth"), 10) || 0), left: t.left + (parseInt(this.offsetParent.css("borderLeftWidth"), 10) || 0) } }, _getRelativeOffset: function () { if (this.cssPosition !== "relative") return { top: 0, left: 0 }; var n = this.element.position(), t = this._isRootNode(this.scrollParent[0]); return { top: n.top - (parseInt(this.helper.css("top"), 10) || 0) + (t ? 0 : this.scrollParent.scrollTop()), left: n.left - (parseInt(this.helper.css("left"), 10) || 0) + (t ? 0 : this.scrollParent.scrollLeft()) } }, _cacheMargins: function () { this.margins = { left: parseInt(this.element.css("marginLeft"), 10) || 0, top: parseInt(this.element.css("marginTop"), 10) || 0, right: parseInt(this.element.css("marginRight"), 10) || 0, bottom: parseInt(this.element.css("marginBottom"), 10) || 0 } }, _cacheHelperProportions: function () { this.helperProportions = { width: this.helper.outerWidth(), height: this.helper.outerHeight() } }, _setContainment: function () { var f, t, i, r = this.options, u = this.document[0]; if (this.relativeContainer = null, !r.containment) { this.containment = null; return } if (r.containment === "window") { this.containment = [n(window).scrollLeft() - this.offset.relative.left - this.offset.parent.left, n(window).scrollTop() - this.offset.relative.top - this.offset.parent.top, n(window).scrollLeft() + n(window).width() - this.helperProportions.width - this.margins.left, n(window).scrollTop() + (n(window).height() || u.body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top]; return } if (r.containment === "document") { this.containment = [0, 0, n(u).width() - this.helperProportions.width - this.margins.left, (n(u).height() || u.body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top]; return } if (r.containment.constructor === Array) { this.containment = r.containment; return } (r.containment === "parent" && (r.containment = this.helper[0].parentNode), t = n(r.containment), i = t[0], i) && (f = /(scroll|auto)/.test(t.css("overflow")), this.containment = [(parseInt(t.css("borderLeftWidth"), 10) || 0) + (parseInt(t.css("paddingLeft"), 10) || 0), (parseInt(t.css("borderTopWidth"), 10) || 0) + (parseInt(t.css("paddingTop"), 10) || 0), (f ? Math.max(i.scrollWidth, i.offsetWidth) : i.offsetWidth) - (parseInt(t.css("borderRightWidth"), 10) || 0) - (parseInt(t.css("paddingRight"), 10) || 0) - this.helperProportions.width - this.margins.left - this.margins.right, (f ? Math.max(i.scrollHeight, i.offsetHeight) : i.offsetHeight) - (parseInt(t.css("borderBottomWidth"), 10) || 0) - (parseInt(t.css("paddingBottom"), 10) || 0) - this.helperProportions.height - this.margins.top - this.margins.bottom], this.relativeContainer = t) }, _convertPositionTo: function (n, t) { t || (t = this.position); var i = n === "absolute" ? 1 : -1, r = this._isRootNode(this.scrollParent[0]); return { top: t.top + this.offset.relative.top * i + this.offset.parent.top * i - (this.cssPosition === "fixed" ? -this.offset.scroll.top : r ? 0 : this.offset.scroll.top) * i, left: t.left + this.offset.relative.left * i + this.offset.parent.left * i - (this.cssPosition === "fixed" ? -this.offset.scroll.left : r ? 0 : this.offset.scroll.left) * i } }, _generatePosition: function (n, t) { var i, s, u, f, r = this.options, h = this._isRootNode(this.scrollParent[0]), e = n.pageX, o = n.pageY; return h && this.offset.scroll || (this.offset.scroll = { top: this.scrollParent.scrollTop(), left: this.scrollParent.scrollLeft() }), t && (this.containment && (this.relativeContainer ? (s = this.relativeContainer.offset(), i = [this.containment[0] + s.left, this.containment[1] + s.top, this.containment[2] + s.left, this.containment[3] + s.top]) : i = this.containment, n.pageX - this.offset.click.left < i[0] && (e = i[0] + this.offset.click.left), n.pageY - this.offset.click.top < i[1] && (o = i[1] + this.offset.click.top), n.pageX - this.offset.click.left > i[2] && (e = i[2] + this.offset.click.left), n.pageY - this.offset.click.top > i[3] && (o = i[3] + this.offset.click.top)), r.grid && (u = r.grid[1] ? this.originalPageY + Math.round((o - this.originalPageY) / r.grid[1]) * r.grid[1] : this.originalPageY, o = i ? u - this.offset.click.top >= i[1] || u - this.offset.click.top > i[3] ? u : u - this.offset.click.top >= i[1] ? u - r.grid[1] : u + r.grid[1] : u, f = r.grid[0] ? this.originalPageX + Math.round((e - this.originalPageX) / r.grid[0]) * r.grid[0] : this.originalPageX, e = i ? f - this.offset.click.left >= i[0] || f - this.offset.click.left > i[2] ? f : f - this.offset.click.left >= i[0] ? f - r.grid[0] : f + r.grid[0] : f), r.axis === "y" && (e = this.originalPageX), r.axis === "x" && (o = this.originalPageY)), { top: o - this.offset.click.top - this.offset.relative.top - this.offset.parent.top + (this.cssPosition === "fixed" ? -this.offset.scroll.top : h ? 0 : this.offset.scroll.top), left: e - this.offset.click.left - this.offset.relative.left - this.offset.parent.left + (this.cssPosition === "fixed" ? -this.offset.scroll.left : h ? 0 : this.offset.scroll.left) } }, _clear: function () { this._removeClass(this.helper, "ui-draggable-dragging"); this.helper[0] === this.element[0] || this.cancelHelperRemoval || this.helper.remove(); this.helper = null; this.cancelHelperRemoval = !1; this.destroyOnClear && this.destroy() }, _trigger: function (t, i, r) { return r = r || this._uiHash(), n.ui.plugin.call(this, t, [i, r, this], !0), /^(drag|start|stop)/.test(t) && (this.positionAbs = this._convertPositionTo("absolute"), r.offset = this.positionAbs), n.Widget.prototype._trigger.call(this, t, i, r) }, plugins: {}, _uiHash: function () { return { helper: this.helper, position: this.position, originalPosition: this.originalPosition, offset: this.positionAbs } } }); n.ui.plugin.add("draggable", "connectToSortable", { start: function (t, i, r) { var u = n.extend({}, i, { item: r.element }); r.sortables = []; n(r.options.connectToSortable).each(function () { var i = n(this).sortable("instance"); i && !i.options.disabled && (r.sortables.push(i), i.refreshPositions(), i._trigger("activate", t, u)) }) }, stop: function (t, i, r) { var u = n.extend({}, i, { item: r.element }); r.cancelHelperRemoval = !1; n.each(r.sortables, function () { var n = this; n.isOver ? (n.isOver = 0, r.cancelHelperRemoval = !0, n.cancelHelperRemoval = !1, n._storedCSS = { position: n.placeholder.css("position"), top: n.placeholder.css("top"), left: n.placeholder.css("left") }, n._mouseStop(t), n.options.helper = n.options._helper) : (n.cancelHelperRemoval = !0, n._trigger("deactivate", t, u)) }) }, drag: function (t, i, r) { n.each(r.sortables, function () { var f = !1, u = this; u.positionAbs = r.positionAbs; u.helperProportions = r.helperProportions; u.offset.click = r.offset.click; u._intersectsWith(u.containerCache) && (f = !0, n.each(r.sortables, function () { return this.positionAbs = r.positionAbs, this.helperProportions = r.helperProportions, this.offset.click = r.offset.click, this !== u && this._intersectsWith(this.containerCache) && n.contains(u.element[0], this.element[0]) && (f = !1), f })); f ? (u.isOver || (u.isOver = 1, r._parent = i.helper.parent(), u.currentItem = i.helper.appendTo(u.element).data("ui-sortable-item", !0), u.options._helper = u.options.helper, u.options.helper = function () { return i.helper[0] }, t.target = u.currentItem[0], u._mouseCapture(t, !0), u._mouseStart(t, !0, !0), u.offset.click.top = r.offset.click.top, u.offset.click.left = r.offset.click.left, u.offset.parent.left -= r.offset.parent.left - u.offset.parent.left, u.offset.parent.top -= r.offset.parent.top - u.offset.parent.top, r._trigger("toSortable", t), r.dropped = u.element, n.each(r.sortables, function () { this.refreshPositions() }), r.currentItem = r.element, u.fromOutside = r), u.currentItem && (u._mouseDrag(t), i.position = u.position)) : u.isOver && (u.isOver = 0, u.cancelHelperRemoval = !0, u.options._revert = u.options.revert, u.options.revert = !1, u._trigger("out", t, u._uiHash(u)), u._mouseStop(t, !0), u.options.revert = u.options._revert, u.options.helper = u.options._helper, u.placeholder && u.placeholder.remove(), i.helper.appendTo(r._parent), r._refreshOffsets(t), i.position = r._generatePosition(t, !0), r._trigger("fromSortable", t), r.dropped = !1, n.each(r.sortables, function () { this.refreshPositions() })) }) } }); n.ui.plugin.add("draggable", "cursor", { start: function (t, i, r) { var u = n("body"), f = r.options; u.css("cursor") && (f._cursor = u.css("cursor")); u.css("cursor", f.cursor) }, stop: function (t, i, r) { var u = r.options; u._cursor && n("body").css("cursor", u._cursor) } }); n.ui.plugin.add("draggable", "opacity", { start: function (t, i, r) { var u = n(i.helper), f = r.options; u.css("opacity") && (f._opacity = u.css("opacity")); u.css("opacity", f.opacity) }, stop: function (t, i, r) { var u = r.options; u._opacity && n(i.helper).css("opacity", u._opacity) } }); n.ui.plugin.add("draggable", "scroll", { start: function (n, t, i) { i.scrollParentNotHidden || (i.scrollParentNotHidden = i.helper.scrollParent(!1)); i.scrollParentNotHidden[0] !== i.document[0] && i.scrollParentNotHidden[0].tagName !== "HTML" && (i.overflowOffset = i.scrollParentNotHidden.offset()) }, drag: function (t, i, r) { var u = r.options, o = !1, e = r.scrollParentNotHidden[0], f = r.document[0]; e !== f && e.tagName !== "HTML" ? (u.axis && u.axis === "x" || (r.overflowOffset.top + e.offsetHeight - t.pageY < u.scrollSensitivity ? e.scrollTop = o = e.scrollTop + u.scrollSpeed : t.pageY - r.overflowOffset.top < u.scrollSensitivity && (e.scrollTop = o = e.scrollTop - u.scrollSpeed)), u.axis && u.axis === "y" || (r.overflowOffset.left + e.offsetWidth - t.pageX < u.scrollSensitivity ? e.scrollLeft = o = e.scrollLeft + u.scrollSpeed : t.pageX - r.overflowOffset.left < u.scrollSensitivity && (e.scrollLeft = o = e.scrollLeft - u.scrollSpeed))) : (u.axis && u.axis === "x" || (t.pageY - n(f).scrollTop() < u.scrollSensitivity ? o = n(f).scrollTop(n(f).scrollTop() - u.scrollSpeed) : n(window).height() - (t.pageY - n(f).scrollTop()) < u.scrollSensitivity && (o = n(f).scrollTop(n(f).scrollTop() + u.scrollSpeed))), u.axis && u.axis === "y" || (t.pageX - n(f).scrollLeft() < u.scrollSensitivity ? o = n(f).scrollLeft(n(f).scrollLeft() - u.scrollSpeed) : n(window).width() - (t.pageX - n(f).scrollLeft()) < u.scrollSensitivity && (o = n(f).scrollLeft(n(f).scrollLeft() + u.scrollSpeed)))); o !== !1 && n.ui.ddmanager && !u.dropBehaviour && n.ui.ddmanager.prepareOffsets(r, t) } }); n.ui.plugin.add("draggable", "snap", { start: function (t, i, r) { var u = r.options; r.snapElements = []; n(u.snap.constructor !== String ? u.snap.items || ":data(ui-draggable)" : u.snap).each(function () { var t = n(this), i = t.offset(); this !== r.element[0] && r.snapElements.push({ item: this, width: t.outerWidth(), height: t.outerHeight(), top: i.top, left: i.left }) }) }, drag: function (t, i, r) { for (var e, o, s, h, c, a, l, v, w, b = r.options, f = b.snapTolerance, y = i.offset.left, k = y + r.helperProportions.width, p = i.offset.top, d = p + r.helperProportions.height, u = r.snapElements.length - 1; u >= 0; u--) { if (c = r.snapElements[u].left - r.margins.left, a = c + r.snapElements[u].width, l = r.snapElements[u].top - r.margins.top, v = l + r.snapElements[u].height, k < c - f || y > a + f || d < l - f || p > v + f || !n.contains(r.snapElements[u].item.ownerDocument, r.snapElements[u].item)) { r.snapElements[u].snapping && r.options.snap.release && r.options.snap.release.call(r.element, t, n.extend(r._uiHash(), { snapItem: r.snapElements[u].item })); r.snapElements[u].snapping = !1; continue } b.snapMode !== "inner" && (e = Math.abs(l - d) <= f, o = Math.abs(v - p) <= f, s = Math.abs(c - k) <= f, h = Math.abs(a - y) <= f, e && (i.position.top = r._convertPositionTo("relative", { top: l - r.helperProportions.height, left: 0 }).top), o && (i.position.top = r._convertPositionTo("relative", { top: v, left: 0 }).top), s && (i.position.left = r._convertPositionTo("relative", { top: 0, left: c - r.helperProportions.width }).left), h && (i.position.left = r._convertPositionTo("relative", { top: 0, left: a }).left)); w = e || o || s || h; b.snapMode !== "outer" && (e = Math.abs(l - p) <= f, o = Math.abs(v - d) <= f, s = Math.abs(c - y) <= f, h = Math.abs(a - k) <= f, e && (i.position.top = r._convertPositionTo("relative", { top: l, left: 0 }).top), o && (i.position.top = r._convertPositionTo("relative", { top: v - r.helperProportions.height, left: 0 }).top), s && (i.position.left = r._convertPositionTo("relative", { top: 0, left: c }).left), h && (i.position.left = r._convertPositionTo("relative", { top: 0, left: a - r.helperProportions.width }).left)); !r.snapElements[u].snapping && (e || o || s || h || w) && r.options.snap.snap && r.options.snap.snap.call(r.element, t, n.extend(r._uiHash(), { snapItem: r.snapElements[u].item })); r.snapElements[u].snapping = e || o || s || h || w } } }); n.ui.plugin.add("draggable", "stack", { start: function (t, i, r) { var f, e = r.options, u = n.makeArray(n(e.stack)).sort(function (t, i) { return (parseInt(n(t).css("zIndex"), 10) || 0) - (parseInt(n(i).css("zIndex"), 10) || 0) }); u.length && (f = parseInt(n(u[0]).css("zIndex"), 10) || 0, n(u).each(function (t) { n(this).css("zIndex", f + t) }), this.css("zIndex", f + u.length)) } }); n.ui.plugin.add("draggable", "zIndex", { start: function (t, i, r) { var u = n(i.helper), f = r.options; u.css("zIndex") && (f._zIndex = u.css("zIndex")); u.css("zIndex", f.zIndex) }, stop: function (t, i, r) { var u = r.options; u._zIndex && n(i.helper).css("zIndex", u._zIndex) } }); pi = n.ui.draggable;
  447. /*!
  448. * jQuery UI Resizable 1.12.1
  449. * http://jqueryui.com
  450. *
  451. * Copyright jQuery Foundation and other contributors
  452. * Released under the MIT license.
  453. * http://jquery.org/license
  454. */
  455. n.widget("ui.resizable", n.ui.mouse, { version: "1.12.1", widgetEventPrefix: "resize", options: { alsoResize: !1, animate: !1, animateDuration: "slow", animateEasing: "swing", aspectRatio: !1, autoHide: !1, classes: { "ui-resizable-se": "ui-icon ui-icon-gripsmall-diagonal-se" }, containment: !1, ghost: !1, grid: !1, handles: "e,s,se", helper: !1, maxHeight: null, maxWidth: null, minHeight: 10, minWidth: 10, zIndex: 90, resize: null, start: null, stop: null }, _num: function (n) { return parseFloat(n) || 0 }, _isNumber: function (n) { return !isNaN(parseFloat(n)) }, _hasScroll: function (t, i) { if (n(t).css("overflow") === "hidden") return !1; var r = i && i === "left" ? "scrollLeft" : "scrollTop", u = !1; return t[r] > 0 ? !0 : (t[r] = 1, u = t[r] > 0, t[r] = 0, u) }, _create: function () { var r, t = this.options, i = this; if (this._addClass("ui-resizable"), n.extend(this, { _aspectRatio: !!t.aspectRatio, aspectRatio: t.aspectRatio, originalElement: this.element, _proportionallyResizeElements: [], _helper: t.helper || t.ghost || t.animate ? t.helper || "ui-resizable-helper" : null }), this.element[0].nodeName.match(/^(canvas|textarea|input|select|button|img)$/i) && (this.element.wrap(n("<div class='ui-wrapper' style='overflow: hidden;'><\/div>").css({ position: this.element.css("position"), width: this.element.outerWidth(), height: this.element.outerHeight(), top: this.element.css("top"), left: this.element.css("left") })), this.element = this.element.parent().data("ui-resizable", this.element.resizable("instance")), this.elementIsWrapper = !0, r = { marginTop: this.originalElement.css("marginTop"), marginRight: this.originalElement.css("marginRight"), marginBottom: this.originalElement.css("marginBottom"), marginLeft: this.originalElement.css("marginLeft") }, this.element.css(r), this.originalElement.css("margin", 0), this.originalResizeStyle = this.originalElement.css("resize"), this.originalElement.css("resize", "none"), this._proportionallyResizeElements.push(this.originalElement.css({ position: "static", zoom: 1, display: "block" })), this.originalElement.css(r), this._proportionallyResize()), this._setupHandles(), t.autoHide) n(this.element).on("mouseenter", function () { t.disabled || (i._removeClass("ui-resizable-autohide"), i._handles.show()) }).on("mouseleave", function () { t.disabled || i.resizing || (i._addClass("ui-resizable-autohide"), i._handles.hide()) }); this._mouseInit() }, _destroy: function () { this._mouseDestroy(); var t, i = function (t) { n(t).removeData("resizable").removeData("ui-resizable").off(".resizable").find(".ui-resizable-handle").remove() }; return this.elementIsWrapper && (i(this.element), t = this.element, this.originalElement.css({ position: t.css("position"), width: t.outerWidth(), height: t.outerHeight(), top: t.css("top"), left: t.css("left") }).insertAfter(t), t.remove()), this.originalElement.css("resize", this.originalResizeStyle), i(this.originalElement), this }, _setOption: function (n, t) { this._super(n, t); switch (n) { case "handles": this._removeHandles(); this._setupHandles() } }, _setupHandles: function () { var u = this.options, i, r, f, o, t, e = this; if (this.handles = u.handles || (n(".ui-resizable-handle", this.element).length ? { n: ".ui-resizable-n", e: ".ui-resizable-e", s: ".ui-resizable-s", w: ".ui-resizable-w", se: ".ui-resizable-se", sw: ".ui-resizable-sw", ne: ".ui-resizable-ne", nw: ".ui-resizable-nw" } : "e,s,se"), this._handles = n(), this.handles.constructor === String) for (this.handles === "all" && (this.handles = "n,e,s,w,se,sw,ne,nw"), f = this.handles.split(","), this.handles = {}, r = 0; r < f.length; r++)i = n.trim(f[r]), o = "ui-resizable-" + i, t = n("<div>"), this._addClass(t, "ui-resizable-handle " + o), t.css({ zIndex: u.zIndex }), this.handles[i] = ".ui-resizable-" + i, this.element.append(t); this._renderAxis = function (t) { var i, r, u, f; t = t || this.element; for (i in this.handles) this.handles[i].constructor === String ? this.handles[i] = this.element.children(this.handles[i]).first().show() : (this.handles[i].jquery || this.handles[i].nodeType) && (this.handles[i] = n(this.handles[i]), this._on(this.handles[i], { mousedown: e._mouseDown })), this.elementIsWrapper && this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i) && (r = n(this.handles[i], this.element), f = /sw|ne|nw|se|n|s/.test(i) ? r.outerHeight() : r.outerWidth(), u = ["padding", /ne|nw|n/.test(i) ? "Top" : /se|sw|s/.test(i) ? "Bottom" : /^e$/.test(i) ? "Right" : "Left"].join(""), t.css(u, f), this._proportionallyResize()), this._handles = this._handles.add(this.handles[i]) }; this._renderAxis(this.element); this._handles = this._handles.add(this.element.find(".ui-resizable-handle")); this._handles.disableSelection(); this._handles.on("mouseover", function () { e.resizing || (this.className && (t = this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)), e.axis = t && t[1] ? t[1] : "se") }); u.autoHide && (this._handles.hide(), this._addClass("ui-resizable-autohide")) }, _removeHandles: function () { this._handles.remove() }, _mouseCapture: function (t) { var r, i, u = !1; for (r in this.handles) i = n(this.handles[r])[0], (i === t.target || n.contains(i, t.target)) && (u = !0); return !this.options.disabled && u }, _mouseStart: function (t) { var u, f, e, r = this.options, i = this.element; return this.resizing = !0, this._renderProxy(), u = this._num(this.helper.css("left")), f = this._num(this.helper.css("top")), r.containment && (u += n(r.containment).scrollLeft() || 0, f += n(r.containment).scrollTop() || 0), this.offset = this.helper.offset(), this.position = { left: u, top: f }, this.size = this._helper ? { width: this.helper.width(), height: this.helper.height() } : { width: i.width(), height: i.height() }, this.originalSize = this._helper ? { width: i.outerWidth(), height: i.outerHeight() } : { width: i.width(), height: i.height() }, this.sizeDiff = { width: i.outerWidth() - i.width(), height: i.outerHeight() - i.height() }, this.originalPosition = { left: u, top: f }, this.originalMousePosition = { left: t.pageX, top: t.pageY }, this.aspectRatio = typeof r.aspectRatio == "number" ? r.aspectRatio : this.originalSize.width / this.originalSize.height || 1, e = n(".ui-resizable-" + this.axis).css("cursor"), n("body").css("cursor", e === "auto" ? this.axis + "-resize" : e), this._addClass("ui-resizable-resizing"), this._propagate("start", t), !0 }, _mouseDrag: function (t) { var i, r, u = this.originalMousePosition, e = this.axis, o = t.pageX - u.left || 0, s = t.pageY - u.top || 0, f = this._change[e]; return (this._updatePrevProperties(), !f) ? !1 : (i = f.apply(this, [t, o, s]), this._updateVirtualBoundaries(t.shiftKey), (this._aspectRatio || t.shiftKey) && (i = this._updateRatio(i, t)), i = this._respectSize(i, t), this._updateCache(i), this._propagate("resize", t), r = this._applyChanges(), !this._helper && this._proportionallyResizeElements.length && this._proportionallyResize(), n.isEmptyObject(r) || (this._updatePrevProperties(), this._trigger("resize", t, this.ui()), this._applyChanges()), !1) }, _mouseStop: function (t) { this.resizing = !1; var r, u, f, e, o, s, h, c = this.options, i = this; return this._helper && (r = this._proportionallyResizeElements, u = r.length && /textarea/i.test(r[0].nodeName), f = u && this._hasScroll(r[0], "left") ? 0 : i.sizeDiff.height, e = u ? 0 : i.sizeDiff.width, o = { width: i.helper.width() - e, height: i.helper.height() - f }, s = parseFloat(i.element.css("left")) + (i.position.left - i.originalPosition.left) || null, h = parseFloat(i.element.css("top")) + (i.position.top - i.originalPosition.top) || null, c.animate || this.element.css(n.extend(o, { top: h, left: s })), i.helper.height(i.size.height), i.helper.width(i.size.width), this._helper && !c.animate && this._proportionallyResize()), n("body").css("cursor", "auto"), this._removeClass("ui-resizable-resizing"), this._propagate("stop", t), this._helper && this.helper.remove(), !1 }, _updatePrevProperties: function () { this.prevPosition = { top: this.position.top, left: this.position.left }; this.prevSize = { width: this.size.width, height: this.size.height } }, _applyChanges: function () { var n = {}; return this.position.top !== this.prevPosition.top && (n.top = this.position.top + "px"), this.position.left !== this.prevPosition.left && (n.left = this.position.left + "px"), this.size.width !== this.prevSize.width && (n.width = this.size.width + "px"), this.size.height !== this.prevSize.height && (n.height = this.size.height + "px"), this.helper.css(n), n }, _updateVirtualBoundaries: function (n) { var r, u, f, e, t, i = this.options; t = { minWidth: this._isNumber(i.minWidth) ? i.minWidth : 0, maxWidth: this._isNumber(i.maxWidth) ? i.maxWidth : Infinity, minHeight: this._isNumber(i.minHeight) ? i.minHeight : 0, maxHeight: this._isNumber(i.maxHeight) ? i.maxHeight : Infinity }; (this._aspectRatio || n) && (r = t.minHeight * this.aspectRatio, f = t.minWidth / this.aspectRatio, u = t.maxHeight * this.aspectRatio, e = t.maxWidth / this.aspectRatio, r > t.minWidth && (t.minWidth = r), f > t.minHeight && (t.minHeight = f), u < t.maxWidth && (t.maxWidth = u), e < t.maxHeight && (t.maxHeight = e)); this._vBoundaries = t }, _updateCache: function (n) { this.offset = this.helper.offset(); this._isNumber(n.left) && (this.position.left = n.left); this._isNumber(n.top) && (this.position.top = n.top); this._isNumber(n.height) && (this.size.height = n.height); this._isNumber(n.width) && (this.size.width = n.width) }, _updateRatio: function (n) { var t = this.position, i = this.size, r = this.axis; return this._isNumber(n.height) ? n.width = n.height * this.aspectRatio : this._isNumber(n.width) && (n.height = n.width / this.aspectRatio), r === "sw" && (n.left = t.left + (i.width - n.width), n.top = null), r === "nw" && (n.top = t.top + (i.height - n.height), n.left = t.left + (i.width - n.width)), n }, _respectSize: function (n) { var t = this._vBoundaries, i = this.axis, r = this._isNumber(n.width) && t.maxWidth && t.maxWidth < n.width, u = this._isNumber(n.height) && t.maxHeight && t.maxHeight < n.height, f = this._isNumber(n.width) && t.minWidth && t.minWidth > n.width, e = this._isNumber(n.height) && t.minHeight && t.minHeight > n.height, o = this.originalPosition.left + this.originalSize.width, s = this.originalPosition.top + this.originalSize.height, h = /sw|nw|w/.test(i), c = /nw|ne|n/.test(i); return f && (n.width = t.minWidth), e && (n.height = t.minHeight), r && (n.width = t.maxWidth), u && (n.height = t.maxHeight), f && h && (n.left = o - t.minWidth), r && h && (n.left = o - t.maxWidth), e && c && (n.top = s - t.minHeight), u && c && (n.top = s - t.maxHeight), n.width || n.height || n.left || !n.top ? n.width || n.height || n.top || !n.left || (n.left = null) : n.top = null, n }, _getPaddingPlusBorderDimensions: function (n) { for (var t = 0, i = [], r = [n.css("borderTopWidth"), n.css("borderRightWidth"), n.css("borderBottomWidth"), n.css("borderLeftWidth")], u = [n.css("paddingTop"), n.css("paddingRight"), n.css("paddingBottom"), n.css("paddingLeft")]; t < 4; t++)i[t] = parseFloat(r[t]) || 0, i[t] += parseFloat(u[t]) || 0; return { height: i[0] + i[2], width: i[1] + i[3] } }, _proportionallyResize: function () { if (this._proportionallyResizeElements.length) for (var n, t = 0, i = this.helper || this.element; t < this._proportionallyResizeElements.length; t++)n = this._proportionallyResizeElements[t], this.outerDimensions || (this.outerDimensions = this._getPaddingPlusBorderDimensions(n)), n.css({ height: i.height() - this.outerDimensions.height || 0, width: i.width() - this.outerDimensions.width || 0 }) }, _renderProxy: function () { var t = this.element, i = this.options; this.elementOffset = t.offset(); this._helper ? (this.helper = this.helper || n("<div style='overflow:hidden;'><\/div>"), this._addClass(this.helper, this._helper), this.helper.css({ width: this.element.outerWidth(), height: this.element.outerHeight(), position: "absolute", left: this.elementOffset.left + "px", top: this.elementOffset.top + "px", zIndex: ++i.zIndex }), this.helper.appendTo("body").disableSelection()) : this.helper = this.element }, _change: { e: function (n, t) { return { width: this.originalSize.width + t } }, w: function (n, t) { var i = this.originalSize, r = this.originalPosition; return { left: r.left + t, width: i.width - t } }, n: function (n, t, i) { var r = this.originalSize, u = this.originalPosition; return { top: u.top + i, height: r.height - i } }, s: function (n, t, i) { return { height: this.originalSize.height + i } }, se: function (t, i, r) { return n.extend(this._change.s.apply(this, arguments), this._change.e.apply(this, [t, i, r])) }, sw: function (t, i, r) { return n.extend(this._change.s.apply(this, arguments), this._change.w.apply(this, [t, i, r])) }, ne: function (t, i, r) { return n.extend(this._change.n.apply(this, arguments), this._change.e.apply(this, [t, i, r])) }, nw: function (t, i, r) { return n.extend(this._change.n.apply(this, arguments), this._change.w.apply(this, [t, i, r])) } }, _propagate: function (t, i) { n.ui.plugin.call(this, t, [i, this.ui()]); t !== "resize" && this._trigger(t, i, this.ui()) }, plugins: {}, ui: function () { return { originalElement: this.originalElement, element: this.element, helper: this.helper, position: this.position, size: this.size, originalSize: this.originalSize, originalPosition: this.originalPosition } } }); n.ui.plugin.add("resizable", "animate", { stop: function (t) { var i = n(this).resizable("instance"), u = i.options, r = i._proportionallyResizeElements, f = r.length && /textarea/i.test(r[0].nodeName), s = f && i._hasScroll(r[0], "left") ? 0 : i.sizeDiff.height, h = f ? 0 : i.sizeDiff.width, c = { width: i.size.width - h, height: i.size.height - s }, e = parseFloat(i.element.css("left")) + (i.position.left - i.originalPosition.left) || null, o = parseFloat(i.element.css("top")) + (i.position.top - i.originalPosition.top) || null; i.element.animate(n.extend(c, o && e ? { top: o, left: e } : {}), { duration: u.animateDuration, easing: u.animateEasing, step: function () { var u = { width: parseFloat(i.element.css("width")), height: parseFloat(i.element.css("height")), top: parseFloat(i.element.css("top")), left: parseFloat(i.element.css("left")) }; r && r.length && n(r[0]).css({ width: u.width, height: u.height }); i._updateCache(u); i._propagate("resize", t) } }) } }); n.ui.plugin.add("resizable", "containment", { start: function () { var r, f, e, o, s, h, c, t = n(this).resizable("instance"), l = t.options, a = t.element, u = l.containment, i = u instanceof n ? u.get(0) : /parent/.test(u) ? a.parent().get(0) : u; i && (t.containerElement = n(i), /document/.test(u) || u === document ? (t.containerOffset = { left: 0, top: 0 }, t.containerPosition = { left: 0, top: 0 }, t.parentData = { element: n(document), left: 0, top: 0, width: n(document).width(), height: n(document).height() || document.body.parentNode.scrollHeight }) : (r = n(i), f = [], n(["Top", "Right", "Left", "Bottom"]).each(function (n, i) { f[n] = t._num(r.css("padding" + i)) }), t.containerOffset = r.offset(), t.containerPosition = r.position(), t.containerSize = { height: r.innerHeight() - f[3], width: r.innerWidth() - f[1] }, e = t.containerOffset, o = t.containerSize.height, s = t.containerSize.width, h = t._hasScroll(i, "left") ? i.scrollWidth : s, c = t._hasScroll(i) ? i.scrollHeight : o, t.parentData = { element: i, left: e.left, top: e.top, width: h, height: c })) }, resize: function (t) { var o, s, h, c, i = n(this).resizable("instance"), v = i.options, r = i.containerOffset, l = i.position, f = i._aspectRatio || t.shiftKey, e = { top: 0, left: 0 }, a = i.containerElement, u = !0; a[0] !== document && /static/.test(a.css("position")) && (e = r); l.left < (i._helper ? r.left : 0) && (i.size.width = i.size.width + (i._helper ? i.position.left - r.left : i.position.left - e.left), f && (i.size.height = i.size.width / i.aspectRatio, u = !1), i.position.left = v.helper ? r.left : 0); l.top < (i._helper ? r.top : 0) && (i.size.height = i.size.height + (i._helper ? i.position.top - r.top : i.position.top), f && (i.size.width = i.size.height * i.aspectRatio, u = !1), i.position.top = i._helper ? r.top : 0); h = i.containerElement.get(0) === i.element.parent().get(0); c = /relative|absolute/.test(i.containerElement.css("position")); h && c ? (i.offset.left = i.parentData.left + i.position.left, i.offset.top = i.parentData.top + i.position.top) : (i.offset.left = i.element.offset().left, i.offset.top = i.element.offset().top); o = Math.abs(i.sizeDiff.width + (i._helper ? i.offset.left - e.left : i.offset.left - r.left)); s = Math.abs(i.sizeDiff.height + (i._helper ? i.offset.top - e.top : i.offset.top - r.top)); o + i.size.width >= i.parentData.width && (i.size.width = i.parentData.width - o, f && (i.size.height = i.size.width / i.aspectRatio, u = !1)); s + i.size.height >= i.parentData.height && (i.size.height = i.parentData.height - s, f && (i.size.width = i.size.height * i.aspectRatio, u = !1)); u || (i.position.left = i.prevPosition.left, i.position.top = i.prevPosition.top, i.size.width = i.prevSize.width, i.size.height = i.prevSize.height) }, stop: function () { var t = n(this).resizable("instance"), r = t.options, u = t.containerOffset, f = t.containerPosition, e = t.containerElement, i = n(t.helper), o = i.offset(), s = i.outerWidth() - t.sizeDiff.width, h = i.outerHeight() - t.sizeDiff.height; t._helper && !r.animate && /relative/.test(e.css("position")) && n(this).css({ left: o.left - f.left - u.left, width: s, height: h }); t._helper && !r.animate && /static/.test(e.css("position")) && n(this).css({ left: o.left - f.left - u.left, width: s, height: h }) } }); n.ui.plugin.add("resizable", "alsoResize", { start: function () { var t = n(this).resizable("instance"), i = t.options; n(i.alsoResize).each(function () { var t = n(this); t.data("ui-resizable-alsoresize", { width: parseFloat(t.width()), height: parseFloat(t.height()), left: parseFloat(t.css("left")), top: parseFloat(t.css("top")) }) }) }, resize: function (t, i) { var r = n(this).resizable("instance"), e = r.options, u = r.originalSize, f = r.originalPosition, o = { height: r.size.height - u.height || 0, width: r.size.width - u.width || 0, top: r.position.top - f.top || 0, left: r.position.left - f.left || 0 }; n(e.alsoResize).each(function () { var t = n(this), u = n(this).data("ui-resizable-alsoresize"), r = {}, f = t.parents(i.originalElement[0]).length ? ["width", "height"] : ["width", "height", "top", "left"]; n.each(f, function (n, t) { var i = (u[t] || 0) + (o[t] || 0); i && i >= 0 && (r[t] = i || null) }); t.css(r) }) }, stop: function () { n(this).removeData("ui-resizable-alsoresize") } }); n.ui.plugin.add("resizable", "ghost", { start: function () { var t = n(this).resizable("instance"), i = t.size; t.ghost = t.originalElement.clone(); t.ghost.css({ opacity: .25, display: "block", position: "relative", height: i.height, width: i.width, margin: 0, left: 0, top: 0 }); t._addClass(t.ghost, "ui-resizable-ghost"); n.uiBackCompat !== !1 && typeof t.options.ghost == "string" && t.ghost.addClass(this.options.ghost); t.ghost.appendTo(t.helper) }, resize: function () { var t = n(this).resizable("instance"); t.ghost && t.ghost.css({ position: "relative", height: t.size.height, width: t.size.width }) }, stop: function () { var t = n(this).resizable("instance"); t.ghost && t.helper && t.helper.get(0).removeChild(t.ghost.get(0)) } }); n.ui.plugin.add("resizable", "grid", { resize: function () { var h, t = n(this).resizable("instance"), i = t.options, y = t.size, o = t.originalSize, s = t.originalPosition, c = t.axis, l = typeof i.grid == "number" ? [i.grid, i.grid] : i.grid, f = l[0] || 1, e = l[1] || 1, a = Math.round((y.width - o.width) / f) * f, v = Math.round((y.height - o.height) / e) * e, r = o.width + a, u = o.height + v, p = i.maxWidth && i.maxWidth < r, w = i.maxHeight && i.maxHeight < u, b = i.minWidth && i.minWidth > r, k = i.minHeight && i.minHeight > u; i.grid = l; b && (r += f); k && (u += e); p && (r -= f); w && (u -= e); /^(se|s|e)$/.test(c) ? (t.size.width = r, t.size.height = u) : /^(ne)$/.test(c) ? (t.size.width = r, t.size.height = u, t.position.top = s.top - v) : /^(sw)$/.test(c) ? (t.size.width = r, t.size.height = u, t.position.left = s.left - a) : ((u - e <= 0 || r - f <= 0) && (h = t._getPaddingPlusBorderDimensions(this)), u - e > 0 ? (t.size.height = u, t.position.top = s.top - v) : (u = e - h.height, t.size.height = u, t.position.top = s.top + o.height - u), r - f > 0 ? (t.size.width = r, t.position.left = s.left - a) : (r = f - h.width, t.size.width = r, t.position.left = s.left + o.width - r)) } }); wi = n.ui.resizable;
  456. /*!
  457. * jQuery UI Dialog 1.12.1
  458. * http://jqueryui.com
  459. *
  460. * Copyright jQuery Foundation and other contributors
  461. * Released under the MIT license.
  462. * http://jquery.org/license
  463. */
  464. n.widget("ui.dialog", { version: "1.12.1", options: { appendTo: "body", autoOpen: !0, buttons: [], classes: { "ui-dialog": "ui-corner-all", "ui-dialog-titlebar": "ui-corner-all" }, closeOnEscape: !0, closeText: "Close", draggable: !0, hide: null, height: "auto", maxHeight: null, maxWidth: null, minHeight: 150, minWidth: 150, modal: !1, position: { my: "center", at: "center", "of": window, collision: "fit", using: function (t) { var i = n(this).css(t).offset().top; i < 0 && n(this).css("top", t.top - i) } }, resizable: !0, show: null, title: null, width: 300, beforeClose: null, close: null, drag: null, dragStart: null, dragStop: null, focus: null, open: null, resize: null, resizeStart: null, resizeStop: null }, sizeRelatedOptions: { buttons: !0, height: !0, maxHeight: !0, maxWidth: !0, minHeight: !0, minWidth: !0, width: !0 }, resizableRelatedOptions: { maxHeight: !0, maxWidth: !0, minHeight: !0, minWidth: !0 }, _create: function () { this.originalCss = { display: this.element[0].style.display, width: this.element[0].style.width, minHeight: this.element[0].style.minHeight, maxHeight: this.element[0].style.maxHeight, height: this.element[0].style.height }; this.originalPosition = { parent: this.element.parent(), index: this.element.parent().children().index(this.element) }; this.originalTitle = this.element.attr("title"); this.options.title == null && this.originalTitle != null && (this.options.title = this.originalTitle); this.options.disabled && (this.options.disabled = !1); this._createWrapper(); this.element.show().removeAttr("title").appendTo(this.uiDialog); this._addClass("ui-dialog-content", "ui-widget-content"); this._createTitlebar(); this._createButtonPane(); this.options.draggable && n.fn.draggable && this._makeDraggable(); this.options.resizable && n.fn.resizable && this._makeResizable(); this._isOpen = !1; this._trackFocus() }, _init: function () { this.options.autoOpen && this.open() }, _appendTo: function () { var t = this.options.appendTo; return t && (t.jquery || t.nodeType) ? n(t) : this.document.find(t || "body").eq(0) }, _destroy: function () { var n, t = this.originalPosition; this._untrackInstance(); this._destroyOverlay(); this.element.removeUniqueId().css(this.originalCss).detach(); this.uiDialog.remove(); this.originalTitle && this.element.attr("title", this.originalTitle); n = t.parent.children().eq(t.index); n.length && n[0] !== this.element[0] ? n.before(this.element) : t.parent.append(this.element) }, widget: function () { return this.uiDialog }, disable: n.noop, enable: n.noop, close: function (t) { var i = this; this._isOpen && this._trigger("beforeClose", t) !== !1 && (this._isOpen = !1, this._focusedElement = null, this._destroyOverlay(), this._untrackInstance(), this.opener.filter(":focusable").trigger("focus").length || n.ui.safeBlur(n.ui.safeActiveElement(this.document[0])), this._hide(this.uiDialog, this.options.hide, function () { i._trigger("close", t) })) }, isOpen: function () { return this._isOpen }, moveToTop: function () { this._moveToTop() }, _moveToTop: function (t, i) { var r = !1, f = this.uiDialog.siblings(".ui-front:visible").map(function () { return +n(this).css("z-index") }).get(), u = Math.max.apply(null, f); return u >= +this.uiDialog.css("z-index") && (this.uiDialog.css("z-index", u + 1), r = !0), r && !i && this._trigger("focus", t), r }, open: function () { var t = this; if (this._isOpen) { this._moveToTop() && this._focusTabbable(); return } this._isOpen = !0; this.opener = n(n.ui.safeActiveElement(this.document[0])); this._size(); this._position(); this._createOverlay(); this._moveToTop(null, !0); this.overlay && this.overlay.css("z-index", this.uiDialog.css("z-index") - 1); this._show(this.uiDialog, this.options.show, function () { t._focusTabbable(); t._trigger("focus") }); this._makeFocusTarget(); this._trigger("open") }, _focusTabbable: function () { var n = this._focusedElement; n || (n = this.element.find("[autofocus]")); n.length || (n = this.element.find(":tabbable")); n.length || (n = this.uiDialogButtonPane.find(":tabbable")); n.length || (n = this.uiDialogTitlebarClose.filter(":tabbable")); n.length || (n = this.uiDialog); n.eq(0).trigger("focus") }, _keepFocus: function (t) { function i() { var t = n.ui.safeActiveElement(this.document[0]), i = this.uiDialog[0] === t || n.contains(this.uiDialog[0], t); i || this._focusTabbable() } t.preventDefault(); i.call(this); this._delay(i) }, _createWrapper: function () { this.uiDialog = n("<div>").hide().attr({ tabIndex: -1, role: "dialog" }).appendTo(this._appendTo()); this._addClass(this.uiDialog, "ui-dialog", "ui-widget ui-widget-content ui-front"); this._on(this.uiDialog, { keydown: function (t) { if (this.options.closeOnEscape && !t.isDefaultPrevented() && t.keyCode && t.keyCode === n.ui.keyCode.ESCAPE) { t.preventDefault(); this.close(t); return } if (t.keyCode === n.ui.keyCode.TAB && !t.isDefaultPrevented()) { var i = this.uiDialog.find(":tabbable"), r = i.filter(":first"), u = i.filter(":last"); t.target !== u[0] && t.target !== this.uiDialog[0] || t.shiftKey ? (t.target === r[0] || t.target === this.uiDialog[0]) && t.shiftKey && (this._delay(function () { u.trigger("focus") }), t.preventDefault()) : (this._delay(function () { r.trigger("focus") }), t.preventDefault()) } }, mousedown: function (n) { this._moveToTop(n) && this._focusTabbable() } }); this.element.find("[aria-describedby]").length || this.uiDialog.attr({ "aria-describedby": this.element.uniqueId().attr("id") }) }, _createTitlebar: function () { var t; this.uiDialogTitlebar = n("<div>"); this._addClass(this.uiDialogTitlebar, "ui-dialog-titlebar", "ui-widget-header ui-helper-clearfix"); this._on(this.uiDialogTitlebar, { mousedown: function (t) { n(t.target).closest(".ui-dialog-titlebar-close") || this.uiDialog.trigger("focus") } }); this.uiDialogTitlebarClose = n("<button type='button'><\/button>").button({ label: n("<a>").text(this.options.closeText).html(), icon: "ui-icon-closethick", showLabel: !1 }).appendTo(this.uiDialogTitlebar); this._addClass(this.uiDialogTitlebarClose, "ui-dialog-titlebar-close"); this._on(this.uiDialogTitlebarClose, { click: function (n) { n.preventDefault(); this.close(n) } }); t = n("<span>").uniqueId().prependTo(this.uiDialogTitlebar); this._addClass(t, "ui-dialog-title"); this._title(t); this.uiDialogTitlebar.prependTo(this.uiDialog); this.uiDialog.attr({ "aria-labelledby": t.attr("id") }) }, _title: function (n) { this.options.title ? n.text(this.options.title) : n.html("&#160;") }, _createButtonPane: function () { this.uiDialogButtonPane = n("<div>"); this._addClass(this.uiDialogButtonPane, "ui-dialog-buttonpane", "ui-widget-content ui-helper-clearfix"); this.uiButtonSet = n("<div>").appendTo(this.uiDialogButtonPane); this._addClass(this.uiButtonSet, "ui-dialog-buttonset"); this._createButtons() }, _createButtons: function () { var i = this, t = this.options.buttons; if (this.uiDialogButtonPane.remove(), this.uiButtonSet.empty(), n.isEmptyObject(t) || n.isArray(t) && !t.length) { this._removeClass(this.uiDialog, "ui-dialog-buttons"); return } n.each(t, function (t, r) { var u, f; r = n.isFunction(r) ? { click: r, text: t } : r; r = n.extend({ type: "button" }, r); u = r.click; f = { icon: r.icon, iconPosition: r.iconPosition, showLabel: r.showLabel, icons: r.icons, text: r.text }; delete r.click; delete r.icon; delete r.iconPosition; delete r.showLabel; delete r.icons; typeof r.text == "boolean" && delete r.text; n("<button><\/button>", r).button(f).appendTo(i.uiButtonSet).on("click", function () { u.apply(i.element[0], arguments) }) }); this._addClass(this.uiDialog, "ui-dialog-buttons"); this.uiDialogButtonPane.appendTo(this.uiDialog) }, _makeDraggable: function () { function i(n) { return { position: n.position, offset: n.offset } } var t = this, r = this.options; this.uiDialog.draggable({ cancel: ".ui-dialog-content, .ui-dialog-titlebar-close", handle: ".ui-dialog-titlebar", containment: "document", start: function (r, u) { t._addClass(n(this), "ui-dialog-dragging"); t._blockFrames(); t._trigger("dragStart", r, i(u)) }, drag: function (n, r) { t._trigger("drag", n, i(r)) }, stop: function (u, f) { var e = f.offset.left - t.document.scrollLeft(), o = f.offset.top - t.document.scrollTop(); r.position = { my: "left top", at: "left" + (e >= 0 ? "+" : "") + e + " top" + (o >= 0 ? "+" : "") + o, "of": t.window }; t._removeClass(n(this), "ui-dialog-dragging"); t._unblockFrames(); t._trigger("dragStop", u, i(f)) } }) }, _makeResizable: function () { function r(n) { return { originalPosition: n.originalPosition, originalSize: n.originalSize, position: n.position, size: n.size } } var t = this, i = this.options, u = i.resizable, f = this.uiDialog.css("position"), e = typeof u == "string" ? u : "n,e,s,w,se,sw,ne,nw"; this.uiDialog.resizable({ cancel: ".ui-dialog-content", containment: "document", alsoResize: this.element, maxWidth: i.maxWidth, maxHeight: i.maxHeight, minWidth: i.minWidth, minHeight: this._minHeight(), handles: e, start: function (i, u) { t._addClass(n(this), "ui-dialog-resizing"); t._blockFrames(); t._trigger("resizeStart", i, r(u)) }, resize: function (n, i) { t._trigger("resize", n, r(i)) }, stop: function (u, f) { var e = t.uiDialog.offset(), o = e.left - t.document.scrollLeft(), s = e.top - t.document.scrollTop(); i.height = t.uiDialog.height(); i.width = t.uiDialog.width(); i.position = { my: "left top", at: "left" + (o >= 0 ? "+" : "") + o + " top" + (s >= 0 ? "+" : "") + s, "of": t.window }; t._removeClass(n(this), "ui-dialog-resizing"); t._unblockFrames(); t._trigger("resizeStop", u, r(f)) } }).css("position", f) }, _trackFocus: function () { this._on(this.widget(), { focusin: function (t) { this._makeFocusTarget(); this._focusedElement = n(t.target) } }) }, _makeFocusTarget: function () { this._untrackInstance(); this._trackingInstances().unshift(this) }, _untrackInstance: function () { var t = this._trackingInstances(), i = n.inArray(this, t); i !== -1 && t.splice(i, 1) }, _trackingInstances: function () { var n = this.document.data("ui-dialog-instances"); return n || (n = [], this.document.data("ui-dialog-instances", n)), n }, _minHeight: function () { var n = this.options; return n.height === "auto" ? n.minHeight : Math.min(n.minHeight, n.height) }, _position: function () { var n = this.uiDialog.is(":visible"); n || this.uiDialog.show(); this.uiDialog.position(this.options.position); n || this.uiDialog.hide() }, _setOptions: function (t) { var i = this, r = !1, u = {}; n.each(t, function (n, t) { i._setOption(n, t); n in i.sizeRelatedOptions && (r = !0); n in i.resizableRelatedOptions && (u[n] = t) }); r && (this._size(), this._position()); this.uiDialog.is(":data(ui-resizable)") && this.uiDialog.resizable("option", u) }, _setOption: function (t, i) { var f, u, r = this.uiDialog; t !== "disabled" && (this._super(t, i), t === "appendTo" && this.uiDialog.appendTo(this._appendTo()), t === "buttons" && this._createButtons(), t === "closeText" && this.uiDialogTitlebarClose.button({ label: n("<a>").text("" + this.options.closeText).html() }), t === "draggable" && (f = r.is(":data(ui-draggable)"), f && !i && r.draggable("destroy"), !f && i && this._makeDraggable()), t === "position" && this._position(), t === "resizable" && (u = r.is(":data(ui-resizable)"), u && !i && r.resizable("destroy"), u && typeof i == "string" && r.resizable("option", "handles", i), u || i === !1 || this._makeResizable()), t === "title" && this._title(this.uiDialogTitlebar.find(".ui-dialog-title"))) }, _size: function () { var t, i, r, n = this.options; this.element.show().css({ width: "auto", minHeight: 0, maxHeight: "none", height: 0 }); n.minWidth > n.width && (n.width = n.minWidth); t = this.uiDialog.css({ height: "auto", width: n.width }).outerHeight(); i = Math.max(0, n.minHeight - t); r = typeof n.maxHeight == "number" ? Math.max(0, n.maxHeight - t) : "none"; n.height === "auto" ? this.element.css({ minHeight: i, maxHeight: r, height: "auto" }) : this.element.height(Math.max(0, n.height - t)); this.uiDialog.is(":data(ui-resizable)") && this.uiDialog.resizable("option", "minHeight", this._minHeight()) }, _blockFrames: function () { this.iframeBlocks = this.document.find("iframe").map(function () { var t = n(this); return n("<div>").css({ position: "absolute", width: t.outerWidth(), height: t.outerHeight() }).appendTo(t.parent()).offset(t.offset())[0] }) }, _unblockFrames: function () { this.iframeBlocks && (this.iframeBlocks.remove(), delete this.iframeBlocks) }, _allowInteraction: function (t) { return n(t.target).closest(".ui-dialog").length ? !0 : !!n(t.target).closest(".ui-datepicker").length }, _createOverlay: function () { if (this.options.modal) { var t = !0; this._delay(function () { t = !1 }); this.document.data("ui-dialog-overlays") || this._on(this.document, { focusin: function (n) { t || this._allowInteraction(n) || (n.preventDefault(), this._trackingInstances()[0]._focusTabbable()) } }); this.overlay = n("<div>").appendTo(this._appendTo()); this._addClass(this.overlay, null, "ui-widget-overlay ui-front"); this._on(this.overlay, { mousedown: "_keepFocus" }); this.document.data("ui-dialog-overlays", (this.document.data("ui-dialog-overlays") || 0) + 1) } }, _destroyOverlay: function () { if (this.options.modal && this.overlay) { var n = this.document.data("ui-dialog-overlays") - 1; n ? this.document.data("ui-dialog-overlays", n) : (this._off(this.document, "focusin"), this.document.removeData("ui-dialog-overlays")); this.overlay.remove(); this.overlay = null } } }); n.uiBackCompat !== !1 && n.widget("ui.dialog", n.ui.dialog, { options: { dialogClass: "" }, _createWrapper: function () { this._super(); this.uiDialog.addClass(this.options.dialogClass) }, _setOption: function (n, t) { n === "dialogClass" && this.uiDialog.removeClass(this.options.dialogClass).addClass(t); this._superApply(arguments) } }); bi = n.ui.dialog;
  465. /*!
  466. * jQuery UI Droppable 1.12.1
  467. * http://jqueryui.com
  468. *
  469. * Copyright jQuery Foundation and other contributors
  470. * Released under the MIT license.
  471. * http://jquery.org/license
  472. */
  473. n.widget("ui.droppable", { version: "1.12.1", widgetEventPrefix: "drop", options: { accept: "*", addClasses: !0, greedy: !1, scope: "default", tolerance: "intersect", activate: null, deactivate: null, drop: null, out: null, over: null }, _create: function () { var t, i = this.options, r = i.accept; this.isover = !1; this.isout = !0; this.accept = n.isFunction(r) ? r : function (n) { return n.is(r) }; this.proportions = function () { if (arguments.length) t = arguments[0]; else return t ? t : t = { width: this.element[0].offsetWidth, height: this.element[0].offsetHeight } }; this._addToManager(i.scope); i.addClasses && this._addClass("ui-droppable") }, _addToManager: function (t) { n.ui.ddmanager.droppables[t] = n.ui.ddmanager.droppables[t] || []; n.ui.ddmanager.droppables[t].push(this) }, _splice: function (n) { for (var t = 0; t < n.length; t++)n[t] === this && n.splice(t, 1) }, _destroy: function () { var t = n.ui.ddmanager.droppables[this.options.scope]; this._splice(t) }, _setOption: function (t, i) { if (t === "accept") this.accept = n.isFunction(i) ? i : function (n) { return n.is(i) }; else if (t === "scope") { var r = n.ui.ddmanager.droppables[this.options.scope]; this._splice(r); this._addToManager(i) } this._super(t, i) }, _activate: function (t) { var i = n.ui.ddmanager.current; this._addActiveClass(); i && this._trigger("activate", t, this.ui(i)) }, _deactivate: function (t) { var i = n.ui.ddmanager.current; this._removeActiveClass(); i && this._trigger("deactivate", t, this.ui(i)) }, _over: function (t) { var i = n.ui.ddmanager.current; i && (i.currentItem || i.element)[0] !== this.element[0] && this.accept.call(this.element[0], i.currentItem || i.element) && (this._addHoverClass(), this._trigger("over", t, this.ui(i))) }, _out: function (t) { var i = n.ui.ddmanager.current; i && (i.currentItem || i.element)[0] !== this.element[0] && this.accept.call(this.element[0], i.currentItem || i.element) && (this._removeHoverClass(), this._trigger("out", t, this.ui(i))) }, _drop: function (t, i) { var r = i || n.ui.ddmanager.current, u = !1; return !r || (r.currentItem || r.element)[0] === this.element[0] ? !1 : (this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function () { var i = n(this).droppable("instance"); if (i.options.greedy && !i.options.disabled && i.options.scope === r.options.scope && i.accept.call(i.element[0], r.currentItem || r.element) && e(r, n.extend(i, { offset: i.element.offset() }), i.options.tolerance, t)) return u = !0, !1 }), u) ? !1 : this.accept.call(this.element[0], r.currentItem || r.element) ? (this._removeActiveClass(), this._removeHoverClass(), this._trigger("drop", t, this.ui(r)), this.element) : !1 }, ui: function (n) { return { draggable: n.currentItem || n.element, helper: n.helper, position: n.position, offset: n.positionAbs } }, _addHoverClass: function () { this._addClass("ui-droppable-hover") }, _removeHoverClass: function () { this._removeClass("ui-droppable-hover") }, _addActiveClass: function () { this._addClass("ui-droppable-active") }, _removeActiveClass: function () { this._removeClass("ui-droppable-active") } }); e = n.ui.intersect = function () { function n(n, t, i) { return n >= t && n < t + i } return function (t, i, r, u) { if (!i.offset) return !1; var o = (t.positionAbs || t.position.absolute).left + t.margins.left, s = (t.positionAbs || t.position.absolute).top + t.margins.top, h = o + t.helperProportions.width, c = s + t.helperProportions.height, f = i.offset.left, e = i.offset.top, l = f + i.proportions().width, a = e + i.proportions().height; switch (r) { case "fit": return f <= o && h <= l && e <= s && c <= a; case "intersect": return f < o + t.helperProportions.width / 2 && h - t.helperProportions.width / 2 < l && e < s + t.helperProportions.height / 2 && c - t.helperProportions.height / 2 < a; case "pointer": return n(u.pageY, e, i.proportions().height) && n(u.pageX, f, i.proportions().width); case "touch": return (s >= e && s <= a || c >= e && c <= a || s < e && c > a) && (o >= f && o <= l || h >= f && h <= l || o < f && h > l); default: return !1 } } }(); n.ui.ddmanager = { current: null, droppables: { "default": [] }, prepareOffsets: function (t, i) { var r, f, u = n.ui.ddmanager.droppables[t.options.scope] || [], o = i ? i.type : null, e = (t.currentItem || t.element).find(":data(ui-droppable)").addBack(); n: for (r = 0; r < u.length; r++)if (!u[r].options.disabled && (!t || u[r].accept.call(u[r].element[0], t.currentItem || t.element))) { for (f = 0; f < e.length; f++)if (e[f] === u[r].element[0]) { u[r].proportions().height = 0; continue n } (u[r].visible = u[r].element.css("display") !== "none", u[r].visible) && (o === "mousedown" && u[r]._activate.call(u[r], i), u[r].offset = u[r].element.offset(), u[r].proportions({ width: u[r].element[0].offsetWidth, height: u[r].element[0].offsetHeight })) } }, drop: function (t, i) { var r = !1; return n.each((n.ui.ddmanager.droppables[t.options.scope] || []).slice(), function () { this.options && (!this.options.disabled && this.visible && e(t, this, this.options.tolerance, i) && (r = this._drop.call(this, i) || r), !this.options.disabled && this.visible && this.accept.call(this.element[0], t.currentItem || t.element) && (this.isout = !0, this.isover = !1, this._deactivate.call(this, i))) }), r }, dragStart: function (t, i) { t.element.parentsUntil("body").on("scroll.droppable", function () { t.options.refreshPositions || n.ui.ddmanager.prepareOffsets(t, i) }) }, drag: function (t, i) { t.options.refreshPositions && n.ui.ddmanager.prepareOffsets(t, i); n.each(n.ui.ddmanager.droppables[t.options.scope] || [], function () { if (!this.options.disabled && !this.greedyChild && this.visible) { var r, o, f, s = e(t, this, this.options.tolerance, i), u = !s && this.isover ? "isout" : s && !this.isover ? "isover" : null; u && (this.options.greedy && (o = this.options.scope, f = this.element.parents(":data(ui-droppable)").filter(function () { return n(this).droppable("instance").options.scope === o }), f.length && (r = n(f[0]).droppable("instance"), r.greedyChild = u === "isover")), r && u === "isover" && (r.isover = !1, r.isout = !0, r._out.call(r, i)), this[u] = !0, this[u === "isout" ? "isover" : "isout"] = !1, this[u === "isover" ? "_over" : "_out"].call(this, i), r && u === "isout" && (r.isout = !1, r.isover = !0, r._over.call(r, i))) } }) }, dragStop: function (t, i) { t.element.parentsUntil("body").off("scroll.droppable"); t.options.refreshPositions || n.ui.ddmanager.prepareOffsets(t, i) } }; n.uiBackCompat !== !1 && n.widget("ui.droppable", n.ui.droppable, { options: { hoverClass: !1, activeClass: !1 }, _addActiveClass: function () { this._super(); this.options.activeClass && this.element.addClass(this.options.activeClass) }, _removeActiveClass: function () { this._super(); this.options.activeClass && this.element.removeClass(this.options.activeClass) }, _addHoverClass: function () { this._super(); this.options.hoverClass && this.element.addClass(this.options.hoverClass) }, _removeHoverClass: function () { this._super(); this.options.hoverClass && this.element.removeClass(this.options.hoverClass) } }); ki = n.ui.droppable;
  474. /*!
  475. * jQuery UI Progressbar 1.12.1
  476. * http://jqueryui.com
  477. *
  478. * Copyright jQuery Foundation and other contributors
  479. * Released under the MIT license.
  480. * http://jquery.org/license
  481. */
  482. di = n.widget("ui.progressbar", { version: "1.12.1", options: { classes: { "ui-progressbar": "ui-corner-all", "ui-progressbar-value": "ui-corner-left", "ui-progressbar-complete": "ui-corner-right" }, max: 100, value: 0, change: null, complete: null }, min: 0, _create: function () { this.oldValue = this.options.value = this._constrainedValue(); this.element.attr({ role: "progressbar", "aria-valuemin": this.min }); this._addClass("ui-progressbar", "ui-widget ui-widget-content"); this.valueDiv = n("<div>").appendTo(this.element); this._addClass(this.valueDiv, "ui-progressbar-value", "ui-widget-header"); this._refreshValue() }, _destroy: function () { this.element.removeAttr("role aria-valuemin aria-valuemax aria-valuenow"); this.valueDiv.remove() }, value: function (n) { if (n === undefined) return this.options.value; this.options.value = this._constrainedValue(n); this._refreshValue() }, _constrainedValue: function (n) { return n === undefined && (n = this.options.value), this.indeterminate = n === !1, typeof n != "number" && (n = 0), this.indeterminate ? !1 : Math.min(this.options.max, Math.max(this.min, n)) }, _setOptions: function (n) { var t = n.value; delete n.value; this._super(n); this.options.value = this._constrainedValue(t); this._refreshValue() }, _setOption: function (n, t) { n === "max" && (t = Math.max(this.min, t)); this._super(n, t) }, _setOptionDisabled: function (n) { this._super(n); this.element.attr("aria-disabled", n); this._toggleClass(null, "ui-state-disabled", !!n) }, _percentage: function () { return this.indeterminate ? 100 : 100 * (this.options.value - this.min) / (this.options.max - this.min) }, _refreshValue: function () { var t = this.options.value, i = this._percentage(); this.valueDiv.toggle(this.indeterminate || t > this.min).width(i.toFixed(0) + "%"); this._toggleClass(this.valueDiv, "ui-progressbar-complete", null, t === this.options.max)._toggleClass("ui-progressbar-indeterminate", null, this.indeterminate); this.indeterminate ? (this.element.removeAttr("aria-valuenow"), this.overlayDiv || (this.overlayDiv = n("<div>").appendTo(this.valueDiv), this._addClass(this.overlayDiv, "ui-progressbar-overlay"))) : (this.element.attr({ "aria-valuemax": this.options.max, "aria-valuenow": t }), this.overlayDiv && (this.overlayDiv.remove(), this.overlayDiv = null)); this.oldValue !== t && (this.oldValue = t, this._trigger("change")); t === this.options.max && this._trigger("complete") } });
  483. /*!
  484. * jQuery UI Selectable 1.12.1
  485. * http://jqueryui.com
  486. *
  487. * Copyright jQuery Foundation and other contributors
  488. * Released under the MIT license.
  489. * http://jquery.org/license
  490. */
  491. gi = n.widget("ui.selectable", n.ui.mouse, { version: "1.12.1", options: { appendTo: "body", autoRefresh: !0, distance: 0, filter: "*", tolerance: "touch", selected: null, selecting: null, start: null, stop: null, unselected: null, unselecting: null }, _create: function () { var t = this; this._addClass("ui-selectable"); this.dragged = !1; this.refresh = function () { t.elementPos = n(t.element[0]).offset(); t.selectees = n(t.options.filter, t.element[0]); t._addClass(t.selectees, "ui-selectee"); t.selectees.each(function () { var i = n(this), u = i.offset(), r = { left: u.left - t.elementPos.left, top: u.top - t.elementPos.top }; n.data(this, "selectable-item", { element: this, $element: i, left: r.left, top: r.top, right: r.left + i.outerWidth(), bottom: r.top + i.outerHeight(), startselected: !1, selected: i.hasClass("ui-selected"), selecting: i.hasClass("ui-selecting"), unselecting: i.hasClass("ui-unselecting") }) }) }; this.refresh(); this._mouseInit(); this.helper = n("<div>"); this._addClass(this.helper, "ui-selectable-helper") }, _destroy: function () { this.selectees.removeData("selectable-item"); this._mouseDestroy() }, _mouseStart: function (t) { var i = this, r = this.options; (this.opos = [t.pageX, t.pageY], this.elementPos = n(this.element[0]).offset(), this.options.disabled) || (this.selectees = n(r.filter, this.element[0]), this._trigger("start", t), n(r.appendTo).append(this.helper), this.helper.css({ left: t.pageX, top: t.pageY, width: 0, height: 0 }), r.autoRefresh && this.refresh(), this.selectees.filter(".ui-selected").each(function () { var r = n.data(this, "selectable-item"); r.startselected = !0; t.metaKey || t.ctrlKey || (i._removeClass(r.$element, "ui-selected"), r.selected = !1, i._addClass(r.$element, "ui-unselecting"), r.unselecting = !0, i._trigger("unselecting", t, { unselecting: r.element })) }), n(t.target).parents().addBack().each(function () { var u, r = n.data(this, "selectable-item"); if (r) return u = !t.metaKey && !t.ctrlKey || !r.$element.hasClass("ui-selected"), i._removeClass(r.$element, u ? "ui-unselecting" : "ui-selected")._addClass(r.$element, u ? "ui-selecting" : "ui-unselecting"), r.unselecting = !u, r.selecting = u, r.selected = u, u ? i._trigger("selecting", t, { selecting: r.element }) : i._trigger("unselecting", t, { unselecting: r.element }), !1 })) }, _mouseDrag: function (t) { if (this.dragged = !0, !this.options.disabled) { var o, i = this, s = this.options, r = this.opos[0], u = this.opos[1], f = t.pageX, e = t.pageY; return r > f && (o = f, f = r, r = o), u > e && (o = e, e = u, u = o), this.helper.css({ left: r, top: u, width: f - r, height: e - u }), this.selectees.each(function () { var o = n.data(this, "selectable-item"), c = !1, h = {}; o && o.element !== i.element[0] && (h.left = o.left + i.elementPos.left, h.right = o.right + i.elementPos.left, h.top = o.top + i.elementPos.top, h.bottom = o.bottom + i.elementPos.top, s.tolerance === "touch" ? c = !(h.left > f || h.right < r || h.top > e || h.bottom < u) : s.tolerance === "fit" && (c = h.left > r && h.right < f && h.top > u && h.bottom < e), c ? (o.selected && (i._removeClass(o.$element, "ui-selected"), o.selected = !1), o.unselecting && (i._removeClass(o.$element, "ui-unselecting"), o.unselecting = !1), o.selecting || (i._addClass(o.$element, "ui-selecting"), o.selecting = !0, i._trigger("selecting", t, { selecting: o.element }))) : (o.selecting && ((t.metaKey || t.ctrlKey) && o.startselected ? (i._removeClass(o.$element, "ui-selecting"), o.selecting = !1, i._addClass(o.$element, "ui-selected"), o.selected = !0) : (i._removeClass(o.$element, "ui-selecting"), o.selecting = !1, o.startselected && (i._addClass(o.$element, "ui-unselecting"), o.unselecting = !0), i._trigger("unselecting", t, { unselecting: o.element }))), o.selected && (t.metaKey || t.ctrlKey || o.startselected || (i._removeClass(o.$element, "ui-selected"), o.selected = !1, i._addClass(o.$element, "ui-unselecting"), o.unselecting = !0, i._trigger("unselecting", t, { unselecting: o.element }))))) }), !1 } }, _mouseStop: function (t) { var i = this; return this.dragged = !1, n(".ui-unselecting", this.element[0]).each(function () { var r = n.data(this, "selectable-item"); i._removeClass(r.$element, "ui-unselecting"); r.unselecting = !1; r.startselected = !1; i._trigger("unselected", t, { unselected: r.element }) }), n(".ui-selecting", this.element[0]).each(function () { var r = n.data(this, "selectable-item"); i._removeClass(r.$element, "ui-selecting")._addClass(r.$element, "ui-selected"); r.selecting = !1; r.selected = !0; r.startselected = !0; i._trigger("selected", t, { selected: r.element }) }), this._trigger("stop", t), this.helper.remove(), !1 } });
  492. /*!
  493. * jQuery UI Selectmenu 1.12.1
  494. * http://jqueryui.com
  495. *
  496. * Copyright jQuery Foundation and other contributors
  497. * Released under the MIT license.
  498. * http://jquery.org/license
  499. */
  500. nr = n.widget("ui.selectmenu", [n.ui.formResetMixin, { version: "1.12.1", defaultElement: "<select>", options: { appendTo: null, classes: { "ui-selectmenu-button-open": "ui-corner-top", "ui-selectmenu-button-closed": "ui-corner-all" }, disabled: null, icons: { button: "ui-icon-triangle-1-s" }, position: { my: "left top", at: "left bottom", collision: "none" }, width: !1, change: null, close: null, focus: null, open: null, select: null }, _create: function () { var t = this.element.uniqueId().attr("id"); this.ids = { element: t, button: t + "-button", menu: t + "-menu" }; this._drawButton(); this._drawMenu(); this._bindFormResetHandler(); this._rendered = !1; this.menuItems = n() }, _drawButton: function () { var t, i = this, r = this._parseOption(this.element.find("option:selected"), this.element[0].selectedIndex); this.labels = this.element.labels().attr("for", this.ids.button); this._on(this.labels, { click: function (n) { this.button.focus(); n.preventDefault() } }); this.element.hide(); this.button = n("<span>", { tabindex: this.options.disabled ? -1 : 0, id: this.ids.button, role: "combobox", "aria-expanded": "false", "aria-autocomplete": "list", "aria-owns": this.ids.menu, "aria-haspopup": "true", title: this.element.attr("title") }).insertAfter(this.element); this._addClass(this.button, "ui-selectmenu-button ui-selectmenu-button-closed", "ui-button ui-widget"); t = n("<span>").appendTo(this.button); this._addClass(t, "ui-selectmenu-icon", "ui-icon " + this.options.icons.button); this.buttonItem = this._renderButtonItem(r).appendTo(this.button); this.options.width !== !1 && this._resizeButton(); this._on(this.button, this._buttonEvents); this.button.one("focusin", function () { i._rendered || i._refreshMenu() }) }, _drawMenu: function () { var t = this; this.menu = n("<ul>", { "aria-hidden": "true", "aria-labelledby": this.ids.button, id: this.ids.menu }); this.menuWrap = n("<div>").append(this.menu); this._addClass(this.menuWrap, "ui-selectmenu-menu", "ui-front"); this.menuWrap.appendTo(this._appendTo()); this.menuInstance = this.menu.menu({ classes: { "ui-menu": "ui-corner-bottom" }, role: "listbox", select: function (n, i) { n.preventDefault(); t._setSelection(); t._select(i.item.data("ui-selectmenu-item"), n) }, focus: function (n, i) { var r = i.item.data("ui-selectmenu-item"); t.focusIndex != null && r.index !== t.focusIndex && (t._trigger("focus", n, { item: r }), t.isOpen || t._select(r, n)); t.focusIndex = r.index; t.button.attr("aria-activedescendant", t.menuItems.eq(r.index).attr("id")) } }).menu("instance"); this.menuInstance._off(this.menu, "mouseleave"); this.menuInstance._closeOnDocumentClick = function () { return !1 }; this.menuInstance._isDivider = function () { return !1 } }, refresh: function () { this._refreshMenu(); this.buttonItem.replaceWith(this.buttonItem = this._renderButtonItem(this._getSelectedItem().data("ui-selectmenu-item") || {})); this.options.width === null && this._resizeButton() }, _refreshMenu: function () { var n, t = this.element.find("option"); (this.menu.empty(), this._parseOptions(t), this._renderMenu(this.menu, this.items), this.menuInstance.refresh(), this.menuItems = this.menu.find("li").not(".ui-selectmenu-optgroup").find(".ui-menu-item-wrapper"), this._rendered = !0, t.length) && (n = this._getSelectedItem(), this.menuInstance.focus(null, n), this._setAria(n.data("ui-selectmenu-item")), this._setOption("disabled", this.element.prop("disabled"))) }, open: function (n) { this.options.disabled || (this._rendered ? (this._removeClass(this.menu.find(".ui-state-active"), null, "ui-state-active"), this.menuInstance.focus(null, this._getSelectedItem())) : this._refreshMenu(), this.menuItems.length) && (this.isOpen = !0, this._toggleAttr(), this._resizeMenu(), this._position(), this._on(this.document, this._documentClick), this._trigger("open", n)) }, _position: function () { this.menuWrap.position(n.extend({ "of": this.button }, this.options.position)) }, close: function (n) { this.isOpen && (this.isOpen = !1, this._toggleAttr(), this.range = null, this._off(this.document), this._trigger("close", n)) }, widget: function () { return this.button }, menuWidget: function () { return this.menu }, _renderButtonItem: function (t) { var i = n("<span>"); return this._setText(i, t.label), this._addClass(i, "ui-selectmenu-text"), i }, _renderMenu: function (t, i) { var r = this, u = ""; n.each(i, function (i, f) { var e; f.optgroup !== u && (e = n("<li>", { text: f.optgroup }), r._addClass(e, "ui-selectmenu-optgroup", "ui-menu-divider" + (f.element.parent("optgroup").prop("disabled") ? " ui-state-disabled" : "")), e.appendTo(t), u = f.optgroup); r._renderItemData(t, f) }) }, _renderItemData: function (n, t) { return this._renderItem(n, t).data("ui-selectmenu-item", t) }, _renderItem: function (t, i) { var r = n("<li>"), u = n("<div>", { title: i.element.attr("title") }); return i.disabled && this._addClass(r, null, "ui-state-disabled"), this._setText(u, i.label), r.append(u).appendTo(t) }, _setText: function (n, t) { t ? n.text(t) : n.html("&#160;") }, _move: function (n, t) { var i, r, u = ".ui-menu-item"; this.isOpen ? i = this.menuItems.eq(this.focusIndex).parent("li") : (i = this.menuItems.eq(this.element[0].selectedIndex).parent("li"), u += ":not(.ui-state-disabled)"); r = n === "first" || n === "last" ? i[n === "first" ? "prevAll" : "nextAll"](u).eq(-1) : i[n + "All"](u).eq(0); r.length && this.menuInstance.focus(t, r) }, _getSelectedItem: function () { return this.menuItems.eq(this.element[0].selectedIndex).parent("li") }, _toggle: function (n) { this[this.isOpen ? "close" : "open"](n) }, _setSelection: function () { var n; this.range && (window.getSelection ? (n = window.getSelection(), n.removeAllRanges(), n.addRange(this.range)) : this.range.select(), this.button.focus()) }, _documentClick: { mousedown: function (t) { this.isOpen && (n(t.target).closest(".ui-selectmenu-menu, #" + n.ui.escapeSelector(this.ids.button)).length || this.close(t)) } }, _buttonEvents: { mousedown: function () { var n; window.getSelection ? (n = window.getSelection(), n.rangeCount && (this.range = n.getRangeAt(0))) : this.range = document.selection.createRange() }, click: function (n) { this._setSelection(); this._toggle(n) }, keydown: function (t) { var i = !0; switch (t.keyCode) { case n.ui.keyCode.TAB: case n.ui.keyCode.ESCAPE: this.close(t); i = !1; break; case n.ui.keyCode.ENTER: this.isOpen && this._selectFocusedItem(t); break; case n.ui.keyCode.UP: t.altKey ? this._toggle(t) : this._move("prev", t); break; case n.ui.keyCode.DOWN: t.altKey ? this._toggle(t) : this._move("next", t); break; case n.ui.keyCode.SPACE: this.isOpen ? this._selectFocusedItem(t) : this._toggle(t); break; case n.ui.keyCode.LEFT: this._move("prev", t); break; case n.ui.keyCode.RIGHT: this._move("next", t); break; case n.ui.keyCode.HOME: case n.ui.keyCode.PAGE_UP: this._move("first", t); break; case n.ui.keyCode.END: case n.ui.keyCode.PAGE_DOWN: this._move("last", t); break; default: this.menu.trigger(t); i = !1 }i && t.preventDefault() } }, _selectFocusedItem: function (n) { var t = this.menuItems.eq(this.focusIndex).parent("li"); t.hasClass("ui-state-disabled") || this._select(t.data("ui-selectmenu-item"), n) }, _select: function (n, t) { var i = this.element[0].selectedIndex; this.element[0].selectedIndex = n.index; this.buttonItem.replaceWith(this.buttonItem = this._renderButtonItem(n)); this._setAria(n); this._trigger("select", t, { item: n }); n.index !== i && this._trigger("change", t, { item: n }); this.close(t) }, _setAria: function (n) { var t = this.menuItems.eq(n.index).attr("id"); this.button.attr({ "aria-labelledby": t, "aria-activedescendant": t }); this.menu.attr("aria-activedescendant", t) }, _setOption: function (n, t) { if (n === "icons") { var i = this.button.find("span.ui-icon"); this._removeClass(i, null, this.options.icons.button)._addClass(i, null, t.button) } this._super(n, t); n === "appendTo" && this.menuWrap.appendTo(this._appendTo()); n === "width" && this._resizeButton() }, _setOptionDisabled: function (n) { this._super(n); this.menuInstance.option("disabled", n); this.button.attr("aria-disabled", n); this._toggleClass(this.button, null, "ui-state-disabled", n); this.element.prop("disabled", n); n ? (this.button.attr("tabindex", -1), this.close()) : this.button.attr("tabindex", 0) }, _appendTo: function () { var t = this.options.appendTo; return t && (t = t.jquery || t.nodeType ? n(t) : this.document.find(t).eq(0)), t && t[0] || (t = this.element.closest(".ui-front, dialog")), t.length || (t = this.document[0].body), t }, _toggleAttr: function () { this.button.attr("aria-expanded", this.isOpen); this._removeClass(this.button, "ui-selectmenu-button-" + (this.isOpen ? "closed" : "open"))._addClass(this.button, "ui-selectmenu-button-" + (this.isOpen ? "open" : "closed"))._toggleClass(this.menuWrap, "ui-selectmenu-open", null, this.isOpen); this.menu.attr("aria-hidden", !this.isOpen) }, _resizeButton: function () { var n = this.options.width; if (n === !1) { this.button.css("width", ""); return } n === null && (n = this.element.show().outerWidth(), this.element.hide()); this.button.outerWidth(n) }, _resizeMenu: function () { this.menu.outerWidth(Math.max(this.button.outerWidth(), this.menu.width("").outerWidth() + 1)) }, _getCreateOptions: function () { var n = this._super(); return n.disabled = this.element.prop("disabled"), n }, _parseOptions: function (t) { var r = this, i = []; t.each(function (t, u) { i.push(r._parseOption(n(u), t)) }); this.items = i }, _parseOption: function (n, t) { var i = n.parent("optgroup"); return { element: n, index: t, value: n.val(), label: n.text(), optgroup: i.attr("label") || "", disabled: i.prop("disabled") || n.prop("disabled") } }, _destroy: function () { this._unbindFormResetHandler(); this.menuWrap.remove(); this.button.remove(); this.element.show(); this.element.removeUniqueId(); this.labels.attr("for", this.ids.element) } }]);
  501. /*!
  502. * jQuery UI Slider 1.12.1
  503. * http://jqueryui.com
  504. *
  505. * Copyright jQuery Foundation and other contributors
  506. * Released under the MIT license.
  507. * http://jquery.org/license
  508. */
  509. tr = n.widget("ui.slider", n.ui.mouse, { version: "1.12.1", widgetEventPrefix: "slide", options: { animate: !1, classes: { "ui-slider": "ui-corner-all", "ui-slider-handle": "ui-corner-all", "ui-slider-range": "ui-corner-all ui-widget-header" }, distance: 0, max: 100, min: 0, orientation: "horizontal", range: !1, step: 1, value: 0, values: null, change: null, slide: null, start: null, stop: null }, numPages: 5, _create: function () { this._keySliding = !1; this._mouseSliding = !1; this._animateOff = !0; this._handleIndex = null; this._detectOrientation(); this._mouseInit(); this._calculateNewMax(); this._addClass("ui-slider ui-slider-" + this.orientation, "ui-widget ui-widget-content"); this._refresh(); this._animateOff = !1 }, _refresh: function () { this._createRange(); this._createHandles(); this._setupEvents(); this._refreshValue() }, _createHandles: function () { var r, i, u = this.options, t = this.element.find(".ui-slider-handle"), f = []; for (i = u.values && u.values.length || 1, t.length > i && (t.slice(i).remove(), t = t.slice(0, i)), r = t.length; r < i; r++)f.push("<span tabindex='0'><\/span>"); this.handles = t.add(n(f.join("")).appendTo(this.element)); this._addClass(this.handles, "ui-slider-handle", "ui-state-default"); this.handle = this.handles.eq(0); this.handles.each(function (t) { n(this).data("ui-slider-handle-index", t).attr("tabIndex", 0) }) }, _createRange: function () { var t = this.options; t.range ? (t.range === !0 && (t.values ? t.values.length && t.values.length !== 2 ? t.values = [t.values[0], t.values[0]] : n.isArray(t.values) && (t.values = t.values.slice(0)) : t.values = [this._valueMin(), this._valueMin()]), this.range && this.range.length ? (this._removeClass(this.range, "ui-slider-range-min ui-slider-range-max"), this.range.css({ left: "", bottom: "" })) : (this.range = n("<div>").appendTo(this.element), this._addClass(this.range, "ui-slider-range")), (t.range === "min" || t.range === "max") && this._addClass(this.range, "ui-slider-range-" + t.range)) : (this.range && this.range.remove(), this.range = null) }, _setupEvents: function () { this._off(this.handles); this._on(this.handles, this._handleEvents); this._hoverable(this.handles); this._focusable(this.handles) }, _destroy: function () { this.handles.remove(); this.range && this.range.remove(); this._mouseDestroy() }, _mouseCapture: function (t) { var s, f, r, i, u, h, e, c, o = this, l = this.options; return l.disabled ? !1 : (this.elementSize = { width: this.element.outerWidth(), height: this.element.outerHeight() }, this.elementOffset = this.element.offset(), s = { x: t.pageX, y: t.pageY }, f = this._normValueFromMouse(s), r = this._valueMax() - this._valueMin() + 1, this.handles.each(function (t) { var e = Math.abs(f - o.values(t)); (r > e || r === e && (t === o._lastChangedValue || o.values(t) === l.min)) && (r = e, i = n(this), u = t) }), h = this._start(t, u), h === !1) ? !1 : (this._mouseSliding = !0, this._handleIndex = u, this._addClass(i, null, "ui-state-active"), i.trigger("focus"), e = i.offset(), c = !n(t.target).parents().addBack().is(".ui-slider-handle"), this._clickOffset = c ? { left: 0, top: 0 } : { left: t.pageX - e.left - i.width() / 2, top: t.pageY - e.top - i.height() / 2 - (parseInt(i.css("borderTopWidth"), 10) || 0) - (parseInt(i.css("borderBottomWidth"), 10) || 0) + (parseInt(i.css("marginTop"), 10) || 0) }, this.handles.hasClass("ui-state-hover") || this._slide(t, u, f), this._animateOff = !0, !0) }, _mouseStart: function () { return !0 }, _mouseDrag: function (n) { var t = { x: n.pageX, y: n.pageY }, i = this._normValueFromMouse(t); return this._slide(n, this._handleIndex, i), !1 }, _mouseStop: function (n) { return this._removeClass(this.handles, null, "ui-state-active"), this._mouseSliding = !1, this._stop(n, this._handleIndex), this._change(n, this._handleIndex), this._handleIndex = null, this._clickOffset = null, this._animateOff = !1, !1 }, _detectOrientation: function () { this.orientation = this.options.orientation === "vertical" ? "vertical" : "horizontal" }, _normValueFromMouse: function (n) { var i, r, t, u, f; return this.orientation === "horizontal" ? (i = this.elementSize.width, r = n.x - this.elementOffset.left - (this._clickOffset ? this._clickOffset.left : 0)) : (i = this.elementSize.height, r = n.y - this.elementOffset.top - (this._clickOffset ? this._clickOffset.top : 0)), t = r / i, t > 1 && (t = 1), t < 0 && (t = 0), this.orientation === "vertical" && (t = 1 - t), u = this._valueMax() - this._valueMin(), f = this._valueMin() + t * u, this._trimAlignValue(f) }, _uiHash: function (n, t, i) { var r = { handle: this.handles[n], handleIndex: n, value: t !== undefined ? t : this.value() }; return this._hasMultipleValues() && (r.value = t !== undefined ? t : this.values(n), r.values = i || this.values()), r }, _hasMultipleValues: function () { return this.options.values && this.options.values.length }, _start: function (n, t) { return this._trigger("start", n, this._uiHash(t)) }, _slide: function (n, t, i) { var u, r, f = this.value(), e = this.values(); (this._hasMultipleValues() && (r = this.values(t ? 0 : 1), f = this.values(t), this.options.values.length === 2 && this.options.range === !0 && (i = t === 0 ? Math.min(r, i) : Math.max(r, i)), e[t] = i), i !== f) && (u = this._trigger("slide", n, this._uiHash(t, i, e)), u !== !1) && (this._hasMultipleValues() ? this.values(t, i) : this.value(i)) }, _stop: function (n, t) { this._trigger("stop", n, this._uiHash(t)) }, _change: function (n, t) { this._keySliding || this._mouseSliding || (this._lastChangedValue = t, this._trigger("change", n, this._uiHash(t))) }, value: function (n) { if (arguments.length) { this.options.value = this._trimAlignValue(n); this._refreshValue(); this._change(null, 0); return } return this._value() }, values: function (t, i) { var u, f, r; if (arguments.length > 1) { this.options.values[t] = this._trimAlignValue(i); this._refreshValue(); this._change(null, t); return } if (arguments.length) if (n.isArray(arguments[0])) { for (u = this.options.values, f = arguments[0], r = 0; r < u.length; r += 1)u[r] = this._trimAlignValue(f[r]), this._change(null, r); this._refreshValue() } else return this._hasMultipleValues() ? this._values(t) : this.value(); else return this._values() }, _setOption: function (t, i) { var r, u = 0; t === "range" && this.options.range === !0 && (i === "min" ? (this.options.value = this._values(0), this.options.values = null) : i === "max" && (this.options.value = this._values(this.options.values.length - 1), this.options.values = null)); n.isArray(this.options.values) && (u = this.options.values.length); this._super(t, i); switch (t) { case "orientation": this._detectOrientation(); this._removeClass("ui-slider-horizontal ui-slider-vertical")._addClass("ui-slider-" + this.orientation); this._refreshValue(); this.options.range && this._refreshRange(i); this.handles.css(i === "horizontal" ? "bottom" : "left", ""); break; case "value": this._animateOff = !0; this._refreshValue(); this._change(null, 0); this._animateOff = !1; break; case "values": for (this._animateOff = !0, this._refreshValue(), r = u - 1; r >= 0; r--)this._change(null, r); this._animateOff = !1; break; case "step": case "min": case "max": this._animateOff = !0; this._calculateNewMax(); this._refreshValue(); this._animateOff = !1; break; case "range": this._animateOff = !0; this._refresh(); this._animateOff = !1 } }, _setOptionDisabled: function (n) { this._super(n); this._toggleClass(null, "ui-state-disabled", !!n) }, _value: function () { var n = this.options.value; return this._trimAlignValue(n) }, _values: function (n) { var r, t, i; if (arguments.length) return r = this.options.values[n], this._trimAlignValue(r); if (this._hasMultipleValues()) { for (t = this.options.values.slice(), i = 0; i < t.length; i += 1)t[i] = this._trimAlignValue(t[i]); return t } return [] }, _trimAlignValue: function (n) { if (n <= this._valueMin()) return this._valueMin(); if (n >= this._valueMax()) return this._valueMax(); var t = this.options.step > 0 ? this.options.step : 1, i = (n - this._valueMin()) % t, r = n - i; return Math.abs(i) * 2 >= t && (r += i > 0 ? t : -t), parseFloat(r.toFixed(5)) }, _calculateNewMax: function () { var n = this.options.max, i = this._valueMin(), t = this.options.step, r = Math.round((n - i) / t) * t; n = r + i; n > this.options.max && (n -= t); this.max = parseFloat(n.toFixed(this._precision())) }, _precision: function () { var n = this._precisionOf(this.options.step); return this.options.min !== null && (n = Math.max(n, this._precisionOf(this.options.min))), n }, _precisionOf: function (n) { var t = n.toString(), i = t.indexOf("."); return i === -1 ? 0 : t.length - i - 1 }, _valueMin: function () { return this.options.min }, _valueMax: function () { return this.max }, _refreshRange: function (n) { n === "vertical" && this.range.css({ width: "", left: "" }); n === "horizontal" && this.range.css({ height: "", bottom: "" }) }, _refreshValue: function () { var s, t, c, f, h, e = this.options.range, i = this.options, r = this, u = this._animateOff ? !1 : i.animate, o = {}; this._hasMultipleValues() ? this.handles.each(function (f) { t = (r.values(f) - r._valueMin()) / (r._valueMax() - r._valueMin()) * 100; o[r.orientation === "horizontal" ? "left" : "bottom"] = t + "%"; n(this).stop(1, 1)[u ? "animate" : "css"](o, i.animate); r.options.range === !0 && (r.orientation === "horizontal" ? (f === 0 && r.range.stop(1, 1)[u ? "animate" : "css"]({ left: t + "%" }, i.animate), f === 1 && r.range[u ? "animate" : "css"]({ width: t - s + "%" }, { queue: !1, duration: i.animate })) : (f === 0 && r.range.stop(1, 1)[u ? "animate" : "css"]({ bottom: t + "%" }, i.animate), f === 1 && r.range[u ? "animate" : "css"]({ height: t - s + "%" }, { queue: !1, duration: i.animate }))); s = t }) : (c = this.value(), f = this._valueMin(), h = this._valueMax(), t = h !== f ? (c - f) / (h - f) * 100 : 0, o[this.orientation === "horizontal" ? "left" : "bottom"] = t + "%", this.handle.stop(1, 1)[u ? "animate" : "css"](o, i.animate), e === "min" && this.orientation === "horizontal" && this.range.stop(1, 1)[u ? "animate" : "css"]({ width: t + "%" }, i.animate), e === "max" && this.orientation === "horizontal" && this.range.stop(1, 1)[u ? "animate" : "css"]({ width: 100 - t + "%" }, i.animate), e === "min" && this.orientation === "vertical" && this.range.stop(1, 1)[u ? "animate" : "css"]({ height: t + "%" }, i.animate), e === "max" && this.orientation === "vertical" && this.range.stop(1, 1)[u ? "animate" : "css"]({ height: 100 - t + "%" }, i.animate)) }, _handleEvents: { keydown: function (t) { var e, r, i, u, f = n(t.target).data("ui-slider-handle-index"); switch (t.keyCode) { case n.ui.keyCode.HOME: case n.ui.keyCode.END: case n.ui.keyCode.PAGE_UP: case n.ui.keyCode.PAGE_DOWN: case n.ui.keyCode.UP: case n.ui.keyCode.RIGHT: case n.ui.keyCode.DOWN: case n.ui.keyCode.LEFT: if (t.preventDefault(), !this._keySliding && (this._keySliding = !0, this._addClass(n(t.target), null, "ui-state-active"), e = this._start(t, f), e === !1)) return }u = this.options.step; r = this._hasMultipleValues() ? i = this.values(f) : i = this.value(); switch (t.keyCode) { case n.ui.keyCode.HOME: i = this._valueMin(); break; case n.ui.keyCode.END: i = this._valueMax(); break; case n.ui.keyCode.PAGE_UP: i = this._trimAlignValue(r + (this._valueMax() - this._valueMin()) / this.numPages); break; case n.ui.keyCode.PAGE_DOWN: i = this._trimAlignValue(r - (this._valueMax() - this._valueMin()) / this.numPages); break; case n.ui.keyCode.UP: case n.ui.keyCode.RIGHT: if (r === this._valueMax()) return; i = this._trimAlignValue(r + u); break; case n.ui.keyCode.DOWN: case n.ui.keyCode.LEFT: if (r === this._valueMin()) return; i = this._trimAlignValue(r - u) }this._slide(t, f, i) }, keyup: function (t) { var i = n(t.target).data("ui-slider-handle-index"); this._keySliding && (this._keySliding = !1, this._stop(t, i), this._change(t, i), this._removeClass(n(t.target), null, "ui-state-active")) } } });
  510. /*!
  511. * jQuery UI Sortable 1.12.1
  512. * http://jqueryui.com
  513. *
  514. * Copyright jQuery Foundation and other contributors
  515. * Released under the MIT license.
  516. * http://jquery.org/license
  517. */
  518. ir = n.widget("ui.sortable", n.ui.mouse, { version: "1.12.1", widgetEventPrefix: "sort", ready: !1, options: { appendTo: "parent", axis: !1, connectWith: !1, containment: !1, cursor: "auto", cursorAt: !1, dropOnEmpty: !0, forcePlaceholderSize: !1, forceHelperSize: !1, grid: !1, handle: !1, helper: "original", items: "> *", opacity: !1, placeholder: !1, revert: !1, scroll: !0, scrollSensitivity: 20, scrollSpeed: 20, scope: "default", tolerance: "intersect", zIndex: 1e3, activate: null, beforeStop: null, change: null, deactivate: null, out: null, over: null, receive: null, remove: null, sort: null, start: null, stop: null, update: null }, _isOverAxis: function (n, t, i) { return n >= t && n < t + i }, _isFloating: function (n) { return /left|right/.test(n.css("float")) || /inline|table-cell/.test(n.css("display")) }, _create: function () { this.containerCache = {}; this._addClass("ui-sortable"); this.refresh(); this.offset = this.element.offset(); this._mouseInit(); this._setHandleClassName(); this.ready = !0 }, _setOption: function (n, t) { this._super(n, t); n === "handle" && this._setHandleClassName() }, _setHandleClassName: function () { var t = this; this._removeClass(this.element.find(".ui-sortable-handle"), "ui-sortable-handle"); n.each(this.items, function () { t._addClass(this.instance.options.handle ? this.item.find(this.instance.options.handle) : this.item, "ui-sortable-handle") }) }, _destroy: function () { this._mouseDestroy(); for (var n = this.items.length - 1; n >= 0; n--)this.items[n].item.removeData(this.widgetName + "-item"); return this }, _mouseCapture: function (t, i) { var r = null, f = !1, u = this; return this.reverting ? !1 : this.options.disabled || this.options.type === "static" ? !1 : (this._refreshItems(t), n(t.target).parents().each(function () { if (n.data(this, u.widgetName + "-item") === u) return r = n(this), !1 }), n.data(t.target, u.widgetName + "-item") === u && (r = n(t.target)), !r) ? !1 : this.options.handle && !i && (n(this.options.handle, r).find("*").addBack().each(function () { this === t.target && (f = !0) }), !f) ? !1 : (this.currentItem = r, this._removeCurrentsFromItems(), !0) }, _mouseStart: function (t, i, r) { var f, e, u = this.options; if (this.currentContainer = this, this.refreshPositions(), this.helper = this._createHelper(t), this._cacheHelperProportions(), this._cacheMargins(), this.scrollParent = this.helper.scrollParent(), this.offset = this.currentItem.offset(), this.offset = { top: this.offset.top - this.margins.top, left: this.offset.left - this.margins.left }, n.extend(this.offset, { click: { left: t.pageX - this.offset.left, top: t.pageY - this.offset.top }, parent: this._getParentOffset(), relative: this._getRelativeOffset() }), this.helper.css("position", "absolute"), this.cssPosition = this.helper.css("position"), this.originalPosition = this._generatePosition(t), this.originalPageX = t.pageX, this.originalPageY = t.pageY, u.cursorAt && this._adjustOffsetFromHelper(u.cursorAt), this.domPosition = { prev: this.currentItem.prev()[0], parent: this.currentItem.parent()[0] }, this.helper[0] !== this.currentItem[0] && this.currentItem.hide(), this._createPlaceholder(), u.containment && this._setContainment(), u.cursor && u.cursor !== "auto" && (e = this.document.find("body"), this.storedCursor = e.css("cursor"), e.css("cursor", u.cursor), this.storedStylesheet = n("<style>*{ cursor: " + u.cursor + " !important; }<\/style>").appendTo(e)), u.opacity && (this.helper.css("opacity") && (this._storedOpacity = this.helper.css("opacity")), this.helper.css("opacity", u.opacity)), u.zIndex && (this.helper.css("zIndex") && (this._storedZIndex = this.helper.css("zIndex")), this.helper.css("zIndex", u.zIndex)), this.scrollParent[0] !== this.document[0] && this.scrollParent[0].tagName !== "HTML" && (this.overflowOffset = this.scrollParent.offset()), this._trigger("start", t, this._uiHash()), this._preserveHelperProportions || this._cacheHelperProportions(), !r) for (f = this.containers.length - 1; f >= 0; f--)this.containers[f]._trigger("activate", t, this._uiHash(this)); return n.ui.ddmanager && (n.ui.ddmanager.current = this), n.ui.ddmanager && !u.dropBehaviour && n.ui.ddmanager.prepareOffsets(this, t), this.dragging = !0, this._addClass(this.helper, "ui-sortable-helper"), this._mouseDrag(t), !0 }, _mouseDrag: function (t) { var e, u, f, o, i = this.options, r = !1; for (this.position = this._generatePosition(t), this.positionAbs = this._convertPositionTo("absolute"), this.lastPositionAbs || (this.lastPositionAbs = this.positionAbs), this.options.scroll && (this.scrollParent[0] !== this.document[0] && this.scrollParent[0].tagName !== "HTML" ? (this.overflowOffset.top + this.scrollParent[0].offsetHeight - t.pageY < i.scrollSensitivity ? this.scrollParent[0].scrollTop = r = this.scrollParent[0].scrollTop + i.scrollSpeed : t.pageY - this.overflowOffset.top < i.scrollSensitivity && (this.scrollParent[0].scrollTop = r = this.scrollParent[0].scrollTop - i.scrollSpeed), this.overflowOffset.left + this.scrollParent[0].offsetWidth - t.pageX < i.scrollSensitivity ? this.scrollParent[0].scrollLeft = r = this.scrollParent[0].scrollLeft + i.scrollSpeed : t.pageX - this.overflowOffset.left < i.scrollSensitivity && (this.scrollParent[0].scrollLeft = r = this.scrollParent[0].scrollLeft - i.scrollSpeed)) : (t.pageY - this.document.scrollTop() < i.scrollSensitivity ? r = this.document.scrollTop(this.document.scrollTop() - i.scrollSpeed) : this.window.height() - (t.pageY - this.document.scrollTop()) < i.scrollSensitivity && (r = this.document.scrollTop(this.document.scrollTop() + i.scrollSpeed)), t.pageX - this.document.scrollLeft() < i.scrollSensitivity ? r = this.document.scrollLeft(this.document.scrollLeft() - i.scrollSpeed) : this.window.width() - (t.pageX - this.document.scrollLeft()) < i.scrollSensitivity && (r = this.document.scrollLeft(this.document.scrollLeft() + i.scrollSpeed))), r !== !1 && n.ui.ddmanager && !i.dropBehaviour && n.ui.ddmanager.prepareOffsets(this, t)), this.positionAbs = this._convertPositionTo("absolute"), this.options.axis && this.options.axis === "y" || (this.helper[0].style.left = this.position.left + "px"), this.options.axis && this.options.axis === "x" || (this.helper[0].style.top = this.position.top + "px"), e = this.items.length - 1; e >= 0; e--)if ((u = this.items[e], f = u.item[0], o = this._intersectsWithPointer(u), o) && u.instance === this.currentContainer && f !== this.currentItem[0] && this.placeholder[o === 1 ? "next" : "prev"]()[0] !== f && !n.contains(this.placeholder[0], f) && (this.options.type === "semi-dynamic" ? !n.contains(this.element[0], f) : !0)) { if (this.direction = o === 1 ? "down" : "up", this.options.tolerance === "pointer" || this._intersectsWithSides(u)) this._rearrange(t, u); else break; this._trigger("change", t, this._uiHash()); break } return this._contactContainers(t), n.ui.ddmanager && n.ui.ddmanager.drag(this, t), this._trigger("sort", t, this._uiHash()), this.lastPositionAbs = this.positionAbs, !1 }, _mouseStop: function (t, i) { if (t) { if (n.ui.ddmanager && !this.options.dropBehaviour && n.ui.ddmanager.drop(this, t), this.options.revert) { var e = this, f = this.placeholder.offset(), r = this.options.axis, u = {}; r && r !== "x" || (u.left = f.left - this.offset.parent.left - this.margins.left + (this.offsetParent[0] === this.document[0].body ? 0 : this.offsetParent[0].scrollLeft)); r && r !== "y" || (u.top = f.top - this.offset.parent.top - this.margins.top + (this.offsetParent[0] === this.document[0].body ? 0 : this.offsetParent[0].scrollTop)); this.reverting = !0; n(this.helper).animate(u, parseInt(this.options.revert, 10) || 500, function () { e._clear(t) }) } else this._clear(t, i); return !1 } }, cancel: function () { if (this.dragging) { this._mouseUp(new n.Event("mouseup", { target: null })); this.options.helper === "original" ? (this.currentItem.css(this._storedCSS), this._removeClass(this.currentItem, "ui-sortable-helper")) : this.currentItem.show(); for (var t = this.containers.length - 1; t >= 0; t--)this.containers[t]._trigger("deactivate", null, this._uiHash(this)), this.containers[t].containerCache.over && (this.containers[t]._trigger("out", null, this._uiHash(this)), this.containers[t].containerCache.over = 0) } return this.placeholder && (this.placeholder[0].parentNode && this.placeholder[0].parentNode.removeChild(this.placeholder[0]), this.options.helper !== "original" && this.helper && this.helper[0].parentNode && this.helper.remove(), n.extend(this, { helper: null, dragging: !1, reverting: !1, _noFinalSort: null }), this.domPosition.prev ? n(this.domPosition.prev).after(this.currentItem) : n(this.domPosition.parent).prepend(this.currentItem)), this }, serialize: function (t) { var r = this._getItemsAsjQuery(t && t.connected), i = []; return t = t || {}, n(r).each(function () { var r = (n(t.item || this).attr(t.attribute || "id") || "").match(t.expression || /(.+)[\-=_](.+)/); r && i.push((t.key || r[1] + "[]") + "=" + (t.key && t.expression ? r[1] : r[2])) }), !i.length && t.key && i.push(t.key + "="), i.join("&") }, toArray: function (t) { var r = this._getItemsAsjQuery(t && t.connected), i = []; return t = t || {}, r.each(function () { i.push(n(t.item || this).attr(t.attribute || "id") || "") }), i }, _intersectsWith: function (n) { var t = this.positionAbs.left, h = t + this.helperProportions.width, i = this.positionAbs.top, c = i + this.helperProportions.height, r = n.left, f = r + n.width, u = n.top, e = u + n.height, o = this.offset.click.top, s = this.offset.click.left, l = this.options.axis === "x" || i + o > u && i + o < e, a = this.options.axis === "y" || t + s > r && t + s < f, v = l && a; return this.options.tolerance === "pointer" || this.options.forcePointerForContainers || this.options.tolerance !== "pointer" && this.helperProportions[this.floating ? "width" : "height"] > n[this.floating ? "width" : "height"] ? v : r < t + this.helperProportions.width / 2 && h - this.helperProportions.width / 2 < f && u < i + this.helperProportions.height / 2 && c - this.helperProportions.height / 2 < e }, _intersectsWithPointer: function (n) { var t, i, r = this.options.axis === "x" || this._isOverAxis(this.positionAbs.top + this.offset.click.top, n.top, n.height), u = this.options.axis === "y" || this._isOverAxis(this.positionAbs.left + this.offset.click.left, n.left, n.width), f = r && u; return f ? (t = this._getDragVerticalDirection(), i = this._getDragHorizontalDirection(), this.floating ? i === "right" || t === "down" ? 2 : 1 : t && (t === "down" ? 2 : 1)) : !1 }, _intersectsWithSides: function (n) { var r = this._isOverAxis(this.positionAbs.top + this.offset.click.top, n.top + n.height / 2, n.height), u = this._isOverAxis(this.positionAbs.left + this.offset.click.left, n.left + n.width / 2, n.width), t = this._getDragVerticalDirection(), i = this._getDragHorizontalDirection(); return this.floating && i ? i === "right" && u || i === "left" && !u : t && (t === "down" && r || t === "up" && !r) }, _getDragVerticalDirection: function () { var n = this.positionAbs.top - this.lastPositionAbs.top; return n !== 0 && (n > 0 ? "down" : "up") }, _getDragHorizontalDirection: function () { var n = this.positionAbs.left - this.lastPositionAbs.left; return n !== 0 && (n > 0 ? "right" : "left") }, refresh: function (n) { return this._refreshItems(n), this._setHandleClassName(), this.refreshPositions(), this }, _connectWith: function () { var n = this.options; return n.connectWith.constructor === String ? [n.connectWith] : n.connectWith }, _getItemsAsjQuery: function (t) { function h() { s.push(this) } var r, u, e, i, s = [], f = [], o = this._connectWith(); if (o && t) for (r = o.length - 1; r >= 0; r--)for (e = n(o[r], this.document[0]), u = e.length - 1; u >= 0; u--)i = n.data(e[u], this.widgetFullName), i && i !== this && !i.options.disabled && f.push([n.isFunction(i.options.items) ? i.options.items.call(i.element) : n(i.options.items, i.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"), i]); for (f.push([n.isFunction(this.options.items) ? this.options.items.call(this.element, null, { options: this.options, item: this.currentItem }) : n(this.options.items, this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"), this]), r = f.length - 1; r >= 0; r--)f[r][0].each(h); return n(s) }, _removeCurrentsFromItems: function () { var t = this.currentItem.find(":data(" + this.widgetName + "-item)"); this.items = n.grep(this.items, function (n) { for (var i = 0; i < t.length; i++)if (t[i] === n.item[0]) return !1; return !0 }) }, _refreshItems: function (t) { this.items = []; this.containers = [this]; var r, u, e, i, o, s, h, l, a = this.items, f = [[n.isFunction(this.options.items) ? this.options.items.call(this.element[0], t, { item: this.currentItem }) : n(this.options.items, this.element), this]], c = this._connectWith(); if (c && this.ready) for (r = c.length - 1; r >= 0; r--)for (e = n(c[r], this.document[0]), u = e.length - 1; u >= 0; u--)i = n.data(e[u], this.widgetFullName), i && i !== this && !i.options.disabled && (f.push([n.isFunction(i.options.items) ? i.options.items.call(i.element[0], t, { item: this.currentItem }) : n(i.options.items, i.element), i]), this.containers.push(i)); for (r = f.length - 1; r >= 0; r--)for (o = f[r][1], s = f[r][0], u = 0, l = s.length; u < l; u++)h = n(s[u]), h.data(this.widgetName + "-item", o), a.push({ item: h, instance: o, width: 0, height: 0, left: 0, top: 0 }) }, refreshPositions: function (t) { this.floating = this.items.length ? this.options.axis === "x" || this._isFloating(this.items[0].item) : !1; this.offsetParent && this.helper && (this.offset.parent = this._getParentOffset()); for (var r, f, u, i = this.items.length - 1; i >= 0; i--)(r = this.items[i], r.instance !== this.currentContainer && this.currentContainer && r.item[0] !== this.currentItem[0]) || (f = this.options.toleranceElement ? n(this.options.toleranceElement, r.item) : r.item, t || (r.width = f.outerWidth(), r.height = f.outerHeight()), u = f.offset(), r.left = u.left, r.top = u.top); if (this.options.custom && this.options.custom.refreshContainers) this.options.custom.refreshContainers.call(this); else for (i = this.containers.length - 1; i >= 0; i--)u = this.containers[i].element.offset(), this.containers[i].containerCache.left = u.left, this.containers[i].containerCache.top = u.top, this.containers[i].containerCache.width = this.containers[i].element.outerWidth(), this.containers[i].containerCache.height = this.containers[i].element.outerHeight(); return this }, _createPlaceholder: function (t) { t = t || this; var r, i = t.options; i.placeholder && i.placeholder.constructor !== String || (r = i.placeholder, i.placeholder = { element: function () { var u = t.currentItem[0].nodeName.toLowerCase(), i = n("<" + u + ">", t.document[0]); return t._addClass(i, "ui-sortable-placeholder", r || t.currentItem[0].className)._removeClass(i, "ui-sortable-helper"), u === "tbody" ? t._createTrPlaceholder(t.currentItem.find("tr").eq(0), n("<tr>", t.document[0]).appendTo(i)) : u === "tr" ? t._createTrPlaceholder(t.currentItem, i) : u === "img" && i.attr("src", t.currentItem.attr("src")), r || i.css("visibility", "hidden"), i }, update: function (n, u) { (!r || i.forcePlaceholderSize) && (u.height() || u.height(t.currentItem.innerHeight() - parseInt(t.currentItem.css("paddingTop") || 0, 10) - parseInt(t.currentItem.css("paddingBottom") || 0, 10)), u.width() || u.width(t.currentItem.innerWidth() - parseInt(t.currentItem.css("paddingLeft") || 0, 10) - parseInt(t.currentItem.css("paddingRight") || 0, 10))) } }); t.placeholder = n(i.placeholder.element.call(t.element, t.currentItem)); t.currentItem.after(t.placeholder); i.placeholder.update(t, t.placeholder) }, _createTrPlaceholder: function (t, i) { var r = this; t.children().each(function () { n("<td>&#160;<\/td>", r.document[0]).attr("colspan", n(this).attr("colspan") || 1).appendTo(i) }) }, _contactContainers: function (t) { for (var u, c, f, a, v, o, l, s, h, e = null, i = null, r = this.containers.length - 1; r >= 0; r--)if (!n.contains(this.currentItem[0], this.containers[r].element[0])) if (this._intersectsWith(this.containers[r].containerCache)) { if (e && n.contains(this.containers[r].element[0], e.element[0])) continue; e = this.containers[r]; i = r } else this.containers[r].containerCache.over && (this.containers[r]._trigger("out", t, this._uiHash(this)), this.containers[r].containerCache.over = 0); if (e) if (this.containers.length === 1) this.containers[i].containerCache.over || (this.containers[i]._trigger("over", t, this._uiHash(this)), this.containers[i].containerCache.over = 1); else { for (c = 1e4, f = null, s = e.floating || this._isFloating(this.currentItem), a = s ? "left" : "top", v = s ? "width" : "height", h = s ? "pageX" : "pageY", u = this.items.length - 1; u >= 0; u--)n.contains(this.containers[i].element[0], this.items[u].item[0]) && this.items[u].item[0] !== this.currentItem[0] && (o = this.items[u].item.offset()[a], l = !1, t[h] - o > this.items[u][v] / 2 && (l = !0), Math.abs(t[h] - o) < c && (c = Math.abs(t[h] - o), f = this.items[u], this.direction = l ? "up" : "down")); if (!f && !this.options.dropOnEmpty) return; if (this.currentContainer === this.containers[i]) { this.currentContainer.containerCache.over || (this.containers[i]._trigger("over", t, this._uiHash()), this.currentContainer.containerCache.over = 1); return } f ? this._rearrange(t, f, null, !0) : this._rearrange(t, null, this.containers[i].element, !0); this._trigger("change", t, this._uiHash()); this.containers[i]._trigger("change", t, this._uiHash(this)); this.currentContainer = this.containers[i]; this.options.placeholder.update(this.currentContainer, this.placeholder); this.containers[i]._trigger("over", t, this._uiHash(this)); this.containers[i].containerCache.over = 1 } }, _createHelper: function (t) { var r = this.options, i = n.isFunction(r.helper) ? n(r.helper.apply(this.element[0], [t, this.currentItem])) : r.helper === "clone" ? this.currentItem.clone() : this.currentItem; return i.parents("body").length || n(r.appendTo !== "parent" ? r.appendTo : this.currentItem[0].parentNode)[0].appendChild(i[0]), i[0] === this.currentItem[0] && (this._storedCSS = { width: this.currentItem[0].style.width, height: this.currentItem[0].style.height, position: this.currentItem.css("position"), top: this.currentItem.css("top"), left: this.currentItem.css("left") }), (!i[0].style.width || r.forceHelperSize) && i.width(this.currentItem.width()), (!i[0].style.height || r.forceHelperSize) && i.height(this.currentItem.height()), i }, _adjustOffsetFromHelper: function (t) { typeof t == "string" && (t = t.split(" ")); n.isArray(t) && (t = { left: +t[0], top: +t[1] || 0 }); "left" in t && (this.offset.click.left = t.left + this.margins.left); "right" in t && (this.offset.click.left = this.helperProportions.width - t.right + this.margins.left); "top" in t && (this.offset.click.top = t.top + this.margins.top); "bottom" in t && (this.offset.click.top = this.helperProportions.height - t.bottom + this.margins.top) }, _getParentOffset: function () { this.offsetParent = this.helper.offsetParent(); var t = this.offsetParent.offset(); return this.cssPosition === "absolute" && this.scrollParent[0] !== this.document[0] && n.contains(this.scrollParent[0], this.offsetParent[0]) && (t.left += this.scrollParent.scrollLeft(), t.top += this.scrollParent.scrollTop()), (this.offsetParent[0] === this.document[0].body || this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() === "html" && n.ui.ie) && (t = { top: 0, left: 0 }), { top: t.top + (parseInt(this.offsetParent.css("borderTopWidth"), 10) || 0), left: t.left + (parseInt(this.offsetParent.css("borderLeftWidth"), 10) || 0) } }, _getRelativeOffset: function () { if (this.cssPosition === "relative") { var n = this.currentItem.position(); return { top: n.top - (parseInt(this.helper.css("top"), 10) || 0) + this.scrollParent.scrollTop(), left: n.left - (parseInt(this.helper.css("left"), 10) || 0) + this.scrollParent.scrollLeft() } } return { top: 0, left: 0 } }, _cacheMargins: function () { this.margins = { left: parseInt(this.currentItem.css("marginLeft"), 10) || 0, top: parseInt(this.currentItem.css("marginTop"), 10) || 0 } }, _cacheHelperProportions: function () { this.helperProportions = { width: this.helper.outerWidth(), height: this.helper.outerHeight() } }, _setContainment: function () { var t, r, u, i = this.options; i.containment === "parent" && (i.containment = this.helper[0].parentNode); (i.containment === "document" || i.containment === "window") && (this.containment = [0 - this.offset.relative.left - this.offset.parent.left, 0 - this.offset.relative.top - this.offset.parent.top, i.containment === "document" ? this.document.width() : this.window.width() - this.helperProportions.width - this.margins.left, (i.containment === "document" ? this.document.height() || document.body.parentNode.scrollHeight : this.window.height() || this.document[0].body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top]); /^(document|window|parent)$/.test(i.containment) || (t = n(i.containment)[0], r = n(i.containment).offset(), u = n(t).css("overflow") !== "hidden", this.containment = [r.left + (parseInt(n(t).css("borderLeftWidth"), 10) || 0) + (parseInt(n(t).css("paddingLeft"), 10) || 0) - this.margins.left, r.top + (parseInt(n(t).css("borderTopWidth"), 10) || 0) + (parseInt(n(t).css("paddingTop"), 10) || 0) - this.margins.top, r.left + (u ? Math.max(t.scrollWidth, t.offsetWidth) : t.offsetWidth) - (parseInt(n(t).css("borderLeftWidth"), 10) || 0) - (parseInt(n(t).css("paddingRight"), 10) || 0) - this.helperProportions.width - this.margins.left, r.top + (u ? Math.max(t.scrollHeight, t.offsetHeight) : t.offsetHeight) - (parseInt(n(t).css("borderTopWidth"), 10) || 0) - (parseInt(n(t).css("paddingBottom"), 10) || 0) - this.helperProportions.height - this.margins.top]) }, _convertPositionTo: function (t, i) { i || (i = this.position); var r = t === "absolute" ? 1 : -1, u = this.cssPosition === "absolute" && !(this.scrollParent[0] !== this.document[0] && n.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, f = /(html|body)/i.test(u[0].tagName); return { top: i.top + this.offset.relative.top * r + this.offset.parent.top * r - (this.cssPosition === "fixed" ? -this.scrollParent.scrollTop() : f ? 0 : u.scrollTop()) * r, left: i.left + this.offset.relative.left * r + this.offset.parent.left * r - (this.cssPosition === "fixed" ? -this.scrollParent.scrollLeft() : f ? 0 : u.scrollLeft()) * r } }, _generatePosition: function (t) { var r, u, i = this.options, f = t.pageX, e = t.pageY, o = this.cssPosition === "absolute" && !(this.scrollParent[0] !== this.document[0] && n.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, s = /(html|body)/i.test(o[0].tagName); return this.cssPosition !== "relative" || this.scrollParent[0] !== this.document[0] && this.scrollParent[0] !== this.offsetParent[0] || (this.offset.relative = this._getRelativeOffset()), this.originalPosition && (this.containment && (t.pageX - this.offset.click.left < this.containment[0] && (f = this.containment[0] + this.offset.click.left), t.pageY - this.offset.click.top < this.containment[1] && (e = this.containment[1] + this.offset.click.top), t.pageX - this.offset.click.left > this.containment[2] && (f = this.containment[2] + this.offset.click.left), t.pageY - this.offset.click.top > this.containment[3] && (e = this.containment[3] + this.offset.click.top)), i.grid && (r = this.originalPageY + Math.round((e - this.originalPageY) / i.grid[1]) * i.grid[1], e = this.containment ? r - this.offset.click.top >= this.containment[1] && r - this.offset.click.top <= this.containment[3] ? r : r - this.offset.click.top >= this.containment[1] ? r - i.grid[1] : r + i.grid[1] : r, u = this.originalPageX + Math.round((f - this.originalPageX) / i.grid[0]) * i.grid[0], f = this.containment ? u - this.offset.click.left >= this.containment[0] && u - this.offset.click.left <= this.containment[2] ? u : u - this.offset.click.left >= this.containment[0] ? u - i.grid[0] : u + i.grid[0] : u)), { top: e - this.offset.click.top - this.offset.relative.top - this.offset.parent.top + (this.cssPosition === "fixed" ? -this.scrollParent.scrollTop() : s ? 0 : o.scrollTop()), left: f - this.offset.click.left - this.offset.relative.left - this.offset.parent.left + (this.cssPosition === "fixed" ? -this.scrollParent.scrollLeft() : s ? 0 : o.scrollLeft()) } }, _rearrange: function (n, t, i, r) { i ? i[0].appendChild(this.placeholder[0]) : t.item[0].parentNode.insertBefore(this.placeholder[0], this.direction === "down" ? t.item[0] : t.item[0].nextSibling); this.counter = this.counter ? ++this.counter : 1; var u = this.counter; this._delay(function () { u === this.counter && this.refreshPositions(!r) }) }, _clear: function (n, t) { function u(n, t, i) { return function (r) { i._trigger(n, r, t._uiHash(t)) } } this.reverting = !1; var i, r = []; if (!this._noFinalSort && this.currentItem.parent().length && this.placeholder.before(this.currentItem), this._noFinalSort = null, this.helper[0] === this.currentItem[0]) { for (i in this._storedCSS) (this._storedCSS[i] === "auto" || this._storedCSS[i] === "static") && (this._storedCSS[i] = ""); this.currentItem.css(this._storedCSS); this._removeClass(this.currentItem, "ui-sortable-helper") } else this.currentItem.show(); for (this.fromOutside && !t && r.push(function (n) { this._trigger("receive", n, this._uiHash(this.fromOutside)) }), (this.fromOutside || this.domPosition.prev !== this.currentItem.prev().not(".ui-sortable-helper")[0] || this.domPosition.parent !== this.currentItem.parent()[0]) && !t && r.push(function (n) { this._trigger("update", n, this._uiHash()) }), this !== this.currentContainer && (t || (r.push(function (n) { this._trigger("remove", n, this._uiHash()) }), r.push(function (n) { return function (t) { n._trigger("receive", t, this._uiHash(this)) } }.call(this, this.currentContainer)), r.push(function (n) { return function (t) { n._trigger("update", t, this._uiHash(this)) } }.call(this, this.currentContainer)))), i = this.containers.length - 1; i >= 0; i--)t || r.push(u("deactivate", this, this.containers[i])), this.containers[i].containerCache.over && (r.push(u("out", this, this.containers[i])), this.containers[i].containerCache.over = 0); if (this.storedCursor && (this.document.find("body").css("cursor", this.storedCursor), this.storedStylesheet.remove()), this._storedOpacity && this.helper.css("opacity", this._storedOpacity), this._storedZIndex && this.helper.css("zIndex", this._storedZIndex === "auto" ? "" : this._storedZIndex), this.dragging = !1, t || this._trigger("beforeStop", n, this._uiHash()), this.placeholder[0].parentNode.removeChild(this.placeholder[0]), this.cancelHelperRemoval || (this.helper[0] !== this.currentItem[0] && this.helper.remove(), this.helper = null), !t) { for (i = 0; i < r.length; i++)r[i].call(this, n); this._trigger("stop", n, this._uiHash()) } return this.fromOutside = !1, !this.cancelHelperRemoval }, _trigger: function () { n.Widget.prototype._trigger.apply(this, arguments) === !1 && this.cancel() }, _uiHash: function (t) { var i = t || this; return { helper: i.helper, placeholder: i.placeholder || n([]), position: i.position, originalPosition: i.originalPosition, offset: i.positionAbs, item: i.currentItem, sender: t ? t.element : null } } });
  519. /*!
  520. * jQuery UI Spinner 1.12.1
  521. * http://jqueryui.com
  522. *
  523. * Copyright jQuery Foundation and other contributors
  524. * Released under the MIT license.
  525. * http://jquery.org/license
  526. */
  527. n.widget("ui.spinner", { version: "1.12.1", defaultElement: "<input>", widgetEventPrefix: "spin", options: { classes: { "ui-spinner": "ui-corner-all", "ui-spinner-down": "ui-corner-br", "ui-spinner-up": "ui-corner-tr" }, culture: null, icons: { down: "ui-icon-triangle-1-s", up: "ui-icon-triangle-1-n" }, incremental: !0, max: null, min: null, numberFormat: null, page: 10, step: 1, change: null, spin: null, start: null, stop: null }, _create: function () { this._setOption("max", this.options.max); this._setOption("min", this.options.min); this._setOption("step", this.options.step); this.value() !== "" && this._value(this.element.val(), !0); this._draw(); this._on(this._events); this._refresh(); this._on(this.window, { beforeunload: function () { this.element.removeAttr("autocomplete") } }) }, _getCreateOptions: function () { var t = this._super(), i = this.element; return n.each(["min", "max", "step"], function (n, r) { var u = i.attr(r); u != null && u.length && (t[r] = u) }), t }, _events: { keydown: function (n) { this._start(n) && this._keydown(n) && n.preventDefault() }, keyup: "_stop", focus: function () { this.previous = this.element.val() }, blur: function (n) { if (this.cancelBlur) { delete this.cancelBlur; return } this._stop(); this._refresh(); this.previous !== this.element.val() && this._trigger("change", n) }, mousewheel: function (n, t) { if (t) { if (!this.spinning && !this._start(n)) return !1; this._spin((t > 0 ? 1 : -1) * this.options.step, n); clearTimeout(this.mousewheelTimer); this.mousewheelTimer = this._delay(function () { this.spinning && this._stop(n) }, 100); n.preventDefault() } }, "mousedown .ui-spinner-button": function (t) { function r() { var t = this.element[0] === n.ui.safeActiveElement(this.document[0]); t || (this.element.trigger("focus"), this.previous = i, this._delay(function () { this.previous = i })) } var i; (i = this.element[0] === n.ui.safeActiveElement(this.document[0]) ? this.previous : this.element.val(), t.preventDefault(), r.call(this), this.cancelBlur = !0, this._delay(function () { delete this.cancelBlur; r.call(this) }), this._start(t) !== !1) && this._repeat(null, n(t.currentTarget).hasClass("ui-spinner-up") ? 1 : -1, t) }, "mouseup .ui-spinner-button": "_stop", "mouseenter .ui-spinner-button": function (t) { if (n(t.currentTarget).hasClass("ui-state-active")) { if (this._start(t) === !1) return !1; this._repeat(null, n(t.currentTarget).hasClass("ui-spinner-up") ? 1 : -1, t) } }, "mouseleave .ui-spinner-button": "_stop" }, _enhance: function () { this.uiSpinner = this.element.attr("autocomplete", "off").wrap("<span>").parent().append("<a><\/a><a><\/a>") }, _draw: function () { this._enhance(); this._addClass(this.uiSpinner, "ui-spinner", "ui-widget ui-widget-content"); this._addClass("ui-spinner-input"); this.element.attr("role", "spinbutton"); this.buttons = this.uiSpinner.children("a").attr("tabIndex", -1).attr("aria-hidden", !0).button({ classes: { "ui-button": "" } }); this._removeClass(this.buttons, "ui-corner-all"); this._addClass(this.buttons.first(), "ui-spinner-button ui-spinner-up"); this._addClass(this.buttons.last(), "ui-spinner-button ui-spinner-down"); this.buttons.first().button({ icon: this.options.icons.up, showLabel: !1 }); this.buttons.last().button({ icon: this.options.icons.down, showLabel: !1 }); this.buttons.height() > Math.ceil(this.uiSpinner.height() * .5) && this.uiSpinner.height() > 0 && this.uiSpinner.height(this.uiSpinner.height()) }, _keydown: function (t) { var r = this.options, i = n.ui.keyCode; switch (t.keyCode) { case i.UP: return this._repeat(null, 1, t), !0; case i.DOWN: return this._repeat(null, -1, t), !0; case i.PAGE_UP: return this._repeat(null, r.page, t), !0; case i.PAGE_DOWN: return this._repeat(null, -r.page, t), !0 }return !1 }, _start: function (n) { return !this.spinning && this._trigger("start", n) === !1 ? !1 : (this.counter || (this.counter = 1), this.spinning = !0, !0) }, _repeat: function (n, t, i) { n = n || 500; clearTimeout(this.timer); this.timer = this._delay(function () { this._repeat(40, t, i) }, n); this._spin(t * this.options.step, i) }, _spin: function (n, t) { var i = this.value() || 0; this.counter || (this.counter = 1); i = this._adjustValue(i + n * this._increment(this.counter)); this.spinning && this._trigger("spin", t, { value: i }) === !1 || (this._value(i), this.counter++) }, _increment: function (t) { var i = this.options.incremental; return i ? n.isFunction(i) ? i(t) : Math.floor(t * t * t / 5e4 - t * t / 500 + 17 * t / 200 + 1) : 1 }, _precision: function () { var n = this._precisionOf(this.options.step); return this.options.min !== null && (n = Math.max(n, this._precisionOf(this.options.min))), n }, _precisionOf: function (n) { var t = n.toString(), i = t.indexOf("."); return i === -1 ? 0 : t.length - i - 1 }, _adjustValue: function (n) { var r, i, t = this.options; return (r = t.min !== null ? t.min : 0, i = n - r, i = Math.round(i / t.step) * t.step, n = r + i, n = parseFloat(n.toFixed(this._precision())), t.max !== null && n > t.max) ? t.max : t.min !== null && n < t.min ? t.min : n }, _stop: function (n) { this.spinning && (clearTimeout(this.timer), clearTimeout(this.mousewheelTimer), this.counter = 0, this.spinning = !1, this._trigger("stop", n)) }, _setOption: function (n, t) { var u, i, r; if (n === "culture" || n === "numberFormat") { u = this._parse(this.element.val()); this.options[n] = t; this.element.val(this._format(u)); return } (n === "max" || n === "min" || n === "step") && typeof t == "string" && (t = this._parse(t)); n === "icons" && (i = this.buttons.first().find(".ui-icon"), this._removeClass(i, null, this.options.icons.up), this._addClass(i, null, t.up), r = this.buttons.last().find(".ui-icon"), this._removeClass(r, null, this.options.icons.down), this._addClass(r, null, t.down)); this._super(n, t) }, _setOptionDisabled: function (n) { this._super(n); this._toggleClass(this.uiSpinner, null, "ui-state-disabled", !!n); this.element.prop("disabled", !!n); this.buttons.button(n ? "disable" : "enable") }, _setOptions: i(function (n) { this._super(n) }), _parse: function (n) { return typeof n == "string" && n !== "" && (n = window.Globalize && this.options.numberFormat ? Globalize.parseFloat(n, 10, this.options.culture) : +n), n === "" || isNaN(n) ? null : n }, _format: function (n) { return n === "" ? "" : window.Globalize && this.options.numberFormat ? Globalize.format(n, this.options.numberFormat, this.options.culture) : n }, _refresh: function () { this.element.attr({ "aria-valuemin": this.options.min, "aria-valuemax": this.options.max, "aria-valuenow": this._parse(this.element.val()) }) }, isValid: function () { var n = this.value(); return n === null ? !1 : n === this._adjustValue(n) }, _value: function (n, t) { var i; n !== "" && (i = this._parse(n), i !== null && (t || (i = this._adjustValue(i)), n = this._format(i))); this.element.val(n); this._refresh() }, _destroy: function () { this.element.prop("disabled", !1).removeAttr("autocomplete role aria-valuemin aria-valuemax aria-valuenow"); this.uiSpinner.replaceWith(this.element) }, stepUp: i(function (n) { this._stepUp(n) }), _stepUp: function (n) { this._start() && (this._spin((n || 1) * this.options.step), this._stop()) }, stepDown: i(function (n) { this._stepDown(n) }), _stepDown: function (n) { this._start() && (this._spin((n || 1) * -this.options.step), this._stop()) }, pageUp: i(function (n) { this._stepUp((n || 1) * this.options.page) }), pageDown: i(function (n) { this._stepDown((n || 1) * this.options.page) }), value: function (n) { if (!arguments.length) return this._parse(this.element.val()); i(this._value).call(this, n) }, widget: function () { return this.uiSpinner } }); n.uiBackCompat !== !1 && n.widget("ui.spinner", n.ui.spinner, { _enhance: function () { this.uiSpinner = this.element.attr("autocomplete", "off").wrap(this._uiSpinnerHtml()).parent().append(this._buttonHtml()) }, _uiSpinnerHtml: function () { return "<span>" }, _buttonHtml: function () { return "<a><\/a><a><\/a>" } }); rr = n.ui.spinner;
  528. /*!
  529. * jQuery UI Tabs 1.12.1
  530. * http://jqueryui.com
  531. *
  532. * Copyright jQuery Foundation and other contributors
  533. * Released under the MIT license.
  534. * http://jquery.org/license
  535. */
  536. n.widget("ui.tabs", { version: "1.12.1", delay: 300, options: { active: null, classes: { "ui-tabs": "ui-corner-all", "ui-tabs-nav": "ui-corner-all", "ui-tabs-panel": "ui-corner-bottom", "ui-tabs-tab": "ui-corner-top" }, collapsible: !1, event: "click", heightStyle: "content", hide: null, show: null, activate: null, beforeActivate: null, beforeLoad: null, load: null }, _isLocal: function () { var n = /#.*$/; return function (t) { var i, r; i = t.href.replace(n, ""); r = location.href.replace(n, ""); try { i = decodeURIComponent(i) } catch (u) { } try { r = decodeURIComponent(r) } catch (u) { } return t.hash.length > 1 && i === r } }(), _create: function () { var i = this, t = this.options; this.running = !1; this._addClass("ui-tabs", "ui-widget ui-widget-content"); this._toggleClass("ui-tabs-collapsible", null, t.collapsible); this._processTabs(); t.active = this._initialActive(); n.isArray(t.disabled) && (t.disabled = n.unique(t.disabled.concat(n.map(this.tabs.filter(".ui-state-disabled"), function (n) { return i.tabs.index(n) }))).sort()); this.active = this.options.active !== !1 && this.anchors.length ? this._findActive(t.active) : n(); this._refresh(); this.active.length && this.load(t.active) }, _initialActive: function () { var t = this.options.active, i = this.options.collapsible, r = location.hash.substring(1); return t === null && (r && this.tabs.each(function (i, u) { if (n(u).attr("aria-controls") === r) return t = i, !1 }), t === null && (t = this.tabs.index(this.tabs.filter(".ui-tabs-active"))), (t === null || t === -1) && (t = this.tabs.length ? 0 : !1)), t !== !1 && (t = this.tabs.index(this.tabs.eq(t)), t === -1 && (t = i ? !1 : 0)), !i && t === !1 && this.anchors.length && (t = 0), t }, _getCreateEventData: function () { return { tab: this.active, panel: this.active.length ? this._getPanelForTab(this.active) : n() } }, _tabKeydown: function (t) { var r = n(n.ui.safeActiveElement(this.document[0])).closest("li"), i = this.tabs.index(r), u = !0; if (!this._handlePageNav(t)) { switch (t.keyCode) { case n.ui.keyCode.RIGHT: case n.ui.keyCode.DOWN: i++; break; case n.ui.keyCode.UP: case n.ui.keyCode.LEFT: u = !1; i--; break; case n.ui.keyCode.END: i = this.anchors.length - 1; break; case n.ui.keyCode.HOME: i = 0; break; case n.ui.keyCode.SPACE: t.preventDefault(); clearTimeout(this.activating); this._activate(i); return; case n.ui.keyCode.ENTER: t.preventDefault(); clearTimeout(this.activating); this._activate(i === this.options.active ? !1 : i); return; default: return }t.preventDefault(); clearTimeout(this.activating); i = this._focusNextTab(i, u); t.ctrlKey || t.metaKey || (r.attr("aria-selected", "false"), this.tabs.eq(i).attr("aria-selected", "true"), this.activating = this._delay(function () { this.option("active", i) }, this.delay)) } }, _panelKeydown: function (t) { this._handlePageNav(t) || t.ctrlKey && t.keyCode === n.ui.keyCode.UP && (t.preventDefault(), this.active.trigger("focus")) }, _handlePageNav: function (t) { return t.altKey && t.keyCode === n.ui.keyCode.PAGE_UP ? (this._activate(this._focusNextTab(this.options.active - 1, !1)), !0) : t.altKey && t.keyCode === n.ui.keyCode.PAGE_DOWN ? (this._activate(this._focusNextTab(this.options.active + 1, !0)), !0) : void 0 }, _findNextTab: function (t, i) { function u() { return t > r && (t = 0), t < 0 && (t = r), t } for (var r = this.tabs.length - 1; n.inArray(u(), this.options.disabled) !== -1;)t = i ? t + 1 : t - 1; return t }, _focusNextTab: function (n, t) { return n = this._findNextTab(n, t), this.tabs.eq(n).trigger("focus"), n }, _setOption: function (n, t) { if (n === "active") { this._activate(t); return } this._super(n, t); n === "collapsible" && (this._toggleClass("ui-tabs-collapsible", null, t), t || this.options.active !== !1 || this._activate(0)); n === "event" && this._setupEvents(t); n === "heightStyle" && this._setupHeightStyle(t) }, _sanitizeSelector: function (n) { return n ? n.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g, "\\$&") : "" }, refresh: function () { var t = this.options, i = this.tablist.children(":has(a[href])"); t.disabled = n.map(i.filter(".ui-state-disabled"), function (n) { return i.index(n) }); this._processTabs(); t.active !== !1 && this.anchors.length ? this.active.length && !n.contains(this.tablist[0], this.active[0]) ? this.tabs.length === t.disabled.length ? (t.active = !1, this.active = n()) : this._activate(this._findNextTab(Math.max(0, t.active - 1), !1)) : t.active = this.tabs.index(this.active) : (t.active = !1, this.active = n()); this._refresh() }, _refresh: function () { this._setOptionDisabled(this.options.disabled); this._setupEvents(this.options.event); this._setupHeightStyle(this.options.heightStyle); this.tabs.not(this.active).attr({ "aria-selected": "false", "aria-expanded": "false", tabIndex: -1 }); this.panels.not(this._getPanelForTab(this.active)).hide().attr({ "aria-hidden": "true" }); this.active.length ? (this.active.attr({ "aria-selected": "true", "aria-expanded": "true", tabIndex: 0 }), this._addClass(this.active, "ui-tabs-active", "ui-state-active"), this._getPanelForTab(this.active).show().attr({ "aria-hidden": "false" })) : this.tabs.eq(0).attr("tabIndex", 0) }, _processTabs: function () { var t = this, i = this.tabs, r = this.anchors, u = this.panels; this.tablist = this._getList().attr("role", "tablist"); this._addClass(this.tablist, "ui-tabs-nav", "ui-helper-reset ui-helper-clearfix ui-widget-header"); this.tablist.on("mousedown" + this.eventNamespace, "> li", function (t) { n(this).is(".ui-state-disabled") && t.preventDefault() }).on("focus" + this.eventNamespace, ".ui-tabs-anchor", function () { n(this).closest("li").is(".ui-state-disabled") && this.blur() }); this.tabs = this.tablist.find("> li:has(a[href])").attr({ role: "tab", tabIndex: -1 }); this._addClass(this.tabs, "ui-tabs-tab", "ui-state-default"); this.anchors = this.tabs.map(function () { return n("a", this)[0] }).attr({ role: "presentation", tabIndex: -1 }); this._addClass(this.anchors, "ui-tabs-anchor"); this.panels = n(); this.anchors.each(function (i, r) { var f, u, e, s = n(r).uniqueId().attr("id"), o = n(r).closest("li"), h = o.attr("aria-controls"); t._isLocal(r) ? (f = r.hash, e = f.substring(1), u = t.element.find(t._sanitizeSelector(f))) : (e = o.attr("aria-controls") || n({}).uniqueId()[0].id, f = "#" + e, u = t.element.find(f), u.length || (u = t._createPanel(e), u.insertAfter(t.panels[i - 1] || t.tablist)), u.attr("aria-live", "polite")); u.length && (t.panels = t.panels.add(u)); h && o.data("ui-tabs-aria-controls", h); o.attr({ "aria-controls": e, "aria-labelledby": s }); u.attr("aria-labelledby", s) }); this.panels.attr("role", "tabpanel"); this._addClass(this.panels, "ui-tabs-panel", "ui-widget-content"); i && (this._off(i.not(this.tabs)), this._off(r.not(this.anchors)), this._off(u.not(this.panels))) }, _getList: function () { return this.tablist || this.element.find("ol, ul").eq(0) }, _createPanel: function (t) { return n("<div>").attr("id", t).data("ui-tabs-destroy", !0) }, _setOptionDisabled: function (t) { var i, u, r; for (n.isArray(t) && (t.length ? t.length === this.anchors.length && (t = !0) : t = !1), r = 0; u = this.tabs[r]; r++)i = n(u), t === !0 || n.inArray(r, t) !== -1 ? (i.attr("aria-disabled", "true"), this._addClass(i, null, "ui-state-disabled")) : (i.removeAttr("aria-disabled"), this._removeClass(i, null, "ui-state-disabled")); this.options.disabled = t; this._toggleClass(this.widget(), this.widgetFullName + "-disabled", null, t === !0) }, _setupEvents: function (t) { var i = {}; t && n.each(t.split(" "), function (n, t) { i[t] = "_eventHandler" }); this._off(this.anchors.add(this.tabs).add(this.panels)); this._on(!0, this.anchors, { click: function (n) { n.preventDefault() } }); this._on(this.anchors, i); this._on(this.tabs, { keydown: "_tabKeydown" }); this._on(this.panels, { keydown: "_panelKeydown" }); this._focusable(this.tabs); this._hoverable(this.tabs) }, _setupHeightStyle: function (t) { var i, r = this.element.parent(); t === "fill" ? (i = r.height(), i -= this.element.outerHeight() - this.element.height(), this.element.siblings(":visible").each(function () { var t = n(this), r = t.css("position"); r !== "absolute" && r !== "fixed" && (i -= t.outerHeight(!0)) }), this.element.children().not(this.panels).each(function () { i -= n(this).outerHeight(!0) }), this.panels.each(function () { n(this).height(Math.max(0, i - n(this).innerHeight() + n(this).height())) }).css("overflow", "auto")) : t === "auto" && (i = 0, this.panels.each(function () { i = Math.max(i, n(this).height("").height()) }).height(i)) }, _eventHandler: function (t) { var u = this.options, r = this.active, c = n(t.currentTarget), i = c.closest("li"), f = i[0] === r[0], e = f && u.collapsible, o = e ? n() : this._getPanelForTab(i), s = r.length ? this._getPanelForTab(r) : n(), h = { oldTab: r, oldPanel: s, newTab: e ? n() : i, newPanel: o }; (t.preventDefault(), i.hasClass("ui-state-disabled") || i.hasClass("ui-tabs-loading") || this.running || f && !u.collapsible || this._trigger("beforeActivate", t, h) === !1) || (u.active = e ? !1 : this.tabs.index(i), this.active = f ? n() : i, this.xhr && this.xhr.abort(), s.length || o.length || n.error("jQuery UI Tabs: Mismatching fragment identifier."), o.length && this.load(this.tabs.index(i), t), this._toggle(t, h)) }, _toggle: function (t, i) { function e() { r.running = !1; r._trigger("activate", t, i) } function o() { r._addClass(i.newTab.closest("li"), "ui-tabs-active", "ui-state-active"); u.length && r.options.show ? r._show(u, r.options.show, e) : (u.show(), e()) } var r = this, u = i.newPanel, f = i.oldPanel; this.running = !0; f.length && this.options.hide ? this._hide(f, this.options.hide, function () { r._removeClass(i.oldTab.closest("li"), "ui-tabs-active", "ui-state-active"); o() }) : (this._removeClass(i.oldTab.closest("li"), "ui-tabs-active", "ui-state-active"), f.hide(), o()); f.attr("aria-hidden", "true"); i.oldTab.attr({ "aria-selected": "false", "aria-expanded": "false" }); u.length && f.length ? i.oldTab.attr("tabIndex", -1) : u.length && this.tabs.filter(function () { return n(this).attr("tabIndex") === 0 }).attr("tabIndex", -1); u.attr("aria-hidden", "false"); i.newTab.attr({ "aria-selected": "true", "aria-expanded": "true", tabIndex: 0 }) }, _activate: function (t) { var r, i = this._findActive(t); i[0] !== this.active[0] && (i.length || (i = this.active), r = i.find(".ui-tabs-anchor")[0], this._eventHandler({ target: r, currentTarget: r, preventDefault: n.noop })) }, _findActive: function (t) { return t === !1 ? n() : this.tabs.eq(t) }, _getIndex: function (t) { return typeof t == "string" && (t = this.anchors.index(this.anchors.filter("[href$='" + n.ui.escapeSelector(t) + "']"))), t }, _destroy: function () { this.xhr && this.xhr.abort(); this.tablist.removeAttr("role").off(this.eventNamespace); this.anchors.removeAttr("role tabIndex").removeUniqueId(); this.tabs.add(this.panels).each(function () { n.data(this, "ui-tabs-destroy") ? n(this).remove() : n(this).removeAttr("role tabIndex aria-live aria-busy aria-selected aria-labelledby aria-hidden aria-expanded") }); this.tabs.each(function () { var t = n(this), i = t.data("ui-tabs-aria-controls"); i ? t.attr("aria-controls", i).removeData("ui-tabs-aria-controls") : t.removeAttr("aria-controls") }); this.panels.show(); this.options.heightStyle !== "content" && this.panels.css("height", "") }, enable: function (t) { var i = this.options.disabled; i !== !1 && (t === undefined ? i = !1 : (t = this._getIndex(t), i = n.isArray(i) ? n.map(i, function (n) { return n !== t ? n : null }) : n.map(this.tabs, function (n, i) { return i !== t ? i : null })), this._setOptionDisabled(i)) }, disable: function (t) { var i = this.options.disabled; if (i !== !0) { if (t === undefined) i = !0; else { if (t = this._getIndex(t), n.inArray(t, i) !== -1) return; i = n.isArray(i) ? n.merge([t], i).sort() : [t] } this._setOptionDisabled(i) } }, load: function (t, i) { t = this._getIndex(t); var r = this, u = this.tabs.eq(t), e = u.find(".ui-tabs-anchor"), f = this._getPanelForTab(u), o = { tab: u, panel: f }, s = function (n, t) { t === "abort" && r.panels.stop(!1, !0); r._removeClass(u, "ui-tabs-loading"); f.removeAttr("aria-busy"); n === r.xhr && delete r.xhr }; this._isLocal(e[0]) || (this.xhr = n.ajax(this._ajaxSettings(e, i, o)), this.xhr && this.xhr.statusText !== "canceled" && (this._addClass(u, "ui-tabs-loading"), f.attr("aria-busy", "true"), this.xhr.done(function (n, t, u) { setTimeout(function () { f.html(n); r._trigger("load", i, o); s(u, t) }, 1) }).fail(function (n, t) { setTimeout(function () { s(n, t) }, 1) }))) }, _ajaxSettings: function (t, i, r) { var u = this; return { url: t.attr("href").replace(/#.*$/, ""), beforeSend: function (t, f) { return u._trigger("beforeLoad", i, n.extend({ jqXHR: t, ajaxSettings: f }, r)) } } }, _getPanelForTab: function (t) { var i = n(t).attr("aria-controls"); return this.element.find(this._sanitizeSelector("#" + i)) } }); n.uiBackCompat !== !1 && n.widget("ui.tabs", n.ui.tabs, { _processTabs: function () { this._superApply(arguments); this._addClass(this.tabs, "ui-tab") } }); ur = n.ui.tabs;
  537. /*!
  538. * jQuery UI Tooltip 1.12.1
  539. * http://jqueryui.com
  540. *
  541. * Copyright jQuery Foundation and other contributors
  542. * Released under the MIT license.
  543. * http://jquery.org/license
  544. */
  545. n.widget("ui.tooltip", { version: "1.12.1", options: { classes: { "ui-tooltip": "ui-corner-all ui-widget-shadow" }, content: function () { var t = n(this).attr("title") || ""; return n("<a>").text(t).html() }, hide: !0, items: "[title]:not([disabled])", position: { my: "left top+15", at: "left bottom", collision: "flipfit flip" }, show: !0, track: !1, close: null, open: null }, _addDescribedBy: function (t, i) { var r = (t.attr("aria-describedby") || "").split(/\s+/); r.push(i); t.data("ui-tooltip-id", i).attr("aria-describedby", n.trim(r.join(" "))) }, _removeDescribedBy: function (t) { var u = t.data("ui-tooltip-id"), i = (t.attr("aria-describedby") || "").split(/\s+/), r = n.inArray(u, i); r !== -1 && i.splice(r, 1); t.removeData("ui-tooltip-id"); i = n.trim(i.join(" ")); i ? t.attr("aria-describedby", i) : t.removeAttr("aria-describedby") }, _create: function () { this._on({ mouseover: "open", focusin: "open" }); this.tooltips = {}; this.parents = {}; this.liveRegion = n("<div>").attr({ role: "log", "aria-live": "assertive", "aria-relevant": "additions" }).appendTo(this.document[0].body); this._addClass(this.liveRegion, null, "ui-helper-hidden-accessible"); this.disabledTitles = n([]) }, _setOption: function (t, i) { var r = this; this._super(t, i); t === "content" && n.each(this.tooltips, function (n, t) { r._updateContent(t.element) }) }, _setOptionDisabled: function (n) { this[n ? "_disable" : "_enable"]() }, _disable: function () { var t = this; n.each(this.tooltips, function (i, r) { var u = n.Event("blur"); u.target = u.currentTarget = r.element[0]; t.close(u, !0) }); this.disabledTitles = this.disabledTitles.add(this.element.find(this.options.items).addBack().filter(function () { var t = n(this); if (t.is("[title]")) return t.data("ui-tooltip-title", t.attr("title")).removeAttr("title") })) }, _enable: function () { this.disabledTitles.each(function () { var t = n(this); t.data("ui-tooltip-title") && t.attr("title", t.data("ui-tooltip-title")) }); this.disabledTitles = n([]) }, open: function (t) { var r = this, i = n(t ? t.target : this.element).closest(this.options.items); i.length && !i.data("ui-tooltip-id") && (i.attr("title") && i.data("ui-tooltip-title", i.attr("title")), i.data("ui-tooltip-open", !0), t && t.type === "mouseover" && i.parents().each(function () { var t = n(this), i; t.data("ui-tooltip-open") && (i = n.Event("blur"), i.target = i.currentTarget = this, r.close(i, !0)); t.attr("title") && (t.uniqueId(), r.parents[this.id] = { element: this, title: t.attr("title") }, t.attr("title", "")) }), this._registerCloseHandlers(t, i), this._updateContent(i, t)) }, _updateContent: function (n, t) { var r, i = this.options.content, u = this, f = t ? t.type : null; if (typeof i == "string" || i.nodeType || i.jquery) return this._open(t, n, i); r = i.call(n[0], function (i) { u._delay(function () { n.data("ui-tooltip-open") && (t && (t.type = f), this._open(t, n, i)) }) }); r && this._open(t, n, r) }, _open: function (t, i, r) { function s(n) { (o.of = n, u.is(":hidden")) || u.position(o) } var f, u, h, e, o = n.extend({}, this.options.position); if (r) { if (f = this._find(i), f) { f.tooltip.find(".ui-tooltip-content").html(r); return } i.is("[title]") && (t && t.type === "mouseover" ? i.attr("title", "") : i.removeAttr("title")); f = this._tooltip(i); u = f.tooltip; this._addDescribedBy(i, u.attr("id")); u.find(".ui-tooltip-content").html(r); this.liveRegion.children().hide(); e = n("<div>").html(u.find(".ui-tooltip-content").html()); e.removeAttr("name").find("[name]").removeAttr("name"); e.removeAttr("id").find("[id]").removeAttr("id"); e.appendTo(this.liveRegion); this.options.track && t && /^mouse/.test(t.type) ? (this._on(this.document, { mousemove: s }), s(t)) : u.position(n.extend({ "of": i }, this.options.position)); u.hide(); this._show(u, this.options.show); this.options.track && this.options.show && this.options.show.delay && (h = this.delayedShow = setInterval(function () { u.is(":visible") && (s(o.of), clearInterval(h)) }, n.fx.interval)); this._trigger("open", t, { tooltip: u }) } }, _registerCloseHandlers: function (t, i) { var r = { keyup: function (t) { if (t.keyCode === n.ui.keyCode.ESCAPE) { var r = n.Event(t); r.currentTarget = i[0]; this.close(r, !0) } } }; i[0] !== this.element[0] && (r.remove = function () { this._removeTooltip(this._find(i).tooltip) }); t && t.type !== "mouseover" || (r.mouseleave = "close"); t && t.type !== "focusin" || (r.focusout = "close"); this._on(!0, i, r) }, close: function (t) { var u, f = this, i = n(t ? t.currentTarget : this.element), r = this._find(i); if (!r) { i.removeData("ui-tooltip-open"); return } (u = r.tooltip, r.closing) || (clearInterval(this.delayedShow), i.data("ui-tooltip-title") && !i.attr("title") && i.attr("title", i.data("ui-tooltip-title")), this._removeDescribedBy(i), r.hiding = !0, u.stop(!0), this._hide(u, this.options.hide, function () { f._removeTooltip(n(this)) }), i.removeData("ui-tooltip-open"), this._off(i, "mouseleave focusout keyup"), i[0] !== this.element[0] && this._off(i, "remove"), this._off(this.document, "mousemove"), t && t.type === "mouseleave" && n.each(this.parents, function (t, i) { n(i.element).attr("title", i.title); delete f.parents[t] }), r.closing = !0, this._trigger("close", t, { tooltip: u }), r.hiding || (r.closing = !1)) }, _tooltip: function (t) { var i = n("<div>").attr("role", "tooltip"), r = n("<div>").appendTo(i), u = i.uniqueId().attr("id"); return this._addClass(r, "ui-tooltip-content"), this._addClass(i, "ui-tooltip", "ui-widget ui-widget-content"), i.appendTo(this._appendTo(t)), this.tooltips[u] = { element: t, tooltip: i } }, _find: function (n) { var t = n.data("ui-tooltip-id"); return t ? this.tooltips[t] : null }, _removeTooltip: function (n) { n.remove(); delete this.tooltips[n.attr("id")] }, _appendTo: function (n) { var t = n.closest(".ui-front, dialog"); return t.length || (t = this.document[0].body), t }, _destroy: function () { var t = this; n.each(this.tooltips, function (i, r) { var f = n.Event("blur"), u = r.element; f.target = f.currentTarget = u[0]; t.close(f, !0); n("#" + i).remove(); u.data("ui-tooltip-title") && (u.attr("title") || u.attr("title", u.data("ui-tooltip-title")), u.removeData("ui-tooltip-title")) }); this.liveRegion.remove() } }); n.uiBackCompat !== !1 && n.widget("ui.tooltip", n.ui.tooltip, { options: { tooltipClass: null }, _tooltip: function () { var n = this._superApply(arguments); return this.options.tooltipClass && n.tooltip.addClass(this.options.tooltipClass), n } }); fr = n.ui.tooltip
  546. });
  547. /*! Copyright (c) 2011 Piotr Rochala (http://rocha.la)
  548. * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
  549. * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
  550. *
  551. * Version: 1.3.8
  552. *
  553. */
  554. (function (n) { n.fn.extend({ slimScroll: function (i) { var r = n.extend({ width: "auto", height: "250px", size: "7px", color: "#000", position: "right", distance: "1px", start: "top", opacity: .4, alwaysVisible: !1, disableFadeOut: !1, railVisible: !1, railColor: "#333", railOpacity: .2, railDraggable: !0, railClass: "slimScrollRail", barClass: "slimScrollBar", wrapperClass: "slimScrollDiv", allowPageScroll: !1, wheelStep: 20, touchScrollStep: 200, borderRadius: "7px", railBorderRadius: "7px" }, i); return this.each(function () { function p(t) { if (v) { t = t || window.event; var i = 0; t.wheelDelta && (i = -t.wheelDelta / 120); t.detail && (i = t.detail / 3); n(t.target || t.srcTarget || t.srcElement).closest("." + r.wrapperClass).is(u.parent()) && h(i, !0); t.preventDefault && !s && t.preventDefault(); s || (t.returnValue = !1) } } function h(n, t, i) { s = !1; var e = u.outerHeight() - f.outerHeight(); t && (t = parseInt(f.css("top")) + n * parseInt(r.wheelStep) / 100 * f.outerHeight(), t = Math.min(Math.max(t, 0), e), t = 0 < n ? Math.ceil(t) : Math.floor(t), f.css({ top: t + "px" })); o = parseInt(f.css("top")) / (u.outerHeight() - f.outerHeight()); t = o * (u[0].scrollHeight - u.outerHeight()); i && (t = n, n = t / u[0].scrollHeight * u.outerHeight(), n = Math.min(Math.max(n, 0), e), f.css({ top: n + "px" })); u.scrollTop(t); u.trigger("slimscrolling", ~~t); b(); l() } function w() { y = Math.max(u.outerHeight() / u[0].scrollHeight * u.outerHeight(), 30); f.css({ height: y + "px" }); var n = y == u.outerHeight() ? "none" : "block"; f.css({ display: n }) } function b() { w(); clearTimeout(nt); o == ~~o ? (s = r.allowPageScroll, tt != o && u.trigger("slimscroll", 0 == ~~o ? "top" : "bottom")) : s = !1; tt = o; y >= u.outerHeight() ? s = !0 : (f.stop(!0, !0).fadeIn("fast"), r.railVisible && c.stop(!0, !0).fadeIn("fast")) } function l() { r.alwaysVisible || (nt = setTimeout(function () { r.disableFadeOut && v || k || d || (f.fadeOut("slow"), c.fadeOut("slow")) }, 1e3)) } var v, k, d, nt, g, y, o, tt, s = !1, u = n(this), e; if (u.parent().hasClass(r.wrapperClass)) { var a = u.scrollTop(), f = u.siblings("." + r.barClass), c = u.siblings("." + r.railClass); if (w(), n.isPlainObject(i)) { if ("height" in i && "auto" == i.height ? (u.parent().css("height", "auto"), u.css("height", "auto"), e = u.parent().parent().height(), u.parent().css("height", e), u.css("height", e)) : "height" in i && (e = i.height, u.parent().css("height", e), u.css("height", e)), "scrollTo" in i) a = parseInt(r.scrollTo); else if ("scrollBy" in i) a += parseInt(r.scrollBy); else if ("destroy" in i) { f.remove(); c.remove(); u.unwrap(); return } h(a, !1, !0) } } else if (!(n.isPlainObject(i) && "destroy" in i)) { r.height = "auto" == r.height ? u.parent().height() : r.height; a = n("<div><\/div>").addClass(r.wrapperClass).css({ position: "relative", overflow: "hidden", width: r.width, height: r.height }); u.css({ overflow: "hidden", width: r.width, height: r.height }); var c = n("<div><\/div>").addClass(r.railClass).css({ width: r.size, height: "100%", position: "absolute", top: 0, display: r.alwaysVisible && r.railVisible ? "block" : "none", "border-radius": r.railBorderRadius, background: r.railColor, opacity: r.railOpacity, zIndex: 90 }), f = n("<div><\/div>").addClass(r.barClass).css({ background: r.color, width: r.size, position: "absolute", top: 0, opacity: r.opacity, display: r.alwaysVisible ? "block" : "none", "border-radius": r.borderRadius, BorderRadius: r.borderRadius, MozBorderRadius: r.borderRadius, WebkitBorderRadius: r.borderRadius, zIndex: 99 }), e = "right" == r.position ? { right: r.distance } : { left: r.distance }; c.css(e); f.css(e); u.wrap(a); u.parent().append(f); u.parent().append(c); r.railDraggable && f.bind("mousedown", function (i) { var r = n(document); return d = !0, t = parseFloat(f.css("top")), pageY = i.pageY, r.bind("mousemove.slimscroll", function (n) { currTop = t + n.pageY - pageY; f.css("top", currTop); h(0, f.position().top, !1) }), r.bind("mouseup.slimscroll", function () { d = !1; l(); r.unbind(".slimscroll") }), !1 }).bind("selectstart.slimscroll", function (n) { return n.stopPropagation(), n.preventDefault(), !1 }); c.hover(function () { b() }, function () { l() }); f.hover(function () { k = !0 }, function () { k = !1 }); u.hover(function () { v = !0; b(); l() }, function () { v = !1; l() }); u.bind("touchstart", function (n) { n.originalEvent.touches.length && (g = n.originalEvent.touches[0].pageY) }); u.bind("touchmove", function (n) { s || n.originalEvent.preventDefault(); n.originalEvent.touches.length && (h((g - n.originalEvent.touches[0].pageY) / r.touchScrollStep, !0), g = n.originalEvent.touches[0].pageY) }); w(); "bottom" === r.start ? (f.css({ top: u.outerHeight() - f.outerHeight() }), h(0, !0)) : "top" !== r.start && (h(n(r.start).position().top, null, !0), r.alwaysVisible || f.hide()); window.addEventListener ? (this.addEventListener("DOMMouseScroll", p, !1), this.addEventListener("mousewheel", p, !1)) : document.attachEvent("onmousewheel", p) } }), this } }); n.fn.extend({ slimscroll: n.fn.slimScroll }) })(jQuery);
  555. /*!
  556. * Chart.js v3.8.0
  557. * https://www.chartjs.org
  558. * (c) 2022 Chart.js Contributors
  559. * Released under the MIT License
  560. */
  561. !function (n, t) { "object" == typeof exports && "undefined" != typeof module ? module.exports = t() : "function" == typeof define && define.amd ? define(t) : (n = "undefined" != typeof globalThis ? globalThis : n || self).Chart = t() }(this, function () {
  562. "use strict"; function ee(n, t, i) { const f = i || (n => Array.prototype.slice.call(n)); let r = !1, u = []; return function (...i) { u = f(i); r || (r = !0, fe.call(window, () => { r = !1, n.apply(t, u) })) } } function hh(n, t) { let i; return function (...r) { return t ? (clearTimeout(i), i = setTimeout(n, t, r)) : n.apply(this, r), t } } function or(n) { return n + .5 | 0 } function sr(n) { return bt(or(2.55 * n), 0, 255) } function kt(n) { return bt(or(255 * n), 0, 255) } function at(n) { return bt(or(n / 2.55) / 100, 0, 1) } function lh(n) { return bt(or(100 * n), 0, 100) } function wp(n) { var t = (n => hu(n.r) && hu(n.g) && hu(n.b) && hu(n.a))(n) ? yp : pp; if (n) return "#" + t(n.r) + t(n.g) + t(n.b) + ((n, t) => n < 255 ? t(n) : "")(n.a, t) } function ah(n, t, i) { const u = t * Math.min(i, 1 - i), r = (t, r = (t + n / 30) % 12) => i - u * Math.max(Math.min(r - 3, 9 - r, 1), -1); return [r(0), r(8), r(4)] } function kp(n, t, i) { const r = (r, u = (r + n / 60) % 6) => i - i * t * Math.max(Math.min(u, 4 - u, 1), 0); return [r(5), r(3), r(1)] } function dp(n, t, i) { const u = ah(n, 1, .5); let r; for (t + i > 1 && (r = 1 / (t + i), t *= r, i *= r), r = 0; r < 3; r++)u[r] *= 1 - t - i, u[r] += t; return u } function se(n) { const f = n.r / 255, e = n.g / 255, o = n.b / 255, t = Math.max(f, e, o), i = Math.min(f, e, o), s = (t + i) / 2; let r, h, u; return t !== i && (u = t - i, h = s > .5 ? u / (2 - t - i) : u / (t + i), r = function (n, t, i, r, u) { return n === u ? (t - i) / r + (t < i ? 6 : 0) : t === u ? (i - n) / r + 2 : (n - t) / r + 4 }(f, e, o, u, t), r = 60 * r + .5), [0 | r, h || 0, s] } function he(n, t, i, r) { return (Array.isArray(t) ? n(t[0], t[1], t[2]) : n(t, i, r)).map(kt) } function ce(n, t, i) { return he(ah, n, t, i) } function vh(n) { return (n % 360 + 360) % 360 } function gp(n) { const t = bp.exec(n); let i, e = 255; if (t) { t[5] !== i && (e = t[6] ? sr(+t[5]) : kt(+t[5])); const r = vh(+t[2]), u = +t[3] / 100, f = +t[4] / 100; return i = "hwb" === t[1] ? function (n, t, i) { return he(dp, n, t, i) }(r, u, f) : "hsv" === t[1] ? function (n, t, i) { return he(kp, n, t, i) }(r, u, f) : ce(r, u, f), { r: i[0], g: i[1], b: i[2], a: e } } } function nw(n) { cu || (cu = function () { const u = {}, f = Object.keys(ph), e = Object.keys(yh); let t, i, n, o, r; for (t = 0; t < f.length; t++) { for (o = r = f[t], i = 0; i < e.length; i++)n = e[i], r = r.replace(n, yh[n]); n = parseInt(ph[o], 16); u[r] = [n >> 16 & 255, n >> 8 & 255, 255 & n] } return u }(), cu.transparent = [0, 0, 0, 0]); const t = cu[n.toLowerCase()]; return t && { r: t[0], g: t[1], b: t[2], a: 4 === t.length ? t[3] : 255 } } function lu(n, t, i) { if (n) { let r = se(n); r[t] = Math.max(0, Math.min(r[t] + r[t] * i, 0 === t ? 360 : 1)); r = ce(r); n.r = r[0]; n.g = r[1]; n.b = r[2] } } function wh(n, t) { return n ? Object.assign(t || {}, n) : n } function bh(n) { var t = { r: 0, g: 0, b: 0, a: 255 }; return Array.isArray(n) ? n.length >= 3 && (t = { r: n[0], g: n[1], b: n[2], a: 255 }, n.length > 3 && (t.a = kt(n[3]))) : (t = wh(n, { r: 0, g: 0, b: 0, a: 1 })).a = kt(t.a), t } function iw(n) { return "r" === n.charAt(0) ? function (n) { const t = tw.exec(n); let i, r, u, f = 255; if (t) { if (t[7] !== i) { const n = +t[7]; f = t[8] ? sr(n) : bt(255 * n, 0, 255) } return i = +t[1], r = +t[3], u = +t[5], i = 255 & (t[2] ? sr(i) : bt(i, 0, 255)), r = 255 & (t[4] ? sr(r) : bt(r, 0, 255)), u = 255 & (t[6] ? sr(u) : bt(u, 0, 255)), { r: i, g: r, b: u, a: f } } }(n) : gp(n) } function kh(n) { return new ae(n) } function ve(n) { if (n && "object" == typeof n) { const t = n.toString(); return "[object CanvasPattern]" === t || "[object CanvasGradient]" === t } return !1 } function ye(n) { return ve(n) ? n : kh(n) } function au(n) { return ve(n) ? n : kh(n).saturate(.5).darken(.1).hexString() } function st() { } function r(n) { return null == n } function e(n) { if (Array.isArray && Array.isArray(n)) return !0; const t = Object.prototype.toString.call(n); return "[object" === t.slice(0, 7) && "Array]" === t.slice(-6) } function t(n) { return null !== n && "[object Object]" === Object.prototype.toString.call(n) } function d(n, t) { return c(n) ? n : t } function n(n, t) { return void 0 === n ? t : n } function o(n, t, i) { if (n && "function" == typeof n.call) return n.apply(i, t) } function u(n, i, r, u) { let f, o, s; if (e(n)) if (o = n.length, u) for (f = o - 1; f >= 0; f--)i.call(r, n[f], f); else for (f = 0; f < o; f++)i.call(r, n[f], f); else if (t(n)) for (s = Object.keys(n), o = s.length, f = 0; f < o; f++)i.call(r, n[s[f]], s[f]) } function hr(n, t) { let i, f, r, u; if (!n || !t || n.length !== t.length) return !1; for (i = 0, f = n.length; i < f; ++i)if (r = n[i], u = t[i], r.datasetIndex !== u.datasetIndex || r.index !== u.index) return !1; return !0 } function cr(n) { if (e(n)) return n.map(cr); if (t(n)) { const r = Object.create(null), i = Object.keys(n), u = i.length; let t = 0; for (; t < u; ++t)r[i[t]] = cr(n[i[t]]); return r } return n } function nc(n) { return -1 === ["__proto__", "prototype", "constructor"].indexOf(n) } function tc(n, i, r, u) { if (nc(n)) { const e = i[n], f = r[n]; t(e) && t(f) ? vi(e, f, u) : i[n] = cr(f) } } function vi(n, i, r) { const u = e(i) ? i : [i], f = u.length; if (!t(n)) return n; const o = (r = r || {}).merger || tc; for (let e = 0; e < f; ++e)if (t(i = u[e])) { const f = Object.keys(i); for (let t = 0, u = f.length; t < u; ++t)o(f[t], n, i, r) } return n } function yi(n, t) { return vi(n, t, { merger: ic }) } function ic(n, i, r) { if (nc(n)) { const f = i[n], u = r[n]; t(f) && t(u) ? yi(f, u) : Object.prototype.hasOwnProperty.call(i, n) || (i[n] = cr(u)) } } function rc(n, t) { const i = n.indexOf(".", t); return -1 === i ? n.length : i } function vt(n, t) { if ("" === t) return n; let i = 0, r = rc(t, i); for (; n && r > i;)n = n[t.slice(i, r)], i = r + 1, r = rc(t, i); return n } function vu(n) { return n.charAt(0).toUpperCase() + n.slice(1) } function uc(n) { return "mouseup" === n.type || "click" === n.type || "contextmenu" === n.type } function lr(n, t) { if (!t) return n; const i = t.split("."); for (let t = 0, r = i.length; t < r; ++t) { const r = i[t]; n = n[r] || (n[r] = Object.create(null)) } return n } function ke(n, t, i) { return "string" == typeof t ? vi(lr(n, t), i) : vi(lr(n, ""), t) } function yu(n, t, i) { i = i || (i => n[i] < t); let r, u = n.length - 1, f = 0; for (; u - f > 1;)r = f + u >> 1, i(r) ? f = r : u = r; return { lo: f, hi: u } } function ec(n, t, i) { let r = 0, u = n.length; for (; r < u && n[r] < t;)r++; for (; u > r && n[u - 1] > i;)u--; return r > 0 || u < n.length ? n.slice(r, u) : n } function sc(n, t) { n._chartjs ? n._chartjs.listeners.push(t) : (Object.defineProperty(n, "_chartjs", { configurable: !0, enumerable: !1, value: { listeners: [t] } }), oc.forEach(t => { const i = "_onData" + vu(t), r = n[t]; Object.defineProperty(n, t, { configurable: !0, enumerable: !1, value(...t) { const u = r.apply(this, t); return n._chartjs.listeners.forEach(n => { "function" == typeof n[i] && n[i](...t) }), u } }) })) } function de(n, t) { const r = n._chartjs; if (r) { const i = r.listeners, u = i.indexOf(t); -1 !== u && i.splice(u, 1); i.length > 0 || (oc.forEach(t => { delete n[t] }), delete n._chartjs) } } function ge(n) { const i = new Set; let t, r; for (t = 0, r = n.length; t < r; ++t)i.add(n[t]); return i.size === r ? n : Array.from(i) } function to(n) { const i = Math.round(n); n = bi(n, i, n / 1e3) ? i : n; const r = Math.pow(10, Math.floor(nt(n))), t = n / r; return (t <= 1 ? 1 : t <= 2 ? 2 : t <= 5 ? 5 : 10) * r } function lc(n) { const i = [], r = Math.sqrt(n); let t; for (t = 1; t < r; t++)n % t == 0 && (i.push(t), i.push(n / t)); return r === (0 | r) && i.push(r), i.sort((n, t) => n - t).pop(), i } function wi(n) { return !isNaN(parseFloat(n)) && isFinite(n) } function bi(n, t, i) { return Math.abs(n - t) < i } function ac(n, t) { const i = Math.round(n); return i - t <= n && i + t >= n } function io(n, t, i) { let r, f, u; for (r = 0, f = n.length; r < f; r++)u = n[r][i], isNaN(u) || (t.min = Math.min(t.min, u), t.max = Math.max(t.max, u)) } function it(n) { return n * (s / 180) } function pu(n) { return n * (180 / s) } function ro(n) { if (c(n)) { let t = 1, i = 0; for (; Math.round(n * t) / t !== n;)t *= 10, i++; return i } } function uo(n, t) { const i = t.x - n.x, r = t.y - n.y, e = Math.sqrt(i * i + r * r); let u = Math.atan2(r, i); return u < -.5 * s && (u += f), { angle: u, distance: e } } function wu(n, t) { return Math.sqrt(Math.pow(t.x - n.x, 2) + Math.pow(t.y - n.y, 2)) } function vc(n, t) { return (n - t + hc) % f - s } function b(n) { return (n % f + f) % f } function ki(n, t, i, r) { const u = b(n), f = b(t), e = b(i), o = b(f - u), s = b(e - u), h = b(u - f), c = b(u - e); return u === f || u === e || r && f === e || o > s && h < c } function v(n, t, i) { return Math.max(t, Math.min(i, n)) } function yc(n) { return v(n, -32768, 32767) } function ct(n, t, i, r = 1e-6) { return n >= Math.min(t, i) - r && n <= Math.max(t, i) + r } function fo() { return "undefined" != typeof window && "undefined" != typeof document } function bu(n) { let t = n.parentNode; return t && "[object ShadowRoot]" === t.toString() && (t = t.host), t } function ku(n, t, i) { let r; return "string" == typeof n ? (r = parseInt(n, 10), -1 !== n.indexOf("%") && (r = r / 100 * t.parentNode[i])) : r = n, r } function pc(n, t) { return du(n).getPropertyValue(t) } function oi(n, t, i) { const r = {}; i = i ? "-" + i : ""; for (let u = 0; u < 4; u++) { const f = rw[u]; r[f] = parseFloat(n[t + "-" + f + i]) || 0 } return r.width = r.left + r.right, r.height = r.top + r.bottom, r } function dt(n, t) { if ("native" in n) return n; const { canvas: i, currentDevicePixelRatio: e } = t, f = du(i), c = "border-box" === f.boxSizing, r = oi(f, "padding"), u = oi(f, "border", "width"), { x: l, y: a, box: o } = function (n, t) { const i = n.touches, r = i && i.length ? i[0] : n, { offsetX: e, offsetY: o } = r; let u, f, s = !1; if (((n, t, i) => (n > 0 || t > 0) && (!i || !i.shadowRoot))(e, o, n.target)) u = e, f = o; else { const n = t.getBoundingClientRect(); u = r.clientX - n.left; f = r.clientY - n.top; s = !0 } return { x: u, y: f, box: s } }(n, i), v = r.left + (o && u.left), y = r.top + (o && u.top); let { width: s, height: h } = t; return c && (s -= r.width + u.width, h -= r.height + u.height), { x: Math.round((l - v) / s * i.width / e), y: Math.round((a - y) / h * i.height / e) } } function wc(n, t, i, r) { const e = du(n), s = oi(e, "margin"), h = ku(e.maxWidth, n, "clientWidth") || ar, c = ku(e.maxHeight, n, "clientHeight") || ar, o = function (n, t, i) { let r, u; if (void 0 === t || void 0 === i) { const f = bu(n); if (f) { const e = f.getBoundingClientRect(), n = du(f), o = oi(n, "border", "width"), s = oi(n, "padding"); t = e.width - s.width - o.width; i = e.height - s.height - o.height; r = ku(n.maxWidth, f, "clientWidth"); u = ku(n.maxHeight, f, "clientHeight") } else t = n.clientWidth, i = n.clientHeight } return { width: t, height: i, maxWidth: r || ar, maxHeight: u || ar } }(n, t, i); let { width: u, height: f } = o; if ("content-box" === e.boxSizing) { const n = oi(e, "border", "width"), t = oi(e, "padding"); u -= t.width + n.width; f -= t.height + n.height } return u = Math.max(0, u - s.width), f = Math.max(0, r ? Math.floor(u / r) : f - s.height), u = eo(Math.min(u, h, o.maxWidth)), f = eo(Math.min(f, c, o.maxHeight)), u && !f && (f = eo(u / 2)), { width: u, height: f } } function oo(n, t, i) { const u = t || 1, f = Math.floor(n.height * u), e = Math.floor(n.width * u); n.height = f / u; n.width = e / u; const r = n.canvas; return r.style && (i || !r.style.height && !r.style.width) && (r.style.height = `${n.height}px`, r.style.width = `${n.width}px`), (n.currentDevicePixelRatio !== u || r.height !== f || r.width !== e) && (n.currentDevicePixelRatio = u, r.height = f, r.width = e, n.ctx.setTransform(u, 0, 0, u, 0, 0), !0) } function so(n, t) { const i = pc(n, t), r = i && i.match(/^(\d+)(\.\d+)?px$/); if (r) return +r[1] } function kc(n) { return !n || r(n.size) || r(n.family) ? null : (n.style ? n.style + " " : "") + (n.weight ? n.weight + " " : "") + n.size + "px " + n.family } function vr(n, t, i, r, u) { let f = t[u]; return f || (f = t[u] = n.measureText(u).width, i.push(u)), f > r && (r = f), r } function dc(n, t, i, r) { let h = (r = r || {}).data = r.data || {}, o = r.garbageCollect = r.garbageCollect || []; r.font !== t && (h = r.data = {}, o = r.garbageCollect = [], r.font = t); n.save(); n.font = t; let s = 0; const y = i.length; let u, c, v, f, l; for (u = 0; u < y; u++)if (f = i[u], null != f && !0 !== e(f)) s = vr(n, h, o, s, f); else if (e(f)) for (c = 0, v = f.length; c < v; c++)l = f[c], null == l || e(l) || (s = vr(n, h, o, s, l)); n.restore(); const a = o.length / 2; if (a > i.length) { for (u = 0; u < a; u++)delete h[o[u]]; o.splice(0, a) } return s } function gt(n, t, i) { const r = n.currentDevicePixelRatio, u = 0 !== i ? Math.max(i / 2, .5) : 0; return Math.round((t - u) * r) / r + u } function ho(n, t) { (t = t || n.getContext("2d")).save(); t.resetTransform(); t.clearRect(0, 0, n.width, n.height); t.restore() } function yr(n, t, i, r) { let y, e, o, a, v; const l = t.pointStyle, p = t.rotation, c = t.radius; let u = (p || 0) * cc; if (l && "object" == typeof l && (y = l.toString(), "[object HTMLImageElement]" === y || "[object HTMLCanvasElement]" === y)) return n.save(), n.translate(i, r), n.rotate(u), n.drawImage(l, -l.width / 2, -l.height / 2, l.width, l.height), void n.restore(); if (!(isNaN(c) || c <= 0)) { switch (n.beginPath(), l) { default: n.arc(i, r, c, 0, f); n.closePath(); break; case "triangle": n.moveTo(i + Math.sin(u) * c, r - Math.cos(u) * c); u += no; n.lineTo(i + Math.sin(u) * c, r - Math.cos(u) * c); u += no; n.lineTo(i + Math.sin(u) * c, r - Math.cos(u) * c); n.closePath(); break; case "rectRounded": v = .516 * c; a = c - v; e = Math.cos(u + pi) * a; o = Math.sin(u + pi) * a; n.arc(i - e, r - o, v, u - s, u - h); n.arc(i + o, r - e, v, u - h, u); n.arc(i + e, r + o, v, u, u + h); n.arc(i - o, r + e, v, u + h, u + s); n.closePath(); break; case "rect": if (!p) { a = Math.SQRT1_2 * c; n.rect(i - a, r - a, 2 * a, 2 * a); break } u += pi; case "rectRot": e = Math.cos(u) * c; o = Math.sin(u) * c; n.moveTo(i - e, r - o); n.lineTo(i + o, r - e); n.lineTo(i + e, r + o); n.lineTo(i - o, r + e); n.closePath(); break; case "crossRot": u += pi; case "cross": e = Math.cos(u) * c; o = Math.sin(u) * c; n.moveTo(i - e, r - o); n.lineTo(i + e, r + o); n.moveTo(i + o, r - e); n.lineTo(i - o, r + e); break; case "star": e = Math.cos(u) * c; o = Math.sin(u) * c; n.moveTo(i - e, r - o); n.lineTo(i + e, r + o); n.moveTo(i + o, r - e); n.lineTo(i - o, r + e); u += pi; e = Math.cos(u) * c; o = Math.sin(u) * c; n.moveTo(i - e, r - o); n.lineTo(i + e, r + o); n.moveTo(i + o, r - e); n.lineTo(i - o, r + e); break; case "line": e = Math.cos(u) * c; o = Math.sin(u) * c; n.moveTo(i - e, r - o); n.lineTo(i + e, r + o); break; case "dash": n.moveTo(i, r); n.lineTo(i + Math.cos(u) * c, r + Math.sin(u) * c) }n.fill(); t.borderWidth > 0 && n.stroke() } } function di(n, t, i) { return i = i || .5, !t || n && n.x > t.left - i && n.x < t.right + i && n.y > t.top - i && n.y < t.bottom + i } function pr(n, t) { n.save(); n.beginPath(); n.rect(t.left, t.top, t.right - t.left, t.bottom - t.top); n.clip() } function wr(n) { n.restore() } function gc(n, t, i, r, u) { if (!t) return n.lineTo(i.x, i.y); if ("middle" === u) { const r = (t.x + i.x) / 2; n.lineTo(r, t.y); n.lineTo(r, i.y) } else "after" === u != !!r ? n.lineTo(t.x, i.y) : n.lineTo(i.x, t.y); n.lineTo(i.x, i.y) } function nl(n, t, i, r) { if (!t) return n.lineTo(i.x, i.y); n.bezierCurveTo(r ? t.cp1x : t.cp2x, r ? t.cp1y : t.cp2y, r ? i.cp2x : i.cp1x, r ? i.cp2y : i.cp1y, i.x, i.y) } function ni(n, t, i, u, f, o = {}) { const c = e(t) ? t : [t], l = o.strokeWidth > 0 && "" !== o.strokeColor; let s, h; for (n.save(), n.font = f.string, function (n, t) { t.translation && n.translate(t.translation[0], t.translation[1]); r(t.rotation) || n.rotate(t.rotation); t.color && (n.fillStyle = t.color); t.textAlign && (n.textAlign = t.textAlign); t.textBaseline && (n.textBaseline = t.textBaseline) }(n, o), s = 0; s < c.length; ++s)h = c[s], l && (o.strokeColor && (n.strokeStyle = o.strokeColor), r(o.strokeWidth) || (n.lineWidth = o.strokeWidth), n.strokeText(h, i, u, o.maxWidth)), n.fillText(h, i, u, o.maxWidth), uw(n, i, u, h, o), u += f.lineHeight; n.restore() } function uw(n, t, i, r, u) { if (u.strikethrough || u.underline) { const f = n.measureText(r), s = t - f.actualBoundingBoxLeft, h = t + f.actualBoundingBoxRight, c = i - f.actualBoundingBoxAscent, e = i + f.actualBoundingBoxDescent, o = u.strikethrough ? (c + e) / 2 : e; n.strokeStyle = n.fillStyle; n.beginPath(); n.lineWidth = u.decorationWidth || 2; n.moveTo(s, o); n.lineTo(h, o); n.stroke() } } function gi(n, t) { const { x: r, y: u, w: f, h: e, radius: i } = t; n.arc(r + i.topLeft, u + i.topLeft, i.topLeft, -h, s, !0); n.lineTo(r, u + e - i.bottomLeft); n.arc(r + i.bottomLeft, u + e - i.bottomLeft, i.bottomLeft, s, h, !0); n.lineTo(r + f - i.bottomRight, u + e); n.arc(r + f - i.bottomRight, u + e - i.bottomRight, i.bottomRight, h, 0, !0); n.lineTo(r + f, u + i.topRight); n.arc(r + f - i.topRight, u + i.topRight, i.topRight, 0, -h, !0); n.lineTo(r + i.topLeft, u) } function gu(n, t = [""], i = n, r, u = (() => n[0])) { g(r) || (r = ul("_fallback", n)); const f = { [Symbol.toStringTag]: "Object", _cacheable: !0, _scopes: n, _rootScopes: i, _fallback: r, _getTarget: u, override: u => gu([u, ...n], t, i, r) }; return new Proxy(f, { deleteProperty: (t, i) => (delete t[i], delete t._keys, delete n[0][i], !0), get: (i, r) => tl(i, r, () => function (n, t, i, r) { let u; for (const f of t) if (u = ul(fw(f, n), i), g(u)) return lo(n, u) ? ao(i, r, n, u) : u }(r, t, n, i)), getOwnPropertyDescriptor: (n, t) => Reflect.getOwnPropertyDescriptor(n._scopes[0], t), getPrototypeOf: () => Reflect.getPrototypeOf(n[0]), has: (n, t) => fl(n).includes(t), ownKeys: n => fl(n), set(n, t, i) { const r = n._storage || (n._storage = u()); return n[t] = r[t] = i, delete n._keys, !0 } }) } function si(n, i, r, u) { const f = { _cacheable: !1, _proxy: n, _context: i, _subProxy: r, _stack: new Set, _descriptors: co(n, u), setContext: t => si(n, t, r, u), override: t => si(n.override(t), i, r, u) }; return new Proxy(f, { deleteProperty: (t, i) => (delete t[i], delete n[i], !0), get: (n, i, r) => tl(n, i, () => function (n, i, r) { const { _proxy: s, _context: h, _subProxy: o, _descriptors: f } = n; let u = s[i]; return yt(u) && f.isScriptable(i) && (u = function (n, t, i, r) { const { _proxy: f, _context: e, _subProxy: o, _stack: u } = i; if (u.has(n)) throw new Error("Recursion detected: " + Array.from(u).join("->") + "->" + n); return u.add(n), t = t(e, o || r), u.delete(n), lo(n, t) && (t = ao(f._scopes, f, n, t)), t }(i, u, n, r)), e(u) && u.length && (u = function (n, i, r, u) { const { _proxy: e, _context: f, _subProxy: o, _descriptors: s } = r; if (g(f.index) && u(n)) i = i[f.index % i.length]; else if (t(i[0])) { const t = i, r = e._scopes.filter(n => n !== t); i = []; for (const u of t) { const t = ao(r, e, n, u); i.push(si(t, f, o && o[n], s)) } } return i }(i, u, n, f.isIndexable)), lo(i, u) && (u = si(u, h, o && o[i], f)), u }(n, i, r)), getOwnPropertyDescriptor: (t, i) => t._descriptors.allKeys ? Reflect.has(n, i) ? { enumerable: !0, configurable: !0 } : void 0 : Reflect.getOwnPropertyDescriptor(n, i), getPrototypeOf: () => Reflect.getPrototypeOf(n), has: (t, i) => Reflect.has(n, i), ownKeys: () => Reflect.ownKeys(n), set: (t, i, r) => (n[i] = r, delete t[i], !0) }) } function co(n) { const { _scriptable: t = e.scriptable, _indexable: i = e.indexable, _allKeys: r = e.allKeys } = n; return { allKeys: r, scriptable: t, indexable: i, isScriptable: yt(t) ? t : () => t, isIndexable: yt(i) ? i : () => i } } function tl(n, t, i) { if (Object.prototype.hasOwnProperty.call(n, t)) return n[t]; const r = i(); return n[t] = r, r } function il(n, t, i) { return yt(n) ? n(t, i) : n } function ow(n, t, i, r, u) { for (const f of t) { const t = ew(i, f); if (t) { n.add(t); const f = il(t._fallback, i, u); if (g(f) && f !== i && f !== r) return f } else if (!1 === t && g(r) && i !== r) return null } return !1 } function ao(n, i, r, u) { const h = i._rootScopes, f = il(i._fallback, r, u), c = [...n, ...h], o = new Set; o.add(u); let s = rl(o, c, r, f || r, u); return null !== s && (!g(f) || f === r || (s = rl(o, c, f, s, u), null !== s)) && gu(Array.from(o), [""], h, f, () => function (n, i, r) { const u = n._getTarget(); i in u || (u[i] = {}); const f = u[i]; return e(f) && t(r) ? r : f }(i, r, u)) } function rl(n, t, i, r, u) { for (; i;)i = ow(n, t, i, r, u); return i } function ul(n, t) { for (const i of t) if (i) { const t = i[n]; if (g(t)) return t } } function fl(n) { let t = n._keys; return t || (t = n._keys = function (n) { const t = new Set; for (const i of n) for (const n of Object.keys(i).filter(n => !n.startsWith("_"))) t.add(n); return Array.from(t) }(n._scopes)), t } function vo(n, t, i, r) { const { iScale: h } = n, { key: c = "r" } = this._parsing, e = new Array(r); let u, o, f, s; for (u = 0, o = r; u < o; ++u)f = u + i, s = t[f], e[u] = { r: h.parse(vt(s, c), f) }; return e } function ol(n, t, i, r) { const f = n.skip ? t : n, u = t, e = i.skip ? t : i, h = wu(u, f), c = wu(e, u); let o = h / (h + c), s = c / (h + c); o = isNaN(o) ? 0 : o; s = isNaN(s) ? 0 : s; const l = r * o, a = r * s; return { previous: { x: u.x - l * (e.x - f.x), y: u.y - l * (e.y - f.y) }, next: { x: u.x + a * (e.x - f.x), y: u.y + a * (e.y - f.y) } } } function sl(n, t = "x") { const s = el(t), e = n.length, r = Array(e).fill(0), o = Array(e); let i, h, f, u = nr(n, 0); for (i = 0; i < e; ++i)if (h = f, f = u, u = nr(n, i + 1), f) { if (u) { const n = u[t] - f[t]; r[i] = 0 !== n ? (u[s] - f[s]) / n : 0 } o[i] = h ? u ? ft(r[i - 1]) !== ft(r[i]) ? 0 : (r[i - 1] + r[i]) / 2 : r[i - 1] : r[i] } !function (n, t, i) { const h = n.length; let r, u, f, e, s, o = nr(n, 0); for (let c = 0; c < h - 1; ++c)s = o, o = nr(n, c + 1), s && o && (bi(t[c], 0, sw) ? i[c] = i[c + 1] = 0 : (r = i[c] / t[c], u = i[c + 1] / t[c], e = Math.pow(r, 2) + Math.pow(u, 2), e <= 9 || (f = 3 / Math.sqrt(e), i[c] = r * f * t[c], i[c + 1] = u * f * t[c]))) }(n, r, o), function (n, t, i = "x") { const e = el(i), s = n.length; let u, o, r, f = nr(n, 0); for (let h = 0; h < s; ++h)if (o = r, r = f, f = nr(n, h + 1), r) { const s = r[i], c = r[e]; o && (u = (s - o[i]) / 3, r[`cp1${i}`] = s - u, r[`cp1${e}`] = c - u * t[h]); f && (u = (f[i] - s) / 3, r[`cp2${i}`] = s + u, r[`cp2${e}`] = c + u * t[h]) } }(n, o, t) } function nf(n, t, i) { return Math.max(Math.min(n, i), t) } function hl(n, t, i, r, u) { let e, s, f, o; if (t.spanGaps && (n = n.filter(n => !n.skip)), "monotone" === t.cubicInterpolationMode) sl(n, u); else { let i = r ? n[n.length - 1] : n[0]; for (e = 0, s = n.length; e < s; ++e)f = n[e], o = ol(i, f, n[Math.min(e + 1, s - (r ? 0 : 1)) % s], t.tension), f.cp1x = o.previous.x, f.cp1y = o.previous.y, f.cp2x = o.next.x, f.cp2y = o.next.y, i = f } t.capBezierPoints && function (n, t) { let r, u, i, f, o, e = di(n[0], t); for (r = 0, u = n.length; r < u; ++r)o = f, f = e, e = r < u - 1 && di(n[r + 1], t), f && (i = n[r], o && (i.cp1x = nf(i.cp1x, t.left, t.right), i.cp1y = nf(i.cp1y, t.top, t.bottom)), e && (i.cp2x = nf(i.cp2x, t.left, t.right), i.cp2y = nf(i.cp2y, t.top, t.bottom))) }(n, i) } function ti(n, t, i) { return { x: n.x + i * (t.x - n.x), y: n.y + i * (t.y - n.y) } } function al(n, t, i, r) { return { x: n.x + i * (t.x - n.x), y: "middle" === r ? i < .5 ? n.y : t.y : "after" === r ? i < 1 ? n.y : t.y : i > 0 ? t.y : n.y } } function vl(n, t, i) { const r = { x: n.cp2x, y: n.cp2y }, u = { x: t.cp1x, y: t.cp1y }, e = ti(n, r, i), f = ti(r, u, i), o = ti(u, t, i), s = ti(e, f, i), h = ti(f, o, i); return ti(s, h, i) } function ir(n, t, i) { return function (n, t) { t = t || {}; const r = n + JSON.stringify(t); let i = yl.get(r); return i || (i = new Intl.NumberFormat(n, t), yl.set(r, i)), i }(t, i).format(n) } function pl(n, t) { const i = ("" + n).match(hw); if (!i || "normal" === i[1]) return 1.2 * t; switch (n = +i[2], i[3]) { case "px": return n; case "%": n /= 100 }return t * n } function rf(i, r) { const u = {}, f = t(r), e = f ? Object.keys(r) : r, o = t(i) ? f ? t => n(i[t], i[r[t]]) : n => i[n] : () => i; for (const n of e) u[n] = +o(n) || 0; return u } function yo(n) { return rf(n, { top: "y", right: "x", bottom: "y", left: "x" }) } function ii(n) { return rf(n, ["topLeft", "topRight", "bottomLeft", "bottomRight"]) } function w(n) { const t = yo(n); return t.width = t.left + t.right, t.height = t.top + t.bottom, t } function a(t, r) { t = t || {}; r = r || i.font; let u = n(t.size, r.size); "string" == typeof u && (u = parseInt(u, 10)); let f = n(t.style, r.style); f && !("" + f).match(cw) && (console.warn('Invalid font style specified: "' + f + '"'), f = ""); const e = { family: n(t.family, r.family), lineHeight: pl(n(t.lineHeight, r.lineHeight), u), size: u, style: f, weight: n(t.weight, r.weight), string: "" }; return e.string = kc(e), e } function rr(n, t, i, r) { let f, s, u, o = !0; for (f = 0, s = n.length; f < s; ++f)if (u = n[f], void 0 !== u && (void 0 !== t && "function" == typeof u && (u = u(t), o = !1), void 0 !== i && e(u) && (u = u[i % u.length], o = !1), void 0 !== u)) return r && !o && (r.cacheable = !1), u } function wl(n, t, i) { const { min: r, max: u } = n, f = pe(t, (u - r) / 2), e = (n, t) => i && 0 === n ? 0 : n + t; return { min: e(r, -Math.abs(f)), max: e(u, f) } } function pt(n, t) { return Object.assign(Object.create(n), t) } function hi(n, t, i) { return n ? function (n, t) { return { x: i => n + n + t - i, setWidth(n) { t = n }, textAlign: n => "center" === n ? n : "right" === n ? "left" : "right", xPlus: (n, t) => n - t, leftForLtr: (n, t) => n - t } }(t, i) : { x: n => n, setWidth() { }, textAlign: n => n, xPlus: (n, t) => n + t, leftForLtr: n => n } } function po(n, t) { let i, r; "ltr" !== t && "rtl" !== t || (i = n.canvas.style, r = [i.getPropertyValue("direction"), i.getPropertyPriority("direction")], i.setProperty("direction", t, "important"), n.prevTextDirection = r) } function wo(n, t) { void 0 !== t && (delete n.prevTextDirection, n.canvas.style.setProperty("direction", t[0], t[1])) } function bl(n) { return "angle" === n ? { between: ki, compare: vc, normalize: b } : { between: ct, compare: (n, t) => n - t, normalize: n => n } } function kl({ start: u, end: n, count: t, loop: r, style: i }) { return { start: u % t, end: n % t, loop: r && (n - u + 1) % t == 0, style: i } } function bo(n, t, i) { if (!i) return [n]; const { property: y, start: e, end: o } = i, s = t.length, { compare: h, between: c, normalize: d } = bl(y), { start: p, end: w, loop: b, style: k } = function (n, t, i) { const { property: o, start: c, end: l } = i, { between: a, normalize: v } = bl(o), r = t.length; let e, s, { start: u, end: f, loop: h } = n; if (h) { for (u += r, f += r, e = 0, s = r; e < s && a(v(t[u % r][o]), c, l); ++e)u--, f--; u %= r; f %= r } return f < u && (f += r), { start: u, end: f, loop: h, style: n.style } }(n, t, i), l = []; let r, a, f, v = !1, u = null; const g = () => v || c(e, f, r) && 0 !== h(e, f), nt = () => !v || 0 === h(o, r) || c(o, f, r); for (let n = p, i = p; n <= w; ++n)a = t[n % s], a.skip || (r = d(a[y]), r !== f && (v = c(r, e, o), null === u && g() && (u = 0 === h(r, e) ? n : i), null !== u && nt() && (l.push(kl({ start: u, end: n, loop: b, count: s, style: k })), u = null), i = n, f = r)); return null !== u && l.push(kl({ start: u, end: w, loop: b, count: s, style: k })), l } function ko(n, t) { const i = [], r = n.segments; for (let u = 0; u < r.length; u++) { const f = bo(r[u], n.points, t); f.length && i.push(...f) } return i } function dl(n, t) { const i = n.points, e = n.options.spanGaps, u = i.length; if (!u) return []; const o = !!n._loop, { start: f, end: r } = function (n, t, i, r) { let u = 0, f = t - 1; if (i && !r) for (; u < t && !n[u].skip;)u++; for (; u < t && n[u].skip;)u++; for (u %= t, i && (f += u); f > u && n[f % t].skip;)f--; return f %= t, { start: u, end: f } }(i, u, o, e); return !0 === e ? gl(n, [{ start: f, end: r, loop: o }], i, t) : gl(n, function (n, t, i, r) { const f = n.length, o = []; let u, e = t, s = n[t]; for (u = t + 1; u <= i; ++u) { const i = n[u % f]; i.skip || i.stop ? s.skip || (r = !1, o.push({ start: t % f, end: (u - 1) % f, loop: r }), t = e = i.stop ? u : null) : (e = u, s.skip && (t = u)); s = i } return null !== e && o.push({ start: t % f, end: e % f, loop: r }), o }(i, f, r < f ? r + u : r, !!n._fullLoop && 0 === f && r === u - 1), i, t) } function gl(n, t, i, r) { return r && r.setContext && i ? function (n, t, i, r) { function c(n, t, r, e) { const c = s ? -1 : 1; if (n !== t) { for (n += u; i[n % u].skip;)n -= c; for (; i[t % u].skip;)t += c; n % u != t % u && (h.push({ start: n % u, end: t % u, loop: r, style: e }), o = e, f = t % u) } } const l = n._chart.getContext(), a = na(n.options), { _datasetIndex: v, options: { spanGaps: s } } = n, u = i.length, h = []; let o = a, f = t[0].start, e = f; for (const n of t) { f = s ? f : n.start; let t, h = i[f % u]; for (e = f + 1; e <= n.end; e++) { const s = i[e % u]; t = na(r.setContext(pt(l, { type: "segment", p0: h, p1: s, p0DataIndex: (e - 1) % u, p1DataIndex: e % u, datasetIndex: v }))); lw(t, o) && c(f, e - 1, n.loop, o); h = s; o = t } f < e - 1 && c(f, e - 1, n.loop, o) } return h }(n, t, i, r) : t } function na(n) { return { backgroundColor: n.backgroundColor, borderCapStyle: n.borderCapStyle, borderDash: n.borderDash, borderDashOffset: n.borderDashOffset, borderJoinStyle: n.borderJoinStyle, borderWidth: n.borderWidth, borderColor: n.borderColor } } function lw(n, t) { return t && JSON.stringify(n) !== JSON.stringify(t) } function aw(n, t, i, r) { const { controller: e, data: u, _sorted: o } = n, f = e._cachedMeta.iScale; if (f && t === f.axis && "r" !== t && o && u.length) { const n = f._reversePixels ? fc : ht; if (!r) return n(u, t, i); if (e._sharedOptions) { const f = u[0], r = "function" == typeof f.getRange && f.getRange(t); if (r) { const f = n(u, t, i - r), e = n(u, t, i + r); return { lo: f.lo, hi: e.hi } } } } return { lo: 0, hi: u.length - 1 } } function br(n, t, i, r, u) { const f = n.getSortedVisibleDatasetMetas(), e = i[t]; for (let n = 0, i = f.length; n < i; ++n) { const { index: i, data: o } = f[n], { lo: s, hi: h } = aw(f[n], t, e, u); for (let n = s; n <= h; ++n) { const t = o[n]; t.skip || r(t, i, n) } } } function go(n, t, i, r, u) { const f = []; return !u && !n.isPointInArea(t) ? f : (br(n, i, t, function (i, e, o) { (u || di(i, n.chartArea, 0)) && i.inRange(t.x, t.y, r) && f.push({ element: i, datasetIndex: e, index: o }) }, !0), f) } function vw(n, t, i, r, u, f) { let e = []; const s = function (n) { const t = -1 !== n.indexOf("x"), i = -1 !== n.indexOf("y"); return function (n, r) { const u = t ? Math.abs(n.x - r.x) : 0, f = i ? Math.abs(n.y - r.y) : 0; return Math.sqrt(Math.pow(u, 2) + Math.pow(f, 2)) } }(i); let o = Number.POSITIVE_INFINITY; return br(n, i, t, function (i, h, c) { const a = i.inRange(t.x, t.y, u); if (!r || a) { const v = i.getCenterPoint(u); if (!!f || n.isPointInArea(v) || a) { const l = s(t, v); l < o ? (e = [{ element: i, datasetIndex: h, index: c }], o = l) : l === o && e.push({ element: i, datasetIndex: h, index: c }) } } }), e } function ns(n, t, i, r, u, f) { return f || n.isPointInArea(t) ? "r" !== i || r ? vw(n, t, i, r, u, f) : function (n, t, i, r) { let u = []; return br(n, i, t, function (n, i, f) { const { startAngle: e, endAngle: o } = n.getProps(["startAngle", "endAngle"], r), { angle: s } = uo(n, { x: t.x, y: t.y }); ki(s, e, o) && u.push({ element: n, datasetIndex: i, index: f }) }), u }(n, t, i, u) : [] } function ia(n, t, i, r, u) { const e = [], o = "x" === i ? "inXRange" : "inYRange"; let f = !1; return br(n, i, t, (n, r, s) => { n[o](t[i], u) && (e.push({ element: n, datasetIndex: r, index: s }), f = f || n.inRange(t.x, t.y, u)) }), r && !f ? [] : e } function kr(n, t) { return n.filter(n => n.pos === t) } function ua(n, t) { return n.filter(n => -1 === ra.indexOf(n.pos) && n.box.axis === t) } function dr(n, t) { return n.sort((n, i) => { const r = t ? i : n, u = t ? n : i; return r.weight === u.weight ? r.index - u.index : r.weight - u.weight }) } function yw(n, t) { const u = function (n) { const t = {}; for (const i of n) { const { stack: n, pos: u, stackWeight: f } = i; if (n && ra.includes(u)) { const r = t[n] || (t[n] = { count: 0, placed: 0, weight: 0, size: 0 }); r.count++; r.weight += f } } return t }(n), { vBoxMaxWidth: f, hBoxMaxHeight: e } = t; let r, o, i; for (r = 0, o = n.length; r < o; ++r) { i = n[r]; const { fullSize: s } = i.box, h = u[i.stack], o = h && i.stackWeight / h.weight; i.horizontal ? (i.width = o ? o * f : s && t.availableWidth, i.height = e) : (i.width = f, i.height = o ? o * e : s && t.availableHeight) } return u } function fa(n, t, i, r) { return Math.max(n[i], t[i]) + Math.max(n[r], t[r]) } function ea(n, t) { n.top = Math.max(n.top, t.top); n.left = Math.max(n.left, t.left); n.bottom = Math.max(n.bottom, t.bottom); n.right = Math.max(n.right, t.right) } function pw(n, i, r, u) { const { pos: e, box: f } = r, o = n.maxPadding; if (!t(e)) { r.size && (n[e] -= r.size); const t = u[r.stack] || { size: 0, count: 1 }; t.size = Math.max(t.size, r.horizontal ? f.height : f.width); r.size = t.size / t.count; n[e] += r.size } f.getPadding && ea(o, f.getPadding()); const s = Math.max(0, i.outerWidth - fa(o, n, "left", "right")), h = Math.max(0, i.outerHeight - fa(o, n, "top", "bottom")), c = s !== n.w, l = h !== n.h; return n.w = s, n.h = h, r.horizontal ? { same: c, other: l } : { same: l, other: c } } function ww(n, t) { function r(n) { const r = { left: 0, top: 0, right: 0, bottom: 0 }; return n.forEach(n => { r[n] = Math.max(t[n], i[n]) }), r } const i = t.maxPadding; return r(n ? ["left", "right"] : ["top", "bottom"]) } function gr(n, t, i, r) { const e = []; let f, c, u, o, s, h; for (f = 0, c = n.length, s = 0; f < c; ++f) { u = n[f]; o = u.box; o.update(u.width || t.w, u.height || t.h, ww(u.horizontal, t)); const { same: c, other: l } = pw(t, i, u, r); s |= c && e.length; h = h || l; o.fullSize || e.push(u) } return s && gr(e, t, i, r) || h } function uf(n, t, i, r, u) { n.top = i; n.left = t; n.right = t + r; n.bottom = i + u; n.width = r; n.height = u } function oa(n, t, i, r) { const u = i.padding; let { x: f, y: e } = t; for (const o of n) { const s = o.box, n = r[o.stack] || { count: 1, placed: 0, weight: 1 }, h = o.stackWeight / n.weight || 1; if (o.horizontal) { const r = t.w * h, f = n.size || s.height; g(n.start) && (e = n.start); s.fullSize ? uf(s, u.left, e, i.outerWidth - u.right - u.left, f) : uf(s, t.left + n.placed, e, r, f); n.start = e; n.placed += r; e = s.bottom } else { const r = t.h * h, e = n.size || s.width; g(n.start) && (f = n.start); s.fullSize ? uf(s, f, u.top, e, i.outerHeight - u.bottom - u.top) : uf(s, f, t.top + n.placed, e, r); n.start = f; n.placed += r; f = s.right } } t.x = f; t.y = e } function kw(n, t, i) { n.canvas.removeEventListener(t, i, ca) } function ff(n, t) { for (const i of n) if (i === t || i.contains(t)) return !0 } function dw(n, t, i) { const r = n.canvas, u = new MutationObserver(n => { let t = !1; for (const i of n) t = t || ff(i.addedNodes, r), t = t && !ff(i.removedNodes, r); t && i() }); return u.observe(document, { childList: !0, subtree: !0 }), u } function gw(n, t, i) { const r = n.canvas, u = new MutationObserver(n => { let t = !1; for (const i of n) t = t || ff(i.removedNodes, r), t = t && !ff(i.addedNodes, r); t && i() }); return u.observe(document, { childList: !0, subtree: !0 }), u } function aa() { const n = window.devicePixelRatio; n !== la && (la = n, nu.forEach((t, i) => { i.currentDevicePixelRatio !== n && t() })) } function nb(n, t, i) { const u = n.canvas, r = u && bu(u); if (r) { const f = ee((n, t) => { const u = r.clientWidth; i(n, t); u < r.clientWidth && i() }, window), e = new ResizeObserver(n => { const t = n[0], i = t.contentRect.width, r = t.contentRect.height; 0 === i && 0 === r || f(i, r) }); return e.observe(r), function (n, t) { nu.size || window.addEventListener("resize", aa); nu.set(n, t) }(n, f), e } } function rs(n, t, i) { i && i.disconnect(); "resize" === t && function (n) { nu.delete(n); nu.size || window.removeEventListener("resize", aa) }(n) } function tb(n, t, i) { const u = n.canvas, r = ee(t => { null !== n.ctx && i(function (n, t) { const u = bw[n.type] || n.type, { x: i, y: r } = dt(n, t); return { type: u, chart: t, "native": n, x: void 0 !== i ? i : null, y: void 0 !== r ? r : null } }(t, n)) }, n, n => { const t = n[0]; return [t, t.offsetX, t.offsetY] }); return function (n, t, i) { n.addEventListener(t, i, ca) }(u, t, r), r } function ya(n) { return !fo() || "undefined" != typeof OffscreenCanvas && n instanceof OffscreenCanvas ? sa : va } function ba(n, t) { const i = n && n.options || {}, r = i.reverse, u = void 0 === i.min ? t : 0, f = void 0 === i.max ? t : 0; return { start: r ? f : u, end: r ? u : f } } function ka(n, t) { const r = [], u = n._getSortedDatasetMetas(t); let i, f; for (i = 0, f = u.length; i < f; ++i)r.push(u[i].index); return r } function da(n, t, i, r = {}) { const o = n.keys, h = "single" === r.mode; let u, s, e, f; if (null !== t) { for (u = 0, s = o.length; u < s; ++u) { if (e = +o[u], e === i) { if (r.all) continue; break } f = n.values[e]; c(f) && (h || 0 === t || ft(t) === ft(f)) && (t += f) } return t } } function ga(n, t) { const i = n && n.options.stacked; return i || void 0 === i && void 0 !== t.stack } function ub(n, t, i) { const r = n[t] || (n[t] = {}); return r[i] || (r[i] = {}) } function nv(n, t, i, r) { for (const u of t.getMatchingVisibleMetas(r).reverse()) { const t = n[u.index]; if (i && t > 0 || !i && t < 0) return u.index } return null } function tv(n, t) { const { chart: f, _cachedMeta: r } = n, o = f._stacks || (f._stacks = {}), { iScale: e, vScale: u, index: s } = r, a = e.axis, h = u.axis, c = function (n, t, i) { return `${n.id}.${t.id}.${i.stack || i.type}` }(e, u, r), l = t.length; let i; for (let n = 0; n < l; ++n) { const f = t[n], { [l]: e, [h]: l } = f; i = (f._stacks || (f._stacks = {}))[h] = ub(o, c, e); i[s] = l; i._top = nv(i, u, !0, r.type); i._bottom = nv(i, u, !1, r.type) } } function es(n, t) { const i = n.scales; return Object.keys(i).filter(n => i[n].axis === t).shift() } function tu(n, t) { const r = n.controller.index, i = n.vScale && n.vScale.axis; if (i) { t = t || n._parsed; for (const n of t) { const t = n._stacks; if (!t || void 0 === t[i] || void 0 === t[i][r]) return; delete t[i][r] } } } function fb(n, t) { const c = n.options.ticks, o = c.maxTicksLimit || function (n) { const i = n.options.offset, t = n._tickSize(), r = n._length / t + (i ? 0 : 1), u = n._maxLength / t; return Math.floor(Math.min(r, u)) }(n), u = c.major.enabled ? function (n) { const i = []; let t, r; for (t = 0, r = n.length; t < r; t++)n[t].major && i.push(t); return i }(t) : [], f = u.length, s = u[0], h = u[f - 1], i = []; if (f > o) return function (n, t, i, r) { let u, f = 0, e = i[0]; for (r = Math.ceil(r), u = 0; u < n.length; u++)u === e && (t.push(n[u]), f++, e = i[f * r]) }(t, i, u, f / o), i; const e = function (n, t, i) { const u = function (n) { const r = n.length; let t, i; if (r < 2) return !1; for (i = n[0], t = 1; t < r; ++t)if (n[t] - n[t - 1] !== i) return !1; return i }(n), r = t.length / i; if (!u) return Math.max(r, 1); const f = lc(u); for (let n = 0, t = f.length - 1; n < t; n++) { const t = f[n]; if (t > r) return t } return Math.max(r, 1) }(u, t, o); if (f > 0) { let n, c; const o = f > 1 ? Math.round((h - s) / (f - 1)) : null; for (ef(t, i, e, r(o) ? 0 : s - o, s), n = 0, c = f - 1; n < c; n++)ef(t, i, e, u[n], u[n + 1]); return ef(t, i, e, h, r(o) ? t.length : h + o), i } return ef(t, i, e), i } function ef(t, i, r, u, f) { const s = n(u, 0), l = Math.min(n(f, t.length), t.length); let c, e, o, h = 0; for (r = Math.ceil(r), f && (c = f - u, r = c / Math.floor(c / r)), o = s; o < 0;)h++, o = Math.round(s + h * r); for (e = Math.max(s, 0); e < l; e++)e === o && (i.push(t[e]), h++, o = Math.round(s + h * r)) } function fv(n, t) { const r = [], u = n.length / t, f = n.length; let i = 0; for (; i < f; i += u)r.push(n[Math.floor(i)]); return r } function eb(n, t, i) { const e = n.ticks.length, u = Math.min(t, e - 1), o = n._startPixel, s = n._endPixel, h = 1e-6; let f, r = n.getPixelForTick(u); if (!(i && (f = 1 === e ? Math.max(r - o, s - r) : 0 === t ? (n.getPixelForTick(1) - r) / 2 : (r - n.getPixelForTick(u - 1)) / 2, r += u < t ? f : -f, r < o - h || r > s + h))) return r } function iu(n) { return n.drawTicks ? n.tickLength : 0 } function ev(n, t) { if (!n.display) return 0; const i = a(n.font, t), r = w(n.padding); return (e(n.text) ? n.text.length : 1) * i.lineHeight + r.height } function ob(n, t, i) { let r = su(n); return (i && "right" !== t || !i && "right" === t) && (r = (n => "left" === n ? "right" : "right" === n ? "left" : n)(r)), r } function hb(n, t) { return t || !1 !== n ? !0 === n ? {} : n : null } function cb(n, t, i, r) { const u = n.pluginScopeKeys(t), f = n.getOptionScopes(i, u); return n.createResolver(f, r, [""], { scriptable: !1, indexable: !1, allKeys: !0 }) } function ss(n, t) { const r = i.datasets[n] || {}; return ((t.datasets || {})[n] || {}).indexAxis || t.indexAxis || r.indexAxis || "x" } function hs(n, t) { return "x" === n || "y" === n ? n : t.axis || ("top" === (i = t.position) || "bottom" === i ? "x" : "left" === i || "right" === i ? "y" : void 0) || n.charAt(0).toLowerCase(); var i } function ov(r) { const u = r.options || (r.options = {}); u.plugins = n(u.plugins, {}); u.scales = function (n, r) { const o = ei[n.type] || { scales: {} }, f = r.scales || {}, s = ss(n.type, r), e = Object.create(null), u = Object.create(null); return Object.keys(f).forEach(n => { const r = f[n]; if (!t(r)) return console.error(`Invalid scale configuration for scale: ${n}`); if (r._proxy) return console.warn(`Ignoring resolver passed as options for scale: ${n}`); const i = hs(n, r), c = function (n, t) { return n === t ? "_index_" : "_value_" }(i, s), h = o.scales || {}; e[i] = e[i] || n; u[n] = yi(Object.create(null), [{ axis: i }, r, h[i], h[c]]) }), n.data.datasets.forEach(t => { const i = t.type || n.type, s = t.indexAxis || ss(i, r), o = (ei[i] || {}).scales || {}; Object.keys(o).forEach(n => { const i = function (n, t) { let i = n; return "_index_" === n ? i = t : "_value_" === n && (i = "x" === t ? "y" : "x"), i }(n, s), r = t[i + "AxisID"] || e[i] || i; u[r] = u[r] || Object.create(null); yi(u[r], [{ axis: i }, f[r], o[n]]) }) }), Object.keys(u).forEach(n => { const t = u[n]; yi(t, [i.scales[t.type], i.scale]) }), u }(r, u) } function sv(n) { return (n = n || {}).datasets = n.datasets || [], n.labels = n.labels || [], n } function hf(n, t) { let i = hv.get(n); return i || (i = t(), hv.set(n, i), cv.add(i)), i } function lv(n, t, i) { let r = n.get(t); r || (r = new Map, n.set(t, r)); const f = i.join(); let u = r.get(f); return u || (u = { resolver: gu(t, i), subPrefixes: i.filter(n => !n.toLowerCase().includes("hover")) }, r.set(f, u)), u } function av(n, t) { return "top" === n || "bottom" === n || -1 === vb.indexOf(n) && "x" === t } function vv(n, t) { return function (i, r) { return i[n] === r[n] ? i[t] - r[t] : i[n] - r[n] } } function yv(n) { const t = n.chart, i = t.options.animation; t.notifyPlugins("afterRender"); o(i && i.onComplete, [n], t) } function yb(n) { const t = n.chart, i = t.options.animation; o(i && i.onProgress, [n], t) } function pv(n) { return fo() && "string" == typeof n ? n = document.getElementById(n) : n && n.length && (n = n[0]), n && n.canvas && (n = n.canvas), n } function pb(n, t, i) { const r = Object.keys(n); for (const u of r) { const r = +u; if (r >= t) { const f = n[u]; delete n[u]; (i > 0 || r > t) && (n[r + i] = f) } } } function li() { throw new Error("This method is not implemented: Check that a complete date adapter is provided."); } function wb(n) { const r = n.iScale, o = function (n, t) { if (!n._cache.$bar) { const r = n.getMatchingVisibleMetas(t); let i = []; for (let t = 0, u = r.length; t < u; t++)i = i.concat(r[t].controller.getAllParsedValues(n)); n._cache.$bar = ge(i.sort((n, t) => n - t)) } return n._cache.$bar }(r, n.type); let t, u, i, f, e = r._length; const s = () => { 32767 !== i && -32768 !== i && (g(f) && (e = Math.min(e, Math.abs(i - f) || e)), f = i) }; for (t = 0, u = o.length; t < u; ++t)i = r.getPixelForValue(o[t]), s(); for (f = void 0, t = 0, u = r.ticks.length; t < u; ++t)i = r.getPixelForTick(t), s(); return e } function kv(n, t, i, r) { return e(n) ? function (n, t, i, r) { const e = i.parse(n[0], r), o = i.parse(n[1], r), u = Math.min(e, o), f = Math.max(e, o); let h = u, s = f; Math.abs(u) > Math.abs(f) && (h = f, s = u); t[i.axis] = s; t._custom = { barStart: h, barEnd: s, start: e, end: o, min: u, max: f } }(n, t, i, r) : t[i.axis] = i.parse(n, r), t } function dv(n, t, i, r) { const f = n.iScale, o = n.vScale, l = f.getLabels(), a = f === o, s = []; let u, h, e, c; for (u = i, h = i + r; u < h; ++u)c = t[u], e = {}, e[f.axis] = a || f.parse(l[u], u), s.push(kv(c, e, o, u)); return s } function as(n) { return n && void 0 !== n.barStart && void 0 !== n.barEnd } function bb(n, t, i, r) { let u = t.borderSkipped; const f = {}; if (!u) return void (n.borderSkipped = f); const { start: e, end: o, reverse: s, top: h, bottom: c } = function (n) { let t, i, r, u, f; return n.horizontal ? (t = n.base > n.x, i = "left", r = "right") : (t = n.base < n.y, i = "bottom", r = "top"), t ? (u = "end", f = "start") : (u = "start", f = "end"), { start: i, end: r, reverse: t, top: u, bottom: f } }(n); "middle" === u && i && (n.enableBorderRadius = !0, (i._top || 0) === r ? u = h : (i._bottom || 0) === r ? u = c : (f[gv(c, e, o, s)] = !0, u = h)); f[gv(u, e, o, s)] = !0; n.borderSkipped = f } function gv(n, t, i, r) { var u, e, f; return r ? (f = i, n = ny(n = (u = n) === (e = t) ? f : u === f ? e : u, i, t)) : n = ny(n, t, i), n } function ny(n, t, i) { return "start" === n ? t : "end" === n ? i : n } function kb(n, { inflateAmount: t }, i) { n.inflateAmount = "auto" === t ? 1 === i ? .33 : 0 : t } function ty(n, t, i) { const { startAngle: f, pixelMargin: u, x: e, y: o, outerRadius: c, innerRadius: s } = t; let r = u / c; n.beginPath(); n.arc(e, o, c, f - r, i + r); s > u ? (r = u / s, n.arc(e, o, s, i + r, f - r, !0)) : n.arc(e, o, u, i + h, f - h); n.closePath(); n.clip() } function db(n, t, i, r) { const u = rf(n.options.borderRadius, ["outerStart", "outerEnd", "innerStart", "innerEnd"]), f = (i - t) / 2, e = Math.min(f, r * t / 2), o = n => { const t = (i - Math.min(f, n)) * r / 2; return v(n, 0, Math.min(f, t)) }; return { outerStart: o(u.outerStart), outerEnd: o(u.outerEnd), innerStart: v(u.innerStart, 0, e), innerEnd: v(u.innerEnd, 0, e) } } function er(n, t, i, r) { return { x: i + n * Math.cos(t), y: r + n * Math.sin(t) } } function ps(n, t, i, r, u) { const { x: f, y: e, startAngle: rt, pixelMargin: ut, innerRadius: w } = t, o = Math.max(t.outerRadius + r + i - ut, 0), a = w > 0 ? w + r + i + ut : 0; let d = 0; const v = u - rt; if (r) { const n = ((w > 0 ? w - r : 0) + (o > 0 ? o - r : 0)) / 2; d = (v - (0 !== n ? v * n / (n + r) : v)) / 2 } const ft = (v - Math.max(.001, v * o - i / s) / o) / 2, c = rt + ft + d, l = u - ft - d, { outerStart: b, outerEnd: k, innerStart: y, innerEnd: p } = db(t, a, o, l - c), g = o - b, et = o - k, nt = c + b / g, tt = l - k / et, ot = a + y, it = a + p, st = c + y / ot, ht = l - p / it; if (n.beginPath(), n.arc(f, e, o, nt, tt), k > 0) { const t = er(et, tt, f, e); n.arc(t.x, t.y, k, tt, l + h) } const ct = er(it, l, f, e); if (n.lineTo(ct.x, ct.y), p > 0) { const t = er(it, ht, f, e); n.arc(t.x, t.y, p, l + h, ht + Math.PI) } if (n.arc(f, e, a, l - p / a, c + y / a, !0), y > 0) { const t = er(ot, st, f, e); n.arc(t.x, t.y, y, st + Math.PI, c - h) } const lt = er(g, c, f, e); if (n.lineTo(lt.x, lt.y), b > 0) { const t = er(g, nt, f, e); n.arc(t.x, t.y, b, c - h, nt) } n.closePath() } function gb(n, t, i, r, u) { const { options: s } = t, { borderWidth: e, borderJoinStyle: h } = s, o = "inner" === s.borderAlign; e && (o ? (n.lineWidth = 2 * e, n.lineJoin = h || "round") : (n.lineWidth = e, n.lineJoin = h || "bevel"), t.fullCircles && function (n, t, i) { const { x: e, y: o, startAngle: u, pixelMargin: s, fullCircles: h } = t, c = Math.max(t.outerRadius - s, 0), l = t.innerRadius + s; let r; for (i && ty(n, t, u + f), n.beginPath(), n.arc(e, o, l, u + f, u, !0), r = 0; r < h; ++r)n.stroke(); for (n.beginPath(), n.arc(e, o, c, u, u + f), r = 0; r < h; ++r)n.stroke() }(n, t, o), o && ty(n, t, u), ps(n, t, i, r, u), n.stroke()) } function iy(t, i, r = i) { t.lineCap = n(r.borderCapStyle, i.borderCapStyle); t.setLineDash(n(r.borderDash, i.borderDash)); t.lineDashOffset = n(r.borderDashOffset, i.borderDashOffset); t.lineJoin = n(r.borderJoinStyle, i.borderJoinStyle); t.lineWidth = n(r.borderWidth, i.borderWidth); t.strokeStyle = n(r.borderColor, i.borderColor) } function nk(n, t, i) { n.lineTo(i.x, i.y) } function ry(n, t, i = {}) { const h = n.length, { start: u = 0, end: f = s - 1 } = i, { start: e, end: o } = t, r = Math.max(u, e), s = Math.min(f, o), c = u < e && f < e || u > o && f > o; return { count: h, start: r, loop: t.loop, ilen: s < r && !c ? h + s - r : s - r } } function tk(n, t, i, r) { const { points: o, options: s } = t, { count: l, start: a, loop: v, ilen: h } = ry(o, i, r), y = function (n) { return n.stepped ? gc : n.tension || "monotone" === n.cubicInterpolationMode ? nl : nk }(s); let f, u, c, { move: p = !0, reverse: e } = r || {}; for (f = 0; f <= h; ++f)u = o[(a + (e ? h - f : f)) % l], u.skip || (p ? (n.moveTo(u.x, u.y), p = !1) : y(n, c, u, e, s.stepped), c = u); return v && (u = o[(a + (e ? h : 0)) % l], y(n, c, u, e, s.stepped)), !!v } function ik(n, t, i, r) { const h = t.points, { count: w, start: b, ilen: l } = ry(h, i, r), { move: k = !0, reverse: d } = r || {}; let s, u, a, f, e, v, o = 0, c = 0; const y = n => (b + (d ? l - n : n)) % w, p = () => { f !== e && (n.lineTo(o, e), n.lineTo(o, f), n.lineTo(o, v)) }; for (k && (u = h[y(0)], n.moveTo(u.x, u.y)), s = 0; s <= l; ++s)if (u = h[y(s)], !u.skip) { const i = u.x, t = u.y, r = 0 | i; r === a ? (t < f ? f = t : t > e && (e = t), o = (c * o + i) / ++c) : (p(), n.lineTo(i, t), a = r, c = 0, f = e = t); v = t } p() } function ws(n) { const t = n.options, i = t.borderDash && t.borderDash.length; return (n._decimated || n._loop || t.tension || "monotone" === t.cubicInterpolationMode || t.stepped || i) ? tk : ik } function uk(n, t, i, r) { rk && !t.options.segment ? function (n, t, i, r) { let u = t._path; u || (u = t._path = new Path2D, t.path(u, i, r) && u.closePath()); iy(n, t.options); n.stroke(u) }(n, t, i, r) : function (n, t, i, r) { const { segments: u, options: f } = t, e = ws(t); for (const o of u) iy(n, f, o.style), n.beginPath(), e(n, t, o, { start: i, end: i + r - 1 }) && n.closePath(), n.stroke() }(n, t, i, r) } function uy(n, t, i, r) { const u = n.options, { [i]: f } = n.getProps([i], r); return Math.abs(t - f) < u.radius + u.hitRadius } function fy(n, t) { const { x: r, y: u, base: f, width: c, height: l } = n.getProps(["x", "y", "base", "width", "height"], t); let e, o, s, h, i; return n.horizontal ? (i = l / 2, e = Math.min(r, f), o = Math.max(r, f), s = u - i, h = u + i) : (i = c / 2, e = r - i, o = r + i, s = Math.min(u, f), h = Math.max(u, f)), { left: e, top: s, right: o, bottom: h } } function fi(n, t, i, r) { return n ? 0 : v(t, i, r) } function fk(n) { const r = fy(n), f = r.right - r.left, e = r.bottom - r.top, i = function (n, t, i) { const f = n.options.borderWidth, r = n.borderSkipped, u = yo(f); return { t: fi(r.top, u.top, 0, i), r: fi(r.right, u.right, 0, t), b: fi(r.bottom, u.bottom, 0, i), l: fi(r.left, u.left, 0, t) } }(n, f / 2, e / 2), u = function (n, i, r) { const { enableBorderRadius: h } = n.getProps(["enableBorderRadius"]), s = n.options.borderRadius, f = ii(s), e = Math.min(i, r), u = n.borderSkipped, o = h || t(s); return { topLeft: fi(!o || u.top || u.left, f.topLeft, 0, e), topRight: fi(!o || u.top || u.right, f.topRight, 0, e), bottomLeft: fi(!o || u.bottom || u.left, f.bottomLeft, 0, e), bottomRight: fi(!o || u.bottom || u.right, f.bottomRight, 0, e) } }(n, f / 2, e / 2); return { outer: { x: r.left, y: r.top, w: f, h: e, radius: u }, inner: { x: r.left + i.l, y: r.top + i.t, w: f - i.l - i.r, h: e - i.t - i.b, radius: { topLeft: Math.max(0, u.topLeft - Math.max(i.t, i.l)), topRight: Math.max(0, u.topRight - Math.max(i.t, i.r)), bottomLeft: Math.max(0, u.bottomLeft - Math.max(i.b, i.l)), bottomRight: Math.max(0, u.bottomRight - Math.max(i.b, i.r)) } } } } function bs(n, t, i, r) { const f = null === t, e = null === i, u = n && !(f && e) && fy(n, r); return u && (f || ct(t, u.left, u.right)) && (e || ct(i, u.top, u.bottom)) } function ek(n, t) { n.rect(t.x, t.y, t.w, t.h) } function ks(n, t, i = {}) { const r = n.x !== i.x ? -t : 0, u = n.y !== i.y ? -t : 0, f = (n.x + n.w !== i.x + i.w ? t : 0) - r, e = (n.y + n.h !== i.y + i.h ? t : 0) - u; return { x: n.x + r, y: n.y + u, w: n.w + f, h: n.h + e, radius: n.radius } } function ey(n) { if (n._decimated) { const t = n._data; delete n._decimated; delete n._data; Object.defineProperty(n, "data", { value: t }) } } function oy(n) { n.data.datasets.forEach(n => { ey(n) }) } function ds(n, t, i, r) { if (!r) { let u = t[n], f = i[n]; return "angle" === n && (u = b(u), f = b(f)), { property: n, start: u, end: f } } } function gs(n, t, i) { for (; t > n; t--) { const n = i[t]; if (!isNaN(n.x) && !isNaN(n.y)) break } return t } function hy(n, t, i, r) { return n && t ? r(n[i], t[i]) : n ? n[i] : t ? t[i] : 0 } function cy(n, t) { let i = [], r = !1; return e(n) ? (r = !0, i = n) : i = function (n, t) { const { x: r = null, y: u = null } = n || {}, f = t.points, i = []; return t.segments.forEach(({ start: t, end: n }) => { n = gs(t, n, f); const e = f[t], o = f[n]; null !== u ? (i.push({ x: e.x, y: u }), i.push({ x: o.x, y: u })) : null !== r && (i.push({ x: r, y: e.y }), i.push({ x: r, y: o.y })) }), i }(n, t), i.length ? new ui({ points: i, options: { tension: 0 }, _loop: r, _fullLoop: r }) : null } function ok(n, t, i) { let r = n[t].fill; const f = [t]; let u; if (!i) return r; for (; !1 !== r && -1 === f.indexOf(r);) { if (!c(r)) return r; if (u = n[r], !u) return !1; if (u.visible) return r; f.push(r); r = u.fill } return !1 } function sk(i, r, u) { const f = function (t) { const u = t.options, r = u.fill; let i = n(r && r.target, r); return (void 0 === i && (i = !!u.backgroundColor), !1 === i || null === i) ? !1 : !0 === i ? "origin" : i }(i); if (t(f)) return !isNaN(f.value) && f; let e = parseFloat(f); return c(e) && Math.floor(e) === e ? function (n, t, i, r) { return ("-" !== n && "+" !== n || (i = t + i), i === t || i < 0 || i >= r) ? !1 : i }(f[0], r, e, u) : ["origin", "start", "end", "stack", "shape"].indexOf(f) >= 0 && f } function hk(n, t, i) { const r = []; for (let u = 0; u < i.length; u++) { const s = i[u], { first: e, last: o, point: f } = ck(s, t, "x"); if (!(!f || e && o)) if (e) r.unshift(f); else if (n.push(f), !o) break } n.push(...r) } function ck(n, t, i) { const r = n.interpolate(t, i); if (!r) return {}; const u = r[i], f = n.segments, e = n.points; let o = !1, s = !1; for (let n = 0; n < f.length; n++) { const t = f[n], r = e[t.start][i], h = e[t.end][i]; if (ct(u, r, h)) { o = u === r; s = u === h; break } } return { first: o, last: s, point: r } } function lk(n) { const { chart: u, fill: i, line: f } = n; if (c(i)) return function (n, t) { const i = n.getDatasetMeta(t); return i && n.isDatasetVisible(t) ? i.dataset : null }(u, i); if ("stack" === i) return function (n) { const { scale: i, index: e, line: t } = n, r = [], u = t.segments, o = t.points, f = function (n, t) { const i = [], r = n.getMatchingVisibleMetas("line"); for (let n = 0; n < r.length; n++) { const u = r[n]; if (u.index === t) break; u.hidden || i.unshift(u.dataset) } return i }(i, e); f.push(cy({ x: null, y: i.bottom }, t)); for (let n = 0; n < u.length; n++) { const t = u[n]; for (let n = t.start; n <= t.end; n++)hk(r, o[n], f) } return new ui({ points: r, options: {} }) }(n); if ("shape" === i) return !0; const r = function (n) { return (n.scale || {}).getPointPositionForValue ? function (n) { const { scale: i, fill: o } = n, r = i.options, s = i.getLabels().length, u = r.reverse ? i.max : i.min, f = function (n, i, r) { let u; return u = "start" === n ? r : "end" === n ? i.options.reverse ? i.min : i.max : t(n) ? n.value : i.getBaseValue(), u }(o, i, u), e = []; if (r.grid.circular) { const n = i.getPointPositionForValue(0, u); return new ly({ x: n.x, y: n.y, radius: i.getDistanceFromCenterForValue(f) }) } for (let n = 0; n < s; ++n)e.push(i.getPointPositionForValue(n, f)); return e }(n) : function (n) { const { scale: r = {}, fill: u } = n, i = function (n, i) { let r = null; return "start" === n ? r = i.bottom : "end" === n ? r = i.top : t(n) ? r = i.getPixelForValue(n.value) : i.getBasePixel && (r = i.getBasePixel()), r }(u, r); if (c(i)) { const n = r.isHorizontal(); return { x: n ? i : null, y: n ? null : i } } return null }(n) }(n); return r instanceof ly ? r : cy(r, f) } function nh(n, t, i) { const u = lk(t), { line: r, scale: e, axis: o } = t, f = r.options, s = f.fill, l = f.backgroundColor, { above: h = h, below: c = h } = s || {}; u && r.points.length && (pr(n, i), function (n, t) { const { line: r, target: i, above: f, below: e, area: o, scale: s } = t, u = r._loop ? "angle" : t.axis; n.save(); "x" === u && e !== f && (ay(n, i, o.top), vy(n, { line: r, target: i, color: f, scale: s, property: u }), n.restore(), n.save(), ay(n, i, o.bottom)); vy(n, { line: r, target: i, color: e, scale: s, property: u }); n.restore() }(n, { line: r, target: u, above: h, below: c, area: i, scale: e, axis: o }), wr(n)) } function ay(n, t, i) { const { segments: e, points: r } = t; let f = !0, u = !1; n.beginPath(); for (const o of e) { const { start: s, end: h } = o, e = r[s], c = r[gs(s, h, r)]; f ? (n.moveTo(e.x, e.y), f = !1) : (n.lineTo(e.x, i), n.lineTo(e.x, e.y)); u = !!t.pathSegment(n, o, { move: u }); u ? n.closePath() : n.lineTo(c.x, i) } n.lineTo(t.first().x, i); n.closePath(); n.clip() } function vy(n, t) { const { line: u, target: i, property: r, scale: f } = t, e = function (n, t, i) { const e = n.segments, r = n.points, f = t.points, u = []; for (const n of e) { let { start: s, end: e } = n; e = gs(s, e, r); const o = ds(i, r[s], r[e], n.loop); if (!t.segments) { u.push({ source: n, target: o, start: r[s], end: r[e] }); continue } const h = ko(t, o); for (const t of h) { const e = ds(i, f[t.start], f[t.end], t.loop), s = bo(n, r, e); for (const n of s) u.push({ source: n, target: t, start: { [i]: hy(o, e, "start", Math.max) }, end: { [i]: hy(o, e, "end", Math.min) } }) } } return u }(u, i, r); for (const { source: t, target: h, start: o, end: s } of e) { const { style: { backgroundColor: a = o } = {} } = t, l = !0 !== i; n.save(); n.fillStyle = a; ak(n, f, l && ds(r, o, s)); n.beginPath(); const e = !!u.pathSegment(n, t); let c; if (l) { e ? n.closePath() : yy(n, i, s, r); const t = !!i.pathSegment(n, h, { move: e, reverse: !0 }); c = e && t; c || yy(n, i, o, r) } n.closePath(); n.fill(c ? "evenodd" : "nonzero"); n.restore() } } function ak(n, t, i) { const { top: r, bottom: f } = t.chart.chartArea, { property: e, start: u, end: o } = i || {}; "x" === e && (n.beginPath(), n.rect(u, r, o - u, f - r), n.clip()) } function yy(n, t, i, r) { const u = t.interpolate(i, r); u && n.lineTo(u.x, u.y) } function lt(n, t) { return t && (e(t) ? Array.prototype.push.apply(n, t) : n.push(t)), n } function wt(n) { return ("string" == typeof n || n instanceof String) && n.indexOf("\n") > -1 ? n.split("\n") : n } function vk(n, t) { const { element: f, datasetIndex: r, index: i } = t, u = n.getDatasetMeta(r).controller, { label: e, value: o } = u.getLabelAndValue(i); return { chart: n, label: e, parsed: u.getParsed(i), raw: n.data.datasets[r].data[i], formattedValue: o, dataset: u.getDataset(), dataIndex: i, datasetIndex: r, element: f } } function np(n, t) { const i = n.chart.ctx, { body: h, footer: d, title: g } = n, { boxWidth: nt, boxHeight: tt } = t, f = a(t.bodyFont), y = a(t.titleFont), p = a(t.footerFont), c = g.length, l = d.length, b = h.length, k = w(t.padding); let e = k.height, o = 0, s = h.reduce((n, t) => n + t.before.length + t.lines.length + t.after.length, 0); (s += n.beforeBody.length + n.afterBody.length, c && (e += c * y.lineHeight + (c - 1) * t.titleSpacing + t.titleMarginBottom), s) && (e += b * (t.displayColors ? Math.max(tt, f.lineHeight) : f.lineHeight) + (s - b) * f.lineHeight + (s - 1) * t.bodySpacing); l && (e += t.footerMarginTop + l * p.lineHeight + (l - 1) * t.footerSpacing); let v = 0; const r = function (n) { o = Math.max(o, i.measureText(n).width + v) }; return i.save(), i.font = y.string, u(n.title, r), i.font = f.string, u(n.beforeBody.concat(n.afterBody), r), v = t.displayColors ? nt + 2 + t.boxPadding : 0, u(h, n => { u(n.before, r), u(n.lines, r), u(n.after, r) }), v = 0, i.font = p.string, u(n.footer, r), i.restore(), o += k.width, { width: o, height: e } } function yk(n, t, i, r) { const { x: f, width: e } = i, { width: o, chartArea: { left: s, right: h } } = n; let u = "center"; return "center" === r ? u = f <= (s + h) / 2 ? "left" : "right" : f <= e / 2 ? u = "left" : f >= o - e / 2 && (u = "right"), function (n, t, i, r) { const { x: u, width: f } = r, e = i.caretSize + i.caretPadding; return "left" === n && u + f + e > t.width || "right" === n && u - f - e < 0 || void 0 }(u, n, t, i) && (u = "center"), u } function tp(n, t, i) { const r = i.yAlign || t.yAlign || function (n, t) { const { y: i, height: r } = t; return i < r / 2 ? "top" : i > n.height - r / 2 ? "bottom" : "center" }(n, i); return { xAlign: i.xAlign || t.xAlign || yk(n, t, i, r), yAlign: r } } function ip(n, t, i, r) { const { caretSize: e, caretPadding: h, cornerRadius: c } = n, { xAlign: u, yAlign: s } = i, o = e + h, { topLeft: l, topRight: a, bottomLeft: y, bottomRight: p } = ii(c); let f = function (n, t) { let { x: i, width: r } = n; return "right" === t ? i -= r : "center" === t && (i -= r / 2), i }(t, u); const w = function (n, t, i) { let { y: r, height: u } = n; return "top" === t ? r += i : r -= "bottom" === t ? u + i : u / 2, r }(t, s, o); return "center" === s ? "left" === u ? f += o : "right" === u && (f -= o) : "left" === u ? f -= Math.max(l, y) + e : "right" === u && (f += Math.max(a, p) + e), { x: v(f, 0, r.width - t.width), y: v(w, 0, r.height - t.height) } } function ne(n, t, i) { const r = w(i.padding); return "center" === t ? n.x + n.width / 2 : "right" === t ? n.x + n.width - r.right : n.x + r.left } function rp(n) { return lt([], wt(n)) } function up(n, t) { const i = t && t.dataset && t.dataset.tooltip && t.dataset.tooltip.callbacks; return i ? n.override(i) : n } function pk(n, t, i, r) { const u = n.indexOf(t); return -1 === u ? ((n, t, i, r) => ("string" == typeof t ? (i = n.push(t) - 1, r.unshift({ index: i, label: t })) : isNaN(t) && (i = null), i))(n, t, i, r) : u !== n.lastIndexOf(t) ? i : u } function ep(n, t, { horizontal: i, minRotation: r }) { const u = it(r), f = (i ? Math.sin(u) : Math.cos(u)) || .001, e = .75 * t * ("" + n).length; return Math.min(t / f, e) } function op(n) { return 1 == n / Math.pow(10, Math.floor(nt(n))) } function eh(t) { const r = t.ticks; if (r.display && t.display) { const t = w(r.backdropPadding); return n(r.font && r.font.size, i.font.size) + t.height } return 0 } function sp(n, t, i, r, u) { return n === r || n === u ? { start: t - i / 2, end: t + i / 2 } : n < r || n > u ? { start: t - i, end: t } : { start: t, end: t + i } } function wk(n) { const t = { l: n.left + n._padding.left, r: n.right - n._padding.right, t: n.top + n._padding.top, b: n.bottom - n._padding.bottom }, r = Object.assign({}, t), o = [], u = [], c = n._pointLabels.length, l = n.options.pointLabels, v = l.centerPointLabels ? s / c : 0; for (let s = 0; s < c; s++) { const c = l.setContext(n.getPointLabelContext(s)); u[s] = c.padding; const p = n.getPointPosition(s, n.drawingArea + u[s], v), d = a(c.font), h = (y = n.ctx, f = d, i = e(i = n._pointLabels[s]) ? i : [i], { w: dc(y, f.string, i), h: i.length * f.lineHeight }); o[s] = h; const w = b(n.getIndexAngle(s) + v), k = Math.round(pu(w)); bk(r, t, w, sp(k, p.x, h.w, 0, 180), sp(k, p.y, h.h, 90, 270)) } var y, f, i; n.setCenterPoint(t.l - r.l, r.r - t.r, t.t - r.t, r.b - t.b); n._pointLabelItems = function (n, t, i) { const r = [], u = n._pointLabels.length, f = n.options, e = eh(f) / 2, o = n.drawingArea, c = f.pointLabels.centerPointLabels ? s / u : 0; for (let f = 0; f < u; f++) { const u = n.getPointPosition(f, o + e + i[f], c), a = Math.round(pu(b(u.angle + h))), s = t[f], l = gk(u.y, s.h, a), v = kk(a), y = dk(u.x, s.w, v); r.push({ x: u.x, y: l, textAlign: v, left: y, top: l, right: y + s.w, bottom: l + s.h }) } return r }(n, o, u) } function bk(n, t, i, r, u) { const o = Math.abs(Math.sin(i)), s = Math.abs(Math.cos(i)); let f = 0, e = 0; r.start < t.l ? (f = (t.l - r.start) / o, n.l = Math.min(n.l, t.l - f)) : r.end > t.r && (f = (r.end - t.r) / o, n.r = Math.max(n.r, t.r + f)); u.start < t.t ? (e = (t.t - u.start) / s, n.t = Math.min(n.t, t.t - e)) : u.end > t.b && (e = (u.end - t.b) / s, n.b = Math.max(n.b, t.b + e)) } function kk(n) { return 0 === n || 180 === n ? "center" : n < 180 ? "left" : "right" } function dk(n, t, i) { return "right" === i ? n -= t : "center" === i && (n -= t / 2), n } function gk(n, t, i) { return 90 === i || 270 === i ? n -= t / 2 : (i > 270 || i < 90) && (n -= t), n } function hp(n, t, i, r) { const { ctx: u } = n; if (i) u.arc(n.xCenter, n.yCenter, t, 0, f); else { let i = n.getPointPosition(0, t); u.moveTo(i.x, i.y); for (let f = 1; f < r; f++)i = n.getPointPosition(f, t), u.lineTo(i.x, i.y) } } function nd(n, t) { return n - t } function cp(n, t) { if (r(t)) return null; const u = n._adapter, { parser: f, round: e, isoWeekday: o } = n._parseOpts; let i = t; return "function" == typeof f && (i = f(i)), c(i) || (i = "string" == typeof f ? u.parse(i, f) : u.parse(i)), null === i ? null : (e && (i = "week" !== e || !wi(o) && !0 !== o ? u.startOf(i, e) : u.startOf(i, "isoWeek", o)), +i) } function lp(n, t, i, r) { const u = k.length; for (let f = k.indexOf(n); f < u - 1; ++f) { const n = re[k[f]], u = n.steps ? n.steps : Number.MAX_SAFE_INTEGER; if (n.common && Math.ceil((i - t) / (u * n.size)) <= r) return k[f] } return k[u - 1] } function ap(n, t, i) { if (i) { if (i.length) { const { lo: r, hi: u } = yu(i, t); n[i[r] >= t ? i[r] : i[u]] = !0 } } else n[t] = !0 } function vp(n, t, i) { const u = [], e = {}, o = t.length; let r, f; for (r = 0; r < o; ++r)f = t[r], e[f] = r, u.push({ value: f, major: !1 }); return 0 !== o && i ? function (n, t, i, r) { const e = n._adapter, o = +e.startOf(t[0].value, r), s = t[t.length - 1].value; let u, f; for (u = o; u <= s; u = +e.add(u, 1, r))f = i[u], f >= 0 && (t[f].major = !0); return t }(n, u, e, i) : u } function ue(n, t, i) { let e, o, f, s, r = 0, u = n.length - 1; i ? (t >= n[r].pos && t <= n[u].pos && ({ lo: r, hi: u } = ht(n, "pos", t)), { pos: e, time: f } = n[r], { pos: o, time: s } = n[u]) : (t >= n[r].time && t <= n[u].time && ({ lo: r, hi: u } = ht(n, "time", t)), { time: e, pos: f } = n[r], { time: o, pos: s } = n[u]); const h = o - e; return h ? f + (s - f) * (t - e) / h : f } var ut, i, ta, ts, y, us, ur, ot, ls, ys, df, sy, py, ky, dy, gy, fp, rh, sh; const fe = "undefined" == typeof window ? function (n) { return n() } : window.requestAnimationFrame; const su = n => "start" === n ? "left" : "end" === n ? "right" : "center", p = (n, t, i) => "start" === n ? t : "end" === n ? i : (t + i) / 2, ch = (n, t, i, r) => n === (r ? "left" : "right") ? i : "center" === n ? (t + i) / 2 : t; ut = new (class { constructor() { this._request = null; this._charts = new Map; this._running = !1; this._lastDate = void 0 } _notify(n, t, i, r) { const f = t.listeners[r], u = t.duration; f.forEach(r => r({ chart: n, initial: t.initial, numSteps: u, currentStep: Math.min(i - t.start, u) })) } _refresh() { this._request || (this._running = !0, this._request = fe.call(window, () => { this._update(), this._request = null, this._running && this._refresh() })) } _update(n = Date.now()) { let t = 0; this._charts.forEach((i, r) => { if (i.running && i.items.length) { const u = i.items; let f, e = u.length - 1, o = !1; for (; e >= 0; --e)f = u[e], f._active ? (f._total > i.duration && (i.duration = f._total), f.tick(n), o = !0) : (u[e] = u[u.length - 1], u.pop()); o && (r.draw(), this._notify(r, i, n, "progress")); u.length || (i.running = !1, this._notify(r, i, n, "complete"), i.initial = !1); t += u.length } }); this._lastDate = n; 0 === t && (this._running = !1) } _getAnims(n) { const i = this._charts; let t = i.get(n); return t || (t = { running: !1, initial: !0, items: [], listeners: { complete: [], progress: [] } }, i.set(n, t)), t } listen(n, t, i) { this._getAnims(n).listeners[t].push(i) } add(n, t) { t && t.length && this._getAnims(n).items.push(...t) } has(n) { return this._getAnims(n).items.length > 0 } start(n) { const t = this._charts.get(n); t && (t.running = !0, t.start = Date.now(), t.duration = t.items.reduce((n, t) => Math.max(n, t._duration), 0), this._refresh()) } running(n) { if (!this._running) return !1; const t = this._charts.get(n); return !!(t && t.running && t.items.length) } stop(n) { const t = this._charts.get(n); if (t && t.items.length) { const r = t.items; let i = r.length - 1; for (; i >= 0; --i)r[i].cancel(); t.items = []; this._notify(n, t, Date.now(), "complete") } } remove(n) { return this._charts.delete(n) } });
  563. /*!
  564. * @kurkle/color v0.2.1
  565. * https://github.com/kurkle/color#readme
  566. * (c) 2022 Jukka Kurkela
  567. * Released under the MIT License
  568. */
  569. const bt = (n, t, i) => Math.max(Math.min(n, i), t); const tt = { 0: 0, 1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, A: 10, B: 11, C: 12, D: 13, E: 14, F: 15, a: 10, b: 11, c: 12, d: 13, e: 14, f: 15 }, oe = [..."0123456789ABCDEF"], yp = n => oe[15 & n], pp = n => oe[(240 & n) >> 4] + oe[15 & n], hu = n => (240 & n) >> 4 == (15 & n); const bp = /^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/; const yh = { x: "dark", Z: "light", Y: "re", X: "blu", W: "gr", V: "medium", U: "slate", A: "ee", T: "ol", S: "or", B: "ra", C: "lateg", D: "ights", R: "in", Q: "turquois", E: "hi", P: "ro", O: "al", N: "le", M: "de", L: "yello", F: "en", K: "ch", G: "arks", H: "ea", I: "ightg", J: "wh" }, ph = { OiceXe: "f0f8ff", antiquewEte: "faebd7", aqua: "ffff", aquamarRe: "7fffd4", azuY: "f0ffff", beige: "f5f5dc", bisque: "ffe4c4", black: "0", blanKedOmond: "ffebcd", Xe: "ff", XeviTet: "8a2be2", bPwn: "a52a2a", burlywood: "deb887", caMtXe: "5f9ea0", KartYuse: "7fff00", KocTate: "d2691e", cSO: "ff7f50", cSnflowerXe: "6495ed", cSnsilk: "fff8dc", crimson: "dc143c", cyan: "ffff", xXe: "8b", xcyan: "8b8b", xgTMnPd: "b8860b", xWay: "a9a9a9", xgYF: "6400", xgYy: "a9a9a9", xkhaki: "bdb76b", xmagFta: "8b008b", xTivegYF: "556b2f", xSange: "ff8c00", xScEd: "9932cc", xYd: "8b0000", xsOmon: "e9967a", xsHgYF: "8fbc8f", xUXe: "483d8b", xUWay: "2f4f4f", xUgYy: "2f4f4f", xQe: "ced1", xviTet: "9400d3", dAppRk: "ff1493", dApskyXe: "bfff", dimWay: "696969", dimgYy: "696969", dodgerXe: "1e90ff", fiYbrick: "b22222", flSOwEte: "fffaf0", foYstWAn: "228b22", fuKsia: "ff00ff", gaRsbSo: "dcdcdc", ghostwEte: "f8f8ff", gTd: "ffd700", gTMnPd: "daa520", Way: "808080", gYF: "8000", gYFLw: "adff2f", gYy: "808080", honeyMw: "f0fff0", hotpRk: "ff69b4", RdianYd: "cd5c5c", Rdigo: "4b0082", ivSy: "fffff0", khaki: "f0e68c", lavFMr: "e6e6fa", lavFMrXsh: "fff0f5", lawngYF: "7cfc00", NmoncEffon: "fffacd", ZXe: "add8e6", ZcSO: "f08080", Zcyan: "e0ffff", ZgTMnPdLw: "fafad2", ZWay: "d3d3d3", ZgYF: "90ee90", ZgYy: "d3d3d3", ZpRk: "ffb6c1", ZsOmon: "ffa07a", ZsHgYF: "20b2aa", ZskyXe: "87cefa", ZUWay: "778899", ZUgYy: "778899", ZstAlXe: "b0c4de", ZLw: "ffffe0", lime: "ff00", limegYF: "32cd32", lRF: "faf0e6", magFta: "ff00ff", maPon: "800000", VaquamarRe: "66cdaa", VXe: "cd", VScEd: "ba55d3", VpurpN: "9370db", VsHgYF: "3cb371", VUXe: "7b68ee", VsprRggYF: "fa9a", VQe: "48d1cc", VviTetYd: "c71585", midnightXe: "191970", mRtcYam: "f5fffa", mistyPse: "ffe4e1", moccasR: "ffe4b5", navajowEte: "ffdead", navy: "80", Tdlace: "fdf5e6", Tive: "808000", TivedBb: "6b8e23", Sange: "ffa500", SangeYd: "ff4500", ScEd: "da70d6", pOegTMnPd: "eee8aa", pOegYF: "98fb98", pOeQe: "afeeee", pOeviTetYd: "db7093", papayawEp: "ffefd5", pHKpuff: "ffdab9", peru: "cd853f", pRk: "ffc0cb", plum: "dda0dd", powMrXe: "b0e0e6", purpN: "800080", YbeccapurpN: "663399", Yd: "ff0000", Psybrown: "bc8f8f", PyOXe: "4169e1", saddNbPwn: "8b4513", sOmon: "fa8072", sandybPwn: "f4a460", sHgYF: "2e8b57", sHshell: "fff5ee", siFna: "a0522d", silver: "c0c0c0", skyXe: "87ceeb", UXe: "6a5acd", UWay: "708090", UgYy: "708090", snow: "fffafa", sprRggYF: "ff7f", stAlXe: "4682b4", tan: "d2b48c", teO: "8080", tEstN: "d8bfd8", tomato: "ff6347", Qe: "40e0d0", viTet: "ee82ee", JHt: "f5deb3", wEte: "ffffff", wEtesmoke: "f5f5f5", Lw: "ffff00", LwgYF: "9acd32" }; let cu; const tw = /^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/, le = n => n <= .0031308 ? 12.92 * n : 1.055 * Math.pow(n, 1 / 2.4) - .055, ai = n => n <= .04045 ? n / 12.92 : Math.pow((n + .055) / 1.055, 2.4); class ae { constructor(n) { if (n instanceof ae) return n; const f = typeof n; let r; var t, u, i; "object" === f ? r = bh(n) : "string" === f && (i = (t = n).length, "#" === t[0] && (4 === i || 5 === i ? u = { r: 255 & 17 * tt[t[1]], g: 255 & 17 * tt[t[2]], b: 255 & 17 * tt[t[3]], a: 5 === i ? 17 * tt[t[4]] : 255 } : 7 !== i && 9 !== i || (u = { r: tt[t[1]] << 4 | tt[t[2]], g: tt[t[3]] << 4 | tt[t[4]], b: tt[t[5]] << 4 | tt[t[6]], a: 9 === i ? tt[t[7]] << 4 | tt[t[8]] : 255 })), r = u || nw(n) || iw(n)); this._rgb = r; this._valid = !!r } get valid() { return this._valid } get rgb() { var n = wh(this._rgb); return n && (n.a = at(n.a)), n } set rgb(n) { this._rgb = bh(n) } rgbString() { return this._valid ? (n = this._rgb) && (n.a < 255 ? `rgba(${n.r}, ${n.g}, ${n.b}, ${at(n.a)})` : `rgb(${n.r}, ${n.g}, ${n.b})`) : void 0; var n } hexString() { if (this._valid) return wp(this._rgb) } hslString() { if (this._valid) return function (n) { if (n) { const t = se(n), i = t[0], r = lh(t[1]), u = lh(t[2]); return n.a < 255 ? `hsla(${i}, ${r}%, ${u}%, ${at(n.a)})` : `hsl(${i}, ${r}%, ${u}%)` } }(this._rgb) } mix(n, t) { if (n) { const i = this.rgb, r = n.rgb; let u; const o = t === u ? .5 : t, f = 2 * o - 1, s = i.a - r.a, e = ((f * s == -1 ? f : (f + s) / (1 + f * s)) + 1) / 2; u = 1 - e; i.r = 255 & e * i.r + u * r.r + .5; i.g = 255 & e * i.g + u * r.g + .5; i.b = 255 & e * i.b + u * r.b + .5; i.a = o * i.a + (1 - o) * r.a; this.rgb = i } return this } interpolate(n, t) { return n && (this._rgb = function (n, t, i) { const r = ai(at(n.r)), u = ai(at(n.g)), f = ai(at(n.b)); return { r: kt(le(r + i * (ai(at(t.r)) - r))), g: kt(le(u + i * (ai(at(t.g)) - u))), b: kt(le(f + i * (ai(at(t.b)) - f))), a: n.a + i * (t.a - n.a) } }(this._rgb, n._rgb, t)), this } clone() { return new ae(this.rgb) } alpha(n) { return this._rgb.a = kt(n), this } clearer(n) { return this._rgb.a *= 1 - n, this } greyscale() { const n = this._rgb, t = or(.3 * n.r + .59 * n.g + .11 * n.b); return n.r = n.g = n.b = t, this } opaquer(n) { return this._rgb.a *= 1 + n, this } negate() { const n = this._rgb; return n.r = 255 - n.r, n.g = 255 - n.g, n.b = 255 - n.b, this } lighten(n) { return lu(this._rgb, 2, n), this } darken(n) { return lu(this._rgb, 2, -n), this } saturate(n) { return lu(this._rgb, 1, n), this } desaturate(n) { return lu(this._rgb, 1, -n), this } rotate(n) { return function (n, t) { var i = se(n); i[0] = vh(i[0] + t); i = ce(i); n.r = i[0]; n.g = i[1]; n.b = i[2] }(this._rgb, n), this } } const dh = function () { let n = 0; return function () { return n++ } }(); const c = n => ("number" == typeof n || n instanceof Number) && isFinite(+n); const gh = (n, t) => "string" == typeof n && n.endsWith("%") ? parseFloat(n) / 100 : n / t, pe = (n, t) => "string" == typeof n && n.endsWith("%") ? parseFloat(n) / 100 * t : +n; const g = n => void 0 !== n, yt = n => "function" == typeof n, we = (n, t) => { if (n.size !== t.size) return !1; for (const i of n) if (!t.has(i)) return !1; return !0 }; const ei = Object.create(null), be = Object.create(null); i = new (class { constructor(n) { this.animation = void 0; this.backgroundColor = "rgba(0,0,0,0.1)"; this.borderColor = "rgba(0,0,0,0.1)"; this.color = "#666"; this.datasets = {}; this.devicePixelRatio = n => n.chart.platform.getDevicePixelRatio(); this.elements = {}; this.events = ["mousemove", "mouseout", "click", "touchstart", "touchmove"]; this.font = { family: "'Helvetica Neue', 'Helvetica', 'Arial', sans-serif", size: 12, style: "normal", lineHeight: 1.2, weight: null }; this.hover = {}; this.hoverBackgroundColor = (n, t) => au(t.backgroundColor); this.hoverBorderColor = (n, t) => au(t.borderColor); this.hoverColor = (n, t) => au(t.color); this.indexAxis = "x"; this.interaction = { mode: "nearest", intersect: !0, includeInvisible: !1 }; this.maintainAspectRatio = !0; this.onHover = null; this.onClick = null; this.parsing = !0; this.plugins = {}; this.responsive = !0; this.scale = void 0; this.scales = {}; this.showLine = !0; this.drawActiveElementsOnTop = !0; this.describe(n) } set(n, t) { return ke(this, n, t) } get(n) { return lr(this, n) } describe(n, t) { return ke(be, n, t) } override(n, t) { return ke(ei, n, t) } route(i, r, u, f) { const o = lr(this, i), s = lr(this, u), e = "_" + r; Object.defineProperties(o, { [e]: { value: o[r], writable: !0 }, [r]: { enumerable: !0, get() { const i = this[e], r = s[f]; return t(i) ? Object.assign({}, r, i) : n(i, r) }, set(n) { this[e] = n } } }) } })({ _scriptable: n => !n.startsWith("on"), _indexable: n => "events" !== n, hover: { _fallback: "interaction" }, interaction: { _scriptable: !1, _indexable: !1 } }); const ht = (n, t, i) => yu(n, i, r => n[r][t] < i), fc = (n, t, i) => yu(n, i, r => n[r][t] >= i); const oc = ["push", "pop", "shift", "splice", "unshift"]; const s = Math.PI, f = 2 * s, hc = f + s, ar = Number.POSITIVE_INFINITY, cc = s / 180, h = s / 2, pi = s / 4, no = 2 * s / 3, nt = Math.log10, ft = Math.sign; const du = n => window.getComputedStyle(n, null); const rw = ["top", "right", "bottom", "left"]; const eo = n => Math.round(10 * n) / 10; const bc = function () { let n = !1; try { const t = { get passive() { return n = !0, !1 } }; window.addEventListener("test", null, t); window.removeEventListener("test", null, t) } catch (n) { } return n }(); const fw = (n, t) => n ? n + vu(t) : t, lo = (n, i) => t(i) && "adapters" !== n && (null === Object.getPrototypeOf(i) || i.constructor === Object); const ew = (n, t) => !0 === n ? t : "string" == typeof n ? vt(t, n) : void 0; const sw = Number.EPSILON || 1e-14, nr = (n, t) => t < n.length && !n[t].skip && n[t], el = n => "x" === n ? "y" : "x"; const tf = n => 0 === n || 1 === n, cl = (n, t, i) => -Math.pow(2, 10 * (n -= 1)) * Math.sin((n - t) * f / i), ll = (n, t, i) => Math.pow(2, -10 * n) * Math.sin((n - t) * f / i) + 1, tr = { linear: n => n, easeInQuad: n => n * n, easeOutQuad: n => -n * (n - 2), easeInOutQuad: n => (n /= .5) < 1 ? .5 * n * n : -.5 * (--n * (n - 2) - 1), easeInCubic: n => n * n * n, easeOutCubic: n => (n -= 1) * n * n + 1, easeInOutCubic: n => (n /= .5) < 1 ? .5 * n * n * n : .5 * ((n -= 2) * n * n + 2), easeInQuart: n => n * n * n * n, easeOutQuart: n => -((n -= 1) * n * n * n - 1), easeInOutQuart: n => (n /= .5) < 1 ? .5 * n * n * n * n : -.5 * ((n -= 2) * n * n * n - 2), easeInQuint: n => n * n * n * n * n, easeOutQuint: n => (n -= 1) * n * n * n * n + 1, easeInOutQuint: n => (n /= .5) < 1 ? .5 * n * n * n * n * n : .5 * ((n -= 2) * n * n * n * n + 2), easeInSine: n => 1 - Math.cos(n * h), easeOutSine: n => Math.sin(n * h), easeInOutSine: n => -.5 * (Math.cos(s * n) - 1), easeInExpo: n => 0 === n ? 0 : Math.pow(2, 10 * (n - 1)), easeOutExpo: n => 1 === n ? 1 : 1 - Math.pow(2, -10 * n), easeInOutExpo: n => tf(n) ? n : n < .5 ? .5 * Math.pow(2, 10 * (2 * n - 1)) : .5 * (2 - Math.pow(2, -10 * (2 * n - 1))), easeInCirc: n => n >= 1 ? n : -(Math.sqrt(1 - n * n) - 1), easeOutCirc: n => Math.sqrt(1 - (n -= 1) * n), easeInOutCirc: n => (n /= .5) < 1 ? -.5 * (Math.sqrt(1 - n * n) - 1) : .5 * (Math.sqrt(1 - (n -= 2) * n) + 1), easeInElastic: n => tf(n) ? n : cl(n, .075, .3), easeOutElastic: n => tf(n) ? n : ll(n, .075, .3), easeInOutElastic(n) { const t = .1125; return tf(n) ? n : n < .5 ? .5 * cl(2 * n, t, .45) : .5 + .5 * ll(2 * n - 1, t, .45) }, easeInBack(n) { const t = 1.70158; return n * n * ((t + 1) * n - t) }, easeOutBack(n) { const t = 1.70158; return (n -= 1) * n * ((t + 1) * n + t) + 1 }, easeInOutBack(n) { let t = 1.70158; return (n /= .5) < 1 ? n * n * ((1 + (t *= 1.525)) * n - t) * .5 : .5 * ((n -= 2) * n * ((1 + (t *= 1.525)) * n + t) + 2) }, easeInBounce: n => 1 - tr.easeOutBounce(1 - n), easeOutBounce(n) { const i = 7.5625, t = 2.75; return n < 1 / t ? i * n * n : n < 2 / t ? i * (n -= 1.5 / t) * n + .75 : n < 2.5 / t ? i * (n -= 2.25 / t) * n + .9375 : i * (n -= 2.625 / t) * n + .984375 }, easeInOutBounce: n => n < .5 ? .5 * tr.easeInBounce(2 * n) : .5 * tr.easeOutBounce(2 * n - 1) + .5 }; const yl = new Map; const hw = new RegExp(/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/), cw = new RegExp(/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/); ta = Object.freeze({ __proto__: null, easingEffects: tr, isPatternOrGradient: ve, color: ye, getHoverColor: au, noop: st, uid: dh, isNullOrUndef: r, isArray: e, isObject: t, isFinite: c, finiteOrDefault: d, valueOrDefault: n, toPercentage: gh, toDimension: pe, callback: o, each: u, _elementsEqual: hr, clone: cr, _merger: tc, merge: vi, mergeIf: yi, _mergerIf: ic, _deprecated: function (n, t, i, r) { void 0 !== t && console.warn(n + ': "' + i + '" is deprecated. Please use "' + r + '" instead') }, resolveObjectKey: vt, _capitalize: vu, defined: g, isFunction: yt, setsEqual: we, _isClickEvent: uc, toFontString: kc, _measureText: vr, _longestText: dc, _alignPixel: gt, clearCanvas: ho, drawPoint: yr, _isPointInArea: di, clipArea: pr, unclipArea: wr, _steppedLineTo: gc, _bezierCurveTo: nl, renderText: ni, addRoundedRectPath: gi, _lookup: yu, _lookupByKey: ht, _rlookupByKey: fc, _filterBetween: ec, listenArrayEvents: sc, unlistenArrayEvents: de, _arrayUnique: ge, _createResolver: gu, _attachContext: si, _descriptors: co, _parseObjectDataRadialScale: vo, splineCurve: ol, splineCurveMonotone: sl, _updateBezierControlPoints: hl, _isDomSupported: fo, _getParentNode: bu, getStyle: pc, getRelativePosition: dt, getMaximumSize: wc, retinaScale: oo, supportsEventListenerOptions: bc, readUsedSize: so, fontString: function (n, t, i) { return t + " " + n + "px " + i }, requestAnimFrame: fe, throttled: ee, debounce: hh, _toLeftRightCenter: su, _alignStartEnd: p, _textX: ch, _pointInLine: ti, _steppedInterpolation: al, _bezierInterpolation: vl, formatNumber: ir, toLineHeight: pl, _readValueToProps: rf, toTRBL: yo, toTRBLCorners: ii, toPadding: w, toFont: a, resolve: rr, _addGrace: wl, createContext: pt, PI: s, TAU: f, PITAU: hc, INFINITY: ar, RAD_PER_DEG: cc, HALF_PI: h, QUARTER_PI: pi, TWO_THIRDS_PI: no, log10: nt, sign: ft, niceNum: to, _factorize: lc, isNumber: wi, almostEquals: bi, almostWhole: ac, _setMinAndMaxByKey: io, toRadians: it, toDegrees: pu, _decimalPlaces: ro, getAngleFromPoint: uo, distanceBetweenPoints: wu, _angleDiff: vc, _normalizeAngle: b, _angleBetween: ki, _limitValue: v, _int16Range: yc, _isBetween: ct, getRtlAdapter: hi, overrideTextDirection: po, restoreTextDirection: wo, _boundSegment: bo, _boundSegments: ko, _computeSegments: dl }); ts = { evaluateInteractionItems: br, modes: { index(n, t, i, r) { const u = dt(t, n), f = i.axis || "x", e = i.includeInvisible || !1, o = i.intersect ? go(n, u, f, r, e) : ns(n, u, f, !1, r, e), s = []; return o.length ? (n.getSortedVisibleDatasetMetas().forEach(n => { const i = o[0].index, t = n.data[i]; t && !t.skip && s.push({ element: t, datasetIndex: n.index, index: i }) }), s) : [] }, dataset(n, t, i, r) { const f = dt(t, n), e = i.axis || "xy", o = i.includeInvisible || !1; let u = i.intersect ? go(n, f, e, r, o) : ns(n, f, e, !1, r, o); if (u.length > 0) { const t = u[0].datasetIndex, i = n.getDatasetMeta(t).data; u = []; for (let n = 0; n < i.length; ++n)u.push({ element: i[n], datasetIndex: t, index: n }) } return u }, point: (n, t, i, r) => go(n, dt(t, n), i.axis || "xy", r, i.includeInvisible || !1), nearest(n, t, i, r) { const u = dt(t, n), f = i.axis || "xy", e = i.includeInvisible || !1; return ns(n, u, f, i.intersect, r, e) }, x: (n, t, i, r) => ia(n, dt(t, n), "x", i.intersect, r), y: (n, t, i, r) => ia(n, dt(t, n), "y", i.intersect, r) } }; const ra = ["left", "top", "right", "bottom"]; i.set("layout", { autoPadding: !0, padding: { top: 0, right: 0, bottom: 0, left: 0 } }); y = { addBox(n, t) { n.boxes || (n.boxes = []); t.fullSize = t.fullSize || !1; t.position = t.position || "top"; t.weight = t.weight || 0; t._layers = t._layers || function () { return [{ z: 0, draw(n) { t.draw(n) } }] }; n.boxes.push(t) }, removeBox(n, t) { const i = n.boxes ? n.boxes.indexOf(t) : -1; -1 !== i && n.boxes.splice(i, 1) }, configure(n, t, i) { t.fullSize = i.fullSize; t.position = i.position; t.weight = i.weight }, update(n, t, i, r) { if (n) { const e = w(n.options.layout.padding), l = Math.max(t - e.width, 0), a = Math.max(i - e.height, 0), s = function (n) { const t = function (n) { const f = []; let t, e, i, r, u, o; for (t = 0, e = (n || []).length; t < e; ++t)i = n[t], { position: r, options: { stack: u, stackWeight: o = 1 } } = i, f.push({ index: t, box: i, pos: r, horizontal: i.isHorizontal(), weight: i.weight, stack: u && r + u, stackWeight: o }); return f }(n), s = dr(t.filter(n => n.box.fullSize), !0), i = dr(kr(t, "left"), !0), r = dr(kr(t, "right")), u = dr(kr(t, "top"), !0), f = dr(kr(t, "bottom")), e = ua(t, "x"), o = ua(t, "y"); return { fullSize: s, leftAndTop: i.concat(u), rightAndBottom: r.concat(o).concat(f).concat(e), chartArea: kr(t, "chartArea"), vertical: i.concat(r).concat(o), horizontal: u.concat(f).concat(e) } }(n.boxes), c = s.vertical, v = s.horizontal; u(n.boxes, n => { "function" == typeof n.beforeLayout && n.beforeLayout() }); const p = c.reduce((n, t) => t.box.options && !1 === t.box.options.display ? n : n + 1, 0) || 1, o = Object.freeze({ outerWidth: t, outerHeight: i, padding: e, availableWidth: l, availableHeight: a, vBoxMaxWidth: l / 2 / p, hBoxMaxHeight: a / 2 }), y = Object.assign({}, e); ea(y, w(r)); const f = Object.assign({ maxPadding: y, w: l, h: a, x: e.left, y: e.top }, e), h = yw(c.concat(v), o); gr(s.fullSize, f, o, h); gr(c, f, o, h); gr(v, f, o, h) && gr(c, f, o, h), function (n) { function t(t) { const r = Math.max(i[t] - n[t], 0); return n[t] += r, r } const i = n.maxPadding; n.y += t("top"); n.x += t("left"); t("right"); t("bottom") }(f); oa(s.leftAndTop, f, o, h); f.x += f.w; f.y += f.h; oa(s.rightAndBottom, f, o, h); n.chartArea = { left: f.left, top: f.top, right: f.left + f.w, bottom: f.top + f.h, height: f.h, width: f.w }; u(s.chartArea, t => { const i = t.box; Object.assign(i, n.chartArea); i.update(f.w, f.h, { left: 0, top: 0, right: 0, bottom: 0 }) }) } } }; class is { acquireContext() { } releaseContext() { return !1 } addEventListener() { } removeEventListener() { } getDevicePixelRatio() { return 1 } getMaximumSize(n, t, i, r) { return t = Math.max(0, t || n.width), i = i || n.height, { width: t, height: Math.max(0, r ? Math.floor(t / r) : i) } } isAttached() { return !0 } updateConfig() { } } class sa extends is { acquireContext(n) { return n && n.getContext && n.getContext("2d") || null } updateConfig(n) { n.options.animation = !1 } } const bw = { touchstart: "mousedown", touchmove: "mousemove", touchend: "mouseup", pointerenter: "mouseenter", pointerdown: "mousedown", pointermove: "mousemove", pointerup: "mouseup", pointerleave: "mouseout", pointerout: "mouseout" }, ha = n => null === n || "" === n, ca = !!bc && { passive: !0 }; const nu = new Map; let la = 0; class va extends is { acquireContext(n, t) { const i = n && n.getContext && n.getContext("2d"); return i && i.canvas === n ? (function (n, t) { const i = n.style, r = n.getAttribute("height"), u = n.getAttribute("width"); if (n.$chartjs = { initial: { height: r, width: u, style: { display: i.display, height: i.height, width: i.width } } }, i.display = i.display || "block", i.boxSizing = i.boxSizing || "border-box", ha(u)) { const t = so(n, "width"); void 0 !== t && (n.width = t) } if (ha(r)) if ("" === n.style.height) n.height = n.width / (t || 2); else { const t = so(n, "height"); void 0 !== t && (n.height = t) } }(n, t), i) : null } releaseContext(n) { const t = n.canvas; if (!t.$chartjs) return !1; const i = t.$chartjs.initial;["height", "width"].forEach(n => { const u = i[n]; r(u) ? t.removeAttribute(n) : t.setAttribute(n, u) }); const u = i.style || {}; return Object.keys(u).forEach(n => { t.style[n] = u[n] }), t.width = t.width, delete t.$chartjs, !0 } addEventListener(n, t, i) { this.removeEventListener(n, t); const r = n.$proxies || (n.$proxies = {}), u = { attach: dw, detach: gw, resize: nb }[t] || tb; r[t] = u(n, t, i) } removeEventListener(n, t) { const i = n.$proxies || (n.$proxies = {}), r = i[t]; r && (({ attach: rs, detach: rs, resize: rs }[t] || kw)(n, t, r), i[t] = void 0) } getDevicePixelRatio() { return window.devicePixelRatio } getMaximumSize(n, t, i, r) { return wc(n, t, i, r) } isAttached(n) { const t = bu(n); return !(!t || !t.isConnected) } } us = Object.freeze({ __proto__: null, _detectPlatform: ya, BasePlatform: is, BasicPlatform: sa, DomPlatform: va }); const pa = "transparent", ib = { boolean: (n, t, i) => i > .5 ? t : n, color(n, t, i) { const u = ye(n || pa), r = u.valid && ye(t || pa); return r && r.valid ? r.mix(u, i).hexString() : t }, number: (n, t, i) => n + (t - n) * i }; class wa { constructor(n, t, i, r) { const u = t[i]; r = rr([n.to, r, u, n.from]); const f = rr([n.from, u, r]); this._active = !0; this._fn = n.fn || ib[n.type || typeof f]; this._easing = tr[n.easing] || tr.linear; this._start = Math.floor(Date.now() + (n.delay || 0)); this._duration = this._total = Math.floor(n.duration); this._loop = !!n.loop; this._target = t; this._prop = i; this._from = f; this._to = r; this._promises = void 0 } active() { return this._active } update(n, t, i) { if (this._active) { this._notify(!1); const r = this._target[this._prop], u = i - this._start, f = this._duration - u; this._start = i; this._duration = Math.floor(Math.max(f, n.duration)); this._total += u; this._loop = !!n.loop; this._to = rr([n.to, t, r, n.from]); this._from = rr([n.from, r, t]) } } cancel() { this._active && (this.tick(Date.now()), this._active = !1, this._notify(!1)) } tick(n) { const i = n - this._start, e = this._duration, r = this._prop, u = this._from, o = this._loop, f = this._to; let t; if (this._active = u !== f && (o || i < e), !this._active) return this._target[r] = f, void this._notify(!0); i < 0 ? this._target[r] = u : (t = i / e % 2, t = o && t > 1 ? 2 - t : t, t = this._easing(Math.min(1, Math.max(0, t))), this._target[r] = this._fn(u, f, t)) } wait() { const n = this._promises || (this._promises = []); return new Promise((t, i) => { n.push({ res: t, rej: i }) }) } _notify(n) { const i = n ? "res" : "rej", t = this._promises || []; for (let n = 0; n < t.length; n++)t[n][i]() } } i.set("animation", { delay: void 0, duration: 1e3, easing: "easeOutQuart", fn: void 0, from: void 0, loop: void 0, to: void 0, type: void 0 }); const rb = Object.keys(i.animation); i.describe("animation", { _fallback: !1, _indexable: !1, _scriptable: n => "onProgress" !== n && "onComplete" !== n && "fn" !== n }); i.set("animations", { colors: { type: "color", properties: ["color", "borderColor", "backgroundColor"] }, numbers: { type: "number", properties: ["x", "y", "borderWidth", "radius", "tension"] } }); i.describe("animations", { _fallback: "animation" }); i.set("transitions", { active: { animation: { duration: 400 } }, resize: { animation: { duration: 0 } }, show: { animations: { colors: { from: "transparent" }, visible: { type: "boolean", duration: 0 } } }, hide: { animations: { colors: { to: "transparent" }, visible: { type: "boolean", easing: "linear", fn: n => 0 | n } } } }); class fs { constructor(n, t) { this._chart = n; this._properties = new Map; this.configure(t) } configure(n) { if (t(n)) { const i = this._properties; Object.getOwnPropertyNames(n).forEach(r => { const u = n[r]; if (t(u)) { const f = {}; for (const n of rb) f[n] = u[n]; (e(u.properties) && u.properties || [r]).forEach(n => { n !== r && i.has(n) || i.set(n, f) }) } }) } } _animateOptions(n, t) { const i = t.options, r = function (n, t) { if (t) { let i = n.options; return i ? (i.$shared && (n.options = i = Object.assign({}, i, { $shared: !1, $animations: {} })), i) : void (n.options = t) } }(n, i); if (!r) return []; const u = this._createAnimations(r, i); return i.$shared && function (n, t) { const i = [], r = Object.keys(t); for (let t = 0; t < r.length; t++) { const u = n[r[t]]; u && u.active() && i.push(u.wait()) } return Promise.all(i) }(n.options.$animations, i).then(() => { n.options = i }, () => { }), u } _createAnimations(n, t) { const e = this._properties, r = [], u = n.$animations || (n.$animations = {}), f = Object.keys(t), o = Date.now(); let i; for (i = f.length - 1; i >= 0; --i) { const s = f[i]; if ("$" !== s.charAt(0)) { if ("options" === s) { r.push(...this._animateOptions(n, t)); continue } const l = t[s]; let h = u[s]; const c = e.get(s); if (h) { if (c && h.active()) { h.update(c, l, o); continue } h.cancel() } c && c.duration ? (u[s] = h = new wa(c, n, s, l), r.push(h)) : n[s] = l } } return r } update(n, t) { if (0 === this._properties.size) return void Object.assign(n, t); const i = this._createAnimations(n, t); if (i.length) return (ut.add(this._chart, i), !0) } } const os = n => "reset" === n || "none" === n, iv = (n, t) => t ? n : Object.assign({}, n); class et { constructor(n, t) { this.chart = n; this._ctx = n.ctx; this.index = t; this._cachedDataOpts = {}; this._cachedMeta = this.getMeta(); this._type = this._cachedMeta.type; this.options = void 0; this._parsing = !1; this._data = void 0; this._objectData = void 0; this._sharedOptions = void 0; this._drawStart = void 0; this._drawCount = void 0; this.enableOptionSharing = !1; this.supportsDecimation = !1; this.$context = void 0; this._syncList = []; this.initialize() } initialize() { const n = this._cachedMeta; this.configure(); this.linkScales(); n._stacked = ga(n.vScale, n); this.addElements() } updateIndex(n) { this.index !== n && tu(this._cachedMeta); this.index = n } linkScales() { const i = this.chart, t = this._cachedMeta, r = this.getDataset(), o = (n, t, i, r) => "x" === n ? t : "r" === n ? r : i, u = t.xAxisID = n(r.xAxisID, es(i, "x")), f = t.yAxisID = n(r.yAxisID, es(i, "y")), e = t.rAxisID = n(r.rAxisID, es(i, "r")), s = t.indexAxis, h = t.iAxisID = o(s, u, f, e), c = t.vAxisID = o(s, f, u, e); t.xScale = this.getScaleForId(u); t.yScale = this.getScaleForId(f); t.rScale = this.getScaleForId(e); t.iScale = this.getScaleForId(h); t.vScale = this.getScaleForId(c) } getDataset() { return this.chart.data.datasets[this.index] } getMeta() { return this.chart.getDatasetMeta(this.index) } getScaleForId(n) { return this.chart.scales[n] } _getOtherScale(n) { const t = this._cachedMeta; return n === t.iScale ? t.vScale : t.iScale } reset() { this._update("reset") } _destroy() { const n = this._cachedMeta; this._data && de(this._data, this); n._stacked && tu(n) } _dataCheck() { const r = this.getDataset(), n = r.data || (r.data = []), i = this._data; if (t(n)) this._data = function (n) { const i = Object.keys(n), u = new Array(i.length); let t, f, r; for (t = 0, f = i.length; t < f; ++t)r = i[t], u[t] = { x: r, y: n[r] }; return u }(n); else if (i !== n) { if (i) { de(i, this); const n = this._cachedMeta; tu(n); n._parsed = [] } n && Object.isExtensible(n) && sc(n, this); this._syncList = []; this._data = n } } addElements() { const n = this._cachedMeta; this._dataCheck(); this.datasetElementType && (n.dataset = new this.datasetElementType) } buildOrUpdateElements(n) { const t = this._cachedMeta, i = this.getDataset(); let r = !1; this._dataCheck(); const u = t._stacked; t._stacked = ga(t.vScale, t); t.stack !== i.stack && (r = !0, tu(t), t.stack = i.stack); this._resyncElements(n); (r || u !== t._stacked) && tv(this, t._parsed) } configure() { const n = this.chart.config, t = n.datasetScopeKeys(this._type), i = n.getOptionScopes(this.getDataset(), t, !0); this.options = n.createResolver(i, this.getContext()); this._parsing = this.options.parsing; this._cachedDataOpts = {} } parse(n, i) { const { _cachedMeta: r, _data: u } = this, { iScale: a, _stacked: v } = r, h = a.axis; let f, o, s, c = 0 === n && i === u.length || r._sorted, l = n > 0 && r._parsed[n - 1]; if (!1 === this._parsing) r._parsed = u, r._sorted = !0, s = u; else { s = e(u[n]) ? this.parseArrayData(r, u, n, i) : t(u[n]) ? this.parseObjectData(r, u, n, i) : this.parsePrimitiveData(r, u, n, i); const a = () => null === o[h] || l && o[h] < l[h]; for (f = 0; f < i; ++f)r._parsed[f + n] = o = s[f], c && (a() && (c = !1), l = o); r._sorted = c } v && tv(this, s) } parsePrimitiveData(n, t, i, r) { const { iScale: e, vScale: o } = n, c = e.axis, l = o.axis, a = e.getLabels(), v = e === o, s = new Array(r); let u, h, f; for (u = 0, h = r; u < h; ++u)f = u + i, s[u] = { [c]: v || e.parse(a[f], f), [l]: o.parse(t[f], f) }; return s } parseArrayData(n, t, i, r) { const { xScale: h, yScale: c } = n, o = new Array(r); let u, s, f, e; for (u = 0, s = r; u < s; ++u)f = u + i, e = t[f], o[u] = { x: h.parse(e[0], f), y: c.parse(e[1], f) }; return o } parseObjectData(n, t, i, r) { const { xScale: h, yScale: c } = n, { xAxisKey: l = "x", yAxisKey: a = "y" } = this._parsing, o = new Array(r); let u, s, f, e; for (u = 0, s = r; u < s; ++u)f = u + i, e = t[f], o[u] = { x: h.parse(vt(e, l), f), y: c.parse(vt(e, a), f) }; return o } getParsed(n) { return this._cachedMeta._parsed[n] } getDataElement(n) { return this._cachedMeta.data[n] } applyStack(n, t, i) { const r = this.chart, u = this._cachedMeta, f = t[n.axis]; return da({ keys: ka(r, !0), values: t._stacks[n.axis] }, f, u.index, { mode: i }) } updateRangeFromParsed(n, t, i, r) { const u = i[t.axis]; let f = null === u ? NaN : u; const e = r && i._stacks[t.axis]; r && e && (r.values = e, f = da(r, u, this._cachedMeta.index)); n.min = Math.min(n.min, f); n.max = Math.max(n.max, f) } getMinMax(n, t) { function a() { r = e[i]; const t = r[h.axis]; return !c(r[n.axis]) || v > t || y < t } const u = this._cachedMeta, e = u._parsed, o = u._sorted && n === u.iScale, s = e.length, h = this._getOtherScale(n), l = ((n, t, i) => n && !t.hidden && t._stacked && { keys: ka(i, !0), values: null })(t, u, this.chart), f = { min: Number.POSITIVE_INFINITY, max: Number.NEGATIVE_INFINITY }, { min: v, max: y } = function (n) { const { min: t, max: i, minDefined: r, maxDefined: u } = n.getUserBounds(); return { min: r ? t : Number.NEGATIVE_INFINITY, max: u ? i : Number.POSITIVE_INFINITY } }(h); let i, r; for (i = 0; i < s && (a() || (this.updateRangeFromParsed(f, n, r, l), !o)); ++i); if (o) for (i = s - 1; i >= 0; --i)if (!a()) { this.updateRangeFromParsed(f, n, r, l); break } return f } getAllParsedValues(n) { const r = this._cachedMeta._parsed, u = []; let t, f, i; for (t = 0, f = r.length; t < f; ++t)i = r[t][n.axis], c(i) && u.push(i); return u } getMaxOverflow() { return !1 } getLabelAndValue(n) { const r = this._cachedMeta, t = r.iScale, i = r.vScale, u = this.getParsed(n); return { label: t ? "" + t.getLabelForValue(u[t.axis]) : "", value: i ? "" + i.getLabelForValue(u[i.axis]) : "" } } _update(i) { const r = this._cachedMeta; this.update(i || "default"); r._clip = function (n) { let i, r, u, f; return t(n) ? (i = n.top, r = n.right, u = n.bottom, f = n.left) : i = r = u = f = n, { top: i, right: r, bottom: u, left: f, disabled: !1 === n } }(n(this.options.clip, function (n, t, i) { if (!1 === i) return !1; const r = ba(n, i), u = ba(t, i); return { top: u.end, right: r.end, bottom: u.start, left: r.start } }(r.xScale, r.yScale, this.getMaxOverflow()))) } update() { } draw() { const i = this._ctx, s = this.chart, r = this._cachedMeta, e = r.data || [], u = s.chartArea, f = [], t = this._drawStart || 0, o = this._drawCount || e.length - t, h = this.options.drawActiveElementsOnTop; let n; for (r.dataset && r.dataset.draw(i, u, t, o), n = t; n < t + o; ++n) { const t = e[n]; t.hidden || (t.active && h ? f.push(t) : t.draw(i, u)) } for (n = 0; n < f.length; ++n)f[n].draw(i, u) } getStyle(n, t) { const i = t ? "active" : "default"; return void 0 === n && this._cachedMeta.dataset ? this.resolveDatasetElementOptions(i) : this.resolveDataElementOptions(n || 0, i) } getContext(n, t, i) { const u = this.getDataset(); let r; if (n >= 0 && n < this._cachedMeta.data.length) { const t = this._cachedMeta.data[n]; r = t.$context || (t.$context = function (n, t, i) { return pt(n, { active: !1, dataIndex: t, parsed: void 0, raw: void 0, element: i, index: t, mode: "default", type: "data" }) }(this.getContext(), n, t)); r.parsed = this.getParsed(n); r.raw = u.data[n]; r.index = r.dataIndex = n } else r = this.$context || (this.$context = function (n, t) { return pt(n, { active: !1, dataset: void 0, datasetIndex: t, index: t, mode: "default", type: "dataset" }) }(this.chart.getContext(), this.index)), r.dataset = u, r.index = r.datasetIndex = this.index; return r.active = !!t, r.mode = i, r } resolveDatasetElementOptions(n) { return this._resolveElementOptions(this.datasetElementType.id, n) } resolveDataElementOptions(n, t) { return this._resolveElementOptions(this.dataElementType.id, t, n) } _resolveElementOptions(n, t = "default", r) { const o = "active" === t, s = this._cachedDataOpts, h = n + "-" + t, c = s[h], f = this.enableOptionSharing && g(r); if (c) return iv(c, f); const e = this.chart.config, l = e.datasetElementScopeKeys(this._type, n), a = o ? [`${n}Hover`, "hover", n, ""] : [n, ""], v = e.getOptionScopes(this.getDataset(), l), y = Object.keys(i.elements[n]), u = e.resolveNamedOptions(v, y, () => this.getContext(r, o), a); return u.$shared && (u.$shared = f, s[h] = Object.freeze(iv(u, f))), u } _resolveAnimations(n, t, i) { const u = this.chart, f = this._cachedDataOpts, e = `animation-${t}`, o = f[e]; if (o) return o; let r; if (!1 !== u.options.animation) { const u = this.chart.config, f = u.datasetAnimationScopeKeys(this._type, t), e = u.getOptionScopes(this.getDataset(), f); r = u.createResolver(e, this.getContext(n, i, t)) } const s = new fs(u, r && r.animations); return r && r._cacheable && (f[e] = Object.freeze(s)), s } getSharedOptions(n) { if (n.$shared) return this._sharedOptions || (this._sharedOptions = Object.assign({}, n)) } includeOptions(n, t) { return !t || os(n) || this.chart._animationsDisabled } updateElement(n, t, i, r) { os(r) ? Object.assign(n, i) : this._resolveAnimations(t, r).update(n, i) } updateSharedOptions(n, t, i) { n && !os(t) && this._resolveAnimations(void 0, t).update(n, i) } _setStyle(n, t, i, r) { n.active = r; const u = this.getStyle(t, r); this._resolveAnimations(t, i, r).update(n, { options: !r && this.getSharedOptions(u) || u }) } removeHoverStyle(n, t, i) { this._setStyle(n, i, "active", !1) } setHoverStyle(n, t, i) { this._setStyle(n, i, "active", !0) } _removeDatasetHoverStyle() { const n = this._cachedMeta.dataset; n && this._setStyle(n, void 0, "active", !1) } _setDatasetHoverStyle() { const n = this._cachedMeta.dataset; n && this._setStyle(n, void 0, "active", !0) } _resyncElements(n) { const u = this._data, f = this._cachedMeta.data; for (const [n, t, i] of this._syncList) this[n](t, i); this._syncList = []; const t = f.length, i = u.length, r = Math.min(i, t); r && this.parse(0, r); i > t ? this._insertElements(t, i - t, n) : i < t && this._removeElements(i, t - i) } _insertElements(n, t, i = !0) { const f = this._cachedMeta, u = f.data, e = n + t; let r; const o = n => { for (n.length += t, r = n.length - 1; r >= e; r--)n[r] = n[r - t] }; for (o(u), r = n; r < e; ++r)u[r] = new this.dataElementType; this._parsing && o(f._parsed); this.parse(n, t); i && this.updateElements(u, n, t, "reset") } updateElements() { } _removeElements(n, t) { const i = this._cachedMeta; if (this._parsing) { const r = i._parsed.splice(n, t); i._stacked && tu(i, r) } i.data.splice(n, t) } _sync(n) { if (this._parsing) this._syncList.push(n); else { const [t, i, r] = n; this[t](i, r) } this.chart._dataChanges.push([this.index, ...n]) } _onDataPush() { const n = arguments.length; this._sync(["_insertElements", this.getDataset().data.length - n, n]) } _onDataPop() { this._sync(["_removeElements", this._cachedMeta.data.length - 1, 1]) } _onDataShift() { this._sync(["_removeElements", 0, 1]) } _onDataSplice(n, t) { t && this._sync(["_removeElements", n, t]); const i = arguments.length - 2; i && this._sync(["_insertElements", n, i]) } _onDataUnshift() { this._sync(["_insertElements", 0, arguments.length]) } } et.defaults = {}; et.prototype.datasetElementType = null; et.prototype.dataElementType = null; class rt { constructor() { this.x = void 0; this.y = void 0; this.active = !1; this.options = void 0; this.$animations = void 0 } tooltipPosition(n) { const { x: t, y: i } = this.getProps(["x", "y"], n); return { x: t, y: i } } hasValue() { return wi(this.x) && wi(this.y) } getProps(n, t) { const i = this.$animations; if (!t || !i) return this; const r = {}; return n.forEach(n => { r[n] = i[n] && i[n].active() ? i[n]._to : this[n] }), r } } rt.defaults = {}; rt.defaultRoutes = void 0; const rv = { values: n => e(n) ? n : "" + n, numeric(n, t, i) { if (0 === n) return "0"; const o = this.chart.options.locale; let r, u = n; if (i.length > 1) { const t = Math.max(Math.abs(i[0].value), Math.abs(i[i.length - 1].value)); (t < .0001 || t > 1e15) && (r = "scientific"); u = function (n, t) { let i = t.length > 3 ? t[2].value - t[1].value : t[1].value - t[0].value; return Math.abs(i) >= 1 && n !== Math.floor(n) && (i = n - Math.floor(n)), i }(n, i) } const s = nt(Math.abs(u)), f = Math.max(Math.min(-1 * Math.floor(s), 20), 0), e = { notation: r, minimumFractionDigits: f, maximumFractionDigits: f }; return Object.assign(e, this.options.ticks.format), ir(n, o, e) }, logarithmic(n, t, i) { if (0 === n) return "0"; const r = n / Math.pow(10, Math.floor(nt(n))); return 1 === r || 2 === r || 5 === r ? rv.numeric.call(this, n, t, i) : "" } }; ur = { formatters: rv }; i.set("scale", { display: !0, offset: !1, reverse: !1, beginAtZero: !1, bounds: "ticks", grace: 0, grid: { display: !0, lineWidth: 1, drawBorder: !0, drawOnChartArea: !0, drawTicks: !0, tickLength: 8, tickWidth: (n, t) => t.lineWidth, tickColor: (n, t) => t.color, offset: !1, borderDash: [], borderDashOffset: 0, borderWidth: 1 }, title: { display: !1, text: "", padding: { top: 4, bottom: 4 } }, ticks: { minRotation: 0, maxRotation: 50, mirror: !1, textStrokeWidth: 0, textStrokeColor: "", padding: 3, display: !0, autoSkip: !0, autoSkipPadding: 3, labelOffset: 0, callback: ur.formatters.values, minor: {}, major: {}, align: "center", crossAlign: "near", showLabelBackdrop: !1, backdropColor: "rgba(255, 255, 255, 0.75)", backdropPadding: 2 } }); i.route("scale.ticks", "color", "", "color"); i.route("scale.grid", "color", "", "borderColor"); i.route("scale.grid", "borderColor", "", "borderColor"); i.route("scale.title", "color", "", "color"); i.describe("scale", { _fallback: !1, _scriptable: n => !n.startsWith("before") && !n.startsWith("after") && "callback" !== n && "parser" !== n, _indexable: n => "borderDash" !== n && "tickBorderDash" !== n }); i.describe("scales", { _fallback: "scale" }); i.describe("scale.ticks", { _scriptable: n => "backdropPadding" !== n && "callback" !== n, _indexable: n => "backdropPadding" !== n }); const uv = (n, t, i) => "top" === t || "left" === t ? n[t] + i : n[t] - i; class ci extends rt { constructor(n) { super(); this.id = n.id; this.type = n.type; this.options = void 0; this.ctx = n.ctx; this.chart = n.chart; this.top = void 0; this.bottom = void 0; this.left = void 0; this.right = void 0; this.width = void 0; this.height = void 0; this._margins = { left: 0, right: 0, top: 0, bottom: 0 }; this.maxWidth = void 0; this.maxHeight = void 0; this.paddingTop = void 0; this.paddingBottom = void 0; this.paddingLeft = void 0; this.paddingRight = void 0; this.axis = void 0; this.labelRotation = void 0; this.min = void 0; this.max = void 0; this._range = void 0; this.ticks = []; this._gridLineItems = null; this._labelItems = null; this._labelSizes = null; this._length = 0; this._maxLength = 0; this._longestTextCache = {}; this._startPixel = void 0; this._endPixel = void 0; this._reversePixels = !1; this._userMax = void 0; this._userMin = void 0; this._suggestedMax = void 0; this._suggestedMin = void 0; this._ticksLength = 0; this._borderValue = 0; this._cache = {}; this._dataLimitsCached = !1; this.$context = void 0 } init(n) { this.options = n.setContext(this.getContext()); this.axis = n.axis; this._userMin = this.parse(n.min); this._userMax = this.parse(n.max); this._suggestedMin = this.parse(n.suggestedMin); this._suggestedMax = this.parse(n.suggestedMax) } parse(n) { return n } getUserBounds() { let { _userMin: n, _userMax: t, _suggestedMin: i, _suggestedMax: r } = this; return n = d(n, Number.POSITIVE_INFINITY), t = d(t, Number.NEGATIVE_INFINITY), i = d(i, Number.POSITIVE_INFINITY), r = d(r, Number.NEGATIVE_INFINITY), { min: d(n, i), max: d(t, r), minDefined: c(n), maxDefined: c(t) } } getMinMax(n) { let r, { min: t, max: i, minDefined: u, maxDefined: f } = this.getUserBounds(); if (u && f) return { min: t, max: i }; const e = this.getMatchingVisibleMetas(); for (let o = 0, s = e.length; o < s; ++o)r = e[o].controller.getMinMax(this, n), u || (t = Math.min(t, r.min)), f || (i = Math.max(i, r.max)); return t = f && t > i ? i : t, i = u && t > i ? t : i, { min: d(t, d(i, t)), max: d(i, d(t, i)) } } getPadding() { return { left: this.paddingLeft || 0, top: this.paddingTop || 0, right: this.paddingRight || 0, bottom: this.paddingBottom || 0 } } getTicks() { return this.ticks } getLabels() { const n = this.chart.data; return this.options.labels || (this.isHorizontal() ? n.xLabels : n.yLabels) || n.labels || [] } beforeLayout() { this._cache = {}; this._dataLimitsCached = !1 } beforeUpdate() { o(this.options.beforeUpdate, [this]) } update(n, t, i) { const { beginAtZero: e, grace: o, ticks: r } = this.options, u = r.sampleSize; this.beforeUpdate(); this.maxWidth = n; this.maxHeight = t; this._margins = i = Object.assign({ left: 0, right: 0, top: 0, bottom: 0 }, i); this.ticks = null; this._labelSizes = null; this._gridLineItems = null; this._labelItems = null; this.beforeSetDimensions(); this.setDimensions(); this.afterSetDimensions(); this._maxLength = this.isHorizontal() ? this.width + i.left + i.right : this.height + i.top + i.bottom; this._dataLimitsCached || (this.beforeDataLimits(), this.determineDataLimits(), this.afterDataLimits(), this._range = wl(this, o, e), this._dataLimitsCached = !0); this.beforeBuildTicks(); this.ticks = this.buildTicks() || []; this.afterBuildTicks(); const f = u < this.ticks.length; this._convertTicksToLabels(f ? fv(this.ticks, u) : this.ticks); this.configure(); this.beforeCalculateLabelRotation(); this.calculateLabelRotation(); this.afterCalculateLabelRotation(); r.display && (r.autoSkip || "auto" === r.source) && (this.ticks = fb(this, this.ticks), this._labelSizes = null, this.afterAutoSkip()); f && this._convertTicksToLabels(this.ticks); this.beforeFit(); this.fit(); this.afterFit(); this.afterUpdate() } configure() { let n, t, i = this.options.reverse; this.isHorizontal() ? (n = this.left, t = this.right) : (n = this.top, t = this.bottom, i = !i); this._startPixel = n; this._endPixel = t; this._reversePixels = i; this._length = t - n; this._alignToPixels = this.options.alignToPixels } afterUpdate() { o(this.options.afterUpdate, [this]) } beforeSetDimensions() { o(this.options.beforeSetDimensions, [this]) } setDimensions() { this.isHorizontal() ? (this.width = this.maxWidth, this.left = 0, this.right = this.width) : (this.height = this.maxHeight, this.top = 0, this.bottom = this.height); this.paddingLeft = 0; this.paddingTop = 0; this.paddingRight = 0; this.paddingBottom = 0 } afterSetDimensions() { o(this.options.afterSetDimensions, [this]) } _callHooks(n) { this.chart.notifyPlugins(n, this.getContext()); o(this.options[n], [this]) } beforeDataLimits() { this._callHooks("beforeDataLimits") } determineDataLimits() { } afterDataLimits() { this._callHooks("afterDataLimits") } beforeBuildTicks() { this._callHooks("beforeBuildTicks") } buildTicks() { return [] } afterBuildTicks() { this._callHooks("afterBuildTicks") } beforeTickToLabelConversion() { o(this.options.beforeTickToLabelConversion, [this]) } generateTickLabels(n) { const u = this.options.ticks; let t, r, i; for (t = 0, r = n.length; t < r; t++)i = n[t], i.label = o(u.callback, [i.value, t, n], this) } afterTickToLabelConversion() { o(this.options.afterTickToLabelConversion, [this]) } beforeCalculateLabelRotation() { o(this.options.beforeCalculateLabelRotation, [this]) } calculateLabelRotation() { const n = this.options, t = n.ticks, i = this.ticks.length, r = t.minRotation || 0, c = t.maxRotation; let u, l, o, f = r; if (!this._isVisible() || !t.display || r >= c || i <= 1 || !this.isHorizontal()) return void (this.labelRotation = r); const s = this._getLabelSizes(), e = s.widest.width, h = s.highest.height, a = v(this.chart.width - e, 0, this.maxWidth); u = n.offset ? this.maxWidth / i : a / (i - 1); e + 6 > u && (u = a / (i - (n.offset ? .5 : 1)), l = this.maxHeight - iu(n.grid) - t.padding - ev(n.title, this.chart.options.font), o = Math.sqrt(e * e + h * h), f = pu(Math.min(Math.asin(v((s.highest.height + 6) / u, -1, 1)), Math.asin(v(l / o, -1, 1)) - Math.asin(v(h / o, -1, 1)))), f = Math.max(r, Math.min(c, f))); this.labelRotation = f } afterCalculateLabelRotation() { o(this.options.afterCalculateLabelRotation, [this]) } afterAutoSkip() { } beforeFit() { o(this.options.beforeFit, [this]) } fit() { const n = { width: 0, height: 0 }, { chart: i, options: { ticks: t, title: f, grid: u } } = this, e = this._isVisible(), r = this.isHorizontal(); if (e) { const e = ev(f, i.options.font); if (r ? (n.width = this.maxWidth, n.height = iu(u) + e) : (n.height = this.maxHeight, n.width = iu(u) + e), t.display && this.ticks.length) { const { first: h, last: c, widest: f, highest: e } = this._getLabelSizes(), o = 2 * t.padding, s = it(this.labelRotation), i = Math.cos(s), u = Math.sin(s); if (r) { const r = t.mirror ? 0 : u * f.width + i * e.height; n.height = Math.min(this.maxHeight, n.height + r + o) } else { const r = t.mirror ? 0 : i * f.width + u * e.height; n.width = Math.min(this.maxWidth, n.width + r + o) } this._calculatePadding(h, c, u, i) } } this._handleMargins(); r ? (this.width = this._length = i.width - this._margins.left - this._margins.right, this.height = n.height) : (this.width = n.width, this.height = this._length = i.height - this._margins.top - this._margins.bottom) } _calculatePadding(n, t, i, r) { const { ticks: { align: u, padding: f }, position: e } = this.options, o = 0 !== this.labelRotation, s = "top" !== e && "x" === this.axis; if (this.isHorizontal()) { const c = this.getPixelForTick(0) - this.left, l = this.right - this.getPixelForTick(this.ticks.length - 1); let e = 0, h = 0; o ? s ? (e = r * n.width, h = i * t.height) : (e = i * n.height, h = r * t.width) : "start" === u ? h = t.width : "end" === u ? e = n.width : "inner" !== u && (e = n.width / 2, h = t.width / 2); this.paddingLeft = Math.max((e - c + f) * this.width / (this.width - c), 0); this.paddingRight = Math.max((h - l + f) * this.width / (this.width - l), 0) } else { let i = t.height / 2, r = n.height / 2; "start" === u ? (i = 0, r = n.height) : "end" === u && (i = t.height, r = 0); this.paddingTop = i + f; this.paddingBottom = r + f } } _handleMargins() { this._margins && (this._margins.left = Math.max(this.paddingLeft, this._margins.left), this._margins.top = Math.max(this.paddingTop, this._margins.top), this._margins.right = Math.max(this.paddingRight, this._margins.right), this._margins.bottom = Math.max(this.paddingBottom, this._margins.bottom)) } afterFit() { o(this.options.afterFit, [this]) } isHorizontal() { const { axis: t, position: n } = this.options; return "top" === n || "bottom" === n || "x" === t } isFullSize() { return this.options.fullSize } _convertTicksToLabels(n) { let t, i; for (this.beforeTickToLabelConversion(), this.generateTickLabels(n), t = 0, i = n.length; t < i; t++)r(n[t].label) && (n.splice(t, 1), i--, t--); this.afterTickToLabelConversion() } _getLabelSizes() { let n = this._labelSizes; if (!n) { const i = this.options.ticks.sampleSize; let t = this.ticks; i < t.length && (t = fv(t, i)); this._labelSizes = n = this._computeLabelSizes(t, t.length) } return n } _computeLabelSizes(n, t) { const { ctx: p, _longestTextCache: w } = this, c = [], l = []; let o, a, tt, i, b, k, s, d, f, h, v, g = 0, nt = 0; for (o = 0; o < t; ++o) { if (i = n[o].label, b = this._resolveTickFontOptions(o), p.font = k = b.string, s = w[k] = w[k] || { data: {}, gc: [] }, d = b.lineHeight, f = h = 0, r(i) || e(i)) { if (e(i)) for (a = 0, tt = i.length; a < tt; ++a)v = i[a], r(v) || e(v) || (f = vr(p, s.data, s.gc, f, v), h += d) } else f = vr(p, s.data, s.gc, f, i), h = d; c.push(f); l.push(h); g = Math.max(f, g); nt = Math.max(h, nt) } !function (n, t) { u(n, n => { const r = n.gc, u = r.length / 2; let i; if (u > t) { for (i = 0; i < u; ++i)delete n.data[r[i]]; r.splice(0, u) } }) }(w, t); const it = c.indexOf(g), rt = l.indexOf(nt), y = n => ({ width: c[n] || 0, height: l[n] || 0 }); return { first: y(0), last: y(t - 1), widest: y(it), highest: y(rt), widths: c, heights: l } } getLabelForValue(n) { return n } getPixelForValue() { return NaN } getValueForPixel() { } getPixelForTick(n) { const t = this.ticks; return n < 0 || n > t.length - 1 ? null : this.getPixelForValue(t[n].value) } getPixelForDecimal(n) { this._reversePixels && (n = 1 - n); const t = this._startPixel + n * this._length; return yc(this._alignToPixels ? gt(this.chart, t, 0) : t) } getDecimalForPixel(n) { const t = (n - this._startPixel) / this._length; return this._reversePixels ? 1 - t : t } getBasePixel() { return this.getPixelForValue(this.getBaseValue()) } getBaseValue() { const { min: n, max: t } = this; return n < 0 && t < 0 ? t : n > 0 && t > 0 ? n : 0 } getContext(n) { const t = this.ticks || []; if (n >= 0 && n < t.length) { const i = t[n]; return i.$context || (i.$context = function (n, t, i) { return pt(n, { tick: i, index: t, type: "tick" }) }(this.getContext(), n, i)) } return this.$context || (this.$context = pt(this.chart.getContext(), { scale: this, type: "scale" })) } _tickSize() { const o = this.options.ticks, f = it(this.labelRotation), n = Math.abs(Math.cos(f)), t = Math.abs(Math.sin(f)), i = this._getLabelSizes(), e = o.autoSkipPadding || 0, r = i ? i.widest.width + e : 0, u = i ? i.highest.height + e : 0; return this.isHorizontal() ? u * n > r * t ? r / n : u / t : u * t < r * n ? u / n : r / t } _isVisible() { const n = this.options.display; return "auto" !== n ? !!n : this.getMatchingVisibleMetas().length > 0 } _computeGridLineItems(i) { const nt = this.axis, tt = this.chart, it = this.options, { grid: c, position: u } = it, rt = c.offset, ot = this.isHorizontal(), k = this.ticks.length + (rt ? 1 : 0), o = iu(c), ut = [], ft = c.setContext(this.getContext()), et = ft.drawBorder ? ft.borderWidth : 0, e = et / 2, f = function (n) { return gt(tt, n, et) }; let r, l, d, g, s, h, a, v, y, p, w, b; if ("top" === u) r = f(this.bottom), h = this.bottom - o, v = r - e, p = f(i.top) + e, b = i.bottom; else if ("bottom" === u) r = f(this.top), p = i.top, b = f(i.bottom) - e, h = r + e, v = this.top + o; else if ("left" === u) r = f(this.right), s = this.right - o, a = r - e, y = f(i.left) + e, w = i.right; else if ("right" === u) r = f(this.left), y = i.left, w = f(i.right) - e, s = r + e, a = this.left + o; else if ("x" === nt) { if ("center" === u) r = f((i.top + i.bottom) / 2 + .5); else if (t(u)) { const n = Object.keys(u)[0], t = u[n]; r = f(this.chart.scales[n].getPixelForValue(t)) } p = i.top; b = i.bottom; h = r + e; v = h + o } else if ("y" === nt) { if ("center" === u) r = f((i.left + i.right) / 2); else if (t(u)) { const n = Object.keys(u)[0], t = u[n]; r = f(this.chart.scales[n].getPixelForValue(t)) } s = r - e; a = s - o; y = i.left; w = i.right } const st = n(it.ticks.maxTicksLimit, k), ht = Math.max(1, Math.ceil(k / st)); for (l = 0; l < k; l += ht) { const n = c.setContext(this.getContext(l)), t = n.lineWidth, i = n.color, r = c.borderDash || [], u = n.borderDashOffset, f = n.tickWidth, e = n.tickColor, o = n.tickBorderDash || [], k = n.tickBorderDashOffset; d = eb(this, l, rt); void 0 !== d && (g = gt(tt, d, t), ot ? s = a = y = w = g : h = v = p = b = g, ut.push({ tx1: s, ty1: h, tx2: a, ty2: v, x1: y, y1: p, x2: w, y2: b, width: t, color: i, borderDash: r, borderDashOffset: u, tickWidth: f, tickColor: e, tickBorderDash: o, tickBorderDashOffset: k })) } return this._ticksLength = k, this._borderValue = r, ut } _computeLabelItems(n) { const k = this.axis, ut = this.options, { position: i, ticks: d } = ut, at = this.isHorizontal(), ft = this.ticks, { align: et, crossAlign: a, padding: ot, mirror: st } = d, v = iu(ut.grid), y = v + ot, ht = st ? -ot : y, g = -it(this.labelRotation), ct = []; let r, nt, lt, p, o, s, f, tt, rt, u, c, l, b = "middle"; if ("top" === i) s = this.bottom - ht, f = this._getXAxisLabelAlignment(); else if ("bottom" === i) s = this.top + ht, f = this._getXAxisLabelAlignment(); else if ("left" === i) { const n = this._getYAxisLabelAlignment(v); f = n.textAlign; o = n.x } else if ("right" === i) { const n = this._getYAxisLabelAlignment(v); f = n.textAlign; o = n.x } else if ("x" === k) { if ("center" === i) s = (n.top + n.bottom) / 2 + y; else if (t(i)) { const n = Object.keys(i)[0], t = i[n]; s = this.chart.scales[n].getPixelForValue(t) + y } f = this._getXAxisLabelAlignment() } else if ("y" === k) { if ("center" === i) o = (n.left + n.right) / 2 - y; else if (t(i)) { const n = Object.keys(i)[0], t = i[n]; o = this.chart.scales[n].getPixelForValue(t) } f = this._getYAxisLabelAlignment(v).textAlign } "y" === k && ("start" === et ? b = "top" : "end" === et && (b = "bottom")); const h = this._getLabelSizes(); for (r = 0, nt = ft.length; r < nt; ++r) { lt = ft[r]; p = lt.label; const n = d.setContext(this.getContext(r)); tt = this.getPixelForTick(r) + d.labelOffset; rt = this._resolveTickFontOptions(r); u = rt.lineHeight; c = e(p) ? p.length : 1; const t = c / 2, k = n.color, it = n.textStrokeColor, ut = n.textStrokeWidth; let v, y = f; if (at ? (o = tt, "inner" === f && (y = r === nt - 1 ? this.options.reverse ? "left" : "right" : 0 === r ? this.options.reverse ? "right" : "left" : "center"), l = "top" === i ? "near" === a || 0 !== g ? -c * u + u / 2 : "center" === a ? -h.highest.height / 2 - t * u + u : -h.highest.height + u / 2 : "near" === a || 0 !== g ? u / 2 : "center" === a ? h.highest.height / 2 - t * u : h.highest.height - c * u, st && (l *= -1)) : (s = tt, l = (1 - c) * u / 2), n.showLabelBackdrop) { const t = w(n.backdropPadding), i = h.heights[r], u = h.widths[r]; let e = s + l - t.top, c = o - t.left; switch (b) { case "middle": e -= i / 2; break; case "bottom": e -= i }switch (f) { case "center": c -= u / 2; break; case "right": c -= u }v = { left: c, top: e, width: u + t.width, height: i + t.height, color: n.backdropColor } } ct.push({ rotation: g, label: p, font: rt, color: k, strokeColor: it, strokeWidth: ut, textOffset: l, textAlign: y, textBaseline: b, translation: [o, s], backdrop: v }) } return ct } _getXAxisLabelAlignment() { const { position: i, ticks: t } = this.options; if (-it(this.labelRotation)) return "top" === i ? "left" : "right"; let n = "center"; return "start" === t.align ? n = "left" : "end" === t.align ? n = "right" : "inner" === t.align && (n = "inner"), n } _getYAxisLabelAlignment(n) { const { position: e, ticks: { crossAlign: r, mirror: o, padding: f } } = this.options, s = n + f, u = this._getLabelSizes().widest.width; let t, i; return "left" === e ? o ? (i = this.right + f, "near" === r ? t = "left" : "center" === r ? (t = "center", i += u / 2) : (t = "right", i += u)) : (i = this.right - s, "near" === r ? t = "right" : "center" === r ? (t = "center", i -= u / 2) : (t = "left", i = this.left)) : "right" === e ? o ? (i = this.left + f, "near" === r ? t = "right" : "center" === r ? (t = "center", i -= u / 2) : (t = "left", i -= u)) : (i = this.left + s, "near" === r ? t = "left" : "center" === r ? (t = "center", i += u / 2) : (t = "right", i = this.right)) : t = "right", { textAlign: t, x: i } } _computeLabelArea() { if (!this.options.ticks.mirror) { const t = this.chart, n = this.options.position; return "left" === n || "right" === n ? { top: 0, left: this.left, bottom: t.height, right: this.right } : "top" === n || "bottom" === n ? { top: this.top, left: 0, bottom: this.bottom, right: t.width } : void 0 } } drawBackground() { const { ctx: n, options: { backgroundColor: t }, left: i, top: r, width: u, height: f } = this; t && (n.save(), n.fillStyle = t, n.fillRect(i, r, u, f), n.restore()) } getLineWidthForValue(n) { const t = this.options.grid; if (!this._isVisible() || !t.display) return 0; const i = this.ticks.findIndex(t => t.value === n); return i >= 0 ? t.setContext(this.getContext(i)).lineWidth : 0 } drawGrid(n) { const r = this.options.grid, t = this.ctx, u = this._gridLineItems || (this._gridLineItems = this._computeGridLineItems(n)); let i, f; const e = (n, i, r) => { r.width && r.color && (t.save(), t.lineWidth = r.width, t.strokeStyle = r.color, t.setLineDash(r.borderDash || []), t.lineDashOffset = r.borderDashOffset, t.beginPath(), t.moveTo(n.x, n.y), t.lineTo(i.x, i.y), t.stroke(), t.restore()) }; if (r.display) for (i = 0, f = u.length; i < f; ++i) { const n = u[i]; r.drawOnChartArea && e({ x: n.x1, y: n.y1 }, { x: n.x2, y: n.y2 }, n); r.drawTicks && e({ x: n.tx1, y: n.ty1 }, { x: n.tx2, y: n.ty2 }, { color: n.tickColor, width: n.tickWidth, borderDash: n.tickBorderDash, borderDashOffset: n.tickBorderDashOffset }) } } drawBorder() { const { chart: i, ctx: n, options: { grid: u } } = this, f = u.setContext(this.getContext()), t = u.drawBorder ? f.borderWidth : 0; if (t) { const r = u.setContext(this.getContext(0)).lineWidth, c = this._borderValue; let e, o, s, h; this.isHorizontal() ? (e = gt(i, this.left, t) - t / 2, o = gt(i, this.right, r) + r / 2, s = h = c) : (s = gt(i, this.top, t) - t / 2, h = gt(i, this.bottom, r) + r / 2, e = o = c); n.save(); n.lineWidth = f.borderWidth; n.strokeStyle = f.borderColor; n.beginPath(); n.moveTo(e, s); n.lineTo(o, h); n.stroke(); n.restore() } } drawLabels(n) { if (this.options.ticks.display) { const t = this.ctx, r = this._computeLabelArea(); r && pr(t, r); const u = this._labelItems || (this._labelItems = this._computeLabelItems(n)); let i, f; for (i = 0, f = u.length; i < f; ++i) { const n = u[i], r = n.font, f = n.label; n.backdrop && (t.fillStyle = n.backdrop.color, t.fillRect(n.backdrop.left, n.backdrop.top, n.backdrop.width, n.backdrop.height)); ni(t, f, 0, n.textOffset, r, n) } r && wr(t) } } drawTitle() { const { ctx: s, options: { position: i, title: n, reverse: c } } = this; if (n.display) { const u = a(n.font), f = w(n.padding), o = n.align; let r = u.lineHeight / 2; "bottom" === i || "center" === i || t(i) ? (r += f.bottom, e(n.text) && (r += u.lineHeight * (n.text.length - 1))) : r += f.top; const { titleX: l, titleY: v, maxWidth: y, rotation: b } = function (n, i, r, u) { const { top: l, left: s, bottom: a, right: c, chart: d } = n, { chartArea: f, scales: v } = d; let y, e, o, w = 0; const b = a - l, k = c - s; if (n.isHorizontal()) { if (e = p(u, s, c), t(r)) { const n = Object.keys(r)[0], t = r[n]; o = v[n].getPixelForValue(t) + b - i } else o = "center" === r ? (f.bottom + f.top) / 2 + b - i : uv(n, r, i); y = c - s } else { if (t(r)) { const n = Object.keys(r)[0], t = r[n]; e = v[n].getPixelForValue(t) - k + i } else e = "center" === r ? (f.left + f.right) / 2 - k + i : uv(n, r, i); o = p(u, a, l); w = "left" === r ? -h : h } return { titleX: e, titleY: o, maxWidth: y, rotation: w } }(this, r, i, o); ni(s, n.text, 0, 0, u, { color: n.color, maxWidth: y, rotation: b, textAlign: ob(o, i, c), textBaseline: "middle", translation: [l, v] }) } } draw(n) { this._isVisible() && (this.drawBackground(), this.drawGrid(n), this.drawBorder(), this.drawTitle(), this.drawLabels(n)) } _layers() { const t = this.options, i = t.ticks && t.ticks.z || 0, r = n(t.grid && t.grid.z, -1); return this._isVisible() && this.draw === ci.prototype.draw ? [{ z: r, draw: n => { this.drawBackground(), this.drawGrid(n), this.drawTitle() } }, { z: r + 1, draw: () => { this.drawBorder() } }, { z: i, draw: n => { this.drawLabels(n) } }] : [{ z: i, draw: n => { this.draw(n) } }] } getMatchingVisibleMetas(n) { const i = this.chart.getSortedVisibleDatasetMetas(), f = this.axis + "AxisID", r = []; let t, u; for (t = 0, u = i.length; t < u; ++t) { const u = i[t]; u[f] !== this.id || n && u.type !== n || r.push(u) } return r } _resolveTickFontOptions(n) { return a(this.options.ticks.setContext(this.getContext(n)).font) } _maxDigits() { const n = this._resolveTickFontOptions(0).lineHeight; return (this.isHorizontal() ? this.width : this.height) / n } } class sf { constructor(n, t, i) { this.type = n; this.scope = t; this.override = i; this.items = Object.create(null) } isForType(n) { return Object.prototype.isPrototypeOf.call(this.type.prototype, n.prototype) } register(n) { const r = Object.getPrototypeOf(n); let u; (function (n) { return "id" in n && "defaults" in n })(r) && (u = this.register(r)); const f = this.items, t = n.id, e = this.scope + "." + t; if (!t) throw new Error("class does not have id: " + n); return t in f || (f[t] = n, function (n, t, r) { const u = vi(Object.create(null), [r ? i.get(r) : {}, i.get(t), n.defaults]); i.set(t, u); n.defaultRoutes && function (n, t) { Object.keys(t).forEach(r => { const u = r.split("."), e = u.pop(), o = [n].concat(u).join("."), f = t[r].split("."), s = f.pop(), h = f.join("."); i.route(o, e, h, s) }) }(t, n.defaultRoutes); n.descriptors && i.describe(t, n.descriptors) }(n, e, u), this.override && i.override(n.id, n.overrides)), e } get(n) { return this.items[n] } unregister(n) { const u = this.items, t = n.id, r = this.scope; t in u && delete u[t]; r && t in i[r] && (delete i[r][t], this.override && delete ei[t]) } } ot = new (class { constructor() { this.controllers = new sf(et, "datasets", !0); this.elements = new sf(rt, "elements"); this.plugins = new sf(Object, "plugins"); this.scales = new sf(ci, "scales"); this._typedRegistries = [this.controllers, this.scales, this.elements] } add(...n) { this._each("register", n) } remove(...n) { this._each("unregister", n) } addControllers(...n) { this._each("register", n, this.controllers) } addElements(...n) { this._each("register", n, this.elements) } addPlugins(...n) { this._each("register", n, this.plugins) } addScales(...n) { this._each("register", n, this.scales) } getController(n) { return this._get(n, this.controllers, "controller") } getElement(n) { return this._get(n, this.elements, "element") } getPlugin(n) { return this._get(n, this.plugins, "plugin") } getScale(n) { return this._get(n, this.scales, "scale") } removeControllers(...n) { this._each("unregister", n, this.controllers) } removeElements(...n) { this._each("unregister", n, this.elements) } removePlugins(...n) { this._each("unregister", n, this.plugins) } removeScales(...n) { this._each("unregister", n, this.scales) } _each(n, t, i) { [...t].forEach(t => { const r = i || this._getRegistryForType(t); i || r.isForType(t) || r === this.plugins && t.id ? this._exec(n, r, t) : u(t, t => { const r = i || this._getRegistryForType(t); this._exec(n, r, t) }) }) } _exec(n, t, i) { const r = vu(n); o(i["before" + r], [], i); t[n](i); o(i["after" + r], [], i) } _getRegistryForType(n) { for (let t = 0; t < this._typedRegistries.length; t++) { const i = this._typedRegistries[t]; if (i.isForType(n)) return i } return this.plugins } _get(n, t, i) { const r = t.get(n); if (void 0 === r) throw new Error('"' + n + '" is not a registered ' + i + "."); return r } }); class sb { constructor() { this._init = [] } notify(n, t, i, r) { "beforeInit" === t && (this._init = this._createDescriptors(n, !0), this._notify(this._init, n, "install")); const u = r ? this._descriptors(n).filter(r) : this._descriptors(n), f = this._notify(u, n, t, i); return "afterDestroy" === t && (this._notify(u, n, "stop"), this._notify(this._init, n, "uninstall")), f } _notify(n, t, i, r) { r = r || {}; for (const u of n) { const n = u.plugin; if (!1 === o(n[i], [t, r, u.options], n) && r.cancelable) return !1 } return !0 } invalidate() { r(this._cache) || (this._oldCache = this._cache, this._cache = void 0) } _descriptors(n) { if (this._cache) return this._cache; const t = this._cache = this._createDescriptors(n); return this._notifyStateChanges(n), t } _createDescriptors(t, i) { const r = t && t.config, u = n(r.options && r.options.plugins, {}), f = function (n) { const t = [], i = Object.keys(ot.plugins.items); for (let n = 0; n < i.length; n++)t.push(ot.getPlugin(i[n])); const r = n.plugins || []; for (let n = 0; n < r.length; n++) { const i = r[n]; -1 === t.indexOf(i) && t.push(i) } return t }(r); return !1 !== u || i ? function (n, t, i, r) { const u = [], f = n.getContext(); for (let e = 0; e < t.length; e++) { const o = t[e], s = hb(i[o.id], r); null !== s && u.push({ plugin: o, options: cb(n.config, o, s, f) }) } return u }(t, f, u, i) : [] } _notifyStateChanges(n) { const t = this._oldCache || [], i = this._cache, r = (n, t) => n.filter(n => !t.some(t => n.plugin.id === t.plugin.id)); this._notify(r(t, i), n, "stop"); this._notify(r(i, t), n, "start") } } const hv = new Map, cv = new Set; const ru = (n, t, i) => { const r = vt(t, i); void 0 !== r && n.add(r) }; class lb { constructor(n) { this._config = function (n) { return (n = n || {}).data = sv(n.data), ov(n), n }(n); this._scopeCache = new Map; this._resolverCache = new Map } get platform() { return this._config.platform } get type() { return this._config.type } set type(n) { this._config.type = n } get data() { return this._config.data } set data(n) { this._config.data = sv(n) } get options() { return this._config.options } set options(n) { this._config.options = n } get plugins() { return this._config.plugins } update() { const n = this._config; this.clearCache(); ov(n) } clearCache() { this._scopeCache.clear(); this._resolverCache.clear() } datasetScopeKeys(n) { return hf(n, () => [[`datasets.${n}`, ""]]) } datasetAnimationScopeKeys(n, t) { return hf(`${n}.transition.${t}`, () => [[`datasets.${n}.transitions.${t}`, `transitions.${t}`], [`datasets.${n}`, ""]]) } datasetElementScopeKeys(n, t) { return hf(`${n}-${t}`, () => [[`datasets.${n}.elements.${t}`, `datasets.${n}`, `elements.${t}`, ""]]) } pluginScopeKeys(n) { const t = n.id; return hf(`${this.type}-plugin-${t}`, () => [[`plugins.${t}`, ...n.additionalOptionScopes || []]]) } _cachedScopes(n, t) { const r = this._scopeCache; let i = r.get(n); return i && !t || (i = new Map, r.set(n, i)), i } getOptionScopes(n, t, r) { const { options: s, type: h } = this, e = this._cachedScopes(n, r), o = e.get(t); if (o) return o; const u = new Set; t.forEach(t => { n && (u.add(n), t.forEach(t => ru(u, n, t))), t.forEach(n => ru(u, s, n)), t.forEach(n => ru(u, ei[h] || {}, n)), t.forEach(n => ru(u, i, n)), t.forEach(n => ru(u, be, n)) }); const f = Array.from(u); return 0 === f.length && f.push(Object.create(null)), cv.has(t) && e.set(t, f), f } chartOptionScopes() { const { options: t, type: n } = this; return [t, ei[n] || {}, i.datasets[n] || {}, { type: n }, i, be] } resolveNamedOptions(n, t, i, r = [""]) { const u = { $shared: !0 }, { resolver: f, subPrefixes: s } = lv(this._resolverCache, n, r); let o = f; (function (n, t) { const { isScriptable: i, isIndexable: r } = co(n); for (const u of t) { const f = i(u), o = r(u), t = (o || f) && n[u]; if (f && (yt(t) || ab(t)) || o && e(t)) return !0 } return !1 })(f, t) && (u.$shared = !1, o = si(f, i = yt(i) ? i() : i, this.createResolver(n, i, s))); for (const n of t) u[n] = o[n]; return u } createResolver(n, i, r = [""], u) { const { resolver: f } = lv(this._resolverCache, n, r); return t(i) ? si(f, i, void 0, u) : f } } const ab = n => t(n) && Object.getOwnPropertyNames(n).reduce((t, i) => t || yt(n[i]), !1), vb = ["top", "bottom", "left", "right", "chartArea"]; const cf = {}, wv = n => { const t = pv(n); return Object.values(cf).filter(n => n.canvas === t).pop() }; class l { constructor(n, t) { const r = this.config = new lb(t), f = pv(n), o = wv(f); if (o) throw new Error("Canvas is already in use. Chart with ID '" + o.id + "' must be destroyed before the canvas can be reused."); const e = r.createResolver(r.chartOptionScopes(), this.getContext()); this.platform = new (r.platform || ya(f)); this.platform.updateConfig(r); const u = this.platform.acquireContext(f, e.aspectRatio), i = u && u.canvas, s = i && i.height, h = i && i.width; this.id = dh(); this.ctx = u; this.canvas = i; this.width = h; this.height = s; this._options = e; this._aspectRatio = this.aspectRatio; this._layers = []; this._metasets = []; this._stacks = void 0; this.boxes = []; this.currentDevicePixelRatio = void 0; this.chartArea = void 0; this._active = []; this._lastEvent = void 0; this._listeners = {}; this._responsiveListeners = void 0; this._sortedMetasets = []; this.scales = {}; this._plugins = new sb; this.$proxies = {}; this._hiddenIndices = {}; this.attached = !1; this._animationsDisabled = void 0; this.$context = void 0; this._doResize = hh(n => this.update(n), e.resizeDelay || 0); this._dataChanges = []; cf[this.id] = this; u && i ? (ut.listen(this, "complete", yv), ut.listen(this, "progress", yb), this._initialize(), this.attached && this.update()) : console.error("Failed to create chart: can't acquire context from the given item") } get aspectRatio() { const { options: { aspectRatio: n, maintainAspectRatio: u }, width: f, height: t, _aspectRatio: i } = this; return r(n) ? u && i ? i : t ? f / t : null : n } get data() { return this.config.data } set data(n) { this.config.data = n } get options() { return this._options } set options(n) { this.config.options = n } _initialize() { return this.notifyPlugins("beforeInit"), this.options.responsive ? this.resize() : oo(this, this.options.devicePixelRatio), this.bindEvents(), this.notifyPlugins("afterInit"), this } clear() { return ho(this.canvas, this.ctx), this } stop() { return ut.stop(this), this } resize(n, t) { ut.running(this) ? this._resizeBeforeDraw = { width: n, height: t } : this._resize(n, t) } _resize(n, t) { const r = this.options, u = this.canvas, f = r.maintainAspectRatio && this.aspectRatio, i = this.platform.getMaximumSize(u, n, t, f), e = r.devicePixelRatio || this.platform.getDevicePixelRatio(), s = this.width ? "resize" : "attach"; this.width = i.width; this.height = i.height; this._aspectRatio = this.aspectRatio; oo(this, e, !0) && (this.notifyPlugins("resize", { size: i }), o(r.onResize, [this, i], this), this.attached && this._doResize(s) && this.render()) } ensureScalesHaveIDs() { u(this.options.scales || {}, (n, t) => { n.id = t }) } buildOrUpdateScales() { const f = this.options, i = f.scales, t = this.scales, e = Object.keys(t).reduce((n, t) => (n[t] = !1, n), {}); let r = []; i && (r = r.concat(Object.keys(i).map(n => { const t = i[n], r = hs(n, t), u = "r" === r, f = "x" === r; return { options: t, dposition: u ? "chartArea" : f ? "bottom" : "left", dtype: u ? "radialLinear" : f ? "category" : "linear" } }))); u(r, i => { const r = i.options, u = r.id, h = hs(u, r), s = n(r.type, i.dtype); void 0 !== r.position && av(r.position, h) === av(i.dposition) || (r.position = i.dposition); e[u] = !0; let o = null; u in t && t[u].type === s ? o = t[u] : (o = new (ot.getScale(s))({ id: u, type: s, ctx: this.ctx, chart: this }), t[o.id] = o); o.init(r, f) }); u(e, (n, i) => { n || delete t[i] }); u(t, n => { y.configure(this, n, n.options), y.addBox(this, n) }) } _updateMetasets() { const n = this._metasets, t = this.data.datasets.length, i = n.length; if (n.sort((n, t) => n.index - t.index), i > t) { for (let n = t; n < i; ++n)this._destroyDatasetMeta(n); n.splice(t, i - t) } this._sortedMetasets = n.slice(0).sort(vv("order", "index")) } _removeUnreferencedMetasets() { const { _metasets: n, data: { datasets: t } } = this; n.length > t.length && delete this._stacks; n.forEach((n, i) => { 0 === t.filter(t => t === n._dataset).length && this._destroyDatasetMeta(i) }) } buildOrUpdateControllers() { const t = [], r = this.data.datasets; let n, u; for (this._removeUnreferencedMetasets(), n = 0, u = r.length; n < u; n++) { const e = r[n]; let u = this.getDatasetMeta(n); const f = e.type || this.config.type; if (u.type && u.type !== f && (this._destroyDatasetMeta(n), u = this.getDatasetMeta(n)), u.type = f, u.indexAxis = e.indexAxis || ss(f, this.options), u.order = e.order || 0, u.index = n, u.label = "" + e.label, u.visible = this.isDatasetVisible(n), u.controller) u.controller.updateIndex(n), u.controller.linkScales(); else { const r = ot.getController(f), { datasetElementType: e, dataElementType: o } = i.datasets[f]; Object.assign(r.prototype, { dataElementType: ot.getElement(o), datasetElementType: e && ot.getElement(e) }); u.controller = new r(this, n); t.push(u.controller) } } return this._updateMetasets(), t } _resetElements() { u(this.data.datasets, (n, t) => { this.getDatasetMeta(t).controller.reset() }, this) } reset() { this._resetElements(); this.notifyPlugins("reset") } update(n) { const i = this.config; i.update(); const f = this._options = i.createResolver(i.chartOptionScopes(), this.getContext()), e = this._animationsDisabled = !f.animation; if (this._updateScales(), this._checkEventBindings(), this._updateHiddenIndices(), this._plugins.invalidate(), !1 !== this.notifyPlugins("beforeUpdate", { mode: n, cancelable: !0 })) { const o = this.buildOrUpdateControllers(); this.notifyPlugins("beforeElementsUpdate"); let t = 0; for (let n = 0, i = this.data.datasets.length; n < i; n++) { const { controller: i } = this.getDatasetMeta(n), r = !e && -1 === o.indexOf(i); i.buildOrUpdateElements(r); t = Math.max(+i.getMaxOverflow(), t) } t = this._minPadding = f.layout.autoPadding ? t : 0; this._updateLayout(t); e || u(o, n => { n.reset() }); this._updateDatasets(n); this.notifyPlugins("afterUpdate", { mode: n }); this._layers.sort(vv("z", "_idx")); const { _active: r, _lastEvent: s } = this; s ? this._eventHandler(s, !0) : r.length && this._updateHoverStyles(r, r, !0); this.render() } } _updateScales() { u(this.scales, n => { y.removeBox(this, n) }); this.ensureScalesHaveIDs(); this.buildOrUpdateScales() } _checkEventBindings() { const n = this.options, t = new Set(Object.keys(this._listeners)), i = new Set(n.events); we(t, i) && !!this._responsiveListeners === n.responsive || (this.unbindEvents(), this.bindEvents()) } _updateHiddenIndices() { const { _hiddenIndices: n } = this, t = this._getUniformDataChanges() || []; for (const { method: r, start: u, count: i } of t) pb(n, u, "_removeElements" === r ? -i : i) } _getUniformDataChanges() { const n = this._dataChanges; if (n && n.length) { this._dataChanges = []; const r = this.data.datasets.length, t = t => new Set(n.filter(n => n[0] === t).map((n, t) => t + "," + n.splice(1).join(","))), i = t(0); for (let n = 1; n < r; n++)if (!we(i, t(n))) return; return Array.from(i).map(n => n.split(",")).map(n => ({ method: n[1], start: +n[2], count: +n[3] })) } } _updateLayout(n) { if (!1 !== this.notifyPlugins("beforeLayout", { cancelable: !0 })) { y.update(this, this.width, this.height, n); const t = this.chartArea, i = t.width <= 0 || t.height <= 0; this._layers = []; u(this.boxes, n => { i && "chartArea" === n.position || (n.configure && n.configure(), this._layers.push(...n._layers())) }, this); this._layers.forEach((n, t) => { n._idx = t }); this.notifyPlugins("afterLayout") } } _updateDatasets(n) { if (!1 !== this.notifyPlugins("beforeDatasetsUpdate", { mode: n, cancelable: !0 })) { for (let n = 0, t = this.data.datasets.length; n < t; ++n)this.getDatasetMeta(n).controller.configure(); for (let t = 0, i = this.data.datasets.length; t < i; ++t)this._updateDataset(t, yt(n) ? n({ datasetIndex: t }) : n); this.notifyPlugins("afterDatasetsUpdate", { mode: n }) } } _updateDataset(n, t) { const r = this.getDatasetMeta(n), i = { meta: r, index: n, mode: t, cancelable: !0 }; !1 !== this.notifyPlugins("beforeDatasetUpdate", i) && (r.controller._update(t), i.cancelable = !1, this.notifyPlugins("afterDatasetUpdate", i)) } render() { !1 !== this.notifyPlugins("beforeRender", { cancelable: !0 }) && (ut.has(this) ? this.attached && !ut.running(this) && ut.start(this) : (this.draw(), yv({ chart: this }))) } draw() { let n; if (this._resizeBeforeDraw) { const { width: n, height: t } = this._resizeBeforeDraw; this._resize(n, t); this._resizeBeforeDraw = null } if ((this.clear(), !(this.width <= 0) && !(this.height <= 0)) && !1 !== this.notifyPlugins("beforeDraw", { cancelable: !0 })) { const t = this._layers; for (n = 0; n < t.length && t[n].z <= 0; ++n)t[n].draw(this.chartArea); for (this._drawDatasets(); n < t.length; ++n)t[n].draw(this.chartArea); this.notifyPlugins("afterDraw") } } _getSortedDatasetMetas(n) { const i = this._sortedMetasets, r = []; let t, u; for (t = 0, u = i.length; t < u; ++t) { const u = i[t]; n && !u.visible || r.push(u) } return r } getSortedVisibleDatasetMetas() { return this._getSortedDatasetMetas(!0) } _drawDatasets() { if (!1 !== this.notifyPlugins("beforeDatasetsDraw", { cancelable: !0 })) { const n = this.getSortedVisibleDatasetMetas(); for (let t = n.length - 1; t >= 0; --t)this._drawDataset(n[t]); this.notifyPlugins("afterDatasetsDraw") } } _drawDataset(n) { const u = this.ctx, t = n._clip, f = !t.disabled, i = this.chartArea, r = { meta: n, index: n.index, cancelable: !0 }; !1 !== this.notifyPlugins("beforeDatasetDraw", r) && (f && pr(u, { left: !1 === t.left ? 0 : i.left - t.left, right: !1 === t.right ? this.width : i.right + t.right, top: !1 === t.top ? 0 : i.top - t.top, bottom: !1 === t.bottom ? this.height : i.bottom + t.bottom }), n.controller.draw(), f && wr(u), r.cancelable = !1, this.notifyPlugins("afterDatasetDraw", r)) } isPointInArea(n) { return di(n, this.chartArea, this._minPadding) } getElementsAtEventForMode(n, t, i, r) { const u = ts.modes[t]; return "function" == typeof u ? u(this, n, i, r) : [] } getDatasetMeta(n) { const t = this.data.datasets[n], r = this._metasets; let i = r.filter(n => n && n._dataset === t).pop(); return i || (i = { type: null, data: [], dataset: null, controller: null, hidden: null, xAxisID: null, yAxisID: null, order: t && t.order || 0, index: n, _dataset: t, _parsed: [], _sorted: !1 }, r.push(i)), i } getContext() { return this.$context || (this.$context = pt(null, { chart: this, type: "chart" })) } getVisibleDatasetCount() { return this.getSortedVisibleDatasetMetas().length } isDatasetVisible(n) { const t = this.data.datasets[n]; if (!t) return !1; const i = this.getDatasetMeta(n); return "boolean" == typeof i.hidden ? !i.hidden : !t.hidden } setDatasetVisibility(n, t) { this.getDatasetMeta(n).hidden = !t } toggleDataVisibility(n) { this._hiddenIndices[n] = !this._hiddenIndices[n] } getDataVisibility(n) { return !this._hiddenIndices[n] } _updateVisibility(n, t, i) { const u = i ? "show" : "hide", r = this.getDatasetMeta(n), f = r.controller._resolveAnimations(void 0, u); g(t) ? (r.data[t].hidden = !i, this.update()) : (this.setDatasetVisibility(n, i), f.update(r, { visible: i }), this.update(t => t.datasetIndex === n ? u : void 0)) } hide(n, t) { this._updateVisibility(n, t, !1) } show(n, t) { this._updateVisibility(n, t, !0) } _destroyDatasetMeta(n) { const t = this._metasets[n]; t && t.controller && t.controller._destroy(); delete this._metasets[n] } _stop() { let n, t; for (this.stop(), ut.remove(this), n = 0, t = this.data.datasets.length; n < t; ++n)this._destroyDatasetMeta(n) } destroy() { this.notifyPlugins("beforeDestroy"); const { canvas: n, ctx: t } = this; this._stop(); this.config.clearCache(); n && (this.unbindEvents(), ho(n, t), this.platform.releaseContext(t), this.canvas = null, this.ctx = null); this.notifyPlugins("destroy"); delete cf[this.id]; this.notifyPlugins("afterDestroy") } toBase64Image(...n) { return this.canvas.toDataURL(...n) } bindEvents() { this.bindUserEvents(); this.options.responsive ? this.bindResponsiveEvents() : this.attached = !0 } bindUserEvents() { const n = this._listeners, t = this.platform, i = (i, r) => { t.addEventListener(this, i, r), n[i] = r }, r = (n, t, i) => { n.offsetX = t, n.offsetY = i, this._eventHandler(n) }; u(this.options.events, n => i(n, r)) } bindResponsiveEvents() { this._responsiveListeners || (this._responsiveListeners = {}); const n = this._responsiveListeners, t = this.platform, i = (i, r) => { t.addEventListener(this, i, r), n[i] = r }, f = (i, r) => { n[i] && (t.removeEventListener(this, i, r), delete n[i]) }, e = (n, t) => { this.canvas && this.resize(n, t) }; let r; const u = () => { f("attach", u), this.attached = !0, this.resize(), i("resize", e), i("detach", r) }; r = () => { this.attached = !1, f("resize", e), this._stop(), this._resize(0, 0), i("attach", u) }; t.isAttached(this.canvas) ? u() : r() } unbindEvents() { u(this._listeners, (n, t) => { this.platform.removeEventListener(this, t, n) }); this._listeners = {}; u(this._responsiveListeners, (n, t) => { this.platform.removeEventListener(this, t, n) }); this._responsiveListeners = void 0 } updateHoverStyle(n, t, i) { const f = i ? "set" : "remove"; let e, r, u, o; for ("dataset" === t && (e = this.getDatasetMeta(n[0].datasetIndex), e.controller["_" + f + "DatasetHoverStyle"]()), u = 0, o = n.length; u < o; ++u) { r = n[u]; const t = r && this.getDatasetMeta(r.datasetIndex).controller; t && t[f + "HoverStyle"](r.element, r.datasetIndex, r.index) } } getActiveElements() { return this._active || [] } setActiveElements(n) { const i = this._active || [], t = n.map(({ datasetIndex: t, index: n }) => { const i = this.getDatasetMeta(t); if (!i) throw new Error("No dataset found at index " + t); return { datasetIndex: t, element: i.data[n], index: n } }); hr(t, i) || (this._active = t, this._lastEvent = null, this._updateHoverStyles(t, i)) } notifyPlugins(n, t, i) { return this._plugins.notify(this, n, t, i) } _updateHoverStyles(n, t, i) { const r = this.options.hover, u = (n, t) => n.filter(n => !t.some(t => n.datasetIndex === t.datasetIndex && n.index === t.index)), f = u(t, n), e = i ? n : u(n, t); f.length && this.updateHoverStyle(f, r.mode, !1); e.length && r.mode && this.updateHoverStyle(e, r.mode, !0) } _eventHandler(n, t) { const i = { event: n, replay: t, cancelable: !0, inChartArea: this.isPointInArea(n) }, r = t => (t.options.events || this.options.events).includes(n.native.type); if (!1 !== this.notifyPlugins("beforeEvent", i, r)) { const u = this._handleEvent(n, t, i.inChartArea); return i.cancelable = !1, this.notifyPlugins("afterEvent", i, r), (u || i.changed) && this.render(), this } } _handleEvent(n, t, i) { const { _active: u = [], options: f } = this, h = t, r = this._getActiveElements(n, u, i, h), e = uc(n), c = function (n, t, i, r) { return i && "mouseout" !== n.type ? r ? t : n : null }(n, this._lastEvent, i, e); i && (this._lastEvent = null, o(f.onHover, [n, r, this], this), e && o(f.onClick, [n, r, this], this)); const s = !hr(r, u); return (s || t) && (this._active = r, this._updateHoverStyles(r, u, t)), this._lastEvent = c, s } _getActiveElements(n, t, i, r) { if ("mouseout" === n.type) return []; if (!i) return t; const u = this.options.hover; return this.getElementsAtEventForMode(n, u.mode, u, r) } } const bv = () => u(l.instances, n => n._plugins.invalidate()), ri = !0; Object.defineProperties(l, { defaults: { enumerable: ri, value: i }, instances: { enumerable: ri, value: cf }, overrides: { enumerable: ri, value: ei }, registry: { enumerable: ri, value: ot }, version: { enumerable: ri, value: "3.8.0" }, getChart: { enumerable: ri, value: wv }, register: { enumerable: ri, value: (...n) => { ot.add(...n), bv() } }, unregister: { enumerable: ri, value: (...n) => { ot.remove(...n), bv() } } }); class cs { constructor(n) { this.options = n || {} } formats() { return li() } parse() { return li() } format() { return li() } add() { return li() } diff() { return li() } startOf() { return li() } endOf() { return li() } } cs.override = function (n) { Object.assign(cs.prototype, n) }; ls = { _date: cs }; class lf extends et { parsePrimitiveData(n, t, i, r) { return dv(n, t, i, r) } parseArrayData(n, t, i, r) { return dv(n, t, i, r) } parseObjectData(n, t, i, r) { const { iScale: f, vScale: s } = n, { xAxisKey: h = "x", yAxisKey: c = "y" } = this._parsing, v = "x" === f.axis ? h : c, y = "x" === s.axis ? h : c, l = []; let u, a, e, o; for (u = i, a = i + r; u < a; ++u)o = t[u], e = {}, e[f.axis] = f.parse(vt(o, v), u), l.push(kv(vt(o, y), e, s, u)); return l } updateRangeFromParsed(n, t, i, r) { super.updateRangeFromParsed(n, t, i, r); const u = i._custom; u && t === this._cachedMeta.vScale && (n.min = Math.min(n.min, u.min), n.max = Math.max(n.max, u.max)) } getMaxOverflow() { return 0 } getLabelAndValue(n) { const f = this._cachedMeta, { iScale: r, vScale: u } = f, t = this.getParsed(n), i = t._custom, e = as(i) ? "[" + i.start + ", " + i.end + "]" : "" + u.getLabelForValue(t[u.axis]); return { label: "" + r.getLabelForValue(t[r.axis]), value: e } } initialize() { this.enableOptionSharing = !0; super.initialize(); this._cachedMeta.stack = this.getDataset().stack } update(n) { const t = this._cachedMeta; this.updateElements(t.data, 0, t.data.length, n) } updateElements(n, t, i, u) { const a = "reset" === u, { index: o, _cachedMeta: { vScale: e } } = this, h = e.getBasePixel(), f = e.isHorizontal(), c = this._getRuler(), l = this.resolveDataElementOptions(t, u), s = this.getSharedOptions(l), v = this.includeOptions(u, s); this.updateSharedOptions(s, u, l); for (let l = t; l < t + i; l++) { const w = this.getParsed(l), t = a || r(w[e.axis]) ? { base: h, head: h } : this._calculateBarValuePixels(l), y = this._calculateBarIndexPixels(l, c), p = (w._stacks || {})[e.axis], i = { horizontal: f, base: t.base, enableBorderRadius: !p || as(w._custom) || o === p._top || o === p._bottom, x: f ? t.head : y.center, y: f ? y.center : t.head, height: f ? y.size : Math.abs(t.size), width: f ? Math.abs(t.size) : y.size }; v && (i.options = s || this.resolveDataElementOptions(l, n[l].active ? "active" : u)); const b = i.options || n[l].options; bb(i, b, p, o); kb(i, b, c.ratio); this.updateElement(n[l], l, i, u) } } _getStacks(n, t) { const e = this._cachedMeta.iScale, o = e.getMatchingVisibleMetas(this._type), s = e.options.stacked, h = o.length, u = []; let f, i; for (f = 0; f < h; ++f)if (i = o[f], i.controller.options.grouped) { if (void 0 !== t) { const n = i.controller.getParsed(t)[i.controller._cachedMeta.vScale.axis]; if (r(n) || isNaN(n)) continue } if ((!1 === s || -1 === u.indexOf(i.stack) || void 0 === s && void 0 === i.stack) && u.push(i.stack), i.index === n) break } return u.length || u.push(void 0), u } _getStackCount(n) { return this._getStacks(void 0, n).length } _getStackIndex(n, t, i) { const r = this._getStacks(n, i), u = void 0 !== t ? r.indexOf(t) : -1; return -1 === u ? r.length - 1 : u } _getRuler() { const i = this.options, r = this._cachedMeta, n = r.iScale, u = []; let t, f; for (t = 0, f = r.data.length; t < f; ++t)u.push(n.getPixelForValue(this.getParsed(t)[n.axis], t)); const e = i.barThickness; return { min: e || wb(r), pixels: u, start: n._startPixel, end: n._endPixel, stackCount: this._getStackCount(), scale: n, grouped: i.grouped, ratio: e ? 1 : i.categoryPercentage * i.barPercentage } } _calculateBarValuePixels(n) { const { _cachedMeta: { vScale: i, _stacked: v }, options: { base: l, minBarLength: y } } = this, c = l || 0, a = this.getParsed(n), e = a._custom, p = as(e); let o, t, u = a[i.axis], s = 0, h = v ? this.applyStack(i, a, v) : u; h !== u && (s = h - u, h = u); p && (u = e.barStart, h = e.barEnd - e.barStart, 0 !== u && ft(u) !== ft(e.barEnd) && (s = 0), s += u); const w = r(l) || p ? s : l; let f = i.getPixelForValue(w); if (o = this.chart.getDataVisibility(n) ? i.getPixelForValue(s + h) : f, t = o - f, Math.abs(t) < y) { t = function (n, t, i) { return 0 !== n ? ft(n) : (t.isHorizontal() ? 1 : -1) * (t.min >= i ? 1 : -1) }(t, i, c) * y; u === c && (f -= t / 2); const n = i.getPixelForDecimal(0), r = i.getPixelForDecimal(1), e = Math.min(n, r), s = Math.max(n, r); f = Math.max(Math.min(f, s), e); o = f + t } if (f === i.getPixelForValue(c)) { const n = ft(t) * i.getLineWidthForValue(c) / 2; f += n; t -= n } return { size: t, base: f, head: o, center: o + t / 2 } } _calculateBarIndexPixels(t, i) { const o = i.scale, u = this.options, s = u.skipNull, h = n(u.maxBarThickness, 1 / 0); let f, e; if (i.grouped) { const o = s ? this._getStackCount(t) : i.stackCount, n = "flex" === u.barThickness ? function (n, t, i, r) { const o = t.pixels, u = o[n]; let e = n > 0 ? o[n - 1] : null, f = n < o.length - 1 ? o[n + 1] : null; const s = i.categoryPercentage; null === e && (e = u - (null === f ? t.end - t.start : f - u)); null === f && (f = u + u - e); const h = u - (u - Math.min(e, f)) / 2 * s; return { chunk: Math.abs(f - e) / 2 * s / r, ratio: i.barPercentage, start: h } }(t, i, u, o) : function (n, t, i, u) { const o = i.barThickness; let f, e; return r(o) ? (f = t.min * i.categoryPercentage, e = i.barPercentage) : (f = o * u, e = 1), { chunk: f / u, ratio: e, start: t.pixels[n] - f / 2 } }(t, i, u, o), c = this._getStackIndex(this.index, this._cachedMeta.stack, s ? t : void 0); f = n.start + n.chunk * c + n.chunk / 2; e = Math.min(h, n.chunk * n.ratio) } else f = o.getPixelForValue(this.getParsed(t)[o.axis], t), e = Math.min(h, i.min * i.ratio); return { base: f - e / 2, head: f + e / 2, center: f, size: e } } draw() { const t = this._cachedMeta, r = t.vScale, i = t.data, u = i.length; let n = 0; for (; n < u; ++n)null !== this.getParsed(n)[r.axis] && i[n].draw(this._ctx) } } lf.id = "bar"; lf.defaults = { datasetElementType: !1, dataElementType: "bar", categoryPercentage: .8, barPercentage: .9, grouped: !0, animations: { numbers: { type: "number", properties: ["x", "y", "base", "width", "height"] } } }; lf.overrides = { scales: { _index_: { type: "category", offset: !0, grid: { offset: !0 } }, _value_: { type: "linear", beginAtZero: !0 } } }; class af extends et { initialize() { this.enableOptionSharing = !0; super.initialize() } parsePrimitiveData(n, t, i, r) { const u = super.parsePrimitiveData(n, t, i, r); for (let n = 0; n < u.length; n++)u[n]._custom = this.resolveDataElementOptions(n + i).radius; return u } parseArrayData(t, i, r, u) { const f = super.parseArrayData(t, i, r, u); for (let t = 0; t < f.length; t++) { const u = i[r + t]; f[t]._custom = n(u[2], this.resolveDataElementOptions(t + r).radius) } return f } parseObjectData(t, i, r, u) { const f = super.parseObjectData(t, i, r, u); for (let t = 0; t < f.length; t++) { const u = i[r + t]; f[t]._custom = n(u && u.r && +u.r, this.resolveDataElementOptions(t + r).radius) } return f } getMaxOverflow() { const t = this._cachedMeta.data; let n = 0; for (let i = t.length - 1; i >= 0; --i)n = Math.max(n, t[i].size(this.resolveDataElementOptions(i)) / 2); return n > 0 && n } getLabelAndValue(n) { const i = this._cachedMeta, { xScale: u, yScale: f } = i, t = this.getParsed(n), e = u.getLabelForValue(t.x), o = f.getLabelForValue(t.y), r = t._custom; return { label: i.label, value: "(" + e + ", " + o + (r ? ", " + r : "") + ")" } } update(n) { const t = this._cachedMeta.data; this.updateElements(t, 0, t.length, n) } updateElements(n, t, i, r) { const u = "reset" === r, { iScale: f, vScale: e } = this._cachedMeta, o = this.resolveDataElementOptions(t, r), s = this.getSharedOptions(o), l = this.includeOptions(r, s), h = f.axis, c = e.axis; for (let o = t; o < t + i; o++) { const i = n[o], s = !u && this.getParsed(o), t = {}, a = t[h] = u ? f.getPixelForDecimal(.5) : f.getPixelForValue(s[h]), v = t[c] = u ? e.getBasePixel() : e.getPixelForValue(s[c]); t.skip = isNaN(a) || isNaN(v); l && (t.options = this.resolveDataElementOptions(o, i.active ? "active" : r), u && (t.options.radius = 0)); this.updateElement(i, o, t, r) } this.updateSharedOptions(s, r, o) } resolveDataElementOptions(t, i) { const u = this.getParsed(t); let r = super.resolveDataElementOptions(t, i); r.$shared && (r = Object.assign({}, r, { $shared: !1 })); const f = r.radius; return "active" !== i && (r.radius = 0), r.radius += n(u && u._custom, f), r } } af.id = "bubble"; af.defaults = { datasetElementType: !1, dataElementType: "point", animations: { numbers: { type: "number", properties: ["x", "y", "borderWidth", "radius"] } } }; af.overrides = { scales: { x: { type: "linear" }, y: { type: "linear" } }, plugins: { tooltip: { callbacks: { title: () => "" } } } }; class fr extends et { constructor(n, t) { super(n, t); this.enableOptionSharing = !0; this.innerRadius = void 0; this.outerRadius = void 0; this.offsetX = void 0; this.offsetY = void 0 } linkScales() { } parse(n, i) { const r = this.getDataset().data, u = this._cachedMeta; if (!1 === this._parsing) u._parsed = r; else { let f, e, o = n => +r[n]; if (t(r[n])) { const { key: n = "value" } = this._parsing; o = t => +vt(r[t], n) } for (f = n, e = n + i; f < e; ++f)u._parsed[f] = o(f) } } _getRotation() { return it(this.options.rotation - 90) } _getCircumference() { return it(this.options.circumference) } _getRotationExtents() { let n = f, t = -f; for (let i = 0; i < this.chart.data.datasets.length; ++i)if (this.chart.isDatasetVisible(i)) { const r = this.chart.getDatasetMeta(i).controller, u = r._getRotation(), f = r._getCircumference(); n = Math.min(n, u); t = Math.max(t, u + f) } return { rotation: n, circumference: t - n } } update(n) { const l = this.chart, { chartArea: i } = l, e = this._cachedMeta, r = e.data, u = this.getMaxBorderWidth() + this.getMaxOffset(r) + this.options.spacing, a = Math.max((Math.min(i.width, i.height) - u) / 2, 0), o = Math.min(gh(this.options.cutout, a), 1), v = this._getRingWeight(this.index), { circumference: y, rotation: p } = this._getRotationExtents(), { ratioX: w, ratioY: b, offsetX: k, offsetY: d } = function (n, t, i) { let r = 1, u = 1, e = 0, o = 0; if (t < f) { const f = n, c = f + t, l = Math.cos(f), a = Math.sin(f), v = Math.cos(c), y = Math.sin(c), p = (n, t, r) => ki(n, f, c, !0) ? 1 : Math.max(t, t * i, r, r * i), w = (n, t, r) => ki(n, f, c, !0) ? -1 : Math.min(t, t * i, r, r * i), b = p(0, l, v), k = p(h, a, y), d = w(s, l, v), g = w(s + h, a, y); r = (b - d) / 2; u = (k - g) / 2; e = -(b + d) / 2; o = -(k + g) / 2 } return { ratioX: r, ratioY: u, offsetX: e, offsetY: o } }(p, y, o), g = (i.width - u) / w, nt = (i.height - u) / b, tt = Math.max(Math.min(g, nt) / 2, 0), t = pe(this.options.radius, tt), c = (t - Math.max(t * o, 0)) / this._getVisibleDatasetWeightTotal(); this.offsetX = k * t; this.offsetY = d * t; e.total = this.calculateTotal(); this.outerRadius = t - c * this._getRingWeightOffset(this.index); this.innerRadius = Math.max(this.outerRadius - c * v, 0); this.updateElements(r, 0, r.length, n) } _circumference(n, t) { const r = this.options, i = this._cachedMeta, u = this._getCircumference(); return t && r.animation.animateRotate || !this.chart.getDataVisibility(n) || null === i._parsed[n] || i.data[n].hidden ? 0 : this.calculateCircumference(i._parsed[n] * u / f) } updateElements(n, t, i, r) { const o = "reset" === r, h = this.chart, f = h.chartArea, a = h.options.animation, v = (f.left + f.right) / 2, y = (f.top + f.bottom) / 2, c = o && a.animateScale, p = c ? 0 : this.innerRadius, w = c ? 0 : this.outerRadius, l = this.resolveDataElementOptions(t, r), s = this.getSharedOptions(l), b = this.includeOptions(r, s); let u, e = this._getRotation(); for (u = 0; u < t; ++u)e += this._circumference(u, o); for (u = t; u < t + i; ++u) { const t = this._circumference(u, o), i = n[u], f = { x: v + this.offsetX, y: y + this.offsetY, startAngle: e, endAngle: e + t, circumference: t, outerRadius: w, innerRadius: p }; b && (f.options = s || this.resolveDataElementOptions(u, i.active ? "active" : r)); e += t; this.updateElement(i, u, f, r) } this.updateSharedOptions(s, r, l) } calculateTotal() { const t = this._cachedMeta, i = t.data; let n, r = 0; for (n = 0; n < i.length; n++) { const u = t._parsed[n]; null === u || isNaN(u) || !this.chart.getDataVisibility(n) || i[n].hidden || (r += Math.abs(u)) } return r } calculateCircumference(n) { const t = this._cachedMeta.total; return t > 0 && !isNaN(n) ? f * (Math.abs(n) / t) : 0 } getLabelAndValue(n) { const i = this._cachedMeta, t = this.chart, r = t.data.labels || [], u = ir(i._parsed[n], t.options.locale); return { label: r[n] || "", value: u } } getMaxBorderWidth(n) { let u = 0; const f = this.chart; let t, i, e, o, r; if (!n) for (t = 0, i = f.data.datasets.length; t < i; ++t)if (f.isDatasetVisible(t)) { e = f.getDatasetMeta(t); n = e.data; o = e.controller; break } if (!n) return 0; for (t = 0, i = n.length; t < i; ++t)r = o.resolveDataElementOptions(t), "inner" !== r.borderAlign && (u = Math.max(u, r.borderWidth || 0, r.hoverBorderWidth || 0)); return u } getMaxOffset(n) { let t = 0; for (let i = 0, r = n.length; i < r; ++i) { const n = this.resolveDataElementOptions(i); t = Math.max(t, n.offset || 0, n.hoverOffset || 0) } return t } _getRingWeightOffset(n) { let t = 0; for (let i = 0; i < n; ++i)this.chart.isDatasetVisible(i) && (t += this._getRingWeight(i)); return t } _getRingWeight(t) { return Math.max(n(this.chart.data.datasets[t].weight, 1), 0) } _getVisibleDatasetWeightTotal() { return this._getRingWeightOffset(this.chart.data.datasets.length) || 1 } } fr.id = "doughnut"; fr.defaults = { datasetElementType: !1, dataElementType: "arc", animation: { animateRotate: !0, animateScale: !1 }, animations: { numbers: { type: "number", properties: ["circumference", "endAngle", "innerRadius", "outerRadius", "startAngle", "x", "y", "offset", "borderWidth", "spacing"] } }, cutout: "50%", rotation: 0, circumference: 360, radius: "100%", spacing: 0, indexAxis: "r" }; fr.descriptors = { _scriptable: n => "spacing" !== n, _indexable: n => "spacing" !== n }; fr.overrides = { aspectRatio: 1, plugins: { legend: { labels: { generateLabels(n) { const t = n.data; if (t.labels.length && t.datasets.length) { const { labels: { pointStyle: i } } = n.legend.options; return t.labels.map((t, r) => { const u = n.getDatasetMeta(0).controller.getStyle(r); return { text: t, fillStyle: u.backgroundColor, strokeStyle: u.borderColor, lineWidth: u.borderWidth, pointStyle: i, hidden: !n.getDataVisibility(r), index: r } }) } return [] } }, onClick(n, t, i) { i.chart.toggleDataVisibility(t.index); i.chart.update() } }, tooltip: { callbacks: { title: () => "", label(n) { let t = n.label; const i = ": " + n.formattedValue; return e(t) ? (t = t.slice(), t[0] += i) : t += i, t } } } } }; class uu extends et { initialize() { this.enableOptionSharing = !0; this.supportsDecimation = !0; super.initialize() } update(n) { const r = this._cachedMeta, { dataset: t, data: i = [], _dataset: s } = r, o = this.chart._animationsDisabled; let { start: u, count: f } = function (n, t, i) { const r = t.length; let u = 0, f = r; if (n._sorted) { const { iScale: e, _parsed: o } = n, s = e.axis, { min: h, max: c, minDefined: l, maxDefined: a } = e.getUserBounds(); l && (u = v(Math.min(ht(o, e.axis, h).lo, i ? r : ht(t, s, e.getPixelForValue(h)).lo), 0, r - 1)); f = a ? v(Math.max(ht(o, e.axis, c).hi + 1, i ? 0 : ht(t, s, e.getPixelForValue(c)).hi + 1), u, r) - u : r - u } return { start: u, count: f } }(r, i, o); this._drawStart = u; this._drawCount = f, function (n) { const { xScale: i, yScale: r, _scaleRanges: t } = n, u = { xmin: i.min, xmax: i.max, ymin: r.min, ymax: r.max }; if (!t) return n._scaleRanges = u, !0; const f = t.xmin !== i.min || t.xmax !== i.max || t.ymin !== r.min || t.ymax !== r.max; return Object.assign(t, u), f }(r) && (u = 0, f = i.length); t._chart = this.chart; t._datasetIndex = this.index; t._decimated = !!s._decimated; t.points = i; const e = this.resolveDatasetElementOptions(n); this.options.showLine || (e.borderWidth = 0); e.segment = this.options.segment; this.updateElement(t, void 0, { animated: !o, options: e }, n); this.updateElements(i, u, f, n) } updateElements(n, t, i, u) { const h = "reset" === u, { iScale: c, vScale: f, _stacked: l, _dataset: w } = this._cachedMeta, a = this.resolveDataElementOptions(t, u), o = this.getSharedOptions(a), b = this.includeOptions(u, o), e = c.axis, s = f.axis, { spanGaps: v, segment: k } = this.options, d = wi(v) ? v : Number.POSITIVE_INFINITY, y = this.chart._animationsDisabled || h || "none" === u; let p = t > 0 && this.getParsed(t - 1); for (let a = t; a < t + i; ++a) { const v = n[a], i = this.getParsed(a), t = y ? v : {}, g = r(i[s]), nt = t[e] = c.getPixelForValue(i[e], a), tt = t[s] = h || g ? f.getBasePixel() : f.getPixelForValue(l ? this.applyStack(f, i, l) : i[s], a); t.skip = isNaN(nt) || isNaN(tt) || g; t.stop = a > 0 && Math.abs(i[e] - p[e]) > d; k && (t.parsed = i, t.raw = w.data[a]); b && (t.options = o || this.resolveDataElementOptions(a, v.active ? "active" : u)); y || this.updateElement(v, a, t, u); p = i } this.updateSharedOptions(o, u, a) } getMaxOverflow() { const t = this._cachedMeta, i = t.dataset, r = i.options && i.options.borderWidth || 0, n = t.data || []; if (!n.length) return r; const u = n[0].size(this.resolveDataElementOptions(0)), f = n[n.length - 1].size(this.resolveDataElementOptions(n.length - 1)); return Math.max(r, u, f) / 2 } draw() { const n = this._cachedMeta; n.dataset.updateControlPoints(this.chart.chartArea, n.iScale.axis); super.draw() } } uu.id = "line"; uu.defaults = { datasetElementType: "line", dataElementType: "point", showLine: !0, spanGaps: !1 }; uu.overrides = { scales: { _index_: { type: "category" }, _value_: { type: "linear" } } }; class vf extends et { constructor(n, t) { super(n, t); this.innerRadius = void 0; this.outerRadius = void 0 } getLabelAndValue(n) { const i = this._cachedMeta, t = this.chart, r = t.data.labels || [], u = ir(i._parsed[n].r, t.options.locale); return { label: r[n] || "", value: u } } parseObjectData(n, t, i, r) { return vo.bind(this)(n, t, i, r) } update(n) { const t = this._cachedMeta.data; this._updateRadius(); this.updateElements(t, 0, t.length, n) } getMinMax() { const t = this._cachedMeta, n = { min: Number.POSITIVE_INFINITY, max: Number.NEGATIVE_INFINITY }; return t.data.forEach((t, i) => { const r = this.getParsed(i).r; !isNaN(r) && this.chart.getDataVisibility(i) && (r < n.min && (n.min = r), r > n.max && (n.max = r)) }), n } _updateRadius() { const t = this.chart, n = t.chartArea, r = t.options, f = Math.min(n.right - n.left, n.bottom - n.top), i = Math.max(f / 2, 0), u = (i - Math.max(r.cutoutPercentage ? i / 100 * r.cutoutPercentage : 1, 0)) / t.getVisibleDatasetCount(); this.outerRadius = i - u * this.index; this.innerRadius = this.outerRadius - u } updateElements(n, t, i, r) { const a = "reset" === r, o = this.chart, h = o.options.animation, f = this._cachedMeta.rScale, v = f.xCenter, y = f.yCenter, c = f.getIndexAngle(0) - .5 * s; let u, e = c; const l = 360 / this.countVisibleElements(); for (u = 0; u < t; ++u)e += this._computeAngle(u, r, l); for (u = t; u < t + i; u++) { const i = n[u]; let s = e, t = e + this._computeAngle(u, r, l), p = o.getDataVisibility(u) ? f.getDistanceFromCenterForValue(this.getParsed(u).r) : 0; e = t; a && (h.animateScale && (p = 0), h.animateRotate && (s = t = c)); const w = { x: v, y: y, innerRadius: 0, outerRadius: p, startAngle: s, endAngle: t, options: this.resolveDataElementOptions(u, i.active ? "active" : r) }; this.updateElement(i, u, w, r) } } countVisibleElements() { const t = this._cachedMeta; let n = 0; return t.data.forEach((t, i) => { !isNaN(this.getParsed(i).r) && this.chart.getDataVisibility(i) && n++ }), n } _computeAngle(n, t, i) { return this.chart.getDataVisibility(n) ? it(this.resolveDataElementOptions(n, t).angle || i) : 0 } } vf.id = "polarArea"; vf.defaults = { dataElementType: "arc", animation: { animateRotate: !0, animateScale: !0 }, animations: { numbers: { type: "number", properties: ["x", "y", "startAngle", "endAngle", "innerRadius", "outerRadius"] } }, indexAxis: "r", startAngle: 0 }; vf.overrides = { aspectRatio: 1, plugins: { legend: { labels: { generateLabels(n) { const t = n.data; if (t.labels.length && t.datasets.length) { const { labels: { pointStyle: i } } = n.legend.options; return t.labels.map((t, r) => { const u = n.getDatasetMeta(0).controller.getStyle(r); return { text: t, fillStyle: u.backgroundColor, strokeStyle: u.borderColor, lineWidth: u.borderWidth, pointStyle: i, hidden: !n.getDataVisibility(r), index: r } }) } return [] } }, onClick(n, t, i) { i.chart.toggleDataVisibility(t.index); i.chart.update() } }, tooltip: { callbacks: { title: () => "", label: n => n.chart.data.labels[n.dataIndex] + ": " + n.formattedValue } } }, scales: { r: { type: "radialLinear", angleLines: { display: !1 }, beginAtZero: !0, grid: { circular: !0 }, pointLabels: { display: !1 }, startAngle: 0 } } }; class vs extends fr { } vs.id = "pie"; vs.defaults = { cutout: 0, rotation: 0, circumference: 360, radius: "100%" }; class yf extends et { getLabelAndValue(n) { const t = this._cachedMeta.vScale, i = this.getParsed(n); return { label: t.getLabels()[n], value: "" + t.getLabelForValue(i[t.axis]) } } parseObjectData(n, t, i, r) { return vo.bind(this)(n, t, i, r) } update(n) { const i = this._cachedMeta, r = i.dataset, t = i.data || [], u = i.iScale.getLabels(); if (r.points = t, "resize" !== n) { const i = this.resolveDatasetElementOptions(n); this.options.showLine || (i.borderWidth = 0); const f = { _loop: !0, _fullLoop: u.length === t.length, options: i }; this.updateElement(r, void 0, f, n) } this.updateElements(t, 0, t.length, n) } updateElements(n, t, i, r) { const u = this._cachedMeta.rScale, f = "reset" === r; for (let e = t; e < t + i; e++) { const i = n[e], h = this.resolveDataElementOptions(e, i.active ? "active" : r), t = u.getPointPositionForValue(e, this.getParsed(e).r), o = f ? u.xCenter : t.x, s = f ? u.yCenter : t.y, c = { x: o, y: s, angle: t.angle, skip: isNaN(o) || isNaN(s), options: h }; this.updateElement(i, e, c, r) } } } yf.id = "radar"; yf.defaults = { datasetElementType: "line", dataElementType: "point", indexAxis: "r", showLine: !0, elements: { line: { fill: "start" } } }; yf.overrides = { aspectRatio: 1, scales: { r: { type: "radialLinear" } } }; class pf extends uu { } pf.id = "scatter"; pf.defaults = { showLine: !1, fill: !1 }; pf.overrides = { interaction: { mode: "point" }, plugins: { tooltip: { callbacks: { title: () => "", label: n => "(" + n.label + ", " + n.formattedValue + ")" } } }, scales: { x: { type: "linear" }, y: { type: "linear" } } }; ys = Object.freeze({ __proto__: null, BarController: lf, BubbleController: af, DoughnutController: fr, LineController: uu, PolarAreaController: vf, PieController: vs, RadarController: yf, ScatterController: pf }); class wf extends rt { constructor(n) { super(); this.options = void 0; this.circumference = void 0; this.startAngle = void 0; this.endAngle = void 0; this.innerRadius = void 0; this.outerRadius = void 0; this.pixelMargin = 0; this.fullCircles = 0; n && Object.assign(this, n) } inRange(t, i, r) { const s = this.getProps(["x", "y"], r), { angle: h, distance: c } = uo(s, { x: t, y: i }), { startAngle: u, endAngle: e, innerRadius: l, outerRadius: a, circumference: v } = this.getProps(["startAngle", "endAngle", "innerRadius", "outerRadius", "circumference"], r), o = this.options.spacing / 2, y = n(v, e - u) >= f || ki(h, u, e), p = ct(c, l + o, a + o); return y && p } getCenterPoint(n) { const { x: r, y: u, startAngle: f, endAngle: e, innerRadius: o, outerRadius: s } = this.getProps(["x", "y", "startAngle", "endAngle", "innerRadius", "outerRadius", "circumference"], n), { offset: h, spacing: c } = this.options, t = (f + e) / 2, i = (o + s + c + h) / 2; return { x: r + Math.cos(t) * i, y: u + Math.sin(t) * i } } tooltipPosition(n) { return this.getCenterPoint(n) } draw(n) { const { options: i, circumference: r } = this, u = (i.offset || 0) / 2, e = (i.spacing || 0) / 2; if (this.pixelMargin = "inner" === i.borderAlign ? .33 : 0, this.fullCircles = r > f ? Math.floor(r / f) : 0, 0 !== r && !(this.innerRadius < 0) && !(this.outerRadius < 0)) { n.save(); let t = 0; if (u) { t = u / 2; const i = (this.startAngle + this.endAngle) / 2; n.translate(Math.cos(i) * t, Math.sin(i) * t); this.circumference >= s && (t = u) } n.fillStyle = i.backgroundColor; n.strokeStyle = i.borderColor; const o = function (n, t, i, r) { const { fullCircles: o, startAngle: s, circumference: e } = t; let u = t.endAngle; if (o) { ps(n, t, i, r, s + f); for (let t = 0; t < o; ++t)n.fill(); isNaN(e) || (u = s + e % f, e % f == 0 && (u += f)) } return ps(n, t, i, r, u), n.fill(), u }(n, this, t, e); gb(n, this, t, e, o); n.restore() } } } wf.id = "arc"; wf.defaults = { borderAlign: "center", borderColor: "#fff", borderJoinStyle: void 0, borderRadius: 0, borderWidth: 2, offset: 0, spacing: 0, angle: void 0 }; wf.defaultRoutes = { backgroundColor: "backgroundColor" }; const rk = "function" == typeof Path2D; class ui extends rt { constructor(n) { super(); this.animated = !0; this.options = void 0; this._chart = void 0; this._loop = void 0; this._fullLoop = void 0; this._path = void 0; this._points = void 0; this._segments = void 0; this._decimated = !1; this._pointsUpdated = !1; this._datasetIndex = void 0; n && Object.assign(this, n) } updateControlPoints(n, t) { const i = this.options; if ((i.tension || "monotone" === i.cubicInterpolationMode) && !i.stepped && !this._pointsUpdated) { const r = i.spanGaps ? this._loop : this._fullLoop; hl(this._points, i, n, r, t); this._pointsUpdated = !0 } } set points(n) { this._points = n; delete this._segments; delete this._path; this._pointsUpdated = !1 } get points() { return this._points } get segments() { return this._segments || (this._segments = dl(this, this.options.segment)) } first() { const n = this.segments, t = this.points; return n.length && t[n[0].start] } last() { const n = this.segments, i = this.points, t = n.length; return t && i[n[t - 1].end] } interpolate(n, t) { const e = this.options, u = n[t], o = this.points, f = ko(this, { property: t, start: u, end: u }); if (f.length) { const i = [], h = function (n) { return n.stepped ? al : n.tension || "monotone" === n.cubicInterpolationMode ? vl : ti }(e); let r, s; for (r = 0, s = f.length; r < s; ++r) { const { start: a, end: v } = f[r], s = o[a], c = o[v]; if (s === c) { i.push(s); continue } const l = h(s, c, Math.abs((u - s[t]) / (c[t] - s[t])), e.stepped); l[t] = n[t]; i.push(l) } return 1 === i.length ? i[0] : i } } pathSegment(n, t, i) { return ws(this)(n, this, t, i) } path(n, t, i) { const u = this.segments, f = ws(this); let r = this._loop; t = t || 0; i = i || this.points.length - t; for (const e of u) r &= f(n, this, e, { start: t, end: t + i - 1 }); return !!r } draw(n, t, i, r) { const u = this.options || {}; (this.points || []).length && u.borderWidth && (n.save(), uk(n, this, i, r), n.restore()); this.animated && (this._pointsUpdated = !1, this._path = void 0) } } ui.id = "line"; ui.defaults = { borderCapStyle: "butt", borderDash: [], borderDashOffset: 0, borderJoinStyle: "miter", borderWidth: 3, capBezierPoints: !0, cubicInterpolationMode: "default", fill: !1, spanGaps: !1, stepped: !1, tension: 0 }; ui.defaultRoutes = { backgroundColor: "backgroundColor", borderColor: "borderColor" }; ui.descriptors = { _scriptable: !0, _indexable: n => "borderDash" !== n && "fill" !== n }; class bf extends rt { constructor(n) { super(); this.options = void 0; this.parsed = void 0; this.skip = void 0; this.stop = void 0; n && Object.assign(this, n) } inRange(n, t, i) { const r = this.options, { x: u, y: f } = this.getProps(["x", "y"], i); return Math.pow(n - u, 2) + Math.pow(t - f, 2) < Math.pow(r.hitRadius + r.radius, 2) } inXRange(n, t) { return uy(this, n, "x", t) } inYRange(n, t) { return uy(this, n, "y", t) } getCenterPoint(n) { const { x: t, y: i } = this.getProps(["x", "y"], n); return { x: t, y: i } } size(n) { let t = (n = n || this.options || {}).radius || 0; return t = Math.max(t, t && n.hoverRadius || 0), 2 * (t + (t && n.borderWidth || 0)) } draw(n, t) { const i = this.options; this.skip || i.radius < .1 || !di(this, t, this.size(i) / 2) || (n.strokeStyle = i.borderColor, n.lineWidth = i.borderWidth, n.fillStyle = i.backgroundColor, yr(n, i, this.x, this.y)) } getRange() { const n = this.options || {}; return n.radius + n.hitRadius } } bf.id = "point"; bf.defaults = { borderWidth: 1, hitRadius: 1, hoverBorderWidth: 1, hoverRadius: 4, pointStyle: "circle", radius: 3, rotation: 0 }; bf.defaultRoutes = { backgroundColor: "backgroundColor", borderColor: "borderColor" }; class kf extends rt { constructor(n) { super(); this.options = void 0; this.horizontal = void 0; this.base = void 0; this.width = void 0; this.height = void 0; this.inflateAmount = void 0; n && Object.assign(this, n) } draw(n) { const { inflateAmount: u, options: { borderColor: e, backgroundColor: o } } = this, { inner: t, outer: i } = fk(this), f = (r = i.radius).topLeft || r.topRight || r.bottomLeft || r.bottomRight ? gi : ek; var r; n.save(); i.w === t.w && i.h === t.h || (n.beginPath(), f(n, ks(i, u, t)), n.clip(), f(n, ks(t, -u, i)), n.fillStyle = e, n.fill("evenodd")); n.beginPath(); f(n, ks(t, u)); n.fillStyle = o; n.fill(); n.restore() } inRange(n, t, i) { return bs(this, n, t, i) } inXRange(n, t) { return bs(this, n, null, t) } inYRange(n, t) { return bs(this, null, n, t) } getCenterPoint(n) { const { x: t, y: i, base: r, horizontal: u } = this.getProps(["x", "y", "base", "horizontal"], n); return { x: u ? (t + r) / 2 : t, y: u ? i : (i + r) / 2 } } getRange(n) { return "x" === n ? this.width / 2 : this.height / 2 } } kf.id = "bar"; kf.defaults = { borderSkipped: "start", borderWidth: 0, borderRadius: 0, inflateAmount: "auto", pointStyle: void 0 }; kf.defaultRoutes = { backgroundColor: "backgroundColor", borderColor: "borderColor" }; df = Object.freeze({ __proto__: null, ArcElement: wf, LineElement: ui, PointElement: bf, BarElement: kf }); sy = { id: "decimation", defaults: { algorithm: "min-max", enabled: !1 }, beforeElementsUpdate: (n, t, i) => { if (!i.enabled) return void oy(n); const u = n.width; n.data.datasets.forEach((t, f) => { const { _data: c, indexAxis: y } = t, o = n.getDatasetMeta(f), e = c || t.data; if ("y" !== rr([y, n.options.indexAxis]) && o.controller.supportsDecimation) { const l = n.scales[o.xAxisID]; if (("linear" === l.type || "time" === l.type) && !n.options.parsing) { let { start: a, count: s } = function (n, t) { const r = t.length; let f, i = 0; const { iScale: u } = n, { min: e, max: o, minDefined: s, maxDefined: h } = u.getUserBounds(); return s && (i = v(ht(t, u.axis, e).lo, 0, r - 1)), f = h ? v(ht(t, u.axis, o).hi + 1, i, r) - i : r - i, { start: i, count: f } }(o, e); if (s <= (i.threshold || 4 * u)) return void ey(t); let h; switch (r(c) && (t._data = e, delete t.data, Object.defineProperty(t, "data", { configurable: !0, enumerable: !0, get: function () { return this._decimated }, set: function (n) { this._data = n } })), i.algorithm) { case "lttb": h = function (n, t, i, r, u) { const h = u.samples || r; if (h >= i) return n.slice(t, t + i); const e = [], o = (i - 2) / (h - 2); let c = 0; const p = t + i - 1; let f, v, l, s, y, a = t; for (e[c++] = n[a], f = 0; f < h - 2; f++) { let r, u = 0, h = 0; const p = Math.floor((f + 1) * o) + 1 + t, w = Math.min(Math.floor((f + 2) * o) + 1, i) + t, b = w - p; for (r = p; r < w; r++)u += n[r].x, h += n[r].y; u /= b; h /= b; const g = Math.floor(f * o) + 1 + t, nt = Math.min(Math.floor((f + 1) * o) + 1, i) + t, { x: k, y: d } = n[a]; for (l = s = -1, r = g; r < nt; r++)s = .5 * Math.abs((k - u) * (n[r].y - d) - (k - n[r].x) * (h - d)), s > l && (l = s, v = n[r], y = r); e[c++] = v; a = y } return e[c++] = n[p], e }(e, a, s, u, i); break; case "min-max": h = function (n, t, i, u) { let f, o, w, e, b, s, h, l, v, y, a = 0, p = 0; const c = [], d = t + i - 1, k = n[t].x, g = n[d].x - k; for (f = t; f < t + i; ++f) { o = n[f]; w = (o.x - k) / g * u; e = o.y; const t = 0 | w; if (t === b) e < v ? (v = e, s = f) : e > y && (y = e, h = f), a = (p * a + o.x) / ++p; else { const i = f - 1; if (!r(s) && !r(h)) { const t = Math.min(s, h), r = Math.max(s, h); t !== l && t !== i && c.push({ ...n[t], x: a }); r !== l && r !== i && c.push({ ...n[r], x: a }) } f > 0 && i !== l && c.push(n[i]); c.push(o); b = t; p = 0; v = y = e; s = h = l = f } } return c }(e, a, s, u); break; default: throw new Error(`Unsupported decimation algorithm '${i.algorithm}'`); }t._decimated = h } } }) }, destroy(n) { oy(n) } }; class ly { constructor(n) { this.x = n.x; this.y = n.y; this.radius = n.radius } pathSegment(n, t, i) { const { x: r, y: u, radius: e } = this; return t = t || { start: 0, end: f }, n.arc(r, u, e, t.end, t.start, !0), !i.bounds } interpolate(n) { const { x: r, y: u, radius: i } = this, t = n.angle; return { x: r + Math.cos(t) * i, y: u + Math.sin(t) * i, angle: t } } } py = { id: "filler", afterDatasetsUpdate(n, t, i) { const o = (n.data.datasets || []).length, s = []; let e, r, f, u; for (r = 0; r < o; ++r)e = n.getDatasetMeta(r), f = e.dataset, u = null, f && f.options && f instanceof ui && (u = { visible: n.isDatasetVisible(r), index: r, fill: sk(f, r, o), chart: n, axis: e.controller.options.indexAxis, scale: e.vScale, line: f }), e.$filler = u, s.push(u); for (r = 0; r < o; ++r)u = s[r], u && !1 !== u.fill && (u.fill = ok(s, r, i.propagate)) }, beforeDraw(n, t, i) { const f = "beforeDraw" === i.drawTime, r = n.getSortedVisibleDatasetMetas(), u = n.chartArea; for (let t = r.length - 1; t >= 0; --t) { const i = r[t].$filler; i && (i.line.updateControlPoints(u, i.axis), f && nh(n.ctx, i, u)) } }, beforeDatasetsDraw(n, t, i) { if ("beforeDatasetsDraw" === i.drawTime) { const r = n.getSortedVisibleDatasetMetas(); for (let t = r.length - 1; t >= 0; --t) { const i = r[t].$filler; i && nh(n.ctx, i, n.chartArea) } } }, beforeDatasetDraw(n, t, i) { const r = t.meta.$filler; r && !1 !== r.fill && "beforeDatasetDraw" === i.drawTime && nh(n.ctx, r, n.chartArea) }, defaults: { propagate: !0, drawTime: "beforeDatasetDraw" } }; const wy = (n, t) => { let { boxHeight: i = e, boxWidth: r = e } = n; return n.usePointStyle && (i = Math.min(i, t), r = Math.min(r, t)), { boxWidth: r, boxHeight: i, itemHeight: Math.max(t, i) } }; class by extends rt { constructor(n) { super(); this._added = !1; this.legendHitBoxes = []; this._hoveredItem = null; this.doughnutMode = !1; this.chart = n.chart; this.options = n.options; this.ctx = n.ctx; this.legendItems = void 0; this.columnSizes = void 0; this.lineWidths = void 0; this.maxHeight = void 0; this.maxWidth = void 0; this.top = void 0; this.bottom = void 0; this.left = void 0; this.right = void 0; this.height = void 0; this.width = void 0; this._margins = void 0; this.position = void 0; this.weight = void 0; this.fullSize = void 0 } update(n, t, i) { this.maxWidth = n; this.maxHeight = t; this._margins = i; this.setDimensions(); this.buildLabels(); this.fit() } setDimensions() { this.isHorizontal() ? (this.width = this.maxWidth, this.left = this._margins.left, this.right = this.width) : (this.height = this.maxHeight, this.top = this._margins.top, this.bottom = this.height) } buildLabels() { const t = this.options.labels || {}; let n = o(t.generateLabels, [this.chart], this) || []; t.filter && (n = n.filter(n => t.filter(n, this.chart.data))); t.sort && (n = n.sort((n, i) => t.sort(n, i, this.chart.data))); this.options.reverse && n.reverse(); this.legendItems = n } fit() { const { options: n, ctx: h } = this; if (!n.display) return void (this.width = this.height = 0); const u = n.labels, f = a(u.font), t = f.size, e = this._computeTitleHeight(), { boxWidth: o, itemHeight: s } = wy(u, t); let i, r; h.font = f.string; this.isHorizontal() ? (i = this.maxWidth, r = this._fitRows(e, t, o, s) + 10) : (r = this.maxHeight, i = this._fitCols(e, t, o, s) + 10); this.width = Math.min(i, n.maxWidth || this.maxWidth); this.height = Math.min(r, n.maxHeight || this.maxHeight) } _fitRows(n, t, i, r) { const { ctx: f, maxWidth: l, options: { labels: { padding: e } } } = this, a = this.legendHitBoxes = [], u = this.lineWidths = [0], o = r + e; let s = n; f.textAlign = "left"; f.textBaseline = "middle"; let h = -1, c = -o; return this.legendItems.forEach((n, v) => { const y = i + t / 2 + f.measureText(n.text).width; (0 === v || u[u.length - 1] + y + 2 * e > l) && (s += o, u[u.length - (v > 0 ? 0 : 1)] = 0, c += o, h++); a[v] = { left: 0, top: c, row: h, width: y, height: r }; u[u.length - 1] += y + e }), s } _fitCols(n, t, i, r) { const { ctx: l, maxHeight: a, options: { labels: { padding: e } } } = this, v = this.legendHitBoxes = [], s = this.columnSizes = [], y = a - n; let o = e, u = 0, f = 0, h = 0, c = 0; return this.legendItems.forEach((n, a) => { const p = i + t / 2 + l.measureText(n.text).width; a > 0 && f + r + 2 * e > y && (o += u + e, s.push({ width: u, height: f }), h += u + e, c++, u = f = 0); v[a] = { left: h, top: f, col: c, width: p, height: r }; u = Math.max(u, p); f += r + e }), o += u, s.push({ width: u, height: f }), o } adjustHitBoxes() { if (this.options.display) { const r = this._computeTitleHeight(), { legendHitBoxes: u, options: { align: t, labels: { padding: n }, rtl: f } } = this, i = hi(f, this.left, this.width); if (this.isHorizontal()) { let f = 0, e = p(t, this.left + n, this.right - this.lineWidths[f]); for (const o of u) f !== o.row && (f = o.row, e = p(t, this.left + n, this.right - this.lineWidths[f])), o.top += this.top + r + n, o.left = i.leftForLtr(i.x(e), o.width), e += o.width + n } else { let f = 0, e = p(t, this.top + r + n, this.bottom - this.columnSizes[f].height); for (const o of u) o.col !== f && (f = o.col, e = p(t, this.top + r + n, this.bottom - this.columnSizes[f].height)), o.top = e, o.left += this.left + n, o.left = i.leftForLtr(i.x(o.left), o.width), e += o.height + n } } } isHorizontal() { return "top" === this.options.position || "bottom" === this.options.position } draw() { if (this.options.display) { const n = this.ctx; pr(n, this); this._draw(); wr(n) } } _draw() { const { options: o, columnSizes: v, lineWidths: g, ctx: t } = this, { align: c, labels: s } = o, nt = i.color, e = hi(o.rtl, this.left, this.width), y = a(s.font), { color: tt, padding: u } = s, w = y.size, b = w / 2; let r; this.drawTitle(); t.textAlign = e.textAlign("left"); t.textBaseline = "middle"; t.lineWidth = .5; t.font = y.string; const { boxWidth: f, boxHeight: h, itemHeight: it } = wy(s, w), l = this.isHorizontal(), k = this._computeTitleHeight(); r = l ? { x: p(c, this.left + u, this.right - g[0]), y: this.top + u + k, line: 0 } : { x: this.left + u, y: p(c, this.top + k + u, this.bottom - v[0].height), line: 0 }; po(this.ctx, o.textDirection); const d = it + u; this.legendItems.forEach((i, a) => { t.strokeStyle = i.fontColor || tt; t.fillStyle = i.fontColor || tt; const et = t.measureText(i.text).width, ot = e.textAlign(i.textAlign || (i.textAlign = s.textAlign)), ft = f + b + et; let rt = r.x, ut = r.y; e.setWidth(this.width); l ? a > 0 && rt + ft + u > this.right && (ut = r.y += d, r.line++, rt = r.x = p(c, this.left + u, this.right - g[r.line])) : a > 0 && ut + d > this.bottom && (rt = r.x = rt + v[r.line].width + u, r.line++, ut = r.y = p(c, this.top + k + u, this.bottom - v[r.line].height)); !function (i, r, u) { if (!isNaN(f) && !(f <= 0) && !isNaN(h) && !(h < 0)) { t.save(); const o = n(u.lineWidth, 1); if (t.fillStyle = n(u.fillStyle, nt), t.lineCap = n(u.lineCap, "butt"), t.lineDashOffset = n(u.lineDashOffset, 0), t.lineJoin = n(u.lineJoin, "miter"), t.lineWidth = o, t.strokeStyle = n(u.strokeStyle, nt), t.setLineDash(n(u.lineDash, [])), s.usePointStyle) { const n = { radius: f * Math.SQRT2 / 2, pointStyle: u.pointStyle, rotation: u.rotation, borderWidth: o }, s = e.xPlus(i, f / 2); yr(t, n, s, r + b) } else { const n = r + Math.max((w - h) / 2, 0), s = e.leftForLtr(i, f), c = ii(u.borderRadius); t.beginPath(); Object.values(c).some(n => 0 !== n) ? gi(t, { x: s, y: n, w: f, h: h, radius: c }) : t.rect(s, n, f, h); t.fill(); 0 !== o && t.stroke() } t.restore() } }(e.x(rt), ut, i); rt = ch(ot, rt + f + b, l ? rt + ft : this.right, o.rtl), function (n, i, r) { ni(t, r.text, n, i + it / 2, y, { strikethrough: r.hidden, textAlign: e.textAlign(r.textAlign) }) }(e.x(rt), ut, i); l ? r.x += ft + u : r.y += d }); wo(this.ctx, o.textDirection) } drawTitle() { const i = this.options, n = i.title, u = a(n.font), h = w(n.padding); if (n.display) { const c = hi(i.rtl, this.left, this.width), t = this.ctx, o = n.position, l = u.size / 2, s = h.top + l; let f, r = this.left, e = this.width; if (this.isHorizontal()) e = Math.max(...this.lineWidths), f = this.top + s, r = p(i.align, r, this.right - e); else { const n = this.columnSizes.reduce((n, t) => Math.max(n, t.height), 0); f = s + p(i.align, this.top, this.bottom - n - i.labels.padding - this._computeTitleHeight()) } const v = p(o, r, r + e); t.textAlign = c.textAlign(su(o)); t.textBaseline = "middle"; t.strokeStyle = n.color; t.fillStyle = n.color; t.font = u.string; ni(t, n.text, v, f, u) } } _computeTitleHeight() { const n = this.options.title, t = a(n.font), i = w(n.padding); return n.display ? t.lineHeight + i.height : 0 } _getLegendItemAt(n, t) { let r, i, u; if (ct(n, this.left, this.right) && ct(t, this.top, this.bottom)) for (u = this.legendHitBoxes, r = 0; r < u.length; ++r)if (i = u[r], ct(n, i.left, i.left + i.width) && ct(t, i.top, i.top + i.height)) return this.legendItems[r]; return null } handleEvent(n) { const i = this.options; if (function (n, t) { return ("mousemove" === n || "mouseout" === n) && (t.onHover || t.onLeave) ? !0 : t.onClick && ("click" === n || "mouseup" === n) ? !0 : !1 }(n.type, i)) { const t = this._getLegendItemAt(n.x, n.y); if ("mousemove" === n.type || "mouseout" === n.type) { const f = this._hoveredItem, e = (r = t, null !== (u = f) && null !== r && u.datasetIndex === r.datasetIndex && u.index === r.index); f && !e && o(i.onLeave, [n, f, this], this); this._hoveredItem = t; t && !e && o(i.onHover, [n, t, this], this) } else t && o(i.onClick, [n, t, this], this); var u, r } } } ky = { id: "legend", _element: by, start(n, t, i) { const r = n.legend = new by({ ctx: n.ctx, options: i, chart: n }); y.configure(n, r, i); y.addBox(n, r) }, stop(n) { y.removeBox(n, n.legend); delete n.legend }, beforeUpdate(n, t, i) { const r = n.legend; y.configure(n, r, i); r.options = i }, afterUpdate(n) { const t = n.legend; t.buildLabels(); t.adjustHitBoxes() }, afterEvent(n, t) { t.replay || n.legend.handleEvent(t.event) }, defaults: { display: !0, position: "top", align: "center", fullSize: !0, reverse: !1, weight: 1e3, onClick(n, t, i) { const r = t.datasetIndex, u = i.chart; u.isDatasetVisible(r) ? (u.hide(r), t.hidden = !0) : (u.show(r), t.hidden = !1) }, onHover: null, onLeave: null, labels: { color: n => n.chart.options.color, boxWidth: 40, padding: 10, generateLabels(n) { const t = n.data.datasets, { labels: { usePointStyle: i, pointStyle: r, textAlign: u, color: f } } = n.legend.options; return n._getSortedDatasetMetas().map(n => { const e = n.controller.getStyle(i ? 0 : void 0), o = w(e.borderWidth); return { text: t[n.index].label, fillStyle: e.backgroundColor, fontColor: f, hidden: !n.visible, lineCap: e.borderCapStyle, lineDash: e.borderDash, lineDashOffset: e.borderDashOffset, lineJoin: e.borderJoinStyle, lineWidth: (o.width + o.height) / 4, strokeStyle: e.borderColor, pointStyle: r || e.pointStyle, rotation: e.rotation, textAlign: u || e.textAlign, borderRadius: 0, datasetIndex: n.index } }, this) } }, title: { color: n => n.chart.options.color, display: !1, position: "center", text: "" } }, descriptors: { _scriptable: n => !n.startsWith("on"), labels: { _scriptable: n => !["generateLabels", "filter", "sort"].includes(n) } } }; class th extends rt { constructor(n) { super(); this.chart = n.chart; this.options = n.options; this.ctx = n.ctx; this._padding = void 0; this.top = void 0; this.bottom = void 0; this.left = void 0; this.right = void 0; this.width = void 0; this.height = void 0; this.position = void 0; this.weight = void 0; this.fullSize = void 0 } update(n, t) { const i = this.options; if (this.left = 0, this.top = 0, !i.display) return void (this.width = this.height = this.right = this.bottom = 0); this.width = this.right = n; this.height = this.bottom = t; const u = e(i.text) ? i.text.length : 1; this._padding = w(i.padding); const r = u * a(i.font).lineHeight + this._padding.height; this.isHorizontal() ? this.height = r : this.width = r } isHorizontal() { const n = this.options.position; return "top" === n || "bottom" === n } _drawArgs(n) { const { top: t, left: u, bottom: f, right: e, options: l } = this, o = l.align; let h, i, r, c = 0; return this.isHorizontal() ? (i = p(o, u, e), r = t + n, h = e - u) : ("left" === l.position ? (i = u + n, r = p(o, f, t), c = -.5 * s) : (i = e - n, r = p(o, t, f), c = .5 * s), h = f - t), { titleX: i, titleY: r, maxWidth: h, rotation: c } } draw() { const i = this.ctx, n = this.options; if (n.display) { const t = a(n.font), r = t.lineHeight / 2 + this._padding.top, { titleX: u, titleY: f, maxWidth: e, rotation: o } = this._drawArgs(r); ni(i, n.text, 0, 0, t, { color: n.color, maxWidth: e, rotation: o, textAlign: su(n.align), textBaseline: "middle", translation: [u, f] }) } } } dy = { id: "title", _element: th, start(n, t, i) { !function (n, t) { const i = new th({ ctx: n.ctx, options: t, chart: n }); y.configure(n, i, t); y.addBox(n, i); n.titleBlock = i }(n, i) }, stop(n) { const t = n.titleBlock; y.removeBox(n, t); delete n.titleBlock }, beforeUpdate(n, t, i) { const r = n.titleBlock; y.configure(n, r, i); r.options = i }, defaults: { align: "center", display: !1, font: { weight: "bold" }, fullSize: !0, padding: 10, position: "top", text: "", weight: 2e3 }, defaultRoutes: { color: "color" }, descriptors: { _scriptable: !0, _indexable: !1 } }; const gf = new WeakMap; gy = { id: "subtitle", start(n, t, i) { const r = new th({ ctx: n.ctx, options: i, chart: n }); y.configure(n, r, i); y.addBox(n, r); gf.set(n, r) }, stop(n) { y.removeBox(n, gf.get(n)); gf.delete(n) }, beforeUpdate(n, t, i) { const r = gf.get(n); y.configure(n, r, i); r.options = i }, defaults: { align: "center", display: !1, font: { weight: "normal" }, fullSize: !0, padding: 0, position: "top", text: "", weight: 1500 }, defaultRoutes: { color: "color" }, descriptors: { _scriptable: !0, _indexable: !1 } }; const fu = { average(n) { if (!n.length) return !1; let t, r, u = 0, f = 0, i = 0; for (t = 0, r = n.length; t < r; ++t) { const r = n[t].element; if (r && r.hasValue()) { const n = r.tooltipPosition(); u += n.x; f += n.y; ++i } } return { x: u / i, y: f / i } }, nearest(n, t) { if (!n.length) return !1; let i, u, r, f = t.x, e = t.y, o = Number.POSITIVE_INFINITY; for (i = 0, u = n.length; i < u; ++i) { const u = n[i].element; if (u && u.hasValue()) { const n = wu(t, u.getCenterPoint()); n < o && (o = n, r = u) } } if (r) { const n = r.tooltipPosition(); f = n.x; e = n.y } return { x: f, y: e } } }; class ih extends rt { constructor(n) { super(); this.opacity = 0; this._active = []; this._eventPosition = void 0; this._size = void 0; this._cachedAnimations = void 0; this._tooltipItems = []; this.$animations = void 0; this.$context = void 0; this.chart = n.chart || n._chart; this._chart = this.chart; this.options = n.options; this.dataPoints = void 0; this.title = void 0; this.beforeBody = void 0; this.body = void 0; this.afterBody = void 0; this.footer = void 0; this.xAlign = void 0; this.yAlign = void 0; this.x = void 0; this.y = void 0; this.height = void 0; this.width = void 0; this.caretX = void 0; this.caretY = void 0; this.labelColors = void 0; this.labelPointStyles = void 0; this.labelTextColors = void 0 } initialize(n) { this.options = n; this._cachedAnimations = void 0; this.$context = void 0 } _resolveAnimations() { const n = this._cachedAnimations; if (n) return n; const u = this.chart, t = this.options.setContext(this.getContext()), i = t.enabled && u.options.animation && t.animations, r = new fs(this.chart, i); return i._cacheable && (this._cachedAnimations = Object.freeze(r)), r } getContext() { return this.$context || (this.$context = (n = this.chart.getContext(), t = this, i = this._tooltipItems, pt(n, { tooltip: t, tooltipItems: i, type: "tooltip" }))); var n, t, i } getTitle(n, t) { const { callbacks: r } = t, u = r.beforeTitle.apply(this, [n]), f = r.title.apply(this, [n]), e = r.afterTitle.apply(this, [n]); let i = []; return i = lt(i, wt(u)), i = lt(i, wt(f)), i = lt(i, wt(e)), i } getBeforeBody(n, t) { return rp(t.callbacks.beforeBody.apply(this, [n])) } getBody(n, t) { const { callbacks: r } = t, i = []; return u(n, n => { const t = { before: [], lines: [], after: [] }, u = up(r, n); lt(t.before, wt(u.beforeLabel.call(this, n))); lt(t.lines, u.label.call(this, n)); lt(t.after, wt(u.afterLabel.call(this, n))); i.push(t) }), i } getAfterBody(n, t) { return rp(t.callbacks.afterBody.apply(this, [n])) } getFooter(n, t) { const { callbacks: r } = t, u = r.beforeFooter.apply(this, [n]), f = r.footer.apply(this, [n]), e = r.afterFooter.apply(this, [n]); let i = []; return i = lt(i, wt(u)), i = lt(i, wt(f)), i = lt(i, wt(e)), i } _createItems(n) { const r = this._active, f = this.chart.data, e = [], o = [], s = []; let i, h, t = []; for (i = 0, h = r.length; i < h; ++i)t.push(vk(this.chart, r[i])); return n.filter && (t = t.filter((t, i, r) => n.filter(t, i, r, f))), n.itemSort && (t = t.sort((t, i) => n.itemSort(t, i, f))), u(t, t => { const i = up(n.callbacks, t); e.push(i.labelColor.call(this, t)); o.push(i.labelPointStyle.call(this, t)); s.push(i.labelTextColor.call(this, t)) }), this.labelColors = e, this.labelPointStyles = o, this.labelTextColors = s, this.dataPoints = t, t } update(n, t) { const i = this.options.setContext(this.getContext()), f = this._active; let u, r = []; if (f.length) { const n = fu[i.position].call(this, f, this._eventPosition); r = this._createItems(i); this.title = this.getTitle(r, i); this.beforeBody = this.getBeforeBody(r, i); this.body = this.getBody(r, i); this.afterBody = this.getAfterBody(r, i); this.footer = this.getFooter(r, i); const t = this._size = np(this, i), o = Object.assign({}, n, t), e = tp(this.chart, i, o), s = ip(i, o, e, this.chart); this.xAlign = e.xAlign; this.yAlign = e.yAlign; u = { opacity: 1, x: s.x, y: s.y, width: t.width, height: t.height, caretX: n.x, caretY: n.y } } else 0 !== this.opacity && (u = { opacity: 0 }); this._tooltipItems = r; this.$context = void 0; u && this._resolveAnimations().update(this, u); n && i.external && i.external.call(this, { chart: this.chart, tooltip: this, replay: t }) } drawCaret(n, t, i, r) { const u = this.getCaretPosition(n, i, r); t.lineTo(u.x1, u.y1); t.lineTo(u.x2, u.y2); t.lineTo(u.x3, u.y3) } getCaretPosition(n, t, i) { const { xAlign: l, yAlign: v } = this, { caretSize: r, cornerRadius: w } = i, { topLeft: b, topRight: k, bottomLeft: d, bottomRight: g } = ii(w), { x: s, y: a } = n, { width: y, height: p } = t; let u, f, h, e, o, c; return "center" === v ? (o = a + p / 2, "left" === l ? (u = s, f = u - r, e = o + r, c = o - r) : (u = s + y, f = u + r, e = o - r, c = o + r), h = u) : (f = "left" === l ? s + Math.max(b, d) + r : "right" === l ? s + y - Math.max(k, g) - r : this.caretX, "top" === v ? (e = a, o = e - r, u = f - r, h = f + r) : (e = a + p, o = e + r, u = f + r, h = f - r), c = e), { x1: u, x2: f, x3: h, y1: e, y2: o, y3: c } } drawTitle(n, t, i) { const o = this.title, f = o.length; let u, e, r; if (f) { const s = hi(i.rtl, this.x, this.width); for (n.x = ne(this, i.titleAlign, i), t.textAlign = s.textAlign(i.titleAlign), t.textBaseline = "middle", u = a(i.titleFont), e = i.titleSpacing, t.fillStyle = i.titleColor, t.font = u.string, r = 0; r < f; ++r)t.fillText(o[r], s.x(n.x), n.y + u.lineHeight / 2), n.y += u.lineHeight + e, r + 1 === f && (n.y += i.titleMarginBottom - e) } } _drawColorBox(n, t, i, r, u) { const e = this.labelColors[i], c = this.labelPointStyles[i], { boxHeight: o, boxWidth: f, boxPadding: l } = u, v = a(u.bodyFont), y = ne(this, "left", u), h = r.x(y), p = o < v.lineHeight ? (v.lineHeight - o) / 2 : 0, s = t.y + p; if (u.usePointStyle) { const t = { radius: Math.min(f, o) / 2, pointStyle: c.pointStyle, rotation: c.rotation, borderWidth: 1 }, i = r.leftForLtr(h, f) + f / 2, l = s + o / 2; n.strokeStyle = u.multiKeyBackground; n.fillStyle = u.multiKeyBackground; yr(n, t, i, l); n.strokeStyle = e.borderColor; n.fillStyle = e.backgroundColor; yr(n, t, i, l) } else { n.lineWidth = e.borderWidth || 1; n.strokeStyle = e.borderColor; n.setLineDash(e.borderDash || []); n.lineDashOffset = e.borderDashOffset || 0; const t = r.leftForLtr(h, f - l), c = r.leftForLtr(r.xPlus(h, 1), f - l - 2), i = ii(e.borderRadius); Object.values(i).some(n => 0 !== n) ? (n.beginPath(), n.fillStyle = u.multiKeyBackground, gi(n, { x: t, y: s, w: f, h: o, radius: i }), n.fill(), n.stroke(), n.fillStyle = e.backgroundColor, n.beginPath(), gi(n, { x: c, y: s + 1, w: f - 2, h: o - 2, radius: i }), n.fill()) : (n.fillStyle = u.multiKeyBackground, n.fillRect(t, s, f, o), n.strokeRect(t, s, f, o), n.fillStyle = e.backgroundColor, n.fillRect(c, s + 1, f - 2, o - 2)) } n.fillStyle = this.labelTextColors[i] } drawBody(n, t, i) { const { body: p } = this, { bodySpacing: w, bodyAlign: l, displayColors: b, boxHeight: rt, boxWidth: k, boxPadding: d } = i, f = a(i.bodyFont); let e = f.lineHeight, v = 0; const y = hi(i.rtl, this.x, this.width), o = function (i) { t.fillText(i, y.x(n.x + v), n.y + e / 2); n.y += e + w }, g = y.textAlign(l); let s, nt, h, r, c, tt, it; for (t.textAlign = l, t.textBaseline = "middle", t.font = f.string, n.x = ne(this, g, i), t.fillStyle = i.bodyColor, u(this.beforeBody, o), v = b && "right" !== g ? "center" === l ? k / 2 + d : k + 2 + d : 0, r = 0, tt = p.length; r < tt; ++r) { for (s = p[r], nt = this.labelTextColors[r], t.fillStyle = nt, u(s.before, o), h = s.lines, b && h.length && (this._drawColorBox(t, n, r, y, i), e = Math.max(f.lineHeight, rt)), c = 0, it = h.length; c < it; ++c)o(h[c]), e = f.lineHeight; u(s.after, o) } v = 0; e = f.lineHeight; u(this.afterBody, o); n.y -= w } drawFooter(n, t, i) { const f = this.footer, e = f.length; let r, u; if (e) { const o = hi(i.rtl, this.x, this.width); for (n.x = ne(this, i.footerAlign, i), n.y += i.footerMarginTop, t.textAlign = o.textAlign(i.footerAlign), t.textBaseline = "middle", r = a(i.footerFont), t.fillStyle = i.footerColor, t.font = r.string, u = 0; u < e; ++u)t.fillText(f[u], o.x(n.x), n.y + r.lineHeight / 2), n.y += r.lineHeight + i.footerSpacing } } drawBackground(n, t, i, r) { const { xAlign: c, yAlign: s } = this, { x: u, y: f } = n, { width: e, height: o } = i, { topLeft: h, topRight: l, bottomLeft: a, bottomRight: v } = ii(r.cornerRadius); t.fillStyle = r.backgroundColor; t.strokeStyle = r.borderColor; t.lineWidth = r.borderWidth; t.beginPath(); t.moveTo(u + h, f); "top" === s && this.drawCaret(n, t, i, r); t.lineTo(u + e - l, f); t.quadraticCurveTo(u + e, f, u + e, f + l); "center" === s && "right" === c && this.drawCaret(n, t, i, r); t.lineTo(u + e, f + o - v); t.quadraticCurveTo(u + e, f + o, u + e - v, f + o); "bottom" === s && this.drawCaret(n, t, i, r); t.lineTo(u + a, f + o); t.quadraticCurveTo(u, f + o, u, f + o - a); "center" === s && "left" === c && this.drawCaret(n, t, i, r); t.lineTo(u, f + h); t.quadraticCurveTo(u, f, u + h, f); t.closePath(); t.fill(); r.borderWidth > 0 && t.stroke() } _updateAnimationTarget(n) { const i = this.chart, t = this.$animations, r = t && t.x, u = t && t.y; if (r || u) { const t = fu[n.position].call(this, this._active, this._eventPosition); if (!t) return; const o = this._size = np(this, n), s = Object.assign({}, t, this._size), f = tp(i, n, s), e = ip(n, s, f, i); r._to === e.x && u._to === e.y || (this.xAlign = f.xAlign, this.yAlign = f.yAlign, this.width = o.width, this.height = o.height, this.caretX = t.x, this.caretY = t.y, this._resolveAnimations().update(this, e)) } } _willRender() { return !!this.opacity } draw(n) { const t = this.options.setContext(this.getContext()); let i = this.opacity; if (i) { this._updateAnimationTarget(t); const u = { width: this.width, height: this.height }, r = { x: this.x, y: this.y }; i = Math.abs(i) < .001 ? 0 : i; const f = w(t.padding), e = this.title.length || this.beforeBody.length || this.body.length || this.afterBody.length || this.footer.length; t.enabled && e && (n.save(), n.globalAlpha = i, this.drawBackground(r, n, u, t), po(n, t.textDirection), r.y += f.top, this.drawTitle(r, n, t), this.drawBody(r, n, t), this.drawFooter(r, n, t), wo(n, t.textDirection), n.restore()) } } getActiveElements() { return this._active || [] } setActiveElements(n, t) { const r = this._active, i = n.map(({ datasetIndex: t, index: n }) => { const i = this.chart.getDatasetMeta(t); if (!i) throw new Error("Cannot find a dataset at index " + t); return { datasetIndex: t, element: i.data[n], index: n } }), u = !hr(r, i), f = this._positionChanged(i, t); (u || f) && (this._active = i, this._eventPosition = t, this._ignoreReplayEvents = !0, this.update(!0)) } handleEvent(n, t, i = !0) { if (t && this._ignoreReplayEvents) return !1; this._ignoreReplayEvents = !1; const u = this.options, f = this._active || [], r = this._getActiveElements(n, f, t, i), o = this._positionChanged(r, n), e = t || !hr(r, f) || o; return e && (this._active = r, (u.enabled || u.external) && (this._eventPosition = { x: n.x, y: n.y }, this.update(!0, t))), e } _getActiveElements(n, t, i, r) { const u = this.options; if ("mouseout" === n.type) return []; if (!r) return t; const f = this.chart.getElementsAtEventForMode(n, u.mode, u, i); return u.reverse && f.reverse(), f } _positionChanged(n, t) { const { caretX: r, caretY: u, options: f } = this, i = fu[f.position].call(this, n, t); return !1 !== i && (r !== i.x || u !== i.y) } } ih.positioners = fu; fp = { id: "tooltip", _element: ih, positioners: fu, afterInit(n, t, i) { i && (n.tooltip = new ih({ chart: n, options: i })) }, beforeUpdate(n, t, i) { n.tooltip && n.tooltip.initialize(i) }, reset(n, t, i) { n.tooltip && n.tooltip.initialize(i) }, afterDraw(n) { const t = n.tooltip; if (t && t._willRender()) { const i = { tooltip: t }; if (!1 === n.notifyPlugins("beforeTooltipDraw", i)) return; t.draw(n.ctx); n.notifyPlugins("afterTooltipDraw", i) } }, afterEvent(n, t) { if (n.tooltip) { const i = t.replay; n.tooltip.handleEvent(t.event, i, t.inChartArea) && (t.changed = !0) } }, defaults: { enabled: !0, external: null, position: "average", backgroundColor: "rgba(0,0,0,0.8)", titleColor: "#fff", titleFont: { weight: "bold" }, titleSpacing: 2, titleMarginBottom: 6, titleAlign: "left", bodyColor: "#fff", bodySpacing: 2, bodyFont: {}, bodyAlign: "left", footerColor: "#fff", footerSpacing: 2, footerMarginTop: 6, footerFont: { weight: "bold" }, footerAlign: "left", padding: 6, caretPadding: 2, caretSize: 5, cornerRadius: 6, boxHeight: (n, t) => t.bodyFont.size, boxWidth: (n, t) => t.bodyFont.size, multiKeyBackground: "#fff", displayColors: !0, boxPadding: 0, borderColor: "rgba(0,0,0,0)", borderWidth: 0, animation: { duration: 400, easing: "easeOutQuart" }, animations: { numbers: { type: "number", properties: ["x", "y", "width", "height", "caretX", "caretY"] }, opacity: { easing: "linear", duration: 200 } }, callbacks: { beforeTitle: st, title(n) { if (n.length > 0) { const t = n[0], i = t.chart.data.labels, r = i ? i.length : 0; if (this && this.options && "dataset" === this.options.mode) return t.dataset.label || ""; if (t.label) return t.label; if (r > 0 && t.dataIndex < r) return i[t.dataIndex] } return "" }, afterTitle: st, beforeBody: st, beforeLabel: st, label(n) { if (this && this.options && "dataset" === this.options.mode) return n.label + ": " + n.formattedValue || n.formattedValue; let t = n.dataset.label || ""; t && (t += ": "); const i = n.formattedValue; return r(i) || (t += i), t }, labelColor(n) { const t = n.chart.getDatasetMeta(n.datasetIndex).controller.getStyle(n.dataIndex); return { borderColor: t.borderColor, backgroundColor: t.backgroundColor, borderWidth: t.borderWidth, borderDash: t.borderDash, borderDashOffset: t.borderDashOffset, borderRadius: 0 } }, labelTextColor() { return this.options.bodyColor }, labelPointStyle(n) { const t = n.chart.getDatasetMeta(n.datasetIndex).controller.getStyle(n.dataIndex); return { pointStyle: t.pointStyle, rotation: t.rotation } }, afterLabel: st, afterBody: st, beforeFooter: st, footer: st, afterFooter: st } }, defaultRoutes: { bodyFont: "font", footerFont: "font", titleFont: "font" }, descriptors: { _scriptable: n => "filter" !== n && "itemSort" !== n && "external" !== n, _indexable: !1, callbacks: { _scriptable: !1, _indexable: !1 }, animation: { _fallback: !1 }, animations: { _fallback: "animation" } }, additionalOptionScopes: ["interaction"] }; rh = Object.freeze({ __proto__: null, Decimation: sy, Filler: py, Legend: ky, SubTitle: gy, Title: dy, Tooltip: fp }); class te extends ci { constructor(n) { super(n); this._startValue = void 0; this._valueRange = 0; this._addedLabels = [] } init(n) { const t = this._addedLabels; if (t.length) { const n = this.getLabels(); for (const { index: i, label: r } of t) n[i] === r && n.splice(i, 1); this._addedLabels = [] } super.init(n) } parse(t, i) { if (r(t)) return null; const u = this.getLabels(); return ((n, t) => null === n ? null : v(Math.round(n), 0, t))(i = isFinite(i) && u[i] === t ? i : pk(u, t, n(i, t), this._addedLabels), u.length - 1) } determineDataLimits() { const { minDefined: i, maxDefined: r } = this.getUserBounds(); let { min: n, max: t } = this.getMinMax(!0); "ticks" === this.options.bounds && (i || (n = 0), r || (t = this.getLabels().length - 1)); this.min = n; this.max = t } buildTicks() { const t = this.min, i = this.max, r = this.options.offset, u = []; let n = this.getLabels(); n = 0 === t && i === n.length - 1 ? n : n.slice(t, i + 1); this._valueRange = Math.max(n.length - (r ? 0 : 1), 1); this._startValue = this.min - (r ? .5 : 0); for (let n = t; n <= i; n++)u.push({ value: n }); return u } getLabelForValue(n) { const t = this.getLabels(); return n >= 0 && n < t.length ? t[n] : n } configure() { super.configure(); this.isHorizontal() || (this._reversePixels = !this._reversePixels) } getPixelForValue(n) { return "number" != typeof n && (n = this.parse(n)), null === n ? NaN : this.getPixelForDecimal((n - this._startValue) / this._valueRange) } getPixelForTick(n) { const t = this.ticks; return n < 0 || n > t.length - 1 ? null : this.getPixelForValue(t[n].value) } getValueForPixel(n) { return Math.round(this._startValue + this.getDecimalForPixel(n) * this._valueRange) } getBasePixel() { return this.bottom } } te.id = "category"; te.defaults = { ticks: { callback: te.prototype.getLabelForValue } }; class ie extends ci { constructor(n) { super(n); this.start = void 0; this.end = void 0; this._startValue = void 0; this._endValue = void 0; this._valueRange = 0 } parse(n) { return r(n) || ("number" == typeof n || n instanceof Number) && !isFinite(+n) ? null : +n } handleTickRangeOptions() { const { beginAtZero: i } = this.options, { minDefined: f, maxDefined: e } = this.getUserBounds(); let { min: t, max: n } = this; const r = n => t = f ? t : n, u = t => n = e ? n : t; if (i) { const i = ft(t), f = ft(n); i < 0 && f < 0 ? u(0) : i > 0 && f > 0 && r(0) } if (t === n) { let f = 1; (n >= Number.MAX_SAFE_INTEGER || t <= Number.MIN_SAFE_INTEGER) && (f = Math.abs(.05 * n)); u(n + f); i || r(t - f) } this.min = t; this.max = n } getTickLimit() { const r = this.options.ticks; let n, { maxTicksLimit: t, stepSize: i } = r; return i ? (n = Math.ceil(this.max / i) - Math.floor(this.min / i) + 1, n > 1e3 && (console.warn(`scales.${this.id}.ticks.stepSize: ${i} would result generating up to ${n} ticks. Limiting to 1000.`), n = 1e3)) : (n = this.computeTickLimit(), t = t || 11), t && (n = Math.min(t, n)), n } computeTickLimit() { return Number.POSITIVE_INFINITY } buildTicks() { const n = this.options, t = n.ticks; let i = this.getTickLimit(); i = Math.max(2, i); const u = function (n, t) { const c = [], { bounds: rt, step: k, min: e, max: o, precision: p, count: g, maxTicks: nt, maxDigits: ut, includeBounds: tt } = n, w = k || 1, d = nt - 1, { min: a, max: v } = t, b = !r(e), y = !r(o), ft = !r(g), it = (v - a) / (ut + 1); let s, u, h, f, i = to((v - a) / d / w) * w; if (i < 1e-14 && !b && !y) return [{ value: a }, { value: v }]; f = Math.ceil(v / i) - Math.floor(a / i); f > d && (i = to(f * i / d / w) * w); r(p) || (s = Math.pow(10, p), i = Math.ceil(i * s) / s); "ticks" === rt ? (u = Math.floor(a / i) * i, h = Math.ceil(v / i) * i) : (u = a, h = v); b && y && k && ac((o - e) / k, i / 1e3) ? (f = Math.round(Math.min((o - e) / i, nt)), i = (o - e) / f, u = e, h = o) : ft ? (u = b ? e : u, h = y ? o : h, f = g - 1, i = (h - u) / f) : (f = (h - u) / i, f = bi(f, Math.round(f), i / 1e3) ? Math.round(f) : Math.ceil(f)); const et = Math.max(ro(i), ro(u)); s = Math.pow(10, r(p) ? et : p); u = Math.round(u * s) / s; h = Math.round(h * s) / s; let l = 0; for (b && (tt && u !== e ? (c.push({ value: e }), u < e && l++, bi(Math.round((u + l * i) * s) / s, e, ep(e, it, n)) && l++) : u < e && l++); l < f; ++l)c.push({ value: Math.round((u + l * i) * s) / s }); return y && tt && h !== o ? c.length && bi(c[c.length - 1].value, o, ep(o, it, n)) ? c[c.length - 1].value = o : c.push({ value: o }) : y && h !== o || c.push({ value: h }), c }({ maxTicks: i, bounds: n.bounds, min: n.min, max: n.max, precision: t.precision, step: t.stepSize, count: t.count, maxDigits: this._maxDigits(), horizontal: this.isHorizontal(), minRotation: t.minRotation || 0, includeBounds: !1 !== t.includeBounds }, this._range || this); return "ticks" === n.bounds && io(u, this, "value"), n.reverse ? (u.reverse(), this.start = this.max, this.end = this.min) : (this.start = this.min, this.end = this.max), u } configure() { const i = this.ticks; let n = this.min, t = this.max; if (super.configure(), this.options.offset && i.length) { const r = (t - n) / Math.max(i.length - 1, 1) / 2; n -= r; t += r } this._startValue = n; this._endValue = t; this._valueRange = t - n } getLabelForValue(n) { return ir(n, this.chart.options.locale, this.options.ticks.format) } } class uh extends ie { determineDataLimits() { const { min: n, max: t } = this.getMinMax(!0); this.min = c(n) ? n : 0; this.max = c(t) ? t : 1; this.handleTickRangeOptions() } computeTickLimit() { const n = this.isHorizontal(), i = n ? this.width : this.height, t = it(this.options.ticks.minRotation), r = (n ? Math.sin(t) : Math.cos(t)) || .001, u = this._resolveTickFontOptions(0); return Math.ceil(i / Math.min(40, u.lineHeight / r)) } getPixelForValue(n) { return null === n ? NaN : this.getPixelForDecimal((n - this._startValue) / this._valueRange) } getValueForPixel(n) { return this._startValue + this.getDecimalForPixel(n) * this._valueRange } } uh.id = "linear"; uh.defaults = { ticks: { callback: ur.formatters.numeric } }; class fh extends ci { constructor(n) { super(n); this.start = void 0; this.end = void 0; this._startValue = void 0; this._valueRange = 0 } parse(n, t) { const i = ie.prototype.parse.apply(this, [n, t]); if (0 !== i) return c(i) && i > 0 ? i : null; this._zero = !0 } determineDataLimits() { const { min: n, max: t } = this.getMinMax(!0); this.min = c(n) ? Math.max(0, n) : null; this.max = c(t) ? Math.max(0, t) : null; this.options.beginAtZero && (this._zero = !0); this.handleTickRangeOptions() } handleTickRangeOptions() { const { minDefined: f, maxDefined: e } = this.getUserBounds(); let n = this.min, t = this.max; const r = t => n = f ? n : t, u = n => t = e ? t : n, i = (n, t) => Math.pow(10, Math.floor(nt(n)) + t); n === t && (n <= 0 ? (r(1), u(10)) : (r(i(n, -1)), u(i(t, 1)))); n <= 0 && r(i(t, -1)); t <= 0 && u(i(n, 1)); this._zero && this.min !== this._suggestedMin && n === i(this.min, 0) && r(i(n, -1)); this.min = n; this.max = t } buildTicks() { const t = this.options, n = function (n, t) { const e = Math.floor(nt(t.max)), s = Math.ceil(t.max / Math.pow(10, e)), o = []; let r = d(n.min, Math.pow(10, Math.floor(nt(t.min)))), i = Math.floor(nt(r)), u = Math.floor(r / Math.pow(10, i)), f = i < 0 ? Math.pow(10, Math.abs(i)) : 1; do o.push({ value: r, major: op(r) }), ++u, 10 === u && (u = 1, ++i, f = i >= 0 ? 1 : f), r = Math.round(u * Math.pow(10, i) * f) / f; while (i < e || i === e && u < s); const h = d(n.max, r); return o.push({ value: h, major: op(r) }), o }({ min: this._userMin, max: this._userMax }, this); return "ticks" === t.bounds && io(n, this, "value"), t.reverse ? (n.reverse(), this.start = this.max, this.end = this.min) : (this.start = this.min, this.end = this.max), n } getLabelForValue(n) { return void 0 === n ? "0" : ir(n, this.chart.options.locale, this.options.ticks.format) } configure() { const n = this.min; super.configure(); this._startValue = nt(n); this._valueRange = nt(this.max) - nt(n) } getPixelForValue(n) { return void 0 !== n && 0 !== n || (n = this.min), null === n || isNaN(n) ? NaN : this.getPixelForDecimal(n === this.min ? 0 : (nt(n) - this._startValue) / this._valueRange) } getValueForPixel(n) { const t = this.getDecimalForPixel(n); return Math.pow(10, this._startValue + t * this._valueRange) } } fh.id = "logarithmic"; fh.defaults = { ticks: { callback: ur.formatters.logarithmic, major: { enabled: !0 } } }; class eu extends ie { constructor(n) { super(n); this.xCenter = void 0; this.yCenter = void 0; this.drawingArea = void 0; this._pointLabels = []; this._pointLabelItems = [] } setDimensions() { const n = this._padding = w(eh(this.options) / 2), t = this.width = this.maxWidth - n.width, i = this.height = this.maxHeight - n.height; this.xCenter = Math.floor(this.left + t / 2 + n.left); this.yCenter = Math.floor(this.top + i / 2 + n.top); this.drawingArea = Math.floor(Math.min(t, i) / 2) } determineDataLimits() { const { min: n, max: t } = this.getMinMax(!1); this.min = c(n) && !isNaN(n) ? n : 0; this.max = c(t) && !isNaN(t) ? t : 0; this.handleTickRangeOptions() } computeTickLimit() { return Math.ceil(this.drawingArea / eh(this.options)) } generateTickLabels(n) { ie.prototype.generateTickLabels.call(this, n); this._pointLabels = this.getLabels().map((n, t) => { const i = o(this.options.pointLabels.callback, [n, t], this); return i || 0 === i ? i : "" }).filter((n, t) => this.chart.getDataVisibility(t)) } fit() { const n = this.options; n.display && n.pointLabels.display ? wk(this) : this.setCenterPoint(0, 0, 0, 0) } setCenterPoint(n, t, i, r) { this.xCenter += Math.floor((n - t) / 2); this.yCenter += Math.floor((i - r) / 2); this.drawingArea -= Math.min(this.drawingArea / 2, Math.max(n, t, i, r)) } getIndexAngle(n) { return b(n * (f / (this._pointLabels.length || 1)) + it(this.options.startAngle || 0)) } getDistanceFromCenterForValue(n) { if (r(n)) return NaN; const t = this.drawingArea / (this.max - this.min); return this.options.reverse ? (this.max - n) * t : (n - this.min) * t } getValueForDistanceFromCenter(n) { if (r(n)) return NaN; const t = n / (this.drawingArea / (this.max - this.min)); return this.options.reverse ? this.max - t : this.min + t } getPointLabelContext(n) { const t = this._pointLabels || []; if (n >= 0 && n < t.length) { const i = t[n]; return function (n, t, i) { return pt(n, { label: i, index: t, type: "pointLabel" }) }(this.getContext(), n, i) } } getPointPosition(n, t, i = 0) { const r = this.getIndexAngle(n) - h + i; return { x: Math.cos(r) * t + this.xCenter, y: Math.sin(r) * t + this.yCenter, angle: r } } getPointPositionForValue(n, t) { return this.getPointPosition(n, this.getDistanceFromCenterForValue(t)) } getBasePosition(n) { return this.getPointPositionForValue(n || 0, this.getBaseValue()) } getPointLabelPosition(n) { const { left: t, top: i, right: r, bottom: u } = this._pointLabelItems[n]; return { left: t, top: i, right: r, bottom: u } } drawBackground() { const { backgroundColor: n, grid: { circular: t } } = this.options; if (n) { const i = this.ctx; i.save(); i.beginPath(); hp(this, this.getDistanceFromCenterForValue(this._endValue), t, this._pointLabels.length); i.closePath(); i.fillStyle = n; i.fill(); i.restore() } } drawGrid() { const n = this.ctx, u = this.options, { angleLines: o, grid: s } = u, f = this._pointLabels.length; let t, i, e; if (u.pointLabels.display && function (n, t) { const { ctx: i, options: { pointLabels: u } } = n; for (let f = t - 1; f >= 0; f--) { const t = u.setContext(n.getPointLabelContext(f)), e = a(t.font), { x: c, y: l, textAlign: v, left: o, top: s, right: y, bottom: p } = n._pointLabelItems[f], { backdropColor: h } = t; if (!r(h)) { const r = ii(t.borderRadius), n = w(t.backdropPadding); i.fillStyle = h; const u = o - n.left, f = s - n.top, e = y - o + n.width, c = p - s + n.height; Object.values(r).some(n => 0 !== n) ? (i.beginPath(), gi(i, { x: u, y: f, w: e, h: c, radius: r }), i.fill()) : i.fillRect(u, f, e, c) } ni(i, n._pointLabels[f], c, l + e.lineHeight / 2, e, { color: t.color, textAlign: v, textBaseline: "middle" }) } }(this, f), s.display && this.ticks.forEach((n, t) => { 0 !== t && (i = this.getDistanceFromCenterForValue(n.value), !function (n, t, i, r) { const u = n.ctx, f = t.circular, { color: e, lineWidth: o } = t; (f || r) && e && o && !(i < 0) && (u.save(), u.strokeStyle = e, u.lineWidth = o, u.setLineDash(t.borderDash), u.lineDashOffset = t.borderDashOffset, u.beginPath(), hp(n, i, f, r), u.closePath(), u.stroke(), u.restore()) }(this, s.setContext(this.getContext(t - 1)), i, f)) }), o.display) { for (n.save(), t = f - 1; t >= 0; t--) { const r = o.setContext(this.getPointLabelContext(t)), { color: f, lineWidth: s } = r; s && f && (n.lineWidth = s, n.strokeStyle = f, n.setLineDash(r.borderDash), n.lineDashOffset = r.borderDashOffset, i = this.getDistanceFromCenterForValue(u.ticks.reverse ? this.min : this.max), e = this.getPointPosition(t, i), n.beginPath(), n.moveTo(this.xCenter, this.yCenter), n.lineTo(e.x, e.y), n.stroke()) } n.restore() } } drawBorder() { } drawLabels() { const n = this.ctx, r = this.options, u = r.ticks; if (u.display) { const f = this.getIndexAngle(0); let t, i; n.save(); n.translate(this.xCenter, this.yCenter); n.rotate(f); n.textAlign = "center"; n.textBaseline = "middle"; this.ticks.forEach((f, e) => { if (0 !== e || r.reverse) { const o = u.setContext(this.getContext(e)), s = a(o.font); if (t = this.getDistanceFromCenterForValue(this.ticks[e].value), o.showLabelBackdrop) { n.font = s.string; i = n.measureText(f.label).width; n.fillStyle = o.backdropColor; const r = w(o.backdropPadding); n.fillRect(-i / 2 - r.left, -t - s.size / 2 - r.top, i + r.width, s.size + r.height) } ni(n, f.label, 0, -t, s, { color: o.color }) } }); n.restore() } } drawTitle() { } } eu.id = "radialLinear"; eu.defaults = { display: !0, animate: !0, position: "chartArea", angleLines: { display: !0, lineWidth: 1, borderDash: [], borderDashOffset: 0 }, grid: { circular: !1 }, startAngle: 0, ticks: { showLabelBackdrop: !0, callback: ur.formatters.numeric }, pointLabels: { backdropColor: void 0, backdropPadding: 2, display: !0, font: { size: 10 }, callback: n => n, padding: 5, centerPointLabels: !1 } }; eu.defaultRoutes = { "angleLines.color": "borderColor", "pointLabels.color": "color", "ticks.color": "color" }; eu.descriptors = { angleLines: { _fallback: "grid" } }; const re = { millisecond: { common: !0, size: 1, steps: 1e3 }, second: { common: !0, size: 1e3, steps: 60 }, minute: { common: !0, size: 6e4, steps: 60 }, hour: { common: !0, size: 36e5, steps: 24 }, day: { common: !0, size: 864e5, steps: 30 }, week: { common: !1, size: 6048e5, steps: 4 }, month: { common: !0, size: 2628e6, steps: 12 }, quarter: { common: !1, size: 7884e6, steps: 4 }, year: { common: !0, size: 3154e7 } }, k = Object.keys(re); class ou extends ci { constructor(n) { super(n); this._cache = { data: [], labels: [], all: [] }; this._unit = "day"; this._majorUnit = void 0; this._offsets = {}; this._normalized = !1; this._parseOpts = void 0 } init(n, t) { const i = n.time || (n.time = {}), r = this._adapter = new ls._date(n.adapters.date); yi(i.displayFormats, r.formats()); this._parseOpts = { parser: i.parser, round: i.round, isoWeekday: i.isoWeekday }; super.init(n); this._normalized = t.normalized } parse(n) { return void 0 === n ? null : cp(this, n) } beforeLayout() { super.beforeLayout(); this._cache = { data: [], labels: [], all: [] } } determineDataLimits() { function o(i) { f || isNaN(i.min) || (n = Math.min(n, i.min)); e || isNaN(i.max) || (t = Math.max(t, i.max)) } const i = this.options, r = this._adapter, u = i.time.unit || "day"; let { min: n, max: t, minDefined: f, maxDefined: e } = this.getUserBounds(); f && e || (o(this._getLabelBounds()), "ticks" === i.bounds && "labels" === i.ticks.source || o(this.getMinMax(!1))); n = c(n) && !isNaN(n) ? n : +r.startOf(Date.now(), u); t = c(t) && !isNaN(t) ? t : +r.endOf(Date.now(), u) + 1; this.min = Math.min(n, t - 1); this.max = Math.max(n + 1, t) } _getLabelBounds() { const n = this.getLabelTimestamps(); let t = Number.POSITIVE_INFINITY, i = Number.NEGATIVE_INFINITY; return n.length && (t = n[0], i = n[n.length - 1]), { min: t, max: i } } buildTicks() { const t = this.options, i = t.time, r = t.ticks, n = "labels" === r.source ? this.getLabelTimestamps() : this._generate(); "ticks" === t.bounds && n.length && (this.min = this._userMin || n[0], this.max = this._userMax || n[n.length - 1]); const f = this.min, u = ec(n, f, this.max); return this._unit = i.unit || (r.autoSkip ? lp(i.minUnit, this.min, this.max, this._getLabelCapacity(f)) : function (n, t, i, r, u) { for (let f = k.length - 1; f >= k.indexOf(i); f--) { const i = k[f]; if (re[i].common && n._adapter.diff(u, r, i) >= t - 1) return i } return k[i ? k.indexOf(i) : 0] }(this, u.length, i.minUnit, this.min, this.max)), this._majorUnit = r.major.enabled && "year" !== this._unit ? function (n) { for (let t = k.indexOf(n) + 1, i = k.length; t < i; ++t)if (re[k[t]].common) return k[t] }(this._unit) : void 0, this.initOffsets(n), t.reverse && u.reverse(), vp(this, u, this._majorUnit) } afterAutoSkip() { this.options.offsetAfterAutoskip && this.initOffsets(this.ticks.map(n => +n.value)) } initOffsets(n) { let r, u, t = 0, i = 0; this.options.offset && n.length && (r = this.getDecimalForValue(n[0]), t = 1 === n.length ? 1 - r : (this.getDecimalForValue(n[1]) - r) / 2, u = this.getDecimalForValue(n[n.length - 1]), i = 1 === n.length ? u : (u - this.getDecimalForValue(n[n.length - 2])) / 2); const f = n.length < 3 ? .5 : .25; t = v(t, 0, f); i = v(i, 0, f); this._offsets = { start: t, end: i, factor: 1 / (t + 1 + i) } } _generate() { const e = this._adapter, i = this.min, r = this.max, s = this.options, o = s.time, u = o.unit || lp(o.minUnit, i, r, this._getLabelCapacity(i)), h = n(o.stepSize, 1), c = "week" === u && o.isoWeekday, v = wi(c) || !0 === c, l = {}; let t, a, f = i; if (v && (f = +e.startOf(f, "isoWeek", c)), f = +e.startOf(f, v ? "day" : u), e.diff(r, i, u) > 1e5 * h) throw new Error(i + " and " + r + " are too far apart with stepSize of " + h + " " + u); const y = "data" === s.ticks.source && this.getDataTimestamps(); for (t = f, a = 0; t < r; t = +e.add(t, h, u), a++)ap(l, t, y); return t !== r && "ticks" !== s.bounds && 1 !== a || ap(l, t, y), Object.keys(l).sort((n, t) => n - t).map(n => +n) } getLabelForValue(n) { const i = this._adapter, t = this.options.time; return t.tooltipFormat ? i.format(n, t.tooltipFormat) : i.format(n, t.displayFormats.datetime) } _tickFormatFunction(n, t, i, r) { const f = this.options, e = f.time.displayFormats, s = this._unit, u = this._majorUnit, v = s && e[s], h = u && e[u], c = i[t], y = u && h && c && c.major, l = this._adapter.format(n, r || (y ? h : v)), a = f.ticks.callback; return a ? o(a, [l, t, i], this) : l } generateTickLabels(n) { let t, r, i; for (t = 0, r = n.length; t < r; ++t)i = n[t], i.label = this._tickFormatFunction(i.value, t, n) } getDecimalForValue(n) { return null === n ? NaN : (n - this.min) / (this.max - this.min) } getPixelForValue(n) { const t = this._offsets, i = this.getDecimalForValue(n); return this.getPixelForDecimal((t.start + i) * t.factor) } getValueForPixel(n) { const t = this._offsets, i = this.getDecimalForPixel(n) / t.factor - t.end; return this.min + i * (this.max - this.min) } _getLabelSize(n) { const t = this.options.ticks, i = this.ctx.measureText(n).width, r = it(this.isHorizontal() ? t.maxRotation : t.minRotation), u = Math.cos(r), f = Math.sin(r), e = this._resolveTickFontOptions(0).size; return { w: i * u + e * f, h: i * f + e * u } } _getLabelCapacity(n) { const t = this.options.time, i = t.displayFormats, f = i[t.unit] || i.millisecond, e = this._tickFormatFunction(n, 0, vp(this, [n], this._majorUnit), f), r = this._getLabelSize(e), u = Math.floor(this.isHorizontal() ? this.width / r.w : this.height / r.h) - 1; return u > 0 ? u : 1 } getDataTimestamps() { let t, r, n = this._cache.data || []; if (n.length) return n; const i = this.getMatchingVisibleMetas(); if (this._normalized && i.length) return this._cache.data = i[0].controller.getAllParsedValues(this); for (t = 0, r = i.length; t < r; ++t)n = n.concat(i[t].controller.getAllParsedValues(this)); return this._cache.data = this.normalize(n) } getLabelTimestamps() { const n = this._cache.labels || []; let t, i; if (n.length) return n; const r = this.getLabels(); for (t = 0, i = r.length; t < i; ++t)n.push(cp(this, r[t])); return this._cache.labels = this._normalized ? n : this.normalize(n) } normalize(n) { return ge(n.sort(nd)) } } ou.id = "time"; ou.defaults = { bounds: "data", adapters: {}, time: { parser: !1, unit: !1, round: !1, isoWeekday: !1, minUnit: "millisecond", displayFormats: {} }, ticks: { source: "auto", major: { enabled: !1 } } }; class oh extends ou { constructor(n) { super(n); this._table = []; this._minPos = void 0; this._tableRange = void 0 } initOffsets() { const n = this._getTimestampsForTable(), t = this._table = this.buildLookupTable(n); this._minPos = ue(t, this.min); this._tableRange = ue(t, this.max) - this._minPos; super.initOffsets(n) } buildLookupTable(n) { const { min: f, max: e } = this, r = [], o = []; let t, u, s, i, h; for (t = 0, u = n.length; t < u; ++t)i = n[t], i >= f && i <= e && r.push(i); if (r.length < 2) return [{ time: f, pos: 0 }, { time: e, pos: 1 }]; for (t = 0, u = r.length; t < u; ++t)h = r[t + 1], s = r[t - 1], i = r[t], Math.round((h + s) / 2) !== i && o.push({ time: i, pos: t / (u - 1) }); return o } _getTimestampsForTable() { let n = this._cache.all || []; if (n.length) return n; const t = this.getDataTimestamps(), i = this.getLabelTimestamps(); return n = t.length && i.length ? this.normalize(t.concat(i)) : t.length ? t : i, n = this._cache.all = n, n } getDecimalForValue(n) { return (ue(this._table, n) - this._minPos) / this._tableRange } getValueForPixel(n) { const t = this._offsets, i = this.getDecimalForPixel(n) / t.factor - t.end; return ue(this._table, i * this._tableRange + this._minPos, !0) } } return oh.id = "timeseries", oh.defaults = ou.defaults, sh = Object.freeze({ __proto__: null, CategoryScale: te, LinearScale: uh, LogarithmicScale: fh, RadialLinearScale: eu, TimeScale: ou, TimeSeriesScale: oh }), l.register(ys, sh, df, rh), l.helpers = { ...ta }, l._adapters = ls, l.Animation = wa, l.Animations = fs, l.animator = ut, l.controllers = ot.controllers.items, l.DatasetController = et, l.Element = rt, l.elements = df, l.Interaction = ts, l.layouts = y, l.platforms = us, l.Scale = ci, l.Ticks = ur, Object.assign(l, ys, sh, df, rh, us), l.Chart = l, "undefined" != typeof window && (window.Chart = l), l
  570. });
  571. /*!
  572. * chartjs-plugin-datalabels v2.0.0
  573. * https://chartjs-plugin-datalabels.netlify.app
  574. * (c) 2017-2021 chartjs-plugin-datalabels contributors
  575. * Released under the MIT license
  576. */
  577. (function (n, t) { typeof exports == "object" && typeof module != "undefined" ? module.exports = t(require("chart.js/helpers"), require("chart.js")) : typeof define == "function" && define.amd ? define(["chart.js/helpers", "chart.js"], t) : (n = typeof globalThis != "undefined" ? globalThis : n || self, n.ChartDataLabels = t(n.Chart.helpers, n.Chart)) })(this, function (n, t) { "use strict"; function l(n, t) { var f = t.x, e = t.y; if (f === null) return { x: 0, y: -1 }; if (e === null) return { x: 1, y: 0 }; var r = n.x - f, u = n.y - e, i = Math.sqrt(r * r + u * u); return { x: i ? r / i : 0, y: i ? u / i : -1 } } function ut(n, t, i, r, u) { switch (u) { case "center": i = r = 0; break; case "bottom": i = 0; r = 1; break; case "right": i = 1; r = 0; break; case "left": i = -1; r = 0; break; case "top": i = 0; r = -1; break; case "start": i = -i; r = -r; break; case "end": break; default: u *= Math.PI / 180; i = Math.cos(u); r = Math.sin(u) }return { x: n, y: t, vx: i, vy: r } } function o(n, t, i) { var r = ft; return n < i.left ? r |= p : n > i.right && (r |= w), t < i.top ? r |= k : t > i.bottom && (r |= b), r } function et(n, t) { for (var i = n.x0, r = n.y0, u = n.x1, f = n.y1, c = o(i, r, t), l = o(u, f, t), e, s, h; ;) { if (!(c | l) || c & l) break; e = c || l; e & k ? (s = i + (u - i) * (t.top - r) / (f - r), h = t.top) : e & b ? (s = i + (u - i) * (t.bottom - r) / (f - r), h = t.bottom) : e & w ? (h = r + (f - r) * (t.right - i) / (u - i), s = t.right) : e & p && (h = r + (f - r) * (t.left - i) / (u - i), s = t.left); e === c ? (i = s, r = h, c = o(i, r, t)) : (u = s, f = h, l = o(u, f, t)) } return { x0: i, x1: u, y0: r, y1: f } } function s(n, t) { var f = t.anchor, i = n, r, u; return t.clamp && (i = et(i, t.area)), f === "start" ? (r = i.x0, u = i.y0) : f === "end" ? (r = i.x1, u = i.y1) : (r = (i.x0 + i.x1) / 2, u = (i.y0 + i.y1) / 2), ut(r, u, n.vx, n.vy, t.align) } function ot(n) { var t = n.borderWidth || 0, i = n.padding, r = n.size.height, u = n.size.width, f = -u / 2, e = -r / 2; return { frame: { x: f - i.left - t, y: e - i.top - t, w: u + i.width + t * 2, h: r + i.height + t * 2 }, text: { x: f, y: e, w: u, h: r } } } function st(n, t) { var i = t.chart.getDatasetMeta(t.datasetIndex).vScale, r; return i ? i.xCenter !== undefined && i.yCenter !== undefined ? { x: i.xCenter, y: i.yCenter } : (r = i.getBasePixel(), n.horizontal ? { x: r, y: null } : { x: null, y: r }) : null } function ht(n) { return n instanceof t.ArcElement ? h.arc : n instanceof t.PointElement ? h.point : n instanceof t.BarElement ? h.bar : h.fallback } function ct(n, t, i, r, u, f) { var h = Math.PI / 2; if (f) { var e = Math.min(f, u / 2, r / 2), o = t + e, s = i + e, c = t + r - e, l = i + u - e; n.moveTo(t, s); o < c && s < l ? (n.arc(o, s, e, -Math.PI, -h), n.arc(c, s, e, -h, 0), n.arc(c, l, e, 0, h), n.arc(o, l, e, h, Math.PI)) : o < c ? (n.moveTo(o, i), n.arc(c, s, e, -h, h), n.arc(o, s, e, h, Math.PI + h)) : s < l ? (n.arc(o, s, e, -Math.PI, 0), n.arc(o, l, e, 0, Math.PI)) : n.arc(o, s, e, -Math.PI, Math.PI); n.closePath(); n.moveTo(t, i) } else n.rect(t, i, r, u) } function lt(n, t, i) { var f = i.backgroundColor, e = i.borderColor, u = i.borderWidth; (f || e && u) && (n.beginPath(), ct(n, r(t.x) + u / 2, r(t.y) + u / 2, r(t.w) - u, r(t.h) - u, i.borderRadius), n.closePath(), f && (n.fillStyle = f, n.fill()), e && u && (n.strokeStyle = e, n.lineWidth = u, n.lineJoin = "miter", n.stroke())) } function at(n, t, i) { var f = i.lineHeight, r = n.w, u = n.x, e = n.y + f / 2; return t === "center" ? u += r / 2 : (t === "end" || t === "right") && (u += r), { h: f, w: r, x: u, y: e } } function vt(n, t, i) { var u = n.shadowBlur, f = i.stroked, e = r(i.x), o = r(i.y), s = r(i.w); f && n.strokeText(t, e, o, s); i.filled && (u && f && (n.shadowBlur = 0), n.fillText(t, e, o, s), u && f && (n.shadowBlur = u)) } function yt(n, t, i, r) { var s = r.textAlign, h = r.color, f = !!h, c = r.font, e = t.length, l = r.textStrokeColor, a = r.textStrokeWidth, o = l && a, u; if (e && (f || o)) for (i = at(i, s, c), n.font = c.string, n.textAlign = s, n.textBaseline = "middle", n.shadowBlur = r.textShadowBlur, n.shadowColor = r.textShadowColor, f && (n.fillStyle = h), o && (n.lineJoin = "round", n.lineWidth = a, n.strokeStyle = l), u = 0, e = t.length; u < e; ++u)vt(n, t[u], { stroked: o, filled: f, w: i.w, x: i.x, y: i.y + i.h * u }) } function f(n, t, i) { var f = Math.cos(i), e = Math.sin(i), r = t.x, u = t.y; return { x: r + f * (n.x - r) - e * (n.y - u), y: u + e * (n.x - r) + f * (n.y - u) } } function tt(n, t) { for (var r = nt, u = g, o = t.origin, f, s, h, e, i = 0; i < n.length; ++i)f = n[i], s = f.x - o.x, h = f.y - o.y, e = t.vx * s + t.vy * h, r = Math.min(r, e), u = Math.max(u, e); return { min: r, max: u } } function c(n, t) { var r = t.x - n.x, u = t.y - n.y, i = Math.sqrt(r * r + u * u); return { vx: (t.x - n.x) / i, vy: (t.y - n.y) / i, origin: n, ln: i } } function it(n, t, i) { var r = t.positioner(n, t), u = r.vx, f = r.vy; if (!u && !f) return { x: r.x, y: r.y }; var h = i.w, c = i.h, e = t.rotation, o = Math.abs(h / 2 * Math.cos(e)) + Math.abs(c / 2 * Math.sin(e)), s = Math.abs(h / 2 * Math.sin(e)) + Math.abs(c / 2 * Math.cos(e)), l = 1 / Math.max(Math.abs(u), Math.abs(f)); return o *= u * l, s *= f * l, o += t.offset * u, s += t.offset * f, { x: r.x + o, y: r.y + s } } function pt(n, t) { for (var r, u, f, i = n.length - 1; i >= 0; --i)for (u = n[i].$layout, r = i - 1; r >= 0 && u._visible; --r)f = n[r].$layout, f._visible && u._box.intersects(f._box) && t(u, f); return n } function wt(n) { for (var t, r, u, e, o, i = 0, f = n.length; i < f; ++i)t = n[i], r = t.$layout, r._visible && (o = new Proxy(t._el, { get: (n, t) => n.getProps([t], !0)[t] }), u = t.geometry(), e = it(o, t.model(), u), r._box.update(e, u, t.rotation())); return pt(n, function (n, t) { var i = n._hidable, r = t._hidable; i && r || r ? t._visible = !1 : i && (n._visible = !1) }) } function dt(t, i) { var r = t.datalabels, o = {}, u = [], f, e; return r === !1 ? null : (r === !0 && (r = {}), i = n.merge({}, [i, r]), f = i.labels || {}, e = Object.keys(f), delete i.labels, e.length ? e.forEach(function (t) { f[t] && u.push(n.merge({}, [i, f[t], { _key: t }])) }) : u.push(i), o = u.reduce(function (t, i) { return n.each(i.listeners || {}, function (n, r) { t[r] = t[r] || {}; t[r][i._key || rt] = n }), delete i.listeners, t }, {}), { labels: u, listeners: o }) } function v(t, r, u) { if (r) { var o = u.$context, f = u.$groups, e; r[f._set] && (e = r[f._set][f._key], e) && n.callback(e, [o]) === !0 && (t[i]._dirty = !0, u.update(o)) } } function gt(n, t, i, r) { var u, f; (i || r) && (i ? r ? i !== r && (f = u = !0) : f = !0 : u = !0, f && v(n, t.leave, i), u && v(n, t.enter, r)) } function ni(n, t) { var r = n[i], u = r._listeners, o, f; if (u.enter || u.leave) { if (t.type === "mousemove") f = e.lookup(r._labels, t); else if (t.type !== "mouseout") return; o = r._hovered; r._hovered = f; gt(n, u, o, f) } } function ti(n, t) { var r = n[i], u = r._listeners.click, f = u && e.lookup(r._labels, t); f && v(n, u, f) } var y = function () { if (typeof window != "undefined") { if (window.devicePixelRatio) return window.devicePixelRatio; var n = window.screen; if (n) return (n.deviceXDPI || 1) / (n.logicalXDPI || 1) } return 1 }(), u = { toTextLines: function (t) { var r = [], i; for (t = [].concat(t); t.length;)i = t.pop(), typeof i == "string" ? r.unshift.apply(r, i.split("\n")) : Array.isArray(i) ? t.push.apply(t, i) : n.isNullOrUndef(t) || r.unshift("" + i); return r }, textSize: function (n, t, i) { var f = [].concat(t), e = f.length, o = n.font, u = 0, r; for (n.font = i.string, r = 0; r < e; ++r)u = Math.max(n.measureText(f[r]).width, u); return n.font = o, { height: e * i.lineHeight, width: u } }, bound: function (n, t, i) { return Math.max(n, Math.min(t, i)) }, arrayDiff: function (n, t) { for (var r = n.slice(), f = [], e, o, i = 0, u = t.length; i < u; ++i)o = t[i], e = r.indexOf(o), e === -1 ? f.push([o, 1]) : r.splice(e, 1); for (i = 0, u = r.length; i < u; ++i)f.push([r[i], -1]); return f }, rasterize: function (n) { return Math.round(n * y) / y } }, ft = 0, p = 1, w = 2, b = 4, k = 8, h = { arc: function (n, t) { var u = (n.startAngle + n.endAngle) / 2, i = Math.cos(u), r = Math.sin(u), f = n.innerRadius, e = n.outerRadius; return s({ x0: n.x + i * f, y0: n.y + r * f, x1: n.x + i * e, y1: n.y + r * e, vx: i, vy: r }, t) }, point: function (n, t) { var i = l(n, t.origin), r = i.x * n.options.radius, u = i.y * n.options.radius; return s({ x0: n.x - r, y0: n.y - u, x1: n.x + r, y1: n.y + u, vx: i.x, vy: i.y }, t) }, bar: function (n, t) { var u = l(n, t.origin), i = n.x, r = n.y, f = 0, e = 0; return n.horizontal ? (i = Math.min(n.x, n.base), f = Math.abs(n.base - n.x)) : (r = Math.min(n.y, n.base), e = Math.abs(n.base - n.y)), s({ x0: i, y0: r + e, x1: i + f, y1: r, vx: u.x, vy: u.y }, t) }, fallback: function (n, t) { var i = l(n, t.origin); return s({ x0: n.x, y0: n.y, x1: n.x, y1: n.y, vx: i.x, vy: i.y }, t) } }, r = u.rasterize, d = function (n, t, i, r) { var u = this; u._config = n; u._index = r; u._model = null; u._rects = null; u._ctx = t; u._el = i }, g, nt, a; n.merge(d.prototype, { _modelize: function (i, r, f, e) { var s = this, o = s._index, c = n.toFont(n.resolve([f.font, {}], e, o)), h = n.resolve([f.color, t.defaults.color], e, o); return { align: n.resolve([f.align, "center"], e, o), anchor: n.resolve([f.anchor, "center"], e, o), area: e.chart.chartArea, backgroundColor: n.resolve([f.backgroundColor, null], e, o), borderColor: n.resolve([f.borderColor, null], e, o), borderRadius: n.resolve([f.borderRadius, 0], e, o), borderWidth: n.resolve([f.borderWidth, 0], e, o), clamp: n.resolve([f.clamp, !1], e, o), clip: n.resolve([f.clip, !1], e, o), color: h, display: i, font: c, lines: r, offset: n.resolve([f.offset, 0], e, o), opacity: n.resolve([f.opacity, 1], e, o), origin: st(s._el, e), padding: n.toPadding(n.resolve([f.padding, 0], e, o)), positioner: ht(s._el), rotation: n.resolve([f.rotation, 0], e, o) * (Math.PI / 180), size: u.textSize(s._ctx, r, c), textAlign: n.resolve([f.textAlign, "start"], e, o), textShadowBlur: n.resolve([f.textShadowBlur, 0], e, o), textShadowColor: n.resolve([f.textShadowColor, h], e, o), textStrokeColor: n.resolve([f.textStrokeColor, h], e, o), textStrokeWidth: n.resolve([f.textStrokeWidth, 0], e, o) } }, update: function (t) { var i = this, r = null, h = null, c = i._index, f = i._config, e, o, s, l = n.resolve([f.display, !0], t, c); l && (e = t.dataset.data[c], o = n.valueOrDefault(n.callback(f.formatter, [e, t]), e), s = n.isNullOrUndef(o) ? [] : u.toTextLines(o), s.length && (r = i._modelize(l, s, f, t), h = ot(r))); i._model = r; i._rects = h }, geometry: function () { return this._rects ? this._rects.frame : {} }, rotation: function () { return this._model ? this._model.rotation : 0 }, visible: function () { return this._model && this._model.opacity }, model: function () { return this._model }, draw: function (n, t) { var o = this, i = n.ctx, f = o._model, s = o._rects, e; this.visible() && (i.save(), f.clip && (e = f.area, i.beginPath(), i.rect(e.left, e.top, e.right - e.left, e.bottom - e.top), i.clip()), i.globalAlpha = u.bound(0, f.opacity, 1), i.translate(r(t.x), r(t.y)), i.rotate(f.rotation), lt(i, s.frame, f), yt(i, f.lines, s.text, f), i.restore()) } }); g = Number.MIN_SAFE_INTEGER || -9007199254740991; nt = Number.MAX_SAFE_INTEGER || 9007199254740991; a = function () { this._rotation = 0; this._rect = { x: 0, y: 0, w: 0, h: 0 } }; n.merge(a.prototype, { center: function () { var n = this._rect; return { x: n.x + n.w / 2, y: n.y + n.h / 2 } }, update: function (n, t, i) { this._rotation = i; this._rect = { x: t.x + n.x, y: t.y + n.y, w: t.w, h: t.h } }, contains: function (n) { var r = this, i = 1, t = r._rect; return n = f(n, r.center(), -r._rotation), !(n.x < t.x - i || n.y < t.y - i || n.x > t.x + t.w + i * 2 || n.y > t.y + t.h + i * 2) }, intersects: function (n) { var t = this._points(), i = n._points(), u = [c(t[0], t[1]), c(t[0], t[3])], r, f, e; for (this._rotation !== n._rotation && u.push(c(i[0], i[1]), c(i[0], i[3])), r = 0; r < u.length; ++r)if (f = tt(t, u[r]), e = tt(i, u[r]), f.max < e.min || e.max < f.min) return !1; return !0 }, _points: function () { var r = this, n = r._rect, t = r._rotation, i = r.center(); return [f({ x: n.x, y: n.y }, i, t), f({ x: n.x + n.w, y: n.y }, i, t), f({ x: n.x + n.w, y: n.y + n.h }, i, t), f({ x: n.x, y: n.y + n.h }, i, t)] } }); var e = { prepare: function (n) { for (var r = [], i, e, u, t = 0, f = n.length; t < f; ++t)for (i = 0, e = n[t].length; i < e; ++i)u = n[t][i], r.push(u), u.$layout = { _box: new a, _hidable: !1, _visible: !0, _set: t, _idx: i }; return r.sort(function (n, t) { var i = n.$layout, r = t.$layout; return i._idx === r._idx ? r._set - i._set : r._idx - i._idx }), this.update(r), r }, update: function (n) { for (var f = !1, i, u, r, t = 0, e = n.length; t < e; ++t)i = n[t], u = i.model(), r = i.$layout, r._hidable = u && u.display === "auto", r._visible = i.visible(), f |= r._hidable; f && wt(n) }, lookup: function (n, t) { for (var r, i = n.length - 1; i >= 0; --i)if (r = n[i].$layout, r && r._visible && r._box.contains(t)) return n[i]; return null }, draw: function (n, t) { for (var i, u, f, e, r = 0, o = t.length; r < o; ++r)i = t[r], u = i.$layout, u._visible && (f = i.geometry(), e = it(i._el, i.model(), f), u._box.update(e, f, i.rotation()), i.draw(n, e)) } }, bt = function (t) { if (n.isNullOrUndef(t)) return null; var r = t, u, f, i; if (n.isObject(t)) if (n.isNullOrUndef(t.label)) if (n.isNullOrUndef(t.r)) for (r = "", u = Object.keys(t), i = 0, f = u.length; i < f; ++i)r += (i !== 0 ? ", " : "") + u[i] + ": " + t[u[i]]; else r = t.r; else r = t.label; return "" + r }, kt = { align: "center", anchor: "center", backgroundColor: null, borderColor: null, borderRadius: 0, borderWidth: 0, clamp: !1, clip: !1, color: undefined, display: !0, font: { family: undefined, lineHeight: 1.2, size: undefined, style: undefined, weight: null }, formatter: bt, labels: undefined, listeners: {}, offset: 4, opacity: 1, padding: { top: 4, right: 4, bottom: 4, left: 4 }, rotation: 0, textAlign: "start", textStrokeColor: undefined, textStrokeWidth: 0, textShadowBlur: 0, textShadowColor: undefined }, i = "$datalabels", rt = "$default"; return { id: "datalabels", defaults: kt, beforeInit: function (n) { n[i] = { _actives: [] } }, beforeUpdate: function (n) { var t = n[i]; t._listened = !1; t._listeners = {}; t._datasets = []; t._labels = [] }, afterDatasetUpdate: function (t, r, u) { var s = r.index, c = t[i], g = c._datasets[s] = [], nt = t.isDatasetVisible(s), y = t.data.datasets[s], l = dt(y, u), p = r.meta.data || [], a = t.ctx, f, h, w, b, v, k, o, e; for (a.save(), f = 0, w = p.length; f < w; ++f)if (o = p[f], o[i] = [], nt && o && t.getDataVisibility(f) && !o.skip) for (h = 0, b = l.labels.length; h < b; ++h)v = l.labels[h], k = v._key, e = new d(v, a, o, f), e.$groups = { _set: s, _key: k || rt }, e.$context = { active: !1, chart: t, dataIndex: f, dataset: y, datasetIndex: s }, e.update(e.$context), o[i].push(e), g.push(e); a.restore(); n.merge(c._listeners, l.listeners, { merger: function (n, t, i) { t[n] = t[n] || {}; t[n][r.index] = i[n]; c._listened = !0 } }) }, afterUpdate: function (n, t) { n[i]._labels = e.prepare(n[i]._datasets, t) }, afterDatasetsDraw: function (n) { e.draw(n, n[i]._labels) }, beforeEvent: function (n, t) { if (n[i]._listened) { var r = t.event; switch (r.type) { case "mousemove": case "mouseout": ni(n, r); break; case "click": ti(n, r) } } }, afterEvent: function (n) { for (var t = n[i], v = t._actives, y = t._actives = n.getActiveElements(), h = u.arrayDiff(v, y), f, a, o, s, c, r = 0, l = h.length; r < l; ++r)if (o = h[r], o[1]) for (c = o[0].element[i] || [], f = 0, a = c.length; f < a; ++f)s = c[f], s.$context.active = o[1] === 1, s.update(s.$context); (t._dirty || h.length) && (e.update(t._labels), n.render()); delete t._dirty } } }); jquerySwipeHandler = function (n) { function t(r) { if (i[r]) return i[r].exports; var u = i[r] = { i: r, l: !1, exports: {} }; return n[r].call(u.exports, u, u.exports, t), u.l = !0, u.exports } var i = {}; return t.m = n, t.c = i, t.d = function (n, i, r) { t.o(n, i) || Object.defineProperty(n, i, { enumerable: !0, get: r }) }, t.r = function (n) { "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(n, Symbol.toStringTag, { value: "Module" }); Object.defineProperty(n, "__esModule", { value: !0 }) }, t.t = function (n, i) { var r, u; if ((1 & i && (n = t(n)), 8 & i) || 4 & i && "object" == typeof n && n && n.__esModule) return n; if (r = Object.create(null), t.r(r), Object.defineProperty(r, "default", { enumerable: !0, value: n }), 2 & i && "string" != typeof n) for (u in n) t.d(r, u, function (t) { return n[t] }.bind(null, u)); return r }, t.n = function (n) { var i = n && n.__esModule ? function () { return n.default } : function () { return n }; return t.d(i, "a", i), i }, t.o = function (n, t) { return Object.prototype.hasOwnProperty.call(n, t) }, t.p = "", t(t.s = 0) }([function (n, t, i) { "use strict"; function a(n, t, i) { function p(n) { return n.touches && n.touches[0] ? { x: n.touches[0].pageX, y: n.touches[0].pageY } : n.changedTouches && n.changedTouches[0] ? { x: n.changedTouches[0].pageX, y: n.changedTouches[0].pageY } : { x: n.pageX, y: n.pageY } } let h = void 0, v = void 0, a = !1; const y = () => { a = !0 }; $(n).bind("mousedown touchstart", n => { h = Date.now(), v = p(n), "touchstart" === n.type && (t.includes(r) || t.includes(u)) && n.preventDefault(), a = !1, $(window).bind("scroll", y) }); $(n).bind("mouseup touchend", n => { if (("mouseup" !== n.type || n.which === l) && h && Date.now() - h < c) { const y = p(n), c = function (n, t) { const h = t.x - n.x, c = t.y - n.y, i = []; return h > o ? i.push(e) : h < -o && i.push(f), c > s ? i.splice(0, i.length).push(u) : c < -s && i.splice(0, i.length).push(r), i }(v, y); let l = !1; for (let n of c) t.includes(n) && (i(n), l = !0); c.length || a || (l || !1) && (n.cancelable && "touchend" === n.type && n.preventDefault(), n.stopPropagation()); h = void 0 } $(window).unbind("scroll", y) }) } i.r(t); i.d(t, "SWIPE_LEFT", function () { return f }); i.d(t, "SWIPE_RIGHT", function () { return e }); i.d(t, "SWIPE_UP", function () { return r }); i.d(t, "SWIPE_DOWN", function () { return u }); i.d(t, "CLICK", function () { return h }); i.d(t, "handleSwipe", function () { return a }); const f = "SWIPE_LEFT", e = "SWIPE_RIGHT", r = "SWIPE_UP", u = "SWIPE_DOWN", h = "CLICK", o = 50, s = 50, c = 700, l = 1 }]); jQuery.fn.pagination = function (n, t, i) { return i = jQuery.extend({ items_per_page: t, num_display_entries: 4, current_page: 0, num_edge_entries: 0, link_to: "javascript:void(0)", prev_text: "Prev", next_text: "Next", ellipse_text: "...", prev_show_always: !0, next_show_always: !0, callback: function () { return !1 } }, i || {}), this.each(function () { function f() { return Math.ceil(n / i.items_per_page) } function o() { var n = Math.ceil(i.num_display_entries / 2), r = f(), u = r - i.num_display_entries, e = t > n ? Math.max(Math.min(t - n, u), 0) : 0, o = t > n ? Math.min(t + n, r) : Math.min(i.num_display_entries, r); return [e, o] } function u(n, u) { t = n; e(); var f = i.callback(n, r); return f || (u.stopPropagation ? u.stopPropagation() : u.cancelBubble = !0), f } function e() { var h, l, a, n; r.empty(); h = jQuery("<ul class='" + r.attr("class") + "'><\/ul>"); r.append(h); var e = o(), s = f(), v = function (n) { return function (t) { return u(n, t) } }, c = function (n, r) { var f, e, u; n = n < 0 ? 0 : n < s ? n : s - 1; r = jQuery.extend({ text: n + 1, classes: "" }, r || {}); n == t ? (f = r.side ? "disabled" : "active", u = jQuery("<li class='" + f + " page-item'><a class='page-link'>" + r.text + "<\/a><\/li>")) : (e = jQuery("<a class='page-link'>" + r.text + "<\/a>").attr("href", i.link_to.replace(/__id__/, n)), u = jQuery("<li class='page-item'><\/li>").bind("click", v(n)), u.append(e)); r.classes && u.addClass(r.classes); h.append(u) }; if (i.prev_text && (t > 0 || i.prev_show_always) && c(t - 1, { text: i.prev_text, side: !0 }), e[0] > 0 && i.num_edge_entries > 0) { for (l = Math.min(i.num_edge_entries, e[0]), n = 0; n < l; n++)c(n); i.num_edge_entries < e[0] && i.ellipse_text && jQuery("<li class='disabled page-item'>" + i.ellipse_text + "<\/li>").appendTo(h) } for (n = e[0]; n < e[1]; n++)c(n); if (e[1] < s && i.num_edge_entries > 0) for (s - i.num_edge_entries > e[1] && i.ellipse_text && jQuery("<li class='disabled page-item'>" + i.ellipse_text + "<\/li>").appendTo(h), a = Math.max(s - i.num_edge_entries, e[1]), n = a; n < s; n++)c(n); i.next_text && (t < s - 1 || i.next_show_always) && c(t + 1, { text: i.next_text, side: !0 }) } var t = i.current_page, r; n = !n || n < 0 ? 1 : n; i.items_per_page = !i.items_per_page || i.items_per_page < 0 ? 1 : i.items_per_page; r = jQuery(this); this.selectPage = function (n) { u(n) }; this.prevPage = function () { return t > 0 ? (u(t - 1), !0) : !1 }; this.nextPage = function () { return t < f() - 1 ? (u(t + 1), !0) : !1 }; e() }) };
  578. /*!
  579. * Parsley.js
  580. * Version 2.4.3 - built Sat, Jun 18th 2016, 9:01 pm
  581. * http://parsleyjs.org
  582. * Guillaume Potier - <guillaume@wisembly.com>
  583. * Marc-Andre Lafortune - <petroselinum@marc-andre.ca>
  584. * MIT Licensed
  585. */
  586. _slice = Array.prototype.slice; !function (n, t) { "object" == typeof exports && "undefined" != typeof module ? module.exports = t(require("jquery")) : "function" == typeof define && define.amd ? define(["jquery"], t) : n.parsley = t(n.jQuery) }(this, function (n) {
  587. "use strict"; function nt(n, t) { return n.parsleyAdaptedCallback || (n.parsleyAdaptedCallback = function () { var i = Array.prototype.slice.call(arguments, 0); i.unshift(this); n.apply(t || pt, i) }), n.parsleyAdaptedCallback } function u(n) { return 0 === n.lastIndexOf(et, 0) ? n.substr(et.length) : n } function st() { var t = this, i = window || global; n.extend(this, { isNativeEvent: function (n) { return n.originalEvent && n.originalEvent.isTrusted !== !1 }, fakeInputEvent: function (i) { t.isNativeEvent(i) && n(i.target).trigger("input") }, misbehaves: function (i) { t.isNativeEvent(i) && (t.behavesOk(i), n(document).on("change.inputevent", i.data.selector, t.fakeInputEvent), t.fakeInputEvent(i)) }, behavesOk: function (i) { t.isNativeEvent(i) && n(document).off("input.inputevent", i.data.selector, t.behavesOk).off("change.inputevent", i.data.selector, t.misbehaves) }, install: function () { var f, u, r; if (!i.inputEventPatched) for (i.inputEventPatched = "0.0.3", f = ["select", 'input[type="checkbox"]', 'input[type="radio"]', 'input[type="file"]'], u = 0; u < f.length; u++) { r = f[u]; n(document).on("input.inputevent", r, { selector: r }, t.behavesOk).on("change.inputevent", r, { selector: r }, t.misbehaves) } }, uninstall: function () { delete i.inputEventPatched; n(document).off(".inputevent") } }) } var w, l, a, o, it, f, b, k, rt, d, ut, e, g, h, v, i, ft, ot;
  588. /**
  589. * inputevent - Alleviate browser bugs for input events
  590. * https://github.com/marcandre/inputevent
  591. * @version v0.0.3 - (built Thu, Apr 14th 2016, 5:58 pm)
  592. * @author Marc-Andre Lafortune <github@marc-andre.ca>
  593. * @license MIT
  594. */
  595. var ht = 1, y = {}, ct = { attr: function (n, t, i) { var r, u, f, e = new RegExp("^" + t, "i"); if ("undefined" == typeof i) i = {}; else for (r in i) i.hasOwnProperty(r) && delete i[r]; if ("undefined" == typeof n || "undefined" == typeof n[0]) return i; for (f = n[0].attributes, r = f.length; r--;)u = f[r], u && u.specified && e.test(u.name) && (i[this.camelize(u.name.slice(t.length))] = this.deserializeValue(u.value)); return i }, checkAttr: function (n, t, i) { return n.is("[" + t + i + "]") }, setAttr: function (n, t, i, r) { n[0].setAttribute(this.dasherize(t + i), String(r)) }, generateID: function () { return "" + ht++ }, deserializeValue: function (t) { var i; try { return t ? "true" == t || ("false" == t ? !1 : "null" == t ? null : isNaN(i = Number(t)) ? /^[\[\{]/.test(t) ? n.parseJSON(t) : t : i) : t } catch (r) { return t } }, camelize: function (n) { return n.replace(/-+(.)?/g, function (n, t) { return t ? t.toUpperCase() : "" }) }, dasherize: function (n) { return n.replace(/::/g, "/").replace(/([A-Z]+)([A-Z][a-z])/g, "$1_$2").replace(/([a-z\d])([A-Z])/g, "$1_$2").replace(/_/g, "-").toLowerCase() }, warn: function () { var n; window.console && "function" == typeof window.console.warn && (n = window.console).warn.apply(n, arguments) }, warnOnce: function (n) { y[n] || (y[n] = !0, this.warn.apply(this, arguments)) }, _resetWarnings: function () { y = {} }, trimString: function (n) { return n.replace(/^\s+|\s+$/g, "") }, namespaceEvents: function (t, i) { return t = this.trimString(t || "").split(/\s+/), t[0] ? n.map(t, function (n) { return n + "." + i }).join(" ") : "" }, difference: function (t, i) { var r = []; return n.each(t, function (n, t) { -1 == i.indexOf(t) && r.push(t) }), r }, all: function (t) { return n.when.apply(n, _toConsumableArray(t).concat([42, 42])) }, objectCreate: Object.create || function () { var n = function () { }; return function (t) { if (arguments.length > 1) throw Error("Second argument not supported"); if ("object" != typeof t) throw TypeError("Argument must be an object"); n.prototype = t; var i = new n; return n.prototype = null, i } }() }, t = ct, tt = { namespace: "data-parsley-", inputs: "input, textarea, select", excluded: "input[type=button], input[type=submit], input[type=reset], input[type=hidden]", priorityEnabled: !0, multiple: null, group: null, uiEnabled: !0, validationThreshold: 3, focus: "first", trigger: !1, triggerAfterFailure: "input", errorClass: "parsley-error", successClass: "parsley-success", classHandler: function () { }, errorsContainer: function () { }, errorsWrapper: '<ul class="parsley-errors-list " style="display:none"><\/ul>', errorTemplate: "<li><\/li>" }, r = function () { this.__id__ = t.generateID() }; r.prototype = { asyncSupport: !0, _pipeAccordingToValidationResult: function () { var i = this, t = function () { var t = n.Deferred(); return !0 !== i.validationResult && t.reject(), t.resolve().promise() }; return [t, t] }, actualizeOptions: function () { return t.attr(this.$element, this.options.namespace, this.domOptions), this.parent && this.parent.actualizeOptions && this.parent.actualizeOptions(), this }, _resetOptions: function (n) { this.domOptions = t.objectCreate(this.parent.options); this.options = t.objectCreate(this.domOptions); for (var i in n) n.hasOwnProperty(i) && (this.options[i] = n[i]); this.actualizeOptions() }, _listeners: null, on: function (n, t) { this._listeners = this._listeners || {}; var i = this._listeners[n] = this._listeners[n] || []; return i.push(t), this }, subscribe: function (t, i) { n.listenTo(this, t.toLowerCase(), i) }, off: function (n, t) { var i = this._listeners && this._listeners[n], r; if (i) if (t) for (r = i.length; r--;)i[r] === t && i.splice(r, 1); else delete this._listeners[n]; return this }, unsubscribe: function (t) { n.unsubscribeTo(this, t.toLowerCase()) }, trigger: function (n, t, i) { var u, r, f; if (t = t || this, r = this._listeners && this._listeners[n], r) for (f = r.length; f--;)if (u = r[f].call(t, t, i), u === !1) return u; return this.parent ? this.parent.trigger(n, t, i) : !0 }, reset: function () { if ("ParsleyForm" !== this.__class__) return this._resetUI(), this._trigger("reset"); for (var n = 0; n < this.fields.length; n++)this.fields[n].reset(); this._trigger("reset") }, destroy: function () { if (this._destroyUI(), "ParsleyForm" !== this.__class__) return this.$element.removeData("Parsley"), this.$element.removeData("ParsleyFieldMultiple"), void this._trigger("destroy"); for (var n = 0; n < this.fields.length; n++)this.fields[n].destroy(); this.$element.removeData("Parsley"); this._trigger("destroy") }, asyncIsValid: function (n, i) { return t.warnOnce("asyncIsValid is deprecated; please use whenValid instead"), this.whenValid({ group: n, force: i }) }, _findRelated: function () { return this.options.multiple ? this.parent.$element.find("[" + this.options.namespace + 'multiple="' + this.options.multiple + '"]') : this.$element } }; var lt = { string: function (n) { return n }, integer: function (n) { if (isNaN(n)) throw 'Requirement is not an integer: "' + n + '"'; return parseInt(n, 10) }, number: function (n) { if (isNaN(n)) throw 'Requirement is not a number: "' + n + '"'; return parseFloat(n) }, reference: function (t) { var i = n(t); if (0 === i.length) throw 'No such reference: "' + t + '"'; return i }, boolean: function (n) { return "false" !== n }, object: function (n) { return t.deserializeValue(n) }, regexp: function (n) { var t = ""; return /^\/.*\/(?:[gimy]*)$/.test(n) ? (t = n.replace(/.*\/([gimy]*)$/, "$1"), n = n.replace(new RegExp("^/(.*?)/" + t + "$"), "$1")) : n = "^" + n + "$", new RegExp(n, t) } }, at = function (n, i) { var u = n.match(/^\s*\[(.*)\]\s*$/), r; if (!u) throw 'Requirement is not an array: "' + n + '"'; if (r = u[1].split(",").map(t.trimString), r.length !== i) throw "Requirement has " + r.length + " values when " + i + " are needed"; return r }, c = function (n, t) { var i = lt[n || "string"]; if (!i) throw 'Unknown requirement specification: "' + n + '"'; return i(t) }, vt = function (n, t, i) { var f = null, e = {}, r, u; for (r in n) r ? (u = i(r), "string" == typeof u && (u = c(n[r], u)), e[r] = u) : f = c(n[r], t); return [f, e] }, p = function (t) { n.extend(!0, this, t) }; if (p.prototype = { validate: function (t, i) { if (this.fn) return arguments.length > 3 && (i = [].slice.call(arguments, 1, -1)), this.fn.call(this, t, i); if (n.isArray(t)) { if (!this.validateMultiple) throw "Validator `" + this.name + "` does not handle multiple values"; return this.validateMultiple.apply(this, arguments) } if (this.validateNumber) return isNaN(t) ? !1 : (arguments[0] = parseFloat(arguments[0]), this.validateNumber.apply(this, arguments)); if (this.validateString) return this.validateString.apply(this, arguments); throw "Validator `" + this.name + "` only handles multiple values"; }, parseRequirements: function (t, i) { var r, f, u; if ("string" != typeof t) return n.isArray(t) ? t : [t]; if (r = this.requirementType, n.isArray(r)) { for (f = at(t, r.length), u = 0; u < f.length; u++)f[u] = c(r[u], f[u]); return f } return n.isPlainObject(r) ? vt(r, t, i) : [c(r, t)] }, requirementType: "string", priority: 2 }, w = function (n, t) { this.__class__ = "ParsleyValidatorRegistry"; this.locale = "en"; this.init(n || {}, t || {}) }, l = { email: /^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i, number: /^-?(\d*\.)?\d+(e[-+]?\d+)?$/i, integer: /^-?\d+$/, digits: /^\d+$/, alphanum: /^\w+$/i, url: new RegExp("^(?:(?:https?|ftp)://)?(?:\\S+(?::\\S*)?@)?(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))(?::\\d{2,5})?(?:/\\S*)?$", "i") }, l.range = l.number, a = function (n) { var t = ("" + n).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/); return t ? Math.max(0, (t[1] ? t[1].length : 0) - (t[2] ? +t[2] : 0)) : 0 }, w.prototype = { init: function (t, i) { this.catalog = i; this.validators = n.extend({}, this.validators); for (var r in t) this.addValidator(r, t[r].fn, t[r].priority); window.Parsley.trigger("parsley:validator:init") }, setLocale: function (n) { if ("undefined" == typeof this.catalog[n]) throw new Error(n + " is not available in the catalog"); return this.locale = n, this }, addCatalog: function (n, t, i) { return "object" == typeof t && (this.catalog[n] = t), !0 === i ? this.setLocale(n) : this }, addMessage: function (n, t, i) { return "undefined" == typeof this.catalog[n] && (this.catalog[n] = {}), this.catalog[n][t] = i, this }, addMessages: function (n, t) { for (var i in t) this.addMessage(n, i, t[i]); return this }, addValidator: function (n) { if (this.validators[n]) t.warn('Validator "' + n + '" is already defined.'); else if (tt.hasOwnProperty(n)) return void t.warn('"' + n + '" is a restricted keyword and is not a valid validator name.'); return this._setValidator.apply(this, arguments) }, updateValidator: function (n) { return this.validators[n] ? this._setValidator.apply(this, arguments) : (t.warn('Validator "' + n + '" is not already defined.'), this.addValidator.apply(this, arguments)) }, removeValidator: function (n) { return this.validators[n] || t.warn('Validator "' + n + '" is not defined.'), delete this.validators[n], this }, _setValidator: function (n, t, i) { "object" != typeof t && (t = { fn: t, priority: i }); t.validate || (t = new p(t)); this.validators[n] = t; for (var r in t.messages || {}) this.addMessage(r, n, t.messages[r]); return this }, getErrorMessage: function (n) { var t, i; return "type" === n.name ? (i = this.catalog[this.locale][n.name] || {}, t = i[n.requirements]) : t = this.formatMessage(this.catalog[this.locale][n.name], n.requirements), t || this.catalog[this.locale].defaultMessage || this.catalog.en.defaultMessage }, formatMessage: function (n, t) { if ("object" == typeof t) { for (var i in t) n = this.formatMessage(n, t[i]); return n } return "string" == typeof n ? n.replace(/%s/i, t) : "" }, validators: { notblank: { validateString: function (n) { return /\S/.test(n) }, priority: 2 }, required: { validateMultiple: function (n) { return n.length > 0 }, validateString: function (n) { return /\S/.test(n) }, priority: 512 }, type: { validateString: function (n, t) { var e = arguments.length <= 2 || void 0 === arguments[2] ? {} : arguments[2], o = e.step, r = void 0 === o ? "1" : o, s = e.base, h = void 0 === s ? 0 : s, c = l[t], u, f, i; if (!c) throw new Error("validator type `" + t + "` is not supported"); return c.test(n) ? "number" === t && !/^any$/i.test(r || "") && ((u = Number(n), f = Math.max(a(r), a(h)), a(u) > f) || (i = function (n) { return Math.round(n * Math.pow(10, f)) }, (i(u) - i(h)) % i(r) != 0)) ? !1 : !0 : !1 }, requirementType: { "": "string", step: "string", base: "number" }, priority: 256 }, pattern: { validateString: function (n, t) { return t.test(n) }, requirementType: "regexp", priority: 64 }, minlength: { validateString: function (n, t) { return n.length >= t }, requirementType: "integer", priority: 30 }, maxlength: { validateString: function (n, t) { return n.length <= t }, requirementType: "integer", priority: 30 }, length: { validateString: function (n, t, i) { return n.length >= t && n.length <= i }, requirementType: ["integer", "integer"], priority: 30 }, mincheck: { validateMultiple: function (n, t) { return n.length >= t }, requirementType: "integer", priority: 30 }, maxcheck: { validateMultiple: function (n, t) { return n.length <= t }, requirementType: "integer", priority: 30 }, check: { validateMultiple: function (n, t, i) { return n.length >= t && n.length <= i }, requirementType: ["integer", "integer"], priority: 30 }, min: { validateNumber: function (n, t) { return n >= t }, requirementType: "number", priority: 30 }, max: { validateNumber: function (n, t) { return t >= n }, requirementType: "number", priority: 30 }, range: { validateNumber: function (n, t, i) { return n >= t && i >= n }, requirementType: ["number", "number"], priority: 30 }, equalto: { validateString: function (t, i) { var r = n(i); return r.length ? t === r.val() : t === i }, priority: 256 } } }, o = {}, it = function yt(n, t, i) { for (var f, u, e = [], o = [], r = 0; r < n.length; r++) { for (f = !1, u = 0; u < t.length; u++)if (n[r].assert.name === t[u].assert.name) { f = !0; break } f ? o.push(n[r]) : e.push(n[r]) } return { kept: o, added: e, removed: i ? [] : yt(t, n, !0).added } }, o.Form = { _actualizeTriggers: function () { var n = this; this.$element.on("submit.Parsley", function (t) { n.onSubmitValidate(t) }); this.$element.on("click.Parsley", 'input[type="submit"], button[type="submit"]', function (t) { n.onSubmitButton(t) }); !1 !== this.options.uiEnabled && this.$element.attr("novalidate", "") }, focus: function () { var t, n; if (this._focusedField = null, !0 === this.validationResult || "none" === this.options.focus) return null; for (t = 0; t < this.fields.length; t++)if (n = this.fields[t], !0 !== n.validationResult && n.validationResult.length > 0 && "undefined" == typeof n.options.noFocus && (this._focusedField = n.$element, "first" === this.options.focus)) break; return null === this._focusedField ? null : this._focusedField.focus() }, _destroyUI: function () { this.$element.off(".Parsley") } }, o.Field = { _reflowUI: function () { if (this._buildUI(), this._ui) { var n = it(this.validationResult, this._ui.lastValidationResult); this._ui.lastValidationResult = this.validationResult; this._manageStatusClass(); this._manageErrorsMessages(n); this._actualizeTriggers(); !n.kept.length && !n.added.length || this._failedOnce || (this._failedOnce = !0, this._actualizeTriggers()) } }, getErrorsMessages: function () { if (!0 === this.validationResult) return []; for (var t = [], n = 0; n < this.validationResult.length; n++)t.push(this.validationResult[n].errorMessage || this._getErrorMessage(this.validationResult[n].assert)); return t }, addError: function (n) { var t = arguments.length <= 1 || void 0 === arguments[1] ? {} : arguments[1], r = t.message, u = t.assert, i = t.updateClass, f = void 0 === i ? !0 : i; this._buildUI(); this._addError(n, { message: r, assert: u }); f && this._errorClass() }, updateError: function (n) { var t = arguments.length <= 1 || void 0 === arguments[1] ? {} : arguments[1], r = t.message, u = t.assert, i = t.updateClass, f = void 0 === i ? !0 : i; this._buildUI(); this._updateError(n, { message: r, assert: u }); f && this._errorClass() }, removeError: function (n) { var i = arguments.length <= 1 || void 0 === arguments[1] ? {} : arguments[1], t = i.updateClass, r = void 0 === t ? !0 : t; this._buildUI(); this._removeError(n); r && this._manageStatusClass() }, _manageStatusClass: function () { this.hasConstraints() && this.needsValidation() && !0 === this.validationResult ? this._successClass() : this.validationResult.length > 0 ? this._errorClass() : this._resetClass() }, _manageErrorsMessages: function (t) { if ("undefined" == typeof this.options.errorsMessagesDisabled) { if ("undefined" != typeof this.options.errorMessage) return t.added.length || t.kept.length ? (this._insertErrorWrapper(), 0 === this._ui.$errorsWrapper.find(".parsley-custom-error-message").length && this._ui.$errorsWrapper.append(n(this.options.errorTemplate).addClass("parsley-custom-error-message")), this._ui.$errorsWrapper.addClass("filled").find(".parsley-custom-error-message").html(this.options.errorMessage)) : this._ui.$errorsWrapper.removeClass("filled").find(".parsley-custom-error-message").remove(); for (var i = 0; i < t.removed.length; i++)this._removeError(t.removed[i].assert.name); for (i = 0; i < t.added.length; i++)this._addError(t.added[i].assert.name, { message: t.added[i].errorMessage, assert: t.added[i].assert }); for (i = 0; i < t.kept.length; i++)this._updateError(t.kept[i].assert.name, { message: t.kept[i].errorMessage, assert: t.kept[i].assert }) } }, _addError: function (t, i) { var r = i.message, u = i.assert; this._insertErrorWrapper(); this._ui.$errorsWrapper.addClass("filled").append(n(this.options.errorTemplate).addClass("parsley-" + t).html(r || this._getErrorMessage(u))) }, _updateError: function (n, t) { var i = t.message, r = t.assert; this._ui.$errorsWrapper.addClass("filled").find(".parsley-" + n).html(i || this._getErrorMessage(r)) }, _removeError: function (n) { this._ui.$errorsWrapper.removeClass("filled").find(".parsley-" + n).remove() }, _getErrorMessage: function (n) { var t = n.name + "Message"; return "undefined" != typeof this.options[t] ? window.Parsley.formatMessage(this.options[t], n.requirements) : window.Parsley.getErrorMessage(n) }, _buildUI: function () { if (!this._ui && !1 !== this.options.uiEnabled) { var t = {}; this.$element.attr(this.options.namespace + "id", this.__id__); t.$errorClassHandler = this._manageClassHandler(); t.errorsWrapperId = "parsley-id-" + (this.options.multiple ? "multiple-" + this.options.multiple : this.__id__); t.$errorsWrapper = n(this.options.errorsWrapper).attr("id", t.errorsWrapperId); t.lastValidationResult = []; t.validationInformationVisible = !1; this._ui = t } }, _manageClassHandler: function () { if ("string" == typeof this.options.classHandler && n(this.options.classHandler).length) return n(this.options.classHandler); var t = this.options.classHandler.call(this, this); return "undefined" != typeof t && t.length ? t : !this.options.multiple || this.$element.is("select") ? this.$element : this.$element.parent() }, _insertErrorWrapper: function () { var i, r; if (0 !== this._ui.$errorsWrapper.parent().length) return this._ui.$errorsWrapper.parent(); if ("string" == typeof this.options.errorsContainer) { if (n(this.options.errorsContainer).length) return n(this.options.errorsContainer).append(this._ui.$errorsWrapper); t.warn("The errors container `" + this.options.errorsContainer + "` does not exist in DOM") } else "function" == typeof this.options.errorsContainer && (i = this.options.errorsContainer.call(this, this)); return "undefined" != typeof i && i.length ? i.append(this._ui.$errorsWrapper) : (r = this.$element, this.options.multiple && (r = r.parent()), r.after(this._ui.$errorsWrapper)) }, _actualizeTriggers: function () { var i, r = this, n = this._findRelated(); n.off(".Parsley"); this._failedOnce ? n.on(t.namespaceEvents(this.options.triggerAfterFailure, "Parsley"), function () { r.validate() }) : (i = t.namespaceEvents(this.options.trigger, "Parsley")) && n.on(i, function (n) { r._eventValidate(n) }) }, _eventValidate: function (n) { !(!/key|input/.test(n.type) || this._ui && this._ui.validationInformationVisible) && this.getValue().length <= this.options.validationThreshold || this.validate() }, _resetUI: function () { this._failedOnce = !1; this._actualizeTriggers(); "undefined" != typeof this._ui && (this._ui.$errorsWrapper.removeClass("filled").children().remove(), this._resetClass(), this._ui.lastValidationResult = [], this._ui.validationInformationVisible = !1) }, _destroyUI: function () { this._resetUI(); "undefined" != typeof this._ui && this._ui.$errorsWrapper.remove(); delete this._ui }, _successClass: function () { this._ui.validationInformationVisible = !0; this._ui.$errorClassHandler.removeClass(this.options.errorClass).addClass(this.options.successClass) }, _errorClass: function () { this._ui.validationInformationVisible = !0; this._ui.$errorClassHandler.removeClass(this.options.successClass).addClass(this.options.errorClass) }, _resetClass: function () { this._ui.$errorClassHandler.removeClass(this.options.successClass).removeClass(this.options.errorClass) } }, f = function (t, i, r) { this.__class__ = "ParsleyForm"; this.$element = n(t); this.domOptions = i; this.options = r; this.parent = window.Parsley; this.fields = []; this.validationResult = null }, b = { pending: null, resolved: !0, rejected: !1 }, f.prototype = { onSubmitValidate: function (n) { var r = this, i, t; !0 !== n.parsley && (i = this._$submitSource || this.$element.find('input[type="submit"], button[type="submit"]').first(), (this._$submitSource = null, this.$element.find(".parsley-synthetic-submit-button").prop("disabled", !0), i.is("[formnovalidate]")) || (t = this.whenValidate({ event: n }), "resolved" === t.state() && !1 !== this._trigger("submit") || (n.stopImmediatePropagation(), n.preventDefault(), "pending" === t.state() && t.done(function () { r._submit(i) })))) }, onSubmitButton: function (t) { this._$submitSource = n(t.currentTarget) }, _submit: function (t) { if (!1 !== this._trigger("submit")) { if (t) { var i = this.$element.find(".parsley-synthetic-submit-button").prop("disabled", !1); 0 === i.length && (i = n('<input class="parsley-synthetic-submit-button" type="hidden">').appendTo(this.$element)); i.attr({ name: t.attr("name"), value: t.attr("value") }) } this.$element.trigger(n.extend(n.Event("submit"), { parsley: !0 })) } }, validate: function (i) { if (arguments.length >= 1 && !n.isPlainObject(i)) { t.warnOnce("Calling validate on a parsley form without passing arguments as an object is deprecated."); var r = _slice.call(arguments), u = r[0], f = r[1], e = r[2]; i = { group: u, force: f, event: e } } return b[this.whenValidate(i).state()] }, whenValidate: function () { var f, i = this, r = arguments.length <= 0 || void 0 === arguments[0] ? {} : arguments[0], o = r.group, s = r.force, u = r.event, e; return this.submitEvent = u, u && (this.submitEvent = n.extend({}, u, { preventDefault: function () { t.warnOnce("Using `this.submitEvent.preventDefault()` is deprecated; instead, call `this.validationResult = false`"); i.validationResult = !1 } })), this.validationResult = !0, this._trigger("validate"), this._refreshFields(), e = this._withoutReactualizingFormOptions(function () { return n.map(i.fields, function (n) { return n.whenValidate({ force: s, group: o }) }) }), (f = t.all(e).done(function () { i._trigger("success") }).fail(function () { i.validationResult = !1; i.focus(); i._trigger("error") }).always(function () { i._trigger("validated") })).pipe.apply(f, _toConsumableArray(this._pipeAccordingToValidationResult())) }, isValid: function (i) { if (arguments.length >= 1 && !n.isPlainObject(i)) { t.warnOnce("Calling isValid on a parsley form without passing arguments as an object is deprecated."); var r = _slice.call(arguments), u = r[0], f = r[1]; i = { group: u, force: f } } return b[this.whenValid(i).state()] }, whenValid: function () { var u = this, i = arguments.length <= 0 || void 0 === arguments[0] ? {} : arguments[0], f = i.group, e = i.force, r; return this._refreshFields(), r = this._withoutReactualizingFormOptions(function () { return n.map(u.fields, function (n) { return n.whenValid({ group: f, force: e }) }) }), t.all(r) }, _refreshFields: function () { return this.actualizeOptions()._bindFields() }, _bindFields: function () { var i = this, r = this.fields; return this.fields = [], this.fieldsMappedById = {}, this._withoutReactualizingFormOptions(function () { i.$element.find(i.options.inputs).not(i.options.excluded).each(function (n, t) { var r = new window.Parsley.Factory(t, {}, i); "ParsleyField" !== r.__class__ && "ParsleyFieldMultiple" !== r.__class__ || !0 === r.options.excluded || "undefined" == typeof i.fieldsMappedById[r.__class__ + "-" + r.__id__] && (i.fieldsMappedById[r.__class__ + "-" + r.__id__] = r, i.fields.push(r)) }); n.each(t.difference(r, i.fields), function (n, t) { t._trigger("reset") }) }), this }, _withoutReactualizingFormOptions: function (n) { var i = this.actualizeOptions, t; return this.actualizeOptions = function () { return this }, t = n(), this.actualizeOptions = i, t }, _trigger: function (n) { return this.trigger("form:" + n) } }, k = function (t, i, r, u, f) { if (!/ParsleyField/.test(t.__class__)) throw new Error("ParsleyField or ParsleyFieldMultiple instance expected"); var o = window.Parsley._validatorRegistry.validators[i], e = new p(o); n.extend(this, { validator: e, name: i, requirements: r, priority: u || t.options[i + "Priority"] || e.priority, isDomConstraint: !0 === f }); this._parseRequirements(t.options) }, rt = function (n) { var t = n[0].toUpperCase(); return t + n.slice(1) }, k.prototype = { validate: function (n, t) { var i; return (i = this.validator).validate.apply(i, [n].concat(_toConsumableArray(this.requirementList), [t])) }, _parseRequirements: function (n) { var t = this; this.requirementList = this.validator.parseRequirements(this.requirements, function (i) { return n[t.name + rt(i)] }) } }, d = function (t, i, r, u) { this.__class__ = "ParsleyField"; this.$element = n(t); "undefined" != typeof u && (this.parent = u); this.options = r; this.domOptions = i; this.constraints = []; this.constraintsByName = {}; this.validationResult = !0; this._bindConstraints() }, ut = { pending: null, resolved: !0, rejected: !1 }, d.prototype = { validate: function (i) { arguments.length >= 1 && !n.isPlainObject(i) && (t.warnOnce("Calling validate on a parsley field without passing arguments as an object is deprecated."), i = { options: i }); var r = this.whenValidate(i); if (!r) return !0; switch (r.state()) { case "pending": return null; case "resolved": return !0; case "rejected": return this.validationResult } }, whenValidate: function () { var t, n = this, i = arguments.length <= 0 || void 0 === arguments[0] ? {} : arguments[0], u = i.force, r = i.group; return this.refreshConstraints(), !r || this._isInGroup(r) ? (this.value = this.getValue(), this._trigger("validate"), (t = this.whenValid({ force: u, value: this.value, _refreshed: !0 }).always(function () { n._reflowUI() }).done(function () { n._trigger("success") }).fail(function () { n._trigger("error") }).always(function () { n._trigger("validated") })).pipe.apply(t, _toConsumableArray(this._pipeAccordingToValidationResult()))) : void 0 }, hasConstraints: function () { return 0 !== this.constraints.length }, needsValidation: function (n) { return "undefined" == typeof n && (n = this.getValue()), !(!n.length && !this._isRequired() && "undefined" == typeof this.options.validateIfEmpty) }, _isInGroup: function (t) { return n.isArray(this.options.group) ? -1 !== n.inArray(t, this.options.group) : this.options.group === t }, isValid: function (i) { var r; if (arguments.length >= 1 && !n.isPlainObject(i)) { t.warnOnce("Calling isValid on a parsley field without passing arguments as an object is deprecated."); var u = _slice.call(arguments), f = u[0], e = u[1]; i = { force: f, value: e } } return r = this.whenValid(i), r ? ut[r.state()] : !0 }, whenValid: function () { var s = this, r = arguments.length <= 0 || void 0 === arguments[0] ? {} : arguments[0], f = r.force, h = void 0 === f ? !1 : f, i = r.value, e = r.group, c = r._refreshed, o, u; if (c || this.refreshConstraints(), !e || this._isInGroup(e)) return (this.validationResult = !0, !this.hasConstraints()) ? n.when() : ("undefined" != typeof i && null !== i || (i = this.getValue()), !this.needsValidation(i) && !0 !== h) ? n.when() : (o = this._getGroupedConstraints(), u = [], n.each(o, function (r, f) { var e = t.all(n.map(f, function (n) { return s._validateConstraint(i, n) })); return u.push(e), "rejected" === e.state() ? !1 : void 0 }), t.all(u)) }, _validateConstraint: function (i, r) { var u = this, f = r.validate(i, this); return !1 === f && (f = n.Deferred().reject()), t.all([f]).fail(function (n) { u.validationResult instanceof Array || (u.validationResult = []); u.validationResult.push({ assert: r, errorMessage: "string" == typeof n && n }) }) }, getValue: function () { var n; return n = "function" == typeof this.options.value ? this.options.value(this) : "undefined" != typeof this.options.value ? this.options.value : this.$element.val(), "undefined" == typeof n || null === n ? "" : this._handleWhitespace(n) }, refreshConstraints: function () { return this.actualizeOptions()._bindConstraints() }, addConstraint: function (n, t, i, r) { if (window.Parsley._validatorRegistry.validators[n]) { var u = new k(this, n, t, i, r); "undefined" !== this.constraintsByName[u.name] && this.removeConstraint(u.name); this.constraints.push(u); this.constraintsByName[u.name] = u } return this }, removeConstraint: function (n) { for (var t = 0; t < this.constraints.length; t++)if (n === this.constraints[t].name) { this.constraints.splice(t, 1); break } return delete this.constraintsByName[n], this }, updateConstraint: function (n, t, i) { return this.removeConstraint(n).addConstraint(n, t, i) }, _bindConstraints: function () { for (var t, i = [], r = {}, n = 0; n < this.constraints.length; n++)!1 === this.constraints[n].isDomConstraint && (i.push(this.constraints[n]), r[this.constraints[n].name] = this.constraints[n]); this.constraints = i; this.constraintsByName = r; for (t in this.options) this.addConstraint(t, this.options[t], void 0, !0); return this._bindHtml5Constraints() }, _bindHtml5Constraints: function () { (this.$element.hasClass("required") || this.$element.attr("required")) && this.addConstraint("required", !0, void 0, !0); "string" == typeof this.$element.attr("pattern") && this.addConstraint("pattern", this.$element.attr("pattern"), void 0, !0); "undefined" != typeof this.$element.attr("min") && "undefined" != typeof this.$element.attr("max") ? this.addConstraint("range", [this.$element.attr("min"), this.$element.attr("max")], void 0, !0) : "undefined" != typeof this.$element.attr("min") ? this.addConstraint("min", this.$element.attr("min"), void 0, !0) : "undefined" != typeof this.$element.attr("max") && this.addConstraint("max", this.$element.attr("max"), void 0, !0); "undefined" != typeof this.$element.attr("minlength") && "undefined" != typeof this.$element.attr("maxlength") ? this.addConstraint("length", [this.$element.attr("minlength"), this.$element.attr("maxlength")], void 0, !0) : "undefined" != typeof this.$element.attr("minlength") ? this.addConstraint("minlength", this.$element.attr("minlength"), void 0, !0) : "undefined" != typeof this.$element.attr("maxlength") && this.addConstraint("maxlength", this.$element.attr("maxlength"), void 0, !0); var n = this.$element.attr("type"); return "undefined" == typeof n ? this : "number" === n ? this.addConstraint("type", ["number", { step: this.$element.attr("step"), base: this.$element.attr("min") || this.$element.attr("value") }], void 0, !0) : /^(email|url|range)$/i.test(n) ? this.addConstraint("type", n, void 0, !0) : this }, _isRequired: function () { return "undefined" == typeof this.constraintsByName.required ? !1 : !1 !== this.constraintsByName.required.requirements }, _trigger: function (n) { return this.trigger("field:" + n) }, _handleWhitespace: function (n) { return !0 === this.options.trimValue && t.warnOnce('data-parsley-trim-value="true" is deprecated, please use data-parsley-whitespace="trim"'), "squish" === this.options.whitespace && (n = n.replace(/\s{2,}/g, " ")), "trim" !== this.options.whitespace && "squish" !== this.options.whitespace && !0 !== this.options.trimValue || (n = t.trimString(n)), n }, _getGroupedConstraints: function () { var t; if (!1 === this.options.priorityEnabled) return [this.constraints]; for (var i = [], r = {}, n = 0; n < this.constraints.length; n++)t = this.constraints[n].priority, r[t] || i.push(r[t] = []), r[t].push(this.constraints[n]); return i.sort(function (n, t) { return t[0].priority - n[0].priority }), i } }, e = d, g = function () { this.__class__ = "ParsleyFieldMultiple" }, g.prototype = { addElement: function (n) { return this.$elements.push(n), this }, refreshConstraints: function () { var i, r, t; if (this.constraints = [], this.$element.is("select")) return this.actualizeOptions()._bindConstraints(), this; for (r = 0; r < this.$elements.length; r++)if (n("html").has(this.$elements[r]).length) for (i = this.$elements[r].data("ParsleyFieldMultiple").refreshConstraints().constraints, t = 0; t < i.length; t++)this.addConstraint(i[t].name, i[t].requirements, i[t].priority, i[t].isDomConstraint); else this.$elements.splice(r, 1); return this }, getValue: function () { if ("function" == typeof this.options.value) return this.options.value(this); if ("undefined" != typeof this.options.value) return this.options.value; if (this.$element.is("input[type=radio]")) return this._findRelated().filter(":checked").val() || ""; if (this.$element.is("input[type=checkbox]")) { var t = []; return this._findRelated().filter(":checked").each(function () { t.push(n(this).val()) }), t } return this.$element.is("select") && null === this.$element.val() ? [] : this.$element.val() }, _init: function () { return this.$elements = [this.$element], this } }, h = function (t, i, r) { this.$element = n(t); var u = this.$element.data("Parsley"); if (u) return "undefined" != typeof r && u.parent === window.Parsley && (u.parent = r, u._resetOptions(u.options)), "object" == typeof i && n.extend(u.options, i), u; if (!this.$element.length) throw new Error("You must bind Parsley on an existing element."); if ("undefined" != typeof r && "ParsleyForm" !== r.__class__) throw new Error("Parent instance must be a ParsleyForm instance"); return this.parent = r || window.Parsley, this.init(i) }, h.prototype = { init: function (n) { return this.__class__ = "Parsley", this.__version__ = "2.4.3", this.__id__ = t.generateID(), this._resetOptions(n), this.$element.is("form") || t.checkAttr(this.$element, this.options.namespace, "validate") && !this.$element.is(this.options.inputs) ? this.bind("parsleyForm") : this.isMultiple() ? this.handleMultiple() : this.bind("parsleyField") }, isMultiple: function () { return this.$element.is("input[type=radio], input[type=checkbox]") || this.$element.is("select") && "undefined" != typeof this.$element.attr("multiple") }, handleMultiple: function () { var u, i, e = this, f, r; if (this.options.multiple || ("undefined" != typeof this.$element.attr("name") && this.$element.attr("name").length ? this.options.multiple = u = this.$element.attr("name") : "undefined" != typeof this.$element.attr("id") && this.$element.attr("id").length && (this.options.multiple = this.$element.attr("id"))), this.$element.is("select") && "undefined" != typeof this.$element.attr("multiple")) return this.options.multiple = this.options.multiple || this.__id__, this.bind("parsleyFieldMultiple"); if (!this.options.multiple) return t.warn("To be bound by Parsley, a radio, a checkbox and a multiple select input must have either a name or a multiple option.", this.$element), this; for (this.options.multiple = this.options.multiple.replace(/(:|\.|\[|\]|\{|\}|\$)/g, ""), "undefined" != typeof u && n('input[name="' + u + '"]').each(function (t, i) { n(i).is("input[type=radio], input[type=checkbox]") && n(i).attr(e.options.namespace + "multiple", e.options.multiple) }), f = this._findRelated(), r = 0; r < f.length; r++)if (i = n(f.get(r)).data("Parsley"), "undefined" != typeof i) { this.$element.data("ParsleyFieldMultiple") || i.addElement(this.$element); break } return this.bind("parsleyField", !0), i || this.bind("parsleyFieldMultiple") }, bind: function (i, u) { var o; switch (i) { case "parsleyForm": o = n.extend(new f(this.$element, this.domOptions, this.options), new r, window.ParsleyExtend)._bindFields(); break; case "parsleyField": o = n.extend(new e(this.$element, this.domOptions, this.options, this.parent), new r, window.ParsleyExtend); break; case "parsleyFieldMultiple": o = n.extend(new e(this.$element, this.domOptions, this.options, this.parent), new g, new r, window.ParsleyExtend)._init(); break; default: throw new Error(i + "is not a supported Parsley type"); }return this.options.multiple && t.setAttr(this.$element, this.options.namespace, "multiple", this.options.multiple), "undefined" != typeof u ? (this.$element.data("ParsleyFieldMultiple", o), o) : (this.$element.data("Parsley", o), o._actualizeTriggers(), o._trigger("init"), o) } }, v = n.fn.jquery.split("."), parseInt(v[0]) <= 1 && parseInt(v[1]) < 8) throw "The loaded version of jQuery is too old. Please upgrade to 1.8.x or better."; v.forEach || t.warn("Parsley requires ES5 to run properly. Please include https://github.com/es-shims/es5-shim"); i = n.extend(new r, { $element: n(document), actualizeOptions: null, _resetOptions: null, Factory: h, version: "2.4.3" }); n.extend(e.prototype, o.Field, r.prototype); n.extend(f.prototype, o.Form, r.prototype); n.extend(h.prototype, r.prototype); n.fn.parsley = n.fn.psly = function (i) { if (this.length > 1) { var r = []; return this.each(function () { r.push(n(this).parsley(i)) }), r } return n(this).length ? new h(this, i) : void t.warn("You must bind Parsley on an existing element.") }; "undefined" == typeof ParsleyExtend && (window.ParsleyExtend = {}); i.options = n.extend(t.objectCreate(tt), window.ParsleyConfig); window.ParsleyConfig = i.options; window.Parsley = window.psly = i; window.ParsleyUtils = t; ft = window.Parsley._validatorRegistry = new w(window.ParsleyConfig.validators, window.ParsleyConfig.i18n); window.ParsleyValidator = {}; n.each("setLocale addCatalog addMessage addMessages getErrorMessage formatMessage addValidator updateValidator removeValidator".split(" "), function (i, r) { window.Parsley[r] = n.proxy(ft, r); window.ParsleyValidator[r] = function () { var n; return t.warnOnce("Accessing the method '" + r + "' through ParsleyValidator is deprecated. Simply call 'window.Parsley." + r + "(...)'"), (n = window.Parsley)[r].apply(n, arguments) } }); window.Parsley.UI = o; window.ParsleyUI = { removeError: function (n, i, r) { var u = !0 !== r; return t.warnOnce("Accessing ParsleyUI is deprecated. Call 'removeError' on the instance directly. Please comment in issue 1073 as to your need to call this method."), n.removeError(i, { updateClass: u }) }, getErrorsMessages: function (n) { return t.warnOnce("Accessing ParsleyUI is deprecated. Call 'getErrorsMessages' on the instance directly."), n.getErrorsMessages() } }; n.each("addError updateError".split(" "), function (n, i) { window.ParsleyUI[i] = function (n, r, u, f, e) { var o = !0 !== e; return t.warnOnce("Accessing ParsleyUI is deprecated. Call '" + i + "' on the instance directly. Please comment in issue 1073 as to your need to call this method."), n[i](r, { message: u, assert: f, updateClass: o }) } }); !1 !== window.ParsleyConfig.autoBind && n(function () { n("[data-parsley-validate]").length && n("[data-parsley-validate]").parsley() }); var pt = n({}), s = function () { t.warnOnce("Parsley's pubsub module is deprecated; use the 'on' and 'off' methods on parsley instances or window.Parsley") }, et = "parsley:"; return n.listen = function (n, t) { var i; if (s(), "object" == typeof arguments[1] && "function" == typeof arguments[2] && (i = arguments[1], t = arguments[2]), "function" != typeof t) throw new Error("Wrong parameters"); window.Parsley.on(u(n), nt(t, i)) }, n.listenTo = function (n, t, i) { if (s(), !(n instanceof e || n instanceof f)) throw new Error("Must give Parsley instance"); if ("string" != typeof t || "function" != typeof i) throw new Error("Wrong parameters"); n.on(u(t), nt(i)) }, n.unsubscribe = function (n, t) { if (s(), "string" != typeof n || "function" != typeof t) throw new Error("Wrong arguments"); window.Parsley.off(u(n), t.parsleyAdaptedCallback) }, n.unsubscribeTo = function (n, t) { if (s(), !(n instanceof e || n instanceof f)) throw new Error("Must give Parsley instance"); n.off(u(t)) }, n.unsubscribeAll = function (t) { s(); window.Parsley.off(u(t)); n("form,input,textarea,select").each(function () { var i = n(this).data("Parsley"); i && i.off(u(t)) }) }, n.emit = function (n, t) { var o, i, r; s(); i = t instanceof e || t instanceof f; r = Array.prototype.slice.call(arguments, i ? 2 : 1); r.unshift(u(n)); i || (t = window.Parsley); (o = t).trigger.apply(o, _toConsumableArray(r)) }, n.extend(!0, i, { asyncValidators: { "default": { fn: function (n) { return n.status >= 200 && n.status < 300 }, url: !1 }, reverse: { fn: function (n) { return n.status < 200 || n.status >= 300 }, url: !1 } }, addAsyncValidator: function (n, t, r, u) { return i.asyncValidators[n] = { fn: t, url: r || !1, options: u || {} }, this } }), i.addValidator("remote", { requirementType: { "": "string", validator: "string", reverse: "boolean", options: "object" }, validateString: function (t, r, u, f) { var o, s, l = {}, e = u.validator || (!0 === u.reverse ? "reverse" : "default"), a, h, c; if ("undefined" == typeof i.asyncValidators[e]) throw new Error("Calling an undefined async validator: `" + e + "`"); return r = i.asyncValidators[e].url || r, r.indexOf("{value}") > -1 ? r = r.replace("{value}", encodeURIComponent(t)) : l[f.$element.attr("name") || f.$element.attr("id")] = t, a = n.extend(!0, u.options || {}, i.asyncValidators[e].options), o = n.extend(!0, {}, { url: r, data: l, type: "GET" }, a), f.trigger("field:ajaxoptions", f, o), s = n.param(o), "undefined" == typeof i._remoteCache && (i._remoteCache = {}), h = i._remoteCache[s] = i._remoteCache[s] || n.ajax(o), c = function () { var t = i.asyncValidators[e].fn.call(f, h, r, u); return t || (t = n.Deferred().reject()), n.when(t) }, h.then(c, c) }, priority: -1 }), i.on("form:submit", function () { i._remoteCache = {} }), window.ParsleyExtend.addAsyncValidator = function () { return ParsleyUtils.warnOnce("Accessing the method `addAsyncValidator` through an instance is deprecated. Simply call `Parsley.addAsyncValidator(...)`"), i.addAsyncValidator.apply(i, arguments) }, i.addMessages("en", { defaultMessage: "This value seems to be invalid.", type: { email: "This value should be a valid email.", url: "This value should be a valid url.", number: "This value should be a valid number.", integer: "This value should be a valid integer.", digits: "This value should be digits.", alphanum: "This value should be alphanumeric." }, notblank: "This value should not be blank.", required: "This value is required.", pattern: "This value seems to be invalid.", min: "This value should be greater than or equal to %s.", max: "This value should be lower than or equal to %s.", range: "This value should be between %s and %s.", minlength: "This value is too short. It should have %s characters or more.", maxlength: "This value is too long. It should have %s characters or fewer.", length: "This value length is invalid. It should be between %s and %s characters long.", mincheck: "You must select at least %s choices.", maxcheck: "You must select %s choices or fewer.", check: "You must select between %s and %s choices.", equalto: "This value should be the same." }), i.setLocale("en"), ot = new st, ot.install(), i
  596. });
  597. /*!
  598. * SQLParser 1.2.3
  599. * Copyright 2012-2015 Andy Kent <andy@forward.co.uk>
  600. * Copyright 2015-2018 Damien "Mistic" Sorel (https://www.strangeplanet.fr)
  601. * Licensed under MIT (http://opensource.org/licenses/MIT)
  602. */
  603. !function (n) { var t = function () { function n(t) { return n[t] } return n["./lexer"] = new function () { var n = this; (function () { var t; t = function () { function n(n, t) { var i, r; for (null == t && (t = {}), this.sql = n, this.preserveWhitespace = t.preserveWhitespace || !1, this.tokens = [], this.currentLine = 1, this.currentOffset = 0, r = 0; this.chunk = n.slice(r);) { if ((i = this.keywordToken() || this.starToken() || this.booleanToken() || this.functionToken() || this.windowExtension() || this.sortOrderToken() || this.seperatorToken() || this.operatorToken() || this.numberToken() || this.mathToken() || this.dotToken() || this.conditionalToken() || this.betweenToken() || this.subSelectOpToken() || this.subSelectUnaryOpToken() || this.stringToken() || this.parameterToken() || this.parensToken() || this.whitespaceToken() || this.literalToken()) < 1) throw new Error("NOTHING CONSUMED: Stopped at - '" + this.chunk.slice(0, 30) + "'"); r += i; this.currentOffset += i } this.token("EOF", ""); this.postProcess() } var t, i, r, u, f, e, o, s, h, c, l, a, v, y, p, w, b, k; return n.prototype.postProcess = function () { var t, i, r, u, e, f, n; for (f = this.tokens, n = [], t = u = 0, e = f.length; u < e; t = ++u)r = f[t], "STAR" === r[0] ? (i = this.tokens[t + 1], "SEPARATOR" !== i[0] && "FROM" !== i[0] ? n.push(r[0] = "MATH_MULTI") : n.push(void 0)) : n.push(void 0); return n }, n.prototype.token = function (n, t) { return this.tokens.push([n, t, this.currentLine, this.currentOffset]) }, n.prototype.tokenizeFromStringRegex = function (n, t, i, r, u) { var f, e; return null == i && (i = 0), null == r && (r = i), null == u && (u = !0), (f = t.exec(this.chunk)) ? (e = f[i].replace(/''/g, "'"), u && this.token(n, e), f[r].length) : 0 }, n.prototype.tokenizeFromRegex = function (n, t, i, r, u) { var f, e; return null == i && (i = 0), null == r && (r = i), null == u && (u = !0), (f = t.exec(this.chunk)) ? (e = f[i], u && this.token(n, e), f[r].length) : 0 }, n.prototype.tokenizeFromWord = function (n, t) { var i, r; return null == t && (t = n), t = this.regexEscape(t), r = /^\w+$/.test(t) ? new RegExp("^(" + t + ")\\b", "ig") : new RegExp("^(" + t + ")", "ig"), (i = r.exec(this.chunk)) ? (this.token(n, i[1]), i[1].length) : 0 }, n.prototype.tokenizeFromList = function (n, t) { var u, r, i, f; for (r = 0, i = 0, f = t.length; i < f && (u = t[i], !((r = this.tokenizeFromWord(n, u)) > 0)); i++); return r }, n.prototype.keywordToken = function () { return this.tokenizeFromWord("SELECT") || this.tokenizeFromWord("INSERT") || this.tokenizeFromWord("INTO") || this.tokenizeFromWord("DEFAULT") || this.tokenizeFromWord("VALUES") || this.tokenizeFromWord("DISTINCT") || this.tokenizeFromWord("FROM") || this.tokenizeFromWord("WHERE") || this.tokenizeFromWord("GROUP") || this.tokenizeFromWord("ORDER") || this.tokenizeFromWord("BY") || this.tokenizeFromWord("HAVING") || this.tokenizeFromWord("LIMIT") || this.tokenizeFromWord("JOIN") || this.tokenizeFromWord("LEFT") || this.tokenizeFromWord("RIGHT") || this.tokenizeFromWord("INNER") || this.tokenizeFromWord("OUTER") || this.tokenizeFromWord("ON") || this.tokenizeFromWord("AS") || this.tokenizeFromWord("CASE") || this.tokenizeFromWord("WHEN") || this.tokenizeFromWord("THEN") || this.tokenizeFromWord("ELSE") || this.tokenizeFromWord("END") || this.tokenizeFromWord("UNION") || this.tokenizeFromWord("ALL") || this.tokenizeFromWord("LIMIT") || this.tokenizeFromWord("OFFSET") || this.tokenizeFromWord("FETCH") || this.tokenizeFromWord("ROW") || this.tokenizeFromWord("ROWS") || this.tokenizeFromWord("ONLY") || this.tokenizeFromWord("NEXT") || this.tokenizeFromWord("FIRST") }, n.prototype.dotToken = function () { return this.tokenizeFromWord("DOT", ".") }, n.prototype.operatorToken = function () { return this.tokenizeFromList("OPERATOR", a) }, n.prototype.mathToken = function () { return this.tokenizeFromList("MATH", u) || this.tokenizeFromList("MATH_MULTI", f) }, n.prototype.conditionalToken = function () { return this.tokenizeFromList("CONDITIONAL", c) }, n.prototype.betweenToken = function () { return this.tokenizeFromList("BETWEEN", h) }, n.prototype.subSelectOpToken = function () { return this.tokenizeFromList("SUB_SELECT_OP", w) }, n.prototype.subSelectUnaryOpToken = function () { return this.tokenizeFromList("SUB_SELECT_UNARY_OP", b) }, n.prototype.functionToken = function () { return this.tokenizeFromList("FUNCTION", l) }, n.prototype.sortOrderToken = function () { return this.tokenizeFromList("DIRECTION", v) }, n.prototype.booleanToken = function () { return this.tokenizeFromList("BOOLEAN", t) }, n.prototype.starToken = function () { return this.tokenizeFromRegex("STAR", y) }, n.prototype.seperatorToken = function () { return this.tokenizeFromRegex("SEPARATOR", s) }, n.prototype.literalToken = function () { return this.tokenizeFromRegex("LITERAL", r, 1, 0) }, n.prototype.numberToken = function () { return this.tokenizeFromRegex("NUMBER", e) }, n.prototype.parameterToken = function () { return this.tokenizeFromRegex("PARAMETER", o, 1, 0) }, n.prototype.stringToken = function () { return this.tokenizeFromStringRegex("STRING", p, 1, 0) || this.tokenizeFromRegex("DBLSTRING", i, 1, 0) }, n.prototype.parensToken = function () { return this.tokenizeFromRegex("LEFT_PAREN", /^\(/) || this.tokenizeFromRegex("RIGHT_PAREN", /^\)/) }, n.prototype.windowExtension = function () { var n; return (n = /^\.(win):(length|time)/i.exec(this.chunk)) ? (this.token("WINDOW", n[1]), this.token("WINDOW_FUNCTION", n[2]), n[0].length) : 0 }, n.prototype.whitespaceToken = function () { var i, t, n; return (i = k.exec(this.chunk)) ? (n = i[0], this.preserveWhitespace && this.token("WHITESPACE", n), t = n.match(/\n/g, ""), this.currentLine += (null != t ? t.length : void 0) || 0, n.length) : 0 }, n.prototype.regexEscape = function (n) { return n.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&") }, l = ["AVG", "COUNT", "MIN", "MAX", "SUM"], v = ["ASC", "DESC"], a = ["=", "!=", ">=", ">", "<=", "<>", "<", "LIKE", "NOT LIKE", "ILIKE", "NOT ILIKE", "IS NOT", "IS", "REGEXP", "NOT REGEXP"], w = ["IN", "NOT IN", "ANY", "ALL", "SOME"], b = ["EXISTS"], c = ["AND", "OR"], h = ["BETWEEN", "NOT BETWEEN"], t = ["TRUE", "FALSE", "NULL"], u = ["+", "-", "||", "&&"], f = ["/", "*"], y = /^\*/, s = /^,/, k = /^[ \n\r]+/, r = /^`?([a-z_][a-z0-9_]{0,}(\:(number|float|string|date|boolean))?)`?/i, o = /^\$([a-z0-9_]+(\:(number|float|string|date|boolean))?)/, e = /^[+-]?[0-9]+(\.[0-9]+)?/, p = /^'((?:[^\\']+?|\\.|'')*)'(?!')/, i = /^"([^\\"]*(?:\\.[^\\"]*)*)"/, n }(); n.tokenize = function (n, i) { return new t(n, i).tokens } }).call(this) }, n["./compiled_parser"] = new function () { var t = this, i = function () { function at() { this.yy = {} } var n = function (n, t, i, r) { for (i = i || {}, r = n.length; r--; i[n[r]] = t); return i }, tt = [1, 8], kt = [5, 26], dt = [1, 14], vt = [1, 13], p = [5, 26, 31, 42], gt = [1, 17], yt = [5, 26, 31, 42, 45, 62], s = [1, 27], h = [1, 29], c = [1, 40], t = [1, 42], i = [1, 46], r = [1, 47], u = [1, 43], f = [1, 44], e = [1, 41], o = [1, 45], pt = [1, 25], ft = [5, 26, 31], wt = [5, 26, 31, 42, 45], ni = [1, 59], ut = [18, 43], v = [1, 62], a = [1, 63], y = [1, 64], l = [1, 65], w = [1, 66], d = [5, 18, 23, 26, 31, 34, 37, 38, 41, 42, 43, 45, 62, 64, 65, 66, 67, 68, 70, 78, 81, 82, 83], b = [5, 18, 23, 26, 31, 34, 37, 38, 41, 42, 43, 44, 45, 51, 62, 64, 65, 66, 67, 68, 70, 71, 78, 81, 82, 83, 89, 90, 91, 92, 93, 94, 96], rt = [1, 74], ti = [1, 77], ii = [2, 93], g = [1, 91], k = [1, 92], ri = [5, 18, 23, 26, 31, 34, 37, 38, 41, 42, 43, 45, 62, 64, 65, 66, 67, 68, 70, 78, 81, 82, 83, 89, 90, 91, 92, 93, 94, 96], bt = [78, 81, 83], ui = [1, 116], et = [5, 26, 31, 42, 43, 44], ot = [1, 124], fi = [5, 26, 31, 42, 43, 45, 64], st = [5, 26, 31, 41, 42, 45, 62], ht = [1, 127], ct = [1, 128], lt = [1, 129], it = [5, 26, 31, 34, 35, 37, 38, 41, 42, 45, 62], ei = [5, 18, 23, 26, 31, 34, 37, 38, 41, 42, 43, 45, 62, 64, 70, 78, 81, 82, 83], nt = [5, 26, 31, 34, 37, 38, 41, 42, 45, 62], oi = [5, 26, 31, 42, 56, 58], si = { trace: function () { }, yy: {}, symbols_: { error: 2, Root: 3, Query: 4, EOF: 5, SelectQuery: 6, Unions: 7, SelectWithLimitQuery: 8, BasicSelectQuery: 9, Select: 10, OrderClause: 11, GroupClause: 12, LimitClause: 13, SelectClause: 14, WhereClause: 15, SELECT: 16, Fields: 17, FROM: 18, Table: 19, DISTINCT: 20, Joins: 21, Literal: 22, AS: 23, LEFT_PAREN: 24, List: 25, RIGHT_PAREN: 26, WINDOW: 27, WINDOW_FUNCTION: 28, Number: 29, Union: 30, UNION: 31, ALL: 32, Join: 33, JOIN: 34, ON: 35, Expression: 36, LEFT: 37, RIGHT: 38, INNER: 39, OUTER: 40, WHERE: 41, LIMIT: 42, SEPARATOR: 43, OFFSET: 44, ORDER: 45, BY: 46, OrderArgs: 47, OffsetClause: 48, OrderArg: 49, Value: 50, DIRECTION: 51, OffsetRows: 52, FetchClause: 53, ROW: 54, ROWS: 55, FETCH: 56, FIRST: 57, ONLY: 58, NEXT: 59, GroupBasicClause: 60, HavingClause: 61, GROUP: 62, ArgumentList: 63, HAVING: 64, MATH: 65, MATH_MULTI: 66, OPERATOR: 67, BETWEEN: 68, BetweenExpression: 69, CONDITIONAL: 70, SUB_SELECT_OP: 71, SubSelectExpression: 72, SUB_SELECT_UNARY_OP: 73, WhitepaceList: 74, CaseStatement: 75, CASE: 76, CaseWhens: 77, END: 78, CaseElse: 79, CaseWhen: 80, WHEN: 81, THEN: 82, ELSE: 83, String: 84, Function: 85, UserFunction: 86, Boolean: 87, Parameter: 88, NUMBER: 89, BOOLEAN: 90, PARAMETER: 91, STRING: 92, DBLSTRING: 93, LITERAL: 94, DOT: 95, FUNCTION: 96, AggregateArgumentList: 97, Case: 98, Field: 99, STAR: 100, $accept: 0, $end: 1 }, terminals_: { 2: "error", 5: "EOF", 16: "SELECT", 18: "FROM", 20: "DISTINCT", 23: "AS", 24: "LEFT_PAREN", 26: "RIGHT_PAREN", 27: "WINDOW", 28: "WINDOW_FUNCTION", 31: "UNION", 32: "ALL", 34: "JOIN", 35: "ON", 37: "LEFT", 38: "RIGHT", 39: "INNER", 40: "OUTER", 41: "WHERE", 42: "LIMIT", 43: "SEPARATOR", 44: "OFFSET", 45: "ORDER", 46: "BY", 51: "DIRECTION", 54: "ROW", 55: "ROWS", 56: "FETCH", 57: "FIRST", 58: "ONLY", 59: "NEXT", 62: "GROUP", 64: "HAVING", 65: "MATH", 66: "MATH_MULTI", 67: "OPERATOR", 68: "BETWEEN", 70: "CONDITIONAL", 71: "SUB_SELECT_OP", 73: "SUB_SELECT_UNARY_OP", 76: "CASE", 78: "END", 81: "WHEN", 82: "THEN", 83: "ELSE", 89: "NUMBER", 90: "BOOLEAN", 91: "PARAMETER", 92: "STRING", 93: "DBLSTRING", 94: "LITERAL", 95: "DOT", 96: "FUNCTION", 98: "Case", 100: "STAR" }, productions_: [0, [3, 2], [4, 1], [4, 2], [6, 1], [6, 1], [9, 1], [9, 2], [9, 2], [9, 3], [8, 2], [10, 1], [10, 2], [14, 4], [14, 5], [14, 5], [14, 6], [19, 1], [19, 2], [19, 3], [19, 3], [19, 3], [19, 4], [19, 6], [7, 1], [7, 2], [30, 2], [30, 3], [21, 1], [21, 2], [33, 4], [33, 5], [33, 5], [33, 6], [33, 6], [33, 6], [33, 6], [15, 2], [13, 2], [13, 4], [13, 4], [11, 3], [11, 4], [47, 1], [47, 3], [49, 1], [49, 2], [48, 2], [48, 3], [52, 2], [52, 2], [53, 4], [53, 4], [12, 1], [12, 2], [60, 3], [61, 2], [36, 3], [36, 3], [36, 3], [36, 3], [36, 3], [36, 3], [36, 5], [36, 3], [36, 2], [36, 1], [36, 1], [36, 1], [36, 1], [69, 3], [75, 3], [75, 4], [80, 4], [77, 2], [77, 1], [79, 2], [72, 3], [50, 1], [50, 1], [50, 1], [50, 1], [50, 1], [50, 1], [50, 1], [74, 2], [74, 2], [25, 1], [29, 1], [87, 1], [88, 1], [84, 1], [84, 1], [22, 1], [22, 3], [85, 4], [86, 3], [86, 4], [86, 4], [97, 1], [97, 2], [63, 1], [63, 3], [17, 1], [17, 3], [99, 1], [99, 1], [99, 3]], performAction: function (n, t, i, r, u, f) { var e = f.length - 1; switch (u) { case 1: return this.$ = f[e - 1]; case 2: case 4: case 5: case 6: case 11: case 53: case 66: case 68: case 69: case 78: case 79: case 80: case 81: case 82: case 83: case 84: this.$ = f[e]; break; case 3: this.$ = function () { return f[e - 1].unions = f[e], f[e - 1] }(); break; case 7: this.$ = function () { return f[e - 1].order = f[e], f[e - 1] }(); break; case 8: this.$ = function () { return f[e - 1].group = f[e], f[e - 1] }(); break; case 9: this.$ = function () { return f[e - 2].group = f[e - 1], f[e - 2].order = f[e], f[e - 2] }(); break; case 10: this.$ = function () { return f[e - 1].limit = f[e], f[e - 1] }(); break; case 12: this.$ = function () { return f[e - 1].where = f[e], f[e - 1] }(); break; case 13: this.$ = new r.Select(f[e - 2], f[e], !1); break; case 14: this.$ = new r.Select(f[e - 2], f[e], !0); break; case 15: this.$ = new r.Select(f[e - 3], f[e - 1], !1, f[e]); break; case 16: this.$ = new r.Select(f[e - 3], f[e - 1], !0, f[e]); break; case 17: this.$ = new r.Table(f[e]); break; case 18: this.$ = new r.Table(f[e - 1], f[e]); break; case 19: this.$ = new r.Table(f[e - 2], f[e]); break; case 20: case 49: case 50: case 51: case 52: case 57: this.$ = f[e - 1]; break; case 21: case 77: this.$ = new r.SubSelect(f[e - 1]); break; case 22: this.$ = new r.SubSelect(f[e - 2], f[e]); break; case 23: this.$ = new r.Table(f[e - 5], null, f[e - 4], f[e - 3], f[e - 1]); break; case 24: case 28: case 43: case 75: case 101: case 103: this.$ = [f[e]]; break; case 25: case 29: case 74: this.$ = f[e - 1].concat(f[e]); break; case 26: this.$ = new r.Union(f[e]); break; case 27: this.$ = new r.Union(f[e], !0); break; case 30: this.$ = new r.Join(f[e - 2], f[e]); break; case 31: this.$ = new r.Join(f[e - 2], f[e], "LEFT"); break; case 32: this.$ = new r.Join(f[e - 2], f[e], "RIGHT"); break; case 33: this.$ = new r.Join(f[e - 2], f[e], "LEFT", "INNER"); break; case 34: this.$ = new r.Join(f[e - 2], f[e], "RIGHT", "INNER"); break; case 35: this.$ = new r.Join(f[e - 2], f[e], "LEFT", "OUTER"); break; case 36: this.$ = new r.Join(f[e - 2], f[e], "RIGHT", "OUTER"); break; case 37: this.$ = new r.Where(f[e]); break; case 38: this.$ = new r.Limit(f[e]); break; case 39: this.$ = new r.Limit(f[e], f[e - 2]); break; case 40: this.$ = new r.Limit(f[e - 2], f[e]); break; case 41: this.$ = new r.Order(f[e]); break; case 42: this.$ = new r.Order(f[e - 1], f[e]); break; case 44: case 102: case 104: this.$ = f[e - 2].concat(f[e]); break; case 45: this.$ = new r.OrderArgument(f[e], "ASC"); break; case 46: this.$ = new r.OrderArgument(f[e - 1], f[e]); break; case 47: this.$ = new r.Offset(f[e]); break; case 48: this.$ = new r.Offset(f[e - 1], f[e]); break; case 54: this.$ = function () { return f[e - 1].having = f[e], f[e - 1] }(); break; case 55: this.$ = new r.Group(f[e]); break; case 56: this.$ = new r.Having(f[e]); break; case 58: case 59: case 60: case 61: case 62: case 64: this.$ = new r.Op(f[e - 1], f[e - 2], f[e]); break; case 63: this.$ = new r.Op(f[e - 3], f[e - 4], f[e - 1]); break; case 65: this.$ = new r.UnaryOp(f[e - 1], f[e]); break; case 67: this.$ = new r.WhitepaceList(f[e]); break; case 70: this.$ = new r.BetweenOp([f[e - 2], f[e]]); break; case 71: this.$ = new r.Case(f[e - 1]); break; case 72: this.$ = new r.Case(f[e - 2], f[e - 1]); break; case 73: this.$ = new r.CaseWhen(f[e - 2], f[e]); break; case 76: this.$ = new r.CaseElse(f[e]); break; case 85: this.$ = [f[e - 1], f[e]]; break; case 86: this.$ = function () { return f[e - 1].push(f[e]), f[e - 1] }(); break; case 87: this.$ = new r.ListValue(f[e]); break; case 88: this.$ = new r.NumberValue(f[e]); break; case 89: this.$ = new r.BooleanValue(f[e]); break; case 90: this.$ = new r.ParameterValue(f[e]); break; case 91: this.$ = new r.StringValue(f[e], "'"); break; case 92: this.$ = new r.StringValue(f[e], '"'); break; case 93: this.$ = new r.LiteralValue(f[e]); break; case 94: this.$ = new r.LiteralValue(f[e - 2], f[e]); break; case 95: this.$ = new r.FunctionValue(f[e - 3], f[e - 1]); break; case 96: this.$ = new r.FunctionValue(f[e - 2], null, !0); break; case 97: case 98: this.$ = new r.FunctionValue(f[e - 3], f[e - 1], !0); break; case 99: this.$ = new r.ArgumentListValue(f[e]); break; case 100: this.$ = new r.ArgumentListValue(f[e], !0); break; case 105: this.$ = new r.Star; break; case 106: this.$ = new r.Field(f[e]); break; case 107: this.$ = new r.Field(f[e - 2], f[e]) } }, table: [{ 3: 1, 4: 2, 6: 3, 8: 4, 9: 5, 10: 6, 14: 7, 16: tt }, { 1: [3] }, { 5: [1, 9] }, n(kt, [2, 2], { 7: 10, 13: 11, 30: 12, 31: dt, 42: vt }), n(p, [2, 4]), n(p, [2, 5]), n(p, [2, 6], { 11: 15, 12: 16, 60: 18, 45: gt, 62: [1, 19] }), n(yt, [2, 11], { 15: 20, 41: [1, 21] }), { 17: 22, 20: [1, 23], 22: 33, 24: s, 29: 34, 36: 26, 50: 28, 72: 30, 73: h, 74: 31, 75: 32, 76: c, 84: 35, 85: 36, 86: 37, 87: 38, 88: 39, 89: t, 90: i, 91: r, 92: u, 93: f, 94: e, 96: o, 99: 24, 100: pt }, { 1: [2, 1] }, n(kt, [2, 3], { 30: 48, 31: dt }), n(p, [2, 10]), n(ft, [2, 24]), { 29: 49, 89: t }, { 6: 50, 8: 4, 9: 5, 10: 6, 14: 7, 16: tt, 32: [1, 51] }, n(p, [2, 7]), n(p, [2, 8], { 11: 52, 45: gt }), { 46: [1, 53] }, n(wt, [2, 53], { 61: 54, 64: [1, 55] }), { 46: [1, 56] }, n(yt, [2, 12]), { 22: 33, 24: s, 29: 34, 36: 57, 50: 28, 72: 30, 73: h, 74: 31, 75: 32, 76: c, 84: 35, 85: 36, 86: 37, 87: 38, 88: 39, 89: t, 90: i, 91: r, 92: u, 93: f, 94: e, 96: o }, { 18: [1, 58], 43: ni }, { 17: 60, 22: 33, 24: s, 29: 34, 36: 26, 50: 28, 72: 30, 73: h, 74: 31, 75: 32, 76: c, 84: 35, 85: 36, 86: 37, 87: 38, 88: 39, 89: t, 90: i, 91: r, 92: u, 93: f, 94: e, 96: o, 99: 24, 100: pt }, n(ut, [2, 103]), n(ut, [2, 105]), n(ut, [2, 106], { 23: [1, 61], 65: v, 66: a, 67: y, 68: l, 70: w }), { 4: 68, 6: 3, 8: 4, 9: 5, 10: 6, 14: 7, 16: tt, 22: 33, 24: s, 29: 34, 36: 67, 50: 28, 72: 30, 73: h, 74: 31, 75: 32, 76: c, 84: 35, 85: 36, 86: 37, 87: 38, 88: 39, 89: t, 90: i, 91: r, 92: u, 93: f, 94: e, 96: o }, n(d, [2, 69], { 22: 33, 29: 34, 84: 35, 85: 36, 86: 37, 87: 38, 88: 39, 50: 70, 71: [1, 69], 89: t, 90: i, 91: r, 92: u, 93: f, 94: e, 96: o }), { 24: [1, 72], 72: 71 }, n(d, [2, 66]), n(d, [2, 67], { 22: 33, 29: 34, 84: 35, 85: 36, 86: 37, 87: 38, 88: 39, 50: 73, 89: t, 90: i, 91: r, 92: u, 93: f, 94: e, 96: o }), n(d, [2, 68]), n(b, [2, 78], { 95: rt }), n(b, [2, 79]), n(b, [2, 80]), n(b, [2, 81]), n(b, [2, 82]), n(b, [2, 83]), n(b, [2, 84]), { 77: 75, 80: 76, 81: ti }, n([5, 18, 23, 26, 31, 34, 37, 38, 41, 42, 43, 44, 45, 51, 62, 64, 65, 66, 67, 68, 70, 71, 78, 81, 82, 83, 89, 90, 91, 92, 93, 94, 95, 96], ii, { 24: [1, 78] }), n([5, 18, 23, 26, 31, 34, 37, 38, 41, 42, 43, 44, 45, 51, 54, 55, 62, 64, 65, 66, 67, 68, 70, 71, 78, 81, 82, 83, 89, 90, 91, 92, 93, 94, 96], [2, 88]), n(b, [2, 91]), n(b, [2, 92]), { 24: [1, 79] }, n(b, [2, 89]), n(b, [2, 90]), n(ft, [2, 25]), n(p, [2, 38], { 43: [1, 80], 44: [1, 81] }), n(ft, [2, 26], { 13: 11, 42: vt }), { 6: 82, 8: 4, 9: 5, 10: 6, 14: 7, 16: tt }, n(p, [2, 9]), { 22: 33, 29: 34, 47: 83, 49: 84, 50: 85, 84: 35, 85: 36, 86: 37, 87: 38, 88: 39, 89: t, 90: i, 91: r, 92: u, 93: f, 94: e, 96: o }, n(wt, [2, 54]), { 22: 33, 24: s, 29: 34, 36: 86, 50: 28, 72: 30, 73: h, 74: 31, 75: 32, 76: c, 84: 35, 85: 36, 86: 37, 87: 38, 88: 39, 89: t, 90: i, 91: r, 92: u, 93: f, 94: e, 96: o }, { 22: 33, 24: s, 29: 34, 36: 88, 50: 28, 63: 87, 72: 30, 73: h, 74: 31, 75: 32, 76: c, 84: 35, 85: 36, 86: 37, 87: 38, 88: 39, 89: t, 90: i, 91: r, 92: u, 93: f, 94: e, 96: o }, n(yt, [2, 37], { 65: v, 66: a, 67: y, 68: l, 70: w }), { 19: 89, 22: 90, 24: g, 94: k }, { 22: 33, 24: s, 29: 34, 36: 26, 50: 28, 72: 30, 73: h, 74: 31, 75: 32, 76: c, 84: 35, 85: 36, 86: 37, 87: 38, 88: 39, 89: t, 90: i, 91: r, 92: u, 93: f, 94: e, 96: o, 99: 93, 100: pt }, { 18: [1, 94], 43: ni }, { 22: 95, 94: k }, { 22: 33, 24: s, 29: 34, 36: 96, 50: 28, 72: 30, 73: h, 74: 31, 75: 32, 76: c, 84: 35, 85: 36, 86: 37, 87: 38, 88: 39, 89: t, 90: i, 91: r, 92: u, 93: f, 94: e, 96: o }, { 22: 33, 24: s, 29: 34, 36: 97, 50: 28, 72: 30, 73: h, 74: 31, 75: 32, 76: c, 84: 35, 85: 36, 86: 37, 87: 38, 88: 39, 89: t, 90: i, 91: r, 92: u, 93: f, 94: e, 96: o }, { 22: 33, 24: s, 29: 34, 36: 98, 50: 28, 72: 30, 73: h, 74: 31, 75: 32, 76: c, 84: 35, 85: 36, 86: 37, 87: 38, 88: 39, 89: t, 90: i, 91: r, 92: u, 93: f, 94: e, 96: o }, { 22: 33, 24: s, 29: 34, 36: 100, 50: 28, 69: 99, 72: 30, 73: h, 74: 31, 75: 32, 76: c, 84: 35, 85: 36, 86: 37, 87: 38, 88: 39, 89: t, 90: i, 91: r, 92: u, 93: f, 94: e, 96: o }, { 22: 33, 24: s, 29: 34, 36: 101, 50: 28, 72: 30, 73: h, 74: 31, 75: 32, 76: c, 84: 35, 85: 36, 86: 37, 87: 38, 88: 39, 89: t, 90: i, 91: r, 92: u, 93: f, 94: e, 96: o }, { 26: [1, 102], 65: v, 66: a, 67: y, 68: l, 70: w }, { 26: [1, 103] }, { 24: [1, 104], 72: 105 }, n(ri, [2, 85]), n(d, [2, 65]), { 4: 68, 6: 3, 8: 4, 9: 5, 10: 6, 14: 7, 16: tt }, n(ri, [2, 86]), { 94: [1, 106] }, { 78: [1, 107], 79: 108, 80: 109, 81: ti, 83: [1, 110] }, n(bt, [2, 75]), { 22: 33, 24: s, 29: 34, 36: 111, 50: 28, 72: 30, 73: h, 74: 31, 75: 32, 76: c, 84: 35, 85: 36, 86: 37, 87: 38, 88: 39, 89: t, 90: i, 91: r, 92: u, 93: f, 94: e, 96: o }, { 20: ui, 22: 33, 24: s, 26: [1, 112], 29: 34, 36: 88, 50: 28, 63: 115, 72: 30, 73: h, 74: 31, 75: 32, 76: c, 84: 35, 85: 36, 86: 37, 87: 38, 88: 39, 89: t, 90: i, 91: r, 92: u, 93: f, 94: e, 96: o, 97: 113, 98: [1, 114] }, { 20: ui, 22: 33, 24: s, 29: 34, 36: 88, 50: 28, 63: 115, 72: 30, 73: h, 74: 31, 75: 32, 76: c, 84: 35, 85: 36, 86: 37, 87: 38, 88: 39, 89: t, 90: i, 91: r, 92: u, 93: f, 94: e, 96: o, 97: 117 }, { 29: 118, 89: t }, { 29: 119, 89: t }, n(ft, [2, 27], { 13: 11, 42: vt }), n(p, [2, 41], { 48: 120, 43: [1, 121], 44: [1, 122] }), n(et, [2, 43]), n(et, [2, 45], { 51: [1, 123] }), n(wt, [2, 56], { 65: v, 66: a, 67: y, 68: l, 70: w }), n([5, 26, 31, 42, 45, 64], [2, 55], { 43: ot }), n(fi, [2, 101], { 65: v, 66: a, 67: y, 68: l, 70: w }), n(st, [2, 13], { 21: 125, 33: 126, 34: ht, 37: ct, 38: lt }), n(it, [2, 17], { 22: 130, 23: [1, 131], 27: [1, 132], 94: k, 95: rt }), { 4: 134, 6: 3, 8: 4, 9: 5, 10: 6, 14: 7, 16: tt, 22: 33, 24: s, 25: 133, 29: 34, 36: 88, 50: 28, 63: 135, 72: 30, 73: h, 74: 31, 75: 32, 76: c, 84: 35, 85: 36, 86: 37, 87: 38, 88: 39, 89: t, 90: i, 91: r, 92: u, 93: f, 94: e, 96: o }, n([5, 18, 23, 26, 27, 31, 34, 35, 37, 38, 41, 42, 43, 45, 62, 94, 95], ii), n(ut, [2, 104]), { 19: 136, 22: 90, 24: g, 94: k }, n(ut, [2, 107], { 95: rt }), n([5, 18, 23, 26, 31, 34, 37, 38, 41, 42, 43, 45, 62, 64, 65, 67, 70, 78, 81, 82, 83], [2, 58], { 66: a, 68: l }), n([5, 18, 23, 26, 31, 34, 37, 38, 41, 42, 43, 45, 62, 64, 65, 66, 67, 70, 78, 81, 82, 83], [2, 59], { 68: l }), n([5, 18, 23, 26, 31, 34, 37, 38, 41, 42, 43, 45, 62, 64, 67, 70, 78, 81, 82, 83], [2, 60], { 65: v, 66: a, 68: l }), n(d, [2, 61]), { 65: v, 66: a, 67: y, 68: l, 70: [1, 137] }, n(ei, [2, 62], { 65: v, 66: a, 67: y, 68: l }), n(d, [2, 57]), n(d, [2, 77]), { 4: 68, 6: 3, 8: 4, 9: 5, 10: 6, 14: 7, 16: tt, 22: 33, 24: s, 25: 138, 29: 34, 36: 88, 50: 28, 63: 135, 72: 30, 73: h, 74: 31, 75: 32, 76: c, 84: 35, 85: 36, 86: 37, 87: 38, 88: 39, 89: t, 90: i, 91: r, 92: u, 93: f, 94: e, 96: o }, n(d, [2, 64]), n([5, 18, 23, 26, 27, 31, 34, 35, 37, 38, 41, 42, 43, 44, 45, 51, 62, 64, 65, 66, 67, 68, 70, 71, 78, 81, 82, 83, 89, 90, 91, 92, 93, 94, 95, 96], [2, 94]), n(d, [2, 71]), { 78: [1, 139] }, n(bt, [2, 74]), { 22: 33, 24: s, 29: 34, 36: 140, 50: 28, 72: 30, 73: h, 74: 31, 75: 32, 76: c, 84: 35, 85: 36, 86: 37, 87: 38, 88: 39, 89: t, 90: i, 91: r, 92: u, 93: f, 94: e, 96: o }, { 65: v, 66: a, 67: y, 68: l, 70: w, 82: [1, 141] }, n(b, [2, 96]), { 26: [1, 142] }, { 26: [1, 143] }, { 26: [2, 99], 43: ot }, { 22: 33, 24: s, 29: 34, 36: 88, 50: 28, 63: 144, 72: 30, 73: h, 74: 31, 75: 32, 76: c, 84: 35, 85: 36, 86: 37, 87: 38, 88: 39, 89: t, 90: i, 91: r, 92: u, 93: f, 94: e, 96: o }, { 26: [1, 145] }, n(p, [2, 39]), n(p, [2, 40]), n(p, [2, 42]), { 22: 33, 29: 34, 49: 146, 50: 85, 84: 35, 85: 36, 86: 37, 87: 38, 88: 39, 89: t, 90: i, 91: r, 92: u, 93: f, 94: e, 96: o }, { 29: 148, 52: 147, 89: t }, n(et, [2, 46]), { 22: 33, 24: s, 29: 34, 36: 149, 50: 28, 72: 30, 73: h, 74: 31, 75: 32, 76: c, 84: 35, 85: 36, 86: 37, 87: 38, 88: 39, 89: t, 90: i, 91: r, 92: u, 93: f, 94: e, 96: o }, n(st, [2, 15], { 33: 150, 34: ht, 37: ct, 38: lt }), n(nt, [2, 28]), { 19: 151, 22: 90, 24: g, 94: k }, { 34: [1, 152], 39: [1, 153], 40: [1, 154] }, { 34: [1, 155], 39: [1, 156], 40: [1, 157] }, n(it, [2, 18], { 95: rt }), { 22: 158, 94: k }, { 28: [1, 159] }, { 26: [1, 160] }, { 26: [1, 161] }, { 26: [2, 87], 43: ot }, n(st, [2, 14], { 33: 126, 21: 162, 34: ht, 37: ct, 38: lt }), { 22: 33, 24: s, 29: 34, 36: 163, 50: 28, 72: 30, 73: h, 74: 31, 75: 32, 76: c, 84: 35, 85: 36, 86: 37, 87: 38, 88: 39, 89: t, 90: i, 91: r, 92: u, 93: f, 94: e, 96: o }, { 26: [1, 164] }, n(d, [2, 72]), { 65: v, 66: a, 67: y, 68: l, 70: w, 78: [2, 76] }, { 22: 33, 24: s, 29: 34, 36: 165, 50: 28, 72: 30, 73: h, 74: 31, 75: 32, 76: c, 84: 35, 85: 36, 86: 37, 87: 38, 88: 39, 89: t, 90: i, 91: r, 92: u, 93: f, 94: e, 96: o }, n(b, [2, 97]), n(b, [2, 98]), { 26: [2, 100], 43: ot }, n(b, [2, 95]), n(et, [2, 44]), n(p, [2, 47], { 53: 166, 56: [1, 167] }), { 54: [1, 168], 55: [1, 169] }, n(fi, [2, 102], { 65: v, 66: a, 67: y, 68: l, 70: w }), n(nt, [2, 29]), { 35: [1, 170] }, { 19: 171, 22: 90, 24: g, 94: k }, { 34: [1, 172] }, { 34: [1, 173] }, { 19: 174, 22: 90, 24: g, 94: k }, { 34: [1, 175] }, { 34: [1, 176] }, n(it, [2, 19], { 95: rt }), { 24: [1, 177] }, n(it, [2, 20]), n(it, [2, 21], { 22: 178, 94: k }), n(st, [2, 16], { 33: 150, 34: ht, 37: ct, 38: lt }), n(ei, [2, 70], { 65: v, 66: a, 67: y, 68: l }), n(d, [2, 63]), n(bt, [2, 73], { 65: v, 66: a, 67: y, 68: l, 70: w }), n(p, [2, 48]), { 57: [1, 179], 59: [1, 180] }, n(oi, [2, 49]), n(oi, [2, 50]), { 22: 33, 24: s, 29: 34, 36: 181, 50: 28, 72: 30, 73: h, 74: 31, 75: 32, 76: c, 84: 35, 85: 36, 86: 37, 87: 38, 88: 39, 89: t, 90: i, 91: r, 92: u, 93: f, 94: e, 96: o }, { 35: [1, 182] }, { 19: 183, 22: 90, 24: g, 94: k }, { 19: 184, 22: 90, 24: g, 94: k }, { 35: [1, 185] }, { 19: 186, 22: 90, 24: g, 94: k }, { 19: 187, 22: 90, 24: g, 94: k }, { 29: 188, 89: t }, n(it, [2, 22], { 95: rt }), { 29: 148, 52: 189, 89: t }, { 29: 148, 52: 190, 89: t }, n(nt, [2, 30], { 65: v, 66: a, 67: y, 68: l, 70: w }), { 22: 33, 24: s, 29: 34, 36: 191, 50: 28, 72: 30, 73: h, 74: 31, 75: 32, 76: c, 84: 35, 85: 36, 86: 37, 87: 38, 88: 39, 89: t, 90: i, 91: r, 92: u, 93: f, 94: e, 96: o }, { 35: [1, 192] }, { 35: [1, 193] }, { 22: 33, 24: s, 29: 34, 36: 194, 50: 28, 72: 30, 73: h, 74: 31, 75: 32, 76: c, 84: 35, 85: 36, 86: 37, 87: 38, 88: 39, 89: t, 90: i, 91: r, 92: u, 93: f, 94: e, 96: o }, { 35: [1, 195] }, { 35: [1, 196] }, { 26: [1, 197] }, { 58: [1, 198] }, { 58: [1, 199] }, n(nt, [2, 31], { 65: v, 66: a, 67: y, 68: l, 70: w }), { 22: 33, 24: s, 29: 34, 36: 200, 50: 28, 72: 30, 73: h, 74: 31, 75: 32, 76: c, 84: 35, 85: 36, 86: 37, 87: 38, 88: 39, 89: t, 90: i, 91: r, 92: u, 93: f, 94: e, 96: o }, { 22: 33, 24: s, 29: 34, 36: 201, 50: 28, 72: 30, 73: h, 74: 31, 75: 32, 76: c, 84: 35, 85: 36, 86: 37, 87: 38, 88: 39, 89: t, 90: i, 91: r, 92: u, 93: f, 94: e, 96: o }, n(nt, [2, 32], { 65: v, 66: a, 67: y, 68: l, 70: w }), { 22: 33, 24: s, 29: 34, 36: 202, 50: 28, 72: 30, 73: h, 74: 31, 75: 32, 76: c, 84: 35, 85: 36, 86: 37, 87: 38, 88: 39, 89: t, 90: i, 91: r, 92: u, 93: f, 94: e, 96: o }, { 22: 33, 24: s, 29: 34, 36: 203, 50: 28, 72: 30, 73: h, 74: 31, 75: 32, 76: c, 84: 35, 85: 36, 86: 37, 87: 38, 88: 39, 89: t, 90: i, 91: r, 92: u, 93: f, 94: e, 96: o }, n(it, [2, 23]), n(p, [2, 51]), n(p, [2, 52]), n(nt, [2, 33], { 65: v, 66: a, 67: y, 68: l, 70: w }), n(nt, [2, 35], { 65: v, 66: a, 67: y, 68: l, 70: w }), n(nt, [2, 34], { 65: v, 66: a, 67: y, 68: l, 70: w }), n(nt, [2, 36], { 65: v, 66: a, 67: y, 68: l, 70: w })], defaultActions: { 9: [2, 1] }, parseError: function (n, t) { if (!t.recoverable) throw new Error(n); this.trace(n) }, parse: function (n) { function ft() { var n; return n = i.lex() || tt, "number" != typeof n && (n = et.symbols_[n] || n), n } var et = this, u = [0], o = [null], t = [], l = this.table, d = "", a = 0, g = 0, nt = 0, tt = 1, ot = t.slice.call(arguments, 1), i = Object.create(this.lexer), s = { yy: {} }, v, y, it, r, b, h, f, rt, p, e, ut, w, c, k; for (v in this.yy) Object.prototype.hasOwnProperty.call(this.yy, v) && (s.yy[v] = this.yy[v]); for (i.setInput(n, s.yy), s.yy.lexer = i, s.yy.parser = this, void 0 === i.yylloc && (i.yylloc = {}), y = i.yylloc, t.push(y), it = i.options && i.options.ranges, this.parseError = "function" == typeof s.yy.parseError ? s.yy.parseError : Object.getPrototypeOf(this).parseError, c = {}; ;) { if (h = u[u.length - 1], this.defaultActions[h] ? f = this.defaultActions[h] : (null !== r && void 0 !== r || (r = ft()), f = l[h] && l[h][r]), void 0 === f || !f.length || !f[0]) { k = ""; w = []; for (p in l[h]) this.terminals_[p] && p > 2 && w.push("'" + this.terminals_[p] + "'"); k = i.showPosition ? "Parse error on line " + (a + 1) + ":\n" + i.showPosition() + "\nExpecting " + w.join(", ") + ", got '" + (this.terminals_[r] || r) + "'" : "Parse error on line " + (a + 1) + ": Unexpected " + (r == tt ? "end of input" : "'" + (this.terminals_[r] || r) + "'"); this.parseError(k, { text: i.match, token: this.terminals_[r] || r, line: i.yylineno, loc: y, expected: w }) } if (f[0] instanceof Array && f.length > 1) throw new Error("Parse Error: multiple actions possible at state: " + h + ", token: " + r); switch (f[0]) { case 1: u.push(r); o.push(i.yytext); t.push(i.yylloc); u.push(f[1]); r = null; b ? (r = b, b = null) : (g = i.yyleng, d = i.yytext, a = i.yylineno, y = i.yylloc, nt > 0 && nt--); break; case 2: if (e = this.productions_[f[1]][1], c.$ = o[o.length - e], c._$ = { first_line: t[t.length - (e || 1)].first_line, last_line: t[t.length - 1].last_line, first_column: t[t.length - (e || 1)].first_column, last_column: t[t.length - 1].last_column }, it && (c._$.range = [t[t.length - (e || 1)].range[0], t[t.length - 1].range[1]]), void 0 !== (rt = this.performAction.apply(c, [d, g, a, s.yy, f[1], o, t].concat(ot)))) return rt; e && (u = u.slice(0, -2 * e), o = o.slice(0, -1 * e), t = t.slice(0, -1 * e)); u.push(this.productions_[f[1]][0]); o.push(c.$); t.push(c._$); ut = l[u[u.length - 2]][u[u.length - 1]]; u.push(ut); break; case 3: return !0 } } return !0 } }; return at.prototype = si, si.Parser = at, new at }(); void 0 !== n && void 0 !== t && (t.parser = i, t.Parser = i.Parser, t.parse = function () { return i.parse.apply(i, arguments) }, t.main = function (i) { i[1] || (console.log("Usage: " + i[0] + " FILE"), process.exit(1)); var r = n("fs").readFileSync(n("path").normalize(i[1]), "utf8"); return t.parser.parse(r) }, "undefined" != typeof module && n.main === module && t.main(process.argv.slice(1))) }, n["./nodes"] = new function () { var n = this; (function () { var t; t = function (n) { var t; return function () { var i, f, r, u; for (r = n.split("\n"), u = [], i = 0, f = r.length; i < f; i++)t = r[i], u.push(" " + t); return u }().join("\n") }; n.Select = function () { function n(n, t, i, r, u) { this.fields = n; this.source = t; this.distinct = null != i && i; this.joins = null != r ? r : []; this.unions = null != u ? u : []; this.order = null; this.group = null; this.where = null; this.limit = null } return n.prototype.toString = function () { var e, n, o, i, r, s, h, u, f; for (n = ["SELECT " + this.fields.join(", ")], n.push(t("FROM " + this.source)), u = this.joins, i = 0, s = u.length; i < s; i++)e = u[i], n.push(t(e.toString())); for (this.where && n.push(t(this.where.toString())), this.group && n.push(t(this.group.toString())), this.order && n.push(t(this.order.toString())), this.limit && n.push(t(this.limit.toString())), f = this.unions, r = 0, h = f.length; r < h; r++)o = f[r], n.push(o.toString()); return n.join("\n") }, n }(); n.SubSelect = function () { function n(n, t) { this.select = n; this.name = null != t ? t : null } return n.prototype.toString = function () { var n; return n = [], n.push("("), n.push(t(this.select.toString())), n.push(this.name ? ") " + this.name.toString() : ")"), n.join("\n") }, n }(); n.Join = function () { function n(n, t, i, r) { this.right = n; this.conditions = null != t ? t : null; this.side = null != i ? i : null; this.mode = null != r ? r : null } return n.prototype.toString = function () { var n; return n = "", null != this.side && (n += this.side + " "), null != this.mode && (n += this.mode + " "), n + "JOIN " + this.right + "\n" + t("ON " + this.conditions) }, n }(); n.Union = function () { function n(n, t) { this.query = n; this.all = null != t && t } return n.prototype.toString = function () { return "UNION" + (this.all ? " ALL" : "") + "\n" + this.query.toString() }, n }(); n.LiteralValue = function () { function n(n, t) { this.value = n; this.value2 = null != t ? t : null; this.value2 ? (this.nested = !0, this.values = this.value.values, this.values.push(t)) : (this.nested = !1, this.values = [this.value]) } return n.prototype.toString = function (n) { return null == n && (n = !0), n ? "`" + this.values.join("`.`") + "`" : "" + this.values.join(".") }, n }(); n.StringValue = function () { function n(n, t) { this.value = n; this.quoteType = null != t ? t : "''" } return n.prototype.toString = function () { var n; return n = "'" === this.quoteType ? this.value.replace(/(^|[^\\])'/g, "$1''") : this.value, "" + this.quoteType + n + this.quoteType }, n }(); n.NumberValue = function () { function n(n) { this.value = Number(n) } return n.prototype.toString = function () { return this.value.toString() }, n }(); n.ListValue = function () { function n(n) { this.value = n } return n.prototype.toString = function () { return "(" + this.value.join(", ") + ")" }, n }(); n.WhitepaceList = function () { function t(n) { this.value = n } return t.prototype.toString = function () { return this.value.map(function (t) { return t instanceof n.LiteralValue ? t.toString(!1) : t.toString() }).join(" ") }, t }(); n.ParameterValue = function () { function n(n) { this.value = n; this.index = parseInt(n.substr(1), 10) - 1 } return n.prototype.toString = function () { return "$" + this.value }, n }(); n.ArgumentListValue = function () { function n(n, t) { this.value = n; this.distinct = null != t && t } return n.prototype.toString = function () { return this.distinct ? "DISTINCT " + this.value.join(", ") : "" + this.value.join(", ") }, n }(); n.BooleanValue = function () { function n(n) { this.value = function () { switch (n.toLowerCase()) { case "true": return !0; case "false": return !1; default: return null } }() } return n.prototype.toString = function () { return null != this.value ? this.value.toString().toUpperCase() : "NULL" }, n }(); n.FunctionValue = function () { function n(n, t, i) { this.name = n; this.arguments = null != t ? t : null; this.udf = null != i && i } return n.prototype.toString = function () { return this.arguments ? this.name.toUpperCase() + "(" + this.arguments.toString() + ")" : this.name.toUpperCase() + "()" }, n }(); n.Case = function () { function n(n, t) { this.whens = n; this.else = t } return n.prototype.toString = function () { var n; return n = this.whens.map(function (n) { return n.toString() }).join(" "), this.else ? "CASE " + n + " " + this.else.toString() + " END" : "CASE " + n + " END" }, n }(); n.CaseWhen = function () { function n(n, t) { this.whenCondition = n; this.resCondition = t } return n.prototype.toString = function () { return "WHEN " + this.whenCondition + " THEN " + this.resCondition }, n }(); n.CaseElse = function () { function n(n) { this.elseCondition = n } return n.prototype.toString = function () { return "ELSE " + this.elseCondition }, n }(); n.Order = function () { function n(n, t) { this.orderings = n; this.offset = t } return n.prototype.toString = function () { return "ORDER BY " + this.orderings.join(", ") + (this.offset ? "\n" + this.offset.toString() : "") }, n }(); n.OrderArgument = function () { function n(n, t) { this.value = n; this.direction = null != t ? t : "ASC" } return n.prototype.toString = function () { return this.value + " " + this.direction }, n }(); n.Offset = function () { function n(n, t) { this.row_count = n; this.limit = t } return n.prototype.toString = function () { return "OFFSET " + this.row_count + " ROWS" + (this.limit ? "\nFETCH NEXT " + this.limit + " ROWS ONLY" : "") }, n }(); n.Limit = function () { function n(n, t) { this.value = n; this.offset = t } return n.prototype.toString = function () { return "LIMIT " + this.value + (this.offset ? "\nOFFSET " + this.offset : "") }, n }(); n.Table = function () { function n(n, t, i, r, u) { this.name = n; this.alias = null != t ? t : null; this.win = null != i ? i : null; this.winFn = null != r ? r : null; this.winArg = null != u ? u : null } return n.prototype.toString = function () { return this.win ? this.name + "." + this.win + ":" + this.winFn + "(" + this.winArg + ")" : this.alias ? this.name + " AS " + this.alias : this.name.toString() }, n }(); n.Group = function () { function n(n) { this.fields = n; this.having = null } return n.prototype.toString = function () { var n; return n = ["GROUP BY " + this.fields.join(", ")], this.having && n.push(this.having.toString()), n.join("\n") }, n }(); n.Where = function () { function n(n) { this.conditions = n } return n.prototype.toString = function () { return "WHERE " + this.conditions }, n }(); n.Having = function () { function n(n) { this.conditions = n } return n.prototype.toString = function () { return "HAVING " + this.conditions }, n }(); n.Op = function () { function n(n, t, i) { this.operation = n; this.left = t; this.right = i } return n.prototype.toString = function () { return "(" + this.left + " " + this.operation.toUpperCase() + " " + this.right + ")" }, n }(); n.UnaryOp = function () { function n(n, t) { this.operator = n; this.operand = t } return n.prototype.toString = function () { return "(" + this.operator.toUpperCase() + " " + this.operand + ")" }, n }(); n.BetweenOp = function () { function n(n) { this.value = n } return n.prototype.toString = function () { return "" + this.value.join(" AND ") }, n }(); n.Field = function () { function n(n, t) { this.field = n; this.name = null != t ? t : null } return n.prototype.toString = function () { return this.name ? this.field + " AS " + this.name : this.field.toString() }, n }(); n.Star = function () { function n() { } return n.prototype.toString = function () { return "*" }, n.prototype.star = !0, n }() }).call(this) }, n["./parser"] = new function () { var t = this; (function () { var i; i = function () { var t; return t = n("./compiled_parser").parser, t.lexer = { lex: function () { var t, n; return n = this.tokens[this.pos++] || [""], t = n[0], this.yytext = n[1], this.yylineno = n[2], t }, setInput: function (n) { return this.tokens = n, this.pos = 0 }, upcomingInput: function () { return "" } }, t.yy = n("./nodes"), t }; t.parser = i(); t.parse = function (n) { return i().parse(n) } }).call(this) }, n["./sql_parser"] = new function () { var t = this; (function () { t.lexer = n("./lexer"); t.parser = n("./parser"); t.nodes = n("./nodes"); t.parse = function (n) { return t.parser.parse(t.lexer.tokenize(n)) } }).call(this) }, n["./sql_parser"] }(); "function" == typeof define && define.amd ? define(function () { return t }) : n.SQLParser = t }(this); !function (n) { if ("object" == typeof exports && "undefined" != typeof module) module.exports = n(); else if ("function" == typeof define && define.amd) define([], n); else { var t; t = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : this; t.dragula = n() } }(function () { return function n(t, i, r) { function u(f, o) { var h, c, s; if (!i[f]) { if (!t[f]) { if (h = "function" == typeof require && require, !o && h) return h(f, !0); if (e) return e(f, !0); c = new Error("Cannot find module '" + f + "'"); throw c.code = "MODULE_NOT_FOUND", c; } s = i[f] = { exports: {} }; t[f][0].call(s.exports, function (n) { var i = t[f][1][n]; return u(i ? i : n) }, s, s.exports, n, t, i, r) } return i[f].exports } for (var e = "function" == typeof require && require, f = 0; f < r.length; f++)u(r[f]); return u }({ 1: [function (n, t) { "use strict"; function i(n) { var t = r[n]; return t ? t.lastIndex = 0 : r[n] = t = new RegExp(e + n + o, "g"), t } function u(n, t) { var r = n.className; r.length ? i(t).test(r) || (n.className += " " + t) : n.className = t } function f(n, t) { n.className = n.className.replace(i(t), " ").trim() } var r = {}, e = "(?:^|\\s)", o = "(?:\\s|$)"; t.exports = { add: u, rm: f } }, {}], 2: [function (n, t) { (function (i) { "use strict"; function d(n, t) { function st(n) { return -1 !== a.containers.indexOf(n) || i.isContainer(n) } function wt(n) { var t = n ? "remove" : "add"; h(u, t, "mousedown", ai); h(u, t, "mouseup", lt) } function ht(n) { var t = n ? "remove" : "add"; h(u, t, "mousemove", vi) } function bt(n) { var t = n ? "remove" : "add"; o[t](u, "selectstart", kt); o[t](u, "click", kt) } function li() { wt(!0); lt({}) } function kt(n) { ot && n.preventDefault() } function ai(n) { var r, t, i; hi = n.clientX; ci = n.clientY; r = 1 !== l(n) || n.metaKey || n.ctrlKey; r || (t = n.target, i = ct(t), i && (ot = i, ht(), "mousedown" === n.type && (b(t) ? t.focus() : n.preventDefault()))) } function vi(n) { var r, t; if (ot) { if (0 === l(n)) return void lt({}); if (void 0 === n.clientX || n.clientX !== hi || void 0 === n.clientY || n.clientY !== ci) { if (i.ignoreInputTextSelection) { var u = f("clientX", n), o = f("clientY", n), h = s.elementFromPoint(u, o); if (b(h)) return } r = ot; ht(!0); bt(); gt(); dt(r); t = g(rt); oi = f("pageX", n) - t.left; si = f("pageY", n) - t.top; e.add(d || rt, "gu-transit"); di(); yt(n) } } } function ct(n) { var t, u, f; if (!(a.dragging && tt || st(n))) { for (t = n; r(n) && st(r(n)) === !1;) { if (i.invalid(n, t)) return; if (n = r(n), !n) return } if (u = r(n), u && !i.invalid(n, t) && (f = i.moves(n, u, t, c(n)), f)) return { item: n, source: u } } } function yi(n) { return !!ct(n) } function pi(n) { var t = ct(n); t && dt(t) } function dt(n) { nr(n.item, n.source) && (d = n.item.cloneNode(!0), a.emit("cloned", d, n.item, "copy")); k = n.source; rt = n.item; et = ft = c(n.item); a.dragging = !0; a.emit("drag", rt, k) } function wi() { return !1 } function gt() { if (a.dragging) { var n = d || rt; ti(n, r(n)) } } function ni() { ot = !1; ht(!0); bt(!0) } function lt(n) { if (ni(), a.dragging) { var e = d || rt, r = f("clientX", n), u = f("clientY", n), o = v(tt, r, u), t = ui(o, r, u); t && (d && i.copySortSource || !d || t !== k) ? ti(e, t) : i.removeOnSpill ? ii() : ri() } } function ti(n, t) { var u = r(n); d && i.copySortSource && t === k && u.removeChild(rt); vt(t) ? a.emit("cancel", n, k, k) : a.emit("drop", n, t, k, ft); at() } function ii() { if (a.dragging) { var n = d || rt, t = r(n); t && t.removeChild(n); a.emit(d ? "cancel" : "remove", n, t, k); at() } } function ri(n) { if (a.dragging) { var f = arguments.length > 0 ? n : i.revertOnSpill, t = d || rt, u = r(t), e = vt(u); e === !1 && f && (d ? u && u.removeChild(d) : k.insertBefore(t, et)); e || f ? a.emit("cancel", t, k, k) : a.emit("drop", t, u, k, ft); at() } } function at() { var n = d || rt; ni(); gi(); n && e.rm(n, "gu-transit"); pt && clearTimeout(pt); a.dragging = !1; ut && a.emit("out", n, ut, k); a.emit("dragend", n); k = rt = d = et = ft = pt = ut = null } function vt(n, t) { var i; return i = void 0 !== t ? t : tt ? ft : c(d || rt), n === k && i === et } function ui(n, t, u) { function e() { var e = st(f); if (e === !1) return !1; var o = fi(f, n), r = ei(f, o, t, u), s = vt(f, r); return s ? !0 : i.accepts(rt, f, k, r) } for (var f = n; f && !e();)f = r(f); return f } function yt(n) { function p(n) { a.emit(n, u, ut, k) } function b() { l && p("over") } function g() { ut && p("out") } var o, e, y; if (tt) { n.preventDefault(); var s = f("clientX", n), h = f("clientY", n), nt = s - oi, it = h - si; tt.style.left = nt + "px"; tt.style.top = it + "px"; var u = d || rt, w = v(tt, s, h), t = ui(w, s, h), l = null !== t && t !== ut; if ((l || null === t) && (g(), ut = t, b()), o = r(u), t === k && d && !i.copySortSource) return void (o && o.removeChild(u)); if (y = fi(t, w), null !== y) e = ei(t, y, s, h); else { if (i.revertOnSpill !== !0 || d) return void (d && o && o.removeChild(u)); e = et; t = k } (null === e && l || e !== u && e !== c(u)) && (ft = e, t.insertBefore(u, e), a.emit("shadow", u, t, k)) } } function bi(n) { e.rm(n, "gu-hide") } function ki(n) { a.dragging && e.add(n, "gu-hide") } function di() { if (!tt) { var n = rt.getBoundingClientRect(); tt = rt.cloneNode(!0); tt.style.width = p(n) + "px"; tt.style.height = w(n) + "px"; e.rm(tt, "gu-transit"); e.add(tt, "gu-mirror"); i.mirrorContainer.appendChild(tt); h(u, "add", "mousemove", yt); e.add(i.mirrorContainer, "gu-unselectable"); a.emit("cloned", tt, rt, "mirror") } } function gi() { tt && (e.rm(i.mirrorContainer, "gu-unselectable"), h(u, "remove", "mousemove", yt), r(tt).removeChild(tt), tt = null) } function fi(n, t) { for (var i = t; i !== n && r(i) !== n;)i = r(i); return i === u ? null : i } function ei(n, t, r, u) { function e() { for (var e, t, o = n.children.length, i = 0; o > i; i++)if ((e = n.children[i], t = e.getBoundingClientRect(), f && t.left + t.width / 2 > r) || !f && t.top + t.height / 2 > u) return e; return null } function o() { var n = t.getBoundingClientRect(); return s(f ? r > n.left + p(n) / 2 : u > n.top + w(n) / 2) } function s(n) { return n ? c(t) : t } var f = "horizontal" === i.direction; return t !== n ? o() : e() } function nr(n, t) { return "boolean" == typeof i.copy ? i.copy : i.copy(n, t) } var tr = arguments.length, tt, k, rt, oi, si, hi, ci, et, ft, d, pt, ot, ut, i, a; return 1 === tr && Array.isArray(n) === !1 && (t = n, n = []), ut = null, i = t || {}, void 0 === i.moves && (i.moves = y), void 0 === i.accepts && (i.accepts = y), void 0 === i.invalid && (i.invalid = wi), void 0 === i.containers && (i.containers = n || []), void 0 === i.isContainer && (i.isContainer = nt), void 0 === i.copy && (i.copy = !1), void 0 === i.copySortSource && (i.copySortSource = !1), void 0 === i.revertOnSpill && (i.revertOnSpill = !1), void 0 === i.removeOnSpill && (i.removeOnSpill = !1), void 0 === i.direction && (i.direction = "vertical"), void 0 === i.ignoreInputTextSelection && (i.ignoreInputTextSelection = !0), void 0 === i.mirrorContainer && (i.mirrorContainer = s.body), a = it({ containers: i.containers, start: pi, end: gt, cancel: ri, remove: ii, destroy: li, canMove: yi, dragging: !1 }), i.removeOnSpill === !0 && a.on("over", bi).on("out", ki), wt(), a } function h(n, t, r, u) { i.navigator.pointerEnabled ? o[t](n, { mouseup: "pointerup", mousedown: "pointerdown", mousemove: "pointermove" }[r], u) : i.navigator.msPointerEnabled ? o[t](n, { mouseup: "MSPointerUp", mousedown: "MSPointerDown", mousemove: "MSPointerMove" }[r], u) : (o[t](n, { mouseup: "touchend", mousedown: "touchstart", mousemove: "touchmove" }[r], u), o[t](n, r, u)) } function l(n) { if (void 0 !== n.touches) return n.touches.length; if (void 0 !== n.which && 0 !== n.which) return n.which; if (void 0 !== n.buttons) return n.buttons; var t = n.button; if (void 0 !== t) return 1 & t ? 1 : 2 & t ? 3 : 4 & t ? 2 : 0 } function g(n) { var t = n.getBoundingClientRect(); return { left: t.left + a("scrollLeft", "pageXOffset"), top: t.top + a("scrollTop", "pageYOffset") } } function a(n, t) { return "undefined" != typeof i[t] ? i[t] : u.clientHeight ? u[n] : s.body[n] } function v(n, t, i) { var u, r = n || {}, f = r.className; return r.className += " gu-hide", u = s.elementFromPoint(t, i), r.className = f, u } function nt() { return !1 } function y() { return !0 } function p(n) { return n.width || n.right - n.left } function w(n) { return n.height || n.bottom - n.top } function r(n) { return n.parentNode === s ? null : n.parentNode } function b(n) { return "INPUT" === n.tagName || "TEXTAREA" === n.tagName || "SELECT" === n.tagName || k(n) } function k(n) { return n ? "false" === n.contentEditable ? !1 : "true" === n.contentEditable ? !0 : k(r(n)) : !1 } function c(n) { function t() { var t = n; do t = t.nextSibling; while (t && 1 !== t.nodeType); return t } return n.nextElementSibling || t() } function tt(n) { return n.targetTouches && n.targetTouches.length ? n.targetTouches[0] : n.changedTouches && n.changedTouches.length ? n.changedTouches[0] : n } function f(n, t) { var i = tt(t), r = { pageX: "clientX", pageY: "clientY" }; return n in r && !(n in i) && r[n] in i && (n = r[n]), i[n] } var it = n("contra/emitter"), o = n("crossvent"), e = n("./classes"), s = document, u = s.documentElement; t.exports = d }).call(this, "undefined" != typeof global ? global : "undefined" != typeof self ? self : "undefined" != typeof window ? window : {}) }, { "./classes": 1, "contra/emitter": 5, crossvent: 6 }], 3: [function (n, t) { t.exports = function (n, t) { return Array.prototype.slice.call(n, t) } }, {}], 4: [function (n, t) { "use strict"; var i = n("ticky"); t.exports = function (n, t, r) { n && i(function () { n.apply(r || null, t || []) }) } }, { ticky: 9 }], 5: [function (n, t) { "use strict"; var i = n("atoa"), r = n("./debounce"); t.exports = function (n, t) { var f = t || {}, u = {}; return void 0 === n && (n = {}), n.on = function (t, i) { return u[t] ? u[t].push(i) : u[t] = [i], n }, n.once = function (t, i) { return i._once = !0, n.on(t, i), n }, n.off = function (t, i) { var f = arguments.length, r; if (1 === f) delete u[t]; else if (0 === f) u = {}; else { if (r = u[t], !r) return n; r.splice(r.indexOf(i), 1) } return n }, n.emit = function () { var t = i(arguments); return n.emitterSnapshot(t.shift()).apply(this, t) }, n.emitterSnapshot = function (t) { var e = (u[t] || []).slice(0); return function () { var u = i(arguments), o = this || n; if ("error" === t && f.throws !== !1 && !e.length) throw 1 === u.length ? u[0] : u; return e.forEach(function (i) { f.async ? r(i, u, o) : i.apply(o, u); i._once && n.off(t, i) }), n } }, n } }, { "./debounce": 4, atoa: 3 }], 6: [function (n, t) { (function (i) { "use strict"; function s(n, t, i, r) { return n.addEventListener(t, i, r) } function h(n, t, i) { return n.attachEvent("on" + t, y(n, t, i)) } function c(n, t, i, r) { return n.removeEventListener(t, i, r) } function l(n, t, i) { var r = f(n, t, i); if (r) return n.detachEvent("on" + t, r) } function a(n, t, i) { function f() { var n; return u.createEvent ? (n = u.createEvent("Event"), n.initEvent(t, !0, !0)) : u.createEventObject && (n = u.createEventObject()), n } function e() { return new w(t, { detail: i }) } var r = -1 === b.indexOf(t) ? e() : f(); n.dispatchEvent ? n.dispatchEvent(r) : n.fireEvent("on" + t, r) } function v(n, t, r) { return function (t) { var u = t || i.event; u.target = u.target || u.srcElement; u.preventDefault = u.preventDefault || function () { u.returnValue = !1 }; u.stopPropagation = u.stopPropagation || function () { u.cancelBubble = !0 }; u.which = u.which || u.keyCode; r.call(n, u) } } function y(n, t, i) { var u = f(n, t, i) || v(n, t, i); return r.push({ wrapper: u, element: n, type: t, fn: i }), u } function f(n, t, i) { var u = p(n, t, i), f; if (u) return f = r[u].wrapper, r.splice(u, 1), f } function p(n, t, i) { for (var f, u = 0; u < r.length; u++)if (f = r[u], f.element === n && f.type === t && f.fn === i) return u } var w = n("custom-event"), b = n("./eventmap"), u = i.document, e = s, o = c, r = []; i.addEventListener || (e = h, o = l); t.exports = { add: e, remove: o, fabricate: a } }).call(this, "undefined" != typeof global ? global : "undefined" != typeof self ? self : "undefined" != typeof window ? window : {}) }, { "./eventmap": 7, "custom-event": 8 }], 7: [function (n, t) { (function (n) { "use strict"; var r = [], i = ""; for (i in n) /^on/.test(i) && r.push(i.slice(2)); t.exports = r }).call(this, "undefined" != typeof global ? global : "undefined" != typeof self ? self : "undefined" != typeof window ? window : {}) }, {}], 8: [function (n, t) { (function (n) { function r() { try { var n = new i("cat", { detail: { foo: "bar" } }); return "cat" === n.type && "bar" === n.detail.foo } catch (t) { } return !1 } var i = n.CustomEvent; t.exports = r() ? i : "function" == typeof document.createEvent ? function (n, t) { var i = document.createEvent("CustomEvent"); return t ? i.initCustomEvent(n, t.bubbles, t.cancelable, t.detail) : i.initCustomEvent(n, !1, !1, void 0), i } : function (n, t) { var i = document.createEventObject(); return i.type = n, t ? (i.bubbles = Boolean(t.bubbles), i.cancelable = Boolean(t.cancelable), i.detail = t.detail) : (i.bubbles = !1, i.cancelable = !1, i.detail = void 0), i } }).call(this, "undefined" != typeof global ? global : "undefined" != typeof self ? self : "undefined" != typeof window ? window : {}) }, {}], 9: [function (n, t) { var i, r = "function" == typeof setImmediate; i = r ? function (n) { setImmediate(n) } : function (n) { setTimeout(n, 0) }; t.exports = i }, {}] }, {}, [2])(2) });
  604. /*!
  605. * jQuery QueryBuilder 2.5.2
  606. * Copyright 2014-2018 Damien "Mistic" Sorel (http://www.strangeplanet.fr)
  607. * Licensed under MIT (https://opensource.org/licenses/MIT)
  608. */
  609. !function (n, t) { "function" == typeof define && define.amd ? define("jQuery.extendext", ["jquery"], t) : "object" == typeof module && module.exports ? module.exports = t(require("jquery")) : t(n.jQuery) }(this, function (n) { "use strict"; n.extendext = function () { var u, h, f, e, c, i, t = arguments[0] || {}, o = 1, l = arguments.length, s = !1, r = "default"; for ("boolean" == typeof t && (s = t, t = arguments[o++] || {}), "string" == typeof t && ("concat" !== (r = t.toLowerCase()) && "replace" !== r && "extend" !== r && (r = "default"), t = arguments[o++] || {}), "object" == typeof t || n.isFunction(t) || (t = {}), o === l && (t = this, o--); o < l; o++)if (null !== (u = arguments[o])) if (n.isArray(u) && "default" !== r) switch (i = t && n.isArray(t) ? t : [], r) { case "concat": t = i.concat(n.extend(s, [], u)); break; case "replace": t = n.extend(s, [], u); break; case "extend": u.forEach(function (t, u) { if ("object" == typeof t) { var f = n.isArray(t) ? [] : {}; i[u] = n.extendext(s, r, i[u] || f, t) } else -1 === i.indexOf(t) && i.push(t) }); t = i } else for (h in u) f = t[h], t !== (e = u[h]) && (s && e && (n.isPlainObject(e) || (c = n.isArray(e))) ? (c ? (c = !1, i = f && n.isArray(f) ? f : []) : i = f && n.isPlainObject(f) ? f : {}, t[h] = n.extendext(s, r, i, e)) : void 0 !== e && (t[h] = e)); return t } }), function () { "use strict"; function i(n) { return n.replace(/\\('|\\)/g, "$1").replace(/[\r\t\n]/g, " ") } var r, n = { name: "doT", version: "1.1.1", templateSettings: { evaluate: /\{\{([\s\S]+?(\}?)+)\}\}/g, interpolate: /\{\{=([\s\S]+?)\}\}/g, encode: /\{\{!([\s\S]+?)\}\}/g, use: /\{\{#([\s\S]+?)\}\}/g, useParams: /(^|[^\w$])def(?:\.|\[[\'\"])([\w$\.]+)(?:[\'\"]\])?\s*\:\s*([\w$\.]+|\"[^\"]+\"|\'[^\']+\'|\{[^\}]+\})/g, define: /\{\{##\s*([\w\.$]+)\s*(\:|=)([\s\S]+?)#\}\}/g, defineParams: /^\s*([\w$]+):([\s\S]+)/, conditional: /\{\{\?(\?)?\s*([\s\S]*?)\s*\}\}/g, iterate: /\{\{~\s*(?:\}\}|([\s\S]+?)\s*\:\s*([\w$]+)\s*(?:\:\s*([\w$]+))?\s*\}\})/g, varname: "it", strip: !0, append: !0, selfcontained: !1, doNotSkipEncoded: !1 }, template: void 0, compile: void 0, log: !0 }, u, t; n.encodeHTMLSource = function (n) { var t = { "&": "&#38;", "<": "&#60;", ">": "&#62;", '"': "&#34;", "'": "&#39;", "/": "&#47;" }, i = n ? /[&<>"'\/]/g : /&(?!#?\w+;)|<|>|"|'|\//g; return function (n) { return n ? n.toString().replace(i, function (n) { return t[n] || n }) : "" } }; r = function () { return this || (0, eval)("this") }(); "undefined" != typeof module && module.exports ? module.exports = n : "function" == typeof define && define.amd ? define("doT", function () { return n }) : r.doT = n; u = { append: { start: "'+(", end: ")+'", startencode: "'+encodeHTML(" }, split: { start: "';out+=(", end: ");out+='", startencode: "';out+=encodeHTML(" } }; t = /$^/; n.template = function (f, e, o) { var a, c, l = (e = e || n.templateSettings).append ? u.append : u.split, s = 0, h = e.use || e.define ? function a(n, i, r) { return ("string" == typeof i ? i : i.toString()).replace(n.define || t, function (t, i, u, f) { return 0 === i.indexOf("def.") && (i = i.substring(4)), i in r || (":" === u ? (n.defineParams && f.replace(n.defineParams, function (n, t, u) { r[i] = { arg: t, text: u } }), i in r || (r[i] = f)) : new Function("def", "def['" + i + "']=" + f)(r)), "" }).replace(n.use || t, function (t, i) { n.useParams && (i = i.replace(n.useParams, function (n, t, i, u) { if (r[i] && r[i].arg && u) { var f = (i + ":" + u).replace(/'|\\/g, "_"); return r.__exp = r.__exp || {}, r.__exp[f] = r[i].text.replace(new RegExp("(^|[^\\w$])" + r[i].arg + "([^\\w$])", "g"), "$1" + u + "$2"), t + "def.__exp['" + f + "']" } })); var u = new Function("def", "return " + i)(r); return u ? a(n, u, r) : u }) }(e, f, o || {}) : f; h = ("var out='" + (e.strip ? h.replace(/(^|\r|\n)\t* +| +\t*(\r|\n|$)/g, " ").replace(/\r|\n|\t|\/\*[\s\S]*?\*\//g, "") : h).replace(/'|\\/g, "\\$&").replace(e.interpolate || t, function (n, t) { return l.start + i(t) + l.end }).replace(e.encode || t, function (n, t) { return a = !0, l.startencode + i(t) + l.end }).replace(e.conditional || t, function (n, t, r) { return t ? r ? "';}else if(" + i(r) + "){out+='" : "';}else{out+='" : r ? "';if(" + i(r) + "){out+='" : "';}out+='" }).replace(e.iterate || t, function (n, t, r, u) { return t ? (s += 1, c = u || "i" + s, t = i(t), "';var arr" + s + "=" + t + ";if(arr" + s + "){var " + r + "," + c + "=-1,l" + s + "=arr" + s + ".length-1;while(" + c + "<l" + s + "){" + r + "=arr" + s + "[" + c + "+=1];out+='") : "';} } out+='" }).replace(e.evaluate || t, function (n, t) { return "';" + i(t) + "out+='" }) + "';return out;").replace(/\n/g, "\\n").replace(/\t/g, "\\t").replace(/\r/g, "\\r").replace(/(\s|;|\}|^|\{)out\+='';/g, "$1").replace(/\+''/g, ""); a && (e.selfcontained || !r || r._encodeHTML || (r._encodeHTML = n.encodeHTMLSource(e.doNotSkipEncoded)), h = "var encodeHTML = typeof _encodeHTML !== 'undefined' ? _encodeHTML : (" + n.encodeHTMLSource.toString() + "(" + (e.doNotSkipEncoded || "") + "));" + h); try { return new Function(e.varname, h) } catch (f) { throw "undefined" != typeof console && console.log("Could not create a template function: " + h), f; } }; n.compile = function (t, i) { return n.template(t, null, i) } }(), function (n, t) { "function" == typeof define && define.amd ? define("query-builder", ["jquery", "dot/doT", "jquery-extendext"], t) : "object" == typeof module && module.exports ? module.exports = t(require("jquery"), require("dot/doT"), require("jquery-extendext")) : t(n.jQuery, n.doT) }(this, function (n, t) { "use strict"; function s() { this.root = null; this.$ = n(this) } function o(n, t, r) { var f, u, o = i.selectors; (f = t.closest(o.rule_container)).length && (u = "moveAfter"); u || (f = t.closest(o.group_header)).length && (f = t.closest(o.group_container), u = "moveAtBegin"); u || (f = t.closest(o.group_container)).length && (u = "moveAtEnd"); u && (n[u](r.getModel(f)), r && n instanceof e && r.setRuleInputValue(n, n.value)) } function h(n) { var t = n.match(/(question_mark|numbered|named)(?:\((.)\))?/); return t || (t = [null, "question_mark", void 0]), t } var i = function (u, f) { (u[0].queryBuilder = this).$el = u; this.settings = n.extendext(!0, "replace", {}, i.DEFAULTS, f); this.model = new s; this.status = { id: null, generated_id: !1, group_id: 0, rule_id: 0, has_optgroup: !1, has_operator_optgroup: !1 }; this.filters = this.settings.filters; this.icons = this.settings.icons; this.operators = this.settings.operators; this.templates = this.settings.templates; this.plugins = this.settings.plugins; this.lang = null; void 0 === i.regional.en && r.error("Config", '"i18n/en.js" not loaded.'); this.lang = n.extendext(!0, "replace", {}, i.regional.en, i.regional[this.settings.lang_code], this.settings.lang); !1 === this.settings.allow_groups ? this.settings.allow_groups = 0 : !0 === this.settings.allow_groups && (this.settings.allow_groups = -1); Object.keys(this.templates).forEach(function (n) { this.templates[n] || (this.templates[n] = i.templates[n]); "string" == typeof this.templates[n] && (this.templates[n] = t.template(this.templates[n])) }, this); this.$el.attr("id") || (this.$el.attr("id", "qb_" + Math.floor(99999 * Math.random())), this.status.generated_id = !0); this.status.id = this.$el.attr("id"); this.$el.addClass("query-builder form-inline"); this.filters = this.checkFilters(this.filters); this.operators = this.checkOperators(this.operators); this.bindEvents(); this.initPlugins() }, r, f, u, e; return n.extend(i.prototype, { trigger: function (t) { var i = new n.Event(this._tojQueryEvent(t), { builder: this }); return this.$el.triggerHandler(i, Array.prototype.slice.call(arguments, 1)), i }, change: function (t, i) { var r = new n.Event(this._tojQueryEvent(t, !0), { builder: this, value: i }); return this.$el.triggerHandler(r, Array.prototype.slice.call(arguments, 2)), r.value }, on: function (n, t) { return this.$el.on(this._tojQueryEvent(n), t), this }, off: function (n, t) { return this.$el.off(this._tojQueryEvent(n), t), this }, once: function (n, t) { return this.$el.one(this._tojQueryEvent(n), t), this }, _tojQueryEvent: function (n, t) { return n.split(" ").map(function (n) { return n + ".queryBuilder" + (t ? ".filter" : "") }).join(" ") } }), i.types = { string: "string", integer: "number", double: "number", date: "datetime", time: "datetime", datetime: "datetime", boolean: "boolean" }, i.inputs = ["text", "number", "textarea", "radio", "checkbox", "select"], i.modifiable_options = ["display_errors", "allow_groups", "allow_empty", "default_condition", "default_filter"], i.selectors = { group_container: ".rules-group-container", rule_container: ".rule-container", filter_container: ".rule-filter-container", operator_container: ".rule-operator-container", value_container: ".rule-value-container", error_container: ".error-container", condition_container: ".rules-group-header .group-conditions", rule_header: ".rule-header", group_header: ".rules-group-header", group_actions: ".group-actions", rule_actions: ".rule-actions", rules_list: ".rules-group-body>.rules-list", group_condition: ".rules-group-header [name$=_cond]", rule_filter: ".rule-filter-container [name$=_filter]", rule_operator: ".rule-operator-container [name$=_operator]", rule_value: ".rule-value-container [name*=_value_]", add_rule: "[data-add=rule]", delete_rule: "[data-delete=rule]", add_group: "[data-add=group]", delete_group: "[data-delete=group]" }, i.templates = {}, i.regional = {}, i.OPERATORS = { equal: { type: "equal", nb_inputs: 1, multiple: !1, apply_to: ["string", "number", "datetime", "boolean"] }, not_equal: { type: "not_equal", nb_inputs: 1, multiple: !1, apply_to: ["string", "number", "datetime", "boolean"] }, "in": { type: "in", nb_inputs: 1, multiple: !0, apply_to: ["string", "number", "datetime"] }, not_in: { type: "not_in", nb_inputs: 1, multiple: !0, apply_to: ["string", "number", "datetime"] }, less: { type: "less", nb_inputs: 1, multiple: !1, apply_to: ["number", "datetime"] }, less_or_equal: { type: "less_or_equal", nb_inputs: 1, multiple: !1, apply_to: ["number", "datetime"] }, greater: { type: "greater", nb_inputs: 1, multiple: !1, apply_to: ["number", "datetime"] }, greater_or_equal: { type: "greater_or_equal", nb_inputs: 1, multiple: !1, apply_to: ["number", "datetime"] }, between: { type: "between", nb_inputs: 2, multiple: !1, apply_to: ["number", "datetime"] }, not_between: { type: "not_between", nb_inputs: 2, multiple: !1, apply_to: ["number", "datetime"] }, begins_with: { type: "begins_with", nb_inputs: 1, multiple: !1, apply_to: ["string"] }, not_begins_with: { type: "not_begins_with", nb_inputs: 1, multiple: !1, apply_to: ["string"] }, contains: { type: "contains", nb_inputs: 1, multiple: !1, apply_to: ["string"] }, not_contains: { type: "not_contains", nb_inputs: 1, multiple: !1, apply_to: ["string"] }, ends_with: { type: "ends_with", nb_inputs: 1, multiple: !1, apply_to: ["string"] }, not_ends_with: { type: "not_ends_with", nb_inputs: 1, multiple: !1, apply_to: ["string"] }, is_empty: { type: "is_empty", nb_inputs: 0, multiple: !1, apply_to: ["string"] }, is_not_empty: { type: "is_not_empty", nb_inputs: 0, multiple: !1, apply_to: ["string"] }, is_null: { type: "is_null", nb_inputs: 0, multiple: !1, apply_to: ["string", "number", "datetime", "boolean"] }, is_not_null: { type: "is_not_null", nb_inputs: 0, multiple: !1, apply_to: ["string", "number", "datetime", "boolean"] } }, i.DEFAULTS = { filters: [], plugins: [], sort_filters: !1, display_errors: !0, allow_groups: -1, allow_empty: !1, conditions: ["AND", "OR"], default_condition: "AND", inputs_separator: " , ", select_placeholder: "------", display_empty_filter: !0, default_filter: null, optgroups: {}, default_rule_flags: { filter_readonly: !1, operator_readonly: !1, value_readonly: !1, no_delete: !1 }, default_group_flags: { condition_readonly: !1, no_add_rule: !1, no_add_group: !1, no_delete: !1 }, templates: { group: null, rule: null, filterSelect: null, operatorSelect: null, ruleValueSelect: null }, lang_code: "en", lang: {}, operators: ["equal", "not_equal", "in", "not_in", "less", "less_or_equal", "greater", "greater_or_equal", "between", "not_between", "begins_with", "not_begins_with", "contains", "not_contains", "ends_with", "not_ends_with", "is_empty", "is_not_empty", "is_null", "is_not_null"], icons: { add_group: "glyphicon glyphicon-plus-sign", add_rule: "glyphicon glyphicon-plus", remove_group: "glyphicon glyphicon-remove", remove_rule: "glyphicon glyphicon-remove", error: "glyphicon glyphicon-warning-sign" } }, i.plugins = {}, i.defaults = function (t) { if ("object" != typeof t) return "string" == typeof t ? "object" == typeof i.DEFAULTS[t] ? n.extend(!0, {}, i.DEFAULTS[t]) : i.DEFAULTS[t] : n.extend(!0, {}, i.DEFAULTS); n.extendext(!0, "replace", i.DEFAULTS, t) }, i.define = function (n, t, r) { i.plugins[n] = { fct: t, def: r || {} } }, i.extend = function (t) { n.extend(i.prototype, t) }, i.prototype.initPlugins = function () { if (this.plugins) { if (n.isArray(this.plugins)) { var t = {}; this.plugins.forEach(function (n) { t[n] = null }); this.plugins = t } Object.keys(this.plugins).forEach(function (t) { t in i.plugins ? (this.plugins[t] = n.extend(!0, {}, i.plugins[t].def, this.plugins[t] || {}), i.plugins[t].fct.call(this, this.plugins[t])) : r.error("Config", 'Unable to find plugin "{0}"', t) }, this) } }, i.prototype.getPluginOptions = function (n, t) { var u; if (this.plugins && this.plugins[n] ? u = this.plugins[n] : i.plugins[n] && (u = i.plugins[n].def), u) return t ? u[t] : u; r.error("Config", 'Unable to find plugin "{0}"', n) }, i.prototype.init = function (n) { this.trigger("afterInit"); n ? (this.setRules(n), delete this.settings.rules) : this.setRoot(!0) }, i.prototype.checkFilters = function (n) { var u = [], t; return (n && 0 !== n.length || r.error("Config", "Missing filters list"), n.forEach(function (n, t) { switch (n.id || r.error("Config", "Missing filter {0} id", t), -1 != u.indexOf(n.id) && r.error("Config", 'Filter "{0}" already defined', n.id), u.push(n.id), n.type ? i.types[n.type] || r.error("Config", 'Invalid type "{0}"', n.type) : n.type = "string", n.input ? "function" != typeof n.input && -1 == i.inputs.indexOf(n.input) && r.error("Config", 'Invalid input "{0}"', n.input) : n.input = "number" === i.types[n.type] ? "number" : "text", n.operators && n.operators.forEach(function (n) { "string" != typeof n && r.error("Config", "Filter operators must be global operators types (string)") }), n.field || (n.field = n.id), n.label || (n.label = n.field), n.optgroup ? (this.status.has_optgroup = !0, this.settings.optgroups[n.optgroup] || (this.settings.optgroups[n.optgroup] = n.optgroup)) : n.optgroup = null, n.input) { case "radio": case "checkbox": (!n.values || n.values.length < 1) && r.error("Config", 'Missing filter "{0}" values', n.id); break; case "select": var f = []; n.has_optgroup = !1; r.iterateOptions(n.values, function (t, i, r) { f.push({ value: t, label: i, optgroup: r || null }); r && (n.has_optgroup = !0, this.settings.optgroups[r] || (this.settings.optgroups[r] = r)) }.bind(this)); n.values = n.has_optgroup ? r.groupSort(f, "optgroup") : f; n.placeholder && (void 0 === n.placeholder_value && (n.placeholder_value = -1), n.values.forEach(function (t) { t.value == n.placeholder_value && r.error("Config", 'Placeholder of filter "{0}" overlaps with one of its values', n.id) })) } }, this), this.settings.sort_filters) && ("function" == typeof this.settings.sort_filters ? n.sort(this.settings.sort_filters) : (t = this, n.sort(function (n, i) { return t.translate(n.label).localeCompare(t.translate(i.label)) }))), this.status.has_optgroup && (n = r.groupSort(n, "optgroup")), n }, i.prototype.checkOperators = function (t) { var u = []; return t.forEach(function (f, e) { "string" == typeof f ? (i.OPERATORS[f] || r.error("Config", 'Unknown operator "{0}"', f), t[e] = f = n.extendext(!0, "replace", {}, i.OPERATORS[f])) : (f.type || r.error("Config", 'Missing "type" for operator {0}', e), i.OPERATORS[f.type] && (t[e] = f = n.extendext(!0, "replace", {}, i.OPERATORS[f.type], f)), void 0 !== f.nb_inputs && void 0 !== f.apply_to || r.error("Config", 'Missing "nb_inputs" and/or "apply_to" for operator "{0}"', f.type)); -1 != u.indexOf(f.type) && r.error("Config", 'Operator "{0}" already defined', f.type); u.push(f.type); f.optgroup ? (this.status.has_operator_optgroup = !0, this.settings.optgroups[f.optgroup] || (this.settings.optgroups[f.optgroup] = f.optgroup)) : f.optgroup = null }, this), this.status.has_operator_optgroup && (t = r.groupSort(t, "optgroup")), t }, i.prototype.bindEvents = function () { var t = this, r = i.selectors; this.$el.on("change.queryBuilder", r.group_condition, function () { if (n(this).is(":checked")) { var i = n(this).closest(r.group_container); t.getModel(i).condition = n(this).val() } }); this.$el.on("change.queryBuilder", r.rule_filter, function () { var i = n(this).closest(r.rule_container); t.getModel(i).filter = t.getFilterById(n(this).val()) }); this.$el.on("change.queryBuilder", r.rule_operator, function () { var i = n(this).closest(r.rule_container); t.getModel(i).operator = t.getOperatorByType(n(this).val()) }); this.$el.on("click.queryBuilder", r.add_rule, function () { var i = n(this).closest(r.group_container); t.addRule(t.getModel(i)) }); this.$el.on("click.queryBuilder", r.delete_rule, function () { var i = n(this).closest(r.rule_container); t.deleteRule(t.getModel(i)) }); 0 !== this.settings.allow_groups && (this.$el.on("click.queryBuilder", r.add_group, function () { var i = n(this).closest(r.group_container); t.addGroup(t.getModel(i)) }), this.$el.on("click.queryBuilder", r.delete_group, function () { var i = n(this).closest(r.group_container); t.deleteGroup(t.getModel(i)) })); this.model.on({ drop: function (n, i) { i.$el.remove(); t.refreshGroupsConditions() }, add: function (n, r, u, f) { 0 === f ? u.$el.prependTo(r.$el.find(">" + i.selectors.rules_list)) : u.$el.insertAfter(r.rules[f - 1].$el); t.refreshGroupsConditions() }, move: function (n, r, u, f) { r.$el.detach(); 0 === f ? r.$el.prependTo(u.$el.find(">" + i.selectors.rules_list)) : r.$el.insertAfter(u.rules[f - 1].$el); t.refreshGroupsConditions() }, update: function (n, i, r, u, f) { if (i instanceof e) switch (r) { case "error": t.updateError(i); break; case "flags": t.applyRuleFlags(i); break; case "filter": t.updateRuleFilter(i, f); break; case "operator": t.updateRuleOperator(i, f); break; case "value": t.updateRuleValue(i, f) } else switch (r) { case "error": t.updateError(i); break; case "flags": t.applyGroupFlags(i); break; case "condition": t.updateGroupCondition(i, f) } } }) }, i.prototype.setRoot = function (t, i, r) { t = void 0 === t || !0 === t; var e = this.nextGroupId(), f = n(this.getGroupTemplate(e, 1)); return this.$el.append(f), this.model.root = new u(null, f), this.model.root.model = this.model, this.model.root.data = i, this.model.root.flags = n.extend({}, this.settings.default_group_flags, r), this.model.root.condition = this.settings.default_condition, this.trigger("afterAddGroup", this.model.root), t && this.addRule(this.model.root), this.model.root }, i.prototype.addGroup = function (t, i, r, u) { var e; if (i = void 0 === i || !0 === i, e = t.level + 1, this.trigger("beforeAddGroup", t, i, e).isDefaultPrevented()) return null; var o = this.nextGroupId(), s = n(this.getGroupTemplate(o, e)), f = t.addGroup(s); return f.data = r, f.flags = n.extend({}, this.settings.default_group_flags, u), f.condition = this.settings.default_condition, this.trigger("afterAddGroup", f), this.trigger("rulesChanged"), i && this.addRule(f), f }, i.prototype.deleteGroup = function (n) { if (n.isRoot() || this.trigger("beforeDeleteGroup", n).isDefaultPrevented()) return !1; var t = !0; return n.each("reverse", function (n) { t &= this.deleteRule(n) }, function (n) { t &= this.deleteGroup(n) }, this), t && (n.drop(), this.trigger("afterDeleteGroup"), this.trigger("rulesChanged")), t }, i.prototype.updateGroupCondition = function (t, r) { t.$el.find(">" + i.selectors.group_condition).each(function () { var i = n(this); i.prop("checked", i.val() === t.condition); i.parent().toggleClass("active", i.val() === t.condition) }); this.trigger("afterUpdateGroupCondition", t, r); this.trigger("rulesChanged") }, i.prototype.refreshGroupsConditions = function () { !function n(t) { t.flags && (!t.flags || t.flags.condition_readonly) || t.$el.find(">" + i.selectors.group_condition).prop("disabled", t.rules.length <= 1).parent().toggleClass("disabled", t.rules.length <= 1); t.each(null, function (t) { n(t) }, this) }(this.model.root) }, i.prototype.addRule = function (t, i, r) { if (this.trigger("beforeAddRule", t).isDefaultPrevented()) return null; var f = this.nextRuleId(), e = n(this.getRuleTemplate(f)), u = t.addRule(e); return u.data = i, u.flags = n.extend({}, this.settings.default_rule_flags, r), this.trigger("afterAddRule", u), this.trigger("rulesChanged"), this.createRuleFilters(u), !this.settings.default_filter && this.settings.display_empty_filter || (u.filter = this.change("getDefaultFilter", this.getFilterById(this.settings.default_filter || this.filters[0].id), u)), u }, i.prototype.deleteRule = function (n) { return !n.flags.no_delete && !this.trigger("beforeDeleteRule", n).isDefaultPrevented() && (n.drop(), this.trigger("afterDeleteRule"), this.trigger("rulesChanged"), !0) }, i.prototype.createRuleFilters = function (t) { var r = this.change("getRuleFilters", this.filters, t), u = n(this.getRuleFilterSelect(t, r)); t.$el.find(i.selectors.filter_container).html(u); this.trigger("afterCreateRuleFilters", t); this.applyRuleFlags(t) }, i.prototype.createRuleOperators = function (t) { var f = t.$el.find(i.selectors.operator_container).empty(), r, u; t.filter && (r = this.getOperators(t.filter), u = n(this.getRuleOperatorSelect(t, r)), f.html(u), t.__.operator = t.filter.default_operator ? this.getOperatorByType(t.filter.default_operator) : r[0], t.$el.find(i.selectors.rule_operator).val(t.operator.type), this.trigger("afterCreateRuleOperators", t, r), this.applyRuleFlags(t)) }, i.prototype.createRuleInput = function (t) { var e = t.$el.find(i.selectors.value_container).empty(), o; if (t.__.value = void 0, t.filter && t.operator && 0 !== t.operator.nb_inputs) { for (var s = this, u = n(), r = t.filter, f = 0; f < t.operator.nb_inputs; f++)o = n(this.getRuleInput(t, f)), 0 < f && e.append(this.settings.inputs_separator), e.append(o), u = u.add(o); e.css("display", ""); u.on("change " + (r.input_event || ""), function () { t._updating_input || (t._updating_value = !0, t.value = s.getRuleInputValue(t), t._updating_value = !1) }); r.plugin && u[r.plugin](r.plugin_config || {}); this.trigger("afterCreateRuleInput", t); void 0 !== r.default_value ? t.value = r.default_value : (t._updating_value = !0, t.value = s.getRuleInputValue(t), t._updating_value = !1); this.applyRuleFlags(t) } }, i.prototype.updateRuleFilter = function (n, t) { this.createRuleOperators(n); this.createRuleInput(n); n.$el.find(i.selectors.rule_filter).val(n.filter ? n.filter.id : "-1"); t && n.filter && t.id !== n.filter.id && (n.data = void 0); this.trigger("afterUpdateRuleFilter", n, t); this.trigger("rulesChanged") }, i.prototype.updateRuleOperator = function (n, t) { var r = n.$el.find(i.selectors.value_container); n.operator && 0 !== n.operator.nb_inputs ? (r.css("display", ""), !r.is(":empty") && t && n.operator.nb_inputs === t.nb_inputs && n.operator.optgroup === t.optgroup || this.createRuleInput(n)) : (r.hide(), n.__.value = void 0); n.operator && (n.$el.find(i.selectors.rule_operator).val(n.operator.type), n.__.value = this.getRuleInputValue(n)); this.trigger("afterUpdateRuleOperator", n, t); this.trigger("rulesChanged") }, i.prototype.updateRuleValue = function (n, t) { n._updating_value || this.setRuleInputValue(n, n.value); this.trigger("afterUpdateRuleValue", n, t); this.trigger("rulesChanged") }, i.prototype.applyRuleFlags = function (n) { var t = n.flags, r = i.selectors; n.$el.find(r.rule_filter).prop("disabled", t.filter_readonly); n.$el.find(r.rule_operator).prop("disabled", t.operator_readonly); n.$el.find(r.rule_value).prop("disabled", t.value_readonly); t.no_delete && n.$el.find(r.delete_rule).remove(); this.trigger("afterApplyRuleFlags", n) }, i.prototype.applyGroupFlags = function (n) { var t = n.flags, r = i.selectors; n.$el.find(">" + r.group_condition).prop("disabled", t.condition_readonly).parent().toggleClass("readonly", t.condition_readonly); t.no_add_rule && n.$el.find(r.add_rule).remove(); t.no_add_group && n.$el.find(r.add_group).remove(); t.no_delete && n.$el.find(r.delete_group).remove(); this.trigger("afterApplyGroupFlags", n) }, i.prototype.clearErrors = function (n) { (n = n || this.model.root) && (n.error = null, n instanceof u && n.each(function (n) { n.error = null }, function (n) { this.clearErrors(n) }, this)) }, i.prototype.updateError = function (n) { if (this.settings.display_errors) if (null === n.error) n.$el.removeClass("has-error"); else { var t = this.translate("errors", n.error[0]); t = r.fmt(t, n.error.slice(1)); t = this.change("displayError", t, n.error, n); n.$el.addClass("has-error").find(i.selectors.error_container).eq(0).attr("title", t) } }, i.prototype.triggerValidationError = function (t, i, r) { n.isArray(i) || (i = [i]); this.trigger("validationError", t, i, r).isDefaultPrevented() || (t.error = i) }, i.prototype.destroy = function () { this.trigger("beforeDestroy"); this.status.generated_id && this.$el.removeAttr("id"); this.clear(); this.model = null; this.$el.off(".queryBuilder").removeClass("query-builder").removeData("queryBuilder"); delete this.$el[0].queryBuilder }, i.prototype.reset = function () { this.trigger("beforeReset").isDefaultPrevented() || (this.status.group_id = 1, this.status.rule_id = 0, this.model.root.empty(), this.model.root.data = void 0, this.model.root.flags = n.extend({}, this.settings.default_group_flags), this.model.root.condition = this.settings.default_condition, this.addRule(this.model.root), this.trigger("afterReset"), this.trigger("rulesChanged")) }, i.prototype.clear = function () { this.trigger("beforeClear").isDefaultPrevented() || (this.status.group_id = 0, this.status.rule_id = 0, this.model.root && (this.model.root.drop(), this.model.root = null), this.trigger("afterClear"), this.trigger("rulesChanged")) }, i.prototype.setOptions = function (t) { n.each(t, function (n, t) { -1 !== i.modifiable_options.indexOf(n) && (this.settings[n] = t) }.bind(this)) }, i.prototype.getModel = function (t) { return t ? t instanceof f ? t : n(t).data("queryBuilderModel") : this.model.root }, i.prototype.validate = function (t) { t = n.extend({ skip_empty: !1 }, t); this.clearErrors(); var i = this, r = function u(n) { var f = 0, r = 0; return n.each(function (n) { if (n.filter || !t.skip_empty) { if (!n.filter) return i.triggerValidationError(n, "no_filter", null), void r++; if (!n.operator) return i.triggerValidationError(n, "no_operator", null), void r++; if (0 !== n.operator.nb_inputs) { var u = i.validateValue(n, n.value); if (!0 !== u) return i.triggerValidationError(n, u, n.value), void r++ } f++ } }, function (n) { var t = u(n); !0 === t ? f++ : !1 === t && r++ }), !(0 < r) && (0 === f && !n.isRoot() && t.skip_empty ? null : !!(0 !== f || i.settings.allow_empty && n.isRoot()) || (i.triggerValidationError(n, "empty_group", null), !1)) }(this.model.root); return this.change("validate", r) }, i.prototype.getRules = function (t) { var r, i, u; return (t = n.extend({ get_flags: !1, allow_invalid: !1, skip_empty: !1 }, t), r = this.validate(t), !r && !t.allow_invalid) ? null : (i = this, u = function f(r) { var u = { condition: r.condition, rules: [] }, e; return (r.data && (u.data = n.extendext(!0, "replace", {}, r.data)), t.get_flags) && (e = i.getGroupFlags(r.flags, "all" === t.get_flags), n.isEmptyObject(e) || (u.flags = e)), r.each(function (r) { var e, f, o; (r.filter || !t.skip_empty) && (e = null, r.operator && 0 === r.operator.nb_inputs || (e = r.value), f = { id: r.filter ? r.filter.id : null, field: r.filter ? r.filter.field : null, type: r.filter ? r.filter.type : null, input: r.filter ? r.filter.input : null, operator: r.operator ? r.operator.type : null, value: e }, ((r.filter && r.filter.data || r.data) && (f.data = n.extendext(!0, "replace", {}, r.filter.data, r.data)), t.get_flags) && (o = i.getRuleFlags(r.flags, "all" === t.get_flags), n.isEmptyObject(o) || (f.flags = o)), u.rules.push(i.change("ruleToJson", f, r))) }, function (n) { var i = f(n); 0 === i.rules.length && t.skip_empty || u.rules.push(i) }, this), i.change("groupToJson", u, r) }(this.model.root), u.valid = r, this.change("getRules", u)) }, i.prototype.setRules = function (t, i) { i = n.extend({ allow_invalid: !1 }, i); n.isArray(t) && (t = { condition: this.settings.default_condition, rules: t }); t && t.rules && (0 !== t.rules.length || this.settings.allow_empty) || r.error("RulesParse", "Incorrect data object passed"); this.clear(); this.setRoot(!1, t.data, this.parseGroupFlags(t)); t = this.change("setRules", t, i); var u = this; !function f(n, t) { null !== t && (void 0 === n.condition ? n.condition = u.settings.default_condition : -1 == u.settings.conditions.indexOf(n.condition) && (r.error(!i.allow_invalid, "UndefinedCondition", 'Invalid condition "{0}"', n.condition), n.condition = u.settings.default_condition), t.condition = n.condition, n.rules.forEach(function (n) { var e; if (void 0 !== n.rules) if (-1 !== u.settings.allow_groups && u.settings.allow_groups < t.level) r.error(!i.allow_invalid, "RulesParse", "No more than {0} groups are allowed", u.settings.allow_groups), u.reset(); else { if (null === (e = u.addGroup(t, !1, n.data, u.parseGroupFlags(n)))) return; f(n, e) } else { if (n.empty || (void 0 === n.id && (r.error(!i.allow_invalid, "RulesParse", "Missing rule field id"), n.empty = !0), void 0 === n.operator && (n.operator = "equal")), null === (e = u.addRule(t, n.data, u.parseRuleFlags(n)))) return; n.empty || (e.filter = u.getFilterById(n.id, !i.allow_invalid)); e.filter && (e.operator = u.getOperatorByType(n.operator, !i.allow_invalid), e.operator || (e.operator = u.getOperators(e.filter)[0])); e.operator && 0 !== e.operator.nb_inputs && (void 0 !== n.value ? e.value = n.value : void 0 !== e.filter.default_value && (e.value = e.filter.default_value)); u.change("jsonToRule", e, n) != e && r.error("RulesParse", "Plugin tried to change rule reference") } }), u.change("jsonToGroup", t, n) != t && r.error("RulesParse", "Plugin tried to change group reference")) }(t, this.model.root); this.trigger("afterSetRules") }, i.prototype.validateValue = function (n, t) { var i = n.filter.validation || {}, r = !0; return r = i.callback ? i.callback.call(this, t, n) : this._validateValue(n, t), this.change("validateValue", r, t, n) }, i.prototype._validateValue = function (t, u) { var l, s, c = t.filter, a = t.operator, f = c.validation || {}, e = !0, h, o, y, v; for (1 === t.operator.nb_inputs && (u = [u]), h = 0; h < a.nb_inputs; h++) { if (!a.multiple && n.isArray(u[h]) && 1 < u[h].length) { e = ["operator_not_multiple", a.type, this.translate("operators", a.type)]; break } switch (c.input) { case "radio": if (void 0 === u[h] || 0 === u[h].length) { f.allow_empty_value || (e = ["radio_empty"]); break } break; case "checkbox": if (void 0 === u[h] || 0 === u[h].length) { f.allow_empty_value || (e = ["checkbox_empty"]); break } break; case "select": if (void 0 === u[h] || 0 === u[h].length || c.placeholder && u[h] == c.placeholder_value) { f.allow_empty_value || (e = ["select_empty"]); break } break; default: for (s = n.isArray(u[h]) ? u[h] : [u[h]], o = 0; o < s.length; o++) { switch (i.types[c.type]) { case "string": if (void 0 === s[o] || 0 === s[o].length) { f.allow_empty_value || (e = ["string_empty"]); break } if (void 0 !== f.min && s[o].length < parseInt(f.min)) { e = [this.getValidationMessage(f, "min", "string_exceed_min_length"), f.min]; break } if (void 0 !== f.max && s[o].length > parseInt(f.max)) { e = [this.getValidationMessage(f, "max", "string_exceed_max_length"), f.max]; break } if (f.format && ("string" == typeof f.format && (f.format = new RegExp(f.format)), !f.format.test(s[o]))) { e = [this.getValidationMessage(f, "format", "string_invalid_format"), f.format]; break } break; case "number": if (void 0 === s[o] || 0 === s[o].length) { f.allow_empty_value || (e = ["number_nan"]); break } if (isNaN(s[o])) { e = ["number_nan"]; break } if ("integer" == c.type) { if (parseInt(s[o]) != s[o]) { e = ["number_not_integer"]; break } } else if (parseFloat(s[o]) != s[o]) { e = ["number_not_double"]; break } if (void 0 !== f.min && s[o] < parseFloat(f.min)) { e = [this.getValidationMessage(f, "min", "number_exceed_min"), f.min]; break } if (void 0 !== f.max && s[o] > parseFloat(f.max)) { e = [this.getValidationMessage(f, "max", "number_exceed_max"), f.max]; break } if (void 0 !== f.step && "any" !== f.step && (y = (s[o] / f.step).toPrecision(14), parseInt(y) != y)) { e = [this.getValidationMessage(f, "step", "number_wrong_step"), f.step]; break } break; case "datetime": if (void 0 === s[o] || 0 === s[o].length) { f.allow_empty_value || (e = ["datetime_empty"]); break } if (f.format) { if ("moment" in window || r.error("MissingLibrary", "MomentJS is required for Date/Time validation. Get it here http://momentjs.com"), v = moment(s[o], f.format), !v.isValid()) { e = [this.getValidationMessage(f, "format", "datetime_invalid"), f.format]; break } if (f.min && v < moment(f.min, f.format)) { e = [this.getValidationMessage(f, "min", "datetime_exceed_min"), f.min]; break } if (f.max && v > moment(f.max, f.format)) { e = [this.getValidationMessage(f, "max", "datetime_exceed_max"), f.max]; break } } break; case "boolean": if (void 0 === s[o] || 0 === s[o].length) { f.allow_empty_value || (e = ["boolean_not_valid"]); break } if ("true" !== (l = ("" + s[o]).trim().toLowerCase()) && "false" !== l && "1" !== l && "0" !== l && 1 !== s[o] && 0 !== s[o]) { e = ["boolean_not_valid"]; break } }if (!0 !== e) break } }if (!0 !== e) break } if (("between" === t.operator.type || "not_between" === t.operator.type) && 2 === u.length) switch (i.types[c.type]) { case "number": u[0] > u[1] && (e = ["number_between_invalid", u[0], u[1]]); break; case "datetime": f.format && ("moment" in window || r.error("MissingLibrary", "MomentJS is required for Date/Time validation. Get it here http://momentjs.com"), moment(u[0], f.format).isAfter(moment(u[1], f.format)) && (e = ["datetime_between_invalid", u[0], u[1]])) }return e }, i.prototype.nextGroupId = function () { return this.status.id + "_group_" + this.status.group_id++ }, i.prototype.nextRuleId = function () { return this.status.id + "_rule_" + this.status.rule_id++ }, i.prototype.getOperators = function (n) { "string" == typeof n && (n = this.getFilterById(n)); for (var r = [], t = 0, u = this.operators.length; t < u; t++) { if (n.operators) { if (-1 == n.operators.indexOf(this.operators[t].type)) continue } else if (-1 == this.operators[t].apply_to.indexOf(i.types[n.type])) continue; r.push(this.operators[t]) } return n.operators && r.sort(function (t, i) { return n.operators.indexOf(t.type) - n.operators.indexOf(i.type) }), this.change("getOperators", r, n) }, i.prototype.getFilterById = function (n, t) { if ("-1" == n) return null; for (var i = 0, u = this.filters.length; i < u; i++)if (this.filters[i].id == n) return this.filters[i]; return r.error(!1 !== t, "UndefinedFilter", 'Undefined filter "{0}"', n), null }, i.prototype.getOperatorByType = function (n, t) { if ("-1" == n) return null; for (var i = 0, u = this.operators.length; i < u; i++)if (this.operators[i].type == n) return this.operators[i]; return r.error(!1 !== t, "UndefinedOperator", 'Undefined operator "{0}"', n), null }, i.prototype.getRuleInputValue = function (t) { var f = t.filter, c = t.operator, u = [], e, h, o, s; if (f.valueGetter) u = f.valueGetter.call(this, t); else { for (e = t.$el.find(i.selectors.value_container), h = 0; h < c.nb_inputs; h++) { s = r.escapeElementId(t.id + "_value_" + h); switch (f.input) { case "radio": u.push(e.find("[name=" + s + "]:checked").val()); break; case "checkbox": o = []; e.find("[name=" + s + "]:checked").each(function () { o.push(n(this).val()) }); u.push(o); break; case "select": f.multiple ? (o = [], e.find("[name=" + s + "] option:selected").each(function () { o.push(n(this).val()) }), u.push(o)) : u.push(e.find("[name=" + s + "] option:selected").val()); break; default: u.push(e.find("[name=" + s + "]").val()) } } u = u.map(function (t) { return c.multiple && f.value_separator && "string" == typeof t && (t = t.split(f.value_separator)), n.isArray(t) ? t.map(function (n) { return r.changeType(n, f.type) }) : r.changeType(t, f.type) }); 1 === c.nb_inputs && (u = u[0]); f.valueParser && (u = f.valueParser.call(this, t, u)) } return this.change("getRuleValue", u, t) }, i.prototype.setRuleInputValue = function (t, u) { var e = t.filter, o = t.operator, s, f, h; if (e && o) { if (t._updating_input = !0, e.valueSetter) e.valueSetter.call(this, t, u); else for (s = t.$el.find(i.selectors.value_container), 1 == o.nb_inputs && (u = [u]), f = 0; f < o.nb_inputs; f++) { h = r.escapeElementId(t.id + "_value_" + f); switch (e.input) { case "radio": s.find("[name=" + h + '][value="' + u[f] + '"]').prop("checked", !0).trigger("change"); break; case "checkbox": n.isArray(u[f]) || (u[f] = [u[f]]); u[f].forEach(function (n) { s.find("[name=" + h + '][value="' + n + '"]').prop("checked", !0).trigger("change") }); break; default: o.multiple && e.value_separator && n.isArray(u[f]) && (u[f] = u[f].join(e.value_separator)); s.find("[name=" + h + "]").val(u[f]).trigger("change") } } t._updating_input = !1 } }, i.prototype.parseRuleFlags = function (t) { var i = n.extend({}, this.settings.default_rule_flags); return t.readonly && n.extend(i, { filter_readonly: !0, operator_readonly: !0, value_readonly: !0, no_delete: !0 }), t.flags && n.extend(i, t.flags), this.change("parseRuleFlags", i, t) }, i.prototype.getRuleFlags = function (t, i) { if (i) return n.extend({}, t); var r = {}; return n.each(this.settings.default_rule_flags, function (n, i) { t[n] !== i && (r[n] = t[n]) }), r }, i.prototype.parseGroupFlags = function (t) { var i = n.extend({}, this.settings.default_group_flags); return t.readonly && n.extend(i, { condition_readonly: !0, no_add_rule: !0, no_add_group: !0, no_delete: !0 }), t.flags && n.extend(i, t.flags), this.change("parseGroupFlags", i, t) }, i.prototype.getGroupFlags = function (t, i) { if (i) return n.extend({}, t); var r = {}; return n.each(this.settings.default_group_flags, function (n, i) { t[n] !== i && (r[n] = t[n]) }), r }, i.prototype.translate = function (n, t) { var i; return t || (t = n, n = void 0), i = "object" == typeof t ? t[this.settings.lang_code] || t.en : (n ? this.lang[n] : this.lang)[t] || t, this.change("translate", i, t, n) }, i.prototype.getValidationMessage = function (n, t, i) { return n.messages && n.messages[t] || i }, i.templates.group = '<div id="{{= it.group_id }}" class="rules-group-container"> <div class="rules-group-header"> <div class="btn-group pull-right group-actions"> <button type="button" class="btn btn-xs btn-success" data-add="rule"> <i class="{{= it.icons.add_rule }}"><\/i> {{= it.translate("add_rule") }} <\/button> {{? it.settings.allow_groups===-1 || it.settings.allow_groups>=it.level }} <button type="button" class="btn btn-xs btn-success" data-add="group"> <i class="{{= it.icons.add_group }}"><\/i> {{= it.translate("add_group") }} <\/button> {{?}} {{? it.level>1 }} <button type="button" class="btn btn-xs btn-danger" data-delete="group"> <i class="{{= it.icons.remove_group }}"><\/i> {{= it.translate("delete_group") }} <\/button> {{?}} <\/div> <div class="btn-group group-conditions"> {{~ it.conditions: condition }} <label class="btn btn-xs btn-primary"> <input type="radio" name="{{= it.group_id }}_cond" value="{{= condition }}"> {{= it.translate("conditions", condition) }} <\/label> {{~}} <\/div> {{? it.settings.display_errors }} <div class="error-container"><i class="{{= it.icons.error }}"><\/i><\/div> {{?}} <\/div> <div class=rules-group-body> <div class=rules-list><\/div> <\/div> <\/div>', i.templates.rule = '<div id="{{= it.rule_id }}" class="rule-container"> <div class="rule-header"> <div class="btn-group pull-right rule-actions"> <button type="button" class="btn btn-xs btn-danger" data-delete="rule"> <i class="{{= it.icons.remove_rule }}"><\/i> {{= it.translate("delete_rule") }} <\/button> <\/div> <\/div> {{? it.settings.display_errors }} <div class="error-container"><i class="{{= it.icons.error }}"><\/i><\/div> {{?}} <div class="rule-filter-container"><\/div> <div class="rule-operator-container"><\/div> <div class="rule-value-container"><\/div> <\/div>', i.templates.filterSelect = '{{ var optgroup = null; }} <select class="form-control" name="{{= it.rule.id }}_filter"> {{? it.settings.display_empty_filter }} <option value="-1">{{= it.settings.select_placeholder }}<\/option> {{?}} {{~ it.filters: filter }} {{? optgroup !== filter.optgroup }} {{? optgroup !== null }}<\/optgroup>{{?}} {{? (optgroup = filter.optgroup) !== null }} <optgroup label="{{= it.translate(it.settings.optgroups[optgroup]) }}"> {{?}} {{?}} <option value="{{= filter.id }}" {{? filter.icon}}data-icon="{{= filter.icon}}"{{?}}>{{= it.translate(filter.label) }}<\/option> {{~}} {{? optgroup !== null }}<\/optgroup>{{?}} <\/select>', i.templates.operatorSelect = '{{? it.operators.length === 1 }} <span> {{= it.translate("operators", it.operators[0].type) }} <\/span> {{?}} {{ var optgroup = null; }} <select class="form-control {{? it.operators.length === 1 }}hide{{?}}" name="{{= it.rule.id }}_operator"> {{~ it.operators: operator }} {{? optgroup !== operator.optgroup }} {{? optgroup !== null }}<\/optgroup>{{?}} {{? (optgroup = operator.optgroup) !== null }} <optgroup label="{{= it.translate(it.settings.optgroups[optgroup]) }}"> {{?}} {{?}} <option value="{{= operator.type }}" {{? operator.icon}}data-icon="{{= operator.icon}}"{{?}}>{{= it.translate("operators", operator.type) }}<\/option> {{~}} {{? optgroup !== null }}<\/optgroup>{{?}} <\/select>', i.templates.ruleValueSelect = '{{ var optgroup = null; }} <select class="form-control" name="{{= it.name }}" {{? it.rule.filter.multiple }}multiple{{?}}> {{? it.rule.filter.placeholder }} <option value="{{= it.rule.filter.placeholder_value }}" disabled selected>{{= it.rule.filter.placeholder }}<\/option> {{?}} {{~ it.rule.filter.values: entry }} {{? optgroup !== entry.optgroup }} {{? optgroup !== null }}<\/optgroup>{{?}} {{? (optgroup = entry.optgroup) !== null }} <optgroup label="{{= it.translate(it.settings.optgroups[optgroup]) }}"> {{?}} {{?}} <option value="{{= entry.value }}">{{= entry.label }}<\/option> {{~}} {{? optgroup !== null }}<\/optgroup>{{?}} <\/select>', i.prototype.getGroupTemplate = function (n, t) { var i = this.templates.group({ builder: this, group_id: n, level: t, conditions: this.settings.conditions, icons: this.icons, settings: this.settings, translate: this.translate.bind(this) }); return this.change("getGroupTemplate", i, t) }, i.prototype.getRuleTemplate = function (n) { var t = this.templates.rule({ builder: this, rule_id: n, icons: this.icons, settings: this.settings, translate: this.translate.bind(this) }); return this.change("getRuleTemplate", t) }, i.prototype.getRuleFilterSelect = function (n, t) { var i = this.templates.filterSelect({ builder: this, rule: n, filters: t, icons: this.icons, settings: this.settings, translate: this.translate.bind(this) }); return this.change("getRuleFilterSelect", i, n, t) }, i.prototype.getRuleOperatorSelect = function (n, t) { var i = this.templates.operatorSelect({ builder: this, rule: n, operators: t, icons: this.icons, settings: this.settings, translate: this.translate.bind(this) }); return this.change("getRuleOperatorSelect", i, n, t) }, i.prototype.getRuleValueSelect = function (n, t) { var i = this.templates.ruleValueSelect({ builder: this, name: n, rule: t, icons: this.icons, settings: this.settings, translate: this.translate.bind(this) }); return this.change("getRuleValueSelect", i, n, t) }, i.prototype.getRuleInput = function (n, t) { var u = n.filter, f = n.filter.validation || {}, e = n.id + "_value_" + t, o = u.vertical ? " class=block" : "", i = ""; if ("function" == typeof u.input) i = u.input.call(this, n, e); else switch (u.input) { case "radio": case "checkbox": r.iterateOptions(u.values, function (n, t) { i += "<label" + o + '><input type="' + u.input + '" name="' + e + '" value="' + n + '"> ' + t + "<\/label> " }); break; case "select": i = this.getRuleValueSelect(e, n); break; case "textarea": i += '<textarea class="form-control" name="' + e + '"'; u.size && (i += ' cols="' + u.size + '"'); u.rows && (i += ' rows="' + u.rows + '"'); void 0 !== f.min && (i += ' minlength="' + f.min + '"'); void 0 !== f.max && (i += ' maxlength="' + f.max + '"'); u.placeholder && (i += ' placeholder="' + u.placeholder + '"'); i += "><\/textarea>"; break; case "number": i += '<input class="form-control" type="number" name="' + e + '"'; void 0 !== f.step && (i += ' step="' + f.step + '"'); void 0 !== f.min && (i += ' min="' + f.min + '"'); void 0 !== f.max && (i += ' max="' + f.max + '"'); u.placeholder && (i += ' placeholder="' + u.placeholder + '"'); u.size && (i += ' size="' + u.size + '"'); i += ">"; break; default: i += '<input class="form-control" type="text" name="' + e + '"'; u.placeholder && (i += ' placeholder="' + u.placeholder + '"'); "string" === u.type && void 0 !== f.min && (i += ' minlength="' + f.min + '"'); "string" === u.type && void 0 !== f.max && (i += ' maxlength="' + f.max + '"'); u.size && (i += ' size="' + u.size + '"'); i += ">" }return this.change("getRuleInput", i, n, e) }, r = {}, (i.utils = r).iterateOptions = function (t, i) { t && (n.isArray(t) ? t.forEach(function (t) { n.isPlainObject(t) ? "value" in t ? i(t.value, t.label || t.value, t.optgroup) : n.each(t, function (n, t) { return i(n, t), !1 }) : i(t, t) }) : n.each(t, function (n, t) { i(n, t) })) }, r.fmt = function (n, t) { return Array.isArray(t) || (t = Array.prototype.slice.call(arguments, 1)), n.replace(/{([0-9]+)}/g, function (n, i) { return t[parseInt(i)] }) }, r.error = function () { var n = 0, e = "boolean" != typeof arguments[n] || arguments[n++], u = arguments[n++], f = arguments[n++], i = Array.isArray(arguments[n]) ? arguments[n] : Array.prototype.slice.call(arguments, n), t; if (e) { t = new Error(r.fmt(f, i)); throw t.name = u + "Error", t.args = i, t; } console.error(u + "Error: " + r.fmt(f, i)) }, r.changeType = function (n, t) { if ("" !== n && void 0 !== n) switch (t) { case "integer": return "string" != typeof n || /^-?\d+$/.test(n) ? parseInt(n) : n; case "double": return "string" != typeof n || /^-?\d+\.?\d*$/.test(n) ? parseFloat(n) : n; case "boolean": return "string" != typeof n || /^(0|1|true|false){1}$/i.test(n) ? !0 === n || 1 === n || "true" === n.toLowerCase() || "1" === n : n; default: return n } }, r.escapeString = function (n) { return "string" != typeof n ? n : n.replace(/[\0\n\r\b\\\'\"]/g, function (n) { switch (n) { case "\0": return "\\0"; case "\n": return "\\n"; case "\r": return "\\r"; case "\b": return "\\b"; default: return "\\" + n } }).replace(/\t/g, "\\t").replace(/\x1a/g, "\\Z") }, r.escapeRegExp = function (n) { return n.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&") }, r.escapeElementId = function (n) { return n ? n.replace(/(\\)?([:.\[\],])/g, function (n, t, i) { return t ? n : "\\" + i }) : n }, r.groupSort = function (n, t) { var i = [], r = []; return n.forEach(function (n) { var u; n[t] ? -1 == (u = i.lastIndexOf(n[t])) ? u = i.length : u++ : u = i.length; i.splice(u, 0, n[t]); r.splice(u, 0, n) }), r }, r.defineModelProperties = function (t, i) { i.forEach(function (i) { Object.defineProperty(t.prototype, i, { enumerable: !0, get: function () { return this.__[i] }, set: function (t) { var r = null !== this.__[i] && "object" == typeof this.__[i] ? n.extend({}, this.__[i]) : this.__[i]; this.__[i] = t; null !== this.model && this.model.trigger("update", this, i, t, r) } }) }) }, n.extend(s.prototype, { trigger: function (t) { var i = new n.Event(t); return this.$.triggerHandler(i, Array.prototype.slice.call(arguments, 1)), i }, on: function () { return this.$.on.apply(this.$, Array.prototype.slice.call(arguments)), this }, off: function () { return this.$.off.apply(this.$, Array.prototype.slice.call(arguments)), this }, once: function () { return this.$.one.apply(this.$, Array.prototype.slice.call(arguments)), this } }), f = function (n, t) { if (!(this instanceof f)) return new f(n, t); Object.defineProperty(this, "__", { value: {} }); t.data("queryBuilderModel", this); this.__.level = 1; this.__.error = null; this.__.flags = {}; this.__.data = void 0; this.$el = t; this.id = t[0].id; this.model = null; this.parent = n }, r.defineModelProperties(f, ["level", "error", "data", "flags"]), Object.defineProperty(f.prototype, "parent", { enumerable: !0, get: function () { return this.__.parent }, set: function (n) { this.__.parent = n; this.level = null === n ? 1 : n.level + 1; this.model = null === n ? null : n.model } }), f.prototype.isRoot = function () { return 1 === this.level }, f.prototype.getPos = function () { return this.isRoot() ? -1 : this.parent.getNodePos(this) }, f.prototype.drop = function () { var n = this.model; this.parent && this.parent.removeNode(this); this.$el.removeData("queryBuilderModel"); null !== n && n.trigger("drop", this) }, f.prototype.moveAfter = function (n) { this.isRoot() || this.move(n.parent, n.getPos() + 1) }, f.prototype.moveAtBegin = function (n) { this.isRoot() || (void 0 === n && (n = this.parent), this.move(n, 0)) }, f.prototype.moveAtEnd = function (n) { this.isRoot() || (void 0 === n && (n = this.parent), this.move(n, 0 === n.length() ? 0 : n.length() - 1)) }, f.prototype.move = function (n, t) { this.isRoot() || ("number" == typeof n && (t = n, n = this.parent), this.parent.removeNode(this), n.insertNode(this, t, !1), null !== this.model && this.model.trigger("move", this, n, t)) }, u = function (n, t) { if (!(this instanceof u)) return new u(n, t); f.call(this, n, t); this.rules = []; this.__.condition = null }, u.prototype = Object.create(f.prototype), u.prototype.constructor = u, r.defineModelProperties(u, ["condition"]), u.prototype.empty = function () { this.each("reverse", function (n) { n.drop() }, function (n) { n.drop() }) }, u.prototype.drop = function () { this.empty(); f.prototype.drop.call(this) }, u.prototype.length = function () { return this.rules.length }, u.prototype.insertNode = function (n, t, i) { return void 0 === t && (t = this.length()), this.rules.splice(t, 0, n), n.parent = this, i && null !== this.model && this.model.trigger("add", this, n, t), n }, u.prototype.addGroup = function (n, t) { return this.insertNode(new u(this, n), t, !0) }, u.prototype.addRule = function (n, t) { return this.insertNode(new e(this, n), t, !0) }, u.prototype.removeNode = function (n) { var t = this.getNodePos(n); -1 !== t && (n.parent = null, this.rules.splice(t, 1)) }, u.prototype.getNodePos = function (n) { return this.rules.indexOf(n) }, u.prototype.each = function (n, t, i, r) { "boolean" != typeof n && "string" != typeof n && (r = i, i = t, t = n, n = !1); r = void 0 === r ? null : r; for (var f = n ? this.rules.length - 1 : 0, o = n ? 0 : this.rules.length - 1, s = n ? -1 : 1, e = !1; (n ? o <= f : f <= o) && (this.rules[f] instanceof u ? i && (e = !1 === i.call(r, this.rules[f])) : t && (e = !1 === t.call(r, this.rules[f])), !e); f += s); return !e }, u.prototype.contains = function (n, t) { return -1 !== this.getNodePos(n) || !!t && !this.each(function () { return !0 }, function (t) { return !t.contains(n, !0) }) }, e = function (n, t) { if (!(this instanceof e)) return new e(n, t); f.call(this, n, t); this._updating_value = !1; this._updating_input = !1; this.__.filter = null; this.__.operator = null; this.__.value = void 0 }, e.prototype = Object.create(f.prototype), e.prototype.constructor = e, r.defineModelProperties(e, ["filter", "operator", "value"]), e.prototype.isRoot = function () { return !1 }, i.Group = u, i.Rule = e, n.fn.queryBuilder = function (n) { var t, u, f; return (0 === this.length && r.error("Config", "No target defined"), 1 < this.length && r.error("Config", "Unable to initialize on multiple target"), t = this.data("queryBuilder"), u = "object" == typeof n && n || {}, !t && "destroy" == n) ? this : (t || (f = new i(this, u), this.data("queryBuilder", f), f.init(u.rules)), "string" == typeof n ? t[n].apply(t, Array.prototype.slice.call(arguments, 1)) : this) }, n.fn.queryBuilder.constructor = i, n.fn.queryBuilder.defaults = i.defaults, n.fn.queryBuilder.extend = i.extend, n.fn.queryBuilder.define = i.define, n.fn.queryBuilder.regional = i.regional, i.define("bt-checkbox", function (n) { "glyphicons" == n.font && this.$el.addClass("bt-checkbox-glyphicons"); this.on("getRuleInput.filter", function (t, i, u) { var f = i.filter, e, o; "radio" !== f.input && "checkbox" !== f.input || f.plugin || (t.value = "", f.colors || (f.colors = {}), f.color && (f.colors._def_ = f.color), e = f.vertical ? ' style="display:block"' : "", o = 0, r.iterateOptions(f.values, function (i, r) { var h = f.colors[i] || f.colors._def_ || n.color, s = u + "_" + o++; t.value += "<div" + e + ' class="' + f.input + " " + f.input + "-" + h + '"> <input type="' + f.input + '" name="' + u + '" id="' + s + '" value="' + i + '"> <label for="' + s + '">' + r + "<\/label> <\/div>" })) }) }, { font: "glyphicons", color: "default" }), i.define("bt-selectpicker", function (t) { n.fn.selectpicker && n.fn.selectpicker.Constructor || r.error("MissingLibrary", 'Bootstrap Select is required to use "bt-selectpicker" plugin. Get it here: http://silviomoreto.github.io/bootstrap-select'); var u = i.selectors; this.on("afterCreateRuleFilters", function (n, i) { i.$el.find(u.rule_filter).removeClass("form-control").selectpicker(t) }); this.on("afterCreateRuleOperators", function (n, i) { i.$el.find(u.rule_operator).removeClass("form-control").selectpicker(t) }); this.on("afterUpdateRuleFilter", function (n, t) { t.$el.find(u.rule_filter).selectpicker("render") }); this.on("afterUpdateRuleOperator", function (n, t) { t.$el.find(u.rule_operator).selectpicker("render") }); this.on("beforeDeleteRule", function (n, t) { t.$el.find(u.rule_filter).selectpicker("destroy"); t.$el.find(u.rule_operator).selectpicker("destroy") }) }, { container: "body", style: "btn-inverse btn-xs", width: "auto", showIcon: !1 }), i.define("bt-tooltip-errors", function (t) { n.fn.tooltip && n.fn.tooltip.Constructor && n.fn.tooltip.Constructor.prototype.fixTitle || r.error("MissingLibrary", 'Bootstrap Tooltip is required to use "bt-tooltip-errors" plugin. Get it here: http://getbootstrap.com'); var u = this; this.on("getRuleTemplate.filter getGroupTemplate.filter", function (t) { var r = n(t.value); r.find(i.selectors.error_container).attr("data-toggle", "tooltip"); t.value = r.prop("outerHTML") }); this.model.on("update", function (n, r, f) { "error" == f && u.settings.display_errors && r.$el.find(i.selectors.error_container).eq(0).tooltip(t).tooltip("hide").tooltip("fixTitle") }) }, { placement: "right" }), i.extend({ setFilters: function (n, t) { var u = this, f; if (void 0 === t && (t = n, n = !1), t = this.checkFilters(t), f = (t = this.change("setFilters", t)).map(function (n) { return n.id }), n || function n(t) { t.each(function (n) { n.filter && -1 === f.indexOf(n.filter.id) && r.error("ChangeFilter", 'A rule is using filter "{0}"', n.filter.id) }, n) }(this.model.root), this.filters = t, function n(t) { t.each(!0, function (n) { n.filter && -1 === f.indexOf(n.filter.id) ? (n.drop(), u.trigger("rulesChanged")) : (u.createRuleFilters(n), n.$el.find(i.selectors.rule_filter).val(n.filter ? n.filter.id : "-1"), u.trigger("afterUpdateRuleFilter", n)) }, n) }(this.model.root), this.settings.plugins && (this.settings.plugins["unique-filter"] && this.updateDisabledFilters(), this.settings.plugins["bt-selectpicker"] && this.$el.find(i.selectors.rule_filter).selectpicker("render")), this.settings.default_filter) try { this.getFilterById(this.settings.default_filter) } catch (n) { this.settings.default_filter = null } this.trigger("afterSetFilters", t) }, addFilter: function (t, i) { void 0 === i || "#end" == i ? i = this.filters.length : "#start" == i && (i = 0); n.isArray(t) || (t = [t]); var r = n.extend(!0, [], this.filters); parseInt(i) == i ? Array.prototype.splice.apply(r, [i, 0].concat(t)) : this.filters.some(function (n, t) { if (n.id == i) return i = t + 1, !0 }) ? Array.prototype.splice.apply(r, [i, 0].concat(t)) : Array.prototype.push.apply(r, t); this.setFilters(r) }, removeFilter: function (t, i) { var r = n.extend(!0, [], this.filters); "string" == typeof t && (t = [t]); r = r.filter(function (n) { return -1 === t.indexOf(n.id) }); this.setFilters(i, r) } }), i.define("chosen-selectpicker", function (t) { n.fn.chosen || r.error("MissingLibrary", 'chosen is required to use "chosen-selectpicker" plugin. Get it here: https://github.com/harvesthq/chosen'); this.settings.plugins["bt-selectpicker"] && r.error("Conflict", "bt-selectpicker is already selected as the dropdown plugin. Please remove chosen-selectpicker from the plugin list"); var u = i.selectors; this.on("afterCreateRuleFilters", function (n, i) { i.$el.find(u.rule_filter).removeClass("form-control").chosen(t) }); this.on("afterCreateRuleOperators", function (n, i) { i.$el.find(u.rule_operator).removeClass("form-control").chosen(t) }); this.on("afterUpdateRuleFilter", function (n, t) { t.$el.find(u.rule_filter).trigger("chosen:updated") }); this.on("afterUpdateRuleOperator", function (n, t) { t.$el.find(u.rule_operator).trigger("chosen:updated") }); this.on("beforeDeleteRule", function (n, t) { t.$el.find(u.rule_filter).chosen("destroy"); t.$el.find(u.rule_operator).chosen("destroy") }) }), i.define("filter-description", function (t) { "inline" === t.mode ? this.on("afterUpdateRuleFilter afterUpdateRuleOperator", function (i, r) { var u = r.$el.find("p.filter-description"), f = i.builder.getFilterDescription(r.filter, r); f ? (0 === u.length ? (u = n('<p class="filter-description"><\/p>')).appendTo(r.$el) : u.css("display", ""), u.html('<i class="' + t.icon + '"><\/i> ' + f)) : u.hide() }) : "popover" === t.mode ? (n.fn.popover && n.fn.popover.Constructor && n.fn.popover.Constructor.prototype.fixTitle || r.error("MissingLibrary", 'Bootstrap Popover is required to use "filter-description" plugin. Get it here: http://getbootstrap.com'), this.on("afterUpdateRuleFilter afterUpdateRuleOperator", function (r, u) { var f = u.$el.find("button.filter-description"), e = r.builder.getFilterDescription(u.filter, u); e ? (0 === f.length ? ((f = n('<button type="button" class="btn btn-xs btn-info filter-description" data-toggle="popover"><i class="' + t.icon + '"><\/i><\/button>')).prependTo(u.$el.find(i.selectors.rule_actions)), f.popover({ placement: "left", container: "body", html: !0 }), f.on("mouseout", function () { f.popover("hide") })) : f.css("display", ""), f.data("bs.popover").options.content = e, f.attr("aria-describedby") && f.popover("show")) : (f.hide(), f.data("bs.popover") && f.popover("hide")) })) : "bootbox" === t.mode && ("bootbox" in window || r.error("MissingLibrary", 'Bootbox is required to use "filter-description" plugin. Get it here: http://bootboxjs.com'), this.on("afterUpdateRuleFilter afterUpdateRuleOperator", function (r, u) { var f = u.$el.find("button.filter-description"), e = r.builder.getFilterDescription(u.filter, u); e ? (0 === f.length ? ((f = n('<button type="button" class="btn btn-xs btn-info filter-description" data-toggle="bootbox"><i class="' + t.icon + '"><\/i><\/button>')).prependTo(u.$el.find(i.selectors.rule_actions)), f.on("click", function () { bootbox.alert(f.data("description")) })) : f.css("display", ""), f.data("description", e)) : f.hide() })) }, { icon: "glyphicon glyphicon-info-sign", mode: "popover" }), i.extend({ getFilterDescription: function (n, t) { if (n) return "function" == typeof n.description ? n.description.call(this, t) : n.description } }), i.define("invert", function (t) { var r = this, u = i.selectors; this.on("afterInit", function () { r.$el.on("click.queryBuilder", "[data-invert=group]", function () { var i = n(this).closest(u.group_container); r.invert(r.getModel(i), t) }); t.display_rules_button && t.invert_rules && r.$el.on("click.queryBuilder", "[data-invert=rule]", function () { var i = n(this).closest(u.rule_container); r.invert(r.getModel(i), t) }) }); t.disable_template || (this.on("getGroupTemplate.filter", function (i) { var f = n(i.value); f.find(u.condition_container).after('<button type="button" class="btn btn-xs btn-default" data-invert="group"><i class="' + t.icon + '"><\/i> ' + r.translate("invert") + "<\/button>"); i.value = f.prop("outerHTML") }), t.display_rules_button && t.invert_rules && this.on("getRuleTemplate.filter", function (i) { var f = n(i.value); f.find(u.rule_actions).prepend('<button type="button" class="btn btn-xs btn-default" data-invert="rule"><i class="' + t.icon + '"><\/i> ' + r.translate("invert") + "<\/button>"); i.value = f.prop("outerHTML") })) }, { icon: "glyphicon glyphicon-random", recursive: !0, invert_rules: !0, display_rules_button: !1, silent_fail: !1, disable_template: !1 }), i.defaults({ operatorOpposites: { equal: "not_equal", not_equal: "equal", "in": "not_in", not_in: "in", less: "greater_or_equal", less_or_equal: "greater", greater: "less_or_equal", greater_or_equal: "less", between: "not_between", not_between: "between", begins_with: "not_begins_with", not_begins_with: "begins_with", contains: "not_contains", not_contains: "contains", ends_with: "not_ends_with", not_ends_with: "ends_with", is_empty: "is_not_empty", is_not_empty: "is_empty", is_null: "is_not_null", is_not_null: "is_null" }, conditionOpposites: { AND: "OR", OR: "AND" } }), i.extend({ invert: function (t, i) { var o, s; if (!(t instanceof f)) { if (!this.model.root) return; i = t; t = this.model.root } ("object" != typeof i && (i = {}), void 0 === i.recursive && (i.recursive = !0), void 0 === i.invert_rules && (i.invert_rules = !0), void 0 === i.silent_fail && (i.silent_fail = !1), void 0 === i.trigger && (i.trigger = !0), t instanceof u) ? (this.settings.conditionOpposites[t.condition] ? t.condition = this.settings.conditionOpposites[t.condition] : i.silent_fail || r.error("InvertCondition", 'Unknown inverse of condition "{0}"', t.condition), i.recursive) && (o = n.extend({}, i, { trigger: !1 }), t.each(function (n) { i.invert_rules && this.invert(n, o) }, function (n) { this.invert(n, o) }, this)) : t instanceof e && t.operator && !t.filter.no_invert && (this.settings.operatorOpposites[t.operator.type] ? (s = this.settings.operatorOpposites[t.operator.type], t.filter.operators && -1 == t.filter.operators.indexOf(s) || (t.operator = this.getOperatorByType(s))) : i.silent_fail || r.error("InvertOperator", 'Unknown inverse of operator "{0}"', t.operator.type)); i.trigger && (this.trigger("afterInvert", t, i), this.trigger("rulesChanged")) } }), i.defaults({ mongoOperators: { equal: function (n) { return n[0] }, not_equal: function (n) { return { $ne: n[0] } }, "in": function (n) { return { $in: n } }, not_in: function (n) { return { $nin: n } }, less: function (n) { return { $lt: n[0] } }, less_or_equal: function (n) { return { $lte: n[0] } }, greater: function (n) { return { $gt: n[0] } }, greater_or_equal: function (n) { return { $gte: n[0] } }, between: function (n) { return { $gte: n[0], $lte: n[1] } }, not_between: function (n) { return { $lt: n[0], $gt: n[1] } }, begins_with: function (n) { return { $regex: "^" + r.escapeRegExp(n[0]) } }, not_begins_with: function (n) { return { $regex: "^(?!" + r.escapeRegExp(n[0]) + ")" } }, contains: function (n) { return { $regex: r.escapeRegExp(n[0]) } }, not_contains: function (n) { return { $regex: "^((?!" + r.escapeRegExp(n[0]) + ").)*$", $options: "s" } }, ends_with: function (n) { return { $regex: r.escapeRegExp(n[0]) + "$" } }, not_ends_with: function (n) { return { $regex: "(?<!" + r.escapeRegExp(n[0]) + ")$" } }, is_empty: function () { return "" }, is_not_empty: function () { return { $ne: "" } }, is_null: function () { return null }, is_not_null: function () { return { $ne: null } } }, mongoRuleOperators: { $eq: function (n) { return { val: n, op: null === n ? "is_null" : "" === n ? "is_empty" : "equal" } }, $ne: function (n) { return { val: n = n.$ne, op: null === n ? "is_not_null" : "" === n ? "is_not_empty" : "not_equal" } }, $regex: function (n) { return "^(?!" == (n = n.$regex).slice(0, 4) && ")" == n.slice(-1) ? { val: n.slice(4, -1), op: "not_begins_with" } : "^((?!" == n.slice(0, 5) && ").)*$" == n.slice(-5) ? { val: n.slice(5, -5), op: "not_contains" } : "(?<!" == n.slice(0, 4) && ")$" == n.slice(-2) ? { val: n.slice(4, -2), op: "not_ends_with" } : "$" == n.slice(-1) ? { val: n.slice(0, -1), op: "ends_with" } : "^" == n.slice(0, 1) ? { val: n.slice(1), op: "begins_with" } : { val: n, op: "contains" } }, between: function (n) { return { val: [n.$gte, n.$lte], op: "between" } }, not_between: function (n) { return { val: [n.$lt, n.$gt], op: "not_between" } }, $in: function (n) { return { val: n.$in, op: "in" } }, $nin: function (n) { return { val: n.$nin, op: "not_in" } }, $lt: function (n) { return { val: n.$lt, op: "less" } }, $lte: function (n) { return { val: n.$lte, op: "less_or_equal" } }, $gt: function (n) { return { val: n.$gt, op: "greater" } }, $gte: function (n) { return { val: n.$gte, op: "greater_or_equal" } } } }), i.extend({ getMongo: function (n) { if (!(n = void 0 === n ? this.getRules() : n)) return null; var t = this; return function i(n) { var u, f; return (n.condition || (n.condition = t.settings.default_condition), -1 === ["AND", "OR"].indexOf(n.condition.toUpperCase()) && r.error("UndefinedMongoCondition", 'Unable to build MongoDB query with condition "{0}"', n.condition), !n.rules) ? {} : (u = [], n.rules.forEach(function (n) { var f, o, e; n.rules && 0 < n.rules.length ? u.push(i(n)) : (f = t.settings.mongoOperators[n.operator], o = t.getOperatorByType(n.operator), void 0 === f && r.error("UndefinedMongoOperator", 'Unknown MongoDB operation for operator "{0}"', n.operator), 0 !== o.nb_inputs && (n.value instanceof Array || (n.value = [n.value])), e = {}, e[t.change("getMongoDBField", n.field, n)] = f.call(t, n.value), u.push(t.change("ruleToMongo", e, n, n.value, f))) }), f = {}, f["$" + n.condition.toLowerCase()] = u, t.change("groupToMongo", f, n)) }(n) }, getRulesFromMongo: function (n) { var t, i; return null == n ? null : (t = this, "rules" in (n = t.change("parseMongoNode", n)) && "condition" in n) ? n : "id" in n && "operator" in n && "value" in n ? { condition: this.settings.default_condition, rules: [n] } : (i = t.getMongoCondition(n), i || r.error("MongoParse", "Invalid MongoDB query format"), function u(n, i) { var e = n[i], f = []; return e.forEach(function (n) { var i, h; if ("rules" in (n = t.change("parseMongoNode", n)) && "condition" in n) f.push(n); else if ("id" in n && "operator" in n && "value" in n) f.push(n); else if (i = t.getMongoCondition(n), i) f.push(u(n, i)); else { var e = Object.keys(n)[0], o = n[e], s = t.getMongoOperator(o); void 0 === s && r.error("MongoParse", "Invalid MongoDB query format"); h = t.settings.mongoRuleOperators[s]; void 0 === h && r.error("UndefinedMongoOperator", 'JSON Rule operation unknown for operator "{0}"', s); var c = h.call(t, o), l = t.getMongoDBFieldID(e, o), a = t.change("mongoToRule", { id: l, field: e, operator: c.op, value: c.val }, n); f.push(a) } }), t.change("mongoToGroup", { condition: i.replace("$", "").toUpperCase(), rules: f }, n) }(n, i)) }, setRulesFromMongo: function (n) { this.setRules(this.getRulesFromMongo(n)) }, getMongoDBFieldID: function (n, t) { var i = this.filters.filter(function (t) { return t.field === n }); return 1 === i.length ? i[0].id : this.change("getMongoDBFieldID", n, t) }, getMongoOperator: function (n) { if (null === n || "object" != typeof n) return "$eq"; if (void 0 !== n.$gte && void 0 !== n.$lte) return "between"; if (void 0 !== n.$lt && void 0 !== n.$gt) return "not_between"; var t = Object.keys(n).filter(function (n) { return !!this.settings.mongoRuleOperators[n] }.bind(this)); if (1 === t.length) return t[0] }, getMongoCondition: function (n) { for (var i = Object.keys(n), t = 0, r = i.length; t < r; t++)if ("$or" === i[t].toLowerCase() || "$and" === i[t].toLowerCase()) return i[t] } }), i.define("not-group", function (t) { var r = this; this.on("afterInit", function () { r.$el.on("click.queryBuilder", "[data-not=group]", function () { var u = n(this).closest(i.selectors.group_container), t = r.getModel(u); t.not = !t.not }); r.model.on("update", function (n, t, i) { t instanceof u && "not" === i && r.updateGroupNot(t) }) }); this.on("afterAddGroup", function (n, t) { t.__.not = !1 }); t.disable_template || this.on("getGroupTemplate.filter", function (u) { var f = n(u.value); f.find(i.selectors.condition_container).prepend('<button type="button" class="btn btn-xs btn-default" data-not="group"><i class="' + t.icon_unchecked + '"><\/i> ' + r.translate("NOT") + "<\/button>"); u.value = f.prop("outerHTML") }); this.on("groupToJson.filter", function (n, t) { n.value.not = t.not }); this.on("jsonToGroup.filter", function (n, t) { n.value.not = !!t.not }); this.on("groupToSQL.filter", function (n, t) { t.not && (n.value = "NOT ( " + n.value + " )") }); this.on("parseSQLNode.filter", function (n) { n.value.name && "NOT" == n.value.name.toUpperCase() && (n.value = n.value.arguments.value[0], -1 === ["AND", "OR"].indexOf(n.value.operation.toUpperCase()) && (n.value = new SQLParser.nodes.Op(r.settings.default_condition, n.value, null)), n.value.not = !0) }); this.on("sqlGroupsDistinct.filter", function (n, t, i, r) { i.not && 0 < r && (n.value = !0) }); this.on("sqlToGroup.filter", function (n, t) { n.value.not = !!t.not }); this.on("groupToMongo.filter", function (n, t) { var i = "$" + t.condition.toLowerCase(); t.not && n.value[i] && (n.value = { $nor: [n.value] }) }); this.on("parseMongoNode.filter", function (n) { var t = Object.keys(n.value); "$nor" == t[0] && (n.value = n.value[t[0]][0], n.value.not = !0) }); this.on("mongoToGroup.filter", function (n, t) { n.value.not = !!t.not }) }, { icon_unchecked: "glyphicon glyphicon-unchecked", icon_checked: "glyphicon glyphicon-check", disable_template: !1 }), r.defineModelProperties(u, ["not"]), i.selectors.group_not = i.selectors.group_header + " [data-not=group]", i.extend({ updateGroupNot: function (n) { var t = this.plugins["not-group"]; n.$el.find(">" + i.selectors.group_not).toggleClass("active", n.not).find("i").attr("class", n.not ? t.icon_checked : t.icon_unchecked); this.trigger("afterUpdateGroupNot", n); this.trigger("rulesChanged") } }), i.define("sortable", function (t) { var e, s, f, h; "interact" in window || r.error("MissingLibrary", 'interact.js is required to use "sortable" plugin. Get it here: http://interactjs.io'); void 0 !== t.default_no_sortable && (r.error(!1, "Config", 'Sortable plugin : "default_no_sortable" options is deprecated, use standard "default_rule_flags" and "default_group_flags" instead'), this.settings.default_rule_flags.no_sortable = this.settings.default_group_flags.no_sortable = t.default_no_sortable); interact.dynamicDrop(!0); interact.pointerMoveTolerance(10); this.on("afterAddRule afterAddGroup", function (r, c) { if (c != e) { var l = r.builder; t.inherit_no_sortable && c.parent && c.parent.flags.no_sortable && (c.flags.no_sortable = !0); t.inherit_no_drop && c.parent && c.parent.flags.no_drop && (c.flags.no_drop = !0); c.flags.no_sortable || interact(c.$el[0]).draggable({ allowFrom: i.selectors.drag_handle, onstart: function (t) { h = !1; f = l.getModel(t.target); s = f.$el.clone().appendTo(f.$el.parent()).width(f.$el.outerWidth()).addClass("dragging"); var i = n('<div class="rule-placeholder">&nbsp;<\/div>').height(f.$el.outerHeight()); e = f.parent.addRule(i, f.getPos()); f.$el.hide() }, onmove: function (n) { s[0].style.top = n.clientY - 15 + "px"; s[0].style.left = n.clientX - 15 + "px" }, onend: function (t) { t.dropzone && (o(f, n(t.relatedTarget), l), h = !0); s.remove(); s = void 0; e.drop(); e = void 0; f.$el.css("display", ""); l.trigger("afterMove", f); l.trigger("rulesChanged") } }); c.flags.no_drop || (interact(c.$el[0]).dropzone({ accept: i.selectors.rule_and_group_containers, ondragenter: function (t) { o(e, n(t.target), l) }, ondrop: function (t) { h || o(f, n(t.target), l) } }), c instanceof u && interact(c.$el.find(i.selectors.group_header)[0]).dropzone({ accept: i.selectors.rule_and_group_containers, ondragenter: function (t) { o(e, n(t.target), l) }, ondrop: function (t) { h || o(f, n(t.target), l) } })) } }); this.on("beforeDeleteRule beforeDeleteGroup", function (n, t) { n.isDefaultPrevented() || (interact(t.$el[0]).unset(), t instanceof u && interact(t.$el.find(i.selectors.group_header)[0]).unset()) }); this.on("afterApplyRuleFlags afterApplyGroupFlags", function (n, t) { t.flags.no_sortable && t.$el.find(".drag-handle").remove() }); t.disable_template || (this.on("getGroupTemplate.filter", function (r, u) { if (1 < u) { var f = n(r.value); f.find(i.selectors.condition_container).after('<div class="drag-handle"><i class="' + t.icon + '"><\/i><\/div>'); r.value = f.prop("outerHTML") } }), this.on("getRuleTemplate.filter", function (r) { var u = n(r.value); u.find(i.selectors.rule_header).after('<div class="drag-handle"><i class="' + t.icon + '"><\/i><\/div>'); r.value = u.prop("outerHTML") })) }, { inherit_no_sortable: !0, inherit_no_drop: !0, icon: "glyphicon glyphicon-sort", disable_template: !1 }), i.selectors.rule_and_group_containers = i.selectors.rule_container + ", " + i.selectors.group_container, i.selectors.drag_handle = ".drag-handle", i.defaults({ default_rule_flags: { no_sortable: !1, no_drop: !1 }, default_group_flags: { no_sortable: !1, no_drop: !1 } }), i.define("sql-support", function () { }, { boolean_as_integer: !0 }), i.defaults({ sqlOperators: { equal: { op: "= ?" }, not_equal: { op: "!= ?" }, "in": { op: "IN(?)", sep: ", " }, not_in: { op: "NOT IN(?)", sep: ", " }, less: { op: "< ?" }, less_or_equal: { op: "<= ?" }, greater: { op: "> ?" }, greater_or_equal: { op: ">= ?" }, between: { op: "BETWEEN ?", sep: " AND " }, not_between: { op: "NOT BETWEEN ?", sep: " AND " }, begins_with: { op: "LIKE(?)", mod: "{0}%" }, not_begins_with: { op: "NOT LIKE(?)", mod: "{0}%" }, contains: { op: "LIKE(?)", mod: "%{0}%" }, not_contains: { op: "NOT LIKE(?)", mod: "%{0}%" }, ends_with: { op: "LIKE(?)", mod: "%{0}" }, not_ends_with: { op: "NOT LIKE(?)", mod: "%{0}" }, is_empty: { op: "= ''" }, is_not_empty: { op: "!= ''" }, is_null: { op: "IS NULL" }, is_not_null: { op: "IS NOT NULL" } }, sqlRuleOperator: { "=": function (n) { return { val: n, op: "" === n ? "is_empty" : "equal" } }, "!=": function (n) { return { val: n, op: "" === n ? "is_not_empty" : "not_equal" } }, LIKE: function (n) { return "%" == n.slice(0, 1) && "%" == n.slice(-1) ? { val: n.slice(1, -1), op: "contains" } : "%" == n.slice(0, 1) ? { val: n.slice(1), op: "ends_with" } : "%" == n.slice(-1) ? { val: n.slice(0, -1), op: "begins_with" } : void r.error("SQLParse", 'Invalid value for LIKE operator "{0}"', n) }, "NOT LIKE": function (n) { return "%" == n.slice(0, 1) && "%" == n.slice(-1) ? { val: n.slice(1, -1), op: "not_contains" } : "%" == n.slice(0, 1) ? { val: n.slice(1), op: "not_ends_with" } : "%" == n.slice(-1) ? { val: n.slice(0, -1), op: "not_begins_with" } : void r.error("SQLParse", 'Invalid value for NOT LIKE operator "{0}"', n) }, IN: function (n) { return { val: n, op: "in" } }, "NOT IN": function (n) { return { val: n, op: "not_in" } }, "<": function (n) { return { val: n, op: "less" } }, "<=": function (n) { return { val: n, op: "less_or_equal" } }, ">": function (n) { return { val: n, op: "greater" } }, ">=": function (n) { return { val: n, op: "greater_or_equal" } }, BETWEEN: function (n) { return { val: n, op: "between" } }, "NOT BETWEEN": function (n) { return { val: n, op: "not_between" } }, IS: function (n) { return null !== n && r.error("SQLParse", "Invalid value for IS operator"), { val: null, op: "is_null" } }, "IS NOT": function (n) { return null !== n && r.error("SQLParse", "Invalid value for IS operator"), { val: null, op: "is_not_null" } } }, sqlStatements: { question_mark: function () { var n = []; return { add: function (t, i) { return n.push(i), "?" }, run: function () { return n } } }, numbered: function (n) { (!n || 1 < n.length) && (n = "$"); var i = 0, t = []; return { add: function (r, u) { return t.push(u), n + ++i }, run: function () { return t } } }, named: function (n) { (!n || 1 < n.length) && (n = ":"); var t = {}, i = {}; return { add: function (r, u) { t[r.field] || (t[r.field] = 1); var f = r.field + "_" + t[r.field]++; return i[f] = u, n + f }, run: function () { return i } } } }, sqlRuleStatement: { question_mark: function (n) { var t = 0; return { parse: function (i) { return "?" == i ? n[t++] : i }, esc: function (n) { return n.replace(/\?/g, "'?'") } } }, numbered: function (n, t) { (!t || 1 < t.length) && (t = "$"); var i = new RegExp("^\\" + t + "[0-9]+$"), r = new RegExp("\\" + t + "([0-9]+)", "g"); return { parse: function (t) { return i.test(t) ? n[t.slice(1) - 1] : t }, esc: function (n) { return n.replace(r, "'" + ("$" == t ? "$$" : t) + "$1'") } } }, named: function (n, t) { (!t || 1 < t.length) && (t = ":"); var i = new RegExp("^\\" + t), r = new RegExp("\\" + t + "(" + Object.keys(n).join("|") + ")", "g"); return { parse: function (t) { return i.test(t) ? n[t.slice(1)] : t }, esc: function (n) { return n.replace(r, "'" + ("$" == t ? "$$" : t) + "$1'") } } } } }), i.extend({ getSQL: function (n, t, i) { var o, f, u, e; return (i = void 0 === i ? this.getRules() : i) ? (t = t ? "\n" : " ", o = this.getPluginOptions("sql-support", "boolean_as_integer"), (!0 === n && (n = "question_mark"), "string" == typeof n) && (f = h(n), n = this.settings.sqlStatements[f[1]](f[2])), u = this, e = function s(i) { var f, e; return (i.condition || (i.condition = u.settings.default_condition), -1 === ["AND", "OR"].indexOf(i.condition.toUpperCase()) && r.error("UndefinedSQLCondition", 'Unable to build SQL query with condition "{0}"', i.condition), !i.rules) ? "" : (f = [], i.rules.forEach(function (i) { var c, l; if (i.rules && 0 < i.rules.length) f.push("(" + t + s(i) + t + ")" + t); else { var e = u.settings.sqlOperators[i.operator], a = u.getOperatorByType(i.operator), h = ""; void 0 === e && r.error("UndefinedSQLOperator", 'Unknown SQL operation for operator "{0}"', i.operator); 0 !== a.nb_inputs && (i.value instanceof Array || (i.value = [i.value]), i.value.forEach(function (t, u) { 0 < u && (h += e.sep); "boolean" == i.type && o ? t = t ? 1 : 0 : n || "integer" === i.type || "double" === i.type || "boolean" === i.type || (t = r.escapeString(t)); e.mod && (t = r.fmt(e.mod, t)); n ? h += n.add(i, t) : ("string" == typeof t && (t = "'" + t + "'"), h += t) })); c = function (n) { return e.op.replace("?", function () { return n }) }; l = u.change("getSQLField", i.field, i) + " " + c(h); f.push(u.change("ruleToSQL", l, i, h, c)) } }), e = f.join(" " + i.condition + t), u.change("groupToSQL", e, i)) }(i), n ? { sql: e, params: n.run() } : { sql: e }) : null }, getRulesFromSQL: function (t, i) { var f, o, s, e, c, u; return ("SQLParser" in window || r.error("MissingLibrary", "SQLParser is required to parse SQL queries. Get it here https://github.com/mistic100/sql-parser"), f = this, ("string" == typeof t && (t = { sql: t }), !0 === i && (i = "question_mark"), "string" == typeof i) && (o = h(i), i = this.settings.sqlRuleStatement[o[1]](t.params, o[2])), i && (t.sql = i.esc(t.sql)), 0 !== t.sql.toUpperCase().indexOf("SELECT") && (t.sql = "SELECT * FROM table WHERE " + t.sql), s = SQLParser.parse(t.sql), s.where || r.error("SQLParse", "No WHERE clause found"), e = f.change("parseSQLNode", s.where.conditions), "rules" in e && "condition" in e) ? e : "id" in e && "operator" in e && "value" in e ? { condition: this.settings.default_condition, rules: [e] } : (c = f.change("sqlToGroup", { condition: this.settings.default_condition, rules: [] }, e), u = c, function t(e, o) { var l, y, s, h, a, c, v, p, w; null !== e && ("rules" in (e = f.change("parseSQLNode", e)) && "condition" in e ? u.rules.push(e) : "id" in e && "operator" in e && "value" in e ? u.rules.push(e) : ("left" in e && "right" in e && "operation" in e || r.error("SQLParse", "Unable to parse WHERE clause"), -1 !== ["AND", "OR"].indexOf(e.operation.toUpperCase())) ? (f.change("sqlGroupsDistinct", 0 < o && u.condition != e.operation.toUpperCase(), u, e, o) && (l = f.change("sqlToGroup", { condition: f.settings.default_condition, rules: [] }, e), u.rules.push(l), u = l), u.condition = e.operation.toUpperCase(), o++, y = u, t(e.left, o), u = y, t(e.right, o)) : (n.isPlainObject(e.right.value) && r.error("SQLParse", "Value format not supported for {0}.", e.left.value), s = n.isArray(e.right.value) ? e.right.value.map(function (n) { return n.value }) : e.right.value, i && (s = n.isArray(s) ? s.map(i.parse) : i.parse(s)), h = e.operation.toUpperCase(), "<>" == h && (h = "!="), a = f.settings.sqlRuleOperator[h], void 0 === a && r.error("UndefinedSQLOperator", 'Invalid SQL operation "{0}".', e.operation), v = a.call(this, s, e.operation), "values" in e.left ? c = e.left.values.join(".") : "value" in e.left ? c = e.left.value : r.error("SQLParse", "Cannot find field name in {0}", JSON.stringify(e.left)), p = f.getSQLFieldID(c, s), w = f.change("sqlToRule", { id: p, field: c, operator: v.op, value: v.val }, e), u.rules.push(w))) }(e, 0), c) }, setRulesFromSQL: function (n, t) { this.setRules(this.getRulesFromSQL(n, t)) }, getSQLFieldID: function (n, t) { var i = this.filters.filter(function (t) { return t.field.toLowerCase() === n.toLowerCase() }); return 1 === i.length ? i[0].id : this.change("getSQLFieldID", n, t) } }), i.define("unique-filter", function () { this.status.used_filters = {}; this.on("afterUpdateRuleFilter", this.updateDisabledFilters); this.on("afterDeleteRule", this.updateDisabledFilters); this.on("afterCreateRuleFilters", this.applyDisabledFilters); this.on("afterReset", this.clearDisabledFilters); this.on("afterClear", this.clearDisabledFilters); this.on("getDefaultFilter.filter", function (n, t) { var i = n.builder; (i.updateDisabledFilters(), n.value.id in i.status.used_filters) && (i.filters.some(function (r) { if (!(r.id in i.status.used_filters) || 0 < i.status.used_filters[r.id].length && -1 === i.status.used_filters[r.id].indexOf(t.parent)) return n.value = r, !0 }) || (r.error(!1, "UniqueFilter", "No more non-unique filters available"), n.value = void 0)) }) }), i.extend({ updateDisabledFilters: function (n) { var t = n ? n.builder : this; t.status.used_filters = {}; t.model && (!function i(n) { n.each(function (n) { n.filter && n.filter.unique && (t.status.used_filters[n.filter.id] || (t.status.used_filters[n.filter.id] = []), "group" == n.filter.unique && t.status.used_filters[n.filter.id].push(n.parent)) }, function (n) { i(n) }) }(t.model.root), t.applyDisabledFilters(n)) }, clearDisabledFilters: function (n) { var t = n ? n.builder : this; t.status.used_filters = {}; t.applyDisabledFilters(n) }, applyDisabledFilters: function (t) { var r = t ? t.builder : this; r.$el.find(i.selectors.filter_container + " option").prop("disabled", !1); n.each(r.status.used_filters, function (n, t) { 0 === t.length ? r.$el.find(i.selectors.filter_container + ' option[value="' + n + '"]:not(:selected)').prop("disabled", !0) : t.forEach(function (t) { t.each(function (t) { t.$el.find(i.selectors.filter_container + ' option[value="' + n + '"]:not(:selected)').prop("disabled", !0) }) }) }); r.settings.plugins && r.settings.plugins["bt-selectpicker"] && r.$el.find(i.selectors.rule_filter).selectpicker("render") } }), i.regional.en = { __locale: "English (en)", __author: 'Damien "Mistic" Sorel, http://www.strangeplanet.fr', add_rule: "Add rule", add_group: "Add group", delete_rule: "Delete", delete_group: "Delete", conditions: { AND: "AND", OR: "OR" }, operators: { equal: "equal", not_equal: "not equal", "in": "in", not_in: "not in", less: "less", less_or_equal: "less or equal", greater: "greater", greater_or_equal: "greater or equal", between: "between", not_between: "not between", begins_with: "begins with", not_begins_with: "doesn't begin with", contains: "contains", not_contains: "doesn't contain", ends_with: "ends with", not_ends_with: "doesn't end with", is_empty: "is empty", is_not_empty: "is not empty", is_null: "is null", is_not_null: "is not null" }, errors: { no_filter: "No filter selected", empty_group: "The group is empty", radio_empty: "No value selected", checkbox_empty: "No value selected", select_empty: "No value selected", string_empty: "Empty value", string_exceed_min_length: "Must contain at least {0} characters", string_exceed_max_length: "Must not contain more than {0} characters", string_invalid_format: "Invalid format ({0})", number_nan: "Not a number", number_not_integer: "Not an integer", number_not_double: "Not a real number", number_exceed_min: "Must be greater than {0}", number_exceed_max: "Must be lower than {0}", number_wrong_step: "Must be a multiple of {0}", number_between_invalid: "Invalid values, {0} is greater than {1}", datetime_empty: "Empty value", datetime_invalid: "Invalid date format ({0})", datetime_exceed_min: "Must be after {0}", datetime_exceed_max: "Must be before {0}", datetime_between_invalid: "Invalid values, {0} is greater than {1}", boolean_not_valid: "Not a boolean", operator_not_multiple: 'Operator "{1}" cannot accept multiple values' }, invert: "Invert", NOT: "NOT" }, i.defaults({ lang_code: "en" }), i });
  610. /*!
  611. * jQuery QueryBuilder 2.5.2
  612. * Copyright 2014-2018 Damien "Mistic" Sorel (http://www.strangeplanet.fr)
  613. * Licensed under MIT (https://opensource.org/licenses/MIT)
  614. */
  615. !function (n, t) { "function" == typeof define && define.amd ? define(["jquery", "dot/doT", "jquery-extendext"], t) : "object" == typeof module && module.exports ? module.exports = t(require("jquery"), require("dot/doT"), require("jquery-extendext")) : t(n.jQuery, n.doT) }(this, function (n, t) { "use strict"; function s() { this.root = null; this.$ = n(this) } function o(n, t, r) { var f, u, o = i.selectors; (f = t.closest(o.rule_container)).length && (u = "moveAfter"); u || (f = t.closest(o.group_header)).length && (f = t.closest(o.group_container), u = "moveAtBegin"); u || (f = t.closest(o.group_container)).length && (u = "moveAtEnd"); u && (n[u](r.getModel(f)), r && n instanceof e && r.setRuleInputValue(n, n.value)) } function h(n) { var t = n.match(/(question_mark|numbered|named)(?:\((.)\))?/); return t || (t = [null, "question_mark", void 0]), t } var i = function (u, f) { (u[0].queryBuilder = this).$el = u; this.settings = n.extendext(!0, "replace", {}, i.DEFAULTS, f); this.model = new s; this.status = { id: null, generated_id: !1, group_id: 0, rule_id: 0, has_optgroup: !1, has_operator_optgroup: !1 }; this.filters = this.settings.filters; this.icons = this.settings.icons; this.operators = this.settings.operators; this.templates = this.settings.templates; this.plugins = this.settings.plugins; this.lang = null; void 0 === i.regional.en && r.error("Config", '"i18n/en.js" not loaded.'); this.lang = n.extendext(!0, "replace", {}, i.regional.en, i.regional[this.settings.lang_code], this.settings.lang); !1 === this.settings.allow_groups ? this.settings.allow_groups = 0 : !0 === this.settings.allow_groups && (this.settings.allow_groups = -1); Object.keys(this.templates).forEach(function (n) { this.templates[n] || (this.templates[n] = i.templates[n]); "string" == typeof this.templates[n] && (this.templates[n] = t.template(this.templates[n])) }, this); this.$el.attr("id") || (this.$el.attr("id", "qb_" + Math.floor(99999 * Math.random())), this.status.generated_id = !0); this.status.id = this.$el.attr("id"); this.$el.addClass("query-builder form-inline"); this.filters = this.checkFilters(this.filters); this.operators = this.checkOperators(this.operators); this.bindEvents(); this.initPlugins() }, r, f, u, e; return n.extend(i.prototype, { trigger: function (t) { var i = new n.Event(this._tojQueryEvent(t), { builder: this }); return this.$el.triggerHandler(i, Array.prototype.slice.call(arguments, 1)), i }, change: function (t, i) { var r = new n.Event(this._tojQueryEvent(t, !0), { builder: this, value: i }); return this.$el.triggerHandler(r, Array.prototype.slice.call(arguments, 2)), r.value }, on: function (n, t) { return this.$el.on(this._tojQueryEvent(n), t), this }, off: function (n, t) { return this.$el.off(this._tojQueryEvent(n), t), this }, once: function (n, t) { return this.$el.one(this._tojQueryEvent(n), t), this }, _tojQueryEvent: function (n, t) { return n.split(" ").map(function (n) { return n + ".queryBuilder" + (t ? ".filter" : "") }).join(" ") } }), i.types = { string: "string", integer: "number", double: "number", date: "datetime", time: "datetime", datetime: "datetime", boolean: "boolean" }, i.inputs = ["text", "number", "textarea", "radio", "checkbox", "select"], i.modifiable_options = ["display_errors", "allow_groups", "allow_empty", "default_condition", "default_filter"], i.selectors = { group_container: ".rules-group-container", rule_container: ".rule-container", filter_container: ".rule-filter-container", operator_container: ".rule-operator-container", value_container: ".rule-value-container", error_container: ".error-container", condition_container: ".rules-group-header .group-conditions", rule_header: ".rule-header", group_header: ".rules-group-header", group_actions: ".group-actions", rule_actions: ".rule-actions", rules_list: ".rules-group-body>.rules-list", group_condition: ".rules-group-header [name$=_cond]", rule_filter: ".rule-filter-container [name$=_filter]", rule_operator: ".rule-operator-container [name$=_operator]", rule_value: ".rule-value-container [name*=_value_]", add_rule: "[data-add=rule]", delete_rule: "[data-delete=rule]", add_group: "[data-add=group]", delete_group: "[data-delete=group]" }, i.templates = {}, i.regional = {}, i.OPERATORS = { equal: { type: "equal", nb_inputs: 1, multiple: !1, apply_to: ["string", "number", "datetime", "boolean"] }, not_equal: { type: "not_equal", nb_inputs: 1, multiple: !1, apply_to: ["string", "number", "datetime", "boolean"] }, "in": { type: "in", nb_inputs: 1, multiple: !0, apply_to: ["string", "number", "datetime"] }, not_in: { type: "not_in", nb_inputs: 1, multiple: !0, apply_to: ["string", "number", "datetime"] }, less: { type: "less", nb_inputs: 1, multiple: !1, apply_to: ["number", "datetime"] }, less_or_equal: { type: "less_or_equal", nb_inputs: 1, multiple: !1, apply_to: ["number", "datetime"] }, greater: { type: "greater", nb_inputs: 1, multiple: !1, apply_to: ["number", "datetime"] }, greater_or_equal: { type: "greater_or_equal", nb_inputs: 1, multiple: !1, apply_to: ["number", "datetime"] }, between: { type: "between", nb_inputs: 2, multiple: !1, apply_to: ["number", "datetime"] }, not_between: { type: "not_between", nb_inputs: 2, multiple: !1, apply_to: ["number", "datetime"] }, begins_with: { type: "begins_with", nb_inputs: 1, multiple: !1, apply_to: ["string"] }, not_begins_with: { type: "not_begins_with", nb_inputs: 1, multiple: !1, apply_to: ["string"] }, contains: { type: "contains", nb_inputs: 1, multiple: !1, apply_to: ["string"] }, not_contains: { type: "not_contains", nb_inputs: 1, multiple: !1, apply_to: ["string"] }, ends_with: { type: "ends_with", nb_inputs: 1, multiple: !1, apply_to: ["string"] }, not_ends_with: { type: "not_ends_with", nb_inputs: 1, multiple: !1, apply_to: ["string"] }, is_empty: { type: "is_empty", nb_inputs: 0, multiple: !1, apply_to: ["string"] }, is_not_empty: { type: "is_not_empty", nb_inputs: 0, multiple: !1, apply_to: ["string"] }, is_null: { type: "is_null", nb_inputs: 0, multiple: !1, apply_to: ["string", "number", "datetime", "boolean"] }, is_not_null: { type: "is_not_null", nb_inputs: 0, multiple: !1, apply_to: ["string", "number", "datetime", "boolean"] } }, i.DEFAULTS = { filters: [], plugins: [], sort_filters: !1, display_errors: !0, allow_groups: -1, allow_empty: !1, conditions: ["AND", "OR"], default_condition: "AND", inputs_separator: " , ", select_placeholder: "------", display_empty_filter: !0, default_filter: null, optgroups: {}, default_rule_flags: { filter_readonly: !1, operator_readonly: !1, value_readonly: !1, no_delete: !1 }, default_group_flags: { condition_readonly: !1, no_add_rule: !1, no_add_group: !1, no_delete: !1 }, templates: { group: null, rule: null, filterSelect: null, operatorSelect: null, ruleValueSelect: null }, lang_code: "en", lang: {}, operators: ["equal", "not_equal", "in", "not_in", "less", "less_or_equal", "greater", "greater_or_equal", "between", "not_between", "begins_with", "not_begins_with", "contains", "not_contains", "ends_with", "not_ends_with", "is_empty", "is_not_empty", "is_null", "is_not_null"], icons: { add_group: "glyphicon glyphicon-plus-sign", add_rule: "glyphicon glyphicon-plus", remove_group: "glyphicon glyphicon-remove", remove_rule: "glyphicon glyphicon-remove", error: "glyphicon glyphicon-warning-sign" } }, i.plugins = {}, i.defaults = function (t) { if ("object" != typeof t) return "string" == typeof t ? "object" == typeof i.DEFAULTS[t] ? n.extend(!0, {}, i.DEFAULTS[t]) : i.DEFAULTS[t] : n.extend(!0, {}, i.DEFAULTS); n.extendext(!0, "replace", i.DEFAULTS, t) }, i.define = function (n, t, r) { i.plugins[n] = { fct: t, def: r || {} } }, i.extend = function (t) { n.extend(i.prototype, t) }, i.prototype.initPlugins = function () { if (this.plugins) { if (n.isArray(this.plugins)) { var t = {}; this.plugins.forEach(function (n) { t[n] = null }); this.plugins = t } Object.keys(this.plugins).forEach(function (t) { t in i.plugins ? (this.plugins[t] = n.extend(!0, {}, i.plugins[t].def, this.plugins[t] || {}), i.plugins[t].fct.call(this, this.plugins[t])) : r.error("Config", 'Unable to find plugin "{0}"', t) }, this) } }, i.prototype.getPluginOptions = function (n, t) { var u; if (this.plugins && this.plugins[n] ? u = this.plugins[n] : i.plugins[n] && (u = i.plugins[n].def), u) return t ? u[t] : u; r.error("Config", 'Unable to find plugin "{0}"', n) }, i.prototype.init = function (n) { this.trigger("afterInit"); n ? (this.setRules(n), delete this.settings.rules) : this.setRoot(!0) }, i.prototype.checkFilters = function (n) { var u = [], t; return (n && 0 !== n.length || r.error("Config", "Missing filters list"), n.forEach(function (n, t) { switch (n.id || r.error("Config", "Missing filter {0} id", t), -1 != u.indexOf(n.id) && r.error("Config", 'Filter "{0}" already defined', n.id), u.push(n.id), n.type ? i.types[n.type] || r.error("Config", 'Invalid type "{0}"', n.type) : n.type = "string", n.input ? "function" != typeof n.input && -1 == i.inputs.indexOf(n.input) && r.error("Config", 'Invalid input "{0}"', n.input) : n.input = "number" === i.types[n.type] ? "number" : "text", n.operators && n.operators.forEach(function (n) { "string" != typeof n && r.error("Config", "Filter operators must be global operators types (string)") }), n.field || (n.field = n.id), n.label || (n.label = n.field), n.optgroup ? (this.status.has_optgroup = !0, this.settings.optgroups[n.optgroup] || (this.settings.optgroups[n.optgroup] = n.optgroup)) : n.optgroup = null, n.input) { case "radio": case "checkbox": (!n.values || n.values.length < 1) && r.error("Config", 'Missing filter "{0}" values', n.id); break; case "select": var f = []; n.has_optgroup = !1; r.iterateOptions(n.values, function (t, i, r) { f.push({ value: t, label: i, optgroup: r || null }); r && (n.has_optgroup = !0, this.settings.optgroups[r] || (this.settings.optgroups[r] = r)) }.bind(this)); n.values = n.has_optgroup ? r.groupSort(f, "optgroup") : f; n.placeholder && (void 0 === n.placeholder_value && (n.placeholder_value = -1), n.values.forEach(function (t) { t.value == n.placeholder_value && r.error("Config", 'Placeholder of filter "{0}" overlaps with one of its values', n.id) })) } }, this), this.settings.sort_filters) && ("function" == typeof this.settings.sort_filters ? n.sort(this.settings.sort_filters) : (t = this, n.sort(function (n, i) { return t.translate(n.label).localeCompare(t.translate(i.label)) }))), this.status.has_optgroup && (n = r.groupSort(n, "optgroup")), n }, i.prototype.checkOperators = function (t) { var u = []; return t.forEach(function (f, e) { "string" == typeof f ? (i.OPERATORS[f] || r.error("Config", 'Unknown operator "{0}"', f), t[e] = f = n.extendext(!0, "replace", {}, i.OPERATORS[f])) : (f.type || r.error("Config", 'Missing "type" for operator {0}', e), i.OPERATORS[f.type] && (t[e] = f = n.extendext(!0, "replace", {}, i.OPERATORS[f.type], f)), void 0 !== f.nb_inputs && void 0 !== f.apply_to || r.error("Config", 'Missing "nb_inputs" and/or "apply_to" for operator "{0}"', f.type)); -1 != u.indexOf(f.type) && r.error("Config", 'Operator "{0}" already defined', f.type); u.push(f.type); f.optgroup ? (this.status.has_operator_optgroup = !0, this.settings.optgroups[f.optgroup] || (this.settings.optgroups[f.optgroup] = f.optgroup)) : f.optgroup = null }, this), this.status.has_operator_optgroup && (t = r.groupSort(t, "optgroup")), t }, i.prototype.bindEvents = function () { var t = this, r = i.selectors; this.$el.on("change.queryBuilder", r.group_condition, function () { if (n(this).is(":checked")) { var i = n(this).closest(r.group_container); t.getModel(i).condition = n(this).val() } }); this.$el.on("change.queryBuilder", r.rule_filter, function () { var i = n(this).closest(r.rule_container); t.getModel(i).filter = t.getFilterById(n(this).val()) }); this.$el.on("change.queryBuilder", r.rule_operator, function () { var i = n(this).closest(r.rule_container); t.getModel(i).operator = t.getOperatorByType(n(this).val()) }); this.$el.on("click.queryBuilder", r.add_rule, function () { var i = n(this).closest(r.group_container); t.addRule(t.getModel(i)) }); this.$el.on("click.queryBuilder", r.delete_rule, function () { var i = n(this).closest(r.rule_container); t.deleteRule(t.getModel(i)) }); 0 !== this.settings.allow_groups && (this.$el.on("click.queryBuilder", r.add_group, function () { var i = n(this).closest(r.group_container); t.addGroup(t.getModel(i)) }), this.$el.on("click.queryBuilder", r.delete_group, function () { var i = n(this).closest(r.group_container); t.deleteGroup(t.getModel(i)) })); this.model.on({ drop: function (n, i) { i.$el.remove(); t.refreshGroupsConditions() }, add: function (n, r, u, f) { 0 === f ? u.$el.prependTo(r.$el.find(">" + i.selectors.rules_list)) : u.$el.insertAfter(r.rules[f - 1].$el); t.refreshGroupsConditions() }, move: function (n, r, u, f) { r.$el.detach(); 0 === f ? r.$el.prependTo(u.$el.find(">" + i.selectors.rules_list)) : r.$el.insertAfter(u.rules[f - 1].$el); t.refreshGroupsConditions() }, update: function (n, i, r, u, f) { if (i instanceof e) switch (r) { case "error": t.updateError(i); break; case "flags": t.applyRuleFlags(i); break; case "filter": t.updateRuleFilter(i, f); break; case "operator": t.updateRuleOperator(i, f); break; case "value": t.updateRuleValue(i, f) } else switch (r) { case "error": t.updateError(i); break; case "flags": t.applyGroupFlags(i); break; case "condition": t.updateGroupCondition(i, f) } } }) }, i.prototype.setRoot = function (t, i, r) { t = void 0 === t || !0 === t; var e = this.nextGroupId(), f = n(this.getGroupTemplate(e, 1)); return this.$el.append(f), this.model.root = new u(null, f), this.model.root.model = this.model, this.model.root.data = i, this.model.root.flags = n.extend({}, this.settings.default_group_flags, r), this.model.root.condition = this.settings.default_condition, this.trigger("afterAddGroup", this.model.root), t && this.addRule(this.model.root), this.model.root }, i.prototype.addGroup = function (t, i, r, u) { var e; if (i = void 0 === i || !0 === i, e = t.level + 1, this.trigger("beforeAddGroup", t, i, e).isDefaultPrevented()) return null; var o = this.nextGroupId(), s = n(this.getGroupTemplate(o, e)), f = t.addGroup(s); return f.data = r, f.flags = n.extend({}, this.settings.default_group_flags, u), f.condition = this.settings.default_condition, this.trigger("afterAddGroup", f), this.trigger("rulesChanged"), i && this.addRule(f), f }, i.prototype.deleteGroup = function (n) { if (n.isRoot() || this.trigger("beforeDeleteGroup", n).isDefaultPrevented()) return !1; var t = !0; return n.each("reverse", function (n) { t &= this.deleteRule(n) }, function (n) { t &= this.deleteGroup(n) }, this), t && (n.drop(), this.trigger("afterDeleteGroup"), this.trigger("rulesChanged")), t }, i.prototype.updateGroupCondition = function (t, r) { t.$el.find(">" + i.selectors.group_condition).each(function () { var i = n(this); i.prop("checked", i.val() === t.condition); i.parent().toggleClass("active", i.val() === t.condition) }); this.trigger("afterUpdateGroupCondition", t, r); this.trigger("rulesChanged") }, i.prototype.refreshGroupsConditions = function () { !function n(t) { t.flags && (!t.flags || t.flags.condition_readonly) || t.$el.find(">" + i.selectors.group_condition).prop("disabled", t.rules.length <= 1).parent().toggleClass("disabled", t.rules.length <= 1); t.each(null, function (t) { n(t) }, this) }(this.model.root) }, i.prototype.addRule = function (t, i, r) { if (this.trigger("beforeAddRule", t).isDefaultPrevented()) return null; var f = this.nextRuleId(), e = n(this.getRuleTemplate(f)), u = t.addRule(e); return u.data = i, u.flags = n.extend({}, this.settings.default_rule_flags, r), this.trigger("afterAddRule", u), this.trigger("rulesChanged"), this.createRuleFilters(u), !this.settings.default_filter && this.settings.display_empty_filter || (u.filter = this.change("getDefaultFilter", this.getFilterById(this.settings.default_filter || this.filters[0].id), u)), u }, i.prototype.deleteRule = function (n) { return !n.flags.no_delete && !this.trigger("beforeDeleteRule", n).isDefaultPrevented() && (n.drop(), this.trigger("afterDeleteRule"), this.trigger("rulesChanged"), !0) }, i.prototype.createRuleFilters = function (t) { var r = this.change("getRuleFilters", this.filters, t), u = n(this.getRuleFilterSelect(t, r)); t.$el.find(i.selectors.filter_container).html(u); this.trigger("afterCreateRuleFilters", t); this.applyRuleFlags(t) }, i.prototype.createRuleOperators = function (t) { var f = t.$el.find(i.selectors.operator_container).empty(), r, u; t.filter && (r = this.getOperators(t.filter), u = n(this.getRuleOperatorSelect(t, r)), f.html(u), t.__.operator = t.filter.default_operator ? this.getOperatorByType(t.filter.default_operator) : r[0], t.$el.find(i.selectors.rule_operator).val(t.operator.type), this.trigger("afterCreateRuleOperators", t, r), this.applyRuleFlags(t)) }, i.prototype.createRuleInput = function (t) { var e = t.$el.find(i.selectors.value_container).empty(), o; if (t.__.value = void 0, t.filter && t.operator && 0 !== t.operator.nb_inputs) { for (var s = this, u = n(), r = t.filter, f = 0; f < t.operator.nb_inputs; f++)o = n(this.getRuleInput(t, f)), 0 < f && e.append(this.settings.inputs_separator), e.append(o), u = u.add(o); e.css("display", ""); u.on("change " + (r.input_event || ""), function () { t._updating_input || (t._updating_value = !0, t.value = s.getRuleInputValue(t), t._updating_value = !1) }); r.plugin && u[r.plugin](r.plugin_config || {}); this.trigger("afterCreateRuleInput", t); void 0 !== r.default_value ? t.value = r.default_value : (t._updating_value = !0, t.value = s.getRuleInputValue(t), t._updating_value = !1); this.applyRuleFlags(t) } }, i.prototype.updateRuleFilter = function (n, t) { this.createRuleOperators(n); this.createRuleInput(n); n.$el.find(i.selectors.rule_filter).val(n.filter ? n.filter.id : "-1"); t && n.filter && t.id !== n.filter.id && (n.data = void 0); this.trigger("afterUpdateRuleFilter", n, t); this.trigger("rulesChanged") }, i.prototype.updateRuleOperator = function (n, t) { var r = n.$el.find(i.selectors.value_container); n.operator && 0 !== n.operator.nb_inputs ? (r.css("display", ""), !r.is(":empty") && t && n.operator.nb_inputs === t.nb_inputs && n.operator.optgroup === t.optgroup || this.createRuleInput(n)) : (r.hide(), n.__.value = void 0); n.operator && (n.$el.find(i.selectors.rule_operator).val(n.operator.type), n.__.value = this.getRuleInputValue(n)); this.trigger("afterUpdateRuleOperator", n, t); this.trigger("rulesChanged") }, i.prototype.updateRuleValue = function (n, t) { n._updating_value || this.setRuleInputValue(n, n.value); this.trigger("afterUpdateRuleValue", n, t); this.trigger("rulesChanged") }, i.prototype.applyRuleFlags = function (n) { var t = n.flags, r = i.selectors; n.$el.find(r.rule_filter).prop("disabled", t.filter_readonly); n.$el.find(r.rule_operator).prop("disabled", t.operator_readonly); n.$el.find(r.rule_value).prop("disabled", t.value_readonly); t.no_delete && n.$el.find(r.delete_rule).remove(); this.trigger("afterApplyRuleFlags", n) }, i.prototype.applyGroupFlags = function (n) { var t = n.flags, r = i.selectors; n.$el.find(">" + r.group_condition).prop("disabled", t.condition_readonly).parent().toggleClass("readonly", t.condition_readonly); t.no_add_rule && n.$el.find(r.add_rule).remove(); t.no_add_group && n.$el.find(r.add_group).remove(); t.no_delete && n.$el.find(r.delete_group).remove(); this.trigger("afterApplyGroupFlags", n) }, i.prototype.clearErrors = function (n) { (n = n || this.model.root) && (n.error = null, n instanceof u && n.each(function (n) { n.error = null }, function (n) { this.clearErrors(n) }, this)) }, i.prototype.updateError = function (n) { if (this.settings.display_errors) if (null === n.error) n.$el.removeClass("has-error"); else { var t = this.translate("errors", n.error[0]); t = r.fmt(t, n.error.slice(1)); t = this.change("displayError", t, n.error, n); n.$el.addClass("has-error").find(i.selectors.error_container).eq(0).attr("title", t) } }, i.prototype.triggerValidationError = function (t, i, r) { n.isArray(i) || (i = [i]); this.trigger("validationError", t, i, r).isDefaultPrevented() || (t.error = i) }, i.prototype.destroy = function () { this.trigger("beforeDestroy"); this.status.generated_id && this.$el.removeAttr("id"); this.clear(); this.model = null; this.$el.off(".queryBuilder").removeClass("query-builder").removeData("queryBuilder"); delete this.$el[0].queryBuilder }, i.prototype.reset = function () { this.trigger("beforeReset").isDefaultPrevented() || (this.status.group_id = 1, this.status.rule_id = 0, this.model.root.empty(), this.model.root.data = void 0, this.model.root.flags = n.extend({}, this.settings.default_group_flags), this.model.root.condition = this.settings.default_condition, this.addRule(this.model.root), this.trigger("afterReset"), this.trigger("rulesChanged")) }, i.prototype.clear = function () { this.trigger("beforeClear").isDefaultPrevented() || (this.status.group_id = 0, this.status.rule_id = 0, this.model.root && (this.model.root.drop(), this.model.root = null), this.trigger("afterClear"), this.trigger("rulesChanged")) }, i.prototype.setOptions = function (t) { n.each(t, function (n, t) { -1 !== i.modifiable_options.indexOf(n) && (this.settings[n] = t) }.bind(this)) }, i.prototype.getModel = function (t) { return t ? t instanceof f ? t : n(t).data("queryBuilderModel") : this.model.root }, i.prototype.validate = function (t) { t = n.extend({ skip_empty: !1 }, t); this.clearErrors(); var i = this, r = function u(n) { var f = 0, r = 0; return n.each(function (n) { if (n.filter || !t.skip_empty) { if (!n.filter) return i.triggerValidationError(n, "no_filter", null), void r++; if (!n.operator) return i.triggerValidationError(n, "no_operator", null), void r++; if (0 !== n.operator.nb_inputs) { var u = i.validateValue(n, n.value); if (!0 !== u) return i.triggerValidationError(n, u, n.value), void r++ } f++ } }, function (n) { var t = u(n); !0 === t ? f++ : !1 === t && r++ }), !(0 < r) && (0 === f && !n.isRoot() && t.skip_empty ? null : !!(0 !== f || i.settings.allow_empty && n.isRoot()) || (i.triggerValidationError(n, "empty_group", null), !1)) }(this.model.root); return this.change("validate", r) }, i.prototype.getRules = function (t) { var r, i, u; return (t = n.extend({ get_flags: !1, allow_invalid: !1, skip_empty: !1 }, t), r = this.validate(t), !r && !t.allow_invalid) ? null : (i = this, u = function f(r) { var u = { condition: r.condition, rules: [] }, e; return (r.data && (u.data = n.extendext(!0, "replace", {}, r.data)), t.get_flags) && (e = i.getGroupFlags(r.flags, "all" === t.get_flags), n.isEmptyObject(e) || (u.flags = e)), r.each(function (r) { var e, f, o; (r.filter || !t.skip_empty) && (e = null, r.operator && 0 === r.operator.nb_inputs || (e = r.value), f = { id: r.filter ? r.filter.id : null, field: r.filter ? r.filter.field : null, type: r.filter ? r.filter.type : null, input: r.filter ? r.filter.input : null, operator: r.operator ? r.operator.type : null, value: e }, ((r.filter && r.filter.data || r.data) && (f.data = n.extendext(!0, "replace", {}, r.filter.data, r.data)), t.get_flags) && (o = i.getRuleFlags(r.flags, "all" === t.get_flags), n.isEmptyObject(o) || (f.flags = o)), u.rules.push(i.change("ruleToJson", f, r))) }, function (n) { var i = f(n); 0 === i.rules.length && t.skip_empty || u.rules.push(i) }, this), i.change("groupToJson", u, r) }(this.model.root), u.valid = r, this.change("getRules", u)) }, i.prototype.setRules = function (t, i) { i = n.extend({ allow_invalid: !1 }, i); n.isArray(t) && (t = { condition: this.settings.default_condition, rules: t }); t && t.rules && (0 !== t.rules.length || this.settings.allow_empty) || r.error("RulesParse", "Incorrect data object passed"); this.clear(); this.setRoot(!1, t.data, this.parseGroupFlags(t)); t = this.change("setRules", t, i); var u = this; !function f(n, t) { null !== t && (void 0 === n.condition ? n.condition = u.settings.default_condition : -1 == u.settings.conditions.indexOf(n.condition) && (r.error(!i.allow_invalid, "UndefinedCondition", 'Invalid condition "{0}"', n.condition), n.condition = u.settings.default_condition), t.condition = n.condition, n.rules.forEach(function (n) { var e; if (void 0 !== n.rules) if (-1 !== u.settings.allow_groups && u.settings.allow_groups < t.level) r.error(!i.allow_invalid, "RulesParse", "No more than {0} groups are allowed", u.settings.allow_groups), u.reset(); else { if (null === (e = u.addGroup(t, !1, n.data, u.parseGroupFlags(n)))) return; f(n, e) } else { if (n.empty || (void 0 === n.id && (r.error(!i.allow_invalid, "RulesParse", "Missing rule field id"), n.empty = !0), void 0 === n.operator && (n.operator = "equal")), null === (e = u.addRule(t, n.data, u.parseRuleFlags(n)))) return; n.empty || (e.filter = u.getFilterById(n.id, !i.allow_invalid)); e.filter && (e.operator = u.getOperatorByType(n.operator, !i.allow_invalid), e.operator || (e.operator = u.getOperators(e.filter)[0])); e.operator && 0 !== e.operator.nb_inputs && (void 0 !== n.value ? e.value = n.value : void 0 !== e.filter.default_value && (e.value = e.filter.default_value)); u.change("jsonToRule", e, n) != e && r.error("RulesParse", "Plugin tried to change rule reference") } }), u.change("jsonToGroup", t, n) != t && r.error("RulesParse", "Plugin tried to change group reference")) }(t, this.model.root); this.trigger("afterSetRules") }, i.prototype.validateValue = function (n, t) { var i = n.filter.validation || {}, r = !0; return r = i.callback ? i.callback.call(this, t, n) : this._validateValue(n, t), this.change("validateValue", r, t, n) }, i.prototype._validateValue = function (t, u) { var l, s, c = t.filter, a = t.operator, f = c.validation || {}, e = !0, h, o, y, v; for (1 === t.operator.nb_inputs && (u = [u]), h = 0; h < a.nb_inputs; h++) { if (!a.multiple && n.isArray(u[h]) && 1 < u[h].length) { e = ["operator_not_multiple", a.type, this.translate("operators", a.type)]; break } switch (c.input) { case "radio": if (void 0 === u[h] || 0 === u[h].length) { f.allow_empty_value || (e = ["radio_empty"]); break } break; case "checkbox": if (void 0 === u[h] || 0 === u[h].length) { f.allow_empty_value || (e = ["checkbox_empty"]); break } break; case "select": if (void 0 === u[h] || 0 === u[h].length || c.placeholder && u[h] == c.placeholder_value) { f.allow_empty_value || (e = ["select_empty"]); break } break; default: for (s = n.isArray(u[h]) ? u[h] : [u[h]], o = 0; o < s.length; o++) { switch (i.types[c.type]) { case "string": if (void 0 === s[o] || 0 === s[o].length) { f.allow_empty_value || (e = ["string_empty"]); break } if (void 0 !== f.min && s[o].length < parseInt(f.min)) { e = [this.getValidationMessage(f, "min", "string_exceed_min_length"), f.min]; break } if (void 0 !== f.max && s[o].length > parseInt(f.max)) { e = [this.getValidationMessage(f, "max", "string_exceed_max_length"), f.max]; break } if (f.format && ("string" == typeof f.format && (f.format = new RegExp(f.format)), !f.format.test(s[o]))) { e = [this.getValidationMessage(f, "format", "string_invalid_format"), f.format]; break } break; case "number": if (void 0 === s[o] || 0 === s[o].length) { f.allow_empty_value || (e = ["number_nan"]); break } if (isNaN(s[o])) { e = ["number_nan"]; break } if ("integer" == c.type) { if (parseInt(s[o]) != s[o]) { e = ["number_not_integer"]; break } } else if (parseFloat(s[o]) != s[o]) { e = ["number_not_double"]; break } if (void 0 !== f.min && s[o] < parseFloat(f.min)) { e = [this.getValidationMessage(f, "min", "number_exceed_min"), f.min]; break } if (void 0 !== f.max && s[o] > parseFloat(f.max)) { e = [this.getValidationMessage(f, "max", "number_exceed_max"), f.max]; break } if (void 0 !== f.step && "any" !== f.step && (y = (s[o] / f.step).toPrecision(14), parseInt(y) != y)) { e = [this.getValidationMessage(f, "step", "number_wrong_step"), f.step]; break } break; case "datetime": if (void 0 === s[o] || 0 === s[o].length) { f.allow_empty_value || (e = ["datetime_empty"]); break } if (f.format) { if ("moment" in window || r.error("MissingLibrary", "MomentJS is required for Date/Time validation. Get it here http://momentjs.com"), v = moment(s[o], f.format), !v.isValid()) { e = [this.getValidationMessage(f, "format", "datetime_invalid"), f.format]; break } if (f.min && v < moment(f.min, f.format)) { e = [this.getValidationMessage(f, "min", "datetime_exceed_min"), f.min]; break } if (f.max && v > moment(f.max, f.format)) { e = [this.getValidationMessage(f, "max", "datetime_exceed_max"), f.max]; break } } break; case "boolean": if (void 0 === s[o] || 0 === s[o].length) { f.allow_empty_value || (e = ["boolean_not_valid"]); break } if ("true" !== (l = ("" + s[o]).trim().toLowerCase()) && "false" !== l && "1" !== l && "0" !== l && 1 !== s[o] && 0 !== s[o]) { e = ["boolean_not_valid"]; break } }if (!0 !== e) break } }if (!0 !== e) break } if (("between" === t.operator.type || "not_between" === t.operator.type) && 2 === u.length) switch (i.types[c.type]) { case "number": u[0] > u[1] && (e = ["number_between_invalid", u[0], u[1]]); break; case "datetime": f.format && ("moment" in window || r.error("MissingLibrary", "MomentJS is required for Date/Time validation. Get it here http://momentjs.com"), moment(u[0], f.format).isAfter(moment(u[1], f.format)) && (e = ["datetime_between_invalid", u[0], u[1]])) }return e }, i.prototype.nextGroupId = function () { return this.status.id + "_group_" + this.status.group_id++ }, i.prototype.nextRuleId = function () { return this.status.id + "_rule_" + this.status.rule_id++ }, i.prototype.getOperators = function (n) { "string" == typeof n && (n = this.getFilterById(n)); for (var r = [], t = 0, u = this.operators.length; t < u; t++) { if (n.operators) { if (-1 == n.operators.indexOf(this.operators[t].type)) continue } else if (-1 == this.operators[t].apply_to.indexOf(i.types[n.type])) continue; r.push(this.operators[t]) } return n.operators && r.sort(function (t, i) { return n.operators.indexOf(t.type) - n.operators.indexOf(i.type) }), this.change("getOperators", r, n) }, i.prototype.getFilterById = function (n, t) { if ("-1" == n) return null; for (var i = 0, u = this.filters.length; i < u; i++)if (this.filters[i].id == n) return this.filters[i]; return r.error(!1 !== t, "UndefinedFilter", 'Undefined filter "{0}"', n), null }, i.prototype.getOperatorByType = function (n, t) { if ("-1" == n) return null; for (var i = 0, u = this.operators.length; i < u; i++)if (this.operators[i].type == n) return this.operators[i]; return r.error(!1 !== t, "UndefinedOperator", 'Undefined operator "{0}"', n), null }, i.prototype.getRuleInputValue = function (t) { var f = t.filter, c = t.operator, u = [], e, h, o, s; if (f.valueGetter) u = f.valueGetter.call(this, t); else { for (e = t.$el.find(i.selectors.value_container), h = 0; h < c.nb_inputs; h++) { s = r.escapeElementId(t.id + "_value_" + h); switch (f.input) { case "radio": u.push(e.find("[name=" + s + "]:checked").val()); break; case "checkbox": o = []; e.find("[name=" + s + "]:checked").each(function () { o.push(n(this).val()) }); u.push(o); break; case "select": f.multiple ? (o = [], e.find("[name=" + s + "] option:selected").each(function () { o.push(n(this).val()) }), u.push(o)) : u.push(e.find("[name=" + s + "] option:selected").val()); break; default: u.push(e.find("[name=" + s + "]").val()) } } u = u.map(function (t) { return c.multiple && f.value_separator && "string" == typeof t && (t = t.split(f.value_separator)), n.isArray(t) ? t.map(function (n) { return r.changeType(n, f.type) }) : r.changeType(t, f.type) }); 1 === c.nb_inputs && (u = u[0]); f.valueParser && (u = f.valueParser.call(this, t, u)) } return this.change("getRuleValue", u, t) }, i.prototype.setRuleInputValue = function (t, u) { var e = t.filter, o = t.operator, s, f, h; if (e && o) { if (t._updating_input = !0, e.valueSetter) e.valueSetter.call(this, t, u); else for (s = t.$el.find(i.selectors.value_container), 1 == o.nb_inputs && (u = [u]), f = 0; f < o.nb_inputs; f++) { h = r.escapeElementId(t.id + "_value_" + f); switch (e.input) { case "radio": s.find("[name=" + h + '][value="' + u[f] + '"]').prop("checked", !0).trigger("change"); break; case "checkbox": n.isArray(u[f]) || (u[f] = [u[f]]); u[f].forEach(function (n) { s.find("[name=" + h + '][value="' + n + '"]').prop("checked", !0).trigger("change") }); break; default: o.multiple && e.value_separator && n.isArray(u[f]) && (u[f] = u[f].join(e.value_separator)); s.find("[name=" + h + "]").val(u[f]).trigger("change") } } t._updating_input = !1 } }, i.prototype.parseRuleFlags = function (t) { var i = n.extend({}, this.settings.default_rule_flags); return t.readonly && n.extend(i, { filter_readonly: !0, operator_readonly: !0, value_readonly: !0, no_delete: !0 }), t.flags && n.extend(i, t.flags), this.change("parseRuleFlags", i, t) }, i.prototype.getRuleFlags = function (t, i) { if (i) return n.extend({}, t); var r = {}; return n.each(this.settings.default_rule_flags, function (n, i) { t[n] !== i && (r[n] = t[n]) }), r }, i.prototype.parseGroupFlags = function (t) { var i = n.extend({}, this.settings.default_group_flags); return t.readonly && n.extend(i, { condition_readonly: !0, no_add_rule: !0, no_add_group: !0, no_delete: !0 }), t.flags && n.extend(i, t.flags), this.change("parseGroupFlags", i, t) }, i.prototype.getGroupFlags = function (t, i) { if (i) return n.extend({}, t); var r = {}; return n.each(this.settings.default_group_flags, function (n, i) { t[n] !== i && (r[n] = t[n]) }), r }, i.prototype.translate = function (n, t) { var i; return t || (t = n, n = void 0), i = "object" == typeof t ? t[this.settings.lang_code] || t.en : (n ? this.lang[n] : this.lang)[t] || t, this.change("translate", i, t, n) }, i.prototype.getValidationMessage = function (n, t, i) { return n.messages && n.messages[t] || i }, i.templates.group = '<div id="{{= it.group_id }}" class="rules-group-container"> <div class="rules-group-header"> <div class="btn-group pull-right group-actions"> <button type="button" class="btn btn-xs btn-success" data-add="rule"> <i class="{{= it.icons.add_rule }}"><\/i> {{= it.translate("add_rule") }} <\/button> {{? it.settings.allow_groups===-1 || it.settings.allow_groups>=it.level }} <button type="button" class="btn btn-xs btn-success" data-add="group"> <i class="{{= it.icons.add_group }}"><\/i> {{= it.translate("add_group") }} <\/button> {{?}} {{? it.level>1 }} <button type="button" class="btn btn-xs btn-danger" data-delete="group"> <i class="{{= it.icons.remove_group }}"><\/i> {{= it.translate("delete_group") }} <\/button> {{?}} <\/div> <div class="btn-group group-conditions"> {{~ it.conditions: condition }} <label class="btn btn-xs btn-primary"> <input type="radio" name="{{= it.group_id }}_cond" value="{{= condition }}"> {{= it.translate("conditions", condition) }} <\/label> {{~}} <\/div> {{? it.settings.display_errors }} <div class="error-container"><i class="{{= it.icons.error }}"><\/i><\/div> {{?}} <\/div> <div class=rules-group-body> <div class=rules-list><\/div> <\/div> <\/div>', i.templates.rule = '<div id="{{= it.rule_id }}" class="rule-container"> <div class="rule-header"> <div class="btn-group pull-right rule-actions"> <button type="button" class="btn btn-xs btn-danger" data-delete="rule"> <i class="{{= it.icons.remove_rule }}"><\/i> {{= it.translate("delete_rule") }} <\/button> <\/div> <\/div> {{? it.settings.display_errors }} <div class="error-container"><i class="{{= it.icons.error }}"><\/i><\/div> {{?}} <div class="rule-filter-container"><\/div> <div class="rule-operator-container"><\/div> <div class="rule-value-container"><\/div> <\/div>', i.templates.filterSelect = '{{ var optgroup = null; }} <select class="form-control" name="{{= it.rule.id }}_filter"> {{? it.settings.display_empty_filter }} <option value="-1">{{= it.settings.select_placeholder }}<\/option> {{?}} {{~ it.filters: filter }} {{? optgroup !== filter.optgroup }} {{? optgroup !== null }}<\/optgroup>{{?}} {{? (optgroup = filter.optgroup) !== null }} <optgroup label="{{= it.translate(it.settings.optgroups[optgroup]) }}"> {{?}} {{?}} <option value="{{= filter.id }}" {{? filter.icon}}data-icon="{{= filter.icon}}"{{?}}>{{= it.translate(filter.label) }}<\/option> {{~}} {{? optgroup !== null }}<\/optgroup>{{?}} <\/select>', i.templates.operatorSelect = '{{? it.operators.length === 1 }} <span> {{= it.translate("operators", it.operators[0].type) }} <\/span> {{?}} {{ var optgroup = null; }} <select class="form-control {{? it.operators.length === 1 }}hide{{?}}" name="{{= it.rule.id }}_operator"> {{~ it.operators: operator }} {{? optgroup !== operator.optgroup }} {{? optgroup !== null }}<\/optgroup>{{?}} {{? (optgroup = operator.optgroup) !== null }} <optgroup label="{{= it.translate(it.settings.optgroups[optgroup]) }}"> {{?}} {{?}} <option value="{{= operator.type }}" {{? operator.icon}}data-icon="{{= operator.icon}}"{{?}}>{{= it.translate("operators", operator.type) }}<\/option> {{~}} {{? optgroup !== null }}<\/optgroup>{{?}} <\/select>', i.templates.ruleValueSelect = '{{ var optgroup = null; }} <select class="form-control" name="{{= it.name }}" {{? it.rule.filter.multiple }}multiple{{?}}> {{? it.rule.filter.placeholder }} <option value="{{= it.rule.filter.placeholder_value }}" disabled selected>{{= it.rule.filter.placeholder }}<\/option> {{?}} {{~ it.rule.filter.values: entry }} {{? optgroup !== entry.optgroup }} {{? optgroup !== null }}<\/optgroup>{{?}} {{? (optgroup = entry.optgroup) !== null }} <optgroup label="{{= it.translate(it.settings.optgroups[optgroup]) }}"> {{?}} {{?}} <option value="{{= entry.value }}">{{= entry.label }}<\/option> {{~}} {{? optgroup !== null }}<\/optgroup>{{?}} <\/select>', i.prototype.getGroupTemplate = function (n, t) { var i = this.templates.group({ builder: this, group_id: n, level: t, conditions: this.settings.conditions, icons: this.icons, settings: this.settings, translate: this.translate.bind(this) }); return this.change("getGroupTemplate", i, t) }, i.prototype.getRuleTemplate = function (n) { var t = this.templates.rule({ builder: this, rule_id: n, icons: this.icons, settings: this.settings, translate: this.translate.bind(this) }); return this.change("getRuleTemplate", t) }, i.prototype.getRuleFilterSelect = function (n, t) { var i = this.templates.filterSelect({ builder: this, rule: n, filters: t, icons: this.icons, settings: this.settings, translate: this.translate.bind(this) }); return this.change("getRuleFilterSelect", i, n, t) }, i.prototype.getRuleOperatorSelect = function (n, t) { var i = this.templates.operatorSelect({ builder: this, rule: n, operators: t, icons: this.icons, settings: this.settings, translate: this.translate.bind(this) }); return this.change("getRuleOperatorSelect", i, n, t) }, i.prototype.getRuleValueSelect = function (n, t) { var i = this.templates.ruleValueSelect({ builder: this, name: n, rule: t, icons: this.icons, settings: this.settings, translate: this.translate.bind(this) }); return this.change("getRuleValueSelect", i, n, t) }, i.prototype.getRuleInput = function (n, t) { var u = n.filter, f = n.filter.validation || {}, e = n.id + "_value_" + t, o = u.vertical ? " class=block" : "", i = ""; if ("function" == typeof u.input) i = u.input.call(this, n, e); else switch (u.input) { case "radio": case "checkbox": r.iterateOptions(u.values, function (n, t) { i += "<label" + o + '><input type="' + u.input + '" name="' + e + '" value="' + n + '"> ' + t + "<\/label> " }); break; case "select": i = this.getRuleValueSelect(e, n); break; case "textarea": i += '<textarea class="form-control" name="' + e + '"'; u.size && (i += ' cols="' + u.size + '"'); u.rows && (i += ' rows="' + u.rows + '"'); void 0 !== f.min && (i += ' minlength="' + f.min + '"'); void 0 !== f.max && (i += ' maxlength="' + f.max + '"'); u.placeholder && (i += ' placeholder="' + u.placeholder + '"'); i += "><\/textarea>"; break; case "number": i += '<input class="form-control" type="number" name="' + e + '"'; void 0 !== f.step && (i += ' step="' + f.step + '"'); void 0 !== f.min && (i += ' min="' + f.min + '"'); void 0 !== f.max && (i += ' max="' + f.max + '"'); u.placeholder && (i += ' placeholder="' + u.placeholder + '"'); u.size && (i += ' size="' + u.size + '"'); i += ">"; break; default: i += '<input class="form-control" type="text" name="' + e + '"'; u.placeholder && (i += ' placeholder="' + u.placeholder + '"'); "string" === u.type && void 0 !== f.min && (i += ' minlength="' + f.min + '"'); "string" === u.type && void 0 !== f.max && (i += ' maxlength="' + f.max + '"'); u.size && (i += ' size="' + u.size + '"'); i += ">" }return this.change("getRuleInput", i, n, e) }, r = {}, (i.utils = r).iterateOptions = function (t, i) { t && (n.isArray(t) ? t.forEach(function (t) { n.isPlainObject(t) ? "value" in t ? i(t.value, t.label || t.value, t.optgroup) : n.each(t, function (n, t) { return i(n, t), !1 }) : i(t, t) }) : n.each(t, function (n, t) { i(n, t) })) }, r.fmt = function (n, t) { return Array.isArray(t) || (t = Array.prototype.slice.call(arguments, 1)), n.replace(/{([0-9]+)}/g, function (n, i) { return t[parseInt(i)] }) }, r.error = function () { var n = 0, e = "boolean" != typeof arguments[n] || arguments[n++], u = arguments[n++], f = arguments[n++], i = Array.isArray(arguments[n]) ? arguments[n] : Array.prototype.slice.call(arguments, n), t; if (e) { t = new Error(r.fmt(f, i)); throw t.name = u + "Error", t.args = i, t; } console.error(u + "Error: " + r.fmt(f, i)) }, r.changeType = function (n, t) { if ("" !== n && void 0 !== n) switch (t) { case "integer": return "string" != typeof n || /^-?\d+$/.test(n) ? parseInt(n) : n; case "double": return "string" != typeof n || /^-?\d+\.?\d*$/.test(n) ? parseFloat(n) : n; case "boolean": return "string" != typeof n || /^(0|1|true|false){1}$/i.test(n) ? !0 === n || 1 === n || "true" === n.toLowerCase() || "1" === n : n; default: return n } }, r.escapeString = function (n) { return "string" != typeof n ? n : n.replace(/[\0\n\r\b\\\'\"]/g, function (n) { switch (n) { case "\0": return "\\0"; case "\n": return "\\n"; case "\r": return "\\r"; case "\b": return "\\b"; default: return "\\" + n } }).replace(/\t/g, "\\t").replace(/\x1a/g, "\\Z") }, r.escapeRegExp = function (n) { return n.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&") }, r.escapeElementId = function (n) { return n ? n.replace(/(\\)?([:.\[\],])/g, function (n, t, i) { return t ? n : "\\" + i }) : n }, r.groupSort = function (n, t) { var i = [], r = []; return n.forEach(function (n) { var u; n[t] ? -1 == (u = i.lastIndexOf(n[t])) ? u = i.length : u++ : u = i.length; i.splice(u, 0, n[t]); r.splice(u, 0, n) }), r }, r.defineModelProperties = function (t, i) { i.forEach(function (i) { Object.defineProperty(t.prototype, i, { enumerable: !0, get: function () { return this.__[i] }, set: function (t) { var r = null !== this.__[i] && "object" == typeof this.__[i] ? n.extend({}, this.__[i]) : this.__[i]; this.__[i] = t; null !== this.model && this.model.trigger("update", this, i, t, r) } }) }) }, n.extend(s.prototype, { trigger: function (t) { var i = new n.Event(t); return this.$.triggerHandler(i, Array.prototype.slice.call(arguments, 1)), i }, on: function () { return this.$.on.apply(this.$, Array.prototype.slice.call(arguments)), this }, off: function () { return this.$.off.apply(this.$, Array.prototype.slice.call(arguments)), this }, once: function () { return this.$.one.apply(this.$, Array.prototype.slice.call(arguments)), this } }), f = function (n, t) { if (!(this instanceof f)) return new f(n, t); Object.defineProperty(this, "__", { value: {} }); t.data("queryBuilderModel", this); this.__.level = 1; this.__.error = null; this.__.flags = {}; this.__.data = void 0; this.$el = t; this.id = t[0].id; this.model = null; this.parent = n }, r.defineModelProperties(f, ["level", "error", "data", "flags"]), Object.defineProperty(f.prototype, "parent", { enumerable: !0, get: function () { return this.__.parent }, set: function (n) { this.__.parent = n; this.level = null === n ? 1 : n.level + 1; this.model = null === n ? null : n.model } }), f.prototype.isRoot = function () { return 1 === this.level }, f.prototype.getPos = function () { return this.isRoot() ? -1 : this.parent.getNodePos(this) }, f.prototype.drop = function () { var n = this.model; this.parent && this.parent.removeNode(this); this.$el.removeData("queryBuilderModel"); null !== n && n.trigger("drop", this) }, f.prototype.moveAfter = function (n) { this.isRoot() || this.move(n.parent, n.getPos() + 1) }, f.prototype.moveAtBegin = function (n) { this.isRoot() || (void 0 === n && (n = this.parent), this.move(n, 0)) }, f.prototype.moveAtEnd = function (n) { this.isRoot() || (void 0 === n && (n = this.parent), this.move(n, 0 === n.length() ? 0 : n.length() - 1)) }, f.prototype.move = function (n, t) { this.isRoot() || ("number" == typeof n && (t = n, n = this.parent), this.parent.removeNode(this), n.insertNode(this, t, !1), null !== this.model && this.model.trigger("move", this, n, t)) }, u = function (n, t) { if (!(this instanceof u)) return new u(n, t); f.call(this, n, t); this.rules = []; this.__.condition = null }, u.prototype = Object.create(f.prototype), u.prototype.constructor = u, r.defineModelProperties(u, ["condition"]), u.prototype.empty = function () { this.each("reverse", function (n) { n.drop() }, function (n) { n.drop() }) }, u.prototype.drop = function () { this.empty(); f.prototype.drop.call(this) }, u.prototype.length = function () { return this.rules.length }, u.prototype.insertNode = function (n, t, i) { return void 0 === t && (t = this.length()), this.rules.splice(t, 0, n), n.parent = this, i && null !== this.model && this.model.trigger("add", this, n, t), n }, u.prototype.addGroup = function (n, t) { return this.insertNode(new u(this, n), t, !0) }, u.prototype.addRule = function (n, t) { return this.insertNode(new e(this, n), t, !0) }, u.prototype.removeNode = function (n) { var t = this.getNodePos(n); -1 !== t && (n.parent = null, this.rules.splice(t, 1)) }, u.prototype.getNodePos = function (n) { return this.rules.indexOf(n) }, u.prototype.each = function (n, t, i, r) { "boolean" != typeof n && "string" != typeof n && (r = i, i = t, t = n, n = !1); r = void 0 === r ? null : r; for (var f = n ? this.rules.length - 1 : 0, o = n ? 0 : this.rules.length - 1, s = n ? -1 : 1, e = !1; (n ? o <= f : f <= o) && (this.rules[f] instanceof u ? i && (e = !1 === i.call(r, this.rules[f])) : t && (e = !1 === t.call(r, this.rules[f])), !e); f += s); return !e }, u.prototype.contains = function (n, t) { return -1 !== this.getNodePos(n) || !!t && !this.each(function () { return !0 }, function (t) { return !t.contains(n, !0) }) }, e = function (n, t) { if (!(this instanceof e)) return new e(n, t); f.call(this, n, t); this._updating_value = !1; this._updating_input = !1; this.__.filter = null; this.__.operator = null; this.__.value = void 0 }, e.prototype = Object.create(f.prototype), e.prototype.constructor = e, r.defineModelProperties(e, ["filter", "operator", "value"]), e.prototype.isRoot = function () { return !1 }, i.Group = u, i.Rule = e, n.fn.queryBuilder = function (n) { var t, u, f; return (0 === this.length && r.error("Config", "No target defined"), 1 < this.length && r.error("Config", "Unable to initialize on multiple target"), t = this.data("queryBuilder"), u = "object" == typeof n && n || {}, !t && "destroy" == n) ? this : (t || (f = new i(this, u), this.data("queryBuilder", f), f.init(u.rules)), "string" == typeof n ? t[n].apply(t, Array.prototype.slice.call(arguments, 1)) : this) }, n.fn.queryBuilder.constructor = i, n.fn.queryBuilder.defaults = i.defaults, n.fn.queryBuilder.extend = i.extend, n.fn.queryBuilder.define = i.define, n.fn.queryBuilder.regional = i.regional, i.define("bt-checkbox", function (n) { "glyphicons" == n.font && this.$el.addClass("bt-checkbox-glyphicons"); this.on("getRuleInput.filter", function (t, i, u) { var f = i.filter, e, o; "radio" !== f.input && "checkbox" !== f.input || f.plugin || (t.value = "", f.colors || (f.colors = {}), f.color && (f.colors._def_ = f.color), e = f.vertical ? ' style="display:block"' : "", o = 0, r.iterateOptions(f.values, function (i, r) { var h = f.colors[i] || f.colors._def_ || n.color, s = u + "_" + o++; t.value += "<div" + e + ' class="' + f.input + " " + f.input + "-" + h + '"> <input type="' + f.input + '" name="' + u + '" id="' + s + '" value="' + i + '"> <label for="' + s + '">' + r + "<\/label> <\/div>" })) }) }, { font: "glyphicons", color: "default" }), i.define("bt-selectpicker", function (t) { n.fn.selectpicker && n.fn.selectpicker.Constructor || r.error("MissingLibrary", 'Bootstrap Select is required to use "bt-selectpicker" plugin. Get it here: http://silviomoreto.github.io/bootstrap-select'); var u = i.selectors; this.on("afterCreateRuleFilters", function (n, i) { i.$el.find(u.rule_filter).removeClass("form-control").selectpicker(t) }); this.on("afterCreateRuleOperators", function (n, i) { i.$el.find(u.rule_operator).removeClass("form-control").selectpicker(t) }); this.on("afterUpdateRuleFilter", function (n, t) { t.$el.find(u.rule_filter).selectpicker("render") }); this.on("afterUpdateRuleOperator", function (n, t) { t.$el.find(u.rule_operator).selectpicker("render") }); this.on("beforeDeleteRule", function (n, t) { t.$el.find(u.rule_filter).selectpicker("destroy"); t.$el.find(u.rule_operator).selectpicker("destroy") }) }, { container: "body", style: "btn-inverse btn-xs", width: "auto", showIcon: !1 }), i.define("bt-tooltip-errors", function (t) { n.fn.tooltip && n.fn.tooltip.Constructor && n.fn.tooltip.Constructor.prototype.fixTitle || r.error("MissingLibrary", 'Bootstrap Tooltip is required to use "bt-tooltip-errors" plugin. Get it here: http://getbootstrap.com'); var u = this; this.on("getRuleTemplate.filter getGroupTemplate.filter", function (t) { var r = n(t.value); r.find(i.selectors.error_container).attr("data-toggle", "tooltip"); t.value = r.prop("outerHTML") }); this.model.on("update", function (n, r, f) { "error" == f && u.settings.display_errors && r.$el.find(i.selectors.error_container).eq(0).tooltip(t).tooltip("hide").tooltip("fixTitle") }) }, { placement: "right" }), i.extend({ setFilters: function (n, t) { var u = this, f; if (void 0 === t && (t = n, n = !1), t = this.checkFilters(t), f = (t = this.change("setFilters", t)).map(function (n) { return n.id }), n || function n(t) { t.each(function (n) { n.filter && -1 === f.indexOf(n.filter.id) && r.error("ChangeFilter", 'A rule is using filter "{0}"', n.filter.id) }, n) }(this.model.root), this.filters = t, function n(t) { t.each(!0, function (n) { n.filter && -1 === f.indexOf(n.filter.id) ? (n.drop(), u.trigger("rulesChanged")) : (u.createRuleFilters(n), n.$el.find(i.selectors.rule_filter).val(n.filter ? n.filter.id : "-1"), u.trigger("afterUpdateRuleFilter", n)) }, n) }(this.model.root), this.settings.plugins && (this.settings.plugins["unique-filter"] && this.updateDisabledFilters(), this.settings.plugins["bt-selectpicker"] && this.$el.find(i.selectors.rule_filter).selectpicker("render")), this.settings.default_filter) try { this.getFilterById(this.settings.default_filter) } catch (n) { this.settings.default_filter = null } this.trigger("afterSetFilters", t) }, addFilter: function (t, i) { void 0 === i || "#end" == i ? i = this.filters.length : "#start" == i && (i = 0); n.isArray(t) || (t = [t]); var r = n.extend(!0, [], this.filters); parseInt(i) == i ? Array.prototype.splice.apply(r, [i, 0].concat(t)) : this.filters.some(function (n, t) { if (n.id == i) return i = t + 1, !0 }) ? Array.prototype.splice.apply(r, [i, 0].concat(t)) : Array.prototype.push.apply(r, t); this.setFilters(r) }, removeFilter: function (t, i) { var r = n.extend(!0, [], this.filters); "string" == typeof t && (t = [t]); r = r.filter(function (n) { return -1 === t.indexOf(n.id) }); this.setFilters(i, r) } }), i.define("chosen-selectpicker", function (t) { n.fn.chosen || r.error("MissingLibrary", 'chosen is required to use "chosen-selectpicker" plugin. Get it here: https://github.com/harvesthq/chosen'); this.settings.plugins["bt-selectpicker"] && r.error("Conflict", "bt-selectpicker is already selected as the dropdown plugin. Please remove chosen-selectpicker from the plugin list"); var u = i.selectors; this.on("afterCreateRuleFilters", function (n, i) { i.$el.find(u.rule_filter).removeClass("form-control").chosen(t) }); this.on("afterCreateRuleOperators", function (n, i) { i.$el.find(u.rule_operator).removeClass("form-control").chosen(t) }); this.on("afterUpdateRuleFilter", function (n, t) { t.$el.find(u.rule_filter).trigger("chosen:updated") }); this.on("afterUpdateRuleOperator", function (n, t) { t.$el.find(u.rule_operator).trigger("chosen:updated") }); this.on("beforeDeleteRule", function (n, t) { t.$el.find(u.rule_filter).chosen("destroy"); t.$el.find(u.rule_operator).chosen("destroy") }) }), i.define("filter-description", function (t) { "inline" === t.mode ? this.on("afterUpdateRuleFilter afterUpdateRuleOperator", function (i, r) { var u = r.$el.find("p.filter-description"), f = i.builder.getFilterDescription(r.filter, r); f ? (0 === u.length ? (u = n('<p class="filter-description"><\/p>')).appendTo(r.$el) : u.css("display", ""), u.html('<i class="' + t.icon + '"><\/i> ' + f)) : u.hide() }) : "popover" === t.mode ? (n.fn.popover && n.fn.popover.Constructor && n.fn.popover.Constructor.prototype.fixTitle || r.error("MissingLibrary", 'Bootstrap Popover is required to use "filter-description" plugin. Get it here: http://getbootstrap.com'), this.on("afterUpdateRuleFilter afterUpdateRuleOperator", function (r, u) { var f = u.$el.find("button.filter-description"), e = r.builder.getFilterDescription(u.filter, u); e ? (0 === f.length ? ((f = n('<button type="button" class="btn btn-xs btn-info filter-description" data-toggle="popover"><i class="' + t.icon + '"><\/i><\/button>')).prependTo(u.$el.find(i.selectors.rule_actions)), f.popover({ placement: "left", container: "body", html: !0 }), f.on("mouseout", function () { f.popover("hide") })) : f.css("display", ""), f.data("bs.popover").options.content = e, f.attr("aria-describedby") && f.popover("show")) : (f.hide(), f.data("bs.popover") && f.popover("hide")) })) : "bootbox" === t.mode && ("bootbox" in window || r.error("MissingLibrary", 'Bootbox is required to use "filter-description" plugin. Get it here: http://bootboxjs.com'), this.on("afterUpdateRuleFilter afterUpdateRuleOperator", function (r, u) { var f = u.$el.find("button.filter-description"), e = r.builder.getFilterDescription(u.filter, u); e ? (0 === f.length ? ((f = n('<button type="button" class="btn btn-xs btn-info filter-description" data-toggle="bootbox"><i class="' + t.icon + '"><\/i><\/button>')).prependTo(u.$el.find(i.selectors.rule_actions)), f.on("click", function () { bootbox.alert(f.data("description")) })) : f.css("display", ""), f.data("description", e)) : f.hide() })) }, { icon: "glyphicon glyphicon-info-sign", mode: "popover" }), i.extend({ getFilterDescription: function (n, t) { if (n) return "function" == typeof n.description ? n.description.call(this, t) : n.description } }), i.define("invert", function (t) { var r = this, u = i.selectors; this.on("afterInit", function () { r.$el.on("click.queryBuilder", "[data-invert=group]", function () { var i = n(this).closest(u.group_container); r.invert(r.getModel(i), t) }); t.display_rules_button && t.invert_rules && r.$el.on("click.queryBuilder", "[data-invert=rule]", function () { var i = n(this).closest(u.rule_container); r.invert(r.getModel(i), t) }) }); t.disable_template || (this.on("getGroupTemplate.filter", function (i) { var f = n(i.value); f.find(u.condition_container).after('<button type="button" class="btn btn-xs btn-default" data-invert="group"><i class="' + t.icon + '"><\/i> ' + r.translate("invert") + "<\/button>"); i.value = f.prop("outerHTML") }), t.display_rules_button && t.invert_rules && this.on("getRuleTemplate.filter", function (i) { var f = n(i.value); f.find(u.rule_actions).prepend('<button type="button" class="btn btn-xs btn-default" data-invert="rule"><i class="' + t.icon + '"><\/i> ' + r.translate("invert") + "<\/button>"); i.value = f.prop("outerHTML") })) }, { icon: "glyphicon glyphicon-random", recursive: !0, invert_rules: !0, display_rules_button: !1, silent_fail: !1, disable_template: !1 }), i.defaults({ operatorOpposites: { equal: "not_equal", not_equal: "equal", "in": "not_in", not_in: "in", less: "greater_or_equal", less_or_equal: "greater", greater: "less_or_equal", greater_or_equal: "less", between: "not_between", not_between: "between", begins_with: "not_begins_with", not_begins_with: "begins_with", contains: "not_contains", not_contains: "contains", ends_with: "not_ends_with", not_ends_with: "ends_with", is_empty: "is_not_empty", is_not_empty: "is_empty", is_null: "is_not_null", is_not_null: "is_null" }, conditionOpposites: { AND: "OR", OR: "AND" } }), i.extend({ invert: function (t, i) { var o, s; if (!(t instanceof f)) { if (!this.model.root) return; i = t; t = this.model.root } ("object" != typeof i && (i = {}), void 0 === i.recursive && (i.recursive = !0), void 0 === i.invert_rules && (i.invert_rules = !0), void 0 === i.silent_fail && (i.silent_fail = !1), void 0 === i.trigger && (i.trigger = !0), t instanceof u) ? (this.settings.conditionOpposites[t.condition] ? t.condition = this.settings.conditionOpposites[t.condition] : i.silent_fail || r.error("InvertCondition", 'Unknown inverse of condition "{0}"', t.condition), i.recursive) && (o = n.extend({}, i, { trigger: !1 }), t.each(function (n) { i.invert_rules && this.invert(n, o) }, function (n) { this.invert(n, o) }, this)) : t instanceof e && t.operator && !t.filter.no_invert && (this.settings.operatorOpposites[t.operator.type] ? (s = this.settings.operatorOpposites[t.operator.type], t.filter.operators && -1 == t.filter.operators.indexOf(s) || (t.operator = this.getOperatorByType(s))) : i.silent_fail || r.error("InvertOperator", 'Unknown inverse of operator "{0}"', t.operator.type)); i.trigger && (this.trigger("afterInvert", t, i), this.trigger("rulesChanged")) } }), i.defaults({ mongoOperators: { equal: function (n) { return n[0] }, not_equal: function (n) { return { $ne: n[0] } }, "in": function (n) { return { $in: n } }, not_in: function (n) { return { $nin: n } }, less: function (n) { return { $lt: n[0] } }, less_or_equal: function (n) { return { $lte: n[0] } }, greater: function (n) { return { $gt: n[0] } }, greater_or_equal: function (n) { return { $gte: n[0] } }, between: function (n) { return { $gte: n[0], $lte: n[1] } }, not_between: function (n) { return { $lt: n[0], $gt: n[1] } }, begins_with: function (n) { return { $regex: "^" + r.escapeRegExp(n[0]) } }, not_begins_with: function (n) { return { $regex: "^(?!" + r.escapeRegExp(n[0]) + ")" } }, contains: function (n) { return { $regex: r.escapeRegExp(n[0]) } }, not_contains: function (n) { return { $regex: "^((?!" + r.escapeRegExp(n[0]) + ").)*$", $options: "s" } }, ends_with: function (n) { return { $regex: r.escapeRegExp(n[0]) + "$" } }, not_ends_with: function (n) { return { $regex: "(?<!" + r.escapeRegExp(n[0]) + ")$" } }, is_empty: function () { return "" }, is_not_empty: function () { return { $ne: "" } }, is_null: function () { return null }, is_not_null: function () { return { $ne: null } } }, mongoRuleOperators: { $eq: function (n) { return { val: n, op: null === n ? "is_null" : "" === n ? "is_empty" : "equal" } }, $ne: function (n) { return { val: n = n.$ne, op: null === n ? "is_not_null" : "" === n ? "is_not_empty" : "not_equal" } }, $regex: function (n) { return "^(?!" == (n = n.$regex).slice(0, 4) && ")" == n.slice(-1) ? { val: n.slice(4, -1), op: "not_begins_with" } : "^((?!" == n.slice(0, 5) && ").)*$" == n.slice(-5) ? { val: n.slice(5, -5), op: "not_contains" } : "(?<!" == n.slice(0, 4) && ")$" == n.slice(-2) ? { val: n.slice(4, -2), op: "not_ends_with" } : "$" == n.slice(-1) ? { val: n.slice(0, -1), op: "ends_with" } : "^" == n.slice(0, 1) ? { val: n.slice(1), op: "begins_with" } : { val: n, op: "contains" } }, between: function (n) { return { val: [n.$gte, n.$lte], op: "between" } }, not_between: function (n) { return { val: [n.$lt, n.$gt], op: "not_between" } }, $in: function (n) { return { val: n.$in, op: "in" } }, $nin: function (n) { return { val: n.$nin, op: "not_in" } }, $lt: function (n) { return { val: n.$lt, op: "less" } }, $lte: function (n) { return { val: n.$lte, op: "less_or_equal" } }, $gt: function (n) { return { val: n.$gt, op: "greater" } }, $gte: function (n) { return { val: n.$gte, op: "greater_or_equal" } } } }), i.extend({ getMongo: function (n) { if (!(n = void 0 === n ? this.getRules() : n)) return null; var t = this; return function i(n) { var u, f; return (n.condition || (n.condition = t.settings.default_condition), -1 === ["AND", "OR"].indexOf(n.condition.toUpperCase()) && r.error("UndefinedMongoCondition", 'Unable to build MongoDB query with condition "{0}"', n.condition), !n.rules) ? {} : (u = [], n.rules.forEach(function (n) { var f, o, e; n.rules && 0 < n.rules.length ? u.push(i(n)) : (f = t.settings.mongoOperators[n.operator], o = t.getOperatorByType(n.operator), void 0 === f && r.error("UndefinedMongoOperator", 'Unknown MongoDB operation for operator "{0}"', n.operator), 0 !== o.nb_inputs && (n.value instanceof Array || (n.value = [n.value])), e = {}, e[t.change("getMongoDBField", n.field, n)] = f.call(t, n.value), u.push(t.change("ruleToMongo", e, n, n.value, f))) }), f = {}, f["$" + n.condition.toLowerCase()] = u, t.change("groupToMongo", f, n)) }(n) }, getRulesFromMongo: function (n) { var t, i; return null == n ? null : (t = this, "rules" in (n = t.change("parseMongoNode", n)) && "condition" in n) ? n : "id" in n && "operator" in n && "value" in n ? { condition: this.settings.default_condition, rules: [n] } : (i = t.getMongoCondition(n), i || r.error("MongoParse", "Invalid MongoDB query format"), function u(n, i) { var e = n[i], f = []; return e.forEach(function (n) { var i, h; if ("rules" in (n = t.change("parseMongoNode", n)) && "condition" in n) f.push(n); else if ("id" in n && "operator" in n && "value" in n) f.push(n); else if (i = t.getMongoCondition(n), i) f.push(u(n, i)); else { var e = Object.keys(n)[0], o = n[e], s = t.getMongoOperator(o); void 0 === s && r.error("MongoParse", "Invalid MongoDB query format"); h = t.settings.mongoRuleOperators[s]; void 0 === h && r.error("UndefinedMongoOperator", 'JSON Rule operation unknown for operator "{0}"', s); var c = h.call(t, o), l = t.getMongoDBFieldID(e, o), a = t.change("mongoToRule", { id: l, field: e, operator: c.op, value: c.val }, n); f.push(a) } }), t.change("mongoToGroup", { condition: i.replace("$", "").toUpperCase(), rules: f }, n) }(n, i)) }, setRulesFromMongo: function (n) { this.setRules(this.getRulesFromMongo(n)) }, getMongoDBFieldID: function (n, t) { var i = this.filters.filter(function (t) { return t.field === n }); return 1 === i.length ? i[0].id : this.change("getMongoDBFieldID", n, t) }, getMongoOperator: function (n) { if (null === n || "object" != typeof n) return "$eq"; if (void 0 !== n.$gte && void 0 !== n.$lte) return "between"; if (void 0 !== n.$lt && void 0 !== n.$gt) return "not_between"; var t = Object.keys(n).filter(function (n) { return !!this.settings.mongoRuleOperators[n] }.bind(this)); if (1 === t.length) return t[0] }, getMongoCondition: function (n) { for (var i = Object.keys(n), t = 0, r = i.length; t < r; t++)if ("$or" === i[t].toLowerCase() || "$and" === i[t].toLowerCase()) return i[t] } }), i.define("not-group", function (t) { var r = this; this.on("afterInit", function () { r.$el.on("click.queryBuilder", "[data-not=group]", function () { var u = n(this).closest(i.selectors.group_container), t = r.getModel(u); t.not = !t.not }); r.model.on("update", function (n, t, i) { t instanceof u && "not" === i && r.updateGroupNot(t) }) }); this.on("afterAddGroup", function (n, t) { t.__.not = !1 }); t.disable_template || this.on("getGroupTemplate.filter", function (u) { var f = n(u.value); f.find(i.selectors.condition_container).prepend('<button type="button" class="btn btn-xs btn-default" data-not="group"><i class="' + t.icon_unchecked + '"><\/i> ' + r.translate("NOT") + "<\/button>"); u.value = f.prop("outerHTML") }); this.on("groupToJson.filter", function (n, t) { n.value.not = t.not }); this.on("jsonToGroup.filter", function (n, t) { n.value.not = !!t.not }); this.on("groupToSQL.filter", function (n, t) { t.not && (n.value = "NOT ( " + n.value + " )") }); this.on("parseSQLNode.filter", function (n) { n.value.name && "NOT" == n.value.name.toUpperCase() && (n.value = n.value.arguments.value[0], -1 === ["AND", "OR"].indexOf(n.value.operation.toUpperCase()) && (n.value = new SQLParser.nodes.Op(r.settings.default_condition, n.value, null)), n.value.not = !0) }); this.on("sqlGroupsDistinct.filter", function (n, t, i, r) { i.not && 0 < r && (n.value = !0) }); this.on("sqlToGroup.filter", function (n, t) { n.value.not = !!t.not }); this.on("groupToMongo.filter", function (n, t) { var i = "$" + t.condition.toLowerCase(); t.not && n.value[i] && (n.value = { $nor: [n.value] }) }); this.on("parseMongoNode.filter", function (n) { var t = Object.keys(n.value); "$nor" == t[0] && (n.value = n.value[t[0]][0], n.value.not = !0) }); this.on("mongoToGroup.filter", function (n, t) { n.value.not = !!t.not }) }, { icon_unchecked: "glyphicon glyphicon-unchecked", icon_checked: "glyphicon glyphicon-check", disable_template: !1 }), r.defineModelProperties(u, ["not"]), i.selectors.group_not = i.selectors.group_header + " [data-not=group]", i.extend({ updateGroupNot: function (n) { var t = this.plugins["not-group"]; n.$el.find(">" + i.selectors.group_not).toggleClass("active", n.not).find("i").attr("class", n.not ? t.icon_checked : t.icon_unchecked); this.trigger("afterUpdateGroupNot", n); this.trigger("rulesChanged") } }), i.define("sortable", function (t) { var e, s, f, h; "interact" in window || r.error("MissingLibrary", 'interact.js is required to use "sortable" plugin. Get it here: http://interactjs.io'); void 0 !== t.default_no_sortable && (r.error(!1, "Config", 'Sortable plugin : "default_no_sortable" options is deprecated, use standard "default_rule_flags" and "default_group_flags" instead'), this.settings.default_rule_flags.no_sortable = this.settings.default_group_flags.no_sortable = t.default_no_sortable); interact.dynamicDrop(!0); interact.pointerMoveTolerance(10); this.on("afterAddRule afterAddGroup", function (r, c) { if (c != e) { var l = r.builder; t.inherit_no_sortable && c.parent && c.parent.flags.no_sortable && (c.flags.no_sortable = !0); t.inherit_no_drop && c.parent && c.parent.flags.no_drop && (c.flags.no_drop = !0); c.flags.no_sortable || interact(c.$el[0]).draggable({ allowFrom: i.selectors.drag_handle, onstart: function (t) { h = !1; f = l.getModel(t.target); s = f.$el.clone().appendTo(f.$el.parent()).width(f.$el.outerWidth()).addClass("dragging"); var i = n('<div class="rule-placeholder">&nbsp;<\/div>').height(f.$el.outerHeight()); e = f.parent.addRule(i, f.getPos()); f.$el.hide() }, onmove: function (n) { s[0].style.top = n.clientY - 15 + "px"; s[0].style.left = n.clientX - 15 + "px" }, onend: function (t) { t.dropzone && (o(f, n(t.relatedTarget), l), h = !0); s.remove(); s = void 0; e.drop(); e = void 0; f.$el.css("display", ""); l.trigger("afterMove", f); l.trigger("rulesChanged") } }); c.flags.no_drop || (interact(c.$el[0]).dropzone({ accept: i.selectors.rule_and_group_containers, ondragenter: function (t) { o(e, n(t.target), l) }, ondrop: function (t) { h || o(f, n(t.target), l) } }), c instanceof u && interact(c.$el.find(i.selectors.group_header)[0]).dropzone({ accept: i.selectors.rule_and_group_containers, ondragenter: function (t) { o(e, n(t.target), l) }, ondrop: function (t) { h || o(f, n(t.target), l) } })) } }); this.on("beforeDeleteRule beforeDeleteGroup", function (n, t) { n.isDefaultPrevented() || (interact(t.$el[0]).unset(), t instanceof u && interact(t.$el.find(i.selectors.group_header)[0]).unset()) }); this.on("afterApplyRuleFlags afterApplyGroupFlags", function (n, t) { t.flags.no_sortable && t.$el.find(".drag-handle").remove() }); t.disable_template || (this.on("getGroupTemplate.filter", function (r, u) { if (1 < u) { var f = n(r.value); f.find(i.selectors.condition_container).after('<div class="drag-handle"><i class="' + t.icon + '"><\/i><\/div>'); r.value = f.prop("outerHTML") } }), this.on("getRuleTemplate.filter", function (r) { var u = n(r.value); u.find(i.selectors.rule_header).after('<div class="drag-handle"><i class="' + t.icon + '"><\/i><\/div>'); r.value = u.prop("outerHTML") })) }, { inherit_no_sortable: !0, inherit_no_drop: !0, icon: "glyphicon glyphicon-sort", disable_template: !1 }), i.selectors.rule_and_group_containers = i.selectors.rule_container + ", " + i.selectors.group_container, i.selectors.drag_handle = ".drag-handle", i.defaults({ default_rule_flags: { no_sortable: !1, no_drop: !1 }, default_group_flags: { no_sortable: !1, no_drop: !1 } }), i.define("sql-support", function () { }, { boolean_as_integer: !0 }), i.defaults({ sqlOperators: { equal: { op: "= ?" }, not_equal: { op: "!= ?" }, "in": { op: "IN(?)", sep: ", " }, not_in: { op: "NOT IN(?)", sep: ", " }, less: { op: "< ?" }, less_or_equal: { op: "<= ?" }, greater: { op: "> ?" }, greater_or_equal: { op: ">= ?" }, between: { op: "BETWEEN ?", sep: " AND " }, not_between: { op: "NOT BETWEEN ?", sep: " AND " }, begins_with: { op: "LIKE(?)", mod: "{0}%" }, not_begins_with: { op: "NOT LIKE(?)", mod: "{0}%" }, contains: { op: "LIKE(?)", mod: "%{0}%" }, not_contains: { op: "NOT LIKE(?)", mod: "%{0}%" }, ends_with: { op: "LIKE(?)", mod: "%{0}" }, not_ends_with: { op: "NOT LIKE(?)", mod: "%{0}" }, is_empty: { op: "= ''" }, is_not_empty: { op: "!= ''" }, is_null: { op: "IS NULL" }, is_not_null: { op: "IS NOT NULL" } }, sqlRuleOperator: { "=": function (n) { return { val: n, op: "" === n ? "is_empty" : "equal" } }, "!=": function (n) { return { val: n, op: "" === n ? "is_not_empty" : "not_equal" } }, LIKE: function (n) { return "%" == n.slice(0, 1) && "%" == n.slice(-1) ? { val: n.slice(1, -1), op: "contains" } : "%" == n.slice(0, 1) ? { val: n.slice(1), op: "ends_with" } : "%" == n.slice(-1) ? { val: n.slice(0, -1), op: "begins_with" } : void r.error("SQLParse", 'Invalid value for LIKE operator "{0}"', n) }, "NOT LIKE": function (n) { return "%" == n.slice(0, 1) && "%" == n.slice(-1) ? { val: n.slice(1, -1), op: "not_contains" } : "%" == n.slice(0, 1) ? { val: n.slice(1), op: "not_ends_with" } : "%" == n.slice(-1) ? { val: n.slice(0, -1), op: "not_begins_with" } : void r.error("SQLParse", 'Invalid value for NOT LIKE operator "{0}"', n) }, IN: function (n) { return { val: n, op: "in" } }, "NOT IN": function (n) { return { val: n, op: "not_in" } }, "<": function (n) { return { val: n, op: "less" } }, "<=": function (n) { return { val: n, op: "less_or_equal" } }, ">": function (n) { return { val: n, op: "greater" } }, ">=": function (n) { return { val: n, op: "greater_or_equal" } }, BETWEEN: function (n) { return { val: n, op: "between" } }, "NOT BETWEEN": function (n) { return { val: n, op: "not_between" } }, IS: function (n) { return null !== n && r.error("SQLParse", "Invalid value for IS operator"), { val: null, op: "is_null" } }, "IS NOT": function (n) { return null !== n && r.error("SQLParse", "Invalid value for IS operator"), { val: null, op: "is_not_null" } } }, sqlStatements: { question_mark: function () { var n = []; return { add: function (t, i) { return n.push(i), "?" }, run: function () { return n } } }, numbered: function (n) { (!n || 1 < n.length) && (n = "$"); var i = 0, t = []; return { add: function (r, u) { return t.push(u), n + ++i }, run: function () { return t } } }, named: function (n) { (!n || 1 < n.length) && (n = ":"); var t = {}, i = {}; return { add: function (r, u) { t[r.field] || (t[r.field] = 1); var f = r.field + "_" + t[r.field]++; return i[f] = u, n + f }, run: function () { return i } } } }, sqlRuleStatement: { question_mark: function (n) { var t = 0; return { parse: function (i) { return "?" == i ? n[t++] : i }, esc: function (n) { return n.replace(/\?/g, "'?'") } } }, numbered: function (n, t) { (!t || 1 < t.length) && (t = "$"); var i = new RegExp("^\\" + t + "[0-9]+$"), r = new RegExp("\\" + t + "([0-9]+)", "g"); return { parse: function (t) { return i.test(t) ? n[t.slice(1) - 1] : t }, esc: function (n) { return n.replace(r, "'" + ("$" == t ? "$$" : t) + "$1'") } } }, named: function (n, t) { (!t || 1 < t.length) && (t = ":"); var i = new RegExp("^\\" + t), r = new RegExp("\\" + t + "(" + Object.keys(n).join("|") + ")", "g"); return { parse: function (t) { return i.test(t) ? n[t.slice(1)] : t }, esc: function (n) { return n.replace(r, "'" + ("$" == t ? "$$" : t) + "$1'") } } } } }), i.extend({ getSQL: function (n, t, i) { var o, f, u, e; return (i = void 0 === i ? this.getRules() : i) ? (t = t ? "\n" : " ", o = this.getPluginOptions("sql-support", "boolean_as_integer"), (!0 === n && (n = "question_mark"), "string" == typeof n) && (f = h(n), n = this.settings.sqlStatements[f[1]](f[2])), u = this, e = function s(i) { var f, e; return (i.condition || (i.condition = u.settings.default_condition), -1 === ["AND", "OR"].indexOf(i.condition.toUpperCase()) && r.error("UndefinedSQLCondition", 'Unable to build SQL query with condition "{0}"', i.condition), !i.rules) ? "" : (f = [], i.rules.forEach(function (i) { var c, l; if (i.rules && 0 < i.rules.length) f.push("(" + t + s(i) + t + ")" + t); else { var e = u.settings.sqlOperators[i.operator], a = u.getOperatorByType(i.operator), h = ""; void 0 === e && r.error("UndefinedSQLOperator", 'Unknown SQL operation for operator "{0}"', i.operator); 0 !== a.nb_inputs && (i.value instanceof Array || (i.value = [i.value]), i.value.forEach(function (t, u) { 0 < u && (h += e.sep); "boolean" == i.type && o ? t = t ? 1 : 0 : n || "integer" === i.type || "double" === i.type || "boolean" === i.type || (t = r.escapeString(t)); e.mod && (t = r.fmt(e.mod, t)); n ? h += n.add(i, t) : ("string" == typeof t && (t = "'" + t + "'"), h += t) })); c = function (n) { return e.op.replace("?", function () { return n }) }; l = u.change("getSQLField", i.field, i) + " " + c(h); f.push(u.change("ruleToSQL", l, i, h, c)) } }), e = f.join(" " + i.condition + t), u.change("groupToSQL", e, i)) }(i), n ? { sql: e, params: n.run() } : { sql: e }) : null }, getRulesFromSQL: function (t, i) { var f, o, s, e, c, u; return ("SQLParser" in window || r.error("MissingLibrary", "SQLParser is required to parse SQL queries. Get it here https://github.com/mistic100/sql-parser"), f = this, ("string" == typeof t && (t = { sql: t }), !0 === i && (i = "question_mark"), "string" == typeof i) && (o = h(i), i = this.settings.sqlRuleStatement[o[1]](t.params, o[2])), i && (t.sql = i.esc(t.sql)), 0 !== t.sql.toUpperCase().indexOf("SELECT") && (t.sql = "SELECT * FROM table WHERE " + t.sql), s = SQLParser.parse(t.sql), s.where || r.error("SQLParse", "No WHERE clause found"), e = f.change("parseSQLNode", s.where.conditions), "rules" in e && "condition" in e) ? e : "id" in e && "operator" in e && "value" in e ? { condition: this.settings.default_condition, rules: [e] } : (c = f.change("sqlToGroup", { condition: this.settings.default_condition, rules: [] }, e), u = c, function t(e, o) { var l, y, s, h, a, c, v, p, w; null !== e && ("rules" in (e = f.change("parseSQLNode", e)) && "condition" in e ? u.rules.push(e) : "id" in e && "operator" in e && "value" in e ? u.rules.push(e) : ("left" in e && "right" in e && "operation" in e || r.error("SQLParse", "Unable to parse WHERE clause"), -1 !== ["AND", "OR"].indexOf(e.operation.toUpperCase())) ? (f.change("sqlGroupsDistinct", 0 < o && u.condition != e.operation.toUpperCase(), u, e, o) && (l = f.change("sqlToGroup", { condition: f.settings.default_condition, rules: [] }, e), u.rules.push(l), u = l), u.condition = e.operation.toUpperCase(), o++, y = u, t(e.left, o), u = y, t(e.right, o)) : (n.isPlainObject(e.right.value) && r.error("SQLParse", "Value format not supported for {0}.", e.left.value), s = n.isArray(e.right.value) ? e.right.value.map(function (n) { return n.value }) : e.right.value, i && (s = n.isArray(s) ? s.map(i.parse) : i.parse(s)), h = e.operation.toUpperCase(), "<>" == h && (h = "!="), a = f.settings.sqlRuleOperator[h], void 0 === a && r.error("UndefinedSQLOperator", 'Invalid SQL operation "{0}".', e.operation), v = a.call(this, s, e.operation), "values" in e.left ? c = e.left.values.join(".") : "value" in e.left ? c = e.left.value : r.error("SQLParse", "Cannot find field name in {0}", JSON.stringify(e.left)), p = f.getSQLFieldID(c, s), w = f.change("sqlToRule", { id: p, field: c, operator: v.op, value: v.val }, e), u.rules.push(w))) }(e, 0), c) }, setRulesFromSQL: function (n, t) { this.setRules(this.getRulesFromSQL(n, t)) }, getSQLFieldID: function (n, t) { var i = this.filters.filter(function (t) { return t.field.toLowerCase() === n.toLowerCase() }); return 1 === i.length ? i[0].id : this.change("getSQLFieldID", n, t) } }), i.define("unique-filter", function () { this.status.used_filters = {}; this.on("afterUpdateRuleFilter", this.updateDisabledFilters); this.on("afterDeleteRule", this.updateDisabledFilters); this.on("afterCreateRuleFilters", this.applyDisabledFilters); this.on("afterReset", this.clearDisabledFilters); this.on("afterClear", this.clearDisabledFilters); this.on("getDefaultFilter.filter", function (n, t) { var i = n.builder; (i.updateDisabledFilters(), n.value.id in i.status.used_filters) && (i.filters.some(function (r) { if (!(r.id in i.status.used_filters) || 0 < i.status.used_filters[r.id].length && -1 === i.status.used_filters[r.id].indexOf(t.parent)) return n.value = r, !0 }) || (r.error(!1, "UniqueFilter", "No more non-unique filters available"), n.value = void 0)) }) }), i.extend({ updateDisabledFilters: function (n) { var t = n ? n.builder : this; t.status.used_filters = {}; t.model && (!function i(n) { n.each(function (n) { n.filter && n.filter.unique && (t.status.used_filters[n.filter.id] || (t.status.used_filters[n.filter.id] = []), "group" == n.filter.unique && t.status.used_filters[n.filter.id].push(n.parent)) }, function (n) { i(n) }) }(t.model.root), t.applyDisabledFilters(n)) }, clearDisabledFilters: function (n) { var t = n ? n.builder : this; t.status.used_filters = {}; t.applyDisabledFilters(n) }, applyDisabledFilters: function (t) { var r = t ? t.builder : this; r.$el.find(i.selectors.filter_container + " option").prop("disabled", !1); n.each(r.status.used_filters, function (n, t) { 0 === t.length ? r.$el.find(i.selectors.filter_container + ' option[value="' + n + '"]:not(:selected)').prop("disabled", !0) : t.forEach(function (t) { t.each(function (t) { t.$el.find(i.selectors.filter_container + ' option[value="' + n + '"]:not(:selected)').prop("disabled", !0) }) }) }); r.settings.plugins && r.settings.plugins["bt-selectpicker"] && r.$el.find(i.selectors.rule_filter).selectpicker("render") } }), i.regional.en = { __locale: "English (en)", __author: 'Damien "Mistic" Sorel, http://www.strangeplanet.fr', add_rule: "Add rule", add_group: "Add group", delete_rule: "Delete", delete_group: "Delete", conditions: { AND: "AND", OR: "OR" }, operators: { equal: "equal", not_equal: "not equal", "in": "in", not_in: "not in", less: "less", less_or_equal: "less or equal", greater: "greater", greater_or_equal: "greater or equal", between: "between", not_between: "not between", begins_with: "begins with", not_begins_with: "doesn't begin with", contains: "contains", not_contains: "doesn't contain", ends_with: "ends with", not_ends_with: "doesn't end with", is_empty: "is empty", is_not_empty: "is not empty", is_null: "is null", is_not_null: "is not null" }, errors: { no_filter: "No filter selected", empty_group: "The group is empty", radio_empty: "No value selected", checkbox_empty: "No value selected", select_empty: "No value selected", string_empty: "Empty value", string_exceed_min_length: "Must contain at least {0} characters", string_exceed_max_length: "Must not contain more than {0} characters", string_invalid_format: "Invalid format ({0})", number_nan: "Not a number", number_not_integer: "Not an integer", number_not_double: "Not a real number", number_exceed_min: "Must be greater than {0}", number_exceed_max: "Must be lower than {0}", number_wrong_step: "Must be a multiple of {0}", number_between_invalid: "Invalid values, {0} is greater than {1}", datetime_empty: "Empty value", datetime_invalid: "Invalid date format ({0})", datetime_exceed_min: "Must be after {0}", datetime_exceed_max: "Must be before {0}", datetime_between_invalid: "Invalid values, {0} is greater than {1}", boolean_not_valid: "Not a boolean", operator_not_multiple: 'Operator "{1}" cannot accept multiple values' }, invert: "Invert", NOT: "NOT" }, i.defaults({ lang_code: "en" }), i }); _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (n) { return typeof n } : function (n) { return n && "function" == typeof Symbol && n.constructor === Symbol && n !== Symbol.prototype ? "symbol" : typeof n }; !function (n, t) { "object" === ("undefined" == typeof exports ? "undefined" : _typeof(exports)) && "undefined" != typeof module ? module.exports = t() : "function" == typeof define && define.amd ? define(t) : n.Tabulator = t() }(this, function () { "use strict"; var o, c, r, t, d, s, u, p, h, lt, n, ti, it, ui, ii, v, dt, w, ft, b, ni, rt, y, at, et, vt, ut, f, k, ct, gt, pt, ht, yt, a, bt, l, nt, ri, wt, fi, ei, oi, ot, tt, st, kt; Array.prototype.findIndex || Object.defineProperty(Array.prototype, "findIndex", { value: function (n) { var i, r, u, t, f; if (null == this) throw new TypeError('"this" is null or not defined'); if (i = Object(this), r = i.length >>> 0, "function" != typeof n) throw new TypeError("predicate must be a function"); for (u = arguments[1], t = 0; t < r;) { if (f = i[t], n.call(u, f, t, i)) return t; t++ } return -1 } }); Array.prototype.find || Object.defineProperty(Array.prototype, "find", { value: function (n) { var i, u, f, t, r; if (null == this) throw new TypeError('"this" is null or not defined'); if (i = Object(this), u = i.length >>> 0, "function" != typeof n) throw new TypeError("predicate must be a function"); for (f = arguments[1], t = 0; t < u;) { if (r = i[t], n.call(f, r, t, i)) return r; t++ } } }); String.prototype.includes || (String.prototype.includes = function (n, t) { if (n instanceof RegExp) throw TypeError("first argument must not be a RegExp"); return void 0 === t && (t = 0), -1 !== this.indexOf(n, t) }); Array.prototype.includes || Object.defineProperty(Array.prototype, "includes", { value: function (n, t) { var f, i, r, u; if (null == this) throw new TypeError('"this" is null or not defined'); if (f = Object(this), i = f.length >>> 0, 0 === i) return !1; for (r = 0 | t, u = Math.max(r >= 0 ? r : i - Math.abs(r), 0); u < i;) { if (function (n, t) { return n === t || "number" == typeof n && "number" == typeof t && isNaN(n) && isNaN(t) }(f[u], n)) return !0; u++ } return !1 } }); "function" != typeof Object.assign && Object.defineProperty(Object, "assign", { value: function (n) { var u, i, t, r; if (null === n || void 0 === n) throw new TypeError("Cannot convert undefined or null to object"); for (u = Object(n), i = 1; i < arguments.length; i++)if (t = arguments[i], null !== t && void 0 !== t) for (r in t) Object.prototype.hasOwnProperty.call(t, r) && (u[r] = t[r]); return u }, writable: !0, configurable: !0 }); o = function (n) { this.table = n; this.blockHozScrollEvent = !1; this.headersElement = this.createHeadersElement(); this.element = this.createHeaderElement(); this.rowManager = null; this.columns = []; this.columnsByIndex = []; this.columnsByField = {}; this.scrollLeft = 0; this.element.insertBefore(this.headersElement, this.element.firstChild) }; o.prototype.createHeadersElement = function () { var n = document.createElement("div"); return n.classList.add("tabulator-headers"), n }; o.prototype.createHeaderElement = function () { var n = document.createElement("div"); return n.classList.add("tabulator-header"), this.table.options.headerVisible || n.classList.add("tabulator-header-hidden"), n }; o.prototype.initialize = function () { }; o.prototype.setRowManager = function (n) { this.rowManager = n }; o.prototype.getElement = function () { return this.element }; o.prototype.getHeadersElement = function () { return this.headersElement }; o.prototype.scrollHorizontal = function (n) { var t = 0, i = this.element.scrollWidth - this.table.element.clientWidth; this.element.scrollLeft = n; n > i ? (t = n - i, this.element.style.marginLeft = -t + "px") : this.element.style.marginLeft = 0; this.scrollLeft = n; this.table.modExists("frozenColumns") && this.table.modules.frozenColumns.scrollHorizontal() }; o.prototype.generateColumnsFromRowData = function (n) { var e, u, r = [], t = this.table.options.autoColumnsDefinitions, f, o, i; if (n && n.length) { e = n[0]; for (f in e) { o = { field: f, title: f }; i = e[f]; switch (void 0 === i ? "undefined" : _typeof(i)) { case "undefined": u = "string"; break; case "boolean": u = "boolean"; break; case "object": u = Array.isArray(i) ? "array" : "string"; break; default: u = isNaN(i) || "" === i ? i.match(/((^[0-9]+[a-z]+)|(^[a-z]+[0-9]+))+$/i) ? "alphanum" : "string" : "number" }o.sorter = u; r.push(o) } if (t) switch (void 0 === t ? "undefined" : _typeof(t)) { case "function": this.table.options.columns = t.call(this.table, r); break; case "object": Array.isArray(t) ? r.forEach(function (n) { var i = t.find(function (t) { return t.field === n.field }); i && Object.assign(n, i) }) : r.forEach(function (n) { t[n.field] && Object.assign(n, t[n.field]) }); this.table.options.columns = r } else this.table.options.columns = r; this.setColumns(this.table.options.columns) } }; o.prototype.setColumns = function (n) { for (var t = this; t.headersElement.firstChild;)t.headersElement.removeChild(t.headersElement.firstChild); t.columns = []; t.columnsByIndex = []; t.columnsByField = {}; t.table.modExists("frozenColumns") && t.table.modules.frozenColumns.reset(); n.forEach(function (n) { t._addColumn(n) }); t._reIndexColumns(); t.table.options.responsiveLayout && t.table.modExists("responsiveLayout", !0) && t.table.modules.responsiveLayout.initialize(); this.table.options.virtualDomHoz && this.table.vdomHoz.reinitialize(!1, !0); t.redraw(!0) }; o.prototype._addColumn = function (n, t, i) { var u = new r(n, this), o = u.getElement(), s = i ? this.findColumnIndex(i) : i, e, f; return i && s > -1 ? (e = this.columns.indexOf(i.getTopColumn()), f = i.getElement(), t ? (this.columns.splice(e, 0, u), f.parentNode.insertBefore(o, f)) : (this.columns.splice(e + 1, 0, u), f.parentNode.insertBefore(o, f.nextSibling))) : (t ? (this.columns.unshift(u), this.headersElement.insertBefore(u.getElement(), this.headersElement.firstChild)) : (this.columns.push(u), this.headersElement.appendChild(u.getElement())), u.columnRendered()), u }; o.prototype.registerColumnField = function (n) { n.definition.field && (this.columnsByField[n.definition.field] = n) }; o.prototype.registerColumnPosition = function (n) { this.columnsByIndex.push(n) }; o.prototype._reIndexColumns = function () { this.columnsByIndex = []; this.columns.forEach(function (n) { n.reRegisterPosition() }) }; o.prototype._verticalAlignHeaders = function () { var n = this, t = 0; n.columns.forEach(function (n) { var i; n.clearVerticalAlign(); (i = n.getHeight()) > t && (t = i) }); n.columns.forEach(function (i) { i.verticalAlign(n.table.options.columnHeaderVertAlign, t) }); n.rowManager.adjustTableSize() }; o.prototype.findColumn = function (n) { var t = this; return "object" != (void 0 === n ? "undefined" : _typeof(n)) ? this.columnsByField[n] || !1 : n instanceof r ? n : n instanceof c ? n._getSelf() || !1 : "undefined" != typeof HTMLElement && n instanceof HTMLElement ? t.columns.find(function (t) { return t.element === n }) || !1 : !1 }; o.prototype.getColumnByField = function (n) { return this.columnsByField[n] }; o.prototype.getColumnsByFieldRoot = function (n) { var i = this, t = []; return Object.keys(this.columnsByField).forEach(function (r) { r.split(".")[0] === n && t.push(i.columnsByField[r]) }), t }; o.prototype.getColumnByIndex = function (n) { return this.columnsByIndex[n] }; o.prototype.getFirstVisibileColumn = function (n) { var n = this.columnsByIndex.findIndex(function (n) { return n.visible }); return n > -1 && this.columnsByIndex[n] }; o.prototype.getColumns = function () { return this.columns }; o.prototype.findColumnIndex = function (n) { return this.columnsByIndex.findIndex(function (t) { return n === t }) }; o.prototype.getRealColumns = function () { return this.columnsByIndex }; o.prototype.traverse = function (n) { this.columnsByIndex.forEach(function (t, i) { n(t, i) }) }; o.prototype.getDefinitions = function (n) { var i = this, t = []; return i.columnsByIndex.forEach(function (i) { (!n || n && i.visible) && t.push(i.getDefinition()) }), t }; o.prototype.getDefinitionTree = function () { var t = this, n = []; return t.columns.forEach(function (t) { n.push(t.getDefinition(!0)) }), n }; o.prototype.getComponents = function (n) { var t = this, i = []; return (n ? t.columns : t.columnsByIndex).forEach(function (n) { i.push(n.getComponent()) }), i }; o.prototype.getWidth = function () { var n = 0; return this.columnsByIndex.forEach(function (t) { t.visible && (n += t.getWidth()) }), n }; o.prototype.moveColumn = function (n, t, i) { this.moveColumnActual(n, t, i); this.table.options.responsiveLayout && this.table.modExists("responsiveLayout", !0) && this.table.modules.responsiveLayout.initialize(); this.table.modExists("columnCalcs") && this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows); t.element.parentNode.insertBefore(n.element, t.element); i && t.element.parentNode.insertBefore(t.element, n.element); this._verticalAlignHeaders(); this.table.rowManager.reinitialize() }; o.prototype.moveColumnActual = function (n, t, i) { n.parent.isGroup ? this._moveColumnInArray(n.parent.columns, n, t, i) : this._moveColumnInArray(this.columns, n, t, i); this._moveColumnInArray(this.columnsByIndex, n, t, i, !0); this.table.options.responsiveLayout && this.table.modExists("responsiveLayout", !0) && this.table.modules.responsiveLayout.initialize(); this.table.options.virtualDomHoz && this.table.vdomHoz.reinitialize(!0); this.table.options.columnMoved && this.table.options.columnMoved.call(this.table, n.getComponent(), this.table.columnManager.getComponents()); this.table.options.persistence && this.table.modExists("persistence", !0) && this.table.modules.persistence.config.columns && this.table.modules.persistence.save("columns") }; o.prototype._moveColumnInArray = function (n, t, i, r, u) { var f, s = this, o = n.indexOf(t), e = []; o > -1 && (n.splice(o, 1), f = n.indexOf(i), f > -1 ? r && (f += 1) : f = o, n.splice(f, 0, t), u && (this.table.options.dataTree && this.table.modExists("dataTree", !0) && this.table.rowManager.rows.forEach(function (n) { e = e.concat(s.table.modules.dataTree.getTreeChildren(n, !1, !0)) }), e = e.concat(this.table.rowManager.rows), e.forEach(function (n) { if (n.cells.length) { var t = n.cells.splice(o, 1)[0]; n.cells.splice(f, 0, t) } }))) }; o.prototype.scrollToColumn = function (n, t, i) { var r = this, u = 0, o = 0, e = 0, f = n.getElement(); return new Promise(function (s, h) { if (void 0 === t && (t = r.table.options.scrollToColumnPosition), void 0 === i && (i = r.table.options.scrollToColumnIfVisible), n.visible) { switch (t) { case "middle": case "center": e = -r.element.clientWidth / 2; break; case "right": e = f.clientWidth - r.headersElement.clientWidth }if (!i && (o = f.offsetLeft) > 0 && o + f.offsetWidth < r.element.clientWidth) return !1; u = f.offsetLeft + e; u = Math.max(Math.min(u, r.table.rowManager.element.scrollWidth - r.table.rowManager.element.clientWidth), 0); r.table.rowManager.scrollHorizontal(u); r.scrollHorizontal(u); s() } else console.warn("Scroll Error - Column not visible"), h("Scroll Error - Column not visible") }) }; o.prototype.generateCells = function (n) { var i = this, t = []; return i.columnsByIndex.forEach(function (i) { t.push(i.generateCell(n)) }), t }; o.prototype.getFlexBaseWidth = function () { var n = this, t = n.table.element.clientWidth, i = 0; return n.rowManager.element.scrollHeight > n.rowManager.element.clientHeight && (t -= n.rowManager.element.offsetWidth - n.rowManager.element.clientWidth), this.columnsByIndex.forEach(function (r) { var u, f, e; r.visible && (u = r.definition.width || 0, f = void 0 === r.minWidth ? n.table.options.columnMinWidth : parseInt(r.minWidth), e = "string" == typeof u ? u.indexOf("%") > -1 ? t / 100 * parseInt(u) : parseInt(u) : u, i += e > f ? e : f) }), i }; o.prototype.addColumn = function (n, t, i) { var r = this; return new Promise(function (u) { var f = r._addColumn(n, t, i); r._reIndexColumns(); r.table.options.responsiveLayout && r.table.modExists("responsiveLayout", !0) && r.table.modules.responsiveLayout.initialize(); r.table.modExists("columnCalcs") && r.table.modules.columnCalcs.recalc(r.table.rowManager.activeRows); r.redraw(); "fitColumns" != r.table.modules.layout.getMode() && f.reinitializeWidth(); r._verticalAlignHeaders(); r.table.rowManager.reinitialize(); r.table.options.virtualDomHoz && r.table.vdomHoz.reinitialize(); u(f) }) }; o.prototype.deregisterColumn = function (n) { var t, i = n.getField(); i && delete this.columnsByField[i]; t = this.columnsByIndex.indexOf(n); t > -1 && this.columnsByIndex.splice(t, 1); t = this.columns.indexOf(n); t > -1 && this.columns.splice(t, 1); this.table.options.responsiveLayout && this.table.modExists("responsiveLayout", !0) && this.table.modules.responsiveLayout.initialize(); this._verticalAlignHeaders(); this.redraw() }; o.prototype.redraw = function (t) { t && (n.prototype.helpers.elVisible(this.element) && this._verticalAlignHeaders(), this.table.rowManager.resetScroll(), this.table.rowManager.reinitialize());["fitColumns", "fitDataStretch"].indexOf(this.table.modules.layout.getMode()) > -1 ? this.table.modules.layout.layout() : t ? this.table.modules.layout.layout() : this.table.options.responsiveLayout && this.table.modExists("responsiveLayout", !0) && this.table.modules.responsiveLayout.update(); this.table.modExists("frozenColumns") && this.table.modules.frozenColumns.layout(); this.table.modExists("columnCalcs") && this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows); t && (this.table.options.persistence && this.table.modExists("persistence", !0) && this.table.modules.persistence.config.columns && this.table.modules.persistence.save("columns"), this.table.modExists("columnCalcs") && this.table.modules.columnCalcs.redraw()); this.table.footerManager.redraw() }; c = function (n) { this._column = n; this.type = "ColumnComponent" }; c.prototype.getElement = function () { return this._column.getElement() }; c.prototype.getDefinition = function () { return this._column.getDefinition() }; c.prototype.getField = function () { return this._column.getField() }; c.prototype.getCells = function () { var n = []; return this._column.cells.forEach(function (t) { n.push(t.getComponent()) }), n }; c.prototype.getVisibility = function () { return console.warn("getVisibility function is deprecated, you should now use the isVisible function"), this._column.visible }; c.prototype.isVisible = function () { return this._column.visible }; c.prototype.show = function () { this._column.isGroup ? this._column.columns.forEach(function (n) { n.show() }) : this._column.show() }; c.prototype.hide = function () { this._column.isGroup ? this._column.columns.forEach(function (n) { n.hide() }) : this._column.hide() }; c.prototype.toggle = function () { this._column.visible ? this.hide() : this.show() }; c.prototype.delete = function () { return this._column.delete() }; c.prototype.getSubColumns = function () { var n = []; return this._column.columns.length && this._column.columns.forEach(function (t) { n.push(t.getComponent()) }), n }; c.prototype.getParentColumn = function () { return this._column.parent instanceof r && this._column.parent.getComponent() }; c.prototype._getSelf = function () { return this._column }; c.prototype.scrollTo = function () { return this._column.table.columnManager.scrollToColumn(this._column) }; c.prototype.getTable = function () { return this._column.table }; c.prototype.headerFilterFocus = function () { this._column.table.modExists("filter", !0) && this._column.table.modules.filter.setHeaderFilterFocus(this._column) }; c.prototype.reloadHeaderFilter = function () { this._column.table.modExists("filter", !0) && this._column.table.modules.filter.reloadHeaderFilter(this._column) }; c.prototype.getHeaderFilterValue = function () { if (this._column.table.modExists("filter", !0)) return this._column.table.modules.filter.getHeaderFilterValue(this._column) }; c.prototype.setHeaderFilterValue = function (n) { this._column.table.modExists("filter", !0) && this._column.table.modules.filter.setHeaderFilterValue(this._column, n) }; c.prototype.move = function (n, t) { var i = this._column.table.columnManager.findColumn(n); i ? this._column.table.columnManager.moveColumn(this._column, i, t) : console.warn("Move Error - No matching column found:", i) }; c.prototype.getNextColumn = function () { var n = this._column.nextColumn(); return !!n && n.getComponent() }; c.prototype.getPrevColumn = function () { var n = this._column.prevColumn(); return !!n && n.getComponent() }; c.prototype.updateDefinition = function (n) { return this._column.updateDefinition(n) }; c.prototype.getWidth = function () { return this._column.getWidth() }; c.prototype.setWidth = function (n) { var t; return t = !0 === n ? this._column.reinitializeWidth(!0) : this._column.setWidth(n), this._column.table.options.virtualDomHoz && this._column.table.vdomHoz.reinitialize(!0), t }; c.prototype.validate = function () { return this._column.validate() }; r = function e(n, t) { var i = this; this.table = t.table; this.definition = n; this.parent = t; this.type = "column"; this.columns = []; this.cells = []; this.element = this.createElement(); this.contentElement = !1; this.titleHolderElement = !1; this.titleElement = !1; this.groupElement = this.createGroupElement(); this.isGroup = !1; this.tooltip = !1; this.hozAlign = ""; this.vertAlign = ""; this.field = ""; this.fieldStructure = ""; this.getFieldValue = ""; this.setFieldValue = ""; this.titleFormatterRendered = !1; this.setField(this.definition.field); this.table.options.invalidOptionWarnings && this.checkDefinition(); this.modules = {}; this.cellEvents = { cellClick: !1, cellDblClick: !1, cellContext: !1, cellTap: !1, cellDblTap: !1, cellTapHold: !1, cellMouseEnter: !1, cellMouseLeave: !1, cellMouseOver: !1, cellMouseOut: !1, cellMouseMove: !1 }; this.width = null; this.widthStyled = ""; this.minWidth = null; this.minWidthStyled = ""; this.widthFixed = !1; this.visible = !0; this.component = null; this._mapDepricatedFunctionality(); n.columns ? (this.isGroup = !0, n.columns.forEach(function (n) { var t = new e(n, i); i.attachColumn(t) }), i.checkColumnVisibility()) : t.registerColumnField(this); n.rowHandle && !1 !== this.table.options.movableRows && this.table.modExists("moveRow") && this.table.modules.moveRow.setHandle(!0); this._buildHeader(); this.bindModuleColumns() }; r.prototype.createElement = function () { var n = document.createElement("div"); return n.classList.add("tabulator-col"), n.setAttribute("role", "columnheader"), n.setAttribute("aria-sort", "none"), n }; r.prototype.createGroupElement = function () { var n = document.createElement("div"); return n.classList.add("tabulator-col-group-cols"), n }; r.prototype.checkDefinition = function () { var n = this; Object.keys(this.definition).forEach(function (t) { -1 === n.defaultOptionList.indexOf(t) && console.warn("Invalid column definition option in '" + (n.field || n.definition.title) + "' column:", t) }) }; r.prototype.setField = function (n) { this.field = n; this.fieldStructure = n ? this.table.options.nestedFieldSeparator ? n.split(this.table.options.nestedFieldSeparator) : [n] : []; this.getFieldValue = this.fieldStructure.length > 1 ? this._getNestedData : this._getFlatData; this.setFieldValue = this.fieldStructure.length > 1 ? this._setNestedData : this._setFlatData }; r.prototype.registerColumnPosition = function (n) { this.parent.registerColumnPosition(n) }; r.prototype.registerColumnField = function (n) { this.parent.registerColumnField(n) }; r.prototype.reRegisterPosition = function () { this.isGroup ? this.columns.forEach(function (n) { n.reRegisterPosition() }) : this.registerColumnPosition(this) }; r.prototype._mapDepricatedFunctionality = function () { void 0 !== this.definition.hideInHtml && (this.definition.htmlOutput = !this.definition.hideInHtml, console.warn("hideInHtml column definition property is deprecated, you should now use htmlOutput")); void 0 !== this.definition.align && (this.definition.hozAlign = this.definition.align, console.warn("align column definition property is deprecated, you should now use hozAlign")); void 0 !== this.definition.downloadTitle && (this.definition.titleDownload = this.definition.downloadTitle, console.warn("downloadTitle definition property is deprecated, you should now use titleDownload")) }; r.prototype.setTooltip = function () { var n = this, t = n.definition, i = t.headerTooltip || !1 === t.tooltip ? t.headerTooltip : n.table.options.tooltipsHeader; i ? !0 === i ? t.field ? n.table.modules.localize.bind("columns|" + t.field, function (i) { n.element.setAttribute("title", i || t.title) }) : n.element.setAttribute("title", t.title) : ("function" == typeof i && !1 === (i = i(n.getComponent())) && (i = ""), n.element.setAttribute("title", i)) : n.element.setAttribute("title", "") }; r.prototype._buildHeader = function () { for (var n = this, t = n.definition; n.element.firstChild;)n.element.removeChild(n.element.firstChild); t.headerVertical && (n.element.classList.add("tabulator-col-vertical"), "flip" === t.headerVertical && n.element.classList.add("tabulator-col-vertical-flip")); n.contentElement = n._bindEvents(); n.contentElement = n._buildColumnHeaderContent(); n.element.appendChild(n.contentElement); n.isGroup ? n._buildGroupHeader() : n._buildColumnHeader(); n.setTooltip(); n.table.options.resizableColumns && n.table.modExists("resizeColumns") && n.table.modules.resizeColumns.initializeColumn("header", n, n.element); t.headerFilter && n.table.modExists("filter") && n.table.modExists("edit") && (void 0 !== t.headerFilterPlaceholder && t.field && n.table.modules.localize.setHeaderFilterColumnPlaceholder(t.field, t.headerFilterPlaceholder), n.table.modules.filter.initializeColumn(n)); n.table.modExists("frozenColumns") && n.table.modules.frozenColumns.initializeColumn(n); n.table.options.movableColumns && !n.isGroup && n.table.modExists("moveColumn") && n.table.modules.moveColumn.initializeColumn(n); (t.topCalc || t.bottomCalc) && n.table.modExists("columnCalcs") && n.table.modules.columnCalcs.initializeColumn(n); n.table.modExists("persistence") && n.table.modules.persistence.config.columns && n.table.modules.persistence.initializeColumn(n); n.element.addEventListener("mouseenter", function () { n.setTooltip() }) }; r.prototype._bindEvents = function () { var i, r, u, t = this, n = t.definition; "function" == typeof n.headerClick && t.element.addEventListener("click", function (i) { n.headerClick(i, t.getComponent()) }); "function" == typeof n.headerDblClick && t.element.addEventListener("dblclick", function (i) { n.headerDblClick(i, t.getComponent()) }); "function" == typeof n.headerContext && t.element.addEventListener("contextmenu", function (i) { n.headerContext(i, t.getComponent()) }); "function" == typeof n.headerTap && (u = !1, t.element.addEventListener("touchstart", function () { u = !0 }, { passive: !0 }), t.element.addEventListener("touchend", function (i) { u && n.headerTap(i, t.getComponent()); u = !1 })); "function" == typeof n.headerDblTap && (i = null, t.element.addEventListener("touchend", function (r) { i ? (clearTimeout(i), i = null, n.headerDblTap(r, t.getComponent())) : i = setTimeout(function () { clearTimeout(i); i = null }, 300) })); "function" == typeof n.headerTapHold && (r = null, t.element.addEventListener("touchstart", function (i) { clearTimeout(r); r = setTimeout(function () { clearTimeout(r); r = null; u = !1; n.headerTapHold(i, t.getComponent()) }, 1e3) }, { passive: !0 }), t.element.addEventListener("touchend", function () { clearTimeout(r); r = null })); "function" == typeof n.cellClick && (t.cellEvents.cellClick = n.cellClick); "function" == typeof n.cellDblClick && (t.cellEvents.cellDblClick = n.cellDblClick); "function" == typeof n.cellContext && (t.cellEvents.cellContext = n.cellContext); "function" == typeof n.cellMouseEnter && (t.cellEvents.cellMouseEnter = n.cellMouseEnter); "function" == typeof n.cellMouseLeave && (t.cellEvents.cellMouseLeave = n.cellMouseLeave); "function" == typeof n.cellMouseOver && (t.cellEvents.cellMouseOver = n.cellMouseOver); "function" == typeof n.cellMouseOut && (t.cellEvents.cellMouseOut = n.cellMouseOut); "function" == typeof n.cellMouseMove && (t.cellEvents.cellMouseMove = n.cellMouseMove); "function" == typeof n.cellTap && (t.cellEvents.cellTap = n.cellTap); "function" == typeof n.cellDblTap && (t.cellEvents.cellDblTap = n.cellDblTap); "function" == typeof n.cellTapHold && (t.cellEvents.cellTapHold = n.cellTapHold); "function" == typeof n.cellEdited && (t.cellEvents.cellEdited = n.cellEdited); "function" == typeof n.cellEditing && (t.cellEvents.cellEditing = n.cellEditing); "function" == typeof n.cellEditCancelled && (t.cellEvents.cellEditCancelled = n.cellEditCancelled) }; r.prototype._buildColumnHeader = function () { var i = this, t = this.definition, n = this.table; (n.modExists("sort") && n.modules.sort.initializeColumn(this, this.titleHolderElement), (t.headerContextMenu || t.headerClickMenu || t.headerMenu) && n.modExists("menu") && n.modules.menu.initializeColumnHeader(this), n.modExists("format") && n.modules.format.initializeColumn(this), void 0 !== t.editor && n.modExists("edit") && n.modules.edit.initializeColumn(this), void 0 !== t.validator && n.modExists("validate") && n.modules.validate.initializeColumn(this), n.modExists("mutator") && n.modules.mutator.initializeColumn(this), n.modExists("accessor") && n.modules.accessor.initializeColumn(this), _typeof(n.options.responsiveLayout) && n.modExists("responsiveLayout") && n.modules.responsiveLayout.initializeColumn(this), void 0 !== t.visible && (t.visible ? this.show(!0) : this.hide(!0)), t.cssClass) && t.cssClass.split(" ").forEach(function (n) { i.element.classList.add(n) }); t.field && this.element.setAttribute("tabulator-field", t.field); this.setMinWidth(void 0 === t.minWidth ? this.table.options.columnMinWidth : parseInt(t.minWidth)); this.reinitializeWidth(); this.tooltip = this.definition.tooltip || !1 === this.definition.tooltip ? this.definition.tooltip : this.table.options.tooltips; this.hozAlign = void 0 === this.definition.hozAlign ? this.table.options.cellHozAlign : this.definition.hozAlign; this.vertAlign = void 0 === this.definition.vertAlign ? this.table.options.cellVertAlign : this.definition.vertAlign; this.titleElement.style.textAlign = this.definition.headerHozAlign || this.table.options.headerHozAlign }; r.prototype._buildColumnHeaderContent = function () { var n = (this.definition, this.table, document.createElement("div")); return n.classList.add("tabulator-col-content"), this.titleHolderElement = document.createElement("div"), this.titleHolderElement.classList.add("tabulator-col-title-holder"), n.appendChild(this.titleHolderElement), this.titleElement = this._buildColumnHeaderTitle(), this.titleHolderElement.appendChild(this.titleElement), n }; r.prototype._buildColumnHeaderTitle = function () { var i = this, n = i.definition, u = i.table, r = document.createElement("div"), t; return (r.classList.add("tabulator-col-title"), n.editableTitle) ? (t = document.createElement("input"), t.classList.add("tabulator-title-editor"), t.addEventListener("click", function (n) { n.stopPropagation(); t.focus() }), t.addEventListener("change", function () { n.title = t.value; u.options.columnTitleChanged.call(i.table, i.getComponent()) }), r.appendChild(t), n.field ? u.modules.localize.bind("columns|" + n.field, function (i) { t.value = i || n.title || "&nbsp;" }) : t.value = n.title || "&nbsp;") : n.field ? u.modules.localize.bind("columns|" + n.field, function (t) { i._formatColumnHeaderTitle(r, t || n.title || "&nbsp;") }) : i._formatColumnHeaderTitle(r, n.title || "&nbsp;"), r }; r.prototype._formatColumnHeaderTitle = function (n, t) { var u, i, r, f, e, o = this; if (this.definition.titleFormatter && this.table.modExists("format")) switch (u = this.table.modules.format.getFormatter(this.definition.titleFormatter), e = function (n) { o.titleFormatterRendered = n }, f = { getValue: function () { return t }, getElement: function () { return n } }, r = this.definition.titleFormatterParams || {}, r = "function" == typeof r ? r() : r, i = u.call(this.table.modules.format, f, r, e), void 0 === i ? "undefined" : _typeof(i)) { case "object": i instanceof Node ? n.appendChild(i) : (n.innerHTML = "", console.warn("Format Error - Title formatter has returned a type of object, the only valid formatter object return is an instance of Node, the formatter returned:", i)); break; case "undefined": case "null": n.innerHTML = ""; break; default: n.innerHTML = i } else n.innerHTML = t }; r.prototype._buildGroupHeader = function () { var n = this; (this.element.classList.add("tabulator-col-group"), this.element.setAttribute("role", "columngroup"), this.element.setAttribute("aria-title", this.definition.title), this.definition.cssClass) && this.definition.cssClass.split(" ").forEach(function (t) { n.element.classList.add(t) }); (this.definition.headerContextMenu || this.definition.headerMenu) && this.table.modExists("menu") && this.table.modules.menu.initializeColumnHeader(this); this.element.appendChild(this.groupElement) }; r.prototype._getFlatData = function (n) { return n[this.field] }; r.prototype._getNestedData = function (n) { for (var r, t = n, u = this.fieldStructure, f = u.length, i = 0; i < f && (t = t[u[i]], r = t, t); i++); return r }; r.prototype._setFlatData = function (n, t) { this.field && (n[this.field] = t) }; r.prototype._setNestedData = function (n, t) { for (var r = n, u = this.fieldStructure, f = u.length, i = 0; i < f; i++)if (i == f - 1) r[u[i]] = t; else { if (!r[u[i]]) { if (void 0 === t) break; r[u[i]] = {} } r = r[u[i]] } }; r.prototype.attachColumn = function (n) { var t = this; t.groupElement ? (t.columns.push(n), t.groupElement.appendChild(n.getElement())) : console.warn("Column Warning - Column being attached to another column instead of column group") }; r.prototype.verticalAlign = function (n, t) { var i = this.parent.isGroup ? this.parent.getGroupElement().clientHeight : t || this.parent.getHeadersElement().clientHeight; this.element.style.height = i + "px"; this.isGroup && (this.groupElement.style.minHeight = i - this.contentElement.offsetHeight + "px"); this.isGroup || "top" === n || (this.element.style.paddingTop = "bottom" === n ? this.element.clientHeight - this.contentElement.offsetHeight + "px" : (this.element.clientHeight - this.contentElement.offsetHeight) / 2 + "px"); this.columns.forEach(function (t) { t.verticalAlign(n) }) }; r.prototype.clearVerticalAlign = function () { this.element.style.paddingTop = ""; this.element.style.height = ""; this.element.style.minHeight = ""; this.groupElement.style.minHeight = ""; this.columns.forEach(function (n) { n.clearVerticalAlign() }) }; r.prototype.bindModuleColumns = function () { "rownum" == this.definition.formatter && (this.table.rowManager.rowNumColumn = this) }; r.prototype.getElement = function () { return this.element }; r.prototype.getGroupElement = function () { return this.groupElement }; r.prototype.getField = function () { return this.field }; r.prototype.getFirstColumn = function () { return this.isGroup ? !!this.columns.length && this.columns[0].getFirstColumn() : this }; r.prototype.getLastColumn = function () { return this.isGroup ? !!this.columns.length && this.columns[this.columns.length - 1].getLastColumn() : this }; r.prototype.getColumns = function () { return this.columns }; r.prototype.getCells = function () { return this.cells }; r.prototype.getTopColumn = function () { return this.parent.isGroup ? this.parent.getTopColumn() : this }; r.prototype.getDefinition = function (n) { var t = []; return this.isGroup && n && (this.columns.forEach(function (n) { t.push(n.getDefinition(!0)) }), this.definition.columns = t), this.definition }; r.prototype.checkColumnVisibility = function () { var n = !1; this.columns.forEach(function (t) { t.visible && (n = !0) }); n ? (this.show(), this.parent.table.options.columnVisibilityChanged.call(this.table, this.getComponent(), !1)) : this.hide() }; r.prototype.show = function (n, t) { this.visible || (this.visible = !0, this.element.style.display = "", this.parent.isGroup && this.parent.checkColumnVisibility(), this.cells.forEach(function (n) { n.show() }), this.isGroup || null !== this.width || this.reinitializeWidth(), this.table.columnManager._verticalAlignHeaders(), this.table.options.persistence && this.table.modExists("persistence", !0) && this.table.modules.persistence.config.columns && this.table.modules.persistence.save("columns"), !t && this.table.options.responsiveLayout && this.table.modExists("responsiveLayout", !0) && this.table.modules.responsiveLayout.updateColumnVisibility(this, this.visible), n || this.table.options.columnVisibilityChanged.call(this.table, this.getComponent(), !0), this.parent.isGroup && this.parent.matchChildWidths()) }; r.prototype.hide = function (n, t) { this.visible && (this.visible = !1, this.element.style.display = "none", this.table.columnManager._verticalAlignHeaders(), this.parent.isGroup && this.parent.checkColumnVisibility(), this.cells.forEach(function (n) { n.hide() }), this.table.options.persistence && this.table.modExists("persistence", !0) && this.table.modules.persistence.config.columns && this.table.modules.persistence.save("columns"), !t && this.table.options.responsiveLayout && this.table.modExists("responsiveLayout", !0) && this.table.modules.responsiveLayout.updateColumnVisibility(this, this.visible), n || this.table.options.columnVisibilityChanged.call(this.table, this.getComponent(), !1), this.parent.isGroup && this.parent.matchChildWidths()) }; r.prototype.matchChildWidths = function () { var n = 0; this.contentElement && this.columns.length && (this.columns.forEach(function (t) { t.visible && (n += t.getWidth()) }), this.contentElement.style.maxWidth = n - 1 + "px", this.parent.isGroup && this.parent.matchChildWidths()) }; r.prototype.setWidth = function (n) { this.widthFixed = !0; this.setWidthActual(n) }; r.prototype.setWidthActual = function (n) { isNaN(n) && (n = Math.floor(this.table.element.clientWidth / 100 * parseInt(n))); n = Math.max(this.minWidth, n); this.width = n; this.widthStyled = n ? n + "px" : ""; this.element.style.width = this.widthStyled; this.isGroup || this.cells.forEach(function (n) { n.setWidth() }); this.parent.isGroup && this.parent.matchChildWidths(); this.table.modExists("frozenColumns") && this.table.modules.frozenColumns.layout() }; r.prototype.checkCellHeights = function () { var n = []; this.cells.forEach(function (t) { t.row.heightInitialized && (null !== t.row.getElement().offsetParent ? (n.push(t.row), t.row.clearCellHeight()) : t.row.heightInitialized = !1) }); n.forEach(function (n) { n.calcHeight() }); n.forEach(function (n) { n.setCellHeight() }) }; r.prototype.getWidth = function () { var n = 0; return this.isGroup ? this.columns.forEach(function (t) { t.visible && (n += t.getWidth()) }) : n = this.width, n }; r.prototype.getHeight = function () { return this.element.offsetHeight }; r.prototype.setMinWidth = function (n) { this.minWidth = n; this.minWidthStyled = n ? n + "px" : ""; this.element.style.minWidth = this.minWidthStyled; this.cells.forEach(function (n) { n.setMinWidth() }) }; r.prototype.delete = function () { var n = this; return new Promise(function (t) { n.isGroup && n.columns.forEach(function (n) { n.delete() }); n.table.modExists("edit") && n.table.modules.edit.currentCell.column === n && n.table.modules.edit.cancelEdit(); for (var r = n.cells.length, i = 0; i < r; i++)n.cells[0].delete(); n.element.parentNode && n.element.parentNode.removeChild(n.element); n.element = !1; n.contentElement = !1; n.titleElement = !1; n.groupElement = !1; n.table.columnManager.deregisterColumn(n); n.table.options.virtualDomHoz && n.table.vdomHoz.reinitialize(!0); t() }) }; r.prototype.columnRendered = function () { this.titleFormatterRendered && this.titleFormatterRendered() }; r.prototype.validate = function () { var n = []; return this.cells.forEach(function (t) { t.validate() || n.push(t.getComponent()) }), !n.length || n }; r.prototype.generateCell = function (n) { var i = this, t = new h(i, n); return this.cells.push(t), t }; r.prototype.nextColumn = function () { var n = this.table.columnManager.findColumnIndex(this); return n > -1 && this._nextVisibleColumn(n + 1) }; r.prototype._nextVisibleColumn = function (n) { var t = this.table.columnManager.getColumnByIndex(n); return !t || t.visible ? t : this._nextVisibleColumn(n + 1) }; r.prototype.prevColumn = function () { var n = this.table.columnManager.findColumnIndex(this); return n > -1 && this._prevVisibleColumn(n - 1) }; r.prototype._prevVisibleColumn = function (n) { var t = this.table.columnManager.getColumnByIndex(n); return !t || t.visible ? t : this._prevVisibleColumn(n - 1) }; r.prototype.reinitializeWidth = function (n) { this.widthFixed = !1; void 0 === this.definition.width || n || this.setWidth(this.definition.width); this.table.modExists("filter") && this.table.modules.filter.hideHeaderFilterElements(); this.fitToData(); this.table.modExists("filter") && this.table.modules.filter.showHeaderFilterElements() }; r.prototype.fitToData = function () { var t = this, n; this.widthFixed || (this.element.style.width = "", t.cells.forEach(function (n) { n.clearWidth() })); n = this.element.offsetWidth; t.width && this.widthFixed || (t.cells.forEach(function (t) { var i = t.getWidth(); i > n && (n = i) }), n && t.setWidthActual(n + 1)) }; r.prototype.updateDefinition = function (n) { var t = this; return new Promise(function (i, r) { var u; t.isGroup ? (console.warn("Column Update Error - The updateDefinition function is only available on columns, not column groups"), r("Column Update Error - The updateDefinition function is only available on columns, not column groups")) : (u = Object.assign({}, t.getDefinition()), u = Object.assign(u, n), t.table.columnManager.addColumn(u, !1, t).then(function (n) { u.field == t.field && (t.field = !1); t.delete().then(function () { i(n.getComponent()) }).catch(function (n) { r(n) }) }).catch(function (n) { r(n) })) }) }; r.prototype.deleteCell = function (n) { var t = this.cells.indexOf(n); t > -1 && this.cells.splice(t, 1) }; r.prototype.defaultOptionList = ["title", "field", "columns", "visible", "align", "hozAlign", "vertAlign", "width", "minWidth", "widthGrow", "widthShrink", "resizable", "frozen", "responsive", "tooltip", "cssClass", "rowHandle", "hideInHtml", "print", "htmlOutput", "sorter", "sorterParams", "formatter", "formatterParams", "variableHeight", "editable", "editor", "editorParams", "validator", "mutator", "mutatorParams", "mutatorData", "mutatorDataParams", "mutatorEdit", "mutatorEditParams", "mutatorClipboard", "mutatorClipboardParams", "accessor", "accessorParams", "accessorData", "accessorDataParams", "accessorDownload", "accessorDownloadParams", "accessorClipboard", "accessorClipboardParams", "accessorPrint", "accessorPrintParams", "accessorHtmlOutput", "accessorHtmlOutputParams", "clipboard", "download", "downloadTitle", "topCalc", "topCalcParams", "topCalcFormatter", "topCalcFormatterParams", "bottomCalc", "bottomCalcParams", "bottomCalcFormatter", "bottomCalcFormatterParams", "cellClick", "cellDblClick", "cellContext", "cellTap", "cellDblTap", "cellTapHold", "cellMouseEnter", "cellMouseLeave", "cellMouseOver", "cellMouseOut", "cellMouseMove", "cellEditing", "cellEdited", "cellEditCancelled", "headerSort", "headerSortStartingDir", "headerSortTristate", "headerClick", "headerDblClick", "headerContext", "headerTap", "headerDblTap", "headerTapHold", "headerTooltip", "headerVertical", "headerHozAlign", "editableTitle", "titleFormatter", "titleFormatterParams", "headerFilter", "headerFilterPlaceholder", "headerFilterParams", "headerFilterEmptyCheck", "headerFilterFunc", "headerFilterFuncParams", "headerFilterLiveFilter", "print", "headerContextMenu", "headerMenu", "contextMenu", "clickMenu", "formatterPrint", "formatterPrintParams", "formatterClipboard", "formatterClipboardParams", "formatterHtmlOutput", "formatterHtmlOutputParams", "titlePrint", "titleClipboard", "titleHtmlOutput", "titleDownload"]; r.prototype.getComponent = function () { return this.component || (this.component = new c(this)), this.component }; t = function (n) { this.table = n; this.element = this.createHolderElement(); this.tableElement = this.createTableElement(); this.heightFixer = this.createTableElement(); this.columnManager = null; this.height = 0; this.firstRender = !1; this.renderMode = "virtual"; this.fixedHeight = !1; this.rows = []; this.activeRows = []; this.activeRowsCount = 0; this.displayRows = []; this.displayRowsCount = 0; this.scrollTop = 0; this.scrollLeft = 0; this.vDomRowHeight = 20; this.vDomTop = 0; this.vDomBottom = 0; this.vDomScrollPosTop = 0; this.vDomScrollPosBottom = 0; this.vDomTopPad = 0; this.vDomBottomPad = 0; this.vDomMaxRenderChain = 90; this.vDomWindowBuffer = 0; this.vDomWindowMinTotalRows = 20; this.vDomWindowMinMarginRows = 5; this.vDomTopNewRows = []; this.vDomBottomNewRows = []; this.rowNumColumn = !1; this.redrawBlock = !1; this.redrawBlockRestoreConfig = !1; this.redrawBlockRederInPosition = !1 }; t.prototype.createHolderElement = function () { var n = document.createElement("div"); return n.classList.add("tabulator-tableHolder"), n.setAttribute("tabindex", 0), n }; t.prototype.createTableElement = function () { var n = document.createElement("div"); return n.classList.add("tabulator-table"), n }; t.prototype.getElement = function () { return this.element }; t.prototype.getTableElement = function () { return this.tableElement }; t.prototype.getRowPosition = function (n, t) { return t ? this.activeRows.indexOf(n) : this.rows.indexOf(n) }; t.prototype.setColumnManager = function (n) { this.columnManager = n }; t.prototype.initialize = function () { var n = this; n.setRenderMode(); n.element.appendChild(n.tableElement); n.firstRender = !0; n.element.addEventListener("scroll", function () { var t = n.element.scrollLeft; n.scrollLeft != t && (n.columnManager.scrollHorizontal(t), n.table.options.groupBy && n.table.modules.groupRows.scrollHeaders(t), n.table.modExists("columnCalcs") && n.table.modules.columnCalcs.scrollHorizontal(t), n.table.options.scrollHorizontal(t)); n.scrollLeft = t }); "virtual" === this.renderMode && n.element.addEventListener("scroll", function () { var t = n.element.scrollTop, i = n.scrollTop > t; n.scrollTop != t ? (n.scrollTop = t, n.scrollVertical(i), "scroll" == n.table.options.ajaxProgressiveLoad && n.table.modules.ajax.nextPage(n.element.scrollHeight - n.element.clientHeight - t), n.table.options.scrollVertical(t)) : n.scrollTop = t }) }; t.prototype.findRow = function (n) { var t = this; return "object" != (void 0 === n ? "undefined" : _typeof(n)) ? void 0 === n || null === n ? !1 : t.rows.find(function (i) { return i.data[t.table.options.index] == n }) || !1 : n instanceof u ? n : n instanceof s ? n._getSelf() || !1 : "undefined" != typeof HTMLElement && n instanceof HTMLElement ? t.rows.find(function (t) { return t.element === n }) || !1 : !1 }; t.prototype.getRowFromDataObject = function (n) { return this.rows.find(function (t) { return t.data === n }) || !1 }; t.prototype.getRowFromPosition = function (n, t) { return t ? this.activeRows[n] : this.rows[n] }; t.prototype.scrollToRow = function (t, i, r) { var o, u = this, e = this.getDisplayRows().indexOf(t), f = t.getElement(), s = 0; return new Promise(function (t, h) { if (e > -1) { if (void 0 === i && (i = u.table.options.scrollToRowPosition), void 0 === r && (r = u.table.options.scrollToRowIfVisible), "nearest" === i) switch (u.renderMode) { case "classic": o = n.prototype.helpers.elOffset(f).top; i = Math.abs(u.element.scrollTop - o) > Math.abs(u.element.scrollTop + u.element.clientHeight - o) ? "bottom" : "top"; break; case "virtual": i = Math.abs(u.vDomTop - e) > Math.abs(u.vDomBottom - e) ? "bottom" : "top" }if (!r && n.prototype.helpers.elVisible(f) && (s = n.prototype.helpers.elOffset(f).top - n.prototype.helpers.elOffset(u.element).top) > 0 && s < u.element.clientHeight - f.offsetHeight) return !1; switch (u.renderMode) { case "classic": u.element.scrollTop = n.prototype.helpers.elOffset(f).top - n.prototype.helpers.elOffset(u.element).top + u.element.scrollTop; break; case "virtual": u._virtualRenderFill(e, !0) }switch (i) { case "middle": case "center": u.element.scrollTop = u.element.scrollHeight - u.element.scrollTop == u.element.clientHeight ? u.element.scrollTop + (f.offsetTop - u.element.scrollTop) - (u.element.scrollHeight - f.offsetTop) / 2 : u.element.scrollTop - u.element.clientHeight / 2; break; case "bottom": u.element.scrollTop = u.element.scrollHeight - u.element.scrollTop == u.element.clientHeight ? u.element.scrollTop - (u.element.scrollHeight - f.offsetTop) + f.offsetHeight : u.element.scrollTop - u.element.clientHeight + f.offsetHeight }t() } else console.warn("Scroll Error - Row not visible"), h("Scroll Error - Row not visible") }) }; t.prototype.setData = function (n, t, i) { var r = this, u = this; return new Promise(function (f) { t && r.getDisplayRows().length ? u.table.options.pagination ? u._setDataActual(n, !0) : r.reRenderInPosition(function () { u._setDataActual(n) }) : (r.table.options.autoColumns && i && r.table.columnManager.generateColumnsFromRowData(n), r.resetScroll(), r._setDataActual(n)); f() }) }; t.prototype._setDataActual = function (n, t) { var i = this; i.table.options.dataLoading.call(this.table, n); this._wipeElements(); this.table.options.history && this.table.modExists("history") && this.table.modules.history.clear(); Array.isArray(n) ? (this.table.modExists("selectRow") && this.table.modules.selectRow.clearSelectionData(), this.table.options.reactiveData && this.table.modExists("reactiveData", !0) && this.table.modules.reactiveData.watchData(n), n.forEach(function (n) { if (n && "object" === (void 0 === n ? "undefined" : _typeof(n))) { var t = new u(n, i); i.rows.push(t) } else console.warn("Data Loading Warning - Invalid row data detected and ignored, expecting object but received:", n) }), i.refreshActiveData(!1, !1, t), i.table.options.dataLoaded.call(this.table, n)) : console.error("Data Loading Error - Unable to process data due to invalid data type \nExpecting: array \nReceived: ", void 0 === n ? "undefined" : _typeof(n), "\nData: ", n) }; t.prototype._wipeElements = function () { this.rows.forEach(function (n) { n.wipe() }); this.table.options.groupBy && this.table.modExists("groupRows") && this.table.modules.groupRows.wipe(); this.rows = []; this.activeRows = []; this.activeRowsCount = 0; this.displayRows = []; this.displayRowsCount = 0; this.adjustTableSize() }; t.prototype.deleteRow = function (n, t) { var i = this.rows.indexOf(n), r = this.activeRows.indexOf(n); r > -1 && this.activeRows.splice(r, 1); i > -1 && this.rows.splice(i, 1); this.setActiveRows(this.activeRows); this.displayRowIterator(function (t) { var i = t.indexOf(n); i > -1 && t.splice(i, 1) }); t || this.reRenderInPosition(); this.regenerateRowNumbers(); this.table.options.rowDeleted.call(this.table, n.getComponent()); this.table.options.dataChanged && this.table.options.dataChanged.call(this.table, this.getData()); this.table.options.groupBy && this.table.modExists("groupRows") ? this.table.modules.groupRows.updateGroupRows(!0) : this.table.options.pagination && this.table.modExists("page") ? this.refreshActiveData(!1, !1, !0) : this.table.options.pagination && this.table.modExists("page") && this.refreshActiveData("page") }; t.prototype.addRow = function (n, t, i, r) { var u = this.addRowActual(n, t, i, r); return this.table.options.history && this.table.modExists("history") && this.table.modules.history.action("rowAdd", u, { data: n, pos: t, index: i }), u }; t.prototype.addRows = function (n, t, i) { var r = this, f = this, e = 0, u = []; return new Promise(function (o) { t = r.findAddRowPos(t); Array.isArray(n) || (n = [n]); e = n.length - 1; (void 0 === i && t || void 0 !== i && !t) && n.reverse(); n.forEach(function (n) { var r = f.addRow(n, t, i, !0); u.push(r) }); r.table.options.groupBy && r.table.modExists("groupRows") ? r.table.modules.groupRows.updateGroupRows(!0) : r.table.options.pagination && r.table.modExists("page") ? r.refreshActiveData(!1, !1, !0) : r.reRenderInPosition(); r.table.modExists("columnCalcs") && r.table.modules.columnCalcs.recalc(r.table.rowManager.activeRows); r.regenerateRowNumbers(); o(u) }) }; t.prototype.findAddRowPos = function (n) { return void 0 === n && (n = this.table.options.addRowPos), "pos" === n && (n = !0), "bottom" === n && (n = !1), n }; t.prototype.addRowActual = function (n, t, i, r) { var h, s, f = n instanceof u ? n : new u(n || {}, this), e = this.findAddRowPos(t), c = -1, o; return (!i && this.table.options.pagination && "page" == this.table.options.paginationAddRow && (s = this.getDisplayRows(), e ? s.length ? i = s[0] : this.activeRows.length && (i = this.activeRows[this.activeRows.length - 1], e = !1) : s.length && (i = s[s.length - 1], e = !(s.length < this.table.modules.page.getPageSize()))), void 0 !== i && (i = this.findRow(i)), this.table.options.groupBy && this.table.modExists("groupRows")) && (this.table.modules.groupRows.assignRowToGroup(f), o = f.getGroup().rows, o.length > 1 && (!i || i && -1 == o.indexOf(i) ? e ? o[0] !== f && (i = o[0], this._moveRowInArray(f.getGroup().rows, f, i, !e)) : o[o.length - 1] !== f && (i = o[o.length - 1], this._moveRowInArray(f.getGroup().rows, f, i, !e)) : this._moveRowInArray(f.getGroup().rows, f, i, !e))), i && (c = this.rows.indexOf(i)), i && c > -1 ? (h = this.activeRows.indexOf(i), this.displayRowIterator(function (n) { var t = n.indexOf(i); t > -1 && n.splice(e ? t : t + 1, 0, f) }), h > -1 && this.activeRows.splice(e ? h : h + 1, 0, f), this.rows.splice(e ? c : c + 1, 0, f)) : e ? (this.displayRowIterator(function (n) { n.unshift(f) }), this.activeRows.unshift(f), this.rows.unshift(f)) : (this.displayRowIterator(function (n) { n.push(f) }), this.activeRows.push(f), this.rows.push(f)), this.setActiveRows(this.activeRows), this.table.options.rowAdded.call(this.table, f.getComponent()), this.table.options.dataChanged && this.table.options.dataChanged.call(this.table, this.getData()), r || this.reRenderInPosition(), f }; t.prototype.moveRow = function (n, t, i) { this.table.options.history && this.table.modExists("history") && this.table.modules.history.action("rowMove", n, { posFrom: this.getRowPosition(n), posTo: this.getRowPosition(t), to: t, after: i }); this.moveRowActual(n, t, i); this.regenerateRowNumbers(); this.table.options.rowMoved.call(this.table, n.getComponent()) }; t.prototype.moveRowActual = function (n, t, i) { var e = this, r, u; (this._moveRowInArray(this.rows, n, t, i), this._moveRowInArray(this.activeRows, n, t, i), this.displayRowIterator(function (r) { e._moveRowInArray(r, n, t, i) }), this.table.options.groupBy && this.table.modExists("groupRows")) && (!i && t instanceof f && (t = this.table.rowManager.prevDisplayRow(n) || t), r = t.getGroup(), u = n.getGroup(), r === u ? this._moveRowInArray(r.rows, n, t, i) : (u && u.removeRow(n), r.insertRow(n, t, i))) }; t.prototype._moveRowInArray = function (n, t, i, r) { var u, f, o, s, e; if (t !== i && (u = n.indexOf(t), u > -1 && (n.splice(u, 1), f = n.indexOf(i), f > -1 ? r ? n.splice(f + 1, 0, t) : n.splice(f, 0, t) : n.splice(u, 0, t)), n === this.getDisplayRows())) for (o = u < f ? u : f, s = f > u ? f : u + 1, e = o; e <= s; e++)n[e] && this.styleRow(n[e], e) }; t.prototype.clearData = function () { this.setData([]) }; t.prototype.getRowIndex = function (n) { return this.findRowIndex(n, this.rows) }; t.prototype.getDisplayRowIndex = function (n) { var t = this.getDisplayRows().indexOf(n); return t > -1 && t }; t.prototype.nextDisplayRow = function (n, t) { var r = this.getDisplayRowIndex(n), i = !1; return !1 !== r && r < this.displayRowsCount - 1 && (i = this.getDisplayRows()[r + 1]), !i || i instanceof u && "row" == i.type ? i : this.nextDisplayRow(i, t) }; t.prototype.prevDisplayRow = function (n, t) { var r = this.getDisplayRowIndex(n), i = !1; return r && (i = this.getDisplayRows()[r - 1]), !t || !i || i instanceof u && "row" == i.type ? i : this.prevDisplayRow(i, t) }; t.prototype.findRowIndex = function (n, t) { var i; return !!((n = this.findRow(n)) && (i = t.indexOf(n)) > -1) && i }; t.prototype.getData = function (n, t) { var i = []; return this.getRows(n).forEach(function (n) { "row" == n.type && i.push(n.getData(t || "data")) }), i }; t.prototype.getComponents = function (n) { var t = []; return this.getRows(n).forEach(function (n) { t.push(n.getComponent()) }), t }; t.prototype.getDataCount = function (n) { return this.getRows(n).length }; t.prototype._genRemoteRequest = function () { var f = this, n = this.table, r = n.options, t = {}, i, u; n.modExists("page") && (r.ajaxSorting && (i = this.table.modules.sort.getSort(), i.forEach(function (n) { delete n.column }), t[this.table.modules.page.paginationDataSentNames.sorters] = i), r.ajaxFiltering && (u = this.table.modules.filter.getFilters(!0, !0), t[this.table.modules.page.paginationDataSentNames.filters] = u), this.table.modules.ajax.setParams(t, !0)); n.modules.ajax.sendRequest().then(function (n) { f._setDataActual(n, !0) }).catch(function () { }) }; t.prototype.filterRefresh = function () { var n = this.table, t = n.options, i = this.scrollLeft; t.ajaxFiltering ? "remote" == t.pagination && n.modExists("page") ? (n.modules.page.reset(!0), n.modules.page.setPage(1).then(function () { }).catch(function () { })) : t.ajaxProgressiveLoad ? n.modules.ajax.loadData().then(function () { }).catch(function () { }) : this._genRemoteRequest() : this.refreshActiveData("filter"); this.scrollHorizontal(i) }; t.prototype.sorterRefresh = function (n) { var t = this.table, i = this.table.options, r = this.scrollLeft; i.ajaxSorting ? ("remote" == i.pagination || i.progressiveLoad) && t.modExists("page") ? (t.modules.page.reset(!0), t.modules.page.setPage(1).then(function () { }).catch(function () { })) : i.ajaxProgressiveLoad ? t.modules.ajax.loadData().then(function () { }).catch(function () { }) : this._genRemoteRequest() : this.refreshActiveData(n ? "filter" : "sort"); this.scrollHorizontal(r) }; t.prototype.scrollHorizontal = function (n) { this.scrollLeft = n; this.element.scrollLeft = n; this.table.options.groupBy && this.table.modules.groupRows.scrollHeaders(n); this.table.modExists("columnCalcs") && this.table.modules.columnCalcs.scrollHorizontal(n) }; t.prototype.refreshActiveData = function (t, i, r) { var f, e = this, u = this.table, o = ["all", "filter", "sort", "display", "freeze", "group", "tree", "page"]; if (this.redrawBlock) return void ((!this.redrawBlockRestoreConfig || o.indexOf(t) < o.indexOf(this.redrawBlockRestoreConfig.stage)) && (this.redrawBlockRestoreConfig = { stage: t, skipStage: i, renderInPosition: r })); switch (e.table.modExists("edit") && e.table.modules.edit.cancelEdit(), t || (t = "all"), u.options.selectable && !u.options.selectablePersistence && u.modExists("selectRow") && u.modules.selectRow.deselectRows(), t) { case "all": case "filter": i ? i = !1 : u.modExists("filter") ? e.setActiveRows(u.modules.filter.filter(e.rows)) : e.setActiveRows(e.rows.slice(0)); case "sort": i ? i = !1 : u.modExists("sort") && u.modules.sort.sort(this.activeRows); this.regenerateRowNumbers(); case "display": this.resetDisplayRows(); case "freeze": i ? i = !1 : this.table.modExists("frozenRows") && u.modules.frozenRows.isFrozen() && (u.modules.frozenRows.getDisplayIndex() || u.modules.frozenRows.setDisplayIndex(this.getNextDisplayIndex()), f = u.modules.frozenRows.getDisplayIndex(), !0 !== (f = e.setDisplayRows(u.modules.frozenRows.getRows(this.getDisplayRows(f - 1)), f)) && u.modules.frozenRows.setDisplayIndex(f)); case "group": i ? i = !1 : u.options.groupBy && u.modExists("groupRows") && (u.modules.groupRows.getDisplayIndex() || u.modules.groupRows.setDisplayIndex(this.getNextDisplayIndex()), f = u.modules.groupRows.getDisplayIndex(), !0 !== (f = e.setDisplayRows(u.modules.groupRows.getRows(this.getDisplayRows(f - 1)), f)) && u.modules.groupRows.setDisplayIndex(f)); case "tree": i ? i = !1 : u.options.dataTree && u.modExists("dataTree") && (u.modules.dataTree.getDisplayIndex() || u.modules.dataTree.setDisplayIndex(this.getNextDisplayIndex()), f = u.modules.dataTree.getDisplayIndex(), !0 !== (f = e.setDisplayRows(u.modules.dataTree.getRows(this.getDisplayRows(f - 1)), f)) && u.modules.dataTree.setDisplayIndex(f)); u.options.pagination && u.modExists("page") && !r && "local" == u.modules.page.getMode() && u.modules.page.reset(); case "page": i ? i = !1 : u.options.pagination && u.modExists("page") && (u.modules.page.getDisplayIndex() || u.modules.page.setDisplayIndex(this.getNextDisplayIndex()), f = u.modules.page.getDisplayIndex(), "local" == u.modules.page.getMode() && u.modules.page.setMaxRows(this.getDisplayRows(f - 1).length), !0 !== (f = e.setDisplayRows(u.modules.page.getRows(this.getDisplayRows(f - 1)), f)) && u.modules.page.setDisplayIndex(f)) }n.prototype.helpers.elVisible(e.element) && (r ? e.reRenderInPosition() : ("all" === t && this.table.options.virtualDomHoz && this.table.vdomHoz.dataChange(), e.renderTable(), u.options.layoutColumnsOnNewData && e.table.columnManager.redraw(!0))); u.modExists("columnCalcs") && u.modules.columnCalcs.recalc(this.activeRows) }; t.prototype.regenerateRowNumbers = function () { var n = this; this.rowNumColumn && this.activeRows.forEach(function (t) { var i = t.getCell(n.rowNumColumn); i && i._generateContents() }) }; t.prototype.setActiveRows = function (n) { this.activeRows = n; this.activeRowsCount = this.activeRows.length }; t.prototype.resetDisplayRows = function () { this.displayRows = []; this.displayRows.push(this.activeRows.slice(0)); this.displayRowsCount = this.displayRows[0].length; this.table.modExists("frozenRows") && this.table.modules.frozenRows.setDisplayIndex(0); this.table.options.groupBy && this.table.modExists("groupRows") && this.table.modules.groupRows.setDisplayIndex(0); this.table.options.pagination && this.table.modExists("page") && this.table.modules.page.setDisplayIndex(0) }; t.prototype.getNextDisplayIndex = function () { return this.displayRows.length }; t.prototype.setDisplayRows = function (n, t) { var i = !0; return t && void 0 !== this.displayRows[t] ? (this.displayRows[t] = n, i = !0) : (this.displayRows.push(n), i = t = this.displayRows.length - 1), t == this.displayRows.length - 1 && (this.displayRowsCount = this.displayRows[this.displayRows.length - 1].length), i }; t.prototype.getDisplayRows = function (n) { return void 0 === n ? this.displayRows.length ? this.displayRows[this.displayRows.length - 1] : [] : this.displayRows[n] || [] }; t.prototype.getVisibleRows = function (n) { var f = this.element.scrollTop, e = this.element.clientHeight + f, o = !1, u = 0, r = 0, i = this.getDisplayRows(), t; if (n) { for (this.getDisplayRows(), t = this.vDomTop; t <= this.vDomBottom; t++)if (i[t]) if (o) { if (!(e - i[t].getElement().offsetTop >= 0)) break; r = t } else if (f - i[t].getElement().offsetTop >= 0) u = t; else { if (o = !0, !(e - i[t].getElement().offsetTop >= 0)) break; r = t } } else u = this.vDomTop, r = this.vDomBottom; return i.slice(u, r + 1) }; t.prototype.displayRowIterator = function (n) { this.displayRows.forEach(n); this.displayRowsCount = this.displayRows[this.displayRows.length - 1].length }; t.prototype.getRows = function (n) { var t; switch (n) { case "active": t = this.activeRows; break; case "display": t = this.table.rowManager.getDisplayRows(); break; case "visible": t = this.getVisibleRows(!0); break; case "selected": t = this.table.modules.selectRow.selectedRows; break; default: t = this.rows }return t }; t.prototype.reRenderInPosition = function (n) { var u; if ("virtual" == this.getRenderMode()) if (this.redrawBlock) n ? n() : this.redrawBlockRederInPosition = !0; else { for (var e = this.element.scrollTop, r = !1, i = !1, o = this.scrollLeft, f = this.getDisplayRows(), t = this.vDomTop; t <= this.vDomBottom; t++)if (f[t]) { if (u = e - f[t].getElement().offsetTop, !(!1 === i || Math.abs(u) < i)) break; i = u; r = t } n && n(); this._virtualRenderFill(!1 === r ? this.displayRowsCount - 1 : r, !0, i || 0); this.scrollHorizontal(o) } else this.renderTable(), n && n() }; t.prototype.setRenderMode = function () { this.table.options.virtualDom ? (this.renderMode = "virtual", this.fixedHeight = this.table.element.clientHeight || this.table.options.height ? !0 : !1) : this.renderMode = "classic" }; t.prototype.getRenderMode = function () { return this.renderMode }; t.prototype.renderTable = function () { switch (this.table.options.renderStarted.call(this.table), this.element.scrollTop = 0, this.renderMode) { case "classic": this._simpleRender(); break; case "virtual": this._virtualRenderFill() }this.firstRender && (this.displayRowsCount ? (this.firstRender = !1, this.table.modules.layout.layout()) : this.renderEmptyScroll()); this.table.modExists("frozenColumns") && this.table.modules.frozenColumns.layout(); this.displayRowsCount || this.table.options.placeholder && (this.table.options.placeholder.setAttribute("tabulator-render-mode", this.renderMode), this.getElement().appendChild(this.table.options.placeholder), this.table.options.placeholder.style.width = this.table.columnManager.getWidth() + "px"); this.table.options.renderComplete.call(this.table) }; t.prototype._simpleRender = function () { this._clearVirtualDom(); this.displayRowsCount ? this.checkClassicModeGroupHeaderWidth() : this.renderEmptyScroll() }; t.prototype.checkClassicModeGroupHeaderWidth = function () { var n = this, t = this.tableElement, i = !0; n.getDisplayRows().forEach(function (r, u) { n.styleRow(r, u); t.appendChild(r.getElement()); r.initialize(!0); "group" !== r.type && (i = !1) }); t.style.minWidth = i ? n.table.columnManager.getWidth() + "px" : "" }; t.prototype.renderEmptyScroll = function () { this.table.options.placeholder ? this.tableElement.style.display = "none" : this.tableElement.style.minWidth = this.table.columnManager.getWidth() + "px" }; t.prototype._clearVirtualDom = function () { var n = this.tableElement; for (this.table.options.placeholder && this.table.options.placeholder.parentNode && this.table.options.placeholder.parentNode.removeChild(this.table.options.placeholder); n.firstChild;)n.removeChild(n.firstChild); n.style.paddingTop = ""; n.style.paddingBottom = ""; n.style.minWidth = ""; n.style.minHeight = ""; n.style.display = ""; n.style.visibility = ""; this.scrollTop = 0; this.scrollLeft = 0; this.vDomTop = 0; this.vDomBottom = 0; this.vDomTopPad = 0; this.vDomBottomPad = 0 }; t.prototype.styleRow = function (n, t) { var i = n.getElement(); t % 2 ? (i.classList.add("tabulator-row-even"), i.classList.remove("tabulator-row-odd")) : (i.classList.add("tabulator-row-odd"), i.classList.remove("tabulator-row-even")) }; t.prototype._virtualRenderFill = function (t, i, r) { var u = this, f = u.tableElement, p = u.element, l = 0, s = 0, o = 0, c = 0, v = !0, w = u.getDisplayRows(), a; if (t = t || 0, r = r || 0, t) { for (; f.firstChild;)f.removeChild(f.firstChild); a = (u.displayRowsCount - t + 1) * u.vDomRowHeight; a < u.height && (t -= Math.ceil((u.height - a) / u.vDomRowHeight)) < 0 && (t = 0); l = Math.min(Math.max(Math.floor(u.vDomWindowBuffer / u.vDomRowHeight), u.vDomWindowMinMarginRows), t); t -= l } else u._clearVirtualDom(); if (u.displayRowsCount && n.prototype.helpers.elVisible(u.element)) { for (u.vDomTop = t, u.vDomBottom = t - 1; (s <= u.height + u.vDomWindowBuffer || c < u.vDomWindowMinTotalRows) && u.vDomBottom < u.displayRowsCount - 1;) { var y = u.vDomBottom + 1, e = w[y], h = 0; u.styleRow(e, y); f.appendChild(e.getElement()); e.initialize(); e.heightInitialized || e.normalizeHeight(!0); h = e.getHeight(); c < l ? o += h : s += h; h > this.vDomWindowBuffer && (this.vDomWindowBuffer = 2 * h); "group" !== e.type && (v = !1); u.vDomBottom++; c++ } t ? (u.vDomTopPad = i ? u.vDomRowHeight * this.vDomTop + r : u.scrollTop - o, u.vDomBottomPad = u.vDomBottom == u.displayRowsCount - 1 ? 0 : Math.max(u.vDomScrollHeight - u.vDomTopPad - s - o, 0)) : (this.vDomTopPad = 0, u.vDomRowHeight = Math.floor((s + o) / c), u.vDomBottomPad = u.vDomRowHeight * (u.displayRowsCount - u.vDomBottom - 1), u.vDomScrollHeight = o + s + u.vDomBottomPad - u.height); f.style.paddingTop = u.vDomTopPad + "px"; f.style.paddingBottom = u.vDomBottomPad + "px"; i && (this.scrollTop = u.vDomTopPad + o + r - (this.element.scrollWidth > this.element.clientWidth ? this.element.offsetHeight - this.element.clientHeight : 0)); this.scrollTop = Math.min(this.scrollTop, this.element.scrollHeight - this.height); this.element.scrollWidth > this.element.offsetWidth && i && (this.scrollTop += this.element.offsetHeight - this.element.clientHeight); this.vDomScrollPosTop = this.scrollTop; this.vDomScrollPosBottom = this.scrollTop; p.scrollTop = this.scrollTop; f.style.minWidth = v ? u.table.columnManager.getWidth() + "px" : ""; u.table.options.groupBy && "fitDataFill" != u.table.modules.layout.getMode() && u.displayRowsCount == u.table.modules.groupRows.countGroups() && (u.tableElement.style.minWidth = u.table.columnManager.getWidth()) } else this.renderEmptyScroll(); this.fixedHeight || this.adjustTableSize() }; t.prototype.scrollVertical = function (n) { var t = this.scrollTop - this.vDomScrollPosTop, i = this.scrollTop - this.vDomScrollPosBottom, r = 2 * this.vDomWindowBuffer, u; -t > r || i > r ? (u = this.scrollLeft, this._virtualRenderFill(Math.floor(this.element.scrollTop / this.element.scrollHeight * this.displayRowsCount)), this.scrollHorizontal(u)) : n ? (t < 0 && this._addTopRow(-t), i < 0 && (this.vDomScrollHeight - this.scrollTop > this.vDomWindowBuffer ? this._removeBottomRow(-i) : this.vDomScrollPosBottom = this.scrollTop)) : (t >= 0 && (this.scrollTop > this.vDomWindowBuffer ? this._removeTopRow(t) : this.vDomScrollPosTop = this.scrollTop), i >= 0 && this._addBottomRow(i)) }; t.prototype._addTopRow = function (n) { var f = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 0, r = this.tableElement, e = this.getDisplayRows(); if (this.vDomTop) { var i = this.vDomTop - 1, t = e[i], u = t.getHeight() || this.vDomRowHeight; n >= u && (this.styleRow(t, i), r.insertBefore(t.getElement(), r.firstChild), t.initialized && t.heightInitialized || (this.vDomTopNewRows.push(t), t.heightInitialized || t.clearCellHeight()), t.initialize(), this.vDomTopPad -= u, this.vDomTopPad < 0 && (this.vDomTopPad = i * this.vDomRowHeight), i || (this.vDomTopPad = 0), r.style.paddingTop = this.vDomTopPad + "px", this.vDomScrollPosTop -= u, this.vDomTop--); n = -(this.scrollTop - this.vDomScrollPosTop); t.getHeight() > this.vDomWindowBuffer && (this.vDomWindowBuffer = 2 * t.getHeight()); f < this.vDomMaxRenderChain && this.vDomTop && n >= (e[this.vDomTop - 1].getHeight() || this.vDomRowHeight) ? this._addTopRow(n, f + 1) : this._quickNormalizeRowHeight(this.vDomTopNewRows) } }; t.prototype._removeTopRow = function (n) { var u = this.tableElement, r = this.getDisplayRows()[this.vDomTop], t = r.getHeight() || this.vDomRowHeight, i; n >= t && (i = r.getElement(), i.parentNode.removeChild(i), this.vDomTopPad += t, u.style.paddingTop = this.vDomTopPad + "px", this.vDomScrollPosTop += this.vDomTop ? t : t + this.vDomWindowBuffer, this.vDomTop++, n = this.scrollTop - this.vDomScrollPosTop, this._removeTopRow(n)) }; t.prototype._addBottomRow = function (n) { var u = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 0, f = this.tableElement, e = this.getDisplayRows(); if (this.vDomBottom < this.displayRowsCount - 1) { var i = this.vDomBottom + 1, t = e[i], r = t.getHeight() || this.vDomRowHeight; n >= r && (this.styleRow(t, i), f.appendChild(t.getElement()), t.initialized && t.heightInitialized || (this.vDomBottomNewRows.push(t), t.heightInitialized || t.clearCellHeight()), t.initialize(), this.vDomBottomPad -= r, (this.vDomBottomPad < 0 || i == this.displayRowsCount - 1) && (this.vDomBottomPad = 0), f.style.paddingBottom = this.vDomBottomPad + "px", this.vDomScrollPosBottom += r, this.vDomBottom++); n = this.scrollTop - this.vDomScrollPosBottom; t.getHeight() > this.vDomWindowBuffer && (this.vDomWindowBuffer = 2 * t.getHeight()); u < this.vDomMaxRenderChain && this.vDomBottom < this.displayRowsCount - 1 && n >= (e[this.vDomBottom + 1].getHeight() || this.vDomRowHeight) ? this._addBottomRow(n, u + 1) : this._quickNormalizeRowHeight(this.vDomBottomNewRows) } }; t.prototype._removeBottomRow = function (n) { var u = this.tableElement, r = this.getDisplayRows()[this.vDomBottom], i = r.getHeight() || this.vDomRowHeight, t; n >= i && (t = r.getElement(), t.parentNode && t.parentNode.removeChild(t), this.vDomBottomPad += i, this.vDomBottomPad < 0 && (this.vDomBottomPad = 0), u.style.paddingBottom = this.vDomBottomPad + "px", this.vDomScrollPosBottom -= i, this.vDomBottom--, n = -(this.scrollTop - this.vDomScrollPosBottom), this._removeBottomRow(n)) }; t.prototype._quickNormalizeRowHeight = function (n) { n.forEach(function (n) { n.calcHeight() }); n.forEach(function (n) { n.setCellHeight() }); n.length = 0 }; t.prototype.normalizeHeight = function () { this.activeRows.forEach(function (n) { n.normalizeHeight() }) }; t.prototype.adjustTableSize = function () { var t, i = this.element.clientHeight, n; "virtual" === this.renderMode && (n = Math.floor(this.columnManager.getElement().offsetHeight + (this.table.footerManager && !this.table.footerManager.external ? this.table.footerManager.getElement().offsetHeight : 0)), this.fixedHeight ? (this.element.style.minHeight = "calc(100% - " + n + "px)", this.element.style.height = "calc(100% - " + n + "px)", this.element.style.maxHeight = "calc(100% - " + n + "px)") : (this.element.style.height = "", this.element.style.height = Math.floor(this.table.element.clientHeight) - n + "px", this.element.scrollTop = this.scrollTop), this.height = this.element.clientHeight, this.vDomWindowBuffer = this.table.options.virtualDomBuffer || this.height, this.fixedHeight || Math.floor(i) == Math.floor(this.element.clientHeight) || ((t = this.table.modExists("resizeTable")) && !this.table.modules.resizeTable.autoResize || !t) && this.redraw()) }; t.prototype.reinitialize = function () { this.rows.forEach(function (n) { n.reinitialize(!0) }) }; t.prototype.blockRedraw = function () { this.redrawBlock = !0; this.redrawBlockRestoreConfig = !1 }; t.prototype.restoreRedraw = function () { this.redrawBlock = !1; this.redrawBlockRestoreConfig ? (this.refreshActiveData(this.redrawBlockRestoreConfig.stage, this.redrawBlockRestoreConfig.skipStage, this.redrawBlockRestoreConfig.renderInPosition), this.redrawBlockRestoreConfig = !1) : this.redrawBlockRederInPosition && this.reRenderInPosition(); this.redrawBlockRederInPosition = !1 }; t.prototype.redraw = function (n) { var t = this.scrollLeft; this.adjustTableSize(); this.table.tableWidth = this.table.element.clientWidth; n ? this.renderTable() : ("classic" == this.renderMode ? this.table.options.groupBy ? this.refreshActiveData("group", !1, !1) : this._simpleRender() : (this.reRenderInPosition(), this.scrollHorizontal(t)), this.displayRowsCount || this.table.options.placeholder && this.getElement().appendChild(this.table.options.placeholder)) }; t.prototype.resetScroll = function () { if (this.element.scrollLeft = 0, this.element.scrollTop = 0, "ie" === this.table.browser) { var n = document.createEvent("Event"); n.initEvent("scroll", !1, !0); this.element.dispatchEvent(n) } else this.element.dispatchEvent(new Event("scroll")) }; d = function (n) { this.table = n; this.element = this.table.rowManager.tableElement; this.holderEl = this.table.rowManager.element; this.leftCol = 0; this.rightCol = 0; this.scrollLeft = 0; this.vDomScrollPosLeft = 0; this.vDomScrollPosRight = 0; this.vDomPadLeft = 0; this.vDomPadRight = 0; this.fitDataColAvg = 0; this.window = 200; this.initialized = !1; this.columns = []; this.compatabilityCheck() && this.initialize() }; d.prototype.compatabilityCheck = function () { var t = this.table.options, n = !0; return "fitDataTable" == t.layout && (console.warn("Horizontal Vitrual DOM is not compatible with fitDataTable layout mode"), n = !1), t.responsiveLayout && (console.warn("Horizontal Vitrual DOM is not compatible with responsive columns"), n = !1), this.table.rtl && (console.warn("Horizontal Vitrual DOM is not currently compatible with RTL text direction"), n = !1), t.columns && t.columns.find(function (n) { return n.frozen }) && (console.warn("Horizontal Vitrual DOM is not compatible with frozen columns"), n = !1), n || (t.virtualDomHoz = !1), n }; d.prototype.initialize = function () { var n = this; this.holderEl.addEventListener("scroll", function () { var t = n.holderEl.scrollLeft; n.scrollLeft != t && (n.scrollLeft = t, n.scroll(t - (n.vDomScrollPosLeft + n.window))) }) }; d.prototype.deinitialize = function () { this.initialized = !1 }; d.prototype.clear = function () { this.columns = []; this.leftCol = -1; this.rightCol = 0; this.vDomScrollPosLeft = 0; this.vDomScrollPosRight = 0; this.vDomPadLeft = 0; this.vDomPadRight = 0 }; d.prototype.dataChange = function () { var f, t, i, u = !1, e = 0, n = 0, r; if ("fitData" === this.table.options.layout) { if (this.table.columnManager.columnsByIndex.forEach(function (n) { !n.definition.width && n.visible && (u = !0) }), u && u && this.table.rowManager.getDisplayRows().length && (this.vDomScrollPosRight = this.scrollLeft + this.holderEl.clientWidth + this.window, this.table.options.groupBy ? (f = this.table.modules.groupRows.getGroups(!1)[0], t = f.getRows(!1)[0]) : t = this.table.rowManager.getDisplayRows()[0], t)) { for (i = t.getElement(), t.generateCells(), this.element.appendChild(i), n = 0; n < t.cells.length; n++)if (r = t.cells[n], i.appendChild(r.getElement()), r.column.reinitializeWidth(), (e += r.column.getWidth()) > this.vDomScrollPosRight) break; for (i.parentNode.removeChild(i), this.fitDataColAvg = Math.floor(e / (n + 1)), n; n < this.table.columnManager.columnsByIndex.length; n++)this.table.columnManager.columnsByIndex[n].setWidth(this.fitDataColAvg); this.reinitialize(!1, !0) } } else "fitColumns" === this.table.options.layout && (this.table.modules.layout.layout(), this.table.vdomHoz.reinitialize(!1, !0)) }; d.prototype.fitDataLayoutOverride = function () { for (var n = this.leftCol; n <= this.rightCol; n++)this.columns[n].reinitializeWidth() }; d.prototype.reinitialize = function (n, t) { var i = this, u = { cols: this.columns, leftCol: this.leftCol, rightCol: this.rightCol }, r; (!n || this.initialized) && (this.clear(), this.scrollLeft = this.holderEl.scrollLeft, this.vDomScrollPosLeft = this.scrollLeft - this.window, this.vDomScrollPosRight = this.scrollLeft + this.holderEl.clientWidth + this.window, r = 0, this.table.columnManager.columnsByIndex.forEach(function (n) { var u = {}, t; n.visible && (t = n.getWidth(), u.leftPos = r, u.rightPos = r + t, r + t > i.vDomScrollPosLeft && r < i.vDomScrollPosRight ? (-1 == i.leftCol && (i.leftCol = i.columns.length, i.vDomPadLeft = r), i.rightCol = i.columns.length) : -1 !== i.leftCol && (i.vDomPadRight += t), i.columns.push(n), n.modules.vdomHoz = u, r += t) }), this.element.style.paddingLeft = this.vDomPadLeft + "px", this.element.style.paddingRight = this.vDomPadRight + "px", this.initialized = !0, t || n && !this.reinitChanged(u) || this.renitializeRows(), this.holderEl.scrollLeft = this.scrollLeft) }; d.prototype.reinitChanged = function (n) { var i = this, t = !0; return n.cols.length !== this.columns.length || n.leftCol !== this.leftCol || n.rightCol !== this.rightCol || (n.cols.forEach(function (n, r) { n !== i.columns[r] && (t = !1) }), !t) }; d.prototype.renitializeRows = function () { var n = this; this.table.rowManager.getVisibleRows().forEach(function (t) { n.reinitializeRow(t, !0) }) }; d.prototype.scroll = function (n) { this.vDomScrollPosLeft += n; this.vDomScrollPosRight += n; n > .8 * this.holderEl.clientWidth ? this.reinitialize() : n > 0 ? (this.addColRight(), this.removeColLeft()) : (this.addColLeft(), this.removeColRight()) }; d.prototype.colPositionAdjust = function (n, t, i) { for (var u, r = n; r < t; r++)u = this.columns[r], u.modules.vdomHoz.leftPos -= i, u.modules.vdomHoz.rightPos -= i }; d.prototype.addColRight = function () { var i, r, t, n = this.columns[this.rightCol + 1]; n && n.modules.vdomHoz.leftPos <= this.vDomScrollPosRight && (i = this.table.rowManager.getVisibleRows(), i.forEach(function (t) { if ("group" !== t.type) { var i = t.getCell(n); t.getElement().appendChild(i.getElement()); i.cellRendered() } }), this.fitDataColAvg && (r = n.getWidth()) === this.fitDataColAvg && (n.reinitializeWidth(), (t = r - n.getWidth()) && (n.modules.vdomHoz.rightPos -= t, this.colPositionAdjust(this.rightCol + 1, this.columns.length, t))), this.rightCol++, this.rightCol >= this.columns.length - 1 ? this.vDomPadRight = 0 : this.vDomPadRight -= n.getWidth(), this.element.style.paddingRight = this.vDomPadRight + "px", this.addColRight()) }; d.prototype.addColLeft = function () { var n = this.columns[this.leftCol - 1]; n && n.modules.vdomHoz.rightPos >= this.vDomScrollPosLeft && (this.table.rowManager.getVisibleRows().forEach(function (t) { if ("group" !== t.type) { var i = t.getCell(n); t.getElement().prepend(i.getElement()); i.cellRendered() } }), this.leftCol ? this.vDomPadLeft -= n.getWidth() : this.vDomPadLeft = 0, this.element.style.paddingLeft = this.vDomPadLeft + "px", this.leftCol--, this.addColLeft()) }; d.prototype.removeColRight = function (n) { var t, n = this.columns[this.rightCol]; n && n.modules.vdomHoz.leftPos > this.vDomScrollPosRight && (t = this.table.rowManager.getVisibleRows(), n.modules.vdomHoz.visible = !1, t.forEach(function (t) { if ("group" !== t.type) { var i = t.getCell(n); t.getElement().removeChild(i.getElement()) } }), this.vDomPadRight += n.getWidth(), this.element.style.paddingRight = this.vDomPadRight + "px", this.rightCol--, this.removeColRight()) }; d.prototype.removeColLeft = function () { var t, n = this.columns[this.leftCol]; n && n.modules.vdomHoz.rightPos < this.vDomScrollPosLeft && (t = this.table.rowManager.getVisibleRows(), t.forEach(function (t) { if ("group" !== t.type) { var i = t.getCell(n); t.getElement().removeChild(i.getElement()) } }), this.vDomPadLeft += n.getWidth(), this.element.style.paddingLeft = this.vDomPadLeft + "px", this.leftCol++, this.removeColLeft()) }; d.prototype.initializeRow = function (n) { var t, i, r; if ("group" !== n.type) for (n.modules.vdomHoz = { leftCol: this.leftCol, rightCol: this.rightCol }, t = this.leftCol; t <= this.rightCol; t++)i = this.columns[t], i.visible && (r = n.getCell(i), n.element.appendChild(r.getElement()), r.cellRendered()) }; d.prototype.reinitializeRow = function (n, t) { if ("group" !== n.type && (t || !n.modules.vdomHoz || n.modules.vdomHoz.leftCol !== this.leftCol || n.modules.vdomHoz.rightCol !== this.rightCol)) { for (; n.element.firstChild;)n.element.removeChild(n.element.firstChild); this.initializeRow(n) } }; s = function (n) { this._row = n }; s.prototype.getData = function (n) { return this._row.getData(n) }; s.prototype.getElement = function () { return this._row.getElement() }; s.prototype.getCells = function () { var n = []; return this._row.getCells().forEach(function (t) { n.push(t.getComponent()) }), n }; s.prototype.getCell = function (n) { var t = this._row.getCell(n); return !!t && t.getComponent() }; s.prototype.getIndex = function () { return this._row.getData("data")[this._row.table.options.index] }; s.prototype.getPosition = function (n) { return this._row.table.rowManager.getRowPosition(this._row, n) }; s.prototype.delete = function () { return this._row.delete() }; s.prototype.scrollTo = function () { return this._row.table.rowManager.scrollToRow(this._row) }; s.prototype.pageTo = function () { if (this._row.table.modExists("page", !0)) return this._row.table.modules.page.setPageToRow(this._row) }; s.prototype.move = function (n, t) { this._row.moveToRow(n, t) }; s.prototype.update = function (n) { return this._row.updateData(n) }; s.prototype.normalizeHeight = function () { this._row.normalizeHeight(!0) }; s.prototype.select = function () { this._row.table.modules.selectRow.selectRows(this._row) }; s.prototype.deselect = function () { this._row.table.modules.selectRow.deselectRows(this._row) }; s.prototype.toggleSelect = function () { this._row.table.modules.selectRow.toggleRow(this._row) }; s.prototype.isSelected = function () { return this._row.table.modules.selectRow.isRowSelected(this._row) }; s.prototype._getSelf = function () { return this._row }; s.prototype.validate = function () { return this._row.validate() }; s.prototype.freeze = function () { this._row.table.modExists("frozenRows", !0) && this._row.table.modules.frozenRows.freezeRow(this._row) }; s.prototype.unfreeze = function () { this._row.table.modExists("frozenRows", !0) && this._row.table.modules.frozenRows.unfreezeRow(this._row) }; s.prototype.isFrozen = function () { return this._row.table.modExists("frozenRows", !0) ? this._row.table.modules.frozenRows.rows.indexOf(this._row) > -1 : !1 }; s.prototype.treeCollapse = function () { this._row.table.modExists("dataTree", !0) && this._row.table.modules.dataTree.collapseRow(this._row) }; s.prototype.treeExpand = function () { this._row.table.modExists("dataTree", !0) && this._row.table.modules.dataTree.expandRow(this._row) }; s.prototype.treeToggle = function () { this._row.table.modExists("dataTree", !0) && this._row.table.modules.dataTree.toggleRow(this._row) }; s.prototype.getTreeParent = function () { return !!this._row.table.modExists("dataTree", !0) && this._row.table.modules.dataTree.getTreeParent(this._row) }; s.prototype.getTreeChildren = function () { return !!this._row.table.modExists("dataTree", !0) && this._row.table.modules.dataTree.getTreeChildren(this._row, !0) }; s.prototype.addTreeChild = function (n, t, i) { return !!this._row.table.modExists("dataTree", !0) && this._row.table.modules.dataTree.addTreeChildRow(this._row, n, t, i) }; s.prototype.reformat = function () { return this._row.reinitialize() }; s.prototype.getGroup = function () { return this._row.getGroup().getComponent() }; s.prototype.getTable = function () { return this._row.table }; s.prototype.getNextRow = function () { var n = this._row.nextRow(); return n ? n.getComponent() : n }; s.prototype.getPrevRow = function () { var n = this._row.prevRow(); return n ? n.getComponent() : n }; u = function (n, t) { var i = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : "row"; this.table = t.table; this.parent = t; this.data = {}; this.type = i; this.element = this.createElement(); this.modules = {}; this.cells = []; this.height = 0; this.heightStyled = ""; this.manualHeight = !1; this.outerHeight = 0; this.initialized = !1; this.heightInitialized = !1; this.component = null; this.setData(n); this.generateElement() }; u.prototype.createElement = function () { var n = document.createElement("div"); return n.classList.add("tabulator-row"), n.setAttribute("role", "row"), n }; u.prototype.getElement = function () { return this.element }; u.prototype.detachElement = function () { this.element && this.element.parentNode && this.element.parentNode.removeChild(this.element) }; u.prototype.generateElement = function () { var t, i, r, n = this; !1 !== n.table.options.selectable && n.table.modExists("selectRow") && n.table.modules.selectRow.initializeRow(this); !1 !== n.table.options.movableRows && n.table.modExists("moveRow") && n.table.modules.moveRow.initializeRow(this); !1 !== n.table.options.dataTree && n.table.modExists("dataTree") && n.table.modules.dataTree.initializeRow(this); "collapse" === n.table.options.responsiveLayout && n.table.modExists("responsiveLayout") && n.table.modules.responsiveLayout.initializeRow(this); (n.table.options.rowContextMenu || n.table.options.rowClickMenu) && this.table.modExists("menu") && n.table.modules.menu.initializeRow(this); n.table.options.rowClick && n.element.addEventListener("click", function (t) { n.table.options.rowClick(t, n.getComponent()) }); n.table.options.rowDblClick && n.element.addEventListener("dblclick", function (t) { n.table.options.rowDblClick(t, n.getComponent()) }); n.table.options.rowContext && n.element.addEventListener("contextmenu", function (t) { n.table.options.rowContext(t, n.getComponent()) }); n.table.options.rowMouseEnter && n.element.addEventListener("mouseenter", function (t) { n.table.options.rowMouseEnter(t, n.getComponent()) }); n.table.options.rowMouseLeave && n.element.addEventListener("mouseleave", function (t) { n.table.options.rowMouseLeave(t, n.getComponent()) }); n.table.options.rowMouseOver && n.element.addEventListener("mouseover", function (t) { n.table.options.rowMouseOver(t, n.getComponent()) }); n.table.options.rowMouseOut && n.element.addEventListener("mouseout", function (t) { n.table.options.rowMouseOut(t, n.getComponent()) }); n.table.options.rowMouseMove && n.element.addEventListener("mousemove", function (t) { n.table.options.rowMouseMove(t, n.getComponent()) }); n.table.options.rowTap && (r = !1, n.element.addEventListener("touchstart", function () { r = !0 }, { passive: !0 }), n.element.addEventListener("touchend", function (t) { r && n.table.options.rowTap(t, n.getComponent()); r = !1 })); n.table.options.rowDblTap && (t = null, n.element.addEventListener("touchend", function (i) { t ? (clearTimeout(t), t = null, n.table.options.rowDblTap(i, n.getComponent())) : t = setTimeout(function () { clearTimeout(t); t = null }, 300) })); n.table.options.rowTapHold && (i = null, n.element.addEventListener("touchstart", function (t) { clearTimeout(i); i = setTimeout(function () { clearTimeout(i); i = null; r = !1; n.table.options.rowTapHold(t, n.getComponent()) }, 1e3) }, { passive: !0 }), n.element.addEventListener("touchend", function () { clearTimeout(i); i = null })) }; u.prototype.generateCells = function () { this.cells = this.table.columnManager.generateCells(this) }; u.prototype.initialize = function (n) { var t = this; if (!this.initialized || n) { for (this.deleteCells(); this.element.firstChild;)this.element.removeChild(this.element.firstChild); this.table.modExists("frozenColumns") && this.table.modules.frozenColumns.layoutRow(this); this.generateCells(); this.table.options.virtualDomHoz && this.table.vdomHoz.initialized ? this.table.vdomHoz.initializeRow(this) : this.cells.forEach(function (n) { t.element.appendChild(n.getElement()); n.cellRendered() }); n && this.normalizeHeight(); this.table.options.dataTree && this.table.modExists("dataTree") && this.table.modules.dataTree.layoutRow(this); "collapse" === this.table.options.responsiveLayout && this.table.modExists("responsiveLayout") && this.table.modules.responsiveLayout.layoutRow(this); this.table.options.rowFormatter && this.table.options.rowFormatter(this.getComponent()); this.table.options.resizableRows && this.table.modExists("resizeRows") && this.table.modules.resizeRows.initializeRow(this); this.initialized = !0 } else this.table.options.virtualDomHoz && this.table.vdomHoz.reinitializeRow(this) }; u.prototype.reinitializeHeight = function () { this.heightInitialized = !1; null !== this.element.offsetParent && this.normalizeHeight(!0) }; u.prototype.reinitialize = function () { this.initialized = !1; this.heightInitialized = !1; this.manualHeight || (this.height = 0, this.heightStyled = ""); null !== this.element.offsetParent && this.initialize(!0); this.table.options.dataTree && this.table.modExists("dataTree", !0) && this.table.modules.dataTree.getTreeChildren(this, !1, !0).forEach(function (n) { n.reinitialize(!0) }) }; u.prototype.calcHeight = function (n) { var t = 0, i = this.table.options.resizableRows ? this.element.clientHeight : 0; this.cells.forEach(function (n) { var i = n.getHeight(); i > t && (t = i) }); this.height = n ? Math.max(t, i) : this.manualHeight ? this.height : Math.max(t, i); this.heightStyled = this.height ? this.height + "px" : ""; this.outerHeight = this.element.offsetHeight }; u.prototype.setCellHeight = function () { this.cells.forEach(function (n) { n.setHeight() }); this.heightInitialized = !0 }; u.prototype.clearCellHeight = function () { this.cells.forEach(function (n) { n.clearHeight() }) }; u.prototype.normalizeHeight = function (n) { n && this.clearCellHeight(); this.calcHeight(n); this.setCellHeight() }; u.prototype.setHeight = function (n, t) { (this.height != n || t) && (this.manualHeight = !0, this.height = n, this.heightStyled = n ? n + "px" : "", this.setCellHeight(), this.outerHeight = this.element.offsetHeight) }; u.prototype.getHeight = function () { return this.outerHeight }; u.prototype.getWidth = function () { return this.element.offsetWidth }; u.prototype.deleteCell = function (n) { var t = this.cells.indexOf(n); t > -1 && this.cells.splice(t, 1) }; u.prototype.setData = function (n) { this.table.modExists("mutator") && (n = this.table.modules.mutator.transformRow(n, "data")); this.data = n; this.table.options.reactiveData && this.table.modExists("reactiveData", !0) && this.table.modules.reactiveData.watchRow(this) }; u.prototype.updateData = function (t) { var r, i = this, f = n.prototype.helpers.elVisible(this.element), u = {}; return new Promise(function (n) { var e; "string" == typeof t && (t = JSON.parse(t)); i.table.options.reactiveData && i.table.modExists("reactiveData", !0) && i.table.modules.reactiveData.block(); i.table.modExists("mutator") ? (u = Object.assign(u, i.data), u = Object.assign(u, t), r = i.table.modules.mutator.transformRow(u, "data", t)) : r = t; for (e in r) i.data[e] = r[e]; i.table.options.reactiveData && i.table.modExists("reactiveData", !0) && i.table.modules.reactiveData.unblock(); for (e in t) i.table.columnManager.getColumnsByFieldRoot(e).forEach(function (n) { var t = i.getCell(n.getField()), u; t && (u = n.getFieldValue(r), t.getValue() != u && (t.setValueProcessData(u), f && t.cellRendered())) }); i.table.options.groupUpdateOnCellEdit && i.table.options.groupBy && i.table.modExists("groupRows") && i.table.modules.groupRows.reassignRowToGroup(i.row); f ? (i.normalizeHeight(!0), i.table.options.rowFormatter && i.table.options.rowFormatter(i.getComponent())) : (i.initialized = !1, i.height = 0, i.heightStyled = ""); !1 !== i.table.options.dataTree && i.table.modExists("dataTree") && i.table.modules.dataTree.redrawNeeded(t) && (i.table.modules.dataTree.initializeRow(i), i.table.modules.dataTree.layoutRow(i), i.table.rowManager.refreshActiveData("tree", !1, !0)); i.table.options.rowUpdated.call(i.table, i.getComponent()); i.table.options.dataChanged && i.table.options.dataChanged.call(i.table, i.table.rowManager.getData()); n() }) }; u.prototype.getData = function (n) { return n && this.table.modExists("accessor") ? this.table.modules.accessor.transformRow(this, n) : this.data }; u.prototype.getCell = function (n) { return n = this.table.columnManager.findColumn(n), this.cells.find(function (t) { return t.column === n }) }; u.prototype.getCellIndex = function (n) { return this.cells.findIndex(function (t) { return t === n }) }; u.prototype.findNextEditableCell = function (t) { var f = !1, r, i, u; if (t < this.cells.length - 1) for (r = t + 1; r < this.cells.length; r++)if (i = this.cells[r], i.column.modules.edit && n.prototype.helpers.elVisible(i.getElement()) && (u = !0, "function" == typeof i.column.modules.edit.check && (u = i.column.modules.edit.check(i.getComponent())), u)) { f = i; break } return f }; u.prototype.findPrevEditableCell = function (t) { var f = !1, r, i, u; if (t > 0) for (r = t - 1; r >= 0; r--)if (i = this.cells[r], u = !0, i.column.modules.edit && n.prototype.helpers.elVisible(i.getElement()) && ("function" == typeof i.column.modules.edit.check && (u = i.column.modules.edit.check(i.getComponent())), u)) { f = i; break } return f }; u.prototype.getCells = function () { return this.cells }; u.prototype.nextRow = function () { return this.table.rowManager.nextDisplayRow(this, !0) || !1 }; u.prototype.prevRow = function () { return this.table.rowManager.prevDisplayRow(this, !0) || !1 }; u.prototype.moveToRow = function (n, t) { var i = this.table.rowManager.findRow(n); i ? (this.table.rowManager.moveRowActual(this, i, !t), this.table.rowManager.refreshActiveData("display", !1, !0)) : console.warn("Move Error - No matching row found:", n) }; u.prototype.validate = function () { var n = []; return this.cells.forEach(function (t) { t.validate() || n.push(t.getComponent()) }), !n.length || n }; u.prototype.delete = function () { var n = this; return new Promise(function (t) { var i, r; n.table.options.history && n.table.modExists("history") && (n.table.options.groupBy && n.table.modExists("groupRows") ? (r = n.getGroup().rows, (i = r.indexOf(n)) && (i = r[i - 1])) : (i = n.table.rowManager.getRowIndex(n)) && (i = n.table.rowManager.rows[i - 1]), n.table.modules.history.action("rowDelete", n, { data: n.getData(), pos: !i, index: i })); n.deleteActual(); t() }) }; u.prototype.deleteActual = function (n) { this.table.rowManager.getRowIndex(this); this.detatchModules(); this.table.options.reactiveData && this.table.modExists("reactiveData", !0); this.modules.group && this.modules.group.removeRow(this); this.table.rowManager.deleteRow(this, n); this.deleteCells(); this.initialized = !1; this.heightInitialized = !1; this.element = !1; this.table.options.dataTree && this.table.modExists("dataTree", !0) && this.table.modules.dataTree.rowDelete(this); this.table.modExists("columnCalcs") && (this.table.options.groupBy && this.table.modExists("groupRows") ? this.table.modules.columnCalcs.recalcRowGroup(this) : this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows)) }; u.prototype.detatchModules = function () { this.table.modExists("selectRow") && this.table.modules.selectRow._deselectRow(this, !0); this.table.modExists("edit") && this.table.modules.edit.currentCell.row === this && this.table.modules.edit.cancelEdit(); this.table.modExists("frozenRows") && this.table.modules.frozenRows.detachRow(this) }; u.prototype.deleteCells = function () { for (var t = this.cells.length, n = 0; n < t; n++)this.cells[0].delete() }; u.prototype.wipe = function () { for (this.detatchModules(), this.deleteCells(); this.element.firstChild;)this.element.removeChild(this.element.firstChild); this.element = !1; this.modules = {}; this.element.parentNode && this.element.parentNode.removeChild(this.element) }; u.prototype.getGroup = function () { return this.modules.group || !1 }; u.prototype.getComponent = function () { return this.component || (this.component = new s(this)), this.component }; p = function (n) { this._cell = n }; p.prototype.getValue = function () { return this._cell.getValue() }; p.prototype.getOldValue = function () { return this._cell.getOldValue() }; p.prototype.getInitialValue = function () { return this._cell.initialValue }; p.prototype.getElement = function () { return this._cell.getElement() }; p.prototype.getRow = function () { return this._cell.row.getComponent() }; p.prototype.getData = function () { return this._cell.row.getData() }; p.prototype.getField = function () { return this._cell.column.getField() }; p.prototype.getColumn = function () { return this._cell.column.getComponent() }; p.prototype.setValue = function (n, t) { void 0 === t && (t = !0); this._cell.setValue(n, t) }; p.prototype.restoreOldValue = function () { this._cell.setValueActual(this._cell.getOldValue()) }; p.prototype.restoreInitialValue = function () { this._cell.setValueActual(this._cell.initialValue) }; p.prototype.edit = function (n) { return this._cell.edit(n) }; p.prototype.cancelEdit = function () { this._cell.cancelEdit() }; p.prototype.isEdited = function () { return !!this._cell.modules.edit && this._cell.modules.edit.edited }; p.prototype.clearEdited = function () { self.table.modExists("edit", !0) && this._cell.table.modules.edit.clearEdited(this._cell) }; p.prototype.isValid = function () { return !this._cell.modules.validate || !this._cell.modules.validate.invalid }; p.prototype.validate = function () { return this._cell.validate() }; p.prototype.clearValidation = function () { this._cell.table.modExists("validate", !0) && this._cell.table.modules.validate.clearValidation(this._cell) }; p.prototype.nav = function () { return this._cell.nav() }; p.prototype.checkHeight = function () { this._cell.checkHeight() }; p.prototype.getTable = function () { return this._cell.table }; p.prototype._getSelf = function () { return this._cell }; h = function (n, t) { this.table = n.table; this.column = n; this.row = t; this.element = null; this.value = null; this.initialValue; this.oldValue = null; this.modules = {}; this.height = null; this.width = null; this.minWidth = null; this.component = null; this.loaded = !1; this.build() }; h.prototype.build = function () { this.generateElement(); this.setWidth(); this._configureCell(); this.setValueActual(this.column.getFieldValue(this.row.data)); this.initialValue = this.value }; h.prototype.generateElement = function () { this.element = document.createElement("div"); this.element.className = "tabulator-cell"; this.element.setAttribute("role", "gridcell"); this.element = this.element }; h.prototype._configureCell = function () { var n = this, i = n.column.cellEvents, t = n.element, r = this.column.getField(); (t.style.textAlign = n.column.hozAlign, n.column.vertAlign && (t.style.display = "inline-flex", t.style.alignItems = { top: "flex-start", bottom: "flex-end", middle: "center" }[n.column.vertAlign] || "", n.column.hozAlign && (t.style.justifyContent = { left: "flex-start", right: "flex-end", center: "center" }[n.column.hozAlign] || "")), r && t.setAttribute("tabulator-field", r), n.column.definition.cssClass) && n.column.definition.cssClass.split(" ").forEach(function (n) { t.classList.add(n) }); "hover" === this.table.options.tooltipGenerationMode && t.addEventListener("mouseenter", function () { n._generateTooltip() }); n._bindClickEvents(i); n._bindTouchEvents(i); n._bindMouseEvents(i); n.column.modules.edit && n.table.modules.edit.bindEditor(n); n.column.definition.rowHandle && !1 !== n.table.options.movableRows && n.table.modExists("moveRow") && n.table.modules.moveRow.initializeCell(n); n.column.visible || n.hide() }; h.prototype._bindClickEvents = function (n) { var t = this, i = t.element; (n.cellClick || t.table.options.cellClick) && i.addEventListener("click", function (i) { var r = t.getComponent(); n.cellClick && n.cellClick.call(t.table, i, r); t.table.options.cellClick && t.table.options.cellClick.call(t.table, i, r) }); n.cellDblClick || this.table.options.cellDblClick ? i.addEventListener("dblclick", function (i) { var r = t.getComponent(); n.cellDblClick && n.cellDblClick.call(t.table, i, r); t.table.options.cellDblClick && t.table.options.cellDblClick.call(t.table, i, r) }) : i.addEventListener("dblclick", function (n) { var i; if (!t.table.modExists("edit") || t.table.modules.edit.currentCell !== t) { n.preventDefault(); try { document.selection ? (i = document.body.createTextRange(), i.moveToElementText(t.element), i.select()) : window.getSelection && (i = document.createRange(), i.selectNode(t.element), window.getSelection().removeAllRanges(), window.getSelection().addRange(i)) } catch (n) { } } }); (n.cellContext || this.table.options.cellContext) && i.addEventListener("contextmenu", function (i) { var r = t.getComponent(); n.cellContext && n.cellContext.call(t.table, i, r); t.table.options.cellContext && t.table.options.cellContext.call(t.table, i, r) }) }; h.prototype._bindMouseEvents = function (n) { var t = this, i = t.element; (n.cellMouseEnter || t.table.options.cellMouseEnter) && i.addEventListener("mouseenter", function (i) { var r = t.getComponent(); n.cellMouseEnter && n.cellMouseEnter.call(t.table, i, r); t.table.options.cellMouseEnter && t.table.options.cellMouseEnter.call(t.table, i, r) }); (n.cellMouseLeave || t.table.options.cellMouseLeave) && i.addEventListener("mouseleave", function (i) { var r = t.getComponent(); n.cellMouseLeave && n.cellMouseLeave.call(t.table, i, r); t.table.options.cellMouseLeave && t.table.options.cellMouseLeave.call(t.table, i, r) }); (n.cellMouseOver || t.table.options.cellMouseOver) && i.addEventListener("mouseover", function (i) { var r = t.getComponent(); n.cellMouseOver && n.cellMouseOver.call(t.table, i, r); t.table.options.cellMouseOver && t.table.options.cellMouseOver.call(t.table, i, r) }); (n.cellMouseOut || t.table.options.cellMouseOut) && i.addEventListener("mouseout", function (i) { var r = t.getComponent(); n.cellMouseOut && n.cellMouseOut.call(t.table, i, r); t.table.options.cellMouseOut && t.table.options.cellMouseOut.call(t.table, i, r) }); (n.cellMouseMove || t.table.options.cellMouseMove) && i.addEventListener("mousemove", function (i) { var r = t.getComponent(); n.cellMouseMove && n.cellMouseMove.call(t.table, i, r); t.table.options.cellMouseMove && t.table.options.cellMouseMove.call(t.table, i, r) }) }; h.prototype._bindTouchEvents = function (n) { var i, r, u, t = this, f = t.element; (n.cellTap || this.table.options.cellTap) && (u = !1, f.addEventListener("touchstart", function () { u = !0 }, { passive: !0 }), f.addEventListener("touchend", function (i) { if (u) { var r = t.getComponent(); n.cellTap && n.cellTap.call(t.table, i, r); t.table.options.cellTap && t.table.options.cellTap.call(t.table, i, r) } u = !1 })); (n.cellDblTap || this.table.options.cellDblTap) && (i = null, f.addEventListener("touchend", function (r) { if (i) { clearTimeout(i); i = null; var u = t.getComponent(); n.cellDblTap && n.cellDblTap.call(t.table, r, u); t.table.options.cellDblTap && t.table.options.cellDblTap.call(t.table, r, u) } else i = setTimeout(function () { clearTimeout(i); i = null }, 300) })); (n.cellTapHold || this.table.options.cellTapHold) && (r = null, f.addEventListener("touchstart", function (i) { clearTimeout(r); r = setTimeout(function () { clearTimeout(r); r = null; u = !1; var f = t.getComponent(); n.cellTapHold && n.cellTapHold.call(t.table, i, f); t.table.options.cellTapHold && t.table.options.cellTapHold.call(t.table, i, f) }, 1e3) }, { passive: !0 }), f.addEventListener("touchend", function () { clearTimeout(r); r = null })) }; h.prototype._generateContents = function () { var n; switch (n = this.table.modExists("format") ? this.table.modules.format.formatValue(this) : this.element.innerHTML = this.value, void 0 === n ? "undefined" : _typeof(n)) { case "object": if (n instanceof Node) { for (; this.element.firstChild;)this.element.removeChild(this.element.firstChild); this.element.appendChild(n) } else this.element.innerHTML = "", null != n && console.warn("Format Error - Formatter has returned a type of object, the only valid formatter object return is an instance of Node, the formatter returned:", n); break; case "undefined": case "null": this.element.innerHTML = ""; break; default: this.element.innerHTML = n } }; h.prototype.cellRendered = function () { this.table.modExists("format") && this.table.modules.format.cellRendered && this.table.modules.format.cellRendered(this) }; h.prototype._generateTooltip = function () { var n = this.column.tooltip; n ? (!0 === n ? n = this.value : "function" == typeof n && !1 === (n = n(this.getComponent())) && (n = ""), void 0 === n && (n = ""), this.element.setAttribute("title", n)) : this.element.setAttribute("title", "") }; h.prototype.getElement = function () { return this.loaded || (this.loaded = !0, this.layoutElement()), this.element }; h.prototype.getValue = function () { return this.value }; h.prototype.getOldValue = function () { return this.oldValue }; h.prototype.setValue = function (n, t) { var i, r = this.setValueProcessData(n, t); r && (this.table.options.history && this.table.modExists("history") && this.table.modules.history.action("cellEdit", this, { oldValue: this.oldValue, newValue: this.value }), i = this.getComponent(), this.column.cellEvents.cellEdited && this.column.cellEvents.cellEdited.call(this.table, i), this.table.options.groupUpdateOnCellEdit && this.table.options.groupBy && this.table.modExists("groupRows") && this.table.modules.groupRows.reassignRowToGroup(this.row), this.cellRendered(), this.table.options.cellEdited.call(this.table, i), this.table.options.dataChanged && this.table.options.dataChanged.call(this.table, this.table.rowManager.getData())) }; h.prototype.setValueProcessData = function (n, t) { var i = !1; return this.value != n && (i = !0, t && this.column.modules.mutate && (n = this.table.modules.mutator.transformCell(this, n))), this.setValueActual(n), i && this.table.modExists("columnCalcs") && (this.column.definition.topCalc || this.column.definition.bottomCalc) && (this.table.options.groupBy && this.table.modExists("groupRows") ? ("table" != this.table.options.columnCalcs && "both" != this.table.options.columnCalcs || this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows), "table" != this.table.options.columnCalcs && this.table.modules.columnCalcs.recalcRowGroup(this.row)) : this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows)), i }; h.prototype.setValueActual = function (n) { this.oldValue = this.value; this.value = n; this.table.options.reactiveData && this.table.modExists("reactiveData") && this.table.modules.reactiveData.block(); this.column.setFieldValue(this.row.data, n); this.table.options.reactiveData && this.table.modExists("reactiveData") && this.table.modules.reactiveData.unblock(); this.loaded && this.layoutElement() }; h.prototype.layoutElement = function () { this._generateContents(); this._generateTooltip(); this.table.options.resizableColumns && this.table.modExists("resizeColumns") && "row" === this.row.type && this.table.modules.resizeColumns.initializeColumn("cell", this.column, this.element); (this.column.definition.contextMenu || this.column.definition.clickMenu) && this.table.modExists("menu") && this.table.modules.menu.initializeCell(this); this.table.modExists("frozenColumns") && this.table.modules.frozenColumns.layoutElement(this.element, this.column) }; h.prototype.setWidth = function () { this.width = this.column.width; this.element.style.width = this.column.widthStyled }; h.prototype.clearWidth = function () { this.width = ""; this.element.style.width = "" }; h.prototype.getWidth = function () { return this.width || this.element.offsetWidth }; h.prototype.setMinWidth = function () { this.minWidth = this.column.minWidth; this.element.style.minWidth = this.column.minWidthStyled }; h.prototype.checkHeight = function () { this.row.reinitializeHeight() }; h.prototype.clearHeight = function () { this.element.style.height = ""; this.height = null }; h.prototype.setHeight = function () { this.height = this.row.height; this.element.style.height = this.row.heightStyled }; h.prototype.getHeight = function () { return this.height || this.element.offsetHeight }; h.prototype.show = function () { this.element.style.display = this.column.vertAlign ? "inline-flex" : "" }; h.prototype.hide = function () { this.element.style.display = "none" }; h.prototype.edit = function (n) { if (this.table.modExists("edit", !0)) return this.table.modules.edit.editCell(this, n) }; h.prototype.cancelEdit = function () { if (this.table.modExists("edit", !0)) { var n = this.table.modules.edit.getCurrentCell(); n && n._getSelf() === this ? this.table.modules.edit.cancelEdit() : console.warn("Cancel Editor Error - This cell is not currently being edited ") } }; h.prototype.validate = function () { return this.column.modules.validate && this.table.modExists("validate", !0) ? !0 === this.table.modules.validate.validate(this.column.modules.validate, this, this.getValue()) : !0 }; h.prototype.delete = function () { !this.table.rowManager.redrawBlock && this.element.parentNode && this.element.parentNode.removeChild(this.element); this.modules.validate && this.modules.validate.invalid && this.table.modules.validate.clearValidation(this); this.modules.edit && this.modules.edit.edited && this.table.modules.edit.clearEdited(this); this.table.options.history && this.table.modules.history.clearComponentHistory(this); this.element = !1; this.column.deleteCell(this); this.row.deleteCell(this); this.calcs = {} }; h.prototype.nav = function () { var n = this, t = !1, i = this.row.getCellIndex(this); return { next: function () { var i, t = this.right(); return !!t || !(!(i = n.table.rowManager.nextDisplayRow(n.row, !0)) || !(t = i.findNextEditableCell(-1))) && (t.edit(), !0) }, prev: function () { var t, i = this.left(); return !!i || !(!(t = n.table.rowManager.prevDisplayRow(n.row, !0)) || !(i = t.findPrevEditableCell(t.cells.length))) && (i.edit(), !0) }, left: function () { return !!(t = n.row.findPrevEditableCell(i)) && (t.edit(), !0) }, right: function () { return !!(t = n.row.findNextEditableCell(i)) && (t.edit(), !0) }, up: function () { var t = n.table.rowManager.prevDisplayRow(n.row, !0); t && t.cells[i].edit() }, down: function () { var t = n.table.rowManager.nextDisplayRow(n.row, !0); t && t.cells[i].edit() } } }; h.prototype.getIndex = function () { this.row.getCellIndex(this) }; h.prototype.getComponent = function () { return this.component || (this.component = new p(this)), this.component }; lt = function (n) { this.table = n; this.active = !1; this.element = this.createElement(); this.external = !1; this.links = []; this._initialize() }; lt.prototype.createElement = function () { var n = document.createElement("div"); return n.classList.add("tabulator-footer"), n }; lt.prototype._initialize = function () { if (this.table.options.footerElement) switch (_typeof(this.table.options.footerElement)) { case "string": "<" === this.table.options.footerElement[0] ? this.element.innerHTML = this.table.options.footerElement : (this.external = !0, this.element = document.querySelector(this.table.options.footerElement)); break; default: this.element = this.table.options.footerElement } }; lt.prototype.getElement = function () { return this.element }; lt.prototype.append = function (n, t) { this.activate(t); this.element.appendChild(n); this.table.rowManager.adjustTableSize() }; lt.prototype.prepend = function (n, t) { this.activate(t); this.element.insertBefore(n, this.element.firstChild); this.table.rowManager.adjustTableSize() }; lt.prototype.remove = function (n) { n.parentNode.removeChild(n); this.deactivate() }; lt.prototype.deactivate = function (n) { this.element.firstChild && !n || (this.external || this.element.parentNode.removeChild(this.element), this.active = !1) }; lt.prototype.activate = function (n) { this.active || (this.active = !0, this.external || (this.table.element.appendChild(this.getElement()), this.table.element.style.display = "")); n && this.links.push(n) }; lt.prototype.redraw = function () { this.links.forEach(function (n) { n.footerRedraw() }) }; n = function e(n, t) { this.options = {}; this.columnManager = null; this.rowManager = null; this.footerManager = null; this.vdomHoz = null; this.browser = ""; this.browserSlow = !1; this.browserMobile = !1; this.rtl = !1; this.modules = {}; this.initializeElement(n) && (this.initializeOptions(t || {}), this._create()); e.prototype.comms.register(this) }; n.prototype.defaultOptions = { height: !1, minHeight: !1, maxHeight: !1, layout: "fitData", layoutColumnsOnNewData: !1, columnMinWidth: 40, columnHeaderVertAlign: "top", columnVertAlign: !1, resizableColumns: !0, resizableRows: !1, autoResize: !0, columns: [], cellHozAlign: "", cellVertAlign: "", headerHozAlign: "", data: [], autoColumns: !1, autoColumnsDefinitions: !1, reactiveData: !1, nestedFieldSeparator: ".", tooltips: !1, tooltipsHeader: !1, tooltipGenerationMode: "load", initialSort: !1, initialFilter: !1, initialHeaderFilter: !1, columnHeaderSortMulti: !0, sortOrderReverse: !1, headerSort: !0, headerSortTristate: !1, headerSortElement: "<div class='tabulator-arrow'><\/div>", footerElement: !1, index: "id", textDirection: "auto", keybindings: [], tabEndNewRow: !1, invalidOptionWarnings: !0, clipboard: !1, clipboardCopyStyled: !0, clipboardCopyConfig: !1, clipboardCopyFormatter: !1, clipboardCopyRowRange: "active", clipboardPasteParser: "table", clipboardPasteAction: "insert", clipboardCopied: function () { }, clipboardPasted: function () { }, clipboardPasteError: function () { }, downloadDataFormatter: !1, downloadReady: function (n, t) { return t }, downloadComplete: !1, downloadConfig: {}, downloadRowRange: "active", dataTree: !1, dataTreeFilter: !0, dataTreeSort: !0, dataTreeElementColumn: !1, dataTreeBranchElement: !0, dataTreeChildIndent: 9, dataTreeChildField: "_children", dataTreeCollapseElement: !1, dataTreeExpandElement: !1, dataTreeStartExpanded: !1, dataTreeRowExpanded: function () { }, dataTreeRowCollapsed: function () { }, dataTreeChildColumnCalcs: !1, dataTreeSelectPropagate: !1, printAsHtml: !1, printFormatter: !1, printHeader: !1, printFooter: !1, printCopyStyle: !0, printStyled: !0, printVisibleRows: !0, printRowRange: "visible", printConfig: {}, addRowPos: "bottom", selectable: "highlight", selectableRangeMode: "drag", selectableRollingSelection: !0, selectablePersistence: !0, selectableCheck: function () { return !0 }, headerFilterLiveFilterDelay: 300, headerFilterPlaceholder: !1, headerVisible: !0, history: !1, locale: !1, langs: {}, virtualDom: !0, virtualDomBuffer: 0, virtualDomHoz: !1, persistentLayout: !1, persistentSort: !1, persistentFilter: !1, persistenceID: "", persistenceMode: !0, persistenceReaderFunc: !1, persistenceWriterFunc: !1, persistence: !1, responsiveLayout: !1, responsiveLayoutCollapseStartOpen: !0, responsiveLayoutCollapseUseFormatters: !0, responsiveLayoutCollapseFormatter: !1, pagination: !1, paginationSize: !1, paginationInitialPage: 1, paginationButtonCount: 5, paginationSizeSelector: !1, paginationElement: !1, paginationDataSent: {}, paginationDataReceived: {}, paginationAddRow: "page", ajaxURL: !1, ajaxURLGenerator: !1, ajaxParams: {}, ajaxConfig: "get", ajaxContentType: "form", ajaxRequestFunc: !1, ajaxLoader: !0, ajaxLoaderLoading: !1, ajaxLoaderError: !1, ajaxFiltering: !1, ajaxSorting: !1, ajaxProgressiveLoad: !1, ajaxProgressiveLoadDelay: 0, ajaxProgressiveLoadScrollMargin: 0, groupBy: !1, groupStartOpen: !0, groupValues: !1, groupUpdateOnCellEdit: !1, groupHeader: !1, groupHeaderPrint: null, groupHeaderClipboard: null, groupHeaderHtmlOutput: null, groupHeaderDownload: null, htmlOutputConfig: !1, movableColumns: !1, movableRows: !1, movableRowsConnectedTables: !1, movableRowsConnectedElements: !1, movableRowsSender: !1, movableRowsReceiver: "insert", movableRowsSendingStart: function () { }, movableRowsSent: function () { }, movableRowsSentFailed: function () { }, movableRowsSendingStop: function () { }, movableRowsReceivingStart: function () { }, movableRowsReceived: function () { }, movableRowsReceivedFailed: function () { }, movableRowsReceivingStop: function () { }, movableRowsElementDrop: function () { }, scrollToRowPosition: "top", scrollToRowIfVisible: !0, scrollToColumnPosition: "left", scrollToColumnIfVisible: !0, rowFormatter: !1, rowFormatterPrint: null, rowFormatterClipboard: null, rowFormatterHtmlOutput: null, placeholder: !1, tableBuilding: function () { }, tableBuilt: function () { }, renderStarted: function () { }, renderComplete: function () { }, rowClick: !1, rowDblClick: !1, rowContext: !1, rowTap: !1, rowDblTap: !1, rowTapHold: !1, rowMouseEnter: !1, rowMouseLeave: !1, rowMouseOver: !1, rowMouseOut: !1, rowMouseMove: !1, rowContextMenu: !1, rowClickMenu: !1, rowAdded: function () { }, rowDeleted: function () { }, rowMoved: function () { }, rowUpdated: function () { }, rowSelectionChanged: function () { }, rowSelected: function () { }, rowDeselected: function () { }, rowResized: function () { }, cellClick: !1, cellDblClick: !1, cellContext: !1, cellTap: !1, cellDblTap: !1, cellTapHold: !1, cellMouseEnter: !1, cellMouseLeave: !1, cellMouseOver: !1, cellMouseOut: !1, cellMouseMove: !1, cellEditing: function () { }, cellEdited: function () { }, cellEditCancelled: function () { }, columnMoved: !1, columnResized: function () { }, columnTitleChanged: function () { }, columnVisibilityChanged: function () { }, htmlImporting: function () { }, htmlImported: function () { }, dataLoading: function () { }, dataLoaded: function () { }, dataEdited: !1, dataChanged: !1, ajaxRequesting: function () { }, ajaxResponse: !1, ajaxError: function () { }, dataFiltering: !1, dataFiltered: !1, dataSorting: function () { }, dataSorted: function () { }, groupToggleElement: "arrow", groupClosedShowCalcs: !1, dataGrouping: function () { }, dataGrouped: !1, groupVisibilityChanged: function () { }, groupClick: !1, groupDblClick: !1, groupContext: !1, groupContextMenu: !1, groupClickMenu: !1, groupTap: !1, groupDblTap: !1, groupTapHold: !1, columnCalcs: !0, pageLoaded: function () { }, localized: function () { }, validationMode: "blocking", validationFailed: function () { }, historyUndo: function () { }, historyRedo: function () { }, scrollHorizontal: function () { }, scrollVertical: function () { } }; n.prototype.initializeOptions = function (n) { var t; if (!1 !== n.invalidOptionWarnings) for (t in n) void 0 === this.defaultOptions[t] && console.warn("Invalid table constructor option:", t); for (t in this.defaultOptions) this.options[t] = t in n ? n[t] : Array.isArray(this.defaultOptions[t]) ? [] : "object" === _typeof(this.defaultOptions[t]) && null !== this.defaultOptions[t] ? {} : this.defaultOptions[t] }; n.prototype.initializeElement = function (n) { return "undefined" != typeof HTMLElement && n instanceof HTMLElement ? (this.element = n, !0) : "string" == typeof n ? (this.element = document.querySelector(n), !!this.element || (console.error("Tabulator Creation Error - no element found matching selector: ", n), !1)) : (console.error("Tabulator Creation Error - Invalid element provided:", n), !1) }; n.prototype.rtlCheck = function () { var n = window.getComputedStyle(this.element); switch (this.options.textDirection) { case "auto": if ("rtl" !== n.direction) break; case "rtl": this.element.classList.add("tabulator-rtl"); this.rtl = !0; break; case "ltr": this.element.classList.add("tabulator-ltr"); default: this.rtl = !1 } }; n.prototype._mapDepricatedFunctionality = function () { (this.options.persistentLayout || this.options.persistentSort || this.options.persistentFilter) && (this.options.persistence || (this.options.persistence = {})); this.options.dataEdited && (console.warn("DEPRECATION WARNING - dataEdited option has been deprecated, please use the dataChanged option instead"), this.options.dataChanged = this.options.dataEdited); this.options.downloadDataFormatter && console.warn("DEPRECATION WARNING - downloadDataFormatter option has been deprecated"); void 0 !== this.options.clipboardCopyHeader && (this.options.columnHeaders = this.options.clipboardCopyHeader, console.warn("DEPRECATION WARNING - clipboardCopyHeader option has been deprecated, please use the columnHeaders property on the clipboardCopyConfig option")); !0 !== this.options.printVisibleRows && (console.warn("printVisibleRows option is deprecated, you should now use the printRowRange option"), this.options.persistence.printRowRange = "active"); !0 !== this.options.printCopyStyle && (console.warn("printCopyStyle option is deprecated, you should now use the printStyled option"), this.options.persistence.printStyled = this.options.printCopyStyle); this.options.persistentLayout && (console.warn("persistentLayout option is deprecated, you should now use the persistence option"), !0 !== this.options.persistence && void 0 === this.options.persistence.columns && (this.options.persistence.columns = !0)); this.options.persistentSort && (console.warn("persistentSort option is deprecated, you should now use the persistence option"), !0 !== this.options.persistence && void 0 === this.options.persistence.sort && (this.options.persistence.sort = !0)); this.options.persistentFilter && (console.warn("persistentFilter option is deprecated, you should now use the persistence option"), !0 !== this.options.persistence && void 0 === this.options.persistence.filter && (this.options.persistence.filter = !0)); this.options.columnVertAlign && (console.warn("columnVertAlign option is deprecated, you should now use the columnHeaderVertAlign option"), this.options.columnHeaderVertAlign = this.options.columnVertAlign) }; n.prototype._clearSelection = function () { this.element.classList.add("tabulator-block-select"); window.getSelection ? window.getSelection().empty ? window.getSelection().empty() : window.getSelection().removeAllRanges && window.getSelection().removeAllRanges() : document.selection && document.selection.empty(); this.element.classList.remove("tabulator-block-select") }; n.prototype._create = function () { this._clearObjectPointers(); this._mapDepricatedFunctionality(); this.bindModules(); this.rtlCheck(); "TABLE" === this.element.tagName && this.modExists("htmlTableImport", !0) && this.modules.htmlTableImport.parseTable(); this.columnManager = new o(this); this.rowManager = new t(this); this.footerManager = new lt(this); this.columnManager.setRowManager(this.rowManager); this.rowManager.setColumnManager(this.columnManager); this.options.virtualDomHoz && (this.vdomHoz = new d(this)); this._buildElement(); this._loadInitialData() }; n.prototype._clearObjectPointers = function () { this.options.columns = this.options.columns.slice(0); this.options.reactiveData || (this.options.data = this.options.data.slice(0)) }; n.prototype._buildElement = function () { var s = this, i = this.element, t = this.modules, n = this.options, e, f, o, r, u; for (n.tableBuilding.call(this), i.classList.add("tabulator"), i.setAttribute("role", "grid"); i.firstChild;)i.removeChild(i.firstChild); n.height && (n.height = isNaN(n.height) ? n.height : n.height + "px", i.style.height = n.height); !1 !== n.minHeight && (n.minHeight = isNaN(n.minHeight) ? n.minHeight : n.minHeight + "px", i.style.minHeight = n.minHeight); !1 !== n.maxHeight && (n.maxHeight = isNaN(n.maxHeight) ? n.maxHeight : n.maxHeight + "px", i.style.maxHeight = n.maxHeight); this.columnManager.initialize(); this.rowManager.initialize(); this._detectBrowser(); this.modExists("layout", !0) && t.layout.initialize(n.layout); t.localize.initialize(); !1 !== n.headerFilterPlaceholder && t.localize.setHeaderFilterPlaceholder(n.headerFilterPlaceholder); for (e in n.langs) t.localize.installLang(e, n.langs[e]); (t.localize.setLocale(n.locale), "string" == typeof n.placeholder) && (f = document.createElement("div"), f.classList.add("tabulator-placeholder"), o = document.createElement("span"), o.innerHTML = n.placeholder, f.appendChild(o), n.placeholder = f); (i.appendChild(this.columnManager.getElement()), i.appendChild(this.rowManager.getElement()), n.footerElement && this.footerManager.activate(), n.persistence && this.modExists("persistence", !0) && t.persistence.initialize(), n.persistence && this.modExists("persistence", !0) && t.persistence.config.columns && (n.columns = t.persistence.load("columns", n.columns)), n.movableRows && this.modExists("moveRow") && t.moveRow.initialize(), n.autoColumns && this.options.data && this.columnManager.generateColumnsFromRowData(this.options.data), this.modExists("columnCalcs") && t.columnCalcs.initialize(), this.columnManager.setColumns(n.columns), n.dataTree && this.modExists("dataTree", !0) && t.dataTree.initialize(), this.modExists("frozenRows") && this.modules.frozenRows.initialize(), (n.persistence && this.modExists("persistence", !0) && t.persistence.config.sort || n.initialSort) && this.modExists("sort", !0)) && (r = [], n.persistence && this.modExists("persistence", !0) && t.persistence.config.sort ? !1 === (r = t.persistence.load("sort")) && n.initialSort && (r = n.initialSort) : n.initialSort && (r = n.initialSort), t.sort.setSort(r)); (n.persistence && this.modExists("persistence", !0) && t.persistence.config.filter || n.initialFilter) && this.modExists("filter", !0) && (u = [], n.persistence && this.modExists("persistence", !0) && t.persistence.config.filter ? !1 === (u = t.persistence.load("filter")) && n.initialFilter && (u = n.initialFilter) : n.initialFilter && (u = n.initialFilter), t.filter.setFilter(u)); n.initialHeaderFilter && this.modExists("filter", !0) && n.initialHeaderFilter.forEach(function (n) { var i = s.columnManager.findColumn(n.field); if (!i) return console.warn("Column Filter Error - No matching column found:", n.field), !1; t.filter.setHeaderFilterValue(i, n.value) }); this.modExists("ajax") && t.ajax.initialize(); n.pagination && this.modExists("page", !0) && t.page.initialize(); n.groupBy && this.modExists("groupRows", !0) && t.groupRows.initialize(); this.modExists("keybindings") && t.keybindings.initialize(); this.modExists("selectRow") && t.selectRow.clearSelectionData(!0); n.autoResize && this.modExists("resizeTable") && t.resizeTable.initialize(); this.modExists("clipboard") && t.clipboard.initialize(); n.printAsHtml && this.modExists("print") && t.print.initialize(); n.tableBuilt.call(this) }; n.prototype._loadInitialData = function () { var n = this; if (n.options.pagination && n.modExists("page")) if (n.modules.page.reset(!0, !0), "local" == n.options.pagination) { if (n.options.data.length) n.rowManager.setData(n.options.data, !1, !0); else { if ((n.options.ajaxURL || n.options.ajaxURLGenerator) && n.modExists("ajax")) return void n.modules.ajax.loadData(!1, !0).then(function () { }).catch(function () { n.options.paginationInitialPage && n.modules.page.setPage(n.options.paginationInitialPage) }); n.rowManager.setData(n.options.data, !1, !0) } n.options.paginationInitialPage && n.modules.page.setPage(n.options.paginationInitialPage) } else n.options.ajaxURL ? n.modules.page.setPage(n.options.paginationInitialPage).then(function () { }).catch(function () { }) : n.rowManager.setData([], !1, !0); else n.options.data.length ? n.rowManager.setData(n.options.data) : (n.options.ajaxURL || n.options.ajaxURLGenerator) && n.modExists("ajax") ? n.modules.ajax.loadData(!1, !0).then(function () { }).catch(function () { }) : n.rowManager.setData(n.options.data, !1, !0) }; n.prototype.destroy = function () { var t = this.element; for (n.prototype.comms.deregister(this), this.options.reactiveData && this.modExists("reactiveData", !0) && this.modules.reactiveData.unwatchData(), this.rowManager.rows.forEach(function (n) { n.wipe() }), this.rowManager.rows = [], this.rowManager.activeRows = [], this.rowManager.displayRows = [], this.options.autoResize && this.modExists("resizeTable") && this.modules.resizeTable.clearBindings(), this.modExists("keybindings") && this.modules.keybindings.clearBindings(); t.firstChild;)t.removeChild(t.firstChild); t.classList.remove("tabulator") }; n.prototype._detectBrowser = function () { var n = navigator.userAgent || navigator.vendor || window.opera; n.indexOf("Trident") > -1 ? (this.browser = "ie", this.browserSlow = !0) : n.indexOf("Edge") > -1 ? (this.browser = "edge", this.browserSlow = !0) : n.indexOf("Firefox") > -1 ? (this.browser = "firefox", this.browserSlow = !1) : (this.browser = "other", this.browserSlow = !1); this.browserMobile = /(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(n) || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(n.substr(0, 4)) }; n.prototype.blockRedraw = function () { return this.rowManager.blockRedraw() }; n.prototype.restoreRedraw = function () { return this.rowManager.restoreRedraw() }; n.prototype.setDataFromLocalFile = function (n) { var t = this; return new Promise(function (i, r) { var u = document.createElement("input"); u.type = "file"; u.accept = n || ".json,application/json"; u.addEventListener("change", function () { var f, e = u.files[0], n = new FileReader; n.readAsText(e); n.onload = function (u) { try { f = JSON.parse(n.result) } catch (u) { return console.warn("File Load Error - File contents is invalid JSON", u), void r(u) } t.setData(f).then(function (n) { i(n) }).catch(function (n) { i(n) }) }; n.onerror = function () { console.warn("File Load Error - Unable to read file"); r() } }); u.click() }) }; n.prototype.setData = function (n, t, i) { return this.modExists("ajax") && this.modules.ajax.blockActiveRequest(), this._setData(n, t, i, !1, !0) }; n.prototype._setData = function (n, t, i, r, u) { var f = this; return "string" != typeof n ? n ? f.rowManager.setData(n, r, u) : f.modExists("ajax") && (f.modules.ajax.getUrl || f.options.ajaxURLGenerator) ? "remote" == f.options.pagination && f.modExists("page", !0) ? (f.modules.page.reset(!0, !0), f.modules.page.setPage(1)) : f.modules.ajax.loadData(r, u) : f.rowManager.setData([], r, u) : 0 == n.indexOf("{") || 0 == n.indexOf("[") ? f.rowManager.setData(JSON.parse(n), r, u) : f.modExists("ajax", !0) ? (t && f.modules.ajax.setParams(t), i && f.modules.ajax.setConfig(i), f.modules.ajax.setUrl(n), "remote" == f.options.pagination && f.modExists("page", !0) ? (f.modules.page.reset(!0, !0), f.modules.page.setPage(1)) : f.modules.ajax.loadData(r, u)) : void 0 }; n.prototype.clearData = function () { this.modExists("ajax") && this.modules.ajax.blockActiveRequest(); this.rowManager.clearData() }; n.prototype.getData = function (n) { return !0 === n && (console.warn("passing a boolean to the getData function is deprecated, you should now pass the string 'active'"), n = "active"), this.rowManager.getData(n) }; n.prototype.getDataCount = function (n) { return !0 === n && (console.warn("passing a boolean to the getDataCount function is deprecated, you should now pass the string 'active'"), n = "active"), this.rowManager.getDataCount(n) }; n.prototype.searchRows = function (n, t, i) { if (this.modExists("filter", !0)) return this.modules.filter.search("rows", n, t, i) }; n.prototype.searchData = function (n, t, i) { if (this.modExists("filter", !0)) return this.modules.filter.search("data", n, t, i) }; n.prototype.getHtml = function (n, t, i) { if (this.modExists("export", !0)) return this.modules.export.getHtml(n, t, i) }; n.prototype.print = function (n, t, i) { if (this.modExists("print", !0)) return this.modules.print.printFullscreen(n, t, i) }; n.prototype.getAjaxUrl = function () { if (this.modExists("ajax", !0)) return this.modules.ajax.getUrl() }; n.prototype.replaceData = function (n, t, i) { return this.modExists("ajax") && this.modules.ajax.blockActiveRequest(), this._setData(n, t, i, !0) }; n.prototype.updateData = function (n) { var t = this, i = this, r = 0; return new Promise(function (u, f) { t.modExists("ajax") && t.modules.ajax.blockActiveRequest(); "string" == typeof n && (n = JSON.parse(n)); n ? n.forEach(function (n) { var t = i.rowManager.findRow(n[i.options.index]); t && (r++, t.updateData(n).then(function () { --r || u() })) }) : (console.warn("Update Error - No data provided"), f("Update Error - No data provided")) }) }; n.prototype.addData = function (n, t, i) { var r = this; return new Promise(function (u, f) { r.modExists("ajax") && r.modules.ajax.blockActiveRequest(); "string" == typeof n && (n = JSON.parse(n)); n ? r.rowManager.addRows(n, t, i).then(function (n) { var t = []; n.forEach(function (n) { t.push(n.getComponent()) }); u(t) }) : (console.warn("Update Error - No data provided"), f("Update Error - No data provided")) }) }; n.prototype.updateOrAddData = function (n) { var u = this, r = this, i = [], t = 0; return new Promise(function (f, e) { u.modExists("ajax") && u.modules.ajax.blockActiveRequest(); "string" == typeof n && (n = JSON.parse(n)); n ? n.forEach(function (n) { var u = r.rowManager.findRow(n[r.options.index]); t++; u ? u.updateData(n).then(function () { t--; i.push(u.getComponent()); t || f(i) }) : r.rowManager.addRows(n).then(function (n) { t--; i.push(n[0].getComponent()); t || f(i) }) }) : (console.warn("Update Error - No data provided"), e("Update Error - No data provided")) }) }; n.prototype.getRow = function (n) { var t = this.rowManager.findRow(n); return t ? t.getComponent() : (console.warn("Find Error - No matching row found:", n), !1) }; n.prototype.getRowFromPosition = function (n, t) { var i = this.rowManager.getRowFromPosition(n, t); return i ? i.getComponent() : (console.warn("Find Error - No matching row found:", n), !1) }; n.prototype.deleteRow = function (n) { var t = this; return new Promise(function (i, r) { function u() { ++s == n.length && e && (o.rowManager.reRenderInPosition(), i()) } var o = t, s = 0, e = 0, f = []; Array.isArray(n) || (n = [n]); n.forEach(function (n) { var i = t.rowManager.findRow(n, !0); i ? f.push(i) : (console.warn("Delete Error - No matching row found:", n), r("Delete Error - No matching row found"), u()) }); f.sort(function (n, i) { return t.rowManager.rows.indexOf(n) > t.rowManager.rows.indexOf(i) ? 1 : -1 }); f.forEach(function (n) { n.delete().then(function () { e++; u() }).catch(function (n) { u(); r(n) }) }) }) }; n.prototype.addRow = function (n, t, i) { var r = this; return new Promise(function (u) { "string" == typeof n && (n = JSON.parse(n)); r.rowManager.addRows(n, t, i).then(function (n) { r.modExists("columnCalcs") && r.modules.columnCalcs.recalc(r.rowManager.activeRows); u(n[0].getComponent()) }) }) }; n.prototype.updateOrAddRow = function (n, t) { var i = this; return new Promise(function (r, u) { var f = i.rowManager.findRow(n); "string" == typeof t && (t = JSON.parse(t)); f ? f.updateData(t).then(function () { i.modExists("columnCalcs") && i.modules.columnCalcs.recalc(i.rowManager.activeRows); r(f.getComponent()) }).catch(function (n) { u(n) }) : f = i.rowManager.addRows(t).then(function (n) { i.modExists("columnCalcs") && i.modules.columnCalcs.recalc(i.rowManager.activeRows); r(n[0].getComponent()) }).catch(function (n) { u(n) }) }) }; n.prototype.updateRow = function (n, t) { var i = this; return new Promise(function (r, u) { var f = i.rowManager.findRow(n); "string" == typeof t && (t = JSON.parse(t)); f ? f.updateData(t).then(function () { r(f.getComponent()) }).catch(function (n) { u(n) }) : (console.warn("Update Error - No matching row found:", n), u("Update Error - No matching row found")) }) }; n.prototype.scrollToRow = function (n, t, i) { var r = this; return new Promise(function (u, f) { var e = r.rowManager.findRow(n); e ? r.rowManager.scrollToRow(e, t, i).then(function () { u() }).catch(function (n) { f(n) }) : (console.warn("Scroll Error - No matching row found:", n), f("Scroll Error - No matching row found")) }) }; n.prototype.moveRow = function (n, t, i) { var r = this.rowManager.findRow(n); r ? r.moveToRow(t, i) : console.warn("Move Error - No matching row found:", n) }; n.prototype.getRows = function (n) { return !0 === n && (console.warn("passing a boolean to the getRows function is deprecated, you should now pass the string 'active'"), n = "active"), this.rowManager.getComponents(n) }; n.prototype.getRowPosition = function (n, t) { var i = this.rowManager.findRow(n); return i ? this.rowManager.getRowPosition(i, t) : (console.warn("Position Error - No matching row found:", n), !1) }; n.prototype.copyToClipboard = function (n) { this.modExists("clipboard", !0) && this.modules.clipboard.copy(n) }; n.prototype.setColumns = function (n) { this.columnManager.setColumns(n) }; n.prototype.getColumns = function (n) { return this.columnManager.getComponents(n) }; n.prototype.getColumn = function (n) { var t = this.columnManager.findColumn(n); return t ? t.getComponent() : (console.warn("Find Error - No matching column found:", n), !1) }; n.prototype.getColumnDefinitions = function () { return this.columnManager.getDefinitionTree() }; n.prototype.getColumnLayout = function () { if (this.modExists("persistence", !0)) return this.modules.persistence.parseColumns(this.columnManager.getColumns()) }; n.prototype.setColumnLayout = function (n) { return !!this.modExists("persistence", !0) && (this.columnManager.setColumns(this.modules.persistence.mergeDefinition(this.options.columns, n)), !0) }; n.prototype.showColumn = function (n) { var t = this.columnManager.findColumn(n); if (!t) return console.warn("Column Show Error - No matching column found:", n), !1; t.show(); this.options.responsiveLayout && this.modExists("responsiveLayout", !0) && this.modules.responsiveLayout.update() }; n.prototype.hideColumn = function (n) { var t = this.columnManager.findColumn(n); if (!t) return console.warn("Column Hide Error - No matching column found:", n), !1; t.hide(); this.options.responsiveLayout && this.modExists("responsiveLayout", !0) && this.modules.responsiveLayout.update() }; n.prototype.toggleColumn = function (n) { var t = this.columnManager.findColumn(n); if (!t) return console.warn("Column Visibility Toggle Error - No matching column found:", n), !1; t.visible ? t.hide() : t.show() }; n.prototype.addColumn = function (n, t, i) { var r = this; return new Promise(function (u, f) { var e = r.columnManager.findColumn(i); r.columnManager.addColumn(n, t, e).then(function (n) { u(n.getComponent()) }).catch(function (n) { f(n) }) }) }; n.prototype.deleteColumn = function (n) { var t = this; return new Promise(function (i, r) { var u = t.columnManager.findColumn(n); u ? u.delete().then(function () { i() }).catch(function (n) { r(n) }) : (console.warn("Column Delete Error - No matching column found:", n), r()) }) }; n.prototype.updateColumnDefinition = function (n, t) { var i = this; return new Promise(function (r, u) { var f = i.columnManager.findColumn(n); f ? f.updateDefinition(t).then(function (n) { r(n) }).catch(function (n) { u(n) }) : (console.warn("Column Update Error - No matching column found:", n), u()) }) }; n.prototype.moveColumn = function (n, t, i) { var u = this.columnManager.findColumn(n), r = this.columnManager.findColumn(t); u ? r ? this.columnManager.moveColumn(u, r, i) : console.warn("Move Error - No matching column found:", r) : console.warn("Move Error - No matching column found:", n) }; n.prototype.scrollToColumn = function (n, t, i) { var r = this; return new Promise(function (u, f) { var e = r.columnManager.findColumn(n); e ? r.columnManager.scrollToColumn(e, t, i).then(function () { u() }).catch(function (n) { f(n) }) : (console.warn("Scroll Error - No matching column found:", n), f("Scroll Error - No matching column found")) }) }; n.prototype.setLocale = function (n) { this.modules.localize.setLocale(n) }; n.prototype.getLocale = function () { return this.modules.localize.getLocale() }; n.prototype.getLang = function (n) { return this.modules.localize.getLang(n) }; n.prototype.redraw = function (n) { this.columnManager.redraw(n); this.rowManager.redraw(n) }; n.prototype.setHeight = function (n) { "classic" !== this.rowManager.renderMode ? (this.options.height = isNaN(n) ? n : n + "px", this.element.style.height = this.options.height, this.rowManager.setRenderMode(), this.rowManager.redraw()) : console.warn("setHeight function is not available in classic render mode") }; n.prototype.setSort = function (n, t) { this.modExists("sort", !0) && (this.modules.sort.setSort(n, t), this.rowManager.sorterRefresh()) }; n.prototype.getSorters = function () { if (this.modExists("sort", !0)) return this.modules.sort.getSort() }; n.prototype.clearSort = function () { this.modExists("sort", !0) && (this.modules.sort.clear(), this.rowManager.sorterRefresh()) }; n.prototype.setFilter = function (n, t, i, r) { this.modExists("filter", !0) && (this.modules.filter.setFilter(n, t, i, r), this.rowManager.filterRefresh()) }; n.prototype.addFilter = function (n, t, i, r) { this.modExists("filter", !0) && (this.modules.filter.addFilter(n, t, i, r), this.rowManager.filterRefresh()) }; n.prototype.getFilters = function (n) { if (this.modExists("filter", !0)) return this.modules.filter.getFilters(n) }; n.prototype.setHeaderFilterFocus = function (n) { if (this.modExists("filter", !0)) { var t = this.columnManager.findColumn(n); if (!t) return console.warn("Column Filter Focus Error - No matching column found:", n), !1; this.modules.filter.setHeaderFilterFocus(t) } }; n.prototype.getHeaderFilterValue = function (n) { if (this.modExists("filter", !0)) { var t = this.columnManager.findColumn(n); if (t) return this.modules.filter.getHeaderFilterValue(t); console.warn("Column Filter Error - No matching column found:", n) } }; n.prototype.setHeaderFilterValue = function (n, t) { if (this.modExists("filter", !0)) { var i = this.columnManager.findColumn(n); if (!i) return console.warn("Column Filter Error - No matching column found:", n), !1; this.modules.filter.setHeaderFilterValue(i, t) } }; n.prototype.getHeaderFilters = function () { if (this.modExists("filter", !0)) return this.modules.filter.getHeaderFilters() }; n.prototype.removeFilter = function (n, t, i) { this.modExists("filter", !0) && (this.modules.filter.removeFilter(n, t, i), this.rowManager.filterRefresh()) }; n.prototype.clearFilter = function (n) { this.modExists("filter", !0) && (this.modules.filter.clearFilter(n), this.rowManager.filterRefresh()) }; n.prototype.clearHeaderFilter = function () { this.modExists("filter", !0) && (this.modules.filter.clearHeaderFilter(), this.rowManager.filterRefresh()) }; n.prototype.selectRow = function (n) { this.modExists("selectRow", !0) && (!0 === n && (console.warn("passing a boolean to the selectRowselectRow function is deprecated, you should now pass the string 'active'"), n = "active"), this.modules.selectRow.selectRows(n)) }; n.prototype.deselectRow = function (n) { this.modExists("selectRow", !0) && this.modules.selectRow.deselectRows(n) }; n.prototype.toggleSelectRow = function (n) { this.modExists("selectRow", !0) && this.modules.selectRow.toggleRow(n) }; n.prototype.getSelectedRows = function () { if (this.modExists("selectRow", !0)) return this.modules.selectRow.getSelectedRows() }; n.prototype.getSelectedData = function () { if (this.modExists("selectRow", !0)) return this.modules.selectRow.getSelectedData() }; n.prototype.getInvalidCells = function () { if (this.modExists("validate", !0)) return this.modules.validate.getInvalidCells() }; n.prototype.clearCellValidation = function (n) { var t = this; this.modExists("validate", !0) && (n || (n = this.modules.validate.getInvalidCells()), Array.isArray(n) || (n = [n]), n.forEach(function (n) { t.modules.validate.clearValidation(n._getSelf()) })) }; n.prototype.validate = function () { var n = []; return this.rowManager.rows.forEach(function (t) { var i = t.validate(); !0 !== i && (n = n.concat(i)) }), !n.length || n }; n.prototype.setMaxPage = function (n) { if (!this.options.pagination || !this.modExists("page")) return !1; this.modules.page.setMaxPage(n) }; n.prototype.setPage = function (n) { return this.options.pagination && this.modExists("page") ? this.modules.page.setPage(n) : new Promise(function (n, t) { t() }) }; n.prototype.setPageToRow = function (n) { var t = this; return new Promise(function (i, r) { t.options.pagination && t.modExists("page") ? (n = t.rowManager.findRow(n), n ? t.modules.page.setPageToRow(n).then(function () { i() }).catch(function () { r() }) : r()) : r() }) }; n.prototype.setPageSize = function (n) { if (!this.options.pagination || !this.modExists("page")) return !1; this.modules.page.setPageSize(n); this.modules.page.setPage(1).then(function () { }).catch(function () { }) }; n.prototype.getPageSize = function () { if (this.options.pagination && this.modExists("page", !0)) return this.modules.page.getPageSize() }; n.prototype.previousPage = function () { if (!this.options.pagination || !this.modExists("page")) return !1; this.modules.page.previousPage() }; n.prototype.nextPage = function () { if (!this.options.pagination || !this.modExists("page")) return !1; this.modules.page.nextPage() }; n.prototype.getPage = function () { return !(!this.options.pagination || !this.modExists("page")) && this.modules.page.getPage() }; n.prototype.getPageMax = function () { return !(!this.options.pagination || !this.modExists("page")) && this.modules.page.getPageMax() }; n.prototype.setGroupBy = function (n) { if (!this.modExists("groupRows", !0)) return !1; this.options.groupBy = n; this.modules.groupRows.initialize(); this.rowManager.refreshActiveData("display"); this.options.persistence && this.modExists("persistence", !0) && this.modules.persistence.config.group && this.modules.persistence.save("group") }; n.prototype.setGroupValues = function (n) { if (!this.modExists("groupRows", !0)) return !1; this.options.groupValues = n; this.modules.groupRows.initialize(); this.rowManager.refreshActiveData("display"); this.options.persistence && this.modExists("persistence", !0) && this.modules.persistence.config.group && this.modules.persistence.save("group") }; n.prototype.setGroupStartOpen = function (n) { if (!this.modExists("groupRows", !0)) return !1; this.options.groupStartOpen = n; this.modules.groupRows.initialize(); this.options.groupBy ? (this.rowManager.refreshActiveData("group"), this.options.persistence && this.modExists("persistence", !0) && this.modules.persistence.config.group && this.modules.persistence.save("group")) : console.warn("Grouping Update - cant refresh view, no groups have been set") }; n.prototype.setGroupHeader = function (n) { if (!this.modExists("groupRows", !0)) return !1; this.options.groupHeader = n; this.modules.groupRows.initialize(); this.options.groupBy ? (this.rowManager.refreshActiveData("group"), this.options.persistence && this.modExists("persistence", !0) && this.modules.persistence.config.group && this.modules.persistence.save("group")) : console.warn("Grouping Update - cant refresh view, no groups have been set") }; n.prototype.getGroups = function () { return !!this.modExists("groupRows", !0) && this.modules.groupRows.getGroups(!0) }; n.prototype.getGroupedData = function () { if (this.modExists("groupRows", !0)) return this.options.groupBy ? this.modules.groupRows.getGroupedData() : this.getData() }; n.prototype.getEditedCells = function () { if (this.modExists("edit", !0)) return this.modules.edit.getEditedCells() }; n.prototype.clearCellEdited = function (n) { var t = this; this.modExists("edit", !0) && (n || (n = this.modules.edit.getEditedCells()), Array.isArray(n) || (n = [n]), n.forEach(function (n) { t.modules.edit.clearEdited(n._getSelf()) })) }; n.prototype.getCalcResults = function () { return !!this.modExists("columnCalcs", !0) && this.modules.columnCalcs.getResults() }; n.prototype.recalc = function () { this.modExists("columnCalcs", !0) && this.modules.columnCalcs.recalcAll(this.rowManager.activeRows) }; n.prototype.navigatePrev = function () { var n = !1; return !(!this.modExists("edit", !0) || !(n = this.modules.edit.currentCell)) && n.nav().prev() }; n.prototype.navigateNext = function () { var n = !1; return !(!this.modExists("edit", !0) || !(n = this.modules.edit.currentCell)) && n.nav().next() }; n.prototype.navigateLeft = function () { var n = !1; return !(!this.modExists("edit", !0) || !(n = this.modules.edit.currentCell)) && (e.preventDefault(), n.nav().left()) }; n.prototype.navigateRight = function () { var n = !1; return !(!this.modExists("edit", !0) || !(n = this.modules.edit.currentCell)) && (e.preventDefault(), n.nav().right()) }; n.prototype.navigateUp = function () { var n = !1; return !(!this.modExists("edit", !0) || !(n = this.modules.edit.currentCell)) && (e.preventDefault(), n.nav().up()) }; n.prototype.navigateDown = function () { var n = !1; return !(!this.modExists("edit", !0) || !(n = this.modules.edit.currentCell)) && (e.preventDefault(), n.nav().down()) }; n.prototype.undo = function () { return !(!this.options.history || !this.modExists("history", !0)) && this.modules.history.undo() }; n.prototype.redo = function () { return !(!this.options.history || !this.modExists("history", !0)) && this.modules.history.redo() }; n.prototype.getHistoryUndoSize = function () { return !(!this.options.history || !this.modExists("history", !0)) && this.modules.history.getHistoryUndoSize() }; n.prototype.getHistoryRedoSize = function () { return !(!this.options.history || !this.modExists("history", !0)) && this.modules.history.getHistoryRedoSize() }; n.prototype.download = function (n, t, i, r) { this.modExists("download", !0) && this.modules.download.download(n, t, i, r) }; n.prototype.downloadToTab = function (n, t, i, r) { this.modExists("download", !0) && this.modules.download.download(n, t, i, r, !0) }; n.prototype.tableComms = function (n, t, i, r) { this.modules.comms.receive(n, t, i, r) }; n.prototype.moduleBindings = {}; n.prototype.extendModule = function (t, i, r) { var u, f; if (n.prototype.moduleBindings[t]) if (u = n.prototype.moduleBindings[t].prototype[i], u) if ("object" == (void 0 === r ? "undefined" : _typeof(r))) for (f in r) u[f] = r[f]; else console.warn("Module Error - Invalid value type, it must be an object"); else console.warn("Module Error - property does not exist:", i); else console.warn("Module Error - module does not exist:", t) }; n.prototype.registerModule = function (t, i) { n.prototype.moduleBindings[t] = i }; n.prototype.bindModules = function () { this.modules = {}; for (var t in n.prototype.moduleBindings) this.modules[t] = new n.prototype.moduleBindings[t](this) }; n.prototype.modExists = function (n, t) { return !!this.modules[n] || (t && console.error("Tabulator Module Not Installed: " + n), !1) }; n.prototype.helpers = { elVisible: function (n) { return !(n.offsetWidth <= 0 && n.offsetHeight <= 0) }, elOffset: function (n) { var t = n.getBoundingClientRect(); return { top: t.top + window.pageYOffset - document.documentElement.clientTop, left: t.left + window.pageXOffset - document.documentElement.clientLeft } }, deepClone: function (n) { var i = Object.assign(Array.isArray(n) ? [] : {}, n); for (var t in n) null != n[t] && "object" === _typeof(n[t]) && (i[t] = n[t] instanceof Date ? new Date(n[t]) : this.deepClone(n[t])); return i } }; n.prototype.comms = { tables: [], register: function (t) { n.prototype.comms.tables.push(t) }, deregister: function (t) { var i = n.prototype.comms.tables.indexOf(t); i > -1 && n.prototype.comms.tables.splice(i, 1) }, lookupTable: function (t, i) { var u, f, r = [], e; if ("string" == typeof t) { if (u = document.querySelectorAll(t), u.length) for (e = 0; e < u.length; e++)(f = n.prototype.comms.matchElement(u[e])) && r.push(f) } else "undefined" != typeof HTMLElement && t instanceof HTMLElement || t instanceof n ? (f = n.prototype.comms.matchElement(t)) && r.push(f) : Array.isArray(t) ? t.forEach(function (t) { r = r.concat(n.prototype.comms.lookupTable(t)) }) : i || console.warn("Table Connection Error - Invalid Selector", t); return r }, matchElement: function (t) { return n.prototype.comms.tables.find(function (i) { return t instanceof n ? i === t : i.element === t }) } }; n.prototype.findTable = function (t) { var i = n.prototype.comms.lookupTable(t, !0); return !(Array.isArray(i) && !i.length) && i }; ti = function (n) { this.table = n; this.mode = null }; ti.prototype.initialize = function (n) { this.modes[n] ? this.mode = n : (console.warn("Layout Error - invalid mode set, defaulting to 'fitData' : " + n), this.mode = "fitData"); this.table.element.setAttribute("tabulator-layout", this.mode) }; ti.prototype.getMode = function () { return this.mode }; ti.prototype.layout = function () { this.modes[this.mode].call(this, this.table.columnManager.columnsByIndex) }; ti.prototype.modes = { fitData: function (n) { this.table.options.virtualDomHoz ? this.table.vdomHoz.fitDataLayoutOverride() : n.forEach(function (n) { n.reinitializeWidth() }); this.table.options.responsiveLayout && this.table.modExists("responsiveLayout", !0) && this.table.modules.responsiveLayout.update() }, fitDataFill: function (n) { n.forEach(function (n) { n.reinitializeWidth() }); this.table.options.responsiveLayout && this.table.modExists("responsiveLayout", !0) && this.table.modules.responsiveLayout.update() }, fitDataTable: function (n) { n.forEach(function (n) { n.reinitializeWidth() }); this.table.options.responsiveLayout && this.table.modExists("responsiveLayout", !0) && this.table.modules.responsiveLayout.update() }, fitDataStretch: function (n) { var u = this, r = 0, f = this.table.rowManager.element.clientWidth, i = 0, t = !1; n.forEach(function (n) { n.widthFixed || n.reinitializeWidth(); (u.table.options.responsiveLayout ? n.modules.responsive.visible : n.visible) && (t = n); n.visible && (r += n.getWidth()) }); t ? (i = f - r + t.getWidth(), this.table.options.responsiveLayout && this.table.modExists("responsiveLayout", !0) && (t.setWidth(0), this.table.modules.responsiveLayout.update()), i > 0 ? t.setWidth(i) : t.reinitializeWidth()) : this.table.options.responsiveLayout && this.table.modExists("responsiveLayout", !0) && this.table.modules.responsiveLayout.update() }, fitColumns: function (n) { function h(n) { return "string" == typeof n ? n.indexOf("%") > -1 ? o / 100 * parseInt(n) : parseInt(n) : n } function e(n, t, i, r) { function a(n) { return i * (n.column.definition.widthGrow || 1) } function v(n) { return h(n.width) - i * (n.column.definition.widthShrink || 0) } var s = [], y = 0, f = 0, c = 0, o = 0, u = 0, l = []; return n.forEach(function (n) { var t = r ? v(n) : a(n); n.column.minWidth >= t ? s.push(n) : (l.push(n), u += r ? n.column.definition.widthShrink || 1 : n.column.definition.widthGrow || 1) }), s.length ? (s.forEach(function (n) { y += r ? n.width - n.column.minWidth : n.column.minWidth; n.width = n.column.minWidth }), f = t - y, c = u ? Math.floor(f / u) : f, o = f - c * u, o += e(l, f, c, r)) : (o = u ? t - Math.floor(t / u) * u : t, l.forEach(function (n) { n.width = r ? v(n) : a(n) })), o } var v = this, o = v.table.element.clientWidth, c = 0, u = 0, l = 0, a = 0, t = [], i = [], s = 0, f = 0, r = 0; this.table.options.responsiveLayout && this.table.modExists("responsiveLayout", !0) && this.table.modules.responsiveLayout.update(); this.table.rowManager.element.scrollHeight > this.table.rowManager.element.clientHeight && (o -= this.table.rowManager.element.offsetWidth - this.table.rowManager.element.clientWidth); n.forEach(function (n) { var f, r, u; n.visible && (f = n.definition.width, r = parseInt(n.minWidth), f ? (u = h(f), c += u > r ? u : r, n.definition.widthShrink && (i.push({ column: n, width: u > r ? u : r }), s += n.definition.widthShrink)) : (t.push({ column: n, width: 0 }), l += n.definition.widthGrow || 1)) }); u = o - c; a = Math.floor(u / l); r = e(t, u, a, !1); t.length && r > 0 && (t[t.length - 1].width += +r); t.forEach(function (n) { u -= n.width }); f = Math.abs(r) + u; f > 0 && s && (r = e(i, f, Math.floor(f / s), !0)); i.length && (i[i.length - 1].width -= r); t.forEach(function (n) { n.column.setWidth(n.width) }); i.forEach(function (n) { n.column.setWidth(n.width) }) } }; n.prototype.registerModule("layout", ti); it = function (n) { this.table = n; this.locale = "default"; this.lang = !1; this.bindings = {}; this.langList = {} }; it.prototype.initialize = function () { this.langList = n.prototype.helpers.deepClone(this.langs) }; it.prototype.setHeaderFilterPlaceholder = function (n) { this.langList.default.headerFilters.default = n }; it.prototype.setHeaderFilterColumnPlaceholder = function (n, t) { this.langList.default.headerFilters.columns[n] = t; this.lang && !this.lang.headerFilters.columns[n] && (this.lang.headerFilters.columns[n] = t) }; it.prototype.installLang = function (n, t) { this.langList[n] ? this._setLangProp(this.langList[n], t) : this.langList[n] = t }; it.prototype._setLangProp = function (n, t) { for (var i in t) n[i] && "object" == _typeof(n[i]) ? this._setLangProp(n[i], t[i]) : n[i] = t[i] }; it.prototype.setLocale = function (t) { function u(n, t) { for (var i in n) "object" == _typeof(n[i]) ? (t[i] || (t[i] = {}), u(n[i], t[i])) : t[i] = n[i] } var i = this, r; (t = t || "default", !0 === t && navigator.language && (t = navigator.language.toLowerCase()), t && !i.langList[t]) && (r = t.split("-")[0], i.langList[r] ? (console.warn("Localization Error - Exact matching locale not found, using closest match: ", t, r), t = r) : (console.warn("Localization Error - Matching locale not found, using default: ", t), t = "default")); i.locale = t; i.lang = n.prototype.helpers.deepClone(i.langList.default || {}); "default" != t && u(i.langList[t], i.lang); i.table.options.localized.call(i.table, i.locale, i.lang); i._executeBindings() }; it.prototype.getLocale = function () { return self.locale }; it.prototype.getLang = function (n) { return n ? this.langList[n] : this.lang }; it.prototype.getText = function (n, t) { var n = t ? n + "|" + t : n, i = n.split("|"); return this._getLangElement(i, this.locale) || "" }; it.prototype._getLangElement = function (n) { var i = this, t = i.lang; return n.forEach(function (n) { var i; t && (i = t[n], t = void 0 !== i && i) }), t }; it.prototype.bind = function (n, t) { this.bindings[n] || (this.bindings[n] = []); this.bindings[n].push(t); t(this.getText(n), this.lang) }; it.prototype._executeBindings = function () { var n = this; for (var t in n.bindings) !function (t) { n.bindings[t].forEach(function (i) { i(n.getText(t), n.lang) }) }(t) }; it.prototype.langs = { "default": { groups: { item: "item", items: "items" }, columns: {}, ajax: { loading: "Loading", error: "Error" }, pagination: { page_size: "Page Size", page_title: "Show Page", first: "First", first_title: "First Page", last: "Last", last_title: "Last Page", prev: "Prev", prev_title: "Prev Page", next: "Next", next_title: "Next Page", all: "All" }, headerFilters: { "default": "filter column...", columns: {} } } }; n.prototype.registerModule("localize", it); ui = function (n) { this.table = n }; ui.prototype.getConnections = function (t) { var i, u = this, r = []; return i = n.prototype.comms.lookupTable(t), i.forEach(function (n) { u.table !== n && r.push(n) }), r }; ui.prototype.send = function (n, t, i, r) { var f = this, u = this.getConnections(n); u.forEach(function (n) { n.tableComms(f.table.element, t, i, r) }); !u.length && n && console.warn("Table Connection Error - No tables matching selector found", n) }; ui.prototype.receive = function (n, t, i, r) { if (this.table.modExists(t)) return this.table.modules[t].commsReceived(n, i, r); console.warn("Inter-table Comms Error - no such module:", t) }; n.prototype.registerModule("comms", ui); ii = function (n) { this.table = n; this.allowedTypes = ["", "data", "download", "clipboard", "print", "htmlOutput"] }; ii.prototype.initializeColumn = function (n) { var r = this, t = !1, i = {}; this.allowedTypes.forEach(function (u) { var e, f = "accessor" + (u.charAt(0).toUpperCase() + u.slice(1)); n.definition[f] && (e = r.lookupAccessor(n.definition[f])) && (t = !0, i[f] = { accessor: e, params: n.definition[f + "Params"] || {} }) }); t && (n.modules.accessor = i) }; ii.prototype.lookupAccessor = function (n) { var t = !1; switch (void 0 === n ? "undefined" : _typeof(n)) { case "string": this.accessors[n] ? t = this.accessors[n] : console.warn("Accessor Error - No such accessor found, ignoring: ", n); break; case "function": t = n }return t }; ii.prototype.transformRow = function (t, i) { var f = "accessor" + (i.charAt(0).toUpperCase() + i.slice(1)), u = t.getComponent(), r = n.prototype.helpers.deepClone(t.data || {}); return this.table.columnManager.traverse(function (n) { var e, t, s, o; n.modules.accessor && (t = n.modules.accessor[f] || n.modules.accessor.accessor || !1) && "undefined" != (e = n.getFieldValue(r)) && (o = n.getComponent(), s = "function" == typeof t.params ? t.params(e, r, i, o, u) : t.params, n.setFieldValue(r, t.accessor(e, r, i, s, o, u))) }), r }; ii.prototype.accessors = {}; n.prototype.registerModule("accessor", ii); v = function (n) { this.table = n; this.config = !1; this.url = ""; this.urlGenerator = !1; this.params = !1; this.loaderElement = this.createLoaderElement(); this.msgElement = this.createMsgElement(); this.loadingElement = !1; this.errorElement = !1; this.loaderPromise = !1; this.progressiveLoad = !1; this.loading = !1; this.requestOrder = 0 }; v.prototype.initialize = function () { var n; this.loaderElement.appendChild(this.msgElement); this.table.options.ajaxLoaderLoading && ("string" == typeof this.table.options.ajaxLoaderLoading ? (n = document.createElement("template"), n.innerHTML = this.table.options.ajaxLoaderLoading.trim(), this.loadingElement = n.content.firstChild) : this.loadingElement = this.table.options.ajaxLoaderLoading); this.loaderPromise = this.table.options.ajaxRequestFunc || this.defaultLoaderPromise; this.urlGenerator = this.table.options.ajaxURLGenerator || this.defaultURLGenerator; this.table.options.ajaxLoaderError && ("string" == typeof this.table.options.ajaxLoaderError ? (n = document.createElement("template"), n.innerHTML = this.table.options.ajaxLoaderError.trim(), this.errorElement = n.content.firstChild) : this.errorElement = this.table.options.ajaxLoaderError); this.table.options.ajaxParams && this.setParams(this.table.options.ajaxParams); this.table.options.ajaxConfig && this.setConfig(this.table.options.ajaxConfig); this.table.options.ajaxURL && this.setUrl(this.table.options.ajaxURL); this.table.options.ajaxProgressiveLoad && (this.table.options.pagination ? (this.progressiveLoad = !1, console.error("Progressive Load Error - Pagination and progressive load cannot be used at the same time")) : this.table.modExists("page") ? (this.progressiveLoad = this.table.options.ajaxProgressiveLoad, this.table.modules.page.initializeProgressive(this.progressiveLoad)) : console.error("Pagination plugin is required for progressive ajax loading")) }; v.prototype.createLoaderElement = function () { var n = document.createElement("div"); return n.classList.add("tabulator-loader"), n }; v.prototype.createMsgElement = function () { var n = document.createElement("div"); return n.classList.add("tabulator-loader-msg"), n.setAttribute("role", "alert"), n }; v.prototype.setParams = function (n, t) { if (t) { this.params = this.params || {}; for (var i in n) this.params[i] = n[i] } else this.params = n }; v.prototype.getParams = function () { return this.params || {} }; v.prototype.setConfig = function (n) { if (this._loadDefaultConfig(), "string" == typeof n) this.config.method = n; else for (var t in n) this.config[t] = n[t] }; v.prototype._loadDefaultConfig = function (n) { var t = this, i; if (!t.config || n) { t.config = {}; for (i in t.defaultConfig) t.config[i] = t.defaultConfig[i] } }; v.prototype.setUrl = function (n) { this.url = n }; v.prototype.getUrl = function () { return this.url }; v.prototype.loadData = function (n, t) { return this.progressiveLoad ? this._loadDataProgressive() : this._loadDataStandard(n, t) }; v.prototype.nextPage = function (n) { var t; this.loading || (t = this.table.options.ajaxProgressiveLoadScrollMargin || 2 * this.table.rowManager.getElement().clientHeight, n < t && this.table.modules.page.nextPage().then(function () { }).catch(function () { })) }; v.prototype.blockActiveRequest = function () { this.requestOrder++ }; v.prototype._loadDataProgressive = function () { return this.table.rowManager.setData([]), this.table.modules.page.setPage(1) }; v.prototype._loadDataStandard = function (n, t) { var i = this; return new Promise(function (r, u) { i.sendRequest(n).then(function (f) { i.table.rowManager.setData(f, n, t).then(function () { r() }).catch(function (n) { u(n) }) }).catch(function (n) { u(n) }) }) }; v.prototype.generateParamsList = function (n, t) { var u = this, i = [], r; if (t = t || "", Array.isArray(n)) n.forEach(function (n, r) { i = i.concat(u.generateParamsList(n, t ? t + "[" + r + "]" : r)) }); else if ("object" === (void 0 === n ? "undefined" : _typeof(n))) for (r in n) i = i.concat(u.generateParamsList(n[r], t ? t + "[" + r + "]" : r)); else i.push({ key: t, value: n }); return i }; v.prototype.serializeParams = function (n) { var i = this.generateParamsList(n), t = []; return i.forEach(function (n) { t.push(encodeURIComponent(n.key) + "=" + encodeURIComponent(n.value)) }), t.join("&") }; v.prototype.sendRequest = function (n) { var i, r = this, t = this, u = t.url; return t.requestOrder++, i = t.requestOrder, t._loadDefaultConfig(), new Promise(function (f, e) { !1 !== t.table.options.ajaxRequesting.call(r.table, t.url, t.params) ? (t.loading = !0, n || t.showLoader(), r.loaderPromise(u, t.config, t.params).then(function (n) { i === t.requestOrder ? (t.table.options.ajaxResponse && (n = t.table.options.ajaxResponse.call(t.table, t.url, t.params, n)), f(n), t.hideLoader(), t.loading = !1) : console.warn("Ajax Response Blocked - An active ajax request was blocked by an attempt to change table data while the request was being made") }).catch(function (n) { console.error("Ajax Load Error: ", n); t.table.options.ajaxError.call(t.table, n); t.showError(); setTimeout(function () { t.hideLoader() }, 3e3); t.loading = !1; e() })) : e() }) }; v.prototype.showLoader = function () { if ("function" == typeof this.table.options.ajaxLoader ? this.table.options.ajaxLoader() : this.table.options.ajaxLoader) { for (this.hideLoader(); this.msgElement.firstChild;)this.msgElement.removeChild(this.msgElement.firstChild); this.msgElement.classList.remove("tabulator-error"); this.msgElement.classList.add("tabulator-loading"); this.loadingElement ? this.msgElement.appendChild(this.loadingElement) : this.msgElement.innerHTML = this.table.modules.localize.getText("ajax|loading"); this.table.element.appendChild(this.loaderElement) } }; v.prototype.showError = function () { for (this.hideLoader(); this.msgElement.firstChild;)this.msgElement.removeChild(this.msgElement.firstChild); this.msgElement.classList.remove("tabulator-loading"); this.msgElement.classList.add("tabulator-error"); this.errorElement ? this.msgElement.appendChild(this.errorElement) : this.msgElement.innerHTML = this.table.modules.localize.getText("ajax|error"); this.table.element.appendChild(this.loaderElement) }; v.prototype.hideLoader = function () { this.loaderElement.parentNode && this.loaderElement.parentNode.removeChild(this.loaderElement) }; v.prototype.defaultConfig = { method: "GET" }; v.prototype.defaultURLGenerator = function (n, t, i) { return n && i && Object.keys(i).length && (t.method && "get" != t.method.toLowerCase() || (t.method = "get", n += (n.includes("?") ? "&" : "?") + this.serializeParams(i))), n }; v.prototype.defaultLoaderPromise = function (n, t, i) { var u, r = this; return new Promise(function (f, e) { if (n = r.urlGenerator(n, t, i), "GET" != t.method.toUpperCase()) if (u = "object" === _typeof(r.table.options.ajaxContentType) ? r.table.options.ajaxContentType : r.contentTypeFormatters[r.table.options.ajaxContentType]) { for (var o in u.headers) t.headers || (t.headers = {}), void 0 === t.headers[o] && (t.headers[o] = u.headers[o]); t.body = u.body.call(r, n, t, i) } else console.warn("Ajax Error - Invalid ajaxContentType value:", r.table.options.ajaxContentType); n ? (void 0 === t.headers && (t.headers = {}), void 0 === t.headers.Accept && (t.headers.Accept = "application/json"), void 0 === t.headers["X-Requested-With"] && (t.headers["X-Requested-With"] = "XMLHttpRequest"), void 0 === t.mode && (t.mode = "cors"), "cors" == t.mode ? (void 0 === t.headers["Access-Control-Allow-Origin"] && (t.headers["Access-Control-Allow-Origin"] = window.location.origin), void 0 === t.credentials && (t.credentials = "same-origin")) : void 0 === t.credentials && (t.credentials = "include"), fetch(n, t).then(function (n) { n.ok ? n.json().then(function (n) { f(n) }).catch(function (n) { e(n); console.warn("Ajax Load Error - Invalid JSON returned", n) }) : (console.error("Ajax Load Error - Connection Error: " + n.status, n.statusText), e(n)) }).catch(function (n) { console.error("Ajax Load Error - Connection Error: ", n); e(n) })) : (console.warn("Ajax Load Error - No URL Set"), f([])) }) }; v.prototype.contentTypeFormatters = { json: { headers: { "Content-Type": "application/json" }, body: function (n, t, i) { return JSON.stringify(i) } }, form: { headers: {}, body: function (n, t, i) { var u = this.generateParamsList(i), r = new FormData; return u.forEach(function (n) { r.append(n.key, n.value) }), r } } }; n.prototype.registerModule("ajax", v); dt = function (n) { this._row = n }; dt.prototype.getData = function (n) { return this._row.getData(n) }; dt.prototype.getElement = function () { return this._row.getElement() }; dt.prototype.getTable = function () { return this._row.table }; dt.prototype.getCells = function () { var n = []; return this._row.getCells().forEach(function (t) { n.push(t.getComponent()) }), n }; dt.prototype.getCell = function (n) { var t = this._row.getCell(n); return !!t && t.getComponent() }; dt.prototype._getSelf = function () { return this._row }; w = function (n) { this.table = n; this.topCalcs = []; this.botCalcs = []; this.genColumn = !1; this.topElement = this.createElement(); this.botElement = this.createElement(); this.topRow = !1; this.botRow = !1; this.topInitialized = !1; this.botInitialized = !1; this.initialize() }; w.prototype.createElement = function () { var n = document.createElement("div"); return n.classList.add("tabulator-calcs-holder"), n }; w.prototype.initialize = function () { this.genColumn = new r({ field: "value" }, this) }; w.prototype.registerColumnField = function () { }; w.prototype.initializeColumn = function (n) { var t = n.definition, i = { topCalcParams: t.topCalcParams || {}, botCalcParams: t.bottomCalcParams || {} }; if (t.topCalc) { switch (_typeof(t.topCalc)) { case "string": this.calculations[t.topCalc] ? i.topCalc = this.calculations[t.topCalc] : console.warn("Column Calc Error - No such calculation found, ignoring: ", t.topCalc); break; case "function": i.topCalc = t.topCalc }i.topCalc && (n.modules.columnCalcs = i, this.topCalcs.push(n), "group" != this.table.options.columnCalcs && this.initializeTopRow()) } if (t.bottomCalc) { switch (_typeof(t.bottomCalc)) { case "string": this.calculations[t.bottomCalc] ? i.botCalc = this.calculations[t.bottomCalc] : console.warn("Column Calc Error - No such calculation found, ignoring: ", t.bottomCalc); break; case "function": i.botCalc = t.bottomCalc }i.botCalc && (n.modules.columnCalcs = i, this.botCalcs.push(n), "group" != this.table.options.columnCalcs && this.initializeBottomRow()) } }; w.prototype.removeCalcs = function () { var n = !1; this.topInitialized && (this.topInitialized = !1, this.topElement.parentNode.removeChild(this.topElement), n = !0); this.botInitialized && (this.botInitialized = !1, this.table.footerManager.remove(this.botElement), n = !0); n && this.table.rowManager.adjustTableSize() }; w.prototype.initializeTopRow = function () { this.topInitialized || (this.table.columnManager.getElement().insertBefore(this.topElement, this.table.columnManager.headersElement.nextSibling), this.topInitialized = !0) }; w.prototype.initializeBottomRow = function () { this.botInitialized || (this.table.footerManager.prepend(this.botElement), this.botInitialized = !0) }; w.prototype.scrollHorizontal = function (n) { this.table.columnManager.getElement().scrollWidth; this.table.element.clientWidth; this.botInitialized && this.botRow && (this.botRow.getElement().style.marginLeft = -n + "px") }; w.prototype.recalc = function (n) { var t; if (this.topInitialized || this.botInitialized) { if (this.rowsToData(n), this.topInitialized) { for (this.topRow && this.topRow.deleteCells(), t = this.generateRow("top", this.rowsToData(n)), this.topRow = t; this.topElement.firstChild;)this.topElement.removeChild(this.topElement.firstChild); this.topElement.appendChild(t.getElement()); t.initialize(!0) } if (this.botInitialized) { for (this.botRow && this.botRow.deleteCells(), t = this.generateRow("bottom", this.rowsToData(n)), this.botRow = t; this.botElement.firstChild;)this.botElement.removeChild(this.botElement.firstChild); this.botElement.appendChild(t.getElement()); t.initialize(!0) } this.table.rowManager.adjustTableSize(); this.table.modExists("frozenColumns") && this.table.modules.frozenColumns.layout() } }; w.prototype.recalcRowGroup = function (n) { this.recalcGroup(this.table.modules.groupRows.getRowGroup(n)) }; w.prototype.recalcAll = function () { var n = this; (this.topCalcs.length || this.botCalcs.length) && ("group" !== this.table.options.columnCalcs && this.recalc(this.table.rowManager.activeRows), this.table.options.groupBy && "table" !== this.table.options.columnCalcs) && table.modules.groupRows.getChildGroups().forEach(function (t) { n.recalcGroup(t) }) }; w.prototype.recalcGroup = function (n) { var t, i; n && n.calcs && (n.calcs.bottom && (t = this.rowsToData(n.rows), i = this.generateRowData("bottom", t), n.calcs.bottom.updateData(i), n.calcs.bottom.reinitialize()), n.calcs.top && (t = this.rowsToData(n.rows), i = this.generateRowData("top", t), n.calcs.top.updateData(i), n.calcs.top.reinitialize())) }; w.prototype.generateTopRow = function (n) { return this.generateRow("top", this.rowsToData(n)) }; w.prototype.generateBottomRow = function (n) { return this.generateRow("bottom", this.rowsToData(n)) }; w.prototype.rowsToData = function (n) { var t = this, i = []; return n.forEach(function (n) { if (i.push(n.getData()), t.table.options.dataTree && t.table.options.dataTreeChildColumnCalcs && n.modules.dataTree.open) { var r = t.rowsToData(t.table.modules.dataTree.getFilteredTreeChildren(n)); i = i.concat(r) } }), i }; w.prototype.generateRow = function (n, t) { var r, i = this, f = this.generateRowData(n, t); return i.table.modExists("mutator") && i.table.modules.mutator.disable(), r = new u(f, this, "calc"), i.table.modExists("mutator") && i.table.modules.mutator.enable(), r.getElement().classList.add("tabulator-calcs", "tabulator-calcs-" + n), r.component = !1, r.getComponent = function () { return this.component || (this.component = new dt(this)), this.component }, r.generateCells = function () { var t = []; i.table.columnManager.columnsByIndex.forEach(function (u) { i.genColumn.setField(u.getField()); i.genColumn.hozAlign = u.hozAlign; i.genColumn.modules.format = u.definition[n + "CalcFormatter"] && i.table.modExists("format") ? { formatter: i.table.modules.format.getFormatter(u.definition[n + "CalcFormatter"]), params: u.definition[n + "CalcFormatterParams"] || {} } : { formatter: i.table.modules.format.getFormatter("plaintext"), params: {} }; i.genColumn.definition.cssClass = u.definition.cssClass; var f = new h(i.genColumn, r); f.getElement(); f.column = u; f.setWidth(); u.cells.push(f); t.push(f); u.visible || f.hide() }); this.cells = t }, r }; w.prototype.generateRowData = function (n, t) { var u, i, f = {}, e = "top" == n ? this.topCalcs : this.botCalcs, r = "top" == n ? "topCalc" : "botCalc"; return e.forEach(function (n) { var e = []; n.modules.columnCalcs && n.modules.columnCalcs[r] && (t.forEach(function (t) { e.push(n.getFieldValue(t)) }), i = r + "Params", u = "function" == typeof n.modules.columnCalcs[i] ? n.modules.columnCalcs[i](e, t) : n.modules.columnCalcs[i], n.setFieldValue(f, n.modules.columnCalcs[r](e, t, u))) }), f }; w.prototype.hasTopCalcs = function () { return !!this.topCalcs.length }; w.prototype.hasBottomCalcs = function () { return !!this.botCalcs.length }; w.prototype.redraw = function () { this.topRow && this.topRow.normalizeHeight(!0); this.botRow && this.botRow.normalizeHeight(!0) }; w.prototype.getResults = function () { var t, i = this, n = {}; return this.table.options.groupBy && this.table.modExists("groupRows") ? (t = this.table.modules.groupRows.getGroups(!0), t.forEach(function (t) { n[t.getKey()] = i.getGroupResults(t) })) : n = { top: this.topRow ? this.topRow.getData() : {}, bottom: this.botRow ? this.botRow.getData() : {} }, n }; w.prototype.getGroupResults = function (n) { var r = this, t = n._getSelf(), u = n.getSubGroups(), i = {}; return u.forEach(function (n) { i[n.getKey()] = r.getGroupResults(n) }), { top: t.calcs.top ? t.calcs.top.getData() : {}, bottom: t.calcs.bottom ? t.calcs.bottom.getData() : {}, groups: i } }; w.prototype.calculations = { avg: function (n, t, i) { var r = 0, u = void 0 !== i.precision ? i.precision : 2; return n.length && (r = n.reduce(function (n, t) { return t = Number(t), n + t }), r /= n.length, r = !1 !== u ? r.toFixed(u) : r), parseFloat(r).toString() }, max: function (n, t, i) { var r = null, u = void 0 !== i.precision && i.precision; return n.forEach(function (n) { ((n = Number(n)) > r || null === r) && (r = n) }), null !== r ? !1 !== u ? r.toFixed(u) : r : "" }, min: function (n, t, i) { var r = null, u = void 0 !== i.precision && i.precision; return n.forEach(function (n) { ((n = Number(n)) < r || null === r) && (r = n) }), null !== r ? !1 !== u ? r.toFixed(u) : r : "" }, sum: function (n, t, i) { var r = 0, u = void 0 !== i.precision && i.precision; return n.length && n.forEach(function (n) { n = Number(n); r += isNaN(n) ? 0 : Number(n) }), !1 !== u ? r.toFixed(u) : r }, concat: function (n) { var t = 0; return n.length && (t = n.reduce(function (n, t) { return String(n) + String(t) })), t }, count: function (n) { var t = 0; return n.length && n.forEach(function (n) { n && t++ }), t } }; n.prototype.registerModule("columnCalcs", w); ft = function (n) { this.table = n; this.mode = !0; this.pasteParser = function () { }; this.pasteAction = function () { }; this.customSelection = !1; this.rowRange = !1; this.blocked = !0 }; ft.prototype.initialize = function () { var n = this; this.mode = this.table.options.clipboard; this.rowRange = this.table.options.clipboardCopyRowRange; !0 !== this.mode && "copy" !== this.mode || this.table.element.addEventListener("copy", function (t) { var i, r, u; n.blocked || ((t.preventDefault(), n.customSelection) ? (i = n.customSelection, n.table.options.clipboardCopyFormatter && (i = n.table.options.clipboardCopyFormatter("plain", i))) : (u = n.table.modules.export.generateExportList(n.rowRange, n.table.options.clipboardCopyStyled, n.table.options.clipboardCopyConfig, "clipboard"), r = n.table.modules.export.genereateHTMLTable(u), i = r ? n.generatePlainContent(u) : "", n.table.options.clipboardCopyFormatter && (i = n.table.options.clipboardCopyFormatter("plain", i), r = n.table.options.clipboardCopyFormatter("html", r))), window.clipboardData && window.clipboardData.setData ? window.clipboardData.setData("Text", i) : t.clipboardData && t.clipboardData.setData ? (t.clipboardData.setData("text/plain", i), r && t.clipboardData.setData("text/html", r)) : t.originalEvent && t.originalEvent.clipboardData.setData && (t.originalEvent.clipboardData.setData("text/plain", i), r && t.originalEvent.clipboardData.setData("text/html", r)), n.table.options.clipboardCopied.call(n.table, i, r), n.reset()) }); !0 !== this.mode && "paste" !== this.mode || this.table.element.addEventListener("paste", function (t) { n.paste(t) }); this.setPasteParser(this.table.options.clipboardPasteParser); this.setPasteAction(this.table.options.clipboardPasteAction) }; ft.prototype.reset = function () { this.blocked = !1; this.originalSelectionText = "" }; ft.prototype.generatePlainContent = function (n) { var t = []; return n.forEach(function (n) { var i = []; n.columns.forEach(function (t) { var r = ""; if (t) if ("group" === n.type && (t.value = t.component.getKey()), null === t.value) r = ""; else switch (_typeof(t.value)) { case "object": r = JSON.stringify(t.value); break; case "undefined": r = ""; break; default: r = t.value }i.push(r) }); t.push(i.join("\t")) }), t.join("\n") }; ft.prototype.copy = function (n, t) { var n, i, r; this.blocked = !1; this.customSelection = !1; !0 !== this.mode && "copy" !== this.mode || (this.rowRange = n || this.table.options.clipboardCopyRowRange, void 0 !== window.getSelection && void 0 !== document.createRange ? (n = document.createRange(), n.selectNodeContents(this.table.element), i = window.getSelection(), i.toString() && t && (this.customSelection = i.toString()), i.removeAllRanges(), i.addRange(n)) : void 0 !== document.selection && void 0 !== document.body.createTextRange && (r = document.body.createTextRange(), r.moveToElementText(this.table.element), r.select()), document.execCommand("copy"), i && i.removeAllRanges()) }; ft.prototype.setPasteAction = function (n) { switch (void 0 === n ? "undefined" : _typeof(n)) { case "string": this.pasteAction = this.pasteActions[n]; this.pasteAction || console.warn("Clipboard Error - No such paste action found:", n); break; case "function": this.pasteAction = n } }; ft.prototype.setPasteParser = function (n) { switch (void 0 === n ? "undefined" : _typeof(n)) { case "string": this.pasteParser = this.pasteParsers[n]; this.pasteParser || console.warn("Clipboard Error - No such paste parser found:", n); break; case "function": this.pasteParser = n } }; ft.prototype.paste = function (n) { var i, t, r; this.checkPaseOrigin(n) && (i = this.getPasteData(n), t = this.pasteParser.call(this, i), t ? (n.preventDefault(), this.table.modExists("mutator") && (t = this.mutateData(t)), r = this.pasteAction.call(this, t), this.table.options.clipboardPasted.call(this.table, i, t, r)) : this.table.options.clipboardPasteError.call(this.table, i)) }; ft.prototype.mutateData = function (n) { var i = this, t = []; return Array.isArray(n) ? n.forEach(function (n) { t.push(i.table.modules.mutator.transformRow(n, "clipboard")) }) : t = n, t }; ft.prototype.checkPaseOrigin = function (n) { var t = !0; return ("DIV" != n.target.tagName || this.table.modules.edit.currentCell) && (t = !1), t }; ft.prototype.getPasteData = function (n) { var t; return window.clipboardData && window.clipboardData.getData ? t = window.clipboardData.getData("Text") : n.clipboardData && n.clipboardData.getData ? t = n.clipboardData.getData("text/plain") : n.originalEvent && n.originalEvent.clipboardData.getData && (t = n.originalEvent.clipboardData.getData("text/plain")), t }; ft.prototype.pasteParsers = { table: function (n) { var t = [], i = !0, u = this.table.columnManager.columns, r = [], f = []; return n = n.split("\n"), n.forEach(function (n) { t.push(n.split("\t")) }), !(!t.length || 1 === t.length && t[0].length < 2) && (t[0].forEach(function (n) { var t = u.find(function (t) { return n && t.definition.title && n.trim() && t.definition.title.trim() === n.trim() }); t ? r.push(t) : i = !1 }), i || (i = !0, r = [], t[0].forEach(function (n) { var t = u.find(function (t) { return n && t.field && n.trim() && t.field.trim() === n.trim() }); t ? r.push(t) : i = !1 }), i || (r = this.table.columnManager.columnsByIndex)), i && t.shift(), t.forEach(function (n) { var t = {}; n.forEach(function (n, i) { r[i] && (t[r[i].field] = n) }); f.push(t) }), f) } }; ft.prototype.pasteActions = { replace: function (n) { return this.table.setData(n) }, update: function (n) { return this.table.updateOrAddData(n) }, insert: function (n) { return this.table.addData(n) } }; n.prototype.registerModule("clipboard", ft); b = function (n) { this.table = n; this.indent = 10; this.field = ""; this.collapseEl = null; this.expandEl = null; this.branchEl = null; this.elementField = !1; this.startOpen = function () { }; this.displayIndex = 0 }; b.prototype.initialize = function () { var t = null, i = this.table.columnManager.getFirstVisibileColumn(), n = this.table.options; switch (this.field = n.dataTreeChildField, this.indent = n.dataTreeChildIndent, this.elementField = n.dataTreeElementColumn || !!i && i.field, n.dataTreeBranchElement && (!0 === n.dataTreeBranchElement ? (this.branchEl = document.createElement("div"), this.branchEl.classList.add("tabulator-data-tree-branch")) : "string" == typeof n.dataTreeBranchElement ? (t = document.createElement("div"), t.innerHTML = n.dataTreeBranchElement, this.branchEl = t.firstChild) : this.branchEl = n.dataTreeBranchElement), n.dataTreeCollapseElement ? "string" == typeof n.dataTreeCollapseElement ? (t = document.createElement("div"), t.innerHTML = n.dataTreeCollapseElement, this.collapseEl = t.firstChild) : this.collapseEl = n.dataTreeCollapseElement : (this.collapseEl = document.createElement("div"), this.collapseEl.classList.add("tabulator-data-tree-control"), this.collapseEl.tabIndex = 0, this.collapseEl.innerHTML = "<div class='tabulator-data-tree-control-collapse'><\/div>"), n.dataTreeExpandElement ? "string" == typeof n.dataTreeExpandElement ? (t = document.createElement("div"), t.innerHTML = n.dataTreeExpandElement, this.expandEl = t.firstChild) : this.expandEl = n.dataTreeExpandElement : (this.expandEl = document.createElement("div"), this.expandEl.classList.add("tabulator-data-tree-control"), this.expandEl.tabIndex = 0, this.expandEl.innerHTML = "<div class='tabulator-data-tree-control-expand'><\/div>"), _typeof(n.dataTreeStartExpanded)) { case "boolean": this.startOpen = function () { return n.dataTreeStartExpanded }; break; case "function": this.startOpen = n.dataTreeStartExpanded; break; default: this.startOpen = function (t, i) { return n.dataTreeStartExpanded[i] } } }; b.prototype.initializeRow = function (n) { var i = n.getData()[this.field], r = Array.isArray(i), t = r || !r && "object" === (void 0 === i ? "undefined" : _typeof(i)) && null !== i; !t && n.modules.dataTree && n.modules.dataTree.branchEl && n.modules.dataTree.branchEl.parentNode.removeChild(n.modules.dataTree.branchEl); !t && n.modules.dataTree && n.modules.dataTree.controlEl && n.modules.dataTree.controlEl.parentNode.removeChild(n.modules.dataTree.controlEl); n.modules.dataTree = { index: n.modules.dataTree ? n.modules.dataTree.index : 0, open: !!t && (n.modules.dataTree ? n.modules.dataTree.open : this.startOpen(n.getComponent(), 0)), controlEl: !(!n.modules.dataTree || !t) && n.modules.dataTree.controlEl, branchEl: !(!n.modules.dataTree || !t) && n.modules.dataTree.branchEl, parent: !!n.modules.dataTree && n.modules.dataTree.parent, children: t } }; b.prototype.layoutRow = function (n) { var r = this.elementField ? n.getCell(this.elementField) : n.getCells()[0], i = r.getElement(), t = n.modules.dataTree; t.branchEl && (t.branchEl.parentNode && t.branchEl.parentNode.removeChild(t.branchEl), t.branchEl = !1); t.controlEl && (t.controlEl.parentNode && t.controlEl.parentNode.removeChild(t.controlEl), t.controlEl = !1); this.generateControlElement(n, i); n.element.classList.add("tabulator-tree-level-" + t.index); t.index && (this.branchEl ? (t.branchEl = this.branchEl.cloneNode(!0), i.insertBefore(t.branchEl, i.firstChild), this.table.rtl ? t.branchEl.style.marginRight = (t.branchEl.offsetWidth + t.branchEl.style.marginLeft) * (t.index - 1) + t.index * this.indent + "px" : t.branchEl.style.marginLeft = (t.branchEl.offsetWidth + t.branchEl.style.marginRight) * (t.index - 1) + t.index * this.indent + "px") : this.table.rtl ? i.style.paddingRight = parseInt(window.getComputedStyle(i, null).getPropertyValue("padding-right")) + t.index * this.indent + "px" : i.style.paddingLeft = parseInt(window.getComputedStyle(i, null).getPropertyValue("padding-left")) + t.index * this.indent + "px") }; b.prototype.generateControlElement = function (n, t) { var u = this, i = n.modules.dataTree, t = t || n.getCells()[0].getElement(), r = i.controlEl; !1 !== i.children && (i.open ? (i.controlEl = this.collapseEl.cloneNode(!0), i.controlEl.addEventListener("click", function (t) { t.stopPropagation(); u.collapseRow(n) })) : (i.controlEl = this.expandEl.cloneNode(!0), i.controlEl.addEventListener("click", function (t) { t.stopPropagation(); u.expandRow(n) })), i.controlEl.addEventListener("mousedown", function (n) { n.stopPropagation() }), r && r.parentNode === t ? r.parentNode.replaceChild(i.controlEl, r) : t.insertBefore(i.controlEl, t.firstChild)) }; b.prototype.setDisplayIndex = function (n) { this.displayIndex = n }; b.prototype.getDisplayIndex = function () { return this.displayIndex }; b.prototype.getRows = function (n) { var i = this, t = []; return n.forEach(function (n) { var r, f; t.push(n); n instanceof u && (r = n.modules.dataTree.children, r.index || !1 === r.children || (f = i.getChildren(n), f.forEach(function (n) { t.push(n) }))) }), t }; b.prototype.getChildren = function (n) { var u = this, t = n.modules.dataTree, i = [], r = []; return !1 !== t.children && t.open && (Array.isArray(t.children) || (t.children = this.generateChildren(n)), i = this.table.modExists("filter") && this.table.options.dataTreeFilter ? this.table.modules.filter.filter(t.children) : t.children, this.table.modExists("sort") && this.table.options.dataTreeSort && this.table.modules.sort.sort(i), i.forEach(function (n) { r.push(n); u.getChildren(n).forEach(function (n) { r.push(n) }) })), r }; b.prototype.generateChildren = function (n) { var i = this, r = [], t = n.getData()[this.field]; return Array.isArray(t) || (t = [t]), t.forEach(function (t) { var f = new u(t || {}, i.table.rowManager); f.modules.dataTree.index = n.modules.dataTree.index + 1; f.modules.dataTree.parent = n; f.modules.dataTree.children && (f.modules.dataTree.open = i.startOpen(f.getComponent(), f.modules.dataTree.index)); r.push(f) }), r }; b.prototype.expandRow = function (n) { var t = n.modules.dataTree; !1 !== t.children && (t.open = !0, n.reinitialize(), this.table.rowManager.refreshActiveData("tree", !1, !0), this.table.options.dataTreeRowExpanded(n.getComponent(), n.modules.dataTree.index)) }; b.prototype.collapseRow = function (n) { var t = n.modules.dataTree; !1 !== t.children && (t.open = !1, n.reinitialize(), this.table.rowManager.refreshActiveData("tree", !1, !0), this.table.options.dataTreeRowCollapsed(n.getComponent(), n.modules.dataTree.index)) }; b.prototype.toggleRow = function (n) { var t = n.modules.dataTree; !1 !== t.children && (t.open ? this.collapseRow(n) : this.expandRow(n)) }; b.prototype.getTreeParent = function (n) { return !!n.modules.dataTree.parent && n.modules.dataTree.parent.getComponent() }; b.prototype.getFilteredTreeChildren = function (n) { var i, t = n.modules.dataTree, r = []; return t.children && (Array.isArray(t.children) || (t.children = this.generateChildren(n)), i = this.table.modExists("filter") && this.table.options.dataTreeFilter ? this.table.modules.filter.filter(t.children) : t.children, i.forEach(function (n) { n instanceof u && r.push(n) })), r }; b.prototype.rowDelete = function (n) { var i, t = n.modules.dataTree.parent; t && (i = this.findChildIndex(n, t), !1 !== i && t.data[this.field].splice(i, 1), t.data[this.field].length || delete t.data[this.field], this.initializeRow(t), this.layoutRow(t)); this.table.rowManager.refreshActiveData("tree", !1, !0) }; b.prototype.addTreeChildRow = function (n, t, i, r) { var u = !1; "string" == typeof t && (t = JSON.parse(t)); Array.isArray(n.data[this.field]) || (n.data[this.field] = [], n.modules.dataTree.open = this.startOpen(n.getComponent(), n.modules.dataTree.index)); void 0 !== r && !1 !== (u = this.findChildIndex(r, n)) && n.data[this.field].splice(i ? u : u + 1, 0, t); !1 === u && (i ? n.data[this.field].unshift(t) : n.data[this.field].push(t)); this.initializeRow(n); this.layoutRow(n); this.table.rowManager.refreshActiveData("tree", !1, !0) }; b.prototype.findChildIndex = function (n, t) { var r = this, i = !1; return "object" == (void 0 === n ? "undefined" : _typeof(n)) ? n instanceof u ? i = n.data : n instanceof s ? i = n._getSelf().data : "undefined" != typeof HTMLElement && n instanceof HTMLElement && t.modules.dataTree && (i = t.modules.dataTree.children.find(function (t) { return t instanceof u && t.element === n })) && (i = i.data) : i = void 0 !== n && null !== n && t.data[this.field].find(function (t) { return t.data[r.table.options.index] == n }), i && (Array.isArray(t.data[this.field]) && (i = t.data[this.field].indexOf(i)), -1 == i && (i = !1)), i }; b.prototype.getTreeChildren = function (n, t, i) { var e = this, r = n.modules.dataTree, f = []; return r.children && (Array.isArray(r.children) || (r.children = this.generateChildren(n)), r.children.forEach(function (n) { n instanceof u && (f.push(t ? n.getComponent() : n), i && (f = f.concat(e.getTreeChildren(n, t, i)))) })), f }; b.prototype.checkForRestyle = function (n) { n.row.cells.indexOf(n) || n.row.reinitialize() }; b.prototype.getChildField = function () { return this.field }; b.prototype.redrawNeeded = function (n) { return !!this.field && void 0 !== n[this.field] || !!this.elementField && void 0 !== n[this.elementField] }; n.prototype.registerModule("dataTree", b); ni = function (n) { this.table = n }; ni.prototype.download = function (n, t, i, r, u) { function s(i, r) { u ? !0 === u ? f.triggerDownload(i, r, n, t, !0) : u(i) : f.triggerDownload(i, r, n, t) } var f = this, e = !1, o; ("function" == typeof n ? e = n : f.downloaders[n] ? e = f.downloaders[n] : console.warn("Download Error - No such download type found: ", n), e) && (o = this.generateExportList(r), e.call(this.table, o, i || {}, s)) }; ni.prototype.generateExportList = function (n) { var i = this.table.modules.export.generateExportList(this.table.options.downloadConfig, !1, n || this.table.options.downloadRowRange, "download"), t = this.table.options.groupHeaderDownload; return t && !Array.isArray(t) && (t = [t]), i.forEach(function (n) { var i; "group" === n.type && (i = n.columns[0], t && t[n.indent] && (i.value = t[n.indent](i.value, n.component._group.getRowCount(), n.component._group.getData(), n.component))) }), i }; ni.prototype.triggerDownload = function (n, t, i, r, u) { var f = document.createElement("a"), e = new Blob([n], { type: t }), r = r || "Tabulator." + ("function" == typeof i ? "txt" : i); (e = this.table.options.downloadReady.call(this.table, n, e)) && (u ? window.open(window.URL.createObjectURL(e)) : navigator.msSaveOrOpenBlob ? navigator.msSaveOrOpenBlob(e, r) : (f.setAttribute("href", window.URL.createObjectURL(e)), f.setAttribute("download", r), f.style.display = "none", document.body.appendChild(f), f.click(), document.body.removeChild(f)), this.table.options.downloadComplete && this.table.options.downloadComplete()) }; ni.prototype.commsReceived = function (n, t, i) { switch (t) { case "intercept": this.download(i.type, "", i.options, i.active, i.intercept) } }; ni.prototype.downloaders = { csv: function (n, t, i) { var f = t && t.delimiter ? t.delimiter : ",", r = [], u = []; n.forEach(function (n) { var t = []; switch (n.type) { case "group": console.warn("Download Warning - CSV downloader cannot process row groups"); break; case "calc": console.warn("Download Warning - CSV downloader cannot process column calculations"); break; case "header": n.columns.forEach(function (n, t) { n && 1 === n.depth && (u[t] = void 0 === n.value || null === n.value ? "" : '"' + String(n.value).split('"').join('""') + '"') }); break; case "row": n.columns.forEach(function (n) { if (n) { switch (_typeof(n.value)) { case "object": n.value = JSON.stringify(n.value); break; case "undefined": case "null": n.value = "" }t.push('"' + String(n.value).split('"').join('""') + '"') } }); r.push(t.join(f)) } }); u.length && r.unshift(u.join(f)); r = r.join("\n"); t.bom && (r = "" + r); i(r, "text/csv") }, json: function (n, t, i) { var r = []; n.forEach(function (n) { var t = {}; switch (n.type) { case "group": console.warn("Download Warning - JSON downloader cannot process row groups"); break; case "calc": console.warn("Download Warning - JSON downloader cannot process column calculations"); break; case "row": n.columns.forEach(function (n) { n && (t[n.component.getField()] = n.value) }); r.push(t) } }); r = JSON.stringify(r, null, "\t"); i(r, "application/json") }, pdf: function (n, t, i) { function e(n, t) { var i = []; return n.columns.forEach(function (n) { var r; if (n) { switch (_typeof(n.value)) { case "object": n.value = JSON.stringify(n.value); break; case "undefined": case "null": n.value = "" }r = { content: n.value, colSpan: n.width, rowSpan: n.height }; t && (r.styles = t); i.push(r) } else i.push("") }), i } var s = [], o = [], u = {}, c = t.rowGroupStyles || { fontStyle: "bold", fontSize: 12, cellPadding: 6, fillColor: 220 }, l = t.rowCalcStyles || { fontStyle: "bold", fontSize: 10, cellPadding: 4, fillColor: 232 }, f = t.jsPDF || {}, h = t && t.title ? t.title : "", r; f.orientation || (f.orientation = t.orientation || "landscape"); f.unit || (f.unit = "pt"); n.forEach(function (n) { switch (n.type) { case "header": s.push(e(n)); break; case "group": o.push(e(n, c)); break; case "calc": o.push(e(n, l)); break; case "row": o.push(e(n)) } }); r = new jsPDF(f); t && t.autoTable && (u = "function" == typeof t.autoTable ? t.autoTable(r) || {} : t.autoTable); h && (u.addPageContent = function () { r.text(h, 40, 30) }); u.head = s; u.body = o; r.autoTable(u); t && t.documentProcessing && t.documentProcessing(r); i(r.output("arraybuffer"), "application/pdf") }, xlsx: function (n, t, i) { function f() { var r = [], i = [], t = {}, u = { s: { c: 0, r: 0 }, e: { c: n[0] ? n[0].columns.reduce(function (n, t) { return n + (t && t.width ? t.width : 1) }, 0) : 0, r: n.length } }; return n.forEach(function (n, t) { var u = []; n.columns.forEach(function (n, r) { n ? (u.push(n.value instanceof Date || "object" !== _typeof(n.value) ? n.value : JSON.stringify(n.value)), (n.width > 1 || n.height > -1) && i.push({ s: { r: t, c: r }, e: { r: t + n.height - 1, c: r + n.width - 1 } })) : u.push("") }); r.push(u) }), XLSX.utils.sheet_add_aoa(t, r), t["!ref"] = XLSX.utils.encode_range(u), i.length && (t["!merges"] = i), t } var e, s = this, o = t.sheetName || "Sheet1", r = XLSX.utils.book_new(), u; if (r.SheetNames = [], r.Sheets = {}, t.sheetOnly) return void i(f()); if (t.sheets) for (u in t.sheets) !0 === t.sheets[u] ? (r.SheetNames.push(u), r.Sheets[u] = f()) : (r.SheetNames.push(u), this.modules.comms.send(t.sheets[u], "download", "intercept", { type: "xlsx", options: { sheetOnly: !0 }, active: s.active, intercept: function (n) { r.Sheets[u] = n } })); else r.SheetNames.push(o), r.Sheets[o] = f(); t.documentProcessing && (r = t.documentProcessing(r)); e = XLSX.write(r, { bookType: "xlsx", bookSST: !0, type: "binary" }); i(function (n) { for (var i = new ArrayBuffer(n.length), r = new Uint8Array(i), t = 0; t != n.length; ++t)r[t] = 255 & n.charCodeAt(t); return i }(e), "application/octet-stream") }, html: function (n, t, i) { this.modExists("export", !0) && i(this.modules.export.genereateHTMLTable(n), "text/html") } }; n.prototype.registerModule("download", ni); rt = function (n) { this.table = n; this.currentCell = !1; this.mouseClick = !1; this.recursionBlock = !1; this.invalidEdit = !1; this.editedCells = [] }; rt.prototype.initializeColumn = function (n) { var t = this, i = { editor: !1, blocked: !1, check: n.definition.editable, params: n.definition.editorParams || {} }; switch (_typeof(n.definition.editor)) { case "string": "tick" === n.definition.editor && (n.definition.editor = "tickCross", console.warn("DEPRECATION WARNING - the tick editor has been deprecated, please use the tickCross editor")); t.editors[n.definition.editor] ? i.editor = t.editors[n.definition.editor] : console.warn("Editor Error - No such editor found: ", n.definition.editor); break; case "function": i.editor = n.definition.editor; break; case "boolean": !0 === n.definition.editor && ("function" != typeof n.definition.formatter ? ("tick" === n.definition.formatter && (n.definition.formatter = "tickCross", console.warn("DEPRECATION WARNING - the tick editor has been deprecated, please use the tickCross editor")), i.editor = t.editors[n.definition.formatter] ? t.editors[n.definition.formatter] : t.editors.input) : console.warn("Editor Error - Cannot auto lookup editor for a custom formatter: ", n.definition.formatter)) }i.editor && (n.modules.edit = i) }; rt.prototype.getCurrentCell = function () { return !!this.currentCell && this.currentCell.getComponent() }; rt.prototype.clearEditor = function (n) { var t, i = this.currentCell; if (this.invalidEdit = !1, i) { for (this.currentCell = !1, t = i.getElement(), n ? i.validate() : t.classList.remove("tabulator-validation-fail"), t.classList.remove("tabulator-editing"); t.firstChild;)t.removeChild(t.firstChild); i.row.getElement().classList.remove("tabulator-row-editing") } }; rt.prototype.cancelEdit = function () { if (this.currentCell) { var n = this.currentCell, t = this.currentCell.getComponent(); this.clearEditor(!0); n.setValueActual(n.getValue()); n.cellRendered(); ("textarea" == n.column.definition.editor || n.column.definition.variableHeight) && n.row.normalizeHeight(!0); n.column.cellEvents.cellEditCancelled && n.column.cellEvents.cellEditCancelled.call(this.table, t); this.table.options.cellEditCancelled.call(this.table, t) } }; rt.prototype.bindEditor = function (n) { var i = this, t = n.getElement(); t.setAttribute("tabindex", 0); t.addEventListener("click", function () { t.classList.contains("tabulator-editing") || t.focus({ preventScroll: !0 }) }); t.addEventListener("mousedown", function (n) { 2 === n.button ? n.preventDefault() : i.mouseClick = !0 }); t.addEventListener("focus", function (t) { i.recursionBlock || i.edit(n, t, !1) }) }; rt.prototype.focusCellNoEvent = function (n, t) { this.recursionBlock = !0; t && "ie" === this.table.browser || n.getElement().focus({ preventScroll: !0 }); this.recursionBlock = !1 }; rt.prototype.editCell = function (n, t) { this.focusCellNoEvent(n); this.edit(n, !1, t) }; rt.prototype.focusScrollAdjust = function (n) { if ("virtual" == this.table.rowManager.getRenderMode()) { var f = this.table.rowManager.element.scrollTop, e = this.table.rowManager.element.clientHeight + this.table.rowManager.element.scrollTop, t = n.row.getElement(); t.offsetTop; t.offsetTop < f ? this.table.rowManager.element.scrollTop -= f - t.offsetTop : t.offsetTop + t.offsetHeight > e && (this.table.rowManager.element.scrollTop += t.offsetTop + t.offsetHeight - e); var r = this.table.rowManager.element.scrollLeft, u = this.table.rowManager.element.clientWidth + this.table.rowManager.element.scrollLeft, i = n.getElement(); i.offsetLeft; this.table.modExists("frozenColumns") && (r += parseInt(this.table.modules.frozenColumns.leftMargin), u -= parseInt(this.table.modules.frozenColumns.rightMargin)); i.offsetLeft < r ? this.table.rowManager.element.scrollLeft -= r - i.offsetLeft : i.offsetLeft + i.offsetWidth > u && (this.table.rowManager.element.scrollLeft += i.offsetLeft + i.offsetWidth - u) } }; rt.prototype.edit = function (n, t, i) { function a(t) { if (r.currentCell === n) { var i = !0; return n.column.modules.validate && r.table.modExists("validate") && "manual" != r.table.options.validationMode && (i = r.table.modules.validate.validate(n.column.modules.validate, n, t)), !0 === i || "highlight" === r.table.options.validationMode ? (r.clearEditor(), n.modules.edit || (n.modules.edit = {}), n.modules.edit.edited = !0, -1 == r.editedCells.indexOf(n) && r.editedCells.push(n), n.setValue(t, !0), r.table.options.dataTree && r.table.modExists("dataTree") && r.table.modules.dataTree.checkForRestyle(n), !0 === i || (u.classList.add("tabulator-validation-fail"), r.table.options.validationFailed.call(r.table, n.getComponent(), t, i), !1)) : (r.invalidEdit = !0, u.classList.add("tabulator-validation-fail"), r.focusCellNoEvent(n, !0), h(), r.table.options.validationFailed.call(r.table, n.getComponent(), t, i), !1) } } function v() { r.currentCell === n && (r.cancelEdit(), r.table.options.dataTree && r.table.modExists("dataTree") && r.table.modules.dataTree.checkForRestyle(n)) } function y(n) { h = n } var e, f, l, r = this, s = !0, h = function () { }, u = n.getElement(), c, o; if (this.currentCell) return void (this.invalidEdit || this.cancelEdit()); if (n.column.modules.edit.blocked) return this.mouseClick = !1, u.blur(), !1; switch (t && t.stopPropagation(), _typeof(n.column.modules.edit.check)) { case "function": s = n.column.modules.edit.check(n.getComponent()); break; case "boolean": s = n.column.modules.edit.check }if (s || i) { if (r.cancelEdit(), r.currentCell = n, this.focusScrollAdjust(n), f = n.getComponent(), this.mouseClick && (this.mouseClick = !1, n.column.cellEvents.cellClick && n.column.cellEvents.cellClick.call(this.table, t, f)), n.column.cellEvents.cellEditing && n.column.cellEvents.cellEditing.call(this.table, f), r.table.options.cellEditing.call(this.table, f), l = "function" == typeof n.column.modules.edit.params ? n.column.modules.edit.params(f) : n.column.modules.edit.params, !1 === (e = n.column.modules.edit.editor.call(r, f, y, a, v, l))) return u.blur(), !1; if (!(e instanceof Node)) return console.warn("Edit Error - Editor should return an instance of Node, the editor returned:", e), u.blur(), !1; for (u.classList.add("tabulator-editing"), n.row.getElement().classList.add("tabulator-row-editing"); u.firstChild;)u.removeChild(u.firstChild); for (u.appendChild(e), h(), c = u.children, o = 0; o < c.length; o++)c[o].addEventListener("click", function (n) { n.stopPropagation() }); return !0 } return this.mouseClick = !1, u.blur(), !1 }; rt.prototype.maskInput = function (n, t) { function u(t) { var r = i[t]; void 0 !== r && r !== o && r !== f && r !== e && (n.value = n.value + "" + r, u(t + 1)) } var i = t.mask, f = void 0 !== t.maskLetterChar ? t.maskLetterChar : "A", e = void 0 !== t.maskNumberChar ? t.maskNumberChar : "9", o = void 0 !== t.maskWildcardChar ? t.maskWildcardChar : "*", r = !1; n.addEventListener("keydown", function (t) { var s = n.value.length, u = t.key; if (t.keyCode > 46) { if (s >= i.length) return t.preventDefault(), t.stopPropagation(), r = !1, !1; switch (i[s]) { case f: if (u.toUpperCase() == u.toLowerCase()) return t.preventDefault(), t.stopPropagation(), r = !1, !1; break; case e: if (isNaN(u)) return t.preventDefault(), t.stopPropagation(), r = !1, !1; break; case o: break; default: if (u !== i[s]) return t.preventDefault(), t.stopPropagation(), r = !1, !1 }r = !0 } }); n.addEventListener("keyup", function (i) { i.keyCode > 46 && t.maskAutoFill && u(n.value.length) }); n.placeholder || (n.placeholder = i); t.maskAutoFill && u(n.value.length) }; rt.prototype.getEditedCells = function () { var n = []; return this.editedCells.forEach(function (t) { n.push(t.getComponent()) }), n }; rt.prototype.clearEdited = function (n) { var t; n.modules.validate && n.modules.edit && n.modules.edit.edited && (n.modules.validate.invalid = !1, (t = this.editedCells.indexOf(n)) > -1 && this.editedCells.splice(t, 1)) }; rt.prototype.editors = { input: function (n, t, i, r, u) { function s() { (null === o || void 0 === o) && "" !== f.value || f.value !== o ? i(f.value) && (o = f.value) : r() } var o = n.getValue(), f = document.createElement("input"), e; if (f.setAttribute("type", u.search ? "search" : "text"), f.style.padding = "4px", f.style.width = "100%", f.style.boxSizing = "border-box", u.elementAttributes && "object" == _typeof(u.elementAttributes)) for (e in u.elementAttributes) "+" == e.charAt(0) ? (e = e.slice(1), f.setAttribute(e, f.getAttribute(e) + u.elementAttributes["+" + e])) : f.setAttribute(e, u.elementAttributes[e]); return f.value = void 0 !== o ? o : "", t(function () { f.focus({ preventScroll: !0 }); f.style.height = "100%" }), f.addEventListener("change", s), f.addEventListener("blur", s), f.addEventListener("keydown", function (n) { switch (n.keyCode) { case 13: s(n); break; case 27: r(); break; case 35: case 36: n.stopPropagation() } }), u.mask && this.table.modules.edit.maskInput(f, u), f }, textarea: function (n, t, i, r, u) { function h() { (null === o || void 0 === o) && "" !== f.value || f.value !== o ? (i(f.value) && (o = f.value), setTimeout(function () { n.getRow().normalizeHeight() }, 300)) : r() } var o = n.getValue(), s = u.verticalNavigation || "hybrid", c = String(null !== o && void 0 !== o ? o : ""), f = (c.match(/(?:\r\n|\r|\n)/g), document.createElement("textarea")), l = 0, e; if (f.style.display = "block", f.style.padding = "2px", f.style.height = "100%", f.style.width = "100%", f.style.boxSizing = "border-box", f.style.whiteSpace = "pre-wrap", f.style.resize = "none", u.elementAttributes && "object" == _typeof(u.elementAttributes)) for (e in u.elementAttributes) "+" == e.charAt(0) ? (e = e.slice(1), f.setAttribute(e, f.getAttribute(e) + u.elementAttributes["+" + e])) : f.setAttribute(e, u.elementAttributes[e]); return f.value = c, t(function () { f.focus({ preventScroll: !0 }); f.style.height = "100%"; f.scrollHeight; f.style.height = f.scrollHeight + "px"; n.getRow().normalizeHeight() }), f.addEventListener("change", h), f.addEventListener("blur", h), f.addEventListener("keyup", function () { f.style.height = ""; var t = f.scrollHeight; f.style.height = t + "px"; t != l && (l = t, n.getRow().normalizeHeight()) }), f.addEventListener("keydown", function (n) { switch (n.keyCode) { case 27: r(); break; case 38: ("editor" == s || "hybrid" == s && f.selectionStart) && (n.stopImmediatePropagation(), n.stopPropagation()); break; case 40: ("editor" == s || "hybrid" == s && f.selectionStart !== f.value.length) && (n.stopImmediatePropagation(), n.stopPropagation()); break; case 35: case 36: n.stopPropagation() } }), u.mask && this.table.modules.edit.maskInput(f, u), f }, number: function (n, t, i, r, u) { function h() { var n = f.value; isNaN(n) || "" === n || (n = Number(n)); n !== o ? i(n) && (o = n) : r() } var o = n.getValue(), c = u.verticalNavigation || "editor", f = document.createElement("input"), e, s; if (f.setAttribute("type", "number"), void 0 !== u.max && f.setAttribute("max", u.max), void 0 !== u.min && f.setAttribute("min", u.min), void 0 !== u.step && f.setAttribute("step", u.step), f.style.padding = "4px", f.style.width = "100%", f.style.boxSizing = "border-box", u.elementAttributes && "object" == _typeof(u.elementAttributes)) for (e in u.elementAttributes) "+" == e.charAt(0) ? (e = e.slice(1), f.setAttribute(e, f.getAttribute(e) + u.elementAttributes["+" + e])) : f.setAttribute(e, u.elementAttributes[e]); return f.value = o, s = function () { h() }, t(function () { f.removeEventListener("blur", s); f.focus({ preventScroll: !0 }); f.style.height = "100%"; f.addEventListener("blur", s) }), f.addEventListener("keydown", function (n) { switch (n.keyCode) { case 13: h(); break; case 27: r(); break; case 38: case 40: "editor" == c && (n.stopImmediatePropagation(), n.stopPropagation()); break; case 35: case 36: n.stopPropagation() } }), u.mask && this.table.modules.edit.maskInput(f, u), f }, range: function (n, t, i, r, u) { function s() { var n = f.value; isNaN(n) || "" === n || (n = Number(n)); n != o ? i(n) && (o = n) : r() } var o = n.getValue(), f = document.createElement("input"), e; if (f.setAttribute("type", "range"), void 0 !== u.max && f.setAttribute("max", u.max), void 0 !== u.min && f.setAttribute("min", u.min), void 0 !== u.step && f.setAttribute("step", u.step), f.style.padding = "4px", f.style.width = "100%", f.style.boxSizing = "border-box", u.elementAttributes && "object" == _typeof(u.elementAttributes)) for (e in u.elementAttributes) "+" == e.charAt(0) ? (e = e.slice(1), f.setAttribute(e, f.getAttribute(e) + u.elementAttributes["+" + e])) : f.setAttribute(e, u.elementAttributes[e]); return f.value = o, t(function () { f.focus({ preventScroll: !0 }); f.style.height = "100%" }), f.addEventListener("blur", function () { s() }), f.addEventListener("keydown", function (n) { switch (n.keyCode) { case 13: s(); break; case 27: r() } }), f }, select: function (t, i, r, u, f) { function et(n) { var r, i = {}, u = y.table.getData(); return r = n ? y.table.columnManager.getColumnByField(n) : t.getColumn()._getSelf(), r ? (u.forEach(function (n) { var t = r.getFieldValue(n); null !== t && void 0 !== t && "" !== t && (i[t] = !0) }), i = f.sortValuesList ? "asc" == f.sortValuesList ? Object.keys(i).sort() : Object.keys(i).sort().reverse() : Object.keys(i)) : console.warn("unable to find matching column to create select lookup list:", n), i } function nt(n, i) { function o(n) { var n = { label: n.label, value: n.value, itemParams: n.itemParams, elementAttributes: n.elementAttributes, element: !1 }; return i.indexOf(n.value) > -1 && k(n), f.push(n), r.push(n), n } var f = [], r = [], e, u; if ("function" == typeof n && (n = n(t)), Array.isArray(n)) n.forEach(function (n) { var t; "object" === (void 0 === n ? "undefined" : _typeof(n)) ? n.options ? (t = { label: n.label, group: !0, itemParams: n.itemParams, elementAttributes: n.elementAttributes, element: !1 }, r.push(t), n.options.forEach(function (n) { o(n) })) : o(n) : (t = { label: n, value: n, element: !1 }, i.indexOf(t.value) > -1 && k(t), f.push(t), r.push(t)) }); else for (e in n) u = { label: n[e], value: e, element: !1 }, i.indexOf(u.value) > -1 && k(u), f.push(u), r.push(u); v = f; ct = r; lt() } function lt() { for (; o.firstChild;)o.removeChild(o.firstChild); ct.forEach(function (n) { var i = n.element, r; if (!i) { if (i = document.createElement("div"), n.label = f.listItemFormatter ? f.listItemFormatter(n.value, n.label, t, i, n.itemParams) : n.label, n.group ? (i.classList.add("tabulator-edit-select-list-group"), i.tabIndex = 0, i.innerHTML = "" === n.label ? "&nbsp;" : n.label) : (i.classList.add("tabulator-edit-select-list-item"), i.tabIndex = 0, i.innerHTML = "" === n.label ? "&nbsp;" : n.label, i.addEventListener("click", function () { ft = !0; setTimeout(function () { ft = !1 }, 10); c ? (ot(n), e.focus()) : st(n) }), h.indexOf(n) > -1 && i.classList.add("active")), n.elementAttributes && "object" == _typeof(n.elementAttributes)) for (r in n.elementAttributes) "+" == r.charAt(0) ? (r = r.slice(1), i.setAttribute(r, e.getAttribute(r) + n.elementAttributes["+" + r])) : i.setAttribute(r, n.elementAttributes[r]); i.addEventListener("mousedown", function () { w = !1; setTimeout(function () { w = !0 }, 10) }); n.element = i } o.appendChild(i) }) } function b(n, t) { !c && s && s.element && s.element.classList.remove("active"); s && s.element && s.element.classList.remove("focused"); s = n; n.element && (n.element.classList.add("focused"), t && n.element.classList.add("active")) } function k(n) { -1 == h.indexOf(n) && (h.push(n), b(n, !0)); ht() } function tt(n) { var t = h[n]; n > -1 && (h.splice(n, 1), t.element && t.element.classList.remove("active")) } function ot(n) { n || (n = s); var t = h.indexOf(n); t > -1 ? tt(t) : (!0 !== c && h.length >= c && tt(0), k(n)); ht() } function st(n) { rt(); n || (n = s); n && (e.value = n.label, r(n.value)); p = e.value } function it(n) { n || rt(); var t = []; h.forEach(function (n) { t.push(n.value) }); p = e.value; r(t) } function ht() { var n = []; h.forEach(function (t) { n.push(t.label) }); e.value = n.join(", "); !1 === y.currentCell && it(!0) } function at() { for (var t = h.length, n = 0; n < t; n++)tt(0) } function d() { rt(); u() } function vt() { if (h = [], !o.parentNode) { !0 === f.values ? nt(et(), p) : "string" == typeof f.values ? nt(et(f.values), p) : nt(f.values || [], p); var t = n.prototype.helpers.elOffset(ut); o.style.minWidth = ut.offsetWidth + "px"; o.style.top = t.top + ut.offsetHeight + "px"; o.style.left = t.left + "px"; o.addEventListener("mousedown", function () { w = !1; setTimeout(function () { w = !0 }, 10) }); document.body.appendChild(o) } } function rt() { o.parentNode && o.parentNode.removeChild(o); yt() } function yt() { y.table.rowManager.element.removeEventListener("scroll", d) } var pt = this, y = this, ut = t.getElement(), a = t.getValue(), g = f.verticalNavigation || "editor", p = void 0 !== a || null === a ? Array.isArray(a) ? a : [a] : void 0 !== f.defaultValue ? f.defaultValue : [], e = document.createElement("input"), o = document.createElement("div"), c = f.multiselect, v = [], s = {}, ct = [], h = [], w = !0, ft = !1, l; if ((Array.isArray(f) || !Array.isArray(f) && "object" === (void 0 === f ? "undefined" : _typeof(f)) && !f.values) && (console.warn("DEPRECATION WARNING - values for the select editor must now be passed into the values property of the editorParams object, not as the editorParams object"), f = { values: f }), e.setAttribute("type", "text"), e.style.padding = "4px", e.style.width = "100%", e.style.boxSizing = "border-box", e.style.cursor = "default", e.readOnly = 0 != this.currentCell, f.elementAttributes && "object" == _typeof(f.elementAttributes)) for (l in f.elementAttributes) "+" == l.charAt(0) ? (l = l.slice(1), e.setAttribute(l, e.getAttribute(l) + f.elementAttributes["+" + l])) : e.setAttribute(l, f.elementAttributes[l]); return e.value = void 0 !== a || null === a ? a : "", e.addEventListener("search", function () { e.value || (at(), it()) }), e.addEventListener("keydown", function (n) { var t; switch (n.keyCode) { case 38: t = v.indexOf(s); ("editor" == g || "hybrid" == g && t) && (n.stopImmediatePropagation(), n.stopPropagation(), n.preventDefault(), t > 0 && b(v[t - 1], !c)); break; case 40: t = v.indexOf(s); ("editor" == g || "hybrid" == g && t < v.length - 1) && (n.stopImmediatePropagation(), n.stopPropagation(), n.preventDefault(), t < v.length - 1 && (-1 == t ? b(v[0], !c) : b(v[t + 1], !c))); break; case 37: case 39: n.stopImmediatePropagation(); n.stopPropagation(); n.preventDefault(); break; case 13: c ? ot() : st(); break; case 27: d(); break; case 9: break; default: !1 === y.currentCell && n.preventDefault() } }), e.addEventListener("blur", function () { w && (c ? it() : d()) }), e.addEventListener("focus", function () { ft || vt() }), o = document.createElement("div"), o.classList.add("tabulator-edit-select-list"), i(function () { e.style.height = "100%"; e.focus({ preventScroll: !0 }) }), setTimeout(function () { pt.table.rowManager.element.addEventListener("scroll", d) }, 10), e }, autocomplete: function (t, i, r, u, f) { function rt() { !0 === f.values ? it = ut() : "string" == typeof f.values && (it = ut(f.values)) } function ut(n) { var r, i = {}, u = g.table.getData(); return r = n ? g.table.columnManager.getColumnByField(n) : t.getColumn()._getSelf(), r ? (u.forEach(function (n) { var t = r.getFieldValue(n); null !== t && void 0 !== t && "" !== t && (i[t] = !0) }), i = f.sortValuesList ? "asc" == f.sortValuesList ? Object.keys(i).sort() : Object.keys(i).sort().reverse() : Object.keys(i)) : console.warn("unable to find matching column to create autocomplete lookup list:", n), i } function v(n, t) { var r, u, i = []; r = it || f.values || []; f.searchFunc ? (i = f.searchFunc(n, r), i instanceof Promise ? (ft(void 0 !== f.searchingPlaceholder ? f.searchingPlaceholder : "Searching..."), i.then(function (n) { b(w(n), t) }).catch(function (n) { console.err("error in autocomplete search promise:", n) })) : b(w(i), t)) : (u = w(r), "" === n ? f.showListOnEmpty && (i = u) : u.forEach(function (t) { null === t.value && void 0 === t.value || (String(t.value).toLowerCase().indexOf(String(n).toLowerCase()) > -1 || String(t.title).toLowerCase().indexOf(String(n).toLowerCase()) > -1) && i.push(t) }), b(i, t)) } function ft(n) { var t = document.createElement("div"); et(); !1 !== n && (t.classList.add("tabulator-edit-select-list-notice"), t.tabIndex = 0, n instanceof Node ? t.appendChild(n) : t.innerHTML = n, o.appendChild(t)) } function w(n) { var i = [], t, r; if (Array.isArray(n)) n.forEach(function (n) { var t = {}; "object" === (void 0 === n ? "undefined" : _typeof(n)) ? (t.title = f.listItemFormatter ? f.listItemFormatter(n.value, n.label) : n.label, t.value = n.value) : (t.title = f.listItemFormatter ? f.listItemFormatter(n, n) : n, t.value = n); i.push(t) }); else for (t in n) r = { title: f.listItemFormatter ? f.listItemFormatter(t, n[t]) : n[t], value: t }, i.push(r); return i } function et() { for (; o.firstChild;)o.removeChild(o.firstChild) } function b(n, t) { n.length ? st(n, t) : f.emptyPlaceholder && ft(f.emptyPlaceholder) } function st(n, t) { var i = !1; et(); h = n; h.forEach(function (n) { var r = n.element; r || (r = document.createElement("div"), r.classList.add("tabulator-edit-select-list-item"), r.tabIndex = 0, r.innerHTML = n.title, r.addEventListener("click", function () { y(n); k() }), r.addEventListener("mousedown", function () { a = !1; setTimeout(function () { a = !0 }, 10) }), n.element = r, t && n.value == l && (e.value = n.title, n.element.classList.add("active"), i = !0), n === s && (n.element.classList.add("active"), i = !0)); o.appendChild(r) }); i || y(!1) } function k() { ot(); s ? l !== s.value ? (l = s.value, e.value = s.title, r(s.value)) : u() : f.freetext ? (l = e.value, r(e.value)) : f.allowEmpty && "" === e.value ? (l = e.value, r(e.value)) : u() } function ht() { if (!o.parentNode) { for (; o.firstChild;)o.removeChild(o.firstChild); var t = n.prototype.helpers.elOffset(nt); o.style.minWidth = nt.offsetWidth + "px"; o.style.top = t.top + nt.offsetHeight + "px"; o.style.left = t.left + "px"; document.body.appendChild(o) } } function y(n) { s && s.element && s.element.classList.remove("active"); s = n; n && n.element && n.element.classList.add("active") } function ot() { o.parentNode && o.parentNode.removeChild(o); ct() } function d() { ot(); u() } function ct() { g.table.rowManager.element.removeEventListener("scroll", d) } var lt = this, g = this, nt = t.getElement(), l = t.getValue(), p = f.verticalNavigation || "editor", tt = void 0 !== l || null === l ? l : void 0 !== f.defaultValue ? f.defaultValue : "", e = document.createElement("input"), o = document.createElement("div"), h = [], s = !1, a = !0, it = !1, c; if (e.setAttribute("type", "search"), e.style.padding = "4px", e.style.width = "100%", e.style.boxSizing = "border-box", f.elementAttributes && "object" == _typeof(f.elementAttributes)) for (c in f.elementAttributes) "+" == c.charAt(0) ? (c = c.slice(1), e.setAttribute(c, e.getAttribute(c) + f.elementAttributes["+" + c])) : e.setAttribute(c, f.elementAttributes[c]); return o.classList.add("tabulator-edit-select-list"), o.addEventListener("mousedown", function () { a = !1; setTimeout(function () { a = !0 }, 10) }), e.addEventListener("keydown", function (n) { var t; switch (n.keyCode) { case 38: t = h.indexOf(s); ("editor" == p || "hybrid" == p && t) && (n.stopImmediatePropagation(), n.stopPropagation(), n.preventDefault(), y(t > 0 ? h[t - 1] : !1)); break; case 40: t = h.indexOf(s); ("editor" == p || "hybrid" == p && t < h.length - 1) && (n.stopImmediatePropagation(), n.stopPropagation(), n.preventDefault(), t < h.length - 1 && y(-1 == t ? h[0] : h[t + 1])); break; case 37: case 39: n.stopImmediatePropagation(); n.stopPropagation(); break; case 13: k(); break; case 27: d(); break; case 36: case 35: n.stopImmediatePropagation() } }), e.addEventListener("keyup", function (n) { switch (n.keyCode) { case 38: case 37: case 39: case 40: case 13: case 27: break; default: v(e.value) } }), e.addEventListener("search", function () { v(e.value) }), e.addEventListener("blur", function () { a && k() }), e.addEventListener("focus", function () { var n = tt; rt(); ht(); e.value = n; v(n, !0) }), i(function () { e.style.height = "100%"; e.focus({ preventScroll: !0 }) }), f.mask && this.table.modules.edit.maskInput(e, f), setTimeout(function () { lt.table.rowManager.element.addEventListener("scroll", d) }, 10), rt(), e.value = tt, v(tt, !0), e }, star: function (n, t, i, r, u) { function c(n) { w.forEach(function (t, i) { i < n ? ("ie" == v.table.browser ? t.setAttribute("class", "tabulator-star-active") : t.classList.replace("tabulator-star-inactive", "tabulator-star-active"), t.innerHTML = '<polygon fill="#488CE9" stroke="#014AAE" stroke-width="37.6152" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" points="259.216,29.942 330.27,173.919 489.16,197.007 374.185,309.08 401.33,467.31 259.216,392.612 117.104,467.31 144.25,309.08 29.274,197.007 188.165,173.919 "/>') : ("ie" == v.table.browser ? t.setAttribute("class", "tabulator-star-inactive") : t.classList.replace("tabulator-star-active", "tabulator-star-inactive"), t.innerHTML = '<polygon fill="#010155" stroke="#686868" stroke-width="37.6152" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" points="259.216,29.942 330.27,173.919 489.16,197.007 374.185,309.08 401.33,467.31 259.216,392.612 117.104,467.31 144.25,309.08 29.274,197.007 188.165,173.919 "/>') }) } function a(n) { s = n; c(n) } var v = this, e = n.getElement(), s = n.getValue(), y = e.getElementsByTagName("svg").length || 5, p = e.getElementsByTagName("svg")[0] ? e.getElementsByTagName("svg")[0].getAttribute("width") : 14, w = [], f = document.createElement("div"), h = document.createElementNS("http://www.w3.org/2000/svg", "svg"), o, l; if (e.style.whiteSpace = "nowrap", e.style.overflow = "hidden", e.style.textOverflow = "ellipsis", f.style.verticalAlign = "middle", f.style.display = "inline-block", f.style.padding = "4px", h.setAttribute("width", p), h.setAttribute("height", p), h.setAttribute("viewBox", "0 0 512 512"), h.setAttribute("xml:space", "preserve"), h.style.padding = "0 1px", u.elementAttributes && "object" == _typeof(u.elementAttributes)) for (o in u.elementAttributes) "+" == o.charAt(0) ? (o = o.slice(1), f.setAttribute(o, f.getAttribute(o) + u.elementAttributes["+" + o])) : f.setAttribute(o, u.elementAttributes[o]); for (l = 1; l <= y; l++)!function (n) { var t = document.createElement("span"), r = h.cloneNode(!0); w.push(r); t.addEventListener("mouseenter", function (t) { t.stopPropagation(); t.stopImmediatePropagation(); c(n) }); t.addEventListener("mousemove", function (n) { n.stopPropagation(); n.stopImmediatePropagation() }); t.addEventListener("click", function (t) { t.stopPropagation(); t.stopImmediatePropagation(); i(n); e.blur() }); t.appendChild(r); f.appendChild(t) }(l); return s = Math.min(parseInt(s), y), c(s), f.addEventListener("mousemove", function () { c(0) }), f.addEventListener("click", function () { i(0) }), e.addEventListener("blur", function () { r() }), e.addEventListener("keydown", function (n) { switch (n.keyCode) { case 39: a(s + 1); break; case 37: a(s - 1); break; case 13: i(s); break; case 27: r() } }), f }, progress: function (n, t, i, r, u) { function y() { var n = p * Math.round(f.offsetWidth / (e.clientWidth / 100)) + l; i(n); e.setAttribute("aria-valuenow", n); e.setAttribute("aria-label", h) } var c, a, e = n.getElement(), v = void 0 === u.max ? e.getElementsByTagName("div")[0].getAttribute("max") || 100 : u.max, l = void 0 === u.min ? e.getElementsByTagName("div")[0].getAttribute("min") || 0 : u.min, p = (v - l) / 100, h = n.getValue() || 0, o = document.createElement("div"), f = document.createElement("div"), s; if (o.style.position = "absolute", o.style.right = "0", o.style.top = "0", o.style.bottom = "0", o.style.width = "5px", o.classList.add("tabulator-progress-handle"), f.style.display = "inline-block", f.style.position = "relative", f.style.height = "100%", f.style.backgroundColor = "#488CE9", f.style.maxWidth = "100%", f.style.minWidth = "0%", u.elementAttributes && "object" == _typeof(u.elementAttributes)) for (s in u.elementAttributes) "+" == s.charAt(0) ? (s = s.slice(1), f.setAttribute(s, f.getAttribute(s) + u.elementAttributes["+" + s])) : f.setAttribute(s, u.elementAttributes[s]); return e.style.padding = "4px 4px", h = Math.min(parseFloat(h), v), h = Math.max(parseFloat(h), l), h = Math.round((h - l) / p), f.style.width = h + "%", e.setAttribute("aria-valuemin", l), e.setAttribute("aria-valuemax", v), f.appendChild(o), o.addEventListener("mousedown", function (n) { c = n.screenX; a = f.offsetWidth }), o.addEventListener("mouseover", function () { o.style.cursor = "ew-resize" }), e.addEventListener("mousemove", function (n) { c && (f.style.width = a + n.screenX - c + "px") }), e.addEventListener("mouseup", function (n) { c && (n.stopPropagation(), n.stopImmediatePropagation(), c = !1, a = !1, y()) }), e.addEventListener("keydown", function (n) { switch (n.keyCode) { case 39: n.preventDefault(); f.style.width = f.clientWidth + e.clientWidth / 100 + "px"; break; case 37: n.preventDefault(); f.style.width = f.clientWidth - e.clientWidth / 100 + "px"; break; case 9: case 13: y(); break; case 27: r() } }), e.addEventListener("blur", function () { r() }), f }, tickCross: function (n, t, i, r, u) { function h(n) { return l ? n ? s ? c : f.checked : f.checked && !s ? (f.checked = !1, f.indeterminate = !0, s = !0, c) : (s = !1, f.checked) : f.checked } var o = n.getValue(), f = document.createElement("input"), l = u.tristate, c = void 0 === u.indeterminateValue ? null : u.indeterminateValue, s = !1, e; if (f.setAttribute("type", "checkbox"), f.style.marginTop = "5px", f.style.boxSizing = "border-box", u.elementAttributes && "object" == _typeof(u.elementAttributes)) for (e in u.elementAttributes) "+" == e.charAt(0) ? (e = e.slice(1), f.setAttribute(e, f.getAttribute(e) + u.elementAttributes["+" + e])) : f.setAttribute(e, u.elementAttributes[e]); return f.value = o, !l || void 0 !== o && o !== c && "" !== o || (s = !0, f.indeterminate = !0), "firefox" != this.table.browser && t(function () { f.focus({ preventScroll: !0 }) }), f.checked = !0 === o || "true" === o || "True" === o || 1 === o, t(function () { f.focus() }), f.addEventListener("change", function () { i(h()) }), f.addEventListener("blur", function () { i(h(!0)) }), f.addEventListener("keydown", function (n) { 13 == n.keyCode && i(h()); 27 == n.keyCode && r() }), f } }; n.prototype.registerModule("edit", rt); var hi = function (n, t, i, r) { this.type = n; this.columns = t; this.component = i || !1; this.indent = r || 0 }, si = function (n, t, i, r, u) { this.value = n; this.component = t || !1; this.width = i; this.height = r; this.depth = u }, g = function (n) { this.table = n; this.config = {}; this.cloneTableStyle = !0; this.colVisProp = "" }; return g.prototype.generateExportList = function (n, t, i, r) { this.cloneTableStyle = t; this.config = n || {}; this.colVisProp = r; var u = !1 !== this.config.columnHeaders ? this.headersToExportRows(this.generateColumnGroupHeaders()) : [], f = this.bodyToExportRows(this.rowLookup(i)); return u.concat(f) }, g.prototype.genereateTable = function (n, t, i, r) { var u = this.generateExportList(n, t, i, r); return this.genereateTableElement(u) }, g.prototype.rowLookup = function (n) { var i = this, t = []; if ("function" == typeof n) n.call(this.table).forEach(function (n) { (n = i.table.rowManager.findRow(n)) && t.push(n) }); else switch (n) { case !0: case "visible": t = this.table.rowManager.getVisibleRows(!0); break; case "all": t = this.table.rowManager.rows; break; case "selected": t = this.table.modules.selectRow.selectedRows; break; case "active": default: t = this.table.options.pagination ? this.table.rowManager.getDisplayRows(this.table.rowManager.displayRows.length - 2) : this.table.rowManager.getDisplayRows() }return Object.assign([], t) }, g.prototype.generateColumnGroupHeaders = function () { var t = this, n = []; return (!1 !== this.config.columnGroups ? this.table.columnManager.columns : this.table.columnManager.columnsByIndex).forEach(function (i) { var r = t.processColumnGroup(i); r && n.push(r) }), n }, g.prototype.processColumnGroup = function (n) { var u = this, r = n.columns, i = 0, f = n.definition["title" + (this.colVisProp.charAt(0).toUpperCase() + this.colVisProp.slice(1))] || n.definition.title, t = { title: f, column: n, depth: 1 }; if (r.length) { if (t.subGroups = [], t.width = 0, r.forEach(function (n) { var r = u.processColumnGroup(n); r && (t.width += r.width, t.subGroups.push(r), r.depth > i && (i = r.depth)) }), t.depth += i, !t.width) return !1 } else { if (!this.columnVisCheck(n)) return !1; t.width = 1 } return t }, g.prototype.columnVisCheck = function (n) { return !1 !== n.definition[this.colVisProp] && (n.visible || !n.visible && n.definition[this.colVisProp]) }, g.prototype.headersToExportRows = function (n) { function r(n, u) { var o = i - u, f, e; if (void 0 === t[u] && (t[u] = []), n.height = n.subGroups ? 1 : o - n.depth + 1, t[u].push(n), n.height > 1) for (f = 1; f < n.height; f++)void 0 === t[u + f] && (t[u + f] = []), t[u + f].push(!1); if (n.width > 1) for (e = 1; e < n.width; e++)t[u].push(!1); n.subGroups && n.subGroups.forEach(function (n) { r(n, u + 1) }) } var t = [], i = 0, u = []; return n.forEach(function (n) { n.depth > i && (i = n.depth) }), n.forEach(function (n) { r(n, 0) }), t.forEach(function (n) { var t = []; n.forEach(function (n) { n ? t.push(new si(n.title, n.column.getComponent(), n.width, n.height, n.depth)) : t.push(null) }); u.push(new hi("header", t)) }), u }, g.prototype.bodyToExportRows = function (n) { var t = this, i = [], r = []; return this.table.columnManager.columnsByIndex.forEach(function (n) { t.columnVisCheck(n) && i.push(n.getComponent()) }), !1 !== this.config.columnCalcs && this.table.modExists("columnCalcs") && (this.table.modules.columnCalcs.topInitialized && n.unshift(this.table.modules.columnCalcs.topRow), this.table.modules.columnCalcs.botInitialized && n.push(this.table.modules.columnCalcs.botRow)), n = n.filter(function (n) { switch (n.type) { case "group": return !1 !== t.config.rowGroups; case "calc": return !1 !== t.config.columnCalcs; case "row": return !(t.table.options.dataTree && !1 === t.config.dataTree && n.modules.dataTree.parent) }return !0 }), n.forEach(function (n) { var e = n.getData(t.colVisProp), u = [], f = 0; switch (n.type) { case "group": f = n.level; u.push(new si(n.key, n.getComponent(), i.length, 1)); break; case "calc": case "row": i.forEach(function (n) { u.push(new si(n._column.getFieldValue(e), n, 1, 1)) }); t.table.options.dataTree && !1 !== t.config.dataTree && (f = n.modules.dataTree.index) }r.push(new hi(n.type, u, n.getComponent(), f)) }), r }, g.prototype.genereateTableElement = function (n) { var r = this, u = document.createElement("table"), f = document.createElement("thead"), e = document.createElement("tbody"), i = this.lookupTableStyles(), o = this.table.options["rowFormatter" + (this.colVisProp.charAt(0).toUpperCase() + this.colVisProp.slice(1))], t = {}; return t.rowFormatter = null !== o ? o : this.table.options.rowFormatter, this.table.options.dataTree && !1 !== this.config.dataTree && this.table.modExists("columnCalcs") && (t.treeElementField = this.table.modules.dataTree.elementField), t.groupHeader = this.table.options["groupHeader" + (this.colVisProp.charAt(0).toUpperCase() + this.colVisProp.slice(1))], t.groupHeader && !Array.isArray(t.groupHeader) && (t.groupHeader = [t.groupHeader]), u.classList.add("tabulator-print-table"), this.mapElementStyles(this.table.columnManager.getHeadersElement(), f, ["border-top", "border-left", "border-right", "border-bottom", "background-color", "color", "font-weight", "font-family", "font-size"]), n.length > 1e3 && console.warn("It may take a long time to render an HTML table with more than 1000 rows"), n.forEach(function (n, u) { switch (n.type) { case "header": f.appendChild(r.genereateHeaderElement(n, t, i)); break; case "group": e.appendChild(r.genereateGroupElement(n, t, i)); break; case "calc": e.appendChild(r.genereateCalcElement(n, t, i)); break; case "row": var o = r.genereateRowElement(n, t, i); r.mapElementStyles(u % 2 && i.evenRow ? i.evenRow : i.oddRow, o, ["border-top", "border-left", "border-right", "border-bottom", "color", "font-weight", "font-family", "font-size", "background-color"]); e.appendChild(o) } }), f.innerHTML && u.appendChild(f), u.appendChild(e), this.mapElementStyles(this.table.element, u, ["border-top", "border-left", "border-right", "border-bottom"]), u }, g.prototype.lookupTableStyles = function () { var n = {}; return this.cloneTableStyle && window.getComputedStyle && (n.oddRow = this.table.element.querySelector(".tabulator-row-odd:not(.tabulator-group):not(.tabulator-calcs)"), n.evenRow = this.table.element.querySelector(".tabulator-row-even:not(.tabulator-group):not(.tabulator-calcs)"), n.calcRow = this.table.element.querySelector(".tabulator-row.tabulator-calcs"), n.firstRow = this.table.element.querySelector(".tabulator-row:not(.tabulator-group):not(.tabulator-calcs)"), n.firstGroup = this.table.element.getElementsByClassName("tabulator-group")[0], n.firstRow && (n.styleCells = n.firstRow.getElementsByClassName("tabulator-cell"), n.firstCell = n.styleCells[0], n.lastCell = n.styleCells[n.styleCells.length - 1])), n }, g.prototype.genereateHeaderElement = function (n) { var t = this, i = document.createElement("tr"); return n.columns.forEach(function (n) { if (n) { var r = document.createElement("th"), u = n.component._column.definition.cssClass ? n.component._column.definition.cssClass.split(" ") : []; r.colSpan = n.width; r.rowSpan = n.height; r.innerHTML = n.value; t.cloneTableStyle && (r.style.boxSizing = "border-box"); u.forEach(function (n) { r.classList.add(n) }); t.mapElementStyles(n.component.getElement(), r, ["text-align", "border-top", "border-left", "border-right", "border-bottom", "background-color", "color", "font-weight", "font-family", "font-size"]); t.mapElementStyles(n.component._column.contentElement, r, ["padding-top", "padding-left", "padding-right", "padding-bottom"]); n.component._column.visible ? t.mapElementStyles(n.component.getElement(), r, ["width"]) : n.component._column.definition.width && (r.style.width = n.component._column.definition.width + "px"); n.component._column.parent && t.mapElementStyles(n.component._column.parent.groupElement, r, ["border-top"]); i.appendChild(r) } }), i }, g.prototype.genereateGroupElement = function (n, t, i) { var r = document.createElement("tr"), f = document.createElement("td"), u = n.columns[0]; return r.classList.add("tabulator-print-table-row"), u.value = t.groupHeader && t.groupHeader[n.indent] ? t.groupHeader[n.indent](u.value, n.component._group.getRowCount(), n.component._group.getData(), n.component) : !1 === t.groupHeader ? u.value : n.component._group.generator(u.value, n.component._group.getRowCount(), n.component._group.getData(), n.component), f.colSpan = u.width, f.innerHTML = u.value, r.classList.add("tabulator-print-table-group"), r.classList.add("tabulator-group-level-" + n.indent), u.component.isVisible() && r.classList.add("tabulator-group-visible"), this.mapElementStyles(i.firstGroup, r, ["border-top", "border-left", "border-right", "border-bottom", "color", "font-weight", "font-family", "font-size", "background-color"]), this.mapElementStyles(i.firstGroup, f, ["padding-top", "padding-left", "padding-right", "padding-bottom"]), r.appendChild(f), r }, g.prototype.genereateCalcElement = function (n, t, i) { var r = this.genereateRowElement(n, t, i); return r.classList.add("tabulator-print-table-calcs"), this.mapElementStyles(i.calcRow, r, ["border-top", "border-left", "border-right", "border-bottom", "color", "font-weight", "font-family", "font-size", "background-color"]), r }, g.prototype.genereateRowElement = function (n, t, r) { var u = this, f = document.createElement("tr"); return f.classList.add("tabulator-print-table-row"), n.columns.forEach(function (e) { if (e) { var s = document.createElement("td"), h = e.component._column, o = e.value, c = { modules: {}, getValue: function () { return o }, getField: function () { return h.definition.field }, getElement: function () { return s }, getColumn: function () { return h.getComponent() }, getData: function () { return n.component.getData() }, getRow: function () { return n.component }, getComponent: function () { return c }, column: h }; if ((h.definition.cssClass ? h.definition.cssClass.split(" ") : []).forEach(function (n) { s.classList.add(n) }), u.table.modExists("format") && !1 !== u.config.formatCells) o = u.table.modules.format.formatExportValue(c, u.colVisProp); else switch (void 0 === o ? "undefined" : _typeof(o)) { case "object": o = JSON.stringify(o); break; case "undefined": case "null": o = ""; break; default: o = o }o instanceof Node ? s.appendChild(o) : s.innerHTML = o; r.firstCell && (u.mapElementStyles(r.firstCell, s, ["padding-top", "padding-left", "padding-right", "padding-bottom", "border-top", "border-left", "border-right", "border-bottom", "color", "font-weight", "font-family", "font-size"]), h.definition.align && (s.style.textAlign = h.definition.align)); u.table.options.dataTree && !1 !== u.config.dataTree && (t.treeElementField && t.treeElementField == h.field || !t.treeElementField && 0 == i) && (n.component._row.modules.dataTree.controlEl && s.insertBefore(n.component._row.modules.dataTree.controlEl.cloneNode(!0), s.firstChild), n.component._row.modules.dataTree.branchEl && s.insertBefore(n.component._row.modules.dataTree.branchEl.cloneNode(!0), s.firstChild)); f.appendChild(s); c.modules.format && c.modules.format.renderedCallback && c.modules.format.renderedCallback(); t.rowFormatter && !1 !== u.config.formatCells && t.rowFormatter(n.component) } }), f }, g.prototype.genereateHTMLTable = function (n) { var t = document.createElement("div"); return t.appendChild(this.genereateTableElement(n)), t.innerHTML }, g.prototype.getHtml = function (n, t, i, r) { var u = this.generateExportList(i || this.table.options.htmlOutputConfig, t, n, r || "htmlOutput"); return this.genereateHTMLTable(u) }, g.prototype.mapElementStyles = function (n, t, i) { var r, u; this.cloneTableStyle && n && t && (r = { "background-color": "backgroundColor", color: "fontColor", width: "width", "font-weight": "fontWeight", "font-family": "fontFamily", "font-size": "fontSize", "text-align": "textAlign", "border-top": "borderTop", "border-left": "borderLeft", "border-right": "borderRight", "border-bottom": "borderBottom", "padding-top": "paddingTop", "padding-left": "paddingLeft", "padding-right": "paddingRight", "padding-bottom": "paddingBottom" }, window.getComputedStyle && (u = window.getComputedStyle(n), i.forEach(function (n) { t.style[r[n]] = u.getPropertyValue(n) }))) }, n.prototype.registerModule("export", g), y = function (n) { this.table = n; this.filterList = []; this.headerFilters = {}; this.headerFilterColumns = []; this.prevHeaderFilterChangeCheck = ""; this.prevHeaderFilterChangeCheck = "{}"; this.changed = !1 }, y.prototype.initializeColumn = function (n) { function r(r) { var f, s = "input" == n.modules.filter.tagType && "text" == n.modules.filter.attrType || "textarea" == n.modules.filter.tagType ? "partial" : "match", e = "", o = ""; if (void 0 === n.modules.filter.prevSuccess || n.modules.filter.prevSuccess !== r) { if (n.modules.filter.prevSuccess = r, n.modules.filter.emptyFunc(r)) delete t.headerFilters[i]; else { switch (n.modules.filter.value = r, _typeof(n.definition.headerFilterFunc)) { case "string": t.filters[n.definition.headerFilterFunc] ? (e = n.definition.headerFilterFunc, f = function (i) { var u = n.definition.headerFilterFuncParams || {}, f = n.getFieldValue(i); return u = "function" == typeof u ? u(r, f, i) : u, t.filters[n.definition.headerFilterFunc](r, f, i, u) }) : console.warn("Header Filter Error - Matching filter function not found: ", n.definition.headerFilterFunc); break; case "function": f = function (t) { var i = n.definition.headerFilterFuncParams || {}, u = n.getFieldValue(t); return i = "function" == typeof i ? i(r, u, t) : i, n.definition.headerFilterFunc(r, u, t, i) }; e = f }if (!f) switch (s) { case "partial": f = function (t) { var i = n.getFieldValue(t); return void 0 !== i && null !== i && String(i).toLowerCase().indexOf(String(r).toLowerCase()) > -1 }; e = "like"; break; default: f = function (t) { return n.getFieldValue(t) == r }; e = "=" }t.headerFilters[i] = { value: r, func: f, type: e, params: u || {} } } o = JSON.stringify(t.headerFilters); t.prevHeaderFilterChangeCheck !== o && (t.prevHeaderFilterChangeCheck = o, t.changed = !0, t.table.rowManager.filterRefresh()) } return !0 } var u, t = this, i = n.getField(); n.modules.filter = { success: r, attrType: !1, tagType: !1, emptyFunc: !1 }; this.generateHeaderFilterElement(n) }, y.prototype.generateHeaderFilterElement = function (n, t, i) { function y() { } var o, f, r, v, s, l, e, h = this, u = this, a = n.modules.filter.success, c = n.getField(); if (n.modules.filter.headerElement && n.modules.filter.headerElement.parentNode && n.contentElement.removeChild(n.modules.filter.headerElement.parentNode), c) { switch (n.modules.filter.emptyFunc = n.definition.headerFilterEmptyCheck || function (n) { return !n && "0" !== n }, o = document.createElement("div"), o.classList.add("tabulator-header-filter"), _typeof(n.definition.headerFilter)) { case "string": u.table.modules.edit.editors[n.definition.headerFilter] ? (f = u.table.modules.edit.editors[n.definition.headerFilter], "tick" !== n.definition.headerFilter && "tickCross" !== n.definition.headerFilter || n.definition.headerFilterEmptyCheck || (n.modules.filter.emptyFunc = function (n) { return !0 !== n && !1 !== n })) : console.warn("Filter Error - Cannot build header filter, No such editor found: ", n.definition.editor); break; case "function": f = n.definition.headerFilter; break; case "boolean": n.modules.edit && n.modules.edit.editor ? f = n.modules.edit.editor : n.definition.formatter && u.table.modules.edit.editors[n.definition.formatter] ? (f = u.table.modules.edit.editors[n.definition.formatter], "tick" !== n.definition.formatter && "tickCross" !== n.definition.formatter || n.definition.headerFilterEmptyCheck || (n.modules.filter.emptyFunc = function (n) { return !0 !== n && !1 !== n })) : f = u.table.modules.edit.editors.input }if (f) { if (v = { getValue: function () { return void 0 !== t ? t : "" }, getField: function () { return n.definition.field }, getElement: function () { return o }, getColumn: function () { return n.getComponent() }, getRow: function () { return { normalizeHeight: function () { } } } }, e = n.definition.headerFilterParams || {}, e = "function" == typeof e ? e.call(u.table) : e, !(r = f.call(this.table.modules.edit, v, function () { }, a, y, e))) return void console.warn("Filter Error - Cannot add filter to " + c + " column, editor returned a value of false"); if (!(r instanceof Node)) return void console.warn("Filter Error - Cannot add filter to " + c + " column, editor should return an instance of Node, the editor returned:", r); c ? u.table.modules.localize.bind("headerFilters|columns|" + n.definition.field, function (n) { r.setAttribute("placeholder", void 0 !== n && n ? n : u.table.modules.localize.getText("headerFilters|default")) }) : u.table.modules.localize.bind("headerFilters|default", function (n) { r.setAttribute("placeholder", void 0 !== u.column.definition.headerFilterPlaceholder && u.column.definition.headerFilterPlaceholder ? u.column.definition.headerFilterPlaceholder : n) }); r.addEventListener("click", function (n) { n.stopPropagation(); r.focus() }); r.addEventListener("focus", function () { var n = h.table.columnManager.element.scrollLeft; n !== h.table.rowManager.element.scrollLeft && (h.table.rowManager.scrollHorizontal(n), h.table.columnManager.scrollHorizontal(n)) }); s = !1; l = function () { s && clearTimeout(s); s = setTimeout(function () { a(r.value) }, u.table.options.headerFilterLiveFilterDelay) }; n.modules.filter.headerElement = r; n.modules.filter.attrType = r.hasAttribute("type") ? r.getAttribute("type").toLowerCase() : ""; n.modules.filter.tagType = r.tagName.toLowerCase(); !1 !== n.definition.headerFilterLiveFilter && ("autocomplete" !== n.definition.headerFilter && "tickCross" !== n.definition.headerFilter && ("autocomplete" !== n.definition.editor && "tickCross" !== n.definition.editor || !0 !== n.definition.headerFilter) && (r.addEventListener("keyup", l), r.addEventListener("search", l), "number" == n.modules.filter.attrType && r.addEventListener("change", function () { a(r.value) }), "text" == n.modules.filter.attrType && "ie" !== this.table.browser && r.setAttribute("type", "search")), "input" != n.modules.filter.tagType && "select" != n.modules.filter.tagType && "textarea" != n.modules.filter.tagType || r.addEventListener("mousedown", function (n) { n.stopPropagation() })); o.appendChild(r); n.contentElement.appendChild(o); i || u.headerFilterColumns.push(n) } } else console.warn("Filter Error - Cannot add header filter, column has no field set:", n.definition.title) }, y.prototype.hideHeaderFilterElements = function () { this.headerFilterColumns.forEach(function (n) { n.modules.filter && n.modules.filter.headerElement && (n.modules.filter.headerElement.style.display = "none") }) }, y.prototype.showHeaderFilterElements = function () { this.headerFilterColumns.forEach(function (n) { n.modules.filter && n.modules.filter.headerElement && (n.modules.filter.headerElement.style.display = "") }) }, y.prototype.setHeaderFilterFocus = function (n) { n.modules.filter && n.modules.filter.headerElement ? n.modules.filter.headerElement.focus() : console.warn("Column Filter Focus Error - No header filter set on column:", n.getField()) }, y.prototype.getHeaderFilterValue = function (n) { if (n.modules.filter && n.modules.filter.headerElement) return n.modules.filter.headerElement.value; console.warn("Column Filter Error - No header filter set on column:", n.getField()) }, y.prototype.setHeaderFilterValue = function (n, t) { n && (n.modules.filter && n.modules.filter.headerElement ? (this.generateHeaderFilterElement(n, t, !0), n.modules.filter.success(t)) : console.warn("Column Filter Error - No header filter set on column:", n.getField())) }, y.prototype.reloadHeaderFilter = function (n) { n && (n.modules.filter && n.modules.filter.headerElement ? this.generateHeaderFilterElement(n, n.modules.filter.value, !0) : console.warn("Column Filter Error - No header filter set on column:", n.getField())) }, y.prototype.hasChanged = function () { var n = this.changed; return this.changed = !1, n }, y.prototype.setFilter = function (n, t, i, r) { var u = this; u.filterList = []; Array.isArray(n) || (n = [{ field: n, type: t, value: i, params: r }]); u.addFilter(n) }, y.prototype.addFilter = function (n, t, i, r) { var u = this; Array.isArray(n) || (n = [{ field: n, type: t, value: i, params: r }]); n.forEach(function (n) { (n = u.findFilter(n)) && (u.filterList.push(n), u.changed = !0) }); this.table.options.persistence && this.table.modExists("persistence", !0) && this.table.modules.persistence.config.filter && this.table.modules.persistence.save("filter") }, y.prototype.findFilter = function (n) { var r, t = this, i; return Array.isArray(n) ? this.findSubFilters(n) : (i = !1, "function" == typeof n.field ? i = function (t) { return n.field(t, n.type || {}) } : t.filters[n.type] ? (r = t.table.columnManager.getColumnByField(n.field), i = r ? function (i) { return t.filters[n.type](n.value, r.getFieldValue(i), i, n.params || {}) } : function (i) { return t.filters[n.type](n.value, i[n.field], i, n.params || {}) }) : console.warn("Filter Error - No such filter type found, ignoring: ", n.type), n.func = i, !!n.func && n) }, y.prototype.findSubFilters = function (n) { var i = this, t = []; return n.forEach(function (n) { (n = i.findFilter(n)) && t.push(n) }), !!t.length && t }, y.prototype.getFilters = function (n, t) { var i = []; return n && (i = this.getHeaderFilters()), t && i.forEach(function (n) { "function" == typeof n.type && (n.type = "function") }), i = i.concat(this.filtersToArray(this.filterList, t)) }, y.prototype.filtersToArray = function (n, t) { var r = this, i = []; return n.forEach(function (n) { var u; Array.isArray(n) ? i.push(r.filtersToArray(n, t)) : (u = { field: n.field, type: n.type, value: n.value }, t && "function" == typeof u.type && (u.type = "function"), i.push(u)) }), i }, y.prototype.getHeaderFilters = function () { var t = []; for (var n in this.headerFilters) t.push({ field: n, type: this.headerFilters[n].type, value: this.headerFilters[n].value }); return t }, y.prototype.removeFilter = function (n, t, i) { var r = this; Array.isArray(n) || (n = [{ field: n, type: t, value: i }]); n.forEach(function (n) { var t = -1; t = "object" == _typeof(n.field) ? r.filterList.findIndex(function (t) { return n === t }) : r.filterList.findIndex(function (t) { return n.field === t.field && n.type === t.type && n.value === t.value }); t > -1 ? (r.filterList.splice(t, 1), r.changed = !0) : console.warn("Filter Error - No matching filter type found, ignoring: ", n.type) }); this.table.options.persistence && this.table.modExists("persistence", !0) && this.table.modules.persistence.config.filter && this.table.modules.persistence.save("filter") }, y.prototype.clearFilter = function (n) { this.filterList = []; n && this.clearHeaderFilter(); this.changed = !0; this.table.options.persistence && this.table.modExists("persistence", !0) && this.table.modules.persistence.config.filter && this.table.modules.persistence.save("filter") }, y.prototype.clearHeaderFilter = function () { var n = this; this.headerFilters = {}; n.prevHeaderFilterChangeCheck = "{}"; this.headerFilterColumns.forEach(function (t) { t.modules.filter.value = null; t.modules.filter.prevSuccess = void 0; n.reloadHeaderFilter(t) }); this.changed = !0 }, y.prototype.search = function (n, t, i, r) { var u = this, f = [], e = []; return Array.isArray(t) || (t = [{ field: t, type: i, value: r }]), t.forEach(function (n) { (n = u.findFilter(n)) && e.push(n) }), this.table.rowManager.rows.forEach(function (t) { var i = !0; e.forEach(function (n) { u.filterRecurse(n, t.getData()) || (i = !1) }); i && f.push("data" === n ? t.getData("data") : t.getComponent()) }), f }, y.prototype.filter = function (n) { var t = this, i = [], r = []; return t.table.options.dataFiltering && t.table.options.dataFiltering.call(t.table, t.getFilters()), t.table.options.ajaxFiltering || !t.filterList.length && !Object.keys(t.headerFilters).length ? i = n.slice(0) : n.forEach(function (n) { t.filterRow(n) && i.push(n) }), t.table.options.dataFiltered && (i.forEach(function (n) { r.push(n.getComponent()) }), t.table.options.dataFiltered.call(t.table, t.getFilters(), r)), i }, y.prototype.filterRow = function (n) { var t = this, i = !0, r = n.getData(), u; t.filterList.forEach(function (n) { t.filterRecurse(n, r) || (i = !1) }); for (u in t.headerFilters) t.headerFilters[u].func(r) || (i = !1); return i }, y.prototype.filterRecurse = function (n, t) { var r = this, i = !1; return Array.isArray(n) ? n.forEach(function (n) { r.filterRecurse(n, t) && (i = !0) }) : i = n.func(t), i }, y.prototype.filters = { "=": function (n, t) { return t == n }, "<": function (n, t) { return t < n }, "<=": function (n, t) { return t <= n }, ">": function (n, t) { return t > n }, ">=": function (n, t) { return t >= n }, "!=": function (n, t) { return t != n }, regex: function (n, t) { return "string" == typeof n && (n = new RegExp(n)), n.test(t) }, like: function (n, t) { return null === n || void 0 === n ? t === n : void 0 !== t && null !== t && String(t).toLowerCase().indexOf(n.toLowerCase()) > -1 }, keywords: function (n, t, i, r) { var f = n.toLowerCase().split(void 0 === r.separator ? " " : r.separator), e = String(null === t || void 0 === t ? "" : t).toLowerCase(), u = []; return f.forEach(function (n) { e.includes(n) && u.push(!0) }), r.matchAll ? u.length === f.length : !!u.length }, starts: function (n, t) { return null === n || void 0 === n ? t === n : void 0 !== t && null !== t && String(t).toLowerCase().startsWith(n.toLowerCase()) }, ends: function (n, t) { return null === n || void 0 === n ? t === n : void 0 !== t && null !== t && String(t).toLowerCase().endsWith(n.toLowerCase()) }, "in": function (n, t) { return Array.isArray(n) ? !n.length || n.indexOf(t) > -1 : (console.warn("Filter Error - filter value is not an array:", n), !1) } }, n.prototype.registerModule("filter", y), at = function (n) { this.table = n }, at.prototype.initializeColumn = function (n) { n.modules.format = this.lookupFormatter(n, ""); void 0 !== n.definition.formatterPrint && (n.modules.format.print = this.lookupFormatter(n, "Print")); void 0 !== n.definition.formatterClipboard && (n.modules.format.clipboard = this.lookupFormatter(n, "Clipboard")); void 0 !== n.definition.formatterHtmlOutput && (n.modules.format.htmlOutput = this.lookupFormatter(n, "HtmlOutput")) }, at.prototype.lookupFormatter = function (n, t) { var r = { params: n.definition["formatter" + t + "Params"] || {} }, i = n.definition["formatter" + t]; switch (void 0 === i ? "undefined" : _typeof(i)) { case "string": "tick" === i && (i = "tickCross", void 0 === r.params.crossElement && (r.params.crossElement = !1), console.warn("DEPRECATION WARNING - the tick formatter has been deprecated, please use the tickCross formatter with the crossElement param set to false")); this.formatters[i] ? r.formatter = this.formatters[i] : (console.warn("Formatter Error - No such formatter found: ", i), r.formatter = this.formatters.plaintext); break; case "function": r.formatter = i; break; default: r.formatter = this.formatters.plaintext }return r }, at.prototype.cellRendered = function (n) { n.modules.format && n.modules.format.renderedCallback && !n.modules.format.rendered && (n.modules.format.renderedCallback(), n.modules.format.rendered = !0) }, at.prototype.formatValue = function (n) { function i(t) { n.modules.format || (n.modules.format = {}); n.modules.format.renderedCallback = t; n.modules.format.rendered = !1 } var t = n.getComponent(), r = "function" == typeof n.column.modules.format.params ? n.column.modules.format.params(t) : n.column.modules.format.params; return n.column.modules.format.formatter.call(this, t, r, i) }, at.prototype.formatExportValue = function (n, t) { var r, i = n.column.modules.format[t], u; return i ? (u = function (t) { n.modules.format || (n.modules.format = {}); n.modules.format.renderedCallback = t; n.modules.format.rendered = !1 }, r = "function" == typeof i.params ? i.params(component) : i.params, i.formatter.call(this, n.getComponent(), r, u)) : this.formatValue(n) }, at.prototype.sanitizeHTML = function (n) { if (n) { var t = { "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;", "/": "&#x2F;", "`": "&#x60;", "=": "&#x3D;" }; return String(n).replace(/[&<>"'`=\/]/g, function (n) { return t[n] }) } return n }, at.prototype.emptyToSpace = function (n) { return null === n || void 0 === n || "" === n ? "&nbsp;" : n }, at.prototype.getFormatter = function (n) { var n; switch (void 0 === n ? "undefined" : _typeof(n)) { case "string": this.formatters[n] ? n = this.formatters[n] : (console.warn("Formatter Error - No such formatter found: ", n), n = this.formatters.plaintext); break; case "function": n = n; break; default: n = this.formatters.plaintext }return n }, at.prototype.formatters = { plaintext: function (n) { return this.emptyToSpace(this.sanitizeHTML(n.getValue())) }, html: function (n) { return n.getValue() }, textarea: function (n) { return n.getElement().style.whiteSpace = "pre-wrap", this.emptyToSpace(this.sanitizeHTML(n.getValue())) }, money: function (n, t) { var i, r, u, f, e = parseFloat(n.getValue()), h = t.decimal || ".", c = t.thousand || ",", o = t.symbol || "", l = !!t.symbolAfter, s = void 0 !== t.precision ? t.precision : 2; if (isNaN(e)) return this.emptyToSpace(this.sanitizeHTML(n.getValue())); for (i = !1 !== s ? e.toFixed(s) : e, i = String(i).split("."), r = i[0], u = i.length > 1 ? h + i[1] : "", f = /(\d+)(\d{3})/; f.test(r);)r = r.replace(f, "$1" + c + "$2"); return l ? r + u + o : o + r + u }, link: function (n, t) { var e, r = n.getValue(), o = t.urlPrefix || "", i = t.download, u = r, f = document.createElement("a"); if (t.labelField && (e = n.getData(), u = e[t.labelField]), t.label) switch (_typeof(t.label)) { case "string": u = t.label; break; case "function": u = t.label(n) }if (u) { if (t.urlField && (e = n.getData(), r = e[t.urlField]), t.url) switch (_typeof(t.url)) { case "string": r = t.url; break; case "function": r = t.url(n) }return f.setAttribute("href", o + r), t.target && f.setAttribute("target", t.target), t.download && (i = "function" == typeof i ? i(n) : !0 === i ? "" : i, f.setAttribute("download", i)), f.innerHTML = this.emptyToSpace(this.sanitizeHTML(u)), f } return "&nbsp;" }, image: function (n, t) { var i = document.createElement("img"); switch (i.setAttribute("src", n.getValue()), _typeof(t.height)) { case "number": i.style.height = t.height + "px"; break; case "string": i.style.height = t.height }switch (_typeof(t.width)) { case "number": i.style.width = t.width + "px"; break; case "string": i.style.width = t.width }return i.addEventListener("load", function () { n.getRow().normalizeHeight() }), i }, tickCross: function (n, t) { var i = n.getValue(), r = n.getElement(), u = t.allowEmpty, f = t.allowTruthy, e = void 0 !== t.tickElement ? t.tickElement : '<svg enable-background="new 0 0 24 24" height="14" width="14" viewBox="0 0 24 24" xml:space="preserve" ><path fill="#2DC214" clip-rule="evenodd" d="M21.652,3.211c-0.293-0.295-0.77-0.295-1.061,0L9.41,14.34 c-0.293,0.297-0.771,0.297-1.062,0L3.449,9.351C3.304,9.203,3.114,9.13,2.923,9.129C2.73,9.128,2.534,9.201,2.387,9.351 l-2.165,1.946C0.078,11.445,0,11.63,0,11.823c0,0.194,0.078,0.397,0.223,0.544l4.94,5.184c0.292,0.296,0.771,0.776,1.062,1.07 l2.124,2.141c0.292,0.293,0.769,0.293,1.062,0l14.366-14.34c0.293-0.294,0.293-0.777,0-1.071L21.652,3.211z" fill-rule="evenodd"/><\/svg>', o = void 0 !== t.crossElement ? t.crossElement : '<svg enable-background="new 0 0 24 24" height="14" width="14" viewBox="0 0 24 24" xml:space="preserve" ><path fill="#CE1515" d="M22.245,4.015c0.313,0.313,0.313,0.826,0,1.139l-6.276,6.27c-0.313,0.312-0.313,0.826,0,1.14l6.273,6.272 c0.313,0.313,0.313,0.826,0,1.14l-2.285,2.277c-0.314,0.312-0.828,0.312-1.142,0l-6.271-6.271c-0.313-0.313-0.828-0.313-1.141,0 l-6.276,6.267c-0.313,0.313-0.828,0.313-1.141,0l-2.282-2.28c-0.313-0.313-0.313-0.826,0-1.14l6.278-6.269 c0.313-0.312,0.313-0.826,0-1.14L1.709,5.147c-0.314-0.313-0.314-0.827,0-1.14l2.284-2.278C4.308,1.417,4.821,1.417,5.135,1.73 L11.405,8c0.314,0.314,0.828,0.314,1.141,0.001l6.276-6.267c0.312-0.312,0.826-0.312,1.141,0L22.245,4.015z"/><\/svg>'; return f && i || !0 === i || "true" === i || "True" === i || 1 === i || "1" === i ? (r.setAttribute("aria-checked", !0), e || "") : !u || "null" !== i && "" !== i && null !== i && void 0 !== i ? (r.setAttribute("aria-checked", !1), o || "") : (r.setAttribute("aria-checked", "mixed"), "") }, datetime: function (n, t) { var e = t.inputFormat || "YYYY-MM-DD hh:mm:ss", f = t.outputFormat || "DD/MM/YYYY hh:mm:ss", i = void 0 !== t.invalidPlaceholder ? t.invalidPlaceholder : "", r = n.getValue(), u = moment(r, e); return u.isValid() ? t.timezone ? u.tz(t.timezone).format(f) : u.format(f) : !0 === i ? r : "function" == typeof i ? i(r) : i }, datetimediff: function (n, t) { var o = t.inputFormat || "YYYY-MM-DD hh:mm:ss", i = void 0 !== t.invalidPlaceholder ? t.invalidPlaceholder : "", r = void 0 !== t.suffix && t.suffix, s = void 0 !== t.unit ? t.unit : void 0, h = void 0 !== t.humanize && t.humanize, e = void 0 !== t.date ? t.date : moment(), u = n.getValue(), f = moment(u, o); return f.isValid() ? h ? moment.duration(f.diff(e)).humanize(r) : f.diff(e, s) + (r ? " " + r : "") : !0 === i ? u : "function" == typeof i ? i(u) : i }, lookup: function (n, t) { var i = n.getValue(); return void 0 === t[i] ? (console.warn("Missing display value for " + i), i) : t[i] }, star: function (n, t) { var i = n.getValue(), u = n.getElement(), s = t && t.stars ? t.stars : 5, e = document.createElement("span"), r = document.createElementNS("http://www.w3.org/2000/svg", "svg"), f, o; for (e.style.verticalAlign = "middle", r.setAttribute("width", "14"), r.setAttribute("height", "14"), r.setAttribute("viewBox", "0 0 512 512"), r.setAttribute("xml:space", "preserve"), r.style.padding = "0 1px", i = i && !isNaN(i) ? parseInt(i) : 0, i = Math.max(0, Math.min(i, s)), f = 1; f <= s; f++)o = r.cloneNode(!0), o.innerHTML = f <= i ? '<polygon fill="#FFEA00" stroke="#C1AB60" stroke-width="37.6152" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" points="259.216,29.942 330.27,173.919 489.16,197.007 374.185,309.08 401.33,467.31 259.216,392.612 117.104,467.31 144.25,309.08 29.274,197.007 188.165,173.919 "/>' : '<polygon fill="#D2D2D2" stroke="#686868" stroke-width="37.6152" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" points="259.216,29.942 330.27,173.919 489.16,197.007 374.185,309.08 401.33,467.31 259.216,392.612 117.104,467.31 144.25,309.08 29.274,197.007 188.165,173.919 "/>', e.appendChild(o); return u.style.whiteSpace = "nowrap", u.style.overflow = "hidden", u.style.textOverflow = "ellipsis", u.setAttribute("aria-label", i), e }, traffic: function (n, t) { var c, r, f = this.sanitizeHTML(n.getValue()) || 0, s = document.createElement("span"), h = t && t.max ? t.max : 100, e = t && t.min ? t.min : 0, i = t && void 0 !== t.color ? t.color : ["red", "orange", "green"], o = "#666666", l, u; if (!isNaN(f) && void 0 !== n.getValue()) { switch (s.classList.add("tabulator-traffic-light"), r = parseFloat(f) <= h ? parseFloat(f) : h, r = parseFloat(r) >= e ? parseFloat(r) : e, c = (h - e) / 100, r = Math.round((r - e) / c), void 0 === i ? "undefined" : _typeof(i)) { case "string": o = i; break; case "function": o = i(f); break; case "object": if (Array.isArray(i)) { l = 100 / i.length; u = Math.floor(r / l); u = Math.min(u, i.length - 1); u = Math.max(u, 0); o = i[u]; break } }return s.style.backgroundColor = o, s } }, progress: function (n, t, i) { var w, u, c, o, l, h = this.sanitizeHTML(n.getValue()) || 0, s = n.getElement(), v = t && t.max ? t.max : 100, a = t && t.min ? t.min : 0, b = t && t.legendAlign ? t.legendAlign : "center", y, r, f, e; switch (u = parseFloat(h) <= v ? parseFloat(h) : v, u = parseFloat(u) >= a ? parseFloat(u) : a, w = (v - a) / 100, u = Math.round((u - a) / w), _typeof(t.color)) { case "string": c = t.color; break; case "function": c = t.color(h); break; case "object": if (Array.isArray(t.color)) { y = 100 / t.color.length; r = Math.floor(u / y); r = Math.min(r, t.color.length - 1); r = Math.max(r, 0); c = t.color[r]; break } default: c = "#2DC214" }switch (_typeof(t.legend)) { case "string": o = t.legend; break; case "function": o = t.legend(h); break; case "boolean": o = h; break; default: o = !1 }switch (_typeof(t.legendColor)) { case "string": l = t.legendColor; break; case "function": l = t.legendColor(h); break; case "object": Array.isArray(t.legendColor) && (y = 100 / t.legendColor.length, r = Math.floor(u / y), r = Math.min(r, t.legendColor.length - 1), r = Math.max(r, 0), l = t.legendColor[r]); break; default: l = "#000" }return s.style.minWidth = "30px", s.style.position = "relative", s.setAttribute("aria-label", u), f = document.createElement("div"), (f.style.display = "inline-block", f.style.position = "relative", f.style.width = u + "%", f.style.backgroundColor = c, f.style.height = "100%", f.setAttribute("data-max", v), f.setAttribute("data-min", a), o) && (e = document.createElement("div"), e.style.position = "absolute", e.style.top = "4px", e.style.left = 0, e.style.textAlign = b, e.style.width = "100%", e.style.color = l, e.innerHTML = o), i(function () { if (!(n instanceof p)) { var t = document.createElement("div"); t.style.position = "absolute"; t.style.top = "4px"; t.style.bottom = "4px"; t.style.left = "4px"; t.style.right = "4px"; s.appendChild(t); s = t } s.appendChild(f); o && s.appendChild(e) }), "" }, color: function (n) { return n.getElement().style.backgroundColor = this.sanitizeHTML(n.getValue()), "" }, buttonTick: function () { return '<svg enable-background="new 0 0 24 24" height="14" width="14" viewBox="0 0 24 24" xml:space="preserve" ><path fill="#2DC214" clip-rule="evenodd" d="M21.652,3.211c-0.293-0.295-0.77-0.295-1.061,0L9.41,14.34 c-0.293,0.297-0.771,0.297-1.062,0L3.449,9.351C3.304,9.203,3.114,9.13,2.923,9.129C2.73,9.128,2.534,9.201,2.387,9.351 l-2.165,1.946C0.078,11.445,0,11.63,0,11.823c0,0.194,0.078,0.397,0.223,0.544l4.94,5.184c0.292,0.296,0.771,0.776,1.062,1.07 l2.124,2.141c0.292,0.293,0.769,0.293,1.062,0l14.366-14.34c0.293-0.294,0.293-0.777,0-1.071L21.652,3.211z" fill-rule="evenodd"/><\/svg>' }, buttonCross: function () { return '<svg enable-background="new 0 0 24 24" height="14" width="14" viewBox="0 0 24 24" xml:space="preserve" ><path fill="#CE1515" d="M22.245,4.015c0.313,0.313,0.313,0.826,0,1.139l-6.276,6.27c-0.313,0.312-0.313,0.826,0,1.14l6.273,6.272 c0.313,0.313,0.313,0.826,0,1.14l-2.285,2.277c-0.314,0.312-0.828,0.312-1.142,0l-6.271-6.271c-0.313-0.313-0.828-0.313-1.141,0 l-6.276,6.267c-0.313,0.313-0.828,0.313-1.141,0l-2.282-2.28c-0.313-0.313-0.313-0.826,0-1.14l6.278-6.269 c0.313-0.312,0.313-0.826,0-1.14L1.709,5.147c-0.314-0.313-0.314-0.827,0-1.14l2.284-2.278C4.308,1.417,4.821,1.417,5.135,1.73 L11.405,8c0.314,0.314,0.828,0.314,1.141,0.001l6.276-6.267c0.312-0.312,0.826-0.312,1.141,0L22.245,4.015z"/><\/svg>' }, rownum: function (n) { return this.table.rowManager.activeRows.indexOf(n.getRow()._getSelf()) + 1 }, handle: function (n) { return n.getElement().classList.add("tabulator-row-handle"), "<div class='tabulator-row-handle-box'><div class='tabulator-row-handle-bar'><\/div><div class='tabulator-row-handle-bar'><\/div><div class='tabulator-row-handle-bar'><\/div><\/div>" }, responsiveCollapse: function (n) { function r(n) { var r = i.element; i.open = n; r && (i.open ? (t.classList.add("open"), r.style.display = "") : (t.classList.remove("open"), r.style.display = "none")) } var t = document.createElement("div"), i = n.getRow()._row.modules.responsiveLayout; return t.classList.add("tabulator-responsive-collapse-toggle"), t.innerHTML = "<span class='tabulator-responsive-collapse-toggle-open'>+<\/span><span class='tabulator-responsive-collapse-toggle-close'>-<\/span>", n.getElement().classList.add("tabulator-row-handle"), t.addEventListener("click", function (n) { n.stopImmediatePropagation(); r(!i.open) }), r(i.open), t }, rowSelection: function (n, t) { var u = this, i = document.createElement("input"), r; return (i.type = "checkbox", this.table.modExists("selectRow", !0)) && ((i.addEventListener("click", function (n) { n.stopPropagation() }), "function" == typeof n.getRow) ? (r = n.getRow(), r instanceof s ? (i.addEventListener("change", function () { r.toggleSelect() }), i.checked = r.isSelected && r.isSelected(), this.table.modules.selectRow.registerRowSelectCheckbox(r, i)) : i = "") : (i.addEventListener("change", function () { u.table.modules.selectRow.selectedRows.length ? u.table.deselectRow() : u.table.selectRow(t.rowRange) }), this.table.modules.selectRow.registerHeaderSelectCheckbox(i))), i } }, n.prototype.registerModule("format", at), et = function (n) { this.table = n; this.leftColumns = []; this.rightColumns = []; this.leftMargin = 0; this.rightMargin = 0; this.rightPadding = 0; this.initializationMode = "left"; this.active = !1; this.scrollEndTimer = !1 }, et.prototype.reset = function () { this.initializationMode = "left"; this.leftColumns = []; this.rightColumns = []; this.leftMargin = 0; this.rightMargin = 0; this.rightMargin = 0; this.active = !1; this.table.columnManager.headersElement.style.marginLeft = 0; this.table.columnManager.element.style.paddingRight = 0 }, et.prototype.initializeColumn = function (n) { var t = { margin: 0, edge: !1 }; n.isGroup || (this.frozenCheck(n) ? (t.position = this.initializationMode, "left" == this.initializationMode ? this.leftColumns.push(n) : this.rightColumns.unshift(n), this.active = !0, n.modules.frozen = t) : this.initializationMode = "right") }, et.prototype.frozenCheck = function (n) { return n.parent.isGroup && n.definition.frozen && console.warn("Frozen Column Error - Parent column group must be frozen, not individual columns or sub column groups"), n.parent.isGroup ? this.frozenCheck(n.parent) : n.definition.frozen }, et.prototype.scrollHorizontal = function () { var n, t = this; this.active && (clearTimeout(this.scrollEndTimer), this.scrollEndTimer = setTimeout(function () { t.layout() }, 100), n = this.table.rowManager.getVisibleRows(), this.calcMargins(), this.layoutColumnPosition(), this.layoutCalcRows(), n.forEach(function (n) { "row" === n.type && t.layoutRow(n) }), this.table.rowManager.tableElement.style.marginRight = this.rightMargin) }, et.prototype.calcMargins = function () { this.leftMargin = this._calcSpace(this.leftColumns, this.leftColumns.length) + "px"; this.table.columnManager.headersElement.style.marginLeft = this.leftMargin; this.rightMargin = this._calcSpace(this.rightColumns, this.rightColumns.length) + "px"; this.table.columnManager.element.style.paddingRight = this.rightMargin; this.rightPadding = this.table.rowManager.element.clientWidth + this.table.columnManager.scrollLeft }, et.prototype.layoutCalcRows = function () { this.table.modExists("columnCalcs") && (this.table.modules.columnCalcs.topInitialized && this.table.modules.columnCalcs.topRow && this.layoutRow(this.table.modules.columnCalcs.topRow), this.table.modules.columnCalcs.botInitialized && this.table.modules.columnCalcs.botRow && this.layoutRow(this.table.modules.columnCalcs.botRow)) }, et.prototype.layoutColumnPosition = function (n) { var t = this, i = []; this.leftColumns.forEach(function (r, u) { if (r.modules.frozen.margin = t._calcSpace(t.leftColumns, u) + t.table.columnManager.scrollLeft + "px", r.modules.frozen.edge = u == t.leftColumns.length - 1 ? !0 : !1, r.parent.isGroup) { var f = t.getColGroupParentElement(r); i.includes(f) || (t.layoutElement(f, r), i.push(f)); r.modules.frozen.edge && f.classList.add("tabulator-frozen-" + r.modules.frozen.position) } else t.layoutElement(r.getElement(), r); n && r.cells.forEach(function (n) { t.layoutElement(n.getElement(), r) }) }); this.rightColumns.forEach(function (i, r) { i.modules.frozen.margin = t.rightPadding - t._calcSpace(t.rightColumns, r + 1) + "px"; i.modules.frozen.edge = r == t.rightColumns.length - 1 ? !0 : !1; i.parent.isGroup ? t.layoutElement(t.getColGroupParentElement(i), i) : t.layoutElement(i.getElement(), i); n && i.cells.forEach(function (n) { t.layoutElement(n.getElement(), i) }) }) }, et.prototype.getColGroupParentElement = function (n) { return n.parent.isGroup ? this.getColGroupParentElement(n.parent) : n.getElement() }, et.prototype.layout = function () { var n = this; n.active && (this.calcMargins(), n.table.rowManager.getDisplayRows().forEach(function (t) { "row" === t.type && n.layoutRow(t) }), this.layoutCalcRows(), this.layoutColumnPosition(!0), this.table.rowManager.tableElement.style.marginRight = this.rightMargin) }, et.prototype.layoutRow = function (n) { var t = this; n.getElement().style.paddingLeft = this.leftMargin; this.leftColumns.forEach(function (i) { var r = n.getCell(i); r && t.layoutElement(r.getElement(), i) }); this.rightColumns.forEach(function (i) { var r = n.getCell(i); r && t.layoutElement(r.getElement(), i) }) }, et.prototype.layoutElement = function (n, t) { t.modules.frozen && (n.style.position = "absolute", n.style.left = t.modules.frozen.margin, n.classList.add("tabulator-frozen"), t.modules.frozen.edge && n.classList.add("tabulator-frozen-" + t.modules.frozen.position)) }, et.prototype._calcSpace = function (n, t) { for (var r = 0, i = 0; i < t; i++)n[i].visible && (r += n[i].getWidth()); return r }, n.prototype.registerModule("frozenColumns", et), vt = function (n) { this.table = n; this.topElement = document.createElement("div"); this.rows = []; this.displayIndex = 0 }, vt.prototype.initialize = function () { this.rows = []; this.topElement.classList.add("tabulator-frozen-rows-holder"); this.table.columnManager.getElement().insertBefore(this.topElement, this.table.columnManager.headersElement.nextSibling) }, vt.prototype.setDisplayIndex = function (n) { this.displayIndex = n }, vt.prototype.getDisplayIndex = function () { return this.displayIndex }, vt.prototype.isFrozen = function () { return !!this.rows.length }, vt.prototype.getRows = function (n) { var t = n.slice(0); return this.rows.forEach(function (n) { var i = t.indexOf(n); i > -1 && t.splice(i, 1) }), t }, vt.prototype.freezeRow = function (n) { n.modules.frozen ? console.warn("Freeze Error - Row is already frozen") : (n.modules.frozen = !0, this.topElement.appendChild(n.getElement()), n.initialize(), n.normalizeHeight(), this.table.rowManager.adjustTableSize(), this.rows.push(n), this.table.rowManager.refreshActiveData("display"), this.styleRows()) }, vt.prototype.unfreezeRow = function (n) { this.rows.indexOf(n); n.modules.frozen ? (n.modules.frozen = !1, this.detachRow(n), this.table.rowManager.adjustTableSize(), this.table.rowManager.refreshActiveData("display"), this.rows.length && this.styleRows()) : console.warn("Freeze Error - Row is already unfrozen") }, vt.prototype.detachRow = function (n) { var i = this.rows.indexOf(n), t; i > -1 && (t = n.getElement(), t.parentNode.removeChild(t), this.rows.splice(i, 1)) }, vt.prototype.styleRows = function () { var n = this; this.rows.forEach(function (t, i) { n.table.rowManager.styleRow(t, i) }) }, n.prototype.registerModule("frozenRows", vt), ut = function (n) { this._group = n; this.type = "GroupComponent" }, ut.prototype.getKey = function () { return this._group.key }, ut.prototype.getField = function () { return this._group.field }, ut.prototype.getElement = function () { return this._group.element }, ut.prototype.getRows = function () { return this._group.getRows(!0) }, ut.prototype.getSubGroups = function () { return this._group.getSubGroups(!0) }, ut.prototype.getParentGroup = function () { return !!this._group.parent && this._group.parent.getComponent() }, ut.prototype.getVisibility = function () { return console.warn("getVisibility function is deprecated, you should now use the isVisible function"), this._group.visible }, ut.prototype.isVisible = function () { return this._group.visible }, ut.prototype.show = function () { this._group.show() }, ut.prototype.hide = function () { this._group.hide() }, ut.prototype.toggle = function () { this._group.toggleVisibility() }, ut.prototype._getSelf = function () { return this._group }, ut.prototype.getTable = function () { return this._group.groupManager.table }, f = function (n, t, i, r, u, f, e) { this.groupManager = n; this.parent = t; this.key = r; this.level = i; this.field = u; this.hasSubGroups = i < n.groupIDLookups.length - 1; this.addRow = this.hasSubGroups ? this._addRowToGroup : this._addRow; this.type = "group"; this.old = e; this.rows = []; this.groups = []; this.groupList = []; this.generator = f; this.elementContents = !1; this.height = 0; this.outerHeight = 0; this.initialized = !1; this.calcs = {}; this.initialized = !1; this.modules = {}; this.arrowElement = !1; this.visible = e ? e.visible : void 0 !== n.startOpen[i] ? n.startOpen[i] : n.startOpen[0]; this.component = null; this.createElements(); this.addBindings(); this.createValueGroups() }, f.prototype.wipe = function () { this.groupList.length ? this.groupList.forEach(function (n) { n.wipe() }) : (this.element = !1, this.arrowElement = !1, this.elementContents = !1) }, f.prototype.createElements = function () { var n = document.createElement("div"); n.classList.add("tabulator-arrow"); this.element = document.createElement("div"); this.element.classList.add("tabulator-row"); this.element.classList.add("tabulator-group"); this.element.classList.add("tabulator-group-level-" + this.level); this.element.setAttribute("role", "rowgroup"); this.arrowElement = document.createElement("div"); this.arrowElement.classList.add("tabulator-group-toggle"); this.arrowElement.appendChild(n); !1 !== this.groupManager.table.options.movableRows && this.groupManager.table.modExists("moveRow") && this.groupManager.table.modules.moveRow.initializeGroupHeader(this) }, f.prototype.createValueGroups = function () { var t = this, n = this.level + 1; this.groupManager.allowedValues && this.groupManager.allowedValues[n] && this.groupManager.allowedValues[n].forEach(function (i) { t._createGroup(i, n) }) }, f.prototype.addBindings = function () { var t, i, r, u, n = this; n.groupManager.table.options.groupClick && n.element.addEventListener("click", function (t) { n.groupManager.table.options.groupClick.call(n.groupManager.table, t, n.getComponent()) }); n.groupManager.table.options.groupDblClick && n.element.addEventListener("dblclick", function (t) { n.groupManager.table.options.groupDblClick.call(n.groupManager.table, t, n.getComponent()) }); n.groupManager.table.options.groupContext && n.element.addEventListener("contextmenu", function (t) { n.groupManager.table.options.groupContext.call(n.groupManager.table, t, n.getComponent()) }); (n.groupManager.table.options.groupContextMenu || n.groupManager.table.options.groupClickMenu) && n.groupManager.table.modExists("menu") && n.groupManager.table.modules.menu.initializeGroup.call(n.groupManager.table.modules.menu, n); n.groupManager.table.options.groupTap && (r = !1, n.element.addEventListener("touchstart", function () { r = !0 }, { passive: !0 }), n.element.addEventListener("touchend", function (t) { r && n.groupManager.table.options.groupTap(t, n.getComponent()); r = !1 })); n.groupManager.table.options.groupDblTap && (t = null, n.element.addEventListener("touchend", function (i) { t ? (clearTimeout(t), t = null, n.groupManager.table.options.groupDblTap(i, n.getComponent())) : t = setTimeout(function () { clearTimeout(t); t = null }, 300) })); n.groupManager.table.options.groupTapHold && (i = null, n.element.addEventListener("touchstart", function (t) { clearTimeout(i); i = setTimeout(function () { clearTimeout(i); i = null; r = !1; n.groupManager.table.options.groupTapHold(t, n.getComponent()) }, 1e3) }, { passive: !0 }), n.element.addEventListener("touchend", function () { clearTimeout(i); i = null })); n.groupManager.table.options.groupToggleElement && (u = "arrow" == n.groupManager.table.options.groupToggleElement ? n.arrowElement : n.element, u.addEventListener("click", function (t) { t.stopPropagation(); t.stopImmediatePropagation(); n.toggleVisibility() })) }, f.prototype._createGroup = function (n, t) { var i = t + "_" + n, r = new f(this.groupManager, this, t, n, this.groupManager.groupIDLookups[t].field, this.groupManager.headerGenerator[t] || this.groupManager.headerGenerator[0], !!this.old && this.old.groups[i]); this.groups[i] = r; this.groupList.push(r) }, f.prototype._addRowToGroup = function (n) { var i = this.level + 1, r, t; this.hasSubGroups && (r = this.groupManager.groupIDLookups[i].func(n.getData()), t = i + "_" + r, this.groupManager.allowedValues && this.groupManager.allowedValues[i] ? this.groups[t] && this.groups[t].addRow(n) : (this.groups[t] || this._createGroup(r, i), this.groups[t].addRow(n))) }, f.prototype._addRow = function (n) { this.rows.push(n); n.modules.group = this }, f.prototype.insertRow = function (n, t, i) { var u = this.conformRowData({}), r; n.updateData(u); r = this.rows.indexOf(t); r > -1 ? i ? this.rows.splice(r + 1, 0, n) : this.rows.splice(r, 0, n) : i ? this.rows.push(n) : this.rows.unshift(n); n.modules.group = this; this.generateGroupHeaderContents(); this.groupManager.table.modExists("columnCalcs") && "table" != this.groupManager.table.options.columnCalcs && this.groupManager.table.modules.columnCalcs.recalcGroup(this); this.groupManager.updateGroupRows(!0) }, f.prototype.scrollHeader = function (n) { this.arrowElement.style.marginLeft = n; this.groupList.forEach(function (t) { t.scrollHeader(n) }) }, f.prototype.getRowIndex = function () { }, f.prototype.conformRowData = function (n) { return this.field ? n[this.field] = this.key : console.warn("Data Conforming Error - Cannot conform row data to match new group as groupBy is a function"), this.parent && (n = this.parent.conformRowData(n)), n }, f.prototype.removeRow = function (n) { var i = this.rows.indexOf(n), t = n.getElement(); i > -1 && this.rows.splice(i, 1); this.groupManager.table.options.groupValues || this.rows.length ? (t.parentNode && t.parentNode.removeChild(t), this.generateGroupHeaderContents(), this.groupManager.table.modExists("columnCalcs") && "table" != this.groupManager.table.options.columnCalcs && this.groupManager.table.modules.columnCalcs.recalcGroup(this)) : (this.parent ? this.parent.removeGroup(this) : this.groupManager.removeGroup(this), this.groupManager.updateGroupRows(!0)) }, f.prototype.removeGroup = function (n) { var t, i = n.level + "_" + n.key; this.groups[i] && (delete this.groups[i], t = this.groupList.indexOf(n), t > -1 && this.groupList.splice(t, 1), this.groupList.length || (this.parent ? this.parent.removeGroup(this) : this.groupManager.removeGroup(this))) }, f.prototype.getHeadersAndRows = function (n) { var t = []; return t.push(this), this._visSet(), this.visible ? this.groupList.length ? this.groupList.forEach(function (i) { t = t.concat(i.getHeadersAndRows(n)) }) : (!n && "table" != this.groupManager.table.options.columnCalcs && this.groupManager.table.modExists("columnCalcs") && this.groupManager.table.modules.columnCalcs.hasTopCalcs() && (this.calcs.top && (this.calcs.top.detachElement(), this.calcs.top.deleteCells()), this.calcs.top = this.groupManager.table.modules.columnCalcs.generateTopRow(this.rows), t.push(this.calcs.top)), t = t.concat(this.rows), !n && "table" != this.groupManager.table.options.columnCalcs && this.groupManager.table.modExists("columnCalcs") && this.groupManager.table.modules.columnCalcs.hasBottomCalcs() && (this.calcs.bottom && (this.calcs.bottom.detachElement(), this.calcs.bottom.deleteCells()), this.calcs.bottom = this.groupManager.table.modules.columnCalcs.generateBottomRow(this.rows), t.push(this.calcs.bottom))) : this.groupList.length || "table" == this.groupManager.table.options.columnCalcs || this.groupManager.table.modExists("columnCalcs") && (!n && this.groupManager.table.modules.columnCalcs.hasTopCalcs() && (this.calcs.top && (this.calcs.top.detachElement(), this.calcs.top.deleteCells()), this.groupManager.table.options.groupClosedShowCalcs && (this.calcs.top = this.groupManager.table.modules.columnCalcs.generateTopRow(this.rows), t.push(this.calcs.top))), !n && this.groupManager.table.modules.columnCalcs.hasBottomCalcs() && (this.calcs.bottom && (this.calcs.bottom.detachElement(), this.calcs.bottom.deleteCells()), this.groupManager.table.options.groupClosedShowCalcs && (this.calcs.bottom = this.groupManager.table.modules.columnCalcs.generateBottomRow(this.rows), t.push(this.calcs.bottom)))), t }, f.prototype.getData = function (n, t) { var i = []; return this._visSet(), (!n || n && this.visible) && this.rows.forEach(function (n) { i.push(n.getData(t || "data")) }), i }, f.prototype.getRowCount = function () { var n = 0; return this.groupList.length ? this.groupList.forEach(function (t) { n += t.getRowCount() }) : n = this.rows.length, n }, f.prototype.toggleVisibility = function () { this.visible ? this.hide() : this.show() }, f.prototype.hide = function () { this.visible = !1; "classic" != this.groupManager.table.rowManager.getRenderMode() || this.groupManager.table.options.pagination ? this.groupManager.updateGroupRows(!0) : (this.element.classList.remove("tabulator-group-visible"), this.groupList.length ? this.groupList.forEach(function (n) { n.getHeadersAndRows().forEach(function (n) { n.detachElement() }) }) : this.rows.forEach(function (n) { var t = n.getElement(); t.parentNode.removeChild(t) }), this.groupManager.table.rowManager.setDisplayRows(this.groupManager.updateGroupRows(), this.groupManager.getDisplayIndex()), this.groupManager.table.rowManager.checkClassicModeGroupHeaderWidth()); this.groupManager.table.options.groupVisibilityChanged.call(this.table, this.getComponent(), !1) }, f.prototype.show = function () { var t = this, n; (t.visible = !0, "classic" != this.groupManager.table.rowManager.getRenderMode() || this.groupManager.table.options.pagination) ? this.groupManager.updateGroupRows(!0) : (this.element.classList.add("tabulator-group-visible"), n = t.getElement(), this.groupList.length ? this.groupList.forEach(function (t) { t.getHeadersAndRows().forEach(function (t) { var i = t.getElement(); n.parentNode.insertBefore(i, n.nextSibling); t.initialize(); n = i }) }) : t.rows.forEach(function (t) { var i = t.getElement(); n.parentNode.insertBefore(i, n.nextSibling); t.initialize(); n = i }), this.groupManager.table.rowManager.setDisplayRows(this.groupManager.updateGroupRows(), this.groupManager.getDisplayIndex()), this.groupManager.table.rowManager.checkClassicModeGroupHeaderWidth()); this.groupManager.table.options.groupVisibilityChanged.call(this.table, this.getComponent(), !0) }, f.prototype._visSet = function () { var n = []; "function" == typeof this.visible && (this.rows.forEach(function (t) { n.push(t.getData()) }), this.visible = this.visible(this.key, this.getRowCount(), n, this.getComponent())) }, f.prototype.getRowGroup = function (n) { var t = !1; return this.groupList.length ? this.groupList.forEach(function (i) { var r = i.getRowGroup(n); r && (t = r) }) : this.rows.find(function (t) { return t === n }) && (t = this), t }, f.prototype.getSubGroups = function (n) { var t = []; return this.groupList.forEach(function (i) { t.push(n ? i.getComponent() : i) }), t }, f.prototype.getRows = function (n) { var t = []; return this.rows.forEach(function (i) { t.push(n ? i.getComponent() : i) }), t }, f.prototype.generateGroupHeaderContents = function () { var n = []; for (this.rows.forEach(function (t) { n.push(t.getData()) }), this.elementContents = this.generator(this.key, this.getRowCount(), n, this.getComponent()); this.element.firstChild;)this.element.removeChild(this.element.firstChild); "string" == typeof this.elementContents ? this.element.innerHTML = this.elementContents : this.element.appendChild(this.elementContents); this.element.insertBefore(this.arrowElement, this.element.firstChild) }, f.prototype.getPath = function () { var n = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : []; return n.unshift(this.key), this.parent && this.parent.getPath(n), n }, f.prototype.getElement = function () { this.addBindingsd = !1; this._visSet(); this.visible ? this.element.classList.add("tabulator-group-visible") : this.element.classList.remove("tabulator-group-visible"); for (var n = 0; n < this.element.childNodes.length; ++n)this.element.childNodes[n].parentNode.removeChild(this.element.childNodes[n]); return this.generateGroupHeaderContents(), this.element }, f.prototype.detachElement = function () { this.element && this.element.parentNode && this.element.parentNode.removeChild(this.element) }, f.prototype.normalizeHeight = function () { this.setHeight(this.element.clientHeight) }, f.prototype.initialize = function (n) { this.initialized && !n || (this.normalizeHeight(), this.initialized = !0) }, f.prototype.reinitialize = function () { this.initialized = !1; this.height = 0; n.prototype.helpers.elVisible(this.element) && this.initialize(!0) }, f.prototype.setHeight = function (n) { this.height != n && (this.height = n, this.outerHeight = this.element.offsetHeight) }, f.prototype.getHeight = function () { return this.outerHeight }, f.prototype.getGroup = function () { return this }, f.prototype.reinitializeHeight = function () { }, f.prototype.calcHeight = function () { }, f.prototype.setCellHeight = function () { }, f.prototype.clearCellHeight = function () { }, f.prototype.getComponent = function () { return this.component || (this.component = new ut(this)), this.component }, k = function (n) { this.table = n; this.groupIDLookups = !1; this.startOpen = [function () { return !1 }]; this.headerGenerator = [function () { return "" }]; this.groupList = []; this.allowedValues = !1; this.groups = {}; this.displayIndex = 0 }, k.prototype.initialize = function () { var n = this, t = n.table.options.groupBy, i = n.table.options.groupStartOpen, r = n.table.options.groupHeader, u; (this.allowedValues = n.table.options.groupValues, Array.isArray(t) && Array.isArray(r) && t.length > r.length && console.warn("Error creating group headers, groupHeader array is shorter than groupBy array"), n.headerGenerator = [function () { return "" }], this.startOpen = [function () { return !1 }], n.table.modules.localize.bind("groups|item", function (t, i) { n.headerGenerator[0] = function (n, r) { return (void 0 === n ? "" : n) + "<span>(" + r + " " + (1 === r ? t : i.groups.items) + ")<\/span>" } }), this.groupIDLookups = [], Array.isArray(t) || t) ? this.table.modExists("columnCalcs") && "table" != this.table.options.columnCalcs && "both" != this.table.options.columnCalcs && this.table.modules.columnCalcs.removeCalcs() : this.table.modExists("columnCalcs") && "group" != this.table.options.columnCalcs && (u = this.table.columnManager.getRealColumns(), u.forEach(function (t) { t.definition.topCalc && n.table.modules.columnCalcs.initializeTopRow(); t.definition.bottomCalc && n.table.modules.columnCalcs.initializeBottomRow() })); Array.isArray(t) || (t = [t]); t.forEach(function (t, i) { var r, u; "function" == typeof t ? r = t : (u = n.table.columnManager.getColumnByField(t), r = u ? function (n) { return u.getFieldValue(n) } : function (n) { return n[t] }); n.groupIDLookups.push({ field: "function" != typeof t && t, func: r, values: !!n.allowedValues && n.allowedValues[i] }) }); i && (Array.isArray(i) || (i = [i]), i.forEach(function (n) { n = "function" == typeof n ? n : function () { return !0 } }), n.startOpen = i); r && (n.headerGenerator = Array.isArray(r) ? r : [r]); this.initialized = !0 }, k.prototype.setDisplayIndex = function (n) { this.displayIndex = n }, k.prototype.getDisplayIndex = function () { return this.displayIndex }, k.prototype.getRows = function (n) { return this.groupIDLookups.length ? (this.table.options.dataGrouping.call(this.table), this.generateGroups(n), this.table.options.dataGrouped && this.table.options.dataGrouped.call(this.table, this.getGroups(!0)), this.updateGroupRows()) : n.slice(0) }, k.prototype.getGroups = function (n) { var t = []; return this.groupList.forEach(function (i) { t.push(n ? i.getComponent() : i) }), t }, k.prototype.getChildGroups = function (n) { var i = this, t = []; return n || (n = this), n.groupList.forEach(function (n) { n.groupList.length ? t = t.concat(i.getChildGroups(n)) : t.push(n) }), t }, k.prototype.wipe = function () { this.groupList.forEach(function (n) { n.wipe() }) }, k.prototype.pullGroupListData = function (n) { var i = this, t = []; return n.forEach(function (n) { var r = {}, u; r.level = 0; r.rowCount = 0; r.headerContent = ""; u = []; n.hasSubGroups ? (u = i.pullGroupListData(n.groupList), r.level = n.level, r.rowCount = u.length - n.groupList.length, r.headerContent = n.generator(n.key, r.rowCount, n.rows, n), t.push(r), t = t.concat(u)) : (r.level = n.level, r.headerContent = n.generator(n.key, n.rows.length, n.rows, n), r.rowCount = n.getRows().length, t.push(r), n.getRows().forEach(function (n) { t.push(n.getData("data")) })) }), t }, k.prototype.getGroupedData = function () { return this.pullGroupListData(this.groupList) }, k.prototype.getRowGroup = function (n) { var t = !1; return this.groupList.forEach(function (i) { var r = i.getRowGroup(n); r && (t = r) }), t }, k.prototype.countGroups = function () { return this.groupList.length }, k.prototype.generateGroups = function (n) { var t = this, i = t.groups; t.groups = {}; t.groupList = []; this.allowedValues && this.allowedValues[0] ? (this.allowedValues[0].forEach(function (n) { t.createGroup(n, 0, i) }), n.forEach(function (n) { t.assignRowToExistingGroup(n, i) })) : n.forEach(function (n) { t.assignRowToGroup(n, i) }) }, k.prototype.createGroup = function (n, t, i) { var r, u = t + "_" + n; i = i || []; r = new f(this, !1, t, n, this.groupIDLookups[0].field, this.headerGenerator[0], i[u]); this.groups[u] = r; this.groupList.push(r) }, k.prototype.assignRowToExistingGroup = function (n) { var i = this.groupIDLookups[0].func(n.getData()), t = "0_" + i; this.groups[t] && this.groups[t].addRow(n) }, k.prototype.assignRowToGroup = function (n, t) { var i = this.groupIDLookups[0].func(n.getData()), r = !this.groups["0_" + i]; return r && this.createGroup(i, 0, t), this.groups["0_" + i].addRow(n), !r }, k.prototype.reassignRowToGroup = function (n) { var t = n.getGroup(), i = t.getPath(), r = this.getExpectedPath(n); i.length == r.length && i.every(function (n, t) { return n === r[t] }) || (t.removeRow(n), this.assignRowToGroup(n, self.groups), this.table.rowManager.refreshActiveData("group", !1, !0)) }, k.prototype.getExpectedPath = function (n) { var t = [], i = n.getData(); return this.groupIDLookups.forEach(function (n) { t.push(n.func(i)) }), t }, k.prototype.updateGroupRows = function (n) { var i = this, t = [], r; return (i.groupList.forEach(function (n) { t = t.concat(n.getHeadersAndRows()) }), n) && (r = i.table.rowManager.setDisplayRows(t, this.getDisplayIndex()), !0 !== r && this.setDisplayIndex(r), i.table.rowManager.refreshActiveData("group", !0, !0)), t }, k.prototype.scrollHeaders = function (n) { this.table.options.virtualDomHoz && (n -= this.table.vdomHoz.vDomPadLeft); n += "px"; this.groupList.forEach(function (t) { t.scrollHeader(n) }) }, k.prototype.removeGroup = function (n) { var t, i = n.level + "_" + n.key; this.groups[i] && (delete this.groups[i], (t = this.groupList.indexOf(n)) > -1 && this.groupList.splice(t, 1)) }, n.prototype.registerModule("groupRows", k), ct = function (n) { this.table = n; this.history = []; this.index = -1 }, ct.prototype.clear = function () { this.history = []; this.index = -1 }, ct.prototype.action = function (n, t, i) { this.history = this.history.slice(0, this.index + 1); this.history.push({ type: n, component: t, data: i }); this.index++ }, ct.prototype.getHistoryUndoSize = function () { return this.index + 1 }, ct.prototype.getHistoryRedoSize = function () { return this.history.length - (this.index + 1) }, ct.prototype.clearComponentHistory = function (n) { var t = this.history.findIndex(function (t) { return t.component === n }); t > -1 && (this.history.splice(t, 1), t <= this.index && this.index--, this.clearComponentHistory(n)) }, ct.prototype.undo = function () { if (this.index > -1) { var n = this.history[this.index]; return this.undoers[n.type].call(this, n), this.index--, this.table.options.historyUndo.call(this.table, n.type, n.component.getComponent(), n.data), !0 } return console.warn("History Undo Error - No more history to undo"), !1 }, ct.prototype.redo = function () { if (this.history.length - 1 > this.index) { this.index++; var n = this.history[this.index]; return this.redoers[n.type].call(this, n), this.table.options.historyRedo.call(this.table, n.type, n.component.getComponent(), n.data), !0 } return console.warn("History Redo Error - No more history to redo"), !1 }, ct.prototype.undoers = { cellEdit: function (n) { n.component.setValueProcessData(n.data.oldValue) }, rowAdd: function (n) { n.component.deleteActual() }, rowDelete: function (n) { var t = this.table.rowManager.addRowActual(n.data.data, n.data.pos, n.data.index); this.table.options.groupBy && this.table.modExists("groupRows") && this.table.modules.groupRows.updateGroupRows(!0); this._rebindRow(n.component, t) }, rowMove: function (n) { this.table.rowManager.moveRowActual(n.component, this.table.rowManager.rows[n.data.posFrom], !n.data.after); this.table.rowManager.redraw() } }, ct.prototype.redoers = { cellEdit: function (n) { n.component.setValueProcessData(n.data.newValue) }, rowAdd: function (n) { var t = this.table.rowManager.addRowActual(n.data.data, n.data.pos, n.data.index); this.table.options.groupBy && this.table.modExists("groupRows") && this.table.modules.groupRows.updateGroupRows(!0); this._rebindRow(n.component, t) }, rowDelete: function (n) { n.component.deleteActual() }, rowMove: function (n) { this.table.rowManager.moveRowActual(n.component, this.table.rowManager.rows[n.data.posTo], n.data.after); this.table.rowManager.redraw() } }, ct.prototype._rebindRow = function (n, t) { this.history.forEach(function (i) { if (i.component instanceof u) i.component === n && (i.component = t); else if (i.component instanceof h && i.component.row === n) { var r = i.component.column.getField(); r && (i.component = t.getCell(r)) } }) }, n.prototype.registerModule("history", ct), gt = function (n) { this.table = n; this.fieldIndex = []; this.hasIndex = !1 }, gt.prototype.parseTable = function () { var t = this, r = t.table.element, e = t.table.options, s = (e.columns, r.getElementsByTagName("th")), i = r.getElementsByTagName("tbody")[0], c = [], u, a, o, f, n; for (t.hasIndex = !1, t.table.options.htmlImporting.call(this.table), i = i ? i.getElementsByTagName("tr") : [], t._extractOptions(r, e), s.length ? t._extractHeaders(s, i) : t._generateBlankHeaders(s, i), u = 0; u < i.length; u++) { var v = i[u], l = v.getElementsByTagName("td"), h = {}; for (t.hasIndex || (h[e.index] = u), n = 0; n < l.length; n++)a = l[n], void 0 !== this.fieldIndex[n] && (h[this.fieldIndex[n]] = a.innerHTML); c.push(h) } o = document.createElement("div"); f = r.attributes; for (n in f) "object" == _typeof(f[n]) && o.setAttribute(f[n].name, f[n].value); r.parentNode.replaceChild(o, r); e.data = c; t.table.options.htmlImported.call(this.table); this.table.element = o }, gt.prototype._extractOptions = function (n, t, i) { var e = n.attributes, s = i ? Object.assign([], i) : Object.keys(t), u = {}, o, f, r; s.forEach(function (n) { u[n.toLowerCase()] = n }); for (o in e) r = e[o], r && "object" == (void 0 === r ? "undefined" : _typeof(r)) && r.name && 0 === r.name.indexOf("tabulator-") && (f = r.name.replace("tabulator-", ""), void 0 !== u[f] && (t[u[f]] = this._attribValue(r.value))) }, gt.prototype._attribValue = function (n) { return "true" === n || "false" !== n && n }, gt.prototype._findCol = function (n) { return this.table.options.columns.find(function (t) { return t.title === n }) || !1 }, gt.prototype._extractHeaders = function (n) { for (var u = 0; u < n.length; u++) { var f, i = n[u], e = !1, t = this._findCol(i.textContent); t ? e = !0 : t = { title: i.textContent.trim() }; t.field || (t.field = i.textContent.trim().toLowerCase().replace(" ", "_")); f = i.getAttribute("width"); f && !t.width && (t.width = f); i.attributes; this._extractOptions(i, t, r.prototype.defaultOptionList); this.fieldIndex[u] = t.field; t.field == this.table.options.index && (this.hasIndex = !0); e || this.table.options.columns.push(t) } }, gt.prototype._generateBlankHeaders = function (n) { for (var u, i, r, t = 0; t < n.length; t++)u = n[t], i = { title: "", field: "col" + t }, this.fieldIndex[t] = i.field, r = u.getAttribute("width"), r && (i.width = r), this.table.options.columns.push(i) }, n.prototype.registerModule("htmlTableImport", gt), pt = function (n) { this.table = n; this.watchKeys = null; this.pressedKeys = null; this.keyupBinding = !1; this.keydownBinding = !1 }, pt.prototype.initialize = function () { var n = this.table.options.keybindings, t = {}, i, r; if (this.watchKeys = {}, this.pressedKeys = [], !1 !== n) { for (i in this.bindings) t[i] = this.bindings[i]; if (Object.keys(n).length) for (r in n) t[r] = n[r]; this.mapBindings(t); this.bindEvents() } }, pt.prototype.mapBindings = function (n) { var t = this, i = this; for (var r in n) !function (r) { t.actions[r] ? n[r] && ("object" !== _typeof(n[r]) && (n[r] = [n[r]]), n[r].forEach(function (n) { i.mapBinding(r, n) })) : console.warn("Key Binding Error - no such action:", r) }(r) }, pt.prototype.mapBinding = function (n, t) { var r = this, i = { action: this.actions[n], keys: [], ctrl: !1, shift: !1, meta: !1 }; t.toString().toLowerCase().split(" ").join("").split("+").forEach(function (n) { switch (n) { case "ctrl": i.ctrl = !0; break; case "shift": i.shift = !0; break; case "meta": i.meta = !0; break; default: n = parseInt(n); i.keys.push(n); r.watchKeys[n] || (r.watchKeys[n] = []); r.watchKeys[n].push(i) } }) }, pt.prototype.bindEvents = function () { var n = this; this.keyupBinding = function (t) { var i = t.keyCode, r = n.watchKeys[i]; r && (n.pressedKeys.push(i), r.forEach(function (i) { n.checkBinding(t, i) })) }; this.keydownBinding = function (t) { var r = t.keyCode, i; n.watchKeys[r] && (i = n.pressedKeys.indexOf(r), i > -1 && n.pressedKeys.splice(i, 1)) }; this.table.element.addEventListener("keydown", this.keyupBinding); this.table.element.addEventListener("keyup", this.keydownBinding) }, pt.prototype.clearBindings = function () { this.keyupBinding && this.table.element.removeEventListener("keydown", this.keyupBinding); this.keydownBinding && this.table.element.removeEventListener("keyup", this.keydownBinding) }, pt.prototype.checkBinding = function (n, t) { var i = this, r = !0; return n.ctrlKey == t.ctrl && n.shiftKey == t.shift && n.metaKey == t.meta && (t.keys.forEach(function (n) { -1 == i.pressedKeys.indexOf(n) && (r = !1) }), r && t.action.call(i, n), !0) }, pt.prototype.bindings = { navPrev: "shift + 9", navNext: 9, navUp: 38, navDown: 40, scrollPageUp: 33, scrollPageDown: 34, scrollToStart: 36, scrollToEnd: 35, undo: "ctrl + 90", redo: "ctrl + 89", copyToClipboard: "ctrl + 67" }, pt.prototype.actions = { keyBlock: function (n) { n.stopPropagation(); n.preventDefault() }, scrollPageUp: function (n) { var t = this.table.rowManager, i = t.scrollTop - t.height; t.element.scrollHeight; n.preventDefault(); t.displayRowsCount && (i >= 0 ? t.element.scrollTop = i : t.scrollToRow(t.getDisplayRows()[0])); this.table.element.focus() }, scrollPageDown: function (n) { var t = this.table.rowManager, i = t.scrollTop + t.height, r = t.element.scrollHeight; n.preventDefault(); t.displayRowsCount && (i <= r ? t.element.scrollTop = i : t.scrollToRow(t.getDisplayRows()[t.displayRowsCount - 1])); this.table.element.focus() }, scrollToStart: function (n) { var t = this.table.rowManager; n.preventDefault(); t.displayRowsCount && t.scrollToRow(t.getDisplayRows()[0]); this.table.element.focus() }, scrollToEnd: function (n) { var t = this.table.rowManager; n.preventDefault(); t.displayRowsCount && t.scrollToRow(t.getDisplayRows()[t.displayRowsCount - 1]); this.table.element.focus() }, navPrev: function (n) { var t = !1; this.table.modExists("edit") && (t = this.table.modules.edit.currentCell) && (n.preventDefault(), t.nav().prev()) }, navNext: function (n) { var r, i = !1, t = this.table.options.tabEndNewRow; this.table.modExists("edit") && (i = this.table.modules.edit.currentCell) && (n.preventDefault(), r = i.nav(), r.next() || t && (i.getElement().firstChild.blur(), t = !0 === t ? this.table.addRow({}) : "function" == typeof t ? this.table.addRow(t(i.row.getComponent())) : this.table.addRow(Object.assign({}, t)), t.then(function () { setTimeout(function () { r.next() }) }))) }, navLeft: function (n) { var t = !1; this.table.modExists("edit") && (t = this.table.modules.edit.currentCell) && (n.preventDefault(), t.nav().left()) }, navRight: function (n) { var t = !1; this.table.modExists("edit") && (t = this.table.modules.edit.currentCell) && (n.preventDefault(), t.nav().right()) }, navUp: function (n) { var t = !1; this.table.modExists("edit") && (t = this.table.modules.edit.currentCell) && (n.preventDefault(), t.nav().up()) }, navDown: function (n) { var t = !1; this.table.modExists("edit") && (t = this.table.modules.edit.currentCell) && (n.preventDefault(), t.nav().down()) }, undo: function (n) { this.table.options.history && this.table.modExists("history") && this.table.modExists("edit") && (this.table.modules.edit.currentCell || (n.preventDefault(), this.table.modules.history.undo())) }, redo: function (n) { this.table.options.history && this.table.modExists("history") && this.table.modExists("edit") && (this.table.modules.edit.currentCell || (n.preventDefault(), this.table.modules.history.redo())) }, copyToClipboard: function () { this.table.modules.edit.currentCell || this.table.modExists("clipboard", !0) && this.table.modules.clipboard.copy(!1, !0) } }, n.prototype.registerModule("keybindings", pt), ht = function (n) { this.table = n; this.menuEl = !1; this.blurEvent = this.hideMenu.bind(this); this.escEvent = this.escMenu.bind(this); this.nestedMenuBlock = !1 }, ht.prototype.initializeColumnHeader = function (n) { var t, i = this; n.definition.headerContextMenu && (n.getElement().addEventListener("contextmenu", this.LoadMenuEvent.bind(this, n, n.definition.headerContextMenu)), this.tapHold(n, n.definition.headerContextMenu)); n.definition.headerMenu && (t = document.createElement("span"), t.classList.add("tabulator-header-menu-button"), t.innerHTML = "&vellip;", t.addEventListener("click", function (t) { var r = "function" == typeof n.definition.headerMenu ? n.definition.headerMenu(n.getComponent(), t) : n.definition.headerMenu; t.stopPropagation(); t.preventDefault(); i.loadMenu(t, n, r) }), n.titleElement.insertBefore(t, n.titleElement.firstChild)) }, ht.prototype.LoadMenuEvent = function (n, t, i) { t = "function" == typeof t ? t(n.getComponent(), i) : t; this.loadMenu(i, n, t) }, ht.prototype.tapHold = function (n, t) { var f = this, u = n.getElement(), i = null, r = !1; u.addEventListener("touchstart", function (u) { clearTimeout(i); r = !1; i = setTimeout(function () { clearTimeout(i); i = null; r = !0; f.LoadMenuEvent(n, t, u) }, 1e3) }, { passive: !0 }); u.addEventListener("touchend", function (n) { clearTimeout(i); i = null; r && n.preventDefault() }) }, ht.prototype.initializeCell = function (n) { n.column.definition.contextMenu && (n.getElement().addEventListener("contextmenu", this.LoadMenuEvent.bind(this, n, n.column.definition.contextMenu)), this.tapHold(n, n.column.definition.contextMenu)); n.column.definition.clickMenu && n.getElement().addEventListener("click", this.LoadMenuEvent.bind(this, n, n.column.definition.clickMenu)) }, ht.prototype.initializeRow = function (n) { this.table.options.rowContextMenu && (n.getElement().addEventListener("contextmenu", this.LoadMenuEvent.bind(this, n, this.table.options.rowContextMenu)), this.tapHold(n, this.table.options.rowContextMenu)); this.table.options.rowClickMenu && n.getElement().addEventListener("click", this.LoadMenuEvent.bind(this, n, this.table.options.rowClickMenu)) }, ht.prototype.initializeGroup = function (n) { this.table.options.groupContextMenu && (n.getElement().addEventListener("contextmenu", this.LoadMenuEvent.bind(this, n, this.table.options.groupContextMenu)), this.tapHold(n, this.table.options.groupContextMenu)); this.table.options.groupClickMenu && n.getElement().addEventListener("click", this.LoadMenuEvent.bind(this, n, this.table.options.groupClickMenu)) }, ht.prototype.loadMenu = function (n, t, i) { var r = this, f = Math.max(document.body.offsetHeight, window.innerHeight), u = !(n instanceof MouseEvent); if (u || n.preventDefault(), i && i.length) { if (this.nestedMenuBlock) { if (this.isOpen()) return } else this.nestedMenuBlock = setTimeout(function () { r.nestedMenuBlock = !1 }, 100); this.hideMenu(); this.menuEl = document.createElement("div"); this.menuEl.classList.add("tabulator-menu"); i.forEach(function (n) { var i = document.createElement("div"), u = n.label, f = n.disabled; n.separator ? i.classList.add("tabulator-menu-separator") : (i.classList.add("tabulator-menu-item"), "function" == typeof u && (u = u(t.getComponent())), u instanceof Node ? i.appendChild(u) : i.innerHTML = u, "function" == typeof f && (f = f(t.getComponent())), f ? (i.classList.add("tabulator-menu-item-disabled"), i.addEventListener("click", function (n) { n.stopPropagation() })) : i.addEventListener("click", function (i) { r.hideMenu(); n.action(i, t.getComponent()) })); r.menuEl.appendChild(i) }); this.menuEl.style.top = (u ? n.touches[0].pageY : n.pageY) + "px"; this.menuEl.style.left = (u ? n.touches[0].pageX : n.pageX) + "px"; setTimeout(function () { r.table.rowManager.element.addEventListener("scroll", r.blurEvent); document.body.addEventListener("click", r.blurEvent); document.body.addEventListener("contextmenu", r.blurEvent); document.body.addEventListener("keydown", r.escEvent) }, 100); document.body.appendChild(this.menuEl); n.pageX + this.menuEl.offsetWidth >= document.body.offsetWidth && (this.menuEl.style.left = "", this.menuEl.style.right = document.body.offsetWidth - n.pageX + "px"); n.pageY + this.menuEl.offsetHeight >= f && (this.menuEl.style.top = "", this.menuEl.style.bottom = f - n.pageY + "px") } }, ht.prototype.isOpen = function () { return !!this.menuEl.parentNode }, ht.prototype.escMenu = function (n) { 27 == n.keyCode && this.hideMenu() }, ht.prototype.hideMenu = function () { this.menuEl.parentNode && this.menuEl.parentNode.removeChild(this.menuEl); this.escEvent && document.body.removeEventListener("keydown", this.escEvent); this.blurEvent && (document.body.removeEventListener("click", this.blurEvent), document.body.removeEventListener("contextmenu", this.blurEvent), this.table.rowManager.element.removeEventListener("scroll", this.blurEvent)) }, ht.prototype.menus = {}, n.prototype.registerModule("menu", ht), yt = function (n) { this.table = n; this.placeholderElement = this.createPlaceholderElement(); this.hoverElement = !1; this.checkTimeout = !1; this.checkPeriod = 250; this.moving = !1; this.toCol = !1; this.toColAfter = !1; this.startX = 0; this.autoScrollMargin = 40; this.autoScrollStep = 5; this.autoScrollTimeout = !1; this.touchMove = !1; this.moveHover = this.moveHover.bind(this); this.endMove = this.endMove.bind(this) }, yt.prototype.createPlaceholderElement = function () { var n = document.createElement("div"); return n.classList.add("tabulator-col"), n.classList.add("tabulator-col-placeholder"), n }, yt.prototype.initializeColumn = function (t) { var r, i = this, u = {}; t.modules.frozen || (r = t.getElement(), u.mousemove = function (u) { t.parent === i.moving.parent && ((i.touchMove ? u.touches[0].pageX : u.pageX) - n.prototype.helpers.elOffset(r).left + i.table.columnManager.element.scrollLeft > t.getWidth() / 2 ? i.toCol === t && i.toColAfter || (r.parentNode.insertBefore(i.placeholderElement, r.nextSibling), i.moveColumn(t, !0)) : (i.toCol !== t || i.toColAfter) && (r.parentNode.insertBefore(i.placeholderElement, r), i.moveColumn(t, !1))) }.bind(i), r.addEventListener("mousedown", function (n) { i.touchMove = !1; 1 === n.which && (i.checkTimeout = setTimeout(function () { i.startMove(n, t) }, i.checkPeriod)) }), r.addEventListener("mouseup", function (n) { 1 === n.which && i.checkTimeout && clearTimeout(i.checkTimeout) }), i.bindTouchEvents(t)); t.modules.moveColumn = u }, yt.prototype.bindTouchEvents = function (n) { var c, i, r, f, e, o, s, t = this, h = n.getElement(), u = !1; h.addEventListener("touchstart", function (h) { t.checkTimeout = setTimeout(function () { t.touchMove = !0; c = n; i = n.nextColumn(); f = i ? i.getWidth() / 2 : 0; r = n.prevColumn(); e = r ? r.getWidth() / 2 : 0; o = 0; s = 0; u = !1; t.startMove(h, n) }, t.checkPeriod) }, { passive: !0 }); h.addEventListener("touchmove", function (h) { var a, l; t.moving && (t.moveHover(h), u || (u = h.touches[0].pageX), a = h.touches[0].pageX - u, a > 0 ? i && a - o > f && (l = i) !== n && (u = h.touches[0].pageX, l.getElement().parentNode.insertBefore(t.placeholderElement, l.getElement().nextSibling), t.moveColumn(l, !0)) : r && -a - s > e && (l = r) !== n && (u = h.touches[0].pageX, l.getElement().parentNode.insertBefore(t.placeholderElement, l.getElement()), t.moveColumn(l, !1)), l && (c = l, i = l.nextColumn(), o = f, f = i ? i.getWidth() / 2 : 0, r = l.prevColumn(), s = e, e = r ? r.getWidth() / 2 : 0)) }, { passive: !0 }); h.addEventListener("touchend", function (n) { t.checkTimeout && clearTimeout(t.checkTimeout); t.moving && t.endMove(n) }) }, yt.prototype.startMove = function (t, i) { var r = i.getElement(); this.moving = i; this.startX = (this.touchMove ? t.touches[0].pageX : t.pageX) - n.prototype.helpers.elOffset(r).left; this.table.element.classList.add("tabulator-block-select"); this.placeholderElement.style.width = i.getWidth() + "px"; this.placeholderElement.style.height = i.getHeight() + "px"; r.parentNode.insertBefore(this.placeholderElement, r); r.parentNode.removeChild(r); this.hoverElement = r.cloneNode(!0); this.hoverElement.classList.add("tabulator-moving"); this.table.columnManager.getElement().appendChild(this.hoverElement); this.hoverElement.style.left = "0"; this.hoverElement.style.bottom = "0"; this.touchMove || (this._bindMouseMove(), document.body.addEventListener("mousemove", this.moveHover), document.body.addEventListener("mouseup", this.endMove)); this.moveHover(t) }, yt.prototype._bindMouseMove = function () { this.table.columnManager.columnsByIndex.forEach(function (n) { n.modules.moveColumn.mousemove && n.getElement().addEventListener("mousemove", n.modules.moveColumn.mousemove) }) }, yt.prototype._unbindMouseMove = function () { this.table.columnManager.columnsByIndex.forEach(function (n) { n.modules.moveColumn.mousemove && n.getElement().removeEventListener("mousemove", n.modules.moveColumn.mousemove) }) }, yt.prototype.moveColumn = function (n, t) { var i = this.moving.getCells(); this.toCol = n; this.toColAfter = t; t ? n.getCells().forEach(function (n, t) { var r = n.getElement(); r.parentNode.insertBefore(i[t].getElement(), r.nextSibling) }) : n.getCells().forEach(function (n, t) { var r = n.getElement(); r.parentNode.insertBefore(i[t].getElement(), r) }) }, yt.prototype.endMove = function (n) { (1 === n.which || this.touchMove) && (this._unbindMouseMove(), this.placeholderElement.parentNode.insertBefore(this.moving.getElement(), this.placeholderElement.nextSibling), this.placeholderElement.parentNode.removeChild(this.placeholderElement), this.hoverElement.parentNode.removeChild(this.hoverElement), this.table.element.classList.remove("tabulator-block-select"), this.toCol && this.table.columnManager.moveColumnActual(this.moving, this.toCol, this.toColAfter), this.moving = !1, this.toCol = !1, this.toColAfter = !1, this.touchMove || (document.body.removeEventListener("mousemove", this.moveHover), document.body.removeEventListener("mouseup", this.endMove))) }, yt.prototype.moveHover = function (t) { var u, i = this, f = i.table.columnManager.getElement(), r = f.scrollLeft, e = (i.touchMove ? t.touches[0].pageX : t.pageX) - n.prototype.helpers.elOffset(f).left + r; i.hoverElement.style.left = e - i.startX + "px"; e - r < i.autoScrollMargin && (i.autoScrollTimeout || (i.autoScrollTimeout = setTimeout(function () { u = Math.max(0, r - 5); i.table.rowManager.getElement().scrollLeft = u; i.autoScrollTimeout = !1 }, 1))); r + f.clientWidth - e < i.autoScrollMargin && (i.autoScrollTimeout || (i.autoScrollTimeout = setTimeout(function () { u = Math.min(f.clientWidth, r + 5); i.table.rowManager.getElement().scrollLeft = u; i.autoScrollTimeout = !1 }, 1))) }, n.prototype.registerModule("moveColumn", yt), a = function (n) { this.table = n; this.placeholderElement = this.createPlaceholderElement(); this.hoverElement = !1; this.checkTimeout = !1; this.checkPeriod = 150; this.moving = !1; this.toRow = !1; this.toRowAfter = !1; this.hasHandle = !1; this.startY = 0; this.startX = 0; this.moveHover = this.moveHover.bind(this); this.endMove = this.endMove.bind(this); this.tableRowDropEvent = !1; this.touchMove = !1; this.connection = !1; this.connectionSelectorsTables = !1; this.connectionSelectorsElements = !1; this.connectionElements = []; this.connections = []; this.connectedTable = !1; this.connectedRow = !1 }, a.prototype.createPlaceholderElement = function () { var n = document.createElement("div"); return n.classList.add("tabulator-row"), n.classList.add("tabulator-row-placeholder"), n }, a.prototype.initialize = function () { this.connectionSelectorsTables = this.table.options.movableRowsConnectedTables; this.connectionSelectorsElements = this.table.options.movableRowsConnectedElements; this.connection = this.connectionSelectorsTables || this.connectionSelectorsElements }, a.prototype.setHandle = function (n) { this.hasHandle = n }, a.prototype.initializeGroupHeader = function (t) { var i = this, r = {}; r.mouseup = function (n) { i.tableRowDrop(n, row) }.bind(i); r.mousemove = function (r) { var u; r.pageY - n.prototype.helpers.elOffset(t.element).top + i.table.rowManager.element.scrollTop > t.getHeight() / 2 ? i.toRow === t && i.toRowAfter || (u = t.getElement(), u.parentNode.insertBefore(i.placeholderElement, u.nextSibling), i.moveRow(t, !0)) : (i.toRow !== t || i.toRowAfter) && (u = t.getElement(), u.previousSibling && (u.parentNode.insertBefore(i.placeholderElement, u), i.moveRow(t, !1))) }.bind(i); t.modules.moveRow = r }, a.prototype.initializeRow = function (t) { var r, i = this, u = {}; u.mouseup = function (n) { i.tableRowDrop(n, t) }.bind(i); u.mousemove = function (r) { var u; r.pageY - n.prototype.helpers.elOffset(t.element).top + i.table.rowManager.element.scrollTop > t.getHeight() / 2 ? i.toRow === t && i.toRowAfter || (u = t.getElement(), u.parentNode.insertBefore(i.placeholderElement, u.nextSibling), i.moveRow(t, !0)) : (i.toRow !== t || i.toRowAfter) && (u = t.getElement(), u.parentNode.insertBefore(i.placeholderElement, u), i.moveRow(t, !1)) }.bind(i); this.hasHandle || (r = t.getElement(), r.addEventListener("mousedown", function (n) { 1 === n.which && (i.checkTimeout = setTimeout(function () { i.startMove(n, t) }, i.checkPeriod)) }), r.addEventListener("mouseup", function (n) { 1 === n.which && i.checkTimeout && clearTimeout(i.checkTimeout) }), this.bindTouchEvents(t, t.getElement())); t.modules.moveRow = u }, a.prototype.initializeCell = function (n) { var t = this, i = n.getElement(); i.addEventListener("mousedown", function (i) { 1 === i.which && (t.checkTimeout = setTimeout(function () { t.startMove(i, n.row) }, t.checkPeriod)) }); i.addEventListener("mouseup", function (n) { 1 === n.which && t.checkTimeout && clearTimeout(t.checkTimeout) }); this.bindTouchEvents(n.row, n.getElement()) }, a.prototype.bindTouchEvents = function (n, t) { var c, r, u, e, o, s, h, i = this, f = !1; t.addEventListener("touchstart", function (t) { i.checkTimeout = setTimeout(function () { i.touchMove = !0; c = n; r = n.nextRow(); e = r ? r.getHeight() / 2 : 0; u = n.prevRow(); o = u ? u.getHeight() / 2 : 0; s = 0; h = 0; f = !1; i.startMove(t, n) }, i.checkPeriod) }, { passive: !0 }); this.moving; this.toRow; this.toRowAfter; t.addEventListener("touchmove", function (t) { var a, l; i.moving && (t.preventDefault(), i.moveHover(t), f || (f = t.touches[0].pageY), a = t.touches[0].pageY - f, a > 0 ? r && a - s > e && (l = r) !== n && (f = t.touches[0].pageY, l.getElement().parentNode.insertBefore(i.placeholderElement, l.getElement().nextSibling), i.moveRow(l, !0)) : u && -a - h > o && (l = u) !== n && (f = t.touches[0].pageY, l.getElement().parentNode.insertBefore(i.placeholderElement, l.getElement()), i.moveRow(l, !1)), l && (c = l, r = l.nextRow(), s = e, e = r ? r.getHeight() / 2 : 0, u = l.prevRow(), h = o, o = u ? u.getHeight() / 2 : 0)) }); t.addEventListener("touchend", function (n) { i.checkTimeout && clearTimeout(i.checkTimeout); i.moving && (i.endMove(n), i.touchMove = !1) }) }, a.prototype._bindMouseMove = function () { this.table.rowManager.getDisplayRows().forEach(function (n) { ("row" === n.type || "group" === n.type) && n.modules.moveRow.mousemove && n.getElement().addEventListener("mousemove", n.modules.moveRow.mousemove) }) }, a.prototype._unbindMouseMove = function () { this.table.rowManager.getDisplayRows().forEach(function (n) { ("row" === n.type || "group" === n.type) && n.modules.moveRow.mousemove && n.getElement().removeEventListener("mousemove", n.modules.moveRow.mousemove) }) }, a.prototype.startMove = function (n, t) { var i = t.getElement(); this.setStartPosition(n, t); this.moving = t; this.table.element.classList.add("tabulator-block-select"); this.placeholderElement.style.width = t.getWidth() + "px"; this.placeholderElement.style.height = t.getHeight() + "px"; this.connection ? (this.table.element.classList.add("tabulator-movingrow-sending"), this.connectToTables(t)) : (i.parentNode.insertBefore(this.placeholderElement, i), i.parentNode.removeChild(i)); this.hoverElement = i.cloneNode(!0); this.hoverElement.classList.add("tabulator-moving"); this.connection ? (document.body.appendChild(this.hoverElement), this.hoverElement.style.left = "0", this.hoverElement.style.top = "0", this.hoverElement.style.width = this.table.element.clientWidth + "px", this.hoverElement.style.whiteSpace = "nowrap", this.hoverElement.style.overflow = "hidden", this.hoverElement.style.pointerEvents = "none") : (this.table.rowManager.getTableElement().appendChild(this.hoverElement), this.hoverElement.style.left = "0", this.hoverElement.style.top = "0", this._bindMouseMove()); document.body.addEventListener("mousemove", this.moveHover); document.body.addEventListener("mouseup", this.endMove); this.moveHover(n) }, a.prototype.setStartPosition = function (n, t) { var i, r, f = this.touchMove ? n.touches[0].pageX : n.pageX, u = this.touchMove ? n.touches[0].pageY : n.pageY; i = t.getElement(); this.connection ? (r = i.getBoundingClientRect(), this.startX = r.left - f + window.pageXOffset, this.startY = r.top - u + window.pageYOffset) : this.startY = u - i.getBoundingClientRect().top }, a.prototype.endMove = function (n) { n && 1 !== n.which && !this.touchMove || (this._unbindMouseMove(), this.connection || (this.placeholderElement.parentNode.insertBefore(this.moving.getElement(), this.placeholderElement.nextSibling), this.placeholderElement.parentNode.removeChild(this.placeholderElement)), this.hoverElement.parentNode.removeChild(this.hoverElement), this.table.element.classList.remove("tabulator-block-select"), this.toRow && this.table.rowManager.moveRow(this.moving, this.toRow, this.toRowAfter), this.moving = !1, this.toRow = !1, this.toRowAfter = !1, document.body.removeEventListener("mousemove", this.moveHover), document.body.removeEventListener("mouseup", this.endMove), this.connection && (this.table.element.classList.remove("tabulator-movingrow-sending"), this.disconnectFromTables())) }, a.prototype.moveRow = function (n, t) { this.toRow = n; this.toRowAfter = t }, a.prototype.moveHover = function (n) { this.connection ? this.moveHoverConnections.call(this, n) : this.moveHoverTable.call(this, n) }, a.prototype.moveHoverTable = function (n) { var t = this.table.rowManager.getElement(), i = t.scrollTop, r = (this.touchMove ? n.touches[0].pageY : n.pageY) - t.getBoundingClientRect().top + i; this.hoverElement.style.top = r - this.startY + "px" }, a.prototype.moveHoverConnections = function (n) { this.hoverElement.style.left = this.startX + (this.touchMove ? n.touches[0].pageX : n.pageX) + "px"; this.hoverElement.style.top = this.startY + (this.touchMove ? n.touches[0].pageY : n.pageY) + "px" }, a.prototype.elementRowDrop = function (n, t, i) { this.table.options.movableRowsElementDrop && this.table.options.movableRowsElementDrop(n, t, !!i && i.getComponent()) }, a.prototype.connectToTables = function (n) { var i, t = this; this.connectionSelectorsTables && (i = this.table.modules.comms.getConnections(this.connectionSelectorsTables), this.table.options.movableRowsSendingStart.call(this.table, i), this.table.modules.comms.send(this.connectionSelectorsTables, "moveRow", "connect", { row: n })); this.connectionSelectorsElements && (this.connectionElements = [], Array.isArray(this.connectionSelectorsElements) || (this.connectionSelectorsElements = [this.connectionSelectorsElements]), this.connectionSelectorsElements.forEach(function (n) { "string" == typeof n ? t.connectionElements = t.connectionElements.concat(Array.prototype.slice.call(document.querySelectorAll(n))) : t.connectionElements.push(n) }), this.connectionElements.forEach(function (n) { var i = function (i) { t.elementRowDrop(i, n, t.moving) }; n.addEventListener("mouseup", i); n.tabulatorElementDropEvent = i; n.classList.add("tabulator-movingrow-receiving") })) }, a.prototype.disconnectFromTables = function () { var n; this.connectionSelectorsTables && (n = this.table.modules.comms.getConnections(this.connectionSelectorsTables), this.table.options.movableRowsSendingStop.call(this.table, n), this.table.modules.comms.send(this.connectionSelectorsTables, "moveRow", "disconnect")); this.connectionElements.forEach(function (n) { n.classList.remove("tabulator-movingrow-receiving"); n.removeEventListener("mouseup", n.tabulatorElementDropEvent); delete n.tabulatorElementDropEvent }) }, a.prototype.connect = function (n, t) { var i = this; return this.connectedTable ? (console.warn("Move Row Error - Table cannot accept connection, already connected to table:", this.connectedTable), !1) : (this.connectedTable = n, this.connectedRow = t, this.table.element.classList.add("tabulator-movingrow-receiving"), i.table.rowManager.getDisplayRows().forEach(function (n) { "row" === n.type && n.modules.moveRow && n.modules.moveRow.mouseup && n.getElement().addEventListener("mouseup", n.modules.moveRow.mouseup) }), i.tableRowDropEvent = i.tableRowDrop.bind(i), i.table.element.addEventListener("mouseup", i.tableRowDropEvent), this.table.options.movableRowsReceivingStart.call(this.table, t, n), !0) }, a.prototype.disconnect = function (n) { var t = this; n === this.connectedTable ? (this.connectedTable = !1, this.connectedRow = !1, this.table.element.classList.remove("tabulator-movingrow-receiving"), t.table.rowManager.getDisplayRows().forEach(function (n) { "row" === n.type && n.modules.moveRow && n.modules.moveRow.mouseup && n.getElement().removeEventListener("mouseup", n.modules.moveRow.mouseup) }), t.table.element.removeEventListener("mouseup", t.tableRowDropEvent), this.table.options.movableRowsReceivingStop.call(this.table, n)) : console.warn("Move Row Error - trying to disconnect from non connected table") }, a.prototype.dropComplete = function (n, t, i) { var r = !1; if (i) { switch (_typeof(this.table.options.movableRowsSender)) { case "string": r = this.senders[this.table.options.movableRowsSender]; break; case "function": r = this.table.options.movableRowsSender }r ? r.call(this, this.moving.getComponent(), t ? t.getComponent() : void 0, n) : this.table.options.movableRowsSender && console.warn("Mover Row Error - no matching sender found:", this.table.options.movableRowsSender); this.table.options.movableRowsSent.call(this.table, this.moving.getComponent(), t ? t.getComponent() : void 0, n) } else this.table.options.movableRowsSentFailed.call(this.table, this.moving.getComponent(), t ? t.getComponent() : void 0, n); this.endMove() }, a.prototype.tableRowDrop = function (n, t) { var i = !1, r = !1; switch (console.trace("drop"), n.stopImmediatePropagation(), _typeof(this.table.options.movableRowsReceiver)) { case "string": i = this.receivers[this.table.options.movableRowsReceiver]; break; case "function": i = this.table.options.movableRowsReceiver }i ? r = i.call(this, this.connectedRow.getComponent(), t ? t.getComponent() : void 0, this.connectedTable) : console.warn("Mover Row Error - no matching receiver found:", this.table.options.movableRowsReceiver); r ? this.table.options.movableRowsReceived.call(this.table, this.connectedRow.getComponent(), t ? t.getComponent() : void 0, this.connectedTable) : this.table.options.movableRowsReceivedFailed.call(this.table, this.connectedRow.getComponent(), t ? t.getComponent() : void 0, this.connectedTable); this.table.modules.comms.send(this.connectedTable, "moveRow", "dropcomplete", { row: t, success: r }) }, a.prototype.receivers = { insert: function (n, t) { return this.table.addRow(n.getData(), void 0, t), !0 }, add: function (n) { return this.table.addRow(n.getData()), !0 }, update: function (n, t) { return !!t && (t.update(n.getData()), !0) }, replace: function (n, t) { return !!t && (this.table.addRow(n.getData(), void 0, t), t.delete(), !0) } }, a.prototype.senders = { "delete": function (n) { n.delete() } }, a.prototype.commsReceived = function (n, t, i) { switch (t) { case "connect": return this.connect(n, i.row); case "disconnect": return this.disconnect(n); case "dropcomplete": return this.dropComplete(n, i.row, i.success) } }, n.prototype.registerModule("moveRow", a), bt = function (n) { this.table = n; this.allowedTypes = ["", "data", "edit", "clipboard"]; this.enabled = !0 }, bt.prototype.initializeColumn = function (n) { var r = this, t = !1, i = {}; this.allowedTypes.forEach(function (u) { var e, f = "mutator" + (u.charAt(0).toUpperCase() + u.slice(1)); n.definition[f] && (e = r.lookupMutator(n.definition[f])) && (t = !0, i[f] = { mutator: e, params: n.definition[f + "Params"] || {} }) }); t && (n.modules.mutate = i) }, bt.prototype.lookupMutator = function (n) { var t = !1; switch (void 0 === n ? "undefined" : _typeof(n)) { case "string": this.mutators[n] ? t = this.mutators[n] : console.warn("Mutator Error - No such mutator found, ignoring: ", n); break; case "function": t = n }return t }, bt.prototype.transformRow = function (n, t, i) { var r, u = this, f = "mutator" + (t.charAt(0).toUpperCase() + t.slice(1)); return this.enabled && u.table.columnManager.traverse(function (u) { var e, s, o; u.modules.mutate && (e = u.modules.mutate[f] || u.modules.mutate.mutator || !1) && (r = u.getFieldValue(void 0 !== i ? i : n), "data" != t && void 0 === r || (o = u.getComponent(), s = "function" == typeof e.params ? e.params(r, n, t, o) : e.params, u.setFieldValue(n, e.mutator(r, n, t, s, o)))) }), n }, bt.prototype.transformCell = function (n, t) { var r = n.column.modules.mutate.mutatorEdit || n.column.modules.mutate.mutator || !1, i = {}; return r ? (i = Object.assign(i, n.row.getData()), n.column.setFieldValue(i, t), r.mutator(t, i, "edit", r.params, n.getComponent())) : t }, bt.prototype.enable = function () { this.enabled = !0 }, bt.prototype.disable = function () { this.enabled = !1 }, bt.prototype.mutators = {}, n.prototype.registerModule("mutator", bt), l = function (n) { this.table = n; this.mode = "local"; this.progressiveLoad = !1; this.size = 0; this.page = 1; this.count = 5; this.max = 1; this.displayIndex = 0; this.initialLoad = !0; this.pageSizes = []; this.dataReceivedNames = {}; this.dataSentNames = {}; this.createElements() }, l.prototype.createElements = function () { var n; this.element = document.createElement("span"); this.element.classList.add("tabulator-paginator"); this.pagesElement = document.createElement("span"); this.pagesElement.classList.add("tabulator-pages"); n = document.createElement("button"); n.classList.add("tabulator-page"); n.setAttribute("type", "button"); n.setAttribute("role", "button"); n.setAttribute("aria-label", ""); n.setAttribute("title", ""); this.firstBut = n.cloneNode(!0); this.firstBut.setAttribute("data-page", "first"); this.prevBut = n.cloneNode(!0); this.prevBut.setAttribute("data-page", "prev"); this.nextBut = n.cloneNode(!0); this.nextBut.setAttribute("data-page", "next"); this.lastBut = n.cloneNode(!0); this.lastBut.setAttribute("data-page", "last"); this.table.options.paginationSizeSelector && (this.pageSizeSelect = document.createElement("select"), this.pageSizeSelect.classList.add("tabulator-page-size")) }, l.prototype.generatePageSizeSelectList = function () { var i = this, n = [], t; if (this.pageSizeSelect) { if (Array.isArray(this.table.options.paginationSizeSelector)) n = this.table.options.paginationSizeSelector, this.pageSizes = n, -1 == this.pageSizes.indexOf(this.size) && n.unshift(this.size); else if (-1 == this.pageSizes.indexOf(this.size)) { for (n = [], t = 1; t < 5; t++)n.push(this.size * t); this.pageSizes = n } else n = this.pageSizes; for (; this.pageSizeSelect.firstChild;)this.pageSizeSelect.removeChild(this.pageSizeSelect.firstChild); n.forEach(function (n) { var t = document.createElement("option"); t.value = n; !0 === n ? i.table.modules.localize.bind("pagination|all", function (n) { t.innerHTML = n }) : t.innerHTML = n; i.pageSizeSelect.appendChild(t) }); this.pageSizeSelect.value = this.size } }, l.prototype.initialize = function (n) { var u, i, r, t = this; this.dataSentNames = Object.assign({}, this.paginationDataSentNames); this.dataSentNames = Object.assign(this.dataSentNames, this.table.options.paginationDataSent); this.dataReceivedNames = Object.assign({}, this.paginationDataReceivedNames); this.dataReceivedNames = Object.assign(this.dataReceivedNames, this.table.options.paginationDataReceived); t.table.modules.localize.bind("pagination|first", function (n) { t.firstBut.innerHTML = n }); t.table.modules.localize.bind("pagination|first_title", function (n) { t.firstBut.setAttribute("aria-label", n); t.firstBut.setAttribute("title", n) }); t.table.modules.localize.bind("pagination|prev", function (n) { t.prevBut.innerHTML = n }); t.table.modules.localize.bind("pagination|prev_title", function (n) { t.prevBut.setAttribute("aria-label", n); t.prevBut.setAttribute("title", n) }); t.table.modules.localize.bind("pagination|next", function (n) { t.nextBut.innerHTML = n }); t.table.modules.localize.bind("pagination|next_title", function (n) { t.nextBut.setAttribute("aria-label", n); t.nextBut.setAttribute("title", n) }); t.table.modules.localize.bind("pagination|last", function (n) { t.lastBut.innerHTML = n }); t.table.modules.localize.bind("pagination|last_title", function (n) { t.lastBut.setAttribute("aria-label", n); t.lastBut.setAttribute("title", n) }); t.firstBut.addEventListener("click", function () { t.setPage(1).then(function () { }).catch(function () { }) }); t.prevBut.addEventListener("click", function () { t.previousPage().then(function () { }).catch(function () { }) }); t.nextBut.addEventListener("click", function () { t.nextPage().then(function () { }).catch(function () { }) }); t.lastBut.addEventListener("click", function () { t.setPage(t.max).then(function () { }).catch(function () { }) }); t.table.options.paginationElement && (t.element = t.table.options.paginationElement); this.pageSizeSelect && (u = document.createElement("label"), t.table.modules.localize.bind("pagination|page_size", function (n) { t.pageSizeSelect.setAttribute("aria-label", n); t.pageSizeSelect.setAttribute("title", n); u.innerHTML = n }), t.element.appendChild(u), t.element.appendChild(t.pageSizeSelect), t.pageSizeSelect.addEventListener("change", function () { t.setPageSize("true" == t.pageSizeSelect.value || t.pageSizeSelect.value); t.setPage(1).then(function () { }).catch(function () { }) })); t.element.appendChild(t.firstBut); t.element.appendChild(t.prevBut); t.element.appendChild(t.pagesElement); t.element.appendChild(t.nextBut); t.element.appendChild(t.lastBut); t.table.options.paginationElement || n || t.table.footerManager.append(t.element, t); t.mode = t.table.options.pagination; t.table.options.paginationSize ? t.size = t.table.options.paginationSize : (i = document.createElement("div"), i.classList.add("tabulator-row"), i.style.visibility = n, r = document.createElement("div"), r.classList.add("tabulator-cell"), r.innerHTML = "Page Row Test", i.appendChild(r), t.table.rowManager.getTableElement().appendChild(i), t.size = Math.floor(t.table.rowManager.getElement().clientHeight / i.offsetHeight), t.table.rowManager.getTableElement().removeChild(i)); t.count = t.table.options.paginationButtonCount; t.generatePageSizeSelectList() }, l.prototype.initializeProgressive = function (n) { this.initialize(!0); this.mode = "progressive_" + n; this.progressiveLoad = !0 }, l.prototype.setDisplayIndex = function (n) { this.displayIndex = n }, l.prototype.getDisplayIndex = function () { return this.displayIndex }, l.prototype.setMaxRows = function (n) { this.max = n ? !0 === this.size ? 1 : Math.ceil(n / this.size) : 1; this.page > this.max && (this.page = this.max) }, l.prototype.reset = function (n, t) { return ("local" == this.mode || n) && (this.page = 1), t && (this.initialLoad = !0), !0 }, l.prototype.setMaxPage = function (n) { n = parseInt(n); this.max = n || 1; this.page > this.max && (this.page = this.max, this.trigger()) }, l.prototype.setPage = function (n) { var t = this, i = this; switch (n) { case "first": return this.setPage(1); case "prev": return this.previousPage(); case "next": return this.nextPage(); case "last": return this.setPage(this.max) }return new Promise(function (r, u) { n = parseInt(n); n > 0 && n <= t.max ? (t.page = n, t.trigger().then(function () { r() }).catch(function () { u() }), i.table.options.persistence && i.table.modExists("persistence", !0) && i.table.modules.persistence.config.page && i.table.modules.persistence.save("page")) : (console.warn("Pagination Error - Requested page is out of range of 1 - " + t.max + ":", n), u()) }) }, l.prototype.setPageToRow = function (n) { var t = this; return new Promise(function (i, r) { var e = t.table.rowManager.getDisplayRows(t.displayIndex - 1), u = e.indexOf(n), f; u > -1 ? (f = !0 === t.size ? 1 : Math.ceil((u + 1) / t.size), t.setPage(f).then(function () { i() }).catch(function () { r() })) : (console.warn("Pagination Error - Requested row is not visible"), r()) }) }, l.prototype.setPageSize = function (n) { !0 !== n && (n = parseInt(n)); n > 0 && (this.size = n); this.pageSizeSelect && this.generatePageSizeSelectList(); this.table.options.persistence && this.table.modExists("persistence", !0) && this.table.modules.persistence.config.page && this.table.modules.persistence.save("page") }, l.prototype._setPageButtons = function () { for (var t, n = this, i = Math.floor((this.count - 1) / 2), r = Math.ceil((this.count - 1) / 2), u = this.max - this.page + i + 1 < this.count ? this.max - this.count + 1 : Math.max(this.page - i, 1), f = this.page <= r ? Math.min(this.count, this.max) : Math.min(this.page + r, this.max); n.pagesElement.firstChild;)n.pagesElement.removeChild(n.pagesElement.firstChild); for (1 == n.page ? (n.firstBut.disabled = !0, n.prevBut.disabled = !0) : (n.firstBut.disabled = !1, n.prevBut.disabled = !1), n.page == n.max ? (n.lastBut.disabled = !0, n.nextBut.disabled = !0) : (n.lastBut.disabled = !1, n.nextBut.disabled = !1), t = u; t <= f; t++)t > 0 && t <= n.max && n.pagesElement.appendChild(n._generatePageButton(t)); this.footerRedraw() }, l.prototype._generatePageButton = function (n) { var i = this, t = document.createElement("button"); return t.classList.add("tabulator-page"), n == i.page && t.classList.add("active"), t.setAttribute("type", "button"), t.setAttribute("role", "button"), i.table.modules.localize.bind("pagination|page_title", function (i) { t.setAttribute("aria-label", i + " " + n); t.setAttribute("title", i + " " + n) }), t.setAttribute("data-page", n), t.textContent = n, t.addEventListener("click", function () { i.setPage(n).then(function () { }).catch(function () { }) }), t }, l.prototype.previousPage = function () { var n = this; return new Promise(function (t, i) { n.page > 1 ? (n.page--, n.trigger().then(function () { t() }).catch(function () { i() }), n.table.options.persistence && n.table.modExists("persistence", !0) && n.table.modules.persistence.config.page && n.table.modules.persistence.save("page")) : (console.warn("Pagination Error - Previous page would be less than page 1:", 0), i()) }) }, l.prototype.nextPage = function () { var n = this; return new Promise(function (t, i) { n.page < n.max ? (n.page++, n.trigger().then(function () { t() }).catch(function () { i() }), n.table.options.persistence && n.table.modExists("persistence", !0) && n.table.modules.persistence.config.page && n.table.modules.persistence.save("page")) : (n.progressiveLoad || console.warn("Pagination Error - Next page would be greater than maximum page of " + n.max + ":", n.max + 1), i()) }) }, l.prototype.getPage = function () { return this.page }, l.prototype.getPageMax = function () { return this.max }, l.prototype.getPageSize = function () { return this.size }, l.prototype.getMode = function () { return this.mode }, l.prototype.getRows = function (n) { var r, i, u, t; if ("local" == this.mode) { for (r = [], !0 === this.size ? (i = 0, u = n.length) : (i = this.size * (this.page - 1), u = i + parseInt(this.size)), this._setPageButtons(), t = i; t < u; t++)n[t] && r.push(n[t]); return r } return this._setPageButtons(), n.slice(0) }, l.prototype.trigger = function () { var t, n = this; return new Promise(function (i, r) { switch (n.mode) { case "local": t = n.table.rowManager.scrollLeft; n.table.rowManager.refreshActiveData("page"); n.table.rowManager.scrollHorizontal(t); n.table.options.pageLoaded.call(n.table, n.getPage()); i(); break; case "remote": case "progressive_load": case "progressive_scroll": n.table.modules.ajax.blockActiveRequest(); n._getRemotePage().then(function () { i() }).catch(function () { r() }); break; default: console.warn("Pagination Error - no such pagination mode:", n.mode); r() } }) }, l.prototype._getRemotePage = function () { var u, r, t = this, i = this; return new Promise(function (f, e) { var o, s; (i.table.modExists("ajax", !0) || e(), u = n.prototype.helpers.deepClone(i.table.modules.ajax.getParams() || {}), r = i.table.modules.ajax.getParams(), r[t.dataSentNames.page] = i.page, t.size && (r[t.dataSentNames.size] = t.size), t.table.options.ajaxSorting && t.table.modExists("sort")) && (o = i.table.modules.sort.getSort(), o.forEach(function (n) { delete n.column }), r[t.dataSentNames.sorters] = o); t.table.options.ajaxFiltering && t.table.modExists("filter") && (s = i.table.modules.filter.getFilters(!0, !0), r[t.dataSentNames.filters] = s); i.table.modules.ajax.setParams(r); i.table.modules.ajax.sendRequest(t.progressiveLoad).then(function (n) { i._parseRemoteData(n); f() }).catch(function () { e() }); i.table.modules.ajax.setParams(u) }) }, l.prototype._parseRemoteData = function (n) { var i, n, r, t = this; if (void 0 === n[this.dataReceivedNames.last_page] && console.warn("Remote Pagination Error - Server response missing '" + this.dataReceivedNames.last_page + "' property"), n[this.dataReceivedNames.data]) { if (this.max = parseInt(n[this.dataReceivedNames.last_page]) || 1, this.progressiveLoad) switch (this.mode) { case "progressive_load": 1 == this.page ? this.table.rowManager.setData(n[this.dataReceivedNames.data], !1, this.initialLoad && 1 == this.page) : this.table.rowManager.addRows(n[this.dataReceivedNames.data]); this.page < this.max && setTimeout(function () { t.nextPage().then(function () { }).catch(function () { }) }, t.table.options.ajaxProgressiveLoadDelay); break; case "progressive_scroll": n = this.table.rowManager.getData().concat(n[this.dataReceivedNames.data]); this.table.rowManager.setData(n, !0, this.initialLoad && 1 == this.page); r = this.table.options.ajaxProgressiveLoadScrollMargin || 2 * this.table.rowManager.element.clientHeight; t.table.rowManager.element.scrollHeight <= t.table.rowManager.element.clientHeight + r && t.nextPage().then(function () { }).catch(function () { }) } else i = this.table.rowManager.scrollLeft, this.table.rowManager.setData(n[this.dataReceivedNames.data], !1, this.initialLoad && 1 == this.page), this.table.rowManager.scrollHorizontal(i), this.table.columnManager.scrollHorizontal(i), this.table.options.pageLoaded.call(this.table, this.getPage()); this.initialLoad = !1 } else console.warn("Remote Pagination Error - Server response missing '" + this.dataReceivedNames.data + "' property") }, l.prototype.footerRedraw = function () { var n = this.table.footerManager.element; Math.ceil(n.clientWidth) - n.scrollWidth < 0 ? this.pagesElement.style.display = "none" : (this.pagesElement.style.display = "", Math.ceil(n.clientWidth) - n.scrollWidth < 0 && (this.pagesElement.style.display = "none")) }, l.prototype.paginationDataSentNames = { page: "page", size: "size", sorters: "sorters", filters: "filters" }, l.prototype.paginationDataReceivedNames = { current_page: "current_page", last_page: "last_page", data: "data" }, n.prototype.registerModule("page", l), nt = function (n) { this.table = n; this.mode = ""; this.id = ""; this.defWatcherBlock = !1; this.config = {}; this.readFunc = !1; this.writeFunc = !1 }, nt.prototype.localStorageTest = function () { var n = "_tabulator_test"; try { return window.localStorage.setItem(n, n), window.localStorage.removeItem(n), !0 } catch (n) { return !1 } }, nt.prototype.initialize = function () { var n, t = this.table.options.persistenceMode, i = this.table.options.persistenceID; this.mode = !0 !== t ? t : this.localStorageTest() ? "local" : "cookie"; this.table.options.persistenceReaderFunc ? "function" == typeof this.table.options.persistenceReaderFunc ? this.readFunc = this.table.options.persistenceReaderFunc : this.readers[this.table.options.persistenceReaderFunc] ? this.readFunc = this.readers[this.table.options.persistenceReaderFunc] : console.warn("Persistence Read Error - invalid reader set", this.table.options.persistenceReaderFunc) : this.readers[this.mode] ? this.readFunc = this.readers[this.mode] : console.warn("Persistence Read Error - invalid reader set", this.mode); this.table.options.persistenceWriterFunc ? "function" == typeof this.table.options.persistenceWriterFunc ? this.writeFunc = this.table.options.persistenceWriterFunc : this.readers[this.table.options.persistenceWriterFunc] ? this.writeFunc = this.readers[this.table.options.persistenceWriterFunc] : console.warn("Persistence Write Error - invalid reader set", this.table.options.persistenceWriterFunc) : this.writers[this.mode] ? this.writeFunc = this.writers[this.mode] : console.warn("Persistence Write Error - invalid writer set", this.mode); this.id = "tabulator-" + (i || this.table.element.getAttribute("id") || ""); this.config = { sort: !0 === this.table.options.persistence || this.table.options.persistence.sort, filter: !0 === this.table.options.persistence || this.table.options.persistence.filter, group: !0 === this.table.options.persistence || this.table.options.persistence.group, page: !0 === this.table.options.persistence || this.table.options.persistence.page, columns: !0 === this.table.options.persistence ? ["title", "width", "visible"] : this.table.options.persistence.columns }; this.config.page && (n = this.retreiveData("page")) && (void 0 === n.paginationSize || !0 !== this.config.page && !this.config.page.size || (this.table.options.paginationSize = n.paginationSize), void 0 === n.paginationInitialPage || !0 !== this.config.page && !this.config.page.page || (this.table.options.paginationInitialPage = n.paginationInitialPage)); this.config.group && (n = this.retreiveData("group")) && (void 0 === n.groupBy || !0 !== this.config.group && !this.config.group.groupBy || (this.table.options.groupBy = n.groupBy), void 0 === n.groupStartOpen || !0 !== this.config.group && !this.config.group.groupStartOpen || (this.table.options.groupStartOpen = n.groupStartOpen), void 0 === n.groupHeader || !0 !== this.config.group && !this.config.group.groupHeader || (this.table.options.groupHeader = n.groupHeader)) }, nt.prototype.initializeColumn = function (n) { var t, i, r = this; this.config.columns && (this.defWatcherBlock = !0, t = n.getDefinition(), i = !0 === this.config.columns ? Object.keys(t) : this.config.columns, i.forEach(function (n) { var i = Object.getOwnPropertyDescriptor(t, n), u = t[n]; i && Object.defineProperty(t, n, { set: function (n) { u = n; r.defWatcherBlock || r.save("columns"); i.set && i.set(n) }, get: function () { return i.get && i.get(), u } }) }), this.defWatcherBlock = !1) }, nt.prototype.load = function (n, t) { var i = this.retreiveData(n); return t && (i = i ? this.mergeDefinition(t, i) : t), i }, nt.prototype.retreiveData = function (n) { return !!this.readFunc && this.readFunc(this.id, n) }, nt.prototype.mergeDefinition = function (n, t) { var i = this, r = []; return t = t || [], t.forEach(function (t) { var f, u = i._findColumn(n, t); u && (!0 === i.config.columns || void 0 == i.config.columns ? (f = Object.keys(u), f.push("width")) : f = i.config.columns, f.forEach(function (n) { void 0 !== t[n] && (u[n] = t[n]) }), u.columns && (u.columns = i.mergeDefinition(u.columns, t.columns)), r.push(u)) }), n.forEach(function (n, u) { i._findColumn(t, n) || (r.length > u ? r.splice(u, 0, n) : r.push(n)) }), r }, nt.prototype._findColumn = function (n, t) { var i = t.columns ? "group" : t.field ? "field" : "object"; return n.find(function (n) { switch (i) { case "group": return n.title === t.title && n.columns.length === t.columns.length; case "field": return n.field === t.field; case "object": return n === t } }) }, nt.prototype.save = function (n) { var t = {}; switch (n) { case "columns": t = this.parseColumns(this.table.columnManager.getColumns()); break; case "filter": t = this.table.modules.filter.getFilters(); break; case "sort": t = this.validateSorters(this.table.modules.sort.getSort()); break; case "group": t = this.getGroupConfig(); break; case "page": t = this.getPageConfig() }this.writeFunc && this.writeFunc(this.id, n, t) }, nt.prototype.validateSorters = function (n) { return n.forEach(function (n) { n.column = n.field; delete n.field }), n }, nt.prototype.getGroupConfig = function () { var n = {}; return this.config.group && ((!0 === this.config.group || this.config.group.groupBy) && (n.groupBy = this.table.options.groupBy), (!0 === this.config.group || this.config.group.groupStartOpen) && (n.groupStartOpen = this.table.options.groupStartOpen), (!0 === this.config.group || this.config.group.groupHeader) && (n.groupHeader = this.table.options.groupHeader)), n }, nt.prototype.getPageConfig = function () { var n = {}; return this.config.page && ((!0 === this.config.page || this.config.page.size) && (n.paginationSize = this.table.modules.page.getPageSize()), (!0 === this.config.page || this.config.page.page) && (n.paginationInitialPage = this.table.modules.page.getPage())), n }, nt.prototype.parseColumns = function (n) { var t = this, i = [], r = ["headerContextMenu", "headerMenu", "contextMenu", "clickMenu"]; return n.forEach(function (n) { var f, u = {}, e = n.getDefinition(); n.isGroup ? (u.title = e.title, u.columns = t.parseColumns(n.getColumns())) : (u.field = n.getField(), !0 === t.config.columns || void 0 == t.config.columns ? (f = Object.keys(e), f.push("width")) : f = t.config.columns, f.forEach(function (t) { switch (t) { case "width": u.width = n.getWidth(); break; case "visible": u.visible = n.visible; break; default: "function" != typeof e[t] && -1 === r.indexOf(t) && (u[t] = e[t]) } })); i.push(u) }), i }, nt.prototype.readers = { local: function (n, t) { var i = localStorage.getItem(n + "-" + t); return !!i && JSON.parse(i) }, cookie: function (n, t) { var r, u, i = document.cookie, f = n + "-" + t, e = i.indexOf(f + "="); return e > -1 && (i = i.substr(e), r = i.indexOf(";"), r > -1 && (i = i.substr(0, r)), u = i.replace(f + "=", "")), !!u && JSON.parse(u) } }, nt.prototype.writers = { local: function (n, t, i) { localStorage.setItem(n + "-" + t, JSON.stringify(i)) }, cookie: function (n, t, i) { var r = new Date; r.setDate(r.getDate() + 1e4); document.cookie = n + "-" + t + "=" + JSON.stringify(i) + "; expires=" + r.toUTCString() } }, n.prototype.registerModule("persistence", nt), ri = function (n) { this.table = n; this.element = !1; this.manualBlock = !1 }, ri.prototype.initialize = function () { window.addEventListener("beforeprint", this.replaceTable.bind(this)); window.addEventListener("afterprint", this.cleanup.bind(this)) }, ri.prototype.replaceTable = function () { this.manualBlock || (this.element = document.createElement("div"), this.element.classList.add("tabulator-print-table"), this.element.appendChild(this.table.modules.export.genereateTable(this.table.options.printConfig, this.table.options.printStyled, this.table.options.printRowRange, "print")), this.table.element.style.display = "none", this.table.element.parentNode.insertBefore(this.element, this.table.element)) }, ri.prototype.cleanup = function () { document.body.classList.remove("tabulator-print-fullscreen-hide"); this.element && this.element.parentNode && (this.element.parentNode.removeChild(this.element), this.table.element.style.display = "") }, ri.prototype.printFullscreen = function (n, t, i) { var r, u, s = window.scrollX, h = window.scrollY, f = document.createElement("div"), e = document.createElement("div"), o = this.table.modules.export.genereateTable(void 0 !== i ? i : this.table.options.printConfig, void 0 !== t ? t : this.table.options.printStyled, n, "print"); this.manualBlock = !0; this.element = document.createElement("div"); this.element.classList.add("tabulator-print-fullscreen"); this.table.options.printHeader && (f.classList.add("tabulator-print-header"), r = "function" == typeof this.table.options.printHeader ? this.table.options.printHeader.call(this.table) : this.table.options.printHeader, "string" == typeof r ? f.innerHTML = r : f.appendChild(r), this.element.appendChild(f)); this.element.appendChild(o); this.table.options.printFooter && (e.classList.add("tabulator-print-footer"), u = "function" == typeof this.table.options.printFooter ? this.table.options.printFooter.call(this.table) : this.table.options.printFooter, "string" == typeof u ? e.innerHTML = u : e.appendChild(u), this.element.appendChild(e)); document.body.classList.add("tabulator-print-fullscreen-hide"); document.body.appendChild(this.element); this.table.options.printFormatter && this.table.options.printFormatter(this.element, o); window.print(); this.cleanup(); window.scrollTo(s, h); this.manualBlock = !1 }, n.prototype.registerModule("print", ri), wt = function (n) { this.table = n; this.data = !1; this.blocked = !1; this.origFuncs = {}; this.currentVersion = 0 }, wt.prototype.watchData = function (n) { var i, t = this; this.currentVersion++; i = this.currentVersion; t.unwatchData(); t.data = n; t.origFuncs.push = n.push; Object.defineProperty(t.data, "push", { enumerable: !1, configurable: !0, value: function () { var r = Array.from(arguments); return t.blocked || i !== t.currentVersion || r.forEach(function (n) { t.table.rowManager.addRowActual(n, !1) }), t.origFuncs.push.apply(n, arguments) } }); t.origFuncs.unshift = n.unshift; Object.defineProperty(t.data, "unshift", { enumerable: !1, configurable: !0, value: function () { var r = Array.from(arguments); return t.blocked || i !== t.currentVersion || r.forEach(function (n) { t.table.rowManager.addRowActual(n, !0) }), t.origFuncs.unshift.apply(n, arguments) } }); t.origFuncs.shift = n.shift; Object.defineProperty(t.data, "shift", { enumerable: !1, configurable: !0, value: function () { var r; return t.blocked || i !== t.currentVersion || t.data.length && (r = t.table.rowManager.getRowFromDataObject(t.data[0])) && r.deleteActual(), t.origFuncs.shift.call(n) } }); t.origFuncs.pop = n.pop; Object.defineProperty(t.data, "pop", { enumerable: !1, configurable: !0, value: function () { var r; return t.blocked || i !== t.currentVersion || t.data.length && (r = t.table.rowManager.getRowFromDataObject(t.data[t.data.length - 1])) && r.deleteActual(), t.origFuncs.pop.call(n) } }); t.origFuncs.splice = n.splice; Object.defineProperty(t.data, "splice", { enumerable: !1, configurable: !0, value: function () { var e, r = Array.from(arguments), f = r[0] < 0 ? n.length + r[0] : r[0], o = r[1], u = !!r[2] && r.slice(2), s; return t.blocked || i !== t.currentVersion || ((u && (e = !!n[f] && t.table.rowManager.getRowFromDataObject(n[f]), e ? u.forEach(function (n) { t.table.rowManager.addRowActual(n, !0, e, !0) }) : (u = u.slice().reverse(), u.forEach(function (n) { t.table.rowManager.addRowActual(n, !0, !1, !0) }))), 0 !== o) && (s = n.slice(f, void 0 === r[1] ? r[1] : f + o), s.forEach(function (n, i) { var r = t.table.rowManager.getRowFromDataObject(n); r && r.deleteActual(i !== s.length - 1) })), (u || 0 !== o) && t.table.rowManager.reRenderInPosition()), t.origFuncs.splice.apply(n, arguments) } }) }, wt.prototype.unwatchData = function () { if (!1 !== this.data) for (var n in this.origFuncs) Object.defineProperty(this.data, n, { enumerable: !0, configurable: !0, writable: !0, value: this.origFuncs.key }) }, wt.prototype.watchRow = function (n) { var t = n.getData(), i; this.blocked = !0; for (i in t) this.watchKey(n, t, i); this.table.options.dataTree && this.watchTreeChildren(n); this.blocked = !1 }, wt.prototype.watchTreeChildren = function (n) { function r() { u.table.modules.dataTree.initializeRow(n); u.table.modules.dataTree.layoutRow(n); u.table.rowManager.refreshActiveData("tree", !1, !0) } var u = this, t = n.getData()[this.table.options.dataTreeChildField], i = {}; t && (i.push = t.push, Object.defineProperty(t, "push", { enumerable: !1, configurable: !0, value: function () { var n = i.push.apply(t, arguments); return r(), n } }), i.unshift = t.unshift, Object.defineProperty(t, "unshift", { enumerable: !1, configurable: !0, value: function () { var n = i.unshift.apply(t, arguments); return r(), n } }), i.shift = t.shift, Object.defineProperty(t, "shift", { enumerable: !1, configurable: !0, value: function () { var n = i.shift.call(t); return r(), n } }), i.pop = t.pop, Object.defineProperty(t, "pop", { enumerable: !1, configurable: !0, value: function () { var n = i.pop.call(t); return r(), n } }), i.splice = t.splice, Object.defineProperty(t, "splice", { enumerable: !1, configurable: !0, value: function () { var n = i.splice.apply(t, arguments); return r(), n } })) }, wt.prototype.watchKey = function (n, t, i) { var u = this, r = Object.getOwnPropertyDescriptor(t, i), f = t[i], e = this.currentVersion; Object.defineProperty(t, i, { set: function (t) { if (f = t, !u.blocked && e === u.currentVersion) { var o = {}; o[i] = t; n.updateData(o) } r.set && r.set(t) }, get: function () { return r.get && r.get(), f } }) }, wt.prototype.unwatchRow = function (n) { var t = n.getData(); for (var i in t) Object.defineProperty(t, i, { value: t[i] }) }, wt.prototype.block = function () { this.blocked = !0 }, wt.prototype.unblock = function () { this.blocked = !1 }, n.prototype.registerModule("reactiveData", wt), fi = function (n) { this.table = n; this.startColumn = !1; this.startX = !1; this.startWidth = !1; this.handle = null; this.prevHandle = null }, fi.prototype.initializeColumn = function (n, t, i) { var r = this, s = !1, h = this.table.options.resizableColumns, u, f, e, o; ("header" === n && (s = "textarea" == t.definition.formatter || t.definition.variableHeight, t.modules.resize = { variableHeight: s }), !0 === h || h == n) && (u = document.createElement("div"), u.className = "tabulator-col-resize-handle", f = document.createElement("div"), f.className = "tabulator-col-resize-handle prev", u.addEventListener("click", function (n) { n.stopPropagation() }), e = function (n) { var i = t.getLastColumn(); i && r._checkResizability(i) && (r.startColumn = t, r._mouseDown(n, i, u)) }, u.addEventListener("mousedown", e), u.addEventListener("touchstart", e, { passive: !0 }), u.addEventListener("dblclick", function (n) { var i = t.getLastColumn(); i && r._checkResizability(i) && (n.stopPropagation(), i.reinitializeWidth(!0)) }), f.addEventListener("click", function (n) { n.stopPropagation() }), o = function (n) { var e, i, u; (e = t.getFirstColumn()) && (i = r.table.columnManager.findColumnIndex(e), (u = i > 0 && r.table.columnManager.getColumnByIndex(i - 1)) && r._checkResizability(u) && (r.startColumn = t, r._mouseDown(n, u, f))) }, f.addEventListener("mousedown", o), f.addEventListener("touchstart", o, { passive: !0 }), f.addEventListener("dblclick", function (n) { var f, i, u; (f = t.getFirstColumn()) && (i = r.table.columnManager.findColumnIndex(f), (u = i > 0 && r.table.columnManager.getColumnByIndex(i - 1)) && r._checkResizability(u) && (n.stopPropagation(), u.reinitializeWidth(!0))) }), i.appendChild(u), i.appendChild(f)) }, fi.prototype._checkResizability = function (n) { return void 0 !== n.definition.resizable ? n.definition.resizable : this.table.options.resizableColumns }, fi.prototype._mouseDown = function (n, t, i) { function u(n) { r.table.rtl ? t.setWidth(r.startWidth - ((void 0 === n.screenX ? n.touches[0].screenX : n.screenX) - r.startX)) : t.setWidth(r.startWidth + ((void 0 === n.screenX ? n.touches[0].screenX : n.screenX) - r.startX)); r.table.options.virtualDomHoz && r.table.vdomHoz.reinitialize(!0); !r.table.browserSlow && t.modules.resize && t.modules.resize.variableHeight && t.checkCellHeights() } function f() { r.startColumn.modules.edit && (r.startColumn.modules.edit.blocked = !1); r.table.browserSlow && t.modules.resize && t.modules.resize.variableHeight && t.checkCellHeights(); document.body.removeEventListener("mouseup", f); document.body.removeEventListener("mousemove", u); i.removeEventListener("touchmove", u); i.removeEventListener("touchend", f); r.table.element.classList.remove("tabulator-block-select"); r.table.options.persistence && r.table.modExists("persistence", !0) && r.table.modules.persistence.config.columns && r.table.modules.persistence.save("columns"); r.table.options.columnResized.call(r.table, t.getComponent()) } var r = this; r.table.element.classList.add("tabulator-block-select"); n.stopPropagation(); r.startColumn.modules.edit && (r.startColumn.modules.edit.blocked = !0); r.startX = void 0 === n.screenX ? n.touches[0].screenX : n.screenX; r.startWidth = t.getWidth(); document.body.addEventListener("mousemove", u); document.body.addEventListener("mouseup", f); i.addEventListener("touchmove", u, { passive: !0 }); i.addEventListener("touchend", f) }, n.prototype.registerModule("resizeColumns", fi), ei = function (n) { this.table = n; this.startColumn = !1; this.startY = !1; this.startHeight = !1; this.handle = null; this.prevHandle = null }, ei.prototype.initializeRow = function (n) { var r = this, e = n.getElement(), i = document.createElement("div"), t, u, f; i.className = "tabulator-row-resize-handle"; t = document.createElement("div"); t.className = "tabulator-row-resize-handle prev"; i.addEventListener("click", function (n) { n.stopPropagation() }); u = function (t) { r.startRow = n; r._mouseDown(t, n, i) }; i.addEventListener("mousedown", u); i.addEventListener("touchstart", u, { passive: !0 }); t.addEventListener("click", function (n) { n.stopPropagation() }); f = function (i) { var u = r.table.rowManager.prevDisplayRow(n); u && (r.startRow = u, r._mouseDown(i, u, t)) }; t.addEventListener("mousedown", f); t.addEventListener("touchstart", f, { passive: !0 }); e.appendChild(i); e.appendChild(t) }, ei.prototype._mouseDown = function (n, t, i) { function u(n) { t.setHeight(r.startHeight + ((void 0 === n.screenY ? n.touches[0].screenY : n.screenY) - r.startY)) } function f() { document.body.removeEventListener("mouseup", u); document.body.removeEventListener("mousemove", u); i.removeEventListener("touchmove", u); i.removeEventListener("touchend", f); r.table.element.classList.remove("tabulator-block-select"); r.table.options.rowResized.call(this.table, t.getComponent()) } var r = this; r.table.element.classList.add("tabulator-block-select"); n.stopPropagation(); r.startY = void 0 === n.screenY ? n.touches[0].screenY : n.screenY; r.startHeight = t.getHeight(); document.body.addEventListener("mousemove", u); document.body.addEventListener("mouseup", f); i.addEventListener("touchmove", u, { passive: !0 }); i.addEventListener("touchend", f) }, n.prototype.registerModule("resizeRows", ei), oi = function (n) { this.table = n; this.binding = !1; this.observer = !1; this.containerObserver = !1; this.tableHeight = 0; this.tableWidth = 0; this.containerHeight = 0; this.containerWidth = 0; this.autoResize = !1 }, oi.prototype.initialize = function () { var i, t = this, n = this.table; this.tableHeight = n.element.clientHeight; this.tableWidth = n.element.clientWidth; n.element.parentNode && (this.containerHeight = n.element.parentNode.clientHeight, this.containerWidth = n.element.parentNode.clientWidth); "undefined" != typeof ResizeObserver && "virtual" === n.rowManager.getRenderMode() ? (this.autoResize = !0, this.observer = new ResizeObserver(function (i) { if (!n.browserMobile || n.browserMobile && !n.modules.edit.currentCell) { var r = Math.floor(i[0].contentRect.height), u = Math.floor(i[0].contentRect.width); t.tableHeight == r && t.tableWidth == u || (t.tableHeight = r, t.tableWidth = u, n.element.parentNode && (t.containerHeight = n.element.parentNode.clientHeight, t.containerWidth = n.element.parentNode.clientWidth), n.options.virtualDomHoz && n.vdomHoz.reinitialize(!0), n.redraw()) } }), this.observer.observe(n.element), i = window.getComputedStyle(n.element), this.table.element.parentNode && !this.table.rowManager.fixedHeight && (i.getPropertyValue("max-height") || i.getPropertyValue("min-height")) && (this.containerObserver = new ResizeObserver(function (i) { if (!n.browserMobile || n.browserMobile && !n.modules.edit.currentCell) { var r = Math.floor(i[0].contentRect.height), u = Math.floor(i[0].contentRect.width); t.containerHeight == r && t.containerWidth == u || (t.containerHeight = r, t.containerWidth = u, t.tableHeight = n.element.clientHeight, t.tableWidth = n.element.clientWidth); n.options.virtualDomHoz && n.vdomHoz.reinitialize(!0); n.redraw() } }), this.containerObserver.observe(this.table.element.parentNode))) : (this.binding = function () { n.browserMobile && (!n.browserMobile || n.modules.edit.currentCell) || (n.options.virtualDomHoz && n.vdomHoz.reinitialize(!0), n.redraw()) }, window.addEventListener("resize", this.binding)) }, oi.prototype.clearBindings = function () { this.binding && window.removeEventListener("resize", this.binding); this.observer && this.observer.unobserve(this.table.element); this.containerObserver && this.containerObserver.unobserve(this.table.element.parentNode) }, n.prototype.registerModule("resizeTable", oi), ot = function (n) { this.table = n; this.columns = []; this.hiddenColumns = []; this.mode = ""; this.index = 0; this.collapseFormatter = []; this.collapseStartOpen = !0; this.collapseHandleColumn = !1 }, ot.prototype.initialize = function () { var f = this, n = [], r, u; this.mode = this.table.options.responsiveLayout; this.collapseFormatter = this.table.options.responsiveLayoutCollapseFormatter || this.formatCollapsedData; this.collapseStartOpen = this.table.options.responsiveLayoutCollapseStartOpen; this.hiddenColumns = []; this.table.columnManager.columnsByIndex.forEach(function (t, i) { t.modules.responsive && t.modules.responsive.order && t.modules.responsive.visible && (t.modules.responsive.index = i, n.push(t), t.visible || "collapse" !== f.mode || f.hiddenColumns.push(t)) }); n = n.reverse(); n = n.sort(function (n, t) { return t.modules.responsive.order - n.modules.responsive.order || t.modules.responsive.index - n.modules.responsive.index }); this.columns = n; "collapse" === this.mode && this.generateCollapsedContent(); for (var t = this.table.columnManager.columnsByIndex, e = Array.isArray(t), i = 0, t = e ? t : t[Symbol.iterator](); ;) { if (e) { if (i >= t.length) break; r = t[i++] } else { if (i = t.next(), i.done) break; r = i.value } if (u = r, "responsiveCollapse" == u.definition.formatter) { this.collapseHandleColumn = u; break } } this.collapseHandleColumn && (this.hiddenColumns.length ? this.collapseHandleColumn.show() : this.collapseHandleColumn.hide()) }, ot.prototype.initializeColumn = function (n) { var t = n.getDefinition(); n.modules.responsive = { order: void 0 === t.responsive ? 1 : t.responsive, visible: !1 !== t.visible } }, ot.prototype.initializeRow = function (n) { var t; "calc" !== n.type && (t = document.createElement("div"), t.classList.add("tabulator-responsive-collapse"), n.modules.responsiveLayout = { element: t, open: this.collapseStartOpen }, this.collapseStartOpen || (t.style.display = "none")) }, ot.prototype.layoutRow = function (n) { var t = n.getElement(); n.modules.responsiveLayout && (t.appendChild(n.modules.responsiveLayout.element), this.generateCollapsedRowContent(n)) }, ot.prototype.updateColumnVisibility = function (n, t) { n.modules.responsive && (n.modules.responsive.visible = t, this.initialize()) }, ot.prototype.hideColumn = function (n) { var t = this.hiddenColumns.length; n.hide(!1, !0); "collapse" === this.mode && (this.hiddenColumns.unshift(n), this.generateCollapsedContent(), this.collapseHandleColumn && !t && this.collapseHandleColumn.show()) }, ot.prototype.showColumn = function (n) { var t; n.show(!1, !0); n.setWidth(n.getWidth()); "collapse" === this.mode && (t = this.hiddenColumns.indexOf(n), t > -1 && this.hiddenColumns.splice(t, 1), this.generateCollapsedContent(), this.collapseHandleColumn && !this.hiddenColumns.length && this.collapseHandleColumn.hide()) }, ot.prototype.update = function () { for (var f, i, u, r, n = this, t = !0; t;)f = "fitColumns" == n.table.modules.layout.getMode() ? n.table.columnManager.getFlexBaseWidth() : n.table.columnManager.getWidth(), i = (n.table.options.headerVisible ? n.table.columnManager.element.clientWidth : n.table.element.clientWidth) - f, i < 0 ? (u = n.columns[n.index], u ? (n.hideColumn(u), n.index++) : t = !1) : (r = n.columns[n.index - 1], r && i > 0 && i >= r.getWidth() ? (n.showColumn(r), n.index--) : t = !1), n.table.rowManager.activeRowsCount || n.table.rowManager.renderEmptyScroll() }, ot.prototype.generateCollapsedContent = function () { var n = this; this.table.rowManager.getDisplayRows().forEach(function (t) { n.generateCollapsedRowContent(t) }) }, ot.prototype.generateCollapsedRowContent = function (n) { var t, i; if (n.modules.responsiveLayout) { for (t = n.modules.responsiveLayout.element; t.firstChild;)t.removeChild(t.firstChild); i = this.collapseFormatter(this.generateCollapsedRowData(n)); i && t.appendChild(i) } }, ot.prototype.generateCollapsedRowData = function (n) { var i, r = this, u = n.getData(), t = []; return this.hiddenColumns.forEach(function (f) { var e = f.getFieldValue(u); f.definition.title && f.field && (f.modules.format && r.table.options.responsiveLayoutCollapseUseFormatters ? (i = { value: !1, data: {}, getValue: function () { return e }, getData: function () { return u }, getElement: function () { return document.createElement("div") }, getRow: function () { return n.getComponent() }, getColumn: function () { return f.getComponent() } }, t.push({ title: f.definition.title, value: f.modules.format.formatter.call(r.table.modules.format, i, f.modules.format.params) })) : t.push({ title: f.definition.title, value: e })) }), t }, ot.prototype.formatCollapsedData = function (n) { var t = document.createElement("table"), i = ""; return n.forEach(function (n) { var t = document.createElement("div"); n.value instanceof Node && (t.appendChild(n.value), n.value = t.innerHTML); i += "<tr><td><strong>" + n.title + "<\/strong><\/td><td>" + n.value + "<\/td><\/tr>" }), t.innerHTML = i, Object.keys(n).length ? t : "" }, n.prototype.registerModule("responsiveLayout", ot), tt = function (n) { this.table = n; this.selecting = !1; this.lastClickedRow = !1; this.selectPrev = []; this.selectedRows = []; this.headerCheckboxElement = null }, tt.prototype.clearSelectionData = function (n) { this.selecting = !1; this.lastClickedRow = !1; this.selectPrev = []; this.selectedRows = []; n || this._rowSelectionChanged() }, tt.prototype.initializeRow = function (n) { var t = this, i = n.getElement(), r = function n() { setTimeout(function () { t.selecting = !1 }, 50); document.body.removeEventListener("mouseup", n) }; n.modules.select = { selected: !1 }; t.table.options.selectableCheck.call(this.table, n.getComponent()) ? (i.classList.add("tabulator-selectable"), i.classList.remove("tabulator-unselectable"), t.table.options.selectable && "highlight" != t.table.options.selectable && ("click" === t.table.options.selectableRangeMode ? i.addEventListener("click", function (i) { if (i.shiftKey) { t.table._clearSelection(); t.lastClickedRow = t.lastClickedRow || n; var u = t.table.rowManager.getDisplayRowIndex(t.lastClickedRow), f = t.table.rowManager.getDisplayRowIndex(n), e = u <= f ? u : f, o = u >= f ? u : f, s = t.table.rowManager.getDisplayRows().slice(0), r = s.splice(e, o - e + 1); i.ctrlKey || i.metaKey ? (r.forEach(function (i) { i !== t.lastClickedRow && (!0 === t.table.options.selectable || t.isRowSelected(n) ? t.toggleRow(i) : t.selectedRows.length < t.table.options.selectable && t.toggleRow(i)) }), t.lastClickedRow = n) : (t.deselectRows(void 0, !0), !0 !== t.table.options.selectable && r.length > t.table.options.selectable && (r = r.slice(0, t.table.options.selectable)), t.selectRows(r)); t.table._clearSelection() } else i.ctrlKey || i.metaKey ? (t.toggleRow(n), t.lastClickedRow = n) : (t.deselectRows(void 0, !0), t.selectRows(n), t.lastClickedRow = n) }) : (i.addEventListener("click", function () { t.table.modExists("edit") && t.table.modules.edit.getCurrentCell() || t.table._clearSelection(); t.selecting || t.toggleRow(n) }), i.addEventListener("mousedown", function (i) { if (i.shiftKey) return t.table._clearSelection(), t.selecting = !0, t.selectPrev = [], document.body.addEventListener("mouseup", r), document.body.addEventListener("keyup", r), t.toggleRow(n), !1 }), i.addEventListener("mouseenter", function () { t.selecting && (t.table._clearSelection(), t.toggleRow(n), t.selectPrev[1] == n && t.toggleRow(t.selectPrev[0])) }), i.addEventListener("mouseout", function () { t.selecting && (t.table._clearSelection(), t.selectPrev.unshift(n)) })))) : (i.classList.add("tabulator-unselectable"), i.classList.remove("tabulator-selectable")) }, tt.prototype.toggleRow = function (n) { this.table.options.selectableCheck.call(this.table, n.getComponent()) && (n.modules.select && n.modules.select.selected ? this._deselectRow(n) : this._selectRow(n)) }, tt.prototype.selectRows = function (n) { var t, i = this; switch (void 0 === n ? "undefined" : _typeof(n)) { case "undefined": this.table.rowManager.rows.forEach(function (n) { i._selectRow(n, !0, !0) }); this._rowSelectionChanged(); break; case "string": t = this.table.rowManager.findRow(n); t ? this._selectRow(t, !0, !0) : this.table.rowManager.getRows(n).forEach(function (n) { i._selectRow(n, !0, !0) }); this._rowSelectionChanged(); break; default: Array.isArray(n) ? (n.forEach(function (n) { i._selectRow(n, !0, !0) }), this._rowSelectionChanged()) : this._selectRow(n, !1, !0) } }, tt.prototype._selectRow = function (n, t, i) { if (!isNaN(this.table.options.selectable) && !0 !== this.table.options.selectable && !i && this.selectedRows.length >= this.table.options.selectable) { if (!this.table.options.selectableRollingSelection) return !1; this._deselectRow(this.selectedRows[0]) } var r = this.table.rowManager.findRow(n); r ? -1 == this.selectedRows.indexOf(r) && (r.modules.select || (r.modules.select = {}), r.modules.select.selected = !0, r.modules.select.checkboxEl && (r.modules.select.checkboxEl.checked = !0), r.getElement().classList.add("tabulator-selected"), this.selectedRows.push(r), this.table.options.dataTreeSelectPropagate && this.childRowSelection(r, !0), t || this.table.options.rowSelected.call(this.table, r.getComponent()), this._rowSelectionChanged(t)) : t || console.warn("Selection Error - No such row found, ignoring selection:" + n) }, tt.prototype.isRowSelected = function (n) { return -1 !== this.selectedRows.indexOf(n) }, tt.prototype.deselectRows = function (n, t) { var u, i = this, r; if (void 0 === n) { for (u = i.selectedRows.length, r = 0; r < u; r++)i._deselectRow(i.selectedRows[0], !0); i._rowSelectionChanged(t) } else Array.isArray(n) ? (n.forEach(function (n) { i._deselectRow(n, !0) }), i._rowSelectionChanged(t)) : i._deselectRow(n, t) }, tt.prototype._deselectRow = function (n, t) { var u, r = this, i = r.table.rowManager.findRow(n); i ? (u = r.selectedRows.findIndex(function (n) { return n == i })) > -1 && (i.modules.select || (i.modules.select = {}), i.modules.select.selected = !1, i.modules.select.checkboxEl && (i.modules.select.checkboxEl.checked = !1), i.getElement().classList.remove("tabulator-selected"), r.selectedRows.splice(u, 1), this.table.options.dataTreeSelectPropagate && this.childRowSelection(i, !1), t || r.table.options.rowDeselected.call(this.table, i.getComponent()), r._rowSelectionChanged(t)) : t || console.warn("Deselection Error - No such row found, ignoring selection:" + n) }, tt.prototype.getSelectedData = function () { var n = []; return this.selectedRows.forEach(function (t) { n.push(t.getData()) }), n }, tt.prototype.getSelectedRows = function () { var n = []; return this.selectedRows.forEach(function (t) { n.push(t.getComponent()) }), n }, tt.prototype._rowSelectionChanged = function (n) { this.headerCheckboxElement && (0 === this.selectedRows.length ? (this.headerCheckboxElement.checked = !1, this.headerCheckboxElement.indeterminate = !1) : this.table.rowManager.rows.length === this.selectedRows.length ? (this.headerCheckboxElement.checked = !0, this.headerCheckboxElement.indeterminate = !1) : (this.headerCheckboxElement.indeterminate = !0, this.headerCheckboxElement.checked = !1)); n || this.table.options.rowSelectionChanged.call(this.table, this.getSelectedData(), this.getSelectedRows()) }, tt.prototype.registerRowSelectCheckbox = function (n, t) { n._row.modules.select || (n._row.modules.select = {}); n._row.modules.select.checkboxEl = t }, tt.prototype.registerHeaderSelectCheckbox = function (n) { this.headerCheckboxElement = n }, tt.prototype.childRowSelection = function (n, t) { var s = this.table.modules.dataTree.getChildren(n), e, c, o, a; if (t) for (var i = s, h = Array.isArray(i), u = 0, i = h ? i : i[Symbol.iterator](); ;) { if (h) { if (u >= i.length) break; e = i[u++] } else { if (u = i.next(), u.done) break; e = u.value } c = e; this._selectRow(c, !0) } else for (var r = s, l = Array.isArray(r), f = 0, r = l ? r : r[Symbol.iterator](); ;) { if (l) { if (f >= r.length) break; o = r[f++] } else { if (f = r.next(), f.done) break; o = f.value } a = o; this._deselectRow(a, !0) } }, n.prototype.registerModule("selectRow", tt), st = function (n) { this.table = n; this.sortList = []; this.changed = !1 }, st.prototype.initializeColumn = function (n, t) { var u, r, i = this, f = !1; switch (_typeof(n.definition.sorter)) { case "string": i.sorters[n.definition.sorter] ? f = i.sorters[n.definition.sorter] : console.warn("Sort Error - No such sorter found: ", n.definition.sorter); break; case "function": f = n.definition.sorter }n.modules.sort = { sorter: f, dir: "none", params: n.definition.sorterParams || {}, startingDir: n.definition.headerSortStartingDir || "asc", tristate: void 0 !== n.definition.headerSortTristate ? n.definition.headerSortTristate : this.table.options.headerSortTristate }; (void 0 === n.definition.headerSort ? !1 !== this.table.options.headerSort : !1 !== n.definition.headerSort) && (u = n.getElement(), u.classList.add("tabulator-sortable"), r = document.createElement("div"), r.classList.add("tabulator-col-sorter"), "object" == _typeof(this.table.options.headerSortElement) ? r.appendChild(this.table.options.headerSortElement) : r.innerHTML = this.table.options.headerSortElement, t.appendChild(r), n.modules.sort.element = r, u.addEventListener("click", function (t) { var r = "", u = [], f = !1; if (n.modules.sort) { if (n.modules.sort.tristate) r = "none" == n.modules.sort.dir ? n.modules.sort.startingDir : n.modules.sort.dir == n.modules.sort.startingDir ? "asc" == n.modules.sort.dir ? "desc" : "asc" : "none"; else switch (n.modules.sort.dir) { case "asc": r = "desc"; break; case "desc": r = "asc"; break; default: r = n.modules.sort.startingDir }i.table.options.columnHeaderSortMulti && (t.shiftKey || t.ctrlKey) ? (u = i.getSort(), f = u.findIndex(function (t) { return t.field === n.getField() }), f > -1 ? (u[f].dir = r, f != u.length - 1 && (f = u.splice(f, 1)[0], "none" != r && u.push(f))) : "none" != r && u.push({ column: n, dir: r }), i.setSort(u)) : "none" == r ? i.clear() : i.setSort(n, r); i.table.rowManager.sorterRefresh(!i.sortList.length) } })) }, st.prototype.hasChanged = function () { var n = this.changed; return this.changed = !1, n }, st.prototype.getSort = function () { var t = this, n = []; return t.sortList.forEach(function (t) { t.column && n.push({ column: t.column.getComponent(), field: t.column.getField(), dir: t.dir }) }), n }, st.prototype.setSort = function (n, t) { var i = this, r = []; Array.isArray(n) || (n = [{ column: n, dir: t }]); n.forEach(function (n) { var t; t = i.table.columnManager.findColumn(n.column); t ? (n.column = t, r.push(n), i.changed = !0) : console.warn("Sort Warning - Sort field does not exist and is being ignored: ", n.column) }); i.sortList = r; this.table.options.persistence && this.table.modExists("persistence", !0) && this.table.modules.persistence.config.sort && this.table.modules.persistence.save("sort") }, st.prototype.clear = function () { this.setSort([]) }, st.prototype.findSorter = function (n) { var t, r = this.table.rowManager.activeRows[0], i = "string"; if (r && (r = r.getData(), n.getField())) switch (t = n.getFieldValue(r), void 0 === t ? "undefined" : _typeof(t)) { case "undefined": i = "string"; break; case "boolean": i = "boolean"; break; default: isNaN(t) || "" === t ? t.match(/((^[0-9]+[a-z]+)|(^[a-z]+[0-9]+))+$/i) && (i = "alphanum") : i = "number" }return this.sorters[i] }, st.prototype.sort = function (n) { var t = this, r = this.table.options.sortOrderReverse ? t.sortList.slice().reverse() : t.sortList, i = [], u = []; t.table.options.dataSorting && t.table.options.dataSorting.call(t.table, t.getSort()); t.clearColumnHeaders(); t.table.options.ajaxSorting ? r.forEach(function (n) { t.setColumnHeader(n.column, n.dir) }) : (r.forEach(function (n) { var r = n.column.modules.sort; n.column && r && (r.sorter || (r.sorter = t.findSorter(n.column)), n.params = "function" == typeof r.params ? r.params(n.column.getComponent(), n.dir) : r.params, i.push(n)); t.setColumnHeader(n.column, n.dir) }), i.length && t._sortItems(n, i)); t.table.options.dataSorted && (n.forEach(function (n) { u.push(n.getComponent()) }), t.table.options.dataSorted.call(t.table, t.getSort(), u)) }, st.prototype.clearColumnHeaders = function () { this.table.columnManager.getRealColumns().forEach(function (n) { n.modules.sort && (n.modules.sort.dir = "none", n.getElement().setAttribute("aria-sort", "none")) }) }, st.prototype.setColumnHeader = function (n, t) { n.modules.sort.dir = t; n.getElement().setAttribute("aria-sort", t) }, st.prototype._sortItems = function (n, t) { var i = this, r = t.length - 1; n.sort(function (n, u) { for (var o, e, f = r; f >= 0; f--)if (e = t[f], 0 !== (o = i._sortRow(n, u, e.column, e.dir, e.params))) break; return o }) }, st.prototype._sortRow = function (n, t, i, r, u) { var f, e, o = "asc" == r ? n : t, s = "asc" == r ? t : n; return n = i.getFieldValue(o.getData()), t = i.getFieldValue(s.getData()), n = void 0 !== n ? n : "", t = void 0 !== t ? t : "", f = o.getComponent(), e = s.getComponent(), i.modules.sort.sorter.call(this, n, t, f, e, i.getComponent(), r, u) }, st.prototype.sorters = { number: function (n, t, i, r, u, f, e) { var s = e.alignEmptyValues, h = e.decimalSeparator || ".", c = e.thousandSeparator || ",", o = 0; if (n = parseFloat(String(n).split(c).join("").split(h).join(".")), t = parseFloat(String(t).split(c).join("").split(h).join(".")), isNaN(n)) o = isNaN(t) ? 0 : -1; else { if (!isNaN(t)) return n - t; o = 1 } return ("top" === s && "desc" === f || "bottom" === s && "asc" === f) && (o *= -1), o }, string: function (n, t, i, r, u, f, e) { var s, h = e.alignEmptyValues, o = 0; if (n) { if (t) { switch (_typeof(e.locale)) { case "boolean": e.locale && (s = this.table.modules.localize.getLocale()); break; case "string": s = e.locale }return String(n).toLowerCase().localeCompare(String(t).toLowerCase(), s) } o = 1 } else o = t ? -1 : 0; return ("top" === h && "desc" === f || "bottom" === h && "asc" === f) && (o *= -1), o }, date: function (n, t, i, r, u, f, e) { return e.format || (e.format = "DD/MM/YYYY"), this.sorters.datetime.call(this, n, t, i, r, u, f, e) }, time: function (n, t, i, r, u, f, e) { return e.format || (e.format = "HH:mm"), this.sorters.datetime.call(this, n, t, i, r, u, f, e) }, datetime: function (n, t, i, r, u, f, e) { var s = e.format || "DD/MM/YYYY HH:mm:ss", h = e.alignEmptyValues, o = 0; if ("undefined" != typeof moment) { if (n = moment(n, s), t = moment(t, s), n.isValid()) { if (t.isValid()) return n - t; o = 1 } else o = t.isValid() ? -1 : 0; return ("top" === h && "desc" === f || "bottom" === h && "asc" === f) && (o *= -1), o } console.error("Sort Error - 'datetime' sorter is dependant on moment.js") }, boolean: function (n, t) { return (!0 === n || "true" === n || "True" === n || 1 === n ? 1 : 0) - (!0 === t || "true" === t || "True" === t || 1 === t ? 1 : 0) }, array: function (n, t, i, r, u, f, e) { function s(n) { switch (a) { case "length": return n.length; case "sum": return n.reduce(function (n, t) { return n + t }); case "max": return Math.max.apply(null, n); case "min": return Math.min.apply(null, n); case "avg": return n.reduce(function (n, t) { return n + t }) / n.length } } var h = 0, c = 0, a = e.type || "length", o = e.alignEmptyValues, l = 0; if (Array.isArray(n)) { if (Array.isArray(t)) return h = n ? s(n) : 0, c = t ? s(t) : 0, h - c; o = 1 } else o = Array.isArray(t) ? -1 : 0; return ("top" === o && "desc" === f || "bottom" === o && "asc" === f) && (l *= -1), l }, exists: function (n, t) { return (void 0 === n ? 0 : 1) - (void 0 === t ? 0 : 1) }, alphanum: function (n, t, i, r, u, f, e) { var o, s, h, c, v, a = 0, y = /(\d+)|(\D+)/g, p = /\d/, w = e.alignEmptyValues, l = 0; if (n || 0 === n) { if (t || 0 === t) { if (isFinite(n) && isFinite(t)) return n - t; if (o = String(n).toLowerCase(), s = String(t).toLowerCase(), o === s) return 0; if (!p.test(o) || !p.test(s)) return o > s ? 1 : -1; for (o = o.match(y), s = s.match(y), v = o.length > s.length ? s.length : o.length; a < v;)if (h = o[a], c = s[a++], h !== c) return isFinite(h) && isFinite(c) ? ("0" === h.charAt(0) && (h = "." + h), "0" === c.charAt(0) && (c = "." + c), h - c) : h > c ? 1 : -1; return o.length > s.length } l = 1 } else l = t || 0 === t ? -1 : 0; return ("top" === w && "desc" === f || "bottom" === w && "asc" === f) && (l *= -1), l } }, n.prototype.registerModule("sort", st), kt = function (n) { this.table = n; this.invalidCells = [] }, kt.prototype.initializeColumn = function (n) { var t, r = this, i = []; n.definition.validator && (Array.isArray(n.definition.validator) ? n.definition.validator.forEach(function (n) { (t = r._extractValidator(n)) && i.push(t) }) : (t = this._extractValidator(n.definition.validator)) && i.push(t), n.modules.validate = !!i.length && i) }, kt.prototype._extractValidator = function (n) { var i, r, t; switch (void 0 === n ? "undefined" : _typeof(n)) { case "string": return t = n.indexOf(":"), t > -1 ? (i = n.substring(0, t), r = n.substring(t + 1)) : i = n, this._buildValidator(i, r); case "function": return this._buildValidator(n); case "object": return this._buildValidator(n.type, n.parameters) } }, kt.prototype._buildValidator = function (n, t) { var i = "function" == typeof n ? n : this.validators[n]; return i ? { type: "function" == typeof n ? "function" : n, func: i, params: t } : (console.warn("Validator Setup Error - No matching validator found:", n), !1) }, kt.prototype.validate = function (n, t, i) { var f = this, r = [], u = this.invalidCells.indexOf(t); return n && n.forEach(function (n) { n.func.call(f, t.getComponent(), i, n.params) || r.push({ type: n.type, parameters: n.params }) }), r = !r.length || r, t.modules.validate || (t.modules.validate = {}), !0 === r ? (t.modules.validate.invalid = !1, t.getElement().classList.remove("tabulator-validation-fail"), u > -1 && this.invalidCells.splice(u, 1)) : (t.modules.validate.invalid = !0, "manual" !== this.table.options.validationMode && t.getElement().classList.add("tabulator-validation-fail"), -1 == u && this.invalidCells.push(t)), r }, kt.prototype.getInvalidCells = function () { var n = []; return this.invalidCells.forEach(function (t) { n.push(t.getComponent()) }), n }, kt.prototype.clearValidation = function (n) { var t; n.modules.validate && n.modules.validate.invalid && (n.getElement().classList.remove("tabulator-validation-fail"), n.modules.validate.invalid = !1, (t = this.invalidCells.indexOf(n)) > -1 && this.invalidCells.splice(t, 1)) }, kt.prototype.validators = { integer: function (n, t) { return "" === t || null === t || void 0 === t || "number" == typeof (t = Number(t)) && isFinite(t) && Math.floor(t) === t }, float: function (n, t) { return "" === t || null === t || void 0 === t || "number" == typeof (t = Number(t)) && isFinite(t) && t % 1 != 0 }, numeric: function (n, t) { return "" === t || null === t || void 0 === t || !isNaN(t) }, string: function (n, t) { return "" === t || null === t || void 0 === t || isNaN(t) }, max: function (n, t, i) { return "" === t || null === t || void 0 === t || parseFloat(t) <= i }, min: function (n, t, i) { return "" === t || null === t || void 0 === t || parseFloat(t) >= i }, starts: function (n, t, i) { return "" === t || null === t || void 0 === t || String(t).toLowerCase().startsWith(String(i).toLowerCase()) }, ends: function (n, t, i) { return "" === t || null === t || void 0 === t || String(t).toLowerCase().endsWith(String(i).toLowerCase()) }, minLength: function (n, t, i) { return "" === t || null === t || void 0 === t || String(t).length >= i }, maxLength: function (n, t, i) { return "" === t || null === t || void 0 === t || String(t).length <= i }, "in": function (n, t, i) { return "" === t || null === t || void 0 === t || ("string" == typeof i && (i = i.split("|")), "" === t || i.indexOf(t) > -1) }, regex: function (n, t, i) { return "" === t || null === t || void 0 === t || new RegExp(i).test(t) }, unique: function (n, t) { if ("" === t || null === t || void 0 === t) return !0; var i = !0, r = n.getData(), u = n.getColumn()._getSelf(); return this.table.rowManager.rows.forEach(function (n) { var f = n.getData(); f !== r && t == u.getFieldValue(f) && (i = !1) }), i }, required: function (n, t) { return "" !== t && null !== t && void 0 !== t } }, n.prototype.registerModule("validate", kt), n }); $(document).ready(function () { pangong(); $(document).on("click", "a.disabled,a:disabled", function () { return !1 }) }); $(window).on("load", function () { $(".preloader-it").delay(500).fadeOut("slow") }); var height, width, $wrapper = $(".biz-wrapper"), $nav = $(".biz-nav"), $vertnaltNav = $(".biz-wrapper.biz-vertical-nav,.biz-wrapper.biz-alt-nav"), $horizontalNav = $(".biz-wrapper.biz-horizontal-nav"), $navbar = $(".biz-navbar"), pangong = function () { var t, n, i, r, u; $(".custom-form-animation .form-control").focus(function () { $(this).parents(".custom-form-animation").addClass("focused") }); $(".custom-form-animation .form-control").attr("autocomplete", "off"); $(".custom-form-animation .form-control").blur(function () { var n = $(this).val(); n == "" && $(this).parents(".custom-form-animation").removeClass("focused") }); $(document).on("click", ".left-aside-togglable", function () { return $(".biz-bldr-wrap").toggleClass("bldr__aside__left__toggle"), !1 }); t = $(".counter-anim"); t.length > 0 && t.counterUp({ delay: 10, time: 1e3 }); n = ".biz-nav .navbar-nav li a"; $(document).on("click", n, function () { $(this).attr("aria-expanded") === "false" && $(this).blur(); $(this).parent().siblings().find(".collapse").collapse("hide"); $(this).parent().find(".collapse").collapse("hide") }); $(document).on("click", ".card-close", function () { return $(this).closest(".card").remove(), !1 }); $(document).on("show.bs.collapse", ".accordion .collapse", function () { $(this).siblings(".card-header").addClass("activestate") }); $(document).on("hide.bs.collapse", ".accordion .collapse", function () { $(this).siblings(".card-header").removeClass("activestate") }); n = ".biz-main-menu .navbar-nav li a,.nav-vertical li a"; $(document).on("click", n, function () { $(this).attr("aria-expanded") === "false" && $(this).blur(); $(this).parent().parent().siblings().find(".collapse").collapse("hide"); $(this).parent().siblings().find(".collapse").collapse("hide"); $(this).parent().find(".collapse").collapse("hide") }); $(document).on("click", ".biz__icon__menu .biz-main-menu .menu-content-wrap .nav-link", function () { $(this).parent().parent().find(".sunbnav-active").removeClass("sunbnav-active"); $(this).parent().addClass("sunbnav-active"); $wrapper.addClass("biz__submenu"); var n = $(this).attr("data-target"); $(".biz-submenu .subnav-list").removeClass("d-flex"); $(".biz-submenu").find(n).addClass("d-flex") }); $(document).on("click", "#pane_toggle_btn", function () { $wrapper.toggleClass("biz__submenu"); $(window).trigger("resize"); return }); $(document).on("click", "#close_pane", function () { $(".biz__icon__menu .biz-main-menu .navbar-nav").find(".sunbnav-active").removeClass("sunbnav-active"); $wrapper.removeClass("biz__submenu") }); n = ".biz-submenu .navbar-nav li a"; $(document).on("click", n, function () { $(this).attr("aria-expanded") === "false" && $(this).blur(); $(this).parent().siblings().find(".collapse").collapse("hide"); $(this).parent().find(".collapse").collapse("hide") }); $(document).on("click", ".btn-search-toggle", function () { return $(this).closest(".nav-header").find(".collapse").collapse("toggle"), !1 }); $(document).on("input", ".nav-search input", function () { return !$(this).val().length == 0 ? ($(this).closest(".input-group").find(".feather-icon.clear-search").show(), $(this).closest(".input-group").find(".feather-icon.icon-search").hide()) : ($(this).closest(".input-group").find(".feather-icon.clear-search").hide(), $(this).closest(".input-group").find(".feather-icon.icon-search").show()), !1 }); $(document).on("click", ".nav-search .feather-icon.clear-search", function () { return $(this).closest(".nav-header").find("input").val(""), $(this).closest(".input-group").find(".feather-icon.icon-search").show(), $(this).hide(), !1 }); $(document).on("click", ".nav-search .feather-icon.close-search", function () { return $(this).closest(".header-wth-search").find(".nav-search").fadeOut(), $(this).closest(".header-wth-search").find(".nav-header-text").css({ opacity: "1", "pointer-events": "auto" }), !1 }); $(document).on("click", ".header-wth-search .btn-search-toggle", function () { $(this).closest(".nav-header").find("input").val(""); $(this).closest(".nav-header").find(".feather-icon.clear-search").hide(); $(this).closest(".header-wth-search").find(".feather-icon.icon-search").show(); $(this).closest(".header-wth-search").find(".nav-header-text").css({ opacity: "0", "pointer-events": "none" }); $(this).closest(".header-wth-search").find(".nav-search").fadeIn(); $(this).closest(".header-wth-search").find(".nav-search input").focus() }); $(document).on("click", ".drawer-toggle-link", function () { $(".biz-wrapper2").addClass("biz-drawer-push biz-drawer-pushright"); var n = $(this).attr("data-target"); return $(this).addClass("active"), $(".hk-drawer").css({ "box-shadow": "none" }), $(".biz-drawer").removeClass("biz-drawer-toggle"), $wrapper.remove(".biz-drawer-backdrop"), $wrapper.removeClass(function (n, t) { return (t.match(/biz-drawer-\S+/g) || []).join(" ") }), $(this).attr("data-drawer") == "push-normal" ? $(n).hasClass("drawer-left") ? $wrapper.addClass("biz-drawer-push biz-drawer-pushleft") : $wrapper.addClass("biz-drawer-push biz-drawer-pushright") : $(this).attr("data-drawer") == "push-wth-nav" ? $(n).hasClass("drawer-left") ? $wrapper.addClass("biz-drawer-push biz-drawer-wth-nav-push biz-drawer-pushleft") : $wrapper.addClass("biz-drawer-push biz-drawer-wth-nav-push biz-drawer-pushright") : $(this).attr("data-drawer") == "overlay" && ($(n).css({ border: "none", "box-shadow": "0 8px 32px rgba(0, 0, 0, 0.1)" }), $(this).attr("data-backdrop") == "" && $wrapper.append('<div class="biz-drawer-backdrop"><\/div>')), $(n).addClass("biz-drawer-toggle"), $("#biz-wrapper").addClass("biz-drawer-pushright"), $("#drawer_push").addClass("biz-drawer-toggle"), !1 }); $(document).on("click", ".biz-drawer-backdrop", function () { return $(this).remove(), $(".hk-drawer").css({ "box-shadow": "none" }), $(".biz-drawer").removeClass("biz-drawer-toggle"), $wrapper.removeClass(function (n, t) { return (t.match(/biz-drawer-\S+/g) || []).join(" ") }), !1 }); $(document).on("click", ".drawer-close", function () { return $(".biz-wrapper2").removeClass("biz-drawer-push biz-drawer-pushright"), $(this).closest(".biz-drawer").css({ "box-shadow": "none" }), $(".bldr-body").removeClass("biz-body-margin-right"), $(".biz-drawer-backdrop").remove(), $(this).closest(".biz-drawer").removeClass("biz-drawer-toggle"), $wrapper.removeClass(function (n, t) { return (t.match(/biz-drawer-\S+/g) || []).join(" ") }), !1 }); $(document).on("click", ".drawer-close", function () { var n = $(this).closest(".biz-drawer").attr("id"); return $('[data-target="#' + n + '"]').removeClass("active"), $("#biz-wrapper").removeClass("biz-drawer-pushright"), !1 }); $(document).on("click", "#settings_toggle_btn", function () { return $wrapper.toggleClass("biz-settings-toggle"), !1 }); $(document).on("click", "#settings_panel_close", function () { return $wrapper.removeClass("biz-settings-toggle"), !1 }); $(document).on("click", "#nav_light_select", function () { return $nav.removeClass("biz-menu-dark").addClass("biz-menu-light"), !1 }); $(document).on("click", "#nav_dark_select", function () { return $nav.removeClass("biz-menu-light").addClass("biz-menu-dark"), !1 }); $(document).on("click", "#nav_light_select,#nav_dark_select", function () { return $(".biz-nav-select").find(".btn").removeClass("btn-outline-primary").addClass("btn-outline-light"), $(this).removeClass("btn-outline-light").addClass("btn-outline-primary").blur(), !1 }); $(document).on("click", "#navtop_light_select,#navtop_dark_select", function () { return $(".biz-navbar-select").find(".btn").removeClass("btn-outline-primary").addClass("btn-outline-light"), $(this).removeClass("btn-outline-light").addClass("btn-outline-primary").blur(), !1 }); $(document).on("click", "#navtop_light_select", function () { return $navbar.removeClass("navbar-dark").addClass("navbar-light").find("img.brand-img").attr("src", "dist/img/logo-light.png"), !1 }); $(document).on("click", "#navtop_dark_select", function () { return $navbar.removeClass("navbar-light").addClass("navbar-dark").find("img.brand-img").attr("src", "dist/img/logo-dark.png"), !1 }); if ($(".scroll-nav-switch").length > 0) { $(".scroll-nav-switch").toggles({ drag: !0, click: !0, text: { on: "", off: "" }, on: !1, animate: 250, easing: "swing", checkbox: null, clicker: null, type: "compact" }); $(".scroll-nav-switch.toggle").on("toggle", function (n, t) { t ? $wrapper.addClass("scrollable-nav") : $wrapper.removeClass("scrollable-nav") }) } i = $(".biz-navbar").hasClass("navbar-dark"); r = $(".biz-nav").hasClass("biz-menu-dark"); $(document).on("click", "#reset_settings", function () { return i ? $("#navtop_dark_select").click() : $("#navtop_light_select").click(), r ? $("#nav_dark_select").click() : $("#nav_light_select").click(), $(".scroll-nav-switch").click(), $(".scroll-nav-switch").find(".toggle-on").hasClass("active") && $(".scroll-nav-switch").click(), !1 }); $(document).on("click", "#navbar_search_btn", function () { $("html,body").animate({ scrollTop: 0 }, "slow"); $(".navbar-search input").focus(); $wrapper.addClass("navbar-search-toggle"); $(window).trigger("resize") }); $(document).on("click", "#navbar_search_close", function () { return $wrapper.removeClass("navbar-search-toggle"), $(window).trigger("resize"), !1 }); $(".nicescroll-bar").length > 0 && $(".nicescroll-bar").slimscroll({ height: "100%", color: "#d6d9da", disableFadeOut: !0, borderRadius: 0, size: "6px", enableKeyNavigation: !0, opacity: .8 }); $(document).on("click", '[data-target="adj_drawer_1"]', function () { $(".nicescroll-bar").length > 0 && $(".nicescroll-bar").slimscroll({ height: "100%", color: "#d6d9da", disableFadeOut: !0, borderRadius: 0, size: "6px", enableKeyNavigation: !0, opacity: .8 }) }); $(".slimScrollDiv").hover(function () { $(this).find('[class*="nicescroll-bar"]').focus() }, function () { $(this).find('[class*="nicescroll-bar"]').blur() }); u = ".refresh"; $(document).on("click", u, function () { var n = $(this).closest(".card").find(".refresh-container"), i = $(this).closest(".card").find(".panel-wrapper"), t = n.find(".la-anim-1"); return n.show(), setTimeout(function () { t.addClass("la-animate") }, 100), setTimeout(function () { n.fadeOut(800); setTimeout(function () { t.removeClass("la-animate") }, 800) }, 1500), !1 }); $(document).on("click", ".full-screen", function () { return $(this).parents(".card").toggleClass("fullscreen"), $(window).trigger("resize"), !1 }); $(document).on("click", ".multi-sel > li,.multi-sel > div", function () { return $(this).hasClass("selected") ? $(this).removeClass("selected") : $(this).addClass("selected"), !1 }); $(document).on("click", ".dataset-list-wrap #modalDataListItems .nav-item", function () { return $(this).closest(".biz-new-report").find(".columns-list-wrap").addClass("active"), !1 }); $(document).on("click", ".close-columns-list", function () { return $(this).closest(".columns-list-wrap").removeClass("active"), !1 }); $(document).on("click", ".save-draft", function () { $.notify({ icon: "ri-checkbox-line font-21 mr-10", message: "Report Saved in Draft" }, { type: "dismissible alert alert-inv alert-inv-primary", placement: { from: "top", align: "right" }, animate: { enter: "animated fadeInUp", exit: "animated fadeOutUp" }, delay: 5e5 }) }); $(document).on("click", ".add-sub-report", function () { return $(this).closest(".modal-content").find(".modal-body").append('<div class="sub-report-block card"><header class="sub-report-head"><h6 class="required">Sub report<\/h6><i class="las la-braille dragger"><\/i><\/header><div class="report-body"><div class="form-group"><select class="form-control custom-select mb-10"><option selected>- Choose -<\/option><option value="1">Two<\/option><option value="2">Three<\/option><\/select><div class="repeater"><div data-repeater-list="category-group"><div class="form-row"><div class="col"><select class="form-control custom-select mb-10"><option selected>Main report column<\/option><option value="1">Two<\/option><option value="2">Three<\/option><\/select><\/div><div class="col-auto"><select class="form-control custom-select mb-10"><option value="1" selected>=<\/option><option value="2">Three<\/option><\/select><\/div><div class="col"><select class="form-control custom-select mb-10"><option selected>Sub report column<\/option><option value="1">Two<\/option><option value="2">Three<\/option><\/select><\/div><div class="col-auto"><button class="btn btn-icon btn-theme" data-repeater-create><span class="btn-icon-wrap"><span class="feather-icon"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-plus"><line x1="12" y1="5" x2="12" y2="19"><\/line><line x1="5" y1="12" x2="19" y2="12"><\/line><\/svg><\/span><\/span><\/button><\/div><\/div><div data-repeater-item class="form-row"><div class="col"><input type="text" class="form-control mb-2" value="Main report column=Sub report column"><\/div><div class="col-auto"><a href="#" data-repeater-delete class="btn btn-icon btn-flush-danger flush-soft-hover btn-rounded"><span class="btn-icon-wrap"><span class="feather-icon"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-trash-2"><polyline points="3 6 5 6 21 6"><\/polyline><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"><\/path><line x1="10" y1="11" x2="10" y2="17"><\/line><line x1="14" y1="11" x2="14" y2="17"><\/line><\/svg><\/span><\/span><\/a><\/div><\/div><\/div><\/div><\/div><\/div><\/div>'), !1 }); $(document).on("click", ".delete-report", function () { $(this).closest(".sub-report-block").remove() }); $(document).on("click", ".biz-adj-drawer-wrap > .adj-drawer-open", function () { $(this).closest(".biz-adj-drawer-wrap").find(".biz-adj-drawer").hide(); var n = $(this).attr("data-target"), t = $(".bldr-aside-left").width(), i = $(".adj-drawer-open").attr("data-clickevent"); $(this).closest(".biz-adj-drawer-wrap").find("#" + n).css({ left: t }).show() }); $(document).on("click", ".biz-adj-drawer-wrap > .adj-drawer-open-parameters", function () { $(this).closest(".biz-adj-drawer-wrap").find(".biz-adj-drawer").hide(); var n = $(this).attr("data-target"); $(".drawer-header > .drawer-close.close").addClass("hidden"); $(this).closest(".biz-adj-drawer-wrap").find("#" + n).css({ left: "0%", right: "0%" }).show() }); $(document).on("click", ".btn-adj-drawer-close", function () { $(".drawer-header > .drawer-close.close").removeClass("hidden"); $(this).closest(".biz-adj-drawer").hide() }); $(document).on("click", ".biz-mini-adj-drawer-wrap > .adj-drawer-open", function () { $(this).closest(".biz-mini-adj-drawer-wrap").find(".biz-mini-adj-drawer").hide(); var n = $(this).attr("data-target"), t = $(this).offset().top, i = $(".bldr-aside-left").width(), r = $(this).closest(".biz-mini-adj-drawer-wrap").find("#" + n).height(); t + r > height ? $(this).closest(".biz-mini-adj-drawer-wrap").find("#" + n).css({ top: "auto", bottom: 0, left: i }).show() : $(this).closest(".biz-mini-adj-drawer-wrap").find("#" + n).css({ top: t, bottom: "auto", left: i }).show() }); $(document).on("click", ".btn-mini-drawer-close", function () { $(this).closest(".biz-mini-adj-drawer").hide() }); $(document).on("click", ".dsl-block-wrap .dsl-block .dsl-block-close", function () { $(this).closest(".dsl-block").remove() }); dragula([document.getElementById("sub_report")], { moves: function (n, t, i) { return i.classList.contains("sub-report-head") } }); dragula([document.getElementById("tab_front")], { moves: function (n, t, i) { return i.classList.contains("sec-block-head") } }); dragula([document.getElementById("sfl_1")], { moves: function (n, t, i) { return i.classList.contains("dragger") } }); dragula([document.getElementById("sfl_2")], { moves: function (n, t, i) { return i.classList.contains("dragger") } }); dragula([document.getElementById("sfl_3")], { moves: function (n, t, i) { return i.classList.contains("dragger") } }); dragula([document.getElementById("sfl_4")], { moves: function (n, t, i) { return i.classList.contains("dragger") } }); dragula([document.getElementById("sfl_5")], { moves: function (n, t, i) { return i.classList.contains("dragger") } }); dragula([document.getElementById("sfl_6")], { moves: function (n, t, i) { return i.classList.contains("dragger") } }); dragula([document.getElementById("sfl_7")], { moves: function (n, t, i) { return i.classList.contains("dragger") } }); dragula([document.getElementById("sfl_8")], { moves: function (n, t, i) { return i.classList.contains("dragger") } }); dragula([document.getElementById("sfl_9")], { moves: function (n, t, i) { return i.classList.contains("dragger") } }); $(document).on("click", "#headerLinkReportIcon", function () { dragula([document.getElementById("linkreport_modal")], { moves: function (n, t, i) { return i.classList.contains("sub-report-head") } }) }); dragula([document.getElementById("tab_front")], { moves: function (n, t, i) { return i.classList.contains("sec-block-head") } }); $(document).on("click", "#groupby_selected_columns", function () { dragula([document.getElementById("groupby_selected_columns")], { moves: function (n, t, i) { return i.classList.contains("dragger") } }) }); $(document).on("click", "#categories_selected_columns", function () { dragula([document.getElementById("categories_selected_columns")], { moves: function (n, t, i) { return i.classList.contains("dragger") } }) }); $(document).on("click", "#xaxis_selected_columns", function () { dragula([document.getElementById("xaxis_selected_columns")], { moves: function (n, t, i) { return i.classList.contains("dragger") } }) }); $(document).on("click", "#yaxis_selected_columns", function () { dragula([document.getElementById("yaxis_selected_columns")], { moves: function (n, t, i) { return i.classList.contains("dragger") } }) }); $(document).on("click", "#selectedColumns", function () { dragula([document.getElementById("selectedColumns")], { moves: function (n, t, i) { return i.classList.contains("dragger") } }) }); $(document).on("click", "#tooltip_selected_columns", function () { dragula([document.getElementById("tooltip_selected_columns")], { moves: function (n, t, i) { return i.classList.contains("dragger") } }) }); $(document).on("click", ".color-board .color-block", function () { return $(this).closest(".color-board").find(".color-block").removeClass("selected"), $(this).addClass("selected"), !1 }); $(document).on("click", ".qry-builder-open", function () { return $(".qry-builder-container").show(), !1 }); $(document).on("click", ".qry-builder-container header .close", function () { return $(".qry-builder-container").hide(), !1 }); $(document).on("click", ".right-aside-togglable", function () { return $(".biz-bldr-wrap").toggleClass("bldr__aside__right__toggle"), $(".biz-wrapper").toggleClass("bldr__aside__right__toggle"), $(".biz-wrapper .bldr-aside-right").toggleClass("biz-aside-margin-right"), $(".bldr-body").toggleClass("biz-body-margin-right"), !1 }); $(document).on("click", ".inline-edit .inline-edit-btn", function () { $(this).closest(".inline-edit").find(".edit").attr("contenteditable", "true").focus(); $(this).closest(".inline-edit").find(".edit").css("outline", "none") }); $(document).on("focusout", ".inline-edit .edit", function () { $(this).attr("contenteditable", "false") }); $(document).on("click", "#tooltip_selected_columns .inline-edit .inline-edit-btn", function () { $(this).closest(".inline-edit").find(".edit").removeAttr("disabled"); $(this).closest(".inline-edit").find(".edit").addClass("input-styles"); $(this).closest(".inline-edit").find(".reset-text").removeClass("hidden") }); $(document).on("click", "#tooltip_selected_columns .inline-edit .reset-text", function () { $(this).closest(".inline-edit").find(".edit").attr("disabled", !0); $(this).closest(".inline-edit").find(".edit").removeClass("input-styles"); $(this).addClass("hidden") }); $(".dropdown-menu > .inner-dropdown-menu.dropdown > a").addClass("dropdown-toggle"); $(".dropdown-menu a.dropdown-toggle").on("click", function () { $(this).next().hasClass("show") || $(this).parents(".dropdown-menu").first().find(".show").removeClass("show"); var n = $(this).next(".dropdown-menu"); n.toggleClass("show"); $(this).parents("li.nav-item.dropdown.show").on("hidden.bs.dropdown", function () { $(".dropdown-menu > .dropdown .show").removeClass("show") }); return !1 }); $(document).on("click", ".coupon-modal-open", function () { var n = $(this).attr("data-target"); return $(".timeline-wrap").addClass("d-none"), $(n).addClass("d-block"), !1 }); $(document).on("click", ".coupon-modal-close", function () { return $(".timeline-wrap").removeClass("d-none"), $(this).closest(".coupon-modal").removeClass("d-block"), !1 }) }, setHeightWidth = function () { height = window.innerHeight; width = window.innerWidth; width > 1200 ? $(".biz__icon__menu").hasClass("biz__nav__toggle") && $(".biz__icon__menu").removeClass("biz__nav__toggle") : $(".biz__icon__menu").addClass("biz__submenu"); $(function () { $(window).width() < 1200 && $(".biz-wrapper2 .drawer-close").trigger("click") }); width < 1200 ? ($wrapper.removeClass(function (n, t) { return (t.match(/biz-drawer-\S+/g) || []).join(" ") }), $(".biz-drawer").removeClass("biz-drawer-toggle"), $(".drawer-toggle-link").removeClass("active")) : $("#form-builder-container .right-toggle-link").trigger("click") }; $(window).on("resize", function () { setHeightWidth() }); $(window).trigger("resize"); $(document).on("click", ".dsl-sec-block-wrap .dsl-block", function () { var n = this.hash; $(this).hasClass("focused-block") ? ($(this).removeClass("focused-block"), $(n).removeClass("focused")) : ($(".dsl-sec-block-wrap .dsl-block").removeClass("focused-block"), $(this).addClass("focused-block"), $(".form-sec-wrap").removeClass("focused"), $(n).addClass("focused")) }); $(document).on("click", ".dsl-doc-type-wrap .dsl-block.selected", function () { var n = $(this).attr("data-target"); return console.log(n), $(this).hasClass("focused-block") ? ($(this).removeClass("focused-block"), $(n).removeClass("focused")) : ($(".dsl-doc-type-wrap .dsl-block.selected").removeClass("focused-block"), $(this).addClass("focused-block"), $(".PropertyText").removeClass("focused"), $(n).addClass("focused")), !1 }); $(document).on("click", ".doc-type-close", function () { return $(this).closest(".form-group").parent().remove(), !1 }); $(document).on("click", ".default-doc-type", function () { $(".already-created-doc").removeClass("default-doc"); $(this).closest(".already-created-doc").addClass("default-doc") }); idCount = 0; $(".dsl-doc-type-wrap .dsl-block").each(function () { $(this).attr("id", "doc_type_block_" + idCount); idCount++ }); dragula([document.getElementById("drag_elements"), document.getElementById("drop_elements"), document.getElementById("drop_elements_2"), document.getElementById("drop_elements_3"), document.getElementById("drop_elements_4"), document.getElementById("drop_elements_5")], { copy: function (n, t) { return t === document.getElementById("drag_elements") }, accepts: function (n, t) { return t !== document.getElementById("drag_elements") }, moves: function (n, t, i) { return i.classList.contains("dragger") } }).on("drop", function (n, t) { hasClass(n, "dsl-block") && $("#" + n.id).addClass("selected"); $(".form-sec-block .dsl-block").length > 0 && $("#" + t.id).append('<div class="col-lg-4"><div class="form-group form-name"><div><div class="form-label-group"> <label> <span class="required"> ' + $(".form-sec-block .row").find(".dsl-block-name").text() + ' <\/span> <\/label><div class="form-group-action"> <a class="btn btn-xs btn-icon btn-flush-dark btn-rounded flush-soft-hover" href="#"><span class="btn-icon-wrap"><span class="feather-icon"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-edit"><path d="M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"><\/path><path d="M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"><\/path><\/svg><\/span><\/span><\/a> <a class="btn btn-xs btn-icon btn-flush-dark btn-rounded flush-soft-hover doc-type-close" href="#"><span class="btn-icon-wrap"><span class="feather-icon"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-x-circle"><circle cx="12" cy="12" r="10"><\/circle><line x1="15" y1="9" x2="9" y2="15"><\/line><line x1="9" y1="9" x2="15" y2="15"><\/line><\/svg><\/span><\/span><\/a><\/div><\/div> <input type="text" class="form-control"><\/div><\/div><\/div>'); $(".form-sec-block .row").find(".dsl-block").remove() }); dragula([document.getElementById("drag_elements_2"), document.getElementById("drop_elements"), document.getElementById("drop_elements_2"), document.getElementById("drop_elements_3"), document.getElementById("drop_elements_4"), document.getElementById("drop_elements_5")], { copy: function (n, t) { return t === document.getElementById("drag_elements_2") }, accepts: function (n, t) { return t !== document.getElementById("drag_elements_2") }, moves: function (n, t, i) { return i.classList.contains("dragger") } }).on("drop", function (n, t) { hasClass(n, "dsl-block") && $("#" + n.id).addClass("selected"); $(".form-sec-block .dsl-block").length > 0 && $("#" + t.id).append('<div class="col-lg-4"><div class="form-group form-name"><div><div class="form-label-group"> <label> <span class="required"> ' + $(".form-sec-block .row").find(".dsl-block-name").text() + ' <\/span> <\/label><div class="form-group-action"> <a class="btn btn-xs btn-icon btn-flush-dark btn-rounded flush-soft-hover" href="#"><span class="btn-icon-wrap"><span class="feather-icon"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-edit"><path d="M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"><\/path><path d="M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"><\/path><\/svg><\/span><\/span><\/a> <a class="btn btn-xs btn-icon btn-flush-dark btn-rounded flush-soft-hover doc-type-close" href="#"><span class="btn-icon-wrap"><span class="feather-icon"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-x-circle"><circle cx="12" cy="12" r="10"><\/circle><line x1="15" y1="9" x2="9" y2="15"><\/line><line x1="9" y1="9" x2="15" y2="15"><\/line><\/svg><\/span><\/span><\/a><\/div><\/div> <input type="text" class="form-control"><\/div><\/div><\/div>'); $(".form-sec-block .row").find(".dsl-block").remove() }); dragula([document.getElementById("drag_elements_3"), document.getElementById("drop_elements"), document.getElementById("drop_elements_2"), document.getElementById("drop_elements_3"), document.getElementById("drop_elements_4"), document.getElementById("drop_elements_5")], { copy: function (n, t) { return t === document.getElementById("drag_elements_3") }, accepts: function (n, t) { return t !== document.getElementById("drag_elements_3") }, moves: function (n, t, i) { return i.classList.contains("dragger") } }).on("drop", function (n, t) { hasClass(n, "dsl-block") && $("#" + n.id).addClass("selected"); $(".form-sec-block .dsl-block").length > 0 && $("#" + t.id).append('<div class="col-lg-4"><div class="form-group"><div><div class="form-label-group"> <label> <span class="required"> ' + $(".form-sec-block .row").find(".dsl-block-name").text() + ' <\/span> <\/label><div class="form-group-action"> <a class="btn btn-xs btn-icon btn-flush-dark btn-rounded flush-soft-hover" href="#"><span class="btn-icon-wrap"><span class="feather-icon"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-edit"><path d="M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"><\/path><path d="M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"><\/path><\/svg><\/span><\/span><\/a> <a class="btn btn-xs btn-icon btn-flush-dark btn-rounded flush-soft-hover doc-type-close" href="#"><span class="btn-icon-wrap"><span class="feather-icon"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-x-circle"><circle cx="12" cy="12" r="10"><\/circle><line x1="15" y1="9" x2="9" y2="15"><\/line><line x1="9" y1="9" x2="15" y2="15"><\/line><\/svg><\/span><\/span><\/a><\/div><\/div> <input type="text" class="form-control"><\/div><\/div><\/div>'); $(".form-sec-block .row").find(".dsl-block").remove() }); dragula([document.getElementById("drop_elements"), document.getElementById("drop_elements_2"), document.getElementById("drop_elements_3"), document.getElementById("drop_elements_4"), document.getElementById("drop_elements_5")]);
  616. /*!
  617. * Datepicker for Bootstrap v1.9.0 (https://github.com/uxsolutions/bootstrap-datepicker)
  618. *
  619. * Licensed under the Apache License v2.0 (http://www.apache.org/licenses/LICENSE-2.0)
  620. */
  621. !function (n) { "function" == typeof define && define.amd ? define(["jquery"], n) : n("object" == typeof exports ? require("jquery") : jQuery) }(function (n, t) { function f() { return new Date(Date.UTC.apply(Date, arguments)) } function o() { var n = new Date; return f(n.getFullYear(), n.getMonth(), n.getDate()) } function l(n, t) { return n.getUTCFullYear() === t.getUTCFullYear() && n.getUTCMonth() === t.getUTCMonth() && n.getUTCDate() === t.getUTCDate() } function h(i, r) { return function () { return r !== t && n.fn.datepicker.deprecated(r), this[i].apply(this, arguments) } } function p(n) { return n && !isNaN(n.getTime()) } function w(t, i) { function o(n, t) { return t.toLowerCase() } var u, f = n(t).data(), e = {}, s = new RegExp("^" + i.toLowerCase() + "([A-Z])"), r; i = new RegExp("^" + i.toLowerCase()); for (r in f) i.test(r) && (u = r.replace(s, o), e[u] = f[r]); return e } function b(t) { var u = {}, i; if (r[t] || (t = t.split("-")[0], r[t])) return i = r[t], n.each(y, function (n, t) { t in i && (u[t] = i[t]) }), u } var a = function () { var t = { get: function (n) { return this.slice(n)[0] }, contains: function (n) { for (var i = n && n.valueOf(), t = 0, r = this.length; t < r; t++)if (0 <= this[t].valueOf() - i && this[t].valueOf() - i < 864e5) return t; return -1 }, remove: function (n) { this.splice(n, 1) }, replace: function (t) { t && (n.isArray(t) || (t = [t]), this.clear(), this.push.apply(this, t)) }, clear: function () { this.length = 0 }, copy: function () { var n = new a; return n.replace(this), n } }; return function () { var i = []; return i.push.apply(i, arguments), n.extend(i, t), i } }(), u = function (t, r) { n.data(t, "datepicker", this); this._events = []; this._secondaryEvents = []; this._process_options(r); this.dates = new a; this.viewDate = this.o.defaultViewDate; this.focusDate = null; this.element = n(t); this.isInput = this.element.is("input"); this.inputField = this.isInput ? this.element : this.element.find("input"); this.component = !!this.element.hasClass("date") && this.element.find(".add-on, .input-group-addon, .input-group-append, .input-group-prepend, .btn"); this.component && 0 === this.component.length && (this.component = !1); this.isInline = !this.component && this.element.is("div"); this.picker = n(i.template); this._check_template(this.o.templates.leftArrow) && this.picker.find(".prev").html(this.o.templates.leftArrow); this._check_template(this.o.templates.rightArrow) && this.picker.find(".next").html(this.o.templates.rightArrow); this._buildEvents(); this._attachEvents(); this.isInline ? this.picker.addClass("datepicker-inline").appendTo(this.element) : this.picker.addClass("datepicker-dropdown dropdown-menu"); this.o.rtl && this.picker.addClass("datepicker-rtl"); this.o.calendarWeeks && this.picker.find(".datepicker-days .datepicker-switch, thead .datepicker-title, tfoot .today, tfoot .clear").attr("colspan", function (n, t) { return Number(t) + 1 }); this._process_options({ startDate: this._o.startDate, endDate: this._o.endDate, daysOfWeekDisabled: this.o.daysOfWeekDisabled, daysOfWeekHighlighted: this.o.daysOfWeekHighlighted, datesDisabled: this.o.datesDisabled }); this._allow_update = !1; this.setViewMode(this.o.startView); this._allow_update = !0; this.fillDow(); this.fillMonths(); this.update(); this.isInline && this.show() }, c, v, s, e, y, r, i; u.prototype = { constructor: u, _resolveViewName: function (t) { return n.each(i.viewModes, function (i, r) { if (t === i || -1 !== n.inArray(t, r.names)) return t = i, !1 }), t }, _resolveDaysOfWeek: function (t) { return n.isArray(t) || (t = t.split(/[,\s]*/)), n.map(t, Number) }, _check_template: function (i) { try { return i === t || "" === i ? !1 : (i.match(/[<>]/g) || []).length <= 0 ? !0 : n(i).length > 0 } catch (n) { return !1 } }, _process_options: function (t) { var u, h, l, s, c; if (this._o = n.extend({}, this._o, t), u = this.o = n.extend({}, this._o), h = u.language, r[h] || (h = h.split("-")[0], r[h] || (h = e.language)), u.language = h, u.startView = this._resolveViewName(u.startView), u.minViewMode = this._resolveViewName(u.minViewMode), u.maxViewMode = this._resolveViewName(u.maxViewMode), u.startView = Math.max(this.o.minViewMode, Math.min(this.o.maxViewMode, u.startView)), !0 !== u.multidate && (u.multidate = Number(u.multidate) || !1, !1 !== u.multidate && (u.multidate = Math.max(0, u.multidate))), u.multidateSeparator = String(u.multidateSeparator), u.weekStart %= 7, u.weekEnd = (u.weekStart + 6) % 7, l = i.parseFormat(u.format), u.startDate !== -1 / 0 && (u.startDate = u.startDate ? u.startDate instanceof Date ? this._local_to_utc(this._zero_time(u.startDate)) : i.parseDate(u.startDate, l, u.language, u.assumeNearbyYear) : -1 / 0), u.endDate !== 1 / 0 && (u.endDate = u.endDate ? u.endDate instanceof Date ? this._local_to_utc(this._zero_time(u.endDate)) : i.parseDate(u.endDate, l, u.language, u.assumeNearbyYear) : 1 / 0), u.daysOfWeekDisabled = this._resolveDaysOfWeek(u.daysOfWeekDisabled || []), u.daysOfWeekHighlighted = this._resolveDaysOfWeek(u.daysOfWeekHighlighted || []), u.datesDisabled = u.datesDisabled || [], n.isArray(u.datesDisabled) || (u.datesDisabled = u.datesDisabled.split(",")), u.datesDisabled = n.map(u.datesDisabled, function (n) { return i.parseDate(n, l, u.language, u.assumeNearbyYear) }), s = String(u.orientation).toLowerCase().split(/\s+/g), c = u.orientation.toLowerCase(), s = n.grep(s, function (n) { return /^auto|left|right|top|bottom$/.test(n) }), u.orientation = { x: "auto", y: "auto" }, c && "auto" !== c) if (1 === s.length) switch (s[0]) { case "top": case "bottom": u.orientation.y = s[0]; break; case "left": case "right": u.orientation.x = s[0] } else c = n.grep(s, function (n) { return /^left|right$/.test(n) }), u.orientation.x = c[0] || "auto", c = n.grep(s, function (n) { return /^top|bottom$/.test(n) }), u.orientation.y = c[0] || "auto"; if (u.defaultViewDate instanceof Date || "string" == typeof u.defaultViewDate) u.defaultViewDate = i.parseDate(u.defaultViewDate, l, u.language, u.assumeNearbyYear); else if (u.defaultViewDate) { var a = u.defaultViewDate.year || (new Date).getFullYear(), v = u.defaultViewDate.month || 0, y = u.defaultViewDate.day || 1; u.defaultViewDate = f(a, v, y) } else u.defaultViewDate = o() }, _applyEvents: function (n) { for (var f, r, u, i = 0; i < n.length; i++)f = n[i][0], 2 === n[i].length ? (r = t, u = n[i][1]) : 3 === n[i].length && (r = n[i][1], u = n[i][2]), f.on(u, r) }, _unapplyEvents: function (n) { for (var f, r, u, i = 0; i < n.length; i++)f = n[i][0], 2 === n[i].length ? (u = t, r = n[i][1]) : 3 === n[i].length && (u = n[i][1], r = n[i][2]), f.off(r, u) }, _buildEvents: function () { var t = { keyup: n.proxy(function (t) { -1 === n.inArray(t.keyCode, [27, 37, 39, 38, 40, 32, 13, 9]) && this.update() }, this), keydown: n.proxy(this.keydown, this), paste: n.proxy(this.paste, this) }; !0 === this.o.showOnFocus && (t.focus = n.proxy(this.show, this)); this._events = this.isInput ? [[this.element, t]] : this.component && this.inputField.length ? [[this.inputField, t], [this.component, { click: n.proxy(this.show, this) }]] : [[this.element, { click: n.proxy(this.show, this), keydown: n.proxy(this.keydown, this) }]]; this._events.push([this.element, "*", { blur: n.proxy(function (n) { this._focused_from = n.target }, this) }], [this.element, { blur: n.proxy(function (n) { this._focused_from = n.target }, this) }]); this.o.immediateUpdates && this._events.push([this.element, { "changeYear changeMonth": n.proxy(function (n) { this.update(n.date) }, this) }]); this._secondaryEvents = [[this.picker, { click: n.proxy(this.click, this) }], [this.picker, ".prev, .next", { click: n.proxy(this.navArrowsClick, this) }], [this.picker, ".day:not(.disabled)", { click: n.proxy(this.dayCellClick, this) }], [n(window), { resize: n.proxy(this.place, this) }], [n(document), { "mousedown touchstart": n.proxy(function (n) { this.element.is(n.target) || this.element.find(n.target).length || this.picker.is(n.target) || this.picker.find(n.target).length || this.isInline || this.hide() }, this) }]] }, _attachEvents: function () { this._detachEvents(); this._applyEvents(this._events) }, _detachEvents: function () { this._unapplyEvents(this._events) }, _attachSecondaryEvents: function () { this._detachSecondaryEvents(); this._applyEvents(this._secondaryEvents) }, _detachSecondaryEvents: function () { this._unapplyEvents(this._secondaryEvents) }, _trigger: function (t, r) { var u = r || this.dates.get(-1), f = this._utc_to_local(u); this.element.trigger({ type: t, date: f, viewMode: this.viewMode, dates: n.map(this.dates, this._utc_to_local), format: n.proxy(function (n, t) { 0 === arguments.length ? (n = this.dates.length - 1, t = this.o.format) : "string" == typeof n && (t = n, n = this.dates.length - 1); t = t || this.o.format; var r = this.dates.get(n); return i.formatDate(r, t, this.o.language) }, this) }) }, show: function () { if (!(this.inputField.is(":disabled") || this.inputField.prop("readonly") && !1 === this.o.enableOnReadonly)) return this.isInline || this.picker.appendTo(this.o.container), this.place(), this.picker.show(), this._attachSecondaryEvents(), this._trigger("show"), (window.navigator.msMaxTouchPoints || "ontouchstart" in document) && this.o.disableTouchKeyboard && n(this.element).blur(), this }, hide: function () { return this.isInline || !this.picker.is(":visible") ? this : (this.focusDate = null, this.picker.hide().detach(), this._detachSecondaryEvents(), this.setViewMode(this.o.startView), this.o.forceParse && this.inputField.val() && this.setValue(), this._trigger("hide"), this) }, destroy: function () { return this.hide(), this._detachEvents(), this._detachSecondaryEvents(), this.picker.remove(), delete this.element.data().datepicker, this.isInput || delete this.element.data().date, this }, paste: function (t) { var i; if (t.originalEvent.clipboardData && t.originalEvent.clipboardData.types && -1 !== n.inArray("text/plain", t.originalEvent.clipboardData.types)) i = t.originalEvent.clipboardData.getData("text/plain"); else { if (!window.clipboardData) return; i = window.clipboardData.getData("Text") } this.setDate(i); this.update(); t.preventDefault() }, _utc_to_local: function (n) { if (!n) return n; var t = new Date(n.getTime() + 6e4 * n.getTimezoneOffset()); return t.getTimezoneOffset() !== n.getTimezoneOffset() && (t = new Date(n.getTime() + 6e4 * t.getTimezoneOffset())), t }, _local_to_utc: function (n) { return n && new Date(n.getTime() - 6e4 * n.getTimezoneOffset()) }, _zero_time: function (n) { return n && new Date(n.getFullYear(), n.getMonth(), n.getDate()) }, _zero_utc_time: function (n) { return n && f(n.getUTCFullYear(), n.getUTCMonth(), n.getUTCDate()) }, getDates: function () { return n.map(this.dates, this._utc_to_local) }, getUTCDates: function () { return n.map(this.dates, function (n) { return new Date(n) }) }, getDate: function () { return this._utc_to_local(this.getUTCDate()) }, getUTCDate: function () { var n = this.dates.get(-1); return n !== t ? new Date(n) : null }, clearDates: function () { this.inputField.val(""); this.update(); this._trigger("changeDate"); this.o.autoclose && this.hide() }, setDates: function () { var t = n.isArray(arguments[0]) ? arguments[0] : arguments; return this.update.apply(this, t), this._trigger("changeDate"), this.setValue(), this }, setUTCDates: function () { var t = n.isArray(arguments[0]) ? arguments[0] : arguments; return this.setDates.apply(this, n.map(t, this._utc_to_local)), this }, setDate: h("setDates"), setUTCDate: h("setUTCDates"), remove: h("destroy", "Method `remove` is deprecated and will be removed in version 2.0. Use `destroy` instead"), setValue: function () { var n = this.getFormattedDate(); return this.inputField.val(n), this }, getFormattedDate: function (r) { r === t && (r = this.o.format); var u = this.o.language; return n.map(this.dates, function (n) { return i.formatDate(n, r, u) }).join(this.o.multidateSeparator) }, getStartDate: function () { return this.o.startDate }, setStartDate: function (n) { return this._process_options({ startDate: n }), this.update(), this.updateNavArrows(), this }, getEndDate: function () { return this.o.endDate }, setEndDate: function (n) { return this._process_options({ endDate: n }), this.update(), this.updateNavArrows(), this }, setDaysOfWeekDisabled: function (n) { return this._process_options({ daysOfWeekDisabled: n }), this.update(), this }, setDaysOfWeekHighlighted: function (n) { return this._process_options({ daysOfWeekHighlighted: n }), this.update(), this }, setDatesDisabled: function (n) { return this._process_options({ datesDisabled: n }), this.update(), this }, place: function () { var y, r, p; if (this.isInline) return this; var f = this.picker.outerWidth(), s = this.picker.outerHeight(), e = n(this.o.container), h = e.width(), c = "body" === this.o.container ? n(document).scrollTop() : e.scrollTop(), l = e.offset(), a = [0]; this.element.parents().each(function () { var t = n(this).css("z-index"); "auto" !== t && 0 !== Number(t) && a.push(Number(t)) }); var v = Math.max.apply(Math, a) + this.o.zIndexOffset, u = this.component ? this.component.parent().offset() : this.element.offset(), w = this.component ? this.component.outerHeight(!0) : this.element.outerHeight(!1), o = this.component ? this.component.outerWidth(!0) : this.element.outerWidth(!1), t = u.left - l.left, i = u.top - l.top; return "body" !== this.o.container && (i += c), this.picker.removeClass("datepicker-orient-top datepicker-orient-bottom datepicker-orient-right datepicker-orient-left"), "auto" !== this.o.orientation.x ? (this.picker.addClass("datepicker-orient-" + this.o.orientation.x), "right" === this.o.orientation.x && (t -= f - o)) : u.left < 0 ? (this.picker.addClass("datepicker-orient-left"), t -= u.left - 10) : t + f > h ? (this.picker.addClass("datepicker-orient-right"), t += o - f) : this.o.rtl ? this.picker.addClass("datepicker-orient-right") : this.picker.addClass("datepicker-orient-left"), r = this.o.orientation.y, ("auto" === r && (y = -c + i - s, r = y < 0 ? "bottom" : "top"), this.picker.addClass("datepicker-orient-" + r), "top" === r ? i -= s + parseInt(this.picker.css("padding-top")) : i += w, this.o.rtl) ? (p = h - (t + o), this.picker.css({ top: i, right: p, zIndex: v })) : this.picker.css({ top: i, left: t, zIndex: v }), this }, _allow_update: !0, update: function () { if (!this._allow_update) return this; var u = this.dates.copy(), t = [], r = !1; return arguments.length ? (n.each(arguments, n.proxy(function (n, i) { i instanceof Date && (i = this._local_to_utc(i)); t.push(i) }, this)), r = !0) : (t = this.isInput ? this.element.val() : this.element.data("date") || this.inputField.val(), t = t && this.o.multidate ? t.split(this.o.multidateSeparator) : [t], delete this.element.data().date), t = n.map(t, n.proxy(function (n) { return i.parseDate(n, this.o.format, this.o.language, this.o.assumeNearbyYear) }, this)), t = n.grep(t, n.proxy(function (n) { return !this.dateWithinRange(n) || !n }, this), !0), this.dates.replace(t), this.o.updateViewDate && (this.viewDate = this.dates.length ? new Date(this.dates.get(-1)) : this.viewDate < this.o.startDate ? new Date(this.o.startDate) : this.viewDate > this.o.endDate ? new Date(this.o.endDate) : this.o.defaultViewDate), r ? (this.setValue(), this.element.change()) : this.dates.length && String(u) !== String(this.dates) && r && (this._trigger("changeDate"), this.element.change()), !this.dates.length && u.length && (this._trigger("clearDate"), this.element.change()), this.fill(), this }, fillDow: function () { if (this.o.showWeekDays) { var i = this.o.weekStart, t = "<tr>"; for (this.o.calendarWeeks && (t += '<th class="cw">&#160;<\/th>'); i < this.o.weekStart + 7;)t += '<th class="dow', -1 !== n.inArray(i, this.o.daysOfWeekDisabled) && (t += " disabled"), t += '">' + r[this.o.language].daysMin[i++ % 7] + "<\/th>"; t += "<\/tr>"; this.picker.find(".datepicker-days thead").append(t) } }, fillMonths: function () { for (var t, i = this._utc_to_local(this.viewDate), u = "", n = 0; n < 12; n++)t = i && i.getMonth() === n ? " focused" : "", u += '<span class="month' + t + '">' + r[this.o.language].monthsShort[n] + "<\/span>"; this.picker.find(".datepicker-months td").html(u) }, setRange: function (t) { t && t.length ? this.range = n.map(t, function (n) { return n.valueOf() }) : delete this.range; this.fill() }, getClassNames: function (t) { var i = [], r = this.viewDate.getUTCFullYear(), u = this.viewDate.getUTCMonth(), f = o(); return t.getUTCFullYear() < r || t.getUTCFullYear() === r && t.getUTCMonth() < u ? i.push("old") : (t.getUTCFullYear() > r || t.getUTCFullYear() === r && t.getUTCMonth() > u) && i.push("new"), this.focusDate && t.valueOf() === this.focusDate.valueOf() && i.push("focused"), this.o.todayHighlight && l(t, f) && i.push("today"), -1 !== this.dates.contains(t) && i.push("active"), this.dateWithinRange(t) || i.push("disabled"), this.dateIsDisabled(t) && i.push("disabled", "disabled-date"), -1 !== n.inArray(t.getUTCDay(), this.o.daysOfWeekHighlighted) && i.push("highlighted"), this.range && (t > this.range[0] && t < this.range[this.range.length - 1] && i.push("range"), -1 !== n.inArray(t.valueOf(), this.range) && i.push("selected"), t.valueOf() === this.range[0] && i.push("range-start"), t.valueOf() === this.range[this.range.length - 1] && i.push("range-end")), i }, _fill_yearsView: function (i, r, u, f, e, o, s) { for (var c, v, h, w = "", l = u / 10, b = this.picker.find(i), y = Math.floor(f / u) * u, p = y + 9 * l, k = Math.floor(this.viewDate.getFullYear() / l) * l, d = n.map(this.dates, function (n) { return Math.floor(n.getUTCFullYear() / l) * l }), a = y - l; a <= p + l; a += l)c = [r], v = null, a === y - l ? c.push("old") : a === p + l && c.push("new"), -1 !== n.inArray(a, d) && c.push("active"), (a < e || a > o) && c.push("disabled"), a === k && c.push("focused"), s !== n.noop && (h = s(new Date(a, 0, 1)), h === t ? h = {} : "boolean" == typeof h ? h = { enabled: h } : "string" == typeof h && (h = { classes: h }), !1 === h.enabled && c.push("disabled"), h.classes && (c = c.concat(h.classes.split(/\s+/))), h.tooltip && (v = h.tooltip)), w += '<span class="' + c.join(" ") + '"' + (v ? ' title="' + v + '"' : "") + ">" + a + "<\/span>"; b.find(".datepicker-switch").text(y + "-" + p); b.find("td").html(w) }, fill: function () { var p, u, w = new Date(this.viewDate), s = w.getUTCFullYear(), nt = w.getUTCMonth(), v = this.o.startDate !== -1 / 0 ? this.o.startDate.getUTCFullYear() : -1 / 0, et = this.o.startDate !== -1 / 0 ? this.o.startDate.getUTCMonth() : -1 / 0, y = this.o.endDate !== 1 / 0 ? this.o.endDate.getUTCFullYear() : 1 / 0, ot = this.o.endDate !== 1 / 0 ? this.o.endDate.getUTCMonth() : 1 / 0, st = r[this.o.language].today || r.en.today || "", ht = r[this.o.language].clear || r.en.clear || "", ct = r[this.o.language].titleFormat || r.en.titleFormat, b = o(), lt = (!0 === this.o.todayBtn || "linked" === this.o.todayBtn) && b >= this.o.startDate && b <= this.o.endDate && !this.weekOfDateIsDisabled(b), e, tt, c, k, h, l, g, ut, a, ft; if (!isNaN(s) && !isNaN(nt)) { for (this.picker.find(".datepicker-days .datepicker-switch").text(i.formatDate(w, ct, this.o.language)), this.picker.find("tfoot .today").text(st).css("display", lt ? "table-cell" : "none"), this.picker.find("tfoot .clear").text(ht).css("display", !0 === this.o.clearBtn ? "table-cell" : "none"), this.picker.find("thead .datepicker-title").text(this.o.title).css("display", "string" == typeof this.o.title && "" !== this.o.title ? "table-cell" : "none"), this.updateNavArrows(), this.fillMonths(), e = f(s, nt, 0), tt = e.getUTCDate(), e.setUTCDate(tt - (e.getUTCDay() - this.o.weekStart + 7) % 7), c = new Date(e), e.getUTCFullYear() < 100 && c.setUTCFullYear(e.getUTCFullYear()), c.setUTCDate(c.getUTCDate() + 42), c = c.valueOf(), l = []; e.valueOf() < c;) { if ((k = e.getUTCDay()) === this.o.weekStart && (l.push("<tr>"), this.o.calendarWeeks)) { var it = new Date(+e + (this.o.weekStart - k - 7) % 7 * 864e5), rt = new Date(Number(it) + (11 - it.getUTCDay()) % 7 * 864e5), d = new Date(Number(d = f(rt.getUTCFullYear(), 0, 1)) + (11 - d.getUTCDay()) % 7 * 864e5), at = (rt - d) / 6048e5 + 1; l.push('<td class="cw">' + at + "<\/td>") } h = this.getClassNames(e); h.push("day"); g = e.getUTCDate(); this.o.beforeShowDay !== n.noop && (u = this.o.beforeShowDay(this._utc_to_local(e)), u === t ? u = {} : "boolean" == typeof u ? u = { enabled: u } : "string" == typeof u && (u = { classes: u }), !1 === u.enabled && h.push("disabled"), u.classes && (h = h.concat(u.classes.split(/\s+/))), u.tooltip && (p = u.tooltip), u.content && (g = u.content)); h = n.isFunction(n.uniqueSort) ? n.uniqueSort(h) : n.unique(h); l.push('<td class="' + h.join(" ") + '"' + (p ? ' title="' + p + '"' : "") + ' data-date="' + e.getTime().toString() + '">' + g + "<\/td>"); p = null; k === this.o.weekEnd && l.push("<\/tr>"); e.setUTCDate(e.getUTCDate() + 1) } this.picker.find(".datepicker-days tbody").html(l.join("")); ut = r[this.o.language].monthsTitle || r.en.monthsTitle || "Months"; a = this.picker.find(".datepicker-months").find(".datepicker-switch").text(this.o.maxViewMode < 2 ? ut : s).end().find("tbody span").removeClass("active"); (n.each(this.dates, function (n, t) { t.getUTCFullYear() === s && a.eq(t.getUTCMonth()).addClass("active") }), (s < v || s > y) && a.addClass("disabled"), s === v && a.slice(0, et).addClass("disabled"), s === y && a.slice(ot + 1).addClass("disabled"), this.o.beforeShowMonth !== n.noop) && (ft = this, n.each(a, function (i, r) { var f = new Date(s, i, 1), u = ft.o.beforeShowMonth(f); u === t ? u = {} : "boolean" == typeof u ? u = { enabled: u } : "string" == typeof u && (u = { classes: u }); !1 !== u.enabled || n(r).hasClass("disabled") || n(r).addClass("disabled"); u.classes && n(r).addClass(u.classes); u.tooltip && n(r).prop("title", u.tooltip) })); this._fill_yearsView(".datepicker-years", "year", 10, s, v, y, this.o.beforeShowYear); this._fill_yearsView(".datepicker-decades", "decade", 100, s, v, y, this.o.beforeShowDecade); this._fill_yearsView(".datepicker-centuries", "century", 1e3, s, v, y, this.o.beforeShowCentury) } }, updateNavArrows: function () { if (this._allow_update) { var i, r, u = new Date(this.viewDate), t = u.getUTCFullYear(), f = u.getUTCMonth(), e = this.o.startDate !== -1 / 0 ? this.o.startDate.getUTCFullYear() : -1 / 0, s = this.o.startDate !== -1 / 0 ? this.o.startDate.getUTCMonth() : -1 / 0, o = this.o.endDate !== 1 / 0 ? this.o.endDate.getUTCFullYear() : 1 / 0, h = this.o.endDate !== 1 / 0 ? this.o.endDate.getUTCMonth() : 1 / 0, n = 1; switch (this.viewMode) { case 4: n *= 10; case 3: n *= 10; case 2: n *= 10; case 1: i = Math.floor(t / n) * n <= e; r = Math.floor(t / n) * n + n > o; break; case 0: i = t <= e && f <= s; r = t >= o && f >= h }this.picker.find(".prev").toggleClass("disabled", i); this.picker.find(".next").toggleClass("disabled", r) } }, click: function (t) { t.preventDefault(); t.stopPropagation(); var r, s, u, e; r = n(t.target); r.hasClass("datepicker-switch") && this.viewMode !== this.o.maxViewMode && this.setViewMode(this.viewMode + 1); r.hasClass("today") && !r.hasClass("day") && (this.setViewMode(0), this._setDate(o(), "linked" === this.o.todayBtn ? null : "view")); r.hasClass("clear") && this.clearDates(); r.hasClass("disabled") || (r.hasClass("month") || r.hasClass("year") || r.hasClass("decade") || r.hasClass("century")) && (this.viewDate.setUTCDate(1), s = 1, 1 === this.viewMode ? (e = r.parent().find("span").index(r), u = this.viewDate.getUTCFullYear(), this.viewDate.setUTCMonth(e)) : (e = 0, u = Number(r.text()), this.viewDate.setUTCFullYear(u)), this._trigger(i.viewModes[this.viewMode - 1].e, this.viewDate), this.viewMode === this.o.minViewMode ? this._setDate(f(u, e, s)) : (this.setViewMode(this.viewMode - 1), this.fill())); this.picker.is(":visible") && this._focused_from && this._focused_from.focus(); delete this._focused_from }, dayCellClick: function (t) { var r = n(t.currentTarget), u = r.data("date"), i = new Date(u); this.o.updateViewDate && (i.getUTCFullYear() !== this.viewDate.getUTCFullYear() && this._trigger("changeYear", this.viewDate), i.getUTCMonth() !== this.viewDate.getUTCMonth() && this._trigger("changeMonth", this.viewDate)); this._setDate(i) }, navArrowsClick: function (t) { var u = n(t.currentTarget), r = u.hasClass("prev") ? -1 : 1; 0 !== this.viewMode && (r *= 12 * i.viewModes[this.viewMode].navStep); this.viewDate = this.moveMonth(this.viewDate, r); this._trigger(i.viewModes[this.viewMode].e, this.viewDate); this.fill() }, _toggle_multidate: function (n) { var t = this.dates.contains(n); if (n || this.dates.clear(), -1 !== t ? (!0 === this.o.multidate || this.o.multidate > 1 || this.o.toggleActive) && this.dates.remove(t) : !1 === this.o.multidate ? (this.dates.clear(), this.dates.push(n)) : this.dates.push(n), "number" == typeof this.o.multidate) for (; this.dates.length > this.o.multidate;)this.dates.remove(0) }, _setDate: function (n, t) { t && "date" !== t || this._toggle_multidate(n && new Date(n)); (!t && this.o.updateViewDate || "view" === t) && (this.viewDate = n && new Date(n)); this.fill(); this.setValue(); t && "view" === t || this._trigger("changeDate"); this.inputField.trigger("change"); !this.o.autoclose || t && "date" !== t || this.hide() }, moveDay: function (n, t) { var i = new Date(n); return i.setUTCDate(n.getUTCDate() + t), i }, moveWeek: function (n, t) { return this.moveDay(n, 7 * t) }, moveMonth: function (n, t) { var f; if (!p(n)) return this.o.defaultViewDate; if (!t) return n; var r, u, i = new Date(n.valueOf()), e = i.getUTCDate(), o = i.getUTCMonth(), s = Math.abs(t); if (t = t > 0 ? 1 : -1, 1 === s) u = -1 === t ? function () { return i.getUTCMonth() === o } : function () { return i.getUTCMonth() !== r }, r = o + t, i.setUTCMonth(r), r = (r + 12) % 12; else { for (f = 0; f < s; f++)i = this.moveMonth(i, t); r = i.getUTCMonth(); i.setUTCDate(e); u = function () { return r !== i.getUTCMonth() } } for (; u();)i.setUTCDate(--e), i.setUTCMonth(r); return i }, moveYear: function (n, t) { return this.moveMonth(n, 12 * t) }, moveAvailableDate: function (n, t, i) { do { if (n = this[i](n, t), !this.dateWithinRange(n)) return !1; i = "moveDay" } while (this.dateIsDisabled(n)); return n }, weekOfDateIsDisabled: function (t) { return -1 !== n.inArray(t.getUTCDay(), this.o.daysOfWeekDisabled) }, dateIsDisabled: function (t) { return this.weekOfDateIsDisabled(t) || n.grep(this.o.datesDisabled, function (n) { return l(t, n) }).length > 0 }, dateWithinRange: function (n) { return n >= this.o.startDate && n <= this.o.endDate }, keydown: function (n) { if (!this.picker.is(":visible")) return void (40 !== n.keyCode && 27 !== n.keyCode || (this.show(), n.stopPropagation())); var t, r, u = !1, i = this.focusDate || this.viewDate; switch (n.keyCode) { case 27: this.focusDate ? (this.focusDate = null, this.viewDate = this.dates.get(-1) || this.viewDate, this.fill()) : this.hide(); n.preventDefault(); n.stopPropagation(); break; case 37: case 38: case 39: case 40: if (!this.o.keyboardNavigation || 7 === this.o.daysOfWeekDisabled.length) break; t = 37 === n.keyCode || 38 === n.keyCode ? -1 : 1; 0 === this.viewMode ? n.ctrlKey ? (r = this.moveAvailableDate(i, t, "moveYear")) && this._trigger("changeYear", this.viewDate) : n.shiftKey ? (r = this.moveAvailableDate(i, t, "moveMonth")) && this._trigger("changeMonth", this.viewDate) : 37 === n.keyCode || 39 === n.keyCode ? r = this.moveAvailableDate(i, t, "moveDay") : this.weekOfDateIsDisabled(i) || (r = this.moveAvailableDate(i, t, "moveWeek")) : 1 === this.viewMode ? (38 !== n.keyCode && 40 !== n.keyCode || (t *= 4), r = this.moveAvailableDate(i, t, "moveMonth")) : 2 === this.viewMode && (38 !== n.keyCode && 40 !== n.keyCode || (t *= 4), r = this.moveAvailableDate(i, t, "moveYear")); r && (this.focusDate = this.viewDate = r, this.setValue(), this.fill(), n.preventDefault()); break; case 13: if (!this.o.forceParse) break; i = this.focusDate || this.dates.get(-1) || this.viewDate; this.o.keyboardNavigation && (this._toggle_multidate(i), u = !0); this.focusDate = null; this.viewDate = this.dates.get(-1) || this.viewDate; this.setValue(); this.fill(); this.picker.is(":visible") && (n.preventDefault(), n.stopPropagation(), this.o.autoclose && this.hide()); break; case 9: this.focusDate = null; this.viewDate = this.dates.get(-1) || this.viewDate; this.fill(); this.hide() }u && (this.dates.length ? this._trigger("changeDate") : this._trigger("clearDate"), this.inputField.trigger("change")) }, setViewMode: function (n) { this.viewMode = n; this.picker.children("div").hide().filter(".datepicker-" + i.viewModes[this.viewMode].clsName).show(); this.updateNavArrows(); this._trigger("changeViewMode", new Date(this.viewDate)) } }; c = function (t, i) { n.data(t, "datepicker", this); this.element = n(t); this.inputs = n.map(i.inputs, function (n) { return n.jquery ? n[0] : n }); delete i.inputs; this.keepEmptyValues = i.keepEmptyValues; delete i.keepEmptyValues; s.call(n(this.inputs), i).on("changeDate", n.proxy(this.dateUpdated, this)); this.pickers = n.map(this.inputs, function (t) { return n.data(t, "datepicker") }); this.updateDates() }; c.prototype = { updateDates: function () { this.dates = n.map(this.pickers, function (n) { return n.getUTCDate() }); this.updateRanges() }, updateRanges: function () { var t = n.map(this.dates, function (n) { return n.valueOf() }); n.each(this.pickers, function (n, i) { i.setRange(t) }) }, clearDates: function () { n.each(this.pickers, function (n, t) { t.clearDates() }) }, dateUpdated: function (i) { var u; if (!this.updating && (this.updating = !0, u = n.data(i.target, "datepicker"), u !== t)) { var r = u.getUTCDate(), s = this.keepEmptyValues, o = n.inArray(i.target, this.inputs), f = o - 1, e = o + 1, h = this.inputs.length; if (-1 !== o) { if (n.each(this.pickers, function (n, t) { t.getUTCDate() || t !== u && s || t.setUTCDate(r) }), r < this.dates[f]) for (; f >= 0 && r < this.dates[f];)this.pickers[f--].setUTCDate(r); else if (r > this.dates[e]) for (; e < h && r > this.dates[e];)this.pickers[e++].setUTCDate(r); this.updateDates(); delete this.updating } } }, destroy: function () { n.map(this.pickers, function (n) { n.destroy() }); n(this.inputs).off("changeDate", this.dateUpdated); delete this.element.data().datepicker }, remove: h("destroy", "Method `remove` is deprecated and will be removed in version 2.0. Use `destroy` instead") }; v = n.fn.datepicker; s = function (i) { var f = Array.apply(null, arguments), r; if (f.shift(), this.each(function () { var s = n(this), t = s.data("datepicker"), h = "object" == typeof i && i; if (!t) { var l = w(this, "date"), a = n.extend({}, e, l, h), v = b(a.language), o = n.extend({}, e, v, l, h); s.hasClass("input-daterange") || o.inputs ? (n.extend(o, { inputs: o.inputs || s.find("input").toArray() }), t = new c(this, o)) : t = new u(this, o); s.data("datepicker", t) } "string" == typeof i && "function" == typeof t[i] && (r = t[i].apply(t, f)) }), r === t || r instanceof u || r instanceof c) return this; if (this.length > 1) throw new Error("Using only allowed for the collection of a single element (" + i + " function)"); return r }; n.fn.datepicker = s; e = n.fn.datepicker.defaults = { assumeNearbyYear: !1, autoclose: !1, beforeShowDay: n.noop, beforeShowMonth: n.noop, beforeShowYear: n.noop, beforeShowDecade: n.noop, beforeShowCentury: n.noop, calendarWeeks: !1, clearBtn: !1, toggleActive: !1, daysOfWeekDisabled: [], daysOfWeekHighlighted: [], datesDisabled: [], endDate: 1 / 0, forceParse: !0, format: "mm/dd/yyyy", keepEmptyValues: !1, keyboardNavigation: !0, language: "en", minViewMode: 0, maxViewMode: 4, multidate: !1, multidateSeparator: ",", orientation: "auto", rtl: !1, startDate: -1 / 0, startView: 0, todayBtn: !1, todayHighlight: !1, updateViewDate: !0, weekStart: 0, disableTouchKeyboard: !1, enableOnReadonly: !0, showOnFocus: !0, zIndexOffset: 10, container: "body", immediateUpdates: !1, title: "", templates: { leftArrow: "&#x00AB;", rightArrow: "&#x00BB;" }, showWeekDays: !0 }; y = n.fn.datepicker.locale_opts = ["format", "rtl", "weekStart"]; n.fn.datepicker.Constructor = u; r = n.fn.datepicker.dates = { en: { days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], daysShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], daysMin: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"], months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], monthsShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], today: "Today", clear: "Clear", titleFormat: "MM yyyy" } }; i = { viewModes: [{ names: ["days", "month"], clsName: "days", e: "changeMonth" }, { names: ["months", "year"], clsName: "months", e: "changeYear", navStep: 1 }, { names: ["years", "decade"], clsName: "years", e: "changeDecade", navStep: 10 }, { names: ["decades", "century"], clsName: "decades", e: "changeCentury", navStep: 100 }, { names: ["centuries", "millennium"], clsName: "centuries", e: "changeMillennium", navStep: 1e3 }], validParts: /dd?|DD?|mm?|MM?|yy(?:yy)?/g, nonpunctuation: /[^ -\/:-@\u5e74\u6708\u65e5\[-`{-~\t\n\r]+/g, parseFormat: function (n) { if ("function" == typeof n.toValue && "function" == typeof n.toDisplay) return n; var t = n.replace(this.validParts, "\0").split("\0"), i = n.match(this.validParts); if (!t || !t.length || !i || 0 === i.length) throw new Error("Invalid date format."); return { separators: t, parts: i } }, parseDate: function (f, e, s, h) { function et(n, t) { return !0 === t && (t = 10), n < 100 && (n += 2e3) > (new Date).getFullYear() + t && (n -= 100), n } function tt() { var n = this.slice(0, l[c].length), t = l[c].slice(0, n.length); return n.toLowerCase() === t.toLowerCase() } var l, y, it, c, rt, ut, g, v, ft, k, d; if (!f) return t; if (f instanceof Date) return f; if ("string" == typeof e && (e = i.parseFormat(e)), e.toValue) return e.toValue(f, e, s); if (ut = { d: "moveDay", m: "moveMonth", w: "moveWeek", y: "moveYear" }, g = { yesterday: "-1d", today: "+0d", tomorrow: "+1d" }, f in g && (f = g[f]), /^[\-+]\d+[dmwy]([\s,]+[\-+]\d+[dmwy])*$/i.test(f)) { for (l = f.match(/([\-+]\d+)([dmwy])/gi), f = new Date, c = 0; c < l.length; c++)y = l[c].match(/([\-+]\d+)([dmwy])/i), it = Number(y[1]), rt = ut[y[2].toLowerCase()], f = u.prototype[rt](f, it); return u.prototype._zero_utc_time(f) } l = f && f.match(this.nonpunctuation) || []; var p, w, b = {}, nt = ["yyyy", "yy", "M", "MM", "m", "mm", "d", "dd"], a = { yyyy: function (n, t) { return n.setUTCFullYear(h ? et(t, h) : t) }, m: function (n, t) { if (isNaN(n)) return n; for (t -= 1; t < 0;)t += 12; for (t %= 12, n.setUTCMonth(t); n.getUTCMonth() !== t;)n.setUTCDate(n.getUTCDate() - 1); return n }, d: function (n, t) { return n.setUTCDate(t) } }; if (a.yy = a.yyyy, a.M = a.MM = a.mm = a.m, a.dd = a.d, f = o(), v = e.parts.slice(), l.length !== v.length && (v = n(v).filter(function (t, i) { return -1 !== n.inArray(i, nt) }).toArray()), l.length === v.length) { for (c = 0, ft = v.length; c < ft; c++) { if (p = parseInt(l[c], 10), y = v[c], isNaN(p)) switch (y) { case "MM": w = n(r[s].months).filter(tt); p = n.inArray(w[0], r[s].months) + 1; break; case "M": w = n(r[s].monthsShort).filter(tt); p = n.inArray(w[0], r[s].monthsShort) + 1 }b[y] = p } for (c = 0; c < nt.length; c++)(d = nt[c]) in b && !isNaN(b[d]) && (k = new Date(f), a[d](k, b[d]), isNaN(k) || (f = k)) } return f }, formatDate: function (t, u, f) { var e; if (!t) return ""; if ("string" == typeof u && (u = i.parseFormat(u)), u.toDisplay) return u.toDisplay(t, u, f); e = { d: t.getUTCDate(), D: r[f].daysShort[t.getUTCDay()], DD: r[f].days[t.getUTCDay()], m: t.getUTCMonth() + 1, M: r[f].monthsShort[t.getUTCMonth()], MM: r[f].months[t.getUTCMonth()], yy: t.getUTCFullYear().toString().substring(2), yyyy: t.getUTCFullYear() }; e.dd = (e.d < 10 ? "0" : "") + e.d; e.mm = (e.m < 10 ? "0" : "") + e.m; t = []; for (var s = n.extend([], u.separators), o = 0, h = u.parts.length; o <= h; o++)s.length && t.push(s.shift()), t.push(e[u.parts[o]]); return t.join("") }, headTemplate: '<thead><tr><th colspan="7" class="datepicker-title"><\/th><\/tr><tr><th class="prev">' + e.templates.leftArrow + '<\/th><th colspan="5" class="datepicker-switch"><\/th><th class="next">' + e.templates.rightArrow + "<\/th><\/tr><\/thead>", contTemplate: '<tbody><tr><td colspan="7"><\/td><\/tr><\/tbody>', footTemplate: '<tfoot><tr><th colspan="7" class="today"><\/th><\/tr><tr><th colspan="7" class="clear"><\/th><\/tr><\/tfoot>' }; i.template = '<div class="datepicker"><div class="datepicker-days"><table class="table-condensed">' + i.headTemplate + "<tbody><\/tbody>" + i.footTemplate + '<\/table><\/div><div class="datepicker-months"><table class="table-condensed">' + i.headTemplate + i.contTemplate + i.footTemplate + '<\/table><\/div><div class="datepicker-years"><table class="table-condensed">' + i.headTemplate + i.contTemplate + i.footTemplate + '<\/table><\/div><div class="datepicker-decades"><table class="table-condensed">' + i.headTemplate + i.contTemplate + i.footTemplate + '<\/table><\/div><div class="datepicker-centuries"><table class="table-condensed">' + i.headTemplate + i.contTemplate + i.footTemplate + "<\/table><\/div><\/div>"; n.fn.datepicker.DPGlobal = i; n.fn.datepicker.noConflict = function () { return n.fn.datepicker = v, this }; n.fn.datepicker.version = "1.9.0"; n.fn.datepicker.deprecated = function (n) { var t = window.console; t && t.warn && t.warn("DEPRECATED: " + n) }; n(document).on("focus.datepicker.data-api click.datepicker.data-api", '[data-provide="datepicker"]', function (t) { var i = n(this); i.data("datepicker") || (t.preventDefault(), s.call(i, "show")) }); n(function () { s.call(n('[data-provide="datepicker-inline"]')) }) });
  622. /*!
  623. * Nestable jQuery Plugin - Copyright (c) 2014 Ramon Smit - https://github.com/RamonSmit/Nestable
  624. */
  625. (function (n, t, i, r) { function o(t, u) { this.w = n(i); this.el = n(t); u = u || e; u.rootClass !== r && u.rootClass !== "dd" && (u.listClass = u.listClass ? u.listClass : u.rootClass + "-list", u.itemClass = u.itemClass ? u.itemClass : u.rootClass + "-item", u.dragClass = u.dragClass ? u.dragClass : u.rootClass + "-dragel", u.handleClass = u.handleClass ? u.handleClass : u.rootClass + "-handle", u.collapsedClass = u.collapsedClass ? u.collapsedClass : u.rootClass + "-collapsed", u.placeClass = u.placeClass ? u.placeClass : u.rootClass + "-placeholder", u.noDragClass = u.noDragClass ? u.noDragClass : u.rootClass + "-nodrag", u.noChildrenClass = u.noChildrenClass ? u.noChildrenClass : u.rootClass + "-nochildren", u.emptyClass = u.emptyClass ? u.emptyClass : u.rootClass + "-empty"); this.options = n.extend({}, e, u); this.options.json !== r && this._build(); this.init() } var u = "ontouchstart" in i, f = function () { var n = i.createElement("div"), r = i.documentElement, u; return ("pointerEvents" in n.style) ? (n.style.pointerEvents = "auto", n.style.pointerEvents = "x", r.appendChild(n), u = t.getComputedStyle && t.getComputedStyle(n, "").pointerEvents === "auto", r.removeChild(n), !!u) : !1 }(), e = { contentCallback: function (n) { return n.content || "" ? n.content : n.id }, listNodeName: "ol", itemNodeName: "li", handleNodeName: "div", contentNodeName: "span", rootClass: "dd", listClass: "dd-list", itemClass: "dd-item", dragClass: "dd-dragel", handleClass: "dd-handle", contentClass: "dd-content", collapsedClass: "dd-collapsed", placeClass: "dd-placeholder", noDragClass: "dd-nodrag", noChildrenClass: "dd-nochildren", emptyClass: "dd-empty", expandBtnHTML: '<button class="dd-expand" data-action="expand" type="button">Expand<\/button>', collapseBtnHTML: '<button class="dd-collapse" data-action="collapse" type="button">Collapse<\/button>', group: 0, maxDepth: 5, threshold: 20, fixedDepth: !1, fixed: !1, includeContent: !1, scroll: !1, scrollSensitivity: 1, scrollSpeed: 5, scrollTriggers: { top: 40, left: 40, right: -40, bottom: -40 }, effect: { animation: "none", time: "slow" }, callback: function () { }, onDragStart: function () { }, beforeDragStop: function () { }, listRenderer: function (n, t) { var i = "<" + t.listNodeName + ' class="' + t.listClass + '">'; return i += n, i + ("<\/" + t.listNodeName + ">") }, itemRenderer: function (t, i, r, u) { var e = n.map(t, function (n, t) { return " " + t + '="' + n + '"' }).join(" "), f = "<" + u.itemNodeName + e + ">"; return f += "<" + u.handleNodeName + ' class="' + u.handleClass + '">', f += "<" + u.contentNodeName + ' class="' + u.contentClass + '">', f += i, f += "<\/" + u.contentNodeName + ">", f += "<\/" + u.handleNodeName + ">", f += r, f + ("<\/" + u.itemNodeName + ">") } }; o.prototype = { init: function () { var i = this, o, s; i.reset(); i.el.data("nestable-group", this.options.group); i.placeEl = n('<div class="' + i.options.placeClass + '"/>'); o = this.el.find(i.options.itemNodeName); n.each(o, function (t, r) { var u = n(r), f = u.parent(); i.setParent(u); f.hasClass(i.options.collapsedClass) && i.collapseItem(f.parent()) }); o.length || this.appendEmptyElement(this.el); i.el.on("click", "button", function (t) { if (!i.dragEl) { var r = n(t.currentTarget), u = r.data("action"), f = r.parents(i.options.itemNodeName).eq(0); u === "collapse" && i.collapseItem(f); u === "expand" && i.expandItem(f) } }); var f = function (t) { var r = n(t.target); if (!r.hasClass(i.options.handleClass)) { if (r.closest("." + i.options.noDragClass).length) return; r = r.closest("." + i.options.handleClass) } r.length && !i.dragEl && ((i.isTouch = /^touch/.test(t.type), i.isTouch && t.touches.length !== 1) || (t.preventDefault(), i.dragStart(t.touches ? t.touches[0] : t))) }, e = function (n) { i.dragEl && (n.preventDefault(), i.dragMove(n.touches ? n.touches[0] : n)) }, r = function (n) { i.dragEl && (n.preventDefault(), i.dragStop(n.touches ? n.changedTouches[0] : n)) }; u && (i.el[0].addEventListener("touchstart", f, !1), t.addEventListener("touchmove", e, !1), t.addEventListener("touchend", r, !1), t.addEventListener("touchcancel", r, !1)); i.el.on("mousedown", f); i.w.on("mousemove", e); i.w.on("mouseup", r); s = function () { u && (i.el[0].removeEventListener("touchstart", f, !1), t.removeEventListener("touchmove", e, !1), t.removeEventListener("touchend", r, !1), t.removeEventListener("touchcancel", r, !1)); i.el.off("mousedown", f); i.w.off("mousemove", e); i.w.off("mouseup", r); i.el.off("click"); i.el.unbind("destroy-nestable"); i.el.data("nestable", null) }; i.el.bind("destroy-nestable", s) }, destroy: function () { this.el.trigger("destroy-nestable") }, add: function (t) { var u = "." + this.options.listClass, i = n(this.el).children(u); t.parent_id !== r && (i = i.find('[data-id="' + t.parent_id + '"]'), delete t.parent_id, i.children(u).length === 0 && (i = i.append(this.options.listRenderer("", this.options))), i = i.find(u + ":first"), this.setParent(i.parent())); i.append(this._buildItem(t, this.options)) }, replace: function (n) { var t = this._buildItem(n, this.options); this._getItemById(n.id).replaceWith(t) }, removeItem: function (t) { var i = this.options, r = this.el, u, f; t = t || this; t.remove(); u = "." + i.listClass + " ." + i.listClass + ":not(:has(*))"; n(r).find(u).remove(); f = '[data-action="expand"], [data-action="collapse"]'; n(r).find(f).each(function () { var t = n(this).siblings("." + i.listClass); t.length === 0 && n(this).remove() }) }, remove: function (n, t) { var r = this.options, u = this, i = this._getItemById(n), f = r.effect.animation || "fade", e = r.effect.time || "slow"; f === "fade" ? i.fadeOut(e, function () { u.removeItem(i) }) : this.removeItem(i); t && t() }, removeAll: function (t) { function f() { e.each(function () { u.removeItem(n(this)) }); r.show(); t && t() } var u = this, i = this.options, r = u.el.find(i.listNodeName).first(), e = r.children(i.itemNodeName), o = i.effect.animation || "fade", s = i.effect.time || "slow"; o === "fade" ? r.fadeOut(s, f) : f() }, _getItemById: function (t) { return n(this.el).children("." + this.options.listClass).find('[data-id="' + t + '"]') }, _build: function () { var t = this.options.json; typeof t == "string" && (t = JSON.parse(t)); n(this.el).html(this._buildList(t, this.options)) }, _buildList: function (t, i) { if (!t) return ""; var r = "", u = this; return n.each(t, function (n, t) { r += u._buildItem(t, i) }), i.listRenderer(r, i) }, _buildItem: function (t, i) { function f(n) { var t = { "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#039;" }; return n + "".replace(/[&<>"']/g, function (n) { return t[n] }) } function e(n) { var t = {}; for (var i in n) t[n[i]] = n[i]; return t } function o(t, i) { var r = t.classes || {}, u; return typeof r == "string" && (r = [r]), u = e(r), u[i.itemClass] = i.itemClass, n.map(u, function (n) { return n }).join(" ") } function s(t) { t = n.extend({}, t); delete t.children; delete t.classes; delete t.content; var i = {}; return n.each(t, function (n, t) { typeof t == "object" && (t = JSON.stringify(t)); i["data-" + n] = f(t) }), i } var r = s(t); r["class"] = o(t, i); var h = i.contentCallback(t), c = this._buildList(t.children, i), u = n(i.itemRenderer(r, h, c, i, t)); return this.setParent(u), u[0].outerHTML }, serialize: function () { var t = this, i = function (r) { var u = [], f = r.children(t.options.itemNodeName); return f.each(function () { var r = n(this), f = n.extend({}, r.data()), o = r.children(t.options.listNodeName), e; t.options.includeContent && (e = r.find("." + t.options.contentClass).html(), e && (f.content = e)); o.length && (f.children = i(o)); u.push(f) }), u }; return i(t.el.find(t.options.listNodeName).first()) }, asNestedSet: function () { function f(r, u, o) { var c = o + 1, s, h; return n(r).children(t.listNodeName).children(t.itemNodeName).length > 0 && (u++, n(r).children(t.listNodeName).children(t.itemNodeName).each(function () { c = f(n(this), u, c) }), u--), s = n(r).attr("data-id"), e(s) && (s = parseInt(s)), h = n(r).parent(t.listNodeName).parent(t.itemNodeName).attr("data-id") || "", e(h) && (h = parseInt(h)), s && i.push({ id: s, parent_id: h, depth: u, lft: o, rgt: c }), c + 1 } function e(t) { return n.isNumeric(t) && Math.floor(t) == t } var r = this, t = r.options, o = -1, i = [], u = 1, s = r.el.find(t.listNodeName).first().children(t.itemNodeName); return s.each(function () { u = f(this, o + 1, u) }), i = i.sort(function (n, t) { return n.lft - t.lft }) }, returnOptions: function () { return this.options }, serialise: function () { return this.serialize() }, toHierarchy: function (t) { function u(t) { var f = (n(t).attr(i.attribute || "id") || "").match(i.expression || /(.+)[-=_](.+)/), r; if (f) return r = { id: f[2] }, n(t).children(i.listType).children(i.items).length > 0 && (r.children = [], n(t).children(i.listType).children(i.items).each(function () { var n = u(this); r.children.push(n) })), r } var i = n.extend({}, this.options, t), r = []; return n(this.element).children(i.items).each(function () { var n = u(this); r.push(n) }), r }, toArray: function () { function e(r, f, o) { var s = o + 1, h, c, l; return r.children(t.options.listNodeName).children(t.options.itemNodeName).length > 0 && (f++, r.children(t.options.listNodeName).children(t.options.itemNodeName).each(function () { s = e(n(this), f, s) }), f--), h = r.data().id, f === u + 1 ? c = t.rootID : (l = r.parent(t.options.listNodeName).parent(t.options.itemNodeName).data(), c = l.id), h && i.push({ id: h, parent_id: c, depth: f, left: o, right: s }), s + 1 } var t = n.extend({}, this.options, this), u = t.startDepthCount || 0, i = [], f = 2, r = this, o = r.el.find(r.options.listNodeName).first(), s = o.children(r.options.itemNodeName); return s.each(function () { f = e(n(this), u + 1, f) }), i = i.sort(function (n, t) { return n.left - t.left }) }, reset: function () { this.mouse = { offsetX: 0, offsetY: 0, startX: 0, startY: 0, lastX: 0, lastY: 0, nowX: 0, nowY: 0, distX: 0, distY: 0, dirAx: 0, dirX: 0, dirY: 0, lastDirX: 0, lastDirY: 0, distAxX: 0, distAxY: 0 }; this.isTouch = !1; this.moving = !1; this.dragEl = null; this.dragRootEl = null; this.dragDepth = 0; this.hasNewRoot = !1; this.pointEl = null }, expandItem: function (n) { n.removeClass(this.options.collapsedClass) }, collapseItem: function (n) { var t = n.children(this.options.listNodeName); t.length && n.addClass(this.options.collapsedClass) }, expandAll: function () { var t = this; t.el.find(t.options.itemNodeName).each(function () { t.expandItem(n(this)) }) }, collapseAll: function () { var t = this; t.el.find(t.options.itemNodeName).each(function () { t.collapseItem(n(this)) }) }, setParent: function (t) { t.is(this.options.itemNodeName) && t.children(this.options.listNodeName).length && (t.children("[data-action]").remove(), t.prepend(n(this.options.expandBtnHTML)), t.prepend(n(this.options.collapseBtnHTML))) }, unsetParent: function (n) { n.removeClass(this.options.collapsedClass); n.children("[data-action]").remove(); n.children(this.options.listNodeName).remove() }, dragStart: function (t) { var u = this.mouse, h = n(t.target), r = h.closest(this.options.itemNodeName), c = { top: t.pageY, left: t.pageX }, s = this.options.onDragStart.call(this, this.el, r, c), f, e, o; if (typeof s == "undefined" || s !== !1) for (this.placeEl.css("height", r.height()), u.offsetX = t.pageX - r.offset().left, u.offsetY = t.pageY - r.offset().top, u.startX = u.lastX = t.pageX, u.startY = u.lastY = t.pageY, this.dragRootEl = this.el, this.dragEl = n(i.createElement(this.options.listNodeName)).addClass(this.options.listClass + " " + this.options.dragClass), this.dragEl.css("width", r.outerWidth()), this.setIndexOfItem(r), r.after(this.placeEl), r[0].parentNode.removeChild(r[0]), r.appendTo(this.dragEl), n(i.body).append(this.dragEl), this.dragEl.css({ left: t.pageX - u.offsetX, top: t.pageY - u.offsetY }), o = this.dragEl.find(this.options.itemNodeName), f = 0; f < o.length; f++)e = n(o[f]).parents(this.options.listNodeName).length, e > this.dragDepth && (this.dragDepth = e) }, createSubLevel: function (t, i) { var r = n("<" + this.options.listNodeName + "/>").addClass(this.options.listClass); return i && r.append(i), t.append(r), this.setParent(t), r }, setIndexOfItem: function (t, i) { i = i || []; i.unshift(t.index()); n(t[0].parentNode)[0] !== this.dragRootEl[0] ? this.setIndexOfItem(n(t[0].parentNode), i) : this.dragEl.data("indexOfItem", i) }, restoreItemAtIndex: function (t, i) { function s(t, r) { i[f] === 0 ? n(t).prepend(r.clone(!0)) : n(t.children[i[f] - 1]).after(r.clone(!0)) } for (var e, o, r = this.el, f = i.length - 1, u = 0; u < i.length; u++) { if (f === parseInt(u)) { s(r, t); return } e = r[0] ? r[0] : r; o = e.children[i[u]]; r = o ? o : this.createSubLevel(n(e)) } }, dragStop: function (n) { var f = { top: n.pageY, left: n.pageX }, u = this.dragEl.data("indexOfItem"), t = this.dragEl.children(this.options.itemNodeName).first(), i, r; if (t[0].parentNode.removeChild(t[0]), this.dragEl.remove(), i = this.options.beforeDragStop.call(this, this.el, t, this.placeEl.parent()), typeof i != "undefined" && i === !1) { r = this.placeEl.parent(); this.placeEl.remove(); r.children().length || this.unsetParent(r.parent()); this.restoreItemAtIndex(t, u); this.reset(); return } this.placeEl.replaceWith(t); this.hasNewRoot ? (this.options.fixed === !0 ? this.restoreItemAtIndex(t, u) : this.el.trigger("lostItem"), this.dragRootEl.trigger("gainedItem")) : this.dragRootEl.trigger("change"); this.options.callback.call(this, this.dragRootEl, t, f); this.reset() }, dragMove: function (r) { var h, l, c, b, a, e = this.options, u = this.mouse, v, s, o, y, p, w, k; if (this.dragEl.css({ left: r.pageX - u.offsetX, top: r.pageY - u.offsetY }), u.lastX = u.nowX, u.lastY = u.nowY, u.nowX = r.pageX, u.nowY = r.pageY, u.distX = u.nowX - u.lastX, u.distY = u.nowY - u.lastY, u.lastDirX = u.dirX, u.lastDirY = u.dirY, u.dirX = u.distX === 0 ? 0 : u.distX > 0 ? 1 : -1, u.dirY = u.distY === 0 ? 0 : u.distY > 0 ? 1 : -1, v = Math.abs(u.distX) > Math.abs(u.distY) ? 1 : 0, !u.moving) { u.dirAx = v; u.moving = !0; return } if (e.scroll && (typeof t.jQuery.fn.scrollParent != "undefined" ? (s = !1, o = this.el.scrollParent()[0], o !== i && o.tagName !== "HTML" ? (e.scrollTriggers.bottom + o.offsetHeight - r.pageY < e.scrollSensitivity ? o.scrollTop = s = o.scrollTop + e.scrollSpeed : r.pageY - e.scrollTriggers.top < e.scrollSensitivity && (o.scrollTop = s = o.scrollTop - e.scrollSpeed), e.scrollTriggers.right + o.offsetWidth - r.pageX < e.scrollSensitivity ? o.scrollLeft = s = o.scrollLeft + e.scrollSpeed : r.pageX - e.scrollTriggers.left < e.scrollSensitivity && (o.scrollLeft = s = o.scrollLeft - e.scrollSpeed)) : (r.pageY - n(i).scrollTop() < e.scrollSensitivity ? s = n(i).scrollTop(n(i).scrollTop() - e.scrollSpeed) : n(t).height() - (r.pageY - n(i).scrollTop()) < e.scrollSensitivity && (s = n(i).scrollTop(n(i).scrollTop() + e.scrollSpeed)), r.pageX - n(i).scrollLeft() < e.scrollSensitivity ? s = n(i).scrollLeft(n(i).scrollLeft() - e.scrollSpeed) : n(t).width() - (r.pageX - n(i).scrollLeft()) < e.scrollSensitivity && (s = n(i).scrollLeft(n(i).scrollLeft() + e.scrollSpeed)))) : console.warn("To use scrolling you need to have scrollParent() function, check documentation for more information")), this.scrollTimer && clearTimeout(this.scrollTimer), e.scroll && s && (this.scrollTimer = setTimeout(function () { n(t).trigger(r) }, 10)), u.dirAx !== v ? (u.distAxX = 0, u.distAxY = 0) : (u.distAxX += Math.abs(u.distX), u.dirX !== 0 && u.dirX !== u.lastDirX && (u.distAxX = 0), u.distAxY += Math.abs(u.distY), u.dirY !== 0 && u.dirY !== u.lastDirY && (u.distAxY = 0)), u.dirAx = v, u.dirAx && u.distAxX >= e.threshold && (u.distAxX = 0, c = this.placeEl.prev(e.itemNodeName), u.distX > 0 && c.length && !c.hasClass(e.collapsedClass) && !c.hasClass(e.noChildrenClass) && (h = c.find(e.listNodeName).last(), a = this.placeEl.parents(e.listNodeName).length, a + this.dragDepth <= e.maxDepth && (h.length ? (h = c.children(e.listNodeName).last(), h.append(this.placeEl)) : this.createSubLevel(c, this.placeEl))), u.distX < 0 && (b = this.placeEl.next(e.itemNodeName), b.length || (l = this.placeEl.parent(), this.placeEl.closest(e.itemNodeName).after(this.placeEl), l.children().length || this.unsetParent(l.parent())))), y = !1, f || (this.dragEl[0].style.visibility = "hidden"), this.pointEl = n(i.elementFromPoint(r.pageX - i.body.scrollLeft, r.pageY - (t.pageYOffset || i.documentElement.scrollTop))), f || (this.dragEl[0].style.visibility = "visible"), this.pointEl.hasClass(e.handleClass) && (this.pointEl = this.pointEl.closest(e.itemNodeName)), this.pointEl.hasClass(e.emptyClass)) y = !0; else if (!this.pointEl.length || !this.pointEl.hasClass(e.itemClass)) return; if (p = this.pointEl.closest("." + e.rootClass), w = this.dragRootEl.data("nestable-id") !== p.data("nestable-id"), !u.dirAx || w || y) { if (w && e.group !== p.data("nestable-group")) return; if (this.options.fixedDepth && this.dragDepth + 1 !== this.pointEl.parents(e.listNodeName).length) return; if (a = this.dragDepth - 1 + this.pointEl.parents(e.listNodeName).length, a > e.maxDepth) return; k = r.pageY < this.pointEl.offset().top + this.pointEl.height() / 2; l = this.placeEl.parent(); y ? (h = n(i.createElement(e.listNodeName)).addClass(e.listClass), h.append(this.placeEl), this.pointEl.replaceWith(h)) : k ? this.pointEl.before(this.placeEl) : this.pointEl.after(this.placeEl); l.children().length || this.unsetParent(l.parent()); this.dragRootEl.find(e.itemNodeName).length || this.appendEmptyElement(this.dragRootEl); this.dragRootEl = p; w && (this.hasNewRoot = this.el[0] !== this.dragRootEl[0]) } }, appendEmptyElement: function (n) { n.append('<div class="' + this.options.emptyClass + '"/>') } }; n.fn.nestable = function (i) { var f = this, r = this, u = arguments; return "Nestable" in t || (t.Nestable = {}, Nestable.counter = 0), f.each(function () { var t = n(this).data("nestable"), e, f; if (t) { if (typeof i == "string" && typeof t[i] == "function") if (u.length > 1) { for (e = [], f = 1; f < u.length; f++)e.push(u[f]); r = t[i].apply(t, e) } else r = t[i]() } else Nestable.counter++, n(this).data("nestable", new o(this, i)), n(this).data("nestable-id", Nestable.counter) }), r || f } })(window.jQuery || window.Zepto, window, document)