PageSourceSearch

https://pravda-nn.ru/wp-content/themes/pravda_nn_2.0/js/scripts.js?ver=1790843947

js pravda-nn.ru collected 2026-10-01 08:40:40 UTC 871,804 bytes, 15,509 lines download raw bytes

vendor: 133,849 bytes, lines 1-2388
1if (function (t, e) {
2    "object" == typeof module && "object" == typeof module.exports ? module.exports = t.document ? e(t, !0) : function (t) {
3        if (!t.document) throw new Error("jQuery requires a window with a document");
4        return e(t)
5    } : e(t)
6}("undefined" != typeof window ? window : this, function (k, t) {
7    function e(t, e) {
8        return e.toUpperCase()
9    }
10
11    var i = [], C = k.document, c = i.slice, m = i.concat, r = i.push, s = i.indexOf, n = {}, o = n.toString,
12        f = n.hasOwnProperty, g = {}, a = "2.2.4", D = function (t, e) {
13            return new D.fn.init(t, e)
14        }, l = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, h = /^-ms-/, u = /-([\da-z])/gi;
15
16    function d(t) {
17        var e = !!t && "length" in t && t.length, i = D.type(t);
18        return "function" !== i && !D.isWindow(t) && ("array" === i || 0 === e || "number" == typeof e && 0 < e && e - 1 in t)
19    }
20
21    D.fn = D.prototype = {
22        jquery: a, constructor: D, selector: "", length: 0, toArray: function () {
23            return c.call(this)
24        }, get: function (t) {
25            return null != t ? t < 0 ? this[t + this.length] : this[t] : c.call(this)
26        }, pushStack: function (t) {
27            var e = D.merge(this.constructor(), t);
28            return e.prevObject = this, e.context = this.context, e
29        }, each: function (t) {
30            return D.each(this, t)
31        }, map: function (i) {
32            return this.pushStack(D.map(this, function (t, e) {
33                return i.call(t, e, t)
34            }))
35        }, slice: function () {
36            return this.pushStack(c.apply(this, arguments))
37        }, first: function () {
38            return this.eq(0)
39        }, last: function () {
40            return this.eq(-1)
41        }, eq: function (t) {
42            var e = this.length, i = +t + (t < 0 ? e : 0);
43            return this.pushStack(0 <= i && i < e ? [this[i]] : [])
44        }, end: function () {
45            return this.prevObject || this.constructor()
46        }, push: r, sort: i.sort, splice: i.splice
47    }, D.extend = D.fn.extend = function () {
48        var t, e, i, n, s, o, a = arguments[0] || {}, r = 1, l = arguments.length, h = !1;
49        for ("boolean" == typeof a && (h = a, a = arguments[r] || {}, r++), "object" == typeof a || D.isFunction(a) || (a = {}), r === l && (a = this, r--); r < l; r++) if (null != (t = arguments[r])) for (e in t) i = a[e], a !== (n = t[e]) && (h && n && (D.isPlainObject(n) || (s = D.isArray(n))) ? (o = s ? (s = !1, i && D.isArray(i) ? i : []) : i && D.isPlainObject(i) ? i : {}, a[e] = D.extend(h, o, n)) : void 0 !== n && (a[e] = n));
50        return a
51    }, D.extend({
52        expando: "jQuery" + (a + Math.random()).replace(/\D/g, ""), isReady: !0, error: function (t) {
53            throw new Error(t)
54        }, noop: function () {
55        }, isFunction: function (t) {
56            return "function" === D.type(t)
57        }, isArray: Array.isArray, isWindow: function (t) {
58            return null != t && t === t.window
59        }, isNumeric: function (t) {
60            var e = t && t.toString();
61            return !D.isArray(t) && 0 <= e - parseFloat(e) + 1
62        }, isPlainObject: function (t) {
63            var e;
64            if ("object" !== D.type(t) || t.nodeType || D.isWindow(t)) return !1;
65            if (t.constructor && !f.call(t, "constructor") && !f.call(t.constructor.prototype || {}, "isPrototypeOf")) return !1;
66            for (e in t) ;
67            return void 0 === e || f.call(t, e)
68        }, isEmptyObject: function (t) {
69            var e;
70            for (e in t) return !1;
71            return !0
72        }, type: function (t) {
73            return null == t ? t + "" : "object" == typeof t || "function" == typeof t ? n[o.call(t)] || "object" : typeof t
74        }, globalEval: function (t) {
75            var e, i = eval;
76            (t = D.trim(t)) && (1 === t.indexOf("use strict") ? ((e = C.createElement("script")).text = t, C.head.appendChild(e).parentNode.removeChild(e)) : i(t))
77        }, camelCase: function (t) {
78            return t.replace(h, "ms-").replace(u, e)
79        }, nodeName: function (t, e) {
80            return t.nodeName && t.nodeName.toLowerCase() === e.toLowerCase()
81        }, each: function (t, e) {
82            var i, n = 0;
83            if (d(t)) for (i = t.length; n < i && !1 !== e.call(t[n], n, t[n]); n++) ; else for (n in t) if (!1 === e.call(t[n], n, t[n])) break;
84            return t
85        }, trim: function (t) {
86            return null == t ? "" : (t + "").replace(l, "")
87        }, makeArray: function (t, e) {
88            var i = e || [];
89            return null != t && (d(Object(t)) ? D.merge(i, "string" == typeof t ? [t] : t) : r.call(i, t)), i
90        }, inArray: function (t, e, i) {
91            return null == e ? -1 : s.call(e, t, i)
92        }, merge: function (t, e) {
93            for (var i = +e.length, n = 0, s = t.length; n < i; n++) t[s++] = e[n];
94            return t.length = s, t
95        }, grep: function (t, e, i) {
96            for (var n = [], s = 0, o = t.length, a = !i; s < o; s++) !e(t[s], s) != a && n.push(t[s]);
97            return n
98        }, map: function (t, e, i) {
99            var n, s, o = 0, a = [];
100            if (d(t)) for (n = t.length; o < n; o++) null != (s = e(t[o], o, i)) && a.push(s); else for (o in t) null != (s = e(t[o], o, i)) && a.push(s);
101            return m.apply([], a)
102        }, guid: 1, proxy: function (t, e) {
103            var i, n, s;
104            return "string" == typeof e && (i = t[e], e = t, t = i), D.isFunction(t) ? (n = c.call(arguments, 2), (s = function () {
105                return t.apply(e || this, n.concat(c.call(arguments)))
106            }).guid = t.guid = t.guid || D.guid++, s) : void 0
107        }, now: Date.now, support: g
108    }), "function" == typeof Symbol && (D.fn[Symbol.iterator] = i[Symbol.iterator]), D.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "), function (t, e) {
109        n["[object " + e + "]"] = e.toLowerCase()
110    });
111    var p = function (i) {
112        function u(t, e, i) {
113            var n = "0x" + e - 65536;
114            return n != n || i ? e : n < 0 ? String.fromCharCode(65536 + n) : String.fromCharCode(n >> 10 | 55296, 1023 & n | 56320)
115        }
116
117        function s() {
118            x()
119        }
120
121        var t, f, _, o, a, m, d, g, w, l, h, x, k, r, C, v, c, p, y, D = "sizzle" + 1 * new Date, b = i.document, T = 0,
122            n = 0, S = st(), I = st(), P = st(), M = function (t, e) {
123                return t === e && (h = !0), 0
124            }, $ = {}.hasOwnProperty, e = [], E = e.pop, N = e.push, A = e.push, O = e.slice, H = function (t, e) {
125                for (var i = 0, n = t.length; i < n; i++) if (t[i] === e) return i;
126                return -1
127            },
128            z = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",
129            F = "[\\x20\\t\\r\\n\\f]", L = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",
130            j = "\\[" + F + "*(" + L + ")(?:" + F + "*([*^$|!~]?=)" + F + "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + L + "))|)" + F + "*\\]",
131            R = ":(" + L + ")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|" + j + ")*)|.*)\\)|)",
132            W = new RegExp(F + "+", "g"), B = new RegExp("^" + F + "+|((?:^|[^\\\\])(?:\\\\.)*)" + F + "+$", "g"),
133            q = new RegExp("^" + F + "*," + F + "*"), U = new RegExp("^" + F + "*([>+~]|" + F + ")" + F + "*"),
134            Y = new RegExp("=" + F + "*([^\\]'\"]*?)" + F + "*\\]", "g"), V = new RegExp(R),
135            K = new RegExp("^" + L + "$"), X = {
136                ID: new RegExp("^#(" + L + ")"),
137                CLASS: new RegExp("^\\.(" + L + ")"),
138                TAG: new RegExp("^(" + L + "|[*])"),
139                ATTR: new RegExp("^" + j),
140                PSEUDO: new RegExp("^" + R),
141                CHILD: new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + F + "*(even|odd|(([+-]|)(\\d*)n|)" + F + "*(?:([+-]|)" + F + "*(\\d+)|))" + F + "*\\)|)", "i"),
142                bool: new RegExp("^(?:" + z + ")$", "i"),
143                needsContext: new RegExp("^" + F + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + F + "*((?:-\\d)?\\d*)" + F + "*\\)|)(?=[^-]|$)", "i")
144            }, Q = /^(?:input|select|textarea|button)$/i, G = /^h\d$/i, J = /^[^{]+\{\s*\[native \w/,
145            Z = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, tt = /[+~]/, et = /'|\\/g,
146            it = new RegExp("\\\\([\\da-f]{1,6}" + F + "?|(" + F + ")|.)", "ig");
147        try {
148            A.apply(e = O.call(b.childNodes), b.childNodes), e[b.childNodes.length].nodeType
149        } catch (t) {
150            A = {
151                apply: e.length ? function (t, e) {
152                    N.apply(t, O.call(e))
153                } : function (t, e) {
154                    for (var i = t.length, n = 0; t[i++] = e[n++];) ;
155                    t.length = i - 1
156                }
157            }
158        }
159
160        function nt(t, e, i, n) {
161            var s, o, a, r, l, h, c, u, d = e && e.ownerDocument, p = e ? e.nodeType : 9;
162            if (i = i || [], "string" != typeof t || !t || 1 !== p && 9 !== p && 11 !== p) return i;
163            if (!n && ((e ? e.ownerDocument || e : b) !== k && x(e), e = e || k, C)) {
164                if (11 !== p && (h = Z.exec(t))) if (s = h[1]) {
165                    if (9 === p) {
166                        if (!(a = e.getElementById(s))) return i;
167                        if (a.id === s) return i.push(a), i
168                    } else if (d && (a = d.getElementById(s)) && y(e, a) && a.id === s) return i.push(a), i
169                } else {
170                    if (h[2]) return A.apply(i, e.getElementsByTagName(t)), i;
171                    if ((s = h[3]) && f.getElementsByClassName && e.getElementsByClassName) return A.apply(i, e.getElementsByClassName(s)), i
172                }
173                if (f.qsa && !P[t + " "] && (!v || !v.test(t))) {
174                    if (1 !== p) d = e, u = t; else if ("object" !== e.nodeName.toLowerCase()) {
175                        for ((r = e.getAttribute("id")) ? r = r.replace(et, "\\$&") : e.setAttribute("id", r = D), o = (c = m(t)).length, l = K.test(r) ? "#" + r : "[id='" + r + "']"; o--;) c[o] = l + " " + ft(c[o]);
176                        u = c.join(","), d = tt.test(t) && dt(e.parentNode) || e
177                    }
178                    if (u) try {
179                        return A.apply(i, d.querySelectorAll(u)), i
180                    } catch (t) {
181                    } finally {
182                        r === D && e.removeAttribute("id")
183                    }
184                }
185            }
186            return g(t.replace(B, "$1"), e, i, n)
187        }
188
189        function st() {
190            var n = [];
191            return function t(e, i) {
192                return n.push(e + " ") > _.cacheLength && delete t[n.shift()], t[e + " "] = i
193            }
194        }
195
196        function ot(t) {
197            return t[D] = !0, t
198        }
199
200        function at(t) {
201            var e = k.createElement("div");
202            try {
203                return !!t(e)
204            } catch (t) {
205                return !1
206            } finally {
207                e.parentNode && e.parentNode.removeChild(e), e = null
208            }
209        }
210
211        function rt(t, e) {
212            for (var i = t.split("|"), n = i.length; n--;) _.attrHandle[i[n]] = e
213        }
214
215        function lt(t, e) {
216            var i = e && t,
217                n = i && 1 === t.nodeType && 1 === e.nodeType && (~e.sourceIndex || 1 << 31) - (~t.sourceIndex || 1 << 31);
218            if (n) return n;
219            if (i) for (; i = i.nextSibling;) if (i === e) return -1;
220            return t ? 1 : -1
221        }
222
223        function ht(e) {
224            return function (t) {
225                return "input" === t.nodeName.toLowerCase() && t.type === e
226            }
227        }
228
229        function ct(i) {
230            return function (t) {
231                var e = t.nodeName.toLowerCase();
232                return ("input" === e || "button" === e) && t.type === i
233            }
234        }
235
236        function ut(a) {
237            return ot(function (o) {
238                return o = +o, ot(function (t, e) {
239                    for (var i, n = a([], t.length, o), s = n.length; s--;) t[i = n[s]] && (t[i] = !(e[i] = t[i]))
240                })
241            })
242        }
243
244        function dt(t) {
245            return t && void 0 !== t.getElementsByTagName && t
246        }
247
248        for (t in f = nt.support = {}, a = nt.isXML = function (t) {
249            var e = t && (t.ownerDocument || t).documentElement;
250            return !!e && "HTML" !== e.nodeName
251        }, x = nt.setDocument = function (t) {
252            var e, i, n = t ? t.ownerDocument || t : b;
253            return n !== k && 9 === n.nodeType && n.documentElement && (r = (k = n).documentElement, C = !a(k), (i = k.defaultView) && i.top !== i && (i.addEventListener ? i.addEventListener("unload", s, !1) : i.attachEvent && i.attachEvent("onunload", s)), f.attributes = at(function (t) {
254                return t.className = "i", !t.getAttribute("className")
255            }), f.getElementsByTagName = at(function (t) {
256                return t.appendChild(k.createComment("")), !t.getElementsByTagName("*").length
257            }), f.getElementsByClassName = J.test(k.getElementsByClassName), f.getById = at(function (t) {
258                return r.appendChild(t).id = D, !k.getElementsByName || !k.getElementsByName(D).length
259            }), f.getById ? (_.find.ID = function (t, e) {
260                if (void 0 !== e.getElementById && C) {
261                    var i = e.getElementById(t);
262                    return i ? [i] : []
263                }
264            }, _.filter.ID = function (t) {
265                var e = t.replace(it, u);
266                return function (t) {
267                    return t.getAttribute("id") === e
268                }
269            }) : (delete _.find.ID, _.filter.ID = function (t) {
270                var i = t.replace(it, u);
271                return function (t) {
272                    var e = void 0 !== t.getAttributeNode && t.getAttributeNode("id");
273                    return e && e.value === i
274                }
275            }), _.find.TAG = f.getElementsByTagName ? function (t, e) {
276                return void 0 !== e.getElementsByTagName ? e.getElementsByTagName(t) : f.qsa ? e.querySelectorAll(t) : void 0
277            } : function (t, e) {
278                var i, n = [], s = 0, o = e.getElementsByTagName(t);
279                if ("*" !== t) return o;
280                for (; i = o[s++];) 1 === i.nodeType && n.push(i);
281                return n
282            }, _.find.CLASS = f.getElementsByClassName && function (t, e) {
283                return void 0 !== e.getElementsByClassName && C ? e.getElementsByClassName(t) : void 0
284            }, c = [], v = [], (f.qsa = J.test(k.querySelectorAll)) && (at(function (t) {
285                r.appendChild(t).innerHTML = "<a id='" + D + "'></a><select id='" + D + "-\r\\' msallowcapture=''><option selected=''></option></select>", t.querySelectorAll("[msallowcapture^='']").length && v.push("[*^$]=" + F + "*(?:''|\"\")"), t.querySelectorAll("[selected]").length || v.push("\\[" + F + "*(?:value|" + z + ")"), t.querySelectorAll("[id~=" + D + "-]").length || v.push("~="), t.querySelectorAll(":checked").length || v.push(":checked"), t.querySelectorAll("a#" + D + "+*").length || v.push(".#.+[+~]")
286            }), at(function (t) {
287                var e = k.createElement("input");
288                e.setAttribute("type", "hidden"), t.appendChild(e).setAttribute("name", "D"), t.querySelectorAll("[name=d]").length && v.push("name" + F + "*[*^$|!~]?="), t.querySelectorAll(":enabled").length || v.push(":enabled", ":disabled"), t.querySelectorAll("*,:x"), v.push(",.*:")
289            })), (f.matchesSelector = J.test(p = r.matches || r.webkitMatchesSelector || r.mozMatchesSelector || r.oMatchesSelector || r.msMatchesSelector)) && at(function (t) {
290                f.disconnectedMatch = p.call(t, "div"), p.call(t, "[s!='']:x"), c.push("!=", R)
291            }), v = v.length && new RegExp(v.join("|")), c = c.length && new RegExp(c.join("|")), e = J.test(r.compareDocumentPosition), y = e || J.test(r.contains) ? function (t, e) {
292                var i = 9 === t.nodeType ? t.documentElement : t, n = e && e.parentNode;
293                return t === n || !(!n || 1 !== n.nodeType || !(i.contains ? i.contains(n) : t.compareDocumentPosition && 16 & t.compareDocumentPosition(n)))
294            } : function (t, e) {
295                if (e) for (; e = e.parentNode;) if (e === t) return !0;
296                return !1
297            }, M = e ? function (t, e) {
298                if (t === e) return h = !0, 0;
299                var i = !t.compareDocumentPosition - !e.compareDocumentPosition;
300                return i || (1 & (i = (t.ownerDocument || t) === (e.ownerDocument || e) ? t.compareDocumentPosition(e) : 1) || !f.sortDetached && e.compareDocumentPosition(t) === i ? t === k || t.ownerDocument === b && y(b, t) ? -1 : e === k || e.ownerDocument === b && y(b, e) ? 1 : l ? H(l, t) - H(l, e) : 0 : 4 & i ? -1 : 1)
301            } : function (t, e) {
302                if (t === e) return h = !0, 0;
303                var i, n = 0, s = t.parentNode, o = e.parentNode, a = [t], r = [e];
304                if (!s || !o) return t === k ? -1 : e === k ? 1 : s ? -1 : o ? 1 : l ? H(l, t) - H(l, e) : 0;
305                if (s === o) return lt(t, e);
306                for (i = t; i = i.parentNode;) a.unshift(i);
307                for (i = e; i = i.parentNode;) r.unshift(i);
308                for (; a[n] === r[n];) n++;
309                return n ? lt(a[n], r[n]) : a[n] === b ? -1 : r[n] === b ? 1 : 0
310            }), k
311        }, nt.matches = function (t, e) {
312            return nt(t, null, null, e)
313        }, nt.matchesSelector = function (t, e) {
314            if ((t.ownerDocument || t) !== k && x(t), e = e.replace(Y, "='$1']"), f.matchesSelector && C && !P[e + " "] && (!c || !c.test(e)) && (!v || !v.test(e))) try {
315                var i = p.call(t, e);
316                if (i || f.disconnectedMatch || t.document && 11 !== t.document.nodeType) return i
317            } catch (t) {
318            }
319            return 0 < nt(e, k, null, [t]).length
320        }, nt.contains = function (t, e) {
321            return (t.ownerDocument || t) !== k && x(t), y(t, e)
322        }, nt.attr = function (t, e) {
323            (t.ownerDocument || t) !== k && x(t);
324            var i = _.attrHandle[e.toLowerCase()],
325                n = i && $.call(_.attrHandle, e.toLowerCase()) ? i(t, e, !C) : void 0;
326            return void 0 !== n ? n : f.attributes || !C ? t.getAttribute(e) : (n = t.getAttributeNode(e)) && n.specified ? n.value : null
327        }, nt.error = function (t) {
328            throw new Error("Syntax error, unrecognized expression: " + t)
329        }, nt.uniqueSort = function (t) {
330            var e, i = [], n = 0, s = 0;
331            if (h = !f.detectDuplicates, l = !f.sortStable && t.slice(0), t.sort(M), h) {
332                for (; e = t[s++];) e === t[s] && (n = i.push(s));
333                for (; n--;) t.splice(i[n], 1)
334            }
335            return l = null, t
336        }, o = nt.getText = function (t) {
337            var e, i = "", n = 0, s = t.nodeType;
338            if (s) {
339                if (1 === s || 9 === s || 11 === s) {
340                    if ("string" == typeof t.textContent) return t.textContent;
341                    for (t = t.firstChild; t; t = t.nextSibling) i += o(t)
342                } else if (3 === s || 4 === s) return t.nodeValue
343            } else for (; e = t[n++];) i += o(e);
344            return i
345        }, (_ = nt.selectors = {
346            cacheLength: 50,
347            createPseudo: ot,
348            match: X,
349            attrHandle: {},
350            find: {},
351            relative: {
352                ">": {dir: "parentNode", first: !0},
353                " ": {dir: "parentNode"},
354                "+": {dir: "previousSibling", first: !0},
355                "~": {dir: "previousSibling"}
356            },
357            preFilter: {
358                ATTR: function (t) {
359                    return t[1] = t[1].replace(it, u), t[3] = (t[3] || t[4] || t[5] || "").replace(it, u), "~=" === t[2] && (t[3] = " " + t[3] + " "), t.slice(0, 4)
360                }, CHILD: function (t) {
361                    return t[1] = t[1].toLowerCase(), "nth" === t[1].slice(0, 3) ? (t[3] || nt.error(t[0]), t[4] = +(t[4] ? t[5] + (t[6] || 1) : 2 * ("even" === t[3] || "odd" === t[3])), t[5] = +(t[7] + t[8] || "odd" === t[3])) : t[3] && nt.error(t[0]), t
362                }, PSEUDO: function (t) {
363                    var e, i = !t[6] && t[2];
364                    return X.CHILD.test(t[0]) ? null : (t[3] ? t[2] = t[4] || t[5] || "" : i && V.test(i) && (e = m(i, !0)) && (e = i.indexOf(")", i.length - e) - i.length) && (t[0] = t[0].slice(0, e), t[2] = i.slice(0, e)), t.slice(0, 3))
365                }
366            },
367            filter: {
368                TAG: function (t) {
369                    var e = t.replace(it, u).toLowerCase();
370                    return "*" === t ? function () {
371                        return !0
372                    } : function (t) {
373                        return t.nodeName && t.nodeName.toLowerCase() === e
374                    }
375                }, CLASS: function (t) {
376                    var e = S[t + " "];
377                    return e || (e = new RegExp("(^|" + F + ")" + t + "(" + F + "|$)")) && S(t, function (t) {
378                        return e.test("string" == typeof t.className && t.className || void 0 !== t.getAttribute && t.getAttribute("class") || "")
379                    })
380                }, ATTR: function (i, n, s) {
381                    return function (t) {
382                        var e = nt.attr(t, i);
383                        return null == e ? "!=" === n : !n || (e += "", "=" === n ? e === s : "!=" === n ? e !== s : "^=" === n ? s && 0 === e.indexOf(s) : "*=" === n ? s && -1 < e.indexOf(s) : "$=" === n ? s && e.slice(-s.length) === s : "~=" === n ? -1 < (" " + e.replace(W, " ") + " ").indexOf(s) : "|=" === n && (e === s || e.slice(0, s.length + 1) === s + "-"))
384                    }
385                }, CHILD: function (f, t, e, m, g) {
386                    var v = "nth" !== f.slice(0, 3), y = "last" !== f.slice(-4), b = "of-type" === t;
387                    return 1 === m && 0 === g ? function (t) {
388                        return !!t.parentNode
389                    } : function (t, e, i) {
390                        var n, s, o, a, r, l, h = v != y ? "nextSibling" : "previousSibling", c = t.parentNode,
391                            u = b && t.nodeName.toLowerCase(), d = !i && !b, p = !1;
392                        if (c) {
393                            if (v) {
394                                for (; h;) {
395                                    for (a = t; a = a[h];) if (b ? a.nodeName.toLowerCase() === u : 1 === a.nodeType) return !1;
396                                    l = h = "only" === f && !l && "nextSibling"
397                                }
398                                return !0
399                            }
400                            if (l = [y ? c.firstChild : c.lastChild], y && d) {
401                                for (p = (r = (n = (s = (o = (a = c)[D] || (a[D] = {}))[a.uniqueID] || (o[a.uniqueID] = {}))[f] || [])[0] === T && n[1]) && n[2], a = r && c.childNodes[r]; a = ++r && a && a[h] || (p = r = 0) || l.pop();) if (1 === a.nodeType && ++p && a === t) {
402                                    s[f] = [T, r, p];
403                                    break
404                                }
405                            } else if (d && (p = r = (n = (s = (o = (a = t)[D] || (a[D] = {}))[a.uniqueID] || (o[a.uniqueID] = {}))[f] || [])[0] === T && n[1]), !1 === p) for (; (a = ++r && a && a[h] || (p = r = 0) || l.pop()) && ((b ? a.nodeName.toLowerCase() !== u : 1 !== a.nodeType) || !++p || (d && ((s = (o = a[D] || (a[D] = {}))[a.uniqueID] || (o[a.uniqueID] = {}))[f] = [T, p]), a !== t));) ;
406                            return (p -= g) === m || p % m == 0 && 0 <= p / m
407                        }
408                    }
409                }, PSEUDO: function (t, o) {
410                    var e, a = _.pseudos[t] || _.setFilters[t.toLowerCase()] || nt.error("unsupported pseudo: " + t);
411                    return a[D] ? a(o) : 1 < a.length ? (e = [t, t, "", o], _.setFilters.hasOwnProperty(t.toLowerCase()) ? ot(function (t, e) {
412                        for (var i, n = a(t, o), s = n.length; s--;) t[i = H(t, n[s])] = !(e[i] = n[s])
413                    }) : function (t) {
414                        return a(t, 0, e)
415                    }) : a
416                }
417            },
418            pseudos: {
419                not: ot(function (t) {
420                    var n = [], s = [], r = d(t.replace(B, "$1"));
421                    return r[D] ? ot(function (t, e, i, n) {
422                        for (var s, o = r(t, null, n, []), a = t.length; a--;) (s = o[a]) && (t[a] = !(e[a] = s))
423                    }) : function (t, e, i) {
424                        return n[0] = t, r(n, null, i, s), n[0] = null, !s.pop()
425                    }
426                }), has: ot(function (e) {
427                    return function (t) {
428                        return 0 < nt(e, t).length
429                    }
430                }), contains: ot(function (e) {
431                    return e = e.replace(it, u), function (t) {
432                        return -1 < (t.textContent || t.innerText || o(t)).indexOf(e)
433                    }
434                }), lang: ot(function (i) {
435                    return K.test(i || "") || nt.error("unsupported lang: " + i), i = i.replace(it, u).toLowerCase(), function (t) {
436                        var e;
437                        do {
438                            if (e = C ? t.lang : t.getAttribute("xml:lang") || t.getAttribute("lang")) return (e = e.toLowerCase()) === i || 0 === e.indexOf(i + "-")
439                        } while ((t = t.parentNode) && 1 === t.nodeType);
440                        return !1
441                    }
442                }), target: function (t) {
443                    var e = i.location && i.location.hash;
444                    return e && e.slice(1) === t.id
445                }, root: function (t) {
446                    return t === r
447                }, focus: function (t) {
448                    return t === k.activeElement && (!k.hasFocus || k.hasFocus()) && !!(t.type || t.href || ~t.tabIndex)
449                }, enabled: function (t) {
450                    return !1 === t.disabled
451                }, disabled: function (t) {
452                    return !0 === t.disabled
453                }, checked: function (t) {
454                    var e = t.nodeName.toLowerCase();
455                    return "input" === e && !!t.checked || "option" === e && !!t.selected
456                }, selected: function (t) {
457                    return t.parentNode && t.parentNode.selectedIndex, !0 === t.selected
458                }, empty: function (t) {
459                    for (t = t.firstChild; t; t = t.nextSibling) if (t.nodeType < 6) return !1;
460                    return !0
461                }, parent: function (t) {
462                    return !_.pseudos.empty(t)
463                }, header: function (t) {
464                    return G.test(t.nodeName)
465                }, input: function (t) {
466                    return Q.test(t.nodeName)
467                }, button: function (t) {
468                    var e = t.nodeName.toLowerCase();
469                    return "input" === e && "button" === t.type || "button" === e
470                }, text: function (t) {
471                    var e;
472                    return "input" === t.nodeName.toLowerCase() && "text" === t.type && (null == (e = t.getAttribute("type")) || "text" === e.toLowerCase())
473                }, first: ut(function () {
474                    return [0]
475                }), last: ut(function (t, e) {
476                    return [e - 1]
477                }), eq: ut(function (t, e, i) {
478                    return [i < 0 ? i + e : i]
479                }), even: ut(function (t, e) {
480                    for (var i = 0; i < e; i += 2) t.push(i);
481                    return t
482                }), odd: ut(function (t, e) {
483                    for (var i = 1; i < e; i += 2) t.push(i);
484                    return t
485                }), lt: ut(function (t, e, i) {
486                    for (var n = i < 0 ? i + e : i; 0 <= --n;) t.push(n);
487                    return t
488                }), gt: ut(function (t, e, i) {
489                    for (var n = i < 0 ? i + e : i; ++n < e;) t.push(n);
490                    return t
491                })
492            }
493        }).pseudos.nth = _.pseudos.eq, {
494            radio: !0,
495            checkbox: !0,
496            file: !0,
497            password: !0,
498            image: !0
499        }) _.pseudos[t] = ht(t);
500        for (t in {submit: !0, reset: !0}) _.pseudos[t] = ct(t);
501
502        function pt() {
503        }
504
505        function ft(t) {
506            for (var e = 0, i = t.length, n = ""; e < i; e++) n += t[e].value;
507            return n
508        }
509
510        function mt(r, t, e) {
511            var l = t.dir, h = e && "parentNode" === l, c = n++;
512            return t.first ? function (t, e, i) {
513                for (; t = t[l];) if (1 === t.nodeType || h) return r(t, e, i)
514            } : function (t, e, i) {
515                var n, s, o, a = [T, c];
516                if (i) {
517                    for (; t = t[l];) if ((1 === t.nodeType || h) && r(t, e, i)) return !0
518                } else for (; t = t[l];) if (1 === t.nodeType || h) {
519                    if ((n = (s = (o = t[D] || (t[D] = {}))[t.uniqueID] || (o[t.uniqueID] = {}))[l]) && n[0] === T && n[1] === c) return a[2] = n[2];
520                    if ((s[l] = a)[2] = r(t, e, i)) return !0
521                }
522            }
523        }
524
525        function gt(s) {
526            return 1 < s.length ? function (t, e, i) {
527                for (var n = s.length; n--;) if (!s[n](t, e, i)) return !1;
528                return !0
529            } : s[0]
530        }
531
532        function vt(t, e, i, n, s) {
533            for (var o, a = [], r = 0, l = t.length, h = null != e; r < l; r++) (o = t[r]) && (i && !i(o, n, s) || (a.push(o), h && e.push(r)));
534            return a
535        }
536
537        function yt(p, f, m, g, v, t) {
538            return g && !g[D] && (g = yt(g)), v && !v[D] && (v = yt(v, t)), ot(function (t, e, i, n) {
539                var s, o, a, r = [], l = [], h = e.length, c = t || function (t, e, i) {
540                        for (var n = 0, s = e.length; n < s; n++) nt(t, e[n], i);
541                        return i
542                    }(f || "*", i.nodeType ? [i] : i, []), u = !p || !t && f ? c : vt(c, r, p, i, n),
543                    d = m ? v || (t ? p : h || g) ? [] : e : u;
544                if (m && m(u, d, i, n), g) for (s = vt(d, l), g(s, [], i, n), o = s.length; o--;) (a = s[o]) && (d[l[o]] = !(u[l[o]] = a));
545                if (t) {
546                    if (v || p) {
547                        if (v) {
548                            for (s = [], o = d.length; o--;) (a = d[o]) && s.push(u[o] = a);
549                            v(null, d = [], s, n)
550                        }
551                        for (o = d.length; o--;) (a = d[o]) && -1 < (s = v ? H(t, a) : r[o]) && (t[s] = !(e[s] = a))
552                    }
553                } else d = vt(d === e ? d.splice(h, d.length) : d), v ? v(null, e, d, n) : A.apply(e, d)
554            })
555        }
556
557        function bt(t) {
558            for (var s, e, i, n = t.length, o = _.relative[t[0].type], a = o || _.relative[" "], r = o ? 1 : 0, l = mt(function (t) {
559                return t === s
560            }, a, !0), h = mt(function (t) {
561                return -1 < H(s, t)
562            }, a, !0), c = [function (t, e, i) {
563                var n = !o && (i || e !== w) || ((s = e).nodeType ? l(t, e, i) : h(t, e, i));
564                return s = null, n
565            }]; r < n; r++) if (e = _.relative[t[r].type]) c = [mt(gt(c), e)]; else {
566                if ((e = _.filter[t[r].type].apply(null, t[r].matches))[D]) {
567                    for (i = ++r; i < n && !_.relative[t[i].type]; i++) ;
568                    return yt(1 < r && gt(c), 1 < r && ft(t.slice(0, r - 1).concat({value: " " === t[r - 2].type ? "*" : ""})).replace(B, "$1"), e, r < i && bt(t.slice(r, i)), i < n && bt(t = t.slice(i)), i < n && ft(t))
569                }
570                c.push(e)
571            }
572            return gt(c)
573        }
574
575        return pt.prototype = _.filters = _.pseudos, _.setFilters = new pt, m = nt.tokenize = function (t, e) {
576            var i, n, s, o, a, r, l, h = I[t + " "];
577            if (h) return e ? 0 : h.slice(0);
578            for (a = t, r = [], l = _.preFilter; a;) {
579                for (o in i && !(n = q.exec(a)) || (n && (a = a.slice(n[0].length) || a), r.push(s = [])), i = !1, (n = U.exec(a)) && (i = n.shift(), s.push({
580                    value: i,
581                    type: n[0].replace(B, " ")
582                }), a = a.slice(i.length)), _.filter) !(n = X[o].exec(a)) || l[o] && !(n = l[o](n)) || (i = n.shift(), s.push({
583                    value: i,
584                    type: o,
585                    matches: n
586                }), a = a.slice(i.length));
587                if (!i) break
588            }
589            return e ? a.length : a ? nt.error(t) : I(t, r).slice(0)
590        }, d = nt.compile = function (t, e) {
591            var i, n = [], s = [], o = P[t + " "];
592            if (!o) {
593                for (i = (e = e || m(t)).length; i--;) (o = bt(e[i]))[D] ? n.push(o) : s.push(o);
594                (o = P(t, function (g, v) {
595                    function t(t, e, i, n, s) {
596                        var o, a, r, l = 0, h = "0", c = t && [], u = [], d = w, p = t || b && _.find.TAG("*", s),
597                            f = T += null == d ? 1 : Math.random() || .1, m = p.length;
598                        for (s && (w = e === k || e || s); h !== m && null != (o = p[h]); h++) {
599                            if (b && o) {
600                                for (a = 0, e || o.ownerDocument === k || (x(o), i = !C); r = g[a++];) if (r(o, e || k, i)) {
601                                    n.push(o);
602                                    break
603                                }
604                                s && (T = f)
605                            }
606                            y && ((o = !r && o) && l--, t && c.push(o))
607                        }
608                        if (l += h, y && h !== l) {
609                            for (a = 0; r = v[a++];) r(c, u, e, i);
610                            if (t) {
611                                if (0 < l) for (; h--;) c[h] || u[h] || (u[h] = E.call(n));
612                                u = vt(u)
613                            }
614                            A.apply(n, u), s && !t && 0 < u.length && 1 < l + v.length && nt.uniqueSort(n)
615                        }
616                        return s && (T = f, w = d), c
617                    }
618
619                    var y = 0 < v.length, b = 0 < g.length;
620                    return y ? ot(t) : t
621                }(s, n))).selector = t
622            }
623            return o
624        }, g = nt.select = function (t, e, i, n) {
625            var s, o, a, r, l, h = "function" == typeof t && t, c = !n && m(t = h.selector || t);
626            if (i = i || [], 1 === c.length) {
627                if (2 < (o = c[0] = c[0].slice(0)).length && "ID" === (a = o[0]).type && f.getById && 9 === e.nodeType && C && _.relative[o[1].type]) {
628                    if (!(e = (_.find.ID(a.matches[0].replace(it, u), e) || [])[0])) return i;
629                    h && (e = e.parentNode), t = t.slice(o.shift().value.length)
630                }
631                for (s = X.needsContext.test(t) ? 0 : o.length; s-- && (a = o[s], !_.relative[r = a.type]);) if ((l = _.find[r]) && (n = l(a.matches[0].replace(it, u), tt.test(o[0].type) && dt(e.parentNode) || e))) {
632                    if (o.splice(s, 1), !(t = n.length && ft(o))) return A.apply(i, n), i;
633                    break
634                }
635            }
636            return (h || d(t, c))(n, e, !C, i, !e || tt.test(t) && dt(e.parentNode) || e), i
637        }, f.sortStable = D.split("").sort(M).join("") === D, f.detectDuplicates = !!h, x(), f.sortDetached = at(function (t) {
638            return 1 & t.compareDocumentPosition(k.createElement("div"))
639        }), at(function (t) {
640            return t.innerHTML = "<a href='#'></a>", "#" === t.firstChild.getAttribute("href")
641        }) || rt("type|href|height|width", function (t, e, i) {
642            return i ? void 0 : t.getAttribute(e, "type" === e.toLowerCase() ? 1 : 2)
643        }), f.attributes && at(function (t) {
644            return t.innerHTML = "<input/>", t.firstChild.setAttribute("value", ""), "" === t.firstChild.getAttribute("value")
645        }) || rt("value", function (t, e, i) {
646            return i || "input" !== t.nodeName.toLowerCase() ? void 0 : t.defaultValue
647        }), at(function (t) {
648            return null == t.getAttribute("disabled")
649        }) || rt(z, function (t, e, i) {
650            var n;
651            return i ? void 0 : !0 === t[e] ? e.toLowerCase() : (n = t.getAttributeNode(e)) && n.specified ? n.value : null
652        }), nt
653    }(k);
654    D.find = p, D.expr = p.selectors, D.expr[":"] = D.expr.pseudos, D.uniqueSort = D.unique = p.uniqueSort, D.text = p.getText, D.isXMLDoc = p.isXML, D.contains = p.contains;
655
656    function v(t, e, i) {
657        for (var n = [], s = void 0 !== i; (t = t[e]) && 9 !== t.nodeType;) if (1 === t.nodeType) {
658            if (s && D(t).is(i)) break;
659            n.push(t)
660        }
661        return n
662    }
663
664    function y(t, e) {
665        for (var i = []; t; t = t.nextSibling) 1 === t.nodeType && t !== e && i.push(t);
666        return i
667    }
668
669    var b = D.expr.match.needsContext, _ = /^<([\w-]+)\s*\/?>(?:<\/\1>|)$/, w = /^.[^:#\[\.,]*$/;
670
671    function x(t, i, n) {
672        if (D.isFunction(i)) return D.grep(t, function (t, e) {
673            return !!i.call(t, e, t) !== n
674        });
675        if (i.nodeType) return D.grep(t, function (t) {
676            return t === i !== n
677        });
678        if ("string" == typeof i) {
679            if (w.test(i)) return D.filter(i, t, n);
680            i = D.filter(i, t)
681        }
682        return D.grep(t, function (t) {
683            return -1 < s.call(i, t) !== n
684        })
685    }
686
687    D.filter = function (t, e, i) {
688        var n = e[0];
689        return i && (t = ":not(" + t + ")"), 1 === e.length && 1 === n.nodeType ? D.find.matchesSelector(n, t) ? [n] : [] : D.find.matches(t, D.grep(e, function (t) {
690            return 1 === t.nodeType
691        }))
692    }, D.fn.extend({
693        find: function (t) {
694            var e, i = this.length, n = [], s = this;
695            if ("string" != typeof t) return this.pushStack(D(t).filter(function () {
696                for (e = 0; e < i; e++) if (D.contains(s[e], this)) return !0
697            }));
698            for (e = 0; e < i; e++) D.find(t, s[e], n);
699            return (n = this.pushStack(1 < i ? D.unique(n) : n)).selector = this.selector ? this.selector + " " + t : t, n
700        }, filter: function (t) {
701            return this.pushStack(x(this, t || [], !1))
702        }, not: function (t) {
703            return this.pushStack(x(this, t || [], !0))
704        }, is: function (t) {
705            return !!x(this, "string" == typeof t && b.test(t) ? D(t) : t || [], !1).length
706        }
707    });
708    var T, S = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/;
709    (D.fn.init = function (t, e, i) {
710        var n, s;
711        if (!t) return this;
712        if (i = i || T, "string" != typeof t) return t.nodeType ? (this.context = this[0] = t, this.length = 1, this) : D.isFunction(t) ? void 0 !== i.ready ? i.ready(t) : t(D) : (void 0 !== t.selector && (this.selector = t.selector, this.context = t.context), D.makeArray(t, this));
713        if (!(n = "<" === t[0] && ">" === t[t.length - 1] && 3 <= t.length ? [null, t, null] : S.exec(t)) || !n[1] && e) return !e || e.jquery ? (e || i).find(t) : this.constructor(e).find(t);
714        if (n[1]) {
715            if (e = e instanceof D ? e[0] : e, D.merge(this, D.parseHTML(n[1], e && e.nodeType ? e.ownerDocument || e : C, !0)), _.test(n[1]) && D.isPlainObject(e)) for (n in e) D.isFunction(this[n]) ? this[n](e[n]) : this.attr(n, e[n]);
716            return this
717        }
718        return (s = C.getElementById(n[2])) && s.parentNode && (this.length = 1, this[0] = s), this.context = C, this.selector = t, this
719    }).prototype = D.fn, T = D(C);
720    var I = /^(?:parents|prev(?:Until|All))/, P = {children: !0, contents: !0, next: !0, prev: !0};
721
722    function M(t, e) {
723        for (; (t = t[e]) && 1 !== t.nodeType;) ;
724        return t
725    }
726
727    D.fn.extend({
728        has: function (t) {
729            var e = D(t, this), i = e.length;
730            return this.filter(function () {
731                for (var t = 0; t < i; t++) if (D.contains(this, e[t])) return !0
732            })
733        }, closest: function (t, e) {
734            for (var i, n = 0, s = this.length, o = [], a = b.test(t) || "string" != typeof t ? D(t, e || this.context) : 0; n < s; n++) for (i = this[n]; i && i !== e; i = i.parentNode) if (i.nodeType < 11 && (a ? -1 < a.index(i) : 1 === i.nodeType && D.find.matchesSelector(i, t))) {
735                o.push(i);
736                break
737            }
738            return this.pushStack(1 < o.length ? D.uniqueSort(o) : o)
739        }, index: function (t) {
740            return t ? "string" == typeof t ? s.call(D(t), this[0]) : s.call(this, t.jquery ? t[0] : t) : this[0] && this[0].parentNode ? this.first().prevAll().length : -1
741        }, add: function (t, e) {
742            return this.pushStack(D.uniqueSort(D.merge(this.get(), D(t, e))))
743        }, addBack: function (t) {
744            return this.add(null == t ? this.prevObject : this.prevObject.filter(t))
745        }
746    }), D.each({
747        parent: function (t) {
748            var e = t.parentNode;
749            return e && 11 !== e.nodeType ? e : null
750        }, parents: function (t) {
751            return v(t, "parentNode")
752        }, parentsUntil: function (t, e, i) {
753            return v(t, "parentNode", i)
754        }, next: function (t) {
755            return M(t, "nextSibling")
756        }, prev: function (t) {
757            return M(t, "previousSibling")
758        }, nextAll: function (t) {
759            return v(t, "nextSibling")
760        }, prevAll: function (t) {
761            return v(t, "previousSibling")
762        }, nextUntil: function (t, e, i) {
763            return v(t, "nextSibling", i)
764        }, prevUntil: function (t, e, i) {
765            return v(t, "previousSibling", i)
766        }, siblings: function (t) {
767            return y((t.parentNode || {}).firstChild, t)
768        }, children: function (t) {
769            return y(t.firstChild)
770        }, contents: function (t) {
771            return t.contentDocument || D.merge([], t.childNodes)
772        }
773    }, function (n, s) {
774        D.fn[n] = function (t, e) {
775            var i = D.map(this, s, t);
776            return "Until" !== n.slice(-5) && (e = t), e && "string" == typeof e && (i = D.filter(e, i)), 1 < this.length && (P[n] || D.uniqueSort(i), I.test(n) && i.reverse()), this.pushStack(i)
777        }
778    });
779    var $, E = /\S+/g;
780
781    function N() {
782        C.removeEventListener("DOMContentLoaded", N), k.removeEventListener("load", N), D.ready()
783    }
784
785    D.Callbacks = function (n) {
786        n = "string" == typeof n ? function (t) {
787            var i = {};
788            return D.each(t.match(E) || [], function (t, e) {
789                i[e] = !0
790            }), i
791        }(n) : D.extend({}, n);
792
793        function i() {
794            for (o = n.once, e = s = !0; r.length; l = -1) for (t = r.shift(); ++l < a.length;) !1 === a[l].apply(t[0], t[1]) && n.stopOnFalse && (l = a.length, t = !1);
795            n.memory || (t = !1), s = !1, o && (a = t ? [] : "")
796        }
797
798        var s, t, e, o, a = [], r = [], l = -1, h = {
799            add: function () {
800                return a && (t && !s && (l = a.length - 1, r.push(t)), function i(t) {
801                    D.each(t, function (t, e) {
802                        D.isFunction(e) ? n.unique && h.has(e) || a.push(e) : e && e.length && "string" !== D.type(e) && i(e)
803                    })
804                }(arguments), t && !s && i()), this
805            }, remove: function () {
806                return D.each(arguments, function (t, e) {
807                    for (var i; -1 < (i = D.inArray(e, a, i));) a.splice(i, 1), i <= l && l--
808                }), this
809            }, has: function (t) {
810                return t ? -1 < D.inArray(t, a) : 0 < a.length
811            }, empty: function () {
812                return a = a && [], this
813            }, disable: function () {
814                return o = r = [], a = t = "", this
815            }, disabled: function () {
816                return !a
817            }, lock: function () {
818                return o = r = [], t || (a = t = ""), this
819            }, locked: function () {
820                return !!o
821            }, fireWith: function (t, e) {
822                return o || (e = [t, (e = e || []).slice ? e.slice() : e], r.push(e), s || i()), this
823            }, fire: function () {
824                return h.fireWith(this, arguments), this
825            }, fired: function () {
826                return !!e
827            }
828        };
829        return h
830    }, D.extend({
831        Deferred: function (t) {
832            var o = [["resolve", "done", D.Callbacks("once memory"), "resolved"], ["reject", "fail", D.Callbacks("once memory"), "rejected"], ["notify", "progress", D.Callbacks("memory")]],
833                s = "pending", a = {
834                    state: function () {
835                        return s
836                    }, always: function () {
837                        return r.done(arguments).fail(arguments), this
838                    }, then: function () {
839                        var s = arguments;
840                        return D.Deferred(function (n) {
841                            D.each(o, function (t, e) {
842                                var i = D.isFunction(s[t]) && s[t];
843                                r[e[1]](function () {
844                                    var t = i && i.apply(this, arguments);
845                                    t && D.isFunction(t.promise) ? t.promise().progress(n.notify).done(n.resolve).fail(n.reject) : n[e[0] + "With"](this === a ? n.promise() : this, i ? [t] : arguments)
846                                })
847                            }), s = null
848                        }).promise()
849                    }, promise: function (t) {
850                        return null != t ? D.extend(t, a) : a
851                    }
852                }, r = {};
853            return a.pipe = a.then, D.each(o, function (t, e) {
854                var i = e[2], n = e[3];
855                a[e[1]] = i.add, n && i.add(function () {
856                    s = n
857                }, o[1 ^ t][2].disable, o[2][2].lock), r[e[0]] = function () {
858                    return r[e[0] + "With"](this === r ? a : this, arguments), this
859                }, r[e[0] + "With"] = i.fireWith
860            }), a.promise(r), t && t.call(r, r), r
861        }, when: function (t) {
862            function e(e, i, n) {
863                return function (t) {
864                    i[e] = this, n[e] = 1 < arguments.length ? c.call(arguments) : t, n === s ? h.notifyWith(i, n) : --l || h.resolveWith(i, n)
865                }
866            }
867
868            var s, i, n, o = 0, a = c.call(arguments), r = a.length,
869                l = 1 !== r || t && D.isFunction(t.promise) ? r : 0, h = 1 === l ? t : D.Deferred();
870            if (1 < r) for (s = new Array(r), i = new Array(r), n = new Array(r); o < r; o++) a[o] && D.isFunction(a[o].promise) ? a[o].promise().progress(e(o, i, s)).done(e(o, n, a)).fail(h.reject) : --l;
871            return l || h.resolveWith(n, a), h.promise()
872        }
873    }), D.fn.ready = function (t) {
874        return D.ready.promise().done(t), this
875    }, D.extend({
876        isReady: !1, readyWait: 1, holdReady: function (t) {
877            t ? D.readyWait++ : D.ready(!0)
878        }, ready: function (t) {
879            (!0 === t ? --D.readyWait : D.isReady) || ((D.isReady = !0) !== t && 0 < --D.readyWait || ($.resolveWith(C, [D]), D.fn.triggerHandler && (D(C).triggerHandler("ready"), D(C).off("ready"))))
880        }
881    }), D.ready.promise = function (t) {
882        return $ || ($ = D.Deferred(), "complete" === C.readyState || "loading" !== C.readyState && !C.documentElement.doScroll ? k.setTimeout(D.ready) : (C.addEventListener("DOMContentLoaded", N), k.addEventListener("load", N))), $.promise(t)
883    }, D.ready.promise();
884
885    function A(t) {
886        return 1 === t.nodeType || 9 === t.nodeType || !+t.nodeType
887    }
888
889    var O = function (t, e, i, n, s, o, a) {
890        var r = 0, l = t.length, h = null == i;
891        if ("object" === D.type(i)) for (r in s = !0, i) O(t, e, r, i[r], !0, o, a); else if (void 0 !== n && (s = !0, D.isFunction(n) || (a = !0), h && (e = a ? (e.call(t, n), null) : (h = e, function (t, e, i) {
892            return h.call(D(t), i)
893        })), e)) for (; r < l; r++) e(t[r], i, a ? n : n.call(t[r], r, e(t[r], i)));
894        return s ? t : h ? e.call(t) : l ? e(t[0], i) : o
895    };
896
897    function H() {
898        this.expando = D.expando + H.uid++
899    }
900
901    H.uid = 1, H.prototype = {
902        register: function (t, e) {
903            var i = e || {};
904            return t.nodeType ? t[this.expando] = i : Object.defineProperty(t, this.expando, {
905                value: i,
906                writable: !0,
907                configurable: !0
908            }), t[this.expando]
909        }, cache: function (t) {
910            if (!A(t)) return {};
911            var e = t[this.expando];
912            return e || (e = {}, A(t) && (t.nodeType ? t[this.expando] = e : Object.defineProperty(t, this.expando, {
913                value: e,
914                configurable: !0
915            }))), e
916        }, set: function (t, e, i) {
917            var n, s = this.cache(t);
918            if ("string" == typeof e) s[e] = i; else for (n in e) s[n] = e[n];
919            return s
920        }, get: function (t, e) {
921            return void 0 === e ? this.cache(t) : t[this.expando] && t[this.expando][e]
922        }, access: function (t, e, i) {
923            var n;
924            return void 0 === e || e && "string" == typeof e && void 0 === i ? void 0 !== (n = this.get(t, e)) ? n : this.get(t, D.camelCase(e)) : (this.set(t, e, i), void 0 !== i ? i : e)
925        }, remove: function (t, e) {
926            var i, n, s, o = t[this.expando];
927            if (void 0 !== o) {
928                if (void 0 === e) this.register(t); else {
929                    i = (n = D.isArray(e) ? e.concat(e.map(D.camelCase)) : (s = D.camelCase(e), e in o ? [e, s] : (n = s) in o ? [n] : n.match(E) || [])).length;
930                    for (; i--;) delete o[n[i]]
931                }
932                void 0 !== e && !D.isEmptyObject(o) || (t.nodeType ? t[this.expando] = void 0 : delete t[this.expando])
933            }
934        }, hasData: function (t) {
935            var e = t[this.expando];
936            return void 0 !== e && !D.isEmptyObject(e)
937        }
938    };
939    var z = new H, F = new H, L = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/, j = /[A-Z]/g;
940
941    function R(t, e, i) {
942        var n;
943        if (void 0 === i && 1 === t.nodeType) if (n = "data-" + e.replace(j, "-$&").toLowerCase(), "string" == typeof (i = t.getAttribute(n))) {
944            try {
945                i = "true" === i || "false" !== i && ("null" === i ? null : +i + "" === i ? +i : L.test(i) ? D.parseJSON(i) : i)
946            } catch (t) {
947            }
948            F.set(t, e, i)
949        } else i = void 0;
950        return i
951    }
952
953    D.extend({
954        hasData: function (t) {
955            return F.hasData(t) || z.hasData(t)
956        }, data: function (t, e, i) {
957            return F.access(t, e, i)
958        }, removeData: function (t, e) {
959            F.remove(t, e)
960        }, _data: function (t, e, i) {
961            return z.access(t, e, i)
962        }, _removeData: function (t, e) {
963            z.remove(t, e)
964        }
965    }), D.fn.extend({
966        data: function (n, t) {
967            var e, i, s, o = this[0], a = o && o.attributes;
968            if (void 0 !== n) return "object" == typeof n ? this.each(function () {
969                F.set(this, n)
970            }) : O(this, function (e) {
971                var t, i;
972                if (o && void 0 === e) {
973                    if (void 0 !== (t = F.get(o, n) || F.get(o, n.replace(j, "-$&").toLowerCase()))) return t;
974                    if (i = D.camelCase(n), void 0 !== (t = F.get(o, i))) return t;
975                    if (void 0 !== (t = R(o, i, void 0))) return t
976                } else i = D.camelCase(n), this.each(function () {
977                    var t = F.get(this, i);
978                    F.set(this, i, e), -1 < n.indexOf("-") && void 0 !== t && F.set(this, n, e)
979                })
980            }, null, t, 1 < arguments.length, null, !0);
981            if (this.length && (s = F.get(o), 1 === o.nodeType && !z.get(o, "hasDataAttrs"))) {
982                for (e = a.length; e--;) a[e] && (0 === (i = a[e].name).indexOf("data-") && (i = D.camelCase(i.slice(5)), R(o, i, s[i])));
983                z.set(o, "hasDataAttrs", !0)
984            }
985            return s
986        }, removeData: function (t) {
987            return this.each(function () {
988                F.remove(this, t)
989            })
990        }
991    }), D.extend({
992        queue: function (t, e, i) {
993            var n;
994            return t ? (e = (e || "fx") + "queue", n = z.get(t, e), i && (!n || D.isArray(i) ? n = z.access(t, e, D.makeArray(i)) : n.push(i)), n || []) : void 0
995        }, dequeue: function (t, e) {
996            e = e || "fx";
997            var i = D.queue(t, e), n = i.length, s = i.shift(), o = D._queueHooks(t, e);
998            "inprogress" === s && (s = i.shift(), n--), s && ("fx" === e && i.unshift("inprogress"), delete o.stop, s.call(t, function () {
999                D.dequeue(t, e)
1000            }, o)), !n && o && o.empty.fire()
1001        }, _queueHooks: function (t, e) {
1002            var i = e + "queueHooks";
1003            return z.get(t, i) || z.access(t, i, {
1004                empty: D.Callbacks("once memory").add(function () {
1005                    z.remove(t, [e + "queue", i])
1006                })
1007            })
1008        }
1009    }), D.fn.extend({
1010        queue: function (e, i) {
1011            var t = 2;
1012            return "string" != typeof e && (i = e, e = "fx", t--), arguments.length < t ? D.queue(this[0], e) : void 0 === i ? this : this.each(function () {
1013                var t = D.queue(this, e, i);
1014                D._queueHooks(this, e), "fx" === e && "inprogress" !== t[0] && D.dequeue(this, e)
1015            })
1016        }, dequeue: function (t) {
1017            return this.each(function () {
1018                D.dequeue(this, t)
1019            })
1020        }, clearQueue: function (t) {
1021            return this.queue(t || "fx", [])
1022        }, promise: function (t, e) {
1023            function i() {
1024                --s || o.resolveWith(a, [a])
1025            }
1026
1027            var n, s = 1, o = D.Deferred(), a = this, r = this.length;
1028            for ("string" != typeof t && (e = t, t = void 0), t = t || "fx"; r--;) (n = z.get(a[r], t + "queueHooks")) && n.empty && (s++, n.empty.add(i));
1029            return i(), o.promise(e)
1030        }
1031    });
1032
1033    function W(t, e) {
1034        return t = e || t, "none" === D.css(t, "display") || !D.contains(t.ownerDocument, t)
1035    }
1036
1037    var B = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source, q = new RegExp("^(?:([+-])=|)(" + B + ")([a-z%]*)$", "i"),
1038        U = ["Top", "Right", "Bottom", "Left"];
1039
1040    function Y(t, e, i, n) {
1041        var s, o = 1, a = 20, r = n ? function () {
1042                return n.cur()
1043            } : function () {
1044                return D.css(t, e, "")
1045            }, l = r(), h = i && i[3] || (D.cssNumber[e] ? "" : "px"),
1046            c = (D.cssNumber[e] || "px" !== h && +l) && q.exec(D.css(t, e));
1047        if (c && c[3] !== h) for (h = h || c[3], i = i || [], c = +l || 1; c /= o = o || ".5", D.style(t, e, c + h), o !== (o = r() / l) && 1 !== o && --a;) ;
1048        return i && (c = +c || +l || 0, s = i[1] ? c + (i[1] + 1) * i[2] : +i[2], n && (n.unit = h, n.start = c, n.end = s)), s
1049    }
1050
1051    var V = /^(?:checkbox|radio)$/i, K = /<([\w:-]+)/, X = /^$|\/(?:java|ecma)script/i, Q = {
1052        option: [1, "<select multiple='multiple'>", "</select>"],
1053        thead: [1, "<table>", "</table>"],
1054        col: [2, "<table><colgroup>", "</colgroup></table>"],
1055        tr: [2, "<table><tbody>", "</tbody></table>"],
1056        td: [3, "<table><tbody><tr>", "</tr></tbody></table>"],
1057        _default: [0, "", ""]
1058    };
1059
1060    function G(t, e) {
1061        var i = void 0 !== t.getElementsByTagName ? t.getElementsByTagName(e || "*") : void 0 !== t.querySelectorAll ? t.querySelectorAll(e || "*") : [];
1062        return void 0 === e || e && D.nodeName(t, e) ? D.merge([t], i) : i
1063    }
1064
1065    function J(t, e) {
1066        for (var i = 0, n = t.length; i < n; i++) z.set(t[i], "globalEval", !e || z.get(e[i], "globalEval"))
1067    }
1068
1069    Q.optgroup = Q.option, Q.tbody = Q.tfoot = Q.colgroup = Q.caption = Q.thead, Q.th = Q.td;
1070    var Z, tt, et = /<|&#?\w+;/;
1071
1072    function it(t, e, i, n, s) {
1073        for (var o, a, r, l, h, c, u = e.createDocumentFragment(), d = [], p = 0, f = t.length; p < f; p++) if ((o = t[p]) || 0 === o) if ("object" === D.type(o)) D.merge(d, o.nodeType ? [o] : o); else if (et.test(o)) {
1074            for (a = a || u.appendChild(e.createElement("div")), r = (K.exec(o) || ["", ""])[1].toLowerCase(), l = Q[r] || Q._default, a.innerHTML = l[1] + D.htmlPrefilter(o) + l[2], c = l[0]; c--;) a = a.lastChild;
1075            D.merge(d, a.childNodes), (a = u.firstChild).textContent = ""
1076        } else d.push(e.createTextNode(o));
1077        for (u.textContent = "", p = 0; o = d[p++];) if (n && -1 < D.inArray(o, n)) s && s.push(o); else if (h = D.contains(o.ownerDocument, o), a = G(u.appendChild(o), "script"), h && J(a), i) for (c = 0; o = a[c++];) X.test(o.type || "") && i.push(o);
1078        return u
1079    }
1080
1081    Z = C.createDocumentFragment().appendChild(C.createElement("div")), (tt = C.createElement("input")).setAttribute("type", "radio"), tt.setAttribute("checked", "checked"), tt.setAttribute("name", "t"), Z.appendChild(tt), g.checkClone = Z.cloneNode(!0).cloneNode(!0).lastChild.checked, Z.innerHTML = "<textarea>x</textarea>", g.noCloneChecked = !!Z.cloneNode(!0).lastChild.defaultValue;
1082    var nt = /^key/, st = /^(?:mouse|pointer|contextmenu|drag|drop)|click/, ot = /^([^.]*)(?:\.(.+)|)/;
1083
1084    function at() {
1085        return !0
1086    }
1087
1088    function rt() {
1089        return !1
1090    }
1091
1092    function lt() {
1093        try {
1094            return C.activeElement
1095        } catch (t) {
1096        }
1097    }
1098
1099    function ht(t, e, i, n, s, o) {
1100        var a, r;
1101        if ("object" == typeof e) {
1102            for (r in "string" != typeof i && (n = n || i, i = void 0), e) ht(t, r, i, n, e[r], o);
1103            return t
1104        }
1105        if (null == n && null == s ? (s = i, n = i = void 0) : null == s && ("string" == typeof i ? (s = n, n = void 0) : (s = n, n = i, i = void 0)), !1 === s) s = rt; else if (!s) return t;
1106        return 1 === o && (a = s, (s = function (t) {
1107            return D().off(t), a.apply(this, arguments)
1108        }).guid = a.guid || (a.guid = D.guid++)), t.each(function () {
1109            D.event.add(this, e, s, n, i)
1110        })
1111    }
1112
1113    D.event = {
1114        global: {},
1115        add: function (e, t, i, n, s) {
1116            var o, a, r, l, h, c, u, d, p, f, m, g = z.get(e);
1117            if (g) for (i.handler && (i = (o = i).handler, s = o.selector), i.guid || (i.guid = D.guid++), (l = g.events) || (l = g.events = {}), (a = g.handle) || (a = g.handle = function (t) {
1118                return void 0 !== D && D.event.triggered !== t.type ? D.event.dispatch.apply(e, arguments) : void 0
1119            }), h = (t = (t || "").match(E) || [""]).length; h--;) p = m = (r = ot.exec(t[h]) || [])[1], f = (r[2] || "").split(".").sort(), p && (u = D.event.special[p] || {}, p = (s ? u.delegateType : u.bindType) || p, u = D.event.special[p] || {}, c = D.extend({
1120                type: p,
1121                origType: m,
1122                data: n,
1123                handler: i,
1124                guid: i.guid,
1125                selector: s,
1126                needsContext: s && D.expr.match.needsContext.test(s),
1127                namespace: f.join(".")
1128            }, o), (d = l[p]) || ((d = l[p] = []).delegateCount = 0, u.setup && !1 !== u.setup.call(e, n, f, a) || e.addEventListener && e.addEventListener(p, a)), u.add && (u.add.call(e, c), c.handler.guid || (c.handler.guid = i.guid)), s ? d.splice(d.delegateCount++, 0, c) : d.push(c), D.event.global[p] = !0)
1129        },
1130        remove: function (t, e, i, n, s) {
1131            var o, a, r, l, h, c, u, d, p, f, m, g = z.hasData(t) && z.get(t);
1132            if (g && (l = g.events)) {
1133                for (h = (e = (e || "").match(E) || [""]).length; h--;) if (p = m = (r = ot.exec(e[h]) || [])[1], f = (r[2] || "").split(".").sort(), p) {
1134                    for (u = D.event.special[p] || {}, d = l[p = (n ? u.delegateType : u.bindType) || p] || [], r = r[2] && new RegExp("(^|\\.)" + f.join("\\.(?:.*\\.|)") + "(\\.|$)"), a = o = d.length; o--;) c = d[o], !s && m !== c.origType || i && i.guid !== c.guid || r && !r.test(c.namespace) || n && n !== c.selector && ("**" !== n || !c.selector) || (d.splice(o, 1), c.selector && d.delegateCount--, u.remove && u.remove.call(t, c));
1135                    a && !d.length && (u.teardown && !1 !== u.teardown.call(t, f, g.handle) || D.removeEvent(t, p, g.handle), delete l[p])
1136                } else for (p in l) D.event.remove(t, p + e[h], i, n, !0);
1137                D.isEmptyObject(l) && z.remove(t, "handle events")
1138            }
1139        },
1140        dispatch: function (t) {
1141            t = D.event.fix(t);
1142            var e, i, n, s, o, a = [], r = c.call(arguments), l = (z.get(this, "events") || {})[t.type] || [],
1143                h = D.event.special[t.type] || {};
1144            if ((r[0] = t).delegateTarget = this, !h.preDispatch || !1 !== h.preDispatch.call(this, t)) {
1145                for (a = D.event.handlers.call(this, t, l), e = 0; (s = a[e++]) && !t.isPropagationStopped();) for (t.currentTarget = s.elem, i = 0; (o = s.handlers[i++]) && !t.isImmediatePropagationStopped();) t.rnamespace && !t.rnamespace.test(o.namespace) || (t.handleObj = o, t.data = o.data, void 0 !== (n = ((D.event.special[o.origType] || {}).handle || o.handler).apply(s.elem, r)) && !1 === (t.result = n) && (t.preventDefault(), t.stopPropagation()));
1146                return h.postDispatch && h.postDispatch.call(this, t), t.result
1147            }
1148        },
1149        handlers: function (t, e) {
1150            var i, n, s, o, a = [], r = e.delegateCount, l = t.target;
1151            if (r && l.nodeType && ("click" !== t.type || isNaN(t.button) || t.button < 1)) for (; l !== this; l = l.parentNode || this) if (1 === l.nodeType && (!0 !== l.disabled || "click" !== t.type)) {
1152                for (n = [], i = 0; i < r; i++) void 0 === n[s = (o = e[i]).selector + " "] && (n[s] = o.needsContext ? -1 < D(s, this).index(l) : D.find(s, this, null, [l]).length), n[s] && n.push(o);
1153                n.length && a.push({elem: l, handlers: n})
1154            }
1155            return r < e.length && a.push({elem: this, handlers: e.slice(r)}), a
1156        },
1157        props: "altKey bubbles cancelable ctrlKey currentTarget detail eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),
1158        fixHooks: {},
1159        keyHooks: {
1160            props: "char charCode key keyCode".split(" "), filter: function (t, e) {
1161                return null == t.which && (t.which = null != e.charCode ? e.charCode : e.keyCode), t
1162            }
1163        },
1164        mouseHooks: {
1165            props: "button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),
1166            filter: function (t, e) {
1167                var i, n, s, o = e.button;
1168                return null == t.pageX && null != e.clientX && (n = (i = t.target.ownerDocument || C).documentElement, s = i.body, t.pageX = e.clientX + (n && n.scrollLeft || s && s.scrollLeft || 0) - (n && n.clientLeft || s && s.clientLeft || 0), t.pageY = e.clientY + (n && n.scrollTop || s && s.scrollTop || 0) - (n && n.clientTop || s && s.clientTop || 0)), t.which || void 0 === o || (t.which = 1 & o ? 1 : 2 & o ? 3 : 4 & o ? 2 : 0), t
1169            }
1170        },
1171        fix: function (t) {
1172            if (t[D.expando]) return t;
1173            var e, i, n, s = t.type, o = t, a = this.fixHooks[s];
1174            for (a || (this.fixHooks[s] = a = st.test(s) ? this.mouseHooks : nt.test(s) ? this.keyHooks : {}), n = a.props ? this.props.concat(a.props) : this.props, t = new D.Event(o), e = n.length; e--;) t[i = n[e]] = o[i];
1175            return t.target || (t.target = C), 3 === t.target.nodeType && (t.target = t.target.parentNode), a.filter ? a.filter(t, o) : t
1176        },
1177        special: {
1178            load: {noBubble: !0}, focus: {
1179                trigger: function () {
1180                    return this !== lt() && this.focus ? (this.focus(), !1) : void 0
1181                }, delegateType: "focusin"
1182            }, blur: {
1183                trigger: function () {
1184                    return this === lt() && this.blur ? (this.blur(), !1) : void 0
1185                }, delegateType: "focusout"
1186            }, click: {
1187                trigger: function () {
1188                    return "checkbox" === this.type && this.click && D.nodeName(this, "input") ? (this.click(), !1) : void 0
1189                }, _default: function (t) {
1190                    return D.nodeName(t.target, "a")
1191                }
1192            }, beforeunload: {
1193                postDispatch: function (t) {
1194                    void 0 !== t.result && t.originalEvent && (t.originalEvent.returnValue = t.result)
1195                }
1196            }
1197        }
1198    }, D.removeEvent = function (t, e, i) {
1199        t.removeEventListener && t.removeEventListener(e, i)
1200    }, D.Event = function (t, e) {
1201        return this instanceof D.Event ? (t && t.type ? (this.originalEvent = t, this.type = t.type, this.isDefaultPrevented = t.defaultPrevented || void 0 === t.defaultPrevented && !1 === t.returnValue ? at : rt) : this.type = t, e && D.extend(this, e), this.timeStamp = t && t.timeStamp || D.now(), void (this[D.expando] = !0)) : new D.Event(t, e)
1202    }, D.Event.prototype = {
1203        constructor: D.Event,
1204        isDefaultPrevented: rt,
1205        isPropagationStopped: rt,
1206        isImmediatePropagationStopped: rt,
1207        isSimulated: !1,
1208        preventDefault: function () {
1209            var t = this.originalEvent;
1210            this.isDefaultPrevented = at, t && !this.isSimulated && t.preventDefault()
1211        },
1212        stopPropagation: function () {
1213            var t = this.originalEvent;
1214            this.isPropagationStopped = at, t && !this.isSimulated && t.stopPropagation()
1215        },
1216        stopImmediatePropagation: function () {
1217            var t = this.originalEvent;
1218            this.isImmediatePropagationStopped = at, t && !this.isSimulated && t.stopImmediatePropagation(), this.stopPropagation()
1219        }
1220    }, D.each({
1221        mouseenter: "mouseover",
1222        mouseleave: "mouseout",
1223        pointerenter: "pointerover",
1224        pointerleave: "pointerout"
1225    }, function (t, s) {
1226        D.event.special[t] = {
1227            delegateType: s, bindType: s, handle: function (t) {
1228                var e, i = t.relatedTarget, n = t.handleObj;
1229                return i && (i === this || D.contains(this, i)) || (t.type = n.origType, e = n.handler.apply(this, arguments), t.type = s), e
1230            }
1231        }
1232    }), D.fn.extend({
1233        on: function (t, e, i, n) {
1234            return ht(this, t, e, i, n)
1235        }, one: function (t, e, i, n) {
1236            return ht(this, t, e, i, n, 1)
1237        }, off: function (t, e, i) {
1238            var n, s;
1239            if (t && t.preventDefault && t.handleObj) return n = t.handleObj, D(t.delegateTarget).off(n.namespace ? n.origType + "." + n.namespace : n.origType, n.selector, n.handler), this;
1240            if ("object" != typeof t) return !1 !== e && "function" != typeof e || (i = e, e = void 0), !1 === i && (i = rt), this.each(function () {
1241                D.event.remove(this, t, i, e)
1242            });
1243            for (s in t) this.off(s, e, t[s]);
1244            return this
1245        }
1246    });
1247    var ct = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi, ut = /<script|<style|<link/i,
1248        dt = /checked\s*(?:[^=]|=\s*.checked.)/i, pt = /^true\/(.*)/, ft = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;
1249
1250    function mt(t, e) {
1251        return D.nodeName(t, "table") && D.nodeName(11 !== e.nodeType ? e : e.firstChild, "tr") ? t.getElementsByTagName("tbody")[0] || t.appendChild(t.ownerDocument.createElement("tbody")) : t
1252    }
1253
1254    function gt(t) {
1255        return t.type = (null !== t.getAttribute("type")) + "/" + t.type, t
1256    }
1257
1258    function vt(t) {
1259        var e = pt.exec(t.type);
1260        return e ? t.type = e[1] : t.removeAttribute("type"), t
1261    }
1262
1263    function yt(t, e) {
1264        var i, n, s, o, a, r, l, h;
1265        if (1 === e.nodeType) {
1266            if (z.hasData(t) && (o = z.access(t), a = z.set(e, o), h = o.events)) for (s in delete a.handle, a.events = {}, h) for (i = 0, n = h[s].length; i < n; i++) D.event.add(e, s, h[s][i]);
1267            F.hasData(t) && (r = F.access(t), l = D.extend({}, r), F.set(e, l))
1268        }
1269    }
1270
1271    function bt(i, n, s, o) {
1272        n = m.apply([], n);
1273        var t, e, a, r, l, h, c = 0, u = i.length, d = u - 1, p = n[0], f = D.isFunction(p);
1274        if (f || 1 < u && "string" == typeof p && !g.checkClone && dt.test(p)) return i.each(function (t) {
1275            var e = i.eq(t);
1276            f && (n[0] = p.call(this, t, e.html())), bt(e, n, s, o)
1277        });
1278        if (u && (e = (t = it(n, i[0].ownerDocument, !1, i, o)).firstChild, 1 === t.childNodes.length && (t = e), e || o)) {
1279            for (r = (a = D.map(G(t, "script"), gt)).length; c < u; c++) l = t, c !== d && (l = D.clone(l, !0, !0), r && D.merge(a, G(l, "script"))), s.call(i[c], l, c);
1280            if (r) for (h = a[a.length - 1].ownerDocument, D.map(a, vt), c = 0; c < r; c++) l = a[c], X.test(l.type || "") && !z.access(l, "globalEval") && D.contains(h, l) && (l.src ? D._evalUrl && D._evalUrl(l.src) : D.globalEval(l.textContent.replace(ft, "")))
1281        }
1282        return i
1283    }
1284
1285    function _t(t, e, i) {
1286        for (var n, s = e ? D.filter(e, t) : t, o = 0; null != (n = s[o]); o++) i || 1 !== n.nodeType || D.cleanData(G(n)), n.parentNode && (i && D.contains(n.ownerDocument, n) && J(G(n, "script")), n.parentNode.removeChild(n));
1287        return t
1288    }
1289
1290    D.extend({
1291        htmlPrefilter: function (t) {
1292            return t.replace(ct, "<$1></$2>")
1293        }, clone: function (t, e, i) {
1294            var n, s, o, a, r, l, h, c = t.cloneNode(!0), u = D.contains(t.ownerDocument, t);
1295            if (!(g.noCloneChecked || 1 !== t.nodeType && 11 !== t.nodeType || D.isXMLDoc(t))) for (a = G(c), n = 0, s = (o = G(t)).length; n < s; n++) r = o[n], l = a[n], void 0, "input" === (h = l.nodeName.toLowerCase()) && V.test(r.type) ? l.checked = r.checked : "input" !== h && "textarea" !== h || (l.defaultValue = r.defaultValue);
1296            if (e) if (i) for (o = o || G(t), a = a || G(c), n = 0, s = o.length; n < s; n++) yt(o[n], a[n]); else yt(t, c);
1297            return 0 < (a = G(c, "script")).length && J(a, !u && G(t, "script")), c
1298        }, cleanData: function (t) {
1299            for (var e, i, n, s = D.event.special, o = 0; void 0 !== (i = t[o]); o++) if (A(i)) {
1300                if (e = i[z.expando]) {
1301                    if (e.events) for (n in e.events) s[n] ? D.event.remove(i, n) : D.removeEvent(i, n, e.handle);
1302                    i[z.expando] = void 0
1303                }
1304                i[F.expando] && (i[F.expando] = void 0)
1305            }
1306        }
1307    }), D.fn.extend({
1308        domManip: bt, detach: function (t) {
1309            return _t(this, t, !0)
1310        }, remove: function (t) {
1311            return _t(this, t)
1312        }, text: function (t) {
1313            return O(this, function (t) {
1314                return void 0 === t ? D.text(this) : this.empty().each(function () {
1315                    1 !== this.nodeType && 11 !== this.nodeType && 9 !== this.nodeType || (this.textContent = t)
1316                })
1317            }, null, t, arguments.length)
1318        }, append: function () {
1319            return bt(this, arguments, function (t) {
1320                1 !== this.nodeType && 11 !== this.nodeType && 9 !== this.nodeType || mt(this, t).appendChild(t)
1321            })
1322        }, prepend: function () {
1323            return bt(this, arguments, function (t) {
1324                if (1 === this.nodeType || 11 === this.nodeType || 9 === this.nodeType) {
1325                    var e = mt(this, t);
1326                    e.insertBefore(t, e.firstChild)
1327                }
1328            })
1329        }, before: function () {
1330            return bt(this, arguments, function (t) {
1331                this.parentNode && this.parentNode.insertBefore(t, this)
1332            })
1333        }, after: function () {
1334            return bt(this, arguments, function (t) {
1335                this.parentNode && this.parentNode.insertBefore(t, this.nextSibling)
1336            })
1337        }, empty: function () {
1338            for (var t, e = 0; null != (t = this[e]); e++) 1 === t.nodeType && (D.cleanData(G(t, !1)), t.textContent = "");
1339            return this
1340        }, clone: function (t, e) {
1341            return t = null != t && t, e = null == e ? t : e, this.map(function () {
1342                return D.clone(this, t, e)
1343            })
1344        }, html: function (t) {
1345            return O(this, function (t) {
1346                var e = this[0] || {}, i = 0, n = this.length;
1347                if (void 0 === t && 1 === e.nodeType) return e.innerHTML;
1348                if ("string" == typeof t && !ut.test(t) && !Q[(K.exec(t) || ["", ""])[1].toLowerCase()]) {
1349                    t = D.htmlPrefilter(t);
1350                    try {
1351                        for (; i < n; i++) 1 === (e = this[i] || {}).nodeType && (D.cleanData(G(e, !1)), e.innerHTML = t);
1352                        e = 0
1353                    } catch (t) {
1354                    }
1355                }
1356                e && this.empty().append(t)
1357            }, null, t, arguments.length)
1358        }, replaceWith: function () {
1359            var i = [];
1360            return bt(this, arguments, function (t) {
1361                var e = this.parentNode;
1362                D.inArray(this, i) < 0 && (D.cleanData(G(this)), e && e.replaceChild(t, this))
1363            }, i)
1364        }
1365    }), D.each({
1366        appendTo: "append",
1367        prependTo: "prepend",
1368        insertBefore: "before",
1369        insertAfter: "after",
1370        replaceAll: "replaceWith"
1371    }, function (t, a) {
1372        D.fn[t] = function (t) {
1373            for (var e, i = [], n = D(t), s = n.length - 1, o = 0; o <= s; o++) e = o === s ? this : this.clone(!0), D(n[o])[a](e), r.apply(i, e.get());
1374            return this.pushStack(i)
1375        }
1376    });
1377    var wt, xt = {HTML: "block", BODY: "block"};
1378
1379    function kt(t, e) {
1380        var i = D(e.createElement(t)).appendTo(e.body), n = D.css(i[0], "display");
1381        return i.detach(), n
1382    }
1383
1384    function Ct(t) {
1385        var e = C, i = xt[t];
1386        return i || ("none" !== (i = kt(t, e)) && i || ((e = (wt = (wt || D("<iframe frameborder='0' width='0' height='0'/>")).appendTo(e.documentElement))[0].contentDocument).write(), e.close(), i = kt(t, e), wt.detach()), xt[t] = i), i
1387    }
1388
1389    function Dt(t, e, i, n) {
1390        var s, o, a = {};
1391        for (o in e) a[o] = t.style[o], t.style[o] = e[o];
1392        for (o in s = i.apply(t, n || []), e) t.style[o] = a[o];
1393        return s
1394    }
1395
1396    var Tt = /^margin/, St = new RegExp("^(" + B + ")(?!px)[a-z%]+$", "i"), It = function (t) {
1397        var e = t.ownerDocument.defaultView;
1398        return e && e.opener || (e = k), e.getComputedStyle(t)
1399    }, Pt = C.documentElement;
1400
1401    function Mt(t, e, i) {
1402        var n, s, o, a, r = t.style;
1403        return "" !== (a = (i = i || It(t)) ? i.getPropertyValue(e) || i[e] : void 0) && void 0 !== a || D.contains(t.ownerDocument, t) || (a = D.style(t, e)), i && !g.pixelMarginRight() && St.test(a) && Tt.test(e) && (n = r.width, s = r.minWidth, o = r.maxWidth, r.minWidth = r.maxWidth = r.width = a, a = i.width, r.width = n, r.minWidth = s, r.maxWidth = o), void 0 !== a ? a + "" : a
1404    }
1405
1406    function $t(t, e) {
1407        return {
1408            get: function () {
1409                return t() ? void delete this.get : (this.get = e).apply(this, arguments)
1410            }
1411        }
1412    }
1413
1414    !function () {
1415        var e, i, n, s, o = C.createElement("div"), a = C.createElement("div");
1416        if (a.style) {
1417            function t() {
1418                a.style.cssText = "-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%", a.innerHTML = "", Pt.appendChild(o);
1419                var t = k.getComputedStyle(a);
1420                e = "1%" !== t.top, s = "2px" === t.marginLeft, i = "4px" === t.width, a.style.marginRight = "50%", n = "4px" === t.marginRight, Pt.removeChild(o)
1421            }
1422
1423            a.style.backgroundClip = "content-box", a.cloneNode(!0).style.backgroundClip = "", g.clearCloneStyle = "content-box" === a.style.backgroundClip, o.style.cssText = "border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute", o.appendChild(a), D.extend(g, {
1424                pixelPosition: function () {
1425                    return t(), e
1426                }, boxSizingReliable: function () {
1427                    return null == i && t(), i
1428                }, pixelMarginRight: function () {
1429                    return null == i && t(), n
1430                }, reliableMarginLeft: function () {
1431                    return null == i && t(), s
1432                }, reliableMarginRight: function () {
1433                    var t, e = a.appendChild(C.createElement("div"));
1434                    return e.style.cssText = a.style.cssText = "-webkit-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0", e.style.marginRight = e.style.width = "0", a.style.width = "1px", Pt.appendChild(o), t = !parseFloat(k.getComputedStyle(e).marginRight), Pt.removeChild(o), a.removeChild(e), t
1435                }
1436            })
1437        }
1438    }();
1439    var Et = /^(none|table(?!-c[ea]).+)/, Nt = {position: "absolute", visibility: "hidden", display: "block"},
1440        At = {letterSpacing: "0", fontWeight: "400"}, Ot = ["Webkit", "O", "Moz", "ms"],
1441        Ht = C.createElement("div").style;
1442
1443    function zt(t) {
1444        if (t in Ht) return t;
1445        for (var e = t[0].toUpperCase() + t.slice(1), i = Ot.length; i--;) if ((t = Ot[i] + e) in Ht) return t
1446    }
1447
1448    function Ft(t, e, i) {
1449        var n = q.exec(e);
1450        return n ? Math.max(0, n[2] - (i || 0)) + (n[3] || "px") : e
1451    }
1452
1453    function Lt(t, e, i, n, s) {
1454        for (var o = i === (n ? "border" : "content") ? 4 : "width" === e ? 1 : 0, a = 0; o < 4; o += 2) "margin" === i && (a += D.css(t, i + U[o], !0, s)), n ? ("content" === i && (a -= D.css(t, "padding" + U[o], !0, s)), "margin" !== i && (a -= D.css(t, "border" + U[o] + "Width", !0, s))) : (a += D.css(t, "padding" + U[o], !0, s), "padding" !== i && (a += D.css(t, "border" + U[o] + "Width", !0, s)));
1455        return a
1456    }
1457
1458    function jt(t, e, i) {
1459        var n = !0, s = "width" === e ? t.offsetWidth : t.offsetHeight, o = It(t),
1460            a = "border-box" === D.css(t, "boxSizing", !1, o);
1461        if (s <= 0 || null == s) {
1462            if (((s = Mt(t, e, o)) < 0 || null == s) && (s = t.style[e]), St.test(s)) return s;
1463            n = a && (g.boxSizingReliable() || s === t.style[e]), s = parseFloat(s) || 0
1464        }
1465        return s + Lt(t, e, i || (a ? "border" : "content"), n, o) + "px"
1466    }
1467
1468    function Rt(t, e) {
1469        for (var i, n, s, o = [], a = 0, r = t.length; a < r; a++) (n = t[a]).style && (o[a] = z.get(n, "olddisplay"), i = n.style.display, e ? (o[a] || "none" !== i || (n.style.display = ""), "" === n.style.display && W(n) && (o[a] = z.access(n, "olddisplay", Ct(n.nodeName)))) : (s = W(n), "none" === i && s || z.set(n, "olddisplay", s ? i : D.css(n, "display"))));
1470        for (a = 0; a < r; a++) (n = t[a]).style && (e && "none" !== n.style.display && "" !== n.style.display || (n.style.display = e ? o[a] || "" : "none"));
1471        return t
1472    }
1473
1474    function Wt(t, e, i, n, s) {
1475        return new Wt.prototype.init(t, e, i, n, s)
1476    }
1477
1478    D.extend({
1479        cssHooks: {
1480            opacity: {
1481                get: function (t, e) {
1482                    if (e) {
1483                        var i = Mt(t, "opacity");
1484                        return "" === i ? "1" : i
1485                    }
1486                }
1487            }
1488        },
1489        cssNumber: {
1490            animationIterationCount: !0,
1491            columnCount: !0,
1492            fillOpacity: !0,
1493            flexGrow: !0,
1494            flexShrink: !0,
1495            fontWeight: !0,
1496            lineHeight: !0,
1497            opacity: !0,
1498            order: !0,
1499            orphans: !0,
1500            widows: !0,
1501            zIndex: !0,
1502            zoom: !0
1503        },
1504        cssProps: {float: "cssFloat"},
1505        style: function (t, e, i, n) {
1506            if (t && 3 !== t.nodeType && 8 !== t.nodeType && t.style) {
1507                var s, o, a, r = D.camelCase(e), l = t.style;
1508                return e = D.cssProps[r] || (D.cssProps[r] = zt(r) || r), a = D.cssHooks[e] || D.cssHooks[r], void 0 === i ? a && "get" in a && void 0 !== (s = a.get(t, !1, n)) ? s : l[e] : ("string" === (o = typeof i) && (s = q.exec(i)) && s[1] && (i = Y(t, e, s), o = "number"), void (null != i && i == i && ("number" === o && (i += s && s[3] || (D.cssNumber[r] ? "" : "px")), g.clearCloneStyle || "" !== i || 0 !== e.indexOf("background") || (l[e] = "inherit"), a && "set" in a && void 0 === (i = a.set(t, i, n)) || (l[e] = i))))
1509            }
1510        },
1511        css: function (t, e, i, n) {
1512            var s, o, a, r = D.camelCase(e);
1513            return e = D.cssProps[r] || (D.cssProps[r] = zt(r) || r), (a = D.cssHooks[e] || D.cssHooks[r]) && "get" in a && (s = a.get(t, !0, i)), void 0 === s && (s = Mt(t, e, n)), "normal" === s && e in At && (s = At[e]), "" === i || i ? (o = parseFloat(s), !0 === i || isFinite(o) ? o || 0 : s) : s
1514        }
1515    }), D.each(["height", "width"], function (t, a) {
1516        D.cssHooks[a] = {
1517            get: function (t, e, i) {
1518                return e ? Et.test(D.css(t, "display")) && 0 === t.offsetWidth ? Dt(t, Nt, function () {
1519                    return jt(t, a, i)
1520                }) : jt(t, a, i) : void 0
1521            }, set: function (t, e, i) {
1522                var n, s = i && It(t), o = i && Lt(t, a, i, "border-box" === D.css(t, "boxSizing", !1, s), s);
1523                return o && (n = q.exec(e)) && "px" !== (n[3] || "px") && (t.style[a] = e, e = D.css(t, a)), Ft(0, e, o)
1524            }
1525        }
1526    }), D.cssHooks.marginLeft = $t(g.reliableMarginLeft, function (t, e) {
1527        return e ? (parseFloat(Mt(t, "marginLeft")) || t.getBoundingClientRect().left - Dt(t, {marginLeft: 0}, function () {
1528            return t.getBoundingClientRect().left
1529        })) + "px" : void 0
1530    }), D.cssHooks.marginRight = $t(g.reliableMarginRight, function (t, e) {
1531        return e ? Dt(t, {display: "inline-block"}, Mt, [t, "marginRight"]) : void 0
1532    }), D.each({margin: "", padding: "", border: "Width"}, function (s, o) {
1533        D.cssHooks[s + o] = {
1534            expand: function (t) {
1535                for (var e = 0, i = {}, n = "string" == typeof t ? t.split(" ") : [t]; e < 4; e++) i[s + U[e] + o] = n[e] || n[e - 2] || n[0];
1536                return i
1537            }
1538        }, Tt.test(s) || (D.cssHooks[s + o].set = Ft)
1539    }), D.fn.extend({
1540        css: function (t, e) {
1541            return O(this, function (t, e, i) {
1542                var n, s, o = {}, a = 0;
1543                if (D.isArray(e)) {
1544                    for (n = It(t), s = e.length; a < s; a++) o[e[a]] = D.css(t, e[a], !1, n);
1545                    return o
1546                }
1547                return void 0 !== i ? D.style(t, e, i) : D.css(t, e)
1548            }, t, e, 1 < arguments.length)
1549        }, show: function () {
1550            return Rt(this, !0)
1551        }, hide: function () {
1552            return Rt(this)
1553        }, toggle: function (t) {
1554            return "boolean" == typeof t ? t ? this.show() : this.hide() : this.each(function () {
1555                W(this) ? D(this).show() : D(this).hide()
1556            })
1557        }
1558    }), ((D.Tween = Wt).prototype = {
1559        constructor: Wt, init: function (t, e, i, n, s, o) {
1560            this.elem = t, this.prop = i, this.easing = s || D.easing._default, this.options = e, this.start = this.now = this.cur(), this.end = n, this.unit = o || (D.cssNumber[i] ? "" : "px")
1561        }, cur: function () {
1562            var t = Wt.propHooks[this.prop];
1563            return t && t.get ? t.get(this) : Wt.propHooks._default.get(this)
1564        }, run: function (t) {
1565            var e, i = Wt.propHooks[this.prop];
1566            return this.options.duration ? this.pos = e = D.easing[this.easing](t, this.options.duration * t, 0, 1, this.options.duration) : this.pos = e = t, this.now = (this.end - this.start) * e + this.start, this.options.step && this.options.step.call(this.elem, this.now, this), i && i.set ? i.set(this) : Wt.propHooks._default.set(this), this
1567        }
1568    }).init.prototype = Wt.prototype, (Wt.propHooks = {
1569        _default: {
1570            get: function (t) {
1571                var e;
1572                return 1 !== t.elem.nodeType || null != t.elem[t.prop] && null == t.elem.style[t.prop] ? t.elem[t.prop] : (e = D.css(t.elem, t.prop, "")) && "auto" !== e ? e : 0
1573            }, set: function (t) {
1574                D.fx.step[t.prop] ? D.fx.step[t.prop](t) : 1 !== t.elem.nodeType || null == t.elem.style[D.cssProps[t.prop]] && !D.cssHooks[t.prop] ? t.elem[t.prop] = t.now : D.style(t.elem, t.prop, t.now + t.unit)
1575            }
1576        }
1577    }).scrollTop = Wt.propHooks.scrollLeft = {
1578        set: function (t) {
1579            t.elem.nodeType && t.elem.parentNode && (t.elem[t.prop] = t.now)
1580        }
1581    }, D.easing = {
1582        linear: function (t) {
1583            return t
1584        }, swing: function (t) {
1585            return .5 - Math.cos(t * Math.PI) / 2
1586        }, _default: "swing"
1587    }, D.fx = Wt.prototype.init, D.fx.step = {};
1588    var Bt, qt, Ut, Yt, Vt, Kt = /^(?:toggle|show|hide)$/, Xt = /queueHooks$/;
1589
1590    function Qt() {
1591        return k.setTimeout(function () {
1592            Bt = void 0
1593        }), Bt = D.now()
1594    }
1595
1596    function Gt(t, e) {
1597        var i, n = 0, s = {height: t};
1598        for (e = e ? 1 : 0; n < 4; n += 2 - e) s["margin" + (i = U[n])] = s["padding" + i] = t;
1599        return e && (s.opacity = s.width = t), s
1600    }
1601
1602    function Jt(t, e, i) {
1603        for (var n, s = (Zt.tweeners[e] || []).concat(Zt.tweeners["*"]), o = 0, a = s.length; o < a; o++) if (n = s[o].call(i, e, t)) return n
1604    }
1605
1606    function Zt(o, t, e) {
1607        var i, a, n = 0, s = Zt.prefilters.length, r = D.Deferred().always(function () {
1608            delete l.elem
1609        }), l = function () {
1610            if (a) return !1;
1611            for (var t = Bt || Qt(), e = Math.max(0, h.startTime + h.duration - t), i = 1 - (e / h.duration || 0), n = 0, s = h.tweens.length; n < s; n++) h.tweens[n].run(i);
1612            return r.notifyWith(o, [h, i, e]), i < 1 && s ? e : (r.resolveWith(o, [h]), !1)
1613        }, h = r.promise({
1614            elem: o,
1615            props: D.extend({}, t),
1616            opts: D.extend(!0, {specialEasing: {}, easing: D.easing._default}, e),
1617            originalProperties: t,
1618            originalOptions: e,
1619            startTime: Bt || Qt(),
1620            duration: e.duration,
1621            tweens: [],
1622            createTween: function (t, e) {
1623                var i = D.Tween(o, h.opts, t, e, h.opts.specialEasing[t] || h.opts.easing);
1624                return h.tweens.push(i), i
1625            },
1626            stop: function (t) {
1627                var e = 0, i = t ? h.tweens.length : 0;
1628                if (a) return this;
1629                for (a = !0; e < i; e++) h.tweens[e].run(1);
1630                return t ? (r.notifyWith(o, [h, 1, 0]), r.resolveWith(o, [h, t])) : r.rejectWith(o, [h, t]), this
1631            }
1632        }), c = h.props;
1633        for (function (t, e) {
1634            var i, n, s, o, a;
1635            for (i in t) if (s = e[n = D.camelCase(i)], o = t[i], D.isArray(o) && (s = o[1], o = t[i] = o[0]), i !== n && (t[n] = o, delete t[i]), (a = D.cssHooks[n]) && "expand" in a) for (i in o = a.expand(o), delete t[n], o) i in t || (t[i] = o[i], e[i] = s); else e[n] = s
1636        }(c, h.opts.specialEasing); n < s; n++) if (i = Zt.prefilters[n].call(h, o, c, h.opts)) return D.isFunction(i.stop) && (D._queueHooks(h.elem, h.opts.queue).stop = D.proxy(i.stop, i)), i;
1637        return D.map(c, Jt, h), D.isFunction(h.opts.start) && h.opts.start.call(o, h), D.fx.timer(D.extend(l, {
1638            elem: o,
1639            anim: h,
1640            queue: h.opts.queue
1641        })), h.progress(h.opts.progress).done(h.opts.done, h.opts.complete).fail(h.opts.fail).always(h.opts.always)
1642    }
1643
1644    D.Animation = D.extend(Zt, {
1645        tweeners: {
1646            "*": [function (t, e) {
1647                var i = this.createTween(t, e);
1648                return Y(i.elem, t, q.exec(e), i), i
1649            }]
1650        }, tweener: function (t, e) {
1651            for (var i, n = 0, s = (t = D.isFunction(t) ? (e = t, ["*"]) : t.match(E)).length; n < s; n++) i = t[n], Zt.tweeners[i] = Zt.tweeners[i] || [], Zt.tweeners[i].unshift(e)
1652        }, prefilters: [function (e, t, i) {
1653            var n, s, o, a, r, l, h, c = this, u = {}, d = e.style, p = e.nodeType && W(e), f = z.get(e, "fxshow");
1654            for (n in i.queue || (null == (r = D._queueHooks(e, "fx")).unqueued && (r.unqueued = 0, l = r.empty.fire, r.empty.fire = function () {
1655                r.unqueued || l()
1656            }), r.unqueued++, c.always(function () {
1657                c.always(function () {
1658                    r.unqueued--, D.queue(e, "fx").length || r.empty.fire()
1659                })
1660            })), 1 === e.nodeType && ("height" in t || "width" in t) && (i.overflow = [d.overflow, d.overflowX, d.overflowY], "inline" === ("none" === (h = D.css(e, "display")) ? z.get(e, "olddisplay") || Ct(e.nodeName) : h) && "none" === D.css(e, "float") && (d.display = "inline-block")), i.overflow && (d.overflow = "hidden", c.always(function () {
1661                d.overflow = i.overflow[0], d.overflowX = i.overflow[1], d.overflowY = i.overflow[2]
1662            })), t) if (s = t[n], Kt.exec(s)) {
1663                if (delete t[n], o = o || "toggle" === s, s === (p ? "hide" : "show")) {
1664                    if ("show" !== s || !f || void 0 === f[n]) continue;
1665                    p = !0
1666                }
1667                u[n] = f && f[n] || D.style(e, n)
1668            } else h = void 0;
1669            if (D.isEmptyObject(u)) "inline" === ("none" === h ? Ct(e.nodeName) : h) && (d.display = h); else for (n in f ? "hidden" in f && (p = f.hidden) : f = z.access(e, "fxshow", {}), o && (f.hidden = !p), p ? D(e).show() : c.done(function () {
1670                D(e).hide()
1671            }), c.done(function () {
1672                var t;
1673                for (t in z.remove(e, "fxshow"), u) D.style(e, t, u[t])
1674            }), u) a = Jt(p ? f[n] : 0, n, c), n in f || (f[n] = a.start, p && (a.end = a.start, a.start = "width" === n || "height" === n ? 1 : 0))
1675        }], prefilter: function (t, e) {
1676            e ? Zt.prefilters.unshift(t) : Zt.prefilters.push(t)
1677        }
1678    }), D.speed = function (t, e, i) {
1679        var n = t && "object" == typeof t ? D.extend({}, t) : {
1680            complete: i || !i && e || D.isFunction(t) && t,
1681            duration: t,
1682            easing: i && e || e && !D.isFunction(e) && e
1683        };
1684        return n.duration = D.fx.off ? 0 : "number" == typeof n.duration ? n.duration : n.duration in D.fx.speeds ? D.fx.speeds[n.duration] : D.fx.speeds._default, null != n.queue && !0 !== n.queue || (n.queue = "fx"), n.old = n.complete, n.complete = function () {
1685            D.isFunction(n.old) && n.old.call(this), n.queue && D.dequeue(this, n.queue)
1686        }, n
1687    }, D.fn.extend({
1688        fadeTo: function (t, e, i, n) {
1689            return this.filter(W).css("opacity", 0).show().end().animate({opacity: e}, t, i, n)
1690        }, animate: function (e, t, i, n) {
1691            function s() {
1692                var t = Zt(this, D.extend({}, e), a);
1693                (o || z.get(this, "finish")) && t.stop(!0)
1694            }
1695
1696            var o = D.isEmptyObject(e), a = D.speed(t, i, n);
1697            return s.finish = s, o || !1 === a.queue ? this.each(s) : this.queue(a.queue, s)
1698        }, stop: function (s, t, o) {
1699            function a(t) {
1700                var e = t.stop;
1701                delete t.stop, e(o)
1702            }
1703
1704            return "string" != typeof s && (o = t, t = s, s = void 0), t && !1 !== s && this.queue(s || "fx", []), this.each(function () {
1705                var t = !0, e = null != s && s + "queueHooks", i = D.timers, n = z.get(this);
1706                if (e) n[e] && n[e].stop && a(n[e]); else for (e in n) n[e] && n[e].stop && Xt.test(e) && a(n[e]);
1707                for (e = i.length; e--;) i[e].elem !== this || null != s && i[e].queue !== s || (i[e].anim.stop(o), t = !1, i.splice(e, 1));
1708                !t && o || D.dequeue(this, s)
1709            })
1710        }, finish: function (a) {
1711            return !1 !== a && (a = a || "fx"), this.each(function () {
1712                var t, e = z.get(this), i = e[a + "queue"], n = e[a + "queueHooks"], s = D.timers, o = i ? i.length : 0;
1713                for (e.finish = !0, D.queue(this, a, []), n && n.stop && n.stop.call(this, !0), t = s.length; t--;) s[t].elem === this && s[t].queue === a && (s[t].anim.stop(!0), s.splice(t, 1));
1714                for (t = 0; t < o; t++) i[t] && i[t].finish && i[t].finish.call(this);
1715                delete e.finish
1716            })
1717        }
1718    }), D.each(["toggle", "show", "hide"], function (t, n) {
1719        var s = D.fn[n];
1720        D.fn[n] = function (t, e, i) {
1721            return null == t || "boolean" == typeof t ? s.apply(this, arguments) : this.animate(Gt(n, !0), t, e, i)
1722        }
1723    }), D.each({
1724        slideDown: Gt("show"),
1725        slideUp: Gt("hide"),
1726        slideToggle: Gt("toggle"),
1727        fadeIn: {opacity: "show"},
1728        fadeOut: {opacity: "hide"},
1729        fadeToggle: {opacity: "toggle"}
1730    }, function (t, n) {
1731        D.fn[t] = function (t, e, i) {
1732            return this.animate(n, t, e, i)
1733        }
1734    }), D.timers = [], D.fx.tick = function () {
1735        var t, e = 0, i = D.timers;
1736        for (Bt = D.now(); e < i.length; e++) (t = i[e])() || i[e] !== t || i.splice(e--, 1);
1737        i.length || D.fx.stop(), Bt = void 0
1738    }, D.fx.timer = function (t) {
1739        D.timers.push(t), t() ? D.fx.start() : D.timers.pop()
1740    }, D.fx.interval = 13, D.fx.start = function () {
1741        qt = qt || k.setInterval(D.fx.tick, D.fx.interval)
1742    }, D.fx.stop = function () {
1743        k.clearInterval(qt), qt = null
1744    }, D.fx.speeds = {slow: 600, fast: 200, _default: 400}, D.fn.delay = function (n, t) {
1745        return n = D.fx && D.fx.speeds[n] || n, t = t || "fx", this.queue(t, function (t, e) {
1746            var i = k.setTimeout(t, n);
1747            e.stop = function () {
1748                k.clearTimeout(i)
1749            }
1750        })
1751    }, Ut = C.createElement("input"), Yt = C.createElement("select"), Vt = Yt.appendChild(C.createElement("option")), Ut.type = "checkbox", g.checkOn = "" !== Ut.value, g.optSelected = Vt.selected, Yt.disabled = !0, g.optDisabled = !Vt.disabled, (Ut = C.createElement("input")).value = "t", Ut.type = "radio", g.radioValue = "t" === Ut.value;
1752    var te, ee = D.expr.attrHandle;
1753    D.fn.extend({
1754        attr: function (t, e) {
1755            return O(this, D.attr, t, e, 1 < arguments.length)
1756        }, removeAttr: function (t) {
1757            return this.each(function () {
1758                D.removeAttr(this, t)
1759            })
1760        }
1761    }), D.extend({
1762        attr: function (t, e, i) {
1763            var n, s, o = t.nodeType;
1764            if (3 !== o && 8 !== o && 2 !== o) return void 0 === t.getAttribute ? D.prop(t, e, i) : (1 === o && D.isXMLDoc(t) || (e = e.toLowerCase(), s = D.attrHooks[e] || (D.expr.match.bool.test(e) ? te : void 0)), void 0 !== i ? null === i ? void D.removeAttr(t, e) : s && "set" in s && void 0 !== (n = s.set(t, i, e)) ? n : (t.setAttribute(e, i + ""), i) : s && "get" in s && null !== (n = s.get(t, e)) ? n : null == (n = D.find.attr(t, e)) ? void 0 : n)
1765        }, attrHooks: {
1766            type: {
1767                set: function (t, e) {
1768                    if (!g.radioValue && "radio" === e && D.nodeName(t, "input")) {
1769                        var i = t.value;
1770                        return t.setAttribute("type", e), i && (t.value = i), e
1771                    }
1772                }
1773            }
1774        }, removeAttr: function (t, e) {
1775            var i, n, s = 0, o = e && e.match(E);
1776            if (o && 1 === t.nodeType) for (; i = o[s++];) n = D.propFix[i] || i, D.expr.match.bool.test(i) && (t[n] = !1), t.removeAttribute(i)
1777        }
1778    }), te = {
1779        set: function (t, e, i) {
1780            return !1 === e ? D.removeAttr(t, i) : t.setAttribute(i, i), i
1781        }
1782    }, D.each(D.expr.match.bool.source.match(/\w+/g), function (t, e) {
1783        var o = ee[e] || D.find.attr;
1784        ee[e] = function (t, e, i) {
1785            var n, s;
1786            return i || (s = ee[e], ee[e] = n, n = null != o(t, e, i) ? e.toLowerCase() : null, ee[e] = s), n
1787        }
1788    });
1789    var ie = /^(?:input|select|textarea|button)$/i, ne = /^(?:a|area)$/i;
1790    D.fn.extend({
1791        prop: function (t, e) {
1792            return O(this, D.prop, t, e, 1 < arguments.length)
1793        }, removeProp: function (t) {
1794            return this.each(function () {
1795                delete this[D.propFix[t] || t]
1796            })
1797        }
1798    }), D.extend({
1799        prop: function (t, e, i) {
1800            var n, s, o = t.nodeType;
1801            if (3 !== o && 8 !== o && 2 !== o) return 1 === o && D.isXMLDoc(t) || (e = D.propFix[e] || e, s = D.propHooks[e]), void 0 !== i ? s && "set" in s && void 0 !== (n = s.set(t, i, e)) ? n : t[e] = i : s && "get" in s && null !== (n = s.get(t, e)) ? n : t[e]
1802        }, propHooks: {
1803            tabIndex: {
1804                get: function (t) {
1805                    var e = D.find.attr(t, "tabindex");
1806                    return e ? parseInt(e, 10) : ie.test(t.nodeName) || ne.test(t.nodeName) && t.href ? 0 : -1
1807                }
1808            }
1809        }, propFix: {for: "htmlFor", class: "className"}
1810    }), g.optSelected || (D.propHooks.selected = {
1811        get: function (t) {
1812            var e = t.parentNode;
1813            return e && e.parentNode && e.parentNode.selectedIndex, null
1814        }, set: function (t) {
1815            var e = t.parentNode;
1816            e && (e.selectedIndex, e.parentNode && e.parentNode.selectedIndex)
1817        }
1818    }), D.each(["tabIndex", "readOnly", "maxLength", "cellSpacing", "cellPadding", "rowSpan", "colSpan", "useMap", "frameBorder", "contentEditable"], function () {
1819        D.propFix[this.toLowerCase()] = this
1820    });
1821    var se = /[\t\r\n\f]/g;
1822
1823    function oe(t) {
1824        return t.getAttribute && t.getAttribute("class") || ""
1825    }
1826
1827    D.fn.extend({
1828        addClass: function (e) {
1829            var t, i, n, s, o, a, r, l = 0;
1830            if (D.isFunction(e)) return this.each(function (t) {
1831                D(this).addClass(e.call(this, t, oe(this)))
1832            });
1833            if ("string" == typeof e && e) for (t = e.match(E) || []; i = this[l++];) if (s = oe(i), n = 1 === i.nodeType && (" " + s + " ").replace(se, " ")) {
1834                for (a = 0; o = t[a++];) n.indexOf(" " + o + " ") < 0 && (n += o + " ");
1835                s !== (r = D.trim(n)) && i.setAttribute("class", r)
1836            }
1837            return this
1838        }, removeClass: function (e) {
1839            var t, i, n, s, o, a, r, l = 0;
1840            if (D.isFunction(e)) return this.each(function (t) {
1841                D(this).removeClass(e.call(this, t, oe(this)))
1842            });
1843            if (!arguments.length) return this.attr("class", "");
1844            if ("string" == typeof e && e) for (t = e.match(E) || []; i = this[l++];) if (s = oe(i), n = 1 === i.nodeType && (" " + s + " ").replace(se, " ")) {
1845                for (a = 0; o = t[a++];) for (; -1 < n.indexOf(" " + o + " ");) n = n.replace(" " + o + " ", " ");
1846                s !== (r = D.trim(n)) && i.setAttribute("class", r)
1847            }
1848            return this
1849        }, toggleClass: function (s, e) {
1850            var o = typeof s;
1851            return "boolean" == typeof e && "string" == o ? e ? this.addClass(s) : this.removeClass(s) : D.isFunction(s) ? this.each(function (t) {
1852                D(this).toggleClass(s.call(this, t, oe(this), e), e)
1853            }) : this.each(function () {
1854                var t, e, i, n;
1855                if ("string" == o) for (e = 0, i = D(this), n = s.match(E) || []; t = n[e++];) i.hasClass(t) ? i.removeClass(t) : i.addClass(t); else void 0 !== s && "boolean" != o || ((t = oe(this)) && z.set(this, "__className__", t), this.setAttribute && this.setAttribute("class", t || !1 === s ? "" : z.get(this, "__className__") || ""))
1856            })
1857        }, hasClass: function (t) {
1858            var e, i, n = 0;
1859            for (e = " " + t + " "; i = this[n++];) if (1 === i.nodeType && -1 < (" " + oe(i) + " ").replace(se, " ").indexOf(e)) return !0;
1860            return !1
1861        }
1862    });
1863    var ae = /\r/g, re = /[\x20\t\r\n\f]+/g;
1864    D.fn.extend({
1865        val: function (i) {
1866            var n, t, s, e = this[0];
1867            return arguments.length ? (s = D.isFunction(i), this.each(function (t) {
1868                var e;
1869                1 === this.nodeType && (null == (e = s ? i.call(this, t, D(this).val()) : i) ? e = "" : "number" == typeof e ? e += "" : D.isArray(e) && (e = D.map(e, function (t) {
1870                    return null == t ? "" : t + ""
1871                })), (n = D.valHooks[this.type] || D.valHooks[this.nodeName.toLowerCase()]) && "set" in n && void 0 !== n.set(this, e, "value") || (this.value = e))
1872            })) : e ? (n = D.valHooks[e.type] || D.valHooks[e.nodeName.toLowerCase()]) && "get" in n && void 0 !== (t = n.get(e, "value")) ? t : "string" == typeof (t = e.value) ? t.replace(ae, "") : null == t ? "" : t : void 0
1873        }
1874    }), D.extend({
1875        valHooks: {
1876            option: {
1877                get: function (t) {
1878                    var e = D.find.attr(t, "value");
1879                    return null != e ? e : D.trim(D.text(t)).replace(re, " ")
1880                }
1881            }, select: {
1882                get: function (t) {
1883                    for (var e, i, n = t.options, s = t.selectedIndex, o = "select-one" === t.type || s < 0, a = o ? null : [], r = o ? s + 1 : n.length, l = s < 0 ? r : o ? s : 0; l < r; l++) if (((i = n[l]).selected || l === s) && (g.optDisabled ? !i.disabled : null === i.getAttribute("disabled")) && (!i.parentNode.disabled || !D.nodeName(i.parentNode, "optgroup"))) {
1884                        if (e = D(i).val(), o) return e;
1885                        a.push(e)
1886                    }
1887                    return a
1888                }, set: function (t, e) {
1889                    for (var i, n, s = t.options, o = D.makeArray(e), a = s.length; a--;) ((n = s[a]).selected = -1 < D.inArray(D.valHooks.option.get(n), o)) && (i = !0);
1890                    return i || (t.selectedIndex = -1), o
1891                }
1892            }
1893        }
1894    }), D.each(["radio", "checkbox"], function () {
1895        D.valHooks[this] = {
1896            set: function (t, e) {
1897                return D.isArray(e) ? t.checked = -1 < D.inArray(D(t).val(), e) : void 0
1898            }
1899        }, g.checkOn || (D.valHooks[this].get = function (t) {
1900            return null === t.getAttribute("value") ? "on" : t.value
1901        })
1902    });
1903    var le = /^(?:focusinfocus|focusoutblur)$/;
1904    D.extend(D.event, {
1905        trigger: function (t, e, i, n) {
1906            var s, o, a, r, l, h, c, u = [i || C], d = f.call(t, "type") ? t.type : t,
1907                p = f.call(t, "namespace") ? t.namespace.split(".") : [];
1908            if (o = a = i = i || C, 3 !== i.nodeType && 8 !== i.nodeType && !le.test(d + D.event.triggered) && (-1 < d.indexOf(".") && (d = (p = d.split(".")).shift(), p.sort()), l = d.indexOf(":") < 0 && "on" + d, (t = t[D.expando] ? t : new D.Event(d, "object" == typeof t && t)).isTrigger = n ? 2 : 3, t.namespace = p.join("."), t.rnamespace = t.namespace ? new RegExp("(^|\\.)" + p.join("\\.(?:.*\\.|)") + "(\\.|$)") : null, t.result = void 0, t.target || (t.target = i), e = null == e ? [t] : D.makeArray(e, [t]), c = D.event.special[d] || {}, n || !c.trigger || !1 !== c.trigger.apply(i, e))) {
1909                if (!n && !c.noBubble && !D.isWindow(i)) {
1910                    for (r = c.delegateType || d, le.test(r + d) || (o = o.parentNode); o; o = o.parentNode) u.push(o), a = o;
1911                    a === (i.ownerDocument || C) && u.push(a.defaultView || a.parentWindow || k)
1912                }
1913                for (s = 0; (o = u[s++]) && !t.isPropagationStopped();) t.type = 1 < s ? r : c.bindType || d, (h = (z.get(o, "events") || {})[t.type] && z.get(o, "handle")) && h.apply(o, e), (h = l && o[l]) && h.apply && A(o) && (t.result = h.apply(o, e), !1 === t.result && t.preventDefault());
1914                return t.type = d, n || t.isDefaultPrevented() || c._default && !1 !== c._default.apply(u.pop(), e) || !A(i) || l && D.isFunction(i[d]) && !D.isWindow(i) && ((a = i[l]) && (i[l] = null), i[D.event.triggered = d](), D.event.triggered = void 0, a && (i[l] = a)), t.result
1915            }
1916        }, simulate: function (t, e, i) {
1917            var n = D.extend(new D.Event, i, {type: t, isSimulated: !0});
1918            D.event.trigger(n, null, e)
1919        }
1920    }), D.fn.extend({
1921        trigger: function (t, e) {
1922            return this.each(function () {
1923                D.event.trigger(t, e, this)
1924            })
1925        }, triggerHandler: function (t, e) {
1926            var i = this[0];
1927            return i ? D.event.trigger(t, e, i, !0) : void 0
1928        }
1929    }), D.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "), function (t, i) {
1930        D.fn[i] = function (t, e) {
1931            return 0 < arguments.length ? this.on(i, null, t, e) : this.trigger(i)
1932        }
1933    }), D.fn.extend({
1934        hover: function (t, e) {
1935            return this.mouseenter(t).mouseleave(e || t)
1936        }
1937    }), g.focusin = "onfocusin" in k, g.focusin || D.each({focus: "focusin", blur: "focusout"}, function (i, n) {
1938        function s(t) {
1939            D.event.simulate(n, t.target, D.event.fix(t))
1940        }
1941
1942        D.event.special[n] = {
1943            setup: function () {
1944                var t = this.ownerDocument || this, e = z.access(t, n);
1945                e || t.addEventListener(i, s, !0), z.access(t, n, (e || 0) + 1)
1946            }, teardown: function () {
1947                var t = this.ownerDocument || this, e = z.access(t, n) - 1;
1948                e ? z.access(t, n, e) : (t.removeEventListener(i, s, !0), z.remove(t, n))
1949            }
1950        }
1951    });
1952    var he = k.location, ce = D.now(), ue = /\?/;
1953    D.parseJSON = function (t) {
1954        return JSON.parse(t + "")
1955    }, D.parseXML = function (t) {
1956        var e;
1957        if (!t || "string" != typeof t) return null;
1958        try {
1959            e = (new k.DOMParser).parseFromString(t, "text/xml")
1960        } catch (t) {
1961            e = void 0
1962        }
1963        return e && !e.getElementsByTagName("parsererror").length || D.error("Invalid XML: " + t), e
1964    };
1965    var de = /#.*$/, pe = /([?&])_=[^&]*/, fe = /^(.*?):[ \t]*([^\r\n]*)$/gm, me = /^(?:GET|HEAD)$/, ge = /^\/\//,
1966        ve = {}, ye = {}, be = "*/".concat("*"), _e = C.createElement("a");
1967
1968    function we(o) {
1969        return function (t, e) {
1970            "string" != typeof t && (e = t, t = "*");
1971            var i, n = 0, s = t.toLowerCase().match(E) || [];
1972            if (D.isFunction(e)) for (; i = s[n++];) "+" === i[0] ? (i = i.slice(1) || "*", (o[i] = o[i] || []).unshift(e)) : (o[i] = o[i] || []).push(e)
1973        }
1974    }
1975
1976    function xe(e, s, o, a) {
1977        var r = {}, l = e === ye;
1978
1979        function h(t) {
1980            var n;
1981            return r[t] = !0, D.each(e[t] || [], function (t, e) {
1982                var i = e(s, o, a);
1983                return "string" != typeof i || l || r[i] ? l ? !(n = i) : void 0 : (s.dataTypes.unshift(i), h(i), !1)
1984            }), n
1985        }
1986
1987        return h(s.dataTypes[0]) || !r["*"] && h("*")
1988    }
1989
1990    function ke(t, e) {
1991        var i, n, s = D.ajaxSettings.flatOptions || {};
1992        for (i in e) void 0 !== e[i] && ((s[i] ? t : n = n || {})[i] = e[i]);
1993        return n && D.extend(!0, t, n), t
1994    }
1995
1996    _e.href = he.href, D.extend({
1997        active: 0,
1998        lastModified: {},
1999        etag: {},
2000        ajaxSettings: {
2001            url: he.href,
2002            type: "GET",
2003            isLocal: /^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(he.protocol),
2004            global: !0,
2005            processData: !0,
2006            async: !0,
2007            contentType: "application/x-www-form-urlencoded; charset=UTF-8",
2008            accepts: {
2009                "*": be,
2010                text: "text/plain",
2011                html: "text/html",
2012                xml: "application/xml, text/xml",
2013                json: "application/json, text/javascript"
2014            },
2015            contents: {xml: /\bxml\b/, html: /\bhtml/, json: /\bjson\b/},
2016            responseFields: {xml: "responseXML", text: "responseText", json: "responseJSON"},
2017            converters: {"* text": String, "text html": !0, "text json": D.parseJSON, "text xml": D.parseXML},
2018            flatOptions: {url: !0, context: !0}
2019        },
2020        ajaxSetup: function (t, e) {
2021            return e ? ke(ke(t, D.ajaxSettings), e) : ke(D.ajaxSettings, t)
2022        },
2023        ajaxPrefilter: we(ve),
2024        ajaxTransport: we(ye),
2025        ajax: function (t, e) {
2026            "object" == typeof t && (e = t, t = void 0), e = e || {};
2027            var c, u, d, i, p, n, f, s, m = D.ajaxSetup({}, e), g = m.context || m,
2028                v = m.context && (g.nodeType || g.jquery) ? D(g) : D.event, y = D.Deferred(),
2029                b = D.Callbacks("once memory"), _ = m.statusCode || {}, o = {}, a = {}, w = 0, r = "canceled", x = {
2030                    readyState: 0, getResponseHeader: function (t) {
2031                        var e;
2032                        if (2 === w) {
2033                            if (!i) for (i = {}; e = fe.exec(d);) i[e[1].toLowerCase()] = e[2];
2034                            e = i[t.toLowerCase()]
2035                        }
2036                        return null == e ? null : e
2037                    }, getAllResponseHeaders: function () {
2038                        return 2 === w ? d : null
2039                    }, setRequestHeader: function (t, e) {
2040                        var i = t.toLowerCase();
2041                        return w || (t = a[i] = a[i] || t, o[t] = e), this
2042                    }, overrideMimeType: function (t) {
2043                        return w || (m.mimeType = t), this
2044                    }, statusCode: function (t) {
2045                        var e;
2046                        if (t) if (w < 2) for (e in t) _[e] = [_[e], t[e]]; else x.always(t[x.status]);
2047                        return this
2048                    }, abort: function (t) {
2049                        var e = t || r;
2050                        return c && c.abort(e), l(0, e), this
2051                    }
2052                };
2053            if (y.promise(x).complete = b.add, x.success = x.done, x.error = x.fail, m.url = ((t || m.url || he.href) + "").replace(de, "").replace(ge, he.protocol + "//"), m.type = e.method || e.type || m.method || m.type, m.dataTypes = D.trim(m.dataType || "*").toLowerCase().match(E) || [""], null == m.crossDomain) {
2054                n = C.createElement("a");
2055                try {
2056                    n.href = m.url, n.href = n.href, m.crossDomain = _e.protocol + "//" + _e.host != n.protocol + "//" + n.host
2057                } catch (t) {
2058                    m.crossDomain = !0
2059                }
2060            }
2061            if (m.data && m.processData && "string" != typeof m.data && (m.data = D.param(m.data, m.traditional)), xe(ve, m, e, x), 2 === w) return x;
2062            for (s in (f = D.event && m.global) && 0 == D.active++ && D.event.trigger("ajaxStart"), m.type = m.type.toUpperCase(), m.hasContent = !me.test(m.type), u = m.url, m.hasContent || (m.data && (u = m.url += (ue.test(u) ? "&" : "?") + m.data, delete m.data), !1 === m.cache && (m.url = pe.test(u) ? u.replace(pe, "$1_=" + ce++) : u + (ue.test(u) ? "&" : "?") + "_=" + ce++)), m.ifModified && (D.lastModified[u] && x.setRequestHeader("If-Modified-Since", D.lastModified[u]), D.etag[u] && x.setRequestHeader("If-None-Match", D.etag[u])), (m.data && m.hasContent && !1 !== m.contentType || e.contentType) && x.setRequestHeader("Content-Type", m.contentType), x.setRequestHeader("Accept", m.dataTypes[0] && m.accepts[m.dataTypes[0]] ? m.accepts[m.dataTypes[0]] + ("*" !== m.dataTypes[0] ? ", " + be + "; q=0.01" : "") : m.accepts["*"]), m.headers) x.setRequestHeader(s, m.headers[s]);
2063            if (m.beforeSend && (!1 === m.beforeSend.call(g, x, m) || 2 === w)) return x.abort();
2064            for (s in r = "abort", {success: 1, error: 1, complete: 1}) x[s](m[s]);
2065            if (c = xe(ye, m, e, x)) {
2066                if (x.readyState = 1, f && v.trigger("ajaxSend", [x, m]), 2 === w) return x;
2067                m.async && 0 < m.timeout && (p = k.setTimeout(function () {
2068                    x.abort("timeout")
2069                }, m.timeout));
2070                try {
2071                    w = 1, c.send(o, l)
2072                } catch (t) {
2073                    if (!(w < 2)) throw t;
2074                    l(-1, t)
2075                }
2076            } else l(-1, "No Transport");
2077
2078            function l(t, e, i, n) {
2079                var s, o, a, r, l, h = e;
2080                2 !== w && (w = 2, p && k.clearTimeout(p), c = void 0, d = n || "", x.readyState = 0 < t ? 4 : 0, s = 200 <= t && t < 300 || 304 === t, i && (r = function (t, e, i) {
2081                    for (var n, s, o, a, r = t.contents, l = t.dataTypes; "*" === l[0];) l.shift(), void 0 === n && (n = t.mimeType || e.getResponseHeader("Content-Type"));
2082                    if (n) for (s in r) if (r[s] && r[s].test(n)) {
2083                        l.unshift(s);
2084                        break
2085                    }
2086                    if (l[0] in i) o = l[0]; else {
2087                        for (s in i) {
2088                            if (!l[0] || t.converters[s + " " + l[0]]) {
2089                                o = s;
2090                                break
2091                            }
2092                            a = a || s
2093                        }
2094                        o = o || a
2095                    }
2096                    return o ? (o !== l[0] && l.unshift(o), i[o]) : void 0
2097                }(m, x, i)), r = function (t, e, i, n) {
2098                    var s, o, a, r, l, h = {}, c = t.dataTypes.slice();
2099                    if (c[1]) for (a in t.converters) h[a.toLowerCase()] = t.converters[a];
2100                    for (o = c.shift(); o;) if (t.responseFields[o] && (i[t.responseFields[o]] = e), !l && n && t.dataFilter && (e = t.dataFilter(e, t.dataType)), l = o, o = c.shift()) if ("*" === o) o = l; else if ("*" !== l && l !== o) {
2101                        if (!(a = h[l + " " + o] || h["* " + o])) for (s in h) if ((r = s.split(" "))[1] === o && (a = h[l + " " + r[0]] || h["* " + r[0]])) {
2102                            !0 === a ? a = h[s] : !0 !== h[s] && (o = r[0], c.unshift(r[1]));
2103                            break
2104                        }
2105                        if (!0 !== a) if (a && t.throws) e = a(e); else try {
2106                            e = a(e)
2107                        } catch (t) {
2108                            return {state: "parsererror", error: a ? t : "No conversion from " + l + " to " + o}
2109                        }
2110                    }
2111                    return {state: "success", data: e}
2112                }(m, r, x, s), s ? (m.ifModified && ((l = x.getResponseHeader("Last-Modified")) && (D.lastModified[u] = l), (l = x.getResponseHeader("etag")) && (D.etag[u] = l)), 204 === t || "HEAD" === m.type ? h = "nocontent" : 304 === t ? h = "notmodified" : (h = r.state, o = r.data, s = !(a = r.error))) : (a = h, !t && h || (h = "error", t < 0 && (t = 0))), x.status = t, x.statusText = (e || h) + "", s ? y.resolveWith(g, [o, h, x]) : y.rejectWith(g, [x, h, a]), x.statusCode(_), _ = void 0, f && v.trigger(s ? "ajaxSuccess" : "ajaxError", [x, m, s ? o : a]), b.fireWith(g, [x, h]), f && (v.trigger("ajaxComplete", [x, m]), --D.active || D.event.trigger("ajaxStop")))
2113            }
2114
2115            return x
2116        },
2117        getJSON: function (t, e, i) {
2118            return D.get(t, e, i, "json")
2119        },
2120        getScript: function (t, e) {
2121            return D.get(t, void 0, e, "script")
2122        }
2123    }), D.each(["get", "post"], function (t, s) {
2124        D[s] = function (t, e, i, n) {
2125            return D.isFunction(e) && (n = n || i, i = e, e = void 0), D.ajax(D.extend({
2126                url: t,
2127                type: s,
2128                dataType: n,
2129                data: e,
2130                success: i
2131            }, D.isPlainObject(t) && t))
2132        }
2133    }), D._evalUrl = function (t) {
2134        return D.ajax({url: t, type: "GET", dataType: "script", async: !1, global: !1, throws: !0})
2135    }, D.fn.extend({
2136        wrapAll: function (e) {
2137            var t;
2138            return D.isFunction(e) ? this.each(function (t) {
2139                D(this).wrapAll(e.call(this, t))
2140            }) : (this[0] && (t = D(e, this[0].ownerDocument).eq(0).clone(!0), this[0].parentNode && t.insertBefore(this[0]), t.map(function () {
2141                for (var t = this; t.firstElementChild;) t = t.firstElementChild;
2142                return t
2143            }).append(this)), this)
2144        }, wrapInner: function (i) {
2145            return D.isFunction(i) ? this.each(function (t) {
2146                D(this).wrapInner(i.call(this, t))
2147            }) : this.each(function () {
2148                var t = D(this), e = t.contents();
2149                e.length ? e.wrapAll(i) : t.append(i)
2150            })
2151        }, wrap: function (e) {
2152            var i = D.isFunction(e);
2153            return this.each(function (t) {
2154                D(this).wrapAll(i ? e.call(this, t) : e)
2155            })
2156        }, unwrap: function () {
2157            return this.parent().each(function () {
2158                D.nodeName(this, "body") || D(this).replaceWith(this.childNodes)
2159            }).end()
2160        }
2161    }), D.expr.filters.hidden = function (t) {
2162        return !D.expr.filters.visible(t)
2163    }, D.expr.filters.visible = function (t) {
2164        return 0 < t.offsetWidth || 0 < t.offsetHeight || 0 < t.getClientRects().length
2165    };
2166    var Ce = /%20/g, De = /\[\]$/, Te = /\r?\n/g, Se = /^(?:submit|button|image|reset|file)$/i,
2167        Ie = /^(?:input|select|textarea|keygen)/i;
2168
2169    function Pe(i, t, n, s) {
2170        var e;
2171        if (D.isArray(t)) D.each(t, function (t, e) {
2172            n || De.test(i) ? s(i, e) : Pe(i + "[" + ("object" == typeof e && null != e ? t : "") + "]", e, n, s)
2173        }); else if (n || "object" !== D.type(t)) s(i, t); else for (e in t) Pe(i + "[" + e + "]", t[e], n, s)
2174    }
2175
2176    D.param = function (t, e) {
2177        function i(t, e) {
2178            e = D.isFunction(e) ? e() : null == e ? "" : e, s[s.length] = encodeURIComponent(t) + "=" + encodeURIComponent(e)
2179        }
2180
2181        var n, s = [];
2182        if (void 0 === e && (e = D.ajaxSettings && D.ajaxSettings.traditional), D.isArray(t) || t.jquery && !D.isPlainObject(t)) D.each(t, function () {
2183            i(this.name, this.value)
2184        }); else for (n in t) Pe(n, t[n], e, i);
2185        return s.join("&").replace(Ce, "+")
2186    }, D.fn.extend({
2187        serialize: function () {
2188            return D.param(this.serializeArray())
2189        }, serializeArray: function () {
2190            return this.map(function () {
2191                var t = D.prop(this, "elements");
2192                return t ? D.makeArray(t) : this
2193            }).filter(function () {
2194                var t = this.type;
2195                return this.name && !D(this).is(":disabled") && Ie.test(this.nodeName) && !Se.test(t) && (this.checked || !V.test(t))
2196            }).map(function (t, e) {
2197                var i = D(this).val();
2198                return null == i ? null : D.isArray(i) ? D.map(i, function (t) {
2199                    return {name: e.name, value: t.replace(Te, "\r\n")}
2200                }) : {name: e.name, value: i.replace(Te, "\r\n")}
2201            }).get()
2202        }
2203    }), D.ajaxSettings.xhr = function () {
2204        try {
2205            return new k.XMLHttpRequest
2206        } catch (t) {
2207        }
2208    };
2209    var Me = {0: 200, 1223: 204}, $e = D.ajaxSettings.xhr();
2210    g.cors = !!$e && "withCredentials" in $e, g.ajax = $e = !!$e, D.ajaxTransport(function (s) {
2211        var o, a;
2212        return g.cors || $e && !s.crossDomain ? {
2213            send: function (t, e) {
2214                var i, n = s.xhr();
2215                if (n.open(s.type, s.url, s.async, s.username, s.password), s.xhrFields) for (i in s.xhrFields) n[i] = s.xhrFields[i];
2216                for (i in s.mimeType && n.overrideMimeType && n.overrideMimeType(s.mimeType), s.crossDomain || t["X-Requested-With"] || (t["X-Requested-With"] = "XMLHttpRequest"), t) n.setRequestHeader(i, t[i]);
2217                o = function (t) {
2218                    return function () {
2219                        o && (o = a = n.onload = n.onerror = n.onabort = n.onreadystatechange = null, "abort" === t ? n.abort() : "error" === t ? "number" != typeof n.status ? e(0, "error") : e(n.status, n.statusText) : e(Me[n.status] || n.status, n.statusText, "text" !== (n.responseType || "text") || "string" != typeof n.responseText ? {binary: n.response} : {text: n.responseText}, n.getAllResponseHeaders()))
2220                    }
2221                }, n.onload = o(), a = n.onerror = o("error"), void 0 !== n.onabort ? n.onabort = a : n.onreadystatechange = function () {
2222                    4 === n.readyState && k.setTimeout(function () {
2223                        o && a()
2224                    })
2225                }, o = o("abort");
2226                try {
2227                    n.send(s.hasContent && s.data || null)
2228                } catch (t) {
2229                    if (o) throw t
2230                }
2231            }, abort: function () {
2232                o && o()
2233            }
2234        } : void 0
2235    }), D.ajaxSetup({
2236        accepts: {script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},
2237        contents: {script: /\b(?:java|ecma)script\b/},
2238        converters: {
2239            "text script": function (t) {
2240                return D.globalEval(t), t
2241            }
2242        }
2243    }), D.ajaxPrefilter("script", function (t) {
2244        void 0 === t.cache && (t.cache = !1), t.crossDomain && (t.type = "GET")
2245    }), D.ajaxTransport("script", function (i) {
2246        var n, s;
2247        if (i.crossDomain) return {
2248            send: function (t, e) {
2249                n = D("<script>").prop({charset: i.scriptCharset, src: i.url}).on("load error", s = function (t) {
2250                    n.remove(), s = null, t && e("error" === t.type ? 404 : 200, t.type)
2251                }), C.head.appendChild(n[0])
2252            }, abort: function () {
2253                s && s()
2254            }
2255        }
2256    });
2257    var Ee = [], Ne = /(=)\?(?=&|$)|\?\?/;
2258    D.ajaxSetup({
2259        jsonp: "callback", jsonpCallback: function () {
2260            var t = Ee.pop() || D.expando + "_" + ce++;
2261            return this[t] = !0, t
2262        }
2263    }), D.ajaxPrefilter("json jsonp", function (t, e, i) {
2264        var n, s, o,
2265            a = !1 !== t.jsonp && (Ne.test(t.url) ? "url" : "string" == typeof t.data && 0 === (t.contentType || "").indexOf("application/x-www-form-urlencoded") && Ne.test(t.data) && "data");
2266        return a || "jsonp" === t.dataTypes[0] ? (n = t.jsonpCallback = D.isFunction(t.jsonpCallback) ? t.jsonpCallback() : t.jsonpCallback, a ? t[a] = t[a].replace(Ne, "$1" + n) : !1 !== t.jsonp && (t.url += (ue.test(t.url) ? "&" : "?") + t.jsonp + "=" + n), t.converters["script json"] = function () {
2267            return o || D.error(n + " was not called"), o[0]
2268        }, t.dataTypes[0] = "json", s = k[n], k[n] = function () {
2269            o = arguments
2270        }, i.always(function () {
2271            void 0 === s ? D(k).removeProp(n) : k[n] = s, t[n] && (t.jsonpCallback = e.jsonpCallback, Ee.push(n)), o && D.isFunction(s) && s(o[0]), o = s = void 0
2272        }), "script") : void 0
2273    }), D.parseHTML = function (t, e, i) {
2274        if (!t || "string" != typeof t) return null;
2275        "boolean" == typeof e && (i = e, e = !1), e = e || C;
2276        var n = _.exec(t), s = !i && [];
2277        return n ? [e.createElement(n[1])] : (n = it([t], e, s), s && s.length && D(s).remove(), D.merge([], n.childNodes))
2278    };
2279    var Ae = D.fn.load;
2280
2281    function Oe(t) {
2282        return D.isWindow(t) ? t : 9 === t.nodeType && t.defaultView
2283    }
2284
2285    D.fn.load = function (t, e, i) {
2286        if ("string" != typeof t && Ae) return Ae.apply(this, arguments);
2287        var n, s, o, a = this, r = t.indexOf(" ");
2288        return -1 < r && (n = D.trim(t.slice(r)), t = t.slice(0, r)), D.isFunction(e) ? (i = e, e = void 0) : e && "object" == typeof e && (s = "POST"), 0 < a.length && D.ajax({
2289            url: t,
2290            type: s || "GET",
2291            dataType: "html",
2292            data: e
2293        }).done(function (t) {
2294            o = arguments, a.html(n ? D("<div>").append(D.parseHTML(t)).find(n) : t)
2295        }).always(i && function (t, e) {
2296            a.each(function () {
2297                i.apply(this, o || [t.responseText, e, t])
2298            })
2299        }), this
2300    }, D.each(["ajaxStart", "ajaxStop", "ajaxComplete", "ajaxError", "ajaxSuccess", "ajaxSend"], function (t, e) {
2301        D.fn[e] = function (t) {
2302            return this.on(e, t)
2303        }
2304    }), D.expr.filters.animated = function (e) {
2305        return D.grep(D.timers, function (t) {
2306            return e === t.elem
2307        }).length
2308    }, D.offset = {
2309        setOffset: function (t, e, i) {
2310            var n, s, o, a, r, l, h = D.css(t, "position"), c = D(t), u = {};
2311            "static" === h && (t.style.position = "relative"), r = c.offset(), o = D.css(t, "top"), l = D.css(t, "left"), s = ("absolute" === h || "fixed" === h) && -1 < (o + l).indexOf("auto") ? (a = (n = c.position()).top, n.left) : (a = parseFloat(o) || 0, parseFloat(l) || 0), D.isFunction(e) && (e = e.call(t, i, D.extend({}, r))), null != e.top && (u.top = e.top - r.top + a), null != e.left && (u.left = e.left - r.left + s), "using" in e ? e.using.call(t, u) : c.css(u)
2312        }
2313    }, D.fn.extend({
2314        offset: function (e) {
2315            if (arguments.length) return void 0 === e ? this : this.each(function (t) {
2316                D.offset.setOffset(this, e, t)
2317            });
2318            var t, i, n = this[0], s = {top: 0, left: 0}, o = n && n.ownerDocument;
2319            return o ? (t = o.documentElement, D.contains(t, n) ? (s = n.getBoundingClientRect(), i = Oe(o), {
2320                top: s.top + i.pageYOffset - t.clientTop,
2321                left: s.left + i.pageXOffset - t.clientLeft
2322            }) : s) : void 0
2323        }, position: function () {
2324            if (this[0]) {
2325                var t, e, i = this[0], n = {top: 0, left: 0};
2326                return "fixed" === D.css(i, "position") ? e = i.getBoundingClientRect() : (t = this.offsetParent(), e = this.offset(), D.nodeName(t[0], "html") || (n = t.offset()), n.top += D.css(t[0], "borderTopWidth", !0), n.left += D.css(t[0], "borderLeftWidth", !0)), {
2327                    top: e.top - n.top - D.css(i, "marginTop", !0),
2328                    left: e.left - n.left - D.css(i, "marginLeft", !0)
2329                }
2330            }
2331        }, offsetParent: function () {
2332            return this.map(function () {
2333                for (var t = this.offsetParent; t && "static" === D.css(t, "position");) t = t.offsetParent;
2334                return t || Pt
2335            })
2336        }
2337    }), D.each({scrollLeft: "pageXOffset", scrollTop: "pageYOffset"}, function (e, s) {
2338        var o = "pageYOffset" === s;
2339        D.fn[e] = function (t) {
2340            return O(this, function (t, e, i) {
2341                var n = Oe(t);
2342                return void 0 === i ? n ? n[s] : t[e] : void (n ? n.scrollTo(o ? n.pageXOffset : i, o ? i : n.pageYOffset) : t[e] = i)
2343            }, e, t, arguments.length)
2344        }
2345    }), D.each(["top", "left"], function (t, i) {
2346        D.cssHooks[i] = $t(g.pixelPosition, function (t, e) {
2347            return e ? (e = Mt(t, i), St.test(e) ? D(t).position()[i] + "px" : e) : void 0
2348        })
2349    }), D.each({Height: "height", Width: "width"}, function (o, a) {
2350        D.each({padding: "inner" + o, content: a, "": "outer" + o}, function (n, t) {
2351            D.fn[t] = function (t, e) {
2352                var i = arguments.length && (n || "boolean" != typeof t),
2353                    s = n || (!0 === t || !0 === e ? "margin" : "border");
2354                return O(this, function (t, e, i) {
2355                    var n;
2356                    return D.isWindow(t) ? t.document.documentElement["client" + o] : 9 === t.nodeType ? (n = t.documentElement, Math.max(t.body["scroll" + o], n["scroll" + o], t.body["offset" + o], n["offset" + o], n["client" + o])) : void 0 === i ? D.css(t, e, s) : D.style(t, e, i, s)
2357                }, a, i ? t : void 0, i, null)
2358            }
2359        })
2360    }), D.fn.extend({
2361        bind: function (t, e, i) {
2362            return this.on(t, null, e, i)
2363        }, unbind: function (t, e) {
2364            return this.off(t, null, e)
2365        }, delegate: function (t, e, i, n) {
2366            return this.on(e, t, i, n)
2367        }, undelegate: function (t, e, i) {
2368            return 1 === arguments.length ? this.off(t, "**") : this.off(e, t || "**", i)
2369        }, size: function () {
2370            return this.length
2371        }
2372    }), D.fn.andSelf = D.fn.addBack, "function" == typeof define && define.amd && define("jquery", [], function () {
2373        return D
2374    });
2375    var He = k.jQuery, ze = k.$;
2376    return D.noConflict = function (t) {
2377        return k.$ === D && (k.$ = ze), t && k.jQuery === D && (k.jQuery = He), D
2378    }, t || (k.jQuery = k.$ = D), D
2379}), function (t) {
2380    "function" == typeof define && define.amd ? define(["jquery"], t) : t(jQuery)
2381}(function (k) {
2382    function t() {
2383        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[""] = {
2384            closeText: "Done",
2385            prevText: "Prev",
2386            nextText: "Next",
2387            currentText: "Today",
2388            monthNames: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "
vendor: 9,702 bytes, lines 2388-2572
2388November", "December"],
2389            monthNamesShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
2390            dayNames: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],
2391            dayNamesShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
2392            dayNamesMin: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
2393            weekHeader: "Wk",
2394            dateFormat: "mm/dd/yy",
2395            firstDay: 0,
2396            isRTL: !1,
2397            showMonthAfterYear: !1,
2398            yearSuffix: ""
2399        }, this._defaults = {
2400            showOn: "focus",
2401            showAnim: "fadeIn",
2402            showOptions: {},
2403            defaultDate: null,
2404            appendText: "",
2405            buttonText: "...",
2406            buttonImage: "",
2407            buttonImageOnly: !1,
2408            hideIfNoPrevNext: !1,
2409            navigationAsDateFormat: !1,
2410            gotoCurrent: !1,
2411            changeMonth: !1,
2412            changeYear: !1,
2413            yearRange: "c-10:c+10",
2414            showOtherMonths: !1,
2415            selectOtherMonths: !1,
2416            showWeek: !1,
2417            calculateWeek: this.iso8601Week,
2418            shortYearCutoff: "+10",
2419            minDate: null,
2420            maxDate: null,
2421            duration: "fast",
2422            beforeShowDay: null,
2423            beforeShow: null,
2424            onSelect: null,
2425            onChangeMonthYear: null,
2426            onClose: null,
2427            numberOfMonths: 1,
2428            showCurrentAtPos: 0,
2429            stepMonths: 1,
2430            stepBigMonths: 12,
2431            altField: "",
2432            altFormat: "",
2433            constrainInput: !0,
2434            showButtonPanel: !1,
2435            autoSize: !1,
2436            disabled: !1
2437        }, k.extend(this._defaults, this.regional[""]), this.regional.en = k.extend(!0, {}, this.regional[""]), this.regional["en-US"] = k.extend(!0, {}, this.regional.en), this.dpDiv = i(k("<div id='" + this._mainDivId + "' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"))
2438    }
2439
2440    function i(t) {
2441        var e = "button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";
2442        return t.on("mouseout", e, function () {
2443            k(this).removeClass("ui-state-hover"), -1 !== this.className.indexOf("ui-datepicker-prev") && k(this).removeClass("ui-datepicker-prev-hover"), -1 !== this.className.indexOf("ui-datepicker-next") && k(this).removeClass("ui-datepicker-next-hover")
2444        }).on("mouseover", e, o)
2445    }
2446
2447    function o() {
2448        k.datepicker._isDisabledDatepicker(it.inline ? it.dpDiv.parent()[0] : it.input[0]) || (k(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"), k(this).addClass("ui-state-hover"), -1 !== this.className.indexOf("ui-datepicker-prev") && k(this).addClass("ui-datepicker-prev-hover"), -1 !== this.className.indexOf("ui-datepicker-next") && k(this).addClass("ui-datepicker-next-hover"))
2449    }
2450
2451    function u(t, e) {
2452        for (var i in k.extend(t, e), e) null == e[i] && (t[i] = e[i]);
2453        return t
2454    }
2455
2456    function e(e) {
2457        return function () {
2458            var t = this.element.val();
2459            e.apply(this, arguments), this._refresh(), t !== this.element.val() && this._trigger("change")
2460        }
2461    }
2462
2463    k.ui = k.ui || {}, k.ui.version = "1.12.1";
2464    var n, s, x, C, a, r, l, h, c, D, d, p = 0, f = Array.prototype.slice;
2465
2466    function T(t, e, i) {
2467        return [parseFloat(t[0]) * (c.test(t[0]) ? e / 100 : 1), parseFloat(t[1]) * (c.test(t[1]) ? i / 100 : 1)]
2468    }
2469
2470    function S(t, e) {
2471        return parseInt(k.css(t, e), 10) || 0
2472    }
2473
2474    k.cleanData = (d = k.cleanData, function (t) {
2475        var e, i, n;
2476        for (n = 0; null != (i = t[n]); n++) try {
2477            (e = k._data(i, "events")) && e.remove && k(i).triggerHandler("remove")
2478        } catch (t) {
2479        }
2480        d(t)
2481    }), k.widget = function (t, i, e) {
2482        var n, s, o, a = {}, r = t.split(".")[0], l = r + "-" + (t = t.split(".")[1]);
2483        return e || (e = i, i = k.Widget), k.isArray(e) && (e = k.extend.apply(null, [{}].concat(e))), k.expr[":"][l.toLowerCase()] = function (t) {
2484            return !!k.data(t, l)
2485        }, k[r] = k[r] || {}, n = k[r][t], s = k[r][t] = function (t, e) {
2486            return this._createWidget ? void (arguments.length && this._createWidget(t, e)) : new s(t, e)
2487        }, k.extend(s, n, {
2488            version: e.version,
2489            _proto: k.extend({}, e),
2490            _childConstructors: []
2491        }), (o = new i).options = k.widget.extend({}, o.options), k.each(e, function (e, n) {
2492            return k.isFunction(n) ? void (a[e] = function () {
2493                var t, e = this._super, i = this._superApply;
2494                return this._super = s, this._superApply = o, t = n.apply(this, arguments), this._super = e, this._superApply = i, t
2495            }) : void (a[e] = n);
2496
2497            function s() {
2498                return i.prototype[e].apply(this, arguments)
2499            }
2500
2501            function o(t) {
2502                return i.prototype[e].apply(this, t)
2503            }
2504        }), s.prototype = k.widget.extend(o, {widgetEventPrefix: n && o.widgetEventPrefix || t}, a, {
2505            constructor: s,
2506            namespace: r,
2507            widgetName: t,
2508            widgetFullName: l
2509        }), n ? (k.each(n._childConstructors, function (t, e) {
2510            var i = e.prototype;
2511            k.widget(i.namespace + "." + i.widgetName, s, e._proto)
2512        }), delete n._childConstructors) : i._childConstructors.push(s), k.widget.bridge(t, s), s
2513    }, k.widget.extend = function (t) {
2514        for (var e, i, n = f.call(arguments, 1), s = 0, o = n.length; s < o; s++) for (e in n[s]) i = n[s][e], n[s].hasOwnProperty(e) && void 0 !== i && (t[e] = k.isPlainObject(i) ? k.isPlainObject(t[e]) ? k.widget.extend({}, t[e], i) : k.widget.extend({}, i) : i);
2515        return t
2516    }, k.widget.bridge = function (o, e) {
2517        var a = e.prototype.widgetFullName || o;
2518        k.fn[o] = function (i) {
2519            var t = "string" == typeof i, n = f.call(arguments, 1), s = this;
2520            return t ? this.length || "instance" !== i ? this.each(function () {
2521                var t, e = k.data(this, a);
2522                return "instance" === i ? (s = e, !1) : e ? k.isFunction(e[i]) && "_" !== i.charAt(0) ? (t = e[i].apply(e, n)) !== e && void 0 !== t ? (s = t && t.jquery ? s.pushStack(t.get()) : t, !1) : void 0 : k.error("no such method '" + i + "' for " + o + " widget instance") : k.error("cannot call methods on " + o + " prior to initialization; attempted to call method '" + i + "'")
2523            }) : s = void 0 : (n.length && (i = k.widget.extend.apply(null, [i].concat(n))), this.each(function () {
2524                var t = k.data(this, a);
2525                t ? (t.option(i || {}), t._init && t._init()) : k.data(this, a, new e(i, this))
2526            })), s
2527        }
2528    }, k.Widget = function () {
2529    }, k.Widget._childConstructors = [], k.Widget.prototype = {
2530        widgetName: "widget",
2531        widgetEventPrefix: "",
2532        defaultElement: "<div>",
2533        options: {classes: {}, disabled: !1, create: null},
2534        _createWidget: function (t, e) {
2535            e = k(e || this.defaultElement || this)[0], this.element = k(e), this.uuid = p++, this.eventNamespace = "." + this.widgetName + this.uuid, this.bindings = k(), this.hoverable = k(), this.focusable = k(), this.classesElementLookup = {}, e !== this && (k.data(e, this.widgetFullName, this), this._on(!0, this.element, {
2536                remove: function (t) {
2537                    t.target === e && this.destroy()
2538                }
2539            }), this.document = k(e.style ? e.ownerDocument : e.document || e), this.window = k(this.document[0].defaultView || this.document[0].parentWindow)), this.options = k.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()
2540        },
2541        _getCreateOptions: function () {
2542            return {}
2543        },
2544        _getCreateEventData: k.noop,
2545        _create: k.noop,
2546        _init: k.noop,
2547        destroy: function () {
2548            var i = this;
2549            this._destroy(), k.each(this.classesElementLookup, function (t, e) {
2550                i._removeClass(e, t)
2551            }), this.element.off(this.eventNamespace).removeData(this.widgetFullName), this.widget().off(this.eventNamespace).removeAttr("aria-disabled"), this.bindings.off(this.eventNamespace)
2552        },
2553        _destroy: k.noop,
2554        widget: function () {
2555            return this.element
2556        },
2557        option: function (t, e) {
2558            var i, n, s, o = t;
2559            if (0 === arguments.length) return k.widget.extend({}, this.options);
2560            if ("string" == typeof t) if (o = {}, t = (i = t.split(".")).shift(), i.length) {
2561                for (n = o[t] = k.widget.extend({}, this.options[t]), s = 0; i.length - 1 > s; s++) n[i[s]] = n[i[s]] || {}, n = n[i[s]];
2562                if (t = i.pop(), 1 === arguments.length) return void 0 === n[t] ? null : n[t];
2563                n[t] = e
2564            } else {
2565                if (1 === arguments.length) return void 0 === this.options[t] ? null : this.options[t];
2566                o[t] = e
2567            }
2568            return this._setOptions(o), this
2569        },
2570        _setOptions: function (t) {
2571            var e;
2572            for (e in t) this._setOption(e, t[e]);
vendor: 7,824 bytes, lines 2573-2712
2573            return this
2574        },
2575        _setOption: function (t, e) {
2576            return "classes" === t && this._setOptionClasses(e), this.options[t] = e, "disabled" === t && this._setOptionDisabled(e), this
2577        },
2578        _setOptionClasses: function (t) {
2579            var e, i, n;
2580            for (e in t) n = this.classesElementLookup[e], t[e] !== this.options.classes[e] && n && n.length && (i = k(n.get()), this._removeClass(n, e), i.addClass(this._classes({
2581                element: i,
2582                keys: e,
2583                classes: t,
2584                add: !0
2585            })))
2586        },
2587        _setOptionDisabled: function (t) {
2588            this._toggleClass(this.widget(), this.widgetFullName + "-disabled", null, !!t), t && (this._removeClass(this.hoverable, null, "ui-state-hover"), this._removeClass(this.focusable, null, "ui-state-focus"))
2589        },
2590        enable: function () {
2591            return this._setOptions({disabled: !1})
2592        },
2593        disable: function () {
2594            return this._setOptions({disabled: !0})
2595        },
2596        _classes: function (s) {
2597            function t(t, e) {
2598                var i, n;
2599                for (n = 0; t.length > n; n++) i = a.classesElementLookup[t[n]] || k(), i = s.add ? k(k.unique(i.get().concat(s.element.get()))) : k(i.not(s.element).get()), a.classesElementLookup[t[n]] = i, o.push(t[n]), e && s.classes[t[n]] && o.push(s.classes[t[n]])
2600            }
2601
2602            var o = [], a = this;
2603            return s = k.extend({
2604                element: this.element,
2605                classes: this.options.classes || {}
2606            }, s), this._on(s.element, {remove: "_untrackClassesElement"}), s.keys && t(s.keys.match(/\S+/g) || [], !0), s.extra && t(s.extra.match(/\S+/g) || []), o.join(" ")
2607        },
2608        _untrackClassesElement: function (i) {
2609            var n = this;
2610            k.each(n.classesElementLookup, function (t, e) {
2611                -1 !== k.inArray(i.target, e) && (n.classesElementLookup[t] = k(e.not(i.target).get()))
2612            })
2613        },
2614        _removeClass: function (t, e, i) {
2615            return this._toggleClass(t, e, i, !1)
2616        },
2617        _addClass: function (t, e, i) {
2618            return this._toggleClass(t, e, i, !0)
2619        },
2620        _toggleClass: function (t, e, i, n) {
2621            n = "boolean" == typeof n ? n : i;
2622            var s = "string" == typeof t || null === t,
2623                o = {extra: s ? e : i, keys: s ? t : e, element: s ? this.element : t, add: n};
2624            return o.element.toggleClass(this._classes(o), n), this
2625        },
2626        _on: function (a, r, t) {
2627            var l, h = this;
2628            "boolean" != typeof a && (t = r, r = a, a = !1), t ? (r = l = k(r), this.bindings = this.bindings.add(r)) : (t = r, r = this.element, l = this.widget()), k.each(t, function (t, e) {
2629                function i() {
2630                    return a || !0 !== h.options.disabled && !k(this).hasClass("ui-state-disabled") ? ("string" == typeof e ? h[e] : e).apply(h, arguments) : void 0
2631                }
2632
2633                "string" != typeof e && (i.guid = e.guid = e.guid || i.guid || k.guid++);
2634                var n = t.match(/^([\w:-]*)\s*(.*)$/), s = n[1] + h.eventNamespace, o = n[2];
2635                o ? l.on(s, o, i) : r.on(s, i)
2636            })
2637        },
2638        _off: function (t, e) {
2639            e = (e || "").split(" ").join(this.eventNamespace + " ") + this.eventNamespace, t.off(e).off(e), this.bindings = k(this.bindings.not(t).get()), this.focusable = k(this.focusable.not(t).get()), this.hoverable = k(this.hoverable.not(t).get())
2640        },
2641        _delay: function (t, e) {
2642            var i = this;
2643            return setTimeout(function () {
2644                return ("string" == typeof t ? i[t] : t).apply(i, arguments)
2645            }, e || 0)
2646        },
2647        _hoverable: function (t) {
2648            this.hoverable = this.hoverable.add(t), this._on(t, {
2649                mouseenter: function (t) {
2650                    this._addClass(k(t.currentTarget), null, "ui-state-hover")
2651                }, mouseleave: function (t) {
2652                    this._removeClass(k(t.currentTarget), null, "ui-state-hover")
2653                }
2654            })
2655        },
2656        _focusable: function (t) {
2657            this.focusable = this.focusable.add(t), this._on(t, {
2658                focusin: function (t) {
2659                    this._addClass(k(t.currentTarget), null, "ui-state-focus")
2660                }, focusout: function (t) {
2661                    this._removeClass(k(t.currentTarget), null, "ui-state-focus")
2662                }
2663            })
2664        },
2665        _trigger: function (t, e, i) {
2666            var n, s, o = this.options[t];
2667            if (i = i || {}, (e = k.Event(e)).type = (t === this.widgetEventPrefix ? t : this.widgetEventPrefix + t).toLowerCase(), e.target = this.element[0], s = e.originalEvent) for (n in s) n in e || (e[n] = s[n]);
2668            return this.element.trigger(e, i), !(k.isFunction(o) && !1 === o.apply(this.element[0], [e].concat(i)) || e.isDefaultPrevented())
2669        }
2670    }, k.each({show: "fadeIn", hide: "fadeOut"}, function (o, a) {
2671        k.Widget.prototype["_" + o] = function (e, t, i) {
2672            "string" == typeof t && (t = {effect: t});
2673            var n, s = t ? !0 === t || "number" == typeof t ? a : t.effect || a : o;
2674            "number" == typeof (t = t || {}) && (t = {duration: t}), n = !k.isEmptyObject(t), t.complete = i, t.delay && e.delay(t.delay), n && k.effects && k.effects.effect[s] ? e[o](t) : s !== o && e[s] ? e[s](t.duration, t.easing, i) : e.queue(function (t) {
2675                k(this)[o](), i && i.call(e[0]), t()
2676            })
2677        }
2678    }), k.widget, x = Math.max, C = Math.abs, a = /left|center|right/, r = /top|center|bottom/, l = /[\+\-]\d+(\.[\d]+)?%?/, h = /^\w+/, c = /%$/, D = k.fn.position, k.position = {
2679        scrollbarWidth: function () {
2680            if (void 0 !== s) return s;
2681            var t, e,
2682                i = k("<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),
2683                n = i.children()[0];
2684            return k("body").append(i), t = n.offsetWidth, i.css("overflow", "scroll"), t === (e = n.offsetWidth) && (e = i[0].clientWidth), i.remove(), s = t - e
2685        }, getScrollInfo: function (t) {
2686            var e = t.isWindow || t.isDocument ? "" : t.element.css("overflow-x"),
2687                i = t.isWindow || t.isDocument ? "" : t.element.css("overflow-y"),
2688                n = "scroll" === e || "auto" === e && t.width < t.element[0].scrollWidth;
2689            return {
2690                width: "scroll" === i || "auto" === i && t.height < t.element[0].scrollHeight ? k.position.scrollbarWidth() : 0,
2691                height: n ? k.position.scrollbarWidth() : 0
2692            }
2693        }, getWithinInfo: function (t) {
2694            var e = k(t || window), i = k.isWindow(e[0]), n = !!e[0] && 9 === e[0].nodeType;
2695            return {
2696                element: e,
2697                isWindow: i,
2698                isDocument: n,
2699                offset: i || n ? {left: 0, top: 0} : k(t).offset(),
2700                scrollLeft: e.scrollLeft(),
2701                scrollTop: e.scrollTop(),
2702                width: e.outerWidth(),
2703                height: e.outerHeight()
2704            }
2705        }
2706    }, k.fn.position = function (u) {
2707        if (!u || !u.of) return D.apply(this, arguments);
2708        u = k.extend({}, u);
2709        var d, p, f, m, g, t, v = k(u.of), y = k.position.getWithinInfo(u.within), b = k.position.getScrollInfo(y),
2710            _ = (u.collision || "flip").split(" "), w = {};
2711        return t = function (t) {
2712            var e = t[0];
vendor: 5,027 bytes, lines 2713-2780
2713            return 9 === e.nodeType ? {
2714                width: t.width(),
2715                height: t.height(),
2716                offset: {top: 0, left: 0}
2717            } : k.isWindow(e) ? {
2718                width: t.width(),
2719                height: t.height(),
2720                offset: {top: t.scrollTop(), left: t.scrollLeft()}
2721            } : e.preventDefault ? {
2722                width: 0,
2723                height: 0,
2724                offset: {top: e.pageY, left: e.pageX}
2725            } : {width: t.outerWidth(), height: t.outerHeight(), offset: t.offset()}
2726        }(v), v[0].preventDefault && (u.at = "left top"), p = t.width, f = t.height, m = t.offset, g = k.extend({}, m), k.each(["my", "at"], function () {
2727            var t, e, i = (u[this] || "").split(" ");
2728            1 === i.length && (i = a.test(i[0]) ? i.concat(["center"]) : r.test(i[0]) ? ["center"].concat(i) : ["center", "center"]), i[0] = a.test(i[0]) ? i[0] : "center", i[1] = r.test(i[1]) ? i[1] : "center", t = l.exec(i[0]), e = l.exec(i[1]), w[this] = [t ? t[0] : 0, e ? e[0] : 0], u[this] = [h.exec(i[0])[0], h.exec(i[1])[0]]
2729        }), 1 === _.length && (_[1] = _[0]), "right" === u.at[0] ? g.left += p : "center" === u.at[0] && (g.left += p / 2), "bottom" === u.at[1] ? g.top += f : "center" === u.at[1] && (g.top += f / 2), d = T(w.at, p, f), g.left += d[0], g.top += d[1], this.each(function () {
2730            var i, t, a = k(this), r = a.outerWidth(), l = a.outerHeight(), e = S(this, "marginLeft"),
2731                n = S(this, "marginTop"), s = r + e + S(this, "marginRight") + b.width,
2732                o = l + n + S(this, "marginBottom") + b.height, h = k.extend({}, g),
2733                c = T(w.my, a.outerWidth(), a.outerHeight());
2734            "right" === u.my[0] ? h.left -= r : "center" === u.my[0] && (h.left -= r / 2), "bottom" === u.my[1] ? h.top -= l : "center" === u.my[1] && (h.top -= l / 2), h.left += c[0], h.top += c[1], i = {
2735                marginLeft: e,
2736                marginTop: n
2737            }, k.each(["left", "top"], function (t, e) {
2738                k.ui.position[_[t]] && k.ui.position[_[t]][e](h, {
2739                    targetWidth: p,
2740                    targetHeight: f,
2741                    elemWidth: r,
2742                    elemHeight: l,
2743                    collisionPosition: i,
2744                    collisionWidth: s,
2745                    collisionHeight: o,
2746                    offset: [d[0] + c[0], d[1] + c[1]],
2747                    my: u.my,
2748                    at: u.at,
2749                    within: y,
2750                    elem: a
2751                })
2752            }), u.using && (t = function (t) {
2753                var e = m.left - h.left, i = e + p - r, n = m.top - h.top, s = n + f - l, o = {
2754                    target: {element: v, left: m.left, top: m.top, width: p, height: f},
2755                    element: {element: a, left: h.left, top: h.top, width: r, height: l},
2756                    horizontal: i < 0 ? "left" : 0 < e ? "right" : "center",
2757                    vertical: s < 0 ? "top" : 0 < n ? "bottom" : "middle"
2758                };
2759                p < r && p > C(e + i) && (o.horizontal = "center"), f < l && f > C(n + s) && (o.vertical = "middle"), o.important = x(C(e), C(i)) > x(C(n), C(s)) ? "horizontal" : "vertical", u.using.call(this, t, o)
2760            }), a.offset(k.extend(h, {using: t}))
2761        })
2762    }, k.ui.position = {
2763        fit: {
2764            left: function (t, e) {
2765                var i, n = e.within, s = n.isWindow ? n.scrollLeft : n.offset.left, o = n.width,
2766                    a = t.left - e.collisionPosition.marginLeft, r = s - a, l = a + e.collisionWidth - o - s;
2767                e.collisionWidth > o ? 0 < r && l <= 0 ? (i = t.left + r + e.collisionWidth - o - s, t.left += r - i) : t.left = 0 < l && r <= 0 ? s : l < r ? s + o - e.collisionWidth : s : 0 < r ? t.left += r : 0 < l ? t.left -= l : t.left = x(t.left - a, t.left)
2768            }, top: function (t, e) {
2769                var i, n = e.within, s = n.isWindow ? n.scrollTop : n.offset.top, o = e.within.height,
2770                    a = t.top - e.collisionPosition.marginTop, r = s - a, l = a + e.collisionHeight - o - s;
2771                e.collisionHeight > o ? 0 < r && l <= 0 ? (i = t.top + r + e.collisionHeight - o - s, t.top += r - i) : t.top = 0 < l && r <= 0 ? s : l < r ? s + o - e.collisionHeight : s : 0 < r ? t.top += r : 0 < l ? t.top -= l : t.top = x(t.top - a, t.top)
2772            }
2773        }, flip: {
2774            left: function (t, e) {
2775                var i, n, s = e.within, o = s.offset.left + s.scrollLeft, a = s.width,
2776                    r = s.isWindow ? s.scrollLeft : s.offset.left, l = t.left - e.collisionPosition.marginLeft,
2777                    h = l - r, c = l + e.collisionWidth - a - r,
2778                    u = "left" === e.my[0] ? -e.elemWidth : "right" === e.my[0] ? e.elemWidth : 0,
2779                    d = "left" === e.at[0] ? e.targetWidth : "right" === e.at[0] ? -e.targetWidth : 0,
2780                    p = -2 * e.offset[0];
2781                h < 0 ? ((i = t.left + u + d + p + e.collisionWidth - a - o) < 0 || C(h) > i) && (t.left += u + d + p) : 0 < c && (0 < (n = t.left - e.collisionPosition.marginLeft + u + d + p - r) || c > C(n)) && (t.left += u + d + p)
2782            }, top: function (t, e) {
2783                var i, n, s = e.within, o = s.offset.top + s.scrollTop, a = s.height,
2784                    r = s.isWindow ? s.scrollTop : s.offset.top, l = t.top - e.collisionPosition.marginTop, h = l - r,
2785                    c = l + e.collisionHeight - a - r,
2786                    u = "top" === e.my[1] ? -e.elemHeight : "bottom" === e.my[1] ? e.elemHeight : 0,
2787                    d = "top" === e.at[1] ? e.targetHeight : "bottom" === e.at[1] ? -e.targetHeight : 0,
2788                    p = -2 * e.offset[1];
2789                h < 0 ? ((n = t.top + u + d + p + e.collisionHeight - a - o) < 0 || C(h) > n) && (t.top += u + d + p) : 0 < c && (0 < (i = t.top - e.collisionPosition.marginTop + u + d + p - r) || c > C(i)) && (t.top += u + d + p)
2790            }
2791        }, flipfit: {
2792            left: function () {
2793                k.ui.position.flip.left.apply(this, arguments), k.ui.position.fit.left.apply(this, arguments)
2794            }, top: function () {
2795                k.ui.position.flip.top.apply(this, arguments), k.ui.position.fit.top.apply(this, arguments)
2796            }
2797        }
2798    }, k.ui.position, k.extend(k.expr[":"], {
2799        data: k.expr.createPseudo ? k.expr.createPseudo(function (e) {
2800            return function (t) {
2801                return !!k.data(t, e)
2802            }
2803        }) : function (t, e, i) {
2804            return !!k.data(t, i[3])
2805        }
2806    }), k.fn.extend({
2807        disableSelection: (n = "onselectstart" in document.createElement("div") ? "selectstart" : "mousedown", function () {
2808            return this.on(n + ".ui-disableSelection", function (t) {
2809                t.preventDefault()
2810            })
2811        }), enableSelection: function () {
2812            return this.off(".ui-disableSelection")
2813        }
2814    });
2815    var m, g, v, y, b, _, w, I, P, M, $, E, N, A, O, H, z, F, L, j, R, W = "ui-effects-", B = "ui-effects-style",
2816        q = "ui-effects-animated", U = k;
2817
2818    function Y(t, e, i, n) {
2819        return k.isPlainObject(t) && (t = (e = t).effect), t = {effect: t}, null == e && (e = {}), k.isFunction(e) && (n = e, i = null, e = {}), "number" != typeof e && !k.fx.speeds[e] || (n = i, i = e, e = {}), k.isFunction(i) && (n = i, i = null), e && k.extend(t, e), i = i || e.duration, t.duration = k.fx.off ? 0 : "number" == typeof i ? i : i in k.fx.speeds ? k.fx.speeds[i] : k.fx.speeds._default, t.complete = n || e.complete, t
2820    }
2821
2822    function V(t) {
2823        return !(t && "number" != typeof t && !k.fx.speeds[t]) || ("string" == typeof t && !k.effects.effect[t] || (!!k.isFunction(t) || "object" == typeof t && !t.effect))
2824    }
2825
2826    function K(t, e) {
2827        var i = e.outerWidth(), n = e.outerHeight(),
2828            s = /^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(t) || ["", 0, i, n, 0];
2829        return {
2830            top: parseFloat(s[1]) || 0,
2831            right: "auto" === s[2] ? i : parseFloat(s[2]),
2832            bottom: "auto" === s[3] ? n : parseFloat(s[3]),
2833            left: parseFloat(s[4]) || 0
2834        }
2835    }
2836
2837    function X(t) {
2838        var e, i,
2839            n = t.ownerDocument.defaultView ? t.ownerDocument.defaultView.getComputedStyle(t, null) : t.currentStyle,
2840            s = {};
2841        if (n && n.length && n[0] && n[n[0]]) for (i = n.length; i--;) "string" == typeof n[e = n[i]] && (s[k.camelCase(e)] = n[e]); else for (e in n) "string" == typeof n[e] && (s[e] = n[e]);
2842        return s
2843    }
2844
2845    function Q(t, e, i) {
2846        var n = F[e.type] || {};
2847        return null == t ? i || !e.def ? null : e.def : (t = n.floor ? ~~t : parseFloat(t), isNaN(t) ? e.def : n.mod ? (t + n.mod) % n.mod : t < 0 ? 0 : t > n.max ? n.max : t)
2848    }
2849
2850    function G(a) {
vendor: 5,684 bytes, lines 2851-2959
2851        var r = H(), l = r._rgba = [];
2852        return a = a.toLowerCase(), R(O, function (t, e) {
2853            var i, n = e.re.exec(a), s = n && e.parse(n), o = e.space || "rgba";
2854            return s ? (i = r[o](s), r[z[o].cache] = i[z[o].cache], l = r._rgba = i._rgba, !1) : E
2855        }), l.length ? ("0,0,0,0" === l.join() && $.extend(l, N.transparent), r) : N[a]
2856    }
2857
2858    function J(t, e, i) {
2859        return 6 * (i = (i + 1) % 1) < 1 ? t + 6 * (e - t) * i : 2 * i < 1 ? e : 3 * i < 2 ? t + 6 * (e - t) * (2 / 3 - i) : t
2860    }
2861
2862    k.effects = {effect: {}}, A = /^([\-+])=\s*(\d+\.?\d*)/, O = [{
2863        re: /rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
2864        parse: function (t) {
2865            return [t[1], t[2], t[3], t[4]]
2866        }
2867    }, {
2868        re: /rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
2869        parse: function (t) {
2870            return [2.55 * t[1], 2.55 * t[2], 2.55 * t[3], t[4]]
2871        }
2872    }, {
2873        re: /#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/, parse: function (t) {
2874            return [parseInt(t[1], 16), parseInt(t[2], 16), parseInt(t[3], 16)]
2875        }
2876    }, {
2877        re: /#([a-f0-9])([a-f0-9])([a-f0-9])/, parse: function (t) {
2878            return [parseInt(t[1] + t[1], 16), parseInt(t[2] + t[2], 16), parseInt(t[3] + t[3], 16)]
2879        }
2880    }, {
2881        re: /hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
2882        space: "hsla",
2883        parse: function (t) {
2884            return [t[1], t[2] / 100, t[3] / 100, t[4]]
2885        }
2886    }], H = ($ = U).Color = function (t, e, i, n) {
2887        return new $.Color.fn.parse(t, e, i, n)
2888    }, z = {
2889        rgba: {props: {red: {idx: 0, type: "byte"}, green: {idx: 1, type: "byte"}, blue: {idx: 2, type: "byte"}}},
2890        hsla: {
2891            props: {
2892                hue: {idx: 0, type: "degrees"},
2893                saturation: {idx: 1, type: "percent"},
2894                lightness: {idx: 2, type: "percent"}
2895            }
2896        }
2897    }, F = {
2898        byte: {floor: !0, max: 255},
2899        percent: {max: 1},
2900        degrees: {mod: 360, floor: !0}
2901    }, L = H.support = {}, j = $("<p>")[0], R = $.each, j.style.cssText = "background-color:rgba(1,1,1,.5)", L.rgba = -1 < j.style.backgroundColor.indexOf("rgba"), R(z, function (t, e) {
2902        e.cache = "_" + t, e.props.alpha = {idx: 3, type: "percent", def: 1}
2903    }), H.fn = $.extend(H.prototype, {
2904        parse: function (s, t, e, i) {
2905            if (s === E) return this._rgba = [null, null, null, null], this;
2906            (s.jquery || s.nodeType) && (s = $(s).css(t), t = E);
2907            var o = this, n = $.type(s), a = this._rgba = [];
2908            return t !== E && (s = [s, t, e, i], n = "array"), "string" === n ? this.parse(G(s) || N._default) : "array" === n ? (R(z.rgba.props, function (t, e) {
2909                a[e.idx] = Q(s[e.idx], e)
2910            }), this) : "object" === n ? (R(z, s instanceof H ? function (t, e) {
2911                s[e.cache] && (o[e.cache] = s[e.cache].slice())
2912            } : function (t, i) {
2913                var n = i.cache;
2914                R(i.props, function (t, e) {
2915                    if (!o[n] && i.to) {
2916                        if ("alpha" === t || null == s[t]) return;
2917                        o[n] = i.to(o._rgba)
2918                    }
2919                    o[n][e.idx] = Q(s[t], e, !0)
2920                }), o[n] && $.inArray(null, o[n].slice(0, 3)) < 0 && (o[n][3] = 1, i.from && (o._rgba = i.from(o[n])))
2921            }), this) : E
2922        }, is: function (t) {
2923            var s = H(t), o = !0, a = this;
2924            return R(z, function (t, e) {
2925                var i, n = s[e.cache];
2926                return n && (i = a[e.cache] || e.to && e.to(a._rgba) || [], R(e.props, function (t, e) {
2927                    return null != n[e.idx] ? o = n[e.idx] === i[e.idx] : E
2928                })), o
2929            }), o
2930        }, _space: function () {
2931            var i = [], n = this;
2932            return R(z, function (t, e) {
2933                n[e.cache] && i.push(t)
2934            }), i.pop()
2935        }, transition: function (t, a) {
2936            var r = H(t), e = r._space(), i = z[e], n = 0 === this.alpha() ? H("transparent") : this,
2937                l = n[i.cache] || i.to(n._rgba), h = l.slice();
2938            return r = r[i.cache], R(i.props, function (t, e) {
2939                var i = e.idx, n = l[i], s = r[i], o = F[e.type] || {};
2940                null !== s && (null === n ? h[i] = s : (o.mod && (s - n > o.mod / 2 ? n += o.mod : n - s > o.mod / 2 && (n -= o.mod)), h[i] = Q((s - n) * a + n, e)))
2941            }), this[e](h)
2942        }, blend: function (t) {
2943            if (1 === this._rgba[3]) return this;
2944            var e = this._rgba.slice(), i = e.pop(), n = H(t)._rgba;
2945            return H($.map(e, function (t, e) {
2946                return (1 - i) * n[e] + i * t
2947            }))
2948        }, toRgbaString: function () {
2949            var t = "rgba(", e = $.map(this._rgba, function (t, e) {
2950                return null == t ? 2 < e ? 1 : 0 : t
2951            });
2952            return 1 === e[3] && (e.pop(), t = "rgb("), t + e.join() + ")"
2953        }, toHslaString: function () {
2954            var t = "hsla(", e = $.map(this.hsla(), function (t, e) {
2955                return null == t && (t = 2 < e ? 1 : 0), e && e < 3 && (t = Math.round(100 * t) + "%"), t
2956            });
2957            return 1 === e[3] && (e.pop(), t = "hsl("), t + e.join() + ")"
2958        }, toHexString: function (t) {
2959            var e = this._rgba.slice(), i = e.pop();
vendor: 17,797 bytes, lines 2960-3301
2960            return t && e.push(~~(255 * i)), "#" + $.map(e, function (t) {
2961                return 1 === (t = (t || 0).toString(16)).length ? "0" + t : t
2962            }).join("")
2963        }, toString: function () {
2964            return 0 === this._rgba[3] ? "transparent" : this.toRgbaString()
2965        }
2966    }), H.fn.parse.prototype = H.fn, z.hsla.to = function (t) {
2967        if (null == t[0] || null == t[1] || null == t[2]) return [null, null, null, t[3]];
2968        var e, i, n = t[0] / 255, s = t[1] / 255, o = t[2] / 255, a = t[3], r = Math.max(n, s, o),
2969            l = Math.min(n, s, o), h = r - l, c = r + l, u = .5 * c;
2970        return e = l === r ? 0 : n === r ? 60 * (s - o) / h + 360 : s === r ? 60 * (o - n) / h + 120 : 60 * (n - s) / h + 240, i = 0 == h ? 0 : u <= .5 ? h / c : h / (2 - c), [Math.round(e) % 360, i, u, null == a ? 1 : a]
2971    }, z.hsla.from = function (t) {
2972        if (null == t[0] || null == t[1] || null == t[2]) return [null, null, null, t[3]];
2973        var e = t[0] / 360, i = t[1], n = t[2], s = t[3], o = n <= .5 ? n * (1 + i) : n + i - n * i, a = 2 * n - o;
2974        return [Math.round(255 * J(a, o, e + 1 / 3)), Math.round(255 * J(a, o, e)), Math.round(255 * J(a, o, e - 1 / 3)), s]
2975    }, R(z, function (l, t) {
2976        var i = t.props, a = t.cache, r = t.to, h = t.from;
2977        H.fn[l] = function (t) {
2978            if (r && !this[a] && (this[a] = r(this._rgba)), t === E) return this[a].slice();
2979            var e, n = $.type(t), s = "array" === n || "object" === n ? t : arguments, o = this[a].slice();
2980            return R(i, function (t, e) {
2981                var i = s["object" === n ? t : e.idx];
2982                null == i && (i = o[e.idx]), o[e.idx] = Q(i, e)
2983            }), h ? ((e = H(h(o)))[a] = o, e) : H(o)
2984        }, R(i, function (a, r) {
2985            H.fn[a] || (H.fn[a] = function (t) {
2986                var e, i = $.type(t), n = "alpha" === a ? this._hsla ? "hsla" : "rgba" : l, s = this[n](), o = s[r.idx];
2987                return "undefined" === i ? o : ("function" === i && (t = t.call(this, o), i = $.type(t)), null == t && r.empty ? this : ("string" === i && (e = A.exec(t)) && (t = o + parseFloat(e[2]) * ("+" === e[1] ? 1 : -1)), s[r.idx] = t, this[n](s)))
2988            })
2989        })
2990    }), H.hook = function (t) {
2991        var e = t.split(" ");
2992        R(e, function (t, o) {
2993            $.cssHooks[o] = {
2994                set: function (t, e) {
2995                    var i, n, s = "";
2996                    if ("transparent" !== e && ("string" !== $.type(e) || (i = G(e)))) {
2997                        if (e = H(i || e), !L.rgba && 1 !== e._rgba[3]) {
2998                            for (n = "backgroundColor" === o ? t.parentNode : t; ("" === s || "transparent" === s) && n && n.style;) try {
2999                                s = $.css(n, "backgroundColor"), n = n.parentNode
3000                            } catch (t) {
3001                            }
3002                            e = e.blend(s && "transparent" !== s ? s : "_default")
3003                        }
3004                        e = e.toRgbaString()
3005                    }
3006                    try {
3007                        t.style[o] = e
3008                    } catch (t) {
3009                    }
3010                }
3011            }, $.fx.step[o] = function (t) {
3012                t.colorInit || (t.start = H(t.elem, o), t.end = H(t.end), t.colorInit = !0), $.cssHooks[o].set(t.elem, t.start.transition(t.end, t.pos))
3013            }
3014        })
3015    }, H.hook("backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor"), $.cssHooks.borderColor = {
3016        expand: function (i) {
3017            var n = {};
3018            return R(["Top", "Right", "Bottom", "Left"], function (t, e) {
3019                n["border" + e + "Color"] = i
3020            }), n
3021        }
3022    }, N = $.Color.names = {
3023        aqua: "#00ffff",
3024        black: "#000000",
3025        blue: "#0000ff",
3026        fuchsia: "#ff00ff",
3027        gray: "#808080",
3028        green: "#008000",
3029        lime: "#00ff00",
3030        maroon: "#800000",
3031        navy: "#000080",
3032        olive: "#808000",
3033        purple: "#800080",
3034        red: "#ff0000",
3035        silver: "#c0c0c0",
3036        teal: "#008080",
3037        white: "#ffffff",
3038        yellow: "#ffff00",
3039        transparent: [null, null, null, 0],
3040        _default: "#ffffff"
3041    }, P = ["add", "remove", "toggle"], M = {
3042        border: 1,
3043        borderBottom: 1,
3044        borderColor: 1,
3045        borderLeft: 1,
3046        borderRight: 1,
3047        borderTop: 1,
3048        borderWidth: 1,
3049        margin: 1,
3050        padding: 1
3051    }, k.each(["borderLeftStyle", "borderRightStyle", "borderBottomStyle", "borderTopStyle"], function (t, e) {
3052        k.fx.step[e] = function (t) {
3053            ("none" !== t.end && !t.setAttr || 1 === t.pos && !t.setAttr) && (U.style(t.elem, e, t.end), t.setAttr = !0)
3054        }
3055    }), k.fn.addBack || (k.fn.addBack = function (t) {
3056        return this.add(null == t ? this.prevObject : this.prevObject.filter(t))
3057    }), k.effects.animateClass = function (s, t, e, i) {
3058        var o = k.speed(t, e, i);
3059        return this.queue(function () {
3060            var t, i = k(this), e = i.attr("class") || "", n = o.children ? i.find("*").addBack() : i;
3061            n = n.map(function () {
3062                return {el: k(this), start: X(this)}
3063            }), (t = function () {
3064                k.each(P, function (t, e) {
3065                    s[e] && i[e + "Class"](s[e])
3066                })
3067            })(), n = n.map(function () {
3068                return this.end = X(this.el[0]), this.diff = function (t, e) {
3069                    var i, n, s = {};
3070                    for (i in e) n = e[i], t[i] !== n && (M[i] || !k.fx.step[i] && isNaN(parseFloat(n)) || (s[i] = n));
3071                    return s
3072                }(this.start, this.end), this
3073            }), i.attr("class", e), n = n.map(function () {
3074                var t = this, e = k.Deferred(), i = k.extend({}, o, {
3075                    queue: !1, complete: function () {
3076                        e.resolve(t)
3077                    }
3078                });
3079                return this.el.animate(this.diff, i), e.promise()
3080            }), k.when.apply(k, n.get()).done(function () {
3081                t(), k.each(arguments, function () {
3082                    var e = this.el;
3083                    k.each(this.diff, function (t) {
3084                        e.css(t, "")
3085                    })
3086                }), o.complete.call(i[0])
3087            })
3088        })
3089    }, k.fn.extend({
3090        addClass: (I = k.fn.addClass, function (t, e, i, n) {
3091            return e ? k.effects.animateClass.call(this, {add: t}, e, i, n) : I.apply(this, arguments)
3092        }), removeClass: (w = k.fn.removeClass, function (t, e, i, n) {
3093            return 1 < arguments.length ? k.effects.animateClass.call(this, {remove: t}, e, i, n) : w.apply(this, arguments)
3094        }), toggleClass: (_ = k.fn.toggleClass, function (t, e, i, n, s) {
3095            return "boolean" == typeof e || void 0 === e ? i ? k.effects.animateClass.call(this, e ? {add: t} : {remove: t}, i, n, s) : _.apply(this, arguments) : k.effects.animateClass.call(this, {toggle: t}, e, i, n)
3096        }), switchClass: function (t, e, i, n, s) {
3097            return k.effects.animateClass.call(this, {add: e, remove: t}, i, n, s)
3098        }
3099    }), k.expr && k.expr.filters && k.expr.filters.animated && (k.expr.filters.animated = (b = k.expr.filters.animated, function (t) {
3100        return !!k(t).data(q) || b(t)
3101    })), !1 !== k.uiBackCompat && k.extend(k.effects, {
3102        save: function (t, e) {
3103            for (var i = 0, n = e.length; i < n; i++) null !== e[i] && t.data(W + e[i], t[0].style[e[i]])
3104        }, restore: function (t, e) {
3105            for (var i, n = 0, s = e.length; n < s; n++) null !== e[n] && (i = t.data(W + e[n]), t.css(e[n], i))
3106        }, setMode: function (t, e) {
3107            return "toggle" === e && (e = t.is(":hidden") ? "show" : "hide"), e
3108        }, createWrapper: function (i) {
3109            if (i.parent().is(".ui-effects-wrapper")) return i.parent();
3110            var n = {width: i.outerWidth(!0), height: i.outerHeight(!0), float: i.css("float")},
3111                t = k("<div></div>").addClass("ui-effects-wrapper").css({
3112                    fontSize: "100%",
3113                    background: "transparent",
3114                    border: "none",
3115                    margin: 0,
3116                    padding: 0
3117                }), e = {width: i.width(), height: i.height()}, s = document.activeElement;
3118            try {
3119                s.id
3120            } catch (t) {
3121                s = document.body
3122            }
3123            return i.wrap(t), i[0] !== s && !k.contains(i[0], s) || k(s).trigger("focus"), t = i.parent(), "static" === i.css("position") ? (t.css({position: "relative"}), i.css({position: "relative"})) : (k.extend(n, {
3124                position: i.css("position"),
3125                zIndex: i.css("z-index")
3126            }), k.each(["top", "left", "bottom", "right"], function (t, e) {
3127                n[e] = i.css(e), isNaN(parseInt(n[e], 10)) && (n[e] = "auto")
3128            }), i.css({
3129                position: "relative",
3130                top: 0,
3131                left: 0,
3132                right: "auto",
3133                bottom: "auto"
3134            })), i.css(e), t.css(n).show()
3135        }, removeWrapper: function (t) {
3136            var e = document.activeElement;
3137            return t.parent().is(".ui-effects-wrapper") && (t.parent().replaceWith(t), t[0] !== e && !k.contains(t[0], e) || k(e).trigger("focus")), t
3138        }
3139    }), k.extend(k.effects, {
3140        version: "1.12.1", define: function (t, e, i) {
3141            return i || (i = e, e = "effect"), k.effects.effect[t] = i, k.effects.effect[t].mode = e, i
3142        }, scaledDimensions: function (t, e, i) {
3143            if (0 === e) return {height: 0, width: 0, outerHeight: 0, outerWidth: 0};
3144            var n = "horizontal" !== i ? (e || 100) / 100 : 1, s = "vertical" !== i ? (e || 100) / 100 : 1;
3145            return {
3146                height: t.height() * s,
3147                width: t.width() * n,
3148                outerHeight: t.outerHeight() * s,
3149                outerWidth: t.outerWidth() * n
3150            }
3151        }, clipToBox: function (t) {
3152            return {
3153                width: t.clip.right - t.clip.left,
3154                height: t.clip.bottom - t.clip.top,
3155                left: t.clip.left,
3156                top: t.clip.top
3157            }
3158        }, unshift: function (t, e, i) {
3159            var n = t.queue();
3160            1 < e && n.splice.apply(n, [1, 0].concat(n.splice(e, i))), t.dequeue()
3161        }, saveStyle: function (t) {
3162            t.data(B, t[0].style.cssText)
3163        }, restoreStyle: function (t) {
3164            t[0].style.cssText = t.data(B) || "", t.removeData(B)
3165        }, mode: function (t, e) {
3166            var i = t.is(":hidden");
3167            return "toggle" === e && (e = i ? "show" : "hide"), (i ? "hide" === e : "show" === e) && (e = "none"), e
3168        }, getBaseline: function (t, e) {
3169            var i, n;
3170            switch (t[0]) {
3171                case"top":
3172                    i = 0;
3173                    break;
3174                case"middle":
3175                    i = .5;
3176                    break;
3177                case"bottom":
3178                    i = 1;
3179                    break;
3180                default:
3181                    i = t[0] / e.height
3182            }
3183            switch (t[1]) {
3184                case"left":
3185                    n = 0;
3186                    break;
3187                case"center":
3188                    n = .5;
3189                    break;
3190                case"right":
3191                    n = 1;
3192                    break;
3193                default:
3194                    n = t[1] / e.width
3195            }
3196            return {x: n, y: i}
3197        }, createPlaceholder: function (t) {
3198            var e, i = t.css("position"), n = t.position();
3199            return t.css({
3200                marginTop: t.css("marginTop"),
3201                marginBottom: t.css("marginBottom"),
3202                marginLeft: t.css("marginLeft"),
3203                marginRight: t.css("marginRight")
3204            }).outerWidth(t.outerWidth()).outerHeight(t.outerHeight()), /^(static|relative)/.test(i) && (i = "absolute", e = k("<" + t[0].nodeName + ">").insertAfter(t).css({
3205                display: /^(inline|ruby)/.test(t.css("display")) ? "inline-block" : "block",
3206                visibility: "hidden",
3207                marginTop: t.css("marginTop"),
3208                marginBottom: t.css("marginBottom"),
3209                marginLeft: t.css("marginLeft"),
3210                marginRight: t.css("marginRight"),
3211                float: t.css("float")
3212            }).outerWidth(t.outerWidth()).outerHeight(t.outerHeight()).addClass("ui-effects-placeholder"), t.data(W + "placeholder", e)), t.css({
3213                position: i,
3214                left: n.left,
3215                top: n.top
3216            }), e
3217        }, removePlaceholder: function (t) {
3218            var e = W + "placeholder", i = t.data(e);
3219            i && (i.remove(), t.removeData(e))
3220        }, cleanUp: function (t) {
3221            k.effects.restoreStyle(t), k.effects.removePlaceholder(t)
3222        }, setTransition: function (n, t, s, o) {
3223            return o = o || {}, k.each(t, function (t, e) {
3224                var i = n.cssUnit(e);
3225                0 < i[0] && (o[e] = i[0] * s + i[1])
3226            }), o
3227        }
3228    }), k.fn.extend({
3229        effect: function () {
3230            function t(t) {
3231                function e() {
3232                    k.isFunction(r) && r.call(i[0]), k.isFunction(t) && t()
3233                }
3234
3235                var i = k(this);
3236                n.mode = h.shift(), !1 === k.uiBackCompat || o ? "none" === n.mode ? (i[l](), e()) : s.call(i[0], n, function () {
3237                    i.removeData(q), k.effects.cleanUp(i), "hide" === n.mode && i.hide(), e()
3238                }) : (i.is(":hidden") ? "hide" === l : "show" === l) ? (i[l](), e()) : s.call(i[0], n, e)
3239            }
3240
3241            function e(t) {
3242                var e = k(this), i = k.effects.mode(e, l) || o;
3243                e.data(q, !0), h.push(i), o && ("show" === i || i === o && "hide" === i) && e.show(), o && "none" === i || k.effects.saveStyle(e), k.isFunction(t) && t()
3244            }
3245
3246            var n = Y.apply(this, arguments), s = k.effects.effect[n.effect], o = s.mode, i = n.queue, a = i || "fx",
3247                r = n.complete, l = n.mode, h = [];
3248            return k.fx.off || !s ? l ? this[l](n.duration, r) : this.each(function () {
3249                r && r.call(this)
3250            }) : !1 === i ? this.each(e).each(t) : this.queue(a, e).queue(a, t)
3251        }, show: (y = k.fn.show, function (t) {
3252            if (V(t)) return y.apply(this, arguments);
3253            var e = Y.apply(this, arguments);
3254            return e.mode = "show", this.effect.call(this, e)
3255        }), hide: (v = k.fn.hide, function (t) {
3256            if (V(t)) return v.apply(this, arguments);
3257            var e = Y.apply(this, arguments);
3258            return e.mode = "hide", this.effect.call(this, e)
3259        }), toggle: (g = k.fn.toggle, function (t) {
3260            if (V(t) || "boolean" == typeof t) return g.apply(this, arguments);
3261            var e = Y.apply(this, arguments);
3262            return e.mode = "toggle", this.effect.call(this, e)
3263        }), cssUnit: function (t) {
3264            var i = this.css(t), n = [];
3265            return k.each(["em", "px", "%", "pt"], function (t, e) {
3266                0 < i.indexOf(e) && (n = [parseFloat(i), e])
3267            }), n
3268        }, cssClip: function (t) {
3269            return t ? this.css("clip", "rect(" + t.top + "px " + t.right + "px " + t.bottom + "px " + t.left + "px)") : K(this.css("clip"), this)
3270        }, transfer: function (t, e) {
3271            var i = k(this), n = k(t.to), s = "fixed" === n.css("position"), o = k("body"), a = s ? o.scrollTop() : 0,
3272                r = s ? o.scrollLeft() : 0, l = n.offset(),
3273                h = {top: l.top - a, left: l.left - r, height: n.innerHeight(), width: n.innerWidth()}, c = i.offset(),
3274                u = k("<div class='ui-effects-transfer'></div>").appendTo("body").addClass(t.className).css({
3275                    top: c.top - a,
3276                    left: c.left - r,
3277                    height: i.innerHeight(),
3278                    width: i.innerWidth(),
3279                    position: s ? "fixed" : "absolute"
3280                }).animate(h, t.duration, t.easing, function () {
3281                    u.remove(), k.isFunction(e) && e()
3282                })
3283        }
3284    }), k.fx.step.clip = function (t) {
3285        t.clipInit || (t.start = k(t.elem).cssClip(), "string" == typeof t.end && (t.end = K(t.end, t.elem)), t.clipInit = !0), k(t.elem).cssClip({
3286            top: t.pos * (t.end.top - t.start.top) + t.start.top,
3287            right: t.pos * (t.end.right - t.start.right) + t.start.right,
3288            bottom: t.pos * (t.end.bottom - t.start.bottom) + t.start.bottom,
3289            left: t.pos * (t.end.left - t.start.left) + t.start.left
3290        })
3291    }, m = {}, k.each(["Quad", "Cubic", "Quart", "Quint", "Expo"], function (e, t) {
3292        m[t] = function (t) {
3293            return Math.pow(t, e + 2)
3294        }
3295    }), k.extend(m, {
3296        Sine: function (t) {
3297            return 1 - Math.cos(t * Math.PI / 2)
3298        }, Circ: function (t) {
3299            return 1 - Math.sqrt(1 - t * t)
3300        }, Elastic: function (t) {
3301            return 0 === t || 1 === t ? t : -Math.pow(2, 8 * (t - 1)) * Math.sin((80 * (t - 1) 
vendor: 4,103 bytes, lines 3301-3370
3301- 7.5) * Math.PI / 15)
3302        }, Back: function (t) {
3303            return t * t * (3 * t - 2)
3304        }, Bounce: function (t) {
3305            for (var e, i = 4; ((e = Math.pow(2, --i)) - 1) / 11 > t;) ;
3306            return 1 / Math.pow(4, 3 - i) - 7.5625 * Math.pow((3 * e - 2) / 22 - t, 2)
3307        }
3308    }), k.each(m, function (t, e) {
3309        k.easing["easeIn" + t] = e, k.easing["easeOut" + t] = function (t) {
3310            return 1 - e(1 - t)
3311        }, k.easing["easeInOut" + t] = function (t) {
3312            return t < .5 ? e(2 * t) / 2 : 1 - e(-2 * t + 2) / 2
3313        }
3314    });
3315    var Z, tt;
3316    k.effects;
3317    k.effects.define("blind", "hide", function (t, e) {
3318        var i = {
3319                up: ["bottom", "top"],
3320                vertical: ["bottom", "top"],
3321                down: ["top", "bottom"],
3322                left: ["right", "left"],
3323                horizontal: ["right", "left"],
3324                right: ["left", "right"]
3325            }, n = k(this), s = t.direction || "up", o = n.cssClip(), a = {clip: k.extend({}, o)},
3326            r = k.effects.createPlaceholder(n);
3327        a.clip[i[s][0]] = a.clip[i[s][1]], "show" === t.mode && (n.cssClip(a.clip), r && r.css(k.effects.clipToBox(a)), a.clip = o), r && r.animate(k.effects.clipToBox(a), t.duration, t.easing), n.animate(a, {
3328            queue: !1,
3329            duration: t.duration,
3330            easing: t.easing,
3331            complete: e
3332        })
3333    }), k.effects.define("bounce", function (t, e) {
3334        var i, n, s, o = k(this), a = t.mode, r = "hide" === a, l = "show" === a, h = t.direction || "up",
3335            c = t.distance, u = t.times || 5, d = 2 * u + (l || r ? 1 : 0), p = t.duration / d, f = t.easing,
3336            m = "up" === h || "down" === h ? "top" : "left", g = "up" === h || "left" === h, v = 0,
3337            y = o.queue().length;
3338        for (k.effects.createPlaceholder(o), s = o.css(m), c = c || o["top" == m ? "outerHeight" : "outerWidth"]() / 3, l && ((n = {opacity: 1})[m] = s, o.css("opacity", 0).css(m, g ? 2 * -c : 2 * c).animate(n, p, f)), r && (c /= Math.pow(2, u - 1)), (n = {})[m] = s; v < u; v++) (i = {})[m] = (g ? "-=" : "+=") + c, o.animate(i, p, f).animate(n, p, f), c = r ? 2 * c : c / 2;
3339        r && ((i = {opacity: 0})[m] = (g ? "-=" : "+=") + c, o.animate(i, p, f)), o.queue(e), k.effects.unshift(o, y, 1 + d)
3340    }), k.effects.define("clip", "hide", function (t, e) {
3341        var i, n = {}, s = k(this), o = t.direction || "vertical", a = "both" === o, r = a || "horizontal" === o,
3342            l = a || "vertical" === o;
3343        i = s.cssClip(), n.clip = {
3344            top: l ? (i.bottom - i.top) / 2 : i.top,
3345            right: r ? (i.right - i.left) / 2 : i.right,
3346            bottom: l ? (i.bottom - i.top) / 2 : i.bottom,
3347            left: r ? (i.right - i.left) / 2 : i.left
3348        }, k.effects.createPlaceholder(s), "show" === t.mode && (s.cssClip(n.clip), n.clip = i), s.animate(n, {
3349            queue: !1,
3350            duration: t.duration,
3351            easing: t.easing,
3352            complete: e
3353        })
3354    }), k.effects.define("drop", "hide", function (t, e) {
3355        var i, n = k(this), s = "show" === t.mode, o = t.direction || "left",
3356            a = "up" === o || "down" === o ? "top" : "left", r = "up" === o || "left" === o ? "-=" : "+=",
3357            l = "+=" == r ? "-=" : "+=", h = {opacity: 0};
3358        k.effects.createPlaceholder(n), i = t.distance || n["top" == a ? "outerHeight" : "outerWidth"](!0) / 2, h[a] = r + i, s && (n.css(h), h[a] = l + i, h.opacity = 1), n.animate(h, {
3359            queue: !1,
3360            duration: t.duration,
3361            easing: t.easing,
3362            complete: e
3363        })
3364    }), k.effects.define("explode", "hide", function (t, e) {
3365        function i() {
3366            g.push(this), g.length === h * c && (u.css({visibility: "visible"}), k(g).remove(), e())
3367        }
3368
3369        var n, s, o, a, r, l, h = t.pieces ? Math.round(Math.sqrt(t.pieces)) : 3, c = h, u = k(this),
3370            d = "show" === t.mode, p = u.show().css("visibility", "hidden").offset(), f = Math.
vendor: 12,117 bytes, lines 3370-3557
3370ceil(u.outerWidth() / c),
3371            m = Math.ceil(u.outerHeight() / h), g = [];
3372        for (n = 0; n < h; n++) for (a = p.top + n * m, l = n - (h - 1) / 2, s = 0; s < c; s++) o = p.left + s * f, r = s - (c - 1) / 2, u.clone().appendTo("body").wrap("<div></div>").css({
3373            position: "absolute",
3374            visibility: "visible",
3375            left: -s * f,
3376            top: -n * m
3377        }).parent().addClass("ui-effects-explode").css({
3378            position: "absolute",
3379            overflow: "hidden",
3380            width: f,
3381            height: m,
3382            left: o + (d ? r * f : 0),
3383            top: a + (d ? l * m : 0),
3384            opacity: d ? 0 : 1
3385        }).animate({
3386            left: o + (d ? 0 : r * f),
3387            top: a + (d ? 0 : l * m),
3388            opacity: d ? 1 : 0
3389        }, t.duration || 500, t.easing, i)
3390    }), k.effects.define("fade", "toggle", function (t, e) {
3391        var i = "show" === t.mode;
3392        k(this).css("opacity", i ? 0 : 1).animate({opacity: i ? 1 : 0}, {
3393            queue: !1,
3394            duration: t.duration,
3395            easing: t.easing,
3396            complete: e
3397        })
3398    }), k.effects.define("fold", "hide", function (e, t) {
3399        var i = k(this), n = e.mode, s = "show" === n, o = "hide" === n, a = e.size || 15, r = /([0-9]+)%/.exec(a),
3400            l = !!e.horizFirst ? ["right", "bottom"] : ["bottom", "right"], h = e.duration / 2,
3401            c = k.effects.createPlaceholder(i), u = i.cssClip(), d = {clip: k.extend({}, u)},
3402            p = {clip: k.extend({}, u)}, f = [u[l[0]], u[l[1]]], m = i.queue().length;
3403        r && (a = parseInt(r[1], 10) / 100 * f[o ? 0 : 1]), d.clip[l[0]] = a, p.clip[l[0]] = a, p.clip[l[1]] = 0, s && (i.cssClip(p.clip), c && c.css(k.effects.clipToBox(p)), p.clip = u), i.queue(function (t) {
3404            c && c.animate(k.effects.clipToBox(d), h, e.easing).animate(k.effects.clipToBox(p), h, e.easing), t()
3405        }).animate(d, h, e.easing).animate(p, h, e.easing).queue(t), k.effects.unshift(i, m, 4)
3406    }), k.effects.define("highlight", "show", function (t, e) {
3407        var i = k(this), n = {backgroundColor: i.css("backgroundColor")};
3408        "hide" === t.mode && (n.opacity = 0), k.effects.saveStyle(i), i.css({
3409            backgroundImage: "none",
3410            backgroundColor: t.color || "#ffff99"
3411        }).animate(n, {queue: !1, duration: t.duration, easing: t.easing, complete: e})
3412    }), k.effects.define("size", function (s, e) {
3413        var t, o, i, n = k(this), a = ["fontSize"],
3414            r = ["borderTopWidth", "borderBottomWidth", "paddingTop", "paddingBottom"],
3415            l = ["borderLeftWidth", "borderRightWidth", "paddingLeft", "paddingRight"], h = s.mode, c = "effect" !== h,
3416            u = s.scale || "both", d = s.origin || ["middle", "center"], p = n.css("position"), f = n.position(),
3417            m = k.effects.scaledDimensions(n), g = s.from || m, v = s.to || k.effects.scaledDimensions(n, 0);
3418        k.effects.createPlaceholder(n), "show" === h && (i = g, g = v, v = i), o = {
3419            from: {
3420                y: g.height / m.height,
3421                x: g.width / m.width
3422            }, to: {y: v.height / m.height, x: v.width / m.width}
3423        }, "box" !== u && "both" !== u || (o.from.y !== o.to.y && (g = k.effects.setTransition(n, r, o.from.y, g), v = k.effects.setTransition(n, r, o.to.y, v)), o.from.x !== o.to.x && (g = k.effects.setTransition(n, l, o.from.x, g), v = k.effects.setTransition(n, l, o.to.x, v))), "content" !== u && "both" !== u || o.from.y === o.to.y || (g = k.effects.setTransition(n, a, o.from.y, g), v = k.effects.setTransition(n, a, o.to.y, v)), d && (t = k.effects.getBaseline(d, m), g.top = (m.outerHeight - g.outerHeight) * t.y + f.top, g.left = (m.outerWidth - g.outerWidth) * t.x + f.left, v.top = (m.outerHeight - v.outerHeight) * t.y + f.top, v.left = (m.outerWidth - v.outerWidth) * t.x + f.left), n.css(g), "content" !== u && "both" !== u || (r = r.concat(["marginTop", "marginBottom"]).concat(a), l = l.concat(["marginLeft", "marginRight"]), n.find("*[width]").each(function () {
3424            var t = k(this), e = k.effects.scaledDimensions(t), i = {
3425                height: e.height * o.from.y,
3426                width: e.width * o.from.x,
3427                outerHeight: e.outerHeight * o.from.y,
3428                outerWidth: e.outerWidth * o.from.x
3429            }, n = {
3430                height: e.height * o.to.y,
3431                width: e.width * o.to.x,
3432                outerHeight: e.height * o.to.y,
3433                outerWidth: e.width * o.to.x
3434            };
3435            o.from.y !== o.to.y && (i = k.effects.setTransition(t, r, o.from.y, i), n = k.effects.setTransition(t, r, o.to.y, n)), o.from.x !== o.to.x && (i = k.effects.setTransition(t, l, o.from.x, i), n = k.effects.setTransition(t, l, o.to.x, n)), c && k.effects.saveStyle(t), t.css(i), t.animate(n, s.duration, s.easing, function () {
3436                c && k.effects.restoreStyle(t)
3437            })
3438        })), n.animate(v, {
3439            queue: !1, duration: s.duration, easing: s.easing, complete: function () {
3440                var t = n.offset();
3441                0 === v.opacity && n.css("opacity", g.opacity), c || (n.css("position", "static" === p ? "relative" : p).offset(t), k.effects.saveStyle(n)), e()
3442            }
3443        })
3444    }), k.effects.define("scale", function (t, e) {
3445        var i = k(this), n = t.mode,
3446            s = parseInt(t.percent, 10) || (0 === parseInt(t.percent, 10) ? 0 : "effect" !== n ? 0 : 100),
3447            o = k.extend(!0, {
3448                from: k.effects.scaledDimensions(i),
3449                to: k.effects.scaledDimensions(i, s, t.direction || "both"),
3450                origin: t.origin || ["middle", "center"]
3451            }, t);
3452        t.fade && (o.from.opacity = 1, o.to.opacity = 0), k.effects.effect.size.call(this, o, e)
3453    }), k.effects.define("puff", "hide", function (t, e) {
3454        var i = k.extend(!0, {}, t, {fade: !0, percent: parseInt(t.percent, 10) || 150});
3455        k.effects.effect.scale.call(this, i, e)
3456    }), k.effects.define("pulsate", "show", function (t, e) {
3457        var i = k(this), n = t.mode, s = "show" === n, o = s || "hide" === n, a = 2 * (t.times || 5) + (o ? 1 : 0),
3458            r = t.duration / a, l = 0, h = 1, c = i.queue().length;
3459        for (!s && i.is(":visible") || (i.css("opacity", 0).show(), l = 1); h < a; h++) i.animate({opacity: l}, r, t.easing), l = 1 - l;
3460        i.animate({opacity: l}, r, t.easing), i.queue(e), k.effects.unshift(i, c, 1 + a)
3461    }), k.effects.define("shake", function (t, e) {
3462        var i = 1, n = k(this), s = t.direction || "left", o = t.distance || 20, a = t.times || 3, r = 2 * a + 1,
3463            l = Math.round(t.duration / r), h = "up" === s || "down" === s ? "top" : "left",
3464            c = "up" === s || "left" === s, u = {}, d = {}, p = {}, f = n.queue().length;
3465        for (k.effects.createPlaceholder(n), u[h] = (c ? "-=" : "+=") + o, d[h] = (c ? "+=" : "-=") + 2 * o, p[h] = (c ? "-=" : "+=") + 2 * o, n.animate(u, l, t.easing); i < a; i++) n.animate(d, l, t.easing).animate(p, l, t.easing);
3466        n.animate(d, l, t.easing).animate(u, l / 2, t.easing).queue(e), k.effects.unshift(n, f, 1 + r)
3467    }), k.effects.define("slide", "show", function (t, e) {
3468        var i, n, s = k(this),
3469            o = {up: ["bottom", "top"], down: ["top", "bottom"], left: ["right", "left"], right: ["left", "right"]},
3470            a = t.mode, r = t.direction || "left", l = "up" === r || "down" === r ? "top" : "left",
3471            h = "up" === r || "left" === r, c = t.distance || s["top" == l ? "outerHeight" : "outerWidth"](!0), u = {};
3472        k.effects.createPlaceholder(s), i = s.cssClip(), n = s.position()[l], u[l] = (h ? -1 : 1) * c + n, u.clip = s.cssClip(), u.clip[o[r][1]] = u.clip[o[r][0]], "show" === a && (s.cssClip(u.clip), s.css(l, u[l]), u.clip = i, u[l] = n), s.animate(u, {
3473            queue: !1,
3474            duration: t.duration,
3475            easing: t.easing,
3476            complete: e
3477        })
3478    }), !1 !== k.uiBackCompat && k.effects.define("transfer", function (t, e) {
3479        k(this).transfer(t, e)
3480    }), k.ui.focusable = function (t, e) {
3481        var i, n, s, o, a, r = t.nodeName.toLowerCase();
3482        return "area" === r ? (n = (i = t.parentNode).name, !(!t.href || !n || "map" !== i.nodeName.toLowerCase()) && (0 < (s = k("img[usemap='#" + n + "']")).length && s.is(":visible"))) : (/^(input|select|textarea|button|object)$/.test(r) ? (o = !t.disabled) && ((a = k(t).closest("fieldset")[0]) && (o = !a.disabled)) : o = "a" === r && t.href || e, o && k(t).is(":visible") && function (t) {
3483            for (var e = t.css("visibility"); "inherit" === e;) e = (t = t.parent()).css("visibility");
3484            return "hidden" !== e
3485        }(k(t)))
3486    }, k.extend(k.expr[":"], {
3487        focusable: function (t) {
3488            return k.ui.focusable(t, null != k.attr(t, "tabindex"))
3489        }
3490    }), k.ui.focusable, k.fn.form = function () {
3491        return "string" == typeof this[0].form ? this.closest("form") : k(this[0].form)
3492    }, k.ui.formResetMixin = {
3493        _formResetHandler: function () {
3494            var e = k(this);
3495            setTimeout(function () {
3496                var t = e.data("ui-form-reset-instances");
3497                k.each(t, function () {
3498                    this.refresh()
3499                })
3500            })
3501        }, _bindFormResetHandler: function () {
3502            if (this.form = this.element.form(), this.form.length) {
3503                var t = this.form.data("ui-form-reset-instances") || [];
3504                t.length || this.form.on("reset.ui-form-reset", this._formResetHandler), t.push(this), this.form.data("ui-form-reset-instances", t)
3505            }
3506        }, _unbindFormResetHandler: function () {
3507            if (this.form.length) {
3508                var t = this.form.data("ui-form-reset-instances");
3509                t.splice(k.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")
3510            }
3511        }
3512    }, "1.7" === k.fn.jquery.substring(0, 3) && (k.each(["Width", "Height"], function (t, i) {
3513        function n(t, e, i, n) {
3514            return k.each(s, function () {
3515                e -= parseFloat(k.css(t, "padding" + this)) || 0, i && (e -= parseFloat(k.css(t, "border" + this + "Width")) || 0), n && (e -= parseFloat(k.css(t, "margin" + this)) || 0)
3516            }), e
3517        }
3518
3519        var s = "Width" === i ? ["Left", "Right"] : ["Top", "Bottom"], o = i.toLowerCase(), a = {
3520            innerWidth: k.fn.innerWidth,
3521            innerHeight: k.fn.innerHeight,
3522            outerWidth: k.fn.outerWidth,
3523            outerHeight: k.fn.outerHeight
3524        };
3525        k.fn["inner" + i] = function (t) {
3526            return void 0 === t ? a["inner" + i].call(this) : this.each(function () {
3527                k(this).css(o, n(this, t) + "px")
3528            })
3529        }, k.fn["outer" + i] = function (t, e) {
3530            return "number" != typeof t ? a["outer" + i].call(this, t) : this.each(function () {
3531                k(this).css(o, n(this, t, !0, e) + "px")
3532            })
3533        }
3534    }), k.fn.addBack = function (t) {
3535        return this.add(null == t ? this.prevObject : this.prevObject.filter(t))
3536    }), k.ui.keyCode = {
3537        BACKSPACE: 8,
3538        COMMA: 188,
3539        DELETE: 46,
3540        DOWN: 40,
3541        END: 35,
3542        ENTER: 13,
3543        ESCAPE: 27,
3544        HOME: 36,
3545        LEFT: 37,
3546        PAGE_DOWN: 34,
3547        PAGE_UP: 33,
3548        PERIOD: 190,
3549        RIGHT: 39,
3550        SPACE: 32,
3551        TAB: 9,
3552        UP: 38
3553    }, k.ui.escapeSelector = (tt = /([!"#$%&'()*+,./:;<=>?@[\]^`{|}~])/g, function (t) {
3554        return t.replace(tt, "\\$1")
3555    }), k.fn.labels = function () {
3556        var t, e, i, n, s;
3557        return this[0].labels && this[0].labels.length ? this.pushStack(this[0].labels) : (n = this.eq(0).parents("label"), (i = this.attr("id")) && (s = (t = this.eq(0).parents().last(
vendor: 5,456 bytes, lines 3557-3658
3557)).add(t.length ? t.siblings() : this.siblings()), e = "label[for='" + k.ui.escapeSelector(i) + "']", n = n.add(s.find(e).addBack(e))), this.pushStack(n))
3558    }, k.fn.scrollParent = function (t) {
3559        var e = this.css("position"), i = "absolute" === e, n = t ? /(auto|scroll|hidden)/ : /(auto|scroll)/,
3560            s = this.parents().filter(function () {
3561                var t = k(this);
3562                return (!i || "static" !== t.css("position")) && n.test(t.css("overflow") + t.css("overflow-y") + t.css("overflow-x"))
3563            }).eq(0);
3564        return "fixed" !== e && s.length ? s : k(this[0].ownerDocument || document)
3565    }, k.extend(k.expr[":"], {
3566        tabbable: function (t) {
3567            var e = k.attr(t, "tabindex"), i = null != e;
3568            return (!i || 0 <= e) && k.ui.focusable(t, i)
3569        }
3570    }), k.fn.extend({
3571        uniqueId: (Z = 0, function () {
3572            return this.each(function () {
3573                this.id || (this.id = "ui-id-" + ++Z)
3574            })
3575        }), removeUniqueId: function () {
3576            return this.each(function () {
3577                /^ui-id-\d+$/.test(this.id) && k(this).removeAttr("id")
3578            })
3579        }
3580    }), k.widget("ui.accordion", {
3581        version: "1.12.1",
3582        options: {
3583            active: 0,
3584            animate: {},
3585            classes: {
3586                "ui-accordion-header": "ui-corner-top",
3587                "ui-accordion-header-collapsed": "ui-corner-all",
3588                "ui-accordion-content": "ui-corner-bottom"
3589            },
3590            collapsible: !1,
3591            event: "click",
3592            header: "> li > :first-child, > :not(li):even",
3593            heightStyle: "auto",
3594            icons: {activeHeader: "ui-icon-triangle-1-s", header: "ui-icon-triangle-1-e"},
3595            activate: null,
3596            beforeActivate: null
3597        },
3598        hideProps: {
3599            borderTopWidth: "hide",
3600            borderBottomWidth: "hide",
3601            paddingTop: "hide",
3602            paddingBottom: "hide",
3603            height: "hide"
3604        },
3605        showProps: {
3606            borderTopWidth: "show",
3607            borderBottomWidth: "show",
3608            paddingTop: "show",
3609            paddingBottom: "show",
3610            height: "show"
3611        },
3612        _create: function () {
3613            var t = this.options;
3614            this.prevShow = this.prevHide = k(), this._addClass("ui-accordion", "ui-widget ui-helper-reset"), this.element.attr("role", "tablist"), t.collapsible || !1 !== t.active && null != t.active || (t.active = 0), this._processPanels(), t.active < 0 && (t.active += this.headers.length), this._refresh()
3615        },
3616        _getCreateEventData: function () {
3617            return {header: this.active, panel: this.active.length ? this.active.next() : k()}
3618        },
3619        _createIcons: function () {
3620            var t, e, i = this.options.icons;
3621            i && (t = k("<span>"), this._addClass(t, "ui-accordion-header-icon", "ui-icon " + i.header), t.prependTo(this.headers), e = this.active.children(".ui-accordion-header-icon"), this._removeClass(e, i.header)._addClass(e, null, i.activeHeader)._addClass(this.headers, "ui-accordion-icons"))
3622        },
3623        _destroyIcons: function () {
3624            this._removeClass(this.headers, "ui-accordion-icons"), this.headers.children(".ui-accordion-header-icon").remove()
3625        },
3626        _destroy: function () {
3627            var t;
3628            this.element.removeAttr("role"), this.headers.removeAttr("role aria-expanded aria-selected aria-controls tabIndex").removeUniqueId(), this._destroyIcons(), t = this.headers.next().css("display", "").removeAttr("role aria-hidden aria-labelledby").removeUniqueId(), "content" !== this.options.heightStyle && t.css("height", "")
3629        },
3630        _setOption: function (t, e) {
3631            return "active" === t ? void this._activate(e) : ("event" === t && (this.options.event && this._off(this.headers, this.options.event), this._setupEvents(e)), this._super(t, e), "collapsible" !== t || e || !1 !== this.options.active || this._activate(0), void ("icons" === t && (this._destroyIcons(), e && this._createIcons())))
3632        },
3633        _setOptionDisabled: function (t) {
3634            this._super(t), this.element.attr("aria-disabled", t), this._toggleClass(null, "ui-state-disabled", !!t), this._toggleClass(this.headers.add(this.headers.next()), null, "ui-state-disabled", !!t)
3635        },
3636        _keydown: function (t) {
3637            if (!t.altKey && !t.ctrlKey) {
3638                var e = k.ui.keyCode, i = this.headers.length, n = this.headers.index(t.target), s = !1;
3639                switch (t.keyCode) {
3640                    case e.RIGHT:
3641                    case e.DOWN:
3642                        s = this.headers[(n + 1) % i];
3643                        break;
3644                    case e.LEFT:
3645                    case e.UP:
3646                        s = this.headers[(n - 1 + i) % i];
3647                        break;
3648                    case e.SPACE:
3649                    case e.ENTER:
3650                        this._eventHandler(t);
3651                        break;
3652                    case e.HOME:
3653                        s = this.headers[0];
3654                        break;
3655                    case e.END:
3656                        s = this.headers[i - 1]
3657                }
3658                s && (k(t.target).attr("tabIndex", -1), k(s).attr("tabIndex", 0), 
vendor: 42,561 bytes, lines 3658-4350
3658k(s).trigger("focus"), t.preventDefault())
3659            }
3660        },
3661        _panelKeyDown: function (t) {
3662            t.keyCode === k.ui.keyCode.UP && t.ctrlKey && k(t.currentTarget).prev().trigger("focus")
3663        },
3664        refresh: function () {
3665            var t = this.options;
3666            this._processPanels(), !1 === t.active && !0 === t.collapsible || !this.headers.length ? (t.active = !1, this.active = k()) : !1 === t.active ? this._activate(0) : this.active.length && !k.contains(this.element[0], this.active[0]) ? this.headers.length === this.headers.find(".ui-state-disabled").length ? (t.active = !1, this.active = k()) : this._activate(Math.max(0, t.active - 1)) : t.active = this.headers.index(this.active), this._destroyIcons(), this._refresh()
3667        },
3668        _processPanels: function () {
3669            var t = this.headers, e = this.panels;
3670            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"), e && (this._off(t.not(this.headers)), this._off(e.not(this.panels)))
3671        },
3672        _refresh: function () {
3673            var i, t = this.options, e = t.heightStyle, n = this.element.parent();
3674            this.active = this._findActive(t.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 () {
3675                var t = k(this), e = t.uniqueId().attr("id"), i = t.next(), n = i.uniqueId().attr("id");
3676                t.attr("aria-controls", n), i.attr("aria-labelledby", e)
3677            }).next().attr("role", "tabpanel"), this.headers.not(this.active).attr({
3678                "aria-selected": "false",
3679                "aria-expanded": "false",
3680                tabIndex: -1
3681            }).next().attr({"aria-hidden": "true"}).hide(), this.active.length ? this.active.attr({
3682                "aria-selected": "true",
3683                "aria-expanded": "true",
3684                tabIndex: 0
3685            }).next().attr({"aria-hidden": "false"}) : this.headers.eq(0).attr("tabIndex", 0), this._createIcons(), this._setupEvents(t.event), "fill" === e ? (i = n.height(), this.element.siblings(":visible").each(function () {
3686                var t = k(this), e = t.css("position");
3687                "absolute" !== e && "fixed" !== e && (i -= t.outerHeight(!0))
3688            }), this.headers.each(function () {
3689                i -= k(this).outerHeight(!0)
3690            }), this.headers.next().each(function () {
3691                k(this).height(Math.max(0, i - k(this).innerHeight() + k(this).height()))
3692            }).css("overflow", "auto")) : "auto" === e && (i = 0, this.headers.next().each(function () {
3693                var t = k(this).is(":visible");
3694                t || k(this).show(), i = Math.max(i, k(this).css("height", "").height()), t || k(this).hide()
3695            }).height(i))
3696        },
3697        _activate: function (t) {
3698            var e = this._findActive(t)[0];
3699            e !== this.active[0] && (e = e || this.active[0], this._eventHandler({
3700                target: e,
3701                currentTarget: e,
3702                preventDefault: k.noop
3703            }))
3704        },
3705        _findActive: function (t) {
3706            return "number" == typeof t ? this.headers.eq(t) : k()
3707        },
3708        _setupEvents: function (t) {
3709            var i = {keydown: "_keydown"};
3710            t && k.each(t.split(" "), function (t, e) {
3711                i[e] = "_eventHandler"
3712            }), 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)
3713        },
3714        _eventHandler: function (t) {
3715            var e, i, n = this.options, s = this.active, o = k(t.currentTarget), a = o[0] === s[0],
3716                r = a && n.collapsible, l = r ? k() : o.next(), h = s.next(),
3717                c = {oldHeader: s, oldPanel: h, newHeader: r ? k() : o, newPanel: l};
3718            t.preventDefault(), a && !n.collapsible || !1 === this._trigger("beforeActivate", t, c) || (n.active = !r && this.headers.index(o), this.active = a ? k() : o, this._toggle(c), this._removeClass(s, "ui-accordion-header-active", "ui-state-active"), n.icons && (e = s.children(".ui-accordion-header-icon"), this._removeClass(e, null, n.icons.activeHeader)._addClass(e, null, n.icons.header)), a || (this._removeClass(o, "ui-accordion-header-collapsed")._addClass(o, "ui-accordion-header-active", "ui-state-active"), n.icons && (i = o.children(".ui-accordion-header-icon"), this._removeClass(i, null, n.icons.header)._addClass(i, null, n.icons.activeHeader)), this._addClass(o.next(), "ui-accordion-content-active")))
3719        },
3720        _toggle: function (t) {
3721            var e = t.newPanel, i = this.prevShow.length ? this.prevShow : t.oldPanel;
3722            this.prevShow.add(this.prevHide).stop(!0, !0), this.prevShow = e, this.prevHide = i, this.options.animate ? this._animate(e, i, t) : (i.hide(), e.show(), this._toggleComplete(t)), i.attr({"aria-hidden": "true"}), i.prev().attr({
3723                "aria-selected": "false",
3724                "aria-expanded": "false"
3725            }), e.length && i.length ? i.prev().attr({
3726                tabIndex: -1,
3727                "aria-expanded": "false"
3728            }) : e.length && this.headers.filter(function () {
3729                return 0 === parseInt(k(this).attr("tabIndex"), 10)
3730            }).attr("tabIndex", -1), e.attr("aria-hidden", "false").prev().attr({
3731                "aria-selected": "true",
3732                "aria-expanded": "true",
3733                tabIndex: 0
3734            })
3735        },
3736        _animate: function (t, i, e) {
3737            function n() {
3738                r._toggleComplete(e)
3739            }
3740
3741            var s, o, a, r = this, l = 0, h = t.css("box-sizing"), c = t.length && (!i.length || t.index() < i.index()),
3742                u = this.options.animate || {}, d = c && u.down || u;
3743            return "number" == typeof d && (a = d), "string" == typeof d && (o = d), o = o || d.easing || u.easing, a = a || d.duration || u.duration, i.length ? t.length ? (s = t.show().outerHeight(), i.animate(this.hideProps, {
3744                duration: a,
3745                easing: o,
3746                step: function (t, e) {
3747                    e.now = Math.round(t)
3748                }
3749            }), void t.hide().animate(this.showProps, {
3750                duration: a, easing: o, complete: n, step: function (t, e) {
3751                    e.now = Math.round(t), "height" !== e.prop ? "content-box" === h && (l += e.now) : "content" !== r.options.heightStyle && (e.now = Math.round(s - i.outerHeight() - l), l = 0)
3752                }
3753            })) : i.animate(this.hideProps, a, o, n) : t.animate(this.showProps, a, o, n)
3754        },
3755        _toggleComplete: function (t) {
3756            var e = t.oldPanel, i = e.prev();
3757            this._removeClass(e, "ui-accordion-content-active"), this._removeClass(i, "ui-accordion-header-active")._addClass(i, "ui-accordion-header-collapsed"), e.length && (e.parent()[0].className = e.parent()[0].className), this._trigger("activate", null, t)
3758        }
3759    }), k.ui.safeActiveElement = function (e) {
3760        var i;
3761        try {
3762            i = e.activeElement
3763        } catch (t) {
3764            i = e.body
3765        }
3766        return (i = i || e.body).nodeName || (i = e.body), i
3767    }, k.widget("ui.menu", {
3768        version: "1.12.1",
3769        defaultElement: "<ul>",
3770        delay: 300,
3771        options: {
3772            icons: {submenu: "ui-icon-caret-1-e"},
3773            items: "> *",
3774            menus: "ul",
3775            position: {my: "left top", at: "right top"},
3776            role: "menu",
3777            blur: null,
3778            focus: null,
3779            select: null
3780        },
3781        _create: function () {
3782            this.activeMenu = this.element, this.mouseHandled = !1, this.element.uniqueId().attr({
3783                role: this.options.role,
3784                tabIndex: 0
3785            }), this._addClass("ui-menu", "ui-widget ui-widget-content"), this._on({
3786                "mousedown .ui-menu-item": function (t) {
3787                    t.preventDefault()
3788                }, "click .ui-menu-item": function (t) {
3789                    var e = k(t.target), i = k(k.ui.safeActiveElement(this.document[0]));
3790                    !this.mouseHandled && e.not(".ui-state-disabled").length && (this.select(t), t.isPropagationStopped() || (this.mouseHandled = !0), e.has(".ui-menu").length ? this.expand(t) : !this.element.is(":focus") && i.closest(".ui-menu").length && (this.element.trigger("focus", [!0]), this.active && 1 === this.active.parents(".ui-menu").length && clearTimeout(this.timer)))
3791                }, "mouseenter .ui-menu-item": function (t) {
3792                    if (!this.previousFilter) {
3793                        var e = k(t.target).closest(".ui-menu-item"), i = k(t.currentTarget);
3794                        e[0] === i[0] && (this._removeClass(i.siblings().children(".ui-state-active"), null, "ui-state-active"), this.focus(t, i))
3795                    }
3796                }, mouseleave: "collapseAll", "mouseleave .ui-menu": "collapseAll", focus: function (t, e) {
3797                    var i = this.active || this.element.find(this.options.items).eq(0);
3798                    e || this.focus(t, i)
3799                }, blur: function (t) {
3800                    this._delay(function () {
3801                        k.contains(this.element[0], k.ui.safeActiveElement(this.document[0])) || this.collapseAll(t)
3802                    })
3803                }, keydown: "_keydown"
3804            }), this.refresh(), this._on(this.document, {
3805                click: function (t) {
3806                    this._closeOnDocumentClick(t) && this.collapseAll(t), this.mouseHandled = !1
3807                }
3808            })
3809        },
3810        _destroy: function () {
3811            var t = this.element.find(".ui-menu-item").removeAttr("role aria-disabled").children(".ui-menu-item-wrapper").removeUniqueId().removeAttr("tabIndex role aria-haspopup");
3812            this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeAttr("role aria-labelledby aria-expanded aria-hidden aria-disabled tabIndex").removeUniqueId().show(), t.children().each(function () {
3813                var t = k(this);
3814                t.data("ui-menu-submenu-caret") && t.remove()
3815            })
3816        },
3817        _keydown: function (t) {
3818            var e, i, n, s, o = !0;
3819            switch (t.keyCode) {
3820                case k.ui.keyCode.PAGE_UP:
3821                    this.previousPage(t);
3822                    break;
3823                case k.ui.keyCode.PAGE_DOWN:
3824                    this.nextPage(t);
3825                    break;
3826                case k.ui.keyCode.HOME:
3827                    this._move("first", "first", t);
3828                    break;
3829                case k.ui.keyCode.END:
3830                    this._move("last", "last", t);
3831                    break;
3832                case k.ui.keyCode.UP:
3833                    this.previous(t);
3834                    break;
3835                case k.ui.keyCode.DOWN:
3836                    this.next(t);
3837                    break;
3838                case k.ui.keyCode.LEFT:
3839                    this.collapse(t);
3840                    break;
3841                case k.ui.keyCode.RIGHT:
3842                    this.active && !this.active.is(".ui-state-disabled") && this.expand(t);
3843                    break;
3844                case k.ui.keyCode.ENTER:
3845                case k.ui.keyCode.SPACE:
3846                    this._activate(t);
3847                    break;
3848                case k.ui.keyCode.ESCAPE:
3849                    this.collapse(t);
3850                    break;
3851                default:
3852                    o = !1, i = this.previousFilter || "", s = !1, n = 96 <= t.keyCode && t.keyCode <= 105 ? "" + (t.keyCode - 96) : String.fromCharCode(t.keyCode), clearTimeout(this.filterTimer), n === i ? s = !0 : n = i + n, e = this._filterMenuItems(n), (e = s && -1 !== e.index(this.active.next()) ? this.active.nextAll(".ui-menu-item") : e).length || (n = String.fromCharCode(t.keyCode), e = this._filterMenuItems(n)), e.length ? (this.focus(t, e), this.previousFilter = n, this.filterTimer = this._delay(function () {
3853                        delete this.previousFilter
3854                    }, 1e3)) : delete this.previousFilter
3855            }
3856            o && t.preventDefault()
3857        },
3858        _activate: function (t) {
3859            this.active && !this.active.is(".ui-state-disabled") && (this.active.children("[aria-haspopup='true']").length ? this.expand(t) : this.select(t))
3860        },
3861        refresh: function () {
3862            var t, e, i, n, s = this, o = this.options.icons.submenu, a = this.element.find(this.options.menus);
3863            this._toggleClass("ui-menu-icons", null, !!this.element.find(".ui-icon").length), e = a.filter(":not(.ui-menu)").hide().attr({
3864                role: this.options.role,
3865                "aria-hidden": "true",
3866                "aria-expanded": "false"
3867            }).each(function () {
3868                var t = k(this), e = t.prev(), i = k("<span>").data("ui-menu-submenu-caret", !0);
3869                s._addClass(i, "ui-menu-icon", "ui-icon " + o), e.attr("aria-haspopup", "true").prepend(i), t.attr("aria-labelledby", e.attr("id"))
3870            }), this._addClass(e, "ui-menu", "ui-widget ui-widget-content ui-front"), (t = a.add(this.element).find(this.options.items)).not(".ui-menu-item").each(function () {
3871                var t = k(this);
3872                s._isDivider(t) && s._addClass(t, "ui-menu-divider", "ui-widget-content")
3873            }), n = (i = t.not(".ui-menu-item, .ui-menu-divider")).children().not(".ui-menu").uniqueId().attr({
3874                tabIndex: -1,
3875                role: this._itemRole()
3876            }), this._addClass(i, "ui-menu-item")._addClass(n, "ui-menu-item-wrapper"), t.filter(".ui-state-disabled").attr("aria-disabled", "true"), this.active && !k.contains(this.element[0], this.active[0]) && this.blur()
3877        },
3878        _itemRole: function () {
3879            return {menu: "menuitem", listbox: "option"}[this.options.role]
3880        },
3881        _setOption: function (t, e) {
3882            if ("icons" === t) {
3883                var i = this.element.find(".ui-menu-icon");
3884                this._removeClass(i, null, this.options.icons.submenu)._addClass(i, null, e.submenu)
3885            }
3886            this._super(t, e)
3887        },
3888        _setOptionDisabled: function (t) {
3889            this._super(t), this.element.attr("aria-disabled", t + ""), this._toggleClass(null, "ui-state-disabled", !!t)
3890        },
3891        focus: function (t, e) {
3892            var i, n, s;
3893            this.blur(t, t && "focus" === t.type), this._scrollIntoView(e), this.active = e.first(), n = this.active.children(".ui-menu-item-wrapper"), this._addClass(n, null, "ui-state-active"), this.options.role && this.element.attr("aria-activedescendant", n.attr("id")), s = this.active.parent().closest(".ui-menu-item").children(".ui-menu-item-wrapper"), this._addClass(s, null, "ui-state-active"), t && "keydown" === t.type ? this._close() : this.timer = this._delay(function () {
3894                this._close()
3895            }, this.delay), (i = e.children(".ui-menu")).length && t && /^mouse/.test(t.type) && this._startOpening(i), this.activeMenu = e.parent(), this._trigger("focus", t, {item: e})
3896        },
3897        _scrollIntoView: function (t) {
3898            var e, i, n, s, o, a;
3899            this._hasScroll() && (e = parseFloat(k.css(this.activeMenu[0], "borderTopWidth")) || 0, i = parseFloat(k.css(this.activeMenu[0], "paddingTop")) || 0, n = t.offset().top - this.activeMenu.offset().top - e - i, s = this.activeMenu.scrollTop(), o = this.activeMenu.height(), a = t.outerHeight(), n < 0 ? this.activeMenu.scrollTop(s + n) : o < n + a && this.activeMenu.scrollTop(s + n - o + a))
3900        },
3901        blur: function (t, e) {
3902            e || clearTimeout(this.timer), this.active && (this._removeClass(this.active.children(".ui-menu-item-wrapper"), null, "ui-state-active"), this._trigger("blur", t, {item: this.active}), this.active = null)
3903        },
3904        _startOpening: function (t) {
3905            clearTimeout(this.timer), "true" === t.attr("aria-hidden") && (this.timer = this._delay(function () {
3906                this._close(), this._open(t)
3907            }, this.delay))
3908        },
3909        _open: function (t) {
3910            var e = k.extend({of: this.active}, this.options.position);
3911            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(e)
3912        },
3913        collapseAll: function (e, i) {
3914            clearTimeout(this.timer), this.timer = this._delay(function () {
3915                var t = i ? this.element : k(e && e.target).closest(this.element.find(".ui-menu"));
3916                t.length || (t = this.element), this._close(t), this.blur(e), this._removeClass(t.find(".ui-state-active"), null, "ui-state-active"), this.activeMenu = t
3917            }, this.delay)
3918        },
3919        _close: function (t) {
3920            (t = t || (this.active ? this.active.parent() : this.element)).find(".ui-menu").hide().attr("aria-hidden", "true").attr("aria-expanded", "false")
3921        },
3922        _closeOnDocumentClick: function (t) {
3923            return !k(t.target).closest(".ui-menu").length
3924        },
3925        _isDivider: function (t) {
3926            return !/[^\-\u2014\u2013\s]/.test(t.text())
3927        },
3928        collapse: function (t) {
3929            var e = this.active && this.active.parent().closest(".ui-menu-item", this.element);
3930            e && e.length && (this._close(), this.focus(t, e))
3931        },
3932        expand: function (t) {
3933            var e = this.active && this.active.children(".ui-menu ").find(this.options.items).first();
3934            e && e.length && (this._open(e.parent()), this._delay(function () {
3935                this.focus(t, e)
3936            }))
3937        },
3938        next: function (t) {
3939            this._move("next", "first", t)
3940        },
3941        previous: function (t) {
3942            this._move("prev", "last", t)
3943        },
3944        isFirstItem: function () {
3945            return this.active && !this.active.prevAll(".ui-menu-item").length
3946        },
3947        isLastItem: function () {
3948            return this.active && !this.active.nextAll(".ui-menu-item").length
3949        },
3950        _move: function (t, e, i) {
3951            var n;
3952            this.active && (n = "first" === t || "last" === t ? this.active["first" === t ? "prevAll" : "nextAll"](".ui-menu-item").eq(-1) : this.active[t + "All"](".ui-menu-item").eq(0)), n && n.length && this.active || (n = this.activeMenu.find(this.options.items)[e]()), this.focus(i, n)
3953        },
3954        nextPage: function (t) {
3955            var e, i, n;
3956            return this.active ? void (this.isLastItem() || (this._hasScroll() ? (i = this.active.offset().top, n = this.element.height(), this.active.nextAll(".ui-menu-item").each(function () {
3957                return (e = k(this)).offset().top - i - n < 0
3958            }), this.focus(t, e)) : this.focus(t, this.activeMenu.find(this.options.items)[this.active ? "last" : "first"]()))) : void this.next(t)
3959        },
3960        previousPage: function (t) {
3961            var e, i, n;
3962            return this.active ? void (this.isFirstItem() || (this._hasScroll() ? (i = this.active.offset().top, n = this.element.height(), this.active.prevAll(".ui-menu-item").each(function () {
3963                return 0 < (e = k(this)).offset().top - i + n
3964            }), this.focus(t, e)) : this.focus(t, this.activeMenu.find(this.options.items).first()))) : void this.next(t)
3965        },
3966        _hasScroll: function () {
3967            return this.element.outerHeight() < this.element.prop("scrollHeight")
3968        },
3969        select: function (t) {
3970            this.active = this.active || k(t.target).closest(".ui-menu-item");
3971            var e = {item: this.active};
3972            this.active.has(".ui-menu").length || this.collapseAll(t, !0), this._trigger("select", t, e)
3973        },
3974        _filterMenuItems: function (t) {
3975            var e = t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&"), i = RegExp("^" + e, "i");
3976            return this.activeMenu.find(this.options.items).filter(".ui-menu-item").filter(function () {
3977                return i.test(k.trim(k(this).children(".ui-menu-item-wrapper").text()))
3978            })
3979        }
3980    }), k.widget("ui.autocomplete", {
3981        version: "1.12.1",
3982        defaultElement: "<input>",
3983        options: {
3984            appendTo: null,
3985            autoFocus: !1,
3986            delay: 300,
3987            minLength: 1,
3988            position: {my: "left top", at: "left bottom", collision: "none"},
3989            source: null,
3990            change: null,
3991            close: null,
3992            focus: null,
3993            open: null,
3994            response: null,
3995            search: null,
3996            select: null
3997        },
3998        requestIndex: 0,
3999        pending: 0,
4000        _create: function () {
4001            var i, n, s, t = this.element[0].nodeName.toLowerCase(), e = "textarea" === t, o = "input" === t;
4002            this.isMultiLine = e || !o && this._isContentEditable(this.element), this.valueMethod = this.element[e || o ? "val" : "text"], this.isNewMenu = !0, this._addClass("ui-autocomplete-input"), this.element.attr("autocomplete", "off"), this._on(this.element, {
4003                keydown: function (t) {
4004                    if (this.element.prop("readOnly")) n = s = i = !0; else {
4005                        n = s = i = !1;
4006                        var e = k.ui.keyCode;
4007                        switch (t.keyCode) {
4008                            case e.PAGE_UP:
4009                                i = !0, this._move("previousPage", t);
4010                                break;
4011                            case e.PAGE_DOWN:
4012                                i = !0, this._move("nextPage", t);
4013                                break;
4014                            case e.UP:
4015                                i = !0, this._keyEvent("previous", t);
4016                                break;
4017                            case e.DOWN:
4018                                i = !0, this._keyEvent("next", t);
4019                                break;
4020                            case e.ENTER:
4021                                this.menu.active && (i = !0, t.preventDefault(), this.menu.select(t));
4022                                break;
4023                            case e.TAB:
4024                                this.menu.active && this.menu.select(t);
4025                                break;
4026                            case e.ESCAPE:
4027                                this.menu.element.is(":visible") && (this.isMultiLine || this._value(this.term), this.close(t), t.preventDefault());
4028                                break;
4029                            default:
4030                                n = !0, this._searchTimeout(t)
4031                        }
4032                    }
4033                }, keypress: function (t) {
4034                    if (i) return i = !1, void (this.isMultiLine && !this.menu.element.is(":visible") || t.preventDefault());
4035                    if (!n) {
4036                        var e = k.ui.keyCode;
4037                        switch (t.keyCode) {
4038                            case e.PAGE_UP:
4039                                this._move("previousPage", t);
4040                                break;
4041                            case e.PAGE_DOWN:
4042                                this._move("nextPage", t);
4043                                break;
4044                            case e.UP:
4045                                this._keyEvent("previous", t);
4046                                break;
4047                            case e.DOWN:
4048                                this._keyEvent("next", t)
4049                        }
4050                    }
4051                }, input: function (t) {
4052                    return s ? (s = !1, void t.preventDefault()) : void this._searchTimeout(t)
4053                }, focus: function () {
4054                    this.selectedItem = null, this.previous = this._value()
4055                }, blur: function (t) {
4056                    return this.cancelBlur ? void delete this.cancelBlur : (clearTimeout(this.searching), this.close(t), void this._change(t))
4057                }
4058            }), this._initSource(), this.menu = k("<ul>").appendTo(this._appendTo()).menu({role: null}).hide().menu("instance"), this._addClass(this.menu.element, "ui-autocomplete", "ui-front"), this._on(this.menu.element, {
4059                mousedown: function (t) {
4060                    t.preventDefault(), this.cancelBlur = !0, this._delay(function () {
4061                        delete this.cancelBlur, this.element[0] !== k.ui.safeActiveElement(this.document[0]) && this.element.trigger("focus")
4062                    })
4063                }, menufocus: function (t, e) {
4064                    var i, n;
4065                    return this.isNewMenu && (this.isNewMenu = !1, t.originalEvent && /^mouse/.test(t.originalEvent.type)) ? (this.menu.blur(), void this.document.one("mousemove", function () {
4066                        k(t.target).trigger(t.originalEvent)
4067                    })) : (n = e.item.data("ui-autocomplete-item"), !1 !== this._trigger("focus", t, {item: n}) && t.originalEvent && /^key/.test(t.originalEvent.type) && this._value(n.value), void ((i = e.item.attr("aria-label") || n.value) && k.trim(i).length && (this.liveRegion.children().hide(), k("<div>").text(i).appendTo(this.liveRegion))))
4068                }, menuselect: function (t, e) {
4069                    var i = e.item.data("ui-autocomplete-item"), n = this.previous;
4070                    this.element[0] !== k.ui.safeActiveElement(this.document[0]) && (this.element.trigger("focus"), this.previous = n, this._delay(function () {
4071                        this.previous = n, this.selectedItem = i
4072                    })), !1 !== this._trigger("select", t, {item: i}) && this._value(i.value), this.term = this._value(), this.close(t), this.selectedItem = i
4073                }
4074            }), this.liveRegion = k("<div>", {
4075                role: "status",
4076                "aria-live": "assertive",
4077                "aria-relevant": "additions"
4078            }).appendTo(this.document[0].body), this._addClass(this.liveRegion, null, "ui-helper-hidden-accessible"), this._on(this.window, {
4079                beforeunload: function () {
4080                    this.element.removeAttr("autocomplete")
4081                }
4082            })
4083        },
4084        _destroy: function () {
4085            clearTimeout(this.searching), this.element.removeAttr("autocomplete"), this.menu.element.remove(), this.liveRegion.remove()
4086        },
4087        _setOption: function (t, e) {
4088            this._super(t, e), "source" === t && this._initSource(), "appendTo" === t && this.menu.element.appendTo(this._appendTo()), "disabled" === t && e && this.xhr && this.xhr.abort()
4089        },
4090        _isEventTargetInWidget: function (t) {
4091            var e = this.menu.element[0];
4092            return t.target === this.element[0] || t.target === e || k.contains(e, t.target)
4093        },
4094        _closeOnClickOutside: function (t) {
4095            this._isEventTargetInWidget(t) || this.close()
4096        },
4097        _appendTo: function () {
4098            var t = this.options.appendTo;
4099            return (t = t && (t.jquery || t.nodeType ? k(t) : this.document.find(t).eq(0))) && t[0] || (t = this.element.closest(".ui-front, dialog")), t.length || (t = this.document[0].body), t
4100        },
4101        _initSource: function () {
4102            var i, n, s = this;
4103            k.isArray(this.options.source) ? (i = this.options.source, this.source = function (t, e) {
4104                e(k.ui.autocomplete.filter(i, t.term))
4105            }) : "string" == typeof this.options.source ? (n = this.options.source, this.source = function (t, e) {
4106                s.xhr && s.xhr.abort(), s.xhr = k.ajax({
4107                    url: n, data: t, dataType: "json", success: function (t) {
4108                        e(t)
4109                    }, error: function () {
4110                        e([])
4111                    }
4112                })
4113            }) : this.source = this.options.source
4114        },
4115        _searchTimeout: function (n) {
4116            clearTimeout(this.searching), this.searching = this._delay(function () {
4117                var t = this.term === this._value(), e = this.menu.element.is(":visible"),
4118                    i = n.altKey || n.ctrlKey || n.metaKey || n.shiftKey;
4119                t && (!t || e || i) || (this.selectedItem = null, this.search(null, n))
4120            }, this.options.delay)
4121        },
4122        search: function (t, e) {
4123            return t = null != t ? t : this._value(), this.term = this._value(), t.length < this.options.minLength ? this.close(e) : !1 !== this._trigger("search", e) ? this._search(t) : void 0
4124        },
4125        _search: function (t) {
4126            this.pending++, this._addClass("ui-autocomplete-loading"), this.cancelSearch = !1, this.source({term: t}, this._response())
4127        },
4128        _response: function () {
4129            var e = ++this.requestIndex;
4130            return k.proxy(function (t) {
4131                e === this.requestIndex && this.__response(t), this.pending--, this.pending || this._removeClass("ui-autocomplete-loading")
4132            }, this)
4133        },
4134        __response: function (t) {
4135            t = t && this._normalize(t), this._trigger("response", null, {content: t}), !this.options.disabled && t && t.length && !this.cancelSearch ? (this._suggest(t), this._trigger("open")) : this._close()
4136        },
4137        close: function (t) {
4138            this.cancelSearch = !0, this._close(t)
4139        },
4140        _close: function (t) {
4141            this._off(this.document, "mousedown"), this.menu.element.is(":visible") && (this.menu.element.hide(), this.menu.blur(), this.isNewMenu = !0, this._trigger("close", t))
4142        },
4143        _change: function (t) {
4144            this.previous !== this._value() && this._trigger("change", t, {item: this.selectedItem})
4145        },
4146        _normalize: function (t) {
4147            return t.length && t[0].label && t[0].value ? t : k.map(t, function (t) {
4148                return "string" == typeof t ? {label: t, value: t} : k.extend({}, t, {
4149                    label: t.label || t.value,
4150                    value: t.value || t.label
4151                })
4152            })
4153        },
4154        _suggest: function (t) {
4155            var e = this.menu.element.empty();
4156            this._renderMenu(e, t), this.isNewMenu = !0, this.menu.refresh(), e.show(), this._resizeMenu(), e.position(k.extend({of: this.element}, this.options.position)), this.options.autoFocus && this.menu.next(), this._on(this.document, {mousedown: "_closeOnClickOutside"})
4157        },
4158        _resizeMenu: function () {
4159            var t = this.menu.element;
4160            t.outerWidth(Math.max(t.width("").outerWidth() + 1, this.element.outerWidth()))
4161        },
4162        _renderMenu: function (i, t) {
4163            var n = this;
4164            k.each(t, function (t, e) {
4165                n._renderItemData(i, e)
4166            })
4167        },
4168        _renderItemData: function (t, e) {
4169            return this._renderItem(t, e).data("ui-autocomplete-item", e)
4170        },
4171        _renderItem: function (t, e) {
4172            return k("<li>").append(k("<div>").text(e.label)).appendTo(t)
4173        },
4174        _move: function (t, e) {
4175            return this.menu.element.is(":visible") ? this.menu.isFirstItem() && /^previous/.test(t) || this.menu.isLastItem() && /^next/.test(t) ? (this.isMultiLine || this._value(this.term), void this.menu.blur()) : void this.menu[t](e) : void this.search(null, e)
4176        },
4177        widget: function () {
4178            return this.menu.element
4179        },
4180        _value: function () {
4181            return this.valueMethod.apply(this.element, arguments)
4182        },
4183        _keyEvent: function (t, e) {
4184            this.isMultiLine && !this.menu.element.is(":visible") || (this._move(t, e), e.preventDefault())
4185        },
4186        _isContentEditable: function (t) {
4187            if (!t.length) return !1;
4188            var e = t.prop("contentEditable");
4189            return "inherit" === e ? this._isContentEditable(t.parent()) : "true" === e
4190        }
4191    }), k.extend(k.ui.autocomplete, {
4192        escapeRegex: function (t) {
4193            return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&")
4194        }, filter: function (t, e) {
4195            var i = RegExp(k.ui.autocomplete.escapeRegex(e), "i");
4196            return k.grep(t, function (t) {
4197                return i.test(t.label || t.value || t)
4198            })
4199        }
4200    }), k.widget("ui.autocomplete", k.ui.autocomplete, {
4201        options: {
4202            messages: {
4203                noResults: "No search results.",
4204                results: function (t) {
4205                    return t + (1 < t ? " results are" : " result is") + " available, use up and down arrow keys to navigate."
4206                }
4207            }
4208        }, __response: function (t) {
4209            var e;
4210            this._superApply(arguments), this.options.disabled || this.cancelSearch || (e = t && t.length ? this.options.messages.results(t.length) : this.options.messages.noResults, this.liveRegion.children().hide(), k("<div>").text(e).appendTo(this.liveRegion))
4211        }
4212    }), k.ui.autocomplete;
4213    var et, it, nt = /ui-corner-([a-z]){2,6}/g;
4214    k.widget("ui.controlgroup", {
4215        version: "1.12.1",
4216        defaultElement: "<div>",
4217        options: {
4218            direction: "horizontal",
4219            disabled: null,
4220            onlyVisible: !0,
4221            items: {
4222                button: "input[type=button], input[type=submit], input[type=reset], button, a",
4223                controlgroupLabel: ".ui-controlgroup-label",
4224                checkboxradio: "input[type='checkbox'], input[type='radio']",
4225                selectmenu: "select",
4226                spinner: ".ui-spinner-input"
4227            }
4228        },
4229        _create: function () {
4230            this._enhance()
4231        },
4232        _enhance: function () {
4233            this.element.attr("role", "toolbar"), this.refresh()
4234        },
4235        _destroy: function () {
4236            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()
4237        },
4238        _initWidgets: function () {
4239            var a = this, r = [];
4240            k.each(this.options.items, function (s, t) {
4241                var e, o = {};
4242                return t ? "controlgroupLabel" === s ? ((e = a.element.find(t)).each(function () {
4243                    var t = k(this);
4244                    t.children(".ui-controlgroup-label-contents").length || t.contents().wrapAll("<span class='ui-controlgroup-label-contents'></span>")
4245                }), a._addClass(e, null, "ui-widget ui-widget-content ui-state-default"), void (r = r.concat(e.get()))) : void (k.fn[s] && (o = a["_" + s + "Options"] ? a["_" + s + "Options"]("middle") : {classes: {}}, a.element.find(t).each(function () {
4246                    var t = k(this), e = t[s]("instance"), i = k.widget.extend({}, o);
4247                    if ("button" !== s || !t.parent(".ui-spinner").length) {
4248                        (e = e || t[s]()[s]("instance")) && (i.classes = a._resolveClassesValues(i.classes, e)), t[s](i);
4249                        var n = t[s]("widget");
4250                        k.data(n[0], "ui-controlgroup-data", e || t[s]("instance")), r.push(n[0])
4251                    }
4252                }))) : void 0
4253            }), this.childWidgets = k(k.unique(r)), this._addClass(this.childWidgets, "ui-controlgroup-item")
4254        },
4255        _callChildMethod: function (e) {
4256            this.childWidgets.each(function () {
4257                var t = k(this).data("ui-controlgroup-data");
4258                t && t[e] && t[e]()
4259            })
4260        },
4261        _updateCornerClass: function (t, e) {
4262            var i = this._buildSimpleOptions(e, "label").classes.label;
4263            this._removeClass(t, null, "ui-corner-top ui-corner-bottom ui-corner-left ui-corner-right ui-corner-all"), this._addClass(t, null, i)
4264        },
4265        _buildSimpleOptions: function (t, e) {
4266            var i = "vertical" === this.options.direction, n = {classes: {}};
4267            return n.classes[e] = {
4268                middle: "",
4269                first: "ui-corner-" + (i ? "top" : "left"),
4270                last: "ui-corner-" + (i ? "bottom" : "right"),
4271                only: "ui-corner-all"
4272            }[t], n
4273        },
4274        _spinnerOptions: function (t) {
4275            var e = this._buildSimpleOptions(t, "ui-spinner");
4276            return e.classes["ui-spinner-up"] = "", e.classes["ui-spinner-down"] = "", e
4277        },
4278        _buttonOptions: function (t) {
4279            return this._buildSimpleOptions(t, "ui-button")
4280        },
4281        _checkboxradioOptions: function (t) {
4282            return this._buildSimpleOptions(t, "ui-checkboxradio-label")
4283        },
4284        _selectmenuOptions: function (t) {
4285            var e = "vertical" === this.options.direction;
4286            return {
4287                width: e && "auto",
4288                classes: {
4289                    middle: {"ui-selectmenu-button-open": "", "ui-selectmenu-button-closed": ""},
4290                    first: {
4291                        "ui-selectmenu-button-open": "ui-corner-" + (e ? "top" : "tl"),
4292                        "ui-selectmenu-button-closed": "ui-corner-" + (e ? "top" : "left")
4293                    },
4294                    last: {
4295                        "ui-selectmenu-button-open": e ? "" : "ui-corner-tr",
4296                        "ui-selectmenu-button-closed": "ui-corner-" + (e ? "bottom" : "right")
4297                    },
4298                    only: {"ui-selectmenu-button-open": "ui-corner-top", "ui-selectmenu-button-closed": "ui-corner-all"}
4299                }[t]
4300            }
4301        },
4302        _resolveClassesValues: function (i, n) {
4303            var s = {};
4304            return k.each(i, function (t) {
4305                var e = n.options.classes[t] || "";
4306                e = k.trim(e.replace(nt, "")), s[t] = (e + " " + i[t]).replace(/\s+/g, " ")
4307            }), s
4308        },
4309        _setOption: function (t, e) {
4310            return "direction" === t && this._removeClass("ui-controlgroup-" + this.options.direction), this._super(t, e), "disabled" === t ? void this._callChildMethod(e ? "disable" : "enable") : void this.refresh()
4311        },
4312        refresh: function () {
4313            var s, o = this;
4314            this._addClass("ui-controlgroup ui-controlgroup-" + this.options.direction), "horizontal" === this.options.direction && this._addClass(null, "ui-helper-clearfix"), this._initWidgets(), s = this.childWidgets, this.options.onlyVisible && (s = s.filter(":visible")), s.length && (k.each(["first", "last"], function (t, e) {
4315                var i = s[e]().data("ui-controlgroup-data");
4316                if (i && o["_" + i.widgetName + "Options"]) {
4317                    var n = o["_" + i.widgetName + "Options"](1 === s.length ? "only" : e);
4318                    n.classes = o._resolveClassesValues(n.classes, i), i.element[i.widgetName](n)
4319                } else o._updateCornerClass(s[e](), e)
4320            }), this._callChildMethod("refresh"))
4321        }
4322    }), k.widget("ui.checkboxradio", [k.ui.formResetMixin, {
4323        version: "1.12.1",
4324        options: {
4325            disabled: null,
4326            label: null,
4327            icon: !0,
4328            classes: {"ui-checkboxradio-label": "ui-corner-all", "ui-checkboxradio-icon": "ui-corner-all"}
4329        },
4330        _getCreateOptions: function () {
4331            var t, e, i = this, n = this._super() || {};
4332            return this._readType(), e = this.element.labels(), this.label = k(e[e.length - 1]), this.label.length || k.error("No label found for checkboxradio widget"), this.originalLabel = "", this.label.contents().not(this.element[0]).each(function () {
4333                i.originalLabel += 3 === this.nodeType ? k(this).text() : this.outerHTML
4334            }), this.originalLabel && (n.label = this.originalLabel), null != (t = this.element[0].disabled) && (n.disabled = t), n
4335        },
4336        _create: function () {
4337            var t = this.element[0].checked;
4338            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(), t && (this._addClass(this.label, "ui-checkboxradio-checked", "ui-state-active"), this.icon && this._addClass(this.icon, null, "ui-state-hover")), this._on({
4339                change: "_toggleClasses",
4340                focus: function () {
4341                    this._addClass(this.label, null, "ui-state-focus ui-visual-focus")
4342                },
4343                blur: function () {
4344                    this._removeClass(this.label, null, "ui-state-focus ui-visual-focus")
4345                }
4346            })
4347        },
4348        _readType: function () {
4349            var t = this.element[0].nodeName.toLowerCase();
4350            this.type = this.element[0].type, "input" === t && /radio|checkbox/.test(this.t
vendor: 1,846 bytes, lines 4350-4379
4350ype) || k.error("Can't create checkboxradio on element.nodeName=" + t + " and element.type=" + this.type)
4351        },
4352        _enhance: function () {
4353            this._updateIcon(this.element[0].checked)
4354        },
4355        widget: function () {
4356            return this.label
4357        },
4358        _getRadioGroup: function () {
4359            var t = this.element[0].name, e = "input[name='" + k.ui.escapeSelector(t) + "']";
4360            return t ? (this.form.length ? k(this.form[0].elements).filter(e) : k(e).filter(function () {
4361                return 0 === k(this).form().length
4362            })).not(this.element) : k([])
4363        },
4364        _toggleClasses: function () {
4365            var t = this.element[0].checked;
4366            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 () {
4367                var t = k(this).checkboxradio("instance");
4368                t && t._removeClass(t.label, "ui-checkboxradio-checked", "ui-state-active")
4369            })
4370        },
4371        _destroy: function () {
4372            this._unbindFormResetHandler(), this.icon && (this.icon.remove(), this.iconSpace.remove())
4373        },
4374        _setOption: function (t, e) {
4375            return "label" !== t || e ? (this._super(t, e), "disabled" === t ? (this._toggleClass(this.label, null, "ui-state-disabled", e), void (this.element[0].disabled = e)) : void this.refresh()) : void 0
4376        },
4377        _updateIcon: function (t) {
4378            var e = "ui-icon ui-icon-background ";
4379            this.options.icon ? (this.icon || (this.icon = k("<span>"), this.iconSpace = k("<span> </span>
vendor: 3,698 bytes, lines 4379-4419
4379"), this._addClass(this.iconSpace, "ui-checkboxradio-icon-space")), "checkbox" === this.type ? (e += t ? "ui-icon-check ui-state-checked" : "ui-icon-blank", this._removeClass(this.icon, null, t ? "ui-icon-blank" : "ui-icon-check")) : e += "ui-icon-blank", this._addClass(this.icon, "ui-checkboxradio-icon", e), 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)
4380        },
4381        _updateLabel: function () {
4382            var t = this.label.contents().not(this.element[0]);
4383            this.icon && (t = t.not(this.icon[0])), this.iconSpace && (t = t.not(this.iconSpace[0])), t.remove(), this.label.append(this.options.label)
4384        },
4385        refresh: function () {
4386            var t = this.element[0].checked, e = this.element[0].disabled;
4387            this._updateIcon(t), this._toggleClass(this.label, "ui-checkboxradio-checked", "ui-state-active", t), null !== this.options.label && this._updateLabel(), e !== this.options.disabled && this._setOptions({disabled: e})
4388        }
4389    }]), k.ui.checkboxradio, k.widget("ui.button", {
4390        version: "1.12.1",
4391        defaultElement: "<button>",
4392        options: {
4393            classes: {"ui-button": "ui-corner-all"},
4394            disabled: null,
4395            icon: null,
4396            iconPosition: "beginning",
4397            label: null,
4398            showLabel: !0
4399        },
4400        _getCreateOptions: function () {
4401            var t, e = this._super() || {};
4402            return this.isInput = this.element.is("input"), null != (t = this.element[0].disabled) && (e.disabled = t), this.originalLabel = this.isInput ? this.element.val() : this.element.html(), this.originalLabel && (e.label = this.originalLabel), e
4403        },
4404        _create: function () {
4405            !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({
4406                keyup: function (t) {
4407                    t.keyCode === k.ui.keyCode.SPACE && (t.preventDefault(), this.element[0].click ? this.element[0].click() : this.element.trigger("click"))
4408                }
4409            })
4410        },
4411        _enhance: function () {
4412            this.element.is("button") || this.element.attr("role", "button"), this.options.icon && (this._updateIcon("icon", this.options.icon), this._updateTooltip())
4413        },
4414        _updateTooltip: function () {
4415            this.title = this.element.attr("title"), this.options.showLabel || this.title || this.element.attr("title", this.options.label)
4416        },
4417        _updateIcon: function (t, e) {
4418            var i = "iconPosition" !== t, n = i ? this.options.iconPosition : e, s = "top" === n || "bottom" === n;
4419            this.icon ? i && this._removeClass(this.icon, null, this.options.icon) : (this.icon = k("<span>"), this._addClass(this.icon, "ui-button-icon", "ui-icon"), this.options.showLabel || this._addClass("ui-button-icon-only")), i && this._addClass(this.icon, null, e), this._attachIcon(n), s ? (this._addClass(this.icon, null, "ui-widget-icon-block"), this.iconSpace && this.iconSpace.remove()) : (this.iconSpace || (this.iconSpace = k("<span> </span>
vendor: 8,330 bytes, lines 4419-4514
4419"), this._addClass(this.iconSpace, "ui-button-icon-space")), this._removeClass(this.icon, null, "ui-wiget-icon-block"), this._attachIconSpace(n))
4420        },
4421        _destroy: function () {
4422            this.element.removeAttr("role"), this.icon && this.icon.remove(), this.iconSpace && this.iconSpace.remove(), this.hasTitle || this.element.removeAttr("title")
4423        },
4424        _attachIconSpace: function (t) {
4425            this.icon[/^(?:end|bottom)/.test(t) ? "before" : "after"](this.iconSpace)
4426        },
4427        _attachIcon: function (t) {
4428            this.element[/^(?:end|bottom)/.test(t) ? "append" : "prepend"](this.icon)
4429        },
4430        _setOptions: function (t) {
4431            var e = void 0 === t.showLabel ? this.options.showLabel : t.showLabel,
4432                i = void 0 === t.icon ? this.options.icon : t.icon;
4433            e || i || (t.showLabel = !0), this._super(t)
4434        },
4435        _setOption: function (t, e) {
4436            "icon" === t && (e ? this._updateIcon(t, e) : this.icon && (this.icon.remove(), this.iconSpace && this.iconSpace.remove())), "iconPosition" === t && this._updateIcon(t, e), "showLabel" === t && (this._toggleClass("ui-button-icon-only", null, !e), this._updateTooltip()), "label" === t && (this.isInput ? this.element.val(e) : (this.element.html(e), this.icon && (this._attachIcon(this.options.iconPosition), this._attachIconSpace(this.options.iconPosition)))), this._super(t, e), "disabled" === t && (this._toggleClass(null, "ui-state-disabled", e), (this.element[0].disabled = e) && this.element.blur())
4437        },
4438        refresh: function () {
4439            var t = this.element.is("input, button") ? this.element[0].disabled : this.element.hasClass("ui-button-disabled");
4440            t !== this.options.disabled && this._setOptions({disabled: t}), this._updateTooltip()
4441        }
4442    }), !1 !== k.uiBackCompat && (k.widget("ui.button", k.ui.button, {
4443        options: {
4444            text: !0,
4445            icons: {primary: null, secondary: null}
4446        }, _create: function () {
4447            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()
4448        }, _setOption: function (t, e) {
4449            return "text" === t ? void this._super("showLabel", e) : ("showLabel" === t && (this.options.text = e), "icon" === t && (this.options.icons.primary = e), "icons" === t && (e.primary ? (this._super("icon", e.primary), this._super("iconPosition", "beginning")) : e.secondary && (this._super("icon", e.secondary), this._super("iconPosition", "end"))), void this._superApply(arguments))
4450        }
4451    }), k.fn.button = (et = k.fn.button, function () {
4452        return !this.length || this.length && "INPUT" !== this[0].tagName || this.length && "INPUT" === this[0].tagName && "checkbox" !== this.attr("type") && "radio" !== this.attr("type") ? et.apply(this, arguments) : (k.ui.checkboxradio || k.error("Checkboxradio widget missing"), 0 === arguments.length ? this.checkboxradio({icon: !1}) : this.checkboxradio.apply(this, arguments))
4453    }), k.fn.buttonset = function () {
4454        return k.ui.controlgroup || k.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))
4455    }), k.ui.button, k.extend(k.ui, {datepicker: {version: "1.12.1"}}), k.extend(t.prototype, {
4456        markerClassName: "hasDatepicker",
4457        maxRows: 4,
4458        _widgetDatepicker: function () {
4459            return this.dpDiv
4460        },
4461        setDefaults: function (t) {
4462            return u(this._defaults, t || {}), this
4463        },
4464        _attachDatepicker: function (t, e) {
4465            var i, n, s;
4466            n = "div" === (i = t.nodeName.toLowerCase()) || "span" === i, t.id || (this.uuid += 1, t.id = "dp" + this.uuid), (s = this._newInst(k(t), n)).settings = k.extend({}, e || {}), "input" === i ? this._connectDatepicker(t, s) : n && this._inlineDatepicker(t, s)
4467        },
4468        _newInst: function (t, e) {
4469            return {
4470                id: t[0].id.replace(/([^A-Za-z0-9_\-])/g, "\\\\$1"),
4471                input: t,
4472                selectedDay: 0,
4473                selectedMonth: 0,
4474                selectedYear: 0,
4475                drawMonth: 0,
4476                drawYear: 0,
4477                inline: e,
4478                dpDiv: e ? i(k("<div class='" + this._inlineClass + " ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")) : this.dpDiv
4479            }
4480        },
4481        _connectDatepicker: function (t, e) {
4482            var i = k(t);
4483            e.append = k([]), e.trigger = k([]), i.hasClass(this.markerClassName) || (this._attachments(i, e), i.addClass(this.markerClassName).on("keydown", this._doKeyDown).on("keypress", this._doKeyPress).on("keyup", this._doKeyUp), this._autoSize(e), k.data(t, "datepicker", e), e.settings.disabled && this._disableDatepicker(t))
4484        },
4485        _attachments: function (t, e) {
4486            var i, n, s, o = this._get(e, "appendText"), a = this._get(e, "isRTL");
4487            e.append && e.append.remove(), o && (e.append = k("<span class='" + this._appendClass + "'>" + o + "</span>"), t[a ? "before" : "after"](e.append)), t.off("focus", this._showDatepicker), e.trigger && e.trigger.remove(), "focus" !== (i = this._get(e, "showOn")) && "both" !== i || t.on("focus", this._showDatepicker), "button" !== i && "both" !== i || (n = this._get(e, "buttonText"), s = this._get(e, "buttonImage"), e.trigger = k(this._get(e, "buttonImageOnly") ? k("<img/>").addClass(this._triggerClass).attr({
4488                src: s,
4489                alt: n,
4490                title: n
4491            }) : k("<button type='button'></button>").addClass(this._triggerClass).html(s ? k("<img/>").attr({
4492                src: s,
4493                alt: n,
4494                title: n
4495            }) : n)), t[a ? "before" : "after"](e.trigger), e.trigger.on("click", function () {
4496                return k.datepicker._datepickerShowing && k.datepicker._lastInput === t[0] ? k.datepicker._hideDatepicker() : (k.datepicker._datepickerShowing && k.datepicker._lastInput !== t[0] && k.datepicker._hideDatepicker(), k.datepicker._showDatepicker(t[0])), !1
4497            }))
4498        },
4499        _autoSize: function (t) {
4500            if (this._get(t, "autoSize") && !t.inline) {
4501                var e, i, n, s, o = new Date(2009, 11, 20), a = this._get(t, "dateFormat");
4502                a.match(/[DM]/) && (e = function (t) {
4503                    for (s = n = i = 0; t.length > s; s++) t[s].length > i && (i = t[s].length, n = s);
4504                    return n
4505                }, o.setMonth(e(this._get(t, a.match(/MM/) ? "monthNames" : "monthNamesShort"))), o.setDate(e(this._get(t, a.match(/DD/) ? "dayNames" : "dayNamesShort")) + 20 - o.getDay())), t.input.attr("size", this._formatDate(t, o).length)
4506            }
4507        },
4508        _inlineDatepicker: function (t, e) {
4509            var i = k(t);
4510            i.hasClass(this.markerClassName) || (i.addClass(this.markerClassName).append(e.dpDiv), k.data(t, "datepicker", e), this._setDate(e, this._getDefaultDate(e), !0), this._updateDatepicker(e), this._updateAlternate(e), e.settings.disabled && this._disableDatepicker(t), e.dpDiv.css("display", "block"))
4511        },
4512        _dialogDatepicker: function (t, e, i, n, s) {
4513            var o, a, r, l, h, c = this._dialogInst;
4514            return c || (this.uuid += 1, o = "dp" + this.uuid, this._dialogInput = k("<input type='text' id='" + o + "' style='position: absolute; top: -100px; width: 0px;'/>
vendor: 14,269 bytes, lines 4514-4675
4514"), this._dialogInput.on("keydown", this._doKeyDown), k("body").append(this._dialogInput), (c = this._dialogInst = this._newInst(this._dialogInput, !1)).settings = {}, k.data(this._dialogInput[0], "datepicker", c)), u(c.settings, n || {}), e = e && e.constructor === Date ? this._formatDate(c, e) : e, this._dialogInput.val(e), this._pos = s ? s.length ? s : [s.pageX, s.pageY] : null, this._pos || (a = document.documentElement.clientWidth, r = document.documentElement.clientHeight, l = document.documentElement.scrollLeft || document.body.scrollLeft, h = document.documentElement.scrollTop || document.body.scrollTop, this._pos = [a / 2 - 100 + l, r / 2 - 150 + h]), this._dialogInput.css("left", this._pos[0] + 20 + "px").css("top", this._pos[1] + "px"), c.settings.onSelect = i, this._inDialog = !0, this.dpDiv.addClass(this._dialogClass), this._showDatepicker(this._dialogInput[0]), k.blockUI && k.blockUI(this.dpDiv), k.data(this._dialogInput[0], "datepicker", c), this
4515        },
4516        _destroyDatepicker: function (t) {
4517            var e, i = k(t), n = k.data(t, "datepicker");
4518            i.hasClass(this.markerClassName) && (e = t.nodeName.toLowerCase(), k.removeData(t, "datepicker"), "input" === e ? (n.append.remove(), n.trigger.remove(), i.removeClass(this.markerClassName).off("focus", this._showDatepicker).off("keydown", this._doKeyDown).off("keypress", this._doKeyPress).off("keyup", this._doKeyUp)) : "div" !== e && "span" !== e || i.removeClass(this.markerClassName).empty(), it === n && (it = null))
4519        },
4520        _enableDatepicker: function (e) {
4521            var t, i, n = k(e), s = k.data(e, "datepicker");
4522            n.hasClass(this.markerClassName) && ("input" === (t = e.nodeName.toLowerCase()) ? (e.disabled = !1, s.trigger.filter("button").each(function () {
4523                this.disabled = !1
4524            }).end().filter("img").css({
4525                opacity: "1.0",
4526                cursor: ""
4527            })) : "div" !== t && "span" !== t || ((i = n.children("." + this._inlineClass)).children().removeClass("ui-state-disabled"), i.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled", !1)), this._disabledInputs = k.map(this._disabledInputs, function (t) {
4528                return t === e ? null : t
4529            }))
4530        },
4531        _disableDatepicker: function (e) {
4532            var t, i, n = k(e), s = k.data(e, "datepicker");
4533            n.hasClass(this.markerClassName) && ("input" === (t = e.nodeName.toLowerCase()) ? (e.disabled = !0, s.trigger.filter("button").each(function () {
4534                this.disabled = !0
4535            }).end().filter("img").css({
4536                opacity: "0.5",
4537                cursor: "default"
4538            })) : "div" !== t && "span" !== t || ((i = n.children("." + this._inlineClass)).children().addClass("ui-state-disabled"), i.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled", !0)), this._disabledInputs = k.map(this._disabledInputs, function (t) {
4539                return t === e ? null : t
4540            }), this._disabledInputs[this._disabledInputs.length] = e)
4541        },
4542        _isDisabledDatepicker: function (t) {
4543            if (!t) return !1;
4544            for (var e = 0; this._disabledInputs.length > e; e++) if (this._disabledInputs[e] === t) return !0;
4545            return !1
4546        },
4547        _getInst: function (t) {
4548            try {
4549                return k.data(t, "datepicker")
4550            } catch (t) {
4551                throw"Missing instance data for this datepicker"
4552            }
4553        },
4554        _optionDatepicker: function (t, e, i) {
4555            var n, s, o, a, r = this._getInst(t);
4556            return 2 === arguments.length && "string" == typeof e ? "defaults" === e ? k.extend({}, k.datepicker._defaults) : r ? "all" === e ? k.extend({}, r.settings) : this._get(r, e) : null : (n = e || {}, "string" == typeof e && ((n = {})[e] = i), void (r && (this._curInst === r && this._hideDatepicker(), s = this._getDateDatepicker(t, !0), o = this._getMinMaxDate(r, "min"), a = this._getMinMaxDate(r, "max"), u(r.settings, n), null !== o && void 0 !== n.dateFormat && void 0 === n.minDate && (r.settings.minDate = this._formatDate(r, o)), null !== a && void 0 !== n.dateFormat && void 0 === n.maxDate && (r.settings.maxDate = this._formatDate(r, a)), "disabled" in n && (n.disabled ? this._disableDatepicker(t) : this._enableDatepicker(t)), this._attachments(k(t), r), this._autoSize(r), this._setDate(r, s), this._updateAlternate(r), this._updateDatepicker(r))))
4557        },
4558        _changeDatepicker: function (t, e, i) {
4559            this._optionDatepicker(t, e, i)
4560        },
4561        _refreshDatepicker: function (t) {
4562            var e = this._getInst(t);
4563            e && this._updateDatepicker(e)
4564        },
4565        _setDateDatepicker: function (t, e) {
4566            var i = this._getInst(t);
4567            i && (this._setDate(i, e), this._updateDatepicker(i), this._updateAlternate(i))
4568        },
4569        _getDateDatepicker: function (t, e) {
4570            var i = this._getInst(t);
4571            return i && !i.inline && this._setDateFromField(i, e), i ? this._getDate(i) : null
4572        },
4573        _doKeyDown: function (t) {
4574            var e, i, n, s = k.datepicker._getInst(t.target), o = !0, a = s.dpDiv.is(".ui-datepicker-rtl");
4575            if (s._keyEvent = !0, k.datepicker._datepickerShowing) switch (t.keyCode) {
4576                case 9:
4577                    k.datepicker._hideDatepicker(), o = !1;
4578                    break;
4579                case 13:
4580                    return (n = k("td." + k.datepicker._dayOverClass + ":not(." + k.datepicker._currentClass + ")", s.dpDiv))[0] && k.datepicker._selectDay(t.target, s.selectedMonth, s.selectedYear, n[0]), (e = k.datepicker._get(s, "onSelect")) ? (i = k.datepicker._formatDate(s), e.apply(s.input ? s.input[0] : null, [i, s])) : k.datepicker._hideDatepicker(), !1;
4581                case 27:
4582                    k.datepicker._hideDatepicker();
4583                    break;
4584                case 33:
4585                    k.datepicker._adjustDate(t.target, t.ctrlKey ? -k.datepicker._get(s, "stepBigMonths") : -k.datepicker._get(s, "stepMonths"), "M");
4586                    break;
4587                case 34:
4588                    k.datepicker._adjustDate(t.target, t.ctrlKey ? +k.datepicker._get(s, "stepBigMonths") : +k.datepicker._get(s, "stepMonths"), "M");
4589                    break;
4590                case 35:
4591                    (t.ctrlKey || t.metaKey) && k.datepicker._clearDate(t.target), o = t.ctrlKey || t.metaKey;
4592                    break;
4593                case 36:
4594                    (t.ctrlKey || t.metaKey) && k.datepicker._gotoToday(t.target), o = t.ctrlKey || t.metaKey;
4595                    break;
4596                case 37:
4597                    (t.ctrlKey || t.metaKey) && k.datepicker._adjustDate(t.target, a ? 1 : -1, "D"), o = t.ctrlKey || t.metaKey, t.originalEvent.altKey && k.datepicker._adjustDate(t.target, t.ctrlKey ? -k.datepicker._get(s, "stepBigMonths") : -k.datepicker._get(s, "stepMonths"), "M");
4598                    break;
4599                case 38:
4600                    (t.ctrlKey || t.metaKey) && k.datepicker._adjustDate(t.target, -7, "D"), o = t.ctrlKey || t.metaKey;
4601                    break;
4602                case 39:
4603                    (t.ctrlKey || t.metaKey) && k.datepicker._adjustDate(t.target, a ? -1 : 1, "D"), o = t.ctrlKey || t.metaKey, t.originalEvent.altKey && k.datepicker._adjustDate(t.target, t.ctrlKey ? +k.datepicker._get(s, "stepBigMonths") : +k.datepicker._get(s, "stepMonths"), "M");
4604                    break;
4605                case 40:
4606                    (t.ctrlKey || t.metaKey) && k.datepicker._adjustDate(t.target, 7, "D"), o = t.ctrlKey || t.metaKey;
4607                    break;
4608                default:
4609                    o = !1
4610            } else 36 === t.keyCode && t.ctrlKey ? k.datepicker._showDatepicker(this) : o = !1;
4611            o && (t.preventDefault(), t.stopPropagation())
4612        },
4613        _doKeyPress: function (t) {
4614            var e, i, n = k.datepicker._getInst(t.target);
4615            return k.datepicker._get(n, "constrainInput") ? (e = k.datepicker._possibleChars(k.datepicker._get(n, "dateFormat")), i = String.fromCharCode(null == t.charCode ? t.keyCode : t.charCode), t.ctrlKey || t.metaKey || i < " " || !e || -1 < e.indexOf(i)) : void 0
4616        },
4617        _doKeyUp: function (t) {
4618            var e = k.datepicker._getInst(t.target);
4619            if (e.input.val() !== e.lastVal) try {
4620                k.datepicker.parseDate(k.datepicker._get(e, "dateFormat"), e.input ? e.input.val() : null, k.datepicker._getFormatConfig(e)) && (k.datepicker._setDateFromField(e), k.datepicker._updateAlternate(e), k.datepicker._updateDatepicker(e))
4621            } catch (t) {
4622            }
4623            return !0
4624        },
4625        _showDatepicker: function (t) {
4626            var e, i, n, s, o, a, r;
4627            "input" !== (t = t.target || t).nodeName.toLowerCase() && (t = k("input", t.parentNode)[0]), k.datepicker._isDisabledDatepicker(t) || k.datepicker._lastInput === t || (e = k.datepicker._getInst(t), k.datepicker._curInst && k.datepicker._curInst !== e && (k.datepicker._curInst.dpDiv.stop(!0, !0), e && k.datepicker._datepickerShowing && k.datepicker._hideDatepicker(k.datepicker._curInst.input[0])), !1 !== (n = (i = k.datepicker._get(e, "beforeShow")) ? i.apply(t, [t, e]) : {}) && (u(e.settings, n), e.lastVal = null, k.datepicker._lastInput = t, k.datepicker._setDateFromField(e), k.datepicker._inDialog && (t.value = ""), k.datepicker._pos || (k.datepicker._pos = k.datepicker._findPos(t), k.datepicker._pos[1] += t.offsetHeight), s = !1, k(t).parents().each(function () {
4628                return !(s |= "fixed" === k(this).css("position"))
4629            }), o = {
4630                left: k.datepicker._pos[0],
4631                top: k.datepicker._pos[1]
4632            }, k.datepicker._pos = null, e.dpDiv.empty(), e.dpDiv.css({
4633                position: "absolute",
4634                display: "block",
4635                top: "-1000px"
4636            }), k.datepicker._updateDatepicker(e), o = k.datepicker._checkOffset(e, o, s), e.dpDiv.css({
4637                position: k.datepicker._inDialog && k.blockUI ? "static" : s ? "fixed" : "absolute",
4638                display: "none",
4639                left: o.left + "px",
4640                top: o.top + "px"
4641            }), e.inline || (a = k.datepicker._get(e, "showAnim"), r = k.datepicker._get(e, "duration"), e.dpDiv.css("z-index", function (t) {
4642                for (var e, i; t.length && t[0] !== document;) {
4643                    if (("absolute" === (e = t.css("position")) || "relative" === e || "fixed" === e) && (i = parseInt(t.css("zIndex"), 10), !isNaN(i) && 0 !== i)) return i;
4644                    t = t.parent()
4645                }
4646                return 0
4647            }(k(t)) + 1), k.datepicker._datepickerShowing = !0, k.effects && k.effects.effect[a] ? e.dpDiv.show(a, k.datepicker._get(e, "showOptions"), r) : e.dpDiv[a || "show"](a ? r : null), k.datepicker._shouldFocusInput(e) && e.input.trigger("focus"), k.datepicker._curInst = e)))
4648        },
4649        _updateDatepicker: function (t) {
4650            this.maxRows = 4, (it = t).dpDiv.empty().append(this._generateHTML(t)), this._attachHandlers(t);
4651            var e, i = this._getNumberOfMonths(t), n = i[1], s = t.dpDiv.find("." + this._dayOverClass + " a");
4652            0 < s.length && o.apply(s.get(0)), t.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""), 1 < n && t.dpDiv.addClass("ui-datepicker-multi-" + n).css("width", 17 * n + "em"), t.dpDiv[(1 !== i[0] || 1 !== i[1] ? "add" : "remove") + "Class"]("ui-datepicker-multi"), t.dpDiv[(this._get(t, "isRTL") ? "add" : "remove") + "Class"]("ui-datepicker-rtl"), t === k.datepicker._curInst && k.datepicker._datepickerShowing && k.datepicker._shouldFocusInput(t) && t.input.trigger("focus"), t.yearshtml && (e = t.yearshtml, setTimeout(function () {
4653                e === t.yearshtml && t.yearshtml && t.dpDiv.find("select.ui-datepicker-year:first").replaceWith(t.yearshtml), e = t.yearshtml = null
4654            }, 0))
4655        },
4656        _shouldFocusInput: function (t) {
4657            return t.input && t.input.is(":visible") && !t.input.is(":disabled") && !t.input.is(":focus")
4658        },
4659        _checkOffset: function (t, e, i) {
4660            var n = t.dpDiv.outerWidth(), s = t.dpDiv.outerHeight(), o = t.input ? t.input.outerWidth() : 0,
4661                a = t.input ? t.input.outerHeight() : 0,
4662                r = document.documentElement.clientWidth + (i ? 0 : k(document).scrollLeft()),
4663                l = document.documentElement.clientHeight + (i ? 0 : k(document).scrollTop());
4664            return e.left -= this._get(t, "isRTL") ? n - o : 0, e.left -= i && e.left === t.input.offset().left ? k(document).scrollLeft() : 0, e.top -= i && e.top === t.input.offset().top + a ? k(document).scrollTop() : 0, e.left -= Math.min(e.left, e.left + n > r && n < r ? Math.abs(e.left + n - r) : 0), e.top -= Math.min(e.top, e.top + s > l && s < l ? Math.abs(s + a) : 0), e
4665        },
4666        _findPos: function (t) {
4667            for (var e, i = this._getInst(t), n = this._get(i, "isRTL"); t && ("hidden" === t.type || 1 !== t.nodeType || k.expr.filters.hidden(t));) t = t[n ? "previousSibling" : "nextSibling"];
4668            return [(e = k(t).offset()).left, e.top]
4669        },
4670        _hideDatepicker: function (t) {
4671            var e, i, n, s, o = this._curInst;
4672            !o || t && o !== k.data(t, "datepicker") || this._datepickerShowing && (e = this._get(o, "showAnim"), i = this._get(o, "duration"), n = function () {
4673                k.datepicker._tidyDialog(o)
4674            }, k.effects && (k.effects.effect[e] || k.effects[e]) ? o.dpDiv.hide(e, k.datepicker._get(o, "showOptions"), i, n) : o.dpDiv["slideDown" === e ? "slideUp" : "fadeIn" === e ? "fadeOut" : "hide"](e ? i : null, n), e || n(), this._datepickerShowing = !1, (s = this._get(o, "onClose")) && s.apply(o.input ? o.input[0] : null, [o.input ? o.input.val() : "", o]), this._lastInput = null, this._inDialog && (this._dialogInput.css({
4675                position: "absolute",
vendor: 5,656 bytes, lines 4676-4764
4676                left: "0",
4677                top: "-100px"
4678            }), k.blockUI && (k.unblockUI(), k("body").append(this.dpDiv))), this._inDialog = !1)
4679        },
4680        _tidyDialog: function (t) {
4681            t.dpDiv.removeClass(this._dialogClass).off(".ui-datepicker-calendar")
4682        },
4683        _checkExternalClick: function (t) {
4684            if (k.datepicker._curInst) {
4685                var e = k(t.target), i = k.datepicker._getInst(e[0]);
4686                (e[0].id === k.datepicker._mainDivId || 0 !== e.parents("#" + k.datepicker._mainDivId).length || e.hasClass(k.datepicker.markerClassName) || e.closest("." + k.datepicker._triggerClass).length || !k.datepicker._datepickerShowing || k.datepicker._inDialog && k.blockUI) && (!e.hasClass(k.datepicker.markerClassName) || k.datepicker._curInst === i) || k.datepicker._hideDatepicker()
4687            }
4688        },
4689        _adjustDate: function (t, e, i) {
4690            var n = k(t), s = this._getInst(n[0]);
4691            this._isDisabledDatepicker(n[0]) || (this._adjustInstDate(s, e + ("M" === i ? this._get(s, "showCurrentAtPos") : 0), i), this._updateDatepicker(s))
4692        },
4693        _gotoToday: function (t) {
4694            var e, i = k(t), n = this._getInst(i[0]);
4695            this._get(n, "gotoCurrent") && n.currentDay ? (n.selectedDay = n.currentDay, n.drawMonth = n.selectedMonth = n.currentMonth, n.drawYear = n.selectedYear = n.currentYear) : (e = new Date, n.selectedDay = e.getDate(), n.drawMonth = n.selectedMonth = e.getMonth(), n.drawYear = n.selectedYear = e.getFullYear()), this._notifyChange(n), this._adjustDate(i)
4696        },
4697        _selectMonthYear: function (t, e, i) {
4698            var n = k(t), s = this._getInst(n[0]);
4699            s["selected" + ("M" === i ? "Month" : "Year")] = s["draw" + ("M" === i ? "Month" : "Year")] = parseInt(e.options[e.selectedIndex].value, 10), this._notifyChange(s), this._adjustDate(n)
4700        },
4701        _selectDay: function (t, e, i, n) {
4702            var s, o = k(t);
4703            k(n).hasClass(this._unselectableClass) || this._isDisabledDatepicker(o[0]) || ((s = this._getInst(o[0])).selectedDay = s.currentDay = k("a", n).html(), s.selectedMonth = s.currentMonth = e, s.selectedYear = s.currentYear = i, this._selectDate(t, this._formatDate(s, s.currentDay, s.currentMonth, s.currentYear)))
4704        },
4705        _clearDate: function (t) {
4706            var e = k(t);
4707            this._selectDate(e, "")
4708        },
4709        _selectDate: function (t, e) {
4710            var i, n = k(t), s = this._getInst(n[0]);
4711            e = null != e ? e : this._formatDate(s), s.input && s.input.val(e), this._updateAlternate(s), (i = this._get(s, "onSelect")) ? i.apply(s.input ? s.input[0] : null, [e, s]) : s.input && s.input.trigger("change"), s.inline ? this._updateDatepicker(s) : (this._hideDatepicker(), this._lastInput = s.input[0], "object" != typeof s.input[0] && s.input.trigger("focus"), this._lastInput = null)
4712        },
4713        _updateAlternate: function (t) {
4714            var e, i, n, s = this._get(t, "altField");
4715            s && (e = this._get(t, "altFormat") || this._get(t, "dateFormat"), i = this._getDate(t), n = this.formatDate(e, i, this._getFormatConfig(t)), k(s).val(n))
4716        },
4717        noWeekends: function (t) {
4718            var e = t.getDay();
4719            return [0 < e && e < 6, ""]
4720        },
4721        iso8601Week: function (t) {
4722            var e, i = new Date(t.getTime());
4723            return i.setDate(i.getDate() + 4 - (i.getDay() || 7)), e = i.getTime(), i.setMonth(0), i.setDate(1), Math.floor(Math.round((e - i) / 864e5) / 7) + 1
4724        },
4725        parseDate: function (i, o, t) {
4726            if (null == i || null == o) throw"Invalid arguments";
4727            if ("" === (o = "object" == typeof o ? "" + o : o + "")) return null;
4728
4729            function a(t) {
4730                var e = i.length > r + 1 && i.charAt(r + 1) === t;
4731                return e && r++, e
4732            }
4733
4734            function e(t) {
4735                var e = a(t), i = "@" === t ? 14 : "!" === t ? 20 : "y" === t && e ? 4 : "o" === t ? 3 : 2,
4736                    n = RegExp("^\\d{" + ("y" === t ? i : 1) + "," + i + "}"), s = o.substring(u).match(n);
4737                if (!s) throw"Missing number at position " + u;
4738                return u += s[0].length, parseInt(s[0], 10)
4739            }
4740
4741            function n(t, e, i) {
4742                var n = -1, s = k.map(a(t) ? i : e, function (t, e) {
4743                    return [[e, t]]
4744                }).sort(function (t, e) {
4745                    return -(t[1].length - e[1].length)
4746                });
4747                if (k.each(s, function (t, e) {
4748                    var i = e[1];
4749                    return o.substr(u, i.length).toLowerCase() === i.toLowerCase() ? (n = e[0], u += i.length, !1) : void 0
4750                }), -1 !== n) return n + 1;
4751                throw"Unknown name at position " + u
4752            }
4753
4754            function s() {
4755                if (o.charAt(u) !== i.charAt(r)) throw"Unexpected literal at position " + u;
4756                u++
4757            }
4758
4759            var r, l, h, c, u = 0, d = (t ? t.shortYearCutoff : null) || this._defaults.shortYearCutoff,
4760                p = "string" != typeof d ? d : (new Date).getFullYear() % 100 + parseInt(d, 10),
4761                f = (t ? t.dayNamesShort : null) || this._defaults.dayNamesShort,
4762                m = (t ? t.dayNames : null) || this._defaults.dayNames,
4763                g = (t ? t.monthNamesShort : null) || this._defaults.monthNamesShort,
4764                v = (t ? t.monthNames : null) || this._defaults.monthNames, y = -1, b = -1, _ = -1, w = 
vendor: 9,056 bytes, lines 4764-4954
4764-1, x = !1;
4765            for (r = 0; i.length > r; r++) if (x) "'" !== i.charAt(r) || a("'") ? s() : x = !1; else switch (i.charAt(r)) {
4766                case"d":
4767                    _ = e("d");
4768                    break;
4769                case"D":
4770                    n("D", f, m);
4771                    break;
4772                case"o":
4773                    w = e("o");
4774                    break;
4775                case"m":
4776                    b = e("m");
4777                    break;
4778                case"M":
4779                    b = n("M", g, v);
4780                    break;
4781                case"y":
4782                    y = e("y");
4783                    break;
4784                case"@":
4785                    y = (c = new Date(e("@"))).getFullYear(), b = c.getMonth() + 1, _ = c.getDate();
4786                    break;
4787                case"!":
4788                    y = (c = new Date((e("!") - this._ticksTo1970) / 1e4)).getFullYear(), b = c.getMonth() + 1, _ = c.getDate();
4789                    break;
4790                case"'":
4791                    a("'") ? s() : x = !0;
4792                    break;
4793                default:
4794                    s()
4795            }
4796            if (o.length > u && (h = o.substr(u), !/^\s+/.test(h))) throw"Extra/unparsed characters found in date: " + h;
4797            if (-1 === y ? y = (new Date).getFullYear() : y < 100 && (y += (new Date).getFullYear() - (new Date).getFullYear() % 100 + (y <= p ? 0 : -100)), -1 < w) for (b = 1, _ = w; !(_ <= (l = this._getDaysInMonth(y, b - 1)));) b++, _ -= l;
4798            if ((c = this._daylightSavingAdjust(new Date(y, b - 1, _))).getFullYear() !== y || c.getMonth() + 1 !== b || c.getDate() !== _) throw"Invalid date";
4799            return c
4800        },
4801        ATOM: "yy-mm-dd",
4802        COOKIE: "D, dd M yy",
4803        ISO_8601: "yy-mm-dd",
4804        RFC_822: "D, d M y",
4805        RFC_850: "DD, dd-M-y",
4806        RFC_1036: "D, d M y",
4807        RFC_1123: "D, d M yy",
4808        RFC_2822: "D, d M yy",
4809        RSS: "D, d M y",
4810        TICKS: "!",
4811        TIMESTAMP: "@",
4812        W3C: "yy-mm-dd",
4813        _ticksTo1970: 864e9 * (718685 + Math.floor(492.5) - Math.floor(19.7) + Math.floor(4.925)),
4814        formatDate: function (i, t, e) {
4815            if (!t) return "";
4816
4817            function s(t) {
4818                var e = i.length > a + 1 && i.charAt(a + 1) === t;
4819                return e && a++, e
4820            }
4821
4822            function n(t, e, i) {
4823                var n = "" + e;
4824                if (s(t)) for (; i > n.length;) n = "0" + n;
4825                return n
4826            }
4827
4828            function o(t, e, i, n) {
4829                return s(t) ? n[e] : i[e]
4830            }
4831
4832            var a, r = (e ? e.dayNamesShort : null) || this._defaults.dayNamesShort,
4833                l = (e ? e.dayNames : null) || this._defaults.dayNames,
4834                h = (e ? e.monthNamesShort : null) || this._defaults.monthNamesShort,
4835                c = (e ? e.monthNames : null) || this._defaults.monthNames, u = "", d = !1;
4836            if (t) for (a = 0; i.length > a; a++) if (d) "'" !== i.charAt(a) || s("'") ? u += i.charAt(a) : d = !1; else switch (i.charAt(a)) {
4837                case"d":
4838                    u += n("d", t.getDate(), 2);
4839                    break;
4840                case"D":
4841                    u += o("D", t.getDay(), r, l);
4842                    break;
4843                case"o":
4844                    u += n("o", Math.round((new Date(t.getFullYear(), t.getMonth(), t.getDate()).getTime() - new Date(t.getFullYear(), 0, 0).getTime()) / 864e5), 3);
4845                    break;
4846                case"m":
4847                    u += n("m", t.getMonth() + 1, 2);
4848                    break;
4849                case"M":
4850                    u += o("M", t.getMonth(), h, c);
4851                    break;
4852                case"y":
4853                    u += s("y") ? t.getFullYear() : (t.getFullYear() % 100 < 10 ? "0" : "") + t.getFullYear() % 100;
4854                    break;
4855                case"@":
4856                    u += t.getTime();
4857                    break;
4858                case"!":
4859                    u += 1e4 * t.getTime() + this._ticksTo1970;
4860                    break;
4861                case"'":
4862                    s("'") ? u += "'" : d = !0;
4863                    break;
4864                default:
4865                    u += i.charAt(a)
4866            }
4867            return u
4868        },
4869        _possibleChars: function (i) {
4870            function t(t) {
4871                var e = i.length > n + 1 && i.charAt(n + 1) === t;
4872                return e && n++, e
4873            }
4874
4875            var n, e = "", s = !1;
4876            for (n = 0; i.length > n; n++) if (s) "'" !== i.charAt(n) || t("'") ? e += i.charAt(n) : s = !1; else switch (i.charAt(n)) {
4877                case"d":
4878                case"m":
4879                case"y":
4880                case"@":
4881                    e += "0123456789";
4882                    break;
4883                case"D":
4884                case"M":
4885                    return null;
4886                case"'":
4887                    t("'") ? e += "'" : s = !0;
4888                    break;
4889                default:
4890                    e += i.charAt(n)
4891            }
4892            return e
4893        },
4894        _get: function (t, e) {
4895            return void 0 !== t.settings[e] ? t.settings[e] : this._defaults[e]
4896        },
4897        _setDateFromField: function (t, e) {
4898            if (t.input.val() !== t.lastVal) {
4899                var i = this._get(t, "dateFormat"), n = t.lastVal = t.input ? t.input.val() : null,
4900                    s = this._getDefaultDate(t), o = s, a = this._getFormatConfig(t);
4901                try {
4902                    o = this.parseDate(i, n, a) || s
4903                } catch (t) {
4904                    n = e ? "" : n
4905                }
4906                t.selectedDay = o.getDate(), t.drawMonth = t.selectedMonth = o.getMonth(), t.drawYear = t.selectedYear = o.getFullYear(), t.currentDay = n ? o.getDate() : 0, t.currentMonth = n ? o.getMonth() : 0, t.currentYear = n ? o.getFullYear() : 0, this._adjustInstDate(t)
4907            }
4908        },
4909        _getDefaultDate: function (t) {
4910            return this._restrictMinMax(t, this._determineDate(t, this._get(t, "defaultDate"), new Date))
4911        },
4912        _determineDate: function (r, t, e) {
4913            var i, n, s = null == t || "" === t ? e : "string" == typeof t ? function (t) {
4914                try {
4915                    return k.datepicker.parseDate(k.datepicker._get(r, "dateFormat"), t, k.datepicker._getFormatConfig(r))
4916                } catch (t) {
4917                }
4918                for (var e = (t.toLowerCase().match(/^c/) ? k.datepicker._getDate(r) : null) || new Date, i = e.getFullYear(), n = e.getMonth(), s = e.getDate(), o = /([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g, a = o.exec(t); a;) {
4919                    switch (a[2] || "d") {
4920                        case"d":
4921                        case"D":
4922                            s += parseInt(a[1], 10);
4923                            break;
4924                        case"w":
4925                        case"W":
4926                            s += 7 * parseInt(a[1], 10);
4927                            break;
4928                        case"m":
4929                        case"M":
4930                            n += parseInt(a[1], 10), s = Math.min(s, k.datepicker._getDaysInMonth(i, n));
4931                            break;
4932                        case"y":
4933                        case"Y":
4934                            i += parseInt(a[1], 10), s = Math.min(s, k.datepicker._getDaysInMonth(i, n))
4935                    }
4936                    a = o.exec(t)
4937                }
4938                return new Date(i, n, s)
4939            }(t) : "number" == typeof t ? isNaN(t) ? e : (i = t, (n = new Date).setDate(n.getDate() + i), n) : new Date(t.getTime());
4940            return (s = s && "Invalid Date" == "" + s ? e : s) && (s.setHours(0), s.setMinutes(0), s.setSeconds(0), s.setMilliseconds(0)), this._daylightSavingAdjust(s)
4941        },
4942        _daylightSavingAdjust: function (t) {
4943            return t ? (t.setHours(12 < t.getHours() ? t.getHours() + 2 : 0), t) : null
4944        },
4945        _setDate: function (t, e, i) {
4946            var n = !e, s = t.selectedMonth, o = t.selectedYear,
4947                a = this._restrictMinMax(t, this._determineDate(t, e, new Date));
4948            t.selectedDay = t.currentDay = a.getDate(), t.drawMonth = t.selectedMonth = t.currentMonth = a.getMonth(), t.drawYear = t.selectedYear = t.currentYear = a.getFullYear(), s === t.selectedMonth && o === t.selectedYear || i || this._notifyChange(t), this._adjustInstDate(t), t.input && t.input.val(n ? "" : this._formatDate(t))
4949        },
4950        _getDate: function (t) {
4951            return !t.currentYear || t.input && "" === t.input.val() ? null : this._daylightSavingAdjust(new Date(t.currentYear, t.currentMonth, t.currentDay))
4952        },
4953        _attachHandlers: function (t) {
4954            var e = this._get(t, "stepMonths"), i = "#" + t.id.replace(/\\\\/g, "\\");
vendor: 5,512 bytes, lines 4955-5002
4955            t.dpDiv.find("[data-handler]").map(function () {
4956                var t = {
4957                    prev: function () {
4958                        k.datepicker._adjustDate(i, -e, "M")
4959                    }, next: function () {
4960                        k.datepicker._adjustDate(i, +e, "M")
4961                    }, hide: function () {
4962                        k.datepicker._hideDatepicker()
4963                    }, today: function () {
4964                        k.datepicker._gotoToday(i)
4965                    }, selectDay: function () {
4966                        return k.datepicker._selectDay(i, +this.getAttribute("data-month"), +this.getAttribute("data-year"), this), !1
4967                    }, selectMonth: function () {
4968                        return k.datepicker._selectMonthYear(i, this, "M"), !1
4969                    }, selectYear: function () {
4970                        return k.datepicker._selectMonthYear(i, this, "Y"), !1
4971                    }
4972                };
4973                k(this).on(this.getAttribute("data-event"), t[this.getAttribute("data-handler")])
4974            })
4975        },
4976        _generateHTML: function (t) {
4977            var e, i, n, s, o, a, r, l, h, c, u, d, p, f, m, g, v, y, b, _, w, x, k, C, D, T, S, I, P, M, $, E, N, A, O,
4978                H, z, F, L, j = new Date,
4979                R = this._daylightSavingAdjust(new Date(j.getFullYear(), j.getMonth(), j.getDate())),
4980                W = this._get(t, "isRTL"), B = this._get(t, "showButtonPanel"), q = this._get(t, "hideIfNoPrevNext"),
4981                U = this._get(t, "navigationAsDateFormat"), Y = this._getNumberOfMonths(t),
4982                V = this._get(t, "showCurrentAtPos"), K = this._get(t, "stepMonths"), X = 1 !== Y[0] || 1 !== Y[1],
4983                Q = this._daylightSavingAdjust(t.currentDay ? new Date(t.currentYear, t.currentMonth, t.currentDay) : new Date(9999, 9, 9)),
4984                G = this._getMinMaxDate(t, "min"), J = this._getMinMaxDate(t, "max"), Z = t.drawMonth - V,
4985                tt = t.drawYear;
4986            if (Z < 0 && (Z += 12, tt--), J) for (e = this._daylightSavingAdjust(new Date(J.getFullYear(), J.getMonth() - Y[0] * Y[1] + 1, J.getDate())), e = G && e < G ? G : e; this._daylightSavingAdjust(new Date(tt, Z, 1)) > e;) --Z < 0 && (Z = 11, tt--);
4987            for (t.drawMonth = Z, t.drawYear = tt, i = this._get(t, "prevText"), i = U ? this.formatDate(i, this._daylightSavingAdjust(new Date(tt, Z - K, 1)), this._getFormatConfig(t)) : i, n = this._canAdjustMonth(t, -1, tt, Z) ? "<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click' title='" + i + "'><span class='ui-icon ui-icon-circle-triangle-" + (W ? "e" : "w") + "'>" + i + "</span></a>" : q ? "" : "<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='" + i + "'><span class='ui-icon ui-icon-circle-triangle-" + (W ? "e" : "w") + "'>" + i + "</span></a>", s = this._get(t, "nextText"), s = U ? this.formatDate(s, this._daylightSavingAdjust(new Date(tt, Z + K, 1)), this._getFormatConfig(t)) : s, o = this._canAdjustMonth(t, 1, tt, Z) ? "<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click' title='" + s + "'><span class='ui-icon ui-icon-circle-triangle-" + (W ? "w" : "e") + "'>" + s + "</span></a>" : q ? "" : "<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='" + s + "'><span class='ui-icon ui-icon-circle-triangle-" + (W ? "w" : "e") + "'>" + s + "</span></a>", a = this._get(t, "currentText"), r = this._get(t, "gotoCurrent") && t.currentDay ? Q : R, a = U ? this.formatDate(a, r, this._getFormatConfig(t)) : a, l = t.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(t, "closeText") + "</button>", h = B ? "<div class='ui-datepicker-buttonpane ui-widget-content'>" + (W ? l : "") + (this._isInRange(t, r) ? "<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'>" + a + "</button>" : "") + (W ? "" : l) + "</div>" : "", c = parseInt(this._get(t, "firstDay"), 10), c = isNaN(c) ? 0 : c, u = this._get(t, "showWeek"), d = this._get(t, "dayNames"), p = this._get(t, "dayNamesMin"), f = this._get(t, "monthNames"), m = this._get(t, "monthNamesShort"), g = this._get(t, "beforeShowDay"), v = this._get(t, "showOtherMonths"), y = this._get(t, "selectOtherMonths"), b = this._getDefaultDate(t), _ = "", x = 0; Y[0] > x; x++) {
4988                for (k = "", this.maxRows = 4, C = 0; Y[1] > C; C++) {
4989                    if (D = this._daylightSavingAdjust(new Date(tt, Z, t.selectedDay)), T = " ui-corner-all", S = "", X) {
4990                        if (S += "<div class='ui-datepicker-group", 1 < Y[1]) switch (C) {
4991                            case 0:
4992                                S += " ui-datepicker-group-first", T = " ui-corner-" + (W ? "right" : "left");
4993                                break;
4994                            case Y[1] - 1:
4995                                S += " ui-datepicker-group-last", T = " ui-corner-" + (W ? "left" : "right");
4996                                break;
4997                            default:
4998                                S += " ui-datepicker-group-middle", T = ""
4999                        }
5000                        S += "'>"
5001                    }
5002                    for (S += "<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix" + T + "'>
vendor: 6,235 bytes, lines 5002-5058
5002" + (/all|left/.test(T) && 0 === x ? W ? o : n : "") + (/all|right/.test(T) && 0 === x ? W ? n : o : "") + this._generateMonthYearHeader(t, Z, tt, G, J, 0 < x || 0 < C, f, m) + "</div><table class='ui-datepicker-calendar'><thead><tr>", I = u ? "<th class='ui-datepicker-week-col'>" + this._get(t, "weekHeader") + "</th>" : "", w = 0; w < 7; w++) I += "<th scope='col'" + (5 <= (w + c + 6) % 7 ? " class='ui-datepicker-week-end'" : "") + "><span title='" + d[P = (w + c) % 7] + "'>" + p[P] + "</span></th>";
5003                    for (S += I + "</tr></thead><tbody>", M = this._getDaysInMonth(tt, Z), tt === t.selectedYear && Z === t.selectedMonth && (t.selectedDay = Math.min(t.selectedDay, M)), $ = (this._getFirstDayOfMonth(tt, Z) - c + 7) % 7, E = Math.ceil(($ + M) / 7), N = X && this.maxRows > E ? this.maxRows : E, this.maxRows = N, A = this._daylightSavingAdjust(new Date(tt, Z, 1 - $)), O = 0; O < N; O++) {
5004                        for (S += "<tr>", H = u ? "<td class='ui-datepicker-week-col'>" + this._get(t, "calculateWeek")(A) + "</td>" : "", w = 0; w < 7; w++) z = g ? g.apply(t.input ? t.input[0] : null, [A]) : [!0, ""], L = (F = A.getMonth() !== Z) && !y || !z[0] || G && A < G || J && J < A, H += "<td class='" + (5 <= (w + c + 6) % 7 ? " ui-datepicker-week-end" : "") + (F ? " ui-datepicker-other-month" : "") + (A.getTime() === D.getTime() && Z === t.selectedMonth && t._keyEvent || b.getTime() === A.getTime() && b.getTime() === D.getTime() ? " " + this._dayOverClass : "") + (L ? " " + this._unselectableClass + " ui-state-disabled" : "") + (F && !v ? "" : " " + z[1] + (A.getTime() === Q.getTime() ? " " + this._currentClass : "") + (A.getTime() === R.getTime() ? " ui-datepicker-today" : "")) + "'" + (F && !v || !z[2] ? "" : " title='" + z[2].replace(/'/g, "&#39;") + "'") + (L ? "" : " data-handler='selectDay' data-event='click' data-month='" + A.getMonth() + "' data-year='" + A.getFullYear() + "'") + ">" + (F && !v ? "&#xa0;" : L ? "<span class='ui-state-default'>" + A.getDate() + "</span>" : "<a class='ui-state-default" + (A.getTime() === R.getTime() ? " ui-state-highlight" : "") + (A.getTime() === Q.getTime() ? " ui-state-active" : "") + (F ? " ui-priority-secondary" : "") + "' href='#'>" + A.getDate() + "</a>") + "</td>", A.setDate(A.getDate() + 1), A = this._daylightSavingAdjust(A);
5005                        S += H + "</tr>"
5006                    }
5007                    11 < ++Z && (Z = 0, tt++), k += S += "</tbody></table>" + (X ? "</div>" + (0 < Y[0] && C === Y[1] - 1 ? "<div class='ui-datepicker-row-break'></div>" : "") : "")
5008                }
5009                _ += k
5010            }
5011            return _ += h, t._keyEvent = !1, _
5012        },
5013        _generateMonthYearHeader: function (t, e, i, n, s, o, a, r) {
5014            var l, h, c, u, d, p, f, m, g = this._get(t, "changeMonth"), v = this._get(t, "changeYear"),
5015                y = this._get(t, "showMonthAfterYear"), b = "<div class='ui-datepicker-title'>", _ = "";
5016            if (o || !g) _ += "<span class='ui-datepicker-month'>" + a[e] + "</span>"; else {
5017                for (l = n && n.getFullYear() === i, h = s && s.getFullYear() === i, _ += "<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>", c = 0; c < 12; c++) (!l || c >= n.getMonth()) && (!h || s.getMonth() >= c) && (_ += "<option value='" + c + "'" + (c === e ? " selected='selected'" : "") + ">" + r[c] + "</option>");
5018                _ += "</select>"
5019            }
5020            if (y || (b += _ + (!o && g && v ? "" : "&#xa0;")), !t.yearshtml) if (t.yearshtml = "", o || !v) b += "<span class='ui-datepicker-year'>" + i + "</span>"; else {
5021                for (u = this._get(t, "yearRange").split(":"), d = (new Date).getFullYear(), f = (p = function (t) {
5022                    var e = t.match(/c[+\-].*/) ? i + parseInt(t.substring(1), 10) : t.match(/[+\-].*/) ? d + parseInt(t, 10) : parseInt(t, 10);
5023                    return isNaN(e) ? d : e
5024                })(u[0]), m = Math.max(f, p(u[1] || "")), f = n ? Math.max(f, n.getFullYear()) : f, m = s ? Math.min(m, s.getFullYear()) : m, t.yearshtml += "<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>"; f <= m; f++) t.yearshtml += "<option value='" + f + "'" + (f === i ? " selected='selected'" : "") + ">" + f + "</option>";
5025                t.yearshtml += "</select>", b += t.yearshtml, t.yearshtml = null
5026            }
5027            return b += this._get(t, "yearSuffix"), y && (b += (!o && g && v ? "" : "&#xa0;") + _), b + "</div>"
5028        },
5029        _adjustInstDate: function (t, e, i) {
5030            var n = t.selectedYear + ("Y" === i ? e : 0), s = t.selectedMonth + ("M" === i ? e : 0),
5031                o = Math.min(t.selectedDay, this._getDaysInMonth(n, s)) + ("D" === i ? e : 0),
5032                a = this._restrictMinMax(t, this._daylightSavingAdjust(new Date(n, s, o)));
5033            t.selectedDay = a.getDate(), t.drawMonth = t.selectedMonth = a.getMonth(), t.drawYear = t.selectedYear = a.getFullYear(), "M" !== i && "Y" !== i || this._notifyChange(t)
5034        },
5035        _restrictMinMax: function (t, e) {
5036            var i = this._getMinMaxDate(t, "min"), n = this._getMinMaxDate(t, "max"), s = i && e < i ? i : e;
5037            return n && n < s ? n : s
5038        },
5039        _notifyChange: function (t) {
5040            var e = this._get(t, "onChangeMonthYear");
5041            e && e.apply(t.input ? t.input[0] : null, [t.selectedYear, t.selectedMonth + 1, t])
5042        },
5043        _getNumberOfMonths: function (t) {
5044            var e = this._get(t, "numberOfMonths");
5045            return null == e ? [1, 1] : "number" == typeof e ? [1, e] : e
5046        },
5047        _getMinMaxDate: function (t, e) {
5048            return this._determineDate(t, this._get(t, e + "Date"), null)
5049        },
5050        _getDaysInMonth: function (t, e) {
5051            return 32 - this._daylightSavingAdjust(new Date(t, e, 32)).getDate()
5052        },
5053        _getFirstDayOfMonth: function (t, e) {
5054            return new Date(t, e, 1).getDay()
5055        },
5056        _canAdjustMonth: function (t, e, i, n) {
5057            var s = this._getNumberOfMonths(t),
5058                o = this._daylightSavingAdjust(new Date(i, n + (e < 0 ? e : s[0] * 
vendor: 15,382 bytes, lines 5058-5276
5058s[1]), 1));
5059            return e < 0 && o.setDate(this._getDaysInMonth(o.getFullYear(), o.getMonth())), this._isInRange(t, o)
5060        },
5061        _isInRange: function (t, e) {
5062            var i, n, s = this._getMinMaxDate(t, "min"), o = this._getMinMaxDate(t, "max"), a = null, r = null,
5063                l = this._get(t, "yearRange");
5064            return l && (i = l.split(":"), n = (new Date).getFullYear(), a = parseInt(i[0], 10), r = parseInt(i[1], 10), i[0].match(/[+\-].*/) && (a += n), i[1].match(/[+\-].*/) && (r += n)), (!s || e.getTime() >= s.getTime()) && (!o || e.getTime() <= o.getTime()) && (!a || e.getFullYear() >= a) && (!r || r >= e.getFullYear())
5065        },
5066        _getFormatConfig: function (t) {
5067            var e = this._get(t, "shortYearCutoff");
5068            return {
5069                shortYearCutoff: e = "string" != typeof e ? e : (new Date).getFullYear() % 100 + parseInt(e, 10),
5070                dayNamesShort: this._get(t, "dayNamesShort"),
5071                dayNames: this._get(t, "dayNames"),
5072                monthNamesShort: this._get(t, "monthNamesShort"),
5073                monthNames: this._get(t, "monthNames")
5074            }
5075        },
5076        _formatDate: function (t, e, i, n) {
5077            e || (t.currentDay = t.selectedDay, t.currentMonth = t.selectedMonth, t.currentYear = t.selectedYear);
5078            var s = e ? "object" == typeof e ? e : this._daylightSavingAdjust(new Date(n, i, e)) : this._daylightSavingAdjust(new Date(t.currentYear, t.currentMonth, t.currentDay));
5079            return this.formatDate(this._get(t, "dateFormat"), s, this._getFormatConfig(t))
5080        }
5081    }), k.fn.datepicker = function (t) {
5082        if (!this.length) return this;
5083        k.datepicker.initialized || (k(document).on("mousedown", k.datepicker._checkExternalClick), k.datepicker.initialized = !0), 0 === k("#" + k.datepicker._mainDivId).length && k("body").append(k.datepicker.dpDiv);
5084        var e = Array.prototype.slice.call(arguments, 1);
5085        return "string" != typeof t || "isDisabled" !== t && "getDate" !== t && "widget" !== t ? "option" === t && 2 === arguments.length && "string" == typeof arguments[1] ? k.datepicker["_" + t + "Datepicker"].apply(k.datepicker, [this[0]].concat(e)) : this.each(function () {
5086            "string" == typeof t ? k.datepicker["_" + t + "Datepicker"].apply(k.datepicker, [this].concat(e)) : k.datepicker._attachDatepicker(this, t)
5087        }) : k.datepicker["_" + t + "Datepicker"].apply(k.datepicker, [this[0]].concat(e))
5088    }, k.datepicker = new t, k.datepicker.initialized = !1, k.datepicker.uuid = (new Date).getTime(), k.datepicker.version = "1.12.1", k.datepicker, k.ui.ie = !!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase());
5089    var st = !1;
5090    k(document).on("mouseup", function () {
5091        st = !1
5092    }), k.widget("ui.mouse", {
5093        version: "1.12.1",
5094        options: {cancel: "input, textarea, button, select, option", distance: 1, delay: 0},
5095        _mouseInit: function () {
5096            var e = this;
5097            this.element.on("mousedown." + this.widgetName, function (t) {
5098                return e._mouseDown(t)
5099            }).on("click." + this.widgetName, function (t) {
5100                return !0 === k.data(t.target, e.widgetName + ".preventClickEvent") ? (k.removeData(t.target, e.widgetName + ".preventClickEvent"), t.stopImmediatePropagation(), !1) : void 0
5101            }), this.started = !1
5102        },
5103        _mouseDestroy: function () {
5104            this.element.off("." + this.widgetName), this._mouseMoveDelegate && this.document.off("mousemove." + this.widgetName, this._mouseMoveDelegate).off("mouseup." + this.widgetName, this._mouseUpDelegate)
5105        },
5106        _mouseDown: function (t) {
5107            if (!st) {
5108                this._mouseMoved = !1, this._mouseStarted && this._mouseUp(t), this._mouseDownEvent = t;
5109                var e = this, i = 1 === t.which,
5110                    n = !("string" != typeof this.options.cancel || !t.target.nodeName) && k(t.target).closest(this.options.cancel).length;
5111                return i && !n && this._mouseCapture(t) && (this.mouseDelayMet = !this.options.delay, this.mouseDelayMet || (this._mouseDelayTimer = setTimeout(function () {
5112                    e.mouseDelayMet = !0
5113                }, this.options.delay)), this._mouseDistanceMet(t) && this._mouseDelayMet(t) && (this._mouseStarted = !1 !== this._mouseStart(t), !this._mouseStarted) ? t.preventDefault() : (!0 === k.data(t.target, this.widgetName + ".preventClickEvent") && k.removeData(t.target, this.widgetName + ".preventClickEvent"), this._mouseMoveDelegate = function (t) {
5114                    return e._mouseMove(t)
5115                }, this._mouseUpDelegate = function (t) {
5116                    return e._mouseUp(t)
5117                }, this.document.on("mousemove." + this.widgetName, this._mouseMoveDelegate).on("mouseup." + this.widgetName, this._mouseUpDelegate), t.preventDefault(), st = !0)), !0
5118            }
5119        },
5120        _mouseMove: function (t) {
5121            if (this._mouseMoved) {
5122                if (k.ui.ie && (!document.documentMode || document.documentMode < 9) && !t.button) return this._mouseUp(t);
5123                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)
5124            }
5125            return (t.which || t.button) && (this._mouseMoved = !0), this._mouseStarted ? (this._mouseDrag(t), t.preventDefault()) : (this._mouseDistanceMet(t) && this._mouseDelayMet(t) && (this._mouseStarted = !1 !== this._mouseStart(this._mouseDownEvent, t), this._mouseStarted ? this._mouseDrag(t) : this._mouseUp(t)), !this._mouseStarted)
5126        },
5127        _mouseUp: function (t) {
5128            this.document.off("mousemove." + this.widgetName, this._mouseMoveDelegate).off("mouseup." + this.widgetName, this._mouseUpDelegate), this._mouseStarted && (this._mouseStarted = !1, t.target === this._mouseDownEvent.target && k.data(t.target, this.widgetName + ".preventClickEvent", !0), this._mouseStop(t)), this._mouseDelayTimer && (clearTimeout(this._mouseDelayTimer), delete this._mouseDelayTimer), this.ignoreMissingWhich = !1, st = !1, t.preventDefault()
5129        },
5130        _mouseDistanceMet: function (t) {
5131            return Math.max(Math.abs(this._mouseDownEvent.pageX - t.pageX), Math.abs(this._mouseDownEvent.pageY - t.pageY)) >= this.options.distance
5132        },
5133        _mouseDelayMet: function () {
5134            return this.mouseDelayMet
5135        },
5136        _mouseStart: function () {
5137        },
5138        _mouseDrag: function () {
5139        },
5140        _mouseStop: function () {
5141        },
5142        _mouseCapture: function () {
5143            return !0
5144        }
5145    }), k.ui.plugin = {
5146        add: function (t, e, i) {
5147            var n, s = k.ui[t].prototype;
5148            for (n in i) s.plugins[n] = s.plugins[n] || [], s.plugins[n].push([e, i[n]])
5149        }, call: function (t, e, i, n) {
5150            var s, o = t.plugins[e];
5151            if (o && (n || t.element[0].parentNode && 11 !== t.element[0].parentNode.nodeType)) for (s = 0; o.length > s; s++) t.options[o[s][0]] && o[s][1].apply(t.element, i)
5152        }
5153    }, k.ui.safeBlur = function (t) {
5154        t && "body" !== t.nodeName.toLowerCase() && k(t).trigger("blur")
5155    }, k.widget("ui.draggable", k.ui.mouse, {
5156        version: "1.12.1",
5157        widgetEventPrefix: "drag",
5158        options: {
5159            addClasses: !0,
5160            appendTo: "parent",
5161            axis: !1,
5162            connectToSortable: !1,
5163            containment: !1,
5164            cursor: "auto",
5165            cursorAt: !1,
5166            grid: !1,
5167            handle: !1,
5168            helper: "original",
5169            iframeFix: !1,
5170            opacity: !1,
5171            refreshPositions: !1,
5172            revert: !1,
5173            revertDuration: 500,
5174            scope: "default",
5175            scroll: !0,
5176            scrollSensitivity: 20,
5177            scrollSpeed: 20,
5178            snap: !1,
5179            snapMode: "both",
5180            snapTolerance: 20,
5181            stack: !1,
5182            zIndex: !1,
5183            drag: null,
5184            start: null,
5185            stop: null
5186        },
5187        _create: function () {
5188            "original" === this.options.helper && this._setPositionRelative(), this.options.addClasses && this._addClass("ui-draggable"), this._setHandleClassName(), this._mouseInit()
5189        },
5190        _setOption: function (t, e) {
5191            this._super(t, e), "handle" === t && (this._removeHandleClassName(), this._setHandleClassName())
5192        },
5193        _destroy: function () {
5194            return (this.helper || this.element).is(".ui-draggable-dragging") ? void (this.destroyOnClear = !0) : (this._removeHandleClassName(), void this._mouseDestroy())
5195        },
5196        _mouseCapture: function (t) {
5197            var e = this.options;
5198            return !(this.helper || e.disabled || 0 < k(t.target).closest(".ui-resizable-handle").length) && (this.handle = this._getHandle(t), !!this.handle && (this._blurActiveElement(t), this._blockFrames(!0 === e.iframeFix ? "iframe" : e.iframeFix), !0))
5199        },
5200        _blockFrames: function (t) {
5201            this.iframeBlocks = this.document.find(t).map(function () {
5202                var t = k(this);
5203                return k("<div>").css("position", "absolute").appendTo(t.parent()).outerWidth(t.outerWidth()).outerHeight(t.outerHeight()).offset(t.offset())[0]
5204            })
5205        },
5206        _unblockFrames: function () {
5207            this.iframeBlocks && (this.iframeBlocks.remove(), delete this.iframeBlocks)
5208        },
5209        _blurActiveElement: function (t) {
5210            var e = k.ui.safeActiveElement(this.document[0]);
5211            k(t.target).closest(e).length || k.ui.safeBlur(e)
5212        },
5213        _mouseStart: function (t) {
5214            var e = this.options;
5215            return this.helper = this._createHelper(t), this._addClass(this.helper, "ui-draggable-dragging"), this._cacheHelperProportions(), k.ui.ddmanager && (k.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 = 0 < this.helper.parents().filter(function () {
5216                return "fixed" === k(this).css("position")
5217            }).length, this.positionAbs = this.element.offset(), this._refreshOffsets(t), this.originalPosition = this.position = this._generatePosition(t, !1), this.originalPageX = t.pageX, this.originalPageY = t.pageY, e.cursorAt && this._adjustOffsetFromHelper(e.cursorAt), this._setContainment(), !1 === this._trigger("start", t) ? (this._clear(), !1) : (this._cacheHelperProportions(), k.ui.ddmanager && !e.dropBehaviour && k.ui.ddmanager.prepareOffsets(this, t), this._mouseDrag(t, !0), k.ui.ddmanager && k.ui.ddmanager.dragStart(this, t), !0)
5218        },
5219        _refreshOffsets: function (t) {
5220            this.offset = {
5221                top: this.positionAbs.top - this.margins.top,
5222                left: this.positionAbs.left - this.margins.left,
5223                scroll: !1,
5224                parent: this._getParentOffset(),
5225                relative: this._getRelativeOffset()
5226            }, this.offset.click = {left: t.pageX - this.offset.left, top: t.pageY - this.offset.top}
5227        },
5228        _mouseDrag: function (t, e) {
5229            if (this.hasFixedAncestor && (this.offset.parent = this._getParentOffset()), this.position = this._generatePosition(t, !0), this.positionAbs = this._convertPositionTo("absolute"), !e) {
5230                var i = this._uiHash();
5231                if (!1 === this._trigger("drag", t, i)) return this._mouseUp(new k.Event("mouseup", t)), !1;
5232                this.position = i.position
5233            }
5234            return this.helper[0].style.left = this.position.left + "px", this.helper[0].style.top = this.position.top + "px", k.ui.ddmanager && k.ui.ddmanager.drag(this, t), !1
5235        },
5236        _mouseStop: function (t) {
5237            var e = this, i = !1;
5238            return k.ui.ddmanager && !this.options.dropBehaviour && (i = k.ui.ddmanager.drop(this, t)), this.dropped && (i = this.dropped, this.dropped = !1), "invalid" === this.options.revert && !i || "valid" === this.options.revert && i || !0 === this.options.revert || k.isFunction(this.options.revert) && this.options.revert.call(this.element, i) ? k(this.helper).animate(this.originalPosition, parseInt(this.options.revertDuration, 10), function () {
5239                !1 !== e._trigger("stop", t) && e._clear()
5240            }) : !1 !== this._trigger("stop", t) && this._clear(), !1
5241        },
5242        _mouseUp: function (t) {
5243            return this._unblockFrames(), k.ui.ddmanager && k.ui.ddmanager.dragStop(this, t), this.handleElement.is(t.target) && this.element.trigger("focus"), k.ui.mouse.prototype._mouseUp.call(this, t)
5244        },
5245        cancel: function () {
5246            return this.helper.is(".ui-draggable-dragging") ? this._mouseUp(new k.Event("mouseup", {target: this.element[0]})) : this._clear(), this
5247        },
5248        _getHandle: function (t) {
5249            return !this.options.handle || !!k(t.target).closest(this.element.find(this.options.handle)).length
5250        },
5251        _setHandleClassName: function () {
5252            this.handleElement = this.options.handle ? this.element.find(this.options.handle) : this.element, this._addClass(this.handleElement, "ui-draggable-handle")
5253        },
5254        _removeHandleClassName: function () {
5255            this._removeClass(this.handleElement, "ui-draggable-handle")
5256        },
5257        _createHelper: function (t) {
5258            var e = this.options, i = k.isFunction(e.helper),
5259                n = i ? k(e.helper.apply(this.element[0], [t])) : "clone" === e.helper ? this.element.clone().removeAttr("id") : this.element;
5260            return n.parents("body").length || n.appendTo("parent" === e.appendTo ? this.element[0].parentNode : e.appendTo), i && n[0] === this.element[0] && this._setPositionRelative(), n[0] === this.element[0] || /(fixed|absolute)/.test(n.css("position")) || n.css("position", "absolute"), n
5261        },
5262        _setPositionRelative: function () {
5263            /^(?:r|a|f)/.test(this.element.css("position")) || (this.element[0].style.position = "relative")
5264        },
5265        _adjustOffsetFromHelper: function (t) {
5266            "string" == typeof t && (t = t.split(" ")), k.isArray(t) && (t = {
5267                left: +t[0],
5268                top: +t[1] || 0
5269            }), "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)
5270        },
5271        _isRootNode: function (t) {
5272            return /(html|body)/i.test(t.tagName) || t === this.document[0]
5273        },
5274        _getParentOffset: function () {
5275            var t = this.offsetParent.offset(), e = this.document[0];
5276            return "absolute" === this.cssPosition && this.scrollParent[0] !== e && 
vendor: 6,374 bytes, lines 5276-5329
5276k.contains(this.scrollParent[0], this.offsetParent[0]) && (t.left += this.scrollParent.scrollLeft(), t.top += this.scrollParent.scrollTop()), this._isRootNode(this.offsetParent[0]) && (t = {
5277                top: 0,
5278                left: 0
5279            }), {
5280                top: t.top + (parseInt(this.offsetParent.css("borderTopWidth"), 10) || 0),
5281                left: t.left + (parseInt(this.offsetParent.css("borderLeftWidth"), 10) || 0)
5282            }
5283        },
5284        _getRelativeOffset: function () {
5285            if ("relative" !== this.cssPosition) return {top: 0, left: 0};
5286            var t = this.element.position(), e = this._isRootNode(this.scrollParent[0]);
5287            return {
5288                top: t.top - (parseInt(this.helper.css("top"), 10) || 0) + (e ? 0 : this.scrollParent.scrollTop()),
5289                left: t.left - (parseInt(this.helper.css("left"), 10) || 0) + (e ? 0 : this.scrollParent.scrollLeft())
5290            }
5291        },
5292        _cacheMargins: function () {
5293            this.margins = {
5294                left: parseInt(this.element.css("marginLeft"), 10) || 0,
5295                top: parseInt(this.element.css("marginTop"), 10) || 0,
5296                right: parseInt(this.element.css("marginRight"), 10) || 0,
5297                bottom: parseInt(this.element.css("marginBottom"), 10) || 0
5298            }
5299        },
5300        _cacheHelperProportions: function () {
5301            this.helperProportions = {width: this.helper.outerWidth(), height: this.helper.outerHeight()}
5302        },
5303        _setContainment: function () {
5304            var t, e, i, n = this.options, s = this.document[0];
5305            return this.relativeContainer = null, n.containment ? "window" === n.containment ? void (this.containment = [k(window).scrollLeft() - this.offset.relative.left - this.offset.parent.left, k(window).scrollTop() - this.offset.relative.top - this.offset.parent.top, k(window).scrollLeft() + k(window).width() - this.helperProportions.width - this.margins.left, k(window).scrollTop() + (k(window).height() || s.body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top]) : "document" === n.containment ? void (this.containment = [0, 0, k(s).width() - this.helperProportions.width - this.margins.left, (k(s).height() || s.body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top]) : n.containment.constructor === Array ? void (this.containment = n.containment) : ("parent" === n.containment && (n.containment = this.helper[0].parentNode), void ((i = (e = k(n.containment))[0]) && (t = /(scroll|auto)/.test(e.css("overflow")), this.containment = [(parseInt(e.css("borderLeftWidth"), 10) || 0) + (parseInt(e.css("paddingLeft"), 10) || 0), (parseInt(e.css("borderTopWidth"), 10) || 0) + (parseInt(e.css("paddingTop"), 10) || 0), (t ? Math.max(i.scrollWidth, i.offsetWidth) : i.offsetWidth) - (parseInt(e.css("borderRightWidth"), 10) || 0) - (parseInt(e.css("paddingRight"), 10) || 0) - this.helperProportions.width - this.margins.left - this.margins.right, (t ? Math.max(i.scrollHeight, i.offsetHeight) : i.offsetHeight) - (parseInt(e.css("borderBottomWidth"), 10) || 0) - (parseInt(e.css("paddingBottom"), 10) || 0) - this.helperProportions.height - this.margins.top - this.margins.bottom], this.relativeContainer = e))) : void (this.containment = null)
5306        },
5307        _convertPositionTo: function (t, e) {
5308            e = e || this.position;
5309            var i = "absolute" === t ? 1 : -1, n = this._isRootNode(this.scrollParent[0]);
5310            return {
5311                top: e.top + this.offset.relative.top * i + this.offset.parent.top * i - ("fixed" === this.cssPosition ? -this.offset.scroll.top : n ? 0 : this.offset.scroll.top) * i,
5312                left: e.left + this.offset.relative.left * i + this.offset.parent.left * i - ("fixed" === this.cssPosition ? -this.offset.scroll.left : n ? 0 : this.offset.scroll.left) * i
5313            }
5314        },
5315        _generatePosition: function (t, e) {
5316            var i, n, s, o, a = this.options, r = this._isRootNode(this.scrollParent[0]), l = t.pageX, h = t.pageY;
5317            return r && this.offset.scroll || (this.offset.scroll = {
5318                top: this.scrollParent.scrollTop(),
5319                left: this.scrollParent.scrollLeft()
5320            }), e && (this.containment && (i = this.relativeContainer ? (n = this.relativeContainer.offset(), [this.containment[0] + n.left, this.containment[1] + n.top, this.containment[2] + n.left, this.containment[3] + n.top]) : this.containment, t.pageX - this.offset.click.left < i[0] && (l = i[0] + this.offset.click.left), t.pageY - this.offset.click.top < i[1] && (h = i[1] + this.offset.click.top), t.pageX - this.offset.click.left > i[2] && (l = i[2] + this.offset.click.left), t.pageY - this.offset.click.top > i[3] && (h = i[3] + this.offset.click.top)), a.grid && (s = a.grid[1] ? this.originalPageY + Math.round((h - this.originalPageY) / a.grid[1]) * a.grid[1] : this.originalPageY, h = i ? s - this.offset.click.top >= i[1] || s - this.offset.click.top > i[3] ? s : s - this.offset.click.top >= i[1] ? s - a.grid[1] : s + a.grid[1] : s, o = a.grid[0] ? this.originalPageX + Math.round((l - this.originalPageX) / a.grid[0]) * a.grid[0] : this.originalPageX, l = i ? o - this.offset.click.left >= i[0] || o - this.offset.click.left > i[2] ? o : o - this.offset.click.left >= i[0] ? o - a.grid[0] : o + a.grid[0] : o), "y" === a.axis && (l = this.originalPageX), "x" === a.axis && (h = this.originalPageY)), {
5321                top: h - this.offset.click.top - this.offset.relative.top - this.offset.parent.top + ("fixed" === this.cssPosition ? -this.offset.scroll.top : r ? 0 : this.offset.scroll.top),
5322                left: l - this.offset.click.left - this.offset.relative.left - this.offset.parent.left + ("fixed" === this.cssPosition ? -this.offset.scroll.left : r ? 0 : this.offset.scroll.left)
5323            }
5324        },
5325        _clear: function () {
5326            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()
5327        },
5328        _trigger: function (t, e, i) {
5329            return i = i || this._uiHash(), k.ui.plugin.call(this, t, [e, i, this], !0), /^(drag|start|stop
vendor: 15,686 bytes, lines 5329-5554
5329)/.test(t) && (this.positionAbs = this._convertPositionTo("absolute"), i.offset = this.positionAbs), k.Widget.prototype._trigger.call(this, t, e, i)
5330        },
5331        plugins: {},
5332        _uiHash: function () {
5333            return {
5334                helper: this.helper,
5335                position: this.position,
5336                originalPosition: this.originalPosition,
5337                offset: this.positionAbs
5338            }
5339        }
5340    }), k.ui.plugin.add("draggable", "connectToSortable", {
5341        start: function (e, t, i) {
5342            var n = k.extend({}, t, {item: i.element});
5343            i.sortables = [], k(i.options.connectToSortable).each(function () {
5344                var t = k(this).sortable("instance");
5345                t && !t.options.disabled && (i.sortables.push(t), t.refreshPositions(), t._trigger("activate", e, n))
5346            })
5347        }, stop: function (e, t, i) {
5348            var n = k.extend({}, t, {item: i.element});
5349            i.cancelHelperRemoval = !1, k.each(i.sortables, function () {
5350                var t = this;
5351                t.isOver ? (t.isOver = 0, i.cancelHelperRemoval = !0, t.cancelHelperRemoval = !1, t._storedCSS = {
5352                    position: t.placeholder.css("position"),
5353                    top: t.placeholder.css("top"),
5354                    left: t.placeholder.css("left")
5355                }, t._mouseStop(e), t.options.helper = t.options._helper) : (t.cancelHelperRemoval = !0, t._trigger("deactivate", e, n))
5356            })
5357        }, drag: function (i, n, s) {
5358            k.each(s.sortables, function () {
5359                var t = !1, e = this;
5360                e.positionAbs = s.positionAbs, e.helperProportions = s.helperProportions, e.offset.click = s.offset.click, e._intersectsWith(e.containerCache) && (t = !0, k.each(s.sortables, function () {
5361                    return this.positionAbs = s.positionAbs, this.helperProportions = s.helperProportions, this.offset.click = s.offset.click, this !== e && this._intersectsWith(this.containerCache) && k.contains(e.element[0], this.element[0]) && (t = !1), t
5362                })), t ? (e.isOver || (e.isOver = 1, s._parent = n.helper.parent(), e.currentItem = n.helper.appendTo(e.element).data("ui-sortable-item", !0), e.options._helper = e.options.helper, e.options.helper = function () {
5363                    return n.helper[0]
5364                }, i.target = e.currentItem[0], e._mouseCapture(i, !0), e._mouseStart(i, !0, !0), e.offset.click.top = s.offset.click.top, e.offset.click.left = s.offset.click.left, e.offset.parent.left -= s.offset.parent.left - e.offset.parent.left, e.offset.parent.top -= s.offset.parent.top - e.offset.parent.top, s._trigger("toSortable", i), s.dropped = e.element, k.each(s.sortables, function () {
5365                    this.refreshPositions()
5366                }), s.currentItem = s.element, e.fromOutside = s), e.currentItem && (e._mouseDrag(i), n.position = e.position)) : e.isOver && (e.isOver = 0, e.cancelHelperRemoval = !0, e.options._revert = e.options.revert, e.options.revert = !1, e._trigger("out", i, e._uiHash(e)), e._mouseStop(i, !0), e.options.revert = e.options._revert, e.options.helper = e.options._helper, e.placeholder && e.placeholder.remove(), n.helper.appendTo(s._parent), s._refreshOffsets(i), n.position = s._generatePosition(i, !0), s._trigger("fromSortable", i), s.dropped = !1, k.each(s.sortables, function () {
5367                    this.refreshPositions()
5368                }))
5369            })
5370        }
5371    }), k.ui.plugin.add("draggable", "cursor", {
5372        start: function (t, e, i) {
5373            var n = k("body"), s = i.options;
5374            n.css("cursor") && (s._cursor = n.css("cursor")), n.css("cursor", s.cursor)
5375        }, stop: function (t, e, i) {
5376            var n = i.options;
5377            n._cursor && k("body").css("cursor", n._cursor)
5378        }
5379    }), k.ui.plugin.add("draggable", "opacity", {
5380        start: function (t, e, i) {
5381            var n = k(e.helper), s = i.options;
5382            n.css("opacity") && (s._opacity = n.css("opacity")), n.css("opacity", s.opacity)
5383        }, stop: function (t, e, i) {
5384            var n = i.options;
5385            n._opacity && k(e.helper).css("opacity", n._opacity)
5386        }
5387    }), k.ui.plugin.add("draggable", "scroll", {
5388        start: function (t, e, i) {
5389            i.scrollParentNotHidden || (i.scrollParentNotHidden = i.helper.scrollParent(!1)), i.scrollParentNotHidden[0] !== i.document[0] && "HTML" !== i.scrollParentNotHidden[0].tagName && (i.overflowOffset = i.scrollParentNotHidden.offset())
5390        }, drag: function (t, e, i) {
5391            var n = i.options, s = !1, o = i.scrollParentNotHidden[0], a = i.document[0];
5392            o !== a && "HTML" !== o.tagName ? (n.axis && "x" === n.axis || (i.overflowOffset.top + o.offsetHeight - t.pageY < n.scrollSensitivity ? o.scrollTop = s = o.scrollTop + n.scrollSpeed : t.pageY - i.overflowOffset.top < n.scrollSensitivity && (o.scrollTop = s = o.scrollTop - n.scrollSpeed)), n.axis && "y" === n.axis || (i.overflowOffset.left + o.offsetWidth - t.pageX < n.scrollSensitivity ? o.scrollLeft = s = o.scrollLeft + n.scrollSpeed : t.pageX - i.overflowOffset.left < n.scrollSensitivity && (o.scrollLeft = s = o.scrollLeft - n.scrollSpeed))) : (n.axis && "x" === n.axis || (t.pageY - k(a).scrollTop() < n.scrollSensitivity ? s = k(a).scrollTop(k(a).scrollTop() - n.scrollSpeed) : k(window).height() - (t.pageY - k(a).scrollTop()) < n.scrollSensitivity && (s = k(a).scrollTop(k(a).scrollTop() + n.scrollSpeed))), n.axis && "y" === n.axis || (t.pageX - k(a).scrollLeft() < n.scrollSensitivity ? s = k(a).scrollLeft(k(a).scrollLeft() - n.scrollSpeed) : k(window).width() - (t.pageX - k(a).scrollLeft()) < n.scrollSensitivity && (s = k(a).scrollLeft(k(a).scrollLeft() + n.scrollSpeed)))), !1 !== s && k.ui.ddmanager && !n.dropBehaviour && k.ui.ddmanager.prepareOffsets(i, t)
5393        }
5394    }), k.ui.plugin.add("draggable", "snap", {
5395        start: function (t, e, i) {
5396            var n = i.options;
5397            i.snapElements = [], k(n.snap.constructor !== String ? n.snap.items || ":data(ui-draggable)" : n.snap).each(function () {
5398                var t = k(this), e = t.offset();
5399                this !== i.element[0] && i.snapElements.push({
5400                    item: this,
5401                    width: t.outerWidth(),
5402                    height: t.outerHeight(),
5403                    top: e.top,
5404                    left: e.left
5405                })
5406            })
5407        }, drag: function (t, e, i) {
5408            var n, s, o, a, r, l, h, c, u, d, p = i.options, f = p.snapTolerance, m = e.offset.left,
5409                g = m + i.helperProportions.width, v = e.offset.top, y = v + i.helperProportions.height;
5410            for (u = i.snapElements.length - 1; 0 <= u; u--) l = (r = i.snapElements[u].left - i.margins.left) + i.snapElements[u].width, c = (h = i.snapElements[u].top - i.margins.top) + i.snapElements[u].height, g < r - f || l + f < m || y < h - f || c + f < v || !k.contains(i.snapElements[u].item.ownerDocument, i.snapElements[u].item) ? (i.snapElements[u].snapping && i.options.snap.release && i.options.snap.release.call(i.element, t, k.extend(i._uiHash(), {snapItem: i.snapElements[u].item})), i.snapElements[u].snapping = !1) : ("inner" !== p.snapMode && (n = f >= Math.abs(h - y), s = f >= Math.abs(c - v), o = f >= Math.abs(r - g), a = f >= Math.abs(l - m), n && (e.position.top = i._convertPositionTo("relative", {
5411                top: h - i.helperProportions.height,
5412                left: 0
5413            }).top), s && (e.position.top = i._convertPositionTo("relative", {
5414                top: c,
5415                left: 0
5416            }).top), o && (e.position.left = i._convertPositionTo("relative", {
5417                top: 0,
5418                left: r - i.helperProportions.width
5419            }).left), a && (e.position.left = i._convertPositionTo("relative", {
5420                top: 0,
5421                left: l
5422            }).left)), d = n || s || o || a, "outer" !== p.snapMode && (n = f >= Math.abs(h - v), s = f >= Math.abs(c - y), o = f >= Math.abs(r - m), a = f >= Math.abs(l - g), n && (e.position.top = i._convertPositionTo("relative", {
5423                top: h,
5424                left: 0
5425            }).top), s && (e.position.top = i._convertPositionTo("relative", {
5426                top: c - i.helperProportions.height,
5427                left: 0
5428            }).top), o && (e.position.left = i._convertPositionTo("relative", {
5429                top: 0,
5430                left: r
5431            }).left), a && (e.position.left = i._convertPositionTo("relative", {
5432                top: 0,
5433                left: l - i.helperProportions.width
5434            }).left)), !i.snapElements[u].snapping && (n || s || o || a || d) && i.options.snap.snap && i.options.snap.snap.call(i.element, t, k.extend(i._uiHash(), {snapItem: i.snapElements[u].item})), i.snapElements[u].snapping = n || s || o || a || d)
5435        }
5436    }), k.ui.plugin.add("draggable", "stack", {
5437        start: function (t, e, i) {
5438            var n, s = i.options, o = k.makeArray(k(s.stack)).sort(function (t, e) {
5439                return (parseInt(k(t).css("zIndex"), 10) || 0) - (parseInt(k(e).css("zIndex"), 10) || 0)
5440            });
5441            o.length && (n = parseInt(k(o[0]).css("zIndex"), 10) || 0, k(o).each(function (t) {
5442                k(this).css("zIndex", n + t)
5443            }), this.css("zIndex", n + o.length))
5444        }
5445    }), k.ui.plugin.add("draggable", "zIndex", {
5446        start: function (t, e, i) {
5447            var n = k(e.helper), s = i.options;
5448            n.css("zIndex") && (s._zIndex = n.css("zIndex")), n.css("zIndex", s.zIndex)
5449        }, stop: function (t, e, i) {
5450            var n = i.options;
5451            n._zIndex && k(e.helper).css("zIndex", n._zIndex)
5452        }
5453    }), k.ui.draggable, k.widget("ui.resizable", k.ui.mouse, {
5454        version: "1.12.1",
5455        widgetEventPrefix: "resize",
5456        options: {
5457            alsoResize: !1,
5458            animate: !1,
5459            animateDuration: "slow",
5460            animateEasing: "swing",
5461            aspectRatio: !1,
5462            autoHide: !1,
5463            classes: {"ui-resizable-se": "ui-icon ui-icon-gripsmall-diagonal-se"},
5464            containment: !1,
5465            ghost: !1,
5466            grid: !1,
5467            handles: "e,s,se",
5468            helper: !1,
5469            maxHeight: null,
5470            maxWidth: null,
5471            minHeight: 10,
5472            minWidth: 10,
5473            zIndex: 90,
5474            resize: null,
5475            start: null,
5476            stop: null
5477        },
5478        _num: function (t) {
5479            return parseFloat(t) || 0
5480        },
5481        _isNumber: function (t) {
5482            return !isNaN(parseFloat(t))
5483        },
5484        _hasScroll: function (t, e) {
5485            if ("hidden" === k(t).css("overflow")) return !1;
5486            var i = e && "left" === e ? "scrollLeft" : "scrollTop", n = !1;
5487            return 0 < t[i] || (t[i] = 1, n = 0 < t[i], t[i] = 0, n)
5488        },
5489        _create: function () {
5490            var t, e = this.options, i = this;
5491            this._addClass("ui-resizable"), k.extend(this, {
5492                _aspectRatio: !!e.aspectRatio,
5493                aspectRatio: e.aspectRatio,
5494                originalElement: this.element,
5495                _proportionallyResizeElements: [],
5496                _helper: e.helper || e.ghost || e.animate ? e.helper || "ui-resizable-helper" : null
5497            }), this.element[0].nodeName.match(/^(canvas|textarea|input|select|button|img)$/i) && (this.element.wrap(k("<div class='ui-wrapper' style='overflow: hidden;'></div>").css({
5498                position: this.element.css("position"),
5499                width: this.element.outerWidth(),
5500                height: this.element.outerHeight(),
5501                top: this.element.css("top"),
5502                left: this.element.css("left")
5503            })), this.element = this.element.parent().data("ui-resizable", this.element.resizable("instance")), this.elementIsWrapper = !0, t = {
5504                marginTop: this.originalElement.css("marginTop"),
5505                marginRight: this.originalElement.css("marginRight"),
5506                marginBottom: this.originalElement.css("marginBottom"),
5507                marginLeft: this.originalElement.css("marginLeft")
5508            }, this.element.css(t), this.originalElement.css("margin", 0), this.originalResizeStyle = this.originalElement.css("resize"), this.originalElement.css("resize", "none"), this._proportionallyResizeElements.push(this.originalElement.css({
5509                position: "static",
5510                zoom: 1,
5511                display: "block"
5512            })), this.originalElement.css(t), this._proportionallyResize()), this._setupHandles(), e.autoHide && k(this.element).on("mouseenter", function () {
5513                e.disabled || (i._removeClass("ui-resizable-autohide"), i._handles.show())
5514            }).on("mouseleave", function () {
5515                e.disabled || i.resizing || (i._addClass("ui-resizable-autohide"), i._handles.hide())
5516            }), this._mouseInit()
5517        },
5518        _destroy: function () {
5519            this._mouseDestroy();
5520
5521            function t(t) {
5522                k(t).removeData("resizable").removeData("ui-resizable").off(".resizable").find(".ui-resizable-handle").remove()
5523            }
5524
5525            var e;
5526            return this.elementIsWrapper && (t(this.element), e = this.element, this.originalElement.css({
5527                position: e.css("position"),
5528                width: e.outerWidth(),
5529                height: e.outerHeight(),
5530                top: e.css("top"),
5531                left: e.css("left")
5532            }).insertAfter(e), e.remove()), this.originalElement.css("resize", this.originalResizeStyle), t(this.originalElement), this
5533        },
5534        _setOption: function (t, e) {
5535            switch (this._super(t, e), t) {
5536                case"handles":
5537                    this._removeHandles(), this._setupHandles()
5538            }
5539        },
5540        _setupHandles: function () {
5541            var t, e, i, n, s, o = this.options, a = this;
5542            if (this.handles = o.handles || (k(".ui-resizable-handle", this.element).length ? {
5543                n: ".ui-resizable-n",
5544                e: ".ui-resizable-e",
5545                s: ".ui-resizable-s",
5546                w: ".ui-resizable-w",
5547                se: ".ui-resizable-se",
5548                sw: ".ui-resizable-sw",
5549                ne: ".ui-resizable-ne",
5550                nw: ".ui-resizable-nw"
5551            } : "e,s,se"), this._handles = k(), this.handles.constructor === String) for ("all" === this.handles && (this.handles = "n,e,s,w,se,sw,ne,nw"), i = this.handles.split(","), this.handles = {}, e = 0; i.length > e; e++) n = "ui-resizable-" + (t = k.trim(i[e])), s = k("<div>"), this._addClass(s, "ui-resizable-handle " + n), s.css({zIndex: o.zIndex}), this.handles[t] = ".ui-resizable-" + t, this.element.append(s);
5552            this._renderAxis = function (t) {
5553                var e, i, n, s;
5554                for (e in t = t || this.element, this.handles) this.handles[e].constructor === String ? this.handles[e] = this.element.children(this.handles[e]).first().show() : (this.handles[e].jquery || this.handles[e].nodeType) && (this.handles[e] = k(this.handles[e]), this._on(this.handles[e], {mousedown: a._mouseDown})), this.elementIsWrapper && this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i) && (i = k(this.handles[e], this.element), s = /sw|ne|nw|se|n|s/.test(e) ? i.outerHeight() : i.outerWidth(), n = ["padding", /ne|nw|n
vendor: 8,879 bytes, lines 5554-5652
5554/.test(e) ? "Top" : /se|sw|s/.test(e) ? "Bottom" : /^e$/.test(e) ? "Right" : "Left"].join(""), t.css(n, s), this._proportionallyResize()), this._handles = this._handles.add(this.handles[e])
5555            }, this._renderAxis(this.element), this._handles = this._handles.add(this.element.find(".ui-resizable-handle")), this._handles.disableSelection(), this._handles.on("mouseover", function () {
5556                a.resizing || (this.className && (s = this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)), a.axis = s && s[1] ? s[1] : "se")
5557            }), o.autoHide && (this._handles.hide(), this._addClass("ui-resizable-autohide"))
5558        },
5559        _removeHandles: function () {
5560            this._handles.remove()
5561        },
5562        _mouseCapture: function (t) {
5563            var e, i, n = !1;
5564            for (e in this.handles) (i = k(this.handles[e])[0]) !== t.target && !k.contains(i, t.target) || (n = !0);
5565            return !this.options.disabled && n
5566        },
5567        _mouseStart: function (t) {
5568            var e, i, n, s = this.options, o = this.element;
5569            return this.resizing = !0, this._renderProxy(), e = this._num(this.helper.css("left")), i = this._num(this.helper.css("top")), s.containment && (e += k(s.containment).scrollLeft() || 0, i += k(s.containment).scrollTop() || 0), this.offset = this.helper.offset(), this.position = {
5570                left: e,
5571                top: i
5572            }, this.size = this._helper ? {
5573                width: this.helper.width(),
5574                height: this.helper.height()
5575            } : {width: o.width(), height: o.height()}, this.originalSize = this._helper ? {
5576                width: o.outerWidth(),
5577                height: o.outerHeight()
5578            } : {width: o.width(), height: o.height()}, this.sizeDiff = {
5579                width: o.outerWidth() - o.width(),
5580                height: o.outerHeight() - o.height()
5581            }, this.originalPosition = {left: e, top: i}, this.originalMousePosition = {
5582                left: t.pageX,
5583                top: t.pageY
5584            }, this.aspectRatio = "number" == typeof s.aspectRatio ? s.aspectRatio : this.originalSize.width / this.originalSize.height || 1, n = k(".ui-resizable-" + this.axis).css("cursor"), k("body").css("cursor", "auto" === n ? this.axis + "-resize" : n), this._addClass("ui-resizable-resizing"), this._propagate("start", t), !0
5585        },
5586        _mouseDrag: function (t) {
5587            var e, i, n = this.originalMousePosition, s = this.axis, o = t.pageX - n.left || 0,
5588                a = t.pageY - n.top || 0, r = this._change[s];
5589            return this._updatePrevProperties(), r && (e = r.apply(this, [t, o, a]), this._updateVirtualBoundaries(t.shiftKey), (this._aspectRatio || t.shiftKey) && (e = this._updateRatio(e, t)), e = this._respectSize(e, t), this._updateCache(e), this._propagate("resize", t), i = this._applyChanges(), !this._helper && this._proportionallyResizeElements.length && this._proportionallyResize(), k.isEmptyObject(i) || (this._updatePrevProperties(), this._trigger("resize", t, this.ui()), this._applyChanges())), !1
5590        },
5591        _mouseStop: function (t) {
5592            this.resizing = !1;
5593            var e, i, n, s, o, a, r, l = this.options, h = this;
5594            return this._helper && (n = (i = (e = this._proportionallyResizeElements).length && /textarea/i.test(e[0].nodeName)) && this._hasScroll(e[0], "left") ? 0 : h.sizeDiff.height, s = i ? 0 : h.sizeDiff.width, o = {
5595                width: h.helper.width() - s,
5596                height: h.helper.height() - n
5597            }, a = parseFloat(h.element.css("left")) + (h.position.left - h.originalPosition.left) || null, r = parseFloat(h.element.css("top")) + (h.position.top - h.originalPosition.top) || null, l.animate || this.element.css(k.extend(o, {
5598                top: r,
5599                left: a
5600            })), h.helper.height(h.size.height), h.helper.width(h.size.width), this._helper && !l.animate && this._proportionallyResize()), k("body").css("cursor", "auto"), this._removeClass("ui-resizable-resizing"), this._propagate("stop", t), this._helper && this.helper.remove(), !1
5601        },
5602        _updatePrevProperties: function () {
5603            this.prevPosition = {
5604                top: this.position.top,
5605                left: this.position.left
5606            }, this.prevSize = {width: this.size.width, height: this.size.height}
5607        },
5608        _applyChanges: function () {
5609            var t = {};
5610            return this.position.top !== this.prevPosition.top && (t.top = this.position.top + "px"), this.position.left !== this.prevPosition.left && (t.left = this.position.left + "px"), this.size.width !== this.prevSize.width && (t.width = this.size.width + "px"), this.size.height !== this.prevSize.height && (t.height = this.size.height + "px"), this.helper.css(t), t
5611        },
5612        _updateVirtualBoundaries: function (t) {
5613            var e, i, n, s, o, a = this.options;
5614            o = {
5615                minWidth: this._isNumber(a.minWidth) ? a.minWidth : 0,
5616                maxWidth: this._isNumber(a.maxWidth) ? a.maxWidth : 1 / 0,
5617                minHeight: this._isNumber(a.minHeight) ? a.minHeight : 0,
5618                maxHeight: this._isNumber(a.maxHeight) ? a.maxHeight : 1 / 0
5619            }, (this._aspectRatio || t) && (e = o.minHeight * this.aspectRatio, n = o.minWidth / this.aspectRatio, i = o.maxHeight * this.aspectRatio, s = o.maxWidth / this.aspectRatio, e > o.minWidth && (o.minWidth = e), n > o.minHeight && (o.minHeight = n), o.maxWidth > i && (o.maxWidth = i), o.maxHeight > s && (o.maxHeight = s)), this._vBoundaries = o
5620        },
5621        _updateCache: function (t) {
5622            this.offset = this.helper.offset(), this._isNumber(t.left) && (this.position.left = t.left), this._isNumber(t.top) && (this.position.top = t.top), this._isNumber(t.height) && (this.size.height = t.height), this._isNumber(t.width) && (this.size.width = t.width)
5623        },
5624        _updateRatio: function (t) {
5625            var e = this.position, i = this.size, n = this.axis;
5626            return this._isNumber(t.height) ? t.width = t.height * this.aspectRatio : this._isNumber(t.width) && (t.height = t.width / this.aspectRatio), "sw" === n && (t.left = e.left + (i.width - t.width), t.top = null), "nw" === n && (t.top = e.top + (i.height - t.height), t.left = e.left + (i.width - t.width)), t
5627        },
5628        _respectSize: function (t) {
5629            var e = this._vBoundaries, i = this.axis, n = this._isNumber(t.width) && e.maxWidth && e.maxWidth < t.width,
5630                s = this._isNumber(t.height) && e.maxHeight && e.maxHeight < t.height,
5631                o = this._isNumber(t.width) && e.minWidth && e.minWidth > t.width,
5632                a = this._isNumber(t.height) && e.minHeight && e.minHeight > t.height,
5633                r = this.originalPosition.left + this.originalSize.width,
5634                l = this.originalPosition.top + this.originalSize.height, h = /sw|nw|w/.test(i), c = /nw|ne|n/.test(i);
5635            return o && (t.width = e.minWidth), a && (t.height = e.minHeight), n && (t.width = e.maxWidth), s && (t.height = e.maxHeight), o && h && (t.left = r - e.minWidth), n && h && (t.left = r - e.maxWidth), a && c && (t.top = l - e.minHeight), s && c && (t.top = l - e.maxHeight), t.width || t.height || t.left || !t.top ? t.width || t.height || t.top || !t.left || (t.left = null) : t.top = null, t
5636        },
5637        _getPaddingPlusBorderDimensions: function (t) {
5638            for (var e = 0, i = [], n = [t.css("borderTopWidth"), t.css("borderRightWidth"), t.css("borderBottomWidth"), t.css("borderLeftWidth")], s = [t.css("paddingTop"), t.css("paddingRight"), t.css("paddingBottom"), t.css("paddingLeft")]; e < 4; e++) i[e] = parseFloat(n[e]) || 0, i[e] += parseFloat(s[e]) || 0;
5639            return {height: i[0] + i[2], width: i[1] + i[3]}
5640        },
5641        _proportionallyResize: function () {
5642            if (this._proportionallyResizeElements.length) for (var t, e = 0, i = this.helper || this.element; this._proportionallyResizeElements.length > e; e++) t = this._proportionallyResizeElements[e], this.outerDimensions || (this.outerDimensions = this._getPaddingPlusBorderDimensions(t)), t.css({
5643                height: i.height() - this.outerDimensions.height || 0,
5644                width: i.width() - this.outerDimensions.width || 0
5645            })
5646        },
5647        _renderProxy: function () {
5648            var t = this.element, e = this.options;
5649            this.elementOffset = t.offset(), this._helper ? (this.helper = this.helper || k("<div style='overflow:hidden;'></div>"), this._addClass(this.helper, this._helper), this.helper.css({
5650                width: this.element.outerWidth(),
5651                height: this.element.outerHeight(),
5652                position: "absolute",
vendor: 4,283 bytes, lines 5653-5732
5653                left: this.elementOffset.left + "px",
5654                top: this.elementOffset.top + "px",
5655                zIndex: ++e.zIndex
5656            }), this.helper.appendTo("body").disableSelection()) : this.helper = this.element
5657        },
5658        _change: {
5659            e: function (t, e) {
5660                return {width: this.originalSize.width + e}
5661            }, w: function (t, e) {
5662                var i = this.originalSize;
5663                return {left: this.originalPosition.left + e, width: i.width - e}
5664            }, n: function (t, e, i) {
5665                var n = this.originalSize;
5666                return {top: this.originalPosition.top + i, height: n.height - i}
5667            }, s: function (t, e, i) {
5668                return {height: this.originalSize.height + i}
5669            }, se: function (t, e, i) {
5670                return k.extend(this._change.s.apply(this, arguments), this._change.e.apply(this, [t, e, i]))
5671            }, sw: function (t, e, i) {
5672                return k.extend(this._change.s.apply(this, arguments), this._change.w.apply(this, [t, e, i]))
5673            }, ne: function (t, e, i) {
5674                return k.extend(this._change.n.apply(this, arguments), this._change.e.apply(this, [t, e, i]))
5675            }, nw: function (t, e, i) {
5676                return k.extend(this._change.n.apply(this, arguments), this._change.w.apply(this, [t, e, i]))
5677            }
5678        },
5679        _propagate: function (t, e) {
5680            k.ui.plugin.call(this, t, [e, this.ui()]), "resize" !== t && this._trigger(t, e, this.ui())
5681        },
5682        plugins: {},
5683        ui: function () {
5684            return {
5685                originalElement: this.originalElement,
5686                element: this.element,
5687                helper: this.helper,
5688                position: this.position,
5689                size: this.size,
5690                originalSize: this.originalSize,
5691                originalPosition: this.originalPosition
5692            }
5693        }
5694    }), k.ui.plugin.add("resizable", "animate", {
5695        stop: function (e) {
5696            var i = k(this).resizable("instance"), t = i.options, n = i._proportionallyResizeElements,
5697                s = n.length && /textarea/i.test(n[0].nodeName),
5698                o = s && i._hasScroll(n[0], "left") ? 0 : i.sizeDiff.height, a = s ? 0 : i.sizeDiff.width,
5699                r = {width: i.size.width - a, height: i.size.height - o},
5700                l = parseFloat(i.element.css("left")) + (i.position.left - i.originalPosition.left) || null,
5701                h = parseFloat(i.element.css("top")) + (i.position.top - i.originalPosition.top) || null;
5702            i.element.animate(k.extend(r, h && l ? {top: h, left: l} : {}), {
5703                duration: t.animateDuration,
5704                easing: t.animateEasing,
5705                step: function () {
5706                    var t = {
5707                        width: parseFloat(i.element.css("width")),
5708                        height: parseFloat(i.element.css("height")),
5709                        top: parseFloat(i.element.css("top")),
5710                        left: parseFloat(i.element.css("left"))
5711                    };
5712                    n && n.length && k(n[0]).css({
5713                        width: t.width,
5714                        height: t.height
5715                    }), i._updateCache(t), i._propagate("resize", e)
5716                }
5717            })
5718        }
5719    }), k.ui.plugin.add("resizable", "containment", {
5720        start: function () {
5721            var i, n, t, e, s, o, a, r = k(this).resizable("instance"), l = r.options, h = r.element, c = l.containment,
5722                u = c instanceof k ? c.get(0) : /parent/.test(c) ? h.parent().get(0) : c;
5723            u && (r.containerElement = k(u), /document/.test(c) || c === document ? (r.containerOffset = {
5724                left: 0,
5725                top: 0
5726            }, r.containerPosition = {left: 0, top: 0}, r.parentData = {
5727                element: k(document),
5728                left: 0,
5729                top: 0,
5730                width: k(document).width(),
5731                height: k(document).height() || document.body.parentNode.scrollHeight
5732            }) : (i = k(u), n = [], k(["Top", "Right", "Left", "Bottom"]).each(function (t, e) {
vendor: 79,461 bytes, lines 5733-7002
5733                n[t] = r._num(i.css("padding" + e))
5734            }), r.containerOffset = i.offset(), r.containerPosition = i.position(), r.containerSize = {
5735                height: i.innerHeight() - n[3],
5736                width: i.innerWidth() - n[1]
5737            }, t = r.containerOffset, e = r.containerSize.height, s = r.containerSize.width, o = r._hasScroll(u, "left") ? u.scrollWidth : s, a = r._hasScroll(u) ? u.scrollHeight : e, r.parentData = {
5738                element: u,
5739                left: t.left,
5740                top: t.top,
5741                width: o,
5742                height: a
5743            }))
5744        }, resize: function (t) {
5745            var e, i, n, s, o = k(this).resizable("instance"), a = o.options, r = o.containerOffset, l = o.position,
5746                h = o._aspectRatio || t.shiftKey, c = {top: 0, left: 0}, u = o.containerElement, d = !0;
5747            u[0] !== document && /static/.test(u.css("position")) && (c = r), l.left < (o._helper ? r.left : 0) && (o.size.width = o.size.width + (o._helper ? o.position.left - r.left : o.position.left - c.left), h && (o.size.height = o.size.width / o.aspectRatio, d = !1), o.position.left = a.helper ? r.left : 0), l.top < (o._helper ? r.top : 0) && (o.size.height = o.size.height + (o._helper ? o.position.top - r.top : o.position.top), h && (o.size.width = o.size.height * o.aspectRatio, d = !1), o.position.top = o._helper ? r.top : 0), n = o.containerElement.get(0) === o.element.parent().get(0), s = /relative|absolute/.test(o.containerElement.css("position")), n && s ? (o.offset.left = o.parentData.left + o.position.left, o.offset.top = o.parentData.top + o.position.top) : (o.offset.left = o.element.offset().left, o.offset.top = o.element.offset().top), e = Math.abs(o.sizeDiff.width + (o._helper ? o.offset.left - c.left : o.offset.left - r.left)), i = Math.abs(o.sizeDiff.height + (o._helper ? o.offset.top - c.top : o.offset.top - r.top)), e + o.size.width >= o.parentData.width && (o.size.width = o.parentData.width - e, h && (o.size.height = o.size.width / o.aspectRatio, d = !1)), i + o.size.height >= o.parentData.height && (o.size.height = o.parentData.height - i, h && (o.size.width = o.size.height * o.aspectRatio, d = !1)), d || (o.position.left = o.prevPosition.left, o.position.top = o.prevPosition.top, o.size.width = o.prevSize.width, o.size.height = o.prevSize.height)
5748        }, stop: function () {
5749            var t = k(this).resizable("instance"), e = t.options, i = t.containerOffset, n = t.containerPosition,
5750                s = t.containerElement, o = k(t.helper), a = o.offset(), r = o.outerWidth() - t.sizeDiff.width,
5751                l = o.outerHeight() - t.sizeDiff.height;
5752            t._helper && !e.animate && /relative/.test(s.css("position")) && k(this).css({
5753                left: a.left - n.left - i.left,
5754                width: r,
5755                height: l
5756            }), t._helper && !e.animate && /static/.test(s.css("position")) && k(this).css({
5757                left: a.left - n.left - i.left,
5758                width: r,
5759                height: l
5760            })
5761        }
5762    }), k.ui.plugin.add("resizable", "alsoResize", {
5763        start: function () {
5764            var t = k(this).resizable("instance").options;
5765            k(t.alsoResize).each(function () {
5766                var t = k(this);
5767                t.data("ui-resizable-alsoresize", {
5768                    width: parseFloat(t.width()),
5769                    height: parseFloat(t.height()),
5770                    left: parseFloat(t.css("left")),
5771                    top: parseFloat(t.css("top"))
5772                })
5773            })
5774        }, resize: function (t, i) {
5775            var e = k(this).resizable("instance"), n = e.options, s = e.originalSize, o = e.originalPosition, a = {
5776                height: e.size.height - s.height || 0,
5777                width: e.size.width - s.width || 0,
5778                top: e.position.top - o.top || 0,
5779                left: e.position.left - o.left || 0
5780            };
5781            k(n.alsoResize).each(function () {
5782                var t = k(this), n = k(this).data("ui-resizable-alsoresize"), s = {},
5783                    e = t.parents(i.originalElement[0]).length ? ["width", "height"] : ["width", "height", "top", "left"];
5784                k.each(e, function (t, e) {
5785                    var i = (n[e] || 0) + (a[e] || 0);
5786                    i && 0 <= i && (s[e] = i || null)
5787                }), t.css(s)
5788            })
5789        }, stop: function () {
5790            k(this).removeData("ui-resizable-alsoresize")
5791        }
5792    }), k.ui.plugin.add("resizable", "ghost", {
5793        start: function () {
5794            var t = k(this).resizable("instance"), e = t.size;
5795            t.ghost = t.originalElement.clone(), t.ghost.css({
5796                opacity: .25,
5797                display: "block",
5798                position: "relative",
5799                height: e.height,
5800                width: e.width,
5801                margin: 0,
5802                left: 0,
5803                top: 0
5804            }), t._addClass(t.ghost, "ui-resizable-ghost"), !1 !== k.uiBackCompat && "string" == typeof t.options.ghost && t.ghost.addClass(this.options.ghost), t.ghost.appendTo(t.helper)
5805        }, resize: function () {
5806            var t = k(this).resizable("instance");
5807            t.ghost && t.ghost.css({position: "relative", height: t.size.height, width: t.size.width})
5808        }, stop: function () {
5809            var t = k(this).resizable("instance");
5810            t.ghost && t.helper && t.helper.get(0).removeChild(t.ghost.get(0))
5811        }
5812    }), k.ui.plugin.add("resizable", "grid", {
5813        resize: function () {
5814            var t, e = k(this).resizable("instance"), i = e.options, n = e.size, s = e.originalSize,
5815                o = e.originalPosition, a = e.axis, r = "number" == typeof i.grid ? [i.grid, i.grid] : i.grid,
5816                l = r[0] || 1, h = r[1] || 1, c = Math.round((n.width - s.width) / l) * l,
5817                u = Math.round((n.height - s.height) / h) * h, d = s.width + c, p = s.height + u,
5818                f = i.maxWidth && d > i.maxWidth, m = i.maxHeight && p > i.maxHeight, g = i.minWidth && i.minWidth > d,
5819                v = i.minHeight && i.minHeight > p;
5820            i.grid = r, g && (d += l), v && (p += h), f && (d -= l), m && (p -= h), /^(se|s|e)$/.test(a) ? (e.size.width = d, e.size.height = p) : /^(ne)$/.test(a) ? (e.size.width = d, e.size.height = p, e.position.top = o.top - u) : /^(sw)$/.test(a) ? (e.size.width = d, e.size.height = p, e.position.left = o.left - c) : ((p - h <= 0 || d - l <= 0) && (t = e._getPaddingPlusBorderDimensions(this)), 0 < p - h ? (e.size.height = p, e.position.top = o.top - u) : (p = h - t.height, e.size.height = p, e.position.top = o.top + s.height - p), 0 < d - l ? (e.size.width = d, e.position.left = o.left - c) : (d = l - t.width, e.size.width = d, e.position.left = o.left + s.width - d))
5821        }
5822    }), k.ui.resizable, k.widget("ui.dialog", {
5823        version: "1.12.1",
5824        options: {
5825            appendTo: "body",
5826            autoOpen: !0,
5827            buttons: [],
5828            classes: {"ui-dialog": "ui-corner-all", "ui-dialog-titlebar": "ui-corner-all"},
5829            closeOnEscape: !0,
5830            closeText: "Close",
5831            draggable: !0,
5832            hide: null,
5833            height: "auto",
5834            maxHeight: null,
5835            maxWidth: null,
5836            minHeight: 150,
5837            minWidth: 150,
5838            modal: !1,
5839            position: {
5840                my: "center", at: "center", of: window, collision: "fit", using: function (t) {
5841                    var e = k(this).css(t).offset().top;
5842                    e < 0 && k(this).css("top", t.top - e)
5843                }
5844            },
5845            resizable: !0,
5846            show: null,
5847            title: null,
5848            width: 300,
5849            beforeClose: null,
5850            close: null,
5851            drag: null,
5852            dragStart: null,
5853            dragStop: null,
5854            focus: null,
5855            open: null,
5856            resize: null,
5857            resizeStart: null,
5858            resizeStop: null
5859        },
5860        sizeRelatedOptions: {
5861            buttons: !0,
5862            height: !0,
5863            maxHeight: !0,
5864            maxWidth: !0,
5865            minHeight: !0,
5866            minWidth: !0,
5867            width: !0
5868        },
5869        resizableRelatedOptions: {maxHeight: !0, maxWidth: !0, minHeight: !0, minWidth: !0},
5870        _create: function () {
5871            this.originalCss = {
5872                display: this.element[0].style.display,
5873                width: this.element[0].style.width,
5874                minHeight: this.element[0].style.minHeight,
5875                maxHeight: this.element[0].style.maxHeight,
5876                height: this.element[0].style.height
5877            }, this.originalPosition = {
5878                parent: this.element.parent(),
5879                index: this.element.parent().children().index(this.element)
5880            }, 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 && k.fn.draggable && this._makeDraggable(), this.options.resizable && k.fn.resizable && this._makeResizable(), this._isOpen = !1, this._trackFocus()
5881        },
5882        _init: function () {
5883            this.options.autoOpen && this.open()
5884        },
5885        _appendTo: function () {
5886            var t = this.options.appendTo;
5887            return t && (t.jquery || t.nodeType) ? k(t) : this.document.find(t || "body").eq(0)
5888        },
5889        _destroy: function () {
5890            var t, e = this.originalPosition;
5891            this._untrackInstance(), this._destroyOverlay(), this.element.removeUniqueId().css(this.originalCss).detach(), this.uiDialog.remove(), this.originalTitle && this.element.attr("title", this.originalTitle), (t = e.parent.children().eq(e.index)).length && t[0] !== this.element[0] ? t.before(this.element) : e.parent.append(this.element)
5892        },
5893        widget: function () {
5894            return this.uiDialog
5895        },
5896        disable: k.noop,
5897        enable: k.noop,
5898        close: function (t) {
5899            var e = this;
5900            this._isOpen && !1 !== this._trigger("beforeClose", t) && (this._isOpen = !1, this._focusedElement = null, this._destroyOverlay(), this._untrackInstance(), this.opener.filter(":focusable").trigger("focus").length || k.ui.safeBlur(k.ui.safeActiveElement(this.document[0])), this._hide(this.uiDialog, this.options.hide, function () {
5901                e._trigger("close", t)
5902            }))
5903        },
5904        isOpen: function () {
5905            return this._isOpen
5906        },
5907        moveToTop: function () {
5908            this._moveToTop()
5909        },
5910        _moveToTop: function (t, e) {
5911            var i = !1, n = this.uiDialog.siblings(".ui-front:visible").map(function () {
5912                return +k(this).css("z-index")
5913            }).get(), s = Math.max.apply(null, n);
5914            return s >= +this.uiDialog.css("z-index") && (this.uiDialog.css("z-index", s + 1), i = !0), i && !e && this._trigger("focus", t), i
5915        },
5916        open: function () {
5917            var t = this;
5918            return this._isOpen ? void (this._moveToTop() && this._focusTabbable()) : (this._isOpen = !0, this.opener = k(k.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 () {
5919                t._focusTabbable(), t._trigger("focus")
5920            }), this._makeFocusTarget(), void this._trigger("open"))
5921        },
5922        _focusTabbable: function () {
5923            var t = this._focusedElement;
5924            (t = t || this.element.find("[autofocus]")).length || (t = this.element.find(":tabbable")), t.length || (t = this.uiDialogButtonPane.find(":tabbable")), t.length || (t = this.uiDialogTitlebarClose.filter(":tabbable")), t.length || (t = this.uiDialog), t.eq(0).trigger("focus")
5925        },
5926        _keepFocus: function (t) {
5927            function e() {
5928                var t = k.ui.safeActiveElement(this.document[0]);
5929                this.uiDialog[0] === t || k.contains(this.uiDialog[0], t) || this._focusTabbable()
5930            }
5931
5932            t.preventDefault(), e.call(this), this._delay(e)
5933        },
5934        _createWrapper: function () {
5935            this.uiDialog = k("<div>").hide().attr({
5936                tabIndex: -1,
5937                role: "dialog"
5938            }).appendTo(this._appendTo()), this._addClass(this.uiDialog, "ui-dialog", "ui-widget ui-widget-content ui-front"), this._on(this.uiDialog, {
5939                keydown: function (t) {
5940                    if (this.options.closeOnEscape && !t.isDefaultPrevented() && t.keyCode && t.keyCode === k.ui.keyCode.ESCAPE) return t.preventDefault(), void this.close(t);
5941                    if (t.keyCode === k.ui.keyCode.TAB && !t.isDefaultPrevented()) {
5942                        var e = this.uiDialog.find(":tabbable"), i = e.filter(":first"), n = e.filter(":last");
5943                        t.target !== n[0] && t.target !== this.uiDialog[0] || t.shiftKey ? t.target !== i[0] && t.target !== this.uiDialog[0] || !t.shiftKey || (this._delay(function () {
5944                            n.trigger("focus")
5945                        }), t.preventDefault()) : (this._delay(function () {
5946                            i.trigger("focus")
5947                        }), t.preventDefault())
5948                    }
5949                }, mousedown: function (t) {
5950                    this._moveToTop(t) && this._focusTabbable()
5951                }
5952            }), this.element.find("[aria-describedby]").length || this.uiDialog.attr({"aria-describedby": this.element.uniqueId().attr("id")})
5953        },
5954        _createTitlebar: function () {
5955            var t;
5956            this.uiDialogTitlebar = k("<div>"), this._addClass(this.uiDialogTitlebar, "ui-dialog-titlebar", "ui-widget-header ui-helper-clearfix"), this._on(this.uiDialogTitlebar, {
5957                mousedown: function (t) {
5958                    k(t.target).closest(".ui-dialog-titlebar-close") || this.uiDialog.trigger("focus")
5959                }
5960            }), this.uiDialogTitlebarClose = k("<button type='button'></button>").button({
5961                label: k("<a>").text(this.options.closeText).html(),
5962                icon: "ui-icon-closethick",
5963                showLabel: !1
5964            }).appendTo(this.uiDialogTitlebar), this._addClass(this.uiDialogTitlebarClose, "ui-dialog-titlebar-close"), this._on(this.uiDialogTitlebarClose, {
5965                click: function (t) {
5966                    t.preventDefault(), this.close(t)
5967                }
5968            }), t = k("<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")})
5969        },
5970        _title: function (t) {
5971            this.options.title ? t.text(this.options.title) : t.html("&#160;")
5972        },
5973        _createButtonPane: function () {
5974            this.uiDialogButtonPane = k("<div>"), this._addClass(this.uiDialogButtonPane, "ui-dialog-buttonpane", "ui-widget-content ui-helper-clearfix"), this.uiButtonSet = k("<div>").appendTo(this.uiDialogButtonPane), this._addClass(this.uiButtonSet, "ui-dialog-buttonset"), this._createButtons()
5975        },
5976        _createButtons: function () {
5977            var s = this, t = this.options.buttons;
5978            return this.uiDialogButtonPane.remove(), this.uiButtonSet.empty(), k.isEmptyObject(t) || k.isArray(t) && !t.length ? void this._removeClass(this.uiDialog, "ui-dialog-buttons") : (k.each(t, function (t, e) {
5979                var i, n;
5980                e = k.isFunction(e) ? {
5981                    click: e,
5982                    text: t
5983                } : e, e = k.extend({type: "button"}, e), i = e.click, n = {
5984                    icon: e.icon,
5985                    iconPosition: e.iconPosition,
5986                    showLabel: e.showLabel,
5987                    icons: e.icons,
5988                    text: e.text
5989                }, delete e.click, delete e.icon, delete e.iconPosition, delete e.showLabel, delete e.icons, "boolean" == typeof e.text && delete e.text, k("<button></button>", e).button(n).appendTo(s.uiButtonSet).on("click", function () {
5990                    i.apply(s.element[0], arguments)
5991                })
5992            }), this._addClass(this.uiDialog, "ui-dialog-buttons"), void this.uiDialogButtonPane.appendTo(this.uiDialog))
5993        },
5994        _makeDraggable: function () {
5995            function s(t) {
5996                return {position: t.position, offset: t.offset}
5997            }
5998
5999            var o = this, a = this.options;
6000            this.uiDialog.draggable({
6001                cancel: ".ui-dialog-content, .ui-dialog-titlebar-close",
6002                handle: ".ui-dialog-titlebar",
6003                containment: "document",
6004                start: function (t, e) {
6005                    o._addClass(k(this), "ui-dialog-dragging"), o._blockFrames(), o._trigger("dragStart", t, s(e))
6006                },
6007                drag: function (t, e) {
6008                    o._trigger("drag", t, s(e))
6009                },
6010                stop: function (t, e) {
6011                    var i = e.offset.left - o.document.scrollLeft(), n = e.offset.top - o.document.scrollTop();
6012                    a.position = {
6013                        my: "left top",
6014                        at: "left" + (0 <= i ? "+" : "") + i + " top" + (0 <= n ? "+" : "") + n,
6015                        of: o.window
6016                    }, o._removeClass(k(this), "ui-dialog-dragging"), o._unblockFrames(), o._trigger("dragStop", t, s(e))
6017                }
6018            })
6019        },
6020        _makeResizable: function () {
6021            function o(t) {
6022                return {
6023                    originalPosition: t.originalPosition,
6024                    originalSize: t.originalSize,
6025                    position: t.position,
6026                    size: t.size
6027                }
6028            }
6029
6030            var a = this, r = this.options, t = r.resizable, e = this.uiDialog.css("position"),
6031                i = "string" == typeof t ? t : "n,e,s,w,se,sw,ne,nw";
6032            this.uiDialog.resizable({
6033                cancel: ".ui-dialog-content",
6034                containment: "document",
6035                alsoResize: this.element,
6036                maxWidth: r.maxWidth,
6037                maxHeight: r.maxHeight,
6038                minWidth: r.minWidth,
6039                minHeight: this._minHeight(),
6040                handles: i,
6041                start: function (t, e) {
6042                    a._addClass(k(this), "ui-dialog-resizing"), a._blockFrames(), a._trigger("resizeStart", t, o(e))
6043                },
6044                resize: function (t, e) {
6045                    a._trigger("resize", t, o(e))
6046                },
6047                stop: function (t, e) {
6048                    var i = a.uiDialog.offset(), n = i.left - a.document.scrollLeft(),
6049                        s = i.top - a.document.scrollTop();
6050                    r.height = a.uiDialog.height(), r.width = a.uiDialog.width(), r.position = {
6051                        my: "left top",
6052                        at: "left" + (0 <= n ? "+" : "") + n + " top" + (0 <= s ? "+" : "") + s,
6053                        of: a.window
6054                    }, a._removeClass(k(this), "ui-dialog-resizing"), a._unblockFrames(), a._trigger("resizeStop", t, o(e))
6055                }
6056            }).css("position", e)
6057        },
6058        _trackFocus: function () {
6059            this._on(this.widget(), {
6060                focusin: function (t) {
6061                    this._makeFocusTarget(), this._focusedElement = k(t.target)
6062                }
6063            })
6064        },
6065        _makeFocusTarget: function () {
6066            this._untrackInstance(), this._trackingInstances().unshift(this)
6067        },
6068        _untrackInstance: function () {
6069            var t = this._trackingInstances(), e = k.inArray(this, t);
6070            -1 !== e && t.splice(e, 1)
6071        },
6072        _trackingInstances: function () {
6073            var t = this.document.data("ui-dialog-instances");
6074            return t || (t = [], this.document.data("ui-dialog-instances", t)), t
6075        },
6076        _minHeight: function () {
6077            var t = this.options;
6078            return "auto" === t.height ? t.minHeight : Math.min(t.minHeight, t.height)
6079        },
6080        _position: function () {
6081            var t = this.uiDialog.is(":visible");
6082            t || this.uiDialog.show(), this.uiDialog.position(this.options.position), t || this.uiDialog.hide()
6083        },
6084        _setOptions: function (t) {
6085            var i = this, n = !1, s = {};
6086            k.each(t, function (t, e) {
6087                i._setOption(t, e), t in i.sizeRelatedOptions && (n = !0), t in i.resizableRelatedOptions && (s[t] = e)
6088            }), n && (this._size(), this._position()), this.uiDialog.is(":data(ui-resizable)") && this.uiDialog.resizable("option", s)
6089        },
6090        _setOption: function (t, e) {
6091            var i, n, s = this.uiDialog;
6092            "disabled" !== t && (this._super(t, e), "appendTo" === t && this.uiDialog.appendTo(this._appendTo()), "buttons" === t && this._createButtons(), "closeText" === t && this.uiDialogTitlebarClose.button({label: k("<a>").text("" + this.options.closeText).html()}), "draggable" === t && ((i = s.is(":data(ui-draggable)")) && !e && s.draggable("destroy"), !i && e && this._makeDraggable()), "position" === t && this._position(), "resizable" === t && ((n = s.is(":data(ui-resizable)")) && !e && s.resizable("destroy"), n && "string" == typeof e && s.resizable("option", "handles", e), n || !1 === e || this._makeResizable()), "title" === t && this._title(this.uiDialogTitlebar.find(".ui-dialog-title")))
6093        },
6094        _size: function () {
6095            var t, e, i, n = this.options;
6096            this.element.show().css({
6097                width: "auto",
6098                minHeight: 0,
6099                maxHeight: "none",
6100                height: 0
6101            }), n.minWidth > n.width && (n.width = n.minWidth), t = this.uiDialog.css({
6102                height: "auto",
6103                width: n.width
6104            }).outerHeight(), e = Math.max(0, n.minHeight - t), i = "number" == typeof n.maxHeight ? Math.max(0, n.maxHeight - t) : "none", "auto" === n.height ? this.element.css({
6105                minHeight: e,
6106                maxHeight: i,
6107                height: "auto"
6108            }) : this.element.height(Math.max(0, n.height - t)), this.uiDialog.is(":data(ui-resizable)") && this.uiDialog.resizable("option", "minHeight", this._minHeight())
6109        },
6110        _blockFrames: function () {
6111            this.iframeBlocks = this.document.find("iframe").map(function () {
6112                var t = k(this);
6113                return k("<div>").css({
6114                    position: "absolute",
6115                    width: t.outerWidth(),
6116                    height: t.outerHeight()
6117                }).appendTo(t.parent()).offset(t.offset())[0]
6118            })
6119        },
6120        _unblockFrames: function () {
6121            this.iframeBlocks && (this.iframeBlocks.remove(), delete this.iframeBlocks)
6122        },
6123        _allowInteraction: function (t) {
6124            return !!k(t.target).closest(".ui-dialog").length || !!k(t.target).closest(".ui-datepicker").length
6125        },
6126        _createOverlay: function () {
6127            if (this.options.modal) {
6128                var e = !0;
6129                this._delay(function () {
6130                    e = !1
6131                }), this.document.data("ui-dialog-overlays") || this._on(this.document, {
6132                    focusin: function (t) {
6133                        e || this._allowInteraction(t) || (t.preventDefault(), this._trackingInstances()[0]._focusTabbable())
6134                    }
6135                }), this.overlay = k("<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)
6136            }
6137        },
6138        _destroyOverlay: function () {
6139            if (this.options.modal && this.overlay) {
6140                var t = this.document.data("ui-dialog-overlays") - 1;
6141                t ? this.document.data("ui-dialog-overlays", t) : (this._off(this.document, "focusin"), this.document.removeData("ui-dialog-overlays")), this.overlay.remove(), this.overlay = null
6142            }
6143        }
6144    }), !1 !== k.uiBackCompat && k.widget("ui.dialog", k.ui.dialog, {
6145        options: {dialogClass: ""},
6146        _createWrapper: function () {
6147            this._super(), this.uiDialog.addClass(this.options.dialogClass)
6148        },
6149        _setOption: function (t, e) {
6150            "dialogClass" === t && this.uiDialog.removeClass(this.options.dialogClass).addClass(e), this._superApply(arguments)
6151        }
6152    }), k.ui.dialog, k.widget("ui.droppable", {
6153        version: "1.12.1",
6154        widgetEventPrefix: "drop",
6155        options: {
6156            accept: "*",
6157            addClasses: !0,
6158            greedy: !1,
6159            scope: "default",
6160            tolerance: "intersect",
6161            activate: null,
6162            deactivate: null,
6163            drop: null,
6164            out: null,
6165            over: null
6166        },
6167        _create: function () {
6168            var t, e = this.options, i = e.accept;
6169            this.isover = !1, this.isout = !0, this.accept = k.isFunction(i) ? i : function (t) {
6170                return t.is(i)
6171            }, this.proportions = function () {
6172                return arguments.length ? void (t = arguments[0]) : t || (t = {
6173                    width: this.element[0].offsetWidth,
6174                    height: this.element[0].offsetHeight
6175                })
6176            }, this._addToManager(e.scope), e.addClasses && this._addClass("ui-droppable")
6177        },
6178        _addToManager: function (t) {
6179            k.ui.ddmanager.droppables[t] = k.ui.ddmanager.droppables[t] || [], k.ui.ddmanager.droppables[t].push(this)
6180        },
6181        _splice: function (t) {
6182            for (var e = 0; t.length > e; e++) t[e] === this && t.splice(e, 1)
6183        },
6184        _destroy: function () {
6185            var t = k.ui.ddmanager.droppables[this.options.scope];
6186            this._splice(t)
6187        },
6188        _setOption: function (t, e) {
6189            if ("accept" === t) this.accept = k.isFunction(e) ? e : function (t) {
6190                return t.is(e)
6191            }; else if ("scope" === t) {
6192                var i = k.ui.ddmanager.droppables[this.options.scope];
6193                this._splice(i), this._addToManager(e)
6194            }
6195            this._super(t, e)
6196        },
6197        _activate: function (t) {
6198            var e = k.ui.ddmanager.current;
6199            this._addActiveClass(), e && this._trigger("activate", t, this.ui(e))
6200        },
6201        _deactivate: function (t) {
6202            var e = k.ui.ddmanager.current;
6203            this._removeActiveClass(), e && this._trigger("deactivate", t, this.ui(e))
6204        },
6205        _over: function (t) {
6206            var e = k.ui.ddmanager.current;
6207            e && (e.currentItem || e.element)[0] !== this.element[0] && this.accept.call(this.element[0], e.currentItem || e.element) && (this._addHoverClass(), this._trigger("over", t, this.ui(e)))
6208        },
6209        _out: function (t) {
6210            var e = k.ui.ddmanager.current;
6211            e && (e.currentItem || e.element)[0] !== this.element[0] && this.accept.call(this.element[0], e.currentItem || e.element) && (this._removeHoverClass(), this._trigger("out", t, this.ui(e)))
6212        },
6213        _drop: function (e, t) {
6214            var i = t || k.ui.ddmanager.current, n = !1;
6215            return !(!i || (i.currentItem || i.element)[0] === this.element[0]) && (this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function () {
6216                var t = k(this).droppable("instance");
6217                return t.options.greedy && !t.options.disabled && t.options.scope === i.options.scope && t.accept.call(t.element[0], i.currentItem || i.element) && at(i, k.extend(t, {offset: t.element.offset()}), t.options.tolerance, e) ? !(n = !0) : void 0
6218            }), !n && (!!this.accept.call(this.element[0], i.currentItem || i.element) && (this._removeActiveClass(), this._removeHoverClass(), this._trigger("drop", e, this.ui(i)), this.element)))
6219        },
6220        ui: function (t) {
6221            return {
6222                draggable: t.currentItem || t.element,
6223                helper: t.helper,
6224                position: t.position,
6225                offset: t.positionAbs
6226            }
6227        },
6228        _addHoverClass: function () {
6229            this._addClass("ui-droppable-hover")
6230        },
6231        _removeHoverClass: function () {
6232            this._removeClass("ui-droppable-hover")
6233        },
6234        _addActiveClass: function () {
6235            this._addClass("ui-droppable-active")
6236        },
6237        _removeActiveClass: function () {
6238            this._removeClass("ui-droppable-active")
6239        }
6240    });
6241    var ot, at = k.ui.intersect = function (t, e, i, n) {
6242        if (!e.offset) return !1;
6243        var s = (t.positionAbs || t.position.absolute).left + t.margins.left,
6244            o = (t.positionAbs || t.position.absolute).top + t.margins.top, a = s + t.helperProportions.width,
6245            r = o + t.helperProportions.height, l = e.offset.left, h = e.offset.top, c = l + e.proportions().width,
6246            u = h + e.proportions().height;
6247        switch (i) {
6248            case"fit":
6249                return l <= s && a <= c && h <= o && r <= u;
6250            case"intersect":
6251                return s + t.helperProportions.width / 2 > l && c > a - t.helperProportions.width / 2 && o + t.helperProportions.height / 2 > h && u > r - t.helperProportions.height / 2;
6252            case"pointer":
6253                return rt(n.pageY, h, e.proportions().height) && rt(n.pageX, l, e.proportions().width);
6254            case"touch":
6255                return (h <= o && o <= u || h <= r && r <= u || o < h && u < r) && (l <= s && s <= c || l <= a && a <= c || s < l && c < a);
6256            default:
6257                return !1
6258        }
6259    };
6260
6261    function rt(t, e, i) {
6262        return e <= t && t < e + i
6263    }
6264
6265    !(k.ui.ddmanager = {
6266        current: null, droppables: {default: []}, prepareOffsets: function (t, e) {
6267            var i, n, s = k.ui.ddmanager.droppables[t.options.scope] || [], o = e ? e.type : null,
6268                a = (t.currentItem || t.element).find(":data(ui-droppable)").addBack();
6269            t:for (i = 0; s.length > i; i++) if (!(s[i].options.disabled || t && !s[i].accept.call(s[i].element[0], t.currentItem || t.element))) {
6270                for (n = 0; a.length > n; n++) if (a[n] === s[i].element[0]) {
6271                    s[i].proportions().height = 0;
6272                    continue t
6273                }
6274                s[i].visible = "none" !== s[i].element.css("display"), s[i].visible && ("mousedown" === o && s[i]._activate.call(s[i], e), s[i].offset = s[i].element.offset(), s[i].proportions({
6275                    width: s[i].element[0].offsetWidth,
6276                    height: s[i].element[0].offsetHeight
6277                }))
6278            }
6279        }, drop: function (t, e) {
6280            var i = !1;
6281            return k.each((k.ui.ddmanager.droppables[t.options.scope] || []).slice(), function () {
6282                this.options && (!this.options.disabled && this.visible && at(t, this, this.options.tolerance, e) && (i = this._drop.call(this, e) || i), !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, e)))
6283            }), i
6284        }, dragStart: function (t, e) {
6285            t.element.parentsUntil("body").on("scroll.droppable", function () {
6286                t.options.refreshPositions || k.ui.ddmanager.prepareOffsets(t, e)
6287            })
6288        }, drag: function (o, a) {
6289            o.options.refreshPositions && k.ui.ddmanager.prepareOffsets(o, a), k.each(k.ui.ddmanager.droppables[o.options.scope] || [], function () {
6290                if (!this.options.disabled && !this.greedyChild && this.visible) {
6291                    var t, e, i, n = at(o, this, this.options.tolerance, a),
6292                        s = !n && this.isover ? "isout" : n && !this.isover ? "isover" : null;
6293                    s && (this.options.greedy && (e = this.options.scope, (i = this.element.parents(":data(ui-droppable)").filter(function () {
6294                        return k(this).droppable("instance").options.scope === e
6295                    })).length && ((t = k(i[0]).droppable("instance")).greedyChild = "isover" === s)), t && "isover" === s && (t.isover = !1, t.isout = !0, t._out.call(t, a)), this[s] = !0, this["isout" === s ? "isover" : "isout"] = !1, this["isover" === s ? "_over" : "_out"].call(this, a), t && "isout" === s && (t.isout = !1, t.isover = !0, t._over.call(t, a)))
6296                }
6297            })
6298        }, dragStop: function (t, e) {
6299            t.element.parentsUntil("body").off("scroll.droppable"), t.options.refreshPositions || k.ui.ddmanager.prepareOffsets(t, e)
6300        }
6301    }) !== k.uiBackCompat && k.widget("ui.droppable", k.ui.droppable, {
6302        options: {hoverClass: !1, activeClass: !1},
6303        _addActiveClass: function () {
6304            this._super(), this.options.activeClass && this.element.addClass(this.options.activeClass)
6305        },
6306        _removeActiveClass: function () {
6307            this._super(), this.options.activeClass && this.element.removeClass(this.options.activeClass)
6308        },
6309        _addHoverClass: function () {
6310            this._super(), this.options.hoverClass && this.element.addClass(this.options.hoverClass)
6311        },
6312        _removeHoverClass: function () {
6313            this._super(), this.options.hoverClass && this.element.removeClass(this.options.hoverClass)
6314        }
6315    }), k.ui.droppable, k.widget("ui.progressbar", {
6316        version: "1.12.1",
6317        options: {
6318            classes: {
6319                "ui-progressbar": "ui-corner-all",
6320                "ui-progressbar-value": "ui-corner-left",
6321                "ui-progressbar-complete": "ui-corner-right"
6322            }, max: 100, value: 0, change: null, complete: null
6323        },
6324        min: 0,
6325        _create: function () {
6326            this.oldValue = this.options.value = this._constrainedValue(), this.element.attr({
6327                role: "progressbar",
6328                "aria-valuemin": this.min
6329            }), this._addClass("ui-progressbar", "ui-widget ui-widget-content"), this.valueDiv = k("<div>").appendTo(this.element), this._addClass(this.valueDiv, "ui-progressbar-value", "ui-widget-header"), this._refreshValue()
6330        },
6331        _destroy: function () {
6332            this.element.removeAttr("role aria-valuemin aria-valuemax aria-valuenow"), this.valueDiv.remove()
6333        },
6334        value: function (t) {
6335            return void 0 === t ? this.options.value : (this.options.value = this._constrainedValue(t), void this._refreshValue())
6336        },
6337        _constrainedValue: function (t) {
6338            return void 0 === t && (t = this.options.value), this.indeterminate = !1 === t, "number" != typeof t && (t = 0), !this.indeterminate && Math.min(this.options.max, Math.max(this.min, t))
6339        },
6340        _setOptions: function (t) {
6341            var e = t.value;
6342            delete t.value, this._super(t), this.options.value = this._constrainedValue(e), this._refreshValue()
6343        },
6344        _setOption: function (t, e) {
6345            "max" === t && (e = Math.max(this.min, e)), this._super(t, e)
6346        },
6347        _setOptionDisabled: function (t) {
6348            this._super(t), this.element.attr("aria-disabled", t), this._toggleClass(null, "ui-state-disabled", !!t)
6349        },
6350        _percentage: function () {
6351            return this.indeterminate ? 100 : 100 * (this.options.value - this.min) / (this.options.max - this.min)
6352        },
6353        _refreshValue: function () {
6354            var t = this.options.value, e = this._percentage();
6355            this.valueDiv.toggle(this.indeterminate || t > this.min).width(e.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 = k("<div>").appendTo(this.valueDiv), this._addClass(this.overlayDiv, "ui-progressbar-overlay"))) : (this.element.attr({
6356                "aria-valuemax": this.options.max,
6357                "aria-valuenow": t
6358            }), this.overlayDiv && (this.overlayDiv.remove(), this.overlayDiv = null)), this.oldValue !== t && (this.oldValue = t, this._trigger("change")), t === this.options.max && this._trigger("complete")
6359        }
6360    }), k.widget("ui.selectable", k.ui.mouse, {
6361        version: "1.12.1",
6362        options: {
6363            appendTo: "body",
6364            autoRefresh: !0,
6365            distance: 0,
6366            filter: "*",
6367            tolerance: "touch",
6368            selected: null,
6369            selecting: null,
6370            start: null,
6371            stop: null,
6372            unselected: null,
6373            unselecting: null
6374        },
6375        _create: function () {
6376            var n = this;
6377            this._addClass("ui-selectable"), this.dragged = !1, this.refresh = function () {
6378                n.elementPos = k(n.element[0]).offset(), n.selectees = k(n.options.filter, n.element[0]), n._addClass(n.selectees, "ui-selectee"), n.selectees.each(function () {
6379                    var t = k(this), e = t.offset(),
6380                        i = {left: e.left - n.elementPos.left, top: e.top - n.elementPos.top};
6381                    k.data(this, "selectable-item", {
6382                        element: this,
6383                        $element: t,
6384                        left: i.left,
6385                        top: i.top,
6386                        right: i.left + t.outerWidth(),
6387                        bottom: i.top + t.outerHeight(),
6388                        startselected: !1,
6389                        selected: t.hasClass("ui-selected"),
6390                        selecting: t.hasClass("ui-selecting"),
6391                        unselecting: t.hasClass("ui-unselecting")
6392                    })
6393                })
6394            }, this.refresh(), this._mouseInit(), this.helper = k("<div>"), this._addClass(this.helper, "ui-selectable-helper")
6395        },
6396        _destroy: function () {
6397            this.selectees.removeData("selectable-item"), this._mouseDestroy()
6398        },
6399        _mouseStart: function (i) {
6400            var n = this, t = this.options;
6401            this.opos = [i.pageX, i.pageY], this.elementPos = k(this.element[0]).offset(), this.options.disabled || (this.selectees = k(t.filter, this.element[0]), this._trigger("start", i), k(t.appendTo).append(this.helper), this.helper.css({
6402                left: i.pageX,
6403                top: i.pageY,
6404                width: 0,
6405                height: 0
6406            }), t.autoRefresh && this.refresh(), this.selectees.filter(".ui-selected").each(function () {
6407                var t = k.data(this, "selectable-item");
6408                t.startselected = !0, i.metaKey || i.ctrlKey || (n._removeClass(t.$element, "ui-selected"), t.selected = !1, n._addClass(t.$element, "ui-unselecting"), t.unselecting = !0, n._trigger("unselecting", i, {unselecting: t.element}))
6409            }), k(i.target).parents().addBack().each(function () {
6410                var t, e = k.data(this, "selectable-item");
6411                return e ? (t = !i.metaKey && !i.ctrlKey || !e.$element.hasClass("ui-selected"), n._removeClass(e.$element, t ? "ui-unselecting" : "ui-selected")._addClass(e.$element, t ? "ui-selecting" : "ui-unselecting"), e.unselecting = !t, e.selecting = t, (e.selected = t) ? n._trigger("selecting", i, {selecting: e.element}) : n._trigger("unselecting", i, {unselecting: e.element}), !1) : void 0
6412            }))
6413        },
6414        _mouseDrag: function (n) {
6415            if (this.dragged = !0, !this.options.disabled) {
6416                var t, s = this, o = this.options, a = this.opos[0], r = this.opos[1], l = n.pageX, h = n.pageY;
6417                return l < a && (t = l, l = a, a = t), h < r && (t = h, h = r, r = t), this.helper.css({
6418                    left: a,
6419                    top: r,
6420                    width: l - a,
6421                    height: h - r
6422                }), this.selectees.each(function () {
6423                    var t = k.data(this, "selectable-item"), e = !1, i = {};
6424                    t && t.element !== s.element[0] && (i.left = t.left + s.elementPos.left, i.right = t.right + s.elementPos.left, i.top = t.top + s.elementPos.top, i.bottom = t.bottom + s.elementPos.top, "touch" === o.tolerance ? e = !(i.left > l || a > i.right || i.top > h || r > i.bottom) : "fit" === o.tolerance && (e = i.left > a && l > i.right && i.top > r && h > i.bottom), e ? (t.selected && (s._removeClass(t.$element, "ui-selected"), t.selected = !1), t.unselecting && (s._removeClass(t.$element, "ui-unselecting"), t.unselecting = !1), t.selecting || (s._addClass(t.$element, "ui-selecting"), t.selecting = !0, s._trigger("selecting", n, {selecting: t.element}))) : (t.selecting && ((n.metaKey || n.ctrlKey) && t.startselected ? (s._removeClass(t.$element, "ui-selecting"), t.selecting = !1, s._addClass(t.$element, "ui-selected"), t.selected = !0) : (s._removeClass(t.$element, "ui-selecting"), t.selecting = !1, t.startselected && (s._addClass(t.$element, "ui-unselecting"), t.unselecting = !0), s._trigger("unselecting", n, {unselecting: t.element}))), t.selected && (n.metaKey || n.ctrlKey || t.startselected || (s._removeClass(t.$element, "ui-selected"), t.selected = !1, s._addClass(t.$element, "ui-unselecting"), t.unselecting = !0, s._trigger("unselecting", n, {unselecting: t.element})))))
6425                }), !1
6426            }
6427        },
6428        _mouseStop: function (e) {
6429            var i = this;
6430            return this.dragged = !1, k(".ui-unselecting", this.element[0]).each(function () {
6431                var t = k.data(this, "selectable-item");
6432                i._removeClass(t.$element, "ui-unselecting"), t.unselecting = !1, t.startselected = !1, i._trigger("unselected", e, {unselected: t.element})
6433            }), k(".ui-selecting", this.element[0]).each(function () {
6434                var t = k.data(this, "selectable-item");
6435                i._removeClass(t.$element, "ui-selecting")._addClass(t.$element, "ui-selected"), t.selecting = !1, t.selected = !0, t.startselected = !0, i._trigger("selected", e, {selected: t.element})
6436            }), this._trigger("stop", e), this.helper.remove(), !1
6437        }
6438    }), k.widget("ui.selectmenu", [k.ui.formResetMixin, {
6439        version: "1.12.1",
6440        defaultElement: "<select>",
6441        options: {
6442            appendTo: null,
6443            classes: {"ui-selectmenu-button-open": "ui-corner-top", "ui-selectmenu-button-closed": "ui-corner-all"},
6444            disabled: null,
6445            icons: {button: "ui-icon-triangle-1-s"},
6446            position: {my: "left top", at: "left bottom", collision: "none"},
6447            width: !1,
6448            change: null,
6449            close: null,
6450            focus: null,
6451            open: null,
6452            select: null
6453        },
6454        _create: function () {
6455            var t = this.element.uniqueId().attr("id");
6456            this.ids = {
6457                element: t,
6458                button: t + "-button",
6459                menu: t + "-menu"
6460            }, this._drawButton(), this._drawMenu(), this._bindFormResetHandler(), this._rendered = !1, this.menuItems = k()
6461        },
6462        _drawButton: function () {
6463            var t, e = this, i = this._parseOption(this.element.find("option:selected"), this.element[0].selectedIndex);
6464            this.labels = this.element.labels().attr("for", this.ids.button), this._on(this.labels, {
6465                click: function (t) {
6466                    this.button.focus(), t.preventDefault()
6467                }
6468            }), this.element.hide(), this.button = k("<span>", {
6469                tabindex: this.options.disabled ? -1 : 0,
6470                id: this.ids.button,
6471                role: "combobox",
6472                "aria-expanded": "false",
6473                "aria-autocomplete": "list",
6474                "aria-owns": this.ids.menu,
6475                "aria-haspopup": "true",
6476                title: this.element.attr("title")
6477            }).insertAfter(this.element), this._addClass(this.button, "ui-selectmenu-button ui-selectmenu-button-closed", "ui-button ui-widget"), t = k("<span>").appendTo(this.button), this._addClass(t, "ui-selectmenu-icon", "ui-icon " + this.options.icons.button), this.buttonItem = this._renderButtonItem(i).appendTo(this.button), !1 !== this.options.width && this._resizeButton(), this._on(this.button, this._buttonEvents), this.button.one("focusin", function () {
6478                e._rendered || e._refreshMenu()
6479            })
6480        },
6481        _drawMenu: function () {
6482            var n = this;
6483            this.menu = k("<ul>", {
6484                "aria-hidden": "true",
6485                "aria-labelledby": this.ids.button,
6486                id: this.ids.menu
6487            }), this.menuWrap = k("<div>").append(this.menu), this._addClass(this.menuWrap, "ui-selectmenu-menu", "ui-front"), this.menuWrap.appendTo(this._appendTo()), this.menuInstance = this.menu.menu({
6488                classes: {"ui-menu": "ui-corner-bottom"},
6489                role: "listbox",
6490                select: function (t, e) {
6491                    t.preventDefault(), n._setSelection(), n._select(e.item.data("ui-selectmenu-item"), t)
6492                },
6493                focus: function (t, e) {
6494                    var i = e.item.data("ui-selectmenu-item");
6495                    null != n.focusIndex && i.index !== n.focusIndex && (n._trigger("focus", t, {item: i}), n.isOpen || n._select(i, t)), n.focusIndex = i.index, n.button.attr("aria-activedescendant", n.menuItems.eq(i.index).attr("id"))
6496                }
6497            }).menu("instance"), this.menuInstance._off(this.menu, "mouseleave"), this.menuInstance._closeOnDocumentClick = function () {
6498                return !1
6499            }, this.menuInstance._isDivider = function () {
6500                return !1
6501            }
6502        },
6503        refresh: function () {
6504            this._refreshMenu(), this.buttonItem.replaceWith(this.buttonItem = this._renderButtonItem(this._getSelectedItem().data("ui-selectmenu-item") || {})), null === this.options.width && this._resizeButton()
6505        },
6506        _refreshMenu: function () {
6507            var t, e = this.element.find("option");
6508            this.menu.empty(), this._parseOptions(e), 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, e.length && (t = this._getSelectedItem(), this.menuInstance.focus(null, t), this._setAria(t.data("ui-selectmenu-item")), this._setOption("disabled", this.element.prop("disabled")))
6509        },
6510        open: function (t) {
6511            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", t)))
6512        },
6513        _position: function () {
6514            this.menuWrap.position(k.extend({of: this.button}, this.options.position))
6515        },
6516        close: function (t) {
6517            this.isOpen && (this.isOpen = !1, this._toggleAttr(), this.range = null, this._off(this.document), this._trigger("close", t))
6518        },
6519        widget: function () {
6520            return this.button
6521        },
6522        menuWidget: function () {
6523            return this.menu
6524        },
6525        _renderButtonItem: function (t) {
6526            var e = k("<span>");
6527            return this._setText(e, t.label), this._addClass(e, "ui-selectmenu-text"), e
6528        },
6529        _renderMenu: function (n, t) {
6530            var s = this, o = "";
6531            k.each(t, function (t, e) {
6532                var i;
6533                e.optgroup !== o && (i = k("<li>", {text: e.optgroup}), s._addClass(i, "ui-selectmenu-optgroup", "ui-menu-divider" + (e.element.parent("optgroup").prop("disabled") ? " ui-state-disabled" : "")), i.appendTo(n), o = e.optgroup), s._renderItemData(n, e)
6534            })
6535        },
6536        _renderItemData: function (t, e) {
6537            return this._renderItem(t, e).data("ui-selectmenu-item", e)
6538        },
6539        _renderItem: function (t, e) {
6540            var i = k("<li>"), n = k("<div>", {title: e.element.attr("title")});
6541            return e.disabled && this._addClass(i, null, "ui-state-disabled"), this._setText(n, e.label), i.append(n).appendTo(t)
6542        },
6543        _setText: function (t, e) {
6544            e ? t.text(e) : t.html("&#160;")
6545        },
6546        _move: function (t, e) {
6547            var i, n, s = ".ui-menu-item";
6548            this.isOpen ? i = this.menuItems.eq(this.focusIndex).parent("li") : (i = this.menuItems.eq(this.element[0].selectedIndex).parent("li"), s += ":not(.ui-state-disabled)"), (n = "first" === t || "last" === t ? i["first" === t ? "prevAll" : "nextAll"](s).eq(-1) : i[t + "All"](s).eq(0)).length && this.menuInstance.focus(e, n)
6549        },
6550        _getSelectedItem: function () {
6551            return this.menuItems.eq(this.element[0].selectedIndex).parent("li")
6552        },
6553        _toggle: function (t) {
6554            this[this.isOpen ? "close" : "open"](t)
6555        },
6556        _setSelection: function () {
6557            var t;
6558            this.range && (window.getSelection ? ((t = window.getSelection()).removeAllRanges(), t.addRange(this.range)) : this.range.select(), this.button.focus())
6559        },
6560        _documentClick: {
6561            mousedown: function (t) {
6562                this.isOpen && (k(t.target).closest(".ui-selectmenu-menu, #" + k.ui.escapeSelector(this.ids.button)).length || this.close(t))
6563            }
6564        },
6565        _buttonEvents: {
6566            mousedown: function () {
6567                var t;
6568                window.getSelection ? (t = window.getSelection()).rangeCount && (this.range = t.getRangeAt(0)) : this.range = document.selection.createRange()
6569            }, click: function (t) {
6570                this._setSelection(), this._toggle(t)
6571            }, keydown: function (t) {
6572                var e = !0;
6573                switch (t.keyCode) {
6574                    case k.ui.keyCode.TAB:
6575                    case k.ui.keyCode.ESCAPE:
6576                        this.close(t), e = !1;
6577                        break;
6578                    case k.ui.keyCode.ENTER:
6579                        this.isOpen && this._selectFocusedItem(t);
6580                        break;
6581                    case k.ui.keyCode.UP:
6582                        t.altKey ? this._toggle(t) : this._move("prev", t);
6583                        break;
6584                    case k.ui.keyCode.DOWN:
6585                        t.altKey ? this._toggle(t) : this._move("next", t);
6586                        break;
6587                    case k.ui.keyCode.SPACE:
6588                        this.isOpen ? this._selectFocusedItem(t) : this._toggle(t);
6589                        break;
6590                    case k.ui.keyCode.LEFT:
6591                        this._move("prev", t);
6592                        break;
6593                    case k.ui.keyCode.RIGHT:
6594                        this._move("next", t);
6595                        break;
6596                    case k.ui.keyCode.HOME:
6597                    case k.ui.keyCode.PAGE_UP:
6598                        this._move("first", t);
6599                        break;
6600                    case k.ui.keyCode.END:
6601                    case k.ui.keyCode.PAGE_DOWN:
6602                        this._move("last", t);
6603                        break;
6604                    default:
6605                        this.menu.trigger(t), e = !1
6606                }
6607                e && t.preventDefault()
6608            }
6609        },
6610        _selectFocusedItem: function (t) {
6611            var e = this.menuItems.eq(this.focusIndex).parent("li");
6612            e.hasClass("ui-state-disabled") || this._select(e.data("ui-selectmenu-item"), t)
6613        },
6614        _select: function (t, e) {
6615            var i = this.element[0].selectedIndex;
6616            this.element[0].selectedIndex = t.index, this.buttonItem.replaceWith(this.buttonItem = this._renderButtonItem(t)), this._setAria(t), this._trigger("select", e, {item: t}), t.index !== i && this._trigger("change", e, {item: t}), this.close(e)
6617        },
6618        _setAria: function (t) {
6619            var e = this.menuItems.eq(t.index).attr("id");
6620            this.button.attr({
6621                "aria-labelledby": e,
6622                "aria-activedescendant": e
6623            }), this.menu.attr("aria-activedescendant", e)
6624        },
6625        _setOption: function (t, e) {
6626            if ("icons" === t) {
6627                var i = this.button.find("span.ui-icon");
6628                this._removeClass(i, null, this.options.icons.button)._addClass(i, null, e.button)
6629            }
6630            this._super(t, e), "appendTo" === t && this.menuWrap.appendTo(this._appendTo()), "width" === t && this._resizeButton()
6631        },
6632        _setOptionDisabled: function (t) {
6633            this._super(t), this.menuInstance.option("disabled", t), this.button.attr("aria-disabled", t), this._toggleClass(this.button, null, "ui-state-disabled", t), this.element.prop("disabled", t), t ? (this.button.attr("tabindex", -1), this.close()) : this.button.attr("tabindex", 0)
6634        },
6635        _appendTo: function () {
6636            var t = this.options.appendTo;
6637            return (t = t && (t.jquery || t.nodeType ? k(t) : this.document.find(t).eq(0))) && t[0] || (t = this.element.closest(".ui-front, dialog")), t.length || (t = this.document[0].body), t
6638        },
6639        _toggleAttr: function () {
6640            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)
6641        },
6642        _resizeButton: function () {
6643            var t = this.options.width;
6644            return !1 === t ? void this.button.css("width", "") : (null === t && (t = this.element.show().outerWidth(), this.element.hide()), void this.button.outerWidth(t))
6645        },
6646        _resizeMenu: function () {
6647            this.menu.outerWidth(Math.max(this.button.outerWidth(), this.menu.width("").outerWidth() + 1))
6648        },
6649        _getCreateOptions: function () {
6650            var t = this._super();
6651            return t.disabled = this.element.prop("disabled"), t
6652        },
6653        _parseOptions: function (t) {
6654            var i = this, n = [];
6655            t.each(function (t, e) {
6656                n.push(i._parseOption(k(e), t))
6657            }), this.items = n
6658        },
6659        _parseOption: function (t, e) {
6660            var i = t.parent("optgroup");
6661            return {
6662                element: t,
6663                index: e,
6664                value: t.val(),
6665                label: t.text(),
6666                optgroup: i.attr("label") || "",
6667                disabled: i.prop("disabled") || t.prop("disabled")
6668            }
6669        },
6670        _destroy: function () {
6671            this._unbindFormResetHandler(), this.menuWrap.remove(), this.button.remove(), this.element.show(), this.element.removeUniqueId(), this.labels.attr("for", this.ids.element)
6672        }
6673    }]), k.widget("ui.slider", k.ui.mouse, {
6674        version: "1.12.1",
6675        widgetEventPrefix: "slide",
6676        options: {
6677            animate: !1,
6678            classes: {
6679                "ui-slider": "ui-corner-all",
6680                "ui-slider-handle": "ui-corner-all",
6681                "ui-slider-range": "ui-corner-all ui-widget-header"
6682            },
6683            distance: 0,
6684            max: 100,
6685            min: 0,
6686            orientation: "horizontal",
6687            range: !1,
6688            step: 1,
6689            value: 0,
6690            values: null,
6691            change: null,
6692            slide: null,
6693            start: null,
6694            stop: null
6695        },
6696        numPages: 5,
6697        _create: function () {
6698            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
6699        },
6700        _refresh: function () {
6701            this._createRange(), this._createHandles(), this._setupEvents(), this._refreshValue()
6702        },
6703        _createHandles: function () {
6704            var t, e, i = this.options, n = this.element.find(".ui-slider-handle"), s = [];
6705            for (e = i.values && i.values.length || 1, n.length > e && (n.slice(e).remove(), n = n.slice(0, e)), t = n.length; t < e; t++) s.push("<span tabindex='0'></span>");
6706            this.handles = n.add(k(s.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) {
6707                k(this).data("ui-slider-handle-index", t).attr("tabIndex", 0)
6708            })
6709        },
6710        _createRange: function () {
6711            var t = this.options;
6712            t.range ? (!0 === t.range && (t.values ? t.values.length && 2 !== t.values.length ? t.values = [t.values[0], t.values[0]] : k.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({
6713                left: "",
6714                bottom: ""
6715            })) : (this.range = k("<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)
6716        },
6717        _setupEvents: function () {
6718            this._off(this.handles), this._on(this.handles, this._handleEvents), this._hoverable(this.handles), this._focusable(this.handles)
6719        },
6720        _destroy: function () {
6721            this.handles.remove(), this.range && this.range.remove(), this._mouseDestroy()
6722        },
6723        _mouseCapture: function (t) {
6724            var e, i, n, s, o, a, r, l = this, h = this.options;
6725            return !h.disabled && (this.elementSize = {
6726                width: this.element.outerWidth(),
6727                height: this.element.outerHeight()
6728            }, this.elementOffset = this.element.offset(), e = {
6729                x: t.pageX,
6730                y: t.pageY
6731            }, i = this._normValueFromMouse(e), n = this._valueMax() - this._valueMin() + 1, this.handles.each(function (t) {
6732                var e = Math.abs(i - l.values(t));
6733                (e < n || n === e && (t === l._lastChangedValue || l.values(t) === h.min)) && (n = e, s = k(this), o = t)
6734            }), !1 !== this._start(t, o) && (this._mouseSliding = !0, this._handleIndex = o, this._addClass(s, null, "ui-state-active"), s.trigger("focus"), a = s.offset(), r = !k(t.target).parents().addBack().is(".ui-slider-handle"), this._clickOffset = r ? {
6735                left: 0,
6736                top: 0
6737            } : {
6738                left: t.pageX - a.left - s.width() / 2,
6739                top: t.pageY - a.top - s.height() / 2 - (parseInt(s.css("borderTopWidth"), 10) || 0) - (parseInt(s.css("borderBottomWidth"), 10) || 0) + (parseInt(s.css("marginTop"), 10) || 0)
6740            }, this.handles.hasClass("ui-state-hover") || this._slide(t, o, i), this._animateOff = !0))
6741        },
6742        _mouseStart: function () {
6743            return !0
6744        },
6745        _mouseDrag: function (t) {
6746            var e = {x: t.pageX, y: t.pageY}, i = this._normValueFromMouse(e);
6747            return this._slide(t, this._handleIndex, i), !1
6748        },
6749        _mouseStop: function (t) {
6750            return this._removeClass(this.handles, null, "ui-state-active"), this._mouseSliding = !1, this._stop(t, this._handleIndex), this._change(t, this._handleIndex), this._handleIndex = null, this._clickOffset = null, this._animateOff = !1
6751        },
6752        _detectOrientation: function () {
6753            this.orientation = "vertical" === this.options.orientation ? "vertical" : "horizontal"
6754        },
6755        _normValueFromMouse: function (t) {
6756            var e, i, n, s;
6757            return 1 < (i = ("horizontal" === this.orientation ? (e = this.elementSize.width, t.x - this.elementOffset.left - (this._clickOffset ? this._clickOffset.left : 0)) : (e = this.elementSize.height, t.y - this.elementOffset.top - (this._clickOffset ? this._clickOffset.top : 0))) / e) && (i = 1), i < 0 && (i = 0), "vertical" === this.orientation && (i = 1 - i), n = this._valueMax() - this._valueMin(), s = this._valueMin() + i * n, this._trimAlignValue(s)
6758        },
6759        _uiHash: function (t, e, i) {
6760            var n = {handle: this.handles[t], handleIndex: t, value: void 0 !== e ? e : this.value()};
6761            return this._hasMultipleValues() && (n.value = void 0 !== e ? e : this.values(t), n.values = i || this.values()), n
6762        },
6763        _hasMultipleValues: function () {
6764            return this.options.values && this.options.values.length
6765        },
6766        _start: function (t, e) {
6767            return this._trigger("start", t, this._uiHash(e))
6768        },
6769        _slide: function (t, e, i) {
6770            var n, s = this.value(), o = this.values();
6771            this._hasMultipleValues() && (n = this.values(e ? 0 : 1), s = this.values(e), 2 === this.options.values.length && !0 === this.options.range && (i = 0 === e ? Math.min(n, i) : Math.max(n, i)), o[e] = i), i === s || !1 !== this._trigger("slide", t, this._uiHash(e, i, o)) && (this._hasMultipleValues() ? this.values(e, i) : this.value(i))
6772        },
6773        _stop: function (t, e) {
6774            this._trigger("stop", t, this._uiHash(e))
6775        },
6776        _change: function (t, e) {
6777            this._keySliding || this._mouseSliding || (this._lastChangedValue = e, this._trigger("change", t, this._uiHash(e)))
6778        },
6779        value: function (t) {
6780            return arguments.length ? (this.options.value = this._trimAlignValue(t), this._refreshValue(), void this._change(null, 0)) : this._value()
6781        },
6782        values: function (t, e) {
6783            var i, n, s;
6784            if (1 < arguments.length) return this.options.values[t] = this._trimAlignValue(e), this._refreshValue(), void this._change(null, t);
6785            if (!arguments.length) return this._values();
6786            if (!k.isArray(t)) return this._hasMultipleValues() ? this._values(t) : this.value();
6787            for (i = this.options.values, n = t, s = 0; i.length > s; s += 1) i[s] = this._trimAlignValue(n[s]), this._change(null, s);
6788            this._refreshValue()
6789        },
6790        _setOption: function (t, e) {
6791            var i, n = 0;
6792            switch ("range" === t && !0 === this.options.range && ("min" === e ? (this.options.value = this._values(0), this.options.values = null) : "max" === e && (this.options.value = this._values(this.options.values.length - 1), this.options.values = null)), k.isArray(this.options.values) && (n = this.options.values.length), this._super(t, e), t) {
6793                case"orientation":
6794                    this._detectOrientation(), this._removeClass("ui-slider-horizontal ui-slider-vertical")._addClass("ui-slider-" + this.orientation), this._refreshValue(), this.options.range && this._refreshRange(e), this.handles.css("horizontal" === e ? "bottom" : "left", "");
6795                    break;
6796                case"value":
6797                    this._animateOff = !0, this._refreshValue(), this._change(null, 0), this._animateOff = !1;
6798                    break;
6799                case"values":
6800                    for (this._animateOff = !0, this._refreshValue(), i = n - 1; 0 <= i; i--) this._change(null, i);
6801                    this._animateOff = !1;
6802                    break;
6803                case"step":
6804                case"min":
6805                case"max":
6806                    this._animateOff = !0, this._calculateNewMax(), this._refreshValue(), this._animateOff = !1;
6807                    break;
6808                case"range":
6809                    this._animateOff = !0, this._refresh(), this._animateOff = !1
6810            }
6811        },
6812        _setOptionDisabled: function (t) {
6813            this._super(t), this._toggleClass(null, "ui-state-disabled", !!t)
6814        },
6815        _value: function () {
6816            var t = this.options.value;
6817            return this._trimAlignValue(t)
6818        },
6819        _values: function (t) {
6820            var e, i, n;
6821            if (arguments.length) return e = this.options.values[t], this._trimAlignValue(e);
6822            if (this._hasMultipleValues()) {
6823                for (i = this.options.values.slice(), n = 0; i.length > n; n += 1) i[n] = this._trimAlignValue(i[n]);
6824                return i
6825            }
6826            return []
6827        },
6828        _trimAlignValue: function (t) {
6829            if (this._valueMin() >= t) return this._valueMin();
6830            if (t >= this._valueMax()) return this._valueMax();
6831            var e = 0 < this.options.step ? this.options.step : 1, i = (t - this._valueMin()) % e, n = t - i;
6832            return 2 * Math.abs(i) >= e && (n += 0 < i ? e : -e), parseFloat(n.toFixed(5))
6833        },
6834        _calculateNewMax: function () {
6835            var t = this.options.max, e = this._valueMin(), i = this.options.step;
6836            (t = Math.round((t - e) / i) * i + e) > this.options.max && (t -= i), this.max = parseFloat(t.toFixed(this._precision()))
6837        },
6838        _precision: function () {
6839            var t = this._precisionOf(this.options.step);
6840            return null !== this.options.min && (t = Math.max(t, this._precisionOf(this.options.min))), t
6841        },
6842        _precisionOf: function (t) {
6843            var e = "" + t, i = e.indexOf(".");
6844            return -1 === i ? 0 : e.length - i - 1
6845        },
6846        _valueMin: function () {
6847            return this.options.min
6848        },
6849        _valueMax: function () {
6850            return this.max
6851        },
6852        _refreshRange: function (t) {
6853            "vertical" === t && this.range.css({width: "", left: ""}), "horizontal" === t && this.range.css({
6854                height: "",
6855                bottom: ""
6856            })
6857        },
6858        _refreshValue: function () {
6859            var e, i, t, n, s, o = this.options.range, a = this.options, r = this, l = !this._animateOff && a.animate,
6860                h = {};
6861            this._hasMultipleValues() ? this.handles.each(function (t) {
6862                i = (r.values(t) - r._valueMin()) / (r._valueMax() - r._valueMin()) * 100, h["horizontal" === r.orientation ? "left" : "bottom"] = i + "%", k(this).stop(1, 1)[l ? "animate" : "css"](h, a.animate), !0 === r.options.range && ("horizontal" === r.orientation ? (0 === t && r.range.stop(1, 1)[l ? "animate" : "css"]({left: i + "%"}, a.animate), 1 === t && r.range[l ? "animate" : "css"]({width: i - e + "%"}, {
6863                    queue: !1,
6864                    duration: a.animate
6865                })) : (0 === t && r.range.stop(1, 1)[l ? "animate" : "css"]({bottom: i + "%"}, a.animate), 1 === t && r.range[l ? "animate" : "css"]({height: i - e + "%"}, {
6866                    queue: !1,
6867                    duration: a.animate
6868                }))), e = i
6869            }) : (t = this.value(), n = this._valueMin(), s = this._valueMax(), i = s !== n ? (t - n) / (s - n) * 100 : 0, h["horizontal" === this.orientation ? "left" : "bottom"] = i + "%", this.handle.stop(1, 1)[l ? "animate" : "css"](h, a.animate), "min" === o && "horizontal" === this.orientation && this.range.stop(1, 1)[l ? "animate" : "css"]({width: i + "%"}, a.animate), "max" === o && "horizontal" === this.orientation && this.range.stop(1, 1)[l ? "animate" : "css"]({width: 100 - i + "%"}, a.animate), "min" === o && "vertical" === this.orientation && this.range.stop(1, 1)[l ? "animate" : "css"]({height: i + "%"}, a.animate), "max" === o && "vertical" === this.orientation && this.range.stop(1, 1)[l ? "animate" : "css"]({height: 100 - i + "%"}, a.animate))
6870        },
6871        _handleEvents: {
6872            keydown: function (t) {
6873                var e, i, n, s = k(t.target).data("ui-slider-handle-index");
6874                switch (t.keyCode) {
6875                    case k.ui.keyCode.HOME:
6876                    case k.ui.keyCode.END:
6877                    case k.ui.keyCode.PAGE_UP:
6878                    case k.ui.keyCode.PAGE_DOWN:
6879                    case k.ui.keyCode.UP:
6880                    case k.ui.keyCode.RIGHT:
6881                    case k.ui.keyCode.DOWN:
6882                    case k.ui.keyCode.LEFT:
6883                        if (t.preventDefault(), !this._keySliding && (this._keySliding = !0, this._addClass(k(t.target), null, "ui-state-active"), !1 === this._start(t, s))) return
6884                }
6885                switch (n = this.options.step, e = i = this._hasMultipleValues() ? this.values(s) : this.value(), t.keyCode) {
6886                    case k.ui.keyCode.HOME:
6887                        i = this._valueMin();
6888                        break;
6889                    case k.ui.keyCode.END:
6890                        i = this._valueMax();
6891                        break;
6892                    case k.ui.keyCode.PAGE_UP:
6893                        i = this._trimAlignValue(e + (this._valueMax() - this._valueMin()) / this.numPages);
6894                        break;
6895                    case k.ui.keyCode.PAGE_DOWN:
6896                        i = this._trimAlignValue(e - (this._valueMax() - this._valueMin()) / this.numPages);
6897                        break;
6898                    case k.ui.keyCode.UP:
6899                    case k.ui.keyCode.RIGHT:
6900                        if (e === this._valueMax()) return;
6901                        i = this._trimAlignValue(e + n);
6902                        break;
6903                    case k.ui.keyCode.DOWN:
6904                    case k.ui.keyCode.LEFT:
6905                        if (e === this._valueMin()) return;
6906                        i = this._trimAlignValue(e - n)
6907                }
6908                this._slide(t, s, i)
6909            }, keyup: function (t) {
6910                var e = k(t.target).data("ui-slider-handle-index");
6911                this._keySliding && (this._keySliding = !1, this._stop(t, e), this._change(t, e), this._removeClass(k(t.target), null, "ui-state-active"))
6912            }
6913        }
6914    }), k.widget("ui.sortable", k.ui.mouse, {
6915        version: "1.12.1",
6916        widgetEventPrefix: "sort",
6917        ready: !1,
6918        options: {
6919            appendTo: "parent",
6920            axis: !1,
6921            connectWith: !1,
6922            containment: !1,
6923            cursor: "auto",
6924            cursorAt: !1,
6925            dropOnEmpty: !0,
6926            forcePlaceholderSize: !1,
6927            forceHelperSize: !1,
6928            grid: !1,
6929            handle: !1,
6930            helper: "original",
6931            items: "> *",
6932            opacity: !1,
6933            placeholder: !1,
6934            revert: !1,
6935            scroll: !0,
6936            scrollSensitivity: 20,
6937            scrollSpeed: 20,
6938            scope: "default",
6939            tolerance: "intersect",
6940            zIndex: 1e3,
6941            activate: null,
6942            beforeStop: null,
6943            change: null,
6944            deactivate: null,
6945            out: null,
6946            over: null,
6947            receive: null,
6948            remove: null,
6949            sort: null,
6950            start: null,
6951            stop: null,
6952            update: null
6953        },
6954        _isOverAxis: function (t, e, i) {
6955            return e <= t && t < e + i
6956        },
6957        _isFloating: function (t) {
6958            return /left|right/.test(t.css("float")) || /inline|table-cell/.test(t.css("display"))
6959        },
6960        _create: function () {
6961            this.containerCache = {}, this._addClass("ui-sortable"), this.refresh(), this.offset = this.element.offset(), this._mouseInit(), this._setHandleClassName(), this.ready = !0
6962        },
6963        _setOption: function (t, e) {
6964            this._super(t, e), "handle" === t && this._setHandleClassName()
6965        },
6966        _setHandleClassName: function () {
6967            var t = this;
6968            this._removeClass(this.element.find(".ui-sortable-handle"), "ui-sortable-handle"), k.each(this.items, function () {
6969                t._addClass(this.instance.options.handle ? this.item.find(this.instance.options.handle) : this.item, "ui-sortable-handle")
6970            })
6971        },
6972        _destroy: function () {
6973            this._mouseDestroy();
6974            for (var t = this.items.length - 1; 0 <= t; t--) this.items[t].item.removeData(this.widgetName + "-item");
6975            return this
6976        },
6977        _mouseCapture: function (t, e) {
6978            var i = null, n = !1, s = this;
6979            return !this.reverting && (!this.options.disabled && "static" !== this.options.type && (this._refreshItems(t), k(t.target).parents().each(function () {
6980                return k.data(this, s.widgetName + "-item") === s ? (i = k(this), !1) : void 0
6981            }), k.data(t.target, s.widgetName + "-item") === s && (i = k(t.target)), !!i && (!(this.options.handle && !e && (k(this.options.handle, i).find("*").addBack().each(function () {
6982                this === t.target && (n = !0)
6983            }), !n)) && (this.currentItem = i, this._removeCurrentsFromItems(), !0))))
6984        },
6985        _mouseStart: function (t, e, i) {
6986            var n, s, o = this.options;
6987            if ((this.currentContainer = this).refreshPositions(), this.helper = this._createHelper(t), this._cacheHelperProportions(), this._cacheMargins(), this.scrollParent = this.helper.scrollParent(), this.offset = this.currentItem.offset(), this.offset = {
6988                top: this.offset.top - this.margins.top,
6989                left: this.offset.left - this.margins.left
6990            }, k.extend(this.offset, {
6991                click: {left: t.pageX - this.offset.left, top: t.pageY - this.offset.top},
6992                parent: this._getParentOffset(),
6993                relative: this._getRelativeOffset()
6994            }), this.helper.css("position", "absolute"), this.cssPosition = this.helper.css("position"), this.originalPosition = this._generatePosition(t), this.originalPageX = t.pageX, this.originalPageY = t.pageY, o.cursorAt && this._adjustOffsetFromHelper(o.cursorAt), this.domPosition = {
6995                prev: this.currentItem.prev()[0],
6996                parent: this.currentItem.parent()[0]
6997            }, this.helper[0] !== this.currentItem[0] && this.currentItem.hide(), this._createPlaceholder(), o.containment && this._setContainment(), o.cursor && "auto" !== o.cursor && (s = this.document.find("body"), this.storedCursor = s.css("cursor"), s.css("cursor", o.cursor), this.storedStylesheet = k("<style>*{ cursor: " + o.cursor + " !important; }</style>").appendTo(s)), o.opacity && (this.helper.css("opacity") && (this._storedOpacity = this.helper.css("opacity")), this.helper.css("opacity", o.opacity)), o.zIndex && (this.helper.css("zIndex") && (this._storedZIndex = this.helper.css("zIndex")), this.helper.css("zIndex", o.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(), !i) for (n = this.containers.length - 1; 0 <= n; n--) this.containers[n]._trigger("activate", t, this._uiHash(this));
6998            return k.ui.ddmanager && (k.ui.ddmanager.current = this), k.ui.ddmanager && !o.dropBehaviour && k.ui.ddmanager.prepareOffsets(this, t), this.dragging = !0, this._addClass(this.helper, "ui-sortable-helper"), this._mouseDrag(t), !0
6999        },
7000        _mouseDrag: function (t) {
7001            var e, i, n, s, o = this.options, a = !1;
7002            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 < o.scrollSensitivity ? this.scrollParent[0].scrollTop = a = this.scrollParent[0].scrollTop + o.scrollSpeed : t.pageY - this.overflowOffset.top < o.scrollSensitivity && (this.scrollParent[0].scrollTop = a = this.scrollParent[0].scrollTop - o.scrollSpeed), this.overflowOffset.left + this.scrollParent[0].offsetWidth - t.pageX < o.scrollSensitivity ? this.scrollParent[0].scrollLeft = a = this.scrollParent[0].scrollLeft + o.scrollSpeed : t.pageX - this.overflowOffset.left < o.scrollSensitivity && (this.scrollParent[0].scrollLeft = a = this.scrollParent[0].scrollLeft - o.scrollSpeed)) : (t.pageY - this.document.scrollTop() < o.scrollSensitivity ? a = this.document.scrollTop(this.document.scrollTop() - o.scrollSpeed) : this.window.height() - (t.pageY - this.document.scrollTop()) < o.scrollSensitivity && (a = this.document.scrollTop(this.document.scrollTop() + o.scrollSpeed)), t.pageX - this.document.scrollLeft() < o.scrollSensitivity ? a = this.document.scrollLeft(this.document.scrollLeft() - o.scrollSpeed) : this.window.width() - (t.pageX - this.document.scrollLeft()) < o.scrollSensitivity && (a = this.document.scrollLeft(this.document.scrollLeft() + o.scrollSpeed))), !1 !== a && k.ui.ddmanager && !o.dropBehaviour && k.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.option
vendor: 6,361 bytes, lines 7002-7078
7002s.axis && "x" === this.options.axis || (this.helper[0].style.top = this.position.top + "px"), e = this.items.length - 1; 0 <= e; e--) if (n = (i = this.items[e]).item[0], (s = this._intersectsWithPointer(i)) && i.instance === this.currentContainer && n !== this.currentItem[0] && this.placeholder[1 === s ? "next" : "prev"]()[0] !== n && !k.contains(this.placeholder[0], n) && ("semi-dynamic" !== this.options.type || !k.contains(this.element[0], n))) {
7003                if (this.direction = 1 === s ? "down" : "up", "pointer" !== this.options.tolerance && !this._intersectsWithSides(i)) break;
7004                this._rearrange(t, i), this._trigger("change", t, this._uiHash());
7005                break
7006            }
7007            return this._contactContainers(t), k.ui.ddmanager && k.ui.ddmanager.drag(this, t), this._trigger("sort", t, this._uiHash()), this.lastPositionAbs = this.positionAbs, !1
7008        },
7009        _mouseStop: function (t, e) {
7010            if (t) {
7011                if (k.ui.ddmanager && !this.options.dropBehaviour && k.ui.ddmanager.drop(this, t), this.options.revert) {
7012                    var i = this, n = this.placeholder.offset(), s = this.options.axis, o = {};
7013                    s && "x" !== s || (o.left = n.left - this.offset.parent.left - this.margins.left + (this.offsetParent[0] === this.document[0].body ? 0 : this.offsetParent[0].scrollLeft)), s && "y" !== s || (o.top = n.top - this.offset.parent.top - this.margins.top + (this.offsetParent[0] === this.document[0].body ? 0 : this.offsetParent[0].scrollTop)), this.reverting = !0, k(this.helper).animate(o, parseInt(this.options.revert, 10) || 500, function () {
7014                        i._clear(t)
7015                    })
7016                } else this._clear(t, e);
7017                return !1
7018            }
7019        },
7020        cancel: function () {
7021            if (this.dragging) {
7022                this._mouseUp(new k.Event("mouseup", {target: null})), "original" === this.options.helper ? (this.currentItem.css(this._storedCSS), this._removeClass(this.currentItem, "ui-sortable-helper")) : this.currentItem.show();
7023                for (var t = this.containers.length - 1; 0 <= t; 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)
7024            }
7025            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(), k.extend(this, {
7026                helper: null,
7027                dragging: !1,
7028                reverting: !1,
7029                _noFinalSort: null
7030            }), this.domPosition.prev ? k(this.domPosition.prev).after(this.currentItem) : k(this.domPosition.parent).prepend(this.currentItem)), this
7031        },
7032        serialize: function (e) {
7033            var t = this._getItemsAsjQuery(e && e.connected), i = [];
7034            return e = e || {}, k(t).each(function () {
7035                var t = (k(e.item || this).attr(e.attribute || "id") || "").match(e.expression || /(.+)[\-=_](.+)/);
7036                t && i.push((e.key || t[1] + "[]") + "=" + (e.key && e.expression ? t[1] : t[2]))
7037            }), !i.length && e.key && i.push(e.key + "="), i.join("&")
7038        },
7039        toArray: function (t) {
7040            var e = this._getItemsAsjQuery(t && t.connected), i = [];
7041            return t = t || {}, e.each(function () {
7042                i.push(k(t.item || this).attr(t.attribute || "id") || "")
7043            }), i
7044        },
7045        _intersectsWith: function (t) {
7046            var e = this.positionAbs.left, i = e + this.helperProportions.width, n = this.positionAbs.top,
7047                s = n + this.helperProportions.height, o = t.left, a = o + t.width, r = t.top, l = r + t.height,
7048                h = this.offset.click.top, c = this.offset.click.left,
7049                u = "x" === this.options.axis || r < n + h && n + h < l,
7050                d = "y" === this.options.axis || o < e + c && e + c < a, p = u && d;
7051            return "pointer" === this.options.tolerance || this.options.forcePointerForContainers || "pointer" !== this.options.tolerance && this.helperProportions[this.floating ? "width" : "height"] > t[this.floating ? "width" : "height"] ? p : e + this.helperProportions.width / 2 > o && a > i - this.helperProportions.width / 2 && n + this.helperProportions.height / 2 > r && l > s - this.helperProportions.height / 2
7052        },
7053        _intersectsWithPointer: function (t) {
7054            var e, i,
7055                n = "x" === this.options.axis || this._isOverAxis(this.positionAbs.top + this.offset.click.top, t.top, t.height),
7056                s = "y" === this.options.axis || this._isOverAxis(this.positionAbs.left + this.offset.click.left, t.left, t.width);
7057            return !!(n && s) && (e = this._getDragVerticalDirection(), i = this._getDragHorizontalDirection(), this.floating ? "right" === i || "down" === e ? 2 : 1 : e && ("down" === e ? 2 : 1))
7058        },
7059        _intersectsWithSides: function (t) {
7060            var e = this._isOverAxis(this.positionAbs.top + this.offset.click.top, t.top + t.height / 2, t.height),
7061                i = this._isOverAxis(this.positionAbs.left + this.offset.click.left, t.left + t.width / 2, t.width),
7062                n = this._getDragVerticalDirection(), s = this._getDragHorizontalDirection();
7063            return this.floating && s ? "right" === s && i || "left" === s && !i : n && ("down" === n && e || "up" === n && !e)
7064        },
7065        _getDragVerticalDirection: function () {
7066            var t = this.positionAbs.top - this.lastPositionAbs.top;
7067            return 0 != t && (0 < t ? "down" : "up")
7068        },
7069        _getDragHorizontalDirection: function () {
7070            var t = this.positionAbs.left - this.lastPositionAbs.left;
7071            return 0 != t && (0 < t ? "right" : "left")
7072        },
7073        refresh: function (t) {
7074            return this._refreshItems(t), this._setHandleClassName(), this.refreshPositions(), this
7075        },
7076        _connectWith: function () {
7077            var t = this.options;
7078            return t.connectWith.constructor === String ? [t.connectWith
vendor: 53,217 bytes, lines 7078-7844
7078] : t.connectWith
7079        },
7080        _getItemsAsjQuery: function (t) {
7081            function e() {
7082                a.push(this)
7083            }
7084
7085            var i, n, s, o, a = [], r = [], l = this._connectWith();
7086            if (l && t) for (i = l.length - 1; 0 <= i; i--) for (n = (s = k(l[i], this.document[0])).length - 1; 0 <= n; n--) (o = k.data(s[n], this.widgetFullName)) && o !== this && !o.options.disabled && r.push([k.isFunction(o.options.items) ? o.options.items.call(o.element) : k(o.options.items, o.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"), o]);
7087            for (r.push([k.isFunction(this.options.items) ? this.options.items.call(this.element, null, {
7088                options: this.options,
7089                item: this.currentItem
7090            }) : k(this.options.items, this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"), this]), i = r.length - 1; 0 <= i; i--) r[i][0].each(e);
7091            return k(a)
7092        },
7093        _removeCurrentsFromItems: function () {
7094            var i = this.currentItem.find(":data(" + this.widgetName + "-item)");
7095            this.items = k.grep(this.items, function (t) {
7096                for (var e = 0; i.length > e; e++) if (i[e] === t.item[0]) return !1;
7097                return !0
7098            })
7099        },
7100        _refreshItems: function (t) {
7101            this.items = [], this.containers = [this];
7102            var e, i, n, s, o, a, r, l, h = this.items,
7103                c = [[k.isFunction(this.options.items) ? this.options.items.call(this.element[0], t, {item: this.currentItem}) : k(this.options.items, this.element), this]],
7104                u = this._connectWith();
7105            if (u && this.ready) for (e = u.length - 1; 0 <= e; e--) for (i = (n = k(u[e], this.document[0])).length - 1; 0 <= i; i--) (s = k.data(n[i], this.widgetFullName)) && s !== this && !s.options.disabled && (c.push([k.isFunction(s.options.items) ? s.options.items.call(s.element[0], t, {item: this.currentItem}) : k(s.options.items, s.element), s]), this.containers.push(s));
7106            for (e = c.length - 1; 0 <= e; e--) for (o = c[e][1], i = 0, l = (a = c[e][0]).length; i < l; i++) (r = k(a[i])).data(this.widgetName + "-item", o), h.push({
7107                item: r,
7108                instance: o,
7109                width: 0,
7110                height: 0,
7111                left: 0,
7112                top: 0
7113            })
7114        },
7115        refreshPositions: function (t) {
7116            var e, i, n, s;
7117            for (this.floating = !!this.items.length && ("x" === this.options.axis || this._isFloating(this.items[0].item)), this.offsetParent && this.helper && (this.offset.parent = this._getParentOffset()), e = this.items.length - 1; 0 <= e; e--) (i = this.items[e]).instance !== this.currentContainer && this.currentContainer && i.item[0] !== this.currentItem[0] || (n = this.options.toleranceElement ? k(this.options.toleranceElement, i.item) : i.item, t || (i.width = n.outerWidth(), i.height = n.outerHeight()), s = n.offset(), i.left = s.left, i.top = s.top);
7118            if (this.options.custom && this.options.custom.refreshContainers) this.options.custom.refreshContainers.call(this); else for (e = this.containers.length - 1; 0 <= e; e--) s = this.containers[e].element.offset(), this.containers[e].containerCache.left = s.left, this.containers[e].containerCache.top = s.top, this.containers[e].containerCache.width = this.containers[e].element.outerWidth(), this.containers[e].containerCache.height = this.containers[e].element.outerHeight();
7119            return this
7120        },
7121        _createPlaceholder: function (i) {
7122            var n, s = (i = i || this).options;
7123            s.placeholder && s.placeholder.constructor !== String || (n = s.placeholder, s.placeholder = {
7124                element: function () {
7125                    var t = i.currentItem[0].nodeName.toLowerCase(), e = k("<" + t + ">", i.document[0]);
7126                    return i._addClass(e, "ui-sortable-placeholder", n || i.currentItem[0].className)._removeClass(e, "ui-sortable-helper"), "tbody" === t ? i._createTrPlaceholder(i.currentItem.find("tr").eq(0), k("<tr>", i.document[0]).appendTo(e)) : "tr" === t ? i._createTrPlaceholder(i.currentItem, e) : "img" === t && e.attr("src", i.currentItem.attr("src")), n || e.css("visibility", "hidden"), e
7127                }, update: function (t, e) {
7128                    n && !s.forcePlaceholderSize || (e.height() || e.height(i.currentItem.innerHeight() - parseInt(i.currentItem.css("paddingTop") || 0, 10) - parseInt(i.currentItem.css("paddingBottom") || 0, 10)), e.width() || e.width(i.currentItem.innerWidth() - parseInt(i.currentItem.css("paddingLeft") || 0, 10) - parseInt(i.currentItem.css("paddingRight") || 0, 10)))
7129                }
7130            }), i.placeholder = k(s.placeholder.element.call(i.element, i.currentItem)), i.currentItem.after(i.placeholder), s.placeholder.update(i, i.placeholder)
7131        },
7132        _createTrPlaceholder: function (t, e) {
7133            var i = this;
7134            t.children().each(function () {
7135                k("<td>&#160;</td>", i.document[0]).attr("colspan", k(this).attr("colspan") || 1).appendTo(e)
7136            })
7137        },
7138        _contactContainers: function (t) {
7139            var e, i, n, s, o, a, r, l, h, c, u = null, d = null;
7140            for (e = this.containers.length - 1; 0 <= e; e--) if (!k.contains(this.currentItem[0], this.containers[e].element[0])) if (this._intersectsWith(this.containers[e].containerCache)) {
7141                if (u && k.contains(this.containers[e].element[0], u.element[0])) continue;
7142                u = this.containers[e], d = e
7143            } else this.containers[e].containerCache.over && (this.containers[e]._trigger("out", t, this._uiHash(this)), this.containers[e].containerCache.over = 0);
7144            if (u) if (1 === this.containers.length) this.containers[d].containerCache.over || (this.containers[d]._trigger("over", t, this._uiHash(this)), this.containers[d].containerCache.over = 1); else {
7145                for (n = 1e4, s = null, o = (h = u.floating || this._isFloating(this.currentItem)) ? "left" : "top", a = h ? "width" : "height", c = h ? "pageX" : "pageY", i = this.items.length - 1; 0 <= i; i--) k.contains(this.containers[d].element[0], this.items[i].item[0]) && this.items[i].item[0] !== this.currentItem[0] && (r = this.items[i].item.offset()[o], l = !1, t[c] - r > this.items[i][a] / 2 && (l = !0), n > Math.abs(t[c] - r) && (n = Math.abs(t[c] - r), s = this.items[i], this.direction = l ? "up" : "down"));
7146                if (!s && !this.options.dropOnEmpty) return;
7147                if (this.currentContainer === this.containers[d]) return void (this.currentContainer.containerCache.over || (this.containers[d]._trigger("over", t, this._uiHash()), this.currentContainer.containerCache.over = 1));
7148                s ? this._rearrange(t, s, null, !0) : this._rearrange(t, null, this.containers[d].element, !0), this._trigger("change", t, this._uiHash()), this.containers[d]._trigger("change", t, this._uiHash(this)), this.currentContainer = this.containers[d], this.options.placeholder.update(this.currentContainer, this.placeholder), this.containers[d]._trigger("over", t, this._uiHash(this)), this.containers[d].containerCache.over = 1
7149            }
7150        },
7151        _createHelper: function (t) {
7152            var e = this.options,
7153                i = k.isFunction(e.helper) ? k(e.helper.apply(this.element[0], [t, this.currentItem])) : "clone" === e.helper ? this.currentItem.clone() : this.currentItem;
7154            return i.parents("body").length || k("parent" !== e.appendTo ? e.appendTo : this.currentItem[0].parentNode)[0].appendChild(i[0]), i[0] === this.currentItem[0] && (this._storedCSS = {
7155                width: this.currentItem[0].style.width,
7156                height: this.currentItem[0].style.height,
7157                position: this.currentItem.css("position"),
7158                top: this.currentItem.css("top"),
7159                left: this.currentItem.css("left")
7160            }), i[0].style.width && !e.forceHelperSize || i.width(this.currentItem.width()), i[0].style.height && !e.forceHelperSize || i.height(this.currentItem.height()), i
7161        },
7162        _adjustOffsetFromHelper: function (t) {
7163            "string" == typeof t && (t = t.split(" ")), k.isArray(t) && (t = {
7164                left: +t[0],
7165                top: +t[1] || 0
7166            }), "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)
7167        },
7168        _getParentOffset: function () {
7169            this.offsetParent = this.helper.offsetParent();
7170            var t = this.offsetParent.offset();
7171            return "absolute" === this.cssPosition && this.scrollParent[0] !== this.document[0] && k.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() && k.ui.ie) && (t = {
7172                top: 0,
7173                left: 0
7174            }), {
7175                top: t.top + (parseInt(this.offsetParent.css("borderTopWidth"), 10) || 0),
7176                left: t.left + (parseInt(this.offsetParent.css("borderLeftWidth"), 10) || 0)
7177            }
7178        },
7179        _getRelativeOffset: function () {
7180            if ("relative" !== this.cssPosition) return {top: 0, left: 0};
7181            var t = this.currentItem.position();
7182            return {
7183                top: t.top - (parseInt(this.helper.css("top"), 10) || 0) + this.scrollParent.scrollTop(),
7184                left: t.left - (parseInt(this.helper.css("left"), 10) || 0) + this.scrollParent.scrollLeft()
7185            }
7186        },
7187        _cacheMargins: function () {
7188            this.margins = {
7189                left: parseInt(this.currentItem.css("marginLeft"), 10) || 0,
7190                top: parseInt(this.currentItem.css("marginTop"), 10) || 0
7191            }
7192        },
7193        _cacheHelperProportions: function () {
7194            this.helperProportions = {width: this.helper.outerWidth(), height: this.helper.outerHeight()}
7195        },
7196        _setContainment: function () {
7197            var t, e, i, n = this.options;
7198            "parent" === n.containment && (n.containment = this.helper[0].parentNode), "document" !== n.containment && "window" !== n.containment || (this.containment = [0 - this.offset.relative.left - this.offset.parent.left, 0 - this.offset.relative.top - this.offset.parent.top, "document" === n.containment ? this.document.width() : this.window.width() - this.helperProportions.width - this.margins.left, ("document" === n.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(n.containment) || (t = k(n.containment)[0], e = k(n.containment).offset(), i = "hidden" !== k(t).css("overflow"), this.containment = [e.left + (parseInt(k(t).css("borderLeftWidth"), 10) || 0) + (parseInt(k(t).css("paddingLeft"), 10) || 0) - this.margins.left, e.top + (parseInt(k(t).css("borderTopWidth"), 10) || 0) + (parseInt(k(t).css("paddingTop"), 10) || 0) - this.margins.top, e.left + (i ? Math.max(t.scrollWidth, t.offsetWidth) : t.offsetWidth) - (parseInt(k(t).css("borderLeftWidth"), 10) || 0) - (parseInt(k(t).css("paddingRight"), 10) || 0) - this.helperProportions.width - this.margins.left, e.top + (i ? Math.max(t.scrollHeight, t.offsetHeight) : t.offsetHeight) - (parseInt(k(t).css("borderTopWidth"), 10) || 0) - (parseInt(k(t).css("paddingBottom"), 10) || 0) - this.helperProportions.height - this.margins.top])
7199        },
7200        _convertPositionTo: function (t, e) {
7201            e = e || this.position;
7202            var i = "absolute" === t ? 1 : -1,
7203                n = "absolute" !== this.cssPosition || this.scrollParent[0] !== this.document[0] && k.contains(this.scrollParent[0], this.offsetParent[0]) ? this.scrollParent : this.offsetParent,
7204                s = /(html|body)/i.test(n[0].tagName);
7205            return {
7206                top: e.top + this.offset.relative.top * i + this.offset.parent.top * i - ("fixed" === this.cssPosition ? -this.scrollParent.scrollTop() : s ? 0 : n.scrollTop()) * i,
7207                left: e.left + this.offset.relative.left * i + this.offset.parent.left * i - ("fixed" === this.cssPosition ? -this.scrollParent.scrollLeft() : s ? 0 : n.scrollLeft()) * i
7208            }
7209        },
7210        _generatePosition: function (t) {
7211            var e, i, n = this.options, s = t.pageX, o = t.pageY,
7212                a = "absolute" !== this.cssPosition || this.scrollParent[0] !== this.document[0] && k.contains(this.scrollParent[0], this.offsetParent[0]) ? this.scrollParent : this.offsetParent,
7213                r = /(html|body)/i.test(a[0].tagName);
7214            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] && (s = this.containment[0] + this.offset.click.left), t.pageY - this.offset.click.top < this.containment[1] && (o = this.containment[1] + this.offset.click.top), t.pageX - this.offset.click.left > this.containment[2] && (s = this.containment[2] + this.offset.click.left), t.pageY - this.offset.click.top > this.containment[3] && (o = this.containment[3] + this.offset.click.top)), n.grid && (e = this.originalPageY + Math.round((o - this.originalPageY) / n.grid[1]) * n.grid[1], o = this.containment ? e - this.offset.click.top >= this.containment[1] && e - this.offset.click.top <= this.containment[3] ? e : e - this.offset.click.top >= this.containment[1] ? e - n.grid[1] : e + n.grid[1] : e, i = this.originalPageX + Math.round((s - this.originalPageX) / n.grid[0]) * n.grid[0], s = this.containment ? i - this.offset.click.left >= this.containment[0] && i - this.offset.click.left <= this.containment[2] ? i : i - this.offset.click.left >= this.containment[0] ? i - n.grid[0] : i + n.grid[0] : i)), {
7215                top: o - this.offset.click.top - this.offset.relative.top - this.offset.parent.top + ("fixed" === this.cssPosition ? -this.scrollParent.scrollTop() : r ? 0 : a.scrollTop()),
7216                left: s - this.offset.click.left - this.offset.relative.left - this.offset.parent.left + ("fixed" === this.cssPosition ? -this.scrollParent.scrollLeft() : r ? 0 : a.scrollLeft())
7217            }
7218        },
7219        _rearrange: function (t, e, i, n) {
7220            i ? i[0].appendChild(this.placeholder[0]) : e.item[0].parentNode.insertBefore(this.placeholder[0], "down" === this.direction ? e.item[0] : e.item[0].nextSibling), this.counter = this.counter ? ++this.counter : 1;
7221            var s = this.counter;
7222            this._delay(function () {
7223                s === this.counter && this.refreshPositions(!n)
7224            })
7225        },
7226        _clear: function (t, e) {
7227            function i(e, i, n) {
7228                return function (t) {
7229                    n._trigger(e, t, i._uiHash(i))
7230                }
7231            }
7232
7233            this.reverting = !1;
7234            var n, s = [];
7235            if (!this._noFinalSort && this.currentItem.parent().length && this.placeholder.before(this.currentItem), this._noFinalSort = null, this.helper[0] === this.currentItem[0]) {
7236                for (n in this._storedCSS) "auto" !== this._storedCSS[n] && "static" !== this._storedCSS[n] || (this._storedCSS[n] = "");
7237                this.currentItem.css(this._storedCSS), this._removeClass(this.currentItem, "ui-sortable-helper")
7238            } else this.currentItem.show();
7239            for (this.fromOutside && !e && s.push(function (t) {
7240                this._trigger("receive", t, this._uiHash(this.fromOutside))
7241            }), !this.fromOutside && this.domPosition.prev === this.currentItem.prev().not(".ui-sortable-helper")[0] && this.domPosition.parent === this.currentItem.parent()[0] || e || s.push(function (t) {
7242                this._trigger("update", t, this._uiHash())
7243            }), this !== this.currentContainer && (e || (s.push(function (t) {
7244                this._trigger("remove", t, this._uiHash())
7245            }), s.push(function (e) {
7246                return function (t) {
7247                    e._trigger("receive", t, this._uiHash(this))
7248                }
7249            }.call(this, this.currentContainer)), s.push(function (e) {
7250                return function (t) {
7251                    e._trigger("update", t, this._uiHash(this))
7252                }
7253            }.call(this, this.currentContainer)))), n = this.containers.length - 1; 0 <= n; n--) e || s.push(i("deactivate", this, this.containers[n])), this.containers[n].containerCache.over && (s.push(i("out", this, this.containers[n])), this.containers[n].containerCache.over = 0);
7254            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, e || this._trigger("beforeStop", t, this._uiHash()), this.placeholder[0].parentNode.removeChild(this.placeholder[0]), this.cancelHelperRemoval || (this.helper[0] !== this.currentItem[0] && this.helper.remove(), this.helper = null), !e) {
7255                for (n = 0; s.length > n; n++) s[n].call(this, t);
7256                this._trigger("stop", t, this._uiHash())
7257            }
7258            return this.fromOutside = !1, !this.cancelHelperRemoval
7259        },
7260        _trigger: function () {
7261            !1 === k.Widget.prototype._trigger.apply(this, arguments) && this.cancel()
7262        },
7263        _uiHash: function (t) {
7264            var e = t || this;
7265            return {
7266                helper: e.helper,
7267                placeholder: e.placeholder || k([]),
7268                position: e.position,
7269                originalPosition: e.originalPosition,
7270                offset: e.positionAbs,
7271                item: e.currentItem,
7272                sender: t ? t.element : null
7273            }
7274        }
7275    }), k.widget("ui.spinner", {
7276        version: "1.12.1",
7277        defaultElement: "<input>",
7278        widgetEventPrefix: "spin",
7279        options: {
7280            classes: {
7281                "ui-spinner": "ui-corner-all",
7282                "ui-spinner-down": "ui-corner-br",
7283                "ui-spinner-up": "ui-corner-tr"
7284            },
7285            culture: null,
7286            icons: {down: "ui-icon-triangle-1-s", up: "ui-icon-triangle-1-n"},
7287            incremental: !0,
7288            max: null,
7289            min: null,
7290            numberFormat: null,
7291            page: 10,
7292            step: 1,
7293            change: null,
7294            spin: null,
7295            start: null,
7296            stop: null
7297        },
7298        _create: function () {
7299            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, {
7300                beforeunload: function () {
7301                    this.element.removeAttr("autocomplete")
7302                }
7303            })
7304        },
7305        _getCreateOptions: function () {
7306            var n = this._super(), s = this.element;
7307            return k.each(["min", "max", "step"], function (t, e) {
7308                var i = s.attr(e);
7309                null != i && i.length && (n[e] = i)
7310            }), n
7311        },
7312        _events: {
7313            keydown: function (t) {
7314                this._start(t) && this._keydown(t) && t.preventDefault()
7315            }, keyup: "_stop", focus: function () {
7316                this.previous = this.element.val()
7317            }, blur: function (t) {
7318                return this.cancelBlur ? void delete this.cancelBlur : (this._stop(), this._refresh(), void (this.previous !== this.element.val() && this._trigger("change", t)))
7319            }, mousewheel: function (t, e) {
7320                if (e) {
7321                    if (!this.spinning && !this._start(t)) return !1;
7322                    this._spin((0 < e ? 1 : -1) * this.options.step, t), clearTimeout(this.mousewheelTimer), this.mousewheelTimer = this._delay(function () {
7323                        this.spinning && this._stop(t)
7324                    }, 100), t.preventDefault()
7325                }
7326            }, "mousedown .ui-spinner-button": function (t) {
7327                function e() {
7328                    this.element[0] === k.ui.safeActiveElement(this.document[0]) || (this.element.trigger("focus"), this.previous = i, this._delay(function () {
7329                        this.previous = i
7330                    }))
7331                }
7332
7333                var i;
7334                i = this.element[0] === k.ui.safeActiveElement(this.document[0]) ? this.previous : this.element.val(), t.preventDefault(), e.call(this), this.cancelBlur = !0, this._delay(function () {
7335                    delete this.cancelBlur, e.call(this)
7336                }), !1 !== this._start(t) && this._repeat(null, k(t.currentTarget).hasClass("ui-spinner-up") ? 1 : -1, t)
7337            }, "mouseup .ui-spinner-button": "_stop", "mouseenter .ui-spinner-button": function (t) {
7338                return k(t.currentTarget).hasClass("ui-state-active") ? !1 !== this._start(t) && void this._repeat(null, k(t.currentTarget).hasClass("ui-spinner-up") ? 1 : -1, t) : void 0
7339            }, "mouseleave .ui-spinner-button": "_stop"
7340        },
7341        _enhance: function () {
7342            this.uiSpinner = this.element.attr("autocomplete", "off").wrap("<span>").parent().append("<a></a><a></a>")
7343        },
7344        _draw: function () {
7345            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({
7346                icon: this.options.icons.up,
7347                showLabel: !1
7348            }), this.buttons.last().button({
7349                icon: this.options.icons.down,
7350                showLabel: !1
7351            }), this.buttons.height() > Math.ceil(.5 * this.uiSpinner.height()) && 0 < this.uiSpinner.height() && this.uiSpinner.height(this.uiSpinner.height())
7352        },
7353        _keydown: function (t) {
7354            var e = this.options, i = k.ui.keyCode;
7355            switch (t.keyCode) {
7356                case i.UP:
7357                    return this._repeat(null, 1, t), !0;
7358                case i.DOWN:
7359                    return this._repeat(null, -1, t), !0;
7360                case i.PAGE_UP:
7361                    return this._repeat(null, e.page, t), !0;
7362                case i.PAGE_DOWN:
7363                    return this._repeat(null, -e.page, t), !0
7364            }
7365            return !1
7366        },
7367        _start: function (t) {
7368            return !(!this.spinning && !1 === this._trigger("start", t)) && (this.counter || (this.counter = 1), this.spinning = !0)
7369        },
7370        _repeat: function (t, e, i) {
7371            t = t || 500, clearTimeout(this.timer), this.timer = this._delay(function () {
7372                this._repeat(40, e, i)
7373            }, t), this._spin(e * this.options.step, i)
7374        },
7375        _spin: function (t, e) {
7376            var i = this.value() || 0;
7377            this.counter || (this.counter = 1), i = this._adjustValue(i + t * this._increment(this.counter)), this.spinning && !1 === this._trigger("spin", e, {value: i}) || (this._value(i), this.counter++)
7378        },
7379        _increment: function (t) {
7380            var e = this.options.incremental;
7381            return e ? k.isFunction(e) ? e(t) : Math.floor(t * t * t / 5e4 - t * t / 500 + 17 * t / 200 + 1) : 1
7382        },
7383        _precision: function () {
7384            var t = this._precisionOf(this.options.step);
7385            return null !== this.options.min && (t = Math.max(t, this._precisionOf(this.options.min))), t
7386        },
7387        _precisionOf: function (t) {
7388            var e = "" + t, i = e.indexOf(".");
7389            return -1 === i ? 0 : e.length - i - 1
7390        },
7391        _adjustValue: function (t) {
7392            var e, i, n = this.options;
7393            return i = t - (e = null !== n.min ? n.min : 0), t = e + (i = Math.round(i / n.step) * n.step), t = parseFloat(t.toFixed(this._precision())), null !== n.max && t > n.max ? n.max : null !== n.min && n.min > t ? n.min : t
7394        },
7395        _stop: function (t) {
7396            this.spinning && (clearTimeout(this.timer), clearTimeout(this.mousewheelTimer), this.counter = 0, this.spinning = !1, this._trigger("stop", t))
7397        },
7398        _setOption: function (t, e) {
7399            var i, n, s;
7400            return "culture" === t || "numberFormat" === t ? (i = this._parse(this.element.val()), this.options[t] = e, void this.element.val(this._format(i))) : ("max" !== t && "min" !== t && "step" !== t || "string" != typeof e || (e = this._parse(e)), "icons" === t && (n = this.buttons.first().find(".ui-icon"), this._removeClass(n, null, this.options.icons.up), this._addClass(n, null, e.up), s = this.buttons.last().find(".ui-icon"), this._removeClass(s, null, this.options.icons.down), this._addClass(s, null, e.down)), void this._super(t, e))
7401        },
7402        _setOptionDisabled: function (t) {
7403            this._super(t), this._toggleClass(this.uiSpinner, null, "ui-state-disabled", !!t), this.element.prop("disabled", !!t), this.buttons.button(t ? "disable" : "enable")
7404        },
7405        _setOptions: e(function (t) {
7406            this._super(t)
7407        }),
7408        _parse: function (t) {
7409            return "string" == typeof t && "" !== t && (t = window.Globalize && this.options.numberFormat ? Globalize.parseFloat(t, 10, this.options.culture) : +t), "" === t || isNaN(t) ? null : t
7410        },
7411        _format: function (t) {
7412            return "" === t ? "" : window.Globalize && this.options.numberFormat ? Globalize.format(t, this.options.numberFormat, this.options.culture) : t
7413        },
7414        _refresh: function () {
7415            this.element.attr({
7416                "aria-valuemin": this.options.min,
7417                "aria-valuemax": this.options.max,
7418                "aria-valuenow": this._parse(this.element.val())
7419            })
7420        },
7421        isValid: function () {
7422            var t = this.value();
7423            return null !== t && t === this._adjustValue(t)
7424        },
7425        _value: function (t, e) {
7426            var i;
7427            "" === t || null !== (i = this._parse(t)) && (e || (i = this._adjustValue(i)), t = this._format(i)), this.element.val(t), this._refresh()
7428        },
7429        _destroy: function () {
7430            this.element.prop("disabled", !1).removeAttr("autocomplete role aria-valuemin aria-valuemax aria-valuenow"), this.uiSpinner.replaceWith(this.element)
7431        },
7432        stepUp: e(function (t) {
7433            this._stepUp(t)
7434        }),
7435        _stepUp: function (t) {
7436            this._start() && (this._spin((t || 1) * this.options.step), this._stop())
7437        },
7438        stepDown: e(function (t) {
7439            this._stepDown(t)
7440        }),
7441        _stepDown: function (t) {
7442            this._start() && (this._spin((t || 1) * -this.options.step), this._stop())
7443        },
7444        pageUp: e(function (t) {
7445            this._stepUp((t || 1) * this.options.page)
7446        }),
7447        pageDown: e(function (t) {
7448            this._stepDown((t || 1) * this.options.page)
7449        }),
7450        value: function (t) {
7451            return arguments.length ? void e(this._value).call(this, t) : this._parse(this.element.val())
7452        },
7453        widget: function () {
7454            return this.uiSpinner
7455        }
7456    }), !1 !== k.uiBackCompat && k.widget("ui.spinner", k.ui.spinner, {
7457        _enhance: function () {
7458            this.uiSpinner = this.element.attr("autocomplete", "off").wrap(this._uiSpinnerHtml()).parent().append(this._buttonHtml())
7459        }, _uiSpinnerHtml: function () {
7460            return "<span>"
7461        }, _buttonHtml: function () {
7462            return "<a></a><a></a>"
7463        }
7464    }), k.ui.spinner, k.widget("ui.tabs", {
7465        version: "1.12.1",
7466        delay: 300,
7467        options: {
7468            active: null,
7469            classes: {
7470                "ui-tabs": "ui-corner-all",
7471                "ui-tabs-nav": "ui-corner-all",
7472                "ui-tabs-panel": "ui-corner-bottom",
7473                "ui-tabs-tab": "ui-corner-top"
7474            },
7475            collapsible: !1,
7476            event: "click",
7477            heightStyle: "content",
7478            hide: null,
7479            show: null,
7480            activate: null,
7481            beforeActivate: null,
7482            beforeLoad: null,
7483            load: null
7484        },
7485        _isLocal: (ot = /#.*$/, function (t) {
7486            var e, i;
7487            e = t.href.replace(ot, ""), i = location.href.replace(ot, "");
7488            try {
7489                e = decodeURIComponent(e)
7490            } catch (t) {
7491            }
7492            try {
7493                i = decodeURIComponent(i)
7494            } catch (t) {
7495            }
7496            return 1 < t.hash.length && e === i
7497        }),
7498        _create: function () {
7499            var e = this, t = this.options;
7500            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(), k.isArray(t.disabled) && (t.disabled = k.unique(t.disabled.concat(k.map(this.tabs.filter(".ui-state-disabled"), function (t) {
7501                return e.tabs.index(t)
7502            }))).sort()), this.active = !1 !== this.options.active && this.anchors.length ? this._findActive(t.active) : k(), this._refresh(), this.active.length && this.load(t.active)
7503        },
7504        _initialActive: function () {
7505            var i = this.options.active, t = this.options.collapsible, n = location.hash.substring(1);
7506            return null === i && (n && this.tabs.each(function (t, e) {
7507                return k(e).attr("aria-controls") === n ? (i = t, !1) : void 0
7508            }), null === i && (i = this.tabs.index(this.tabs.filter(".ui-tabs-active"))), null !== i && -1 !== i || (i = !!this.tabs.length && 0)), !1 !== i && (-1 === (i = this.tabs.index(this.tabs.eq(i))) && (i = !t && 0)), !t && !1 === i && this.anchors.length && (i = 0), i
7509        },
7510        _getCreateEventData: function () {
7511            return {tab: this.active, panel: this.active.length ? this._getPanelForTab(this.active) : k()}
7512        },
7513        _tabKeydown: function (t) {
7514            var e = k(k.ui.safeActiveElement(this.document[0])).closest("li"), i = this.tabs.index(e), n = !0;
7515            if (!this._handlePageNav(t)) {
7516                switch (t.keyCode) {
7517                    case k.ui.keyCode.RIGHT:
7518                    case k.ui.keyCode.DOWN:
7519                        i++;
7520                        break;
7521                    case k.ui.keyCode.UP:
7522                    case k.ui.keyCode.LEFT:
7523                        n = !1, i--;
7524                        break;
7525                    case k.ui.keyCode.END:
7526                        i = this.anchors.length - 1;
7527                        break;
7528                    case k.ui.keyCode.HOME:
7529                        i = 0;
7530                        break;
7531                    case k.ui.keyCode.SPACE:
7532                        return t.preventDefault(), clearTimeout(this.activating), void this._activate(i);
7533                    case k.ui.keyCode.ENTER:
7534                        return t.preventDefault(), clearTimeout(this.activating), void this._activate(i !== this.options.active && i);
7535                    default:
7536                        return
7537                }
7538                t.preventDefault(), clearTimeout(this.activating), i = this._focusNextTab(i, n), t.ctrlKey || t.metaKey || (e.attr("aria-selected", "false"), this.tabs.eq(i).attr("aria-selected", "true"), this.activating = this._delay(function () {
7539                    this.option("active", i)
7540                }, this.delay))
7541            }
7542        },
7543        _panelKeydown: function (t) {
7544            this._handlePageNav(t) || t.ctrlKey && t.keyCode === k.ui.keyCode.UP && (t.preventDefault(), this.active.trigger("focus"))
7545        },
7546        _handlePageNav: function (t) {
7547            return t.altKey && t.keyCode === k.ui.keyCode.PAGE_UP ? (this._activate(this._focusNextTab(this.options.active - 1, !1)), !0) : t.altKey && t.keyCode === k.ui.keyCode.PAGE_DOWN ? (this._activate(this._focusNextTab(this.options.active + 1, !0)), !0) : void 0
7548        },
7549        _findNextTab: function (t, e) {
7550            for (var i = this.tabs.length - 1; -1 !== k.inArray((i < t && (t = 0), t < 0 && (t = i), t), this.options.disabled);) t = e ? t + 1 : t - 1;
7551            return t
7552        },
7553        _focusNextTab: function (t, e) {
7554            return t = this._findNextTab(t, e), this.tabs.eq(t).trigger("focus"), t
7555        },
7556        _setOption: function (t, e) {
7557            return "active" === t ? void this._activate(e) : (this._super(t, e), "collapsible" === t && (this._toggleClass("ui-tabs-collapsible", null, e), e || !1 !== this.options.active || this._activate(0)), "event" === t && this._setupEvents(e), void ("heightStyle" === t && this._setupHeightStyle(e)))
7558        },
7559        _sanitizeSelector: function (t) {
7560            return t ? t.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g, "\\$&") : ""
7561        },
7562        refresh: function () {
7563            var t = this.options, e = this.tablist.children(":has(a[href])");
7564            t.disabled = k.map(e.filter(".ui-state-disabled"), function (t) {
7565                return e.index(t)
7566            }), this._processTabs(), !1 !== t.active && this.anchors.length ? this.active.length && !k.contains(this.tablist[0], this.active[0]) ? this.tabs.length === t.disabled.length ? (t.active = !1, this.active = k()) : this._activate(this._findNextTab(Math.max(0, t.active - 1), !1)) : t.active = this.tabs.index(this.active) : (t.active = !1, this.active = k()), this._refresh()
7567        },
7568        _refresh: function () {
7569            this._setOptionDisabled(this.options.disabled), this._setupEvents(this.options.event), this._setupHeightStyle(this.options.heightStyle), this.tabs.not(this.active).attr({
7570                "aria-selected": "false",
7571                "aria-expanded": "false",
7572                tabIndex: -1
7573            }), this.panels.not(this._getPanelForTab(this.active)).hide().attr({"aria-hidden": "true"}), this.active.length ? (this.active.attr({
7574                "aria-selected": "true",
7575                "aria-expanded": "true",
7576                tabIndex: 0
7577            }), 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)
7578        },
7579        _processTabs: function () {
7580            var l = this, t = this.tabs, e = this.anchors, i = this.panels;
7581            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) {
7582                k(this).is(".ui-state-disabled") && t.preventDefault()
7583            }).on("focus" + this.eventNamespace, ".ui-tabs-anchor", function () {
7584                k(this).closest("li").is(".ui-state-disabled") && this.blur()
7585            }), this.tabs = this.tablist.find("> li:has(a[href])").attr({
7586                role: "tab",
7587                tabIndex: -1
7588            }), this._addClass(this.tabs, "ui-tabs-tab", "ui-state-default"), this.anchors = this.tabs.map(function () {
7589                return k("a", this)[0]
7590            }).attr({
7591                role: "presentation",
7592                tabIndex: -1
7593            }), this._addClass(this.anchors, "ui-tabs-anchor"), this.panels = k(), this.anchors.each(function (t, e) {
7594                var i, n, s, o = k(e).uniqueId().attr("id"), a = k(e).closest("li"), r = a.attr("aria-controls");
7595                l._isLocal(e) ? (s = (i = e.hash).substring(1), n = l.element.find(l._sanitizeSelector(i))) : (i = "#" + (s = a.attr("aria-controls") || k({}).uniqueId()[0].id), (n = l.element.find(i)).length || (n = l._createPanel(s)).insertAfter(l.panels[t - 1] || l.tablist), n.attr("aria-live", "polite")), n.length && (l.panels = l.panels.add(n)), r && a.data("ui-tabs-aria-controls", r), a.attr({
7596                    "aria-controls": s,
7597                    "aria-labelledby": o
7598                }), n.attr("aria-labelledby", o)
7599            }), this.panels.attr("role", "tabpanel"), this._addClass(this.panels, "ui-tabs-panel", "ui-widget-content"), t && (this._off(t.not(this.tabs)), this._off(e.not(this.anchors)), this._off(i.not(this.panels)))
7600        },
7601        _getList: function () {
7602            return this.tablist || this.element.find("ol, ul").eq(0)
7603        },
7604        _createPanel: function (t) {
7605            return k("<div>").attr("id", t).data("ui-tabs-destroy", !0)
7606        },
7607        _setOptionDisabled: function (t) {
7608            var e, i, n;
7609            for (k.isArray(t) && (t.length ? t.length === this.anchors.length && (t = !0) : t = !1), n = 0; i = this.tabs[n]; n++) e = k(i), !0 === t || -1 !== k.inArray(n, t) ? (e.attr("aria-disabled", "true"), this._addClass(e, null, "ui-state-disabled")) : (e.removeAttr("aria-disabled"), this._removeClass(e, null, "ui-state-disabled"));
7610            this.options.disabled = t, this._toggleClass(this.widget(), this.widgetFullName + "-disabled", null, !0 === t)
7611        },
7612        _setupEvents: function (t) {
7613            var i = {};
7614            t && k.each(t.split(" "), function (t, e) {
7615                i[e] = "_eventHandler"
7616            }), this._off(this.anchors.add(this.tabs).add(this.panels)), this._on(!0, this.anchors, {
7617                click: function (t) {
7618                    t.preventDefault()
7619                }
7620            }), 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)
7621        },
7622        _setupHeightStyle: function (t) {
7623            var i, e = this.element.parent();
7624            "fill" === t ? (i = e.height(), i -= this.element.outerHeight() - this.element.height(), this.element.siblings(":visible").each(function () {
7625                var t = k(this), e = t.css("position");
7626                "absolute" !== e && "fixed" !== e && (i -= t.outerHeight(!0))
7627            }), this.element.children().not(this.panels).each(function () {
7628                i -= k(this).outerHeight(!0)
7629            }), this.panels.each(function () {
7630                k(this).height(Math.max(0, i - k(this).innerHeight() + k(this).height()))
7631            }).css("overflow", "auto")) : "auto" === t && (i = 0, this.panels.each(function () {
7632                i = Math.max(i, k(this).height("").height())
7633            }).height(i))
7634        },
7635        _eventHandler: function (t) {
7636            var e = this.options, i = this.active, n = k(t.currentTarget).closest("li"), s = n[0] === i[0],
7637                o = s && e.collapsible, a = o ? k() : this._getPanelForTab(n),
7638                r = i.length ? this._getPanelForTab(i) : k(),
7639                l = {oldTab: i, oldPanel: r, newTab: o ? k() : n, newPanel: a};
7640            t.preventDefault(), n.hasClass("ui-state-disabled") || n.hasClass("ui-tabs-loading") || this.running || s && !e.collapsible || !1 === this._trigger("beforeActivate", t, l) || (e.active = !o && this.tabs.index(n), this.active = s ? k() : n, this.xhr && this.xhr.abort(), r.length || a.length || k.error("jQuery UI Tabs: Mismatching fragment identifier."), a.length && this.load(this.tabs.index(n), t), this._toggle(t, l))
7641        },
7642        _toggle: function (t, e) {
7643            function i() {
7644                s.running = !1, s._trigger("activate", t, e)
7645            }
7646
7647            function n() {
7648                s._addClass(e.newTab.closest("li"), "ui-tabs-active", "ui-state-active"), o.length && s.options.show ? s._show(o, s.options.show, i) : (o.show(), i())
7649            }
7650
7651            var s = this, o = e.newPanel, a = e.oldPanel;
7652            this.running = !0, a.length && this.options.hide ? this._hide(a, this.options.hide, function () {
7653                s._removeClass(e.oldTab.closest("li"), "ui-tabs-active", "ui-state-active"), n()
7654            }) : (this._removeClass(e.oldTab.closest("li"), "ui-tabs-active", "ui-state-active"), a.hide(), n()), a.attr("aria-hidden", "true"), e.oldTab.attr({
7655                "aria-selected": "false",
7656                "aria-expanded": "false"
7657            }), o.length && a.length ? e.oldTab.attr("tabIndex", -1) : o.length && this.tabs.filter(function () {
7658                return 0 === k(this).attr("tabIndex")
7659            }).attr("tabIndex", -1), o.attr("aria-hidden", "false"), e.newTab.attr({
7660                "aria-selected": "true",
7661                "aria-expanded": "true",
7662                tabIndex: 0
7663            })
7664        },
7665        _activate: function (t) {
7666            var e, i = this._findActive(t);
7667            i[0] !== this.active[0] && (i.length || (i = this.active), e = i.find(".ui-tabs-anchor")[0], this._eventHandler({
7668                target: e,
7669                currentTarget: e,
7670                preventDefault: k.noop
7671            }))
7672        },
7673        _findActive: function (t) {
7674            return !1 === t ? k() : this.tabs.eq(t)
7675        },
7676        _getIndex: function (t) {
7677            return "string" == typeof t && (t = this.anchors.index(this.anchors.filter("[href$='" + k.ui.escapeSelector(t) + "']"))), t
7678        },
7679        _destroy: function () {
7680            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 () {
7681                k.data(this, "ui-tabs-destroy") ? k(this).remove() : k(this).removeAttr("role tabIndex aria-live aria-busy aria-selected aria-labelledby aria-hidden aria-expanded")
7682            }), this.tabs.each(function () {
7683                var t = k(this), e = t.data("ui-tabs-aria-controls");
7684                e ? t.attr("aria-controls", e).removeData("ui-tabs-aria-controls") : t.removeAttr("aria-controls")
7685            }), this.panels.show(), "content" !== this.options.heightStyle && this.panels.css("height", "")
7686        },
7687        enable: function (i) {
7688            var t = this.options.disabled;
7689            !1 !== t && (t = void 0 !== i && (i = this._getIndex(i), k.isArray(t) ? k.map(t, function (t) {
7690                return t !== i ? t : null
7691            }) : k.map(this.tabs, function (t, e) {
7692                return e !== i ? e : null
7693            })), this._setOptionDisabled(t))
7694        },
7695        disable: function (t) {
7696            var e = this.options.disabled;
7697            if (!0 !== e) {
7698                if (void 0 === t) e = !0; else {
7699                    if (t = this._getIndex(t), -1 !== k.inArray(t, e)) return;
7700                    e = k.isArray(e) ? k.merge([t], e).sort() : [t]
7701                }
7702                this._setOptionDisabled(e)
7703            }
7704        },
7705        load: function (t, n) {
7706            t = this._getIndex(t);
7707
7708            function s(t, e) {
7709                "abort" === e && o.panels.stop(!1, !0), o._removeClass(i, "ui-tabs-loading"), a.removeAttr("aria-busy"), t === o.xhr && delete o.xhr
7710            }
7711
7712            var o = this, i = this.tabs.eq(t), e = i.find(".ui-tabs-anchor"), a = this._getPanelForTab(i),
7713                r = {tab: i, panel: a};
7714            this._isLocal(e[0]) || (this.xhr = k.ajax(this._ajaxSettings(e, n, r)), this.xhr && "canceled" !== this.xhr.statusText && (this._addClass(i, "ui-tabs-loading"), a.attr("aria-busy", "true"), this.xhr.done(function (t, e, i) {
7715                setTimeout(function () {
7716                    a.html(t), o._trigger("load", n, r), s(i, e)
7717                }, 1)
7718            }).fail(function (t, e) {
7719                setTimeout(function () {
7720                    s(t, e)
7721                }, 1)
7722            })))
7723        },
7724        _ajaxSettings: function (t, i, n) {
7725            var s = this;
7726            return {
7727                url: t.attr("href").replace(/#.*$/, ""), beforeSend: function (t, e) {
7728                    return s._trigger("beforeLoad", i, k.extend({jqXHR: t, ajaxSettings: e}, n))
7729                }
7730            }
7731        },
7732        _getPanelForTab: function (t) {
7733            var e = k(t).attr("aria-controls");
7734            return this.element.find(this._sanitizeSelector("#" + e))
7735        }
7736    }), !1 !== k.uiBackCompat && k.widget("ui.tabs", k.ui.tabs, {
7737        _processTabs: function () {
7738            this._superApply(arguments), this._addClass(this.tabs, "ui-tab")
7739        }
7740    }), k.ui.tabs, k.widget("ui.tooltip", {
7741        version: "1.12.1", options: {
7742            classes: {"ui-tooltip": "ui-corner-all ui-widget-shadow"},
7743            content: function () {
7744                var t = k(this).attr("title") || "";
7745                return k("<a>").text(t).html()
7746            },
7747            hide: !0,
7748            items: "[title]:not([disabled])",
7749            position: {my: "left top+15", at: "left bottom", collision: "flipfit flip"},
7750            show: !0,
7751            track: !1,
7752            close: null,
7753            open: null
7754        }, _addDescribedBy: function (t, e) {
7755            var i = (t.attr("aria-describedby") || "").split(/\s+/);
7756            i.push(e), t.data("ui-tooltip-id", e).attr("aria-describedby", k.trim(i.join(" ")))
7757        }, _removeDescribedBy: function (t) {
7758            var e = t.data("ui-tooltip-id"), i = (t.attr("aria-describedby") || "").split(/\s+/), n = k.inArray(e, i);
7759            -1 !== n && i.splice(n, 1), t.removeData("ui-tooltip-id"), (i = k.trim(i.join(" "))) ? t.attr("aria-describedby", i) : t.removeAttr("aria-describedby")
7760        }, _create: function () {
7761            this._on({
7762                mouseover: "open",
7763                focusin: "open"
7764            }), this.tooltips = {}, this.parents = {}, this.liveRegion = k("<div>").attr({
7765                role: "log",
7766                "aria-live": "assertive",
7767                "aria-relevant": "additions"
7768            }).appendTo(this.document[0].body), this._addClass(this.liveRegion, null, "ui-helper-hidden-accessible"), this.disabledTitles = k([])
7769        }, _setOption: function (t, e) {
7770            var i = this;
7771            this._super(t, e), "content" === t && k.each(this.tooltips, function (t, e) {
7772                i._updateContent(e.element)
7773            })
7774        }, _setOptionDisabled: function (t) {
7775            this[t ? "_disable" : "_enable"]()
7776        }, _disable: function () {
7777            var n = this;
7778            k.each(this.tooltips, function (t, e) {
7779                var i = k.Event("blur");
7780                i.target = i.currentTarget = e.element[0], n.close(i, !0)
7781            }), this.disabledTitles = this.disabledTitles.add(this.element.find(this.options.items).addBack().filter(function () {
7782                var t = k(this);
7783                return t.is("[title]") ? t.data("ui-tooltip-title", t.attr("title")).removeAttr("title") : void 0
7784            }))
7785        }, _enable: function () {
7786            this.disabledTitles.each(function () {
7787                var t = k(this);
7788                t.data("ui-tooltip-title") && t.attr("title", t.data("ui-tooltip-title"))
7789            }), this.disabledTitles = k([])
7790        }, open: function (t) {
7791            var i = this, e = k(t ? t.target : this.element).closest(this.options.items);
7792            e.length && !e.data("ui-tooltip-id") && (e.attr("title") && e.data("ui-tooltip-title", e.attr("title")), e.data("ui-tooltip-open", !0), t && "mouseover" === t.type && e.parents().each(function () {
7793                var t, e = k(this);
7794                e.data("ui-tooltip-open") && ((t = k.Event("blur")).target = t.currentTarget = this, i.close(t, !0)), e.attr("title") && (e.uniqueId(), i.parents[this.id] = {
7795                    element: this,
7796                    title: e.attr("title")
7797                }, e.attr("title", ""))
7798            }), this._registerCloseHandlers(t, e), this._updateContent(e, t))
7799        }, _updateContent: function (e, i) {
7800            var t, n = this.options.content, s = this, o = i ? i.type : null;
7801            return "string" == typeof n || n.nodeType || n.jquery ? this._open(i, e, n) : void ((t = n.call(e[0], function (t) {
7802                s._delay(function () {
7803                    e.data("ui-tooltip-open") && (i && (i.type = o), this._open(i, e, t))
7804                })
7805            })) && this._open(i, e, t))
7806        }, _open: function (t, e, i) {
7807            function n(t) {
7808                l.of = t, o.is(":hidden") || o.position(l)
7809            }
7810
7811            var s, o, a, r, l = k.extend({}, this.options.position);
7812            if (i) {
7813                if (s = this._find(e)) return void s.tooltip.find(".ui-tooltip-content").html(i);
7814                e.is("[title]") && (t && "mouseover" === t.type ? e.attr("title", "") : e.removeAttr("title")), s = this._tooltip(e), o = s.tooltip, this._addDescribedBy(e, o.attr("id")), o.find(".ui-tooltip-content").html(i), this.liveRegion.children().hide(), (r = k("<div>").html(o.find(".ui-tooltip-content").html())).removeAttr("name").find("[name]").removeAttr("name"), r.removeAttr("id").find("[id]").removeAttr("id"), r.appendTo(this.liveRegion), this.options.track && t && /^mouse/.test(t.type) ? (this._on(this.document, {mousemove: n}), n(t)) : o.position(k.extend({of: e}, this.options.position)), o.hide(), this._show(o, this.options.show), this.options.track && this.options.show && this.options.show.delay && (a = this.delayedShow = setInterval(function () {
7815                    o.is(":visible") && (n(l.of), clearInterval(a))
7816                }, k.fx.interval)), this._trigger("open", t, {tooltip: o})
7817            }
7818        }, _registerCloseHandlers: function (t, i) {
7819            var e = {
7820                keyup: function (t) {
7821                    if (t.keyCode === k.ui.keyCode.ESCAPE) {
7822                        var e = k.Event(t);
7823                        e.currentTarget = i[0], this.close(e, !0)
7824                    }
7825                }
7826            };
7827            i[0] !== this.element[0] && (e.remove = function () {
7828                this._removeTooltip(this._find(i).tooltip)
7829            }), t && "mouseover" !== t.type || (e.mouseleave = "close"), t && "focusin" !== t.type || (e.focusout = "close"), this._on(!0, i, e)
7830        }, close: function (t) {
7831            var e, i = this, n = k(t ? t.currentTarget : this.element), s = this._find(n);
7832            return s ? (e = s.tooltip, void (s.closing || (clearInterval(this.delayedShow), n.data("ui-tooltip-title") && !n.attr("title") && n.attr("title", n.data("ui-tooltip-title")), this._removeDescribedBy(n), s.hiding = !0, e.stop(!0), this._hide(e, this.options.hide, function () {
7833                i._removeTooltip(k(this))
7834            }), n.removeData("ui-tooltip-open"), this._off(n, "mouseleave focusout keyup"), n[0] !== this.element[0] && this._off(n, "remove"), this._off(this.document, "mousemove"), t && "mouseleave" === t.type && k.each(this.parents, function (t, e) {
7835                k(e.element).attr("title", e.title), delete i.parents[t]
7836            }), s.closing = !0, this._trigger("close", t, {tooltip: e}), s.hiding || (s.closing = !1)))) : void n.removeData("ui-tooltip-open")
7837        }, _tooltip: function (t) {
7838            var e = k("<div>").attr("role", "tooltip"), i = k("<div>").appendTo(e), n = e.uniqueId().attr("id");
7839            return this._addClass(i, "ui-tooltip-content"), this._addClass(e, "ui-tooltip", "ui-widget ui-widget-content"), e.appendTo(this._appendTo(t)), this.tooltips[n] = {
7840                element: t,
7841                tooltip: e
7842            }
7843        }, _find: function (t) {
7844            var e = t.data("ui-tooltip-id");
7845            return e ? this.tooltips[e] : null
7846        }, _removeTooltip: function (t) {
7847            t.remove(), delete this.tooltips[t.attr("id")]
7848        }, _appendTo: function (t) {
7849            var e = t.closest(".ui-front, dialog");
7850            return e.length || (e = this.document[0].body), e
7851        }, _destroy: function () {
7852            var s = this;
7853            k.each(this.tooltips, function (t, e) {
7854                var i = k.Event("blur"), n = e.element;
7855                i.target = i.currentTarget = n[0], s.close(i, !0), k("#" + t).remove(), n.data("ui-tooltip-title") && (n.attr("title") || n.attr("title", n.data("ui-tooltip-title")), n.removeData("ui-tooltip-title"))
7856            }), this.liveRegion.remove()
7857        }
7858    }), !1 !== k.uiBackCompat && k.widget("ui.tooltip", k.ui.tooltip, {
7859        options: {tooltipClass: null},
7860        _tooltip: function () {
7861            var t = this._superApply(arguments);
7862            return this.options.tooltipClass && t.tooltip.addClass(this.options.tooltipClass), t
7863        }
7864    }), k.ui.tooltip
7865}), "undefined" == typeof jQuery) throw new Error("Bootstrap's JavaScript requires jQuery");
7866!function () {
7867    "use strict";
7868    var t = jQuery.fn.jquery.split(" ")[0].split(".");
7869    if (t[0] < 2 && t[1] < 9 || 1 == t[0] && 9 == t[1] && t[2] < 1 || 3 < t[0]) throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 4")
7870}(), function (n) {
7871    "use strict";
7872    n.fn.emulateTransitionEnd = function (t) {
7873        var e = !1, i = this;
7874        n(this).one("bsTransitionEnd", function () {
7875            e = !0
7876        });
7877        return setTimeout(function () {
7878            e || n(i).trigger(n.support.transition.end)
7879        }, t), this
7880    }, n(function () {
7881        n.support.transition = function () {
7882            var t = document.createElement("bootstrap"), e = {
7883                WebkitTransition: "webkitTransitionEnd",
7884                MozTransition: "transitionend",
7885                OTransition: "oTransitionEnd otransitionend",
7886                transition: "transitionend"
7887            };
7888            for (var i in e) if (void 0 !== t.style[i]) return {end: e[i]};
7889            return !1
7890        }(), n.support.transition && (n.event.special.bsTransitionEnd = {
7891            bindType: n.support.transition.end,
7892            delegateType: n.support.transition.end,
7893            handle: function (t) {
7894                if (n(t.target).is(this)) return t.handleObj.handler.apply(this, arguments)
7895            }
7896        })
7897    })
7898}(jQuery), function (o) {
7899    "use strict";
7900
7901    function a(t) {
7902        o(t).on("click", e, this.close)
7903    }
7904
7905    var e = '[data-dismiss="alert"]';
7906    a.VERSION = "3.3.7", a.TRANSITION_DURATION = 150, a.prototype.close = function (t) {
7907        function e() {
7908            s.detach().trigger("closed.bs.alert").remove()
7909        }
7910
7911        var i = o(this), n = i.attr("data-target");
7912        n || (n = (n = i.attr("href")) && n.replace(/.*(?=#[^\s]*$)/, ""));
7913        var s = o("#" === n ? [] : n);
7914        t && t.preventDefault(), s.length || (s = i.closest(".alert")), s.trigger(t = o.Event("close.bs.alert")), t.isDefaultPrevented() || (s.removeClass("in"), o.support.transition && s.hasClass("fade") ? s.one("bsTransitionEnd", e).emulateTransitionEnd(a.TRANSITION_DURATION) : e())
7915    };
7916    var t = o.fn.alert;
7917    o.fn.alert = function (i) {
7918        return this.each(function () {
7919            var t = o(this), e = t.data("bs.alert");
7920            e || t.data("bs.alert", e = new a(this)), "string" == typeof i && e[i].call(t)
7921        })
7922    }, o.fn.alert.Constructor = a, o.fn.alert.noConflict = function () {
7923        return o.fn.alert = t, this
7924    }, o(document).on("click.bs.alert.data-api", e, a.prototype.close)
7925}(jQuery), function (o) {
7926    "use strict";
7927
7928    function i(n) {
7929        return this.each(function () {
7930            var t = o(this), e = t.data("bs.button"), i = "object" == typeof n && n;
7931            e || t.data("bs.button", e = new s(this, i)), "toggle" == n ? e.toggle(
vendor: 4,587 bytes, lines 7931-8004
7931) : n && e.setState(n)
7932        })
7933    }
7934
7935    var s = function (t, e) {
7936        this.$element = o(t), this.options = o.extend({}, s.DEFAULTS, e), this.isLoading = !1
7937    };
7938    s.VERSION = "3.3.7", s.DEFAULTS = {loadingText: "loading..."}, s.prototype.setState = function (t) {
7939        var e = "disabled", i = this.$element, n = i.is("input") ? "val" : "html", s = i.data();
7940        t += "Text", null == s.resetText && i.data("resetText", i[n]()), setTimeout(o.proxy(function () {
7941            i[n](null == s[t] ? this.options[t] : s[t]), "loadingText" == t ? (this.isLoading = !0, i.addClass(e).attr(e, e).prop(e, !0)) : this.isLoading && (this.isLoading = !1, i.removeClass(e).removeAttr(e).prop(e, !1))
7942        }, this), 0)
7943    }, s.prototype.toggle = function () {
7944        var t = !0, e = this.$element.closest('[data-toggle="buttons"]');
7945        if (e.length) {
7946            var i = this.$element.find("input");
7947            "radio" == i.prop("type") ? (i.prop("checked") && (t = !1), e.find(".active").removeClass("active"), this.$element.addClass("active")) : "checkbox" == i.prop("type") && (i.prop("checked") !== this.$element.hasClass("active") && (t = !1), this.$element.toggleClass("active")), i.prop("checked", this.$element.hasClass("active")), t && i.trigger("change")
7948        } else this.$element.attr("aria-pressed", !this.$element.hasClass("active")), this.$element.toggleClass("active")
7949    };
7950    var t = o.fn.button;
7951    o.fn.button = i, o.fn.button.Constructor = s, o.fn.button.noConflict = function () {
7952        return o.fn.button = t, this
7953    }, o(document).on("click.bs.button.data-api", '[data-toggle^="button"]', function (t) {
7954        var e = o(t.target).closest(".btn");
7955        i.call(e, "toggle"), o(t.target).is('input[type="radio"], input[type="checkbox"]') || (t.preventDefault(), e.is("input,button") ? e.trigger("focus") : e.find("input:visible,button:visible").first().trigger("focus"))
7956    }).on("focus.bs.button.data-api blur.bs.button.data-api", '[data-toggle^="button"]', function (t) {
7957        o(t.target).closest(".btn").toggleClass("focus", /^focus(in)?$/.test(t.type))
7958    })
7959}(jQuery), function (u) {
7960    "use strict";
7961
7962    function a(s) {
7963        return this.each(function () {
7964            var t = u(this), e = t.data("bs.carousel"),
7965                i = u.extend({}, d.DEFAULTS, t.data(), "object" == typeof s && s),
7966                n = "string" == typeof s ? s : i.slide;
7967            e || t.data("bs.carousel", e = new d(this, i)), "number" == typeof s ? e.to(s) : n ? e[n]() : i.interval && e.pause().cycle()
7968        })
7969    }
7970
7971    function d(t, e) {
7972        this.$element = u(t), this.$indicators = this.$element.find(".carousel-indicators"), this.options = e, this.paused = null, this.sliding = null, this.interval = null, this.$active = null, this.$items = null, this.options.keyboard && this.$element.on("keydown.bs.carousel", u.proxy(this.keydown, this)), "hover" != this.options.pause || "ontouchstart" in document.documentElement || this.$element.on("mouseenter.bs.carousel", u.proxy(this.pause, this)).on("mouseleave.bs.carousel", u.proxy(this.cycle, this))
7973    }
7974
7975    d.VERSION = "3.3.7", d.TRANSITION_DURATION = 600, d.DEFAULTS = {
7976        interval: 5e3,
7977        pause: "hover",
7978        wrap: !0,
7979        keyboard: !0
7980    }, d.prototype.keydown = function (t) {
7981        if (!/input|textarea/i.test(t.target.tagName)) {
7982            switch (t.which) {
7983                case 37:
7984                    this.prev();
7985                    break;
7986                case 39:
7987                    this.next();
7988                    break;
7989                default:
7990                    return
7991            }
7992            t.preventDefault()
7993        }
7994    }, d.prototype.cycle = function (t) {
7995        return t || (this.paused = !1), this.interval && clearInterval(this.interval), this.options.interval && !this.paused && (this.interval = setInterval(u.proxy(this.next, this), this.options.interval)), this
7996    }, d.prototype.getItemIndex = function (t) {
7997        return this.$items = t.parent().children(".item"), this.$items.index(t || this.$active)
7998    }, d.prototype.getItemForDirection = function (t, e) {
7999        var i = this.getItemIndex(e);
8000        if (("prev" == t && 0 === i || "next" == t && i == this.$items.length - 1) && !this.options.wrap) return e;
8001        var n = (i + ("prev" == t ? -1 : 1)) % this.$items.length;
8002        return this.$items.eq(n)
8003    }, d.prototype.to = function (t) {
8004        var e = this, i = this.getItemIndex(this.$active = this.$element.find(".
vendor: 8,681 bytes, lines 8004-8150
8004item.active"));
8005        if (!(t > this.$items.length - 1 || t < 0)) return this.sliding ? this.$element.one("slid.bs.carousel", function () {
8006            e.to(t)
8007        }) : i == t ? this.pause().cycle() : this.slide(i < t ? "next" : "prev", this.$items.eq(t))
8008    }, d.prototype.pause = function (t) {
8009        return t || (this.paused = !0), this.$element.find(".next, .prev").length && u.support.transition && (this.$element.trigger(u.support.transition.end), this.cycle(!0)), this.interval = clearInterval(this.interval), this
8010    }, d.prototype.next = function () {
8011        if (!this.sliding) return this.slide("next")
8012    }, d.prototype.prev = function () {
8013        if (!this.sliding) return this.slide("prev")
8014    }, d.prototype.slide = function (t, e) {
8015        var i = this.$element.find(".item.active"), n = e || this.getItemForDirection(t, i), s = this.interval,
8016            o = "next" == t ? "left" : "right", a = this;
8017        if (n.hasClass("active")) return this.sliding = !1;
8018        var r = n[0], l = u.Event("slide.bs.carousel", {relatedTarget: r, direction: o});
8019        if (this.$element.trigger(l), !l.isDefaultPrevented()) {
8020            if (this.sliding = !0, s && this.pause(), this.$indicators.length) {
8021                this.$indicators.find(".active").removeClass("active");
8022                var h = u(this.$indicators.children()[this.getItemIndex(n)]);
8023                h && h.addClass("active")
8024            }
8025            var c = u.Event("slid.bs.carousel", {relatedTarget: r, direction: o});
8026            return u.support.transition && this.$element.hasClass("slide") ? (n.addClass(t), n[0].offsetWidth, i.addClass(o), n.addClass(o), i.one("bsTransitionEnd", function () {
8027                n.removeClass([t, o].join(" ")).addClass("active"), i.removeClass(["active", o].join(" ")), a.sliding = !1, setTimeout(function () {
8028                    a.$element.trigger(c)
8029                }, 0)
8030            }).emulateTransitionEnd(d.TRANSITION_DURATION)) : (i.removeClass("active"), n.addClass("active"), this.sliding = !1, this.$element.trigger(c)), s && this.cycle(), this
8031        }
8032    };
8033    var t = u.fn.carousel;
8034    u.fn.carousel = a, u.fn.carousel.Constructor = d, u.fn.carousel.noConflict = function () {
8035        return u.fn.carousel = t, this
8036    };
8037
8038    function e(t) {
8039        var e, i = u(this), n = u(i.attr("data-target") || (e = i.attr("href")) && e.replace(/.*(?=#[^\s]+$)/, ""));
8040        if (n.hasClass("carousel")) {
8041            var s = u.extend({}, n.data(), i.data()), o = i.attr("data-slide-to");
8042            o && (s.interval = !1), a.call(n, s), o && n.data("bs.carousel").to(o), t.preventDefault()
8043        }
8044    }
8045
8046    u(document).on("click.bs.carousel.data-api", "[data-slide]", e).on("click.bs.carousel.data-api", "[data-slide-to]", e), u(window).on("load", function () {
8047        u('[data-ride="carousel"]').each(function () {
8048            var t = u(this);
8049            a.call(t, t.data())
8050        })
8051    })
8052}(jQuery), function (a) {
8053    "use strict";
8054
8055    function s(t) {
8056        var e, i = t.attr("data-target") || (e = t.attr("href")) && e.replace(/.*(?=#[^\s]+$)/, "");
8057        return a(i)
8058    }
8059
8060    function r(n) {
8061        return this.each(function () {
8062            var t = a(this), e = t.data("bs.collapse"),
8063                i = a.extend({}, l.DEFAULTS, t.data(), "object" == typeof n && n);
8064            !e && i.toggle && /show|hide/.test(n) && (i.toggle = !1), e || t.data("bs.collapse", e = new l(this, i)), "string" == typeof n && e[n]()
8065        })
8066    }
8067
8068    var l = function (t, e) {
8069        this.$element = a(t), this.options = a.extend({}, l.DEFAULTS, e), this.$trigger = a('[data-toggle="collapse"][href="#' + t.id + '"],[data-toggle="collapse"][data-target="#' + t.id + '"]'), this.transitioning = null, this.options.parent ? this.$parent = this.getParent() : this.addAriaAndCollapsedClass(this.$element, this.$trigger), this.options.toggle && this.toggle()
8070    };
8071    l.VERSION = "3.3.7", l.TRANSITION_DURATION = 350, l.DEFAULTS = {toggle: !0}, l.prototype.dimension = function () {
8072        return this.$element.hasClass("width") ? "width" : "height"
8073    }, l.prototype.show = function () {
8074        if (!this.transitioning && !this.$element.hasClass("in")) {
8075            var t, e = this.$parent && this.$parent.children(".panel").children(".in, .collapsing");
8076            if (!(e && e.length && ((t = e.data("bs.collapse")) && t.transitioning))) {
8077                var i = a.Event("show.bs.collapse");
8078                if (this.$element.trigger(i), !i.isDefaultPrevented()) {
8079                    e && e.length && (r.call(e, "hide"), t || e.data("bs.collapse", null));
8080                    var n = this.dimension();
8081                    this.$element.removeClass("collapse").addClass("collapsing")[n](0).attr("aria-expanded", !0), this.$trigger.removeClass("collapsed").attr("aria-expanded", !0), this.transitioning = 1;
8082                    var s = function () {
8083                        this.$element.removeClass("collapsing").addClass("collapse in")[n](""), this.transitioning = 0, this.$element.trigger("shown.bs.collapse")
8084                    };
8085                    if (!a.support.transition) return s.call(this);
8086                    var o = a.camelCase(["scroll", n].join("-"));
8087                    this.$element.one("bsTransitionEnd", a.proxy(s, this)).emulateTransitionEnd(l.TRANSITION_DURATION)[n](this.$element[0][o])
8088                }
8089            }
8090        }
8091    }, l.prototype.hide = function () {
8092        if (!this.transitioning && this.$element.hasClass("in")) {
8093            var t = a.Event("hide.bs.collapse");
8094            if (this.$element.trigger(t), !t.isDefaultPrevented()) {
8095                var e = this.dimension();
8096                this.$element[e](this.$element[e]())[0].offsetHeight, this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded", !1), this.$trigger.addClass("collapsed").attr("aria-expanded", !1), this.transitioning = 1;
8097                var i = function () {
8098                    this.transitioning = 0, this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")
8099                };
8100                return a.support.transition ? void this.$element[e](0).one("bsTransitionEnd", a.proxy(i, this)).emulateTransitionEnd(l.TRANSITION_DURATION) : i.call(this)
8101            }
8102        }
8103    }, l.prototype.toggle = function () {
8104        this[this.$element.hasClass("in") ? "hide" : "show"]()
8105    }, l.prototype.getParent = function () {
8106        return a(this.options.parent).find('[data-toggle="collapse"][data-parent="' + this.options.parent + '"]').each(a.proxy(function (t, e) {
8107            var i = a(e);
8108            this.addAriaAndCollapsedClass(s(i), i)
8109        }, this)).end()
8110    }, l.prototype.addAriaAndCollapsedClass = function (t, e) {
8111        var i = t.hasClass("in");
8112        t.attr("aria-expanded", i), e.toggleClass("collapsed", !i).attr("aria-expanded", i)
8113    };
8114    var t = a.fn.collapse;
8115    a.fn.collapse = r, a.fn.collapse.Constructor = l, a.fn.collapse.noConflict = function () {
8116        return a.fn.collapse = t, this
8117    }, a(document).on("click.bs.collapse.data-api", '[data-toggle="collapse"]', function (t) {
8118        var e = a(this);
8119        e.attr("data-target") || t.preventDefault();
8120        var i = s(e), n = i.data("bs.collapse") ? "toggle" : e.data();
8121        r.call(i, n)
8122    })
8123}(jQuery), function (a) {
8124    "use strict";
8125
8126    function r(t) {
8127        var e = t.attr("data-target");
8128        e || (e = (e = t.attr("href")) && /#[A-Za-z]/.test(e) && e.replace(/.*(?=#[^\s]*$)/, ""));
8129        var i = e && a(e);
8130        return i && i.length ? i : t.parent()
8131    }
8132
8133    function o(n) {
8134        n && 3 === n.which || (a(".dropdown-backdrop").remove(), a(l).each(function () {
8135            var t = a(this), e = r(t), i = {relatedTarget: this};
8136            e.hasClass("open") && (n && "click" == n.type && /input|textarea/i.test(n.target.tagName) && a.contains(e[0], n.target) || (e.trigger(n = a.Event("hide.bs.dropdown", i)), n.isDefaultPrevented() || (t.attr("aria-expanded", "false"), e.removeClass("open").trigger(a.Event("hidden.bs.dropdown", i)))))
8137        }))
8138    }
8139
8140    function n(t) {
8141        a(t).on("click.bs.dropdown", this.toggle)
8142    }
8143
8144    var l = '[data-toggle="dropdown"]';
8145    n.VERSION = "3.3.7", n.prototype.toggle = function (t) {
8146        var e = a(this);
8147        if (!e.is(".disabled, :disabled")) {
8148            var i = r(e), n = i.hasClass("open");
8149            if (o(), !n) {
8150                "ontouchstart" in document.documentElement && !i.closest(".
vendor: 4,651 bytes, lines 8150-8219
8150navbar-nav").length && a(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(a(this)).on("click", o);
8151                var s = {relatedTarget: this};
8152                if (i.trigger(t = a.Event("show.bs.dropdown", s)), t.isDefaultPrevented()) return;
8153                e.trigger("focus").attr("aria-expanded", "true"), i.toggleClass("open").trigger(a.Event("shown.bs.dropdown", s))
8154            }
8155            return !1
8156        }
8157    }, n.prototype.keydown = function (t) {
8158        if (/(38|40|27|32)/.test(t.which) && !/input|textarea/i.test(t.target.tagName)) {
8159            var e = a(this);
8160            if (t.preventDefault(), t.stopPropagation(), !e.is(".disabled, :disabled")) {
8161                var i = r(e), n = i.hasClass("open");
8162                if (!n && 27 != t.which || n && 27 == t.which) return 27 == t.which && i.find(l).trigger("focus"), e.trigger("click");
8163                var s = i.find(".dropdown-menu li:not(.disabled):visible a");
8164                if (s.length) {
8165                    var o = s.index(t.target);
8166                    38 == t.which && 0 < o && o--, 40 == t.which && o < s.length - 1 && o++, ~o || (o = 0), s.eq(o).trigger("focus")
8167                }
8168            }
8169        }
8170    };
8171    var t = a.fn.dropdown;
8172    a.fn.dropdown = function (i) {
8173        return this.each(function () {
8174            var t = a(this), e = t.data("bs.dropdown");
8175            e || t.data("bs.dropdown", e = new n(this)), "string" == typeof i && e[i].call(t)
8176        })
8177    }, a.fn.dropdown.Constructor = n, a.fn.dropdown.noConflict = function () {
8178        return a.fn.dropdown = t, this
8179    }, a(document).on("click.bs.dropdown.data-api", o).on("click.bs.dropdown.data-api", ".dropdown form", function (t) {
8180        t.stopPropagation()
8181    }).on("click.bs.dropdown.data-api", l, n.prototype.toggle).on("keydown.bs.dropdown.data-api", l, n.prototype.keydown).on("keydown.bs.dropdown.data-api", ".dropdown-menu", n.prototype.keydown)
8182}(jQuery), function (o) {
8183    "use strict";
8184
8185    function a(n, s) {
8186        return this.each(function () {
8187            var t = o(this), e = t.data("bs.modal"), i = o.extend({}, r.DEFAULTS, t.data(), "object" == typeof n && n);
8188            e || t.data("bs.modal", e = new r(this, i)), "string" == typeof n ? e[n](s) : i.show && e.show(s)
8189        })
8190    }
8191
8192    function r(t, e) {
8193        this.options = e, this.$body = o(document.body), this.$element = o(t), this.$dialog = this.$element.find(".modal-dialog"), this.$backdrop = null, this.isShown = null, this.originalBodyPad = null, this.scrollbarWidth = 0, this.ignoreBackdropClick = !1, this.options.remote && this.$element.find(".modal-content").load(this.options.remote, o.proxy(function () {
8194            this.$element.trigger("loaded.bs.modal")
8195        }, this))
8196    }
8197
8198    r.VERSION = "3.3.7", r.TRANSITION_DURATION = 300, r.BACKDROP_TRANSITION_DURATION = 150, r.DEFAULTS = {
8199        backdrop: !0,
8200        keyboard: !0,
8201        show: !0
8202    }, r.prototype.toggle = function (t) {
8203        return this.isShown ? this.hide() : this.show(t)
8204    }, r.prototype.show = function (i) {
8205        var n = this, t = o.Event("show.bs.modal", {relatedTarget: i});
8206        this.$element.trigger(t), this.isShown || t.isDefaultPrevented() || (this.isShown = !0, this.checkScrollbar(), this.setScrollbar(), this.$body.addClass("modal-open"), this.escape(), this.resize(), this.$element.on("click.dismiss.bs.modal", '[data-dismiss="modal"]', o.proxy(this.hide, this)), this.$dialog.on("mousedown.dismiss.bs.modal", function () {
8207            n.$element.one("mouseup.dismiss.bs.modal", function (t) {
8208                o(t.target).is(n.$element) && (n.ignoreBackdropClick = !0)
8209            })
8210        }), this.backdrop(function () {
8211            var t = o.support.transition && n.$element.hasClass("fade");
8212            n.$element.parent().length || n.$element.appendTo(n.$body), n.$element.show().scrollTop(0), n.adjustDialog(), t && n.$element[0].offsetWidth, n.$element.addClass("in"), n.enforceFocus();
8213            var e = o.Event("shown.bs.modal", {relatedTarget: i});
8214            t ? n.$dialog.one("bsTransitionEnd", function () {
8215                n.$element.trigger("focus").trigger(e)
8216            }).emulateTransitionEnd(r.TRANSITION_DURATION) : n.$element.trigger("focus").trigger(e)
8217        }))
8218    }, r.prototype.hide = function (t) {
8219        t && t.preventDefault(), t = o.Event("hide.bs.modal"), this.$element.trigger(t), this.isShown && !t.isDefaultPrevented() && (this.isShown = !1, this.escape(), this.resize(), o(document).off("focusin.bs.modal"), this.$element.removeClass("in").off("
vendor: 13,948 bytes, lines 8219-8423
8219click.dismiss.bs.modal").off("mouseup.dismiss.bs.modal"), this.$dialog.off("mousedown.dismiss.bs.modal"), o.support.transition && this.$element.hasClass("fade") ? this.$element.one("bsTransitionEnd", o.proxy(this.hideModal, this)).emulateTransitionEnd(r.TRANSITION_DURATION) : this.hideModal())
8220    }, r.prototype.enforceFocus = function () {
8221        o(document).off("focusin.bs.modal").on("focusin.bs.modal", o.proxy(function (t) {
8222            document === t.target || this.$element[0] === t.target || this.$element.has(t.target).length || this.$element.trigger("focus")
8223        }, this))
8224    }, r.prototype.escape = function () {
8225        this.isShown && this.options.keyboard ? this.$element.on("keydown.dismiss.bs.modal", o.proxy(function (t) {
8226            27 == t.which && this.hide()
8227        }, this)) : this.isShown || this.$element.off("keydown.dismiss.bs.modal")
8228    }, r.prototype.resize = function () {
8229        this.isShown ? o(window).on("resize.bs.modal", o.proxy(this.handleUpdate, this)) : o(window).off("resize.bs.modal")
8230    }, r.prototype.hideModal = function () {
8231        var t = this;
8232        this.$element.hide(), this.backdrop(function () {
8233            t.$body.removeClass("modal-open"), t.resetAdjustments(), t.resetScrollbar(), t.$element.trigger("hidden.bs.modal")
8234        })
8235    }, r.prototype.removeBackdrop = function () {
8236        this.$backdrop && this.$backdrop.remove(), this.$backdrop = null
8237    }, r.prototype.backdrop = function (t) {
8238        var e = this, i = this.$element.hasClass("fade") ? "fade" : "";
8239        if (this.isShown && this.options.backdrop) {
8240            var n = o.support.transition && i;
8241            if (this.$backdrop = o(document.createElement("div")).addClass("modal-backdrop " + i).appendTo(this.$body), this.$element.on("click.dismiss.bs.modal", o.proxy(function (t) {
8242                return this.ignoreBackdropClick ? void (this.ignoreBackdropClick = !1) : void (t.target === t.currentTarget && ("static" == this.options.backdrop ? this.$element[0].focus() : this.hide()))
8243            }, this)), n && this.$backdrop[0].offsetWidth, this.$backdrop.addClass("in"), !t) return;
8244            n ? this.$backdrop.one("bsTransitionEnd", t).emulateTransitionEnd(r.BACKDROP_TRANSITION_DURATION) : t()
8245        } else if (!this.isShown && this.$backdrop) {
8246            this.$backdrop.removeClass("in");
8247            var s = function () {
8248                e.removeBackdrop(), t && t()
8249            };
8250            o.support.transition && this.$element.hasClass("fade") ? this.$backdrop.one("bsTransitionEnd", s).emulateTransitionEnd(r.BACKDROP_TRANSITION_DURATION) : s()
8251        } else t && t()
8252    }, r.prototype.handleUpdate = function () {
8253        this.adjustDialog()
8254    }, r.prototype.adjustDialog = function () {
8255        var t = this.$element[0].scrollHeight > document.documentElement.clientHeight;
8256        this.$element.css({
8257            paddingLeft: !this.bodyIsOverflowing && t ? this.scrollbarWidth : "",
8258            paddingRight: this.bodyIsOverflowing && !t ? this.scrollbarWidth : ""
8259        })
8260    }, r.prototype.resetAdjustments = function () {
8261        this.$element.css({paddingLeft: "", paddingRight: ""})
8262    }, r.prototype.checkScrollbar = function () {
8263        var t = window.innerWidth;
8264        if (!t) {
8265            var e = document.documentElement.getBoundingClientRect();
8266            t = e.right - Math.abs(e.left)
8267        }
8268        this.bodyIsOverflowing = document.body.clientWidth < t, this.scrollbarWidth = this.measureScrollbar()
8269    }, r.prototype.setScrollbar = function () {
8270        var t = parseInt(this.$body.css("padding-right") || 0, 10);
8271        this.originalBodyPad = document.body.style.paddingRight || "", this.bodyIsOverflowing && this.$body.css("padding-right", t + this.scrollbarWidth)
8272    }, r.prototype.resetScrollbar = function () {
8273        this.$body.css("padding-right", this.originalBodyPad)
8274    }, r.prototype.measureScrollbar = function () {
8275        var t = document.createElement("div");
8276        t.className = "modal-scrollbar-measure", this.$body.append(t);
8277        var e = t.offsetWidth - t.clientWidth;
8278        return this.$body[0].removeChild(t), e
8279    };
8280    var t = o.fn.modal;
8281    o.fn.modal = a, o.fn.modal.Constructor = r, o.fn.modal.noConflict = function () {
8282        return o.fn.modal = t, this
8283    }, o(document).on("click.bs.modal.data-api", '[data-toggle="modal"]', function (t) {
8284        var e = o(this), i = e.attr("href"), n = o(e.attr("data-target") || i && i.replace(/.*(?=#[^\s]+$)/, "")),
8285            s = n.data("bs.modal") ? "toggle" : o.extend({remote: !/#/.test(i) && i}, n.data(), e.data());
8286        e.is("a") && t.preventDefault(), n.one("show.bs.modal", function (t) {
8287            t.isDefaultPrevented() || n.one("hidden.bs.modal", function () {
8288                e.is(":visible") && e.trigger("focus")
8289            })
8290        }), a.call(n, s, this)
8291    })
8292}(jQuery), function (m) {
8293    "use strict";
8294
8295    function g(t, e) {
8296        this.type = null, this.options = null, this.enabled = null, this.timeout = null, this.hoverState = null, this.$element = null, this.inState = null, this.init("tooltip", t, e)
8297    }
8298
8299    g.VERSION = "3.3.7", g.TRANSITION_DURATION = 150, g.DEFAULTS = {
8300        animation: !0,
8301        placement: "top",
8302        selector: !1,
8303        template: '<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',
8304        trigger: "hover focus",
8305        title: "",
8306        delay: 0,
8307        html: !1,
8308        container: !1,
8309        viewport: {selector: "body", padding: 0}
8310    }, g.prototype.init = function (t, e, i) {
8311        if (this.enabled = !0, this.type = t, this.$element = m(e), this.options = this.getOptions(i), this.$viewport = this.options.viewport && m(m.isFunction(this.options.viewport) ? this.options.viewport.call(this, this.$element) : this.options.viewport.selector || this.options.viewport), this.inState = {
8312            click: !1,
8313            hover: !1,
8314            focus: !1
8315        }, this.$element[0] instanceof document.constructor && !this.options.selector) throw new Error("`selector` option must be specified when initializing " + this.type + " on the window.document object!");
8316        for (var n = this.options.trigger.split(" "), s = n.length; s--;) {
8317            var o = n[s];
8318            if ("click" == o) this.$element.on("click." + this.type, this.options.selector, m.proxy(this.toggle, this)); else if ("manual" != o) {
8319                var a = "hover" == o ? "mouseenter" : "focusin", r = "hover" == o ? "mouseleave" : "focusout";
8320                this.$element.on(a + "." + this.type, this.options.selector, m.proxy(this.enter, this)), this.$element.on(r + "." + this.type, this.options.selector, m.proxy(this.leave, this))
8321            }
8322        }
8323        this.options.selector ? this._options = m.extend({}, this.options, {
8324            trigger: "manual",
8325            selector: ""
8326        }) : this.fixTitle()
8327    }, g.prototype.getDefaults = function () {
8328        return g.DEFAULTS
8329    }, g.prototype.getOptions = function (t) {
8330        return (t = m.extend({}, this.getDefaults(), this.$element.data(), t)).delay && "number" == typeof t.delay && (t.delay = {
8331            show: t.delay,
8332            hide: t.delay
8333        }), t
8334    }, g.prototype.getDelegateOptions = function () {
8335        var i = {}, n = this.getDefaults();
8336        return this._options && m.each(this._options, function (t, e) {
8337            n[t] != e && (i[t] = e)
8338        }), i
8339    }, g.prototype.enter = function (t) {
8340        var e = t instanceof this.constructor ? t : m(t.currentTarget).data("bs." + this.type);
8341        return e || (e = new this.constructor(t.currentTarget, this.getDelegateOptions()), m(t.currentTarget).data("bs." + this.type, e)), t instanceof m.Event && (e.inState["focusin" == t.type ? "focus" : "hover"] = !0), e.tip().hasClass("in") || "in" == e.hoverState ? void (e.hoverState = "in") : (clearTimeout(e.timeout), e.hoverState = "in", e.options.delay && e.options.delay.show ? void (e.timeout = setTimeout(function () {
8342            "in" == e.hoverState && e.show()
8343        }, e.options.delay.show)) : e.show())
8344    }, g.prototype.isInStateTrue = function () {
8345        for (var t in this.inState) if (this.inState[t]) return !0;
8346        return !1
8347    }, g.prototype.leave = function (t) {
8348        var e = t instanceof this.constructor ? t : m(t.currentTarget).data("bs." + this.type);
8349        if (e || (e = new this.constructor(t.currentTarget, this.getDelegateOptions()), m(t.currentTarget).data("bs." + this.type, e)), t instanceof m.Event && (e.inState["focusout" == t.type ? "focus" : "hover"] = !1), !e.isInStateTrue()) return clearTimeout(e.timeout), e.hoverState = "out", e.options.delay && e.options.delay.hide ? void (e.timeout = setTimeout(function () {
8350            "out" == e.hoverState && e.hide()
8351        }, e.options.delay.hide)) : e.hide()
8352    }, g.prototype.show = function () {
8353        var t = m.Event("show.bs." + this.type);
8354        if (this.hasContent() && this.enabled) {
8355            this.$element.trigger(t);
8356            var e = m.contains(this.$element[0].ownerDocument.documentElement, this.$element[0]);
8357            if (t.isDefaultPrevented() || !e) return;
8358            var i = this, n = this.tip(), s = this.getUID(this.type);
8359            this.setContent(), n.attr("id", s), this.$element.attr("aria-describedby", s), this.options.animation && n.addClass("fade");
8360            var o = "function" == typeof this.options.placement ? this.options.placement.call(this, n[0], this.$element[0]) : this.options.placement,
8361                a = /\s?auto?\s?/i, r = a.test(o);
8362            r && (o = o.replace(a, "") || "top"), n.detach().css({
8363                top: 0,
8364                left: 0,
8365                display: "block"
8366            }).addClass(o).data("bs." + this.type, this), this.options.container ? n.appendTo(this.options.container) : n.insertAfter(this.$element), this.$element.trigger("inserted.bs." + this.type);
8367            var l = this.getPosition(), h = n[0].offsetWidth, c = n[0].offsetHeight;
8368            if (r) {
8369                var u = o, d = this.getPosition(this.$viewport);
8370                o = "bottom" == o && l.bottom + c > d.bottom ? "top" : "top" == o && l.top - c < d.top ? "bottom" : "right" == o && l.right + h > d.width ? "left" : "left" == o && l.left - h < d.left ? "right" : o, n.removeClass(u).addClass(o)
8371            }
8372            var p = this.getCalculatedOffset(o, l, h, c);
8373            this.applyPlacement(p, o);
8374            var f = function () {
8375                var t = i.hoverState;
8376                i.$element.trigger("shown.bs." + i.type), i.hoverState = null, "out" == t && i.leave(i)
8377            };
8378            m.support.transition && this.$tip.hasClass("fade") ? n.one("bsTransitionEnd", f).emulateTransitionEnd(g.TRANSITION_DURATION) : f()
8379        }
8380    }, g.prototype.applyPlacement = function (t, e) {
8381        var i = this.tip(), n = i[0].offsetWidth, s = i[0].offsetHeight, o = parseInt(i.css("margin-top"), 10),
8382            a = parseInt(i.css("margin-left"), 10);
8383        isNaN(o) && (o = 0), isNaN(a) && (a = 0), t.top += o, t.left += a, m.offset.setOffset(i[0], m.extend({
8384            using: function (t) {
8385                i.css({top: Math.round(t.top), left: Math.round(t.left)})
8386            }
8387        }, t), 0), i.addClass("in");
8388        var r = i[0].offsetWidth, l = i[0].offsetHeight;
8389        "top" == e && l != s && (t.top = t.top + s - l);
8390        var h = this.getViewportAdjustedDelta(e, t, r, l);
8391        h.left ? t.left += h.left : t.top += h.top;
8392        var c = /top|bottom/.test(e), u = c ? 2 * h.left - n + r : 2 * h.top - s + l,
8393            d = c ? "offsetWidth" : "offsetHeight";
8394        i.offset(t), this.replaceArrow(u, i[0][d], c)
8395    }, g.prototype.replaceArrow = function (t, e, i) {
8396        this.arrow().css(i ? "left" : "top", 50 * (1 - t / e) + "%").css(i ? "top" : "left", "")
8397    }, g.prototype.setContent = function () {
8398        var t = this.tip(), e = this.getTitle();
8399        t.find(".tooltip-inner")[this.options.html ? "html" : "text"](e), t.removeClass("fade in top bottom left right")
8400    }, g.prototype.hide = function (t) {
8401        function e() {
8402            "in" != i.hoverState && n.detach(), i.$element && i.$element.removeAttr("aria-describedby").trigger("hidden.bs." + i.type), t && t()
8403        }
8404
8405        var i = this, n = m(this.$tip), s = m.Event("hide.bs." + this.type);
8406        if (this.$element.trigger(s), !s.isDefaultPrevented()) return n.removeClass("in"), m.support.transition && n.hasClass("fade") ? n.one("bsTransitionEnd", e).emulateTransitionEnd(g.TRANSITION_DURATION) : e(), this.hoverState = null, this
8407    }, g.prototype.fixTitle = function () {
8408        var t = this.$element;
8409        !t.attr("title") && "string" == typeof t.attr("data-original-title") || t.attr("data-original-title", t.attr("title") || "").attr("title", "")
8410    }, g.prototype.hasContent = function () {
8411        return this.getTitle()
8412    }, g.prototype.getPosition = function (t) {
8413        var e = (t = t || this.$element)[0], i = "BODY" == e.tagName, n = e.getBoundingClientRect();
8414        null == n.width && (n = m.extend({}, n, {width: n.right - n.left, height: n.bottom - n.top}));
8415        var s = window.SVGElement && e instanceof window.SVGElement, o = i ? {top: 0, left: 0} : s ? null : t.offset(),
8416            a = {scroll: i ? document.documentElement.scrollTop || document.body.scrollTop : t.scrollTop()},
8417            r = i ? {width: m(window).width(), height: m(window).height()} : null;
8418        return m.extend({}, n, a, r, o)
8419    }, g.prototype.getCalculatedOffset = function (t, e, i, n) {
8420        return "bottom" == t ? {
8421            top: e.top + e.height,
8422            left: e.left + e.width / 2 - i / 2
8423        }
vendor: 6,168 bytes, lines 8423-8530
8423 : "top" == t ? {
8424            top: e.top - n,
8425            left: e.left + e.width / 2 - i / 2
8426        } : "left" == t ? {top: e.top + e.height / 2 - n / 2, left: e.left - i} : {
8427            top: e.top + e.height / 2 - n / 2,
8428            left: e.left + e.width
8429        }
8430    }, g.prototype.getViewportAdjustedDelta = function (t, e, i, n) {
8431        var s = {top: 0, left: 0};
8432        if (!this.$viewport) return s;
8433        var o = this.options.viewport && this.options.viewport.padding || 0, a = this.getPosition(this.$viewport);
8434        if (/right|left/.test(t)) {
8435            var r = e.top - o - a.scroll, l = e.top + o - a.scroll + n;
8436            r < a.top ? s.top = a.top - r : l > a.top + a.height && (s.top = a.top + a.height - l)
8437        } else {
8438            var h = e.left - o, c = e.left + o + i;
8439            h < a.left ? s.left = a.left - h : c > a.right && (s.left = a.left + a.width - c)
8440        }
8441        return s
8442    }, g.prototype.getTitle = function () {
8443        var t = this.$element, e = this.options;
8444        return t.attr("data-original-title") || ("function" == typeof e.title ? e.title.call(t[0]) : e.title)
8445    }, g.prototype.getUID = function (t) {
8446        for (; t += ~~(1e6 * Math.random()), document.getElementById(t);) ;
8447        return t
8448    }, g.prototype.tip = function () {
8449        if (!this.$tip && (this.$tip = m(this.options.template), 1 != this.$tip.length)) throw new Error(this.type + " `template` option must consist of exactly 1 top-level element!");
8450        return this.$tip
8451    }, g.prototype.arrow = function () {
8452        return this.$arrow = this.$arrow || this.tip().find(".tooltip-arrow")
8453    }, g.prototype.enable = function () {
8454        this.enabled = !0
8455    }, g.prototype.disable = function () {
8456        this.enabled = !1
8457    }, g.prototype.toggleEnabled = function () {
8458        this.enabled = !this.enabled
8459    }, g.prototype.toggle = function (t) {
8460        var e = this;
8461        t && ((e = m(t.currentTarget).data("bs." + this.type)) || (e = new this.constructor(t.currentTarget, this.getDelegateOptions()), m(t.currentTarget).data("bs." + this.type, e))), t ? (e.inState.click = !e.inState.click, e.isInStateTrue() ? e.enter(e) : e.leave(e)) : e.tip().hasClass("in") ? e.leave(e) : e.enter(e)
8462    }, g.prototype.destroy = function () {
8463        var t = this;
8464        clearTimeout(this.timeout), this.hide(function () {
8465            t.$element.off("." + t.type).removeData("bs." + t.type), t.$tip && t.$tip.detach(), t.$tip = null, t.$arrow = null, t.$viewport = null, t.$element = null
8466        })
8467    };
8468    var t = m.fn.tooltip;
8469    m.fn.tooltip = function (n) {
8470        return this.each(function () {
8471            var t = m(this), e = t.data("bs.tooltip"), i = "object" == typeof n && n;
8472            !e && /destroy|hide/.test(n) || (e || t.data("bs.tooltip", e = new g(this, i)), "string" == typeof n && e[n]())
8473        })
8474    }, m.fn.tooltip.Constructor = g, m.fn.tooltip.noConflict = function () {
8475        return m.fn.tooltip = t, this
8476    }
8477}(jQuery), function (s) {
8478    "use strict";
8479
8480    function o(t, e) {
8481        this.init("popover", t, e)
8482    }
8483
8484    if (!s.fn.tooltip) throw new Error("Popover requires tooltip.js");
8485    o.VERSION = "3.3.7", o.DEFAULTS = s.extend({}, s.fn.tooltip.Constructor.DEFAULTS, {
8486        placement: "right",
8487        trigger: "click",
8488        content: "",
8489        template: '<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'
8490    }), ((o.prototype = s.extend({}, s.fn.tooltip.Constructor.prototype)).constructor = o).prototype.getDefaults = function () {
8491        return o.DEFAULTS
8492    }, o.prototype.setContent = function () {
8493        var t = this.tip(), e = this.getTitle(), i = this.getContent();
8494        t.find(".popover-title")[this.options.html ? "html" : "text"](e), t.find(".popover-content").children().detach().end()[this.options.html ? "string" == typeof i ? "html" : "append" : "text"](i), t.removeClass("fade top bottom left right in"), t.find(".popover-title").html() || t.find(".popover-title").hide()
8495    }, o.prototype.hasContent = function () {
8496        return this.getTitle() || this.getContent()
8497    }, o.prototype.getContent = function () {
8498        var t = this.$element, e = this.options;
8499        return t.attr("data-content") || ("function" == typeof e.content ? e.content.call(t[0]) : e.content)
8500    }, o.prototype.arrow = function () {
8501        return this.$arrow = this.$arrow || this.tip().find(".arrow")
8502    };
8503    var t = s.fn.popover;
8504    s.fn.popover = function (n) {
8505        return this.each(function () {
8506            var t = s(this), e = t.data("bs.popover"), i = "object" == typeof n && n;
8507            !e && /destroy|hide/.test(n) || (e || t.data("bs.popover", e = new o(this, i)), "string" == typeof n && e[n]())
8508        })
8509    }, s.fn.popover.Constructor = o, s.fn.popover.noConflict = function () {
8510        return s.fn.popover = t, this
8511    }
8512}(jQuery), function (o) {
8513    "use strict";
8514
8515    function s(t, e) {
8516        this.$body = o(document.body), this.$scrollElement = o(o(t).is(document.body) ? window : t), this.options = o.extend({}, s.DEFAULTS, e), this.selector = (this.options.target || "") + " .nav li > a", this.offsets = [], this.targets = [], this.activeTarget = null, this.scrollHeight = 0, this.$scrollElement.on("scroll.bs.scrollspy", o.proxy(this.process, this)), this.refresh(), this.process()
8517    }
8518
8519    function e(n) {
8520        return this.each(function () {
8521            var t = o(this), e = t.data("bs.scrollspy"), i = "object" == typeof n && n;
8522            e || t.data("bs.scrollspy", e = new s(this, i)), "string" == typeof n && e[n]()
8523        })
8524    }
8525
8526    s.VERSION = "3.3.7", s.DEFAULTS = {offset: 10}, s.prototype.getScrollHeight = function () {
8527        return this.$scrollElement[0].scrollHeight || Math.max(this.$body[0].scrollHeight, document.documentElement.scrollHeight)
8528    }, s.prototype.refresh = function () {
8529        var t = this, n = "offset", s = 0;
8530        this.offsets = [], this.targets = [], this.scrollHeight = this.get
vendor: 6,626 bytes, lines 8530-8643
8530ScrollHeight(), o.isWindow(this.$scrollElement[0]) || (n = "position", s = this.$scrollElement.scrollTop()), this.$body.find(this.selector).map(function () {
8531            var t = o(this), e = t.data("target") || t.attr("href"), i = /^#./.test(e) && o(e);
8532            return i && i.length && i.is(":visible") && [[i[n]().top + s, e]] || null
8533        }).sort(function (t, e) {
8534            return t[0] - e[0]
8535        }).each(function () {
8536            t.offsets.push(this[0]), t.targets.push(this[1])
8537        })
8538    }, s.prototype.process = function () {
8539        var t, e = this.$scrollElement.scrollTop() + this.options.offset, i = this.getScrollHeight(),
8540            n = this.options.offset + i - this.$scrollElement.height(), s = this.offsets, o = this.targets,
8541            a = this.activeTarget;
8542        if (this.scrollHeight != i && this.refresh(), n <= e) return a != (t = o[o.length - 1]) && this.activate(t);
8543        if (a && e < s[0]) return this.activeTarget = null, this.clear();
8544        for (t = s.length; t--;) a != o[t] && e >= s[t] && (void 0 === s[t + 1] || e < s[t + 1]) && this.activate(o[t])
8545    }, s.prototype.activate = function (t) {
8546        this.activeTarget = t, this.clear();
8547        var e = this.selector + '[data-target="' + t + '"],' + this.selector + '[href="' + t + '"]',
8548            i = o(e).parents("li").addClass("active");
8549        i.parent(".dropdown-menu").length && (i = i.closest("li.dropdown").addClass("active")), i.trigger("activate.bs.scrollspy")
8550    }, s.prototype.clear = function () {
8551        o(this.selector).parentsUntil(this.options.target, ".active").removeClass("active")
8552    };
8553    var t = o.fn.scrollspy;
8554    o.fn.scrollspy = e, o.fn.scrollspy.Constructor = s, o.fn.scrollspy.noConflict = function () {
8555        return o.fn.scrollspy = t, this
8556    }, o(window).on("load.bs.scrollspy.data-api", function () {
8557        o('[data-spy="scroll"]').each(function () {
8558            var t = o(this);
8559            e.call(t, t.data())
8560        })
8561    })
8562}(jQuery), function (r) {
8563    "use strict";
8564
8565    function e(i) {
8566        return this.each(function () {
8567            var t = r(this), e = t.data("bs.tab");
8568            e || t.data("bs.tab", e = new a(this)), "string" == typeof i && e[i]()
8569        })
8570    }
8571
8572    function a(t) {
8573        this.element = r(t)
8574    }
8575
8576    a.VERSION = "3.3.7", a.TRANSITION_DURATION = 150, a.prototype.show = function () {
8577        var t = this.element, e = t.closest("ul:not(.dropdown-menu)"), i = t.data("target");
8578        if (i || (i = (i = t.attr("href")) && i.replace(/.*(?=#[^\s]*$)/, "")), !t.parent("li").hasClass("active")) {
8579            var n = e.find(".active:last a"), s = r.Event("hide.bs.tab", {relatedTarget: t[0]}),
8580                o = r.Event("show.bs.tab", {relatedTarget: n[0]});
8581            if (n.trigger(s), t.trigger(o), !o.isDefaultPrevented() && !s.isDefaultPrevented()) {
8582                var a = r(i);
8583                this.activate(t.closest("li"), e), this.activate(a, a.parent(), function () {
8584                    n.trigger({type: "hidden.bs.tab", relatedTarget: t[0]}), t.trigger({
8585                        type: "shown.bs.tab",
8586                        relatedTarget: n[0]
8587                    })
8588                })
8589            }
8590        }
8591    }, a.prototype.activate = function (t, e, i) {
8592        function n() {
8593            s.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded", !1), t.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded", !0), o ? (t[0].offsetWidth, t.addClass("in")) : t.removeClass("fade"), t.parent(".dropdown-menu").length && t.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded", !0), i && i()
8594        }
8595
8596        var s = e.find("> .active"),
8597            o = i && r.support.transition && (s.length && s.hasClass("fade") || !!e.find("> .fade").length);
8598        s.length && o ? s.one("bsTransitionEnd", n).emulateTransitionEnd(a.TRANSITION_DURATION) : n(), s.removeClass("in")
8599    };
8600    var t = r.fn.tab;
8601    r.fn.tab = e, r.fn.tab.Constructor = a, r.fn.tab.noConflict = function () {
8602        return r.fn.tab = t, this
8603    };
8604
8605    function i(t) {
8606        t.preventDefault(), e.call(r(this), "show")
8607    }
8608
8609    r(document).on("click.bs.tab.data-api", '[data-toggle="tab"]', i).on("click.bs.tab.data-api", '[data-toggle="pill"]', i)
8610}(jQuery), function (l) {
8611    "use strict";
8612
8613    function i(n) {
8614        return this.each(function () {
8615            var t = l(this), e = t.data("bs.affix"), i = "object" == typeof n && n;
8616            e || t.data("bs.affix", e = new h(this, i)), "string" == typeof n && e[n]()
8617        })
8618    }
8619
8620    var h = function (t, e) {
8621        this.options = l.extend({}, h.DEFAULTS, e), this.$target = l(this.options.target).on("scroll.bs.affix.data-api", l.proxy(this.checkPosition, this)).on("click.bs.affix.data-api", l.proxy(this.checkPositionWithEventLoop, this)), this.$element = l(t), this.affixed = null, this.unpin = null, this.pinnedOffset = null, this.checkPosition()
8622    };
8623    h.VERSION = "3.3.7", h.RESET = "affix affix-top affix-bottom", h.DEFAULTS = {
8624        offset: 0,
8625        target: window
8626    }, h.prototype.getState = function (t, e, i, n) {
8627        var s = this.$target.scrollTop(), o = this.$element.offset(), a = this.$target.height();
8628        if (null != i && "top" == this.affixed) return s < i && "top";
8629        if ("bottom" == this.affixed) return null != i ? !(s + this.unpin <= o.top) && "bottom" : !(s + a <= t - n) && "bottom";
8630        var r = null == this.affixed, l = r ? s : o.top;
8631        return null != i && s <= i ? "top" : null != n && t - n <= l + (r ? a : e) && "bottom"
8632    }, h.prototype.getPinnedOffset = function () {
8633        if (this.pinnedOffset) return this.pinnedOffset;
8634        this.$element.removeClass(h.RESET).addClass("affix");
8635        var t = this.$target.scrollTop(), e = this.$element.offset();
8636        return this.pinnedOffset = e.top - t
8637    }, h.prototype.checkPositionWithEventLoop = function () {
8638        setTimeout(l.proxy(this.checkPosition, this), 1)
8639    }, h.prototype.checkPosition = function () {
8640        if (this.$element.is(":visible")) {
8641            var t = this.$element.height(), e = this.options.offset, i = e.top, n = e.bottom,
8642                s = Math.max(l(document).height(), l(document.body).height());
8643            "object" != typeof e && (n = i = e), "function" == typeof i && (i = e.top(this.$element)), "function" == typeof n && (n = e.bottom(this.$element));
8644            var o = this.getState(s, t, i, n);
8645            if (this.affixed != o) {
8646                null != this.unpin && this.$element.css("top", "");
8647                var a = "affix" + (o ? "-" + o : ""), r = l.Event(a + ".bs.affix");
8648                if (this.$element.trigger(r), r.isDefaultPrevented()) return;
8649                this.affixed = o, this.unpin = "bottom" == o ? this.getPinnedOffset() : null, this.$element.removeClass(h.RESET).addClass(a).trigger(a.replace("affix", "affixed") + ".bs.affix")
8650            }
8651            "bottom" == o && this.$element.offset({top: s - t - n})
8652        }
8653    };
8654    var t = l.fn.affix;
8655    l.fn.affix = i, l.fn.affix.Constructor = h, l.fn.affix.noConflict = function () {
8656        return l.fn.affix = t, this
8657    }, l(window).on("load", function () {
8658        l('[data-spy="affix"]').each(function () {
8659            var t = l(this), e = t.data();
8660            e.offset = e.offset || {}, null != e.offsetBottom && (e.offset.bottom = e.offsetBottom), null != e.offsetTop && (e.offset.top = e.offsetTop), i.call(t, e)
8661        })
8662    })
8663}(jQuery), function (t) {
8664    "function" == typeof define && define.amd ? define(["jquery"], t) : "object" == typeof exports ? t(require("jquery")) : t(jQuery)
8665}(function (p) {
8666    var n = /\+/g;
8667
8668    function f(t) {
8669        return g.raw ? t : encodeURIComponent(t)
8670    }
8671
8672    function m(t, e) {
8673        var i = g.raw ? t : function (t) {
8674            0 === t.indexOf('"') && (t = t.slice(1, -1).replace(/\\"/g, '"').replace(/\\\\/g, "\\"));
8675            try {
8676                return t = decodeURIComponent(t.replace(n, " ")), g.json ? JSON.parse(t) : t
8677            } catch (t) {
8678            }
8679        }(t);
8680        return p.isFunction(e) ? e(i) : i
8681    }
8682
8683    var g = p.cookie = function (t, e, i) {
8684        if (void 0 !== e && !p.isFunction(e)) {
8685            if ("number" == typeof (i = p.extend({}, g.defaults, i)).expires) {
8686                var n = i.expires, s = i.expires = new Date;
8687                s.setTime(+s + 864e5 * n)
8688            }
8689            return document.cookie = [f(t), "=", function (t) {
8690                return f(g.json ? JSON.stringify(t) : String(t))
8691            }(e), i.expires ? "; expires=" + i.expires.toUTCString() : "", i.path ? "; path=" + i.path : "", i.domain ? "; domain=" + i.domain : "", i.secure ? "; secure" : ""].join("")
8692        }
8693        for (var o, a = t ? void 0 : {}, r = document.cookie ? document.cookie.split("; ") : [], l = 0, h = r.length; l < h; l++) {
8694            var c = r[l].split("="), u = (o = c.shift(), g.raw ? o : decodeURIComponent(o)), d = c.join("=");
8695            if (t && t === u) {
8696                a = m(d, e);
8697                break
8698            }
8699            t || void 0 === (d = m(d)) || (a[u] = d)
8700        }
8701        return a
8702    };
8703    g.defaults = {}, p.removeCookie = function (t, e) {
8704        return void 0 !== p.cookie(t) && (p.cookie(t, "", p.extend({}, e, {expires: -1})), !p.cookie(t))
8705    }
8706});
8707var IASCallbacks = function (t) {
8708    return this.list = [], this.fireStack = [], this.isFiring = !1, this.isDisabled = !1, this.fire = function (t) {
8709        var e = t[0], i = t[1], n = t[2];
8710        this.isFiring = !0;
8711        for (var s = 0, o = this.list.length; s < o; s++) if (null != this.list[s] && !1 === this.list[s].fn.apply(e, n)) {
8712            i.reject();
8713            break
8714        }
8715        this.isFiring = !1, i.resolve(), this.fireStack.length && this.fire(this.fireStack.shift())
8716    }, this.inList = function (t, e) {
8717        for (var i = e = e || 0, n = this.list.length; i < n; i++) if (this.list[i].fn === t || t.guid && this.list[i].fn.guid && t.guid === this.list[i].fn.guid) return i;
8718        return -1
8719    }, this
8720};
8721IASCallbacks.prototype = {
8722    add: function (t, e) {
8723        var i = {fn: t, priority: e};
8724        e = e || 0;
8725        for (var n = 0, s = this.list.length; n < s; n++) if (e > this.list[n].priority) return this.list.splice(n, 0, i), this;
8726        return this.list.push(i), this
8727    }, remove: function (t) {
8728        for (var e = 0; -1 < (e = this.inList(t, e));) this.list.splice(e, 1);
8729        return this
8730    }, has: function (t) {
8731        return -1 < this.inList(t)
8732    }, fireWith: function (t, e) {
8733        var i = $.Deferred();
8734        return this.isDisabled ? i.reject() : (e = [t, i, (e = e || []).slice ? e.slice() : e], this.isFiring ? this.fireStack.push(e) : this.fire(e), i)
8735    }, disable: function () {
8736        this.isDisabled = !0
8737    }, enable: function () {
8738        this.isDisabled = !1
8739    }
8740}, function (h) {
8741    "use strict";
8742
8743    function a(t, e) {
8744        return this.itemsContainerSelector = e.container, this.itemSelector = e.item, this.nextSelector = e.next, this.paginationSelector = e.pagination, this.$scrollC
8744ontainer = t, this.$container = window === t.get(0) ? h(document) : t, this.defaultDelay = e.delay, this.negativeMargin = e.negativeMargin, this.nextUrl = null, this.isBound = !1, this.isPaused = !1, this.isInitialized = !1, this.jsXhr = !1, this.listeners = {
8745            next: new IASCallbacks(h),
8746            load: new IASCallbacks(h),
8747            loaded: new IASCallbacks(h),
8748            render: new IASCallbacks(h),
8749            rendered: new IASCallbacks(h),
8750            scroll: new IASCallbacks(h),
8751            noneLeft: new IASCallbacks(h),
8752            ready: new IASCallbacks(h)
8753        }, this.extensions = [], this.scrollHandler = function () {
8754            if (this.isBound && !this.isPaused) {
8755                var t = this.getCurrentScrollOffset(this.$scrollContainer), e = this.getScrollThreshold();
8756                -1 != e && (this.fire("scroll", [t, e]), e <= t && this.next())
8757            }
8758        }, this.getItemsContainer = function () {
8759            return h(this.itemsContainerSelector, this.$container)
8760        }, this.getLastItem = function () {
8761            return h(this.itemSelector, this.getItemsContainer().get(0)).last()
8762        }, this.getFirstItem = function () {
8763            return h(this.itemSelector, this.getItemsContainer().get(0)).first()
8764        }, this.getScrollThreshold = function (t) {
8765            var e;
8766            return t = 0 <= (t = t || this.negativeMargin) ? -1 * t : t, 0 === (e = this.getLastItem()).length ? -1 : e.offset().top + e.height() + t
8767        }, this.getCurrentScrollOffset = function (t) {
8768            var e, i = t.height();
8769            return e = window === t.get(0) ? t.scrollTop() : t.offset().top, -1 == navigator.platform.indexOf("iPhone") && -1 == navigator.platform.indexOf("iPod") || (i += 80), e + i
8770        }, this.getNextUrl = function (t) {
8771            return t = t || this.$container, h(this.nextSelector, t).last().attr("href")
8772        }, this.load = function (t, e, i) {
8773            var n, s, o = this, a = [], r = +new Date;
8774            i = i || this.defaultDelay;
8775            var l = {url: t};
8776            return o.fire("load", [l]), this.jsXhr = h.get(l.url, null, h.proxy(function (t) {
8777                0 === (n = h(this.itemsContainerSelector, t).eq(0)).length && (n = h(t).filter(this.itemsContainerSelector).eq(0)), n && n.find(this.itemSelector).each(function () {
8778                    a.push(this), n.find('.loop__item-preview-image').lazyLoadXT()
8779                }), o.fire("loaded", [t, a]), e && ((s = +new Date - r) < i ? setTimeout(function () {
8780                    e.call(o, t, a)
8781                }, i - s) : e.call(o, t, a))
8782            }, o), "html"), this.jsXhr
8783        }, this.render = function (t, e) {
8784            var i = this, n = this.getLastItem(), s = 0, o = this.fire("render", [t]);
8785            o.done(function () {
8786                h(t).hide(), n.after(t), h(t).fadeIn(400, function () {
8787                    ++s < t.length || (i.fire("rendered", [t]), e && e())
8788                })
8789            }), o.fail(function () {
8790                e && e()
8791            })
8792        }, this.hidePagination = function () {
8793            this.paginationSelector && h(this.paginationSelector, this.$container).hide()
8794        }, this.restorePagination = function () {
8795            this.paginationSelector && h(this.paginationSelector, this.$container).show()
8796        }, this.throttle = function (s, o) {
8797            var t, a, r = 0;
8798            return t = function () {
8799                function t() {
8800                    r = +new Date, s.apply(e, i)
8801                }
8802
8803                var e = this, i = arguments, n = +new Date - r;
8804                a ? clearTimeout(a) : t(), o < n ? t() : a = setTimeout(t, o)
8805            }, h.guid && (t.guid = s.guid = s.guid || h.guid++), t
8806        }, this.fire = function (t, e) {
8807            return this.listeners[t].fireWith(this, e)
8808        }, this.pause = function () {
8809            this.isPaused = !0
8810        }, this.resume = function () {
8811            this.isPaused = !1
8812        }, this
8813    }
8814
8815    a.prototype.initialize = function () {
8816        if (this.isInitialized) return !1;
8817        var t = !!("onscroll" in this.$scrollContainer.get(0)), e = this.getCurrentScrollOffset(this.$scrollContainer),
8818            i = this.getScrollThreshold();
8819        return t && (this.hidePagination(), this.bind(), this.fire("ready"), this.nextUrl = this.getNextUrl(), i <= e ? (this.next(), this.one("rendered", function () {
8820            this.isInitialized = !0
8821        })) : this.isInitialized = !0, this)
8822    }, a.prototype.reinitialize = function () {
8823        this.isInitialized = !1, this.unbind(), this.initialize()
8824    }, a.prototype.bind = function () {
8825        if (!this.isBound) {
8826            this.$scrollContainer.on("scroll", h.proxy(this.throttle(this.scrollHandler, 150), this));
8827            for (var t = 0, e = this.extensions.length; t < e; t++) this.extensions[t].bind(this);
8828            this.isBound = !0, this.resume()
8829        }
8830    }, a.prototype.unbind = function () {
8831        if (this.isBound) {
8832            this.$scrollContainer.off("scroll", this.scrollHandler);
8833            for (var t = 0, e = this.extensions.length; t < e; t++) void 0 !== this.extensions[t].unbind && this.extensions[t].unbind(this);
8834            this.isBound = !1
8835        }
8836    }, a.prototype.destroy = function () {
8837        try {
8838            this.jsXhr.abort()
8839        } catch (t) {
8840        }
8841        this.unbind(), this.$scrollContainer.data("ias", null)
8842    }, a.prototype.on = function (t, e, i) {
8843        if (void 0 === this.listeners[t]) throw new Error('There is no event called "' + t + '"');
8844        return i = i || 0, this.listeners[t].add(h.proxy(e, this), i), this
8845    }, a.prototype.one = function (t, e) {
8846        var i = this, n = function () {
8847            i.off(t, e), i.off(t, n)
8848        };
8849        return this.on(t, e), this.on(t, n), this
8850    }, a.prototype.off = function (t, e) {
8851        if (void 0 === this.listeners[t]) throw new Error('There is no event called "' + t + '"');
8852        return this.listeners[t].remove(e), this
8853    }, a.prototype.next = function () {
8854        var t = this.nextUrl, i = this;
8855        if (this.pause(), !t) return this.fire("noneLeft", [this.getLastItem()]), this.listeners.noneLeft.disable(), i.resume(), !1;
8856        var e = this.fire("next", [t]);
8857        return e.done(function () {
8858            i.load(t, function (t, e) {
8859                i.render(e, function () {
8860                    i.nextUrl = i.getNextUrl(t), i.resume()
8861                })
8862            })
8863        }), e.fail(function () {
8864            i.resume()
8865        }), !0
8866    }, a.prototype.extension = function (t) {
8867        if (void 0 === t.bind) throw new Error('Extension doesn\'t have required method "bind"');
8868        return void 0 !== t.initialize && t.initialize(this), this.extensions.push(t), this.isInitialized && this.reinitialize(), this
8869    }, h.ias = function (t) {
8870        var e = h(window);
8871        return e.ias.apply(e, arguments)
8872    }, h.fn.ias = function (n) {
8873        var s = Array.prototype.slice.call(arguments), o = this;
8874        return this.each(function () {
8875            var t = h(this), e = t.data("ias"),
8876                i = h.extend({}, h.fn.ias.defaults, t.data(), "object" == typeof n && n);
8877            if (e || (t.data("ias", e = new a(t, i)), h(document).ready(h.proxy(e.initialize, e))), "string" == typeof n) {
8878                if ("function" != typeof e[n]) throw new Error('There is no method called "' + n + '"');
8879                s.shift(), e[n].apply(e, s)
8880            }
8881            o = e
8882        }), o
8883    }, h.fn.ias.defaults = {
8884        item: ".item",
8885        container: ".listing",
8886        next: ".next",
8887        pagination: !1,
8888        delay: 600,
8889        negativeMargin: 10
8890    }
8891}(jQuery);
8892var IASHistoryExtension = function (t) {
8893    return t = jQuery.extend({}, this.defaults, t), this.ias = null, this.prevSelector = t.prev, this.prevUrl = null, this.listeners = {prev: new IASCallbacks}, this.onPageChange = function (t, e, i) {
8894        if (window.history && window.history.replaceState) {
8895            var n = history.state;
8896            history.replaceState(n, document.title, i)
8897        }
8898    }, this.onScroll = function (t, e) {
8899        var i = this.getScrollThresholdFirstItem();
8900        !this.prevUrl || (t -= this.ias.$scrollContainer.height()) <= i && this.prev()
8901    }, this.onReady = function () {
8902        var t = this.ias.getCurrentScrollOffset(this.ias.$scrollContainer), e = this.getScrollThresholdFirstItem();
8903        (t -= this.ias.$scrollContainer.height()) <= e && this.prev()
8904    }, this.getPrevUrl = function (t) {
8905        return t = t || this.ias.$container, jQuery(this.prevSelector, t).last().attr("href")
8906    }, this.getScrollThresholdFirstItem = function () {
8907        var t;
8908        return 0 === (t = this.ias.getFirstItem()).length ? -1 : t.offset().top
8909    }, this.renderBefore = function (t, e) {
8910        var i = this.ias, n = i.getFirstItem(), s = 0;
8911        i.fire("render", [t]), jQuery(t).hide(), n.before(t), jQuery(t).fadeIn(400, function () {
8912            ++s < t.length || (i.fire("rendered", [t]), e && e())
8913        })
8914    }, this
8915};
8916IASHistoryExtension.prototype.initialize = function (t) {
8917    var e = this;
8918    this.ias = t, jQuery.extend(t.listeners, this.listeners), t.prev = function () {
8919        return e.prev()
8920    }, this.prevUrl = this.getPrevUrl()
8921}, IASHistoryExtension.prototype.bind = function (t) {
8922    t.on("pageChange", jQuery.proxy(this.onPageChange, this)), t.on("scroll", jQuery.proxy(this.onScroll, this)), t.on("ready", jQuery.proxy(this.onReady, this))
8923}, IASHistoryExtension.prototype.unbind = function (t) {
8924    t.off("pageChange", this.onPageChange), t.off("scroll", this.onScroll), t.off("ready", this.onReady)
8925}, IASHistoryExtension.prototype.prev = function () {
8926    var t = this.prevUrl, i = this, n = this.ias;
8927    if (!t) return !1;
8928    n.pause();
8929    var e = n.fire("prev", [t]);
8930    return e.done(function () {
8931        n.load(t, function (t, e) {
8932            i.renderBefore(e, function () {
8933                i.prevUrl = i.getPrevUrl(t), n.resume(), i.prevUrl && i.prev()
8934            })
8935        })
8936    }), e.fail(function () {
8937        n.resume()
8938    }), !0
8939}, IASHistoryExtension.prototype.defaults = {prev: ".prev"};
8940var IASNoneLeftExtension = function (t) {
8941    return t = jQuery.extend({}, this.defaults, t), this.ias = null, this.uid = (new Date).getTime(), this.html = t.html.replace("{text}", t.text), this.showNoneLeft = function () {
8942        var t = jQuery(this.html).attr("id", "ias_noneleft_" + this.uid);
8943        this.ias.getLastItem().after(t), t.fadeIn()
8944    }, this
8945};
8946IASNoneLeftExtension.prototype.bind = function (t) {
8947    (this.ias = t).on("noneLeft", jQuery.proxy(this.showNoneLeft, this))
8948}, IASNoneLeftExtension.prototype.unbind = function (t) {
8949    t.off("noneLeft", this.showNoneLeft)
8950}, IASNoneLeftExtension.prototype.defaults = {
8951    text: "",
8952    html: '<div class="ias-noneleft" style="text-align: center;">{text}</div>'
8953};
8954var IASPagingExtension = function () {
8955    return this.ias = null, this.pagebreaks = [[0, document.location.toString()]], this.lastPageNum = 1, this.enabled = !0, this.listeners = {pageChange: new IASCallbacks}, this.onScroll = function (t, e) {
8956        if (this.enabled) {
8957            var i, n = this.ias, s = this.getCurrentPageNum(t), o = this.getCurrentPagebreak(t);
8958            this.lastPageNum !== s && (i = o[1], n.fire("pageChange", [s, t, i])), this.lastPageNum = s
8959        }
8960    }, this.onNext = function (t) {
8961        var e = this.ias.getCurrentScrollOffset(this.ias.$scrollContainer);
8962        this.pagebreaks.push([e, t]);
8963        var i = this.getCurrentPageNum(e) + 1;
8964        this.ias.fire("pageChange", [i, e, t]), this.lastPageNum = i
8965    }, this.onPrev = function (n) {
8966        var s = this, o = s.ias, a = o.getCurrentScrollOffset(o.$scrollC
8966ontainer) - o.$scrollContainer.height(),
8967            r = o.getFirstItem();
8968        this.enabled = !1, this.pagebreaks.unshift([0, n]), o.one("rendered", function () {
8969            for (var t = 1, e = s.pagebreaks.length; t < e; t++) s.pagebreaks[t][0] = s.pagebreaks[t][0] + r.offset().top;
8970            var i = s.getCurrentPageNum(a) + 1;
8971            o.fire("pageChange", [i, a, n]), s.lastPageNum = i, s.enabled = !0
8972        })
8973    }, this
8974};
8975IASPagingExtension.prototype.initialize = function (t) {
8976    this.ias = t, jQuery.extend(t.listeners, this.listeners)
8977}, IASPagingExtension.prototype.bind = function (t) {
8978    try {
8979        t.on("prev", jQuery.proxy(this.onPrev, this), this.priority)
8980    } catch (t) {
8981    }
8982    t.on("next", jQuery.proxy(this.onNext, this), this.priority), t.on("scroll", jQuery.proxy(this.onScroll, this), this.priority)
8983}, IASPagingExtension.prototype.unbind = function (t) {
8984    try {
8985        t.off("prev", this.onPrev)
8986    } catch (t) {
8987    }
8988    t.off("next", this.onNext), t.off("scroll", this.onScroll)
8989}, IASPagingExtension.prototype.getCurrentPageNum = function (t) {
8990    for (var e = this.pagebreaks.length - 1; 0 < e; e--) if (t > this.pagebreaks[e][0]) return e + 1;
8991    return 1
8992}, IASPagingExtension.prototype.getCurrentPagebreak = function (t) {
8993    for (var e = this.pagebreaks.length - 1; 0 <= e; e--) if (t > this.pagebreaks[e][0]) return this.pagebreaks[e];
8994    return null
8995}, IASPagingExtension.prototype.priority = 500;
8996var IASSpinnerExtension = function (t) {
8997    return t = jQuery.extend({}, this.defaults, t), this.ias = null, this.uid = (new Date).getTime(), this.src = t.src, this.html = t.html.replace("{src}", this.src), this.showSpinner = function () {
8998        var t = this.getSpinner() || this.createSpinner();
8999        this.ias.getLastItem().after(t), t.fadeIn()
9000    }, this.showSpinnerBefore = function () {
9001        var t = this.getSpinner() || this.createSpinner();
9002        this.ias.getFirstItem().before(t), t.fadeIn()
9003    }, this.removeSpinner = function () {
9004        this.hasSpinner() && this.getSpinner().remove()
9005    }, this.getSpinner = function () {
9006        var t = jQuery("#ias_spinner_" + this.uid);
9007        return 0 < t.length && t
9008    }, this.hasSpinner = function () {
9009        return 0 < jQuery("#ias_spinner_" + this.uid).length
9010    }, this.createSpinner = function () {
9011        var t = jQuery(this.html).attr("id", "ias_spinner_" + this.uid);
9012        return t.hide(), t
9013    }, this
9014};
9015IASSpinnerExtension.prototype.bind = function (t) {
9016    (this.ias = t).on("next", jQuery.proxy(this.showSpinner, this)), t.on("render", jQuery.proxy(this.removeSpinner, this));
9017    try {
9018        t.on("prev", jQuery.proxy(this.showSpinnerBefore, this))
9019    } catch (t) {
9020    }
9021}, IASSpinnerExtension.prototype.unbind = function (t) {
9022    t.off("next", this.showSpinner), t.off("render", this.removeSpinner);
9023    try {
9024        t.off("prev", this.showSpinnerBefore)
9025    } catch (t) {
9026    }
9027}, IASSpinnerExtension.prototype.defaults = {
9028    src: "",
9029    html: '<div class="ias-spinner" style="display: none"><img src="{src}"/></div>'
9030};
9031var IASTriggerExtension = function (t) {
9032    return t = jQuery.extend({}, this.defaults, t), this.ias = null, this.html = t.html.replace("{text}", t.text), this.htmlPrev = t.htmlPrev.replace("{text}", t.textPrev), this.enabled = !0, this.count = 0, this.offset = t.offset, this.$triggerNext = null, this.$triggerPrev = null, this.showTriggerNext = function () {
9033        if (!this.enabled) return !0;
9034        if (!1 === this.offset || ++this.count < this.offset) return !0;
9035        var t = this.$triggerNext || (this.$triggerNext = this.createTrigger(this.next, this.html));
9036        return this.ias.getLastItem().after(t), t.fadeIn(), !1
9037    }, this.showTriggerPrev = function () {
9038        if (!this.enabled) return !0;
9039        var t = this.$triggerPrev || (this.$triggerPrev = this.createTrigger(this.prev, this.htmlPrev));
9040        return this.ias.getFirstItem().before(t), t.fadeIn(), !1
9041    }, this.onRendered = function () {
9042        this.enabled = !0
9043    }, this.createTrigger = function (t, e) {
9044        var i, n = (new Date).getTime();
9045        return e = e || this.html, (i = jQuery(e).attr("id", "ias_trigger_" + n)).hide(), i.on("click", jQuery.proxy(t, this)), i
9046    }, this
9047};
9048IASTriggerExtension.prototype.bind = function (t) {
9049    (this.ias = t).on("next", jQuery.proxy(this.showTriggerNext, this), this.priority), t.on("rendered", jQuery.proxy(this.onRendered, this), this.priority);
9050    try {
9051        t.on("prev", jQuery.proxy(this.showTriggerPrev, this), this.priority)
9052    } catch (t) {
9053    }
9054}, IASTriggerExtension.prototype.unbind = function (t) {
9055    t.off("next", this.showTriggerNext), t.off("rendered", this.onRendered);
9056    try {
9057        t.off("prev", this.showTriggerPrev)
9058    } catch (t) {
9059    }
9060}, IASTriggerExtension.prototype.next = function () {
9061    this.enabled = !1, this.ias.pause(), this.$triggerNext && (this.$triggerNext.remove(), this.$triggerNext = null), this.ias.next()
9062}, IASTriggerExtension.prototype.prev = function () {
9063    this.enabled = !1, this.ias.pause(), this.$triggerPrev && (this.$triggerPrev.remove(), this.$triggerPrev = null), this.ias.prev()
9064}, IASTriggerExtension.prototype.defaults = {
9065    text: "Загрузить еще",
9066    html: '<div class="ias-trigger ias-trigger-next"><button class="btn btn-red more nx-flex-row-btw-c">{text}</button></div>',
9067    textPrev: "Load previous items",
9068    htmlPrev: '<div class="ias-trigger ias-trigger-prev" style="text-align: center; cursor: pointer;"><a>{text}</a></div>',
9069    offset: 0
9070}, IASTriggerExtension.prototype.priority = 1e3, function (t, e) {
9071    "object" == typeof exports && "object" == typeof module ? module.exports = e() : "function" == typeof define && define.amd ? define([], e) : "object" == typeof exports ? exports.likely = e() : t.likely = e()
9072}(this, function () {
9073    return s = {}, n.m = i = [function (t, e, i) {
9074        "use strict";
9075        Object.defineProperty(e, "__esModule", {value: !0}), i.d(e, "each", function () {
9076            return n
9077        }), i.d(e, "toArray", function () {
9078            return s
9079        }), i.d(e, "merge", function () {
9080            return r
9081        }), i.d(e, "extend", function () {
9082            return l
9083        }), i.d(e, "getDataset", function () {
9084            return h
9085        }), i.d(e, "bools", function () {
9086            return c
9087        }), i.d(e, "template", function () {
9088            return u
9089        }), i.d(e, "makeUrl", function () {
9090            return d
9091        }), i.d(e, "query", function () {
9092            return p
9093        }), i.d(e, "set", function () {
9094            return f
9095        }), i.d(e, "getDefaultUrl", function () {
9096            return m
9097        }), i.d(e, "isBrowserEnv", function () {
9098            return g
9099        });
9100        var a = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (t) {
9101            return typeof t
9102        } : function (t) {
9103            return t && "function" == typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t
9104        }, o = {yes: !0, no: !1}, n = function (t, e) {
9105            for (var i in t) t.hasOwnProperty(i) && e(t[i], i)
9106        }, s = function (t) {
9107            return Array.prototype.slice.call(t)
9108        }, r = function () {
9109            for (var t = {}, e = Array.prototype.slice.call(arguments), i = 0; i < e.length; i++) {
9110                var n = e[i];
9111                if (n) for (var s in n) n.hasOwnProperty(s) && (t[s] = n[s])
9112            }
9113            return t
9114        }, l = function (t, e) {
9115            for (var i in e) e.hasOwnProperty(i) && (t[i] = e[i]);
9116            return t
9117        }, h = function (t) {
9118            if ("object" === a(t.dataset)) return t.dataset;
9119
9120            function e(t) {
9121                return t.charAt(1).toUpperCase()
9122            }
9123
9124            var i = void 0, n = {}, s = t.attributes, o = void 0;
9125            for (i = s.length - 1; 0 <= i; i--) (o = s[i]) && o.name && /^data-\w[\w\-]*$/.test(o.name) && (n[o.name.substr(5).replace(/-./g, e)] = o.value);
9126            return n
9127        }, c = function (t) {
9128            var e = {}, i = h(t);
9129            for (var n in i) if (i.hasOwnProperty(n)) {
9130                var s = i[n];
9131                e[n] = o[s] || s
9132            }
9133            return e
9134        }, u = function (t, i) {
9135            return t ? t.replace(/\{([^\}]+)\}/g, function (t, e) {
9136                return e in i ? i[e] : t
9137            }) : ""
9138        }, d = function (t, e) {
9139            for (var i in e) e.hasOwnProperty(i) && (e[i] = encodeURIComponent(e[i]));
9140            return u(t, e)
9141        }, p = function (t) {
9142            var e = encodeURIComponent, i = [];
9143            for (var n in t) "object" !== a(t[n]) && i.push(e(n) + "=" + e(t[n]));
9144            return i.join("&")
9145        }, f = function (i, t, e) {
9146            var n = t.split("."), s = null;
9147            n.forEach(function (t, e) {
9148                void 0 === i[t] && (i[t] = {}), e !== n.length - 1 && (i = i[t]), s = t
9149            }), i[s] = e
9150        }, m = function () {
9151            var t = document.querySelector('link[rel="canonical"]');
9152            return t ? t.href : window.location.href.replace(window.location.hash, "")
9153        }, g = "undefined" != typeof window && "undefined" != typeof document && document.createElement
9154    }, function (t, e, i) {
9155        "use strict";
9156        Object.defineProperty(e, "__esModule", {value: !0}), i.d(e, "global", function () {
9157            return s
9158        }), i.d(e, "wrapSVG", function () {
9159            return r
9160        }), i.d(e, "createNode", function () {
9161            return l
9162        }), i.d(e, "getScript", function () {
9163            return h
9164        }), i.d(e, "getJSON", function () {
9165            return c
9166        }), i.d(e, "find", function () {
9167            return u
9168        }), i.d(e, "findAll", function () {
9169            return d
9170        }), i.d(e, "openPopup", function () {
9171            return p
9172        }), i.d(e, "createTempLink", function () {
9173            return f
9174        });
9175        var n = i(0), s = n.isBrowserEnv ? window : {}, o = n.isBrowserEnv ? document.createElement("div") : {}, a = 0;
9176        s.__likelyCallbacks = {};
9177        var r = function (t) {
9178            return '<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path d="M' + t + 'z"/></svg>'
9179        }, l = function (t) {
9180            return o.innerHTML = t, o.children[0]
9181        }, h = function (t) {
9182            var e = document.createElement("script"), i = document.head;
9183            e.type = "text/javascript", e.src = t, i.appendChild(e), i.removeChild(e)
9184        }, c = function (t, e) {
9185            var i = encodeURIComponent("random_fun_" + ++a),
9186                n = t.replace(/callback=(\?)/, "callback=__likelyCallbacks." + i);
9187            s.__likelyCallbacks[i] = e, h(n)
9188        }, u = function (t, e) {
9189            return (e || document).querySelector(t)
9190        }, d = function (t, e) {
9191            return Array.prototype.slice.call((e || document).querySelectorAll(t))
9192        }, p = function (t, e, i, n) {
9193            var s = Math.round(screen.width / 2 - i / 2), o = 0;
9194            screen.height > n && (o = Math.round(screen.height / 3 - n / 2));
9195            var a = "left=" + s + ",top=" + o + ",width=" + i + ",height=" + n + ",personalbar=0,toolbar=0,scrollbars=1,resizable=1",
9196                r = window.open(t, e, a);
9197            return r ? (r.focus(), r) : (location.href = t, null)
9198        }, f = function (t) {
9199            var e = document.createElement("a");
9200            e.href = t, e.style = "display: none", document.body.appendChild(e), setTimeout(function () {
9201                e.click(), document.body.removeChild(e)
9202            })
9203        }
9204    }, function (t, e, i) {
9205        "use strict";
9206        Object.defineProperty(e, "__esModule", {value: !0}), e.default = {name: "likely", prefix: "likely__"}
9207    }, function (t, e, i) {
9208        "use strict";
9209        var n = i(9), s = i(0), o = i(10), a = i(11), r = i(12), l = i(13), h = i(14), c = i(15), u = i(16), d = i(17),
9210            p = i(18), f = {
9211                facebook: o.a,
9212                gplus: a.a,
9213                linkedin: r.a,
9214                odnoklassniki: l.a,
9215                pinterest: h.a,
9216                telegram: c.a,
9217                twitter: u.a,
9218                vkontakte: d.a,
9219                whatsapp: p.a
9220            };
9221        i.i(s.each)(f, function (t, e) {
9222            i.i(n.a)(t), t.name = e
9223        }), e.a = f
9224    }, function (t, e, i) {
9225        var n = function (t, e, i) {
9226                return e && d(t.prototype, e), i && d(t, i), t
9227            }, s = i(0), a = s.bools, r = s.getDefaultUrl, l = s.merge, h = i(19).default, c = i(2).default,
9228            o = i(1).findAll, u = i(8).default;
9229
9230        function d(t, e) {
9231            for (var i = 0; i < e.length; i++) {
9232                var n = e[i];
9233                n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n)
9234            }
9235        }
9236
9237        i(20);
9238        var p = (n(f, null, [{
9239            key: "initate", value: function () {
9240                return console.warn("likely.initate function is DEPRECATED and will be removed in 3.0. Use likely.initiate instead."), f.initiate.apply(f, arguments)
9241            }
9242        }, {
9243            key: "initiate", value: function (t, e) {
9244                function i() {
9245                    n.forEach(function (t) {
9246                        !function (t, e) {
9247                            var i = e || {}, n = {
9248                                counters: !0,
9249                                timeout: 1e3,
9250                                zeroes: !1,/*title:document.title*/
9251                                title: $('.article__title h1').text(),
9252                                wait: 500,
9253                                url: r()
9254                            }, s = t[c.name], o = l({}, n, i, a(t));
9255                            s ? s.update(o) : t[c.name] = new h(t, o)
9256                        }(t, s)
9257                    })
9258                }
9259
9260                var n = void 0, s = void 0;
9261                s = Array.isArray(t) ? (n = t, e) : t instanceof Node ? (n = [t], e) : (n = o("." + c.name), t), i(), u.onUrlChange(i)
9262            }
9263        }]), f);
9264
9265        function f() {
9266            return function (t, e) {
9267                if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
9268            }(this, f), console.warn("likely function is DEPRECATED and will be removed in 3.0. Use likely.initiate instead."), f.initiate.apply(f, arguments)
9269        }
9270
9271        t.exports = p
9272    }, function (t, e, o) {
9273        "use strict";
9274        var a = o(1), r = o(0), s = o(2), i = o(7), n = o(3), l = '<span class="{className}">{content}</span>',
9275            h = (function (t, e, i) {
9276                return e && u(t.prototype, e), i && u(t, i), t
9277            }(c, [{
9278                key: "init", value: function () {
9279                    this.detectService(), this.detectParams(), this.service && (this.initHtml(), setTimeout(this.initCounter.bind(this), 0))
9280                }
9281            }, {
9282                key: "update", value: function (t) {
9283                    var e = "." + s.default.prefix + "counter", i = o.i(a.findAll)(e, this.widget);
9284                    o.i(r.extend)(this.options, o.i(r.merge)({forceUpdate: !1}, t)), i.forEach(function (t) {
9285                        t.parentNode.removeChild(t)
9286                    }), this.initCounter()
9287                }
9288            }, {
9289                key: "detectService", value: function () {
9290                    var e = this.widget, t = o.i(r.getDataset)(e).service;
9291                    (t = t || Object.keys(n.a).filter(function (t) {
9292                        return e.classList.contains(t)
9293                    })[0]) && (this.service = t, o.i(r.extend)(this.options, n.a[t]))
9294                }
9295            }, {
9296                key: "detectParams", value: function () {
9297                    var t = this.options, e = o.i(r.getDataset)(this.widget);
9298                    if (e.counter) {
9299                        var i = parseInt(e.counter, 10);
9300                        isNaN(i) ? t.counterUrl = e.counter : t.counterNumber = i
9301                    }
9302                    t.title = e.title || t.title, t.url = e.url || t.url
9303                }
9304            }, {
9305                key: "initHtml", value: function () {
9306                    var t = this.options, e = this.widget, i = e.innerHTML;
9307                    e.addEventListener("click", this.click.bind(this)), e.classList.remove(this.service), e.className += " " + this.className("widget");
9308                    var n = o.i(r.template)(l, {className: this.className("button"), content: i}),
9309                        s = o.i(r.template)(l, {
9310                            className: this.className("icon"),
9311                            content: o.i(a.wrapSVG)(t.svgIconPath)
9312                        });
9313                    e.innerHTML = s + n
9314                }
9315            }, {
9316                key: "initCounter", value: function () {
9317                    var t = this.options;
9318                    t.counters && t.counterNumber ? this.updateCounter(t.counterNumber) : t.counterUrl && o.i(i.a)(this.service, t.url, t)(this.updateCounter.bind(this))
9319                }
9320            }, {
9321                key: "className", value: function (t) {
9322                    var e = s.default.prefix + t;
9323                    return e + " " + e + "_" + this.service
9324                }
9325            }, {
9326                key: "updateCounter", value: function (t) {
9327                    var e = parseInt(t, 10) || 0, i = o.i(a.find)("." + s.default.name + "__counter", this.widget);
9328                    i && i.parentNode.removeChild(i);
9329                    var n = {className: this.className("counter"), c
9329ontent: e};
9330                    e || this.options.zeroes || (n.className += " " + s.default.prefix + "counter_empty", n.content = ""), this.widget.appendChild(o.i(a.createNode)(o.i(r.template)(l, n))), this.likely.updateCounter(this.service, e)
9331                }
9332            }, {
9333                key: "click", value: function () {
9334                    var t = this.options;
9335                    if (t.click.call(this)) {
9336                        var e = o.i(r.makeUrl)(t.popupUrl, {url: t.url, title: t.title});
9337                        if (!1 === t.openPopup) return o.i(a.createTempLink)(this.addAdditionalParamsToUrl(e)), !1;
9338                        o.i(a.openPopup)(this.addAdditionalParamsToUrl(e), s.default.prefix + this.service, t.popupWidth, t.popupHeight)
9339                    }
9340                    return !1
9341                }
9342            }, {
9343                key: "addAdditionalParamsToUrl", value: function (t) {
9344                    var e = o.i(r.query)(o.i(r.merge)(this.widget.dataset, this.options.data)),
9345                        i = -1 === t.indexOf("?") ? "?" : "&";
9346                    return "" === e ? t : t + i + e
9347                }
9348            }]), c);
9349
9350        function c(t, e, i) {
9351            (function (t, e) {
9352                if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
9353            })(this, c), this.widget = t, this.likely = e, this.options = o.i(r.merge)(i), this.init()
9354        }
9355
9356        function u(t, e) {
9357            for (var i = 0; i < e.length; i++) {
9358                var n = e[i];
9359                n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n)
9360            }
9361        }
9362
9363        e.a = h
9364    }, function (t, e, i) {
9365        "use strict";
9366        var s = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (t) {
9367            return typeof t
9368        } : function (t) {
9369            return t && "function" == typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t
9370        };
9371        e.a = function (i) {
9372            var n = [];
9373            return function (e) {
9374                var t = void 0 === e ? "undefined" : s(e);
9375                if ("undefined" === t) return i;
9376                "function" === t ? n.push(e) : (i = e, n.forEach(function (t) {
9377                    t(e)
9378                }))
9379            }
9380        }
9381    }, function (t, e, a) {
9382        "use strict";
9383        var r = a(6), l = a(0), h = a(3), c = {};
9384        e.a = function (t, e, i) {
9385            c[t] || (c[t] = {});
9386            var n = c[t], s = n[e];
9387            if (!i.forceUpdate && s) return s;
9388            s = a.i(r.a)();
9389            var o = a.i(l.makeUrl)(i.counterUrl, {url: e});
9390            return h.a[t].counter(o, s, e), n[e] = s
9391        }
9392    }, function (t, e, i) {
9393        "use strict";
9394        Object.defineProperty(e, "__esModule", {value: !0});
9395
9396        function n() {
9397            s.forEach(function (t) {
9398                t()
9399            })
9400        }
9401
9402        var s = [], o = !1, a = {
9403            onUrlChange: function (t) {
9404                o || (function () {
9405                    var t = window.history.pushState;
9406                    window.history.pushState = function () {
9407                        return setTimeout(n, 0), t.apply(window.history, arguments)
9408                    };
9409                    var e = window.history.replaceState;
9410                    window.history.replaceState = function () {
9411                        return setTimeout(n, 0), e.apply(window.history, arguments)
9412                    }, window.addEventListener("popstate", n)
9413                }(), o = !0), s.push(t)
9414            }
9415        };
9416        e.default = a
9417    }, function (t, e, s) {
9418        "use strict";
9419
9420        function i(t, i) {
9421            var n = this;
9422            s.i(o.getJSON)(t, function (t) {
9423                try {
9424                    var e = "function" == typeof n.convertNumber ? n.convertNumber(t) : t;
9425                    i(e)
9426                } catch (t) {
9427                }
9428            })
9429        }
9430
9431        var o = s(1);
9432        e.a = function (t) {
9433            t.counter = o.global.__likelyCounterMock || t.counter || i, t.click = t.click || function () {
9434                return !0
9435            }
9436        }
9437    }, function (t, e, i) {
9438        "use strict";
9439        e.a = {
9440            counterUrl: "https://graph.facebook.com/?id={url}&callback=?",
9441            convertNumber: function (t) {
9442                return t.share.share_count
9443            },
9444            popupUrl: "https://www.facebook.com/sharer/sharer.php?u={url}",
9445            popupWidth: 600,
9446            popupHeight: 500,
9447            svgIconPath: "15.117 0H.883C.395 0 0 .395 0 .883v14.234c0 .488.395.883.883.883h7.663V9.804H6.46V7.39h2.086V5.607c0-2.066 1.262-3.19 3.106-3.19.883 0 1.642.064 1.863.094v2.16h-1.28c-1 0-1.195.48-1.195 1.18v1.54h2.39l-.31 2.42h-2.08V16h4.077c.488 0 .883-.395.883-.883V.883C16 .395 15.605 0 15.117 0"
9448        }
9449    }, function (t, e, i) {
9450        "use strict";
9451        e.a = {
9452            counterUrl: "https://clients6.google.com/rpc",
9453            counter: function (t, e, i) {
9454                var n = new XMLHttpRequest;
9455                n.open("POST", t), n.setRequestHeader("Content-Type", "application/json"), n.addEventListener("load", function () {
9456                    var t = JSON.parse(n.responseText)[0].result.metadata.globalCounts.count;
9457                    e(t)
9458                }), n.send(JSON.stringify([{
9459                    method: "pos.plusones.get",
9460                    id: "p",
9461                    params: {nolog: !0, id: i, source: "widget", userId: "@viewer", groupId: "@self"},
9462                    jsonrpc: "2.0",
9463                    key: "p",
9464                    apiVersion: "v1"
9465                }]))
9466            },
9467            popupUrl: "https://plus.google.com/share?url={url}",
9468            popupWidth: 700,
9469            popupHeight: 500,
9470            svgIconPath: "8,6.5v3h4.291c-0.526,2.01-2.093,3.476-4.315,3.476C5.228,12.976,3,10.748,3,8c0-2.748,2.228-4.976,4.976-4.976c1.442,0,2.606,0.623,3.397,1.603L13.52,2.48C12.192,0.955,10.276,0,8,0C3.582,0,0,3.582,0,8s3.582,8,8,8s7.5-3.582,7.5-8V6.5H8"
9471        }
9472    }, function (t, e, i) {
9473        "use strict";
9474        e.a = {
9475            counterUrl: "https://www.linkedin.com/countserv/count/share?url={url}&format=jsonp&callback=?",
9476            convertNumber: function (t) {
9477                return t.count
9478            },
9479            popupUrl: "https://www.linkedin.com/shareArticle?mini=true&url={url}&title={title}",
9480            popupWidth: 600,
9481            popupHeight: 500,
9482            svgIconPath: "2.4,6h2.4v7.6H2.4V6z M3.6,2.2c0.8,0,1.4,0.6,1.4,1.4C4.9,4.3,4.3,5,3.6,5C2.8,5,2.2,4.3,2.2,3.6C2.2,2.8,2.8,2.2,3.6,2.2C3.6,2.2,3.6,2.2,3.6,2.2 M6.2,6h2.3v1h0C9,6.2,9.9,5.8,10.8,5.8c2.4,0,2.8,1.6,2.8,3.6v4.2h-2.4V9.9c0-0.9,0-2-1.2-2c-1.2,0-1.4,1-1.4,2v3.8H6.2V6z M13,0H3C1,0,0,1,0,3v10c0,2,1,3,3,3h10c2,0,3-1,3-3V3C16,1,15,0,13,0z"
9483        }
9484    }, function (t, e, i) {
9485        "use strict";
9486        var n = i(1), s = i(0), o = {
9487            counterUrl: "https://connect.ok.ru/dk?st.cmd=extLike&ref={url}&uid={index}",
9488            counter: function (t, e) {
9489                this.promises.push(e), i.i(n.getScript)(i.i(s.makeUrl)(t, {index: this.promises.length - 1}))
9490            },
9491            promises: [],
9492            popupUrl: "https://connect.ok.ru/dk?st.cmd=WidgetSharePreview&service=odnoklassniki&st.shareUrl={url}",
9493            popupWidth: 640,
9494            popupHeight: 400,
9495            svgIconPath: "8 6.107c.888 0 1.607-.72 1.607-1.607 0-.888-.72-1.607-1.607-1.607s-1.607.72-1.607 1.607c0 .888.72 1.607 1.607 1.607zM13 0H3C1 0 0 1 0 3v10c0 2 1 3 3 3h10c2 0 3-1 3-3V3c0-2-1-3-3-3zM8 .75c2.07 0 3.75 1.68 3.75 3.75 0 2.07-1.68 3.75-3.75 3.75S4.25 6.57 4.25 4.5C4.25 2.43 5.93.75 8 .75zm3.826 12.634c.42.42.42 1.097 0 1.515-.21.208-.483.313-.758.313-.274 0-.548-.105-.758-.314L8 12.59 5.69 14.9c-.42.418-1.098.418-1.516 0s-.42-1.098 0-1.516L6.357 11.2c-1.303-.386-2.288-1.073-2.337-1.11-.473-.354-.57-1.025-.214-1.5.354-.47 1.022-.567 1.496-.216.03.022 1.4.946 2.698.946 1.31 0 2.682-.934 2.693-.943.474-.355 1.146-.258 1.5.213.355.474.26 1.146-.214 1.5-.05.036-1.035.723-2.338 1.11l2.184 2.184"
9496        };
9497        i.i(s.set)(n.global, "ODKL.updateCount", function (t, e) {
9498            o.promises[t](e)
9499        }), e.a = o
9500    }, function (t, e, i) {
9501        "use strict";
9502        e.a = {
9503            counterUrl: "https://api.pinterest.com/v1/urls/count.json?url={url}&callback=?",
9504            convertNumber: function (t) {
9505                return t.count
9506            },
9507            popupUrl: "https://pinterest.com/pin/create/button/?url={url}&description={title}",
9508            popupWidth: 630,
9509            popupHeight: 270,
9510            svgIconPath: "7.99 0c-4.417 0-8 3.582-8 8 0 3.39 2.11 6.284 5.086 7.45-.07-.633-.133-1.604.028-2.295.145-.624.938-3.977.938-3.977s-.24-.48-.24-1.188c0-1.112.645-1.943 1.448-1.943.683 0 1.012.512 1.012 1.127 0 .686-.437 1.713-.663 2.664-.19.796.398 1.446 1.184 1.446 1.422 0 2.515-1.5 2.515-3.664 0-1.915-1.377-3.255-3.343-3.255-2.276 0-3.612 1.707-3.612 3.472 0 .688.265 1.425.595 1.826.065.08.075.15.055.23-.06.252-.195.796-.222.907-.035.146-.116.177-.268.107-1-.465-1.624-1.926-1.624-3.1 0-2.523 1.835-4.84 5.287-4.84 2.775 0 4.932 1.977 4.932 4.62 0 2.757-1.74 4.976-4.152 4.976-.81 0-1.573-.42-1.834-.92l-.498 1.903c-.18.695-.668 1.566-.994 2.097.75.232 1.544.357 2.37.357 4.417 0 8-3.582 8-8s-3.583-8-8-8"
9511        }
9512    }, function (t, e, i) {
9513        "use strict";
9514        e.a = {
9515            popupUrl: "https://telegram.me/share/url?url={url}",
9516            popupWidth: 600,
9517            popupHeight: 500,
9518            svgIconPath: "6,11.960784l-1,-3l11,-8l-15.378,5.914c0,0 -0.672,0.23 -0.619,0.655c0.053,0.425 0.602,0.619 0.602,0.619l3.575,1.203l1.62,5.154l2.742,-2.411l-0.007,-0.005l3.607,2.766c0.973,0.425 1.327,-0.46 1.327,-0.46l2.531,-13.435l-10,11z"
9519        }
9520    }, function (t, e, i) {
9521        "use strict";
9522        e.a = {
9523            popupUrl: "https://twitter.com/intent/tweet?url={url}&text={title}",
9524            popupWidth: 600,
9525            popupHeight: 450,
9526            click: function () {
9527                return /[\.\?:\-–—]\s*$/.test(this.options.title) || (this.options.title += ":"), !0
9528            },
9529            svgIconPath: "15.969,3.058c-0.586,0.26-1.217,0.436-1.878,0.515c0.675-0.405,1.194-1.045,1.438-1.809c-0.632,0.375-1.332,0.647-2.076,0.793c-0.596-0.636-1.446-1.033-2.387-1.033c-1.806,0-3.27,1.464-3.27,3.27 c0,0.256,0.029,0.506,0.085,0.745C5.163,5.404,2.753,4.102,1.14,2.124C0.859,2.607,0.698,3.168,0.698,3.767 c0,1.134,0.577,2.135,1.455,2.722C1.616,6.472,1.112,6.325,0.671,6.08c0,0.014,0,0.027,0,0.041c0,1.584,1.127,2.906,2.623,3.206 C3.02,9.402,2.731,9.442,2.433,9.442c-0.211,0-0.416-0.021-0.615-0.059c0.416,1.299,1.624,2.245,3.055,2.271 c-1.119,0.877-2.529,1.4-4.061,1.4c-0.264,0-0.524-0.015-0.78-0.046c1.447,0.928,3.166,1.469,5.013,1.469 c6.015,0,9.304-4.983,9.304-9.304c0-0.142-0.003-0.283-0.009-0.423C14.976,4.29,15.531,3.714,15.969,3.058"
9530        }
9531    }, function (t, e, i) {
9532        "use strict";
9533        var n = i(1), s = i(0), o = {
9534            counterUrl: "https://vk.ru/share.php?act=count&url={url}&index={index}",
9535            counter: function (t, e) {
9536                this.promises.push(e), i.i(n.getScript)(i.i(s.makeUrl)(t, {index: this.promises.length - 1}))
9537            },
9538            promises: [],
9539            popupUrl: "https://vk.ru/share.php?url={url}&title={title}",
9540            popupWidth: 550,
9541            popupHeight: 330,
9542            svgIconPath: "8.1,12.7c1.1,0,1.3-0.3,1.3-0.7v-1.6c0-0.5,0.1-0.6,0.5-0.6c0.3,0,0.7,0.1,1.7,1.1c1.2,1.2,1.4,1.7,2.1,1.7h1.7c0.5,0,0.7-0.3,0.6-0.7c-0.2-0.5-0.7-1.2-1.5-2.1c-0.4-0.5-1-1-1.2-1.3c-0.3-0.3-0.2-0.5,0-0.8c0,0,2.1-3,2.3-4v0c0.1-0.4,0-0.6-0.5-0.6h-1.7c-0.4,0-0.6,0.2-0.8,0.5c0,0-0.9,2.2-2.2,3.6C10,7.7,9.8,7.9,9.6,7.9c-0.1,0-0.3-0.1-0.3-0.5V3.9c0-0.4-0.1-0.6-0.5-0.6H6.1c-0.3,0-0.4,0.2-0.4,0.4c0,0.4,0.6,0.5,0.7,1.7v2.6c0,0.6-0.1,0.7-0.3,0.7c-0.6,0-2-2.2-2.9-4.7C3,3.4,2.8,3.2,2.4,3.2H0.6C0.1,3.2,0,3.5,0,3.7c0,0.5,0.6,2.8,2.8,5.8C4.2,11.6,6.3,12.7,8.1,12.7z"
9543        };
9544        i.i(s.set)(n.global, "VK.Share.count", function (t, e) {
9545            o.promises[t](e)
9546        }), e.a = o
9547    }, function (t, e, i) {
9548        "use strict";
9549        e.a = {
9550            popupUrl: "whatsapp://send?text={title}%0D%0A%0D%0A{url}",
9551            openPopup: !1,
9552            svgIconPath: "8.0292969 0 C 3.6412969 0 0.06940625 3.5557344 0.06640625 7.9277344 C 0.06640625 9.3247344 0.43385936 10.688578 1.1308594 11.892578 L 0 16 L 4.2226562 14.898438 C 5.3866562 15.528438 6.6962969 15.862281 8.0292969 15.863281 L 8.0332031 15.863281 C 12.423199 15.863281 15.998 12.306594 16 7.9335938 C 16 5.8165938 15.172922 3.8222186 13.669922 2.3242188 L 13.679688 2.3007812 C 12.159653 0.8307817 10.159297 -2.9605947e-016 8.0292969 0 z M 4.4589844 3.2382812 C 4.6263665 3.2382813 4.7936277 3.2373139 4.9394531 3.25 C 5.095423 3.25 5.306878 3.189055 5.5097656 3.6835938 C 5.7202615 4.1781321 6.2237071 5.418117 6.2871094 5.5449219 C 6.3505124 5.6717267 6.3922846 5.8107546 6.3085938 5.9882812 C 6.2223663 6.1531272 6.1809093 6.2560375 6.0566406 6.4082031 C 5.9298358 6.560369 5.7918587 6.7393913 5.6777344 6.8535156 C 5.5509298 6.9803204 5.4193132 7.1174841 5.5664062 7.3710938 C 5.7147679 7.6247032 6.220019 8.4490288 6.9707031 9.1210938 C 7.9344191 9.9833661 8.7483437 10.250149 9.0019531 10.376953 C 9.2530266 10.491078 9.3997816 10.477349 9.546875 10.3125 C 9.6939686 10.145117 10.178322 9.5818366 10.345703 9.3320312 C 10.514354 9.0784218 10.683278 9.1181658 10.914062 9.203125 C 11.146116 9.286816 12.383111 9.8946797 12.636719 10.021484 L 12.646484 9.9589844 C 12.900093 10.073108 13.06355 10.137829 13.126953 10.251953 C 13.190353 10.366078 13.192128 10.859096 12.976562 11.455078 C 12.766067 12.05106 11.759099 12.584074 11.273438 12.660156 C 10.838496 12.723556 10.287183 12.74881 9.6835938 12.558594 C 9.3158512 12.431788 8.8457781 12.280954 8.2421875 12.027344 C 5.7111649 10.936823 4.0584453 8.3992212 3.9316406 8.234375 C 3.8061039 8.0568483 2.9023438 6.8647716 2.9023438 5.6347656 C 2.9023438 4.4047596 3.5524185 3.7946251 3.7832031 3.5410156 C 4.0139878 3.3000865 4.2890659 3.2382812 4.4589844 3.2382812"
9553        }
9554    }, function (t, e, i) {
9555        "use strict";
9556        Object.defineProperty(e, "__esModule", {value: !0});
9557        var n = i(5), s = i(2), o = i(0), a = (function (t, e, i) {
9558            return e && l(t.prototype, e), i && l(t, i), t
9559        }(r, [{
9560            key: "init", value: function () {
9561                i.i(o.toArray)(this.container.children).forEach(this.addButton.bind(this)), this.options.counters ? (this.timer = setTimeout(this.appear.bind(this), this.options.wait), this.timeout = setTimeout(this.ready.bind(this), this.options.timeout)) : this.appear()
9562            }
9563        }, {
9564            key: "addButton", value: function (t) {
9565                var e = new n.a(t, this, this.options);
9566                this.buttons.push(e), e.options.counterUrl && this.countersLeft++
9567            }
9568        }, {
9569            key: "update", value: function (e) {
9570                (e.forceUpdate || e.url && e.url !== this.options.url) && (this.countersLeft = this.buttons.length, this.number = 0, this.buttons.forEach(function (t) {
9571                    t.update(e)
9572                }))
9573            }
9574        }, {
9575            key: "updateCounter", value: function (t, e) {
9576                e && (this.number += e), 0 == --this.countersLeft && (this.appear(), this.ready())
9577            }
9578        }, {
9579            key: "appear", value: function () {
9580                this.container.classList.add(s.default.name + "_visible")
9581            }
9582        }, {
9583            key: "ready", value: function () {
9584                this.timeout && (clearTimeout(this.timeout), this.container.classList.add(s.default.name + "_ready"))
9585            }
9586        }]), r);
9587
9588        function r(t, e) {
9589            (function (t, e) {
9590                if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
9591            })(this, r), this.container = t, this.options = e, this.countersLeft = 0, this.buttons = [], this.number = 0, this.init()
9592        }
9593
9594        function l(t, e) {
9595            for (var i = 0; i < e.length; i++) {
9596                var n = e[i];
9597                n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n)
9598            }
9599        }
9600
9601        e.default = a
9602    }, function (t, e) {
9603    }, function (t, e, i) {
9604        var n = i(4);
9605        window.addEventListener("load", function () {
9606            n.initiate()
9607        }), t.exports = n
9608    }], n.c = s, n.i = function (t) {
9609        return t
9610    }, n.d = function (t, e, i) {
9611        n.o(t, e) || Object.defineProperty(t, e, {configurable: !1, enumerable: !0, get: i})
9612    }, n.n = function (t) {
9613        var e = t && t.__esModule ? function () {
9614            return t.default
9615        } : function () {
9616            return t
9617        };
9618        return n.d(e, "a", e), e
9619    }, n.o = function (t, e) {
9620        return Object.prototype.hasOwnProperty.call(t, e)
9621    }, n.p = "", n(n.s = 21);
9622
9623    function n(t) {
9624        if (s[t]) return s[t].exports;
9625        var e = s[t] = {i: t, l: !1, exports: {}};
9626        return i[t].call(e.exports, e, e.exports, n), e.l = !0, e.exports
9627    }
9628
9629    var i, s
9630}), function (t, e) {
9631    "object" == typeof exports && "object" == typeof module ? module.exports = e() : "function" == typeof define && define.amd ? define([], e) : "object" == typeof exports ? exports.AOS = e() : t.AOS = e()
9632}(this, function () {
9633    return s = {}, i.m = n = [function (t, e, i) {
9634        "use strict";
9635
9636        function n(t) {
9637            return t && t.__esModule ? t : {default: t}
9638        }
9639
9640        function s() {
9641            if (0 < arguments.length && void 0 !== arguments[0] && arguments[0] && (m = !0), m) return f = (0, d.default)(f, g), (0, u.default)(f, g.once), f
9642        }
9643
9644        function o() {
9645            f = (0, p.default)(), s()
9646        }
9647
9648        var a = Object.assign || function (t) {
9649                for (var e = 1; e < arguments.length; e++) {
9650                    var i = arguments[e];
9651                    for (var n in i) Object.prototype.hasOwnProperty.call(i, n) && (t[n] = i[n])
9652                }
9653                return t
9654            }, r = n((n(i(1)), i(6))), l = n(i(7)), h = n(i(8)), c = n(i(9)), u = n(i(10)), d = n(i(11)), p = n(i(14)),
9655            f = [], m = !1, g = {
9656                offset: 120,
9657                delay: 0,
9658                easing: "ease",
9659                duration: 400,
9660                disable: !1,
9661                once: !1,
9662                startEvent: "DOMContentLoaded",
9663                throttleDelay: 99,
9664                debounceDelay: 50,
9665                disableMutationObserver: !1
9666            };
9667        t.exports = {
9668            init: function (t) {
9669                g = a(g, t), f = (0, p.default)();
9670                var e = document.all && !window.atob;
9671                return function (t) {
9672                    return !0 === t || "mobile" === t && c.default.mobile() || "ph
9672one" === t && c.default.phone() || "tablet" === t && c.default.tablet() || "function" == typeof t && !0 === t()
9673                }(g.disable) || e ? void f.forEach(function (t, e) {
9674                    t.node.removeAttribute("data-aos"), t.node.removeAttribute("data-aos-easing"), t.node.removeAttribute("data-aos-duration"), t.node.removeAttribute("data-aos-delay")
9675                }) : (g.disableMutationObserver || h.default.isSupported() || (console.info('\n      aos: MutationObserver is not supported on this browser,\n      code mutations observing has been disabled.\n      You may have to call "refreshHard()" by yourself.\n    '), g.disableMutationObserver = !0), document.querySelector("body").setAttribute("data-aos-easing", g.easing), document.querySelector("body").setAttribute("data-aos-duration", g.duration), document.querySelector("body").setAttribute("data-aos-delay", g.delay), "DOMContentLoaded" === g.startEvent && -1 < ["complete", "interactive"].indexOf(document.readyState) ? s(!0) : "load" === g.startEvent ? window.addEventListener(g.startEvent, function () {
9676                    s(!0)
9677                }) : document.addEventListener(g.startEvent, function () {
9678                    s(!0)
9679                }), window.addEventListener("resize", (0, l.default)(s, g.debounceDelay, !0)), window.addEventListener("orientationchange", (0, l.default)(s, g.debounceDelay, !0)), window.addEventListener("scroll", (0, r.default)(function () {
9680                    (0, u.default)(f, g.once)
9681                }, g.throttleDelay)), g.disableMutationObserver || h.default.ready("[data-aos]", o), f)
9682            }, refresh: s, refreshHard: o
9683        }
9684    }, function (t, e) {
9685    }, , , , , function (m, t) {
9686        (function (t) {
9687            "use strict";
9688
9689            function o(n, i, t) {
9690                function s(t) {
9691                    var e = l, i = h;
9692                    return l = h = void 0, f = t, u = n.apply(i, e)
9693                }
9694
9695                function o(t) {
9696                    var e = t - p;
9697                    return void 0 === p || i <= e || e < 0 || g && c <= t - f
9698                }
9699
9700                function a() {
9701                    var t = k();
9702                    return o(t) ? e(t) : void (d = setTimeout(a, function (t) {
9703                        var e = i - (t - p);
9704                        return g ? x(e, c - (t - f)) : e
9705                    }(t)))
9706                }
9707
9708                function e(t) {
9709                    return d = void 0, v && l ? s(t) : (l = h = void 0, u)
9710                }
9711
9712                function r() {
9713                    var t = k(), e = o(t);
9714                    if (l = arguments, h = this, p = t, e) {
9715                        if (void 0 === d) return function (t) {
9716                            return f = t, d = setTimeout(a, i), m ? s(t) : u
9717                        }(p);
9718                        if (g) return d = setTimeout(a, i), s(p)
9719                    }
9720                    return void 0 === d && (d = setTimeout(a, i)), u
9721                }
9722
9723                var l, h, c, u, d, p, f = 0, m = !1, g = !1, v = !0;
9724                if ("function" != typeof n) throw new TypeError(_);
9725                return i = b(i) || 0, y(t) && (m = !!t.leading, c = (g = "maxWait" in t) ? w(b(t.maxWait) || 0, i) : c, v = "trailing" in t ? !!t.trailing : v), r.cancel = function () {
9726                    void 0 !== d && clearTimeout(d), l = p = h = d = void (f = 0)
9727                }, r.flush = function () {
9728                    return void 0 === d ? u : e(k())
9729                }, r
9730            }
9731
9732            function y(t) {
9733                var e = void 0 === t ? "undefined" : i(t);
9734                return !!t && ("object" == e || "function" == e)
9735            }
9736
9737            function n(t) {
9738                return "symbol" == (void 0 === t ? "undefined" : i(t)) || function (t) {
9739                    return !!t && "object" == (void 0 === t ? "undefined" : i(t))
9740                }(t) && f.call(t) == e
9741            }
9742
9743            function b(t) {
9744                if ("number" == typeof t) return t;
9745                if (n(t)) return s;
9746                if (y(t)) {
9747                    var e = "function" == typeof t.valueOf ? t.valueOf() : t;
9748                    t = y(e) ? e + "" : e
9749                }
9750                if ("string" != typeof t) return 0 === t ? t : +t;
9751                t = t.replace(a, "");
9752                var i = l.test(t);
9753                return i || h.test(t) ? c(t.slice(2), i ? 2 : 8) : r.test(t) ? s : +t
9754            }
9755
9756            var i = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (t) {
9757                    return typeof t
9758                } : function (t) {
9759                    return t && "function" == typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t
9760                }, _ = "Expected a function", s = NaN, e = "[object Symbol]", a = /^\s+|\s+$/g, r = /^[-+]0x[0-9a-f]+$/i,
9761                l = /^0b[01]+$/i, h = /^0o[0-7]+$/i, c = parseInt,
9762                u = "object" == (void 0 === t ? "undefined" : i(t)) && t && t.Object === Object && t,
9763                d = "object" == ("undefined" == typeof self ? "undefined" : i(self)) && self && self.Object === Object && self,
9764                p = u || d || Function("return this")(), f = Object.prototype.toString, w = Math.max, x = Math.min,
9765                k = function () {
9766                    return p.Date.now()
9767                };
9768            m.exports = function (t, e, i) {
9769                var n = !0, s = !0;
9770                if ("function" != typeof t) throw new TypeError(_);
9771                return y(i) && (n = "leading" in i ? !!i.leading : n, s = "trailing" in i ? !!i.trailing : s), o(t, e, {
9772                    leading: n,
9773                    maxWait: e,
9774                    trailing: s
9775                })
9776            }
9777        }).call(t, function () {
9778            return this
9779        }())
9780    }, function (f, t) {
9781        (function (t) {
9782            "use strict";
9783
9784            function y(t) {
9785                var e = void 0 === t ? "undefined" : i(t);
9786                return !!t && ("object" == e || "function" == e)
9787            }
9788
9789            function n(t) {
9790                return "symbol" == (void 0 === t ? "undefined" : i(t)) || function (t) {
9791                    return !!t && "object" == (void 0 === t ? "undefined" : i(t))
9792                }(t) && p.call(t) == e
9793            }
9794
9795            function b(t) {
9796                if ("number" == typeof t) return t;
9797                if (n(t)) return s;
9798                if (y(t)) {
9799                    var e = "function" == typeof t.valueOf ? t.valueOf() : t;
9800                    t = y(e) ? e + "" : e
9801                }
9802                if ("string" != typeof t) return 0 === t ? t : +t;
9803                t = t.replace(o, "");
9804                var i = r.test(t);
9805                return i || l.test(t) ? h(t.slice(2), i ? 2 : 8) : a.test(t) ? s : +t
9806            }
9807
9808            function _() {
9809                return d.Date.now()
9810            }
9811
9812            var i = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (t) {
9813                    return typeof t
9814                } : function (t) {
9815                    return t && "function" == typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t
9816                }, s = NaN, e = "[object Symbol]", o = /^\s+|\s+$/g, a = /^[-+]0x[0-9a-f]+$/i, r = /^0b[01]+$/i,
9817                l = /^0o[0-7]+$/i, h = parseInt,
9818                c = "object" == (void 0 === t ? "undefined" : i(t)) && t && t.Object === Object && t,
9819                u = "object" == ("undefined" == typeof self ? "undefined" : i(self)) && self && self.Object === Object && self,
9820                d = c || u || Function("return this")(), p = Object.prototype.toString, w = Math.max, x = Math.min;
9821            f.exports = function (n, i, t) {
9822                function s(t) {
9823                    var e = l, i = h;
9824                    return l = h = void 0, f = t, u = n.apply(i, e)
9825                }
9826
9827                function o(t) {
9828                    var e = t - p;
9829                    return void 0 === p || i <= e || e < 0 || g && c <= t - f
9830                }
9831
9832                function a() {
9833                    var t = _();
9834                    return o(t) ? e(t) : void (d = setTimeout(a, function (t) {
9835                        var e = i - (t - p);
9836                        return g ? x(e, c - (t - f)) : e
9837                    }(t)))
9838                }
9839
9840                function e(t) {
9841                    return d = void 0, v && l ? s(t) : (l = h = void 0, u)
9842                }
9843
9844                function r() {
9845                    var t = _(), e = o(t);
9846                    if (l = arguments, h = this, p = t, e) {
9847                        if (void 0 === d) return function (t) {
9848                            return f = t, d = setTimeout(a, i), m ? s(t) : u
9849                        }(p);
9850                        if (g) return d = setTimeout(a, i), s(p)
9851                    }
9852                    return void 0 === d && (d = setTimeout(a, i)), u
9853                }
9854
9855                var l, h, c, u, d, p, f = 0, m = !1, g = !1, v = !0;
9856                if ("function" != typeof n) throw new TypeError("Expected a function");
9857                return i = b(i) || 0, y(t) && (m = !!t.leading, c = (g = "maxWait" in t) ? w(b(t.maxWait) || 0, i) : c, v = "trailing" in t ? !!t.trailing : v), r.cancel = function () {
9858                    void 0 !== d && clearTimeout(d), l = p = h = d = void (f = 0)
9859                }, r.flush = function () {
9860                    return void 0 === d ? u : e(_())
9861                }, r
9862            }
9863        }).call(t, function () {
9864            return this
9865        }())
9866    }, function (t, e) {
9867        "use strict";
9868
9869        function s() {
9870            return window.MutationObserver || window.WebKitMutationObserver || window.MozMutationObserver
9871        }
9872
9873        function o(t) {
9874            t && t.forEach(function (t) {
9875                var e = Array.prototype.slice.call(t.addedNodes), i = Array.prototype.slice.call(t.removedNodes
9875);
9876                if (function t(e) {
9877                    var i = void 0, n = void 0;
9878                    for (i = 0; i < e.length; i += 1) {
9879                        if ((n = e[i]).dataset && n.dataset.aos) return !0;
9880                        if (n.children && t(n.children)) return !0
9881                    }
9882                    return !1
9883                }(e.concat(i))) return a()
9884            })
9885        }
9886
9887        Object.defineProperty(e, "__esModule", {value: !0});
9888        var a = function () {
9889        };
9890        e.default = {
9891            isSupported: function () {
9892                return !!s()
9893            }, ready: function (t, e) {
9894                var i = window.document, n = new (s())(o);
9895                a = e, n.observe(i.documentElement, {childList: !0, subtree: !0, removedNodes: !0})
9896            }
9897        }
9898    }, function (t, e) {
9899        "use strict";
9900
9901        function i() {
9902            return navigator.userAgent || navigator.vendor || window.opera || ""
9903        }
9904
9905        Object.defineProperty(e, "__esModule", {value: !0});
9906        var n = /(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/i,
9907            s = /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,
9908            o = /(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,
9909            a = /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 )|
9909sy(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,
9910            r = (function (t, e, i) {
9911                return e && h(t.prototype, e), i && h(t, i), t
9912            }(l, [{
9913                key: "phone", value: function () {
9914                    var t = i();
9915                    return !(!n.test(t) && !s.test(t.substr(0, 4)))
9916                }
9917            }, {
9918                key: "mobile", value: function () {
9919                    var t = i();
9920                    return !(!o.test(t) && !a.test(t.substr(0, 4)))
9921                }
9922            }, {
9923                key: "tablet", value: function () {
9924                    return this.mobile() && !this.phone()
9925                }
9926            }]), l);
9927
9928        function l() {
9929            !function (t, e) {
9930                if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
9931            }(this, l)
9932        }
9933
9934        function h(t, e) {
9935            for (var i = 0; i < e.length; i++) {
9936                var n = e[i];
9937                n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n)
9938            }
9939        }
9940
9941        e.default = new r
9942    }, function (t, e) {
9943        "use strict";
9944        Object.defineProperty(e, "__esModule", {value: !0});
9945        e.default = function (t, i) {
9946            var n = window.pageYOffset, s = window.innerHeight;
9947            t.forEach(function (t, e) {
9948                !function (t, e, i) {
9949                    var n = t.node.getAttribute("data-aos-once");
9950                    e > t.position ? t.node.classList.add("aos-animate") : void 0 === n || "false" !== n && (i || "true" === n) || t.node.classList.remove("aos-animate")
9951                }(t, s + n, i)
9952            })
9953        }
9954    }, function (t, e, i) {
9955        "use strict";
9956        Object.defineProperty(e, "__esModule", {value: !0});
9957        var n, s = i(12), o = (n = s) && n.__esModule ? n : {default: n};
9958        e.default = function (t, i) {
9959            return t.forEach(function (t, e) {
9960                t.node.classList.add("aos-init"), t.position = (0, o.default)(t.node, i.offset)
9961            }), t
9962        }
9963    }, function (t, e, i) {
9964        "use strict";
9965        Object.defineProperty(e, "__esModule", {value: !0});
9966        var n, s = i(13), a = (n = s) && n.__esModule ? n : {default: n};
9967        e.default = function (t, e) {
9968            var i = 0, n = 0, s = window.innerHeight, o = {
9969                offset: t.getAttribute("data-aos-offset"),
9970                anchor: t.getAttribute("data-aos-anchor"),
9971                anchorPlacement: t.getAttribute("data-aos-anchor-placement")
9972            };
9973            switch (o.offset && !isNaN(o.offset) && (n = parseInt(o.offset)), o.anchor && document.querySelectorAll(o.anchor) && (t = document.querySelectorAll(o.anchor)[0]), i = (0, a.default)(t).top, o.anchorPlacement) {
9974                case"top-bottom":
9975                    break;
9976                case"center-bottom":
9977                    i += t.offsetHeight / 2;
9978                    break;
9979                case"bottom-bottom":
9980                    i += t.offsetHeight;
9981                    break;
9982                case"top-center":
9983                    i += s / 2;
9984                    break;
9985                case"bottom-center":
9986                    i += s / 2 + t.offsetHeight;
9987                    break;
9988                case"center-center":
9989                    i += s / 2 + t.offsetHeight / 2;
9990                    break;
9991                case"top-top":
9992                    i += s;
9993                    break;
9994                case"bottom-top":
9995                    i += t.offsetHeight + s;
9996                    break;
9997                case"center-top":
9998                    i += t.offsetHeight / 2 + s
9999            }
10000            return o.anchorPlacement || o.offset || isNaN(e) || (n = e), i + n
10001        }
10002    }, function (t, e) {
10003        "use strict";
10004        Object.defineProperty(e, "__esModule", {value: !0});
10005        e.default = function (t) {
10006            for (var e = 0, i = 0; t && !isNaN(t.offsetLeft) && !isNaN(t.offsetTop);) e += t.offsetLeft - ("BODY" != t.tagName ? t.scrollLeft : 0), i += t.offsetTop - ("BODY" != t.tagName ? t.scrollTop : 0), t = t.offsetParent;
10007            return {top: i, left: e}
10008        }
10009    }, function (t, e) {
10010        "use strict";
10011        Object.defineProperty(e, "__esModule", {value: !0});
10012        e.default = function (t) {
10013            return t = t || document.querySelectorAll("[data-aos]"), Array.prototype.map.call(t, function (t) {
10014                return {node: t}
10015            })
10016        }
10017    }], i.c = s, i.p = "dist/", i(0);
10018
10019    function i(t) {
10020        if (s[t]) return s[t].exports;
10021        var e = s[t] = {exports: {}, id: t, loaded: !1};
10022        return n[t].call(e.exports, e, e.exports, i), e.loaded = !0, e.exports
10023    }
10024
10025    var n, s
10026}), function (t, a, o) {
10027    function i(t, e) {
10028        this.el = t, this.$el = a(t), this.opts = a.extend(!0, {}, l, e, this.$el.data()), n == o && (n = a("body")), this.opts.startDate || (this.opts.startDate = new Date), "INPUT" == this.el.nodeName && (this.elIsInput = !0), this.opts.altField && (this.$altField = "string" == typeof this.opts.altField ? a(this.opts.altField) : this.opts.altField), this.inited = !1, this.visible = !1, this.silent = !1, this.currentDate = this.opts.startDate, this.currentView = this.opts.view, this._createShortCuts(), this.selectedDates = [], this.views = {}, this.keys = [], this.minRange = "", this.maxRange = "", this._prevOnSelectValue = "", this.init()
10029    }
10030
10031    var n, s, f, r, e, l, h, c, u, d, p, m, g, v;
10032    l = {
10033        classes: "",
10034        inline: e = !(r = "datepicker"),
10035        language: "ru",
10036        startDate: new Date,
10037        firstDay: "",
10038        weekends: [6, 0],
10039        dateFormat: "",
10040        altField: "",
10041        altFieldDateFormat: "@",
10042        toggleSelected: !0,
10043        keyboardNav: !0,
10044        position: "bottom left",
10045        offset: 12,
10046        view: "days",
10047        minView: "days",
10048        showOtherMonths: !0,
10049        selectOtherMonths: !0,
10050        moveToOtherMonthsOnSelect: !0,
10051        showOtherYears: !0,
10052        selectOtherYears: !0,
10053        moveToOtherYearsOnSelect: !0,
10054        minDate: "",
10055        maxDate: "",
10056        disableNavWhenOutOfRange: !0,
10057        multipleDates: !1,
10058        multipleDatesSeparator: ",",
10059        range: !1,
10060        todayButton: !1,
10061        clearButton: !1,
10062        showEvent: "focus",
10063        autoClose: !1,
10064        monthsField: "monthsShort",
10065        prevHtml: '<svg><path d="M 17,12 l -5,5 l 5,5"></path></svg>',
10066        nextHtml: '<svg><path d="M 14,12 l 5,5 l -5,5"></path></svg>',
10067        navTitles: {days: "MM, <i>yyyy</i>", months: "yyyy", years: "yyyy1 - yyyy2"},
10068        timepicker: !1,
10069        onlyTimepicker: !1,
10070        dateTimeSeparator: " ",
10071        timeFormat: "",
10072        minHours: 0,
10073        maxHours: 24,
10074        minMinutes: 0,
10075        maxMinutes: 59,
10076        hoursStep: 1,
10077        minutesStep: 1,
10078        onSelect: "",
10079        onShow: "",
10080        onHide: "",
10081        onChangeMonth: "",
10082        onChangeYear: "",
10083        onChangeDecade: "",
10084        onChangeView: "",
10085        onRenderCell: ""
10086    }, h = {
10087        ctrlRight: [17, 39],
10088        ctrlUp: [17, 38],
10089        ctrlLeft: [17, 37],
10090        ctrlDown: [17, 40],
10091        shiftRight: [16, 39],
10092        shiftUp: [16, 38],
10093        shiftLeft: [16, 37],
10094        shiftDown: [16, 40],
10095        altUp: [18, 38],
10096        altRight: [18, 39],
10097        altLeft: [18, 37],
10098        altDown: [18, 40],
10099        ctrlShiftUp: [16, 17, 38]
10100    }, (f = i).prototype = {
10101        VERSION: "2.2.3", viewIndexes: ["days", "months", "years"], init: function () {
10102            e || this.opts.inline || !this.elIsInput || this._buildDatepickersContainer(), this._buildBaseHtml(), this._defineLocale(this.opts.language), this._syncWithMinMaxDates(), this.elIsInput && (this.opts.inline || (this._setPositionClasses(this.opts.position), this._bindEvents()), this.opts.keyboardNav && !this.opts.onlyTimepicker && this._bindKeyboardEvents(), this.$datepicker.on("mousedown", this._onMouseDownDatepicker.bind(this)), this.$datepicker.on("mouseup", this._onMouseUpDatepicker.bind(this))), this.opts.classes && this.$datepicker.addClass(this.opts.classes), this.opts.timepicker && (this.timepicker = new a.fn.datepicker.Timepicker(this, this.opts), this._bindTimepickerEvents()), this.opts.onlyTimepicker && this.$datepicker.addClass("-only-timepicker-"), this.views[this.currentView] = new a.fn.datepicker.Body(this, this.currentView, this.opts), this.views[this.currentView].show(), this.nav = new a.fn.datepicker.Navigation(this, this.opts), this.view = this.currentView, this.$el.on("clickCell.adp", this._onClickCell.bind(this)), this.$datepicker.on("mouseenter", ".datepicker--cell", this._onMouseEnterCell.bind(this)), this.$datepicker.on("mouseleave", ".datepicker--cell", this._onMouseLeaveCell.bind(this)), this.inited = !0
10103        }, _createShortCuts: function () {
10104            this.minDate = this.opts.minDate ? this.opts.minDate : new Date(-86399999136e5), this.maxDate = this.opts.maxDate ? this.opts.maxDate : new Date(86399999136e5)
10105        }, _bindEvents: function () {
10106            this.$el.on(this.opts.showEvent + ".adp", this._onShowEvent.bind(this)), this.$el.on("mouseup.adp", this._onMouseUpEl.b
10106ind(this)), this.$el.on("blur.adp", this._onBlur.bind(this)), this.$el.on("keyup.adp", this._onKeyUpGeneral.bind(this)), a(t).on("resize.adp", this._onResize.bind(this)), a("body").on("mouseup.adp", this._onMouseUpBody.bind(this))
10107        }, _bindKeyboardEvents: function () {
10108            this.$el.on("keydown.adp", this._onKeyDown.bind(this)), this.$el.on("keyup.adp", this._onKeyUp.bind(this)), this.$el.on("hotKey.adp", this._onHotKey.bind(this))
10109        }, _bindTimepickerEvents: function () {
10110            this.$el.on("timeChange.adp", this._onTimeChange.bind(this))
10111        }, isWeekend: function (t) {
10112            return -1 !== this.opts.weekends.indexOf(t)
10113        }, _defineLocale: function (t) {
10114            "string" == typeof t ? (this.loc = a.fn.datepicker.language[t], this.loc || (console.warn("Can't find language \"" + t + '" in Datepicker.language, will use "ru" instead'), this.loc = a.extend(!0, {}, a.fn.datepicker.language.ru)), this.loc = a.extend(!0, {}, a.fn.datepicker.language.ru, a.fn.datepicker.language[t])) : this.loc = a.extend(!0, {}, a.fn.datepicker.language.ru, t), this.opts.dateFormat && (this.loc.dateFormat = this.opts.dateFormat), this.opts.timeFormat && (this.loc.timeFormat = this.opts.timeFormat), "" !== this.opts.firstDay && (this.loc.firstDay = this.opts.firstDay), this.opts.timepicker && (this.loc.dateFormat = [this.loc.dateFormat, this.loc.timeFormat].join(this.opts.dateTimeSeparator)), this.opts.onlyTimepicker && (this.loc.dateFormat = this.loc.timeFormat);
10115            var e = this._getWordBoundaryRegExp;
10116            (this.loc.timeFormat.match(e("aa")) || this.loc.timeFormat.match(e("AA"))) && (this.ampm = !0)
10117        }, _buildDatepickersContainer: function () {
10118            e = !0, n.append('<div class="datepickers-container" id="datepickers-container"></div>'), s = a("#datepickers-container")
10119        }, _buildBaseHtml: function () {
10120            var t, e = a('<div class="datepicker-inline">');
10121            t = "INPUT" == this.el.nodeName ? this.opts.inline ? e.insertAfter(this.$el) : s : e.appendTo(this.$el), this.$datepicker = a('<div class="datepicker"><i class="datepicker--pointer"></i><nav class="datepicker--nav"></nav><div class="datepicker--content"></div></div>').appendTo(t), this.$content = a(".datepicker--content", this.$datepicker), this.$nav = a(".datepicker--nav", this.$datepicker)
10122        }, _triggerOnChange: function () {
10123            if (!this.selectedDates.length) {
10124                if ("" === this._prevOnSelectValue) return;
10125                return this._prevOnSelectValue = "", this.opts.onSelect("", "", this)
10126            }
10127            var t, e = this.selectedDates, i = f.getParsedDate(e[0]), n = this,
10128                s = new Date(i.year, i.month, i.date, i.hours, i.minutes);
10129            t = e.map(function (t) {
10130                return n.formatDate(n.loc.dateFormat, t)
10131            }).join(this.opts.multipleDatesSeparator), (this.opts.multipleDates || this.opts.range) && (s = e.map(function (t) {
10132                var e = f.getParsedDate(t);
10133                return new Date(e.year, e.month, e.date, e.hours, e.minutes)
10134            })), this._prevOnSelectValue = t, this.opts.onSelect(t, s, this)
10135        }, next: function () {
10136            var t = this.parsedDate, e = this.opts;
10137            switch (this.view) {
10138                case"days":
10139                    this.date = new Date(t.year, t.month + 1, 1), e.onChangeMonth && e.onChangeMonth(this.parsedDate.month, this.parsedDate.year);
10140                    break;
10141                case"months":
10142                    this.date = new Date(t.year + 1, t.month, 1), e.onChangeYear && e.onChangeYear(this.parsedDate.year);
10143                    break;
10144                case"years":
10145                    this.date = new Date(t.year + 10, 0, 1), e.onChangeDecade && e.onChangeDecade(this.curDecade)
10146            }
10147        }, prev: function () {
10148            var t = this.parsedDate, e = this.opts;
10149            switch (this.view) {
10150                case"days":
10151                    this.date = new Date(t.year, t.month - 1, 1), e.onChangeMonth && e.onChangeMonth(this.parsedDate.month, this.parsedDate.year);
10152                    break;
10153                case"months":
10154                    this.date = new Date(t.year - 1, t.month, 1), e.onChangeYear && e.onChangeYear(this.parsedDate.year);
10155                    break;
10156                case"years":
10157                    this.date = new Date(t.year - 10, 0, 1), e.onChangeDecade && e.onChangeDecade(this.curDecade)
10158            }
10159        }, formatDate: function (t, e) {
10160            e = e || this.date;
10161            var i, n = t, s = this._getWordBoundaryRegExp, o = this.loc, a = f.getLeadingZeroNum, r = f.getDecade(e),
10162                l = f.getParsedDate(e), h = l.fullHours, c = l.hours, u = t.match(s("aa")) || t.match(s("AA")),
10163                d = "am", p = this._replacer;
10164            switch (this.opts.timepicker && this.timepicker && u && (h = a((i = this.timepicker._getValidHoursFromDate(e, u)).hours), c = i.hours, d = i.dayPeriod), !0) {
10165                case/@/.test(n):
10166                    n = n.replace(/@/, e.getTime());
10167                case/aa/.test(n):
10168                    n = p(n, s("aa"), d);
10169                case/AA/.test(n):
10170                    n = p(n, s("AA"), d.toUpperCase());
10171                case/dd/.test(n):
10172                    n = p(n, s("dd"), l.fullDate);
10173                case/d/.test(n):
10174                    n = p(n, s("d"), l.date);
10175                case/DD/.test(n):
10176                    n = p(n, s("DD"), o.days[l.day]);
10177                case/D/.test(n):
10178                    n = p(n, s("D"), o.daysShort[l.day]);
10179                case/mm/.test(n):
10180                    n = p(n, s("mm"), l.fullMonth);
10181                case/m/.test(n):
10182                    n = p(n, s("m"), l.month + 1);
10183                case/MM/.test(n):
10184                    n = p(n, s("MM"), this.loc.months[l.month]);
10185                case/M/.test(n):
10186                    n = p(n, s("M"), o.monthsShort[l.month]);
10187                case/ii/.test(n):
10188                    n = p(n, s("ii"), l.fullMinutes);
10189                case/i/.test(n):
10190                    n = p(n, s("i"), l.minutes);
10191                case/hh/.test(n):
10192                    n = p(n, s("hh"), h);
10193                case/h/.test(n):
10194                    n = p(n, s("h"), c);
10195                case/yyyy/.test(n):
10196                    n = p(n, s("yyyy"), l.year);
10197                case/yyyy1/.test(n):
10198                    n = p(n, s("yyyy1"), r[0]);
10199                case/yyyy2/.test(n):
10200                    n = p(n, s("yyyy2"), r[1]);
10201                case/yy/.test(n):
10202                    n = p(n, s("yy"), l.year.toString().slice(-2))
10203            }
10204            return n
10205        }, _replacer: function (t, e, s) {
10206            return t.replace(e, function (t, e, i, n) {
10207                return e + s + n
10208            })
10209        }, _getWordBoundaryRegExp: function (t) {
10210            var e = "\\s|\\.|-|/|\\\\|,|\\$|\\!|\\?|:|;";
10211            return new RegExp("(^|>|" + e + ")(" + t + ")($|<|" + e + ")", "g")
10212        }, selectDate: function (t) {
10213            var e = this, i = e.opts, n = e.parsedDate, s = e.selectedDates.length, o = "";
10214            if (Array.isArray(t)) t.forEach(function (t) {
10215                e.selectDate(t)
10216            }); else if (t instanceof Date) {
10217                if (this.lastSelectedDate = t, this.timepicker && this.timepicker._setTime(t), e._trigger("selectDate", t), this.timepicker && (t.setHours(this.timepicker.hours), t.setMinutes(this.timepicker.minutes)), "days" == e.view && t.getMonth() != n.month && i.moveToOtherMonthsOnSelect && (o = new Date(t.getFullYear(), t.getMonth(), 1)), "years" == e.view && t.getFullYear() != n.year && i.moveToOtherYearsOnSelect && (o = new Date(t.getFullYear(), 0, 1)), o && (e.silent = !0, e.date = o, e.silent = !1, e.nav._render()), i.multipleDates && !i.range) {
10218                    if (s === i.multipleDates) return;
10219                    e._isSelected(t) || e.selectedDates.push(t)
10220                } else i.range ? 2 == s ? (e.selectedDates = [t], e.minRange = t, e.maxRange = "") : 1 == s ? (e.selectedDates.push(t), e.maxRange ? e.minRange = t : e.maxRange = t, f.bigger(e.maxRange, e.minRange) && (e.maxRange = e.minRange, e.minRange = t), e.selectedDates = [e.minRange, e.maxRange]) : (e.selectedDates = [t], e.minRange = t) : e.selectedDates = [t];
10221                e._setInputValue(), i.onSelect && e._triggerOnChange(), i.autoClose && !this.timepickerIsActive && (i.multipleDates || i.range ? i.range && 2 == e.selectedDates.length && e.hide() : e.hide()), e.views[this.currentView]._render()
10222            }
10223        }, removeDate: function (i) {
10224            var n = this.selectedDates, s = this;
10225            if (i instanceof Date) return n.some(function (t, e) {
10226                if (f.isSame(t, i)) return n.splice(e, 1), s.selectedDates.length ? s.lastSelectedDate = s.selectedDates[s.selectedDates.length - 1] : (s.minRange = "", s.maxRange = "", s.lastSelectedDate = ""), s.views[s.currentView]._render(), s._setInputValue(), s.opts.onSelect && s._triggerOnChange(), !0
10227            })
10228        }, today: function () {
10229            this.silent = !0, this.view = this.opts.minView, this.silent = !1, this.date = new Date, this.opts.todayButton instanceof Date && this.selectDate(this.opts.todayButton)
10230        }, clear: function () {
10231            this.selectedDates = [], this.minRange = "", this.maxRange = "", this.views[this.currentView]._render(), this._setInputValue(), this.opts.onSelect && this._triggerOnChange()
10232        }, update: function (t, e) {
10233            var i = arguments.length, n = this.lastSelectedDate;
10234            return 2 == i ? this.opts[t] = e : 1 == i && "object" == typeof t && (this.opts = a.extend(!0, this.opts, t)), this._createShortCuts(), this._syncWithMinMaxDates(), this._defineLocale(this.opts.language), this.nav._addButtonsIfNeed(), this.opts.onlyTimepicker || this.nav._render(), this.views[this.currentView]._render(), this.elIsInput && !this.opts.inline && (this._setPositionClasses(this.opts.position), this.visible && this.setPosition(this.opts.position)), this.opts.classes && this.$datepicker.addClass(this.opts.classes), this.opts.onlyTimepicker && this.$datepicker.addClass("-only-timepicker-"), this.opts.timepicker && (n && this.timepicker._handleDate(n), this.timepicker._updateRanges(), this.timepicker._updateCurrentTime(), n && (n.setHours(this.timepicker.hours), n.setMinutes(this.timepicker.minutes))), this._setInputValue(), this
10235        }, _syncWithMinMaxDates: function () {
10236            var t = this.date.getTime();
10237            this.silent = !0, this.minTime > t && (this.date = this.minDate), this.maxTime < t && (this.date = this.maxDate), this.silent = !1
10238        }, _isSelected: function (e, i) {
10239            var n = !1;
10240            return this.selectedDates.some(function (t) {
10241                if (f.isSame(t, e, i)) return n = t, !0
10242            }), n
10243        }, _setInputValue: function () {
10244            var t, e = this, i = e.opts, n = e.loc.dateFormat, s = i.altFieldDateFormat,
10245                o = e.selectedDates.map(function (t) {
10246                    return e.formatDate(n, t)
10247                });
10248            i.altField && e.$altField.length && (t = (t = this.selectedDates.map(function (t) {
10249                return e.formatDate(s, t)
10250            })).join(this.opts.multipleDatesSeparator), this.$altField.val(t)), o = o.join(this.opts.multipleDatesSeparator), this.$el.val(o)
10251        }, _isInRange: function (t, e) {
10252            var i = t.getTime(), n = f.getParsedDate(t), s = f.getParsedDate(this.minDate),
10253                o = f.getParsedDate(this.maxDate), a = new Date(n.year, n.month, s.date).getTime(),
10254                r = new Date(n.year, n.month, o.date).getTime(), l = {
10255                    day: i >= this.minTime && i <= this.maxTime,
10256                    month: a >= this.minTime && r <= this.maxTime,
10257                    year: n.year >= s.year && n.year <= o.year
10258                };
10259            return e ? l[e] : l.day
10260        }, _getDimensions: function (t) {
10261            var e = t.offset();
10262            return {width: t.outerWidth(), height: t.outerHeight(), left: e.left, top: e.top}
10263        }, _getDateFromCell: function (t) {
10264            var e = this.parsedDate, i = t.data("year") || e.year, n = t.data("month") == o ? e.month : t.data("month"),
10265                s = t.data("date") || 1;
10266            return new Date(i, n, s)
10267        }, _setPositionClasses: function (t) {
10268            var e = (t = t.split(" "))[0], i = "datepicker -" + e + "-" + t[1] + "- -from-" + e + "-";
10269            this.visible && (i += " active"), this.$datepicker.removeAttr("class").addClass(i)
10270        }, setPosition: function (t) {
10271            t = t || this.opts.position;
10272            var e, i, n = this._getDimensions(this.$el), s = this._getDimensions(this.$datepicker), o = t.split(" "),
10273                a = this.opts.offset, r = o[0], l = o[1];
10274            switch (r) {
10275                case"top":
10276                    e = n.top - s.height - a;
10277                    break;
10278                case"right":
10279                    i = n.left + n.width + a;
10280                    break;
10281                case"bottom":
10282                    e = n.top + n.height + a;
10283                    break;
10284                case"left":
10285                    i = n.left - s.width - a
10286            }
10287            switch (l) {
10288                case"top":
10289                    e = n.top;
10290                    break;
10291                case"right":
10292                    i = n.left + n.width - s.width;
10293                    break;
10294                case"bottom":
10295                    e = n.top + n.height - s.height;
10296                    break;
10297                case"left":
10298                    i = n.left;
10299                    break;
10300                case"center":
10301                    /left|right/.test(r) ? e = n.top + n.height / 2 - s.height / 2 : i = n.left + n.width / 2 - s.width / 2
10302            }
10303            this.$datepicker.css({left: i, top: e})
10304        }, show: function () {
10305            var t = this.opts.onShow;
10306            this.setPosition(this.opts.position), this.$datepicker.addClass("active"), this.visible = !0, t && this._bindVisionEvents(t)
10307        }, hide: function () {
10308            var t = this.opts.onHide;
10309            this.$datepicker.removeClass("active").css({left: "-100000px"}), this.focused = "", this.keys = [], this.inFocus = !1, this.visible = !1, this.$el.blur(), t && this._bindVisionEvents(t)
10310        }, down: function (t) {
10311            this._changeView(t, "down")
10312        }, up: function (t) {
10313            this._changeView(t, "up")
10314        }, _bindVisionEvents: function (t) {
10315            this.$datepicker.off("transitionend.dp"), t(this, !1), this.$datepicker.one("transitionend.dp", t.bind(this, this, !0))
10316        }, _changeView: function (t, e) {
10317            t = t || this.focused || this.date;
10318            var i = "up" == e ? this.viewIndex + 1 : this.viewIndex - 1;
10319            2 < i && (i = 2), i < 0 && (i = 0), this.silent = !0, this.date = new Date(t.getFullYear(), t.getMonth(), 1), this.silent = !1, this.view = this.viewIndexes[i]
10320        }
10320, _handleHotKey: function (t) {
10321            var e, i, n, s = f.getParsedDate(this._getFocusedDate()), o = this.opts, a = !1, r = !1, l = !1, h = s.year,
10322                c = s.month, u = s.date;
10323            switch (t) {
10324                case"ctrlRight":
10325                case"ctrlUp":
10326                    c += 1, a = !0;
10327                    break;
10328                case"ctrlLeft":
10329                case"ctrlDown":
10330                    c -= 1, a = !0;
10331                    break;
10332                case"shiftRight":
10333                case"shiftUp":
10334                    r = !0, h += 1;
10335                    break;
10336                case"shiftLeft":
10337                case"shiftDown":
10338                    r = !0, h -= 1;
10339                    break;
10340                case"altRight":
10341                case"altUp":
10342                    l = !0, h += 10;
10343                    break;
10344                case"altLeft":
10345                case"altDown":
10346                    l = !0, h -= 10;
10347                    break;
10348                case"ctrlShiftUp":
10349                    this.up()
10350            }
10351            n = f.getDaysCount(new Date(h, c)), i = new Date(h, c, u), n < u && (u = n), i.getTime() < this.minTime ? i = this.minDate : i.getTime() > this.maxTime && (i = this.maxDate), this.focused = i, e = f.getParsedDate(i), a && o.onChangeMonth && o.onChangeMonth(e.month, e.year), r && o.onChangeYear && o.onChangeYear(e.year), l && o.onChangeDecade && o.onChangeDecade(this.curDecade)
10352        }, _registerKey: function (e) {
10353            this.keys.some(function (t) {
10354                return t == e
10355            }) || this.keys.push(e)
10356        }, _unRegisterKey: function (t) {
10357            var e = this.keys.indexOf(t);
10358            this.keys.splice(e, 1)
10359        }, _isHotKeyPressed: function () {
10360            var t, e = !1, i = this.keys.sort();
10361            for (var n in h) t = h[n], i.length == t.length && t.every(function (t, e) {
10362                return t == i[e]
10363            }) && (this._trigger("hotKey", n), e = !0);
10364            return e
10365        }, _trigger: function (t, e) {
10366            this.$el.trigger(t, e)
10367        }, _focusNextCell: function (t, e) {
10368            e = e || this.cellType;
10369            var i = f.getParsedDate(this._getFocusedDate()), n = i.year, s = i.month, o = i.date;
10370            if (!this._isHotKeyPressed()) {
10371                switch (t) {
10372                    case 37:
10373                        "day" == e && (o -= 1), "month" == e && (s -= 1), "year" == e && (n -= 1);
10374                        break;
10375                    case 38:
10376                        "day" == e && (o -= 7), "month" == e && (s -= 3), "year" == e && (n -= 4);
10377                        break;
10378                    case 39:
10379                        "day" == e && (o += 1), "month" == e && (s += 1), "year" == e && (n += 1);
10380                        break;
10381                    case 40:
10382                        "day" == e && (o += 7), "month" == e && (s += 3), "year" == e && (n += 4)
10383                }
10384                var a = new Date(n, s, o);
10385                a.getTime() < this.minTime ? a = this.minDate : a.getTime() > this.maxTime && (a = this.maxDate), this.focused = a
10386            }
10387        }, _getFocusedDate: function () {
10388            var t = this.focused || this.selectedDates[this.selectedDates.length - 1], e = this.parsedDate;
10389            if (!t) switch (this.view) {
10390                case"days":
10391                    t = new Date(e.year, e.month, (new Date).getDate());
10392                    break;
10393                case"months":
10394                    t = new Date(e.year, e.month, 1);
10395                    break;
10396                case"years":
10397                    t = new Date(e.year, 0, 1)
10398            }
10399            return t
10400        }, _getCell: function (t, e) {
10401            e = e || this.cellType;
10402            var i, n = f.getParsedDate(t), s = '.datepicker--cell[data-year="' + n.year + '"]';
10403            switch (e) {
10404                case"month":
10405                    s = '[data-month="' + n.month + '"]';
10406                    break;
10407                case"day":
10408                    s += '[data-month="' + n.month + '"][data-date="' + n.date + '"]'
10409            }
10410            return (i = this.views[this.currentView].$el.find(s)).length ? i : a("")
10411        }, destroy: function () {
10412            var t = this;
10413            t.$el.off(".adp").data("datepicker", ""), t.selectedDates = [], t.focused = "", t.views = {}, t.keys = [], t.minRange = "", t.maxRange = "", t.opts.inline || !t.elIsInput ? t.$datepicker.closest(".datepicker-inline").remove() : t.$datepicker.remove()
10414        }, _handleAlreadySelectedDates: function (t, e) {
10415            this.opts.range ? this.opts.toggleSelected ? this.removeDate(e) : 2 != this.selectedDates.length && this._trigger("clickCell", e) : this.opts.toggleSelected && this.removeDate(e), this.opts.toggleSelected || (this.lastSelectedDate = t, this.opts.timepicker && (this.timepicker._setTime(t), this.timepicker.update(
10415)))
10416        }, _onShowEvent: function (t) {
10417            this.visible || this.show()
10418        }, _onBlur: function () {
10419            !this.inFocus && this.visible && this.hide()
10420        }, _onMouseDownDatepicker: function (t) {
10421            this.inFocus = !0
10422        }, _onMouseUpDatepicker: function (t) {
10423            this.inFocus = !1, t.originalEvent.inFocus = !0, t.originalEvent.timepickerFocus || this.$el.focus()
10424        }, _onKeyUpGeneral: function (t) {
10425            this.$el.val() || this.clear()
10426        }, _onResize: function () {
10427            this.visible && this.setPosition()
10428        }, _onMouseUpBody: function (t) {
10429            t.originalEvent.inFocus || this.visible && !this.inFocus && this.hide()
10430        }, _onMouseUpEl: function (t) {
10431            t.originalEvent.inFocus = !0, setTimeout(this._onKeyUpGeneral.bind(this), 4)
10432        }, _onKeyDown: function (t) {
10433            var e = t.which;
10434            if (this._registerKey(e), 37 <= e && e <= 40 && (t.preventDefault(), this._focusNextCell(e)), 13 == e && this.focused) {
10435                if (this._getCell(this.focused).hasClass("-disabled-")) return;
10436                if (this.view != this.opts.minView) this.down(); else {
10437                    var i = this._isSelected(this.focused, this.cellType);
10438                    if (!i) return this.timepicker && (this.focused.setHours(this.timepicker.hours), this.focused.setMinutes(this.timepicker.minutes)), void this.selectDate(this.focused);
10439                    this._handleAlreadySelectedDates(i, this.focused)
10440                }
10441            }
10442            27 == e && this.hide()
10443        }, _onKeyUp: function (t) {
10444            var e = t.which;
10445            this._unRegisterKey(e)
10446        }, _onHotKey: function (t, e) {
10447            this._handleHotKey(e)
10448        }, _onMouseEnterCell: function (t) {
10449            var e = a(t.target).closest(".datepicker--cell"), i = this._getDateFromCell(e);
10450            this.silent = !0, this.focused && (this.focused = ""), e.addClass("-focus-"), this.focused = i, this.silent = !1, this.opts.range && 1 == this.selectedDates.length && (this.minRange = this.selectedDates[0], this.maxRange = "", f.less(this.minRange, this.focused) && (this.maxRange = this.minRange, this.minRange = ""), this.views[this.currentView]._update())
10451        }, _onMouseLeaveCell: function (t) {
10452            a(t.target).closest(".datepicker--cell").removeClass("-focus-"), this.silent = !0, this.focused = "", this.silent = !1
10453        }, _onTimeChange: function (t, e, i) {
10454            var n = new Date, s = !1;
10455            this.selectedDates.length && (s = !0, n = this.lastSelectedDate), n.setHours(e), n.setMinutes(i), s || this._getCell(n).hasClass("-disabled-") ? (this._setInputValue(), this.opts.onSelect && this._triggerOnChange()) : this.selectDate(n)
10456        }, _onClickCell: function (t, e) {
10457            this.timepicker && (e.setHours(this.timepicker.hours), e.setMinutes(this.timepicker.minutes)), this.selectDate(e)
10458        }, set focused(t) {
10459            if (!t && this.focused) {
10460                var e = this._getCell(this.focused);
10461                e.length && e.removeClass("-focus-")
10462            }
10463            this._focused = t, this.opts.range && 1 == this.selectedDates.length && (this.minRange = this.selectedDates[0], this.maxRange = "", f.less(this.minRange, this._focused) && (this.maxRange = this.minRange, this.minRange = "")), this.silent || (this.date = t)
10464        }, get focused() {
10465            return this._focused
10466        }, get parsedDate() {
10467            return f.getParsedDate(this.date)
10468        }, set date(t) {
10469            if (t instanceof Date) return this.currentDate = t, this.inited && !this.silent && (this.views[this.view]._render(), this.nav._render(), this.visible && this.elIsInput && this.setPosition()), t
10470        }, get date() {
10471            return this.currentDate
10472        }, set view(t) {
10473            if (this.viewIndex = this.viewIndexes.indexOf(t), !(this.viewIndex < 0)) return this.prevView = this.currentView, this.currentView = t, this.inited && (this.views[t] ? this.views[t]._render() : this.views[t] = new a.fn.datepicker.Body(this, t, this.opts), this.views[this.prevView].hide(), this.views[t].show(), this.nav._render(), this.opts.onChangeView && this.opts.onChangeView(t), this.elIsInput && this.visible && this.setPosition()), t
10474        }, get view() {
10475            return this.currentView
10476        }, get cellType() {
10477            return this.view.substring(0, this.view.length - 1)
10478        }, get minTime() {
10479            var t = f.getParsedDate(this.minDate);
10480            return new Date(t.year, t.month, t.date).getTime()
10481        }, get maxTime() {
10482            var t = f.getParsedDate(this.maxDate);
10483            return new Date(t.year, t.month, t.date).getTime()
10484        }, get curDecade() {
10485            return f.getDecade(this.date)
10486        }
10487    }, f.getDaysCount = function (t) {
10488        return new Date(t.getFullYear(), t.getMonth() + 1, 0).getDate()
10489    }, f.getParsedDate = function (t) {
10490        return {
10491            year: t.getFullYear(),
10492            month: t.getMonth(),
10493            fullMonth: t.getMonth() + 1 < 10 ? "0" + (t.getMonth() + 1) : t.getMonth() + 1,
10494            date: t.getDate(),
10495            fullDate: t.getDate() < 10 ? "0" + t.getDate() : t.getDate(),
10496            day: t.getDay(),
10497            hours: t.getHours(),
10498            fullHours: t.getHours() < 10 ? "0" + t.getHours() : t.getHours(),
10499            minutes: t.getMinutes(),
10500            fullMinutes: t.getMinutes() < 10 ? "0" + t.getMinutes() : t.getMinutes()
10501        }
10502    }, f.getDecade = function (t) {
10503        var e = 10 * Math.floor(t.getFullYear() / 10);
10504        return [e, 9 + e]
10505    }, f.template = function (t, i) {
10506        return t.replace(/#\{([\w]+)\}/g, function (t, e) {
10507            if (i[e] || 0 === i[e]) return i[e]
10508        })
10509    }, f.isSame = function (t, e, i) {
10510        if (!t || !e) return !1;
10511        var n = f.getParsedDate(t), s = f.getParsedDate(e), o = i || "day";
10512        return {
10513            day: n.date == s.date && n.month == s.month && n.year == s.year,
10514            month: n.month == s.month && n.year == s.year,
10515            year: n.year == s.year
10516        }[o]
10517    }, f.less = function (t, e, i) {
10518        return !(!t || !e) && e.getTime() < t.getTime()
10519    }, f.bigger = function (t, e, i) {
10520        return !(!t || !e) && e.getTime() > t.getTime()
10521    }, f.getLeadingZeroNum = function (t) {
10522        return parseInt(t) < 10 ? "0" + t : t
10523    }, f.resetTime = function (t) {
10524        if ("object" == typeof t) return t = f.getParsedDate(t), new Date(t.year, t.month, t.date)
10525    }, a.fn.datepicker = function (e) {
10526        return this.each(function () {
10527            if (a.data(this, r)) {
10528                var t = a.data(this, r);
10529                t.opts = a.extend(!0, t.opts, e), t.update()
10530            } else a.data(this, r, new i(this, e))
10531        })
10532    }, a.fn.datepicker.Constructor = i, a.fn.datepicker.language = {
10533        ru: {
10534            days: ["Воскресенье", "Понедельник", "Вторник", "Среда", "Четверг", "Пятница", "Суббота"],
10535            daysShort: ["Вос", "Пон", "Вто", "Сре", "Чет", "Пят", "Суб"],
10536            daysMin: ["Вс", "Пн", "Вт", "Ср", "Чт", "Пт", "Сб"],
10537            months: ["Январь", "Февраль", "Март", "Апрель", "Май", "Июнь", "Июль", "Август", "Сентябрь", "Октябрь", "Ноябрь", "Декабрь"],
10538            monthsShort: ["Янв", "Фев", "Мар", "Апр", "Май", "Июн", "Июл", "Авг", "Сен", "Окт", "Ноя", "Дек"],
10539            today: "Сегодня",
10540            clear: "Очистить",
10541            dateFormat: "dd.mm.yyyy",
10542            timeFormat: "hh:ii",
10543            firstDay: 1
10544        }
10545    }, a(function () {
10546        a(".datepicker-here").datepicker()
10547    }), c = {
10548        days: '<div class="datepicker--days datepicker--body"><div class="datepicker--days-names"></div><div class="datepicker--cells datepicker--cells-days"></div></div>',
10549        months: '<div class="datepicker--months datepicker--body"><div class="datepicker--cells datepicker--cells-months"></div></div>',
10550        years: '<div class="datepicker--years datepicker--body"><div class="datepicker--cells datepicker--cells-years"></div></div>'
10551    }, u = a.fn.datepicker, d = u.Constructor, u.Body = function (t, e, i) {
10552        this.d = t, this.type = e, this.opts = i, this.$el = a(""), this.opts.onlyTimepicker || this.init()
10553    }, u.Body.prototype = {
10554        init: function () {
10555            this._buildBaseHtml(), this._render(), this._bindEvents()
10556        }, _bindEvents: function () {
10557            this.$el.on("click", ".datepicker--cell", a.proxy(this._onClickCell, this))
10558        }, _buildBaseHtml: function () {
10559            this.$el = a(c[this.type]).appendTo(this.d.$content), this.$names = a(".datepicker--days-names", this.$el), this.$cells = a(".datepicker--cells", this.$el)
10560        }, _getDayNamesHtml: function (t, e, i, n) {
10561            return i = i || "", 7 < (n = n != o ? n : 0) ? i : 7 == (e = e != o ? e : t) ? this._getDayNamesHtml(t, 0, i, ++n) : (i += '<div class="datepicker--day-name' + (this.d.isWeekend(e) ? " -weekend-" : "") + '">' + this.d.loc.daysMin[e] + "</div>", this._getDayNamesHtml(t, ++e, i, ++n))
10562        }, _getCellContents: function (t, e) {
10563            var i = "datepicker--cell datepicker--cell-" + e, n = new Date, s = this.d, o = d.resetTime(s.minRange),
10564                a = d.resetTime(s.maxRange), r = s.opts, l = d.getParsedDate(t), h = {}, c = l.date;
10565            switch (e) {
10566                case"day":
10567                    s.isWeekend(l.day) && (i += " -weekend-"), l.month != this.d.parsedDate.month && (i += " -other-month-", r.selectOtherMonths || (i += " -disabled-"), r.showOtherMonths || (c = ""));
10568                    break;
10569                case"month":
10570                    c = s.loc[s.opts.monthsField][l.month];
10571                    break;
10572                case"year":
10573                    var u = s.curDecade;
10574                    c = l.year, (l.year < u[0] || l.year > u[1]) && (i += " -other-decade-", r.selectOtherYears || (i += " -disabled-"), r.showOtherYears || (c = ""))
10575            }
10576            return r.onRenderCell && (c = (h = r.onRenderCell(t, e) || {}).html ? h.html : c, i += h.classes ? " " + h.classes : ""), r.range && (d.isSame(o, t, e) && (i += " -range-from-"), d.isSame(a, t, e) && (i += " -range-to-"), 1 == s.selectedDates.length && s.focused ? ((d.bigger(o, t) && d.less(s.focused, t) || d.less(a, t) && d.bigger(s.focused, t)) && (i += " -in-range-"), d.less(a, t) && d.isSame(s.focused, t) && (i += " -range-from-"), d.bigger(o, t) && d.isSame(s.focused, t) && (i += " -range-to-")) : 2 == s.selectedDates.length && d.bigger(o, t) && d.less(a, t) && (i += " -in-range-")), d.isSame(n, t, e) && (i += " -current-"), s.focused && d.isSame(t, s.focused, e) && (i += " -focus-"), s._isSelected(t, e) && (i += " -selected-"), s._isInRange(t, e) && !h.disabled || (i += " -disabled-"), {
10577                html: c,
10578                classes: i
10579            }
10580        }, _getDaysHtml: function (t) {
10581            for (var e, i, n = d.getDaysCount(t), s = new Date(t.getFullYear(), t.getMonth(), 1).getDay(), o = new Date(t.getFullYear(), t.getMonth(), n).getDay(), a = s - this.d.loc.firstDay, r = 6 - o + this.d.loc.firstDay, l = "", h = 1 - (a = a < 0 ? a + 7 : a), c = n + (r = 6 < r ? r - 7 : r); h <= c; h++) i = t.getFullYear(), e = t.getMonth(), l += this._getDayHtml(new Date(i, e, h));
10582            return l
10583        }, _getDayHtml: function (t) {
10584            var e = this._getCellContents(t, "day");
10585            return '<div class="' + e.classes + '" data-date="' + t.getDate() + '" data-month="' + t.getMonth() + '" data-year="' + t.getFullYear() + '">' + e.html + "</div>"
10586        }, _getMonthsHtml: function (t) {
10587            for (var e = "", i = d.getParsedDate(t), n = 0; n < 12;) e += this._getMonthHtml(new Date(i.year, n)), n++;
10588            return e
10589        }, _getMonthHtml: function (t) {
10590            var e = this._getCellContents(t, "month");
10591            return '<div class="' + e.classes + '" data-month="' + t.getMonth() + '">' + e.html + "</div>"
10592        }, _getYearsHtml: function (t) {
10593            d.getParsedDate(t);
10594            for (var e = d.getDecade(t), i = "", n = e[0] - 1; n <= e[1] + 1; n++) i += this._getYearHtml(new Date(n, 0));
10595            return i
10596        }, _getYearHtml: function (t) {
10597            var e = this._getCellContents(t, "year");
10598            return '<div class="' + e.classes + '" data-year="' + t.getFullYear() + '">' + e.html + "</div>"
10599        }, _renderTypes: {
10600            days: function () {
10601                var t = this._getDayNamesHtml(this.d.loc.firstDay), e = this._getDaysHtml(this.d.currentDate);
10602                this.$cells.html(e), this.$names.html(t)
10603            }, months: function () {
10604                var t = this._getMonthsHtml(this.d.currentDate);
10605                this.$cells.html(t)
10606            }, years: function () {
10607                var t = this._getYearsHtml(this.d.currentDate);
10608                this.$cells.html(t)
10609            }
10610        }, _render: function () {
10611            this.opts.onlyTimepicker || this._renderTypes[this.type].bind(this)()
10612        }, _update: function () {
10613            var i, n, s, t = a(".datepicker--cell", this.$cells), o = this;
10614            t.each(function (t, e) {
10615                n = a(this), s = o.d._getDateFromCell(a(this)), i = o._getCellContents(s, o.d.cellType), n.attr("class", i.classes)
10616            })
10617        }, show: function () {
10618            this.opts.onlyTimepicker || (this.$el.addClass("active"), this.acitve = !0)
10619        }, hide: function () {
10620            this.$el.removeClass("active"), this.active = !1
10621        }, _handleClick: function (t) {
10622            var e = t.data("date") || 1, i = t.data("month") || 0, n = t.data("year") || this.d.parsedDate.year,
10623                s = this.d;
10624            if (s.view == this.opts.minView) {
10625                var o = new Date(n, i, e), a = this.d._isSelected(o, this.d.cellType);
10626                a ? s._handleAlreadySelectedDates.bind(s, a, o)() : s._trigger("clickCell", o)
10627            } else s.down(new Date(n, i, e))
10628        }, _onClickCell: function (t) {
10629            var e = a(t.target).closest(".datepicker--cell");
10630            e.hasClass("-disabled-") || this._handleClick.bind(this)(e)
10631        }
10632    }, p = a.fn.datepicker, m = p.Constructor, p.Navigation = function (t, e) {
10633        this.d = t, this.opts = e, this.$buttonsContainer = "", this.init()
10634    }, p.Navigation.prototype = {
10635        init: function () {
10636            this._buildBaseHtml(), this._bindEvents()
10637        }, _bindEvents: function () {
10638            this.d.$nav.on("click", ".datepicker--nav-action", a.proxy(this._onClickNavButton, this)), this.d.$nav.on("click", ".datepicker--nav-title", a.proxy(this._onClickNavTitle, this)), this.d.$datepicker.on("click", ".datepicker--button", a.proxy(this._onClickNavButton, this))
10639        }, _buildBaseHtml: function () {
10640            this.opts.onlyTimepicker || this._render(), this._addButtonsIfNeed()
10641        }, _addButtonsIfNeed: function () {
10642            this.opts.todayButton && this._addButton("today"), this.opts.clearButton && this._addButton("clear")
10643        }, _render: function () {
10644            var t = this._getTitle(this.d.currentDate),
10645                e = m.template('<div class="datepicker--nav-action" data-action="prev">#{prevHtml}</div><div class="datepicker--nav-title">#{title}</div><div class="datepicker--nav-action" data-action="next">#{nextHtml}</div>', a.extend({title: t}, this.opts));
10646            this.d.$nav.html(e), "years" == this.d.view && a(".datepicker--nav-title", this.d.$nav).addClass("-disabled-"), this.setNavStatus()
10647        }, _getTitle: function (t) {
10648            return this.d.formatDate(this.opts.navTitles[this.d.view], t)
10649        }, _addButton: function (t) {
10650            this.$buttonsContainer.length || this._addButtonsContainer();
10651            var e = {action: t, label: this.d.loc[t]},
10652                i = m.template('<span class="datepicker--button" data-action="#{action}">#{label}</span>', e);
10653            a("[data-action=" + t + "]", this.$buttonsContainer).length || this.$buttonsContainer.append(i)
10654        }, _addButtonsContainer: function () {
10655            this.d.$datepicker.append('<div class="datepicker--buttons"></div>'), this.$buttonsContainer = a(".datepicker--buttons", this.d.$datepicker)
10656        }, setNavStatus: function () {
10657            if ((this.opts.minDate || this.opts.maxDate) && this.opts.disableNavWhenOutOfRange) {
10658                var t = this.d.parsedDate, e = t.month, i = t.year, n = t.date;
10659                switch (this.d.view) {
10660                    case"days":
10661                        this.d._isInRange(new Date(i, e - 1, 1), "month") || this._disableNav("prev"), this.d._isInRange(new Date(i, e + 1, 1), "month") || this._disableNav("next");
10662                        break;
10663                    case"months":
10664                        this.d._isInRange(new Date(i - 1, e, n), "year") || this._disableNav("prev"), this.d._isInRange(new Date(i + 1, e, n), "year") || this._disableNav("next");
10665                        break;
10666                    case"years":
10667                        var s = m.getDecade(this.d.date);
10668                        this.d._isInRange(new Date(s[0] - 1, 0, 1), "year") || this._disableNav("prev"), this.d._isInRange(new Date(s[1] + 1, 0, 1), "year") || this._disableNav("next")
10669                }
10670            }
10671        }, _disableNav: function (t) {
10672            a('[data-action="' + t + '"]', this.d.$nav).addClass("-disabled-")
10673        }, _activateNav: function (t) {
10674            a('[data-action="' + t + '"]', this.d.$nav).removeClass("-disabled-")
10675        }, _onClickNavButton: function (t) {
10676            var e = a(t.target).closest("[data-action]").data("action");
10677            this.d[e]()
10678        }, _onClickNavTitle: function (t) {
10679            if (!a(t.target).hasClass("-disabled-")) return "days" == this.d.view ? this.d.view = "months" : void (this.d.view = "years")
10680        }
10681    }, g = a.fn.datepicker, v = g.Constructor, g.Timepicker = function (t, e) {
10682        this.d = t, this.opts = e, this.init()
10683    }, g.Timepicker.prototype = {
10684        init: function () {
10685            var t = "input";
10686            this._setTime(this.d.date), this._buildHTML(), navigator.userAgent.match(/trident/gi) && (t = "change"), this.d.$el.on("selectDate", this._onSelectDate.bind(this)), this.$ranges.on(t, this._onChangeRange.bind(this)), this.$ranges.on("mouseup", this._onMouseUpRange.bind(this)), this.$ranges.on("mousemove focus ", this._onMouseEnterRange.bind(this)), this.$ranges.on("mouseout blur", this._onMouseOutRange.bind(this))
10687        }, _setTime: function (t) {
10688            var e = v.getParsedDate(t);
10689            this._handleDate(t), this.hours = e.hours < this.minHours ? this.minHours : e.hours, this.minutes = e.minutes < this.minMinutes ? this.minMinutes : e.minutes
10690        }, _setMinTimeFromDate: function (t) {
10691            this.minHours = t.getHours(), this.minMinutes = t.getMinutes(), this.d.lastSelectedDate && this.d.lastSelectedDate.getHours() > t.getHours() && (this.minMinutes = this.opts.minMinutes)
10692        }
10692, _setMaxTimeFromDate: function (t) {
10693            this.maxHours = t.getHours(), this.maxMinutes = t.getMinutes(), this.d.lastSelectedDate && this.d.lastSelectedDate.getHours() < t.getHours() && (this.maxMinutes = this.opts.maxMinutes)
10694        }, _setDefaultMinMaxTime: function () {
10695            var t = this.opts;
10696            this.minHours = t.minHours < 0 || 23 < t.minHours ? 0 : t.minHours, this.minMinutes = t.minMinutes < 0 || 59 < t.minMinutes ? 0 : t.minMinutes, this.maxHours = t.maxHours < 0 || 23 < t.maxHours ? 23 : t.maxHours, this.maxMinutes = t.maxMinutes < 0 || 59 < t.maxMinutes ? 59 : t.maxMinutes
10697        }, _validateHoursMinutes: function (t) {
10698            this.hours < this.minHours ? this.hours = this.minHours : this.hours > this.maxHours && (this.hours = this.maxHours), this.minutes < this.minMinutes ? this.minutes = this.minMinutes : this.minutes > this.maxMinutes && (this.minutes = this.maxMinutes)
10699        }, _buildHTML: function () {
10700            var t = v.getLeadingZeroNum, e = {
10701                    hourMin: this.minHours,
10702                    hourMax: t(this.maxHours),
10703                    hourStep: this.opts.hoursStep,
10704                    hourValue: this.hours,
10705                    hourVisible: t(this.displayHours),
10706                    minMin: this.minMinutes,
10707                    minMax: t(this.maxMinutes),
10708                    minStep: this.opts.minutesStep,
10709                    minValue: t(this.minutes)
10710                },
10711                i = v.template('<div class="datepicker--time"><div class="datepicker--time-current">   <span class="datepicker--time-current-hours">#{hourVisible}</span>   <span class="datepicker--time-current-colon">:</span>   <span class="datepicker--time-current-minutes">#{minValue}</span></div><div class="datepicker--time-sliders">   <div class="datepicker--time-row">      <input type="range" name="hours" value="#{hourValue}" min="#{hourMin}" max="#{hourMax}" step="#{hourStep}"/>   </div>   <div class="datepicker--time-row">      <input type="range" name="minutes" value="#{minValue}" min="#{minMin}" max="#{minMax}" step="#{minStep}"/>   </div></div></div>', e);
10712            this.$timepicker = a(i).appendTo(this.d.$datepicker), this.$ranges = a('[type="range"]', this.$timepicker), this.$hours = a('[name="hours"]', this.$timepicker), this.$minutes = a('[name="minutes"]', this.$timepicker), this.$hoursText = a(".datepicker--time-current-hours", this.$timepicker), this.$minutesText = a(".datepicker--time-current-minutes", this.$timepicker), this.d.ampm && (this.$ampm = a('<span class="datepicker--time-current-ampm">').appendTo(a(".datepicker--time-current", this.$timepicker)).html(this.dayPeriod), this.$timepicker.addClass("-am-pm-"))
10713        }, _updateCurrentTime: function () {
10714            var t = v.getLeadingZeroNum(this.displayHours), e = v.getLeadingZeroNum(this.minutes);
10715            this.$hoursText.html(t), this.$minutesText.html(e), this.d.ampm && this.$ampm.html(this.dayPeriod)
10716        }, _updateRanges: function () {
10717            this.$hours.attr({
10718                min: this.minHours,
10719                max: this.maxHours
10720            }).val(this.hours), this.$minutes.attr({min: this.minMinutes, max: this.maxMinutes}).val(this.minutes)
10721        }, _handleDate: function (t) {
10722            this._setDefaultMinMaxTime(), t && (v.isSame(t, this.d.opts.minDate) ? this._setMinTimeFromDate(this.d.opts.minDate) : v.isSame(t, this.d.opts.maxDate) && this._setMaxTimeFromDate(this.d.opts.maxDate)), this._validateHoursMinutes(t)
10723        }, update: function () {
10724            this._updateRanges(), this._updateCurrentTime()
10725        }, _getValidHoursFromDate: function (t, e) {
10726            var i = t;
10727            t instanceof Date && (i = v.getParsedDate(t).hours);
10728            var n = "am";
10729            if (e || this.d.ampm) switch (!0) {
10730                case 0 == i:
10731                    i = 12;
10732                    break;
10733                case 12 == i:
10734                    n = "pm";
10735                    break;
10736                case 11 < i:
10737                    i -= 12, n = "pm"
10738            }
10739            return {hours: i, dayPeriod: n}
10740        }, set hours(t) {
10741            this._hours = t;
10742            var e = this._getValidHoursFromDate(t);
10743            this.displayHours = e.hours, this.dayPeriod = e.dayPeriod
10744        }, get hours() {
10745            return this._hours
10746        }, _onChangeRange: function (t) {
10747            var e = a(t.target), i = e.attr("name");
10748            this.d.timepickerIsActive = !0, this[i] = e.val(), this._updateCurrentTime(), this.d._trigger("timeChange", [this.hours, this.minutes]), this._handleDate(this.d.lastSelectedDate), this.update()
10749        }, _onSelectDate: function (t, e) {
10750            this._handleDate(e), this.update()
10751        }, _onMouseEnterRange: function (t) {
10752            var e = a(t.target).attr("name");
10753            a(".datepicker--time-current-" + e, this.$timepicker).addClass("-focus-")
10754        }, _onMouseOutRange: function (t) {
10755            var e = a(t.target).attr("name");
10756            this.d.inFocus || a(".datepicker--time-current-" + e, this.$timepicker).removeClass("-focus-")
10757        }, _onMouseUpRange: function (t) {
10758            this.d.timepickerIsActive = !1
10759        }
10760    }
10761}(window, jQuery), function (t) {
10762    "object" == typeof module && "object" == typeof module.exports ? t(require("jquery"), window, document) : "undefined" != typeof jQuery && t(jQuery, window, document)
10763}(function (l, t, h, e) {
10764    function c(t, e, i) {
10765        return new Array(i + 1 - t.length).join(e) + t
10766    }
10767
10768    function u(t, e, i) {
10769        if (1 !== arguments.length) return 3 === arguments.length ? new Date(0, 0, 0, t, e, i) : 2 === arguments.length ? new Date(0, 0, 0, t, e, 0) : new Date(0, 0, 0);
10770        var n = t;
10771        return "string" == typeof n && (n = l.fn.timepicker.parseTime(n)), new Date(0, 0, 0, n.getHours(), n.getMinutes(), n.getSeconds())
10772    }
10773
10774    var d, p;
10775    l.TimePicker = function () {
10776        var e = this;
10777        e.container = l(".ui-timepicker-container"), e.ui = e.container.find(".ui-timepicker"), 0 === e.container.length && (e.container = l("<div></div>").addClass("ui-timepicker-container").addClass("ui-timepicker-hidden ui-helper-hidden").appendTo("body").hide(), e.ui = l("<div></div>").addClass("ui-timepicker").addClass("ui-widget ui-widget-content ui-menu").addClass("ui-corner-all").appendTo(e.container), e.viewport = l("<ul></ul>").addClass("ui-timepicker-viewport").appendTo(e.ui), "1.4.2" <= l.f
10777n.jquery && e.ui.delegate("a", "mouseenter.timepicker", function () {
10778            e.activate(!1, l(this).parent())
10779        }).delegate("a", "mouseleave.timepicker", function () {
10780            e.deactivate(!1)
10781        }).delegate("a", "click.timepicker", function (t) {
10782            t.preventDefault(), e.select(!1, l(this).parent())
10783        }))
10784    }, l.TimePicker.count = 0, l.TimePicker.instance = function () {
10785        return l.TimePicker._instance || (l.TimePicker._instance = new l.TimePicker), l.TimePicker._instance
10786    }, l.TimePicker.prototype = {
10787        keyCode: {
10788            ALT: 18,
10789            BLOQ_MAYUS: 20,
10790            CTRL: 17,
10791            DOWN: 40,
10792            END: 35,
10793            ENTER: 13,
10794            HOME: 36,
10795            LEFT: 37,
10796            NUMPAD_ENTER: 108,
10797            PAGE_DOWN: 34,
10798            PAGE_UP: 33,
10799            RIGHT: 39,
10800            SHIFT: 16,
10801            TAB: 9,
10802            UP: 38
10803        }, _items: function (t, e) {
10804            var i, n, s = l("<ul></ul>"), o = null;
10805            for (-1 === t.options.timeFormat.indexOf("m") && t.options.interval % 60 != 0 && (t.options.interval = 60 * Math.max(Math.round(t.options.interval / 60), 1)), i = e ? u(e) : t.options.startTime ? u(t.options.startTime) : u(t.options.startHour, t.options.startMinutes), n = new Date(i.getTime() + 864e5); i < n;) this._isValidTime(t, i) && (o = l("<li>").addClass("ui-menu-item").appendTo(s), l("<a>").addClass("ui-corner-all").text(l.fn.timepicker.formatTime(t.options.timeFormat, i)).appendTo(o), o.data("time-value", i)), i = new Date(i.getTime() + 60 * t.options.interval * 1e3);
10806            return s.children()
10807        }, _isValidTime: function (t, e) {
10808            var i = null, n = null;
10809            return e = u(e), null !== t.options.minTime ? i = u(t.options.minTime) : null === t.options.minHour && null === t.options.minMinutes || (i = u(t.options.minHour, t.options.minMinutes)), null !== t.options.maxTime ? n = u(t.options.maxTime) : null === t.options.maxHour && null === t.options.maxMinutes || (n = u(t.options.maxHour, t.options.maxMinutes)), null !== i && null !== n ? i <= e && e <= n : null !== i ? i <= e : null === n || e <= n
10810        }, _hasScroll: function () {
10811            var t = void 0 !== this.ui.prop ? "prop" : "attr";
10812            return this.ui.height() < this.ui[t]("scrollHeight")
10813        }, _move: function (t, e, i) {
10814            if (this.closed() && this.open(t), this.active) {
10815                var n = this.active[e + "All"](".ui-menu-item").eq(0);
10816                n.length ? this.activate(t, n) : this.activate(t, this.viewport.children(i))
10817            } else this.activate(t, this.viewport.children(i))
10818        }, register: function (t, e) {
10819            var i = this, n = {};
10820            n.element = l(t), n.element.data("TimePicker") || (n.options = l.metadata ? l.extend({}, e, n.element.metadata()) : l.extend({}, e), n.widget = i, l.extend(n, {
10821                next: function () {
10822                    return i.next(n)
10823                }, previous: function () {
10824                    return i.previous(n)
10825                }, first: function () {
10826                    return i.first(n)
10827                }, last: function () {
10828                    return i.last(n)
10829                }, selected: function () {
10830                    return i.selected(n)
10831                }, open: function () {
10832                    return i.open(n)
10833                }, close: function () {
10834                    return i.close(n)
10835                }, closed: function () {
10836                    return i.closed(n)
10837                }, destroy: function () {
10838                    return i.destroy(n)
10839                }, parse: function (t) {
10840                    return i.parse(n, t)
10841                }, format: function (t, e) {
10842                    return i.format(n, t, e)
10843                }, getTime: function () {
10844                    return i.getTime(n)
10845                }, setTime: function (t, e) {
10846                    return i.setTime(n, t, e)
10847                }, option: function (t, e) {
10848                    return i.option(n, t, e)
10849                }
10850            }), i._setDefaultTime(n), i._addInputEventsHandlers(n), n.element.data("TimePicker", n))
10851        }, _setDefaultTime: function (t) {
10852            "now" === t.options.defaultTime ? t.setTime(u(new Date)) : t.options.defaultTime && t.options.defaultTime.getFullYear ? t.setTime(u(t.options.defaultTime)) : t.options.defaultTime && t.setTime(l.fn.timepicker.parseTime(t.options.defaultTime))
10853        }, _addInputEventsHandlers: function (e) {
10854            var i = this;
10855            e.element.bind("keydown.timepicker", function (t) {
10856                switch (t.which || t.keyCode) {
10857                    case i.keyCode.ENTER:
10858                    case i.keyCode.NUMPAD_ENTER:
10859                        t.preventDefault(), i.closed() ? e.element.trigger("change.timepicker") : i.select(e, i.active);
10860                        break;
10861                    case i.keyCode.UP:
10862                        e.previous();
10863                        break;
10864                    case i.keyCode.DOWN:
10865                        e.next();
10866                        break;
10867                    default:
10868                        i.closed() || e.close(!0)
10869                }
10870            }).bind("focus.timepicker", function () {
10871                e.open()
10872            }).bind("blur.timepicker", function () {
10873                setTimeout(function () {
10874                    e.element.data("timepicker-user-clicked-outside") && e.close()
10875                })
10876            }).bind("change.timepicker", function () {
10877                e.closed() && e.setTime(l.fn.timepicker.parseTime(e.element.val()))
10878            })
10879        }, select: function (t, e) {
10880            var i = !1 === t ? this.instance : t;
10881            this.setTime(i, l.fn.timepicker.parseTime(e.children("a").text())), this.close(i, !0)
10882        }, activate: function (t, e) {
10883            var i = this;
10884            if ((!1 === t ? i.instance : t) === i.instance) {
10885                if (i.deactivate(), i._hasScroll()) {
10886                    var n = e.offset().top - i.ui.offset().top, s = i.ui.scrollTop(), o = i.ui.height();
10887                    n < 0 ? i.ui.scrollTop(s + n) : o <= n && i.ui.scrollTop(s + n - o + e.height())
10888                }
10889                i.active = e.eq(0).children("a").addClass("ui-state-hover").attr("id", "ui-active-item").end()
10890            }
10891        }, deactivate: function () {
10892            this.active && (this.active.children("a").removeClass("ui-state-hover").removeAttr("id"), this.active = null)
10893        }, next: function (t) {
10894            return !this.closed() && this.instance !== t || this._move(t, "next", ".ui-menu-item:first"), t.element
10895        }, previous: function (t) {
10896            return !this.closed() && this.instance !== t || this._move(t, "prev", ".ui-menu-item:last"), t.element
10897        }, first: function (t) {
10898            return this.instance === t && this.active && 0 === this.active.prevAll(".ui-menu-item").length
10899        }, last: function (t) {
10900            return this.instance === t && this.active && 0 === this.active.nextAll(".ui-menu-item").length
10901        }, selected: function (t) {
10902            return this.instance === t && this.active ? this.active : null
10903        }, open: function (e) {
10904            var i = this, n = e.getTime(), t = e.options.dynamic && n;
10905            if (!e.options.dropdown) return e.element;
10906            switch (e.element.data("timepicker-event-namespace", Math.random()), l(h).bind("click.timepicker-" + e.element.data("timepicker-event-namespace"), function (t) {
10907                e.element.get(0) === t.target ? e.element.data("timepicker-user-clicked-outside", !1) : e.element.data("timepicker-user-clicked-outside", !0).blur()
10908            }), !e.rebuild && e.items && !t || (e.items = i._items(e, t ? n : null)), (e.rebuild || i.instance !== e || t) && (l.fn.jquery < "1.4.2" ? (i.viewport.children().remove(), i.viewport.append(e.items), i.viewport.find("a").bind("mouseover.timepicker", function () {
10909                i.activate(e, l(this).parent())
10910            }).bind("mouseout.timepicker", function () {
10911                i.deactivate(e)
10912            }).bind("click.timepicker", function (t) {
10913                t.preventDefault(), i.select(e, l(this).parent())
10914            })) : (i.viewport.children().detach(), i.viewport.append(e.items))), e.rebuild = !1, i.container.removeClass("ui-helper-hidden ui-timepicker-hidden ui-timepicker-standard ui-timepicker-corners").show(), e.options.theme) {
10915                case"standard":
10916                    i.container.addClass("ui-timepicker-standard");
10917                    break;
10918                case"standard-rounded-corners":
10919                    i.container.addClass("ui-timepicker-standard ui-timepicker-corners")
10920            }
10921            i.container.hasClass("ui-timepicker-no-scrollbar") || e.options.scrollbar || (i.container.addClass("ui-timepicker-no-scrollbar"), i.viewport.css({paddingRight: 40}));
10922            var s = i.container.outerHeight() - i.container.height(),
10923                o = e.options.zindex ? e.options.zindex : e.element.offsetParent().css("z-index"),
10924                a = e.element.offset();
10925            i.container.css({
10926                top: a.top + e.element.outerHeight(),
10927                left: a.left
10928            }), i.container.show(), i.container.css({
10929                left: e.element.offset().left,
10930                height: i.ui.outerHeight() + s,
10931                width: e.element.outerWidth(),
10932                zIndex: o,
10933                cursor: "default"
10934            });
10935            var r = i.container.width() - (i.ui.outerWidth() - i.ui.width());
10936            return i.ui.css({width: r}), i.viewport.css({width: r}), e.items.css({width: r}), i.instance = e, n ? e.items.each(function () {
10937                var t = l(this);
10938                return (l.fn.jquery < "1.4.2" ? l.fn.timepicker.parseTime(t.find("a").text()) : t.data("time-value")).getTime() !== n.getTime() || (i.activate(e, t), !1)
10939            }) : i.deactivate(e), e.element
10940        }, close: function (t) {
10941            return this.instance === t && (this.container.addClass("ui-helper-hidden ui-timepicker-hidden").hide(), this.ui.scrollTop(0), this.ui.children().removeClass("ui-state-hover")), l(h).unbind("click.timepicker-" + t.element.data("timepicker-event-namespace")), t.element
10942        }, closed: function () {
10943            return this.ui.is(":hidden")
10944        }, destroy: function (t) {
10945            return this.close(t, !0), t.element.unbind(".timepicker").data("TimePicker", null)
10946        }, parse: function (t, e) {
10947            return l.fn.timepicker.parseTime(e)
10948        }, format: function (t, e, i) {
10949            return i = i || t.options.timeFormat, l.fn.timepicker.formatTime(i, e)
10950        }, getTime: function (t) {
10951            var e = l.fn.timepicker.parseTime(t.element.val());
10952            return e instanceof Date && !this._isValidTime(t, e) ? null : e instanceof Date && t.selectedTime ? t.format(e) === t.format(t.selectedTime) ? t.selectedTime : e : e instanceof Date ? e : null
10953        }, setTime: function (t, e, i) {
10954            var n = t.selectedTime;
10955            if ("string" == typeof e && (e = t.parse(e)), e && e.getMinutes && this._isValidTime(t, e)) {
10956                if (e = u(e), t.selectedTime = e, t.element.val(t.format(e, t.options.timeFormat)), i) return t
10957            } else t.selectedTime = null;
10958            return null === n && null === t.selectedTime || (t.element.trigger("time-change", [e]), l.isFunction(t.options.change) && t.options.change.apply(t.element, [e])), t.element
10959        }, option: function (e, t, i) {
10960            if (void 0 === i) return e.options[t];
10961            var n, s, o = e.getTime();
10962            "string" == typeof t ? (n = {})[t] = i : n = t, s = ["minHour", "minMinutes", "minTime", "maxHour", "maxMinutes", "maxTime", "startHour", "startMinutes", "startTime", "timeFormat", "interval", "dropdown"], l.each(n, function (t) {
10963                e.options[t] = n[t], e.rebuild = e.rebuild || -1 < l.inArray(t, s)
10964            }), e.rebuild && e.setTime(o)
10965        }
10966    }, l.TimePicker.defaults = {
10967        timeFormat: "hh:mm p",
10968        minHour: null,
10969        minMinutes: null,
10970        minTime: null,
10971        maxHour: null,
10972        maxMinutes: null,
10973        maxTime: null,
10974        startHour: null,
10975        startMinutes: null,
10976        startTime: null,
10977        interval: 30,
10978        dynamic: !0,
10979        theme: "standard",
10980        zindex: null,
10981        dropdown: !0,
10982        scrollbar: !1,
10983        change: function () {
10984        }
10985    }
10985, l.TimePicker.methods = {chainable: ["next", "previous", "open", "close", "destroy", "setTime"]}, l.fn.timepicker = function (e) {
10986        if ("string" == typeof e) {
10987            var t, i, n = Array.prototype.slice.call(arguments, 1);
10988            return i = this[t = "option" === e && 2 < arguments.length ? "each" : -1 !== l.inArray(e, l.TimePicker.methods.chainable) ? "each" : "map"](function () {
10989                var t = l(this).data("TimePicker");
10990                if ("object" == typeof t) return t[e].apply(t, n)
10991            }), "map" === t && 1 === this.length ? l.makeArray(i).shift() : "map" === t ? l.makeArray(i) : i
10992        }
10993        if (1 === this.length && this.data("TimePicker")) return this.data("TimePicker");
10994        var s = l.extend({}, l.TimePicker.defaults, e);
10995        return this.each(function () {
10996            l.TimePicker.instance().register(this, s)
10997        })
10998    }, l.fn.timepicker.formatTime = function (t, e) {
10999        var i = e.getHours(), n = i % 12, s = e.getMinutes(), o = e.getSeconds(), a = {
11000            hh: c((0 == n ? 12 : n).toString(), "0", 2),
11001            HH: c(i.toString(), "0", 2),
11002            mm: c(s.toString(), "0", 2),
11003            ss: c(o.toString(), "0", 2),
11004            h: 0 == n ? 12 : n,
11005            H: i,
11006            m: s,
11007            s: o,
11008            p: 11 < i ? "PM" : "AM"
11009        }, r = t, l = "";
11010        for (l in a) a.hasOwnProperty(l) && (r = r.replace(new RegExp(l, "g"), a[l]));
11011        return r = r.replace(new RegExp("a", "g"), 11 < i ? "pm" : "am")
11012    }, l.fn.timepicker.parseTime = (p = (d = [[/^(\d+)$/, "$1"], [/^:(\d)$/, "$10"], [/^:(\d+)/, "$1"], [/^(\d):([7-9])$/, "0$10$2"], [/^(\d):(\d\d)$/, "$1$2"], [/^(\d):(\d{1,})$/, "0$1$20"], [/^(\d\d):([7-9])$/, "$10$2"], [/^(\d\d):(\d)$/, "$1$20"], [/^(\d\d):(\d*)$/, "$1$2"], [/^(\d{3,}):(\d)$/, "$10$2"], [/^(\d{3,}):(\d{2,})/, "$1$2"], [/^(\d):(\d):(\d)$/, "0$10$20$3"], [/^(\d{1,2}):(\d):(\d\d)/, "$10$2$3"]]).length, function (t) {
11013        var e, i, n = u(new Date), s = !1, o = !1, a = !1;
11014        if (void 0 === t || !t.toLowerCase) return null;
11015        t = t.toLowerCase(), i = !(e = /a/.test(t)) && /p/.test(t), t = t.replace(/[^0-9:]/g, "").replace(/:+/g, ":");
11016        for (var r = 0; r < p; r += 1) if (d[r][0].test(t)) {
11017            t = t.replace(d[r][0], d[r][1]);
11018            break
11019        }
11020        return 1 === (t = t.replace(/:/g, "")).length ? s = t : 2 === t.length ? s = t : 3 === t.length || 5 === t.length ? (s = t.substr(0, 1), o = t.substr(1, 2), a = t.substr(3, 2)) : (4 === t.length || 5 < t.length) && (s = t.substr(0, 2), o = t.substr(2, 2), a = t.substr(4, 2)), 0 < t.length && t.length < 5 && (t.length < 3 && (o = 0), a = 0), !1 !== s && !1 !== o && !1 !== a && (s = parseInt(s, 10), o = parseInt(o, 10), a = parseInt(a, 10), e && 12 === s ? s = 0 : i && s < 12 && (s += 12), 24 < s ? 6 <= t.length ? l.fn.timepicker.parseTime(t.substr(0, 5)) : l.fn.timepicker.parseTime(t + "0" + (e ? "a" : "") + (i ? "p" : "")) : (n.setHours(s, o, a), n))
11021    })
11022}), function (t) {
11023    "function" == typeof define && define.amd ? define(["jquery"], t) : t("object" == typeof exports ? require("jquery") : window.jQuery || window.Zepto)
11024}(function (c) {
11025    function t() {
11026    }
11027
11028    function u(t, e) {
11029        m.ev.on("mfp" + t + i, e)
11030    }
11031
11032    function d(t, e, i, n) {
11033        var s = document.createElement("div");
11034        return s.className = "mfp-" + t, i && (s.innerHTML = i), n ? e && e.appendChild(s) : (s = c(s), e && s.appendTo(e)), s
11035    }
11036
11037    function p(t, e) {
11038        m.ev.triggerHandler("mfp" + t, e), m.st.callbacks && (t = t.charAt(0).toLowerCase() + t.slice(1), m.st.callbacks[t] && m.st.callbacks[t].apply(m, c.isArray(e) ? e : [e]))
11039    }
11040
11041    function f(t) {
11042        return t === e && m.currTemplate.closeBtn || (m.currTemplate.closeBtn = c(m.st.closeMarkup.replace("%title%", m.st.tClose)), e = t), m.currTemplate.closeBtn
11043    }
11044
11045    function o() {
11046        c.magnificPopup.instance || ((m = new t).init(), c.magnificPopup.instance = m)
11047    }
11048
11049    var m, n, g, s, v, e, r = "Close", l = "BeforeClose", y = "MarkupParse", i = ".mfp", b = "mfp-ready",
11050        a = "mfp-removing", h = "mfp-prevent-close", _ = !!window.jQuery, w = c(window);
11051    t.prototype = {
11052        constructor: t, init: function () {
11053            var t = navigator.appVersion;
11054            m.isLowIE = m.isIE8 = document.all && !document.addEventListener, m.isAndroid = /android/gi.test(t), m.isIOS = /iphone|ipad|ipod/gi.test(t), m.supportsTransition = function () {
11055                var t = document.createElement("p").style, e = ["ms", "O", "Moz", "Webkit"];
11056                if (void 0 !== t.transition) return !0;
11057                for (; e.length;) if (e.pop() + "Transition" in t) return !0;
11058                return !1
11059            }(), m.probablyMobile = m.isAndroid || m.isIOS || /(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent), g = c(document), m.popupsCache = {}
11060        }, open: function (t) {
11061            var e;
11062            if (!1 === t.isObj) {
11063                m.items = t.items.toArray(), m.index = 0;
11064                var i, n = t.items;
11065                for (e = 0; e < n.length; e++) if ((i = n[e]).parsed && (i = i.el[0]), i === t.el[0]) {
11066                    m.index = e;
11067                    break
11068                }
11069            } else m.items = c.isArray(t.items) ? t.items : [t.items], m.index = t.index || 0;
11070            if (!m.isOpen) {
11071                m.types = [], v = "", t.mainEl && t.mainEl.length ? m.ev = t.mainEl.eq(0) : m.ev = g, t.key ? (m.popupsCache[t.key] || (m.popupsCache[t.key] = {}), m.currTemplate = m.popupsCache[t.key]) : m.currTemplate = {}, m.st = c.extend(!0, {}, c.magnificPopup.defaults, t), m.fixedContentPos = "auto" === m.st.fixedContentPos ? !m.probablyMobile : m.st.fixedContentPos, m.st.modal && (m.st.closeOnContentClick = !1, m.st.closeOnBgClick = !1, m.st.showCloseBtn = !1, m.st.enableEscapeKey = !1), m.bgOverlay || (m.bgOverlay = d("bg").on("click.mfp", function () {
11072                    m.close()
11073                }), m.wrap = d("wrap").attr("tabindex", -1).on("click.mfp", function (t) {
11074                    m._checkIfClose(t.target) && m.close()
11075                }), m.container = d("container", m.wrap)), m.contentContainer = d("content"), m.st.preloader && (m.preloader = d("preloader", m.container, m.st.tLoading));
11076                var s = c.magnificPopup.modules;
11077                for (e = 0; e < s.length; e++) {
11078                    var o = s[e];
11079                    o = o.charAt(0).toUpperCase() + o.slice(1), m["init" + o
11079].call(m)
11080                }
11081                p("BeforeOpen"), m.st.showCloseBtn && (m.st.closeBtnInside ? (u(y, function (t, e, i, n) {
11082                    i.close_replaceWith = f(n.type)
11083                }), v += " mfp-close-btn-in") : m.wrap.append(f())), m.st.alignTop && (v += " mfp-align-top"), m.fixedContentPos ? m.wrap.css({
11084                    overflow: m.st.overflowY,
11085                    overflowX: "hidden",
11086                    overflowY: m.st.overflowY
11087                }) : m.wrap.css({
11088                    top: w.scrollTop(),
11089                    position: "absolute"
11090                }), !1 !== m.st.fixedBgPos && ("auto" !== m.st.fixedBgPos || m.fixedContentPos) || m.bgOverlay.css({
11091                    height: g.height(),
11092                    position: "absolute"
11093                }), m.st.enableEscapeKey && g.on("keyup.mfp", function (t) {
11094                    27 === t.keyCode && m.close()
11095                }), w.on("resize.mfp", function () {
11096                    m.updateSize()
11097                }), m.st.closeOnContentClick || (v += " mfp-auto-cursor"), v && m.wrap.addClass(v);
11098                var a = m.wH = w.height(), r = {};
11099                if (m.fixedContentPos && m._hasScrollBar(a)) {
11100                    var l = m._getScrollbarSize();
11101                    l && (r.marginRight = l)
11102                }
11103                m.fixedContentPos && (m.isIE7 ? c("body, html").css("overflow", "hidden") : r.overflow = "hidden");
11104                var h = m.st.mainClass;
11105                return m.isIE7 && (h += " mfp-ie7"), h && m._addClassToMFP(h), m.updateItemHTML(), p("BuildControls"), c("html").css(r), m.bgOverlay.add(m.wrap).prependTo(m.st.prependTo || c(document.body)), m._lastFocusedEl = document.activeElement, setTimeout(function () {
11106                    m.content ? (m._addClassToMFP(b), m._setFocus()) : m.bgOverlay.addClass(b), g.on("focusin.mfp", m._onFocusIn)
11107                }, 16), m.isOpen = !0, m.updateSize(a), p("Open"), t
11108            }
11109            m.updateItemHTML()
11110        }, close: function () {
11111            m.isOpen && (p(l), m.isOpen = !1, m.st.removalDelay && !m.isLowIE && m.supportsTransition ? (m._addClassToMFP(a), setTimeout(function () {
11112                m._close()
11113            }, m.st.removalDelay)) : m._close())
11114        }, _close: function () {
11115            p(r);
11116            var t = a + " " + b + " ";
11117            if (m.bgOverlay.detach(), m.wrap.detach(), m.container.empty(), m.st.mainClass && (t += m.st.mainClass + " "), m._removeClassFromMFP(t), m.fixedContentPos) {
11118                var e = {marginRight: ""};
11119                m.isIE7 ? c("body, html").css("overflow", "") : e.overflow = "", c("html").css(e)
11120            }
11121            g.off("keyup.mfp focusin.mfp"), m.ev.off(i), m.wrap.attr("class", "mfp-wrap").removeAttr("style"), m.bgOverlay.attr("class", "mfp-bg"), m.container.attr("class", "mfp-container"), !m.st.showCloseBtn || m.st.closeBtnInside && !0 !== m.currTemplate[m.currItem.type] || m.currTemplate.closeBtn && m.currTemplate.closeBtn.detach(), m.st.autoFocusLast && m._lastFocusedEl && c(m._lastFocusedEl).focus(), m.currItem = null, m.content = null, m.currTemplate = null, m.prevHeight = 0, p("AfterClose")
11122        }, updateSize: function (t) {
11123            if (m.isIOS) {
11124                var e = document.documentElement.clientWidth / window.innerWidth, i = window.innerHeight * e;
11125                m.wrap.css("height", i), m.wH = i
11126            } else m.wH = t || w.height();
11127            m.fixedContentPos || m.wrap.css("height", m.wH), p("Resize")
11128        }, updateItemHTML: function () {
11129            var t = m.items[m.index];
11130            m.contentContainer.detach(), m.content && m.content.detach(), t.parsed || (t = m.parseEl(m.index));
11131            var e = t.type;
11132            if (p("BeforeChange", [m.currItem ? m.currItem.type : "", e]), m.currItem = t, !m.currTemplate[e]) {
11133                var i = !!m.st[e] && m.st[e].markup;
11134                p("FirstMarkupParse", i), m.currTemplate[e] = !i || c(i)
11135            }
11136            s && s !== t.type && m.container.removeClass("mfp-" + s + "-holder");
11137            var n = m["get" + e.charAt(0).toUpperCase() + e.slice(1)](t, m.currTemplate[e]);
11138            m.appendContent(n, e), t.preloaded = !0, p("Change", t), s = t.type, m.container.prepend(m.contentContainer), p("AfterChange")
11139        }, appendContent: function (t, e) {
11140            (m.content = t) ? m.st.showCloseBtn && m.st.closeBtnInside && !0 === m.currTemplate[e] ? m.content.find(".mfp-close").length || m.content.append(f()) : m.content = t : m.content = "", p("BeforeAppend"), m.container.addClass("mfp-" + e + "-holder"), m.contentContainer.append(m.content)
11141        }, parseEl: function (t) {
11142            var e, i = m.items[t];
11143            if ((i = i.tagName ? {el: c(i)} : (e = i.type, {data: i, src: i.src})).el) {
11144                for (var n = m.types, s = 0; s < n.length; s++) if (i.el.hasClass("mfp-" + n[s])) {
11145                    e = n[s];
11146                    break
11147                }
11148                i.src = i.el.attr("data-mfp-src"), i.src || (i.src = i.el.attr("href"))
11149            }
11150            return i.type = e || m.st.type || "inline", i.index = t, i.parsed = !0, m.items[t] = i, p("ElementParse", i), m.items[t]
11151        }, addGroup: function (e, i) {
11152            function t(t) {
11153                t.mfpEl = this, m._openClick(t, e, i)
11154            }
11155
11156            var n = "click.magnificPopup";
11157            (i = i || {}).mainEl = e, i.items ? (i.isObj = !0, e.off(n).on(n, t)) : (i.isObj = !1, i.delegate ? e.off(n).on(n, i.delegate, t) : (i.items = e).off(n).on(n, t))
11158        }, _openClick: function (t, e, i) {
11159            if ((void 0 !== i.midClick ? i.midClick : c.magnificPopup.defaults.midClick) || !(2 === t.which || t.ctrlKey || t.metaKey || t.altKey || t.shiftKey)) {
11160                var n = void 0 !== i.disableOn ? i.disableOn : c.magnificPopup.defaults.disableOn;
11161                if (n) if (c.isFunction(n)) {
11162                    if (!n.call(m)) return !0
11163                } else if (w.width() < n) return !0;
11164                t.type && (t.preventDefault(), m.isOpen && t.stopPropagation()), i.el = c(t.mfpEl), i.delegate && (i.items = e.find(i.delegate)), m.open(i)
11165            }
11166        }, updateStatus: function (t, e) {
11167            if (m.preloader) {
11168                n !== t && m.container.removeClass("mfp-s-" + n), e || "loading" !== t || (e = m.st.tLoading);
11169                var i = {status: t, text: e};
11170                p("UpdateStatus", i), t = i.status, e = i.text, m.preloader.html(e), m.preloader.find("a").on("click", function (t) {
11171                    t.stopImmediatePropagation()
11172                }), m.container.addClass("mfp-s-" + t), n = t
11173            }
11174        }, _checkIfClose: function (t) {
11175            if (!c(t).hasClass(h)) {
11176                var e = m.st.closeOnContentClick, i = m.st.closeOnBgClick;
11177                if (e && i) return !0;
11178                if (!m.content || c(t).hasClass("mfp-close") || m.preloader && t === m.preloader[0]) return !0;
11179                if (t === m.content[0] || c.contains(m.content[0], t)) {
11180                    if (e) return !0
11181                } else if (i && c.contains(document, t)) return !0;
11182                return !1
11183            }
11184        }, _addClassToMFP: function (t) {
11185            m.bgOverlay.addClass(t), m.wrap.addClass(t)
11186        }, _removeClassFromMFP: function (t) {
11187            this.bgOverlay.removeClass(t), m.wrap.removeClass(t)
11188        }, _hasScrollBar: function (t) {
11189            return (m.isIE7 ? g.height() : document.body.scrollHeight) > (t || w.height())
11190        }, _setFocus: function () {
11191            (m.st.focus ? m.content.find(m.st.focus).eq(0) : m.wrap).focus()
11192        }, _onFocusIn: function (t) {
11193            return t.target === m.wrap[0] || c.contains(m.wrap[0], t.target) ? void 0 : (m._setFocus(), !1)
11194        }, _parseMarkup: function (s, t, e) {
11195            var o;
11196            e.data && (t = c.extend(e.data, t)), p(y, [s, t, e]), c.each(t, function (t, e) {
11197                if (void 0 === e || !1 === e) return !0;
11198                if (1 < (o = t.split("_")).length) {
11199                    var i = s.find(".mfp-" + o[0]);
11200                    if (0 < i.length) {
11201                        var n = o[1];
11202                        "replaceWith" === n ? i[0] !== e[0] && i.replaceWith(e) : "img" === n ? i.is("img") ? i.attr("src", e) : i.replaceWith(c("<img>").attr("src", e).attr("class", i.attr("class"))) : i.attr(o[1], e)
11203                    }
11204                } else s.find(".mfp-" + t).html(e)
11205            })
11206        }, _getScrollbarSize: function () {
11207            if (void 0 === m.scrollbarSize) {
11208                var t = document.createElement("div");
11209                t.style.cssText = "width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;", document.body.appendChild(t), m.scrollbarSize = t.offsetWidth - t.clientWidth, document.body.removeChild(t)
11210            }
11211            return m.scrollbarSize
11212        }
11213    }, c.magnificPopup = {
11214        instance: null,
11215        proto: t.prototype,
11216        modules: [],
11217        open: function (t, e) {
11218            return o(), (t = t ? c.extend(!0, {}, t) : {}).isObj = !0, t.index = e || 0, this.instance.open(t)
11219        },
11220        close: function () {
11221            return c.magnificPopup.instance && c.magnificPopup.instance.close()
11222        },
11223        registerModule: function (t, e) {
11224            e.options && (c.magnificPopup.defaults[t] = e.options), c.extend(this.proto, e.proto), this.modules.push(t)
11225        },
11226        defaults: {
11227            disableOn: 0,
11228            key: null,
11229            midClick: !1,
11230            mainClass: "",
11231            preloader: !0,
11232            focus: "",
11233            closeOnContentClick: !1,
11234            closeOnBgClick: !0,
11235            closeBtnInside: !0,
11236            showCloseBtn: !0,
11237            enableEscapeKey: !0,
11238            modal: !1,
11239            alignTop: !1,
11240            removalDelay: 0,
11241            prependTo: null,
11242            fixedContentPos: "auto",
11243            fixedBgPos: "auto",
11244            overflowY: "auto",
11245            closeMarkup: '<button title="%title%" type="button" class="mfp-close">&#215;</button>',
11246            tClose: "Close (Esc)",
11247            tLoading: "Loading...",
11248            autoFocusLast: !0
11249        }
11250    }, c.fn.magnificPopup = function (t) {
11251        o();
11252        var e = c(this);
11253        if ("string" == typeof t) if ("open" === t) {
11254            var i, n = _ ? e.data("magnificPopup") : e[0].magnificPopup, s = parseInt(arguments[1], 10) || 0;
11255            i = n.items ? n.items[s] : (i = e, n.delegate && (i = i.find(n.delegate)), i.eq(s)), m._openClick({mfpEl: i}, e, n)
11256        } else m.isOpen && m[t].apply(m, Array.prototype.slice.call(arguments, 1)); else t = c.extend(!0, {}, t), _ ? e.data("magnificPopup", t) : e[0].magnificPopup = t, m.addGroup(e, t);
11257        return e
11258    };
11259
11260    function x() {
11261        D && (C.after(D.addClass(k)).detach(), D = null)
11262    }
11263
11264    var k, C, D, T = "inline";
11265    c.magnificPopup.registerModule(T, {
11266        options: {hiddenClass: "hide", markup: "", tNotFound: "Content not found"},
11267        proto: {
11268            initInline: function () {
11269                m.types.push(T), u(r + "." + T, function () {
11270                    x()
11271                })
11272            }, getInline: function (t, e) {
11273                if (x(), t.src) {
11274                    var i = m.st.inline, n = c(t.src);
11275                    if (n.length) {
11276                        var s = n[0].parentNode;
11277                        s && s.tagName && (C || (k = i.hiddenClass, C = d(k), k = "mfp-" + k), D = n.after(C).detach().removeClass(k)), m.updateStatus("ready")
11278                    } else m.updateStatus("error", i.tNotFound), n = c("<div>");
11279                    return t.inlineElement = n
11280                }
11281                return m.updateStatus("ready"), m._parseMarkup(e, {}, t), e
11282            }
11283        }
11284    });
11285
11286    function S() {
11287        P && c(document.body).removeClass(P)
11288    }
11289
11290    function I() {
11291        S(), m.req && m.req.abort()
11292    }
11293
11294    var P, M = "ajax";
11295    c.magnificPopup.registerModule(M, {
11296        options: {
11297            settings: null,
11298            cursor: "mfp-ajax-cur",
11299            tError: '<a href="%url%">The content</a> could not be loaded.'
11300        }, proto: {
11301            initAjax: function () {
11302                m.types.push(M), P = m.st.ajax.cursor, u(r + "." + M, I), u("BeforeChange.ajax", I)
11303            }, getAjax: function (s) {
11304                P && c(document.body).addClass(P), m.updateStatus("loading");
11305                var t = c.extend({
11306                    url: s.src, success: function (t, e, i) {
11307                        var n = {data: t, xhr: i};
11308                        p("ParseAjax", n), m.appendContent(c(n.data), M), s.finished = !0, S(), m._setFocus(), setTimeout(function () {
11309                            m.wrap.addClass(b)
11310                        }, 16), m.updateStatus("ready"), p("AjaxContentAdded")
11311                    }, error: function () {
11312                        S(), s.finished = s.loadError = !0, m.updateStatus("error", m.st.ajax.tError.replace("%url%", s.src))
11313                    }
11314                }, m.st.ajax.settings);
11315                return m.req = c.ajax(t), ""
11316            }
11317        }
11318    });
11319    var $;
11320    c.magnificPopup.registerModule("image", {
11321        options: {
11322            markup: '<div class="mfp-figure"><div class="mfp-close"></div><figure><div class="mfp-img"></div><figcaption><div class="mfp-bottom-bar"><div class="mfp-title"></div><div class="mfp-counter"></div></div></figcaption></figure></div>',
11323            cursor: "mfp-zoom-out-cur",
11324            titleSrc: "title",
11325            verticalFit: !0,
11326            tError: '<a href="%url%">The image</a> could not be loaded.'
11327        }, proto: {
11328            initImage: function () {
11329                var t = m.st.image, e = ".image";
11330                m.types.push("image"), u("Open" + e, function () {
11331                    "image" === m.currItem.type && t.cursor && c(document.body).addClass(t.cursor)
11332                }), u(r + e, function () {
11333                    t.cursor && c(document.body).removeClass(t.cursor), w.off("resize.mfp")
11334                }), u("Resize" + e, m.resizeImage), m.isLowIE && u("AfterChange", m.resizeImage)
11335            }, resizeImage: function () {
11336                var t = m.currItem;
11337                if (t && t.img && m.st.image.verticalFit) {
11338                    var e = 0;
11339                    m.isLowIE && (e = parseInt(t.img.css("padding-top"), 10) + parseInt(t.img.css("padding-bottom"), 10)), t.img.css("max-height", m.wH - e)
11340                }
11341            }, _onImageHasSize: function (t) {
11342                t.img && (t.hasSize = !0, $ && clearInterval($), t.isCheckingImgSize = !1, p("ImageHasSize", t), t.imgHidden && (m.content && m.content.removeClass("mfp-loading"), t.imgHidden = !1))
11343            }, findImageSize: function (e) {
11344                var i = 0, n = e.img[0], s = function (t) {
11345                    $ && clearInterval($), $ = setInterval(function () {
11346                        return 0 < n.naturalWidth ? void m._onImageHasSize(e) : (200 < i && clearInterval($), void (3 === ++i ? s(10) : 40 === i ? s(50) : 100 === i && s(500)))
11347                    }, t)
11348                };
11349                s(1)
11350            }, getImage: function (t, e) {
11351                var i = 0, n = function () {
11352                    t && (t.img[0].complete ? (t.img.off(".mfploader"), t === m.currItem && (m._onImageHasSize(t), m.updateStatus("ready")), t.hasSize = !0, t.loaded = !0, p("ImageLoadComplete")) : ++i < 200 ? setTimeout(n, 100) : s())
11353                }, s = function () {
11354                    t && (t.img.off(".mfploader"), t === m.currItem && (m._onImageHasSize(t), m.updateStatus("error", o.tError.replace("%url%", t.src))), t.hasSize = !0, t.loaded = !0, t.loadError = !0)
11355                }, o = m.st.image, a = e.find(".mfp-img");
11356                if (a.length) {
11357                    var r = document.createElement("img");
11358                    r.className = "mfp-img", t.el && t.el.find("img").length && (r.alt = t.el.find("img").attr("alt")), t.img = c(r).on("load.mfploader", n).on("error.mfploader", s), r.src = t.src, a.is("img") && (t.img = t.img.clone()), 0 < (r = t.img[0]).naturalWidth ? t.hasSize = !0 : r.width || (t.hasSize = !1)
11359                }
11360                return m._parseMarkup(e, {
11361                    title: function (t) {
11362                        if (t.data && void 0 !== t.data.title) return t.data.title;
11363                        var e = m.st.image.titleSrc;
11364                        if (e) {
11365                            if (c.isFunction(e)) return e.call(m, t);
11366                            if (t.el) return t.el.attr(e) || ""
11367                        }
11368                        return ""
11369                    }(t), img_replaceWith: t.img
11370                }, t), m.resizeImage(), t.hasSize ? ($ && clearInterval($), t.loadError ? (e.addClass("mfp-loading"), m.updateStatus("error", o.tError.replace("%url%", t.src))) : (e.removeClass("mfp-loading"), m.updateStatus("ready"))) : (m.updateStatus("loading"), t.loading = !0, t.hasSize || (t.imgHidden = !0, e.addClass("mfp-loading"), m.findImageSize(t))), e
11371            }
11372        }
11373    });
11374    var E;
11375    c.magnificPopup.registerModule("zoom", {
11376        options: {
11377            enabled: !1, easing: "ease-in-out", duration: 300, opener: function (t) {
11378                return t.is("img") ? t : t.find("img")
11379            }
11380        }, proto: {
11381            initZoom: function () {
11382                var t, o = m.st.zoom;
11383                if (o.enabled && m.supportsTransition) {
11384                    function e(t) {
11385                        var e = t.clone().removeAttr("style").removeAttr("class").addClass("mfp-animated-image"),
11386                            i = "all " + o.duration / 1e3 + "s " + o.easing, n = {
11387                                position: "fixed",
11388                                zIndex: 9999,
11389                                left: 0,
11390                                top: 0,
11391                                "-webkit-backface-visibility": "hidden"
11392                            }, s = "transition";
11393                        return n["-webkit-" + s] = n["-moz-" + s] = n["-o-" + s] = n[s] = i, e.css(n), e
11394                    }
11395
11396                    function i() {
11397                        m.content.css("visibility", "visible")
11398                    }
11399
11400                    var n, s, a = o.duration;
11401                    u("BuildControls.zoom", function () {
11402                        if (m._allowZoom()) {
11403                            if (clearTimeout(n), m.content.css("visibility", "hidden"), !(t = m._getItemToZoom())) return void i();
11404                            (s = e(t)).css(m._getOffset()), m.wrap.append(s), n = setTimeout(function () {
11405                                s.css(m._getOffset(!0)), n = setTimeout(function () {
11406                                    i(), setTimeout(function () {
11407                                        s.remove(), t = s = null, p("ZoomAnimationEnded")
11408                                    }, 16)
11409                                }, a)
11410                            }, 16)
11411                        }
11412                    }), u(l + ".zoom", function () {
11413                        if (m._allowZoom()) {
11414                            if (clearTimeout(n), m.st.removalDelay = a, !t) {
11415                                if (!(t = m._getItemToZoom())) return;
11416                                s = e(t)
11417                            }
11418                            s.css(m._getOffset(!0)), m.wrap.append(s), m.content.css("visibility", "hidden"), setTimeout(function () {
11419                                s.css(m._getOffset())
11420                            }, 16)
11421                        }
11422                    }), u(r + ".zoom", function () {
11423                        m._allowZoom() && (i(), s && s.remove(), t = null)
11424                    })
11425                }
11426            }, _allowZoom: function () {
11427                return "image" === m.currItem.type
11428            }, _getItemToZoom: function () {
11429                return !!m.currItem.hasSize && m.currItem.img
11430            }, _getOffset: function (t) {
11431                var e, i = (e = t ? m.currItem.img : m.st.zoom.opener(m.currItem.el || m.currItem)).offset(),
11432                    n = parseInt(e.css("padding-top"), 10), s = parseInt(e.css("padding-bottom"), 10);
11433                i.top -= c(window).scrollTop() - n;
11434                var o = {width: e.width(), height: (_ ? e.innerHeight() : e[0].offsetHeight) - s - n};
11435                return void 0 === E && (E = void 0 !== document.createElement("p").style.MozTransform), E ? o["-moz-transform"] = o.transform = "translate(" + i.left + "px," + i.top + "px)" : (o.left = i.left, o.top = i.top), o
11436            }
11437        }
11438    });
11439
11440    function N(t) {
11441        if (m.currTemplate[A]) {
11442            var e = m.currTemplate[A].find("iframe");
11443            e.length && (t || (e[0].src = "//about:blank"), m.isIE8 && e.css("display", t ? "block" : "none"))
11444        }
11445    }
11446
11447    var A = "iframe";
11448    c.magnificPopup.registerModule(A, {
11449        options: {
11450            markup: '<div class="mfp-iframe-scaler"><div class="mfp-close"></div><iframe class="mfp-iframe" src="//about:blank" frameborder="0" allowfullscreen></iframe></div>',
11451            srcAction: "iframe_src",
11452            patterns: {
11453                youtube: {index: "youtube.com", id: "v=", src: "//www.youtube.com/embed/%id%?autoplay=1"},
11454                vimeo: {index: "vimeo.com/", id: "/", src: "//player.vimeo.com/video/%id%?autoplay=1"},
11455                gmaps: {index: "//maps.google.", src: "%id%&output=embed"}
11456            }
11457        }, proto: {
11458            initIframe: function () {
11459                m.types.push(A), u("BeforeChange", function (t, e, i) {
11460                    e !== i && (e === A ? N() : i === A && N(!0))
11461                }), u(r + "." + A, function () {
11462                    N()
11463                })
11464            }, getIframe: function (t, e) {
11465                var i = t.src, n = m.st.iframe;
11466                c.each(n.patterns, function () {
11467                    return -1 < i.indexOf(this.index) ? (this.id && (i = "string" == typeof this.id ? i.substr(i.lastIndexOf(this.id) + this.id.length, i.length) : this.id.call(this, i)), i = this.src.replace("%id%", i), !1) : void 0
11468                });
11469                var s = {};
11470                return n.srcAction && (s[n.srcAction] = i), m._parseMarkup(e, s, t), m.updateStatus("ready"), e
11471            }
11472        }
11473    });
11474
11475    function O(t) {
11476        var e = m.items.length;
11477        return e - 1 < t ? t - e : t < 0 ? e + t : t
11478    }
11479
11480    function H(t, e, i) {
11481        return t.replace(/%curr%/gi, e + 1).replace(/%total%/gi, i)
11482    }
11483
11484    c.magnificPopup.registerModule("gallery", {
11485        options: {
11486            enabled: !1,
11487            arrowMarkup: '<button title="%title%" type="button" class="mfp-arrow mfp-arrow-%dir%"></button>',
11488            preload: [0, 2],
11489            navigateByImgClick: !0,
11490            arrows: !0,
11491            tPrev: "Previous (Left arrow key)",
11492            tNext: "Next (Right arrow key)",
11493            tCounter: "%curr% of %total%"
11494        }, proto: {
11495            initGallery: function () {
11496                var o = m.st.gallery, t = ".mfp-gallery";
11497                return m.direction = !0, !(!o || !o.enabled) && (v += " mfp-gallery", u("Open" + t, function () {
11498                    o.navigateByImgClick && m.wrap.on("click" + t, ".mfp-img", function () {
11499                        return 1 < m.items.length ? (m.next(), !1) : void 0
11500                    }), g.on("keydown" + t, function (t) {
11501                        37 === t.keyCode ? m.prev() : 39 === t.keyCode && m.next()
11502                    })
11503                }), u("UpdateStatus" + t, function (t, e) {
11504                    e.text && (e.text = H(e.text, m.currItem.index, m.items.length))
11505                }), u(y + t, function (t, e, i, n) {
11506                    var s = m.items.length;
11507                    i.counter = 1 < s ? H(o.tCounter, n.index, s) : ""
11508                }), u("BuildControls" + t, function () {
11509                    if (1 < m.items.length && o.arrows && !m.arrowLeft) {
11510                        var t = o.arrowMarkup,
11511                            e = m.arrowLeft = c(t.replace(/%title%/gi, o.tPrev).replace(/%dir%/gi, "left")).addClass(h),
11512                            i = m.arrowRight = c(t.replace(/%title%/gi, o.tNext).replace(/%dir%/gi, "right")).addClass(h);
11513                        e.click(function () {
11514                            m.prev()
11515                        }), i.click(function () {
11516                            m.next()
11517                        }), m.container.append(e.add(i))
11518                    }
11519                }), u("Change" + t, function () {
11520                    m._preloadTimeout && clearTimeout(m._preloadTimeout), m._preloadTimeout = setTimeout(function () {
11521                        m.preloadNearbyImages(), m._preloadTimeout = null
11522                    }, 16)
11523                }), void u(r + t, function () {
11524                    g.off(t), m.wrap.off("click" + t), m.arrowRight = m.arrowLeft = null
11525                }))
11526            }, next: function () {
11527                m.direction = !0, m.index = O(m.index + 1), m.updateItemHTML()
11528            }, prev: function () {
11529                m.direction = !1, m.index = O(m.index - 1), m.updateItemHTML()
11530            }, goTo: function (t) {
11531                m.direction = t >= m.index, m.index = t, m.updateItemHTML()
11532            }, preloadNearbyImages: function () {
11533                var t, e = m.st.gallery.preload, i = Math.min(e[0], m.items.length), n = Math.min(e[1], m.items.length);
11534                for (t = 1; t <= (m.direction ? n : i); t++) m._preloadItem(m.index + t);
11535                for (t = 1; t <= (m.direction ? i : n); t++) m._preloadItem(m.index - t)
11536            }, _preloadItem: function (t) {
11537                if (t = O(t), !m.items[t].preloaded) {
11538                    var e = m.items[t];
11539                    e.parsed || (e = m.parseEl(t)), p("LazyLoad", e), "image" === e.type && (e.img = c('<img class="mfp-img" />').on("load.mfploader", function () {
11540                        e.hasSize = !0
11541                    }).on("error.mfploader", function () {
11542                        e.hasSize = !0, e.loadError = !0, p("LazyLoadError", e)
11543                    }).attr("src", e.src)), e.preloaded = !0
11544                }
11545            }
11546        }
11547    });
11548    var z = "retina";
11549    c.magnificPopup.registerModule(z, {
11550        options: {
11551            replaceSrc: function (t) {
11552                return t.src.replace(/\.\w+$/, function (t) {
11553                    return "@2x" + t
11554                })
11555            }, ratio: 1
11556        }, proto: {
11557            initRetina: function () {
11558                if (1 < window.devicePixelRatio) {
11559                    var i = m.st.retina, n = i.ratio;
11560                    1 < (n = isNaN(n) ? n() : n) && (u("ImageHasSize." + z, function (t, e) {
11561                        e.img.css({"max-width": e.img[0].naturalWidth / n, width: "100%"})
11562                    }), u("ElementParse." + z, function (t, e) {
11563                        e.src = i.replaceSrc(e, n)
11564                    }))
11565                }
11566            }
11567        }
11568    }), o()
11569}),
11570    $(document).ready(function (i) {
11571        var e = i(".form-send-mail"), n = i(".mail-button-block button[type=submit]"), s = i(".mail-rest-block button"),
11572            o = (e.attr("action"), /^([a-z0-9_\.-])+@[a-z0-9-]+\.([a-z]{2,4}\.)?[a-z]{2,4}$/i),
11573            a = /^((8|\+7)[\- ]?)?(\(?\d{3}\)?[\- ]?)?[\d\- ]{7,10}$/;
11574
11575        function r() {
11576            e.find(".empty-field").addClass("rf-error"), setTimeout(function () {
11577                e.find(".rf-error").removeClass("rf-error")
11578            }, 1e3)
11579        }
11580
11581        e.find(".req-field").addClass("empty-field"), i('.mail-checkbox-block input[type="checkbox"] + label span').addClass("empty-field"), i(".mail-checkbox-block").on("click", function () {
11582            i(".mail-checkbox-block input").is(":checked") ? i(this).addClass("checked") : i(this).removeClass("checked")
11583        }), i(".form-send-mail").submit(function (t) {
11584            t.preventDefault();
11585            var e = new FormData;
11586            e.append("user_name", i("input[name=name]").val()), e.append("hash", i("input[name=hash]").val()), e.append("tihoria", i("input[name=tihoria]").val()), e.append("user_email", i("input[name=e-mail]").val()), e.append("phone_number", i("input[name=phone]").val()), e.append("msg", i("textarea[name=message]").val()), e.append("file_attach", i("input[name=file_attach]")[0].files[0]), i.ajax({
11587                type: "POST",
11588                url: "/wp-admin/admin-ajax.php?action=send_mail",
11589                data: e,
11590                processData: !1,
11591                contentType: !1,
11592                cache: !1,
11593                beforeSend: function () {
11594                    n.text("Идет отправка")
11595                },
11596                error: function (t, e, i) {
11597                    console.log(t), console.log(e), console.log(i)
11598                },
11599                success: function (t) {
11600                    console.log(t), n.addClass("hidden").text("Отправить"), s.removeClass("hidden")
11601                }
11602            })
11603        }), i(document).on("click", '.form-send-mail button[type="submit"]', function (t) {
11604            if (i(this).hasClass("disabled")) return r(), !1;
11605            e.find(".req-field").each(function () {
11606                var t = i(this), e = i(".mail-checkbox-block");
11607                t.hasClass("rf-mail") ? o.test(t.val()) ? t.removeClass("empty-field") : t.addClass("empty-field") : t.hasClass("rf-phone") ? a.test(t.val()) ? t.removeClass("empty-field") : t.addClass("empty-field") : "" != t.val() ? t.removeClass("empty-field") : t.addClass("empty-field"), e.hasClass("checked") ? i('.mail-checkbox-block input[type="checkbox"] + label span').removeClass("empty-field") : i('.mail-checkbox-block input[type="checkbox"] + label span').addClass("empty-field")
11608            }), 0 < e.find(".empty-field").length && (r(), t.preventDefault())
11609        }), s.on("click", function () {
11610            i(this).addClass("hidden"), i(".mail-file-upload").find("mark").text(""), n.removeClass("hidden")
11611        })
11612    }), $(window).load(function () {
11613    $("object").contents().find("g").on("click", function () {
11614        var t = $(this).attr("id");
11615        $("object").contents().find("g").children().hasClass("marked") && ($("object").contents().find("g").children().removeClass("marked"), $("#region-news-list-table ul li").removeClass("checked")), $(this).children().addClass("marked"), $("ul #" + t).addClass("checked"), $("#region-news-list-table ul li").find("input").filter(function () {
11616            return this.value == t
11617        }).prop("checked", !0), $("html,body").stop().animate({scrollTop: $(".region-news-filter").offset().top}, 1e3), $("#filter").submit()
11618    }), $("#region-news-list-table ul li").on("click", function () {
11619        var t = $(this).attr("id");
11620        $("#region-news-list-table ul li").hasClass("checked") && ($("object").contents().find("g").children().removeClass("marked"), $("#region-news-list-table ul li").removeClass("checked")), $("object").contents().find("#" + t).children().addClass("marked"), $(this).addClass("checked"), $(this).find("input[type=radio]").prop("checked", !0), $("html,body").stop().animate({scrollTop: $(".region-news-filter").offset().top}, 1e3), $("#filter").submit()
11621    }), $(window).width() <= 800 && $(".administration-block-r1 .administration-preview, .reception-news-preview").height(function () {
11622        return $w = $(this).width(), $h = .7 * $w, $h
11623    }), $(".similar-preview, .search-results-preview, .redaction-preview, .main-archive-preview, .video-preview, .article-thumbnail, .edition-preview").height(function () {
11624        return $w = $(this).width(), $h = .6 * $w, $h
11625    }), $(".administration-block-r3 .administration-preview").height(function () {
11626        return $w = $(this).width(), $h = .7 * $w, $h
11627    }), $(".video-article-thumbnail").height(function () {
11628        return $w = $(this).width(), $h = .57 * $w, $h
11629    }), $(".mob-newspaper-preview").height(function () {
11630        return $w = $(this).width(), $h = 1.4142857 * $w, $h
11631    }), $(function () {
11632        var t = $(".mail-file-upload"), e = t.find("input"), i = t.find(".button"), n = t.find("mark"),
11633            s = !!(window.File && window.FileReader && window.FileList && window.Blob);
11634        e.change(function () {
11635            var t;
11636            (t = s && e[0].files[0] ? e[0].files[0].name : e.val().replace("C:\\fakepath\\", "")).length && (n.is(":visible") ? (n.text(t), i.text("Выбрать"), i.css("line-height", "2.7em")) : i.text(t))
11637        }).change()
11638    }), $(window).resize(function () {
11639        $(".mail-file-upload input").triggerHandler("change")
11640    }), $(".region-news-list-title").on("click", function () {
11641        var t = $("#region-news-list-table");
11642        t.is(":visible") ? t.css("display", "none") : t.css("display", "block")
11643    }), $("#filter").submit(function (t) {
11644        t.preventDefault();
11645        var e = $(this).serialize();
11646        console.log(e), $.ajax({
11647            url: "/wp-admin/admin-ajax.php?action=myfilter",
11648            data: e,
11649            type: "POST",
11650            beforeSend: function (t) {
11651            },
11652            success: function (t) {
11653                var e, i;
11654                $(".region-news-filter").html(t), $(".region-news-filter").html(t).find('.loop__item-preview-image').lazyLoadXT(), $(".main-archive-preview").height(function () {
11655                    return $w = $(this).width(), $h = .6 * $w, $h
11656                }), e = $(".main-archive-description"), i = 0, e.each(function () {
11657                    currentHeight = $(this).height(), currentHeight > i && (i = currentHeight)
11658                }), e.height(i)
11659            },
11660            error: function (t, e, i) {
11661                console.log(t.status), console.log(i)
11662            }
11663        })
11664    }), $(".administration-block-r1, .administration-block-r2, .administration-block-r3, .administration-block-r4").on("click", function () {
11665        $(this).find("input[type=radio]").prop("checked", !0), $("html,body").stop().animate({scrollTop: $("#news_wrapper").offset().top}, 1e3), $("#admin-filter").submit()
11666    }), $(".in-hand-btn").on("click", function () {
11667        var t = $(this).attr("id");
11668        $(".in-hand").is(":visible") ? $(".in-hand").css("display", "none") : $("." + t).css("display", "block")
11669    }), $("#admin-filter").submit(function (t) {
11670        t.preventDefault();
11671        var e = $(this).serialize();
11672        console.log(e), $.ajax({
11673            url: "/wp-admin/admin-ajax.php?action=admfilter",
11674            data: e,
11675            type: "POST",
11676            beforeSend: function (t) {
11677            },
11678            success: function (t) {
11679                var e, i;
11680                $(".administration-news-container").html(t), $(".main-archive-preview").height(function () {
11681                    return $w = $(this).width(), $h = .6 * $w, $h
11682                }), e = $(".main-archive-description"), i = 0, e.each(function () {
11683                    currentHeight = $(this).height(), currentHeight > i && (i = currentHeight)
11684                }), e.height(i), console.log(t)
11685            },
11686            error: function (t, e, i) {
11687                console.log(t.status), console.log(i)
11688            }
11689        })
11690    }), $(".photo-popup-front").magnificPopup({
11691        type: "image",
11692        closeOnContentClick: !0,
11693        mainClass: "mfp-img-mobile",
11694        image: {verticalFit: !0}
11695    }), $(".mob-photo-popup-front").magnificPopup({
11696        type: "image",
11697        closeOnContentClick: !0,
11698        mainClass: "mfp-img-mobile",
11699        image: {verticalFit: !0}
11700    }), $(".photo").magnificPopup({
11701        delegate: ".photo-archive-link",
11702        type: "image",
11703        tLoading: "Загрузка изображения #%curr%...",
11704        mainClass: "mfp-img-mobile",
11705        gallery: {enabled: !0, navigateByImgClick: !0, preload: [0, 1]},
11706        image: {tError: '<a href="%url%">Изображение #%curr%</a> не может быть загружено.'}
11707    }), $(window).scroll(function () {
11708        600 < $(window).scrollTop() ? $(".up-btn").show("fast") : $(".up-btn").hide("fast")
11709    }), $(".up-btn").on("click", function () {
11710        $("html,body").stop().animate({scrollTop: 0}, 1e3)
11711    });
11712    var t = $.ias({container: ".ias_container", item: ".ias_item", pagination: ".navigation", next: ".nav-previous a"});
11713
11714    function s(t) {
11715        t.css("display", "block")
11716    }
11717
11718    function o(t) {
11719        t.css("display", "none")
11720    }
11721
11722    t.extension(new IASTriggerExtension({offset: 1})), t.extension(new IASSpinnerExtension), t.extension(new IASNoneLeftExtension), $(function () {
11723        var e = $("#mobMenuButton"), i = $("#mobMenuWrapper"), t = $("#mobSearchButton"), n = $("#mobSearchWrapper"),
11724            rub_btn = $("#rubricMenu"), rub_wrap = $("#rubricMenuWrapper");
11725        e.on("click", function (t) {
11726            i.is(":visible") || n.is(":visible") ? !i.is(":visible") && n.is(":visible") ? (o(n), s(i), e.addClass("opened")) : (o(i), e.removeClass("opened")) : (s(i), e.addClass("opened"))
11727        }),/* t.on("click", function (t) {
11728            i.is(":visible") || n.is(":visible") ? !n.is(":visible") && i.is(":visible") ? (o(i), s(n)) : o(n) : s(n)
11729        }),*/ rub_btn.on("click", function (t) {
11730            rub_wrap.is(":visible") ? !rub_wrap.is(":visible") ? (s(rub_wrap), rub_btn.addClass("opened")) : (o(rub_wrap), rub_btn.removeClass("opened")) : (s(rub_wrap), rub_btn.addClass("opened"))
11731        })
11732    })
11733}), $(function () {
11734    var t = new Date, e = new Date(2019, 5, 2, 0, 0, 0, 0), i = new Date(e - t) / 1e3 / 60 / 60 / 24;
11735    $("#tvCounter").html(Math.ceil(i))
11736}), $(document).ready(function () {
11737    AOS.init();
11738    var h = $(".loop__body-load");/*$(document).on("click",".loop__item-load-more-button",function(t){t.preventDefault();
11738var e=$(".loop__item-load-more-button"),i=e.parent().parent(),n=new FormData,s=e.data("current-date"),o=e.data("iteration"),a=e.data("post-type"),r=e.data("offset"),l=e.data("search");o+=1,n.append("current_date",s),n.append("iteration",o),n.append("post_type",a),n.append("offset",r),n.append("search",l),$.ajax({type:"POST",url:"/wp-admin/admin-ajax.php?action=loadMore",data:n,processData:!1,contentType:!1,cache:!1,beforeSend:function(){e.html("Загружаем")},error:function(t,e,i){console.log(t),console.log(e),console.log(i)},success:function(t){i.remove(),h.append(t),h.find('.loop__item-row-thumbnail').lazyLoadXT()}})}),*/
11739    $(document).on("click", "#loopAjaxButton", function (t) {
11740        t.preventDefault();
11741        var e = $("#loopAjaxButton"), i = e.parent(), n = new FormData, s = e.data("iteration"),
11742            o = e.data("term"), a = e.data("offset"), r = e.data("limit");
11743        s += 1, n.append("iteration", s), n.append("term", o), n.append("offset", a), n.append("limit", r), $.ajax({
11744            type: "POST",
11745            url: "/wp-admin/admin-ajax.php?action=ajaxLoadMore",
11746            data: n,
11747            processData: !1,
11748            contentType: !1,
11749            cache: !1,
11750            beforeSend: function () {
11751                e.html("Загружаем")
11752            },
11753            error: function (t, e, i) {
11754                console.log(t), console.log(e), console.log(i)
11755            },
11756            success: function (t) {
11757                i.remove(), h.append(t)
11758            }
11759        })
11760    }), $("nav.navigation a").attr("rel", "nofollow noindex")
11761}), jQuery(document).ready(function (o) {
11762    function t(t) {
11763        var e = o(t), i = o("#priceResultValueEditions"), n = e.find(".form-group-columns"), s = 0;
11764        o.each(n, function (t, e) {
11765            var i = o(e).find("input[name=edition-price]").val(), n = o(e).find("input[name=edition-count]").val();
11766            s += parseInt(i, 10) * parseInt(n, 10)
11767        }), i.html(s)
11768    }
11769
11770    var n, a, r, l;
11771    0 < o("#adCalcEditions").length && t("#adCalcEditions"), o("input[name=edition-count]").change(function () {
11772        t("#adCalcEditions")
11773    }), n = o("#adCalcEditions"), a = o("#submitAdTextEditions  "), r = o("#successPlaceholderEditions"), l = o("#priceResultValueEditions"), n.find(".req-field").addClass("empty-field"), n.submit(function (t) {
11774        t.preventDefault();
11775        var s = "", e = n.find(".form-group-columns");
11776        o.each(e, function (t, e) {
11777            var i = o(e).find("input[name=edition-count]").val(),
11778                n = o(e).find("input[name=edition-count]").data("name");
11779            0 < i && (s += "Издание " + n + " в количестве " + i + " штук\n")
11780        });
11781        var i = new FormData;
11782        i.append("user_name", o("input[name=edition_name]").val()), i.append("user_phone", o("input[name=edition_phone]").val()), i.append("user_email", o("input[name=edition_email]").val()), i.append("editions", s), i.append("total_price", l.html()), o.cookie("paid_name", o("input[name=edition_name]").val(), {expires: 1}), o.cookie("paid_email", o("input[name=edition_email]").val(), {expires: 1}), o.ajax({
11783            type: "POST",
11784            url: "/wp-admin/admin-ajax.php?action=calculateEditionAd",
11785            data: i,
11786            processData: !1,
11787            contentType: !1,
11788            cache: !1,
11789            beforeSend: function () {
11790                a.text("Идет отправка")
11791            },
11792            error: function (t, e, i) {
11793                console.log(t), console.log(e), console.log(i)
11794            },
11795            success: function (t) {
11796                r.html("Ваша заявка принята. Ждите сообщения от менеджера"), o.cookie("last_payment", t.id, {expires: 1}), a.text("Заказать"), n.find("input").val(""), l.html("0")
11797            }
11798        })
11799    }), a.on("click", function (t) {
11800        t.stopPropagation();
11801        var e = o("#textAdOrderFormEditions");
11802        e.is(":visible") ? (function (t) {
11803            var e = /^((8|\+7)[\- ]?)?(\(?\d{3}\)?[\- ]?)?[\d\- ]{7,10}$/,
11804                i = /^([a-z0-9_\.-])+@[a-z0-9-]+\.([a-z]{2,4}\.)?[a-z]{2,4}$/i;
11805            t.find(".req-field").each(function () {
11806                var t = o(this);
11807                t.hasClass("rf-phone") ? e.test(t.val()) ? t.removeClass("empty-field") : t.addClass("empty-field") : t.hasClass("rf-mail") ? i.test(t.val()) ? t.removeClass("empty-field") : t.addClass("empty-field") : t.hasClass("rf-ad") ? t.val().length < 9e3 ? t.removeClass("empty-field") : t.addClass("empty-field") : t.hasClass("rf-edition") ? "null" != o.cookie("editionType") ? t.removeClass("empty-field") : t.addClass("empty-field") : "" != t.val() ? t.removeClass("empty-field") : t.addClass("empty-field")
11808            })
11809        }(n), 0 < n.find(".empty-field").length && (function (t) {
11810            t.find(".empty-field").addClass("rf-error"), setTimeout(function () {
11811                t.find(".rf-error").removeClass("rf-error")
11812            }, 1e3)
11813        }(n), t.preventDefault()), "0" == l.html() && (r.html("Выберите хотя бы одно издание"), t.preventDefault())) : (e.collapse("show"), t.preventDefault())
11814    })
11815}), $("#officialSearchForm").on("submit", function (t) {
11816    t.preventDefault();
11817    var e = $(this), i = new FormData, n = $(e).find("input[name=s_value]").val(), s = $(".official-search-container");
11818    i.append("s_value", n), $.ajax({
11819        type: "POST",
11820        url: "/wp-admin/admin-ajax.php?action=officialSearch",
11821        data: i,
11822        processData: !1,
11823        contentType: !1,
11824        cache: !1,
11825        beforeSend: function (t) {
11826        },
11827        success: function (t) {
11828            s.html(t), $(".ias-trigger-next").remove()
11829        },
11830        error: function (t, e, i) {
11831            console.log(t.status), console.log(i)
11832        }
11833    })
11834});
11835$("#officialSearchDocOtherForm").on("submit", function (t) {
11836    t.preventDefault();
11837    var e = $(this), i = new FormData(), n = $(e).find("input[name=s_value]").val(),
11838        s = $(".official-search-container");
11839    i.append("s_value", n), $.ajax({
11840        type: "POST",
11841        url: "/wp-admin/admin-ajax.php?action=officialSearchDocOther",
11842        data: i,
11843        processData: !1,
11844        contentType: !1,
11845        cache: !1,
11846        beforeSend: function (t) {
11847        },
11848        success: function (t) {
11849            s.html(t), $(".ias-trigger-next").remove()
11850        },
11851        error: function (t, e, i) {
11852            console.log(t.status), console.log(i)
11853        },
11854    })
11855});
11856
11857/* New archive ajax */
11858
11859$(document).ready(function () {
11860    var load_body = $(".loop__body-load");
11861    $(document).on("click", ".loop__item-load-more-button", function (event) {
11862        event.preventDefault();
11863        var elemBtn = $(".loop__item-load-more-button"),
11864            formData = new FormData,
11865            date = elemBtn.data("current-date"),
11866            iteration = elemBtn.data("iteration"),
11867            postType = elemBtn.data("post-type"),
11868            offset = elemBtn.data("offset"),
11869            serachData = elemBtn.data("search"),
11870            author = elemBtn.data("author"),
11871            meta = elemBtn.data("meta-section");
11872        iteration += 1,
11873            formData.append("author", author),
11874            formData.append("current_date", date),
11875            formData.append("iteration", iteration),
11876            formData.append("post_type", postType),
11877            formData.append("offset", offset),
11878            formData.append("search", serachData),
11879            formData.append("meta-section", meta),
11880
11881            $.ajax({
11882                type: "POST",
11883                url: "/wp-admin/admin-ajax.php?action=loadMoreArchiveItems",
11884                data: formData,
11885                processData: !1,
11886                contentType: !1,
11887                cache: !1,
11888                beforeSend: function() {
11889                    elemBtn.html("Загружаем");
11890                },
11891                error: function(res, elemBtn, i) {
11892                    console.log(res),
11893                        console.log(elemBtn),
11894                        console.log(i);
11895                },
11896                success: function(data) {
11897                    elemBtn.parent().remove(),
11898                        load_body.append(data);
11899                    if (meta == 'podcast') {
11900                        GreenAudioPlayer.init({
11901                            selector: '.audio-player',
11902                            stopOthersOnPlay: true,
11903                            showDownloadButton: true,
11904                            enableKeystrokes: true
11905                        });
11906                    }
11907                },
11908            });
11909    });
11910});
11911
11912/* End new archive ajax */
11913
11914/* Taxonomy ajax load */
11915
11916$(document).ready(function() {
11917    var load_body = $(".loop__body-load");
11918    $(document).on("click", ".loop__item-load-more-button-taxonomy", function(event) {
11919        event.preventDefault();
11920        var elemBtn = $(".loop__item-load-more-button-taxonomy"),
11921            section = elemBtn.parent(),
11922            formData = new FormData,
11923            iteration = elemBtn.data("iteration"),
11924            postsType = elemBtn.data("post-type"),
11925            offset = elemBtn.data("offset"),
11926            postsCat = elemBtn.data("category"),
11927            taxonomy = elemBtn.data("taxonomy");
11928        iteration += 1,
11929            formData.append("iteration", iteration),
11930            formData.append("post_type", postsType),
11931            formData.append("offset", offset),
11932            formData.append("category", postsCat),
11933            formData.append("taxonomy", taxonomy),
11934
11935            $.ajax({
11936                type: "POST",
11937                url: "/wp-admin/admin-ajax.php?action=loadMoreTaxonomyItems",
11938                data: formData,
11939                processData: !1,
11940                contentType: !1,
11941                cache: !1,
11942                beforeSend: function() {
11943                    elemBtn.html("Загружаем")
11944                },
11945                error: function(t, elemBtn, section) {
11946                    console.log(t), console.log(btnLoad), console.log(section)
11947                },
11948                success: function(data) {
11949                    section.remove(),
11950                        load_body.append(data);
11951                }
11952            })
11953    })
11954
11955});
11956
11957/* End taxonomy ajax load */
11958
11959/* Long ajax load */
11960
11961$(document).ready(function () {
11962    var load_body = $(".loop__body-load");
11963    $(document).on("click", ".loop__item-load-more-button-long", function (event) {
11964        event.preventDefault();
11965        var elemBtn = $(".loop__item-load-more-button-long"),
11966            formData = new FormData,
11967            date = elemBtn.data("current-date"),
11968            iteration = elemBtn.data("iteration"),
11969            postType = elemBtn.data("post-type"),
11970            offset = elemBtn.data("offset"),
11971            serachData = elemBtn.data("search"),
11972            author = elemBtn.data("author"),
11973            meta = elemBtn.data("meta-section");
11974        iteration += 1,
11975            formData.append("author", author),
11976            formData.append("current_date", date),
11977            formData.append("iteration", iteration),
11978            formData.append("post_type", postType),
11979            formData.append("offset", offset),
11980            formData.append("search", serachData),
11981            formData.append("meta-section", meta),
11982
11983            $.ajax({
11984                type: "POST",
11985                url: "/wp-admin/admin-ajax.php?action=loadMoreLongSection",
11986                data: formData,
11987                processData: !1,
11988                contentType: !1,
11989                cache: !1,
11990                beforeSend: function() {
11991                    elemBtn.html("Загружаем");
11992                },
11993                error: function(res, elemBtn, i) {
11994                    console.log(res),
11995                        console.log(elemBtn),
11996                        console.log(i);
11997                },
11998                success: function(data) {
11999                    elemBtn.parent().remove(),
12000                        load_body.append(data);
12001                },
12002            });
12003    });
12004});
12005
12006/* End long archive ajax */
12007
12008/* News paper load ajax */
12009
12010$(document).ready(function () {
12011    var load_body = $(".loop__body-load");
12012    $(document).on("click", ".loop__item-load-more-items-button", function (event) {
12013        event.preventDefault();
12014        var elemBtn = $(".loop__item-load-more-items-button"),
12015            formData = new FormData,
12016            iteration = elemBtn.data("iteration"),
12017            type = elemBtn.data("type"),
12018            offset = elemBtn.data("offset");
12019
12020        iteration += 1,
12021            formData.append("type", type),
12022            formData.append("offset", offset),
12023            formData.append("iteration", iteration);
12024
12025        $.ajax({
12026            type: "POST",
12027            url: "/wp-admin/admin-ajax.php?action=newsPaperLoadMore",
12028            data: formData,
12029            processData: !1,
12030            contentType: !1,
12031            cache: !1,
12032            beforeSend: function() {
12033                elemBtn.html("Загружаем");
12034            },
12035            error: function(res, elemBtn, i) {
12036                console.log(res),
12037                    console.log(elemBtn),
12038                    console.log(i);
12039            },
12040            success: function(data) {
12041                elemBtn.parent().remove(),
12042                    load_body.append(data);
12043            },
12044        });
12045    });
12046});
12047
12048
12049/* End news paper load ajax */
12050
12051$(document).ready(function() {
12052    $('.block-filter .select').on('change', function(event) {
12053        event.preventDefault();
12054        var selectFilter = $('.select'),
12055            postsCat = selectFilter.val(),
12056            rubricType = 'cat_delonn',
12057            url = '/' + rubricType + '/' + postsCat + '/';
12058
12059        $(location).attr('href', url);
12060
12061    })
12062
12063    $('.ticker_text').liMarquee();
12064
12065});
12066
12067$(document).ready(function() {
12068    var load_body = $(".loop__body-load");
12069    $(document).on("click", ".loop__item-load-more-button-delonn", function(event) {
12070        event.preventDefault();
12071        var btnLoad = $(".loop__item-load-more-button-delonn"),
12072            section = btnLoad.parent().parent(),
12073            formData = new FormData,
12074            count = btnLoad.data("iteration"),
12075            postsType = btnLoad.data("post-type"),
12076            offset = btnLoad.data("offset"),
12077            postsCat = btnLoad.data("category");
12078        count += 1,
12079            formData.append("iteration", count),
12080            formData.append("post_type", postsType),
12081            formData.append("offset", offset),
12082            formData.append("category", postsCat),
12083
12084            $.ajax({
12085                type: "POST",
12086                url: "/wp-admin/admin-ajax.php?action=loadMoreDelonnSection",
12087                data: formData,
12088                processData: !1,
12089                contentType: !1,
12090                cache: !1,
12091                beforeSend: function() {
12092                    btnLoad.html("Загружаем")
12093                },
12094                error: function(t, btnLoad, section) {
12095                    console.log(t), console.log(btnLoad), console.log(section)
12096                },
12097                success: function(data) {
12098                    section.remove(),
12099                        load_body.append(data);
12100                }
12101            })
12102    })
12103
12104});
12105
12106$(document).ready(function() {
12107    var load_body = $(".loop__body-load");
12108    $(document).on("click", ".loop__item-load-more-button-cat_project-item", function(event) {
12109        event.preventDefault();
12110        var btnLoad = $(".loop__item-load-more-button-cat_project-item"),
12111            section = btnLoad.parent().parent(),
12112            formData = new FormData,
12113            count = btnLoad.data("iteration"),
12114            postsType = btnLoad.data("post-type"),
12115            offset = btnLoad.data("offset"),
12116            postsCat = btnLoad.data("category");
12117        count += 1,
12118            formData.append("iteration", count),
12119            formData.append("post_type", postsType),
12120            formData.append("offset", offset),
12121            formData.append("category", postsCat),
12122
12123            $.ajax({
12124                type: "POST",
12125                url: "/wp-admin/admin-ajax.php?action=loadMoreCatProjectSection",
12126                data: formData,
12127                processData: !1,
12128                contentType: !1,
12129                cache: !1,
12130                beforeSend: function() {
12131                    btnLoad.html("Загружаем")
12132                },
12133                error: function(t, btnLoad, section) {
12134                    console.log(t), console.log(btnLoad), console.log(section)
12135                },
12136                success: function(data) {
12137                    section.remove(),
12138                        load_body.append(data);
12139                }
12140            })
12141    })
12142
12143});
12144
12145$(document).ready(function() {
12146    var load_body = $(".loop__body.conferenceItems");
12147    $(document).on("click", ".loop__item-load-more-button-events", function(event) {
12148        event.preventDefault();
12149        var btnLoad = $(".loop__item-load-more-button-events"),
12150            section = btnLoad.parent(),
12151            formData = new FormData,
12152            count = btnLoad.data("iteration"),
12153            postsType = btnLoad.data("post-type"),
12154            offset = btnLoad.data("offset"),
12155            posts = btnLoad.data("posts");
12156        count += 1,
12157            formData.append("iteration", count),
12158            formData.append("post_type", postsType),
12159            formData.append("offset", offset),
12160            formData.append("posts", posts),
12161
12162            $.ajax({
12163                type: "POST",
12164                url: "/wp-admin/admin-ajax.php?action=loadMoreConferenceHallItems",
12165                data: formData,
12166                processData: !1,
12167                contentType: !1,
12168                cache: !1,
12169                beforeSend: function() {
12170                    btnLoad.html("Загружаем")
12171                },
12172                error: function(t, btnLoad, section) {
12173                    console.log(t), console.log(btnLoad), console.log(section)
12174                },
12175                success: function(data) {
12176                    section.remove(),
12177                        load_body.append(data);
12178                    load_body.find('.btn-load__wrapper').insertAfter(load_body);
12179                    load_body.find('.nothing-found-block').insertAfter(load_body);
12180                }
12181            })
12182    })
12183
12184});
12185
12186$(document).ready(function() {
12187    var load_body = $(".loop__body-load");
12188    $(document).on("click", ".loop__item-load-more-button-kursn", function(event) {
12189        event.preventDefault();
12190        var btnLoad = $(".loop__item-load-more-button-kursn"),
12191            section = btnLoad.parent().parent(),
12192            formData = new FormData,
12193            count = btnLoad.data("iteration"),
12194            postsType = btnLoad.data("post-type"),
12195            offset = btnLoad.data("offset"),
12196            postsCat = btnLoad.data("category");
12197        count += 1,
12198            formData.append("iteration", count),
12199            formData.append("post_type", postsType),
12200            formData.append("offset", offset),
12201            formData.append("category", postsCat),
12202
12203            $.ajax({
12204                type: "POST",
12205                url: "/wp-admin/admin-ajax.php?action=loadMoreKursN",
12206                data: formData,
12207                processData: !1,
12208                contentType: !1,
12209                cache: !1,
12210                beforeSend: function() {
12211                    btnLoad.html("Загружаем")
12212                },
12213                error: function(t, btnLoad, section) {
12214                    console.log(t), console.log(btnLoad), console.log(section)
12215                },
12216                success: function(data) {
12217                    section.remove(),
12218                        load_body.append(data),
12219                        load_body.find('.loop__item-preview-image').lazyLoadXT();
12220                }
12221            })
12222    })
12223
12224});
12225
12226//Перенос блоков на главной для мобильной версии чтобы не дублировать запросы
12227var mobileWidth = 1024;
12228function mainPageMobile() {
12229
12230    var screenWidth = $(window).innerWidth();
12231
12232    if (screenWidth <= mobileWidth) {
12233
12234
12235
12236        $('.mobileLastNews').appendTo('.mob__news-wrapper');
12237
12238        $('.sidebar__wrapper .video-block').appendTo('.mobileVideo');
12239
12240        /*$('.widget_area_1_l').each(function() {
12241            $(this).clone().appendTo('.mobileWigdetArea_1').end();
12242            $(this).hide();
12243        });
12244
12245        $('.widget_area_1_r').each(function() {
12246            $(this).clone().appendTo('.mobileWigdetArea_2').end();
12247            $(this).hide();
12248        });*/
12249
12250        if ($('.prnn__calendar-container.mobile').length == 0) {
12251            $('.prnn__calendar-container').each(function () {
12252                $(this).clone().insertAfter('#special-projects').addClass('mobile');
12253                $(this).hide();
12254            });
12255        }
12256
12257        if ($('.block_partner.partner_smi2.mobile').length == 0) {
12258            $('.block_partner.partner_smi2').each(function () {
12259                $(this).clone().insertBefore('#our-paper').addClass('mobile');
12260                $(this).remove();
12261            });
12262        }
12263
12264    } else if (screenWidth >= mobileWidth) {
12265
12266        $('.video-block').insertBefore('.sidebar__wrapper .buttonsBlock');
12267        //$('.mobileLastNews').remove();
12268        $('.newsFeed').show();
12269        $('body').find('.mobileButtons').empty();
12270        /*$('.widget_area_1_l').show();
12271        $('.mobileWigdetArea_1').empty();
12272        $('.widget_area_1_r').show();
12273        $('.mobileWigdetArea_2').empty();*/
12274        $('sidebar_wrapper').find('.prnn__calendar-container').show();
12275        $('body').find('.prnn__calendar-container.mobile').remove();
12276    }
12277}
12278
12279/*** CALCULATOR ***/
12280$(document).ready(function () {
12281
12282    var adTextarea = $('#adText'),
12283        adScoreValue = $('#adScoreValue'),
12284        selectEdition = $('#ad_newspaper'),
12285        adScoreBlock = $('#adScoreBlock'),
12286        priceWrapper = $('#priceResultValue'),
12287        filterBtn = $('#adCalc input[type=radio]');
12288
12289    // Получение данных из JSON
12290    /*function getArray() {
12291        return $.getJSON('/wp-content/themes/pravda_nn/data/calc_data.json');
12292    }*/
12293
12294    const calculatorDataPath = '/wp-content/themes/pravda_nn/data/calc_data.json';
12295
12296    window.dataCalculator = {};
12297
12298    $.ajax({
12299        type: 'GET',
12300        url: calculatorDataPath,
12301        cache: false,
12302        async: false,
12303        error: function (request, txtstatus, errorThrown) {
12304            console.log(request);
12305            console.log(txtstatus);
12306            console.log(errorThrown);
12307        },
12308        success: function (data) {
12309            window.dataCalculator = data;
12310        }
12311    });
12312
12313    // Функция подсчета длины значения строки
12314
12315    function textLenth(input) {
12316        var inputValue = $(input).val();
12317        if (inputValue) {
12318            return inputValue.length;
12319        }
12320        return 0;
12321    }
12322
12323    // Функция расчета размера блока на полосе
12324
12325    function adBlockSize() {
12326
12327        var blockSizes = [240, 480, 990, 2040, 2700, 4170],
12328
12329            blockSizesLabels = {
12330                '240': 32,
12331                '480': 16,
12332                '990': 8,
12333                '2040': 4,
12334                '2700': 3,
12335                '4170': 2,
12336            },
12337
12338            adLen = textLenth(adTextarea),
12339
12340            blockSize;
12341
12342        if (adLen < 1) {
12343            blockSize = 0;
12344            $.cookie('adBlockSize', blockSize, {expires: 7});
12345        } else if (adLen < 120) {
12346            blockSize = 64;
12347            $.cookie('adBlockSize', blockSize, {expires: 7});
12348        } else if (adLen > 9000) {
12349            blockSize = -1;
12350            $.cookie('adBlockSize', blockSize, {expires: 7});
12351        } else if (adLen > 4170) {
12352            blockSize = 1;
12353            $.cookie('adBlockSize', blockSize, {expires: 7});
12354        } else {
12355            for (var size in blockSizes) {
12356                if (adLen < blockSizes[size]) {
12357                    blockSize = blockSizesLabels[blockSizes[size]];
12358                    $.cookie('adBlockSize', blockSize, {expires: 7});
12359                    break;
12360                }
12361            }
12362        }
12363
12364        return blockSize
12365
12366    }
12367
12368    // Функция перевода размерности блока в человекочитаемый вид
12369
12370    function adBlockSizeName() {
12371
12372        var blockSizeName;
12373
12374        if ($.cookie('adBlockSize') == 64) {
12375            blockSizeName = '1/64 полосы';
12376            $.cookie('adBlockSizeName', blockSizeName, {expires: 7})
12377        } else if ($.cookie('adBlockSize') < 0) {
12378            blockSizeName = 'больше одной полосы, стоимость оговаривается в индивидуальном порядке. Напишите нам на почту <a href="mailto:[email protected]">[email protected]!</a>';
12379            $.cookie('adBlockSizeName', blockSizeName, {expires: 7})
12380        } else if ($.cookie('adBlockSize') == 1) {
12381            blockSizeName = '1 полосу';
12382            $.cookie('adBlockSizeName', blockSizeName, {expires: 7})
12383        } else if ($.cookie('adBlockSize') == 0) {
12384            blockSizeName = '0 полосы';
12385            $.cookie('adBlockSizeName', blockSizeName, {expires: 7})
12386        } else {
12387            blockSizeName = '1/' + $.cookie('adBlockSize') + ' полосы';
12388            $.cookie('adBlockSizeName', blockSizeName, {expires: 7})
12389        }
12390
12391        return blockSizeName
12392
12393    }
12394
12395    // Функция подсчета текущей цены ТЕКСТОВОГО ОБЪЯВЛЕНИЯ
12396
12397    function adPrice() {
12398
12399        var selectedEdition = $.cookie('editionType'), // Выбранная газета
12400            selectedColor = $.cookie('editionColor'), // Выбранный цвет
12401            charsCounts = {
12402                '1': 9000,
12403                '2': 4170,
12404                '3': 2700,
12405                '4': 2040,
12406                '8': 990,
12407                '16': 480,
12408                '32': 240,
12409                '64': 120,
12410            };
12411
12412
12413        // Делим полученное значение по прайсу на 1,7
12414        //var price = Math.round( data['editions'][selectedEdition][selectedColor + 'Price'][charsCounts[$.cookie('adBlockSize')]] / 1.7 );
12415        var price = typeof window.dataCalculator['editions'] !== 'undefined' ? Math.round(window.dataCalculator['editions'][selectedEdition][selectedColor + 'Price'][charsCounts[$.cookie('adBlockSize')]]) : '';
12416
12417        priceWrapper.html(price);
12418
12419    }
12420
12421
12422    // Функция фильтрации газет по цвету ТЕКСТОВОЕ ОБЪЯВЛЕНИЕ
12423
12424    function editionFilter($color) {
12425
12426        var editionNames = {
12427            "pravdaNN": "Нижегородская правда",
12428            "pravdaNNBusiness": "Нижегородская правда — Деловая гаÐ
12428·ÐµÑ‚а",
12429            "nnSport": "Нижегородский спорт",
12430            "nnLand": "Земля нижегородская",
12431            "nnNews": "Нижегородские новости",
12432            "nnNewsBusiness": "Нижегородские новости — Деловая газета",
12433            "newDeal": "Новое дело — Областной выпуск",
12434            "kursN": "Курс-Н",
12435        };
12436
12437        //getArray().done(function (data) {
12438
12439            var filteredEditions = [];
12440
12441            if ($color) {
12442
12443                for (var edition in window.dataCalculator['editions']) {
12444
12445
12446                    if (window.dataCalculator['editions'][edition].color.includes($color)) {
12447
12448
12449                        filteredEditions.push(edition);
12450                    }
12451                }
12452
12453
12454                selectEdition.empty();
12455
12456                $.each(filteredEditions, function (i, ed) {
12457
12458                    if (i == 0) {
12459                        var sel = 'selected="selected"';
12460                        $.cookie('editionType', ed, {expires: 7});
12461                    }
12462
12463                    selectEdition.append('<option value="' + ed + '" ' + sel + '>' + editionNames[ed] + '</option>')
12464                });
12465
12466                if (filteredEditions.length == 0) {
12467                    selectEdition.html('<option value="null" disabled="disabled" selected="selected">Таких изданий нет</option>');
12468                    $.cookie('editionType', null);
12469                }
12470
12471            }
12472
12473        //})
12474
12475    }
12476
12477    // УСТАНОВКА ИЗ КУКИ ДЛЯ ТЕКСТОВОГО ОБЪЯВЛЕНИЯ
12478
12479    //цена
12480    if ($.cookie('adLenth') > 0) {
12481        adPrice();
12482    } else {
12483        priceWrapper.html(0)
12484    }
12485
12486    //введеный текст
12487    if ($.cookie('adText') && $.cookie('adLenth') && $.cookie('adBlockSizeName')) {
12488        adTextarea.val($.cookie('adText'));
12489        adScoreValue.html($.cookie('adLenth'));
12490        adScoreBlock.html($.cookie('adBlockSizeName'))
12491    } else {
12492        $.cookie('adText', $(adTextarea).val(), {expires: 7});
12493        $.cookie('adLenth', textLenth(adTextarea), {expires: 7});
12494        $.cookie('adBlockSizeName', adBlockSizeName(adBlockSize()), {expires: 7});
12495    }
12496
12497    //введеный цвет для ТЕКСТА / МОДУЛЯ / СТАТЬИ
12498    if (!$.cookie('editionColor')) {
12499        $.cookie('editionColor', 'bw', {expires: 7});
12500        $('#' + $.cookie('editionColor')).attr('checked', true);
12501        $('#' + $.cookie('editionColor') + 'Module').attr('checked', true);
12502        $('#' + $.cookie('editionColor') + 'Article').attr('checked', true);
12503    } else {
12504        $('#' + $.cookie('editionColor')).attr('checked', true);
12505        $('#' + $.cookie('editionColor') + 'Module').attr('checked', true);
12506        $('#' + $.cookie('editionColor') + 'Article').attr('checked', true);
12507    }
12508
12509    //введеный тип
12510    if (!$.cookie('adType')) {
12511        $.cookie('adType', 'personal', {expires: 7});
12512        $('#' + $.cookie('adType')).attr('checked', true);
12513        $('#' + $.cookie('adType') + 'Module').attr('checked', true);
12514    } else {
12515        $('#' + $.cookie('adType')).attr('checked', true);
12516        $('#' + $.cookie('adType') + 'Module').attr('checked', true);
12517    }
12518
12519    //выбранное издание(газета)
12520    if (!$.cookie('editionType')) {
12521        $.cookie('editionType', 'pravdaNN', {expires: 7});
12522    } else {
12523        selectEdition.find("option:selected").removeAttr('selected');
12524        selectEdition.find("option[value='" + $.cookie('editionType') + "']").attr('selected', 'selected');
12525    }
12526
12527    //editionFilter($.cookie('editionColor'), $.cookie('adType'));
12528
12529    // Событие при вводе текста объявления
12530
12531    adTextarea.keyup(function (e) {
12532        e.stopPropagation();
12533
12534        $.cookie('adText', $(adTextarea).val(), {expires: 7});
12535        $.cookie('adLenth', textLenth(adTextarea), {expires: 7});
12536        $.cookie('adBlockSizeName', adBlockSizeName(adBlockSize()), {expires: 7});
12537
12538        adScoreValue.html($.cookie('adLenth'));
12539        adScoreBlock.html($.cookie('adBlockSizeName'));
12540
12541        if ($.cookie('adLenth') > 0) {
12542            adPrice();
12543        } else {
12544            priceWrapper.html(0)
12545        }
12546
12547    });
12548
12549    // Событие при изменения значения цветности или типа издания
12550
12551    filterBtn.on('click', function (e) {
12552        e.stopPropagation();
12553
12554        $(this).parent().find('input[checked]').removeAttr('checked');
12555
12556        if ($(this).attr('name') == 'ad_type') {
12557            $.cookie('adType', $(this).val(), {expires: 7});
12558        } else {
12559            $.cookie('editionColor', $(this).val(), {expires: 7});
12560        }
12561
12562        editionFilter($.cookie('editionColor'));
12563
12564        $(this).attr('checked', true);
12565
12566        var selectedEdition = selectEdition.find(":selected").val();
12567
12568        $.cookie('editionType', selectedEdition, {expires: 7});
12569
12570        if ($.cookie('adLenth') > 0) {
12571            adPrice();
12572        } else {
12573            priceWrapper.html(0)
12574        }
12575
12576    });
12577
12578    // Событие при изменения выбора Издания(газеты)
12579
12580    selectEdition.change(function (e) {
12581        e.stopPropagation();
12582
12583        var selectedEdition = selectEdition.find(":selected").val();
12584
12585        $.cookie('editionType', selectedEdition, {expires: 7});
12586
12587        if ($.cookie('adLenth') > 0) {
12588            adPrice();
12589        } else {
12590            priceWrapper.html(0)
12591        }
12592
12593    });
12594
12595    // Валидация полей формы заказа
12596
12597    function checkInput(form) {
12598        var pattern_phone = /^((8|\+7)[\- ]?)?(\(?\d{3}\)?[\- ]?)?[\d\- ]{7,10}$/,
12599            pattern_mail = /^([a-z0-9_\.-])+@[a-z0-9-]+\.([a-z]{2,4}\.)?[a-z]{2,4}$/i;
12600
12601        form.find('.req-field').each(function () {
12602            var el = $(this);
12603            if (el.hasClass('rf-phone')) {
12604                if (pattern_phone.test(el.val())) {
12605                    el.removeClass('empty-field');
12606                } else {
12607                    el.addClass('empty-field');
12608                }
12609            } else if (el.hasClass('rf-mail')) {
12610                if (pattern_mail.test(el.val())) {
12611                    el.removeClass('empty-field');
12612                } else {
12613                    el.addClass('empty-field');
12614                }
12615            } else if (el.hasClass('rf-ad')) {
12616                if (el.val().length < 9000) {
12617                    el.removeClass('empty-field');
12618                } else {
12619                    el.addClass('empty-field');
12620                }
12621            } else if (el.hasClass('rf-edition')) {
12622                var se = $.cookie('editionType');
12623                if (se != "null") {
12624                    el.removeClass('empty-field');
12625                } else {
12626                    el.addClass('empty-field');
12627                }
12628            } else if (el.val() != '') {
12629                el.removeClass('empty-field');
12630            } else {
12631                el.addClass('empty-field');
12632            }
12633        });
12634    }
12635
12636    // функция добавления error класса при валидации
12637
12638    function lightEmpty(form) {
12639        form.find('.empty-field').addClass('rf-error');
12640        setTimeout(function () {
12641            form.find('.rf-error').removeClass('rf-error');
12642        }, 1000);
12643    }
12644
12645
12646    // ЗАКАЗ ТЕКСТОВОГО ОБЪЯВЛЕНИЯ
12647
12648    function sendForm(formTag) {
12649
12650        var form = $(formTag),
12651            btn = $('#submitAdText'),
12652            success = $('#successPlaceholder'),
12653            action = '/wp-admin/admin-ajax.php?action=calculateTextAd';
12654
12655        form.find('.req-field').addClass('empty-field');
12656
12657        form.submit(function (e) {
12658            e.preventDefault();
12659            var formData = new FormData();
12660            formData.append('user_name', $('input[name=name]').val());
12661            formData.append('user_phone', $('input[name=phone]').val());
12662            formData.append('user_email', $('input[name=email]').val());
12663            formData.append('ad_text', $('textarea[name=ad]').val());
12664            formData.append('ad_text_len', $.cookie('adLenth'));
12665            //formData.append( 'ad_type', $.cookie('adType'));
12666            formData.append('ad_color', $.cookie('editionColor'));
12667            formData.append('ed_type', $.cookie('editionType'));
12668            formData.append('total_price', priceWrapper.html());
12669
12670            $.ajax({
12671                type: 'POST',
12672                url: action,
12673                data: formData,
12674                processData: false, // required
12675                contentType: false, // required
12676                cache: false,
12677                beforeSend: function () {
12678                    btn.text("Идет отправка");
12679                },
12680                error: function (request, txtstatus, errorThrown) {
12681                    console.log(request);
12682                    console.log(txtstatus);
12683                    console.log(errorThrown);
12684                },
12685                success: function (data) {
12686                    success.html('Заявка успешно отправлена');
12687                    $('#textAdOrderForm').collapse('hide'); //fix 13802
12688                    btn.text("Заказать");
12689                    form.find('input').val('');
12690                    form.find('textarea').val('');
12691                    priceWrapper.html('0');
12692                    adScoreValue.html('0');
12693                    adScoreBlock.html('0 полосы');
12694                    $.cookie("editionType", 'pravdaNN', {expires: 7});
12695                    $.cookie('editionColor', 'bw', {expires: 7});
12696                    $.cookie('adType', 'personal', {expires: 7});
12697                    $.cookie("adText", '');
12698                    $.cookie("adLenth", null);
12699                    $.cookie("adBlockSizeName", null);
12700                    $.cookie("adBlockSize", null);
12701                }
12702            });
12703
12704        });
12705
12706        btn.on('click', function (e) {
12707
12708            e.stopPropagation();
12709
12710            var orderForm = $('#textAdOrderForm');
12711
12712            if (!orderForm.is(':visible')) {
12713                orderForm.collapse('show');
12714                e.preventDefault();
12715            } else {
12716                checkInput(form);
12717                var errorNum = form.find('.empty-field').length;
12718                if (errorNum > 0) {
12719                    lightEmpty(form);
12720                    e.preventDefault();
12721                }
12722            }
12723        });
12724    }
12725
12726    sendForm('#adCalc');
12727
12728
12729    // ЗАКАЗ ГАЗЕТ (для старого или другого калькулятора)
12730
12731    /*function editionCalculator(form) {
12732        var calcForm = $(form),
12733            editionSelect = calcForm.find('#ad_newspaperEditions'),
12734            editionSelected = editionSelect.find(":selected").val(),
12735            countEditions = calcForm.find('input[name=newspaperCount]').val(),
12736            resultWrapper = $('#priceResultValueEditions'),
12737            result = editionSelected * countEditions;
12738
12739        resultWrapper.html(result);
12740
12741    }
12742
12743    editionCalculator("#adCalcEditions");
12744
12745    $('#ad_newspaperEditions').change(function () {
12746        editionCalculator("#adCalcEditions");
12747    });
12748
12749    $('#ad_countEditions').change(function () {
12750        editionCalculator("#adCalcEditions");
12751    });
12752
12753
12754    //
12755
12756    function sendEditionForm(formTag) {
12757
12758        var form = $(formTag),
12759            btn = $('#submitAdTextEditions  '),
12760            editionSelect = form.find('#ad_newspaperEditions'),
12761            success = $('#successPlaceholderEditions'),
12762            resultWrapper = $('#priceResultValueEditions'),
12763            action = '/wp-admin/admin-ajax.php?action=calculateEditionAd';
12764
12765        form.find('.req-field').addClass('empty-field');
12766
12767        form.submit(function (e) {
12768            e.preventDefault();
12769            var formData = new FormData();
12770            formData.append( 'user_name', $('input[name=edition_name]').val());
12771            formData.append( 'user_phone', $('input[name=edition_phone]').val());
12772            formData.append( 'user_email', $('input[name=edition_email]').val());
12773            formData.append( 'ed_type', editionSelect.find(":selected").attr('data-name'));
12774            formData.append( 'ed_count', $('input[name=newspaperCount]').val());
12775            formData.append( 'total_price', resultWrapper.html());
12776
12777            $.cookie('paid_name', $('input[name=edition_name]').val(), { expires: 1 });
12778            $.cookie('paid_email', $('input[name=edition_email]').val(), { expires: 1 });
12779
12780            $.ajax({
12781                type: 'POST',
12782                url: action,
12783                data: formData,
12784                processData: false, // required
12785                contentType: false, // required
12786                cache: false,
12787                beforeSend: function () {
12788                    btn.text( "Идет отправка" );
12789                },
12790                error: function (request, txtstatus, errorThrown) {
12791                    console.log(request);
12792                    console.log(txtstatus);
12793                    console.log(errorThrown);
12794                },
12795                success: function (data) {
12796                    success.html('Заявка успешно отправлена');
12797                    $.cookie('last_payment', data['id'], { expires: 1 });
12798                    // window.location.replace(data['confirmation']['confirmation_url']);
12799                    btn.text( "Заказать" );
12800                    form.find('input').val('');
12801                    resultWrapper.html('0');
12802                }
12803            });
12804
12805        });
12806
12807        btn.on('click', function (e) {
12808
12809            e.stopPropagation();
12810
12811            var orderForm = $('#textAdOrderFormEditions');
12812
12813            if (!orderForm.is(':visible')) {
12814                orderForm.collapse('show');
12815                e.preventDefault();
12816            } else {
12817                checkInput(form);
12818                var errorNum = form.find('.empty-field').length;
12819                if (errorNum > 0) {
12820                    lightEmpty(form);
12821                    e.preventDefault();
12822                }
12823            }
12824        });
12825    }
12826
12827    sendEditionForm("#adCalcEditions");*/
12828
12829    // ЗАКАЗ МОДУЛЬНОГО ОБЪЯВЛЕНИЯ
12830
12831    var editionModuleSelect = $('#ad_newspaperModule'),
12832        sizeModuleSelect = $('#module_size'),
12833        filterModuleBtn = $('#adCalcModule input[type=radio]'),
12834        priceModuleWrapper = $("#priceResultValueModule");
12835
12836    // Функция установки цены модульного объявления
12837
12838    function moduleCalculate() {
12839
12840        var selectedEdition = $.cookie('selectedModule'),
12841            selectedColor = $.cookie('editionColor'),
12842            selectedModule = $.cookie('selectedModuleSize'),
12843            priceModuleWrapper = $("#priceResultValueModule");
12844
12845        if (selectedEdition != "null") {
12846            var price = window.dataCalculator['editions'][selectedEdition][selectedColor + 'Price'][selectedModule];
12847        } else {
12848            price = 0;
12849        }
12850
12851    }
12852
12853    // Функция проверки размеров площади(блока) для издания
12854
12855    function checkBlockPrice($selectedEdition, $idBlockSelector, $cookieModuleSize) {
12856        var blockSelector = $($idBlockSelector),
12857            blockSelectorLength = blockSelector.children().length;
12858        charsCounts = {
12859            '9000': '1 полоса',
12860            '7200': '4/5 полосы',
12861            '6750': '3/4 полосы',
12862            '4170': '1/2 полосы',
12863            '2700': '1/3 полосы',
12864            '2040': '1/4 полосы',
12865            '1800': '1/5 полосы',
12866            '1500': '1/6 полосы',
12867            '990': '1/8 полосы',
12868            '900': '1/10 полосы',
12869            '480': '1/16 полосы',
12870            '400': '1/20 полосы',
12871            '240': '1/32 полосы',
12872            '120': '1/64 полосы',
12873        };
12874
12875        //getArray().done(function (data) {
12876
12877            if (!$selectedEdition) return false;
12878
12879            var listCounts = window.dataCalculator['editions'][$selectedEdition]['bwPrice'],
12880                listCountsKey = Object.keys(listCounts);
12881
12882            if (listCountsKey.length != blockSelectorLength) {
12883
12884                blockSelector.empty();
12885
12886                $.each(listCountsKey, function (i, block) {
12887                    var sel;
12888
12889                    if (block == $cookieModuleSize) sel = 'selected="selected"';
12890
12891                    blockSelector.append('<option value="' + block + '" ' + sel + '>' + charsCounts[block] + '</option>')
12892                });
12893            }
12894
12895        //})
12896
12897    }
12898
12899    checkBlockPrice($.cookie('selectedModule'), '#module_size', $.co
12899okie('selectedModuleSize'));
12900
12901
12902    // Функция фильтрации по цвету МОДУЛЬНОГО ОБЪЯВЛЕНИЯ
12903
12904    function editionModuleFilter(color) {
12905
12906        var editionNames = {
12907            "pravdaNN": "Нижегородская правда",
12908            "pravdaNNBusiness": "Нижегородская правда — Деловая газета",
12909            "nnSport": "Нижегородский спорт",
12910            "nnLand": "Земля нижегородская",
12911            "nnNews": "Нижегородские новости",
12912            "nnNewsBusiness": "Нижегородские новости — Деловая газета",
12913            "newDeal": "Новое дело — Областной выпуск",
12914            "kursN": "Курс-Н",
12915        };
12916
12917        //getArray().done(function (data) {
12918
12919            var filteredEditions = [];
12920
12921            if (color) {
12922                for (var edition in window.dataCalculator['editions']) {
12923                    if (window.dataCalculator['editions'][edition].color.includes(color)) {
12924                        filteredEditions.push(edition);
12925                    }
12926                }
12927
12928                editionModuleSelect.empty();
12929
12930                $.each(filteredEditions, function (i, ed) {
12931
12932                    if (i == 0) {
12933                        var sel = 'selected="selected"';
12934                        $.cookie('selectedModule', ed, {expires: 7});
12935                        moduleCalculate();
12936                    }
12937
12938                    editionModuleSelect.append('<option value="' + ed + '" ' + sel + '>' + editionNames[ed] + '</option>');
12939                });
12940
12941                if (filteredEditions.length == 0) {
12942                    editionModuleSelect.html('<option value="null" disabled="disabled" selected="selected">Таких изданий нет</option>');
12943                    $.cookie('selectedModule', null);
12944                    moduleCalculate();
12945                }
12946
12947
12948            }
12949
12950        //})
12951
12952    }
12953
12954    //editionModuleFilter($.cookie('editionColor'));
12955
12956    // УСТАНОВКА ИЗ КУКИ ДЛЯ МОДУЛЬНОГО ОБЪЯВЛЕНИЯ
12957
12958    //цена
12959    if ($.cookie('selectedModuleSize') && $.cookie('selectedModule')) {
12960        moduleCalculate();
12961    } else {
12962        priceModuleWrapper.html(0)
12963    }
12964
12965    //размер полосы
12966    if (!$.cookie('selectedModuleSize')) {
12967        $.cookie('selectedModuleSize', "120", {expires: 7});
12968        sizeModuleSelect.find("option").removeAttr('selected');
12969        sizeModuleSelect.find("option[value='" + $.cookie('selectedModuleSize') + "']").attr('selected', true);
12970    } else {
12971        sizeModuleSelect.find("option").removeAttr('selected');
12972        sizeModuleSelect.find("option[value='" + $.cookie('selectedModuleSize') + "']").attr('selected', true);
12973    }
12974
12975    //выбор издания
12976    if (!$.cookie('selectedModule')) {
12977        $.cookie('selectedModule', 'pravdaNN', {expires: 7});
12978        editionModuleSelect.find("option").removeAttr('selected');
12979        editionModuleSelect.find("option[value='" + $.cookie('selectedModule') + "']").attr('selected', true);
12980    } else {
12981        editionModuleSelect.find("option").removeAttr('selected');
12982        editionModuleSelect.find("option[value='" + $.cookie('selectedModule') + "']").attr('selected', true);
12983    }
12984
12985    // Событие изменения выбора Издания (газеты) МОДУЛЬНОЕ ОБЪЯВЛЕНИЕ
12986
12987    editionModuleSelect.change(function (e) {
12988
12989        e.stopPropagation();
12990
12991        var selectedEdition = editionModuleSelect.find(":selected").val();
12992
12993        $.cookie('selectedModule', selectedEdition, {expires: 7});
12994
12995        checkBlockPrice(selectedEdition, '#module_size', $.cookie('selectedModuleSize'));
12996
12997        moduleCalculate();
12998
12999    });
13000
13001    // Событие изменения выбора размера полосы издания МОДУЛЬНОЕ ОБЪЯВЛЕНИЕ
13002
13003    sizeModuleSelect.change(function (e) {
13004
13005        e.stopPropagation();
13006
13007        var selectedSize = sizeModuleSelect.find(":selected").val();
13008
13009        $.cookie('selectedModuleSize', selectedSize, {expires: 7});
13010
13011        moduleCalculate();
13012
13013    });
13014
13015    // Событие изменения цвета МОДУЛЬНОЕ ОБЪЯВЛЕНИЕ
13016
13017    filterModuleBtn.on('click', function (e) {
13018        e.stopPropagation();
13019
13020        $(this).parent().find('input[checked]').removeAttr('checked');
13021
13022        if ($(this).attr('name') == 'ad_type') {
13023            $.cookie('adType', $(this).val(), {expires: 7});
13024        } else {
13025            $.cookie('editionColor', $(this).val(), {expires: 7});
13026        }
13027
13028        editionModuleFilter($.cookie('editionColor'));
13029
13030        $(this).attr('checked', true);
13031
13032        var selectedEdition = selectEdition.find(":selected").val();
13033
13034        $.cookie('editionType', selectedEdition, {expires: 7});
13035
13036        moduleCalculate();
13037
13038    });
13039
13040    // ФУНКЦИЯ ОТПРАВКИ МОДУЛЬНОГО ОБЪЯВЛЕНИЯ
13041
13042    function sendModuleForm(formTag) {
13043
13044        var form = $(formTag),
13045            btn = $('#submitAdTextModule'),
13046            editionSelect = form.find('#ad_newspaperModule'),
13047            moduleSizeSelect = form.find('#module_size'),
13048            success = $('#successPlaceholderModule'),
13049            resultWrapper = $('#priceResultValueModule'),
13050            action = '/wp-admin/admin-ajax.php?action=calculateModuleAd';
13051
13052        form.find('.req-field').addClass('empty-field');
13053
13054        form.submit(function (e) {
13055            e.preventDefault();
13056            var formData = new FormData();
13057            formData.append('user_name', $('input[name=module_name]').val());
13058            formData.append('user_phone', $('input[name=module_phone]').val());
13059            formData.append('user_email', $('input[name=module_email]').val());
13060            formData.append('ed_type', editionSelect.find(":selected").val());
13061            formData.append('module_size', moduleSizeSelect.find(":selected").val());
13062            //formData.append( 'ad_type', $.cookie('adType'));
13063            formData.append('ad_color', $.cookie('editionColor'));
13064            formData.append('total_price', resultWrapper.html());
13065
13066            $.cookie('paid_name', $('input[name=module_name]').val(), {expires: 1});
13067            $.cookie('paid_email', $('input[name=module_email]').val(), {expires: 1});
13068
13069            $.ajax({
13070                type: 'POST',
13071                url: action,
13072                data: formData,
13073                processData: false, // required
13074                contentType: false, // required
13075                cache: false,
13076                beforeSend: function () {
13077                    btn.text("Идет отправка");
13078                },
13079                error: function (request, txtstatus, errorThrown) {
13080                    console.log(request);
13081                    console.log(txtstatus);
13082                    console.log(errorThrown);
13083                },
13084                success: function (data) {
13085                    success.html('Заявка успешно отправлена');
13086                    $('#textAdOrderFormModule').collapse('hide'); //fix 13802
13087                    $.cookie('last_payment', data['id'], {expires: 1});
13088                    $.cookie('selectedModule', 'pravdaNN');
13089                    $.cookie('selectedModuleSize', "120");
13090                    // window.location.replace(data['confirmation']['confirmation_url']);
13091                    btn.text("Заказать");
13092                    form.find('input').val('');
13093                    resultWrapper.html('0');
13094                }
13095            });
13096
13097        });
13098
13099        btn.on('click', function (e) {
13100
13101            e.stopPropagation();
13102
13103            var orderForm = $('#textAdOrderFormModule');
13104
13105            if (!orderForm.is(':visible')) {
13106                orderForm.collapse('show');
13107                e.preventDefault();
13108            } else {
13109                checkInput(form);
13110                var errorNum = form.find('.empty-field').length;
13111                if (errorNum > 0) {
13112                    lightEmpty(form);
13113                    e.preventDefault();
13114                }
13115            }
13116        });
13117    }
13118
13119    sendModuleForm('#adCalcModule');
13120
13121
13122// ЗАКАЗ СТАТЬИ
13123
13124    var editionArticleSelect = $('#ad_newspaperArticle'),
13125        sizeArticleSelect = $('#article_size'),
13126        filterArticleBtn = $('#adCalcArticle input[type=radio]'),
13127        priceArticleWrapper = $("#priceResultValueArticle");
13128
13129    // Функция установки цены статьи
13130
13131    function articleCalculate() {
13132
13133        var selectedEdition = $.cookie('selectedArticle'),
13134            selectedColor = $.cookie('editionColor'),
13135            selectedArticle = $.cookie('selectedArticleSize'),
13136            priceArticleWrapper = $("#priceResultValueArticle");
13137
13138        if (selectedEdition != "null") {
13139            var price = Math.round(window.dataCalculator['editions'][selectedEdition][selectedColor + 'Price'][selectedArticle]);
13140        } else {
13141            price = 0;
13142        }
13143
13144        priceArticleWrapper.html(price);
13145
13146    }
13147
13148    // Функция фильтрации по цвету СТАТЬИ
13149
13150    function editionArticleFilter(color) {
13151
13152        var editionNames = {
13153            "pravdaNN": "Нижегородская правда",
13154            "pravdaNNBusiness": "Нижегородская правда — Деловая газета",
13155            "nnSport": "Нижегородский спорт",
13156            "nnLand": "Земля нижегородская",
13157            "nnNews": "Нижегородские новости",
13158            "nnNewsBusiness": "Нижегородские новости — Деловая газета",
13159            "newDeal": "Новое дело — Областной выпуск",
13160            "kursN": "Курс-Н",
13161        };
13162
13163        //getArray().done(function (data) {
13164
13165            var filteredEditions = [];
13166
13167            if (color) {
13168                for (var edition in window.dataCalculator['editions']) {
13169                    if (window.dataCalculator['editions'][edition].color.includes(color)) {
13170                        filteredEditions.push(edition);
13171                    }
13172                }
13173
13174                editionArticleSelect.empty();
13175
13176                $.each(filteredEditions, function (i, ed) {
13177
13178                    if (i == 0) {
13179                        var sel = 'selected="selected"';
13180                        $.cookie('selectedArticle', ed, {expires: 7});
13181                        articleCalculate();
13182                    }
13183
13184                    editionArticleSelect.append('<option value="' + ed + '" ' + sel + '>' + editionNames[ed] + '</option>');
13185                });
13186
13187                if (filteredEditions.length == 0) {
13188                    editionArticleSelect.html('<option value="null" disabled="disabled" selected="selected">Таких изданий нет</option>');
13189                    $.cookie('selectedArticle', null);
13190                    articleCalculate();
13191                }
13192
13193
13194            }
13195
13196        //})
13197
13198    }
13199
13200    //editionModuleFilter($.cookie('editionColor'));
13201
13202    // УСТАНОВКА ИЗ КУКИ ДЛЯ СТАТЬИ
13203
13204    //цена
13205    if ($.cookie('selectedArticleSize') && $.cookie('selectedArticle')) {
13206        articleCalculate();
13207    } else {
13208        priceArticleWrapper.html(0)
13209    }
13210
13211    //размер полосы
13212    if (!$.cookie('selectedArticleSize')) {
13213        $.cookie('selectedArticleSize', "120", {expires: 7});
13214        sizeArticleSelect.find("option").removeAttr('selected');
13215        sizeArticleSelect.find("option[value='" + $.cookie('selectedArticleSize') + "']").attr('selected', true);
13216    } else {
13217        sizeArticleSelect.find("option").removeAttr('selected');
13218        sizeArticleSelect.find("option[value='" + $.cookie('selectedArticleSize') + "']").attr('selected', true);
13219    }
13220
13221    //выбор издания
13222    if (!$.cookie('selectedArticle')) {
13223        $.cookie('selectedArticle', 'pravdaNN', {expires: 7});
13224        editionArticleSelect.find("option").removeAttr('selected');
13225        editionArticleSelect.find("option[value='" + $.cookie('selectedArticle') + "']").attr('selected', true);
13226    } else {
13227        editionArticleSelect.find("option").removeAttr('selected');
13228        editionArticleSelect.find("option[value='" + $.cookie('selectedArticle') + "']").attr('selected', true);
13229    }
13230
13231
13232    checkBlockPrice($.cookie('selectedArticle'), '#article_size', $.co
13232okie('selectedArticleSize'));
13233
13234
13235    // Событие изменения выбора Издания (газеты) СТАТЬЯ
13236
13237    editionArticleSelect.change(function (e) {
13238
13239        e.stopPropagation();
13240
13241        var selectedEdition = editionArticleSelect.find(":selected").val();
13242
13243        $.cookie('selectedArticle', selectedEdition, {expires: 7});
13244
13245        checkBlockPrice($.cookie('selectedArticle'), '#article_size', $.cookie('selectedArticleSize'));
13246
13247        articleCalculate();
13248
13249    });
13250
13251    // Событие изменения выбора размера полосы издания СТАТЬЯ
13252
13253    sizeArticleSelect.change(function (e) {
13254
13255        e.stopPropagation();
13256
13257        var selectedSize = sizeArticleSelect.find(":selected").val();
13258
13259        $.cookie('selectedArticleSize', selectedSize, {expires: 7});
13260
13261        articleCalculate();
13262
13263    });
13264
13265    // Событие изменения цвета СТАТЬЯ
13266
13267    filterArticleBtn.on('click', function (e) {
13268        e.stopPropagation();
13269
13270        $(this).parent().find('input[checked]').removeAttr('checked');
13271
13272        if ($(this).attr('name') == 'ad_type') {
13273            $.cookie('adType', $(this).val(), {expires: 7});
13274        } else {
13275            $.cookie('editionColor', $(this).val(), {expires: 7});
13276        }
13277
13278        editionArticleFilter($.cookie('editionColor'));
13279
13280        $(this).attr('checked', true);
13281
13282        var selectedEdition = selectEdition.find(":selected").val();
13283
13284        $.cookie('editionType', selectedEdition, {expires: 7});
13285
13286        articleCalculate();
13287
13288    });
13289
13290    // ФУНКЦИЯ ОТПРАВКИ СТАТЬИ
13291
13292    function sendArticleForm(formTag) {
13293
13294        var form = $(formTag),
13295            btn = $('#submitAdTextArticle'),
13296            editionSelect = form.find('#ad_newspaperArticle'),
13297            articleSizeSelect = form.find('#article_size'),
13298            success = $('#successPlaceholderArticle'),
13299            resultWrapper = $('#priceResultValueArticle'),
13300            action = '/wp-admin/admin-ajax.php?action=calculateArticleAd';
13301
13302        form.find('.req-field').addClass('empty-field');
13303
13304        form.submit(function (e) {
13305            e.preventDefault();
13306            var formData = new FormData();
13307            formData.append('user_name', $('input[name=article_name]').val());
13308            formData.append('user_phone', $('input[name=article_phone]').val());
13309            formData.append('user_email', $('input[name=article_email]').val());
13310            formData.append('ed_type', editionSelect.find(":selected").val());
13311            formData.append('article_size', articleSizeSelect.find(":selected").val());
13312            //formData.append( 'ad_type', $.cookie('adType'));
13313            formData.append('ad_color', $.cookie('editionColor'));
13314            formData.append('total_price', resultWrapper.html());
13315
13316            $.cookie('paid_name', $('input[name=article_name]').val(), {expires: 1});
13317            $.cookie('paid_email', $('input[name=article_email]').val(), {expires: 1});
13318
13319            $.ajax({
13320                type: 'POST',
13321                url: action,
13322                data: formData,
13323                processData: false, // required
13324                contentType: false, // required
13325                cache: false,
13326                beforeSend: function () {
13327                    btn.text("Идет отправка");
13328                },
13329                error: function (request, txtstatus, errorThrown) {
13330                    console.log(request);
13331                    console.log(txtstatus);
13332                    console.log(errorThrown);
13333                },
13334                success: function (data) {
13335                    success.html('Заявка успешно отправлена');
13336                    $('#textAdOrderFormArticle').collapse('hide'); //fix 13802
13337                    $.cookie('last_payment', data['id'], {expires: 1});
13338                    $.cookie('selectedArticle', 'pravdaNN');
13339                    $.cookie('selectedArticleSize', "120");
13340                    // window.location.replace(data['confirmation']['confirmation_url']);
13341                    btn.text("Заказать");
13342                    form.find('input').val('');
13343                    resultWrapper.html('0');
13344                }
13345            });
13346
13347        });
13348
13349        btn.on('click', function (e) {
13350
13351            e.stopPropagation();
13352
13353            var orderForm = $('#textAdOrderFormArticle');
13354
13355            if (!orderForm.is(':visible')) {
13356                orderForm.collapse('show');
13357                e.preventDefault();
13358            } else {
13359                checkInput(form);
13360                var errorNum = form.find('.empty-field').length;
13361                if (errorNum > 0) {
13362                    lightEmpty(form);
13363                    e.preventDefault();
13364                }
13365            }
13366        });
13367    }
13368
13369    sendArticleForm('#adCalcArticle');
13370
13371
13372// ЗАКАЗ РЕКЛАМНОЙ СТАТЬИ НА САЙТЕ
13373
13374    var editionSiteTextSelect = $('#ad_siteText'),
13375        priceSiteTextWrapper = $("#priceResultValueSiteText");
13376
13377
13378    // Функция установки цены статьи
13379
13380    function siteTextCalculate() {
13381
13382        var selectedSiteText = $.cookie('selectedSiteText'),
13383            defaultSiteTextSelect = $('#ad_siteText').val(),
13384            priceSiteTextWrapper = $("#priceResultValueSiteText"),
13385            price;
13386
13387
13388        /*if (selectedSiteText != "null") {
13389            price = data['site'][selectedSiteText];
13390        } else {
13391            price = data['site'][defaultSiteTextSelect];
13392        }*/
13393
13394        if (typeof $.cookie('selectedSiteText') === 'undefined') {
13395            price = window.dataCalculator['site'][defaultSiteTextSelect];
13396        } else {
13397            price = window.dataCalculator['site'][selectedSiteText];
13398        }
13399
13400        priceSiteTextWrapper.html(price);
13401    }
13402
13403    siteTextCalculate();
13404
13405    // УСТАНОВКА ИЗ КУКИ ДЛЯ РЕКЛАМНОЙ СТАТЬИ
13406
13407    //выбор статьи
13408    if ($.cookie('selectedSiteText')) {
13409        editionSiteTextSelect.find("option").removeAttr('selected');
13410        editionSiteTextSelect.find("option[value='" + $.cookie('selectedSiteText') + "']").attr('selected', true);
13411    }
13412
13413    // Событие изменения выбора типа рекламы РЕКЛАМНАЯ СТАТЬЯ
13414
13415    editionSiteTextSelect.change(function (e) {
13416
13417        e.stopPropagation();
13418
13419        var selectedEdition = editionSiteTextSelect.find(":selected").val();
13420
13421        $.cookie('selectedSiteText', selectedEdition, {expires: 7});
13422
13423        siteTextCalculate();
13424
13425    });
13426
13427    // ФУНКЦИЯ ОТПРАВКИ СТАТЬИ НА САЙТЕ
13428
13429    function sendSiteTextForm(formTag) {
13430
13431        var form = $(formTag),
13432            btn = $('#submitAdTextSite'),
13433            editionSelect = form.find('#ad_siteText'),
13434            success = $('#successPlaceholderSiteText'),
13435            resultWrapper = $('#priceResultValueSiteText'),
13436            action = '/wp-admin/admin-ajax.php?action=calculateSiteAd';
13437
13438        form.find('.req-field').addClass('empty-field');
13439
13440        form.submit(function (e) {
13441            e.preventDefault();
13442            var formData = new FormData();
13443            formData.append('user_name', $('input[name=site_name]').val());
13444            formData.append('user_phone', $('input[name=site_phone]').val());
13445            formData.append('user_email', $('input[name=site_email]').val());
13446            formData.append('ed_type', editionSelect.find(":selected").val());
13447            formData.append('total_price', resultWrapper.html());
13448
13449            $.cookie('paid_name', $('input[name=article_name]').val(), {expires: 1});
13450            $.cookie('paid_email', $('input[name=article_email]').val(), {expires: 1});
13451
13452            $.ajax({
13453                type: 'POST',
13454                url: action,
13455                data: formData,
13456                processData: false, // required
13457                contentType: false, // required
13458                cache: false,
13459                beforeSend: function () {
13460                    btn.text("Идет отправка");
13461                },
13462                error: function (request, txtstatus, errorThrown) {
13463                    console.log(request);
13464                    console.log(txtstatus);
13465                    console.log(errorThrown);
13466                },
13467                success: function (data) {
13468                    success.html('Заявка успешно отправлена');
13469                    $('#textAdOrderFormSite').collapse('hide'); //fix 13802
13470                    $.cookie('last_payment', data['id'], {expires: 1});
13471                    $.cookie('selectedSiteText', 'news');
13472                    btn.text("Заказать");
13473                    form.find('input').val('');
13474                    resultWrapper.html('0');
13475                }
13476            });
13477
13478        });
13479
13480        btn.on('click', function (e) {
13481
13482            e.stopPropagation();
13483
13484            var orderForm = $('#textAdOrderFormSite');
13485
13486            if (!orderForm.is(':visible')) {
13487                orderForm.collapse('show');
13488                e.preventDefault();
13489            } else {
13490                checkInput(form);
13491                var errorNum = form.find('.empty-field').length;
13492                if (errorNum > 0) {
13493                    lightEmpty(form);
13494                    e.preventDefault();
13495                }
13496            }
13497        });
13498    }
13499
13500    sendSiteTextForm('#adCalcSiteText');
13501
13502
13503// ЗАКАЗ РЕКЛАМНОГО БАНЕРА НА САЙТЕ
13504
13505    var editionBannerSelect = $('#ad_banner'),
13506        priceBannerWrapper = $("#priceResultValueBanner");
13507
13508
13509    // Функция установки цены банера
13510
13511    function bannerCalculate() {
13512
13513        var selectedBanner = $.cookie('selectedBanner'),
13514            defaultBannerSelect = $('#ad_banner').val(),
13515            priceBannerWrapper = $("#priceResultValueBanner"),
13516            price;
13517
13518        /*if (selectedBanner != "null") {
13519            price = data['banner'][selectedBanner];
13520        } else {
13521            price = data['banner'][defaultBannerSelect];
13522        }*/
13523
13524        if (typeof $.cookie('selectedBanner') === 'undefined') {
13525            price = window.dataCalculator['banner'][defaultBannerSelect];
13526        } else {
13527            price = window.dataCalculator['banner'][selectedBanner];
13528        }
13529
13530        priceBannerWrapper.html(price);
13531    }
13532
13533    bannerCalculate();
13534
13535    // УСТАНОВКА ИЗ КУКИ ДЛЯ РЕКЛАМНОГО БАНЕРА
13536
13537    //выбор статьи
13538    if ($.cookie('selectedBanner')) {
13539        editionBannerSelect.find("option").removeAttr('selected');
13540        editionBannerSelect.find("option[value='" + $.cookie('selectedBanner') + "']").attr('selected', true);
13541    }
13542
13543    // Событие изменения выбора типа рекламы РЕКЛАМНЫЙ БАНЕР
13544
13545    editionBannerSelect.change(function (e) {
13546
13547        e.stopPropagation();
13548
13549        var selectedEdition = editionBannerSelect.find(":selected").val();
13550
13551        $.cookie('selectedBanner', selectedEdition, {expires: 7});
13552
13553        bannerCalculate();
13554
13555    });
13556
13557    // ФУНКЦИЯ ОТПРАВКИ БАНЕРА
13558
13559    function sendBannerForm(formTag) {
13560
13561        var form = $(formTag),
13562            btn = $('#submitAdBanner'),
13563            editionSelect = form.find('#ad_banner'),
13564            success = $('#successPlaceholderBanner'),
13565            resultWrapper = $('#priceResultValueBanner'),
13566            action = '/wp-admin/admin-ajax.php?action=calculateBannerAd';
13567
13568        form.find('.req-field').addClass('empty-field');
13569
13570        form.submit(function (e) {
13571            e.preventDefault();
13572            var formData = new FormData();
13573            formData.append('user_name', $('input[name=banner_name]').val());
13574            formData.append('user_phone', $('input[name=banner_phone]').val());
13575            formData.append('user_email', $('input[name=banner_email]').val());
13576            formData.append('ed_type', editionSelect.find(":selected").val());
13577            formData.append('total_price', resultWrapper.html());
13578
13579            $.cookie('paid_name', $('input[name=article_name]').val(), {expires: 1});
13580            $.cookie('paid_email', $('input[name=article_email]').val(), {expires: 1});
13581
13582            $.ajax({
13583                type: 'POST',
13584                url: action,
13585                data: formData,
13586                processData: false, // required
13587                contentType: false, // required
13588                cache: false,
13589                beforeSend: function () {
13590                    btn.text("Идет отправка");
13591                },
13592                error: function (request, txtstatus, errorThrown) {
13593                    console.log(request);
13594                    console.log(txtstatus);
13595                    console.log(errorThrown);
13596                },
13597                success: function (data) {
13598                    success.html('Заявка успешно отправлена');
13599                    $('#textAdOrderFormBanner').collapse('hide'); //fix 13802
13600                    $.cookie('last_payment', data['id'], {expires: 1});
13601                    $.cookie('selectedBanner', '1');
13602                    btn.text("Заказать");
13603                    form.find('input').val('');
13604                    resultWrapper.html('0');
13605                }
13606            });
13607
13608        });
13609
13610        btn.on('click', function (e) {
13611
13612            e.stopPropagation();
13613
13614            var orderForm = $('#textAdOrderFormBanner');
13615
13616            if (!orderForm.is(':visible')) {
13617                orderForm.collapse('show');
13618                e.preventDefault();
13619            } else {
13620                checkInput(form);
13621                var errorNum = form.find('.empty-field').length;
13622                if (errorNum > 0) {
13623                    lightEmpty(form);
13624                    e.preventDefault();
13625                }
13626            }
13627        });
13628    }
13629
13630    sendBannerForm('#adCalcBanner');
13631
13632
13633// ЗАКАЗ ПОСТА В СОЦСЕТЯХ
13634
13635    var editionSocialVk = $('#ad_socialVk'),
13636        editionSocialFacebook = $('#ad_socialFacebook'),
13637        editionSocialInst = $('#ad_socialInst'),
13638        editionSocialOdn = $('#ad_socialOdn'),
13639        priceSocialWrapper = $("#priceResultValueSocial"),
13640        selectSocial = $('#adCalcSocial input[type=checkbox]');
13641
13642
13643    // Функция установки цены поста в соцсети
13644
13645    function socialCalculate(targetVal, toggle) {
13646
13647        var priceSocialWrapper = $("#priceResultValueSocial"),
13648            price;
13649
13650        price = window.dataCalculator['social'][targetVal];
13651
13652        if (toggle == true) {
13653            priceSocialWrapper.html(+priceSocialWrapper.html() + price);
13654        } else {
13655            priceSocialWrapper.html(+priceSocialWrapper.html() - price);
13656        }
13657    }
13658
13659    // Функция изменения значения списка соцсетей
13660
13661    selectSocial.change(function (e) {
13662
13663        var selectedEdition = e.target.value;
13664        selectedToggle = e.target.checked;
13665
13666        socialCalculate(selectedEdition, selectedToggle);
13667
13668    });
13669
13670    // ФУНКЦИЯ ОТПРАВКИ ЗАКАЗА ПОСТА В СОЦСЕТЯХ
13671
13672    function sendSocialForm(formTag) {
13673
13674        var form = $(formTag),
13675            btn = $('#submitAdSocial'),
13676            selected = [],
13677            success = $('#successPlaceholderSocial'),
13678            resultWrapper = $('#priceResultValueSocial'),
13679            action = '/wp-admin/admin-ajax.php?action=calculateSocialAd';
13680
13681
13682        form.find('.req-field').addClass('empty-field');
13683
13684        form.submit(function (e) {
13685            e.preventDefault();
13686
13687            $('#adCalcSocial input[type=checkbox]:checked').each(function (data) {
13688                selected.push($(this).val());
13689            });
13690
13691            var formData = new FormData();
13692            formData.append('user_name', $('input[name=social_name]').val());
13693            formData.append('user_phone', $('input[name=social_phone]').val());
13694            formData.append('user_email', $('input[name=social_email]').val());
13695            formData.append('social', selected);
13696
13697            formData.append('total_price', resultWrapper.html());
13698
13699            $.cookie('paid_name', $('input[name=article_name]').val(), {expires: 1});
13700            $.cookie('paid_email', $('input[name=article_email]').val(), {expires: 1});
13701
13702            $.ajax({
13703                type: 'POST',
13704                url: action,
13705                data: formData,
13706                processData: false, // required
13707                contentType: false, // required
13708                cache: false,
13709                beforeSend: function () {
13710                    btn.text("Идет отправка");
13711                },
13712                error: function (request, txtstatus, errorThrown) {
13713                    console.log(request);
13714                    console.log(txtstatus);
13715                    console.log(errorThrown);
13716                },
13717                success: function (data) {
13718                    success.html('Заявка успешно отправлена');
13719                    $('#adOrderFormSocial').collapse('hide'); //fix 13802
13720                    btn.text("Заказать");
13721                    //form.find('input').val('');
13722                    //resultWrapper.html('0');
13723                }
13724            });
13725
13726        });
13727
13728        btn.on('click', function (e) {
13729
13730            e.stopPropagation();
13731
13732            var orderForm = $('#adOrderFormSocial');
13733
13734            if (!orderForm.is(':visible')) {
13735                orderForm.collapse('show');
13736                e.preventDefault();
13737            } else {
13738                checkInput(form);
13739                var errorNum = form.find('.empty-field').length;
13740                if (errorNum > 0) {
13741                    lightEmpty(form);
13742                    e.preventDefault();
13743                }
13744            }
13745        });
13746    }
13747
13748    sendSocialForm('#adCalcSocial');
13749
13750    //Для редактора
13751    $('#addText').addClass('disabled');
13752    $('#deleteText').addClass('disabled');
13753    $('#vkShareLink').addClass('disabled');
13754    $('#inpData').addClass('disabled');
13755    $('#lnkDownload').addClass('disabled');
13756    //$('#textControls').addClass('disabled');
13757    //$('#sendEmailForm').addClass('disabled');
13758
13759    $('#upload').click(function () {
13760
13761        $('#inpData').removeClass('disabled');
13762        $('#addText').removeClass('disabled');
13763        $('#deleteText').removeClass('disabled');
13764        $('#vkShareLink').removeClass('disabled');
13765        $('#lnkDownload').removeClass('disabled');
13766        //$('#sendEmailForm').removeClass('disabled');
13767
13768    });
13769
13770    $('#addText').click(function () {
13771
13772        $('#textControls').removeClass('disabled');
13773        $('#inpData input[type="text"]').val('');
13774
13775    });
13776
13777    /*function sendImageEmail(formTag) {
13778
13779        var form = $(formTag),
13780            btn = $('#sendEmailForm'),
13781            success = $('#successPlaceholderImageSend'),
13782            action = '/wp-admin/admin-ajax.php?action=sendPosterGenerateImage';
13783
13784        form.find('.req-field').addClass('empty-field');
13785
13786        form.submit(function (e) {
13787            e.preventDefault();
13788            var formData = new FormData();
13789            formData.append('person_email', $('input[name=person_email]').val());
13790            formData.append('generate_image', $('input[name=generate_image]').val());
13791
13792            $.cookie('person_email', $('input[name=person_email]').val(), { expires: 1 });
13793
13794            $.ajax({
13795                type: 'POST',
13796                url: action,
13797                data: formData,
13798                processData: false, // required
13799                contentType: false, // required
13800                cache: false,
13801                beforeSend: function () {
13802                    btn.text('Идет отправка');
13803                },
13804                error: function (request, txtstatus, errorThrown) {
13805                    console.log(request);
13806                    console.log(txtstatus);
13807                    console.log(errorThrown);
13808                },
13809                success: function (data) {
13810                    success.html('Изображение успешно отправлено');
13811                    //$.cookie('last_payment', data['id'], { expires: 1 });
13812                    btn.text('Отправить на email');
13813                    form.find('input').val('');
13814                }
13815            });
13816
13817        });
13818
13819        btn.on('click', function (e) {
13820
13821            e.stopPropagation();
13822
13823            var orderForm = $('#sendEmailData');
13824
13825            if (!orderForm.is(':visible')) {
13826                orderForm.collapse('show');
13827                e.preventDefault();
13828            } else {
13829                checkInput(form);
13830                var errorNum = form.find('.empty-field').length;
13831                if (errorNum > 0) {
13832                    lightEmpty(form);
13833                    e.preventDefault();
13834                }
13835            }
13836        });
13837    }
13838
13839    sendImageEmail('#sendEmailImg');*/
13840
13841    //  КАЛЕНДАРЬ
13842
13843    function pravdaCalendar(t, e, i) {
13844        var n = new Date(e, i + 1, 0).getDate(),
13845            s = new Date(e, i, n),
13846            o = s.getDay(),
13847            a = new Date(s.getFullYear(), s.getMonth(), 1).getDay(),
13848            r = "<tr>",
13849            l = document.querySelector("#" + t + ' option[value="' + s.getMonth() + '"]'),
13850            h = document.querySelector("#" + t + " input"),
13851            c = null,
13852            u = s.getMonth() + 1,
13853            d = (new Date).getDate(),
13854            p = (new Date).getMonth(),
13855            f = (new Date).getFullYear();
13856        if (0 !== a)
13857            for (var m = 1; m < a; m++) r += "<td>";
13858        else
13859            for (m = 0; m < 6; m++) r += "<td>";
13860        for (m = 1; m <= n; m++) (c = m) === (new Date).getDate() && s.getFullYear() === (new Date).getFullYear() && s.getMonth() === (new Date).getMonth() ? r += '<td class="today"><a href="/date-archive/?data-year=' + s.getFullYear() + "&data-month=" + u + "&data-day=" + c + '">' + m + "</a>" : s.getFullYear() > f || s.getMonth() > p && s.getFullYear() === f || d < m && s.getMonth() === p && s.getFullYear() === f ? r += '<td class="disabled" data-today="' + d + '">' + m : 1 === m && 0 === s.getMonth() && (1897 < s.getFullYear() && s.getFullYear() < 1930 || 1947 < s.getFullYear()) || 2 === m && 0 === s.getMonth() && 1992 < s.getFullYear() || (3 === m || 4 === m || 5 === m || 6 === m || 8 === m) && 0 === s.getMonth() && 2004 < s.getFullYear() || 7 === m && 0 === s.getMonth() && 1990 < s.getFullYear() || 23 === m && 1 === s.getMonth() && 2001 < s.getFullYear() || 8 === m && 2 === s.getMonth() && 1965 < s.getFullYear() || 1 === m && 4 === s.getMonth() && 1917 < s.getFullYear() || 9 === m && 4 === s.getMonth() && 1964 < s.getFullYear() || 12 === m && 5 === s.getMonth() && 1990 < s.getFullYear() || 7 === m && 10 === s.getMonth() && 1926 < s.getFullYear() && s.getFullYear() < 2005 || 8 === m && 10 === s.getMonth() && 1926 < s.getFullYear() && s.getFullYear() < 1992 || 4 === m && 10 === s.getMonth() && 2004 < s.getFullYear() ? r += '<td class="holiday"><a href="/date-archive/?data-year=' + s.getFullYear() + "&data-month=" + u + "&data-day=" + c + '">' + m + "</a>" : r += '<td><a href="/date-archive/?data-year=' + s.getFullYear() + "&data-month=" + u + "&data-day=" + c + '">' + m + "</a>", 0 === new Date(s.getFullYear(), s.getMonth(), m).getDay() && (r += "<tr>");
13861        for (m = o; m < 7; m++) r += "<td>&nbsp;";
13862        document.querySelector("#" + t + " tbody").innerHTML = r, h.value = s.getFullYear(), l.selected = !0, document.querySelectorAll("#" + t + " tbody tr").length < 6 && (document.querySelector("#" + t + " tbody").innerHTML += "<tr><td>&nbsp;<td>&nbsp;<td>&nbsp;<td>&nbsp;<td>&nbsp;<td>&nbsp;<td>&nbsp;"), document.querySelector("#" + t + ' option[value="' + (new Date).getMonth() + '"]').style.color = "rgb(220, 0, 0)"
13863    }
13864
13865    $("#newsCalendarMobile").length && (
13866        pravdaCalendar("newsCalendarMobile", (new Date).getFullYear(), (new Date).getMonth()), document.querySelector("#newsCalendarMobile").onchange = function () {
13867            pravdaCalendar("newsCalendarMobile", document.querySelector("#newsCalendarMobile input").value, parseFloat(document.querySelector("#newsCalendarMobile select").options[document.querySelector("#newsCalendarMobile select").selectedIndex].value))
13868        })
13869
13870    $("#newsCalendar").length && (
13871        pravdaCalendar("newsCalendar", (new Date).getFullYear(), (new Date).getMonth()),
13872
13873            document.querySelector("#newsCalendar").onchange = function () {
13874                pravdaCalendar(
13875                    "newsCalendar",
13876                    document.querySelector("#newsCalendar input").value,
13877                    parseFloat(document.querySelector("#newsCalendar select").options[document.querySelector("#newsCalendar select").selectedIndex].value)
13878                )
13879            }
13880    )
13881
13882    // ЗАКАЗ КОНФЕРЕНЦ-ЗАЛА
13883
13884    var i, s, o, a, t = $("#timePickerBlock"),
13885        r = t.find("input[name=conference-start-time]"),
13886        l = t.find("input[name=conference-end-time]"),
13887        e = $("#conferenceCalcForm"),
13888        photographerTime = $('#servicePhotographerHours'),
13889        serviceCostPhotographer = typeof window.dataCalculator['conference']['conference-use-photographer'] !== 'undefined' ? window.dataCalculator['conference']['conference-use-photographer'] : 5000;
13890
13891    $("#conferenceDate");
13892
13893    function conferencePriceSet() {
13894        var t = $("#priceResultConference"),
13895            e = $("#successPlaceholderModule"),
13896            i  = typeof window.dataCalculator['conference']['cost-hour'] !== 'undefined' ? window.dataCalculator['conference']['cost-hour'] : 3500,
13897            startTimeVal = parseInt(r.val().split(":")[0]),
13898            endTimeVal = parseInt(l.val().split(":")[0]),
13899            delta = function (t, e) {return t <= e ? e - t : -1}(startTimeVal, endTimeVal);
13900
13901        var getSelectedServices = $('body').find('#additionalServices input[type="checkbox"]:checked'),
13902            servicePrice = 0;
13903        if (getSelectedServices.length) {
13904            $.each(getSelectedServices, function() {
13905                var type = $(this).attr('name'),
13906                    cost = typeof window.dataCalculator['conference'][type] !== 'undefined' ? window.dataCalculator['conference'][type] : 0;
13907
13908                if (type === 'conference-use-photographer') {
13909                    servicePrice += photographerTime.val() * serviceCostPhotographer;
13910                } else {
13911                    servicePrice += cost;
13912                }
13913            });
13914        }
13915
13916        0 <= delta ? (t.html(servicePrice + (delta * i)), e.html(""), photographerTime.attr('max', endTimeVal - startTimeVal)) : (t.html(0), e.html("Время начала должно быть раньше времени окончания"))
13917    }
13918
13919    $('body').on('change', '#additionalServices input[type="checkbox"]', function() {
13920        updateConferenceServices($(this));
13921    });
13922
13923    function updateConferenceServices(item) {
13924        const checked = item.is(':checked');
13925        const type = item.attr('name');
13926        let servicePrice = window.dataCalculator['conference'][type] || 5000;
13927        const totalPriceBlock = $('#priceResultConference');
13928
13929        if (!servicePrice || !totalPriceBlock.length) return;
13930
13931        let totalPrice = parseInt(totalPriceBlock.text());
13932
13933        if (type === 'conference-use-photographer') {
13934            servicePrice = photographerTime.val() * serviceCostPhotographer;
13935        }
13936
13937        totalPrice += checked ? servicePrice : -servicePrice;
13938
13939        $('#photographerTimeBlock').toggleClass('collapse', !$('#servicePhotographer:checked').length);
13940        totalPriceBlock.text(totalPrice);
13941    }
13942
13943    function updatePhotographerTime(cost, type = 'inc') {
13944        if (!photographerTime.length) return;
13945
13946        const totalPriceBlock = $('#priceResultConference');
13947        if (!totalPriceBlock.length) return;
13948
13949        let totalPrice = parseInt(totalPriceBlock.text());
13950        totalPrice += (type === 'inc') ? cost : -cost;
13951        totalPriceBlock.text(totalPrice);
13952    }
13953
13954    if (photographerTime.length) {
13955        let previousValue = photographerTime.val();
13956
13957        photographerTime.on('input', function() {
13958            const currentValue = $(this).val();
13959            updatePhotographerTime(serviceCostPhotographer, currentValue > previousValue ? 'inc' : 'decr');
13960            previousValue = currentValue; // Обновляем предыдущее значение
13961        });
13962    }
13963
13964    function h() {
13965        var minHours = 2,
13966            startTimeVal = parseInt(r.val().split(":")[0]),
13967            minEndTime = startTimeVal + minHours,
13968            startEndTime = (minEndTime >= 10) ? minEndTime + ':00' : '0' + minEndTime + ':00';
13969
13970        $("input[name='conference-end-time']").timepicker('option', 'minTime', startEndTime.split(":")[0].toString());
13971        l.val(startEndTime);
13972        conferencePriceSet();
13973    }
13974
13975    $("#conferenceDate").datepicker({
13976        startDate: new Date,
13977        minDate: new Date
13978    }), $("input[name='conference-start-time']").timepicker({
13979        timeFormat: "H:mm",
13980        interval: 60,
13981        minTime: "08",
13982        maxTime: "21:00",
13983        defaultTime: "08:00",
13984        startTime: "08:00",
13985        dynamic: !1,
13986        dropdown: !0,
13987        scrollbar: !1,
13988        change: h
13989    }), $("input[name='conference-end-time']").timepicker({
13990        timeFormat: "H:mm",
13991        interval: 60,
13992        dropdown: true,
13993        scrollbar: false,
13994        maxTime: "23:00",
13995        dynamic: true,
13996        change: conferencePriceSet
13997    }), 0 < e.length && h(),
13998        i = $("#conferenceCalcForm"),
13999        s = $("#conferenceSubmit  "),
14000        o = $("#successPlaceholderModule"),
14001        a = $("#priceResultConference"),
14002        i.find(".req-field").addClass("empty-field"),
14003        i.submit(function (t) {
14004            t.preventDefault();
14005            var e = new FormData;
14006            e.append("user_name", $("input[name=conference-name]").val()),
14007                e.append("user_phone", $("input[name=conference-phone]").val()),
14008                e.append("user_email", $("input[name=conference-email]").val()),
14009                e.append("event_date", $("input[name=conference-date]").val()),
14010                e.append("event_start_time", $("input[name=conference-start-time]").val()),
14011                e.append("event_end_time", $("input[name=conference-end-time]").val()),
14012                e.append("event_use_administrator", $("input[name=conference-use-administrator]").val()),
14013                e.append("event_use_stream", $("input[name=conference-use-stream]").val()),
14014                e.append("event_use_moderator", $("input[name=conference-use-moderator]").val()),
14015                e.append("event_use_photographer", $("input[name=conference-use-photographer]").val()),
14016                e.append("event_use_photographer_time", $("input[name=conference-photographer-time]").val()),
14017                e.append("total_price", a.html()),
14018                $.ajax({
14019                    type: "POST",
14020                    url: "/wp-admin/admin-ajax.php?action=conferenceHallProcessor",
14021                    data: e,
14022                    processData: !1,
14023                    contentType: !1,
14024                    cache: !1,
14025                    beforeSend: function () {
14026                        s.text("Идет отправка")
14027                    },
14028                    error: function (t, e, i) {
14029                        console.log(t), console.log(e), console.log(i)
14030                    },
14031                    success: function (t) {
14032                        o.html("Заявка успешно отправлена"), s.text("Заказать"), i.find("input").val(""), a.html("0")
14033                    }
14034                })
14035        }), s.on("click", function (t) {
14036        t.stopPropagation();
14037        var e = $("#conferenceContactForm");
14038        e.is(":visible") ? (function (t) {
14039            var e = /^((8|\+7)[\- ]?)?(\(?\d{3}\)?[\- ]?)?[\d\- ]{7,10}$/,
14040                i = /^([a-z0-9_\.-])+@[a-z0-9-]+\.([a-z]{2,4}\.)?[a-z]{2,4}$/i;
14041            t.find(".req-field").each(function () {
14042                var t = $(this);
14043                t.hasClass("rf-phone") ? e.test(t.val()) ? t.removeClass("empty-field") : t.addClass("empty-field") : t.hasClass("rf-mail") ? i.test(t.val()) ? t.removeClass("empty-field") : t.addClass("empty-field") : t.hasClass("rf-ad") ? t.val().length < 9e3 ? t.removeClass("empty-field") : t.addClass("empty-field") : t.hasClass("rf-edition") ? "null" != n.cookie("editionType") ? t.removeClass("empty-field") : t.addClass("empty-field") : "" != t.val() ? t.removeClass("empty-field") : t.addClass("empty-field")
14044            })
14045        }(i), 0 < i.find(".empty-field").length && (function (t) {
14046            t.find(".empty-field").addClass("rf-error"), setTimeout(function () {
14047                t.find(".rf-error").removeClass("rf-error")
14048            }, 1e3)
14049        }(i), t.preventDefault())) : (e.collapse("show"), t.preventDefault()), "0" == a.html() && (o.html("Минимальное время аренды — 1 час"), t.preventDefault())
14050    })
14051
14052    //копирайт
14053    /*document.oncopy = function() {
14054        var bodyElement = document.body;
14055        var selection = getSelection();
14056        var href = document.location.href;
14057        var copyright = "<br><br> <i>Наши журналисты много работают, чтобы создавать интересный и полезный контент, поэтому просим вас при использовании материалов размещать ссылку на сайт <a style='text-decoration:underline;color:#bc4649;' href='" + href + "'><b>Pravda-nn.ru</b></a></i>";
14058        var text = selection + copyright;
14059        var divElement = document.createElement('div');
14060        divElement.style.position = 'absolute';
14061        divElement.style.left = '-99999px';
14062        divElement.innerHTML = text;
14063        bodyElement.appendChild(divElement);
14064        selection.selectAllChildren(divElement);
14065        setTimeout(function() {
14066            bodyElement.removeChild(divElement);
14067        }, 0);
14068    };*/
14069
14070    //Просмотр баннера
14071
14072    /*function checkAdv() {
14073        $('.adv_b').each(function() {
14074            var post_adv_ID = $(this).attr('data-unique-post');
14075            if (post_adv_ID) {
14076                if (!$(this).prop('shown') && isBlockVisible($(this))) {
14077                    $(this).prop('shown', true);
14078                    formData = new FormData,
14079                    formData.append("postAdvID", post_adv_ID),
14080                    $.ajax({
14081                        type: 'POST',
14082                        url: '/wp-admin/admin-ajax.php?action=updateAdvPosts',
14083                        processData: false,
14084                        contentType: false,
14085                        cache: false,
14086                        data: formData,
14087                    });
14088                }
14089            }
14090        });
14091    }
14092
14093    $(function () {
14094        checkAdv();
14095        $(window).scroll(checkAdv);
14096    });*/
14097
14098    function checkAdv() {
14099        $('.adv_b').each(function () {
14100            var post_adv_ID = $(this).attr('data-unique-post'),
14101                postViewsUpdate = $(this).attr('data-set-views'),
14102                postSetStats = $(this).attr('data-set-stats');
14103
14104            if (postViewsUpdate || postSetStats) {
14105                if (!$(this).prop('shown') && isBlockVisible($(this))) {
14106                    $(this).prop('shown', true);
14107                    setStatViewData(post_adv_ID, postViewsUpdate, postSetStats);
14108                }
14109            }
14110        });
14111    }
14112
14113    $(function () {
14114        checkAdv();
14115        $(window).scroll(checkAdv);
14116
14117        //Для кликов
14118        $('body').on('click', '.adv_b a', function () {
14119            var post_adv_ID = $(this).closest('.adv_b').attr('data-unique-post'),
14120                postSetStats = $(this).closest('.adv_b').attr('data-set-stats');
14121
14122            setStatClickData(post_adv_ID, postSetStats);
14123        });
14124
14125        $('body').on('click', '.ad-banner__content.adv_b', function () {
14126            var post_adv_ID = $(this).attr('data-unique-post'),
14127                postSetStats = $(this).attr('data-set-stats');
14128
14129            setStatClickData(post_adv_ID, postSetStats);
14130        });
14131    });
14132
14133    //Quiz Page
14134
14135    //Init form
14136    $('body').on('click', '.btn-quiz-answer', function () {
14137        var postID = $(this).closest('div.quiz_item').attr('data-post');
14138
14139        if (postID) {
14140            formData = new FormData,
14141                formData.append("pid", postID);
14142
14143            $.ajax({
14144                type: 'POST',
14145                url: '/wp-admin/admin-ajax.php?action=quizAnswerForm',
14146                processData: false,
14147                contentType: false,
14148                dateType: 'html',
14149                cache: false,
14150                data: formData,
14151                success: function (data) {
14152                    if (data) {
14153                        var result = $('body').append(data).find('#quiz-answer').html();
14154                        $('#quiz-answer').modal({
14155                            backdrop: 'static',
14156                            keyboard: false
14157                        });
14158
14159                        //Cookie form values
14160                        if ($.cookie('quiz_form_name')) {
14161                            $('#quiz-answer input[name=name]').val($.cookie('quiz_form_name'));
14162                        }
14163
14164                        if ($.cookie('quiz_form_area')) {
14165                            $('#quiz-answer select[name=area]').find("option").removeAttr('selected');
14166                            $('#quiz-answer select[name=area]').find("option[value='" + $.cookie('quiz_form_area') + "']").attr('selected', true);
14167                        }
14168
14169                        if ($.cookie('quiz_form_city')) {
14170                            $('#quiz-answer input[name=city]').val($.cookie('quiz_form_city'));
14171                        }
14172
14173                        if ($.cookie('quiz_form_street')) {
14174                            $('#quiz-answer input[name=street]').val($.cookie('quiz_form_street'));
14175                        }
14176
14177                        if ($.cookie('quiz_form_build')) {
14178                            $('#quiz-answer input[name=build]').val($.cookie('quiz_form_build'));
14179                        }
14180
14181                        /*if ($.cookie('quiz_form_post_сode')) {
14182                            $('#quiz-answer input[name=postCode]').val($.cookie('quiz_form_post_сode'));
14183                        }*/
14184
14185                        if ($.cookie('quiz_form_post_code')) {
14186                            $('#quiz-answer input[name=postCode]').val($.cookie('quiz_form_post_code'));
14187                        }
14188
14189                        if ($.cookie('quiz_form_birth')) {
14190                            $('#quiz-answer input[name=dateBirth]').val($.cookie('quiz_form_birth'));
14191                        }
14192
14193                        if ($.cookie('quiz_form_phone')) {
14194                            $('#quiz-answer input[name=phone]').val($.cookie('quiz_form_phone'));
14195                        }
14196
14197                        if ($.cookie('quiz_form_email')) {
14198                            $('#quiz-answer input[name=email]').val($.cookie('quiz_form_email'));
14199                        }
14200
14201                    }
14202                }
14203            });
14204
14205            return false;
14206        }
14207
14208    });
14209
14210    //Get quiz info
14211    $('body').on('click', '.quiz-more-info', function () {
14212
14213        var postID = $(this).closest('div.quiz_item').attr('data-post');
14214
14215        if (postID) {
14216            formData = new FormData,
14217                formData.append("pid", postID);
14218
14219            $.ajax({
14220                type: 'POST',
14221                url: '/wp-admin/admin-ajax.php?action=quizInfoForm',
14222                processData: false,
14223                contentType: false,
14224                cache: false,
14225                dateType: 'html',
14226                data: formData,
14227                success: function (data) {
14228                    if (data) {
14229                        var result = $('body').append(data).find('#quiz-info').html();
14230                        $('#quiz-info').modal({
14231                            backdrop: 'static',
14232                            keyboard: false
14233                        });
14234                    }
14235                }
14236
14237            });
14238
14239        }
14240
14241    });
14242
14243    $('body').on('change', '#answerFormQuiz input[class^="checkboxes"]', function (e) {
14244        var checkPolicy = $('#privacyPolicy').prop('checked'),
14245            checkAgree = $('#agreeRules').prop('checked');
14246
14247        if (checkPolicy && checkAgree) {
14248            $('#sendFormQuiz').removeAttr('disabled');
14249        } else {
14250            $('#sendFormQuiz').attr('disabled', 'disabled');
14251        }
14252    });
14253
14254    //Send Quiz
14255    $('body').on('submit', '#answerFormQuiz', function (e) {
14256
14257        e.preventDefault();
14258        e.stopPropagation();
14259
14260
14261        var form = $('#answerFormQuiz'),
14262            btn = $('#sendFormQuiz');
14263
14264        //Check
14265
14266        checkInput(form);
14267
14268        var errorNum = form.find('.empty-field').length;
14269
14270        if (errorNum > 0) {
14271            lightEmpty(form);
14272        } else {
14273            var formData = new FormData();
14274            formData.append('quiz_id', $('input[name=quiz]').val());
14275            formData.append('quiz_answer', $('input[name=answer]').val());
14276            formData.append('user_name', $('input[name=name]').val());
14277            formData.append('user_area', $('select[name=area]').val());
14278            formData.append('user_city', $('input[name=city]').val());
14279            formData.append('user_street', $('input[name=street]').val());
14280            formData.append('user_build', $('input[name=build]').val());
14281            formData.append('user_birth', $('input[name=dateBirth]').val());
14282            formData.append('user_post_code', $('input[name=postCode]').val());
14283            formData.append('user_phone', $('input[name=phone]').val());
14284            formData.append('user_email', $('input[name=email]').val());
14285
14286            $.cookie('quiz_form_name', $('input[name=name]').val(), {expires: 30});
14287            $.cookie('quiz_form_area', $('select[name=area]').val(), {expires: 30});
14288            $.cookie('quiz_form_city', $('input[name=city]').val(), {expires: 30});
14289            $.cookie('quiz_form_street', $('input[name=street]').val(), {expires: 30});
14290            $.cookie('quiz_form_build', $('input[name=build]').val(), {expires: 30});
14291            $.cookie('quiz_form_birth', $('input[name=dateBirth]').val(), {expires: 30});
14292            $.cookie('quiz_form_post_сode', $('input[name=postCode]').val(), {expires: 30});
14293            $.cookie('quiz_form_phone', $('input[name=phone]').val(), {expires: 30});
14294            $.cookie('quiz_form_email', $('input[name=email]').val(), {expires: 30});
14295
14296            $.ajax({
14297                type: 'POST',
14298                url: '/wp-admin/admin-ajax.php?action=quizFormSending',
14299                data: formData,
14300                dataType: 'json',
14301                processData: false,
14302                contentType: false,
14303                cache: false,
14304                beforeSend: function () {
14305                    btn.text("Идет отправка");
14306                },
14307                error: function (request, txtstatus, errorThrown) {
14308                    console.log(request);
14309                    console.log(txtstatus);
14310                    console.log(errorThrown);
14311                    btn.text("Отправить!");
14312                },
14313                success: function (response) {
14314                    btn.text("Отправить!");
14315                    if (response.error) {
14316                        var result = $('body').append(response.data).find('#quiz-error').html();
14317                        $('#quiz-answer').modal('hide');
14318                        $('.modal-backdrop').remove();
14319                        $('#quiz-error').modal({
14320                            backdrop: 'static',
14321                            keyboard: false
14322                        });
14323                    } else {
14324                        var result = $('body').append(response.data).find('#quiz-success').html();
14325                        $('#quiz-answer').remove();
14326                        $('#quiz-success').modal({
14327                            backdrop: 'static',
14328                            keyboard: false
14329                        });
14330                        var clipboard = new ClipboardJS('.btn-copy', {
14331                            container: document.getElementById('quiz-success')
14332                        });
14333                    }
14334                }
14335            });
14336        }
14337    });
14338
14339    $('body').on('click', '.modal-reload', function () {
14340        $('.modal-backdrop').remove();
14341        $('#quiz-answer').modal('show');
14342        $('#quiz-error').remove();
14343    });
14344
14345    function CloseModal(elem) {
14346        var modal = elem.closest('div.quiz-modal');
14347        modal.remove();
14348        $('#quiz-answer').remove();
14349        $('.modal-backdrop').remove();
14350        $('body').removeClass('modal-open');
14351        $('body').removeAttr('style');
14352    }
14353
14354    $('body').on('click', '.modal-close', function () {
14355        CloseModal($(this));
14356    });
14357
14358    $('body').on('click', '.close', function () {
14359        CloseModal($(this));
14360    });
14361
14362    /* модалка с информацией */
14363    const btnInfo = $('.header-bottom__btn'),
14364        btnBurger = $('.rubric__menu-button'),
14365        menuInfo = $('.header-bottom__modalinfo'),
14366        menuRubric = $('.rubric__menu-wrapper');
14367
14368    $('body').on('click', '#infoMenu', function () {
14369        if (!$(this).is('.header-bottom__show')) {
14370            menuInfo.show();
14371            $(this).addClass('header-bottom__show');
14372        } else {
14373            menuInfo.hide();
14374            $(this).removeClass('header-bottom__show');
14375        }
14376    });
14377
14378    $(document).click(function (e) {
14379        if (!btnBurger.is(e.target) &&
14380            !btnInfo.is(e.target) &&
14381            !menuInfo.is(e.target) &&
14382            menuInfo.has(e.target).length === 0 &&
14383            !menuRubric.is(e.target) &&
14384            menuRubric.has(e.target).length === 0) {
14385
14386            menuInfo.slideUp();
14387            menuRubric.slideUp();
14388            btnInfo.removeClass('header-bottom__show');
14389            btnBurger.removeClass('opened');
14390            $('body').removeClass('modal-toggle');
14391            $('.header-fixed').removeClass('header-opened');
14392            $('.header__social-mobiles').removeClass('header__mobiles--show');
14393            // $('.header__social-icons').removeClass('header__mobiles--hidden');
14394        }
14395        ;
14396    });
14397
14398    /* скрипт на бургер; показать все соц.сети */
14399    $('body').on('click', '.rubric__menu-button', function () {
14400        if (document.documentElement.clientWidth <= 1024) {
14401            $('body').toggleClass('modal-toggle');
14402        }
14403        $('.header__social-mobiles').toggleClass('header__mobiles--show');
14404        // $('.header__social-icons').toggleClass('header__mobiles--hidden');
14405        btnInfo.removeClass('header-bottom__show');
14406        menuInfo.slideUp();
14407    });
14408
14409    /* горизонтальный скролл */
14410    jQuery(function ($) {
14411        $.fn.hScroll = function (amount) {
14412            amount = amount || 120;
14413            $(this).bind("DOMMouseScroll mousewheel", function (event) {
14414                var oEvent = event.originalEvent,
14415                    direction = oEvent.detail ? oEvent.detail * -amount : oEvent.wheelDelta,
14416                    position = $(this).scrollLeft();
14417                position += direction > 0 ? -amount : amount;
14418                $(this).scrollLeft(position);
14419                event.preventDefault();
14420            })
14421        };
14422    });
14423
14424    $(document).ready(function () {
14425        $('.header__themes-wrapper').hScroll(60);
14426    });
14427
14428    $('.all-regions').click(function () {
14429        if (!$(this).is('.regions-show')) {
14430            $(this).addClass('regions-show');
14431            $('.footer-regions__wrapper').find('.region-item').removeClass('hidden');
14432        } else {
14433            $(this).removeClass('regions-show');
14434            $('.footer-regions__wrapper').find('.region-item:nth-child(n+13)').addClass('hidden');
14435        }
14436    });
14437
14438    /* Кнопка поделиться */
14439
14440    $('body').on('click', '.share', function () {
14441        var shareUrl = $(this).data('url'), modalShareWrapper;
14442
14443        if (!$(this).is('.share-modal-opened')) {
14444            modalShareWrapper = '<div class="share-modal__wrapper nx-flex-row-c-c">' +
14445                '<span class="share-title">Поделиться</span>' +
14446                //'<a class="nx viber" rel="noopener" href="viber://forward?text=' + shareUrl + '" target="_blank" >v</a>' +
14447                '<a class="nx telegram" rel="noopener" href="https://t.me/share/url?url=' + shareUrl + '" target="_blank" >T</a>' +
14448                //'<a class="nx whatsapp" rel="noopener" href="whatsapp://send?text=' + shareUrl + '" target="_blank">W</a>' +
14449                //'<a class="nx facebook" rel="noopener" href="https://www.facebook.com/sharer/sharer.php?u=' + shareUrl + '" target="_blank">F</a>' +
14450                //'<a class="nx twitter" rel="noopener" href="http://twitter.com/share?url=' + shareUrl + '" target="_blank">t</a>' +
14451                '<a class="nx ok" rel="noopener" href="https://connect.ok.ru/offer?url=' + shareUrl + '" target="_blank">O</a>' +
14452                '<a class="nx vk" rel="noopener" href="http://vk.ru/share.php?url=' + shareUrl + '" target="_blank" >V</a>' +
14453                '<span class="nx close">x</span>' +
14454                '</div>';
14455
14456            $(this).addClass('share-modal-opened');
14457            $(this).closest('.article-wrap').append(modalShareWrapper);
14458
14459        } else {
14460            $(this).removeClass('share-modal-opened');
14461            $('.share-modal__wrapper').remove();
14462        }
14463
14464    });
14465
14466    $('body').on('click', '.share-modal__wrapper .close', function () {
14467        $(this).closest('.article-wrap').find('.share').removeClass('share-modal-opened');
14468        $(this).closest('.share-modal__wrapper').remove();
14469    })
14470
14471    // Кнопка поделиться в prnn_news (ещё новости по теме)
14472    initShareButton('.share-news', '.tag_and_share', '', 'after');
14473
14474    // Кнопка поделиться в single (в конце статьи)
14475    initShareButton('.post-share', '.post-share', 'share-modal-attached');
14476
14477    /* Прилипающее меню */
14478
14479    $(window).scroll(function () {
14480        var $fixed = $('.header-fixed'),
14481            $header = $('.header-block'),
14482            trigger = $('.ad-banner__content').height() + 100;
14483
14484        if ($(window).scrollTop() > trigger) {
14485            $fixed.addClass('scroll');
14486            $header.css('margin-top', $fixed.outerHeight() + 16 + 'px');
14487        } else {
14488            $fixed.removeClass('scroll');
14489            $header.css('margin-top', '0');
14490        }
14491    })
14492
14493    /* Показ блока поиск в шапке */
14494    $(document).on('click', '#searchButton', function (e) {
14495        e.stopPropagation();
14496        $('#searchString').toggle();
14497    });
14498
14499    $(document).on('click', function (e) {
14500        if (!$(e.target).closest('.search-block, #searchString').length) {
14501            $('#searchString').hide();
14502        }
14503    });
14504
14505    /* Многоточие в картине */
14506    $(document).ready(function(){
14507        var articleTitles = $('#main-block p.article-title');
14508        if($(window).width() <= 640){
14509            articleTitles.each(function() {
14510                if ((this.scrollHeight - this.clientHeight) > 10) {
14511                    this.innerHTML = this.innerHTML.slice(0, this.innerHTML.indexOf(' ', 45)) + '...';
14512                }
14513            });
14514        }
14515    })
14516
14517    /* Сообщить об ошибке */
14518
14519    // Вызов модального окна при нажатии Ctrl + Enter
14520    document.onkeydown = function (e) {
14521        e = e || window.event;
14522        if (e.ctrlKey && e.keyCode == 13) {
14523            getFormError();
14524        }
14525        return true;
14526    }
14527
14528    // Вызов модального окна при нажатии на кнопку "Сообщить об ошибке"
14529    $('body').on('click', '.post-error', function () {
14530        getFormError();
14531    })
14532
14533    // Функция закрытия всех созданных модальных окон, а также разрешение скролла
14534    function modalClose() {
14535        $('html').removeAttr('style').removeClass('nxModalOpened');
14536        $('body').find('.modal_blackout').remove();
14537        $('body').find('.modal-error__wrapper').remove();
14538        $('body').find('.modal-ajax-form').remove();
14539    }
14540
14541    // Закрытие формы при нажатии на крестик
14542    $('body').on('click', '.modal-error__wrapper .close', function () {
14543        modalClose();
14544    })
14545
14546    $('body').on('click', '.modal_blackout', function () {
14547        modalClose();
14548    })
14549
14550    // Определение с чего зашел пользователь (мобильное устройство или ПК)
14551    let isMobile = $('.post-error').attr('data-mobile');
14552
14553    // Функция вызова модального окна
14554    function getFormError() {
14555        let select = '';
14556
14557        if (!$('.modal-error__wrapper').length > 0) {
14558            // Проверка выделенного текста и присвоение выделения переменной
14559            if (window.getSelection) {
14560                select = window.getSelection();
14561            }
14562
14563            // Проверка на количество выделенных символов (min - 3, max - 750) и другие данные
14564            let minLength = 2,
14565                maxLength = 750,
14566                maxLengthTextarea = 500,
14567                errorMinMax = '',
14568                descNoText = '';
14569
14570            function sumMinLength() {
14571                return minLength + 1;
14572            }
14573
14574            // Проверка на количество выделенных символов (min - 3, max - 750) и другие данные
14575            if (!isMobile) {
14576                if (select.toString().length == 0) {
14577                    errorMinMax = 'Вы не выбрали текст';
14578                    descNoText = '<div class="desc_no-text">Выделите текст и нажмите Ctrl + Enter или кнопку "Сообщить об ошибке"</div>'
14579                } else if (select.toString().length <= minLength) {
14580                    errorMinMax = 'Выбрано слишком мало текста (минимально ' + sumMinLength() + ' символа)';
14581                    descNoText = '';
14582                } else if (select.toString().length > maxLength) {
14583                    errorMinMax = 'Выбрано слишком много текста (максимально ' + maxLength + ' символов)';
14584                    descNoText = '';
14585                }
14586            }
14587
14588            // При "Фактологической" ошибке обязательное поле комментария
14589            let placeholderTextarea = '',
14590                requiredTextarea = '';
14591
14592            if (isMobile) {
14593                requiredTextarea = ' required="required"';
14594                placeholderTextarea = 'Текст ошибки / комментарий';
14595            } else {
14596                requiredTextarea = '';
14597                placeholderTextarea = 'Комментарий';
14598            }
14599
14600            $('body').on('click', '#errorTypeFact', function () {
14601                $('#errorMessage').attr('required', 'required');
14602                $('#errorMessage').attr('placeholder', 'Опишите проблему (обязательно)');
14603            })
14604
14605            $('body').on('click', '#errorTypeGram', function () {
14606                if (isMobile) {
14607                    $('#errorMessage').attr('placeholder', 'Текст ошибки / комментарий');
14608                } else {
14609                    $('#errorMessage').removeAttr('required');
14610                    $('#errorMessage').attr('placeholder', 'Комментарий');
14611                }
14612            })
14613
14614            // Главное модальное окно с формой для отправки ошибки
14615            let fieldError = '';
14616
14617            /*if (isMobile) {
14618                fieldError =
14619                    '<textarea id="errorText" minlength="' + sumMinLength() + '" maxlength="' + maxLength + '" placeholder="Скопируйте и вставьте текст (не менее ' + sumMinLength() + ' символов)"></textarea>'
14620            } else {*/
14621            if (!isMobile) {
14622                fieldError =
14623                    '<div class="form-group error_in_text">' +
14624                    '<span>Ошибка в тексте:</span>' +
14625                    '<div id="errorText" class="error_text">' + select + '</div>' +
14626                    '</div>';
14627            }
14628
14629            let modalErrorWrapper =
14630                    '<div class="modal_blackout"></div>' +
14631                    '<div class="modal-error__wrapper">' +
14632                    '<h2>Связь с редакцией</h2>' +
14633                    '<form role="form" method="post" id="formError">' +
14634                    fieldError +
14635                    '<div class="form-group error_type">' +
14636                    '<span>Тип ошибки:</span>' +
14637
14638                    '<input autocomplete="off" type="radio" name="errorType" value="Грамматическая" id="errorTypeGram" checked="checked">' +
14639                    '<label for="errorTypeGram">Грамматическая</label>' +
14640                    '<input autocomplete="off" type="radio" name="errorType" value="Фактологическая" id="errorTypeFact">' +
14641                    '<label for="errorTypeFact">Фактологическая</label>' +
14642                    '</div>' +
14643                    '<div class="form-group message_text">' +
14644                    '<div class="count_symbol"><span id="countSymbol">0</span> / ' + maxLengthTextarea + '</div>' +
14645                    '<textarea id="errorMessage" maxlength="' + maxLengthTextarea + '" placeholder="' + placeholderTextarea + '"' + requiredTextarea + '></textarea>' +
14646                    '</div>' +
14647                    '<button type="submit" id="sendError">Отправить</button>' +
14648                    '</form>' +
14649                    '<span class="nx close">x</span>' +
14650                    '</div>',
14651
14652                // Модальное окно при условии ограничения выделенных символов
14653                errorMinMaxWrapper = '<div class="modal_blackout"></div>' +
14654                    '<div class="modal-error__wrapper">' +
14655                    '<h3>' + errorMinMax + '</h3>' +
14656                    descNoText +
14657                    '<span class="nx close">x</span>' +
14658                    '<button class="close">Отменить</button>' +
14659                    '</div>';
14660
14661            // Запрет скролла при открытии модального окна
14662            $('html').css({'overflow-y': 'hidden'});
14663
14664            // Подсчет количества введенных символов в поле "Комментарий"
14665            function countSymbolTextarea() {
14666                errorMessage.addEventListener('input', function () {
14667                    countSymbol.innerText = errorMessage.value.length;
14668                });
14669            }
14670
14671            // Вызов модального окна в зависимости от устройства и условий
14672            if (!isMobile) {
14673                if (select.toString().length == 0 || select.toString().length <= minLength || select.toString().length > maxLength) {
14674                    $('body').append(errorMinMaxWrapper);
14675                } else {
14676                    $('body').append(modalErrorWrapper);
14677                    countSymbolTextarea()
14678                }
14679            } else {
14680                $('body').append(modalErrorWrapper);
14681                countSymbolTextarea()
14682            }
14683        } else {
14684            modalClose();
14685        }
14686    };
14687
14688    // Отправка формы модального окна
14689    $('body').on('submit', '#formError', function (e) {
14690        e.preventDefault();
14691
14692        let erLink = window.location.href,
14693            erTitle = document.title,
14694            erText = (isMobile) ? $('#errorText').val() : $('#errorText').text(),
14695            erType = $('.error_type input[type=radio]:checked').val();
14696        erMessage = $('#errorMessage').val(),
14697            erMobile = isMobile,
14698            action = '/wp-admin/admin-ajax.php?action=send_error';
14699
14700        $.ajax({
14701            url: action,
14702            type: 'post',
14703            data: {
14704                'erLink': erLink,
14705                'erTitle': erTitle,
14706                'erText': erText,
14707                'erType': erType,
14708                'erMessage': erMessage,
14709                'erMobile': erMobile
14710            },
14711            success: function (data) {
14712                let errorThanks = '<div class="nx-flex-col-c-c">' +
14713                    '<h2 class="thanks">Спасибо за информацию!</h2>' +
14714                    '<div class="editor_fix">В ближайшее время редакторы это исправят!</div>' +
14715                    '<span class="nx close">x</span>'
14716                '</div>';
14717
14718                $('.modal-error__wrapper').html(errorThanks);
14719
14720                setTimeout(function () {
14721                    modalClose();
14722                }, 3000);
14723            }
14724        });
14725    });
14726
14727    //Slider prnn
14728    var prnnMainSlider = $('.prnn__slider .prnn__main-slider'),
14729        prnnThumbSlider = $('.prnn__slider .prnn-thumbnail__slider'),
14730        syncedSecondary = true;
14731
14732    if (prnnMainSlider.length && prnnThumbSlider.length) {
14733
14734        prnnMainSlider.owlCarousel({
14735            loop: true,
14736            items: 1,
14737            nav: true,
14738            navText: ['<span class="newOwlPrev">a</span>', '<span class="newOwlNext">a</span>'],
14739            dots: false,
14740            margin: 1,
14741        }).on('changed.owl.carousel', syncPrnnThumbSlider);
14742
14743        prnnThumbSlider.on('initialized.owl.carousel', function () {
14744            $(this).find('.owl-item').eq(0).addClass('current');
14745        }).owlCarousel({
14746            items: 7,
14747            dots: false,
14748            margin: 10,
14749            touchDrag: false,
14750            mouseDrag: false,
14751            responsive: {
14752                0: {
14753                    items: 4
14754                },
14755                600: {
14756                    items: 3
14757                },
14758                1000: {
14759                    items: 4
14760                },
14761                1200: {
14762                    items: 7
14763                }
14764            }
14765        }).on('changed.owl.carousel', syncPrnnMainSlider);
14766    }
14767
14768    function syncPrnnThumbSlider(el) {
14769        var count = el.item.count - 1,
14770            current = Math.round(el.item.index - (el.item.count / 2) - .5),
14771            parentBlock = $(el.target).closest('.prnn__slider')[0],
14772            slider = $(parentBlock).find(prnnThumbSlider);
14773
14774        if (current < 0) current = count;
14775
14776        if (current > count) current = 0;
14777
14778        slider.find('.owl-item').removeClass('current').eq(current).addClass('current');
14779
14780        var onscreen = slider.find('.owl-item.active').length - 1,
14781            start = slider.find('.owl-item.active').first().index(),
14782            end = slider.find('.owl-item.active').last().index();
14783
14784        if (current > end) slider.data('owl.carousel').to(current, 100, true);
14785
14786        if (current < start) slider.data('owl.carousel').to(current - onscreen, 100, true);
14787    }
14788
14789    function syncPrnnMainSlider(el) {
14790        if (syncedSecondary) {
14791            var number = el.item.index,
14792                parentBlock = $(el.target).closest('.prnn__slider')[0],
14793                slider = $(parentBlock).find(prnnMainSlider);
14794            slider.data('owl.carousel').to(number, 100, true);
14795        }
14796    }
14797
14798    $('body').on('click', '.prnn-thumbnail__slider .owl-item', function(e) {
14799        e.preventDefault();
14800        var number = $(this).index(),
14801            parentBlock = $(e.target).closest('.prnn__slider')[0],
14802            slider = $(parentBlock).find(prnnMainSlider);
14803        slider.data('owl.carousel').to(number, 300, true);
14804    });
14805
14806    // Мини-слайдер для блока "Еще новости по теме" (детальная)
14807    initUniversalSlider('.article-news__block .article-news__wrapper', {0: {items: 1}, 640: {items: 2}}, {stagePadding: 60, maxWidth: 1024});
14808
14809    // Мини-слайдер для блока "Подписывайтесь на наши каналы в Telegram"
14810    initUniversalSlider('.channels-list__wrappper', {0: {items: 1, stagePadding: 20}, 640: {items: 1}, 768: {items: 2}}, {stagePadding: 40, maxWidth: 1024});
14811
14812    // Мини-слайдер для блока "Новости партнеров" (детальная)
14813    initUniversalSlider('.container-96146 .list-container', {0: {items: 1, stagePadding: 60}, 575: {items: 2, stagePadding: 60}, 1024: {items: 3, stagePadding: 120}}, {stagePadding: 120, maxWidth: 1024});
14814
14815    var rubrucAdsBlock = $('.archiveRubric').find('.ad');
14816
14817    $(rubrucAdsBlock).each(function(){
14818        if (!$(this).find('.ad-banner').length) $(this).hide();
14819    });
14820
14821    function modalOpen() {
14822        $('html').addClass('nxModalOpened');
14823        $('body').append('<div class="modal_blackout"></div>');
14824    }
14825
14826    $('body').on('click', '#searchDeputyForm', function() {
14827        $.ajax({
14828            url: '/wp-admin/admin-ajax.php?action=searchFormDeputy',
14829            type: 'post',
14830            processData: false,
14831            contentType: false,
14832            timeout: 50000,
14833            success: function (data) {
14834                if (data) {
14835                    modalOpen();
14836                    $('body').append(data);
14837                }
14838            }
14839        });
14840        return false;
14841    });
14842
14843    $('body').on('submit', '#searchDeputy', function(e) {
14844        e.preventDefault();
14845        e.stopPropagation();
14846        var form = $(this),
14847            modal = $(form).parent(),
14848            nameDeputy = $(form).find('input[name="deputy"]').val().trim(),
14849            nameStreet = $(form).find('input[name="street"]').val().trim();
14850        if (!nameDeputy && !nameStreet) return false;
14851        var formData = new FormData(this);
14852        $.ajax({
14853            url: '/wp-admin/admin-ajax.php?action=resultSearchDeputy',
14854            type: 'post',
14855            data: formData,
14856            processData: false,
14857            contentType: false,
14858            timeout: 50000,
14859            beforeSend: function() {
14860                $('body').find('.deputies-lists__wrapper').remove();
14861                $(form).find('button').attr('disabled', 'disable');
14862            },
14863            success: function (data) {
14864                if (data === '0') data = '<div class="deputies-lists__wrapper">Не удалось найти данные</div>'
14865                $(modal).append(data);
14866                $(form).find('button').removeAttr('disabled');
14867            }
14868        });
14869        return false;
14870    });
14871
14872    $('body').on('click', '.modal-ajax-form .close', function () {
14873        modalClose();
14874    });
14875
14876    $('body').on('input', '.show-street__suggest', function() {
14877        var value = $(this).val(),
14878            form = $(this).closest('form'),
14879            streetFieldBlock = $('body').find('.deputy-street-field');
14880        $(form).find('button').attr('disabled', 'disable');
14881        if (value.length === 0) $(form).find('button').removeAttr('disabled');
14882        if (value.length >= 3) {
14883            setTimeout(function (){
14884                $.ajax({
14885                    url: '/wp-admin/admin-ajax.php?action=showStreetSuggests',
14886                    type: 'post',
14887                    data: {
14888                        'string': value,
14889                    },
14890                    success: function (data) {
14891                        if (data !== '0') {
14892                            $('<ul class="street-suggest__wrapper">' + data + '</ul>').appendTo(streetFieldBlock);
14893                            $(form).find('button').removeAttr('disabled');
14894                        }
14895                    }
14896                });
14897            }, 100);
14898        }
14899        return false;
14900    });
14901
14902    $('body').on('click', '.street-suggest__wrapper li', function() {
14903        var selectedValue = $(this).text(),
14904            form = $(this).closest('form'),
14905            streetField = $(form).find('input[name="street"]');
14906        $(streetField).val(selectedValue).text(selectedValue);
14907        $('.street-suggest__wrapper').remove();
14908        $(form).submit();
14909        $(streetField).val('');
14910    });
14911
14912    $('body').on('click', '.archive-filter.editions li', function() {
14913        $(this).closest('ul').find('a').removeClass('current');
14914        $(this).find('a').addClass('current');
14915        getArchiveEdition();
14916    });
14917
14918    if ($('body').find('.archive-filter.editions').length) getArchiveEdition();
14919
14920    function getArchiveEdition() {
14921        var type = $('body').find('.type-list li a.current').data('type'),
14922            year = $('body').find('.year-list li a.current').data('type'),
14923            month = $('body').find('.month-list li a.current').data('type');
14924
14925        $.ajax({
14926            url: '/wp-admin/admin-ajax.php?action=loadEdition',
14927            type: 'post',
14928            data: {
14929                'type': type,
14930                'year': year,
14931                'month': month
14932            },
14933            timeout: 50000,
14934            beforeSend: function() {
14935                $('body').find('.pane .archive-list').remove();
14936            },
14937            success: function (data) {
14938                if (data) $('body').find('.archive-filter.editions .pane').append(data);
14939            },
14940            error: function (request, txtstatus, errorThrown) {
14941                console.log(request);
14942                console.log(txtstatus);
14943                console.log(errorThrown);
14944            },
14945        });
14946    }
14947
14948    if ($('body').find('.nx-fancybox').length) {
14949        $('.nx-fancybox').fancybox({
14950            thumbs: {
14951                autoStart: true
14952            }
14953        });
14954    }
14955
14956    var status = getNXCookie('nx_cookie_policy');
14957
14958    if (!status) {
14959        $('.block-cookie').addClass('active');
14960    } else {
14961        $('.block-cookie').removeClass('active');
14962    }
14963
14964    $('.block-cookie .btn').on('click', function () {
14965        $('.block-cookie').removeClass('active');
14966        setNXCookie('nx_cookie_policy', true);
14967    });
14968});
14969
14970function isBlockVisible(block) {
14971    /*var pageViewTop = $(window).scrollTop(),
14972        pageViewBottom = pageViewTop + $(window).height();
14973        blockTop = $(block).offset().top,
14974        blockBottom = blockTop + $(block).height();
14975    return ((blockBottom <= pageViewBottom) && (blockTop >= pageViewTop));*/
14976
14977    var wt = $(window).scrollTop();
14978    var wh = $(window).height();
14979    var et = $(block).offset().top;
14980    var eh = $(block).outerHeight();
14981    var dh = $(document).height();
14982
14983    return ((wt + wh >= et || wh + wt == dh || eh + et < wh));
14984}
14985
14986function setStatViewData(postId, postViewsUpdate, postSetStats) {
14987    var formData = new FormData;
14988    formData.append('postAdvID', postId);
14989
14990    if (postViewsUpdate) formData.append('views_update', 1);
14991    if (postSetStats) formData.append('stats_update', 1);
14992
14993    $.ajax({
14994        type: 'POST',
14995        url: '/wp-admin/admin-ajax.php?action=updateAdvPosts',
14996        processData: false,
14997        contentType: false,
14998        cache: false,
14999        data: formData,
15000    });
15001}
15002
15003function setStatClickData(postId, postSetStats) {
15004    if (postSetStats) {
15005        var formData = new FormData;
15006
15007        formData.append("postAdvID", postId);
15008        formData.append("clicked", 1);
15009
15010        $.ajax({
15011            type: 'POST',
15012            url: '/wp-admin/admin-ajax.php?action=updateAdvPosts',
15013            processData: false,
15014            contentType: false,
15015            cache: false,
15016            data: formData,
15017        });
15018
15019    }
15020
15021    return true;
15022}
15023
15024function setNXCookie(name, value, expires, path, domain, secure) {
15025    if (!path) path = '/';
15026
15027    document.cookie = name + "=" + escape(value) +
15028        ((expires) ? "; expires=" + expires : "") +
15029        ((path) ? "; path=" + path : "") +
15030        ((domain) ? "; domain=" + domain : "") +
15031        ((secure) ? "; secure" : "");
15032}
15033
15034function getNXCookie(name) {
15035    var cookie = " " + document.cookie,
15036        search = " " + name + "=",
15037        setStr = null,
15038        offset = 0,
15039        end = 0;
15040
15041    if (cookie.length > 0) {
15042        offset = cookie.indexOf(search);
15043
15044        if (offset != -1) {
15045            offset += search.length;
15046            end = cookie.indexOf(";", offset)
15047
15048            if (end == -1) {
15049                end = cookie.length;
15050            }
15051            setStr = unescape(cookie.substring(offset, end));
15052        }
15053    }
15054
15055    return (setStr);
15056}
15057
15058/**
15059 * Управляемая кнопка "Поделиться"
15060 *
15061 * @param {string} triggerSelector - селектор кнопки
15062 * @param {string} [targetSelector] - селектор контейнера для вставки
15063 * @param {string|string[]} [extraClasses] - дополнительные классы для модалки
15064 * @param {'append'|'prepend'|'before'|'after'} [insertType='append'] - способ вставки
15065 */
15066function initShareButton(triggerSelector, targetSelector, extraClasses = '', insertType = 'append') {
15067    $('body').on('click', triggerSelector, function (e) {
15068        e.stopPropagation();
15069
15070        var $button = $(this),
15071            shareUrl = $button.data('url'),
15072            action = '/wp-admin/admin-ajax.php?action=ajaxLoadShare';
15073
15074        $(triggerSelector).not($button).removeClass('share-modal-opened');
15075        $('.share-modal__wrapper').filter(function () {
15076            return String($(this).attr('data-click')) !== '1';
15077        }).remove();
15078
15079        if ($button.hasClass('share-modal-opened')) {
15080            $button.removeClass('share-modal-opened');
15081            return;
15082        }
15083
15084        var $target = targetSelector ? $button.closest(targetSelector) : $button;
15085
15086        if (!$target.length) {
15087            $target = $button;
15088        }
15089
15090        $.ajax({
15091            url: action,
15092            type: 'post',
15093            data: {
15094                url: shareUrl,
15095                extra_class: extraClasses,
15096            },
15097            success: function (data) {
15098                if (!data) {
15099                    return;
15100                }
15101
15102                $button.addClass('share-modal-opened');
15103
15104                switch (insertType) {
15105                    case 'prepend':
15106                        $target.prepend(data);
15107                        break;
15108
15109                    case 'after':
15110                        $target.after(data);
15111                        break;
15112
15113                    case 'before':
15114                        $target.before(data);
15115                        break;
15116
15117                    case 'append':
15118                    default:
15119                        $target.append(data);
15120                        break;
15121                }
15122            }
15123        });
15124    });
15125
15126    $('body').on('click', '.share-modal__wrapper .close', function (e) {
15127        e.preventDefault();
15128        e.stopPropagation();
15129        e.stopImmediatePropagation();
15130
15131        var $modal = $(this).closest('.share-modal__wrapper');
15132        $modal.remove();
15133
15134        return false;
15135    });
15136
15137    $(document).on('click', function (e) {
15138        var $modal = $('.share-modal__wrapper');
15139
15140        if (!$modal.length) {
15141            return;
15142        }
15143
15144        var noClick = $modal.filter(function () {
15145            return String($(this).attr('data-click')) === '1';
15146        }).length > 0;
15147
15148        if (noClick) {
15149            return;
15150        }
15151
15152        if (
15153            !$(e.target).closest('.share-modal__wrapper').length &&
15154            !$(e.target).closest(triggerSelector).length &&
15155            !$(e.target).closest('.share').length
15156        ) {
15157            $('.share-modal__wrapper').filter(function () {
15158                return String($(this).data('click')) !== '1';
15159            }).remove();
15160
15161            $(triggerSelector).removeClass('share-modal-opened');
15162        }
15163    });
15164}
15165
15166/**
15167 * Универсальная инициализация Owl Carousel:
15168 * - инициализирует слайдеры при первом запуске
15169 * - включает/выключает их по ширине окна
15170 * - автоматически отслеживает новые элементы в DOM
15171 * - не требует ручного повторного вызова после AJAX
15172 *
15173 * @param {string} selector CSS-селектор слайдера
15174 * @param {Object<number, Object>} responsiveConfig responsive-настройки Owl Carousel
15175 * @param {Object} [options={}] дополнительные настройки
15176 * @param {boolean} [options.loop=false] зацикливание
15177 * @param {boolean} [options.nav=false] стрелки
15178 * @param {boolean} [options.dots=false] точки
15179 * @param {number} [options.margin=10] отступ между элементами
15180 * @param {number} [options.stagePadding=0] внутренний отступ stage
15181 * @param {number} [options.maxWidth=1024] максимальная ширина, при которой слайдер активен
15182 */
15183function initUniversalSlider(selector, responsiveConfig, options = {}) {
15184    var settings = $.extend(true, {
15185        loop: false,
15186        nav: false,
15187        dots: false,
15188        margin: 10,
15189        stagePadding: 0,
15190        maxWidth: 1024
15191    }, options);
15192
15193    function isMobileWidth() {
15194        return $(window).width() <= settings.maxWidth;
15195    }
15196
15197    function getSliders($context) {
15198        return $context.filter(selector).add($context.find(selector));
15199    }
15200
15201    function enableSlider($slider) {
15202        if ($slider.hasClass('owl-loaded')) {
15203            return;
15204        }
15205
15206        $slider.addClass('owl-carousel');
15207
15208        $slider.owlCarousel({
15209            loop: settings.loop,
15210            nav: settings.nav,
15211            dots: settings.dots,
15212            margin: settings.margin,
15213            stagePadding: settings.stagePadding,
15214            responsive: responsiveConfig
15215        });
15216    }
15217
15218    function disableSlider($slider) {
15219        if ($slider.hasClass('owl-loaded')) {
15220            $slider.trigger('destroy.owl.carousel');
15221        }
15222
15223        $slider.removeClass('owl-carousel owl-loaded owl-hidden');
15224
15225            $slider.find('.owl-stage-outer').children().unwrap();
15226            $slider.find('.owl-stage').children().unwrap();
15227            $slider.find('.owl-item').children().unwrap();
15228
15229        $slider.find('.owl-nav, .owl-dots').remove();
15230    }
15231
15232    function processSlider($slider) {
15233        if (isMobileWidth()) {
15234            enableSlider($slider);
15235        } else {
15236            disableSlider($slider);
15237        }
15238    }
15239
15240    function processContext(context) {
15241        var $context = $(context);
15242
15243        getSliders($context).each(function () {
15244            processSlider($(this));
15245        });
15246    }
15247
15248    processContext($(document));
15249
15250    if (!window.__universalSliderResizeStore) {
15251        window.__universalSliderResizeStore = {};
15252    }
15253
15254    if (!window.__universalSliderResizeStore[selector]) {
15255        var namespace = '.universalSlider_' + selector.replace(/[^\w-]/g, '_');
15256
15257        $(window).on('resize' + namespace + ' orientationchange' + namespace, function () {
15258            $(selector).each(function () {
15259                processSlider($(this));
15260            });
15261
15262            setTimeout(function () {
15263            $(selector).each(function () {
15264                processSlider($(this));
15265            });
15266            }, 150);
15267        });
15268
15269        window.__universalSliderResizeStore[selector] = true;
15270    }
15271
15272    if (!window.__universalSliderObserverStore) {
15273        window.__universalSliderObserverStore = {};
15274    }
15275
15276    if (!window.__universalSliderObserverStore[selector]) {
15277        var observer = new MutationObserver(function (mutations) {
15278            mutations.forEach(function (mutation) {
15279                $(mutation.addedNodes).each(function () {
15280                    if (this.nodeType !== 1) {
15281                        return;
15282                    }
15283
15284                    processContext($(this));
15285                });
15286            });
15287        });
15288
15289        observer.observe(document.body, {
15290            childList: true,
15291            subtree: true
15292        });
15293
15294        window.__universalSliderObserverStore[selector] = observer;
15295    }
15296}
15297
15298function relocateHeaderSocial() {
15299    var screenWidth = $(window).innerWidth(),
15300        $socialIcons = $('.header__social-icons');
15301
15302    if (!$socialIcons.length) return;
15303
15304    if (screenWidth <= mobileWidth) {
15305        if ($('#rubricMenuWrapper .header__social-icons').length === 0) {
15306            $socialIcons.insertAfter('#rubricMenuWrapper .rubric__menu-links');
15307        }
15308    } else {
15309        if ($('.header__social-wrapper .header__social-icons').length === 0) {
15310            $socialIcons.insertAfter('.header__social-wrapper .search-block');
15311        }
15312    }
15313}
15314
15315$(document).ready(function () {
15316    relocateHeaderSocial();
15317
15318    $('body').on('click', '#rubricMenu', function () {
15319        $('.header-fixed').toggleClass(
15320            'header-opened',
15321            $(this).hasClass('opened')
15322        );
15323    });
15324});
15325
15326$(window).on('resize', function () {
15327    relocateHeaderSocial();
15328});
15329
15330document.addEventListener('DOMContentLoaded', function () {
15331    let observer;
15332    let isProcessing = false;
15333
15334    function moveArticleInfo(scope = document) {
15335        if (isProcessing) return;
15336        isProcessing = true;
15337
15338        const wrappers = scope.querySelectorAll('.article-content__wrapper');
15339
15340        wrappers.forEach(wrapper => {
15341            const rows = wrapper.querySelectorAll('.vc_row.wpb_row.vc_row-fluid');
15342            const info = wrapper.querySelector(':scope > .article-info__wrapper');
15343
15344            if (!rows.length || !info) return;
15345
15346            const lastRow = rows[rows.length - 1];
15347            const hasNewsBlock = lastRow.querySelector('.article-news__block');
15348
15349            // Новое условие:
15350            // если vc_row один и article-news__block один —
15351            // ставим info перед article-news__block + добавляем класс
15352            if (rows.length === 1) {
15353                const newsBlocks = wrapper.querySelectorAll('.article-news__block');
15354
15355                if (newsBlocks.length === 1) {
15356                    const newsBlock = newsBlocks[0];
15357
15358                    if (info.nextElementSibling !== newsBlock) {
15359                        newsBlock.parentNode.insertBefore(info, newsBlock);
15360                    }
15361
15362                    info.classList.add('info-inside');
15363                    return;
15364                }
15365            }
15366
15367            // Для остальных случаев убираем спец-класс
15368            info.classList.remove('info-inside');
15369
15370            if (hasNewsBlock) {
15371                // Внутри последней строки — после текста, перед новостями
15372                if (info.nextElementSibling !== hasNewsBlock) {
15373                    hasNewsBlock.parentNode.insertBefore(info, hasNewsBlock);
15374                }
15375
15376                info.classList.add('info-inside');
15377            } else {
15378                // Если новостного блока нет — после последней строки
15379                if (lastRow.nextElementSibling !== info) {
15380                    lastRow.insertAdjacentElement('afterend', info);
15381                }
15382            }
15383        });
15384
15385        isProcessing = false;
15386    }
15387
15388    function observe() {
15389        observer = new MutationObserver(function (mutations) {
15390            if (isProcessing) return;
15391
15392            let needUpdate = false;
15393
15394            mutations.forEach(mutation => {
15395                mutation.addedNodes.forEach(node => {
15396                    if (!(node instanceof HTMLElement)) return;
15397
15398                    if (
15399                        node.matches('.article-content__wrapper, .vc_row.wpb_row.vc_row-fluid, .article-news__block, .article-info__wrapper') ||
15400                        (node.querySelector &&
15401                            node.querySelector('.article-content__wrapper, .vc_row.wpb_row.vc_row-fluid, .article-news__block, .article-info__wrapper'))
15402                    ) {
15403                        needUpdate = true;
15404                    }
15405                });
15406            });
15407
15408            if (needUpdate) {
15409                observer.disconnect();
15410                moveArticleInfo();
15411                observe();
15412            }
15413        });
15414
15415        observer.observe(document.body, {
15416            childList: true,
15417            subtree: true
15418        });
15419    }
15420
15421    moveArticleInfo();
15422    observe();
15423});
15424
15425function setHeaderOffset() {
15426    const banner = document.querySelector('.ad-banner.top');
15427
15428    const offset = banner
15429        ? banner.getBoundingClientRect().height
15430        : 0;
15431
15432    document.documentElement.style.setProperty('--header-offset', `${offset}px`);
15433}
15434
15435setHeaderOffset();
15436window.addEventListener('resize', setHeaderOffset);
15437window.addEventListener('load', setHeaderOffset);
15438
15439jQuery(function ($) {
15440    if (!$.fn.owlCarousel) {
15441        return;
15442    }
15443
15444    function initVerticalCardSliders(context) {
15445        var contextElement = $(context);
15446        var sliders = contextElement
15447            .filter('.vertical-card-slider')
15448            .add(contextElement.find('.vertical-card-slider'));
15449
15450        sliders.each(function () {
15451            var slider = $(this);
15452            var sliderSection = slider.closest('.vertical-card-slider-section');
15453
15454            if (slider.hasClass('owl-loaded')) {
15455                return;
15456            }
15457
15458            slider.owlCarousel({
15459                loop: false,
15460                margin: 8,
15461                dots: true,
15462                dotsEach: 1,
15463                dotsContainer: sliderSection.find('.vertical-card-slider__pagination'),
15464                nav: false,
15465                smartSpeed: 500,
15466                responsive: {
15467                    0: {
15468                        items: 1
15469                    },
15470                    475: {
15471                        items: 2
15472                    },
15473                    640: {
15474                        items: 3
15475                    },
15476                    900: {
15477                        items: 4
15478                    },
15479                    1025: {
15480                        items: 3
15481                    },
15482                    1281: {
15483                        items: 4
15484                    }
15485                }
15486            });
15487
15488            sliderSection
15489                .find('.vertical-card-slider__next')
15490                .off('click.verticalCardSlider')
15491                .on('click.verticalCardSlider', function () {
15492                    slider.trigger('next.owl.carousel');
15493                });
15494
15495            sliderSection
15496                .find('.vertical-card-slider__prev')
15497                .off('click.verticalCardSlider')
15498                .on('click.verticalCardSlider', function () {
15499                    slider.trigger('prev.owl.carousel');
15500                });
15501        });
15502    }
15503
15504    initVerticalCardSliders(document);
15505
15506    $('.main__wrapper').on('append.infiniteScroll', function (event, body, path, items) {
15507        initVerticalCardSliders(items);
15508    });
15509});

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.