PageSourceSearch

https://www.holmeshotel.com/wp-content/themes/holmes-hotel/library/dist/js/main.js?debug=1791585342

js holmeshotel.com collected 2026-10-09 23:03:48 UTC 629,976 bytes, 7,133 lines download raw bytes

vendor: 11,893 bytes, lines 1-3
1/*! jQuery v3.2.1 | (c) JS Foundation and other contributors | jquery.org/license */
2!function (a, b) { "use strict"; "object" == typeof module && "object" == typeof module.exports ? module.exports = a.document ? b(a, !0) : function (a) { if (!a.document) throw new Error("jQuery requires a window with a document"); return b(a) } : b(a) }("undefined" != typeof window ? window : this, function (a, b) {
3    "use strict"; var c = [], d = a.document, e = Object.getPrototypeOf, f = c.slice, g = c.concat, h = c.push, i = c.indexOf, j = {}, k = j.toString, l = j.hasOwnProperty, m = l.toString, n = m.call(Object), o = {}; function p(a, b) { b = b || d; var c = b.createElement("script"); c.text = a, b.head.appendChild(c).parentNode.removeChild(c) } var q = "3.2.1", r = function (a, b) { return new r.fn.init(a, b) }, s = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, t = /^-ms-/, u = /-([a-z])/g, v = function (a, b) { return b.toUpperCase() }; r.fn = r.prototype = { jquery: q, constructor: r, length: 0, toArray: function () { return f.call(this) }, get: function (a) { return null == a ? f.call(this) : a < 0 ? this[a + this.length] : this[a] }, pushStack: function (a) { var b = r.merge(this.constructor(), a); return b.prevObject = this, b }, each: function (a) { return r.each(this, a) }, map: function (a) { return this.pushStack(r.map(this, function (b, c) { return a.call(b, c, b) })) }, slice: function () { return this.pushStack(f.apply(this, arguments)) }, first: function () { return this.eq(0) }, last: function () { return this.eq(-1) }, eq: function (a) { var b = this.length, c = +a + (a < 0 ? b : 0); return this.pushStack(c >= 0 && c < b ? [this[c]] : []) }, end: function () { return this.prevObject || this.constructor() }, push: h, sort: c.sort, splice: c.splice }, r.extend = r.fn.extend = function () { var a, b, c, d, e, f, g = arguments[0] || {}, h = 1, i = arguments.length, j = !1; for ("boolean" == typeof g && (j = g, g = arguments[h] || {}, h++), "object" == typeof g || r.isFunction(g) || (g = {}), h === i && (g = this, h--); h < i; h++)if (null != (a = arguments[h])) for (b in a) c = g[b], d = a[b], g !== d && (j && d && (r.isPlainObject(d) || (e = Array.isArray(d))) ? (e ? (e = !1, f = c && Array.isArray(c) ? c : []) : f = c && r.isPlainObject(c) ? c : {}, g[b] = r.extend(j, f, d)) : void 0 !== d && (g[b] = d)); return g }, r.extend({ expando: "jQuery" + (q + Math.random()).replace(/\D/g, ""), isReady: !0, error: function (a) { throw new Error(a) }, noop: function () { }, isFunction: function (a) { return "function" === r.type(a) }, isWindow: function (a) { return null != a && a === a.window }, isNumeric: function (a) { var b = r.type(a); return ("number" === b || "string" === b) && !isNaN(a - parseFloat(a)) }, isPlainObject: function (a) { var b, c; return !(!a || "[object Object]" !== k.call(a)) && (!(b = e(a)) || (c = l.call(b, "constructor") && b.constructor, "function" == typeof c && m.call(c) === n)) }, isEmptyObject: function (a) { var b; for (b in a) return !1; return !0 }, type: function (a) { return null == a ? a + "" : "object" == typeof a || "function" == typeof a ? j[k.call(a)] || "object" : typeof a }, globalEval: function (a) { p(a) }, camelCase: function (a) { return a.replace(t, "ms-").replace(u, v) }, each: function (a, b) { var c, d = 0; if (w(a)) { for (c = a.length; d < c; d++)if (b.call(a[d], d, a[d]) === !1) break } else for (d in a) if (b.call(a[d], d, a[d]) === !1) break; return a }, trim: function (a) { return null == a ? "" : (a + "").replace(s, "") }, makeArray: function (a, b) { var c = b || []; return null != a && (w(Object(a)) ? r.merge(c, "string" == typeof a ? [a] : a) : h.call(c, a)), c }, inArray: function (a, b, c) { return null == b ? -1 : i.call(b, a, c) }, merge: function (a, b) { for (var c = +b.length, d = 0, e = a.length; d < c; d++)a[e++] = b[d]; return a.length = e, a }, grep: function (a, b, c) { for (var d, e = [], f = 0, g = a.length, h = !c; f < g; f++)d = !b(a[f], f), d !== h && e.push(a[f]); return e }, map: function (a, b, c) { var d, e, f = 0, h = []; if (w(a)) for (d = a.length; f < d; f++)e = b(a[f], f, c), null != e && h.push(e); else for (f in a) e = b(a[f], f, c), null != e && h.push(e); return g.apply([], h) }, guid: 1, proxy: function (a, b) { var c, d, e; if ("string" == typeof b && (c = a[b], b = a, a = c), r.isFunction(a)) return d = f.call(arguments, 2), e = function () { return a.apply(b || this, d.concat(f.call(arguments))) }, e.guid = a.guid = a.guid || r.guid++, e }, now: Date.now, support: o }), "function" == typeof Symbol && (r.fn[Symbol.iterator] = c[Symbol.iterator]), r.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "), function (a, b) { j["[object " + b + "]"] = b.toLowerCase() }); function w(a) { var b = !!a && "length" in a && a.length, c = r.type(a); return "function" !== c && !r.isWindow(a) && ("array" === c || 0 === b || "number" == typeof b && b > 0 && b - 1 in a) } var x = function (a) { var b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u = "sizzle" + 1 * new Date, v = a.document, w = 0, x = 0, y = ha(), z = ha(), A = ha(), B = function (a, b) { return a === b && (l = !0), 0 }, C = {}.hasOwnProperty, D = [], E = D.pop, F = D.push, G = D.push, H = D.slice, I = function (a, b) { for (var c = 0, d = a.length; c < d; c++)if (a[c] === b) return c; return -1 }, J = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped", K = "[\\x20\\t\\r\\n\\f]", L = "(?:\\\\.|[\\w-]|[^\0-\\xa0])+", M = "\\[" + K + "*(" + L + ")(?:" + K + "*([*^$|!~]?=)" + K + "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + L + "))|)" + K + "*\\]", N = ":(" + L + ")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|" + M + ")*)|.*)\\)|)", O = new RegExp(K + "+", "g"), P = new RegExp("^" + K + "+|((?:^|[^\\\\])(?:\\\\.)*)" + K + "+$", "g"), Q = new RegExp("^" + K + "*," + K + "*"), R = new RegExp("^" + K + "*([>+~]|" + K + ")" + K + "*"), S = new RegExp("=" + K + "*([^\\]'\"]*?)" + K + "*\\]", "g"), T = new RegExp(N), U = new RegExp("^" + L + "$"), V = { ID: new RegExp("^#(" + L + ")"), CLASS: new RegExp("^\\.(" + L + ")"), TAG: new RegExp("^(" + L + "|[*])"), ATTR: new RegExp("^" + M), PSEUDO: new RegExp("^" + N), CHILD: new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + K + "*(even|odd|(([+-]|)(\\d*)n|)" + K + "*(?:([+-]|)" + K + "*(\\d+)|))" + K + "*\\)|)", "i"), bool: new RegExp("^(?:" + J + ")$", "i"), needsContext: new RegExp("^" + K + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + K + "*((?:-\\d)?\\d*)" + K + "*\\)|)(?=[^-]|$)", "i") }, W = /^(?:input|select|textarea|button)$/i, X = /^h\d$/i, Y = /^[^{]+\{\s*\[native \w/, Z = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, $ = /[+~]/, _ = new RegExp("\\\\([\\da-f]{1,6}" + K + "?|(" + K + ")|.)", "ig"), aa = function (a, b, c) { var d = "0x" + b - 65536; return d !== d || c ? b : d < 0 ? String.fromCharCode(d + 65536) : String.fromCharCode(d >> 10 | 55296, 1023 & d | 56320) }, ba = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g, ca = function (a, b) { return b ? "\0" === a ? "\ufffd" : a.slice(0, -1) + "\\" + a.charCodeAt(a.length - 1).toString(16) + " " : "\\" + a }, da = function () { m() }, ea = ta(function (a) { return a.disabled === !0 && ("form" in a || "label" in a) }, { dir: "parentNode", next: "legend" }); try { G.apply(D = H.call(v.childNodes), v.childNodes), D[v.childNodes.length].nodeType } catch (fa) { G = { apply: D.length ? function (a, b) { F.apply(a, H.call(b)) } : function (a, b) { var c = a.length, d = 0; while (a[c++] = b[d++]); a.length = c - 1 } } } function ga(a, b, d, e) { var f, h, j, k, l, o, r, s = b && b.ownerDocument, w = b ? b.nodeType : 9; if (d = d || [], "string" != typeof a || !a || 1 !== w && 9 !== w && 11 !== w) return d; if (!e && ((b ? b.ownerDocument || b : v) !== n && m(b), b = b || n, p)) { if (11 !== w && (l = Z.exec(a))) if (f = l[1]) { if (9 === w) { if (!(j = b.getElementById(f))) return d; if (j.id === f) return d.push(j), d } else if (s && (j = s.getElementById(f)) && t(b, j) && j.id === f) return d.push(j), d } else { if (l[2]) return G.apply(d, b.getElementsByTagName(a)), d; if ((f = l[3]) && c.getElementsByClassName && b.getElementsByClassName) return G.apply(d, b.getElementsByClassName(f)), d } if (c.qsa && !A[a + " "] && (!q || !q.test(a))) { if (1 !== w) s = b, r = a; else if ("object" !== b.nodeName.toLowerCase()) { (k = b.getAttribute("id")) ? k = k.replace(ba, ca) : b.setAttribute("id", k = u), o = g(a), h = o.length; while (h--) o[h] = "#" + k + " " + sa(o[h]); r = o.join(","), s = $.test(a) && qa(b.parentNode) || b } if (r) try { return G.apply(d, s.querySelectorAll(r)), d } catch (x) { } finally { k === u && b.removeAttribute("id") } } } return i(a.replace(P, "$1"), b, d, e) } function ha() { var a = []; function b(c, e) { return a.push(c + " ") > d.cacheLength && delete b[a.shift()], b[c + " "] = e } return b } function ia(a) { return a[u] = !0, a } function ja(a) { var b = n.createElement("fieldset"); try { return !!a(b) } catch (c) { return !1 } finally { b.parentNode && b.parentNode.removeChild(b), b = null } } function ka(a, b) { var c = a.split("|"), e = c.length; while (e--) d.attrHandle[c[e]] = b } function la(a, b) { var c = b && a, d = c && 1 === a.nodeType && 1 === b.nodeType && a.sourceIndex - b.sourceIndex; if (d) return d; if (c) while (c = c.nextSibling) if (c === b) return -1; return a ? 1 : -1 } function ma(a) { return function (b) { var c = b.nodeName.toLowerCase(); return "input" === c && b.type === a } } function na(a) { return function (b) { var c = b.nodeName.toLowerCase(); return ("input" === c || "button" === c) && b.type === a } } function oa(a) { return function (b) { return "form" in b ? b.parentNode && b.disabled === !1 ? "label" in b ? "label" in b.parentNode ? b.parentNode.disabled === a : b.disabled === a : b.isDisabled === a || b.isDisabled !== !a && ea(b) === a : b.disabled === a : "label" in b && b.disabled === a } } function pa(a) { return ia(function (b) { return b = +b, ia(function (c, d) { var e, f = a([], c.length, b), g = f.length; while (g--) c[e = f[g]] && (c[e] = !(d[e] = c[e])) }) }) } function qa(a) { return a && "undefined" != typeof a.getElementsByTagName && a } c = ga.support = {}, f = ga.isXML = function (a) { var b = a && (a.ownerDocument || a).documentElement; return !!b && "HTML" !== b.nodeName }, m = ga.setDocument = function (a) { var b, e, g = a ? a.ownerDocument || a : v; return g !== n && 9 === g.nodeType && g.documentElement ? (n = g, o = n.documentElement, p = !f(n), v !== n && (e = n.defaultView) && e.top !== e && (e.addEventListener ? e.addEventListener("unload", da, !1) : e.attachEvent && e.attachEvent("onunload", da)), c.attributes = ja(function (a) { return a.className = "i", !a.getAttribute("className") }), c.getElementsByTagName = ja(function (a) { return a.appendChild(n.createComment("")), !a.getElementsByTagName("*").length }), c.getElementsByClassName = Y.test(n.getElementsByClassName), c.getById = ja(function (a) { return o.appendChild(a).id = u, !n.getElementsByName || !n.getElementsByName(u).length }), c.getById ? (d.filter.ID = function (a) { var b = a.replace(_, aa); return function (a) { return a.getAttribute("id") === b } }, d.find.ID = function (a, b) { if ("undefined" != typeof b.getElementById && p) { var c = b.getElementById(a); return c ? [c] : [] } }) : (d.filter.ID = function (a) { var b = a.replace(_, aa); return function (a) { var c = "undefined" != typeof a.getAttributeNode && a.getAttributeNode("id"); return c && c.value === b } }, d.find.ID = function (a, b) { if ("undefined" != typeof b.getElementById && p) { var c, d, e, f = b.getElementById(a); if (f) { if (c = f.getAttributeNode("id"), c && c.value === a) return [f]; e = b.getElementsByName(a), d = 0;
vendor: 15,326 bytes, line 3
3 while (f = e[d++]) if (c = f.getAttributeNode("id"), c && c.value === a) return [f] } return [] } }), d.find.TAG = c.getElementsByTagName ? function (a, b) { return "undefined" != typeof b.getElementsByTagName ? b.getElementsByTagName(a) : c.qsa ? b.querySelectorAll(a) : void 0 } : function (a, b) { var c, d = [], e = 0, f = b.getElementsByTagName(a); if ("*" === a) { while (c = f[e++]) 1 === c.nodeType && d.push(c); return d } return f }, d.find.CLASS = c.getElementsByClassName && function (a, b) { if ("undefined" != typeof b.getElementsByClassName && p) return b.getElementsByClassName(a) }, r = [], q = [], (c.qsa = Y.test(n.querySelectorAll)) && (ja(function (a) { o.appendChild(a).innerHTML = "<a id='" + u + "'></a><select id='" + u + "-\r\\' msallowcapture=''><option selected=''></option></select>", a.querySelectorAll("[msallowcapture^='']").length && q.push("[*^$]=" + K + "*(?:''|\"\")"), a.querySelectorAll("[selected]").length || q.push("\\[" + K + "*(?:value|" + J + ")"), a.querySelectorAll("[id~=" + u + "-]").length || q.push("~="), a.querySelectorAll(":checked").length || q.push(":checked"), a.querySelectorAll("a#" + u + "+*").length || q.push(".#.+[+~]") }), ja(function (a) { a.innerHTML = "<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>"; var b = n.createElement("input"); b.setAttribute("type", "hidden"), a.appendChild(b).setAttribute("name", "D"), a.querySelectorAll("[name=d]").length && q.push("name" + K + "*[*^$|!~]?="), 2 !== a.querySelectorAll(":enabled").length && q.push(":enabled", ":disabled"), o.appendChild(a).disabled = !0, 2 !== a.querySelectorAll(":disabled").length && q.push(":enabled", ":disabled"), a.querySelectorAll("*,:x"), q.push(",.*:") })), (c.matchesSelector = Y.test(s = o.matches || o.webkitMatchesSelector || o.mozMatchesSelector || o.oMatchesSelector || o.msMatchesSelector)) && ja(function (a) { c.disconnectedMatch = s.call(a, "*"), s.call(a, "[s!='']:x"), r.push("!=", N) }), q = q.length && new RegExp(q.join("|")), r = r.length && new RegExp(r.join("|")), b = Y.test(o.compareDocumentPosition), t = b || Y.test(o.contains) ? function (a, b) { var c = 9 === a.nodeType ? a.documentElement : a, d = b && b.parentNode; return a === d || !(!d || 1 !== d.nodeType || !(c.contains ? c.contains(d) : a.compareDocumentPosition && 16 & a.compareDocumentPosition(d))) } : function (a, b) { if (b) while (b = b.parentNode) if (b === a) return !0; return !1 }, B = b ? function (a, b) { if (a === b) return l = !0, 0; var d = !a.compareDocumentPosition - !b.compareDocumentPosition; return d ? d : (d = (a.ownerDocument || a) === (b.ownerDocument || b) ? a.compareDocumentPosition(b) : 1, 1 & d || !c.sortDetached && b.compareDocumentPosition(a) === d ? a === n || a.ownerDocument === v && t(v, a) ? -1 : b === n || b.ownerDocument === v && t(v, b) ? 1 : k ? I(k, a) - I(k, b) : 0 : 4 & d ? -1 : 1) } : function (a, b) { if (a === b) return l = !0, 0; var c, d = 0, e = a.parentNode, f = b.parentNode, g = [a], h = [b]; if (!e || !f) return a === n ? -1 : b === n ? 1 : e ? -1 : f ? 1 : k ? I(k, a) - I(k, b) : 0; if (e === f) return la(a, b); c = a; while (c = c.parentNode) g.unshift(c); c = b; while (c = c.parentNode) h.unshift(c); while (g[d] === h[d]) d++; return d ? la(g[d], h[d]) : g[d] === v ? -1 : h[d] === v ? 1 : 0 }, n) : n }, ga.matches = function (a, b) { return ga(a, null, null, b) }, ga.matchesSelector = function (a, b) { if ((a.ownerDocument || a) !== n && m(a), b = b.replace(S, "='$1']"), c.matchesSelector && p && !A[b + " "] && (!r || !r.test(b)) && (!q || !q.test(b))) try { var d = s.call(a, b); if (d || c.disconnectedMatch || a.document && 11 !== a.document.nodeType) return d } catch (e) { } return ga(b, n, null, [a]).length > 0 }, ga.contains = function (a, b) { return (a.ownerDocument || a) !== n && m(a), t(a, b) }, ga.attr = function (a, b) { (a.ownerDocument || a) !== n && m(a); var e = d.attrHandle[b.toLowerCase()], f = e && C.call(d.attrHandle, b.toLowerCase()) ? e(a, b, !p) : void 0; return void 0 !== f ? f : c.attributes || !p ? a.getAttribute(b) : (f = a.getAttributeNode(b)) && f.specified ? f.value : null }, ga.escape = function (a) { return (a + "").replace(ba, ca) }, ga.error = function (a) { throw new Error("Syntax error, unrecognized expression: " + a) }, ga.uniqueSort = function (a) { var b, d = [], e = 0, f = 0; if (l = !c.detectDuplicates, k = !c.sortStable && a.slice(0), a.sort(B), l) { while (b = a[f++]) b === a[f] && (e = d.push(f)); while (e--) a.splice(d[e], 1) } return k = null, a }, e = ga.getText = function (a) { var b, c = "", d = 0, f = a.nodeType; if (f) { if (1 === f || 9 === f || 11 === f) { if ("string" == typeof a.textContent) return a.textContent; for (a = a.firstChild; a; a = a.nextSibling)c += e(a) } else if (3 === f || 4 === f) return a.nodeValue } else while (b = a[d++]) c += e(b); return c }, d = ga.selectors = { cacheLength: 50, createPseudo: ia, match: V, attrHandle: {}, find: {}, relative: { ">": { dir: "parentNode", first: !0 }, " ": { dir: "parentNode" }, "+": { dir: "previousSibling", first: !0 }, "~": { dir: "previousSibling" } }, preFilter: { ATTR: function (a) { return a[1] = a[1].replace(_, aa), a[3] = (a[3] || a[4] || a[5] || "").replace(_, aa), "~=" === a[2] && (a[3] = " " + a[3] + " "), a.slice(0, 4) }, CHILD: function (a) { return a[1] = a[1].toLowerCase(), "nth" === a[1].slice(0, 3) ? (a[3] || ga.error(a[0]), a[4] = +(a[4] ? a[5] + (a[6] || 1) : 2 * ("even" === a[3] || "odd" === a[3])), a[5] = +(a[7] + a[8] || "odd" === a[3])) : a[3] && ga.error(a[0]), a }, PSEUDO: function (a) { var b, c = !a[6] && a[2]; return V.CHILD.test(a[0]) ? null : (a[3] ? a[2] = a[4] || a[5] || "" : c && T.test(c) && (b = g(c, !0)) && (b = c.indexOf(")", c.length - b) - c.length) && (a[0] = a[0].slice(0, b), a[2] = c.slice(0, b)), a.slice(0, 3)) } }, filter: { TAG: function (a) { var b = a.replace(_, aa).toLowerCase(); return "*" === a ? function () { return !0 } : function (a) { return a.nodeName && a.nodeName.toLowerCase() === b } }, CLASS: function (a) { var b = y[a + " "]; return b || (b = new RegExp("(^|" + K + ")" + a + "(" + K + "|$)")) && y(a, function (a) { return b.test("string" == typeof a.className && a.className || "undefined" != typeof a.getAttribute && a.getAttribute("class") || "") }) }, ATTR: function (a, b, c) { return function (d) { var e = ga.attr(d, a); return null == e ? "!=" === b : !b || (e += "", "=" === b ? e === c : "!=" === b ? e !== c : "^=" === b ? c && 0 === e.indexOf(c) : "*=" === b ? c && e.indexOf(c) > -1 : "$=" === b ? c && e.slice(-c.length) === c : "~=" === b ? (" " + e.replace(O, " ") + " ").indexOf(c) > -1 : "|=" === b && (e === c || e.slice(0, c.length + 1) === c + "-")) } }, CHILD: function (a, b, c, d, e) { var f = "nth" !== a.slice(0, 3), g = "last" !== a.slice(-4), h = "of-type" === b; return 1 === d && 0 === e ? function (a) { return !!a.parentNode } : function (b, c, i) { var j, k, l, m, n, o, p = f !== g ? "nextSibling" : "previousSibling", q = b.parentNode, r = h && b.nodeName.toLowerCase(), s = !i && !h, t = !1; if (q) { if (f) { while (p) { m = b; while (m = m[p]) if (h ? m.nodeName.toLowerCase() === r : 1 === m.nodeType) return !1; o = p = "only" === a && !o && "nextSibling" } return !0 } if (o = [g ? q.firstChild : q.lastChild], g && s) { m = q, l = m[u] || (m[u] = {}), k = l[m.uniqueID] || (l[m.uniqueID] = {}), j = k[a] || [], n = j[0] === w && j[1], t = n && j[2], m = n && q.childNodes[n]; while (m = ++n && m && m[p] || (t = n = 0) || o.pop()) if (1 === m.nodeType && ++t && m === b) { k[a] = [w, n, t]; break } } else if (s && (m = b, l = m[u] || (m[u] = {}), k = l[m.uniqueID] || (l[m.uniqueID] = {}), j = k[a] || [], n = j[0] === w && j[1], t = n), t === !1) while (m = ++n && m && m[p] || (t = n = 0) || o.pop()) if ((h ? m.nodeName.toLowerCase() === r : 1 === m.nodeType) && ++t && (s && (l = m[u] || (m[u] = {}), k = l[m.uniqueID] || (l[m.uniqueID] = {}), k[a] = [w, t]), m === b)) break; return t -= e, t === d || t % d === 0 && t / d >= 0 } } }, PSEUDO: function (a, b) { var c, e = d.pseudos[a] || d.setFilters[a.toLowerCase()] || ga.error("unsupported pseudo: " + a); return e[u] ? e(b) : e.length > 1 ? (c = [a, a, "", b], d.setFilters.hasOwnProperty(a.toLowerCase()) ? ia(function (a, c) { var d, f = e(a, b), g = f.length; while (g--) d = I(a, f[g]), a[d] = !(c[d] = f[g]) }) : function (a) { return e(a, 0, c) }) : e } }, pseudos: { not: ia(function (a) { var b = [], c = [], d = h(a.replace(P, "$1")); return d[u] ? ia(function (a, b, c, e) { var f, g = d(a, null, e, []), h = a.length; while (h--) (f = g[h]) && (a[h] = !(b[h] = f)) }) : function (a, e, f) { return b[0] = a, d(b, null, f, c), b[0] = null, !c.pop() } }), has: ia(function (a) { return function (b) { return ga(a, b).length > 0 } }), contains: ia(function (a) { return a = a.replace(_, aa), function (b) { return (b.textContent || b.innerText || e(b)).indexOf(a) > -1 } }), lang: ia(function (a) { return U.test(a || "") || ga.error("unsupported lang: " + a), a = a.replace(_, aa).toLowerCase(), function (b) { var c; do if (c = p ? b.lang : b.getAttribute("xml:lang") || b.getAttribute("lang")) return c = c.toLowerCase(), c === a || 0 === c.indexOf(a + "-"); while ((b = b.parentNode) && 1 === b.nodeType); return !1 } }), target: function (b) { var c = a.location && a.location.hash; return c && c.slice(1) === b.id }, root: function (a) { return a === o }, focus: function (a) { return a === n.activeElement && (!n.hasFocus || n.hasFocus()) && !!(a.type || a.href || ~a.tabIndex) }, enabled: oa(!1), disabled: oa(!0), checked: function (a) { var b = a.nodeName.toLowerCase(); return "input" === b && !!a.checked || "option" === b && !!a.selected }, selected: function (a) { return a.parentNode && a.parentNode.selectedIndex, a.selected === !0 }, empty: function (a) { for (a = a.firstChild; a; a = a.nextSibling)if (a.nodeType < 6) return !1; return !0 }, parent: function (a) { return !d.pseudos.empty(a) }, header: function (a) { return X.test(a.nodeName) }, input: function (a) { return W.test(a.nodeName) }, button: function (a) { var b = a.nodeName.toLowerCase(); return "input" === b && "button" === a.type || "button" === b }, text: function (a) { var b; return "input" === a.nodeName.toLowerCase() && "text" === a.type && (null == (b = a.getAttribute("type")) || "text" === b.toLowerCase()) }, first: pa(function () { return [0] }), last: pa(function (a, b) { return [b - 1] }), eq: pa(function (a, b, c) { return [c < 0 ? c + b : c] }), even: pa(function (a, b) { for (var c = 0; c < b; c += 2)a.push(c); return a }), odd: pa(function (a, b) { for (var c = 1; c < b; c += 2)a.push(c); return a }), lt: pa(function (a, b, c) { for (var d = c < 0 ? c + b : c; --d >= 0;)a.push(d); return a }), gt: pa(function (a, b, c) { for (var d = c < 0 ? c + b : c; ++d < b;)a.push(d); return a }) } }, d.pseudos.nth = d.pseudos.eq; for (b in { radio: !0, checkbox: !0, file: !0, password: !0, image: !0 }) d.pseudos[b] = ma(b); for (b in { submit: !0, reset: !0 }) d.pseudos[b] = na(b); function ra() { } ra.prototype = d.filters = d.pseudos, d.setFilters = new ra, g = ga.tokenize = function (a, b) { var c, e, f, g, h, i, j, k = z[a + " "]; if (k) return b ? 0 : k.slice(0); h = a, i = [], j = d.preFilter; while (h) { c && !(e = Q.exec(h)) || (e && (h = h.slice(e[0].length) || h), i.push(f = [])), c = !1, (e = R.exec(h)) && (c = e.shift(), f.push({ value: c, type: e[0].replace(P, " ") }), h = h.slice(c.length)); for (g in d.filter) !(e = V[g].exec(h)) || j[g] && !(e = j[g](e)) || (c = e.shift(), f.push({ value: c, type: g, matches: e }), h = h.slice(c.length)); if (!c) break } return b ? h.length : h ? ga.error(a) : z(a, i).slice(0) }; function sa(a) { for (var b = 0, c = a.length, d = ""; b < c; b++)d += a[b].value; return d } function ta(a, b, c) { var d = b.dir, e = b.next, f = e || d, g = c && "parentNode" === f, h = x++; return b.first ? function (b, c, e) { while (b = b[d]) if (1 === b.nodeType || g) return a(b, c, e); return !1 } : function (b, c, i) { var j, k, l, m = [w, h]; if (i) { while (b = b[d]) if ((1 === b.nodeType || g) && a(b, c, i)) return !0 } else while (b = b[d]) if (1 === b.nodeType || g) if (l = b[u] || (b[u] = {}), k = l[b.uniqueID] || (l[b.uniqueID] = {}), e && e === b.nodeName.toLowerCase()) b = b[d] || b; else { if ((j = k[f]) && j[0] === w && j[1] === h) return m[2] = j[2]; if (k[f] = m, m[2] = a(b, c, i)) return !0 } return !1 } } function ua(a) { return a.length > 1 ? function (b, c, d) { var e = a.length; while (e--) if (!a[e](b, c, d)) return !1; return !0 } : a[0] } function va(a, b, c) { for (var d = 0, e = b.length; d < e; d++)ga(a, b[d], c); return c } function wa(a, b, c, d, e) { for (var f, g = [], h = 0, i = a.length, j = null != b; h < i; h++)(f = a[h]) && (c && !c(f, d, e) || (g.push(f), j && b.push(h))); return g } function xa(a, b, c, d, e, f) { return d && !d[u] && (d = xa(d)), e && !e[u] && (e = xa(e, f)), ia(function (f, g, h, i) { var j, k, l, m = [], n = [], o = g.length, p = f || va(b || "*", h.nodeType ? [h] : h, []), q = !a || !f && b ? p : wa(p, m, a, h, i), r = c ? e || (f ? a : o || d) ? [] : g : q; if (c && c(q, r, h, i), d) { j = wa(r, n), d(j, [], h, i), k = j.length; while (k--) (l = j[k]) && (r[n[k]] = !(q[n[k]] = l)) } if (f) { if (e || a) { if (e) { j = [], k = r.length; while (k--) (l = r[k]) && j.push(q[k] = l); e(null, r = [], j, i) } k = r.length; while (k--) (l = r[k]) && (j = e ? I(f, l) : m[k]) > -1 && (f[j] = !(g[j] = l)) } } else r = wa(r === g ? r.splice(o, r.length) : r), e ? e(null, g, r, i) : G.apply(g, r) }) } function ya(a) { for (var b, c, e, f = a.length, g = d.relative[a[0].type], h = g || d.relative[" "], i = g ? 1 : 0, k = ta(function (a) { return a === b }, h, !0), l = ta(function (a) { return I(b, a) > -1 }, h, !0), m = [function (a, c, d) { var e = !g && (d || c !== j) || ((b = c).nodeType ? k(a, c, d) : l(a, c, d)); return b = null, e }]; i < f; i++)if (c = d.relative[a[i].type]) m = [ta(ua(m), c)]; else { if (c = d.filter[a[i].type].apply(null, a[i].matches), c[u]) { for (e = ++i; e < f; e++)if (d.relative[a[e].type]) break; return xa(i > 1 && ua(m), i > 1 && sa(a.slice(0, i - 1).concat({ value: " " === a[i - 2].type ? "*" : "" })).replace(P, "$1"), c, i < e && ya(a.slice(i, e)), e < f && ya(a = a.slice(e)), e < f && sa(a)) } m.push(c) } return ua(m) } function za(a, b) { var c = b.length > 0, e = a.length > 0, f = function (f, g, h, i, k) { var l, o, q, r = 0, s = "0", t = f && [], u = [], v = j, x = f || e && d.find.TAG("*", k), y = w += null == v ? 1 : Math.random() || .1, z = x.length; for (k && (j = g === n || g || k); s !== z && null != (l = x[s]); s++) { if (e && l) { o = 0, g || l.ownerDocument === n || (m(l), h = !p); while (q = a[o++]) if (q(l, g || n, h)) { i.push(l); break } k && (w = y) } c && ((l = !q && l) && r--, f && t.push(l)) } if (r += s, c && s !== r) { o = 0; while (q = b[o++]) q(t, u, g, h); if (f) { if (r > 0) while (s--) t[s] || u[s] || (u[s] = E.call(i)); u = wa(u) } G.apply(i, u), k && !f && u.length > 0 && r + b.length > 1 && ga.uniqueSort(i) } return k && (w = y, j = v), t }; return c ? ia(f) : f } return h = ga.compile = function (a, b) { var c, d = [], e = [], f = A[a + " "]; if (!f) { b || (b = g(a)), c = b.length; while (c--) f = ya(b[c]), f[u] ? d.push(f) : e.push(f);
vendor: 9,494 bytes, line 3
3 f = A(a, za(e, d)), f.selector = a } return f }, i = ga.select = function (a, b, c, e) { var f, i, j, k, l, m = "function" == typeof a && a, n = !e && g(a = m.selector || a); if (c = c || [], 1 === n.length) { if (i = n[0] = n[0].slice(0), i.length > 2 && "ID" === (j = i[0]).type && 9 === b.nodeType && p && d.relative[i[1].type]) { if (b = (d.find.ID(j.matches[0].replace(_, aa), b) || [])[0], !b) return c; m && (b = b.parentNode), a = a.slice(i.shift().value.length) } f = V.needsContext.test(a) ? 0 : i.length; while (f--) { if (j = i[f], d.relative[k = j.type]) break; if ((l = d.find[k]) && (e = l(j.matches[0].replace(_, aa), $.test(i[0].type) && qa(b.parentNode) || b))) { if (i.splice(f, 1), a = e.length && sa(i), !a) return G.apply(c, e), c; break } } } return (m || h(a, n))(e, b, !p, c, !b || $.test(a) && qa(b.parentNode) || b), c }, c.sortStable = u.split("").sort(B).join("") === u, c.detectDuplicates = !!l, m(), c.sortDetached = ja(function (a) { return 1 & a.compareDocumentPosition(n.createElement("fieldset")) }), ja(function (a) { return a.innerHTML = "<a href='#'></a>", "#" === a.firstChild.getAttribute("href") }) || ka("type|href|height|width", function (a, b, c) { if (!c) return a.getAttribute(b, "type" === b.toLowerCase() ? 1 : 2) }), c.attributes && ja(function (a) { return a.innerHTML = "<input/>", a.firstChild.setAttribute("value", ""), "" === a.firstChild.getAttribute("value") }) || ka("value", function (a, b, c) { if (!c && "input" === a.nodeName.toLowerCase()) return a.defaultValue }), ja(function (a) { return null == a.getAttribute("disabled") }) || ka(J, function (a, b, c) { var d; if (!c) return a[b] === !0 ? b.toLowerCase() : (d = a.getAttributeNode(b)) && d.specified ? d.value : null }), ga }(a); r.find = x, r.expr = x.selectors, r.expr[":"] = r.expr.pseudos, r.uniqueSort = r.unique = x.uniqueSort, r.text = x.getText, r.isXMLDoc = x.isXML, r.contains = x.contains, r.escapeSelector = x.escape; var y = function (a, b, c) { var d = [], e = void 0 !== c; while ((a = a[b]) && 9 !== a.nodeType) if (1 === a.nodeType) { if (e && r(a).is(c)) break; d.push(a) } return d }, z = function (a, b) { for (var c = []; a; a = a.nextSibling)1 === a.nodeType && a !== b && c.push(a); return c }, A = r.expr.match.needsContext; function B(a, b) { return a.nodeName && a.nodeName.toLowerCase() === b.toLowerCase() } var C = /^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i, D = /^.[^:#\[\.,]*$/; function E(a, b, c) { return r.isFunction(b) ? r.grep(a, function (a, d) { return !!b.call(a, d, a) !== c }) : b.nodeType ? r.grep(a, function (a) { return a === b !== c }) : "string" != typeof b ? r.grep(a, function (a) { return i.call(b, a) > -1 !== c }) : D.test(b) ? r.filter(b, a, c) : (b = r.filter(b, a), r.grep(a, function (a) { return i.call(b, a) > -1 !== c && 1 === a.nodeType })) } r.filter = function (a, b, c) { var d = b[0]; return c && (a = ":not(" + a + ")"), 1 === b.length && 1 === d.nodeType ? r.find.matchesSelector(d, a) ? [d] : [] : r.find.matches(a, r.grep(b, function (a) { return 1 === a.nodeType })) }, r.fn.extend({ find: function (a) { var b, c, d = this.length, e = this; if ("string" != typeof a) return this.pushStack(r(a).filter(function () { for (b = 0; b < d; b++)if (r.contains(e[b], this)) return !0 })); for (c = this.pushStack([]), b = 0; b < d; b++)r.find(a, e[b], c); return d > 1 ? r.uniqueSort(c) : c }, filter: function (a) { return this.pushStack(E(this, a || [], !1)) }, not: function (a) { return this.pushStack(E(this, a || [], !0)) }, is: function (a) { return !!E(this, "string" == typeof a && A.test(a) ? r(a) : a || [], !1).length } }); var F, G = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/, H = r.fn.init = function (a, b, c) { var e, f; if (!a) return this; if (c = c || F, "string" == typeof a) { if (e = "<" === a[0] && ">" === a[a.length - 1] && a.length >= 3 ? [null, a, null] : G.exec(a), !e || !e[1] && b) return !b || b.jquery ? (b || c).find(a) : this.constructor(b).find(a); if (e[1]) { if (b = b instanceof r ? b[0] : b, r.merge(this, r.parseHTML(e[1], b && b.nodeType ? b.ownerDocument || b : d, !0)), C.test(e[1]) && r.isPlainObject(b)) for (e in b) r.isFunction(this[e]) ? this[e](b[e]) : this.attr(e, b[e]); return this } return f = d.getElementById(e[2]), f && (this[0] = f, this.length = 1), this } return a.nodeType ? (this[0] = a, this.length = 1, this) : r.isFunction(a) ? void 0 !== c.ready ? c.ready(a) : a(r) : r.makeArray(a, this) }; H.prototype = r.fn, F = r(d); var I = /^(?:parents|prev(?:Until|All))/, J = { children: !0, contents: !0, next: !0, prev: !0 }; r.fn.extend({ has: function (a) { var b = r(a, this), c = b.length; return this.filter(function () { for (var a = 0; a < c; a++)if (r.contains(this, b[a])) return !0 }) }, closest: function (a, b) { var c, d = 0, e = this.length, f = [], g = "string" != typeof a && r(a); if (!A.test(a)) for (; d < e; d++)for (c = this[d]; c && c !== b; c = c.parentNode)if (c.nodeType < 11 && (g ? g.index(c) > -1 : 1 === c.nodeType && r.find.matchesSelector(c, a))) { f.push(c); break } return this.pushStack(f.length > 1 ? r.uniqueSort(f) : f) }, index: function (a) { return a ? "string" == typeof a ? i.call(r(a), this[0]) : i.call(this, a.jquery ? a[0] : a) : this[0] && this[0].parentNode ? this.first().prevAll().length : -1 }, add: function (a, b) { return this.pushStack(r.uniqueSort(r.merge(this.get(), r(a, b)))) }, addBack: function (a) { return this.add(null == a ? this.prevObject : this.prevObject.filter(a)) } }); function K(a, b) { while ((a = a[b]) && 1 !== a.nodeType); return a } r.each({ parent: function (a) { var b = a.parentNode; return b && 11 !== b.nodeType ? b : null }, parents: function (a) { return y(a, "parentNode") }, parentsUntil: function (a, b, c) { return y(a, "parentNode", c) }, next: function (a) { return K(a, "nextSibling") }, prev: function (a) { return K(a, "previousSibling") }, nextAll: function (a) { return y(a, "nextSibling") }, prevAll: function (a) { return y(a, "previousSibling") }, nextUntil: function (a, b, c) { return y(a, "nextSibling", c) }, prevUntil: function (a, b, c) { return y(a, "previousSibling", c) }, siblings: function (a) { return z((a.parentNode || {}).firstChild, a) }, children: function (a) { return z(a.firstChild) }, contents: function (a) { return B(a, "iframe") ? a.contentDocument : (B(a, "template") && (a = a.content || a), r.merge([], a.childNodes)) } }, function (a, b) { r.fn[a] = function (c, d) { var e = r.map(this, b, c); return "Until" !== a.slice(-5) && (d = c), d && "string" == typeof d && (e = r.filter(d, e)), this.length > 1 && (J[a] || r.uniqueSort(e), I.test(a) && e.reverse()), this.pushStack(e) } }); var L = /[^\x20\t\r\n\f]+/g; function M(a) { var b = {}; return r.each(a.match(L) || [], function (a, c) { b[c] = !0 }), b } r.Callbacks = function (a) { a = "string" == typeof a ? M(a) : r.extend({}, a); var b, c, d, e, f = [], g = [], h = -1, i = function () { for (e = e || a.once, d = b = !0; g.length; h = -1) { c = g.shift(); while (++h < f.length) f[h].apply(c[0], c[1]) === !1 && a.stopOnFalse && (h = f.length, c = !1) } a.memory || (c = !1), b = !1, e && (f = c ? [] : "") }, j = { add: function () { return f && (c && !b && (h = f.length - 1, g.push(c)), function d(b) { r.each(b, function (b, c) { r.isFunction(c) ? a.unique && j.has(c) || f.push(c) : c && c.length && "string" !== r.type(c) && d(c) }) }(arguments), c && !b && i()), this }, remove: function () { return r.each(arguments, function (a, b) { var c; while ((c = r.inArray(b, f, c)) > -1) f.splice(c, 1), c <= h && h-- }), this }, has: function (a) { return a ? r.inArray(a, f) > -1 : f.length > 0 }, empty: function () { return f && (f = []), this }, disable: function () { return e = g = [], f = c = "", this }, disabled: function () { return !f }, lock: function () { return e = g = [], c || b || (f = c = ""), this }, locked: function () { return !!e }, fireWith: function (a, c) { return e || (c = c || [], c = [a, c.slice ? c.slice() : c], g.push(c), b || i()), this }, fire: function () { return j.fireWith(this, arguments), this }, fired: function () { return !!d } }; return j }; function N(a) { return a } function O(a) { throw a } function P(a, b, c, d) { var e; try { a && r.isFunction(e = a.promise) ? e.call(a).done(b).fail(c) : a && r.isFunction(e = a.then) ? e.call(a, b, c) : b.apply(void 0, [a].slice(d)) } catch (a) { c.apply(void 0, [a]) } } r.extend({ Deferred: function (b) { var c = [["notify", "progress", r.Callbacks("memory"), r.Callbacks("memory"), 2], ["resolve", "done", r.Callbacks("once memory"), r.Callbacks("once memory"), 0, "resolved"], ["reject", "fail", r.Callbacks("once memory"), r.Callbacks("once memory"), 1, "rejected"]], d = "pending", e = { state: function () { return d }, always: function () { return f.done(arguments).fail(arguments), this }, "catch": function (a) { return e.then(null, a) }, pipe: function () { var a = arguments; return r.Deferred(function (b) { r.each(c, function (c, d) { var e = r.isFunction(a[d[4]]) && a[d[4]]; f[d[1]](function () { var a = e && e.apply(this, arguments); a && r.isFunction(a.promise) ? a.promise().progress(b.notify).done(b.resolve).fail(b.reject) : b[d[0] + "With"](this, e ? [a] : arguments) }) }), a = null }).promise() }, then: function (b, d, e) { var f = 0; function g(b, c, d, e) { return function () { var h = this, i = arguments, j = function () { var a, j; if (!(b < f)) { if (a = d.apply(h, i), a === c.promise()) throw new TypeError("Thenable self
vendor: 7,007 bytes, lines 3-6
3-resolution"); j = a && ("object" == typeof a || "function" == typeof a) && a.then, r.isFunction(j) ? e ? j.call(a, g(f, c, N, e), g(f, c, O, e)) : (f++, j.call(a, g(f, c, N, e), g(f, c, O, e), g(f, c, N, c.notifyWith))) : (d !== N && (h = void 0, i = [a]), (e || c.resolveWith)(h, i)) } }, k = e ? j : function () { try { j() } catch (a) { r.Deferred.exceptionHook && r.Deferred.exceptionHook(a, k.stackTrace), b + 1 >= f && (d !== O && (h = void 0, i = [a]), c.rejectWith(h, i)) } }; b ? k() : (r.Deferred.getStackHook && (k.stackTrace = r.Deferred.getStackHook()), a.setTimeout(k)) } } return r.Deferred(function (a) { c[0][3].add(g(0, a, r.isFunction(e) ? e : N, a.notifyWith)), c[1][3].add(g(0, a, r.isFunction(b) ? b : N)), c[2][3].add(g(0, a, r.isFunction(d) ? d : O)) }).promise() }, promise: function (a) { return null != a ? r.extend(a, e) : e } }, f = {}; return r.each(c, function (a, b) { var g = b[2], h = b[5]; e[b[1]] = g.add, h && g.add(function () { d = h }, c[3 - a][2].disable, c[0][2].lock), g.add(b[3].fire), f[b[0]] = function () { return f[b[0] + "With"](this === f ? void 0 : this, arguments), this }, f[b[0] + "With"] = g.fireWith }), e.promise(f), b && b.call(f, f), f }, when: function (a) { var b = arguments.length, c = b, d = Array(c), e = f.call(arguments), g = r.Deferred(), h = function (a) { return function (c) { d[a] = this, e[a] = arguments.length > 1 ? f.call(arguments) : c, --b || g.resolveWith(d, e) } }; if (b <= 1 && (P(a, g.done(h(c)).resolve, g.reject, !b), "pending" === g.state() || r.isFunction(e[c] && e[c].then))) return g.then(); while (c--) P(e[c], h(c), g.reject); return g.promise() } }); var Q = /^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/; r.Deferred.exceptionHook = function (b, c) { a.console && a.console.warn && b && Q.test(b.name) && a.console.warn("jQuery.Deferred exception: " + b.message, b.stack, c) }, r.readyException = function (b) { a.setTimeout(function () { throw b }) }; var R = r.Deferred(); r.fn.ready = function (a) { return R.then(a)["catch"](function (a) { r.readyException(a) }), this }, r.extend({ isReady: !1, readyWait: 1, ready: function (a) { (a === !0 ? --r.readyWait : r.isReady) || (r.isReady = !0, a !== !0 && --r.readyWait > 0 || R.resolveWith(d, [r])) } }), r.ready.then = R.then; function S() {
4        d.removeEventListener("DOMContentLoaded", S),
5        a.removeEventListener("load", S), r.ready()
6    } "complete" === d.readyState || "loading" !== d.readyState && !d.documentElement.doScroll ? a.setTimeout(r.ready) : (d.addEventListener("DOMContentLoaded", S), a.addEventListener("load", S)); var T = function (a, b, c, d, e, f, g) { var h = 0, i = a.length, j = null == c; if ("object" === r.type(c)) { e = !0; for (h in c) T(a, b, h, c[h], !0, f, g) } else if (void 0 !== d && (e = !0, r.isFunction(d) || (g = !0), j && (g ? (b.call(a, d), b = null) : (j = b, b = function (a, b, c) { return j.call(r(a), c) })), b)) for (; h < i; h++)b(a[h], c, g ? d : d.call(a[h], h, b(a[h], c))); return e ? a : j ? b.call(a) : i ? b(a[0], c) : f }, U = function (a) { return 1 === a.nodeType || 9 === a.nodeType || !+a.nodeType }; function V() { this.expando = r.expando + V.uid++ } V.uid = 1, V.prototype = { cache: function (a) { var b = a[this.expando]; return b || (b = {}, U(a) && (a.nodeType ? a[this.expando] = b : Object.defineProperty(a, this.expando, { value: b, configurable: !0 }))), b }, set: function (a, b, c) { var d, e = this.cache(a); if ("string" == typeof b) e[r.camelCase(b)] = c; else for (d in b) e[r.camelCase(d)] = b[d]; return e }, get: function (a, b) { return void 0 === b ? this.cache(a) : a[this.expando] && a[this.expando][r.camelCase(b)] }, access: function (a, b, c) { return void 0 === b || b && "string" == typeof b && void 0 === c ? this.get(a, b) : (this.set(a, b, c), void 0 !== c ? c : b) }, remove: function (a, b) { var c, d = a[this.expando]; if (void 0 !== d) { if (void 0 !== b) { Array.isArray(b) ? b = b.map(r.camelCase) : (b = r.camelCase(b), b = b in d ? [b] : b.match(L) || []), c = b.length; while (c--) delete d[b[c]] } (void 0 === b || r.isEmptyObject(d)) && (a.nodeType ? a[this.expando] = void 0 : delete a[this.expando]) } }, hasData: function (a) { var b = a[this.expando]; return void 0 !== b && !r.isEmptyObject(b) } }; var W = new V, X = new V, Y = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/, Z = /[A-Z]/g; function $(a) { return "true" === a || "false" !== a && ("null" === a ? null : a === +a + "" ? +a : Y.test(a) ? JSON.parse(a) : a) } function _(a, b, c) { var d; if (void 0 === c && 1 === a.nodeType) if (d = "data-" + b.replace(Z, "-$&").toLowerCase(), c = a.getAttribute(d), "string" == typeof c) { try { c = $(c) } catch (e) { } X.set(a, b, c) } else c = void 0; return c } r.extend({ hasData: function (a) { return X.hasData(a) || W.hasData(a) }, data: function (a, b, c) { return X.access(a, b, c) }, removeData: function (a, b) { X.remove(a, b) }, _data: function (a, b, c) { return W.access(a, b, c) }, _removeData: function (a, b) { W.remove(a, b) } }), r.fn.extend({ data: function (a, b) { var c, d, e, f = this[0], g = f && f.attributes; if (void 0 === a) { if (this.length && (e = X.get(f), 1 === f.nodeType && !W.get(f, "hasDataAttrs"))) { c = g.length; while (c--) g[c] && (d = g[c].name, 0 === d.indexOf("data-") && (d = r.camelCase(d.slice(5)), _(f, d, e[d]))); W.set(f, "hasDataAttrs", !0) } return e } return "object" == typeof a ? this.each(function () { X.set(this, a) }) : T(this, function (b) { var c; if (f && void 0 === b) { if (c = X.get(f, a), void 0 !== c) return c; if (c = _(f, a), void 0 !== c) return c } else this.each(function () { X.set(this, a, b) }) }, null, b, arguments.length > 1, null, !0) }, removeData: function (a) { return this.each(function () { X.remove(this, a) }) } }), r.extend({ queue: function (a, b, c) { var d; if (a) return b = (b || "fx") + "queue", d = W.get(a, b), c && (!d || Array.isArray(c) ? d = W.access(a, b, r.makeArray(c)) : d.push(c)), d || [] }, dequeue: function (a, b) { b = b || "fx"; var c = r.queue(a, b), d = c.length, e = c.shift(), f = r._queueHooks(a, b), g = function () { r.dequeue(a, b) }; "inprogress" === e && (e = c.shift(), d--), e && ("fx" === b && c.unshift("inprogress"), delete f.stop, e.call(a, g, f)), !d && f && f.empty.fire() }, _queueHooks: function (a, b) { var c = b + "queueHooks"; return W.get(a, c) || W.access(a, c, { empty: r.Callbacks("once memory").add(function () { W.remove(a, [b + "queue", c]) }) }) } }), r.fn.extend({ queue: function (a, b) { var c = 2; return "string" != typeof a && (b = a, a = "fx", c--), arguments.length < c ? r.queue(this[0], a) : void 0 === b ? this : this.each(function () { var c = r.queue(this, a, b); r._queueHooks(this, a), "fx" === a && "inprogress" !== c[0] && r.dequeue(this, a) }) }, dequeue: function (a) { return this.each(function () { r.dequeue(this, a) }) }, clearQueue: function (a) { return this.queue(a || "fx", []) }, promise: function (a, b) { var c, d = 1, e = r.Deferred(), f = this, g = this.length, h 
vendor: 6,064 bytes, line 6
6= function () { --d || e.resolveWith(f, [f]) }; "string" != typeof a && (b = a, a = void 0), a = a || "fx"; while (g--) c = W.get(f[g], a + "queueHooks"), c && c.empty && (d++, c.empty.add(h)); return h(), e.promise(b) } }); var aa = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source, ba = new RegExp("^(?:([+-])=|)(" + aa + ")([a-z%]*)$", "i"), ca = ["Top", "Right", "Bottom", "Left"], da = function (a, b) { return a = b || a, "none" === a.style.display || "" === a.style.display && r.contains(a.ownerDocument, a) && "none" === r.css(a, "display") }, ea = function (a, b, c, d) { var e, f, g = {}; for (f in b) g[f] = a.style[f], a.style[f] = b[f]; e = c.apply(a, d || []); for (f in b) a.style[f] = g[f]; return e }; function fa(a, b, c, d) { var e, f = 1, g = 20, h = d ? function () { return d.cur() } : function () { return r.css(a, b, "") }, i = h(), j = c && c[3] || (r.cssNumber[b] ? "" : "px"), k = (r.cssNumber[b] || "px" !== j && +i) && ba.exec(r.css(a, b)); if (k && k[3] !== j) { j = j || k[3], c = c || [], k = +i || 1; do f = f || ".5", k /= f, r.style(a, b, k + j); while (f !== (f = h() / i) && 1 !== f && --g) } return c && (k = +k || +i || 0, e = c[1] ? k + (c[1] + 1) * c[2] : +c[2], d && (d.unit = j, d.start = k, d.end = e)), e } var ga = {}; function ha(a) { var b, c = a.ownerDocument, d = a.nodeName, e = ga[d]; return e ? e : (b = c.body.appendChild(c.createElement(d)), e = r.css(b, "display"), b.parentNode.removeChild(b), "none" === e && (e = "block"), ga[d] = e, e) } function ia(a, b) { for (var c, d, e = [], f = 0, g = a.length; f < g; f++)d = a[f], d.style && (c = d.style.display, b ? ("none" === c && (e[f] = W.get(d, "display") || null, e[f] || (d.style.display = "")), "" === d.style.display && da(d) && (e[f] = ha(d))) : "none" !== c && (e[f] = "none", W.set(d, "display", c))); for (f = 0; f < g; f++)null != e[f] && (a[f].style.display = e[f]); return a } r.fn.extend({ show: function () { return ia(this, !0) }, hide: function () { return ia(this) }, toggle: function (a) { return "boolean" == typeof a ? a ? this.show() : this.hide() : this.each(function () { da(this) ? r(this).show() : r(this).hide() }) } }); var ja = /^(?:checkbox|radio)$/i, ka = /<([a-z][^\/\0>\x20\t\r\n\f]+)/i, la = /^$|\/(?:java|ecma)script/i, ma = { option: [1, "<select multiple='multiple'>", "</select>"], thead: [1, "<table>", "</table>"], col: [2, "<table><colgroup>", "</colgroup></table>"], tr: [2, "<table><tbody>", "</tbody></table>"], td: [3, "<table><tbody><tr>", "</tr></tbody></table>"], _default: [0, "", ""] }; ma.optgroup = ma.option, ma.tbody = ma.tfoot = ma.colgroup = ma.caption = ma.thead, ma.th = ma.td; function na(a, b) { var c; return c = "undefined" != typeof a.getElementsByTagName ? a.getElementsByTagName(b || "*") : "undefined" != typeof a.querySelectorAll ? a.querySelectorAll(b || "*") : [], void 0 === b || b && B(a, b) ? r.merge([a], c) : c } function oa(a, b) { for (var c = 0, d = a.length; c < d; c++)W.set(a[c], "globalEval", !b || W.get(b[c], "globalEval")) } var pa = /<|&#?\w+;/; function qa(a, b, c, d, e) { for (var f, g, h, i, j, k, l = b.createDocumentFragment(), m = [], n = 0, o = a.length; n < o; n++)if (f = a[n], f || 0 === f) if ("object" === r.type(f)) r.merge(m, f.nodeType ? [f] : f); else if (pa.test(f)) { g = g || l.appendChild(b.createElement("div")), h = (ka.exec(f) || ["", ""])[1].toLowerCase(), i = ma[h] || ma._default, g.innerHTML = i[1] + r.htmlPrefilter(f) + i[2], k = i[0]; while (k--) g = g.lastChild; r.merge(m, g.childNodes), g = l.firstChild, g.textContent = "" } else m.push(b.createTextNode(f)); l.textContent = "", n = 0; while (f = m[n++]) if (d && r.inArray(f, d) > -1) e && e.push(f); else if (j = r.contains(f.ownerDocument, f), g = na(l.appendChild(f), "script"), j && oa(g), c) { k = 0; while (f = g[k++]) la.test(f.type || "") && c.push(f) } return l } !function () { var a = d.createDocumentFragment(), b = a.appendChild(d.createElement("div")), c = d.createElement("input"); c.setAttribute("type", "radio"), c.setAttribute("checked", "checked"), c.setAttribute("name", "t"), b.appendChild(c), o.checkClone = b.cloneNode(!0).cloneNode(!0).lastChild.checked, b.innerHTML = "<textarea>x</textarea>", o.noCloneChecked = !!b.cloneNode(!0).lastChild.defaultValue }(); var ra = d.documentElement, sa = /^key/, ta = /^(?:mouse|pointer|contextmenu|drag|drop)|click/, ua = /^([^.]*)(?:\.(.+)|)/; function va() { return !0 } function wa() { return !1 } function xa() { try { return d.activeElement } catch (a) { } } function ya(a, b, c, d, e, f) { var g, h; if ("object" == typeof b) { "string" != typeof c && (d = d || c, c = void 0); for (h in b) ya(a, h, c, d, b[h], f); return a } if (null == d && null == e ? (e = c, d = c = void 0) : null == e && ("string" == typeof c ? (e = d, d = void 0) : (e = d, d = c, c = void 0)), e === !1) e = wa; else if (!e) return a; return 1 === f && (g = e, e = function (a) { return r().off(a), g.apply(this, arguments) }, e.guid = g.guid || (g.guid = r.guid++)), a.each(function () { r.event.add(this, b, e, d, c) }) } r.event = { global: {}, add: function (a, b, c, d, e) { var f, g, h, i, j, k, l, m, n, o, p, q = W.get(a); if (q) { c.handler && (f = c, c = f.handler, e = f.selector), e && r.find.matchesSelector(ra, e), c.guid || (c.guid = r.guid++), (i = q.events) || (i = q.events = {}), (g = q.handle) || (g = q.handle = function (b) { return "undefined" != typeof r && r.event.triggered !== b.type ? r.event.dispatch.apply(a, arguments) : void 0 }), b = (b || "").match(L) || [""], j = b.length; while (j--) h = ua.exec(b[j]) || [], n = p = h[1], o = (h[2] || "").split(".").sort(), n && (l = r.event.special[n] || {}, n = (e ? l.delegateType : l.bindType) || n, l = r.event.special[n] || {}, k = r.extend({ type: n, origType: p, data: d, handler: c, guid: c.guid, selector: e, needsContext: e && r.expr.match.needsContext.test(e), namespace: o.join(".") }, f), (m = i[n]) || (m = i[n] = [], m.delegateCount = 0, l.setup && l.setup.call(a, d, o, g) !== !1 || a.addEventListener && a.addEventListener(n, g)), l.add && (l.add.call(a, 
vendor: 1,242 bytes, line 6
6k), k.handler.guid || (k.handler.guid = c.guid)), e ? m.splice(m.delegateCount++, 0, k) : m.push(k), r.event.global[n] = !0) } }, remove: function (a, b, c, d, e) { var f, g, h, i, j, k, l, m, n, o, p, q = W.hasData(a) && W.get(a); if (q && (i = q.events)) { b = (b || "").match(L) || [""], j = b.length; while (j--) if (h = ua.exec(b[j]) || [], n = p = h[1], o = (h[2] || "").split(".").sort(), n) { l = r.event.special[n] || {}, n = (d ? l.delegateType : l.bindType) || n, m = i[n] || [], h = h[2] && new RegExp("(^|\\.)" + o.join("\\.(?:.*\\.|)") + "(\\.|$)"), g = f = m.length; while (f--) k = m[f], !e && p !== k.origType || c && c.guid !== k.guid || h && !h.test(k.namespace) || d && d !== k.selector && ("**" !== d || !k.selector) || (m.splice(f, 1), k.selector && m.delegateCount--, l.remove && l.remove.call(a, k)); g && !m.length && (l.teardown && l.teardown.call(a, o, q.handle) !== !1 || r.removeEvent(a, n, q.handle), delete i[n]) } else for (n in i) r.event.remove(a, n + b[j], c, d, !0); r.isEmptyObject(i) && W.remove(a, "handle events") } }, dispatch: function (a) { var b = r.event.fix(a), c, d, e, f, g, h, i = new Array(arguments.length), j = (W.get(this, "events") || {})[b.type] || [], k = r.event.special[b.type] || {};
vendor: 32,676 bytes, lines 6-11
6 for (i[0] = b, c = 1; c < arguments.length; c++)i[c] = arguments[c]; if (b.delegateTarget = this, !k.preDispatch || k.preDispatch.call(this, b) !== !1) { h = r.event.handlers.call(this, b, j), c = 0; while ((f = h[c++]) && !b.isPropagationStopped()) { b.currentTarget = f.elem, d = 0; while ((g = f.handlers[d++]) && !b.isImmediatePropagationStopped()) b.rnamespace && !b.rnamespace.test(g.namespace) || (b.handleObj = g, b.data = g.data, e = ((r.event.special[g.origType] || {}).handle || g.handler).apply(f.elem, i), void 0 !== e && (b.result = e) === !1 && (b.preventDefault(), b.stopPropagation())) } return k.postDispatch && k.postDispatch.call(this, b), b.result } }, handlers: function (a, b) { var c, d, e, f, g, h = [], i = b.delegateCount, j = a.target; if (i && j.nodeType && !("click" === a.type && a.button >= 1)) for (; j !== this; j = j.parentNode || this)if (1 === j.nodeType && ("click" !== a.type || j.disabled !== !0)) { for (f = [], g = {}, c = 0; c < i; c++)d = b[c], e = d.selector + " ", void 0 === g[e] && (g[e] = d.needsContext ? r(e, this).index(j) > -1 : r.find(e, this, null, [j]).length), g[e] && f.push(d); f.length && h.push({ elem: j, handlers: f }) } return j = this, i < b.length && h.push({ elem: j, handlers: b.slice(i) }), h }, addProp: function (a, b) { Object.defineProperty(r.Event.prototype, a, { enumerable: !0, configurable: !0, get: r.isFunction(b) ? function () { if (this.originalEvent) return b(this.originalEvent) } : function () { if (this.originalEvent) return this.originalEvent[a] }, set: function (b) { Object.defineProperty(this, a, { enumerable: !0, configurable: !0, writable: !0, value: b }) } }) }, fix: function (a) { return a[r.expando] ? a : new r.Event(a) }, special: { load: { noBubble: !0 }, focus: { trigger: function () { if (this !== xa() && this.focus) return this.focus(), !1 }, delegateType: "focusin" }, blur: { trigger: function () { if (this === xa() && this.blur) return this.blur(), !1 }, delegateType: "focusout" }, click: { trigger: function () { if ("checkbox" === this.type && this.click && B(this, "input")) return this.click(), !1 }, _default: function (a) { return B(a.target, "a") } }, beforeunload: { postDispatch: function (a) { void 0 !== a.result && a.originalEvent && (a.originalEvent.returnValue = a.result) } } } }, r.removeEvent = function (a, b, c) { a.removeEventListener && a.removeEventListener(b, c) }, r.Event = function (a, b) { return this instanceof r.Event ? (a && a.type ? (this.originalEvent = a, this.type = a.type, this.isDefaultPrevented = a.defaultPrevented || void 0 === a.defaultPrevented && a.returnValue === !1 ? va : wa, this.target = a.target && 3 === a.target.nodeType ? a.target.parentNode : a.target, this.currentTarget = a.currentTarget, this.relatedTarget = a.relatedTarget) : this.type = a, b && r.extend(this, b), this.timeStamp = a && a.timeStamp || r.now(), void (this[r.expando] = !0)) : new r.Event(a, b) }, r.Event.prototype = { constructor: r.Event, isDefaultPrevented: wa, isPropagationStopped: wa, isImmediatePropagationStopped: wa, isSimulated: !1, preventDefault: function () { var a = this.originalEvent; this.isDefaultPrevented = va, a && !this.isSimulated && a.preventDefault() }, stopPropagation: function () { var a = this.originalEvent; this.isPropagationStopped = va, a && !this.isSimulated && a.stopPropagation() }, stopImmediatePropagation: function () { var a = this.originalEvent; this.isImmediatePropagationStopped = va, a && !this.isSimulated && a.stopImmediatePropagation(), this.stopPropagation() } }, r.each({ altKey: !0, bubbles: !0, cancelable: !0, changedTouches: !0, ctrlKey: !0, detail: !0, eventPhase: !0, metaKey: !0, pageX: !0, pageY: !0, shiftKey: !0, view: !0, "char": !0, charCode: !0, key: !0, keyCode: !0, button: !0, buttons: !0, clientX: !0, clientY: !0, offsetX: !0, offsetY: !0, pointerId: !0, pointerType: !0, screenX: !0, screenY: !0, targetTouches: !0, toElement: !0, touches: !0, which: function (a) { var b = a.button; return null == a.which && sa.test(a.type) ? null != a.charCode ? a.charCode : a.keyCode : !a.which && void 0 !== b && ta.test(a.type) ? 1 & b ? 1 : 2 & b ? 3 : 4 & b ? 2 : 0 : a.which } }, r.event.addProp), r.each({ mouseenter: "mouseover", mouseleave: "mouseout", pointerenter: "pointerover", pointerleave: "pointerout" }, function (a, b) { r.event.special[a] = { delegateType: b, bindType: b, handle: function (a) { var c, d = this, e = a.relatedTarget, f = a.handleObj; return e && (e === d || r.contains(d, e)) || (a.type = f.origType, c = f.handler.apply(this, arguments), a.type = b), c } } }), r.fn.extend({ on: function (a, b, c, d) { return ya(this, a, b, c, d) }, one: function (a, b, c, d) { return ya(this, a, b, c, d, 1) }, off: function (a, b, c) { var d, e; if (a && a.preventDefault && a.handleObj) return d = a.handleObj, r(a.delegateTarget).off(d.namespace ? d.origType + "." + d.namespace : d.origType, d.selector, d.handler), this; if ("object" == typeof a) { for (e in a) this.off(e, b, a[e]); return this } return b !== !1 && "function" != typeof b || (c = b, b = void 0), c === !1 && (c = wa), this.each(function () { r.event.remove(this, a, c, b) }) } }); var za = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi, Aa = /<script|<style|<link/i, Ba = /checked\s*(?:[^=]|=\s*.checked.)/i, Ca = /^true\/(.*)/, Da = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g; function Ea(a, b) { return B(a, "table") && B(11 !== b.nodeType ? b : b.firstChild, "tr") ? r(">tbody", a)[0] || a : a } function Fa(a) { return a.type = (null !== a.getAttribute("type")) + "/" + a.type, a } function Ga(a) { var b = Ca.exec(a.type); return b ? a.type = b[1] : a.removeAttribute("type"), a } function Ha(a, b) { var c, d, e, f, g, h, i, j; if (1 === b.nodeType) { if (W.hasData(a) && (f = W.access(a), g = W.set(b, f), j = f.events)) { delete g.handle, g.events = {}; for (e in j) for (c = 0, d = j[e].length; c < d; c++)r.event.add(b, e, j[e][c]) } X.hasData(a) && (h = X.access(a), i = r.extend({}, h), X.set(b, i)) } } function Ia(a, b) { var c = b.nodeName.toLowerCase(); "input" === c && ja.test(a.type) ? b.checked = a.checked : "input" !== c && "textarea" !== c || (b.defaultValue = a.defaultValue) } function Ja(a, b, c, d) { b = g.apply([], b); var e, f, h, i, j, k, l = 0, m = a.length, n = m - 1, q = b[0], s = r.isFunction(q); if (s || m > 1 && "string" == typeof q && !o.checkClone && Ba.test(q)) return a.each(function (e) { var f = a.eq(e); s && (b[0] = q.call(this, e, f.html())), Ja(f, b, c, d) }); if (m && (e = qa(b, a[0].ownerDocument, !1, a, d), f = e.firstChild, 1 === e.childNodes.length && (e = f), f || d)) { for (h = r.map(na(e, "script"), Fa), i = h.length; l < m; l++)j = e, l !== n && (j = r.clone(j, !0, !0), i && r.merge(h, na(j, "script"))), c.call(a[l], j, l); if (i) for (k = h[h.length - 1].ownerDocument, r.map(h, Ga), l = 0; l < i; l++)j = h[l], la.test(j.type || "") && !W.access(j, "globalEval") && r.contains(k, j) && (j.src ? r._evalUrl && r._evalUrl(j.src) : p(j.textContent.replace(Da, ""), k)) } return a } function Ka(a, b, c) { for (var d, e = b ? r.filter(b, a) : a, f = 0; null != (d = e[f]); f++)c || 1 !== d.nodeType || r.cleanData(na(d)), d.parentNode && (c && r.contains(d.ownerDocument, d) && oa(na(d, "script")), d.parentNode.removeChild(d)); return a } r.extend({ htmlPrefilter: function (a) { return a.replace(za, "<$1></$2>") }, clone: function (a, b, c) { var d, e, f, g, h = a.cloneNode(!0), i = r.contains(a.ownerDocument, a); if (!(o.noCloneChecked || 1 !== a.nodeType && 11 !== a.nodeType || r.isXMLDoc(a))) for (g = na(h), f = na(a), d = 0, e = f.length; d < e; d++)Ia(f[d], g[d]); if (b) if (c) for (f = f || na(a), g = g || na(h), d = 0, e = f.length; d < e; d++)Ha(f[d], g[d]); else Ha(a, h); return g = na(h, "script"), g.length > 0 && oa(g, !i && na(a, "script")), h }, cleanData: function (a) { for (var b, c, d, e = r.event.special, f = 0; void 0 !== (c = a[f]); f++)if (U(c)) { if (b = c[W.expando]) { if (b.events) for (d in b.events) e[d] ? r.event.remove(c, d) : r.removeEvent(c, d, b.handle); c[W.expando] = void 0 } c[X.expando] && (c[X.expando] = void 0) } } }), r.fn.extend({ detach: function (a) { return Ka(this, a, !0) }, remove: function (a) { return Ka(this, a) }, text: function (a) { return T(this, function (a) { return void 0 === a ? r.text(this) : this.empty().each(function () { 1 !== this.nodeType && 11 !== this.nodeType && 9 !== this.nodeType || (this.textContent = a) }) }, null, a, arguments.length) }, append: function () { return Ja(this, arguments, function (a) { if (1 === this.nodeType || 11 === this.nodeType || 9 === this.nodeType) { var b = Ea(this, a); b.appendChild(a) } }) }, prepend: function () { return Ja(this, arguments, function (a) { if (1 === this.nodeType || 11 === this.nodeType || 9 === this.nodeType) { var b = Ea(this, a); b.insertBefore(a, b.firstChild) } }) }, before: function () { return Ja(this, arguments, function (a) { this.parentNode && this.parentNode.insertBefore(a, this) }) }, after: function () { return Ja(this, arguments, function (a) { this.parentNode && this.parentNode.insertBefore(a, this.nextSibling) }) }, empty: function () { for (var a, b = 0; null != (a = this[b]); b++)1 === a.nodeType && (r.cleanData(na(a, !1)), a.textContent = ""); return this }, clone: function (a, b) { return a = null != a && a, b = null == b ? a : b, this.map(function () { return r.clone(this, a, b) }) }, html: function (a) { return T(this, function (a) { var b = this[0] || {}, c = 0, d = this.length; if (void 0 === a && 1 === b.nodeType) return b.innerHTML; if ("string" == typeof a && !Aa.test(a) && !ma[(ka.exec(a) || ["", ""])[1].toLowerCase()]) { a = r.htmlPrefilter(a); try { for (; c < d; c++)b = this[c] || {}, 1 === b.nodeType && (r.cleanData(na(b, !1)), b.innerHTML = a); b = 0 } catch (e) { } } b && this.empty().append(a) }, null, a, arguments.length) }, replaceWith: function () { var a = []; return Ja(this, arguments, function (b) { var c = this.parentNode; r.inArray(this, a) < 0 && (r.cleanData(na(this)), c && c.replaceChild(b, this)) }, a) } }), r.each({ appendTo: "append", prependTo: "prepend", insertBefore: "before", insertAfter: "after", replaceAll: "replaceWith" }, function (a, b) { r.fn[a] = function (a) { for (var c, d = [], e = r(a), f = e.length - 1, g = 0; g <= f; g++)c = g === f ? this : this.clone(!0), r(e[g])[b](c), h.apply(d, c.get()); return this.pushStack(d) } }); var La = /^margin/, Ma = new RegExp("^(" + aa + ")(?!px)[a-z%]+$", "i"), Na = function (b) { var c = b.ownerDocument.defaultView; return c && c.opener || (c = a), c.getComputedStyle(b) }; !function () { function b() { if (i) { i.style.cssText = "box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%", i.innerHTML = "", ra.appendChild(h); var b = a.getComputedStyle(i); c = "1%" !== b.top, g = "2px" === b.marginLeft, e = "4px" === b.width, i.style.marginRight = "50%", f = "4px" === b.marginRight, ra.removeChild(h), i = null } } var c, e, f, g, h = d.createElement("div"), i = d.createElement("div"); i.style && (i.style.backgroundClip = "content-box", i.cloneNode(!0).style.backgroundClip = "", o.clearCloneStyle = "content-box" === i.style.backgroundClip, h.style.cssText = "border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute", h.appendChild(i), r.extend(o, { pixelPosition: function () { return b(), c }, boxSizingReliable: function () { return b(), e }, pixelMarginRight: function () { return b(), f }, reliableMarginLeft: function () { return b(), g } })) }(); function Oa(a, b, c) { var d, e, f, g, h = a.style; return c = c || Na(a), c && (g = c.getPropertyValue(b) || c[b], "" !== g || r.contains(a.ownerDocument, a) || (g = r.style(a, b)), !o.pixelMarginRight() && Ma.test(g) && La.test(b) && (d = h.width, e = h.minWidth, f = h.maxWidth, h.minWidth = h.maxWidth = h.width = g, g = c.width, h.width = d, h.minWidth = e, h.maxWidth = f)), void 0 !== g ? g + "" : g } function Pa(a, b) { return { get: function () { return a() ? void delete this.get : (this.get = b).apply(this, arguments) } } } var Qa = /^(none|table(?!-c[ea]).+)/, Ra = /^--/, Sa = { position: "absolute", visibility: "hidden", display: "block" }, Ta = { letterSpacing: "0", fontWeight: "400" }, Ua = ["Webkit", "Moz", "ms"], Va = d.createElement("div").style; function Wa(a) { if (a in Va) return a; var b = a[0].toUpperCase() + a.slice(1), c = Ua.length; while (c--) if (a = Ua[c] + b, a in Va) return a } function Xa(a) { var b = r.cssProps[a]; return b || (b = r.cssProps[a] = Wa(a) || a), b } function Ya(a, b, c) { var d = ba.exec(b); return d ? Math.max(0, d[2] - (c || 0)) + (d[3] || "px") : b } function Za(a, b, c, d, e) { var f, g = 0; for (f = c === (d ? "border" : "content") ? 4 : "width" === b ? 1 : 0; f < 4; f += 2)"margin" === c && (g += r.css(a, c + ca[f], !0, e)), d ? ("content" === c && (g -= r.css(a, "padding" + ca[f], !0, e)), "margin" !== c && (g -= r.css(a, "border" + ca[f] + "Width", !0, e))) : (g += r.css(a, "padding" + ca[f], !0, e), "padding" !== c && (g += r.css(a, "border" + ca[f] + "Width", !0, e))); return g } function $a(a, b, c) { var d, e = Na(a), f = Oa(a, b, e), g = "border-box" === r.css(a, "boxSizing", !1, e); return Ma.test(f) ? f : (d = g && (o.boxSizingReliable() || f === a.style[b]), "auto" === f && (f = a["offset" + b[0].toUpperCase() + b.slice(1)]), f = parseFloat(f) || 0, f + Za(a, b, c || (g ? "border" : "content"), d, e) + "px") } r.extend({ cssHooks: { opacity: { get: function (a, b) { if (b) { var c = Oa(a, "opacity"); return "" === c ? "1" : c } } } }, cssNumber: { animationIterationCount: !0, columnCount: !0, fillOpacity: !0, flexGrow: !0, flexShrink: !0, fontWeight: !0, lineHeight: !0, opacity: !0, order: !0, orphans: !0, widows: !0, zIndex: !0, zoom: !0 }, cssProps: { "float": "cssFloat" }, style: function (a, b, c, d) { if (a && 3 !== a.nodeType && 8 !== a.nodeType && a.style) { var e, f, g, h = r.camelCase(b), i = Ra.test(b), j = a.style; return i || (b = Xa(h)), g = r.cssHooks[b] || r.cssHooks[h], void 0 === c ? g && "get" in g && void 0 !== (e = g.get(a, !1, d)) ? e : j[b] : (f = typeof c, "string" === f && (e = ba.exec(c)) && e[1] && (c = fa(a, b, e), f = "number"), null != c && c === c && ("number" === f && (c += e && e[3] || (r.cssNumber[h] ? "" : "px")), o.clearCloneStyle || "" !== c || 0 !== b.indexOf("background") || (j[b] = "inherit"), g && "set" in g && void 0 === (c = g.set(a, c, d)) || (i ? j.setProperty(b, c) : j[b] = c)), void 0) } }, css: function (a, b, c, d) { var e, f, g, h = r.camelCase(b), i = Ra.test(b); return i || (b = Xa(h)), g = r.cssHooks[b] || r.cssHooks[h], g && "get" in g && (e = g.get(a, !0, c)), void 0 === e && (e = Oa(a, b, d)), "normal" === e && b in Ta && (e = Ta[b]), "" === c || c ? (f = parseFloat(e), c === !0 || isFinite(f) ? f || 0 : e) : e } }), r.each(["height", "width"], function (a, b) { r.cssHooks[b] = { get: function (a, c, d) { if (c) return !Qa.test(r.css(a, "display")) || a.getClientRects().length && a.getBoundingClientRect().width ? $a(a, b, d) : ea(a, Sa, function () { return $a(a, b, d) }) }, set: function (a, c, d) { var e, f = d && Na(a), g = d && Za(a, b, d, "border-box" === r.css(a, "boxSizing", !1, f), f); return g && (e = ba.exec(c)) && "px" !== (e[3] || "px") && (a.style[b] = c, c = r.css(a, b)), Ya(a, c, g) } } }), r.cssHooks.marginLeft = Pa(o.reliableMarginLeft, function (a, b) { if (b) return (parseFloat(Oa(a, "marginLeft")) || a.getBoundingClientRect().left - ea(a, { marginLeft: 0 }, function () { return a.getBoundingClientRect().left })) + "px" }), r.each({ margin: "", padding: "", border: "Width" }, function (a, b) { r.cssHooks[a + b] = { expand: function (c) { for (var d = 0, e = {}, f = "string" == typeof c ? c.split(" ") : [c]; d < 4; d++)e[a + ca[d] + b] = f[d] || f[d - 2] || f[0]; return e } }, La.test(a) || (r.cssHooks[a + b].set = Ya) }), r.fn.extend({ css: function (a, b) { return T(this, function (a, b, c) { var d, e, f = {}, g = 0; if (Array.isArray(b)) { for (d = Na(a), e = b.length; g < e; g++)f[b[g]] = r.css(a, b[g], !1, d); return f } return void 0 !== c ? r.style(a, b, c) : r.css(a, b) }, a, b, arguments.length > 1) } }); function _a(a, b, c, d, e) { return new _a.prototype.init(a, b, c, d, e) } r.Tween = _a, _a.prototype = { constructor: _a, init: function (a, b, c, d, e, f) { this.elem = a, this.prop = c, this.easing = e || r.easing._default, this.options = b, this.start = this.now = this.cur(), this.end = d, this.unit = f || (r.cssNumber[c] ? "" : "px") }, cur: function () { var a = _a.propHooks[this.prop]; return a && a.get ? a.get(this) : _a.propHooks._default.get(this) }, run: function (a) { var b, c = _a.propHooks[this.prop]; return this.options.duration ? this.pos = b = r.easing[this.easing](a, this.options.duration * a, 0, 1, this.options.duration) : this.pos = b = a, this.now = (this.end - this.start) * b + this.start, this.options.step && this.options.step.call(this.elem, this.now, this), c && c.set ? c.set(this) : _a.propHooks._default.set(this), this } }, _a.prototype.init.prototype = _a.prototype, _a.propHooks = { _default: { get: function (a) { var b; return 1 !== a.elem.nodeType || null != a.elem[a.prop] && null == a.elem.style[a.prop] ? a.elem[a.prop] : (b = r.css(a.elem, a.prop, ""), b && "auto" !== b ? b : 0) }, set: function (a) { r.fx.step[a.prop] ? r.fx.step[a.prop](a) : 1 !== a.elem.nodeType || null == a.elem.style[r.cssProps[a.prop]] && !r.cssHooks[a.prop] ? a.elem[a.prop] = a.now : r.style(a.elem, a.prop, a.now + a.unit) } } }, _a.propHooks.scrollTop = _a.propHooks.scrollLeft = { set: function (a) { a.elem.nodeType && a.elem.parentNode && (a.elem[a.prop] = a.now) } }, r.easing = { linear: function (a) { return a }, swing: function (a) { return .5 - Math.cos(a * Math.PI) / 2 }, _default: "swing" }, r.fx = _a.prototype.init, r.fx.step = {}; var ab, bb, cb = /^(?:toggle|show|hide)$/, db = /queueHooks$/; function eb() { bb && (d.hidden === !1 && a.requestAnimationFrame ? a.requestAnimationFrame(eb) : a.setTimeout(eb, r.fx.interval), r.fx.tick()) } function fb() { return a.setTimeout(function () { ab = void 0 }), ab = r.now() } function gb(a, b) { var c, d = 0, e = { height: a }; for (b = b ? 1 : 0; d < 4; d += 2 - b)c = ca[d], e["margin" + c] = e["padding" + c] = a; return b && (e.opacity = e.width = a), e } function hb(a, b, c) { for (var d, e = (kb.tweeners[b] || []).concat(kb.tweeners["*"]), f = 0, g = e.length; f < g; f++)if (d = e[f].call(c, b, a)) return d } function ib(a, b, c) { var d, e, f, g, h, i, j, k, l = "width" in b || "height" in b, m = this, n = {}, o = a.style, p = a.nodeType && da(a), q = W.get(a, "fxshow"); c.queue || (g = r._queueHooks(a, "fx"), null == g.unqueued && (g.unqueued = 0, h = g.empty.fire, g.empty.fire = function () { g.unqueued || h() }), g.unqueued++, m.always(function () { m.always(function () { g.unqueued--, r.queue(a, "fx").length || g.empty.fire() }) })); for (d in b) if (e = b[d], cb.test(e)) { if (delete b[d], f = f || "toggle" === e, e === (p ? "hide" : "show")) { if ("show" !== e || !q || void 0 === q[d]) continue; p = !0 } n[d] = q && q[d] || r.style(a, d) } if (i = !r.isEmptyObject(b), i || !r.isEmptyObject(n)) { l && 1 === a.nodeType && (c.overflow = [o.overflow, o.overflowX, o.overflowY], j = q && q.display, null == j && (j = W.get(a, "display")), k = r.css(a, "display"), "none" === k && (j ? k = j : (ia([a], !0), j = a.style.display || j, k = r.css(a, "display"), ia([a]))), ("inline" === k || "inline-block" === k && null != j) && "none" === r.css(a, "float") && (i || (m.done(function () { o.display = j }), null == j && (k = o.display, j = "none" === k ? "" : k)), o.display = "inline-block")), c.overflow && (o.overflow = "hidden", m.always(function () { o.overflow = c.overflow[0], o.overflowX = c.overflow[1], o.overflowY = c.overflow[2] })), i = !1; for (d in n) i || (q ? "hidden" in q && (p = q.hidden) : q = W.access(a, "fxshow", { display: j }), f && (q.hidden = !p), p && ia([a], !0), m.done(function () { p || ia([a]), W.remove(a, "fxshow"); for (d in n) r.style(a, d, n[d]) })), i = hb(p ? q[d] : 0, d, m), d in q || (q[d] = i.start, p && (i.end = i.start, i.start = 0)) } } function jb(a, b) { var c, d, e, f, g; for (c in a) if (d = r.camelCase(c), e = b[d], f = a[c], Array.isArray(f) && (e = f[1], f = a[c] = f[0]), c !== d && (a[d] = f, delete a[c]), g = r.cssHooks[d], g && "expand" in g) { f = g.expand(f), delete a[d]; for (c in f) c in a || (a[c] = f[c], b[c] = e) } else b[d] = e } function kb(a, b, c) { var d, e, f = 0, g = kb.prefilters.length, h = r.Deferred().always(function () { delete i.elem }), i = function () { if (e) return !1; for (var b = ab || fb(), c = Math.max(0, j.startTime + j.duration - b), d = c / j.duration || 0, f = 1 - d, g = 0, i = j.tweens.length; g < i; g++)j.tweens[g].run(f); return h.notifyWith(a, [j, f, c]), f < 1 && i ? c : (i || h.notifyWith(a, [j, 1, 0]), h.resolveWith(a, [j]), !1) }, j = h.promise({ elem: a, props: r.extend({}, b), opts: r.extend(!0, { specialEasing: {}, easing: r.easing._default }, c), originalProperties: b, originalOptions: c, startTime: ab || fb(), duration: c.duration, tweens: [], createTween: function (b, c) { var d = r.Tween(a, j.opts, b, c, j.opts.specialEasing[b] || j.opts.easing); return j.tweens.push(d), d }, stop: function (b) { var c = 0, d = b ? j.tweens.length : 0; if (e) return this; for (e = !0; c < d; c++)j.tweens[c].run(1); return b ? (h.notifyWith(a, [j, 1, 0]), h.resolveWith(a, [j, b])) : h.rejectWith(a, [j, b]), this } }), k = j.props; for (jb(k, j.opts.specialEasing); f < g; f++)if (d = kb.prefilters[f].call(j, a, k, j.opts)) return r.isFunction(d.stop) && (r._queueHooks(j.elem, j.opts.queue).stop = r.proxy(d.stop, d)), d; return r.map(k, hb, j), r.isFunction(j.opts.start) && j.opts.start.call(a, j), j.progress(j.opts.progress).done(j.opts.done, j.opts.complete).fail(j.opts.fail).always(j.opts.always), r.fx.timer(r.extend(i, { elem: a, anim: j, queue: j.opts.queue })), j } r.Animation = r.extend(kb, { tweeners: { "*": [function (a, b) { var c = this.createTween(a, b); return fa(c.elem, a, ba.exec(b), c), c }] }, tweener: function (a, b) { r.isFunction(a) ? (b = a, a = ["*"]) : a = a.match(L); for (var c, d = 0, e = a.length; d < e; d++)c = a[d], kb.tweeners[c] = kb.tweeners[c] || [], kb.tweeners[c].unshift(b) }, prefilters: [ib], prefilter: function (a, b) { b ? kb.prefilters.unshift(a) : kb.prefilters.push(a) } }), r.speed = function (a, b, c) { var d = a && "object" == typeof a ? r.extend({}, a) : { complete: c || !c && b || r.isFunction(a) && a, duration: a, easing: c && b || b && !r.isFunction(b) && b }; return r.fx.off ? d.duration = 0 : "number" != typeof d.duration && (d.duration in r.fx.speeds ? d.duration = r.fx.speeds[d.duration] : d.duration = r.fx.speeds._default), null != d.queue && d.queue !== !0 || (d.queue = "fx"), d.old = d.complete, d.complete = function () { r.isFunction(d.old) && d.old.call(this), d.queue && r.dequeue(this, d.queue) }, d }, r.fn.extend({ fadeTo: function (a, b, c, d) { return this.filter(da).css("opacity", 0).show().end().animate({ opacity: b }, a, c, d) }, animate: function (a, b, c, d) { var e = r.isEmptyObject(a), f = r.speed(b, c, d), g = function () { var b = kb(this, r.extend({}, a), f); (e || W.get(this, "finish")) && b.stop(!0) }; return g.finish = g, e || f.queue === !1 ? this.each(g) : this.queue(f.queue, g) }, stop: function (a, b, c) { var d = function (a) { var b = a.stop; delete a.stop, b(c) }; return "string" != typeof a && (c = b, b = a, a = void 0), b && a !== !1 && this.queue(a || "fx", []), this.each(function () { var b = !0, e = null != a && a + "queueHooks", f = r.timers, g = W.get(this); if (e) g[e] && g[e].stop && d(g[e]); else for (e in g) g[e] && g[e].stop && db.test(e) && d(g[e]); for (e = f.length; e--;)f[e].elem !== this || null != a && f[e].queue !== a || (f[e].anim.stop(c), b = !1, f.splice(e, 1)); !b && c || r.dequeue(this, a) }) }, finish: function (a) { return a !== !1 && (a = a || "fx"), this.each(function () { var b, c = W.get(this), d = c[a + "queue"], e = c[a + "queueHooks"], f = r.timers, g = d ? d.length : 0; for (c.finish = !0, r.queue(this, a, []), e && e.stop && e.stop.call(this, !0), b = f.length; b--;)f[b].elem === this && f[b].queue === a && (f[b].anim.stop(!0), f.splice(b, 1)); for (b = 0; b < g; b++)d[b] && d[b].finish && d[b].finish.call(this); delete c.finish }) } }), r.each(["toggle", "show", "hide"], function (a, b) { var c = r.fn[b]; r.fn[b] = function (a, d, e) { return null == a || "boolean" == typeof a ? c.apply(this, arguments) : this.animate(gb(b, !0), a, d, e) } }), r.each({ slideDown: gb("show"), slideUp: gb("hide"), slideToggle: gb("toggle"), fadeIn: { opacity: "show" }, fadeOut: { opacity: "hide" }, fadeToggle: { opacity: "toggle" } }, function (a, b) { r.fn[a] = function (a, c, d) { return this.animate(b, a, c, d) } }), r.timers = [], r.fx.tick = function () { var a, b = 0, c = r.timers; for (ab = r.now(); b < c.length; b++)a = c[b], a() || c[b] !== a || c.splice(b--, 1); c.length || r.fx.stop(), ab = void 0 }, r.fx.timer = function (a) { r.timers.push(a), r.fx.start() }, r.fx.interval = 13, r.fx.start = function () { bb || (bb = !0, eb()) }, r.fx.stop = function () { bb = null }, r.fx.speeds = { slow: 600, fast: 200, _default: 400 }, r.fn.delay = function (b, c) { return b = r.fx ? r.fx.speeds[b] || b : b, c = c || "fx", this.queue(c, function (c, d) { var e = a.setTimeout(c, b); d.stop = function () { a.clearTimeout(e) } }) }, function () { var a = d.createElement("input"), b = d.createElement("select"), c = b.appendChild(d.createElement("option")); a.type = "checkbox", o.checkOn = "" !== a.value, o.optSelected = c.selected, a = d.createElement("input"), a.value = "t", a.type = "radio", o.radioValue = "t" === a.value }(); var lb, mb = r.expr.attrHandle; r.fn.extend({ attr: function (a, b) { return T(this, r.attr, a, b, arguments.length > 1) }, removeAttr: function (a) { return this.each(function () { r.removeAttr(this, a) }) } }), r.extend({
7        attr: function (a, b, c) {
8            var d, e, f = a.nodeType; if (3 !== f && 8 !== f && 2 !== f) return "undefined" == typeof a.getAttribute ? r.prop(a, b, c) : (1 === f && r.isXMLDoc(a) || (e = r.attrHooks[b.toLowerCase()] || (r.expr.match.bool.test(b) ? lb : void 0)), void 0 !== c ? null === c ? void r.removeAttr(a, b) : e && "set" in e && void 0 !== (d = e.set(a, c, b)) ? d : (a.setAttribute(b, c + ""), c) : e && "get" in e && null !== (d = e.get(a, b)) ? d : (d = r.find.attr(a, b),
9                null == d ? void 0 : d))
10        }, attrHooks: { type: { set: function (a, b) { if (!o.radioValue && "radio" === b && B(a, "input")) { var c = a.value; return a.setAttribute("type", b), c && (a.value = c), b } } } }, removeAttr: function (a, b) { var c, d = 0, e = b && b.match(L); if (e && 1 === a.nodeType) while (c = e[d++]) a.removeAttribute(c) }
11    }), lb = { set: function (a, b, c) { return b === !1 ? r.removeAttr(a, c) : a.setAttribute(c, c), c } }, r.each(r.expr.match.bool.source.match(/\w+/g), function (a, b) { var c = mb[b] || r.find.attr; mb[b] = function (a, b, d) { var e, f, g = b.toLowerCase(); return d || (f = mb[g], mb[g] = e, e = null != c(a, b, d) ? g : null, mb[g] = f), e } }); var nb = /^(?:input|select|textarea|button)$/i, ob = /^(?:a|area)$/i; r.fn.extend({ prop: function (a, b) { return T(this, r.prop, a, b, arguments.length > 1) }, removeProp: function (a) { return this.each(function () { delete this[r.propFix[a] || a] }) } }), r.extend({ prop: function (a, b, c) { var d, e, f = a.nodeType; if (3 !== f && 8 !== f && 2 !== f) return 1 === f && r.isXMLDoc(a) || (b = r.propFix[b] || b, e = r.propHooks[b]), void 0 !== c ? e && "set" in e && void 0 !== (d = e.set(a, c, b)) ? d : a[b] = c : e && "get" in e && null !== (d = e.get(a, b)) ? d : a[b] }, propHooks: { tabIndex: { get: function (a) { var b = r.find.attr(a, "tabindex"); return b ? parseInt(b, 10) : nb.test(a.nodeName) || ob.test(a.nodeName) && a.href ? 0 : -1 } } }, propFix: { "for": "htmlFor", "class": "className" } }), o.optSelected || (r.propHooks.selected = { get: function (a) { var b = a.parentNode; return b && b.parentNode && b.parentNode.selectedIndex, null }, set: function (a) { var b = a.parentNode; b && (b.selectedIndex, b.parentNode && b.parentNode.selectedIndex) } }), r.each(["tabIndex", "readOnly", "maxLength", "cellSpacing", "cellPadding", "rowSpan", "colSpan", "useMap", "frameBorder", "contentEditable"], function () { r.propFix[this.toLowerCase()] = this }); function pb(a) { var b = a.match(L) || []; return b.join(" ") } function qb(a) { return a.getAttribute && a.getAttribute("class") || "" } r.fn.extend({ addClass: function (a) { var b, c, d, e, f, g, h, i = 0; if (r.isFunction(a)) return this.each(function (b) { r(this).addClass(a.call(this, b, qb(this))) }); if ("string" == typeof a && a) { b = a.match(L) || []; while (c = this[i++]) if (e = qb(c), d = 1 === c.nodeType && " " + pb(e) + " ") { g = 0; while (f = b[g++]) d.indexOf(" " + f + " ") < 0 && (d += f + " "); h = pb(d), e !== h && c.setAttribute("class", h) } } return this }, removeClass: function (a) { var b, c, d, e, f, g, h, i = 0; if (r.isFunction(a)) return this.each(function (b) { r(this).removeClass(a.call(this, b, qb(this))) }); if (!arguments.length) return this.attr("class", ""); if ("string" == typeof a && a) { b = a.match(L) || []; while (c = this[i++]) if (e = qb(c), d = 1 === c.nodeType && " " + pb(e) + " ") { g = 0; while (f = b[g++]) while (d.indexOf(" " + f + " ") > -1) d = d.replace(" " + f + " ", " "); h = pb(d), e !== h && c.setAttribute("class", h) } } return this }, toggleClass: function (a, b) { var c = typeof a; return "boolean" == typeof b && "string" === c ? b ? this.addClass(a) : this.removeClass(a) : r.isFunction(a) ? this.each(function (c) { r(this).toggleClass(a.call(this, c, qb(this), b), b) }) : this.each(function () { var b, d, e, f; if ("string" === c) { d = 0, e = r(this), f = a.match(L) || []; while (b = f[d++]) e.hasClass(b) ? e.removeClass(b) : e.addClass(b) } else void 0 !== a && "boolean" !== c || (b = qb(this), b && W.set(this, "__className__", b), this.setAttribute && this.setAttribute("class", b || a === !1 ? "" : W.get(this, "__className__") || "")) }) }, hasClass: function (a) { var b, c, d = 0; b = " " + a + " "; while (c = this[d++]) if (1 === c.nodeType && (" " + pb(qb(c)) + " ").indexOf(b) > -1) return !0; return !1 } }); var rb = /\r/g; r.fn.extend({ val: function (a) { var b, c, d, e = this[0]; { if (arguments.length) return d = r.isFunction(a), this.each(function (c) { var e; 1 === this.nodeType && (e = d ? a.call(this, c, r(this).val()) : a, null == e ? e = "" : "number" == typeof e ? e += "" : Array.isArray(e) && (e = r.map(e, function (a) { return null == a ? "" : a + "" })), b = r.valHooks[this.type] || r.valHooks[this.nodeName.toLowerCase()], b && "set" in b && void 0 !== b.set(this, e, "value") || (this.value = e)) }); if (e) return b = r.valHooks[e.type] || r.valHooks[e.nodeName.toLowerCase()], b && "get" in b && void 0 !== (c = b.get(e, "value")) ? c : (c = e.value, "string" == typeof c ? c.replace(rb, "") : null == c ? "" : c) } } }), r.extend({ valHooks: { option: { get: function (a) { var b = r.find.attr(a, "value"); return null != b ? b : pb(r.text(a)) } }, select: { get: function (a) { var b, c, d, e = a.options, f = a.selectedIndex, g = "select-one" === a.type, h = g ? null : [], i = g ? f + 1 : e.length; for (d = f < 0 ? i : g ? f : 0; d < i; d++)if (c = e[d], (c.selected || d === f) && !c.disabled && (!c.parentNode.disabled || !B(c.parentNode, "optgroup"))) { if (b = r(c).val(), g) return b; h.push(b) } return h }, set: function (a, b) { var c, d, e = a.options, f = r.makeArray(b), g = e.length; while (g--) d = e[g], (d.selected = r.inArray(r.valHooks.option.get(d), f) > -1) && (c = !0); return c || (a.selectedIndex = -1), f } } } }), r.each(["radio", "checkbox"], function () { r.valHooks[this] = { set: function (a, b) { if (Array.isArray(b)) return a.checked = r.inArray(r(a).val(), b) > -1 } }, o.checkOn || (r.valHooks[this].get = function (a) { return null === a.getAttribute("value") ? "on" : a.value }) }); var sb = /^(?:focusinfocus|focusoutblur)$/; r.extend(r.event, { trigger: function (b, c, e, f) { var g, h, i, j, k, m, n, o = [e || d], p = l.call(b, "type") ? b.type : b, q = l.call(b, "namespace") ? b.namespace.split(".") : []; if (h = i = e = e || d, 3 !== e.nodeType && 8 !== e.nodeType && !sb.test(p + r.event.triggered) && (p.indexOf(".") > -1 && (q = p.split("."), p = q.shift(), q.sort()), k = p.indexOf(":") < 0 && "on" 
vendor: 12,926 bytes, line 11
11+ p, b = b[r.expando] ? b : new r.Event(p, "object" == typeof b && b), b.isTrigger = f ? 2 : 3, b.namespace = q.join("."), b.rnamespace = b.namespace ? new RegExp("(^|\\.)" + q.join("\\.(?:.*\\.|)") + "(\\.|$)") : null, b.result = void 0, b.target || (b.target = e), c = null == c ? [b] : r.makeArray(c, [b]), n = r.event.special[p] || {}, f || !n.trigger || n.trigger.apply(e, c) !== !1)) { if (!f && !n.noBubble && !r.isWindow(e)) { for (j = n.delegateType || p, sb.test(j + p) || (h = h.parentNode); h; h = h.parentNode)o.push(h), i = h; i === (e.ownerDocument || d) && o.push(i.defaultView || i.parentWindow || a) } g = 0; while ((h = o[g++]) && !b.isPropagationStopped()) b.type = g > 1 ? j : n.bindType || p, m = (W.get(h, "events") || {})[b.type] && W.get(h, "handle"), m && m.apply(h, c), m = k && h[k], m && m.apply && U(h) && (b.result = m.apply(h, c), b.result === !1 && b.preventDefault()); return b.type = p, f || b.isDefaultPrevented() || n._default && n._default.apply(o.pop(), c) !== !1 || !U(e) || k && r.isFunction(e[p]) && !r.isWindow(e) && (i = e[k], i && (e[k] = null), r.event.triggered = p, e[p](), r.event.triggered = void 0, i && (e[k] = i)), b.result } }, simulate: function (a, b, c) { var d = r.extend(new r.Event, c, { type: a, isSimulated: !0 }); r.event.trigger(d, null, b) } }), r.fn.extend({ trigger: function (a, b) { return this.each(function () { r.event.trigger(a, b, this) }) }, triggerHandler: function (a, b) { var c = this[0]; if (c) return r.event.trigger(a, b, c, !0) } }), r.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "), function (a, b) { r.fn[b] = function (a, c) { return arguments.length > 0 ? this.on(b, null, a, c) : this.trigger(b) } }), r.fn.extend({ hover: function (a, b) { return this.mouseenter(a).mouseleave(b || a) } }), o.focusin = "onfocusin" in a, o.focusin || r.each({ focus: "focusin", blur: "focusout" }, function (a, b) { var c = function (a) { r.event.simulate(b, a.target, r.event.fix(a)) }; r.event.special[b] = { setup: function () { var d = this.ownerDocument || this, e = W.access(d, b); e || d.addEventListener(a, c, !0), W.access(d, b, (e || 0) + 1) }, teardown: function () { var d = this.ownerDocument || this, e = W.access(d, b) - 1; e ? W.access(d, b, e) : (d.removeEventListener(a, c, !0), W.remove(d, b)) } } }); var tb = a.location, ub = r.now(), vb = /\?/; r.parseXML = function (b) { var c; if (!b || "string" != typeof b) return null; try { c = (new a.DOMParser).parseFromString(b, "text/xml") } catch (d) { c = void 0 } return c && !c.getElementsByTagName("parsererror").length || r.error("Invalid XML: " + b), c }; var wb = /\[\]$/, xb = /\r?\n/g, yb = /^(?:submit|button|image|reset|file)$/i, zb = /^(?:input|select|textarea|keygen)/i; function Ab(a, b, c, d) { var e; if (Array.isArray(b)) r.each(b, function (b, e) { c || wb.test(a) ? d(a, e) : Ab(a + "[" + ("object" == typeof e && null != e ? b : "") + "]", e, c, d) }); else if (c || "object" !== r.type(b)) d(a, b); else for (e in b) Ab(a + "[" + e + "]", b[e], c, d) } r.param = function (a, b) { var c, d = [], e = function (a, b) { var c = r.isFunction(b) ? b() : b; d[d.length] = encodeURIComponent(a) + "=" + encodeURIComponent(null == c ? "" : c) }; if (Array.isArray(a) || a.jquery && !r.isPlainObject(a)) r.each(a, function () { e(this.name, this.value) }); else for (c in a) Ab(c, a[c], b, e); return d.join("&") }, r.fn.extend({ serialize: function () { return r.param(this.serializeArray()) }, serializeArray: function () { return this.map(function () { var a = r.prop(this, "elements"); return a ? r.makeArray(a) : this }).filter(function () { var a = this.type; return this.name && !r(this).is(":disabled") && zb.test(this.nodeName) && !yb.test(a) && (this.checked || !ja.test(a)) }).map(function (a, b) { var c = r(this).val(); return null == c ? null : Array.isArray(c) ? r.map(c, function (a) { return { name: b.name, value: a.replace(xb, "\r\n") } }) : { name: b.name, value: c.replace(xb, "\r\n") } }).get() } }); var Bb = /%20/g, Cb = /#.*$/, Db = /([?&])_=[^&]*/, Eb = /^(.*?):[ \t]*([^\r\n]*)$/gm, Fb = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/, Gb = /^(?:GET|HEAD)$/, Hb = /^\/\//, Ib = {}, Jb = {}, Kb = "*/".concat("*"), Lb = d.createElement("a"); Lb.href = tb.href; function Mb(a) { return function (b, c) { "string" != typeof b && (c = b, b = "*"); var d, e = 0, f = b.toLowerCase().match(L) || []; if (r.isFunction(c)) while (d = f[e++]) "+" === d[0] ? (d = d.slice(1) || "*", (a[d] = a[d] || []).unshift(c)) : (a[d] = a[d] || []).push(c) } } function Nb(a, b, c, d) { var e = {}, f = a === Jb; function g(h) { var i; return e[h] = !0, r.each(a[h] || [], function (a, h) { var j = h(b, c, d); return "string" != typeof j || f || e[j] ? f ? !(i = j) : void 0 : (b.dataTypes.unshift(j), g(j), !1) }), i } return g(b.dataTypes[0]) || !e["*"] && g("*") } function Ob(a, b) { var c, d, e = r.ajaxSettings.flatOptions || {}; for (c in b) void 0 !== b[c] && ((e[c] ? a : d || (d = {}))[c] = b[c]); return d && r.extend(!0, a, d), a } function Pb(a, b, c) { var d, e, f, g, h = a.contents, i = a.dataTypes; while ("*" === i[0]) i.shift(), void 0 === d && (d = a.mimeType || b.getResponseHeader("Content-Type")); if (d) for (e in h) if (h[e] && h[e].test(d)) { i.unshift(e); break } if (i[0] in c) f = i[0]; else { for (e in c) { if (!i[0] || a.converters[e + " " + i[0]]) { f = e; break } g || (g = e) } f = f || g } if (f) return f !== i[0] && i.unshift(f), c[f] } function Qb(a, b, c, d) { var e, f, g, h, i, j = {}, k = a.dataTypes.slice(); if (k[1]) for (g in a.converters) j[g.toLowerCase()] = a.converters[g]; f = k.shift(); while (f) if (a.responseFields[f] && (c[a.responseFields[f]] = b), !i && d && a.dataFilter && (b = a.dataFilter(b, a.dataType)), i = f, f = k.shift()) if ("*" === f) f = i; else if ("*" !== i && i !== f) { if (g = j[i + " " + f] || j["* " + f], !g) for (e in j) if (h = e.split(" "), h[1] === f && (g = j[i + " " + h[0]] || j["* " + h[0]])) { g === !0 ? g = j[e] : j[e] !== !0 && (f = h[0], k.unshift(h[1])); break } if (g !== !0) if (g && a["throws"]) b = g(b); else try { b = g(b) } catch (l) { return { state: "parsererror", error: g ? l : "No conversion from " + i + " to " + f } } } return { state: "success", data: b } } r.extend({ active: 0, lastModified: {}, etag: {}, ajaxSettings: { url: tb.href, type: "GET", isLocal: Fb.test(tb.protocol), global: !0, processData: !0, async: !0, contentType: "application/x-www-form-urlencoded; charset=UTF-8", accepts: { "*": Kb, text: "text/plain", html: "text/html", xml: "application/xml, text/xml", json: "application/json, text/javascript" }, contents: { xml: /\bxml\b/, html: /\bhtml/, json: /\bjson\b/ }, responseFields: { xml: "responseXML", text: "responseText", json: "responseJSON" }, converters: { "* text": String, "text html": !0, "text json": JSON.parse, "text xml": r.parseXML }, flatOptions: { url: !0, context: !0 } }, ajaxSetup: function (a, b) { return b ? Ob(Ob(a, r.ajaxSettings), b) : Ob(r.ajaxSettings, a) }, ajaxPrefilter: Mb(Ib), ajaxTransport: Mb(Jb), ajax: function (b, c) { "object" == typeof b && (c = b, b = void 0), c = c || {}; var e, f, g, h, i, j, k, l, m, n, o = r.ajaxSetup({}, c), p = o.context || o, q = o.context && (p.nodeType || p.jquery) ? r(p) : r.event, s = r.Deferred(), t = r.Callbacks("once memory"), u = o.statusCode || {}, v = {}, w = {}, x = "canceled", y = { readyState: 0, getResponseHeader: function (a) { var b; if (k) { if (!h) { h = {}; while (b = Eb.exec(g)) h[b[1].toLowerCase()] = b[2] } b = h[a.toLowerCase()] } return null == b ? null : b }, getAllResponseHeaders: function () { return k ? g : null }, setRequestHeader: function (a, b) { return null == k && (a = w[a.toLowerCase()] = w[a.toLowerCase()] || a, v[a] = b), this }, overrideMimeType: function (a) { return null == k && (o.mimeType = a), this }, statusCode: function (a) { var b; if (a) if (k) y.always(a[y.status]); else for (b in a) u[b] = [u[b], a[b]]; return this }, abort: function (a) { var b = a || x; return e && e.abort(b), A(0, b), this } }; if (s.promise(y), o.url = ((b || o.url || tb.href) + "").replace(Hb, tb.protocol + "//"), o.type = c.method || c.type || o.method || o.type, o.dataTypes = (o.dataType || "*").toLowerCase().match(L) || [""], null == o.crossDomain) { j = d.createElement("a"); try { j.href = o.url, j.href = j.href, o.crossDomain = Lb.protocol + "//" + Lb.host != j.protocol + "//" + j.host } catch (z) { o.crossDomain = !0 } } if (o.data && o.processData && "string" != typeof o.data && (o.data = r.param(o.data, o.traditional)), Nb(Ib, o, c, y), k) return y; l = r.event && o.global, l && 0 === r.active++ && r.event.trigger("ajaxStart"), o.type = o.type.toUpperCase(), o.hasContent = !Gb.test(o.type), f = o.url.replace(Cb, ""), o.hasContent ? o.data && o.processData && 0 === (o.contentType || "").indexOf("application/x-www-form-urlencoded") && (o.data = o.data.replace(Bb, "+")) : (n = o.url.slice(f.length), o.data && (f += (vb.test(f) ? "&" : "?") + o.data, delete o.data), o.cache === !1 && (f = f.replace(Db, "$1"), n = (vb.test(f) ? "&" : "?") + "_=" + ub++ + n), o.url = f + n), o.ifModified && (r.lastModified[f] && y.setRequestHeader("If-Modified-Since", r.lastModified[f]), r.etag[f] && y.setRequestHeader("If-None-Match", r.etag[f])), (o.data && o.hasContent && o.contentType !== !1 || c.contentType) && y.setRequestHeader("Content-Type", o.contentType), y.setRequestHeader("Accept", o.dataTypes[0] && o.accepts[o.dataTypes[0]] ? o.accepts[o.dataTypes[0]] + ("*" !== o.dataTypes[0] ? ", " + Kb + "; q=0.01" : "") : o.accepts["*"]); for (m in o.headers) y.setRequestHeader(m, o.headers[m]); if (o.beforeSend && (o.beforeSend.call(p, y, o) === !1 || k)) return y.abort(); if (x = "abort", t.add(o.complete), y.done(o.success), y.fail(o.error), e = Nb(Jb, o, c, y)) { if (y.readyState = 1, l && q.trigger("ajaxSend", [y, o]), k) return y; o.async && o.timeout > 0 && (i = a.setTimeout(function () { y.abort("timeout") }, o.timeout)); try { k = !1, e.send(v, A) } catch (z) { if (k) throw z; A(-1, z) } } else A(-1, "No Transport"); function A(b, c, d, h) { var j, m, n, v, w, x = c; k || (k = !0, i && a.clearTimeout(i), e = void 0, g = h || "", y.readyState = b > 0 ? 4 : 0, j = b >= 200 && b < 300 || 304 === b, d && (v = Pb(o, y, d)), v = Qb(o, v, y, j), j ? (o.ifModified && (w = y.getResponseHeader("Last-Modified"), w && (r.lastModified[f] = w), w = y.getResponseHeader("etag"), w && (r.etag[f] = w)), 204 === b || "HEAD" === o.type ? x = "nocontent" : 304 === b ? x = "notmodified" : (x = v.state, m = v.data, n = v.error, j = !n)) : (n = x, !b && x || (x = "error", b < 0 && (b = 0))), y.status = b, y.statusText = (c || x) + "", j ? s.resolveWith(p, [m, x, y]) : s.rejectWith(p, [y, x, n]), y.statusCode(u), u = void 0, l && q.trigger(j ? "ajaxSuccess" : "ajaxError", [y, o, j ? m : n]), t.fireWith(p, [y, x]), l && (q.trigger("ajaxComplete", [y, o]), --r.active || r.event.trigger("ajaxStop"))) } return y }, getJSON: function (a, b, c) { return r.get(a, b, c, "json") }, getScript: function (a, b) { return r.get(a, void 0, b, "script") } }), r.each(["get", "post"], function (a, b) { r[b] = function (a, c, d, e) { return r.isFunction(c) && (e = e || d, d = c, c = void 0), r.ajax(r.extend({ url: a, type: b, dataType: e, data: c, success: d }, r.isPlainObject(a) && a)) } }), r._evalUrl = function (a) { return r.ajax({ url: a, type: "GET", dataType: "script", cache: !0, async: !1, global: !1, "throws": !0 }) }, r.fn.extend({ wrapAll: function (a) { var b; return this[0] && (r.isFunction(a) && (a = a.call(this[0])), b = r(a, this[0].ownerDocument).eq(0).clone(!0), this[0].parentNode && b.insertBefore(this[0]), b.map(function () { var a = this; while (a.firstElementChild) a = a.firstElementChild; return a }).append(this)), this }, wrapInner: function (a) { return r.isFunction(a) ? this.each(function (b) { r(this).wrapInner(a.call(this, b)) }) : this.each(function () { var b = r(this), c = b.contents(); c.length ? c.wrapAll(a) : b.append(a) }) }, wrap: function (a) { var b = r.isFunction(a); return this.each(function (c) { r(this).wrapAll(b ? a.call(this, c) : a) }) }, unwrap: function (a) { return this.parent(a).not("body").each(function () { r(this).replaceWith(this.childNodes) }), this } }), r.expr.pseudos.hidden = function (a) { return !r.expr.pseudos.visible(a) }, r.expr.pseudos.visible = function (a) { return !!(a.offsetWidth || a.offsetHeight || a.getClientRects().length) }, r.ajaxSettings.xhr = function () { try { return new a.XMLHttpRequest } catch (b) { } }; var Rb = { 0: 200, 1223: 204 }, Sb = r.ajaxSettings.xhr(); o.cors = !!Sb && "withCredentials" in Sb, o.ajax = Sb = !!Sb, r.ajaxTransport(function (b) { var c, d; if (o.cors || Sb && !b.crossDomain) return { send: function (e, f) { var g, h = b.x
vendor: 9,046 bytes, lines 11-16
11hr(); if (h.open(b.type, b.url, b.async, b.username, b.password), b.xhrFields) for (g in b.xhrFields) h[g] = b.xhrFields[g]; b.mimeType && h.overrideMimeType && h.overrideMimeType(b.mimeType), b.crossDomain || e["X-Requested-With"] || (e["X-Requested-With"] = "XMLHttpRequest"); for (g in e) h.setRequestHeader(g, e[g]); c = function (a) { return function () { c && (c = d = h.onload = h.onerror = h.onabort = h.onreadystatechange = null, "abort" === a ? h.abort() : "error" === a ? "number" != typeof h.status ? f(0, "error") : f(h.status, h.statusText) : f(Rb[h.status] || h.status, h.statusText, "text" !== (h.responseType || "text") || "string" != typeof h.responseText ? { binary: h.response } : { text: h.responseText }, h.getAllResponseHeaders())) } }, h.onload = c(), d = h.onerror = c("error"), void 0 !== h.onabort ? h.onabort = d : h.onreadystatechange = function () { 4 === h.readyState && a.setTimeout(function () { c && d() }) }, c = c("abort"); try { h.send(b.hasContent && b.data || null) } catch (i) { if (c) throw i } }, abort: function () { c && c() } } }), r.ajaxPrefilter(function (a) { a.crossDomain && (a.contents.script = !1) }), r.ajaxSetup({ accepts: { script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript" }, contents: { script: /\b(?:java|ecma)script\b/ }, converters: { "text script": function (a) { return r.globalEval(a), a } } }), r.ajaxPrefilter("script", function (a) { void 0 === a.cache && (a.cache = !1), a.crossDomain && (a.type = "GET") }), r.ajaxTransport("script", function (a) { if (a.crossDomain) { var b, c; return { send: function (e, f) { b = r("<script>").prop({ charset: a.scriptCharset, src: a.url }).on("load error", c = function (a) { b.remove(), c = null, a && f("error" === a.type ? 404 : 200, a.type) }), d.head.appendChild(b[0]) }, abort: function () { c && c() } } } }); var Tb = [], Ub = /(=)\?(?=&|$)|\?\?/; r.ajaxSetup({ jsonp: "callback", jsonpCallback: function () { var a = Tb.pop() || r.expando + "_" + ub++; return this[a] = !0, a } }), r.ajaxPrefilter("json jsonp", function (b, c, d) { var e, f, g, h = b.jsonp !== !1 && (Ub.test(b.url) ? "url" : "string" == typeof b.data && 0 === (b.contentType || "").indexOf("application/x-www-form-urlencoded") && Ub.test(b.data) && "data"); if (h || "jsonp" === b.dataTypes[0]) return e = b.jsonpCallback = r.isFunction(b.jsonpCallback) ? b.jsonpCallback() : b.jsonpCallback, h ? b[h] = b[h].replace(Ub, "$1" + e) : b.jsonp !== !1 && (b.url += (vb.test(b.url) ? "&" : "?") + b.jsonp + "=" + e), b.converters["script json"] = function () { return g || r.error(e + " was not called"), g[0] }, b.dataTypes[0] = "json", f = a[e], a[e] = function () { g = arguments }, d.always(function () { void 0 === f ? r(a).removeProp(e) : a[e] = f, b[e] && (b.jsonpCallback = c.jsonpCallback, Tb.push(e)), g && r.isFunction(f) && f(g[0]), g = f = void 0 }), "script" }), o.createHTMLDocument = function () { var a = d.implementation.createHTMLDocument("").body; return a.innerHTML = "<form></form><form></form>", 2 === a.childNodes.length }(), r.parseHTML = function (a, b, c) { if ("string" != typeof a) return []; "boolean" == typeof b && (c = b, b = !1); var e, f, g; return b || (o.createHTMLDocument ? (b = d.implementation.createHTMLDocument(""), e = b.createElement("base"), e.href = d.location.href, b.head.appendChild(e)) : b = d), f = C.exec(a), g = !c && [], f ? [b.createElement(f[1])] : (f = qa([a], b, g), g && g.length && r(g).remove(), r.merge([], f.childNodes)) }, r.fn.load = function (a, b, c) { var d, e, f, g = this, h = a.indexOf(" "); return h > -1 && (d = pb(a.slice(h)), a = a.slice(0, h)), r.isFunction(b) ? (c = b, b = void 0) : b && "object" == typeof b && (e = "POST"), g.length > 0 && r.ajax({ url: a, type: e || "GET", dataType: "html", data: b }).done(function (a) { f = arguments, g.html(d ? r("<div>").append(r.parseHTML(a)).find(d) : a) }).always(c && function (a, b) { g.each(function () { c.apply(this, f || [a.responseText, b, a]) }) }), this }, r.each(["ajaxStart", "ajaxStop", "ajaxComplete", "ajaxError", "ajaxSuccess", "ajaxSend"], function (a, b) { r.fn[b] = function (a) { return this.on(b, a) } }), r.expr.pseudos.animated = function (a) { return r.grep(r.timers, function (b) { return a === b.elem }).length }, r.offset = { setOffset: function (a, b, c) { var d, e, f, g, h, i, j, k = r.css(a, "position"), l = r(a), m = {}; "static" === k && (a.style.position = "relative"), h = l.offset(), f = r.css(a, "top"), i = r.css(a, "left"), j = ("absolute" === k || "fixed" === k) && (f + i).indexOf("auto") > -1, j ? (d = l.position(), g = d.top, e = d.left) : (g = parseFloat(f) || 0, e = parseFloat(i) || 0), r.isFunction(b) && (b = b.call(a, c, r.extend({}, h))), null != b.top && (m.top = b.top - h.top + g), null != b.left && (m.left = b.left - h.left + e), "using" in b ? b.using.call(a, m) : l.css(m) } }, r.fn.extend({ offset: function (a) { if (arguments.length) return void 0 === a ? this : this.each(function (b) { r.offset.setOffset(this, a, b) }); var b, c, d, e, f = this[0]; if (f) return f.getClientRects().length ? (d = f.getBoundingClientRect(), b = f.ownerDocument, c = b.documentElement, e = b.defaultView, { top: d.top + e.pageYOffset - c.clientTop, left: d.left + e.pageXOffset - c.clientLeft }) : { top: 0, left: 0 } }, position: function () { if (this[0]) { var a, b, c = this[0], d = { top: 0, left: 0 }; return "fixed" === r.css(c, "position") ? b = c.getBoundingClientRect() : (a = this.offsetParent(), b = this.offset(), B(a[0], "html") || (d = a.offset()), d = { top: d.top + r.css(a[0], "borderTopWidth", !0), left: d.left + r.css(a[0], "borderLeftWidth", !0) }), { top: b.top - d.top - r.css(c, "marginTop", !0), left: b.left - d.left - r.css(c, "marginLeft", !0) } } }, offsetParent: function () { return this.map(function () { var a = this.offsetParent; while (a && "static" === r.css(a, "position")) a = a.offsetParent; return a || ra }) } }), r.each({ scrollLeft: "pageXOffset", scrollTop: "pageYOffset" }, function (a, b) { var c = "pageYOffset" === b; r.fn[a] = function (d) { return T(this, function (a, d, e) { var f; return r.isWindow(a) ? f = a : 9 === a.nodeType && (f = a.defaultView), void 0 === e ? f ? f[b] : a[d] : void (f ? f.scrollTo(c ? f.pageXOffset : e, c ? e : f.pageYOffset) : a[d] = e) }, a, d, arguments.length) } }), r.each(["top", "left"], function (a, b) { r.cssHooks[b] = Pa(o.pixelPosition, function (a, c) { if (c) return c = Oa(a, b), Ma.test(c) ? r(a).position()[b] + "px" : c }) }), r.each({ Height: "height", Width: "width" }, function (a, b) { r.each({ padding: "inner" + a, content: b, "": "outer" + a }, function (c, d) { r.fn[d] = function (e, f) { var g = arguments.length && (c || "boolean" != typeof e), h = c || (e === !0 || f === !0 ? "margin" : "border"); return T(this, function (b, c, e) { var f; return r.isWindow(b) ? 0 === d.indexOf("outer") ? b["inner" + a] : b.document.documentElement["client" + a] : 9 === b.nodeType ? (f = b.documentElement, Math.max(b.body["scroll" + a], f["scroll" + a], b.body["offset" + a], f["offset" + a], f["client" + a])) : void 0 === e ? r.css(b, c, h) : r.style(b, c, e, h) }, b, g ? e : void 0, g) } }) }), r.fn.extend({ bind: function (a, b, c) { return this.on(a, null, b, c) }, unbind: function (a, b) { return this.off(a, null, b) }, delegate: function (a, b, c, d) { return this.on(b, a, c, d) }, undelegate: function (a, b, c) { return 1 === arguments.length ? this.off(a, "**") : this.off(b, a || "**", c) } }), r.holdReady = function (a) { a ? r.readyWait++ : r.ready(!0) }, r.isArray = Array.isArray, r.parseJSON = JSON.parse, r.nodeName = B, "function" == typeof define && define.amd && define("jquery", [], function () { return r }); var Vb = a.jQuery, Wb = a.$; return r.noConflict = function (b) { return a.$ === r && (a.$ = Wb), b && a.jQuery === r && (a.jQuery = Vb), r }, b || (a.jQuery = a.$ = r), r
12});
13
14/*! modernizr 3.6.0 (Custom Build) | MIT *
15 * https://modernizr.com/download/?-cssanimations-setclasses !*/
16!function (e, n, t) { function r(e, n) { return typeof e === n } function o() { var e, n, t, o, s, i, a; for (var l in S) if (S.hasOwnProperty(l)) { if (e = [], n = S[l], n.name && (e.push(n.name.toLowerCase()), n.options && n.options.aliases && n.options.aliases.length)) for (t = 0; t < n.options.aliases.length; t++)e.push(n.options.aliases[t].toLowerCase()); for (o = r(n.fn, "function") ? n.fn() : n.fn, s = 0; s < e.length; s++)i = e[s], a = i.split("."), 1 === a.length ? Modernizr[a[0]] = o : (!Modernizr[a[0]] || Modernizr[a[0]] instanceof Boolean || (Modernizr[a[0]] = new Boolean(Modernizr[a[0]])), Modernizr[a[0]][a[1]] = o), C.push((o ? "" : "no-") + a.join("-")) } } function s(e) { var n = _.className, t = Modernizr._config.classPrefix || ""; if (x && (n = n.baseVal), Modernizr._config.enableJSClass) { var r = new RegExp("(^|\\s)" + t + "no-js(\\s|$)"); n = n.replace(r, "$1" + t + "js$2") } Modernizr._config.enableClasses && (n += " " + t + e.join(" " + t), x ? _.className.baseVal = n : _.className = n) }
vendor: 6,685 bytes, lines 16-23
16 function i(e, n) { return !!~("" + e).indexOf(n) } function a(e, n) { return function () { return e.apply(n, arguments) } } function l(e, n, t) { var o; for (var s in e) if (e[s] in n) return t === !1 ? e[s] : (o = n[e[s]], r(o, "function") ? a(o, t || n) : o); return !1 } function u() { return "function" != typeof n.createElement ? n.createElement(arguments[0]) : x ? n.createElementNS.call(n, "http://www.w3.org/2000/svg", arguments[0]) : n.createElement.apply(n, arguments) } function f(e) { return e.replace(/([a-z])-([a-z])/g, function (e, n, t) { return n + t.toUpperCase() }).replace(/^-/, "") } function c(e) { return e.replace(/([A-Z])/g, function (e, n) { return "-" + n.toLowerCase() }).replace(/^ms-/, "-ms-") } function d(n, t, r) { var o; if ("getComputedStyle" in e) { o = getComputedStyle.call(e, n, t); var s = e.console; if (null !== o) r && (o = o.getPropertyValue(r)); else if (s) { var i = s.error ? "error" : "log"; s[i].call(s, "getComputedStyle returning null, its possible modernizr test results are inaccurate") } } else o = !t && n.currentStyle && n.currentStyle[r]; return o } function p() { var e = n.body; return e || (e = u(x ? "svg" : "body"), e.fake = !0), e } function m(e, t, r, o) { var s, i, a, l, f = "modernizr", c = u("div"), d = p(); if (parseInt(r, 10)) for (; r--;)a = u("div"), a.id = o ? o[r] : f + (r + 1), c.appendChild(a); return s = u("style"), s.type = "text/css", s.id = "s" + f, (d.fake ? d : c).appendChild(s), d.appendChild(c), s.styleSheet ? s.styleSheet.cssText = e : s.appendChild(n.createTextNode(e)), c.id = f, d.fake && (d.style.background = "", d.style.overflow = "hidden", l = _.style.overflow, _.style.overflow = "hidden", _.appendChild(d)), i = t(c, e), d.fake ? (d.parentNode.removeChild(d), _.style.overflow = l, _.offsetHeight) : c.parentNode.removeChild(c), !!i } function y(n, r) { var o = n.length; if ("CSS" in e && "supports" in e.CSS) { for (; o--;)if (e.CSS.supports(c(n[o]), r)) return !0; return !1 } if ("CSSSupportsRule" in e) { for (var s = []; o--;)s.push("(" + c(n[o]) + ":" + r + ")"); return s = s.join(" or "), m("@supports (" + s + ") { #modernizr { position: absolute; } }", function (e) { return "absolute" == d(e, null, "position") }) } return t } function v(e, n, o, s) { function a() { c && (delete N.style, delete N.modElem) } if (s = r(s, "undefined") ? !1 : s, !r(o, "undefined")) { var l = y(e, o); if (!r(l, "undefined")) return l } for (var c, d, p, m, v, g = ["modernizr", "tspan", "samp"]; !N.style && g.length;)c = !0, N.modElem = u(g.shift()), N.style = N.modElem.style; for (p = e.length, d = 0; p > d; d++)if (m = e[d], v = N.style[m], i(m, "-") && (m = f(m)), N.style[m] !== t) { if (s || r(o, "undefined")) return a(), "pfx" == n ? m : !0; try { N.style[m] = o } catch (h) { } if (N.style[m] != v) return a(), "pfx" == n ? m : !0 } return a(), !1 } function g(e, n, t, o, s) { var i = e.charAt(0).toUpperCase() + e.slice(1), a = (e + " " + P.join(i + " ") + i).split(" "); return r(n, "string") || r(n, "undefined") ? v(a, n, o, s) : (a = (e + " " + z.join(i + " ") + i).split(" "), l(a, n, t)) } function h(e, n, r) { return g(e, t, t, n, r) } var C = [], S = [], w = { _version: "3.6.0", _config: { classPrefix: "", enableClasses: !0, enableJSClass: !0, usePrefixes: !0 }, _q: [], on: function (e, n) { var t = this; setTimeout(function () { n(t[e]) }, 0) }, addTest: function (e, n, t) { S.push({ name: e, fn: n, options: t }) }, addAsyncTest: function (e) { S.push({ name: null, fn: e }) } }, Modernizr = function () { }; Modernizr.prototype = w, Modernizr = new Modernizr; var _ = n.documentElement, x = "svg" === _.nodeName.toLowerCase(), b = "Moz O ms Webkit", P = w._config.usePrefixes ? b.split(" ") : []; w._cssomPrefixes = P; var z = w._config.usePrefixes ? b.toLowerCase().split(" ") : []; w._domPrefixes = z; var E = { elem: u("modernizr") }; Modernizr._q.push(function () { delete E.elem }); var N = { style: E.elem.style }; Modernizr._q.unshift(function () { delete N.style }), w.testAllProps = g, w.testAllProps = h, Modernizr.addTest("cssanimations", h("animationName", "a", !0)), o(), s(C), delete w.addTest, delete w.addAsyncTest; for (var T = 0; T < Modernizr._q.length; T++)Modernizr._q[T](); e.Modernizr = Modernizr }(window, document);
17/*! jQuery UI - v1.12.1 - 2018-01-19
18* http://jqueryui.com
19* Includes: widget.js, position.js, data.js, disable-selection.js, focusable.js, form-reset-mixin.js, jquery-1-7.js, keycode.js, labels.js, scroll-parent.js, tabbable.js, unique-id.js, widgets/draggable.js, widgets/droppable.js, widgets/resizable.js, widgets/selectable.js, widgets/sortable.js, widgets/accordion.js, widgets/autocomplete.js, widgets/button.js, widgets/checkboxradio.js, widgets/controlgroup.js, widgets/datepicker.js, widgets/dialog.js, widgets/menu.js, widgets/mouse.js, widgets/progressbar.js, widgets/selectmenu.js, widgets/slider.js, widgets/spinner.js, widgets/tabs.js, widgets/tooltip.js, effect.js, effects/effect-blind.js, effects/effect-bounce.js, effects/effect-clip.js, effects/effect-drop.js, effects/effect-explode.js, effects/effect-fade.js, effects/effect-fold.js, effects/effect-highlight.js, effects/effect-puff.js, effects/effect-pulsate.js, effects/effect-scale.js, effects/effect-shake.js, effects/effect-size.js, effects/effect-slide.js, effects/effect-transfer.js
20* Copyright jQuery Foundation and other contributors; Licensed MIT */
21
22(function (t) { "function" == typeof define && define.amd ? define(["jquery"], t) : t(jQuery) })(function (t) {
23    function e(t) { for (var e = t.css("visibility"); "inherit" === e;)t = t.parent(), e = t.css("visibility"); return "hidden" !== e } function i(t) { for (var e, i; t.length && t[0] !== document;) { if (e = t.css("position"), ("absolute" === e || "relative" === e || "fixed" === e) && (i = parseInt(t.css("zIndex"), 10), !isNaN(i) && 0 !== i)) return i; t = t.parent() } return 0 } function s() { this._curInst = null, this._keyEvent = !1, this._disabledInputs = [], this._datepickerShowing = !1, this._inDialog = !1, this._mainDivId = "ui-datepicker-div", this._inlineClass = "ui-datepicker-inline", this._appendClass = "ui-datepicker-append", this._triggerClass = "ui-datepicker-trigger", this._dialogClass = "ui-datepicker-dialog", this._disableClass = "ui-datepicker-disabled", this._unselectableClass = "ui-datepicker-unselectable", this._currentClass = "ui-datepicker-current-day", this._dayOverClass = "ui-datepicker-days-cell-over", this.regional = [], this.regional[""] = { closeText: "Done", prevText: "Prev", nextText: "Next", currentText: "Today", monthNames: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "
23November", "December"], monthNamesShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], dayNames: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], dayNamesShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], dayNamesMin: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"], weekHeader: "Wk", dateFormat: "mm/dd/yy", firstDay: 0, isRTL: !1, showMonthAfterYear: !1, yearSuffix: "" }, this._defaults = { showOn: "focus", showAnim: "fadeIn", showOptions: {}, defaultDate: null, appendText: "", buttonText: "...", buttonImage: "", buttonImageOnly: !1, hideIfNoPrevNext: !1, navigationAsDateFormat: !1, gotoCurrent: !1, changeMonth: !1, changeYear: !1, yearRange: "c-10:c+10", showOtherMonths: !1, selectOtherMonths: !1, showWeek: !1, calculateWeek: this.iso8601Week, shortYearCutoff: "+10", minDate: null, maxDate: null, duration: "fast", beforeShowDay: null, beforeShow: null, onSelect: null, onChangeMonthYear: null, onClose: null, numberOfMonths: 1, showCurrentAtPos: 0, stepMonths: 1, stepBigMonths: 12, altField: "", altFormat: "", constrainInput: !0, showButtonPanel: !1, autoSize: !1, disabled: !1 }, t.extend(this._defaults, this.regional[""]), this.regional.en = t.extend(!0, {}, this.regional[""]), this.regional["en-US"] = t.extend(!0, {}, this.regional.en), this.dpDiv = n(t("<div id='" + this._mainDivId + "' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")) } function n(e) { var i = "button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a"; return e.on("mouseout", i, function () { t(this).removeClass("ui-state-hover"), -1 !== this.className.indexOf("ui-datepicker-prev") && t(this).removeClass("ui-datepicker-prev-hover"), -1 !== this.className.indexOf("ui-datepicker-next") && t(this).removeClass("ui-datepicker-next-hover") }).on("mouseover", i, o) } function o() { t.datepicker._isDisabledDatepicker(p.inline ? p.dpDiv.parent()[0] : p.input[0]) || (t(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"), t(this).addClass("ui-state-hover"), -1 !== this.className.indexOf("ui-datepicker-prev") && t(this).addClass("ui-datepicker-prev-hover"), -1 !== this.className.indexOf("ui-datepicker-next") && t(this).addClass("ui-datepicker-next-hover")) } function a(e, i) { t.extend(e, i); for (var s in i) null == i[s] && (e[s] = i[s]); return e } function r(t) { return function () { var e = this.element.val(); t.apply(this, arguments), this._refresh(), e !== this.element.val() && this._trigger("change") } } t.ui = t.ui || {}, t.ui.version = "1.12.1"; var l = 0, h = Array.prototype.slice; t.cleanData = function (e) { return function (i) { var s, n, o; for (o = 0; null != (n = i[o]); o++)try { s = t._data(n, "events"), s && s.remove && t(n).triggerHandler("remove") } catch (a) { } e(i) } }(t.cleanData), t.widget = function (e, i, s) { var n, o, a, r = {}, l = e.split(".")[0]; e = e.split(".")[1]; var h = l + "-" + e; return s || (s = i, i = t.Widget), t.isArray(s) && (s = t.extend.apply(null, [{}].concat(s))), t.expr[":"][h.toLowerCase()] = function (e) { return !!t.data(e, h) }, t[l] = t[l] || {}
vendor: 6,194 bytes, line 23
23, n = t[l][e], o = t[l][e] = function (t, e) { return this._createWidget ? (arguments.length && this._createWidget(t, e), void 0) : new o(t, e) }, t.extend(o, n, { version: s.version, _proto: t.extend({}, s), _childConstructors: [] }), a = new i, a.options = t.widget.extend({}, a.options), t.each(s, function (e, s) { return t.isFunction(s) ? (r[e] = function () { function t() { return i.prototype[e].apply(this, arguments) } function n(t) { return i.prototype[e].apply(this, t) } return function () { var e, i = this._super, o = this._superApply; return this._super = t, this._superApply = n, e = s.apply(this, arguments), this._super = i, this._superApply = o, e } }(), void 0) : (r[e] = s, void 0) }), o.prototype = t.widget.extend(a, { widgetEventPrefix: n ? a.widgetEventPrefix || e : e }, r, { constructor: o, namespace: l, widgetName: e, widgetFullName: h }), n ? (t.each(n._childConstructors, function (e, i) { var s = i.prototype; t.widget(s.namespace + "." + s.widgetName, o, i._proto) }), delete n._childConstructors) : i._childConstructors.push(o), t.widget.bridge(e, o), o }, t.widget.extend = function (e) { for (var i, s, n = h.call(arguments, 1), o = 0, a = n.length; a > o; o++)for (i in n[o]) s = n[o][i], n[o].hasOwnProperty(i) && void 0 !== s && (e[i] = t.isPlainObject(s) ? t.isPlainObject(e[i]) ? t.widget.extend({}, e[i], s) : t.widget.extend({}, s) : s); return e }, t.widget.bridge = function (e, i) { var s = i.prototype.widgetFullName || e; t.fn[e] = function (n) { var o = "string" == typeof n, a = h.call(arguments, 1), r = this; return o ? this.length || "instance" !== n ? this.each(function () { var i, o = t.data(this, s); return "instance" === n ? (r = o, !1) : o ? t.isFunction(o[n]) && "_" !== n.charAt(0) ? (i = o[n].apply(o, a), i !== o && void 0 !== i ? (r = i && i.jquery ? r.pushStack(i.get()) : i, !1) : void 0) : t.error("no such method '" + n + "' for " + e + " widget instance") : t.error("cannot call methods on " + e + " prior to initialization; " + "attempted to call method '" + n + "'") }) : r = void 0 : (a.length && (n = t.widget.extend.apply(null, [n].concat(a))), this.each(function () { var e = t.data(this, s); e ? (e.option(n || {}), e._init && e._init()) : t.data(this, s, new i(n, this)) })), r } }, t.Widget = function () { }, t.Widget._childConstructors = [], t.Widget.prototype = { widgetName: "widget", widgetEventPrefix: "", defaultElement: "<div>", options: { classes: {}, disabled: !1, create: null }, _createWidget: function (e, i) { i = t(i || this.defaultElement || this)[0], this.element = t(i), this.uuid = l++, this.eventNamespace = "." + this.widgetName + this.uuid, this.bindings = t(), this.hoverable = t(), this.focusable = t(), this.classesElementLookup = {}, i !== this && (t.data(i, this.widgetFullName, this), this._on(!0, this.element, { remove: function (t) { t.target === i && this.destroy() } }), this.document = t(i.style ? i.ownerDocument : i.document || i), this.window = t(this.document[0].defaultView || this.document[0].parentWindow)), this.options = t.widget.extend({}, this.options, this._getCreateOptions(), e), this._create(), this.options.disabled && this._setOptionDisabled(this.options.disabled), this._trigger("create", null, this._getCreateEventData()), this._init() }, _getCreateOptions: function () { return {} }, _getCreateEventData: t.noop, _create: t.noop, _init: t.noop, destroy: function () { var e = this; this._destroy(), t.each(this.classesElementLookup, function (t, i) { e._removeClass(i, t) }), this.element.off(this.eventNamespace).removeData(this.widgetFullName), this.widget().off(this.eventNamespace).removeAttr("aria-disabled"), this.bindings.off(this.eventNamespace) }, _destroy: t.noop, widget: function () { return this.element }, option: function (e, i) { var s, n, o, a = e; if (0 === arguments.length) return t.widget.extend({}, this.options); if ("string" == typeof e) if (a = {}, s = e.split("."), e = s.shift(), s.length) { for (n = a[e] = t.widget.extend({}, this.options[e]), o = 0; s.length - 1 > o; o++)n[s[o]] = n[s[o]] || {}, n = n[s[o]]; if (e = s.pop(), 1 === arguments.length) return void 0 === n[e] ? null : n[e]; n[e] = i } else { if (1 === arguments.length) return void 0 === this.options[e] ? null : this.options[e]; a[e] = i } return this._setOptions(a), this }, _setOptions: function (t) { var e; for (e in t) this._setOption(e, t[e]); return this }, _setOption: function (t, e) { return "classes" === t && this._setOptionClasses(e), this.options[t] = e, "disabled" === t && this._setOptionDisabled(e), this }, _setOptionClasses: function (e) { var i, s, n; for (i in e) n = this.classesElementLookup[i], e[i] !== this.options.classes[i] && n && n.length && (s = t(n.get()), this._removeClass(n, i), s.addClass(this._classes({ element: s, keys: i, classes: e, add: !0 }))) }, _setOptionDisabled: function (t) { 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")) }, enable: function () { return this._setOptions({ disabled: !1 }) }, disable: function () { return this._setOptions({ disabled: !0 }) }, _classes: function (e) { function i(i, o) { var a, r; for (r = 0; i.length > r; r++)a = n.classesElementLookup[i[r]] || t(), a = e.add ? t(t.unique(a.get().concat(e.element.get()))) : t(a.not(e.element).get()), n.classesElementLookup[i[r]] = a, s.push(i[r]), o && e.classes[i[r]] && s.push(e.classes[i[r]]) } var s = [], n = this; return e = t.extend({ element: this.element, classes: this.options.classes || {} }, e), this._on(e.element, { remove: "_untrackClassesElement" }), e.keys && i(e.keys.match(/\S+/g) || [], !0), e.extra && i(e.extra.match(/\S+/g) || []), s.join(" ") }, _untrackClassesElement: function (e) { var i = this; t.each(i.classesElementLookup, function (s, n) { -1 !== t.inArray(e.target, n) && (i.classesElementLookup[s] = t(n.not(e.target).get())) }) }, _removeClass: function (t, e, i) { return this._toggleClass(t, e, i, !1) }, _addClass: function (t, e, i) { return this._toggleClass(t, e, i, !0) }, _toggleClass: function (t, e, i, s) { s = "boolean" == typeof s ? s : i;
vendor: 13,025 bytes, line 23
23 var n = "string" == typeof t || null === t, o = { extra: n ? e : i, keys: n ? t : e, element: n ? this.element : t, add: s }; return o.element.toggleClass(this._classes(o), s), this }, _on: function (e, i, s) { var n, o = this; "boolean" != typeof e && (s = i, i = e, e = !1), s ? (i = n = t(i), this.bindings = this.bindings.add(i)) : (s = i, i = this.element, n = this.widget()), t.each(s, function (s, a) { function r() { return e || o.options.disabled !== !0 && !t(this).hasClass("ui-state-disabled") ? ("string" == typeof a ? o[a] : a).apply(o, arguments) : void 0 } "string" != typeof a && (r.guid = a.guid = a.guid || r.guid || t.guid++); var l = s.match(/^([\w:-]*)\s*(.*)$/), h = l[1] + o.eventNamespace, c = l[2]; c ? n.on(h, c, r) : i.on(h, r) }) }, _off: function (e, i) { i = (i || "").split(" ").join(this.eventNamespace + " ") + this.eventNamespace, e.off(i).off(i), this.bindings = t(this.bindings.not(e).get()), this.focusable = t(this.focusable.not(e).get()), this.hoverable = t(this.hoverable.not(e).get()) }, _delay: function (t, e) { function i() { return ("string" == typeof t ? s[t] : t).apply(s, arguments) } var s = this; return setTimeout(i, e || 0) }, _hoverable: function (e) { this.hoverable = this.hoverable.add(e), this._on(e, { mouseenter: function (e) { this._addClass(t(e.currentTarget), null, "ui-state-hover") }, mouseleave: function (e) { this._removeClass(t(e.currentTarget), null, "ui-state-hover") } }) }, _focusable: function (e) { this.focusable = this.focusable.add(e), this._on(e, { focusin: function (e) { this._addClass(t(e.currentTarget), null, "ui-state-focus") }, focusout: function (e) { this._removeClass(t(e.currentTarget), null, "ui-state-focus") } }) }, _trigger: function (e, i, s) { var n, o, a = this.options[e]; if (s = s || {}, i = t.Event(i), i.type = (e === this.widgetEventPrefix ? e : this.widgetEventPrefix + e).toLowerCase(), i.target = this.element[0], o = i.originalEvent) for (n in o) n in i || (i[n] = o[n]); return this.element.trigger(i, s), !(t.isFunction(a) && a.apply(this.element[0], [i].concat(s)) === !1 || i.isDefaultPrevented()) } }, t.each({ show: "fadeIn", hide: "fadeOut" }, function (e, i) { t.Widget.prototype["_" + e] = function (s, n, o) { "string" == typeof n && (n = { effect: n }); var a, r = n ? n === !0 || "number" == typeof n ? i : n.effect || i : e; n = n || {}, "number" == typeof n && (n = { duration: n }), a = !t.isEmptyObject(n), n.complete = o, n.delay && s.delay(n.delay), a && t.effects && t.effects.effect[r] ? s[e](n) : r !== e && s[r] ? s[r](n.duration, n.easing, o) : s.queue(function (i) { t(this)[e](), o && o.call(s[0]), i() }) } }), t.widget, function () { function e(t, e, i) { return [parseFloat(t[0]) * (u.test(t[0]) ? e / 100 : 1), parseFloat(t[1]) * (u.test(t[1]) ? i / 100 : 1)] } function i(e, i) { return parseInt(t.css(e, i), 10) || 0 } function s(e) { var i = e[0]; return 9 === i.nodeType ? { width: e.width(), height: e.height(), offset: { top: 0, left: 0 } } : t.isWindow(i) ? { width: e.width(), height: e.height(), offset: { top: e.scrollTop(), left: e.scrollLeft() } } : i.preventDefault ? { width: 0, height: 0, offset: { top: i.pageY, left: i.pageX } } : { width: e.outerWidth(), height: e.outerHeight(), offset: e.offset() } } var n, o = Math.max, a = Math.abs, r = /left|center|right/, l = /top|center|bottom/, h = /[\+\-]\d+(\.[\d]+)?%?/, c = /^\w+/, u = /%$/, d = t.fn.position; t.position = { scrollbarWidth: function () { if (void 0 !== n) return n; var e, i, s = t("<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"), o = s.children()[0]; return t("body").append(s), e = o.offsetWidth, s.css("overflow", "scroll"), i = o.offsetWidth, e === i && (i = s[0].clientWidth), s.remove(), n = e - i }, getScrollInfo: function (e) { var i = e.isWindow || e.isDocument ? "" : e.element.css("overflow-x"), s = e.isWindow || e.isDocument ? "" : e.element.css("overflow-y"), n = "scroll" === i || "auto" === i && e.width < e.element[0].scrollWidth, o = "scroll" === s || "auto" === s && e.height < e.element[0].scrollHeight; return { width: o ? t.position.scrollbarWidth() : 0, height: n ? t.position.scrollbarWidth() : 0 } }, getWithinInfo: function (e) { var i = t(e || window), s = t.isWindow(i[0]), n = !!i[0] && 9 === i[0].nodeType, o = !s && !n; return { element: i, isWindow: s, isDocument: n, offset: o ? t(e).offset() : { left: 0, top: 0 }, scrollLeft: i.scrollLeft(), scrollTop: i.scrollTop(), width: i.outerWidth(), height: i.outerHeight() } } }, t.fn.position = function (n) { if (!n || !n.of) return d.apply(this, arguments); n = t.extend({}, n); var u, p, f, g, m, _, v = t(n.of), b = t.position.getWithinInfo(n.within), y = t.position.getScrollInfo(b), w = (n.collision || "flip").split(" "), k = {}; return _ = s(v), v[0].preventDefault && (n.at = "left top"), p = _.width, f = _.height, g = _.offset, m = t.extend({}, g), t.each(["my", "at"], function () { var t, e, i = (n[this] || "").split(" "); 1 === i.length && (i = r.test(i[0]) ? i.concat(["center"]) : l.test(i[0]) ? ["center"].concat(i) : ["center", "center"]), i[0] = r.test(i[0]) ? i[0] : "center", i[1] = l.test(i[1]) ? i[1] : "center", t = h.exec(i[0]), e = h.exec(i[1]), k[this] = [t ? t[0] : 0, e ? e[0] : 0], n[this] = [c.exec(i[0])[0], c.exec(i[1])[0]] }), 1 === w.length && (w[1] = w[0]), "right" === n.at[0] ? m.left += p : "center" === n.at[0] && (m.left += p / 2), "bottom" === n.at[1] ? m.top += f : "center" === n.at[1] && (m.top += f / 2), u = e(k.at, p, f), m.left += u[0], m.top += u[1], this.each(function () { var s, r, l = t(this), h = l.outerWidth(), c = l.outerHeight(), d = i(this, "marginLeft"), _ = i(this, "marginTop"), x = h + d + i(this, "marginRight") + y.width, C = c + _ + i(this, "marginBottom") + y.height, D = t.extend({}, m), T = e(k.my, l.outerWidth(), l.outerHeight()); "right" === n.my[0] ? D.left -= h : "center" === n.my[0] && (D.left -= h / 2), "bottom" === n.my[1] ? D.top -= c : "center" === n.my[1] && (D.top -= c / 2), D.left += T[0], D.top += T[1], s = { marginLeft: d, marginTop: _ }, t.each(["left", "top"], function (e, i) { t.ui.position[w[e]] && t.ui.position[w[e]][i](D, { targetWidth: p, targetHeight: f, elemWidth: h, elemHeight: c, collisionPosition: s, collisionWidth: x, collisionHeight: C, offset: [u[0] + T[0], u[1] + T[1]], my: n.my, at: n.at, within: b, elem: l }) }), n.using && (r = function (t) { var e = g.left - D.left, i = e + p - h, s = g.top - D.top, r = s + f - c, u = { target: { element: v, left: g.left, top: g.top, width: p, height: f }, element: { element: l, left: D.left, top: D.top, width: h, height: c }, horizontal: 0 > i ? "left" : e > 0 ? "right" : "center", vertical: 0 > r ? "top" : s > 0 ? "bottom" : "middle" }; h > p && p > a(e + i) && (u.horizontal = "center"), c > f && f > a(s + r) && (u.vertical = "middle"), u.important = o(a(e), a(i)) > o(a(s), a(r)) ? "horizontal" : "vertical", n.using.call(this, t, u) }), l.offset(t.extend(D, { using: r })) }) }, t.ui.position = { fit: { left: function (t, e) { var i, s = e.within, n = s.isWindow ? s.scrollLeft : s.offset.left, a = s.width, r = t.left - e.collisionPosition.marginLeft, l = n - r, h = r + e.collisionWidth - a - n; e.collisionWidth > a ? l > 0 && 0 >= h ? (i = t.left + l + e.collisionWidth - a - n, t.left += l - i) : t.left = h > 0 && 0 >= l ? n : l > h ? n + a - e.collisionWidth : n : l > 0 ? t.left += l : h > 0 ? t.left -= h : t.left = o(t.left - r, t.left) }, top: function (t, e) { var i, s = e.within, n = s.isWindow ? s.scrollTop : s.offset.top, a = e.within.height, r = t.top - e.collisionPosition.marginTop, l = n - r, h = r + e.collisionHeight - a - n; e.collisionHeight > a ? l > 0 && 0 >= h ? (i = t.top + l + e.collisionHeight - a - n, t.top += l - i) : t.top = h > 0 && 0 >= l ? n : l > h ? n + a - e.collisionHeight : n : l > 0 ? t.top += l : h > 0 ? t.top -= h : t.top = o(t.top - r, t.top) } }, flip: { left: function (t, e) { var i, s, n = e.within, o = n.offset.left + n.scrollLeft, r = n.width, l = n.isWindow ? n.scrollLeft : n.offset.left, h = t.left - e.collisionPosition.marginLeft, c = h - l, u = h + e.collisionWidth - r - l, d = "left" === e.my[0] ? -e.elemWidth : "right" === e.my[0] ? e.elemWidth : 0, p = "left" === e.at[0] ? e.targetWidth : "right" === e.at[0] ? -e.targetWidth : 0, f = -2 * e.offset[0]; 0 > c ? (i = t.left + d + p + f + e.collisionWidth - r - o, (0 > i || a(c) > i) && (t.left += d + p + f)) : u > 0 && (s = t.left - e.collisionPosition.marginLeft + d + p + f - l, (s > 0 || u > a(s)) && (t.left += d + p + f)) }, top: function (t, e) { var i, s, n = e.within, o = n.offset.top + n.scrollTop, r = n.height, l = n.isWindow ? n.scrollTop : n.offset.top, h = t.top - e.collisionPosition.marginTop, c = h - l, u = h + e.collisionHeight - r - l, d = "top" === e.my[1], p = d ? -e.elemHeight : "bottom" === e.my[1] ? e.elemHeight : 0, f = "top" === e.at[1] ? e.targetHeight : "bottom" === e.at[1] ? -e.targetHeight : 0, g = -2 * e.offset[1]; 0 > c ? (s = t.top + p + f + g + e.collisionHeight - r - o, (0 > s || a(c) > s) && (t.top += p + f + g)) : u > 0 && (i = t.top - e.collisionPosition.marginTop + p + f + g - l, (i > 0 || u > a(i)) && (t.top += p + f + g)) } }, flipfit: { left: function () { t.ui.position.flip.left.apply(this, arguments), t.ui.position.fit.left.apply(this, arguments) }, top: function () { t.ui.position.flip.top.apply(this, arguments), t.ui.position.fit.top.apply(this, arguments) } } } }(), t.ui.position, t.extend(t.expr[":"], { data: t.expr.createPseudo ? t.expr.createPseudo(function (e) { return function (i) { return !!t.data(i, e) } }) : function (e, i, s) { return !!t.data(e, s[3]) } }), t.fn.extend({ disableSelection: function () { var t = "onselectstart" in document.createElement("div") ? "selectstart" : "mousedown"; return function () { return this.on(t + ".ui-disableSelection", function (t) { t.preventDefault() }) } }(), enableSelection: function () { return this.off(".ui-disableSelection") } }), t.ui.focusable = function (i, s) { var n, o, a, r, l, h = i.nodeName.toLowerCase(); return "area" === h ? (n = i.parentNode, o = n.name, i.href && o && "map" === n.nodeName.toLowerCase() ? (a = t("img[usemap='#" + o + "']"), a.length > 0 && a.is(":visible")) : !1) : (/^(input|select|textarea|button|object)$/.test(h) ? (r = !i.disabled, r && (l = t(i).closest("fieldset")[0], l && (r = !l.disabled))) : r = "a" === h ? i.href || s : s, r && t(i).is(":visible") && e(t(i))) }, t.extend(t.expr[":"], { focusable: function (e) { return t.ui.focusable(e, null != t.attr(e, "tabindex")) } }), t.ui.focusable, t.fn.form = function () { return "string" == typeof this[0].form ? this.closest("form") : t(this[0].form) }, t.ui.formResetMixin = { _formResetHandler: function () { var e = t(this); setTimeout(function () { var i = e.data("ui-form-reset-instances"); t.each(i, function () { this.refresh() }) }) }, _bindFormResetHandler: function () { if (this.form = this.element.form(), this.form.length) { var t = this.form.data("ui-form-reset-instances") || []; t.length || this.form.on("reset.ui-form-reset", this._formResetHandler), t.push(this), this.form.data("ui-form-reset-instances", t) } }, _unbindFormResetHandler: function () { if (this.form.length) { var e = this.form.data("ui-form-reset-instances"); e.splice(t.inArray(this, e), 1), e.length ? this.form.data("ui-form-reset-instances", e) : this.form.removeData("ui-form-reset-instances").off("reset.ui-form-reset") } } }, "1.7" === t.fn.jquery.substring(0, 3) && (t.each(["Width", "Height"], function (e, i) { function s(e, i, s, o) { return t.each(n, function () { i -= parseFloat(t.css(e, "padding" + this)) || 0, s && (i -= parseFloat(t.css(e, "border" + this + "Width")) || 0), o && (i -= parseFloat(t.css(e, "margin" + this)) || 0) }), i } var n = "Width" === i ? ["Left", "Right"] : ["Top", "Bottom"], o = i.toLowerCase(), a = { innerWidth: t.fn.innerWidth, innerHeight: t.fn.innerHeight, outerWidth: t.fn.outerWidth, outerHeight: t.fn.outerHeight }; t.fn["inner" + i] = function (e) { return void 0 === e ? a["inner" + i].call(this) : this.each(function () { t(this).css(o, s(this, e) + "px") }) }, t.fn["outer" + i] = function (e, n) { return "number" != typeof e ? a["outer" + i].call(this, e) : this.each(function () { t(this).css(o, s(this, e, !0, n) + "px") }) } }), t.fn.addBack = function (t) { return this.add(null == t ? this.prevObject : this.prevObject.filter(t)) }), t.ui.keyCode = { BACKSPACE: 8, COMMA: 188, DELETE: 46, DOWN: 40, END: 35, ENTER: 13, ESCAPE: 27, HOME: 36, LEFT: 37, PAGE_DOWN: 34, PAGE_UP: 33, PERIOD: 190, RIGHT: 39, SPACE: 32, TAB: 9, UP: 38 }, t.ui.escapeSelector = function () { var t = /([!"#$%&'()*+,./:;<=>?@[\]^`{|}~])/g; return function (e) { return e.replace(t, "\\$1") } }(), t.fn.labels = function () { var e, i, s, n, o; return this[0].labels && this[0].labels.length ? this.pushStack(this[0].labels) : (n = this.eq(0).parents("label"), s = this.attr("id"), s && (e = this.eq(0).parents().last(
vendor: 4,911 bytes, line 23
23), o = e.add(e.length ? e.siblings() : this.siblings()), i = "label[for='" + t.ui.escapeSelector(s) + "']", n = n.add(o.find(i).addBack(i))), this.pushStack(n)) }, t.fn.scrollParent = function (e) { var i = this.css("position"), s = "absolute" === i, n = e ? /(auto|scroll|hidden)/ : /(auto|scroll)/, o = this.parents().filter(function () { var e = t(this); return s && "static" === e.css("position") ? !1 : n.test(e.css("overflow") + e.css("overflow-y") + e.css("overflow-x")) }).eq(0); return "fixed" !== i && o.length ? o : t(this[0].ownerDocument || document) }, t.extend(t.expr[":"], { tabbable: function (e) { var i = t.attr(e, "tabindex"), s = null != i; return (!s || i >= 0) && t.ui.focusable(e, s) } }), t.fn.extend({ uniqueId: function () { var t = 0; return function () { return this.each(function () { this.id || (this.id = "ui-id-" + ++t) }) } }(), removeUniqueId: function () { return this.each(function () { /^ui-id-\d+$/.test(this.id) && t(this).removeAttr("id") }) } }), t.ui.ie = !!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()); var c = !1; t(document).on("mouseup", function () { c = !1 }), t.widget("ui.mouse", { version: "1.12.1", options: { cancel: "input, textarea, button, select, option", distance: 1, delay: 0 }, _mouseInit: function () { var e = this; this.element.on("mousedown." + this.widgetName, function (t) { return e._mouseDown(t) }).on("click." + this.widgetName, function (i) { return !0 === t.data(i.target, e.widgetName + ".preventClickEvent") ? (t.removeData(i.target, e.widgetName + ".preventClickEvent"), i.stopImmediatePropagation(), !1) : void 0 }), this.started = !1 }, _mouseDestroy: function () { this.element.off("." + this.widgetName), this._mouseMoveDelegate && this.document.off("mousemove." + this.widgetName, this._mouseMoveDelegate).off("mouseup." + this.widgetName, this._mouseUpDelegate) }, _mouseDown: function (e) { if (!c) { this._mouseMoved = !1, this._mouseStarted && this._mouseUp(e), this._mouseDownEvent = e; var i = this, s = 1 === e.which, n = "string" == typeof this.options.cancel && e.target.nodeName ? t(e.target).closest(this.options.cancel).length : !1; return s && !n && this._mouseCapture(e) ? (this.mouseDelayMet = !this.options.delay, this.mouseDelayMet || (this._mouseDelayTimer = setTimeout(function () { i.mouseDelayMet = !0 }, this.options.delay)), this._mouseDistanceMet(e) && this._mouseDelayMet(e) && (this._mouseStarted = this._mouseStart(e) !== !1, !this._mouseStarted) ? (e.preventDefault(), !0) : (!0 === t.data(e.target, this.widgetName + ".preventClickEvent") && t.removeData(e.target, this.widgetName + ".preventClickEvent"), this._mouseMoveDelegate = function (t) { return i._mouseMove(t) }, this._mouseUpDelegate = function (t) { return i._mouseUp(t) }, this.document.on("mousemove." + this.widgetName, this._mouseMoveDelegate).on("mouseup." + this.widgetName, this._mouseUpDelegate), e.preventDefault(), c = !0, !0)) : !0 } }, _mouseMove: function (e) { if (this._mouseMoved) { if (t.ui.ie && (!document.documentMode || 9 > document.documentMode) && !e.button) return this._mouseUp(e); if (!e.which) if (e.originalEvent.altKey || e.originalEvent.ctrlKey || e.originalEvent.metaKey || e.originalEvent.shiftKey) this.ignoreMissingWhich = !0; else if (!this.ignoreMissingWhich) return this._mouseUp(e) } return (e.which || e.button) && (this._mouseMoved = !0), this._mouseStarted ? (this._mouseDrag(e), e.preventDefault()) : (this._mouseDistanceMet(e) && this._mouseDelayMet(e) && (this._mouseStarted = this._mouseStart(this._mouseDownEvent, e) !== !1, this._mouseStarted ? this._mouseDrag(e) : this._mouseUp(e)), !this._mouseStarted) }, _mouseUp: function (e) { this.document.off("mousemove." + this.widgetName, this._mouseMoveDelegate).off("mouseup." + this.widgetName, this._mouseUpDelegate), this._mouseStarted && (this._mouseStarted = !1, e.target === this._mouseDownEvent.target && t.data(e.target, this.widgetName + ".preventClickEvent", !0), this._mouseStop(e)), this._mouseDelayTimer && (clearTimeout(this._mouseDelayTimer), delete this._mouseDelayTimer), this.ignoreMissingWhich = !1, c = !1, e.preventDefault() }, _mouseDistanceMet: function (t) { return Math.max(Math.abs(this._mouseDownEvent.pageX - t.pageX), Math.abs(this._mouseDownEvent.pageY - t.pageY)) >= this.options.distance }, _mouseDelayMet: function () { return this.mouseDelayMet }, _mouseStart: function () { }, _mouseDrag: function () { }, _mouseStop: function () { }, _mouseCapture: function () { return !0 } }), t.ui.plugin = { add: function (e, i, s) { var n, o = t.ui[e].prototype; for (n in s) o.plugins[n] = o.plugins[n] || [], o.plugins[n].push([i, s[n]]) }, call: function (t, e, i, s) { var n, o = t.plugins[e]; if (o && (s || t.element[0].parentNode && 11 !== t.element[0].parentNode.nodeType)) for (n = 0; o.length > n; n++)t.options[o[n][0]] && o[n][1].apply(t.element, i) } }, t.ui.safeActiveElement = function (t) { var e;
vendor: 6,911 bytes, lines 23-24
23 try { e = t.activeElement } catch (i) { e = t.body } return e || (e = t.body), e.nodeName || (e = t.body), e }, t.ui.safeBlur = function (e) { e && "body" !== e.nodeName.toLowerCase() && t(e).trigger("blur") }, t.widget("ui.draggable", t.ui.mouse, {
24        version: "1.12.1", widgetEventPrefix: "drag", options: { addClasses: !0, appendTo: "parent", axis: !1, connectToSortable: !1, containment: !1, cursor: "auto", cursorAt: !1, grid: !1, handle: !1, helper: "original", iframeFix: !1, opacity: !1, refreshPositions: !1, revert: !1, revertDuration: 500, scope: "default", scroll: !0, scrollSensitivity: 20, scrollSpeed: 20, snap: !1, snapMode: "both", snapTolerance: 20, stack: !1, zIndex: !1, drag: null, start: null, stop: null }, _create: function () { "original" === this.options.helper && this._setPositionRelative(), this.options.addClasses && this._addClass("ui-draggable"), this._setHandleClassName(), this._mouseInit() }, _setOption: function (t, e) { this._super(t, e), "handle" === t && (this._removeHandleClassName(), this._setHandleClassName()) }, _destroy: function () { return (this.helper || this.element).is(".ui-draggable-dragging") ? (this.destroyOnClear = !0, void 0) : (this._removeHandleClassName(), this._mouseDestroy(), void 0) }, _mouseCapture: function (e) { var i = this.options; return this.helper || i.disabled || t(e.target).closest(".ui-resizable-handle").length > 0 ? !1 : (this.handle = this._getHandle(e), this.handle ? (this._blurActiveElement(e), this._blockFrames(i.iframeFix === !0 ? "iframe" : i.iframeFix), !0) : !1) }, _blockFrames: function (e) { this.iframeBlocks = this.document.find(e).map(function () { var e = t(this); return t("<div>").css("position", "absolute").appendTo(e.parent()).outerWidth(e.outerWidth()).outerHeight(e.outerHeight()).offset(e.offset())[0] }) }, _unblockFrames: function () { this.iframeBlocks && (this.iframeBlocks.remove(), delete this.iframeBlocks) }, _blurActiveElement: function (e) { var i = t.ui.safeActiveElement(this.document[0]), s = t(e.target); s.closest(i).length || t.ui.safeBlur(i) }, _mouseStart: function (e) { var i = this.options; return this.helper = this._createHelper(e), this._addClass(this.helper, "ui-draggable-dragging"), this._cacheHelperProportions(), t.ui.ddmanager && (t.ui.ddmanager.current = this), this._cacheMargins(), this.cssPosition = this.helper.css("position"), this.scrollParent = this.helper.scrollParent(!0), this.offsetParent = this.helper.offsetParent(), this.hasFixedAncestor = this.helper.parents().filter(function () { return "fixed" === t(this).css("position") }).length > 0, this.positionAbs = this.element.offset(), this._refreshOffsets(e), this.originalPosition = this.position = this._generatePosition(e, !1), this.originalPageX = e.pageX, this.originalPageY = e.pageY, i.cursorAt && this._adjustOffsetFromHelper(i.cursorAt), this._setContainment(), this._trigger("start", e) === !1 ? (this._clear(), !1) : (this._cacheHelperProportions(), t.ui.ddmanager && !i.dropBehaviour && t.ui.ddmanager.prepareOffsets(this, e), this._mouseDrag(e, !0), t.ui.ddmanager && t.ui.ddmanager.dragStart(this, e), !0) }, _refreshOffsets: function (t) { this.offset = { top: this.positionAbs.top - this.margins.top, left: this.positionAbs.left - this.margins.left, scroll: !1, parent: this._getParentOffset(), relative: this._getRelativeOffset() }, this.offset.click = { left: t.pageX - this.offset.left, top: t.pageY - this.offset.top } }, _mouseDrag: function (e, i) { if (this.hasFixedAncestor && (this.offset.parent = this._getParentOffset()), this.position = this._generatePosition(e, !0), this.positionAbs = this._convertPositionTo("absolute"), !i) { var s = this._uiHash(); if (this._trigger("drag", e, s) === !1) return this._mouseUp(new t.Event("mouseup", e)), !1; this.position = s.position } return this.helper[0].style.left = this.position.left + "px", this.helper[0].style.top = this.position.top + "px", t.ui.ddmanager && t.ui.ddmanager.drag(this, e), !1 }, _mouseStop: function (e) { var i = this, s = !1; return t.ui.ddmanager && !this.options.dropBehaviour && (s = t.ui.ddmanager.drop(this, e)), this.dropped && (s = this.dropped, this.dropped = !1), "invalid" === this.options.revert && !s || "valid" === this.options.revert && s || this.options.revert === !0 || t.isFunction(this.options.revert) && this.options.revert.call(this.element, s) ? t(this.helper).animate(this.originalPosition, parseInt(this.options.revertDuration, 10), function () { i._trigger("stop", e) !== !1 && i._clear() }) : this._trigger("stop", e) !== !1 && this._clear(), !1 }, _mouseUp: function (e) { return this._unblockFrames(), t.ui.ddmanager && t.ui.ddmanager.dragStop(this, e), this.handleElement.is(e.target) && this.element.trigger("focus"), t.ui.mouse.prototype._mouseUp.call(this, e) }, cancel: function () { return this.helper.is(".ui-draggable-dragging") ? this._mouseUp(new t.Event("mouseup", { target: this.element[0] })) : this._clear(), this }, _getHandle: function (e) { return this.options.handle ? !!t(e.target).closest(this.element.find(this.options.handle)).length : !0 }, _setHandleClassName: function () { this.handleElement = this.options.handle ? this.element.find(this.options.handle) : this.element, this._addClass(this.handleElement, "ui-draggable-handle") }, _removeHandleClassName: function () { this._removeClass(this.handleElement, "ui-draggable-handle") }, _createHelper: function (e) { var i = this.options, s = t.isFunction(i.helper), n = s ? t(i.helper.apply(this.element[0], [e])) : "clone" === i.helper ? this.element.clone().removeAttr("id") : this.element; return n.parents("body").length || n.appendTo("parent" === i.appendTo ? this.element[0].parentNode : i.appendTo), s && n[0] === this.element[0] && this._setPositionRelative(), n[0] === this.element[0] || /(fixed|absolute)/.test(n.css("position")) || n.css("position", "absolute"), n }, _setPositionRelative: function () { /^(?:r|a|f)/.test(this.element.css("position")) || (this.element[0].style.position = "relative") }, _adjustOffsetFromHelper: function (e) { "string" == typeof e && (e = e.split(" ")), t.isArray(e) && (e = { left: +e[0], top: +e[1] || 0 }), "left" in e && (this.offset.click.left = e.left + this.margins.left), "right" in e && (this.offset.click.left = this.helperProportions.width - e.right + this.margins.left), "top" in e && (this.offset.click.top = e.top + this.margins.top), "bottom" in e && (this.offset.click.top = this.helperProportions.height - e.bottom + this.margins.top) }, _isRootNode: function (t) { return /(html|body)/i.test(t.tagName) || t === this.document[0] }, _getParentOffset: function () { var e = this.offsetParent.offset(), i = this.document[0]; return "absolute" === this.cssPosition && this.scrollParent[0] !== i && t.contains(this.scrollParent[0], this.offsetParent[0]) && (e.left += this.scrollParent.scrollLeft(), e.top += this.scrollParent.scrollTop()), this._isRo
vendor: 5,578 bytes, lines 24-26
24otNode(this.offsetParent[0]) && (e = { top: 0, left: 0 }), { top: e.top + (parseInt(this.offsetParent.css("borderTopWidth"), 10) || 0), left: e.left + (parseInt(this.offsetParent.css("borderLeftWidth"), 10) || 0) } }, _getRelativeOffset: function () { if ("relative" !== this.cssPosition) return { top: 0, left: 0 }; var t = this.element.position(), e = this._isRootNode(this.scrollParent[0]); return { top: t.top - (parseInt(this.helper.css("top"), 10) || 0) + (e ? 0 : this.scrollParent.scrollTop()), left: t.left - (parseInt(this.helper.css("left"), 10) || 0) + (e ? 0 : this.scrollParent.scrollLeft()) } }, _cacheMargins: function () { this.margins = { left: parseInt(this.element.css("marginLeft"), 10) || 0, top: parseInt(this.element.css("marginTop"), 10) || 0, right: parseInt(this.element.css("marginRight"), 10) || 0, bottom: parseInt(this.element.css("marginBottom"), 10) || 0 } }, _cacheHelperProportions: function () { this.helperProportions = { width: this.helper.outerWidth(), height: this.helper.outerHeight() } }, _setContainment: function () {
25            var e, i, s, n = this.options, o = this.document[0]; return this.relativeContainer = null, n.containment ? "window" === n.containment ? (this.containment = [t(window).scrollLeft() - this.offset.relative.left - this.offset.parent.left, t(window).scrollTop() - this.offset.relative.top - this.offset.parent.top, t(window).scrollLeft() + t(window).width() - this.helperProportions.width - this.margins.left, t(window).scrollTop() + (t(window).height() || o.body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top], void 0) : "document" === n.containment ? (this.containment = [0, 0, t(o).width() - this.helperProportions.width - this.margins.left, (t(o).height() || o.body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top], void 0) : n.containment.constructor === Array ? (this.containment = n.containment, void 0) : ("parent" === n.containment && (n.containment = this.helper[0].parentNode), i = t(n.containment), s = i[0], s && (e = /(scroll|auto)/.test(i.css("overflow")), this.containment = [(parseInt(i.css("borderLeftWidth"), 10) || 0) + (parseInt(i.css("paddingLeft"), 10) || 0), (parseInt(i.css("borderTopWidth"), 10) || 0) + (parseInt(i.css("paddingTop"), 10) || 0), (e ? Math.max(s.scrollWidth, s.offsetWidth) : s.offsetWidth) - (parseInt(i.css("borderRightWidth"), 10) || 0) - (parseInt(i.css("paddingRight"), 10) || 0) - this.helperProportions.width - this.margins.left - this.margins.right, (e ? Math.max(s.scrollHeight, s.offsetHeight) : s.offsetHeight) - (parseInt(i.css("borderBottomWidth"), 10) || 0) - (parseInt(i.css("paddingBottom"), 10) || 0) - this.helperProportions.height - this.margins.top - this.margins.bottom], this.relativeContainer = i), void 0) : (this.containment = null, void 0)
26        }, _convertPositionTo: function (t, e) { e || (e = this.position); var i = "absolute" === t ? 1 : -1, s = this._isRootNode(this.scrollParent[0]); return { top: e.top + this.offset.relative.top * i + this.offset.parent.top * i - ("fixed" === this.cssPosition ? -this.offset.scroll.top : s ? 0 : this.offset.scroll.top) * i, left: e.left + this.offset.relative.left * i + this.offset.parent.left * i - ("fixed" === this.cssPosition ? -this.offset.scroll.left : s ? 0 : this.offset.scroll.left) * i } }, _generatePosition: function (t, e) { var i, s, n, o, a = this.options, r = this._isRootNode(this.scrollParent[0]), l = t.pageX, h = t.pageY; return r && this.offset.scroll || (this.offset.scroll = { top: this.scrollParent.scrollTop(), left: this.scrollParent.scrollLeft() }), e && (this.containment && (this.relativeContainer ? (s = this.relativeContainer.offset(), i = [this.containment[0] + s.left, this.containment[1] + s.top, this.containment[2] + s.left, this.containment[3] + s.top]) : i = this.containment, 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 && (n = a.grid[1] ? this.originalPageY + Math.round((h - this.originalPageY) / a.grid[1]) * a.grid[1] : this.originalPageY, h = i ? n - this.offset.click.top >= i[1] || n - this.offset.click.top > i[3] ? n : n - this.offset.click.top >= i[1] ? n - a.grid[1] : n + a.grid[1] : n, 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)), { 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), 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) } }, _clear: function () { this._removeClass(this.helper, "ui-draggable-dragging"), this.helper[0] === this.element[0] || this.cancelHelperRemoval || this.helper.remove(), this.helper = null, this.cancelHelperRemoval = !1, this.destroyOnClear && this.destroy() }, _trigger: function (e, i, s) { return s = s || this._uiHash(), t.ui.plugin.call(this, e, [i, s, this], !0), /^(drag|start|stop
vendor: 7,617 bytes, lines 26-27
26)/.test(e) && (this.positionAbs = this._convertPositionTo("absolute"), s.offset = this.positionAbs), t.Widget.prototype._trigger.call(this, e, i, s) }, plugins: {}, _uiHash: function () { return { helper: this.helper, position: this.position, originalPosition: this.originalPosition, offset: this.positionAbs } }
27    }), t.ui.plugin.add("draggable", "connectToSortable", { start: function (e, i, s) { var n = t.extend({}, i, { item: s.element }); s.sortables = [], t(s.options.connectToSortable).each(function () { var i = t(this).sortable("instance"); i && !i.options.disabled && (s.sortables.push(i), i.refreshPositions(), i._trigger("activate", e, n)) }) }, stop: function (e, i, s) { var n = t.extend({}, i, { item: s.element }); s.cancelHelperRemoval = !1, t.each(s.sortables, function () { var t = this; t.isOver ? (t.isOver = 0, s.cancelHelperRemoval = !0, t.cancelHelperRemoval = !1, t._storedCSS = { position: t.placeholder.css("position"), top: t.placeholder.css("top"), left: t.placeholder.css("left") }, t._mouseStop(e), t.options.helper = t.options._helper) : (t.cancelHelperRemoval = !0, t._trigger("deactivate", e, n)) }) }, drag: function (e, i, s) { t.each(s.sortables, function () { var n = !1, o = this; o.positionAbs = s.positionAbs, o.helperProportions = s.helperProportions, o.offset.click = s.offset.click, o._intersectsWith(o.containerCache) && (n = !0, t.each(s.sortables, function () { return this.positionAbs = s.positionAbs, this.helperProportions = s.helperProportions, this.offset.click = s.offset.click, this !== o && this._intersectsWith(this.containerCache) && t.contains(o.element[0], this.element[0]) && (n = !1), n })), n ? (o.isOver || (o.isOver = 1, s._parent = i.helper.parent(), o.currentItem = i.helper.appendTo(o.element).data("ui-sortable-item", !0), o.options._helper = o.options.helper, o.options.helper = function () { return i.helper[0] }, e.target = o.currentItem[0], o._mouseCapture(e, !0), o._mouseStart(e, !0, !0), o.offset.click.top = s.offset.click.top, o.offset.click.left = s.offset.click.left, o.offset.parent.left -= s.offset.parent.left - o.offset.parent.left, o.offset.parent.top -= s.offset.parent.top - o.offset.parent.top, s._trigger("toSortable", e), s.dropped = o.element, t.each(s.sortables, function () { this.refreshPositions() }), s.currentItem = s.element, o.fromOutside = s), o.currentItem && (o._mouseDrag(e), i.position = o.position)) : o.isOver && (o.isOver = 0, o.cancelHelperRemoval = !0, o.options._revert = o.options.revert, o.options.revert = !1, o._trigger("out", e, o._uiHash(o)), o._mouseStop(e, !0), o.options.revert = o.options._revert, o.options.helper = o.options._helper, o.placeholder && o.placeholder.remove(), i.helper.appendTo(s._parent), s._refreshOffsets(e), i.position = s._generatePosition(e, !0), s._trigger("fromSortable", e), s.dropped = !1, t.each(s.sortables, function () { this.refreshPositions() })) }) } }), t.ui.plugin.add("draggable", "cursor", { start: function (e, i, s) { var n = t("body"), o = s.options; n.css("cursor") && (o._cursor = n.css("cursor")), n.css("cursor", o.cursor) }, stop: function (e, i, s) { var n = s.options; n._cursor && t("body").css("cursor", n._cursor) } }), t.ui.plugin.add("draggable", "opacity", { start: function (e, i, s) { var n = t(i.helper), o = s.options; n.css("opacity") && (o._opacity = n.css("opacity")), n.css("opacity", o.opacity) }, stop: function (e, i, s) { var n = s.options; n._opacity && t(i.helper).css("opacity", n._opacity) } }), t.ui.plugin.add("draggable", "scroll", { start: function (t, e, i) { i.scrollParentNotHidden || (i.scrollParentNotHidden = i.helper.scrollParent(!1)), i.scrollParentNotHidden[0] !== i.document[0] && "HTML" !== i.scrollParentNotHidden[0].tagName && (i.overflowOffset = i.scrollParentNotHidden.offset()) }, drag: function (e, i, s) { var n = s.options, o = !1, a = s.scrollParentNotHidden[0], r = s.document[0]; a !== r && "HTML" !== a.tagName ? (n.axis && "x" === n.axis || (s.overflowOffset.top + a.offsetHeight - e.pageY < n.scrollSensitivity ? a.scrollTop = o = a.scrollTop + n.scrollSpeed : e.pageY - s.overflowOffset.top < n.scrollSensitivity && (a.scrollTop = o = a.scrollTop - n.scrollSpeed)), n.axis && "y" === n.axis || (s.overflowOffset.left + a.offsetWidth - e.pageX < n.scrollSensitivity ? a.scrollLeft = o = a.scrollLeft + n.scrollSpeed : e.pageX - s.overflowOffset.left < n.scrollSensitivity && (a.scrollLeft = o = a.scrollLeft - n.scrollSpeed))) : (n.axis && "x" === n.axis || (e.pageY - t(r).scrollTop() < n.scrollSensitivity ? o = t(r).scrollTop(t(r).scrollTop() - n.scrollSpeed) : t(window).height() - (e.pageY - t(r).scrollTop()) < n.scrollSensitivity && (o = t(r).scrollTop(t(r).scrollTop() + n.scrollSpeed))), n.axis && "y" === n.axis || (e.pageX - t(r).scrollLeft() < n.scrollSensitivity ? o = t(r).scrollLeft(t(r).scrollLeft() - n.scrollSpeed) : t(window).width() - (e.pageX - t(r).scrollLeft()) < n.scrollSensitivity && (o = t(r).scrollLeft(t(r).scrollLeft() + n.scrollSpeed)))), o !== !1 && t.ui.ddmanager && !n.dropBehaviour && t.ui.ddmanager.prepareOffsets(s, e) } }), t.ui.plugin.add("draggable", "snap", { start: function (e, i, s) { var n = s.options; s.snapElements = [], t(n.snap.constructor !== String ? n.snap.items || ":data(ui-draggable)" : n.snap).each(function () { var e = t(this), i = e.offset(); this !== s.element[0] && s.snapElements.push({ item: this, width: e.outerWidth(), height: e.outerHeight(), top: i.top, left: i.left }) }) }, drag: function (e, i, s) { var n, o, a, r, l, h, c, u, d, p, f = s.options, g = f.snapTolerance, m = i.offset.left, _ = m + s.helperProportions.width, v = i.offset.top, b = v + s.helperProportions.height; for (d = s.snapElements.length - 1; d >= 0; d--)l = s.snapElements[d].left - s.margins.left, h = l + s.snapElements[d].width, c = s.snapElements[d].top - s.margins.top, u = c + s.snapElements[d].height, l - g > _ || m > h + g || c - g > b || v > u + g || !t.contains(s.snapElements[d].item.ownerDocument, s.snapElements[d].item) ? (s.snapElements[d].snapping && s.options.snap.release && s.options.snap.release.call(s.element, e, t.extend(s._uiHash(), { snapItem: s.snapElements[d].item })), s.snapElements[d].snapping = !1) : ("inner" !== f.snapMode && (n = g >= Math.abs(c - b), o = g >= Math.abs(u - v), a = g >= Math.abs(l - _), r = g >= Math.abs(h - m), n && (i.position.top = s._convertPositionTo("relative", { top: c - s.helperProportions.height, left: 0 }).top), o && (i.position.top = s._convertPositionTo("relative", { top: u, left: 0 }).top), a && (i.position.left = s._convertPositionTo("relative", { top: 0, left: l - s.helperProportions.width }).left), r && (i.position.left = s._convertPositionTo("relative", { top: 0, left: h }).left)), p = n || o || a || r, "outer" !== f.snapMode && (n = g >= Math.abs(c - v), o = g >= Math.abs(u - b), a = g >= Math.abs(l - m), r = g >= Math.abs(h - _), n && (i.position.top = s._convertPositionTo("relative", { top: c, left: 0 }).top), o && (i.position.top = s._convertPositionTo("relative", { top: u - s.helperProportions.height, left: 0 }).top), a && (i.position.left = s._convertPositionTo("relative", { top: 0, left: l }).left), r && (i.position.left = s._convertPositionTo("relative", { top: 0, left: h - s.helperProportions.width }).left)), !s.snapElements[d].snapping && (n || o || a || r || p) && s.options.snap.snap && s.options.snap.snap.call(s.element, e, t.extend(s._uiHash(), { snapItem: s.snapElements[d].item })), s.snapElements[d].snapping = n || o || a || r || p) } }), t.ui.plugin.add("draggable", "stack", { start: function (e, i, s) { var n, o = s.options, a = t.makeArray(t(
vendor: 34,048 bytes, lines 27-32
27o.stack)).sort(function (e, i) { return (parseInt(t(e).css("zIndex"), 10) || 0) - (parseInt(t(i).css("zIndex"), 10) || 0) }); a.length && (n = parseInt(t(a[0]).css("zIndex"), 10) || 0, t(a).each(function (e) { t(this).css("zIndex", n + e) }), this.css("zIndex", n + a.length)) } }), t.ui.plugin.add("draggable", "zIndex", { start: function (e, i, s) { var n = t(i.helper), o = s.options; n.css("zIndex") && (o._zIndex = n.css("zIndex")), n.css("zIndex", o.zIndex) }, stop: function (e, i, s) { var n = s.options; n._zIndex && t(i.helper).css("zIndex", n._zIndex) } }), t.ui.draggable, t.widget("ui.droppable", { version: "1.12.1", widgetEventPrefix: "drop", options: { accept: "*", addClasses: !0, greedy: !1, scope: "default", tolerance: "intersect", activate: null, deactivate: null, drop: null, out: null, over: null }, _create: function () { var e, i = this.options, s = i.accept; this.isover = !1, this.isout = !0, this.accept = t.isFunction(s) ? s : function (t) { return t.is(s) }, this.proportions = function () { return arguments.length ? (e = arguments[0], void 0) : e ? e : e = { width: this.element[0].offsetWidth, height: this.element[0].offsetHeight } }, this._addToManager(i.scope), i.addClasses && this._addClass("ui-droppable") }, _addToManager: function (e) { t.ui.ddmanager.droppables[e] = t.ui.ddmanager.droppables[e] || [], t.ui.ddmanager.droppables[e].push(this) }, _splice: function (t) { for (var e = 0; t.length > e; e++)t[e] === this && t.splice(e, 1) }, _destroy: function () { var e = t.ui.ddmanager.droppables[this.options.scope]; this._splice(e) }, _setOption: function (e, i) { if ("accept" === e) this.accept = t.isFunction(i) ? i : function (t) { return t.is(i) }; else if ("scope" === e) { var s = t.ui.ddmanager.droppables[this.options.scope]; this._splice(s), this._addToManager(i) } this._super(e, i) }, _activate: function (e) { var i = t.ui.ddmanager.current; this._addActiveClass(), i && this._trigger("activate", e, this.ui(i)) }, _deactivate: function (e) { var i = t.ui.ddmanager.current; this._removeActiveClass(), i && this._trigger("deactivate", e, this.ui(i)) }, _over: function (e) { var i = t.ui.ddmanager.current; i && (i.currentItem || i.element)[0] !== this.element[0] && this.accept.call(this.element[0], i.currentItem || i.element) && (this._addHoverClass(), this._trigger("over", e, this.ui(i))) }, _out: function (e) { var i = t.ui.ddmanager.current; i && (i.currentItem || i.element)[0] !== this.element[0] && this.accept.call(this.element[0], i.currentItem || i.element) && (this._removeHoverClass(), this._trigger("out", e, this.ui(i))) }, _drop: function (e, i) { var s = i || t.ui.ddmanager.current, n = !1; return s && (s.currentItem || s.element)[0] !== this.element[0] ? (this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function () { var i = t(this).droppable("instance"); return i.options.greedy && !i.options.disabled && i.options.scope === s.options.scope && i.accept.call(i.element[0], s.currentItem || s.element) && u(s, t.extend(i, { offset: i.element.offset() }), i.options.tolerance, e) ? (n = !0, !1) : void 0 }), n ? !1 : this.accept.call(this.element[0], s.currentItem || s.element) ? (this._removeActiveClass(), this._removeHoverClass(), this._trigger("drop", e, this.ui(s)), this.element) : !1) : !1 }, ui: function (t) { return { draggable: t.currentItem || t.element, helper: t.helper, position: t.position, offset: t.positionAbs } }, _addHoverClass: function () { this._addClass("ui-droppable-hover") }, _removeHoverClass: function () { this._removeClass("ui-droppable-hover") }, _addActiveClass: function () { this._addClass("ui-droppable-active") }, _removeActiveClass: function () { this._removeClass("ui-droppable-active") } }); var u = t.ui.intersect = function () { function t(t, e, i) { return t >= e && e + i > t } return function (e, i, s, n) { if (!i.offset) return !1; var o = (e.positionAbs || e.position.absolute).left + e.margins.left, a = (e.positionAbs || e.position.absolute).top + e.margins.top, r = o + e.helperProportions.width, l = a + e.helperProportions.height, h = i.offset.left, c = i.offset.top, u = h + i.proportions().width, d = c + i.proportions().height; switch (s) { case "fit": return o >= h && u >= r && a >= c && d >= l; case "intersect": return o + e.helperProportions.width / 2 > h && u > r - e.helperProportions.width / 2 && a + e.helperProportions.height / 2 > c && d > l - e.helperProportions.height / 2; case "pointer": return t(n.pageY, c, i.proportions().height) && t(n.pageX, h, i.proportions().width); case "touch": return (a >= c && d >= a || l >= c && d >= l || c > a && l > d) && (o >= h && u >= o || r >= h && u >= r || h > o && r > u); default: return !1 } } }(); t.ui.ddmanager = { current: null, droppables: { "default": [] }, prepareOffsets: function (e, i) { var s, n, o = t.ui.ddmanager.droppables[e.options.scope] || [], a = i ? i.type : null, r = (e.currentItem || e.element).find(":data(ui-droppable)").addBack(); t: for (s = 0; o.length > s; s++)if (!(o[s].options.disabled || e && !o[s].accept.call(o[s].element[0], e.currentItem || e.element))) { for (n = 0; r.length > n; n++)if (r[n] === o[s].element[0]) { o[s].proportions().height = 0; continue t } o[s].visible = "none" !== o[s].element.css("display"), o[s].visible && ("mousedown" === a && o[s]._activate.call(o[s], i), o[s].offset = o[s].element.offset(), o[s].proportions({ width: o[s].element[0].offsetWidth, height: o[s].element[0].offsetHeight })) } }, drop: function (e, i) { var s = !1; return t.each((t.ui.ddmanager.droppables[e.options.scope] || []).slice(), function () { this.options && (!this.options.disabled && this.visible && u(e, this, this.options.tolerance, i) && (s = this._drop.call(this, i) || s), !this.options.disabled && this.visible && this.accept.call(this.element[0], e.currentItem || e.element) && (this.isout = !0, this.isover = !1, this._deactivate.call(this, i))) }), s }, dragStart: function (e, i) { e.element.parentsUntil("body").on("scroll.droppable", function () { e.options.refreshPositions || t.ui.ddmanager.prepareOffsets(e, i) }) }, drag: function (e, i) { e.options.refreshPositions && t.ui.ddmanager.prepareOffsets(e, i), t.each(t.ui.ddmanager.droppables[e.options.scope] || [], function () { if (!this.options.disabled && !this.greedyChild && this.visible) { var s, n, o, a = u(e, this, this.options.tolerance, i), r = !a && this.isover ? "isout" : a && !this.isover ? "isover" : null; r && (this.options.greedy && (n = this.options.scope, o = this.element.parents(":data(ui-droppable)").filter(function () { return t(this).droppable("instance").options.scope === n }), o.length && (s = t(o[0]).droppable("instance"), s.greedyChild = "isover" === r)), s && "isover" === r && (s.isover = !1, s.isout = !0, s._out.call(s, i)), this[r] = !0, this["isout" === r ? "isover" : "isout"] = !1, this["isover" === r ? "_over" : "_out"].call(this, i), s && "isout" === r && (s.isout = !1, s.isover = !0, s._over.call(s, i))) } }) }, dragStop: function (e, i) { e.element.parentsUntil("body").off("scroll.droppable"), e.options.refreshPositions || t.ui.ddmanager.prepareOffsets(e, i) } }, t.uiBackCompat !== !1 && t.widget("ui.droppable", t.ui.droppable, { options: { hoverClass: !1, activeClass: !1 }, _addActiveClass: function () { this._super(), this.options.activeClass && this.element.addClass(this.options.activeClass) }, _removeActiveClass: function () { this._super(), this.options.activeClass && this.element.removeClass(this.options.activeClass) }, _addHoverClass: function () { this._super(), this.options.hoverClass && this.element.addClass(this.options.hoverClass) }, _removeHoverClass: function () { this._super(), this.options.hoverClass && this.element.removeClass(this.options.hoverClass) } }), t.ui.droppable, t.widget("ui.resizable", t.ui.mouse, { version: "1.12.1", widgetEventPrefix: "resize", options: { alsoResize: !1, animate: !1, animateDuration: "slow", animateEasing: "swing", aspectRatio: !1, autoHide: !1, classes: { "ui-resizable-se": "ui-icon ui-icon-gripsmall-diagonal-se" }, containment: !1, ghost: !1, grid: !1, handles: "e,s,se", helper: !1, maxHeight: null, maxWidth: null, minHeight: 10, minWidth: 10, zIndex: 90, resize: null, start: null, stop: null }, _num: function (t) { return parseFloat(t) || 0 }, _isNumber: function (t) { return !isNaN(parseFloat(t)) }, _hasScroll: function (e, i) { if ("hidden" === t(e).css("overflow")) return !1; var s = i && "left" === i ? "scrollLeft" : "scrollTop", n = !1; return e[s] > 0 ? !0 : (e[s] = 1, n = e[s] > 0, e[s] = 0, n) }, _create: function () { var e, i = this.options, s = this; this._addClass("ui-resizable"), t.extend(this, { _aspectRatio: !!i.aspectRatio, aspectRatio: i.aspectRatio, originalElement: this.element, _proportionallyResizeElements: [], _helper: i.helper || i.ghost || i.animate ? i.helper || "ui-resizable-helper" : null }), this.element[0].nodeName.match(/^(canvas|textarea|input|select|button|img)$/i) && (this.element.wrap(t("<div class='ui-wrapper' style='overflow: hidden;'></div>").css({ position: this.element.css("position"), width: this.element.outerWidth(), height: this.element.outerHeight(), top: this.element.css("top"), left: this.element.css("left") })), this.element = this.element.parent().data("ui-resizable", this.element.resizable("instance")), this.elementIsWrapper = !0, e = { marginTop: this.originalElement.css("marginTop"), marginRight: this.originalElement.css("marginRight"), marginBottom: this.originalElement.css("marginBottom"), marginLeft: this.originalElement.css("marginLeft") }, this.element.css(e), this.originalElement.css("margin", 0), this.originalResizeStyle = this.originalElement.css("resize"), this.originalElement.css("resize", "none"), this._proportionallyResizeElements.push(this.originalElement.css({ position: "static", zoom: 1, display: "block" })), this.originalElement.css(e), this._proportionallyResize()), this._setupHandles(), i.autoHide && t(this.element).on("mouseenter", function () { i.disabled || (s._removeClass("ui-resizable-autohide"), s._handles.show()) }).on("mouseleave", function () { i.disabled || s.resizing || (s._addClass("ui-resizable-autohide"), s._handles.hide()) }), this._mouseInit() }, _destroy: function () { this._mouseDestroy(); var e, i = function (e) { t(e).removeData("resizable").removeData("ui-resizable").off(".resizable").find(".ui-resizable-handle").remove() }; return this.elementIsWrapper && (i(this.element), e = this.element, this.originalElement.css({ position: e.css("position"), width: e.outerWidth(), height: e.outerHeight(), top: e.css("top"), left: e.css("left") }).insertAfter(e), e.remove()), this.originalElement.css("resize", this.originalResizeStyle), i(this.originalElement), this }, _setOption: function (t, e) { switch (this._super(t, e), t) { case "handles": this._removeHandles(), this._setupHandles(); break; default: } }, _setupHandles: function () { var e, i, s, n, o, a = this.options, r = this; if (this.handles = a.handles || (t(".ui-resizable-handle", this.element).length ? { n: ".ui-resizable-n", e: ".ui-resizable-e", s: ".ui-resizable-s", w: ".ui-resizable-w", se: ".ui-resizable-se", sw: ".ui-resizable-sw", ne: ".ui-resizable-ne", nw: ".ui-resizable-nw" } : "e,s,se"), this._handles = t(), this.handles.constructor === String) for ("all" === this.handles && (this.handles = "n,e,s,w,se,sw,ne,nw"), s = this.handles.split(","), this.handles = {}, i = 0; s.length > i; i++)e = t.trim(s[i]), n = "ui-resizable-" + e, o = t("<div>"), this._addClass(o, "ui-resizable-handle " + n), o.css({ zIndex: a.zIndex }), this.handles[e] = ".ui-resizable-" + e, this.element.append(o); this._renderAxis = function (e) { var i, s, n, o; e = e || this.element; for (i in this.handles) this.handles[i].constructor === String ? this.handles[i] = this.element.children(this.handles[i]).first().show() : (this.handles[i].jquery || this.handles[i].nodeType) && (this.handles[i] = t(this.handles[i]), this._on(this.handles[i], { mousedown: r._mouseDown })), this.elementIsWrapper && this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i) && (s = t(this.handles[i], this.element), o = /sw|ne|nw|se|n|s/.test(i) ? s.outerHeight() : s.outerWidth(), n = ["padding", /ne|nw|n/.test(i) ? "Top" : /se|sw|s/.test(i) ? "Bottom" : /^e$/.test(i) ? "Right" : "Left"].join(""), e.css(n, o), this._proportionallyResize()), this._handles = this._handles.add(this.handles[i]) }, this._renderAxis(this.element), this._handles = this._handles.add(this.element.find(".ui-resizable-handle")), this._handles.disableSelection(), this._handles.on("mouseover", function () { r.resizing || (this.className && (o = this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)), r.axis = o && o[1] ? o[1] : "se") }), a.autoHide && (this._handles.hide(), this._addClass("ui-resizable-autohide")) }, _removeHandles: function () { this._handles.remove() }, _mouseCapture: function (e) { var i, s, n = !1; for (i in this.handles) s = t(this.handles[i])[0], (s === e.target || t.contains(s, e.target)) && (n = !0); return !this.options.disabled && n }, _mouseStart: function (e) { var i, s, n, o = this.options, a = this.element; return this.resizing = !0, this._renderProxy(), i = this._num(this.helper.css("left")), s = this._num(this.helper.css("top")), o.containment && (i += t(o.containment).scrollLeft() || 0, s += t(o.containment).scrollTop() || 0), this.offset = this.helper.offset(), this.position = { left: i, top: s }, this.size = this._helper ? { width: this.helper.width(), height: this.helper.height() } : { width: a.width(), height: a.height() }, this.originalSize = this._helper ? { width: a.outerWidth(), height: a.outerHeight() } : { width: a.width(), height: a.height() }, this.sizeDiff = { width: a.outerWidth() - a.width(), height: a.outerHeight() - a.height() }, this.originalPosition = { left: i, top: s }, this.originalMousePosition = { left: e.pageX, top: e.pageY }, this.aspectRatio = "number" == typeof o.aspectRatio ? o.aspectRatio : this.originalSize.width / this.originalSize.height || 1, n = t(".ui-resizable-" + this.axis).css("cursor"), t("body").css("cursor", "auto" === n ? this.axis + "-resize" : n), this._addClass("ui-resizable-resizing"), this._propagate("start", e), !0 }, _mouseDrag: function (e) { var i, s, n = this.originalMousePosition, o = this.axis, a = e.pageX - n.left || 0, r = e.pageY - n.top || 0, l = this._change[o]; return this._updatePrevProperties(), l ? (i = l.apply(this, [e, a, r]), this._updateVirtualBoundaries(e.shiftKey), (this._aspectRatio || e.shiftKey) && (i = this._updateRatio(i, e)), i = this._respectSize(i, e), this._updateCache(i), this._propagate("resize", e), s = this._applyChanges(), !this._helper && this._proportionallyResizeElements.length && this._proportionallyResize(), t.isEmptyObject(s) || (this._updatePrevProperties(), this._trigger("resize", e, this.ui()), this._applyChanges()), !1) : !1 }, _mouseStop: function (e) { this.resizing = !1; var i, s, n, o, a, r, l, h = this.options, c = this; return this._helper && (i = this._proportionallyResizeElements, s = i.length && /textarea/i.test(i[0].nodeName), n = s && this._hasScroll(i[0], "left") ? 0 : c.sizeDiff.height, o = s ? 0 : c.sizeDiff.width, a = { width: c.helper.width() - o, height: c.helper.height() - n }, r = parseFloat(c.element.css("left")) + (c.position.left - c.originalPosition.left) || null, l = parseFloat(c.element.css("top")) + (c.position.top - c.originalPosition.top) || null, h.animate || this.element.css(t.extend(a, { top: l, left: r })), c.helper.height(c.size.height), c.helper.width(c.size.width), this._helper && !h.animate && this._proportionallyResize()), t("body").css("cursor", "auto"), this._removeClass("ui-resizable-resizing"), this._propagate("stop", e), this._helper && this.helper.remove(), !1 }, _updatePrevProperties: function () { this.prevPosition = { top: this.position.top, left: this.position.left }, this.prevSize = { width: this.size.width, height: this.size.height } }, _applyChanges: function () { var t = {}; 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 }, _updateVirtualBoundaries: function (t) { var e, i, s, n, o, a = this.options; o = { minWidth: this._isNumber(a.minWidth) ? a.minWidth : 0, maxWidth: this._isNumber(a.maxWidth) ? a.maxWidth : 1 / 0, minHeight: this._isNumber(a.minHeight) ? a.minHeight : 0, maxHeight: this._isNumber(a.maxHeight) ? a.maxHeight : 1 / 0 }, (this._aspectRatio || t) && (e = o.minHeight * this.aspectRatio, s = o.minWidth / this.aspectRatio, i = o.maxHeight * this.aspectRatio, n = o.maxWidth / this.aspectRatio, e > o.minWidth && (o.minWidth = e), s > o.minHeight && (o.minHeight = s), o.maxWidth > i && (o.maxWidth = i), o.maxHeight > n && (o.maxHeight = n)), this._vBoundaries = o }, _updateCache: function (t) { 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) }, _updateRatio: function (t) { var e = this.position, i = this.size, s = this.axis; return this._isNumber(t.height) ? t.width = t.height * this.aspectRatio : this._isNumber(t.width) && (t.height = t.width / this.aspectRatio), "sw" === s && (t.left = e.left + (i.width - t.width), t.top = null), "nw" === s && (t.top = e.top + (i.height - t.height), t.left = e.left + (i.width - t.width)), t }, _respectSize: function (t) { var e = this._vBoundaries, i = this.axis, s = this._isNumber(t.width) && e.maxWidth && e.maxWidth < t.width, n = this._isNumber(t.height) && e.maxHeight && e.maxHeight < t.height, o = this._isNumber(t.width) && e.minWidth && e.minWidth > t.width, a = this._isNumber(t.height) && e.minHeight && e.minHeight > t.height, r = this.originalPosition.left + this.originalSize.width, l = this.originalPosition.top + this.originalSize.height, h = /sw|nw|w/.test(i), c = /nw|ne|n/.test(i); return o && (t.width = e.minWidth), a && (t.height = e.minHeight), s && (t.width = e.maxWidth), n && (t.height = e.maxHeight), o && h && (t.left = r - e.minWidth), s && h && (t.left = r - e.maxWidth), a && c && (t.top = l - e.minHeight), n && 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 }, _getPaddingPlusBorderDimensions: function (t) { for (var e = 0, i = [], s = [t.css("borderTopWidth"), t.css("borderRightWidth"), t.css("borderBottomWidth"), t.css("borderLeftWidth")], n = [t.css("paddingTop"), t.css("paddingRight"), t.css("paddingBottom"), t.css("paddingLeft")]; 4 > e; e++)i[e] = parseFloat(s[e]) || 0, i[e] += parseFloat(n[e]) || 0; return { height: i[0] + i[2], width: i[1] + i[3] } }, _proportionallyResize: function () { 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({ height: i.height() - this.outerDimensions.height || 0, width: i.width() - this.outerDimensions.width || 0 }) }, _renderProxy: function () { var e = this.element, i = this.options; this.elementOffset = e.offset(), this._helper ? (this.helper = this.helper || t("<div style='overflow:hidden;'></div>"), this._addClass(this.helper, this._helper), this.helper.css({ width: this.element.outerWidth(), height: this.element.outerHeight(), position: "absolute", left: this.elementOffset.left + "px", top: this.elementOffset.top + "px", zIndex: ++i.zIndex }), this.helper.appendTo("body").disableSelection()) : this.helper = this.element }, _change: { e: function (t, e) { return { width: this.originalSize.width + e } }, w: function (t, e) { var i = this.originalSize, s = this.originalPosition; return { left: s.left + e, width: i.width - e } }, n: function (t, e, i) { var s = this.originalSize, n = this.originalPosition; return { top: n.top + i, height: s.height - i } }, s: function (t, e, i) { return { height: this.originalSize.height + i } }, se: function (e, i, s) { return t.extend(this._change.s.apply(this, arguments), this._change.e.apply(this, [e, i, s])) }, sw: function (e, i, s) { return t.extend(this._change.s.apply(this, arguments), this._change.w.apply(this, [e, i, s])) }, ne: function (e, i, s) { return t.extend(this._change.n.apply(this, arguments), this._change.e.apply(this, [e, i, s])) }, nw: function (e, i, s) { return t.extend(this._change.n.apply(this, arguments), this._change.w.apply(this, [e, i, s])) } }, _propagate: function (e, i) { t.ui.plugin.call(this, e, [i, this.ui()]), "resize" !== e && this._trigger(e, i, this.ui()) }, plugins: {}, ui: function () { return { originalElement: this.originalElement, element: this.element, helper: this.helper, position: this.position, size: this.size, originalSize: this.originalSize, originalPosition: this.originalPosition } } }), t.ui.plugin.add("resizable", "animate", { stop: function (e) { var i = t(this).resizable("instance"), s = i.options, n = i._proportionallyResizeElements, o = n.length && /textarea/i.test(n[0].nodeName), a = o && i._hasScroll(n[0], "left") ? 0 : i.sizeDiff.height, r = o ? 0 : i.sizeDiff.width, l = { width: i.size.width - r, height: i.size.height - a }, h = parseFloat(i.element.css("left")) + (i.position.left - i.originalPosition.left) || null, c = parseFloat(i.element.css("top")) + (i.position.top - i.originalPosition.top) || null; i.element.animate(t.extend(l, c && h ? { top: c, left: h } : {}), { duration: s.animateDuration, easing: s.animateEasing, step: function () { var s = { width: parseFloat(i.element.css("width")), height: parseFloat(i.element.css("height")), top: parseFloat(i.element.css("top")), left: parseFloat(i.element.css("left")) }; n && n.length && t(n[0]).css({ width: s.width, height: s.height }), i._updateCache(s), i._propagate("resize", e) } }) } }), t.ui.plugin.add("resizable", "containment", { start: function () { var e, i, s, n, o, a, r, l = t(this).resizable("instance"), h = l.options, c = l.element, u = h.containment, d = u instanceof t ? u.get(0) : /parent/.test(u) ? c.parent().get(0) : u; d && (l.containerElement = t(d), /document/.test(u) || u === document ? (l.containerOffset = { left: 0, top: 0 }, l.containerPosition = { left: 0, top: 0 }, l.parentData = { element: t(document), left: 0, top: 0, width: t(document).width(), height: t(document).height() || document.body.parentNode.scrollHeight }) : (e = t(d), i = [], t(["Top", "Right", "Left", "Bottom"]).each(function (t, s) { i[t] = l._num(e.css("padding" + s)) }), l.containerOffset = e.offset(), l.containerPosition = e.position(), l.containerSize = { height: e.innerHeight() - i[3], width: e.innerWidth() - i[1] }, s = l.containerOffset, n = l.containerSize.height, o = l.containerSize.width, a = l._hasScroll(d, "left") ? d.scrollWidth : o, r = l._hasScroll(d) ? d.scrollHeight : n, l.parentData = { element: d, left: s.left, top: s.top, width: a, height: r })) }, resize: function (e) { var i, s, n, o, a = t(this).resizable("instance"), r = a.options, l = a.containerOffset, h = a.position, c = a._aspectRatio || e.shiftKey, u = { top: 0, left: 0 }, d = a.containerElement, p = !0; d[0] !== document && /static/.test(d.css("position")) && (u = l), h.left < (a._helper ? l.left : 0) && (a.size.width = a.size.width + (a._helper ? a.position.left - l.left : a.position.left - u.left), c && (a.size.height = a.size.width / a.aspectRatio, p = !1), a.position.left = r.helper ? l.left : 0), h.top < (a._helper ? l.top : 0) && (a.size.height = a.size.height + (a._helper ? a.position.top - l.top : a.position.top), c && (a.size.width = a.size.height * a.aspectRatio, p = !1), a.position.top = a._helper ? l.top : 0), n = a.containerElement.get(0) === a.element.parent().get(0), o = /relative|absolute/.test(a.containerElement.css("position")), n && o ? (a.offset.left = a.parentData.left + a.position.left, a.offset.top = a.parentData.top + a.position.top) : (a.offset.left = a.element.offset().left, a.offset.top = a.element.offset().top), i = Math.abs(a.sizeDiff.width + (a._helper ? a.offset.left - u.left : a.offset.left - l.left)), s = Math.abs(a.sizeDiff.height + (a._helper ? a.offset.top - u.top : a.offset.top - l.top)), i + a.size.width >= a.parentData.width && (a.size.width = a.parentData.width - i, c && (a.size.height = a.size.width / a.aspectRatio, p = !1)), s + a.size.height >= a.parentData.height && (a.size.height = a.parentData.height - s, c && (a.size.width = a.size.height * a.aspectRatio, p = !1)), p || (a.position.left = a.prevPosition.left, a.position.top = a.prevPosition.top, a.size.width = a.prevSize.width, a.size.height = a.prevSize.height) }, stop: function () { var e = t(this).resizable("instance"), i = e.options, s = e.containerOffset, n = e.containerPosition, o = e.containerElement, a = t(e.helper), r = a.offset(), l = a.outerWidth() - e.sizeDiff.width, h = a.outerHeight() - e.sizeDiff.height; e._helper && !i.animate && /relative/.test(o.css("position")) && t(this).css({ left: r.left - n.left - s.left, width: l, height: h }), e._helper && !i.animate && /static/.test(o.css("position")) && t(this).css({ left: r.left - n.left - s.left, width: l, height: h }) } }), t.ui.plugin.add("resizable", "alsoResize", {
28        start: function () { var e = t(this).resizable("instance"), i = e.options; t(i.alsoResize).each(function () { var e = t(this); e.data("ui-resizable-alsoresize", { width: parseFloat(e.width()), height: parseFloat(e.height()), left: parseFloat(e.css("left")), top: parseFloat(e.css("top")) }) }) }, resize: function (e, i) {
29            var s = t(this).resizable("instance"), n = s.options, o = s.originalSize, a = s.originalPosition, r = { height: s.size.height - o.height || 0, width: s.size.width - o.width || 0, top: s.position.top - a.top || 0, left: s.position.left - a.left || 0 };
30            t(n.alsoResize).each(function () { var e = t(this), s = t(this).data("ui-resizable-alsoresize"), n = {}, o = e.parents(i.originalElement[0]).length ? ["width", "height"] : ["width", "height", "top", "left"]; t.each(o, function (t, e) { var i = (s[e] || 0) + (r[e] || 0); i && i >= 0 && (n[e] = i || null) }), e.css(n) })
31        }, stop: function () { t(this).removeData("ui-resizable-alsoresize") }
32    }), t.ui.plugin.add("resizable", "ghost", { start: function () { var e = t(this).resizable("instance"), i = e.size; e.ghost = e.originalElement.clone(), e.ghost.css({ opacity: .25, display: "block", position: "relative", height: i.height, width: i.width, margin: 0, left: 0, top: 0 }), e._addClass(e.ghost, "ui-resizable-ghost"), t.uiBackCompat !== !1 && "string" == typeof e.options.ghost && e.ghost.addClass(this.options.ghost), e.ghost.appendTo(e.helper) }, resize: function () { var e = t(this).resizable("instance"); e.ghost && e.ghost.css({ position: "relative", height: e.size.height, width: e.size.width }) }, stop: function () { var e = t(this).resizable("instance"); e.ghost && e.helper && e.helper.get(0).removeChild(e.ghost.get(0)) } }), t.ui.plugin.add("resizable", "grid", { resize: function () { var e, i = t(this).resizable("instance"), s = i.options, n = i.size, o = i.originalSize, a = i.originalPosition, r = i.axis, l = "number" == typeof s.grid ? [s.grid, s.grid] : s.grid, h = l[0] || 1, c = l[1] || 1, u = Math.round((n.width - o.width) / h) * h, d = Math.round((n.height - o.height) / c) * c, p = o.width + u, f = o.height + d, g = s.maxWidth && p > s.maxWidth, m = s.maxHeight && f > s.maxHeight, _ = s.minWidth && s.minWidth > p, v = s.minHeight && s.minHeight > f; s.grid = l, _ && (p += h), v && (f += c), g && (p -= h), m && (f -= c), /^(se|s|e)$/.test(r) ? (i.size.width = p, i.size.height = f) : /^(ne)$/.test(r) ? (i.size.width = p, i.size.height = f, i.position.top = a.top - d) : /^(sw)$/.test(r) ? (i.size.width = p, i.size.height = f, i.position.left = a.left - u) : ((0 >= f - c || 0 >= p - h) && (e = i._getPaddingPlusBorderDimensions(this)), f - c > 0 ? (i.size.height = f, i.position.top = a.top - d) : (f = c - e.height, i.size.height = f, i.position.top = a.top + o.height - f), p - h > 0 ? (i.size.width = p, i.position.left = a.left - u) : (p = h - e.width, i.size.width = p, i.position.left = a.left + o.width - p)) } }), t.ui.resizable, t.widget("ui.selectable", t.ui.mouse, { version: "1.12.1", options: { appendTo: "body", autoRefresh: !0, distance: 0, filter: "*", tolerance: "touch", selected: null, selecting: null, start: null, stop: null, unselected: null, unselecting: null }, _create: function () { var e = this; this._addClass("ui-selectable"), this.dragged = !1, this.refresh = function () { e.elementPos = t(e.element[0]).offset(), e.selectees = t(e.options.filter, e.element[0]), e._addClass(e.selectees, "ui-selectee"), e.selectees.each(function () { var i = t(this), s = i.offset(), n = { left: s.left - e.elementPos.left, top: s.top - e.elementPos.top }; t.data(this, "selectable-item", { element: this, $element: i, left: n.left, top: n.top, right: n.left + i.outerWidth(), bottom: n.top + i.outerHeight(), startselected: !1, selected: i.hasClass("ui-selected"), selecting: i.hasClass("ui-selecting"), unselecting: i.hasClass("ui-unselecting") }) }) }, this.refresh(), this._mouseInit(), this.helper = t("<div>"), this._addClass(this.helper, "ui-selectable-helper") }, _destroy: function () { this.selectees.removeData("selectable-item"), this._mouseDestroy() }, _mouseStart: function (e) { var i = this, s = this.options; this.opos = [e.pageX, e.pageY], this.elementPos = t(this.element[0]).offset(), this.options.disabled || (this.selectees = t(s.filter, this.element[0]), this._trigger("start", e), t(s.appendTo).append(this.helper), this.helper.css({ left: e.pageX, top: e.pageY, width: 0, height: 0 }), s.autoRefresh && this.refresh(), this.selectees.filter(".ui-selected").each(function () { var s = t.data(this, "selectable-item"); s.startselected = !0, e.metaKey || e.ctrlKey || (i._removeClass(s.$element, "ui-selected"), s.selected = !1, i._addClass(s.$element, "ui-unselecting"), s.unselecting = !0, i._trigger("unselecting", e, { unselecting: s.element })) }), t(e.target).parents().addBack().each(function () { var s, n = t.data(this, "selectable-item"); return n ? (s = !e.metaKey && !e.ctrlKey || !n.$element.hasClass("ui-selected"), i._removeClass(n.$element, s ? "ui-unselecting" : "ui-selected")._addClass(n.$element, s ? "ui-selecting" : "ui-unselecting"), n.unselecting = !s, n.selecting = s, n.selected = s, s ? i._trigger("selecting", e, { selecting: n.element }) : i._trigger("unselecting", e, { unselecting: n.element }), !1) : void 0 })) }, _mouseDrag: function (e) { if (this.dragged = !0, !this.options.disabled) { var i, s = this, n = this.options, o = this.opos[0], a = this.opos[1], r = e.pageX, l = e.pageY; return o > r && (i = r, r = o, o = i), a > l && (i = l, l = a, a = i), this.helper.css({ left: o, top: a, width: r - o, height: l - a }), this.selectees.each(function () { var i = t.data(this, "selectable-item"), h = !1, c = {}; i && i.element !== s.element[0] && (c.left = i.left + s.elementPos.left, c.right = i.right + s.elementPos.left, c.top = i.top + s.elementPos.top, c.bottom = i.bottom + s.elementPos.top, "touch" === n.tolerance ? h = !(c.left > r || o > c.right || c.top > l || a > c.bottom) : "fit" === n.tolerance && (h = c.left > o && r > c.right && c.top > a && l > c.bottom), h ? (i.selected && (s._removeClass(i.$element, "ui-selected"), i.selected = !1), i.unselecting && (s._removeClass(i.$element, "ui-unselecting"), i.unselecting = !1), i.selecting || (s._addClass(i.$element, "ui-selecting"), i.selecting = !0, s._trigger("selecting", e, { selecting: i.element }))) : (i.selecting && ((e.metaKey || e.ctrlKey) && i.startselected ? (s._removeClass(i.$element, "ui-selecting"), i.selecting = !1, s._addClass(i.$element, "ui-selected"), i.selected = !0) : (s._removeClass(i.$element, "ui-selecting"), i.selecting = !1, i.startselected && (s._addClass(i.$element, "ui-unselecting"), i.unselecting = !0), s._trigger("unselecting", e, { unselecting: i.element }))), i.selected && (e.metaKey || e.ctrlKey || i.startselected || (s._removeClass(i.$element, "ui-selected"), i.selected = !1, s._addClass(i.$element, "ui-unselecting"), i.unselecting = !0, s._trigger("unselecting", e, { unselecting: i.element }))))) }), !1 } }, _mouseStop: function (e) { var i = this; return this.dragged = !1, t(".ui-unselecting", this.element[0]).each(function () { var s = t.data(this, "selectable-item"); i._removeClass(s.$element, "ui-unselecting"), s.unselecting = !1, s.startselected = !1, i._trigger("unselected", e, { unselected: s.element }) }), t(".ui-selecting", this.element[0]).each(function () { var s = t.data(this, "selectable-item"); i._removeClass(s.$element, "ui-selecting")._addClass(s.$element, "ui-selected"), s.selecting = !1, s.selected = !0, s.startselected = !0, i._trigger("selected", e, { selected: s.element }) }), this._trigger("stop", e), this.helper.remove(), !1 } }), t.widget("ui.sortable", t.ui.mouse, { version: "1.12.1", widgetEventPrefix: "sort", ready: !1, options: { appendTo: "parent", axis: !1, connectWith: !1, containment: !1, cursor: "auto", cursorAt: !1, dropOnEmpty: !0, forcePlaceholderSize: !1, forceHelperSize: !1, grid: !1, handle: !1, helper: "original", items: "> *", opacity: !1, placeholder: !1, revert: !1, scroll: !0, scrollSensitivity: 20, scrollSpeed: 20, scope: "default", tolerance: "intersect", zIndex: 1e3, activate: null, beforeStop: null, change: null, deactivate: null, out: null, over: null, receive: null, remove: null, sort: null, start: null, stop: null, update: null }, _isOverAxis: function (t, e, i) { return t >
vendor: 10,799 bytes, line 32
32= e && e + i > t }, _isFloating: function (t) { return /left|right/.test(t.css("float")) || /inline|table-cell/.test(t.css("display")) }, _create: function () { this.containerCache = {}, this._addClass("ui-sortable"), this.refresh(), this.offset = this.element.offset(), this._mouseInit(), this._setHandleClassName(), this.ready = !0 }, _setOption: function (t, e) { this._super(t, e), "handle" === t && this._setHandleClassName() }, _setHandleClassName: function () { var e = this; this._removeClass(this.element.find(".ui-sortable-handle"), "ui-sortable-handle"), t.each(this.items, function () { e._addClass(this.instance.options.handle ? this.item.find(this.instance.options.handle) : this.item, "ui-sortable-handle") }) }, _destroy: function () { this._mouseDestroy(); for (var t = this.items.length - 1; t >= 0; t--)this.items[t].item.removeData(this.widgetName + "-item"); return this }, _mouseCapture: function (e, i) { var s = null, n = !1, o = this; return this.reverting ? !1 : this.options.disabled || "static" === this.options.type ? !1 : (this._refreshItems(e), t(e.target).parents().each(function () { return t.data(this, o.widgetName + "-item") === o ? (s = t(this), !1) : void 0 }), t.data(e.target, o.widgetName + "-item") === o && (s = t(e.target)), s ? !this.options.handle || i || (t(this.options.handle, s).find("*").addBack().each(function () { this === e.target && (n = !0) }), n) ? (this.currentItem = s, this._removeCurrentsFromItems(), !0) : !1 : !1) }, _mouseStart: function (e, i, s) { var n, o, a = this.options; if (this.currentContainer = this, this.refreshPositions(), this.helper = this._createHelper(e), this._cacheHelperProportions(), this._cacheMargins(), this.scrollParent = this.helper.scrollParent(), this.offset = this.currentItem.offset(), this.offset = { top: this.offset.top - this.margins.top, left: this.offset.left - this.margins.left }, t.extend(this.offset, { click: { left: e.pageX - this.offset.left, top: e.pageY - this.offset.top }, parent: this._getParentOffset(), relative: this._getRelativeOffset() }), this.helper.css("position", "absolute"), this.cssPosition = this.helper.css("position"), this.originalPosition = this._generatePosition(e), this.originalPageX = e.pageX, this.originalPageY = e.pageY, a.cursorAt && this._adjustOffsetFromHelper(a.cursorAt), this.domPosition = { prev: this.currentItem.prev()[0], parent: this.currentItem.parent()[0] }, this.helper[0] !== this.currentItem[0] && this.currentItem.hide(), this._createPlaceholder(), a.containment && this._setContainment(), a.cursor && "auto" !== a.cursor && (o = this.document.find("body"), this.storedCursor = o.css("cursor"), o.css("cursor", a.cursor), this.storedStylesheet = t("<style>*{ cursor: " + a.cursor + " !important; }</style>").appendTo(o)), a.opacity && (this.helper.css("opacity") && (this._storedOpacity = this.helper.css("opacity")), this.helper.css("opacity", a.opacity)), a.zIndex && (this.helper.css("zIndex") && (this._storedZIndex = this.helper.css("zIndex")), this.helper.css("zIndex", a.zIndex)), this.scrollParent[0] !== this.document[0] && "HTML" !== this.scrollParent[0].tagName && (this.overflowOffset = this.scrollParent.offset()), this._trigger("start", e, this._uiHash()), this._preserveHelperProportions || this._cacheHelperProportions(), !s) for (n = this.containers.length - 1; n >= 0; n--)this.containers[n]._trigger("activate", e, this._uiHash(this)); return t.ui.ddmanager && (t.ui.ddmanager.current = this), t.ui.ddmanager && !a.dropBehaviour && t.ui.ddmanager.prepareOffsets(this, e), this.dragging = !0, this._addClass(this.helper, "ui-sortable-helper"), this._mouseDrag(e), !0 }, _mouseDrag: function (e) { var i, s, n, o, a = this.options, r = !1; for (this.position = this._generatePosition(e), 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 - e.pageY < a.scrollSensitivity ? this.scrollParent[0].scrollTop = r = this.scrollParent[0].scrollTop + a.scrollSpeed : e.pageY - this.overflowOffset.top < a.scrollSensitivity && (this.scrollParent[0].scrollTop = r = this.scrollParent[0].scrollTop - a.scrollSpeed), this.overflowOffset.left + this.scrollParent[0].offsetWidth - e.pageX < a.scrollSensitivity ? this.scrollParent[0].scrollLeft = r = this.scrollParent[0].scrollLeft + a.scrollSpeed : e.pageX - this.overflowOffset.left < a.scrollSensitivity && (this.scrollParent[0].scrollLeft = r = this.scrollParent[0].scrollLeft - a.scrollSpeed)) : (e.pageY - this.document.scrollTop() < a.scrollSensitivity ? r = this.document.scrollTop(this.document.scrollTop() - a.scrollSpeed) : this.window.height() - (e.pageY - this.document.scrollTop()) < a.scrollSensitivity && (r = this.document.scrollTop(this.document.scrollTop() + a.scrollSpeed)), e.pageX - this.document.scrollLeft() < a.scrollSensitivity ? r = this.document.scrollLeft(this.document.scrollLeft() - a.scrollSpeed) : this.window.width() - (e.pageX - this.document.scrollLeft()) < a.scrollSensitivity && (r = this.document.scrollLeft(this.document.scrollLeft() + a.scrollSpeed))), r !== !1 && t.ui.ddmanager && !a.dropBehaviour && t.ui.ddmanager.prepareOffsets(this, e)), this.positionAbs = this._convertPositionTo("absolute"), this.options.axis && "y" === this.options.axis || (this.helper[0].style.left = this.position.left + "px"), this.options.axis && "x" === this.options.axis || (this.helper[0].style.top = this.position.top + "px"), i = this.items.length - 1; i >= 0; i--)if (s = this.items[i], n = s.item[0], o = this._intersectsWithPointer(s), o && s.instance === this.currentContainer && n !== this.currentItem[0] && this.placeholder[1 === o ? "next" : "prev"]()[0] !== n && !t.contains(this.placeholder[0], n) && ("semi-dynamic" === this.options.type ? !t.contains(this.element[0], n) : !0)) { if (this.direction = 1 === o ? "down" : "up", "pointer" !== this.options.tolerance && !this._intersectsWithSides(s)) break; this._rearrange(e, s), this._trigger("change", e, this._uiHash()); break } return this._contactContainers(e), t.ui.ddmanager && t.ui.ddmanager.drag(this, e), this._trigger("sort", e, this._uiHash()), this.lastPositionAbs = this.positionAbs, !1 }, _mouseStop: function (e, i) { if (e) { if (t.ui.ddmanager && !this.options.dropBehaviour && t.ui.ddmanager.drop(this, e), this.options.revert) { var s = this, n = this.placeholder.offset(), o = this.options.axis, a = {}; o && "x" !== o || (a.left = n.left - this.offset.parent.left - this.margins.left + (this.offsetParent[0] === this.document[0].body ? 0 : this.offsetParent[0].scrollLeft)), o && "y" !== o || (a.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, t(this.helper).animate(a, parseInt(this.options.revert, 10) || 500, function () { s._clear(e) }) } else this._clear(e, i); return !1 } }, cancel: function () { if (this.dragging) { this._mouseUp(new t.Event("mouseup", { target: null })), "original" === this.options.helper ? (this.currentItem.css(this._storedCSS), this._removeClass(this.currentItem, "ui-sortable-helper")) : this.currentItem.show(); for (var e = this.containers.length - 1; e >= 0; e--)this.containers[e]._trigger("deactivate", null, this._uiHash(this)), this.containers[e].containerCache.over && (this.containers[e]._trigger("out", null, this._uiHash(this)), this.containers[e].containerCache.over = 0) } return this.placeholder && (this.placeholder[0].parentNode && this.placeholder[0].parentNode.removeChild(this.placeholder[0]), "original" !== this.options.helper && this.helper && this.helper[0].parentNode && this.helper.remove(), t.extend(this, { helper: null, dragging: !1, reverting: !1, _noFinalSort: null }), this.domPosition.prev ? t(this.domPosition.prev).after(this.currentItem) : t(this.domPosition.parent).prepend(this.currentItem)), this }, serialize: function (e) { var i = this._getItemsAsjQuery(e && e.connected), s = []; return e = e || {}, t(i).each(function () { var i = (t(e.item || this).attr(e.attribute || "id") || "").match(e.expression || /(.+)[\-=_](.+)/); i && s.push((e.key || i[1] + "[]") + "=" + (e.key && e.expression ? i[1] : i[2])) }), !s.length && e.key && s.push(e.key + "="), s.join("&") }, toArray: function (e) { var i = this._getItemsAsjQuery(e && e.connected), s = []; return e = e || {}, i.each(function () { s.push(t(e.item || this).attr(e.attribute || "id") || "") }), s }, _intersectsWith: function (t) { var e = this.positionAbs.left, i = e + this.helperProportions.width, s = this.positionAbs.top, n = s + this.helperProportions.height, o = t.left, a = o + t.width, r = t.top, l = r + t.height, h = this.offset.click.top, c = this.offset.click.left, u = "x" === this.options.axis || s + h > r && l > s + h, d = "y" === this.options.axis || e + c > o && a > e + c, p = u && d; 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 && s + this.helperProportions.height / 2 > r && l > n - this.helperProportions.height / 2 }, _intersectsWithPointer: function (t) { var e, i, s = "x" === this.options.axis || this._isOverAxis(this.positionAbs.top + this.offset.click.top, t.top, t.height), n = "y" === this.options.axis || this._isOverAxis(this.positionAbs.left + this.offset.click.left, t.left, t.width), o = s && n; return o ? (e = this._getDragVerticalDirection(), i = this._getDragHorizontalDirection(), this.floating ? "right" === i || "down" === e ? 2 : 1 : e && ("down" === e ? 2 : 1)) : !1 }, _intersectsWithSides: function (t) { var e = this._isOverAxis(this.positionAbs.top + this.offset.click.top, t.top + t.height / 2, t.height), i = this._isOverAxis(this.positionAbs.left + this.offset.click.left, t.left + t.width / 2, t.width), s = this._getDragVerticalDirection(), n = this._getDragHorizontalDirection(); return this.floating && n ? "right" === n && i || "left" === n && !i : s && ("down" === s && e || "up" === s && !e) }, _getDragVerticalDirection: function () { var t = this.positionAbs.top - this.lastPositionAbs.top; return 0 !== t && (t > 0 ? "down" : "up") }, _getDragHorizontalDirection: function () { var t = this.positionAbs.left - this.lastPositionAbs.left; return 0 !== t && (t > 0 ? "right" : "left") }, refresh: function (t) { return this._refreshItems(t), this._setHandleClassName(), this.refreshPositions(), this }, _connectWith: function () { var t = this.options;
vendor: 2,686 bytes, line 32
32 return t.connectWith.constructor === String ? [t.connectWith] : t.connectWith }, _getItemsAsjQuery: function (e) { function i() { r.push(this) } var s, n, o, a, r = [], l = [], h = this._connectWith(); if (h && e) for (s = h.length - 1; s >= 0; s--)for (o = t(h[s], this.document[0]), n = o.length - 1; n >= 0; n--)a = t.data(o[n], this.widgetFullName), a && a !== this && !a.options.disabled && l.push([t.isFunction(a.options.items) ? a.options.items.call(a.element) : t(a.options.items, a.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"), a]); for (l.push([t.isFunction(this.options.items) ? this.options.items.call(this.element, null, { options: this.options, item: this.currentItem }) : t(this.options.items, this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"), this]), s = l.length - 1; s >= 0; s--)l[s][0].each(i); return t(r) }, _removeCurrentsFromItems: function () { var e = this.currentItem.find(":data(" + this.widgetName + "-item)"); this.items = t.grep(this.items, function (t) { for (var i = 0; e.length > i; i++)if (e[i] === t.item[0]) return !1; return !0 }) }, _refreshItems: function (e) { this.items = [], this.containers = [this]; var i, s, n, o, a, r, l, h, c = this.items, u = [[t.isFunction(this.options.items) ? this.options.items.call(this.element[0], e, { item: this.currentItem }) : t(this.options.items, this.element), this]], d = this._connectWith(); if (d && this.ready) for (i = d.length - 1; i >= 0; i--)for (n = t(d[i], this.document[0]), s = n.length - 1; s >= 0; s--)o = t.data(n[s], this.widgetFullName), o && o !== this && !o.options.disabled && (u.push([t.isFunction(o.options.items) ? o.options.items.call(o.element[0], e, { item: this.currentItem }) : t(o.options.items, o.element), o]), this.containers.push(o)); for (i = u.length - 1; i >= 0; i--)for (a = u[i][1], r = u[i][0], s = 0, h = r.length; h > s; s++)l = t(r[s]), l.data(this.widgetName + "-item", a), c.push({ item: l, instance: a, width: 0, height: 0, left: 0, top: 0 }) }, refreshPositions: function (e) { this.floating = this.items.length ? "x" === this.options.axis || this._isFloating(this.items[0].item) : !1, this.offsetParent && this.helper && (this.offset.parent = this._getParentOffset()); var i, s, n, o; for (i = this.items.length - 1; i >= 0; i--)s = this.items[i], s.instance !== this.currentContainer && this.currentContainer && s.item[0] !== this.currentItem[0] || (n = this.options.toleranceElement ? t(this.options.toleranceElement, s.item) : s.item, e || (s.width = n.outerWidth(), s.height = n.outerHeight()), o = n.offset(), s.left = o.left, s.top = o.top); if (this.options.custom && this.options.custom.refreshContainers
vendor: 13,999 bytes, lines 32-33
32) this.options.custom.refreshContainers.call(this); else for (i = this.containers.length - 1; i >= 0; i--)o = this.containers[i].element.offset(), this.containers[i].containerCache.left = o.left, this.containers[i].containerCache.top = o.top, this.containers[i].containerCache.width = this.containers[i].element.outerWidth(), this.containers[i].containerCache.height = this.containers[i].element.outerHeight(); return this }, _createPlaceholder: function (e) { e = e || this; var i, s = e.options; s.placeholder && s.placeholder.constructor !== String || (i = s.placeholder, s.placeholder = { element: function () { var s = e.currentItem[0].nodeName.toLowerCase(), n = t("<" + s + ">", e.document[0]); return e._addClass(n, "ui-sortable-placeholder", i || e.currentItem[0].className)._removeClass(n, "ui-sortable-helper"), "tbody" === s ? e._createTrPlaceholder(e.currentItem.find("tr").eq(0), t("<tr>", e.document[0]).appendTo(n)) : "tr" === s ? e._createTrPlaceholder(e.currentItem, n) : "img" === s && n.attr("src", e.currentItem.attr("src")), i || n.css("visibility", "hidden"), n }, update: function (t, n) { (!i || s.forcePlaceholderSize) && (n.height() || n.height(e.currentItem.innerHeight() - parseInt(e.currentItem.css("paddingTop") || 0, 10) - parseInt(e.currentItem.css("paddingBottom") || 0, 10)), n.width() || n.width(e.currentItem.innerWidth() - parseInt(e.currentItem.css("paddingLeft") || 0, 10) - parseInt(e.currentItem.css("paddingRight") || 0, 10))) } }), e.placeholder = t(s.placeholder.element.call(e.element, e.currentItem)), e.currentItem.after(e.placeholder), s.placeholder.update(e, e.placeholder) }, _createTrPlaceholder: function (e, i) { var s = this; e.children().each(function () { t("<td>&#160;</td>", s.document[0]).attr("colspan", t(this).attr("colspan") || 1).appendTo(i) }) }, _contactContainers: function (e) { var i, s, n, o, a, r, l, h, c, u, d = null, p = null; for (i = this.containers.length - 1; i >= 0; i--)if (!t.contains(this.currentItem[0], this.containers[i].element[0])) if (this._intersectsWith(this.containers[i].containerCache)) { if (d && t.contains(this.containers[i].element[0], d.element[0])) continue; d = this.containers[i], p = i } else this.containers[i].containerCache.over && (this.containers[i]._trigger("out", e, this._uiHash(this)), this.containers[i].containerCache.over = 0); if (d) if (1 === this.containers.length) this.containers[p].containerCache.over || (this.containers[p]._trigger("over", e, this._uiHash(this)), this.containers[p].containerCache.over = 1); else { for (n = 1e4, o = null, c = d.floating || this._isFloating(this.currentItem), a = c ? "left" : "top", r = c ? "width" : "height", u = c ? "pageX" : "pageY", s = this.items.length - 1; s >= 0; s--)t.contains(this.containers[p].element[0], this.items[s].item[0]) && this.items[s].item[0] !== this.currentItem[0] && (l = this.items[s].item.offset()[a], h = !1, e[u] - l > this.items[s][r] / 2 && (h = !0), n > Math.abs(e[u] - l) && (n = Math.abs(e[u] - l), o = this.items[s], this.direction = h ? "up" : "down")); if (!o && !this.options.dropOnEmpty) return; if (this.currentContainer === this.containers[p]) return this.currentContainer.containerCache.over || (this.containers[p]._trigger("over", e, this._uiHash()), this.currentContainer.containerCache.over = 1), void 0; o ? this._rearrange(e, o, null, !0) : this._rearrange(e, null, this.containers[p].element, !0), this._trigger("change", e, this._uiHash()), this.containers[p]._trigger("change", e, this._uiHash(this)), this.currentContainer = this.containers[p], this.options.placeholder.update(this.currentContainer, this.placeholder), this.containers[p]._trigger("over", e, this._uiHash(this)), this.containers[p].containerCache.over = 1 } }, _createHelper: function (e) { var i = this.options, s = t.isFunction(i.helper) ? t(i.helper.apply(this.element[0], [e, this.currentItem])) : "clone" === i.helper ? this.currentItem.clone() : this.currentItem; return s.parents("body").length || t("parent" !== i.appendTo ? i.appendTo : this.currentItem[0].parentNode)[0].appendChild(s[0]), s[0] === this.currentItem[0] && (this._storedCSS = { width: this.currentItem[0].style.width, height: this.currentItem[0].style.height, position: this.currentItem.css("position"), top: this.currentItem.css("top"), left: this.currentItem.css("left") }), (!s[0].style.width || i.forceHelperSize) && s.width(this.currentItem.width()), (!s[0].style.height || i.forceHelperSize) && s.height(this.currentItem.height()), s }, _adjustOffsetFromHelper: function (e) { "string" == typeof e && (e = e.split(" ")), t.isArray(e) && (e = { left: +e[0], top: +e[1] || 0 }), "left" in e && (this.offset.click.left = e.left + this.margins.left), "right" in e && (this.offset.click.left = this.helperProportions.width - e.right + this.margins.left), "top" in e && (this.offset.click.top = e.top + this.margins.top), "bottom" in e && (this.offset.click.top = this.helperProportions.height - e.bottom + this.margins.top) }, _getParentOffset: function () { this.offsetParent = this.helper.offsetParent(); var e = this.offsetParent.offset(); return "absolute" === this.cssPosition && this.scrollParent[0] !== this.document[0] && t.contains(this.scrollParent[0], this.offsetParent[0]) && (e.left += this.scrollParent.scrollLeft(), e.top += this.scrollParent.scrollTop()), (this.offsetParent[0] === this.document[0].body || this.offsetParent[0].tagName && "html" === this.offsetParent[0].tagName.toLowerCase() && t.ui.ie) && (e = { top: 0, left: 0 }), { top: e.top + (parseInt(this.offsetParent.css("borderTopWidth"), 10) || 0), left: e.left + (parseInt(this.offsetParent.css("borderLeftWidth"), 10) || 0) } }, _getRelativeOffset: function () { if ("relative" === this.cssPosition) { var t = this.currentItem.position(); return { top: t.top - (parseInt(this.helper.css("top"), 10) || 0) + this.scrollParent.scrollTop(), left: t.left - (parseInt(this.helper.css("left"), 10) || 0) + this.scrollParent.scrollLeft() } } return { top: 0, left: 0 } }, _cacheMargins: function () { this.margins = { left: parseInt(this.currentItem.css("marginLeft"), 10) || 0, top: parseInt(this.currentItem.css("marginTop"), 10) || 0 } }, _cacheHelperProportions: function () { this.helperProportions = { width: this.helper.outerWidth(), height: this.helper.outerHeight() } }, _setContainment: function () { var e, i, s, n = this.options; "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) || (e = t(n.containment)[0], i = t(n.containment).offset(), s = "hidden" !== t(e).css("overflow"), this.containment = [i.left + (parseInt(t(e).css("borderLeftWidth"), 10) || 0) + (parseInt(t(e).css("paddingLeft"), 10) || 0) - this.margins.left, i.top + (parseInt(t(e).css("borderTopWidth"), 10) || 0) + (parseInt(t(e).css("paddingTop"), 10) || 0) - this.margins.top, i.left + (s ? Math.max(e.scrollWidth, e.offsetWidth) : e.offsetWidth) - (parseInt(t(e).css("borderLeftWidth"), 10) || 0) - (parseInt(t(e).css("paddingRight"), 10) || 0) - this.helperProportions.width - this.margins.left, i.top + (s ? Math.max(e.scrollHeight, e.offsetHeight) : e.offsetHeight) - (parseInt(t(e).css("borderTopWidth"), 10) || 0) - (parseInt(t(e).css("paddingBottom"), 10) || 0) - this.helperProportions.height - this.margins.top]) }, _convertPositionTo: function (e, i) { i || (i = this.position); var s = "absolute" === e ? 1 : -1, n = "absolute" !== this.cssPosition || this.scrollParent[0] !== this.document[0] && t.contains(this.scrollParent[0], this.offsetParent[0]) ? this.scrollParent : this.offsetParent, o = /(html|body)/i.test(n[0].tagName); return { top: i.top + this.offset.relative.top * s + this.offset.parent.top * s - ("fixed" === this.cssPosition ? -this.scrollParent.scrollTop() : o ? 0 : n.scrollTop()) * s, left: i.left + this.offset.relative.left * s + this.offset.parent.left * s - ("fixed" === this.cssPosition ? -this.scrollParent.scrollLeft() : o ? 0 : n.scrollLeft()) * s } }, _generatePosition: function (e) { var i, s, n = this.options, o = e.pageX, a = e.pageY, r = "absolute" !== this.cssPosition || this.scrollParent[0] !== this.document[0] && t.contains(this.scrollParent[0], this.offsetParent[0]) ? this.scrollParent : this.offsetParent, l = /(html|body)/i.test(r[0].tagName); return "relative" !== this.cssPosition || this.scrollParent[0] !== this.document[0] && this.scrollParent[0] !== this.offsetParent[0] || (this.offset.relative = this._getRelativeOffset()), this.originalPosition && (this.containment && (e.pageX - this.offset.click.left < this.containment[0] && (o = this.containment[0] + this.offset.click.left), e.pageY - this.offset.click.top < this.containment[1] && (a = this.containment[1] + this.offset.click.top), e.pageX - this.offset.click.left > this.containment[2] && (o = this.containment[2] + this.offset.click.left), e.pageY - this.offset.click.top > this.containment[3] && (a = this.containment[3] + this.offset.click.top)), n.grid && (i = this.originalPageY + Math.round((a - this.originalPageY) / n.grid[1]) * n.grid[1], a = this.containment ? i - this.offset.click.top >= this.containment[1] && i - this.offset.click.top <= this.containment[3] ? i : i - this.offset.click.top >= this.containment[1] ? i - n.grid[1] : i + n.grid[1] : i, s = this.originalPageX + Math.round((o - this.originalPageX) / n.grid[0]) * n.grid[0], o = this.containment ? s - this.offset.click.left >= this.containment[0] && s - this.offset.click.left <= this.containment[2] ? s : s - this.offset.click.left >= this.containment[0] ? s - n.grid[0] : s + n.grid[0] : s)), { top: a - this.offset.click.top - this.offset.relative.top - this.offset.parent.top + ("fixed" === this.cssPosition ? -this.scrollParent.scrollTop() : l ? 0 : r.scrollTop()), left: o - this.offset.click.left - this.offset.relative.left - this.offset.parent.left + ("fixed" === this.cssPosition ? -this.scrollParent.scrollLeft() : l ? 0 : r.scrollLeft()) } }, _rearrange: function (t, e, i, s) { 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; var n = this.counter; this._delay(function () { n === this.counter && this.refreshPositions(!s) }) }, _clear: function (t, e) { function i(t, e, i) { return function (s) { i._trigger(t, s, e._uiHash(e)) } } this.reverting = !1; var s, n = []; if (!this._noFinalSort && this.currentItem.parent().length && this.placeholder.before(this.currentItem), this._noFinalSort = null, this.helper[0] === this.currentItem[0]) { for (s in this._storedCSS) ("auto" === this._storedCSS[s] || "static" === this._storedCSS[s]) && (this._storedCSS[s] = ""); this.currentItem.css(this._storedCSS), this._removeClass(this.currentItem, "ui-sortable-helper") } else this.currentItem.show(); for (this.fromOutside && !e && n.push(function (t) { this._trigger("receive", t, this._uiHash(this.fromOutside)) }), !this.fromOutside && this.domPosition.prev === this.currentItem.prev().not(".ui-sortable-helper")[0] && this.domPosition.parent === this.currentItem.parent()[0] || e || n.push(function (t) { this._trigger("update", t, this._uiHash()) }), this !== this.currentContainer && (e || (n.push(function (t) { this._trigger("remove", t, this._uiHash()) }), n.push(function (t) { return function (e) { t._trigger("receive", e, this._uiHash(this)) } }.call(this, this.currentContainer)), n.push(function (t) { return function (e) { t._trigger("update", e, this._uiHash(this)) } }.call(this, this.currentContainer)))), s = this.containers.length - 1; s >= 0; s--)e || n.push(i("deactivate", this, this.containers[s])), this.containers[s].containerCache.over && (n.push(i("out", this, this.containers[s])), this.containers[s].containerCache.over = 0); if (this.storedCursor && (this.document.find("body").css("cursor", this.storedCursor), this.storedStylesheet.remove()), this._storedOpacity && this.helper.css("opacity", this._storedOpacity), this._storedZIndex && this.helper.css("zIndex", "auto" === this._storedZIndex ? "" : this._storedZIndex), this.dragging = !1, 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) { for (s = 0; n.length > s; s++)n[s].call(this, t); this._trigger("stop", t, this._uiHash()) } return this.fromOutside = !1, !this.cancelHelperRemoval }, _trigger: function () { t.Widget.prototype._trigger.apply(this, arguments) === !1 && this.cancel() }, _uiHash: function (e) { var i = e || this; return { helper: i.helper, placeholder: i.placeholder || t([]), position: i.position, originalPosition: i.originalPosition, offset: i.positionAbs, item: i.currentItem, sender: e ? e.element : null } } }), t.widget("ui.accordion", {
33        version: "1.12.1", options: { active: 0, animate: {}, classes: { "ui-accordion-header": "ui-corner-top", "ui-accordion-header-collapsed": "ui-corner-all", "ui-accordion-content": "ui-corner-bottom" }, collapsible: !1, event: "click", header: "> li > :first-child, > :not(li):even", heightStyle: "auto", icons: { activeHeader: "ui-icon-triangle-1-s", header: "ui-icon-triangle-1-e" }, activate: null, beforeActivate: null }, hideProps: { borderTopWidth: "hide", borderBottomWidth: "hide", paddingTop: "hide", paddingBottom: "hide", height: "hide" }
vendor: 16,384 bytes, lines 33-36
33, showProps: { borderTopWidth: "show", borderBottomWidth: "show", paddingTop: "show", paddingBottom: "show", height: "show" }, _create: function () { var e = this.options; this.prevShow = this.prevHide = t(), this._addClass("ui-accordion", "ui-widget ui-helper-reset"), this.element.attr("role", "tablist"), e.collapsible || e.active !== !1 && null != e.active || (e.active = 0), this._processPanels(), 0 > e.active && (e.active += this.headers.length), this._refresh() }, _getCreateEventData: function () { return { header: this.active, panel: this.active.length ? this.active.next() : t() } }, _createIcons: function () {
34            var e, i, s = this.options.icons; s && (e = t("<span>"), this._addClass(e, "ui-accordion-header-icon", "ui-icon " + s.header), e.prependTo(this.headers), i = this.active.children(".ui-accordion-header-icon"), this._removeClass(i, s.header)._addClass(i, null, s.activeHeader)._addClass(this.headers, "ui-accordion-icons"))
35        }, _destroyIcons: function () { this._removeClass(this.headers, "ui-accordion-icons"), this.headers.children(".ui-accordion-header-icon").remove() }, _destroy: function () { var t; 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", "") }, _setOption: function (t, e) { return "active" === t ? (this._activate(e), void 0) : ("event" === t && (this.options.event && this._off(this.headers, this.options.event), this._setupEvents(e)), this._super(t, e), "collapsible" !== t || e || this.options.active !== !1 || this._activate(0), "icons" === t && (this._destroyIcons(), e && this._createIcons()), void 0) }, _setOptionDisabled: function (t) { 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) }, _keydown: function (e) { if (!e.altKey && !e.ctrlKey) { var i = t.ui.keyCode, s = this.headers.length, n = this.headers.index(e.target), o = !1; switch (e.keyCode) { case i.RIGHT: case i.DOWN: o = this.headers[(n + 1) % s]; break; case i.LEFT: case i.UP: o = this.headers[(n - 1 + s) % s]; break; case i.SPACE: case i.ENTER: this._eventHandler(e); break; case i.HOME: o = this.headers[0]; break; case i.END: o = this.headers[s - 1] }o && (t(e.target).attr("tabIndex", -1), t(o).attr("tabIndex", 0), t(o).trigger("focus"), e.preventDefault()) } }, _panelKeyDown: function (e) { e.keyCode === t.ui.keyCode.UP && e.ctrlKey && t(e.currentTarget).prev().trigger("focus") }, refresh: function () { var e = this.options; this._processPanels(), e.active === !1 && e.collapsible === !0 || !this.headers.length ? (e.active = !1, this.active = t()) : e.active === !1 ? this._activate(0) : this.active.length && !t.contains(this.element[0], this.active[0]) ? this.headers.length === this.headers.find(".ui-state-disabled").length ? (e.active = !1, this.active = t()) : this._activate(Math.max(0, e.active - 1)) : e.active = this.headers.index(this.active), this._destroyIcons(), this._refresh() }, _processPanels: function () { var t = this.headers, e = this.panels; this.headers = this.element.find(this.options.header), this._addClass(this.headers, "ui-accordion-header ui-accordion-header-collapsed", "ui-state-default"), this.panels = this.headers.next().filter(":not(.ui-accordion-content-active)").hide(), this._addClass(this.panels, "ui-accordion-content", "ui-helper-reset ui-widget-content"), e && (this._off(t.not(this.headers)), this._off(e.not(this.panels))) }, _refresh: function () { var e, i = this.options, s = i.heightStyle, n = this.element.parent(); this.active = this._findActive(i.active), this._addClass(this.active, "ui-accordion-header-active", "ui-state-active")._removeClass(this.active, "ui-accordion-header-collapsed"), this._addClass(this.active.next(), "ui-accordion-content-active"), this.active.next().show(), this.headers.attr("role", "tab").each(function () { var e = t(this), i = e.uniqueId().attr("id"), s = e.next(), n = s.uniqueId().attr("id"); e.attr("aria-controls", n), s.attr("aria-labelledby", i) }).next().attr("role", "tabpanel"), this.headers.not(this.active).attr({ "aria-selected": "false", "aria-expanded": "false", tabIndex: -1 }).next().attr({ "aria-hidden": "true" }).hide(), this.active.length ? this.active.attr({ "aria-selected": "true", "aria-expanded": "true", tabIndex: 0 }).next().attr({ "aria-hidden": "false" }) : this.headers.eq(0).attr("tabIndex", 0), this._createIcons(), this._setupEvents(i.event), "fill" === s ? (e = n.height(), this.element.siblings(":visible").each(function () { var i = t(this), s = i.css("position"); "absolute" !== s && "fixed" !== s && (e -= i.outerHeight(!0)) }), this.headers.each(function () { e -= t(this).outerHeight(!0) }), this.headers.next().each(function () { t(this).height(Math.max(0, e - t(this).innerHeight() + t(this).height())) }).css("overflow", "auto")) : "auto" === s && (e = 0, this.headers.next().each(function () { var i = t(this).is(":visible"); i || t(this).show(), e = Math.max(e, t(this).css("height", "").height()), i || t(this).hide() }).height(e)) }, _activate: function (e) { var i = this._findActive(e)[0]; i !== this.active[0] && (i = i || this.active[0], this._eventHandler({ target: i, currentTarget: i, preventDefault: t.noop })) }, _findActive: function (e) { return "number" == typeof e ? this.headers.eq(e) : t() }, _setupEvents: function (e) { var i = { keydown: "_keydown" }; e && t.each(e.split(" "), function (t, e) { i[e] = "_eventHandler" }), this._off(this.headers.add(this.headers.next())), this._on(this.headers, i), this._on(this.headers.next(), { keydown: "_panelKeyDown" }), this._hoverable(this.headers), this._focusable(this.headers) }, _eventHandler: function (e) { var i, s, n = this.options, o = this.active, a = t(e.currentTarget), r = a[0] === o[0], l = r && n.collapsible, h = l ? t() : a.next(), c = o.next(), u = { oldHeader: o, oldPanel: c, newHeader: l ? t() : a, newPanel: h }; e.preventDefault(), r && !n.collapsible || this._trigger("beforeActivate", e, u) === !1 || (n.active = l ? !1 : this.headers.index(a), this.active = r ? t() : a, this._toggle(u), this._removeClass(o, "ui-accordion-header-active", "ui-state-active"), n.icons && (i = o.children(".ui-accordion-header-icon"), this._removeClass(i, null, n.icons.activeHeader)._addClass(i, null, n.icons.header)), r || (this._removeClass(a, "ui-accordion-header-collapsed")._addClass(a, "ui-accordion-header-active", "ui-state-active"), n.icons && (s = a.children(".ui-accordion-header-icon"), this._removeClass(s, null, n.icons.header)._addClass(s, null, n.icons.activeHeader)), this._addClass(a.next(), "ui-accordion-content-active"))) }, _toggle: function (e) { var i = e.newPanel, s = this.prevShow.length ? this.prevShow : e.oldPanel; this.prevShow.add(this.prevHide).stop(!0, !0), this.prevShow = i, this.prevHide = s, this.options.animate ? this._animate(i, s, e) : (s.hide(), i.show(), this._toggleComplete(e)), s.attr({ "aria-hidden": "true" }), s.prev().attr({ "aria-selected": "false", "aria-expanded": "false" }), i.length && s.length ? s.prev().attr({ tabIndex: -1, "aria-expanded": "false" }) : i.length && this.headers.filter(function () { return 0 === parseInt(t(this).attr("tabIndex"), 10) }).attr("tabIndex", -1), i.attr("aria-hidden", "false").prev().attr({ "aria-selected": "true", "aria-expanded": "true", tabIndex: 0 }) }, _animate: function (t, e, i) { var s, n, o, a = this, r = 0, l = t.css("box-sizing"), h = t.length && (!e.length || t.index() < e.index()), c = this.options.animate || {}, u = h && c.down || c, d = function () { a._toggleComplete(i) }; return "number" == typeof u && (o = u), "string" == typeof u && (n = u), n = n || u.easing || c.easing, o = o || u.duration || c.duration, e.length ? t.length ? (s = t.show().outerHeight(), e.animate(this.hideProps, { duration: o, easing: n, step: function (t, e) { e.now = Math.round(t) } }), t.hide().animate(this.showProps, { duration: o, easing: n, complete: d, step: function (t, i) { i.now = Math.round(t), "height" !== i.prop ? "content-box" === l && (r += i.now) : "content" !== a.options.heightStyle && (i.now = Math.round(s - e.outerHeight() - r), r = 0) } }), void 0) : e.animate(this.hideProps, o, n, d) : t.animate(this.showProps, o, n, d) }, _toggleComplete: function (t) { var e = t.oldPanel, i = e.prev(); 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) }
36    }), t.widget("ui.menu", { version: "1.12.1", defaultElement: "<ul>", delay: 300, options: { icons: { submenu: "ui-icon-caret-1-e" }, items: "> *", menus: "ul", position: { my: "left top", at: "right top" }, role: "menu", blur: null, focus: null, select: null }, _create: function () { this.activeMenu = this.element, this.mouseHandled = !1, this.element.uniqueId().attr({ role: this.options.role, tabIndex: 0 }), this._addClass("ui-menu", "ui-widget ui-widget-content"), this._on({ "mousedown .ui-menu-item": function (t) { t.preventDefault() }, "click .ui-menu-item": function (e) { var i = t(e.target), s = t(t.ui.safeActiveElement(this.document[0])); !this.mouseHandled && i.not(".ui-state-disabled").length && (this.select(e), e.isPropagationStopped() || (this.mouseHandled = !0), i.has(".ui-menu").length ? this.expand(e) : !this.element.is(":focus") && s.closest(".ui-menu").length && (this.element.trigger("focus", [!0]), this.active && 1 === this.active.parents(".ui-menu").length && clearTimeout(this.timer))) }, "mouseenter .ui-menu-item": function (e) { if (!this.previousFilter) { var i = t(e.target).closest(".ui-menu-item"), s = t(e.currentTarget); i[0] === s[0] && (this._removeClass(s.siblings().children(".ui-state-active"), null, "ui-state-active"), this.focus(e, s)) } }, mouseleave: "collapseAll", "mouseleave .ui-menu": "collapseAll", focus: function (t, e) { var i = this.active || this.element.find(this.options.items).eq(0); e || this.focus(t, i) }, blur: function (e) { this._delay(function () { var i = !t.contains(this.element[0], t.ui.safeActiveElement(this.document[0])); i && this.collapseAll(e) }) }, keydown: "_keydown" }), this.refresh(), this._on(this.document, { click: function (t) { this._closeOnDocumentClick(t) && this.collapseAll(t), this.mouseHandled = !1 } }) }, _destroy: function () { var e = this.element.find(".ui-menu-item").removeAttr("role aria-disabled"), i = e.children(".ui-menu-item-wrapper").removeUniqueId().removeAttr("tabIndex role aria-haspopup"); this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeAttr("role aria-labelledby aria-expanded aria-hidden aria-disabled tabIndex").removeUniqueId().show(), i.children().each(function () { var e = t(this); e.data("ui-menu-submenu-caret") && e.remove() }) }, _keydown: function (e) { var i, s, n, o, a = !0; switch (e.keyCode) { case t.ui.keyCode.PAGE_UP: this.previousPage(e); break; case t.ui.keyCode.PAGE_DOWN: this.nextPage(e); break; case t.ui.keyCode.HOME: this._move("first", "first", e); break; case t.ui.keyCode.END: this._move("last", "last", e); break; case t.ui.keyCode.UP: this.previous(e); break; case t.ui.keyCode.DOWN: this.next(e); break; case t.ui.keyCode.LEFT: this.collapse(e); break; case t.ui.keyCode.RIGHT: this.active && !this.active.is(".ui-state-disabled") && this.expand(e); break; case t.ui.keyCode.ENTER: case t.ui.keyCode.SPACE: this._activate(e); break; case t.ui.keyCode.ESCAPE: this.collapse(e); break; default: a = !1, s = this.previousFilter || "", o = !1, n = e.keyCode >= 96 && 105 >= e.keyCode ? "" + (e.keyCode - 96) : String.fromCharCode(e.keyCode), clearTimeout(this.filterTimer), n === s ? o = !0 : n = s + n, i = this._filterMenuItems(n), i = o && -1 !== i.index(this.active.next()) ? this.active.nextAll(".ui-menu-item") : i, i.length || (n = String.fromCharCode(e.keyCode), i = this._filterMenuItems(n)), i.length ? (this.focus(e, i), this.previousFilter = n, this.filterTimer = this._delay(function () { delete this.previousFilter }, 1e3)) : delete this.previousFilter }a && e.preventDefault() }, _activate: function (t) { this.active && !this.active.is(".ui-state-disabled") && (this.active.children("[aria-haspopup='true']").length ? this.expand(t) : this.select(t)) }, refresh: function () { var e, i, s, n, o, a = this, r = this.options.icons.submenu, l = this.element.find(this.options.menus); this._toggleClass("ui-menu-icons", null, !!this.element.find(".ui-icon").length), s = l.filter(":not(.ui-menu)").hide().attr({ role: this.options.role, "aria-hidden": "true", "aria-expanded": "false" }).each(function () { var e = t(this), i = e.prev(), s = t("<span>").data("ui-menu-submenu-caret", !0); a._addClass(s, "ui-menu-icon", "ui-icon " + r), i.attr("aria-haspopup", "true").prepend(s), e.attr("aria-labelledby", i.attr("id")) }), this._addClass(s, "ui-menu", "ui-widget ui-widget-content ui-front"), e = l.add(this.element), i = e.find(this.options.items), i.not(".ui-menu-item").each(function () { var e = t(this); a._isDivider(e) && a._addClass(e, "ui-menu-divider", "ui-widget-content") }), n = i.not(".ui-menu-item, .ui-menu-divider"), o = n.children().not(".ui-menu").uniqueId().attr({ tabIndex: -1, role: this._itemRole() }), this._addClass(n, "ui-menu-item")._addClass(o, "ui-menu-item-wrapper"), i.filter(".ui-state-disabled").attr("aria-disabled", "true"), this.active && !t.contains(this.element[0], this.active[0]) && this.blur() }, _itemRole: function () { return { menu: "menuitem", listbox: "option" }[this.options.role] }, _setOption: function (t, e) { if ("icons" === t) { var i = this.element.find(".ui-menu-icon"); this._removeClass(i, null, this.options.icons.submenu)._addClass(i, null, e.submenu) } this._super(t, e) }, _setOptionDisabled: function (t) { this._super(t), this.element.attr("aria-disabled", t + ""), this._toggleClass(null, "ui-state-disabled", !!t) }, focus: function (t, e) { var i, s, n; this.blur(t, t && "focus" === t.type), this._scrollIntoView(e), this.active = e.first(), s = this.active.children(".ui-menu-item-wrapper"), this._addClass(s, null, "ui-state-active"), this.options.role && this.element.attr("aria-activedescendant", s.attr("id")), n = this.active.parent().closest(".ui-menu-item").children(".ui-menu-item-wrapper"), this._addClass(n, null, "ui-state-active"), t && "keydown" === t.type ? this._close() : this.timer = this._delay(function () { this._close() }, this.delay), i = e.children(".ui-menu"), i.length && t && /^mouse/.test(t.type) && this._startOpening(i), this.activeMenu = e.parent(), this._trigger("focus", t, { item: e }) }, _scrollIntoView: function (e) { var i, s, n, o, a, r; this._hasScroll() && (i = parseFloat(t.css(this.activeMenu[0], "borderTopWidth")) || 0, s = parseFloat(t.css(this.activeMenu[0], "paddingTop")) || 0, n = e.offset().top - this.activeMenu.offset().top - i - s, o = this.activeMenu.scrollTop(), a = this.activeMenu.height(), r = e.outerHeight(), 0 > n ? this.activeMenu.scrollTop(o + n) : n + r > a && this.activeMenu.scrollTop(o + n - a + r)) }, blur: function (t, e) { 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) }, _startOpening: function (t) { clearTimeout(this.timer), "true" === t.attr("aria-hidden") && (this.timer = this._delay(function () { this._close(), this._open(t) }, this.delay)) }, _open: function (e) { var i = t.extend({ of: this.active }, this.options.position); clearTimeout(this.timer), this.element.find(".ui-menu").not(e.parents(".ui-menu")).hide().attr("aria-hidden", "true"), e.show().removeAttr("aria-hidden").attr("aria-expanded", "true").position(i) }, collapseAll: function (e, i) { clearTimeout(this.timer), this.timer = this._delay(function () { var s = i ? this.element : t(e && e.target).closest(this.element.find(".ui-menu")); s.length || (s = this.element), this._close(s), this.blur(e), this._removeClass(s.find(".ui-state-active"), null, "ui-state-active"), this.ac
vendor: 9,435 bytes, line 36
36tiveMenu = s }, this.delay) }, _close: function (t) { t || (t = this.active ? this.active.parent() : this.element), t.find(".ui-menu").hide().attr("aria-hidden", "true").attr("aria-expanded", "false") }, _closeOnDocumentClick: function (e) { return !t(e.target).closest(".ui-menu").length }, _isDivider: function (t) { return !/[^\-\u2014\u2013\s]/.test(t.text()) }, collapse: function (t) { var e = this.active && this.active.parent().closest(".ui-menu-item", this.element); e && e.length && (this._close(), this.focus(t, e)) }, expand: function (t) { var e = this.active && this.active.children(".ui-menu ").find(this.options.items).first(); e && e.length && (this._open(e.parent()), this._delay(function () { this.focus(t, e) })) }, next: function (t) { this._move("next", "first", t) }, previous: function (t) { this._move("prev", "last", t) }, isFirstItem: function () { return this.active && !this.active.prevAll(".ui-menu-item").length }, isLastItem: function () { return this.active && !this.active.nextAll(".ui-menu-item").length }, _move: function (t, e, i) { var s; this.active && (s = "first" === t || "last" === t ? this.active["first" === t ? "prevAll" : "nextAll"](".ui-menu-item").eq(-1) : this.active[t + "All"](".ui-menu-item").eq(0)), s && s.length && this.active || (s = this.activeMenu.find(this.options.items)[e]()), this.focus(i, s) }, nextPage: function (e) { var i, s, n; return this.active ? (this.isLastItem() || (this._hasScroll() ? (s = this.active.offset().top, n = this.element.height(), this.active.nextAll(".ui-menu-item").each(function () { return i = t(this), 0 > i.offset().top - s - n }), this.focus(e, i)) : this.focus(e, this.activeMenu.find(this.options.items)[this.active ? "last" : "first"]())), void 0) : (this.next(e), void 0) }, previousPage: function (e) { var i, s, n; return this.active ? (this.isFirstItem() || (this._hasScroll() ? (s = this.active.offset().top, n = this.element.height(), this.active.prevAll(".ui-menu-item").each(function () { return i = t(this), i.offset().top - s + n > 0 }), this.focus(e, i)) : this.focus(e, this.activeMenu.find(this.options.items).first())), void 0) : (this.next(e), void 0) }, _hasScroll: function () { return this.element.outerHeight() < this.element.prop("scrollHeight") }, select: function (e) { this.active = this.active || t(e.target).closest(".ui-menu-item"); var i = { item: this.active }; this.active.has(".ui-menu").length || this.collapseAll(e, !0), this._trigger("select", e, i) }, _filterMenuItems: function (e) { var i = e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&"), s = RegExp("^" + i, "i"); return this.activeMenu.find(this.options.items).filter(".ui-menu-item").filter(function () { return s.test(t.trim(t(this).children(".ui-menu-item-wrapper").text())) }) } }), t.widget("ui.autocomplete", { version: "1.12.1", defaultElement: "<input>", options: { appendTo: null, autoFocus: !1, delay: 300, minLength: 1, position: { my: "left top", at: "left bottom", collision: "none" }, source: null, change: null, close: null, focus: null, open: null, response: null, search: null, select: null }, requestIndex: 0, pending: 0, _create: function () { var e, i, s, n = this.element[0].nodeName.toLowerCase(), o = "textarea" === n, a = "input" === n; this.isMultiLine = o || !a && this._isContentEditable(this.element), this.valueMethod = this.element[o || a ? "val" : "text"], this.isNewMenu = !0, this._addClass("ui-autocomplete-input"), this.element.attr("autocomplete", "off"), this._on(this.element, { keydown: function (n) { if (this.element.prop("readOnly")) return e = !0, s = !0, i = !0, void 0; e = !1, s = !1, i = !1; var o = t.ui.keyCode; switch (n.keyCode) { case o.PAGE_UP: e = !0, this._move("previousPage", n); break; case o.PAGE_DOWN: e = !0, this._move("nextPage", n); break; case o.UP: e = !0, this._keyEvent("previous", n); break; case o.DOWN: e = !0, this._keyEvent("next", n); break; case o.ENTER: this.menu.active && (e = !0, n.preventDefault(), this.menu.select(n)); break; case o.TAB: this.menu.active && this.menu.select(n); break; case o.ESCAPE: this.menu.element.is(":visible") && (this.isMultiLine || this._value(this.term), this.close(n), n.preventDefault()); break; default: i = !0, this._searchTimeout(n) } }, keypress: function (s) { if (e) return e = !1, (!this.isMultiLine || this.menu.element.is(":visible")) && s.preventDefault(), void 0; if (!i) { var n = t.ui.keyCode; switch (s.keyCode) { case n.PAGE_UP: this._move("previousPage", s); break; case n.PAGE_DOWN: this._move("nextPage", s); break; case n.UP: this._keyEvent("previous", s); break; case n.DOWN: this._keyEvent("next", s) } } }, input: function (t) { return s ? (s = !1, t.preventDefault(), void 0) : (this._searchTimeout(t), void 0) }, focus: function () { this.selectedItem = null, this.previous = this._value() }, blur: function (t) { return this.cancelBlur ? (delete this.cancelBlur, void 0) : (clearTimeout(this.searching), this.close(t), this._change(t), void 0) } }), this._initSource(), this.menu = t("<ul>").appendTo(this._appendTo()).menu({ role: null }).hide().menu("instance"), this._addClass(this.menu.element, "ui-autocomplete", "ui-front"), this._on(this.menu.element, { mousedown: function (e) { e.preventDefault(), this.cancelBlur = !0, this._delay(function () { delete this.cancelBlur, this.element[0] !== t.ui.safeActiveElement(this.document[0]) && this.element.trigger("focus") }) }, menufocus: function (e, i) { var s, n; return this.isNewMenu && (this.isNewMenu = !1, e.originalEvent && /^mouse/.test(e.originalEvent.type)) ? (this.menu.blur(), this.document.one("mousemove", function () { t(e.target).trigger(e.originalEvent) }), void 0) : (n = i.item.data("ui-autocomplete-item"), !1 !== this._trigger("focus", e, { item: n }) && e.originalEvent && /^key/.test(e.originalEvent.type) && this._value(n.value), s = i.item.attr("aria-label") || n.value, s && t.trim(s).length && (this.liveRegion.children().hide(), t("<div>").text(s).appendTo(this.liveRegion)), void 0) }, menuselect: function (e, i) { var s = i.item.data("ui-autocomplete-item"), n = this.previous; this.element[0] !== t.ui.safeActiveElement(this.document[0]) && (this.element.trigger("focus"), this.previous = n, this._delay(function () { this.previous = n, this.selectedItem = s })), !1 !== this._trigger("select", e, { item: s }) && this._value(s.value), this.term = this._value(), this.close(e), this.selectedItem = s } }), this.liveRegion = t("<div>", { role: "status", "aria-live": "assertive", "aria-relevant": "additions" }).appendTo(this.document[0].body), this._addClass(this.liveRegion, null, "ui-helper-hidden-accessible"), this._on(this.window, { beforeunload: function () { this.element.removeAttr("autocomplete") } }) }, _destroy: function () { clearTimeout(this.searching), this.element.removeAttr("autocomplete"), this.menu.element.remove(), this.liveRegion.remove() }, _setOption: function (t, e) { this._super(t, e), "source" === t && this._initSource(), "appendTo" === t && this.menu.element.appendTo(this._appendTo()), "disabled" === t && e && this.xhr && this.xhr.abort() }, _isEventTargetInWidget: function (e) { var i = this.menu.element[0]; return e.target === this.element[0] || e.target === i || t.contains(i, e.target) }, _closeOnClickOutside: function (t) { this._isEventTargetInWidget(t) || this.close() }, _appendTo: function () { var e = this.options.appendTo; return e && (e = e.jquery || e.nodeType ? t(e) : this.document.find(e).eq(0)), e && e[0] || (e = this.element.closest(".ui-front, dialog")), e.length || (e = this.document[0].body), e }, _initSource: function () { var e, i, s = this; t.isArray(this.options.source) ? (e = this.options.source, this.source = function (i, s) { s(t.ui.autocomplete.filter(e, i.term)) }) : "string" == typeof this.options.source ? (i = this.options.source, this.source = function (e, n) { s.xhr && s.xhr.abort(), s.xhr = t.ajax({ url: i, data: e, dataType: "json", success: function (t) { n(t) }, error: function () { n([]) } }) }) : this.source = this.options.source }, _searchTimeout: function (t) { clearTimeout(this.searching), this.searching = this._delay(function () { var e = this.term === this._value(), i = this.menu.element.is(":visible"), s = t.altKey || t.ctrlKey || t.metaKey || t.shiftKey; (!e || e && !i && !s) && (this.selectedItem = null, this.search(null, t)) }, this.options.delay) }, search: function (t, e) { return t = null != t ? t : this._value(), this.term = this._value(), t.length < this.options.minLength ? this.close(e) : this._trigger("search", e) !== !1 ? this._search(t) : void 0 }, _search: function (t) { this.pending++, this._addClass("ui-autocomplete-loading"), this.cancelSearch = !1, this.source({ term: t }, this._response()) }, _response: function () { var e = ++this.requestIndex; return t.proxy(function (t) { e === this.requestIndex && this.__response(t), this.pending--, this.pending || this._removeClass("ui-autocomplete-loading") }, this) }, __response: function (t) { 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() }, close: function (t) { this.cancelSearch = !0, this._close(t) }, _close: function (t) { this._off(this.document, "mousedown"), this.menu.element.is(":visible") && (this.menu.element.hide(), this.menu.blur(), this.isNewMenu = !0, this._trigger("close", t)) }
vendor: 14,017 bytes, lines 36-40
36, _change: function (t) { this.previous !== this._value() && this._trigger("change", t, { item: this.selectedItem }) }, _normalize: function (e) { return e.length && e[0].label && e[0].value ? e : t.map(e, function (e) { return "string" == typeof e ? { label: e, value: e } : t.extend({}, e, { label: e.label || e.value, value: e.value || e.label }) }) }, _suggest: function (e) { var i = this.menu.element.empty(); this._renderMenu(i, e), this.isNewMenu = !0, this.menu.refresh(), i.show(), this._resizeMenu(), i.position(t.extend({ of: this.element }, this.options.position)), this.options.autoFocus && this.menu.next(), this._on(this.document, { mousedown: "_closeOnClickOutside" }) }, _resizeMenu: function () { var t = this.menu.element; t.outerWidth(Math.max(t.width("").outerWidth() + 1, this.element.outerWidth())) }, _renderMenu: function (e, i) { var s = this; t.each(i, function (t, i) { s._renderItemData(e, i) }) }, _renderItemData: function (t, e) { return this._renderItem(t, e).data("ui-autocomplete-item", e) }, _renderItem: function (e, i) { return t("<li>").append(t("<div>").text(i.label)).appendTo(e) }, _move: function (t, e) { return this.menu.element.is(":visible") ? this.menu.isFirstItem() && /^previous/.test(t) || this.menu.isLastItem() && /^next/.test(t) ? (this.isMultiLine || this._value(this.term), this.menu.blur(), void 0) : (this.menu[t](e), void 0) : (this.search(null, e), void 0) }, widget: function () { return this.menu.element }, _value: function () { return this.valueMethod.apply(this.element, arguments) }, _keyEvent: function (t, e) { (!this.isMultiLine || this.menu.element.is(":visible")) && (this._move(t, e), e.preventDefault()) }, _isContentEditable: function (t) { if (!t.length) return !1; var e = t.prop("contentEditable"); return "inherit" === e ? this._isContentEditable(t.parent()) : "true" === e } }), t.extend(t.ui.autocomplete, { escapeRegex: function (t) { return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&") }, filter: function (e, i) { var s = RegExp(t.ui.autocomplete.escapeRegex(i), "i"); return t.grep(e, function (t) { return s.test(t.label || t.value || t) }) } }), t.widget("ui.autocomplete", t.ui.autocomplete, { options: { messages: { noResults: "No search results.", results: function (t) { return t + (t > 1 ? " results are" : " result is") + " available, use up and down arrow keys to navigate." } } }, __response: function (e) { var i; this._superApply(arguments), this.options.disabled || this.cancelSearch || (i = e && e.length ? this.options.messages.results(e.length) : this.options.messages.noResults, this.liveRegion.children().hide(), t("<div>").text(i).appendTo(this.liveRegion)) } }), t.ui.autocomplete; var d = /ui-corner-([a-z]){2,6}/g; t.widget("ui.controlgroup", { version: "1.12.1", defaultElement: "<div>", options: { direction: "horizontal", disabled: null, onlyVisible: !0, items: { button: "input[type=button], input[type=submit], input[type=reset], button, a", controlgroupLabel: ".ui-controlgroup-label", checkboxradio: "input[type='checkbox'], input[type='radio']", selectmenu: "select", spinner: ".ui-spinner-input" } }, _create: function () { this._enhance() }, _enhance: function () { this.element.attr("role", "toolbar"), this.refresh() }, _destroy: function () { this._callChildMethod("destroy"), this.childWidgets.removeData("ui-controlgroup-data"), this.element.removeAttr("role"), this.options.items.controlgroupLabel && this.element.find(this.options.items.controlgroupLabel).find(".ui-controlgroup-label-contents").contents().unwrap() }, _initWidgets: function () { var e = this, i = []; t.each(this.options.items, function (s, n) { var o, a = {}; return n ? "controlgroupLabel" === s ? (o = e.element.find(n), o.each(function () { var e = t(this); e.children(".ui-controlgroup-label-contents").length || e.contents().wrapAll("<span class='ui-controlgroup-label-contents'></span>") }), e._addClass(o, null, "ui-widget ui-widget-content ui-state-default"), i = i.concat(o.get()), void 0) : (t.fn[s] && (a = e["_" + s + "Options"] ? e["_" + s + "Options"]("middle") : { classes: {} }, e.element.find(n).each(function () { var n = t(this), o = n[s]("instance"), r = t.widget.extend({}, a); if ("button" !== s || !n.parent(".ui-spinner").length) { o || (o = n[s]()[s]("instance")), o && (r.classes = e._resolveClassesValues(r.classes, o)), n[s](r); var l = n[s]("widget"); t.data(l[0], "ui-controlgroup-data", o ? o : n[s]("instance")), i.push(l[0]) } })), void 0) : void 0 }), this.childWidgets = t(t.unique(i)), this._addClass(this.childWidgets, "ui-controlgroup-item") }, _callChildMethod: function (e) { this.childWidgets.each(function () { var i = t(this), s = i.data("ui-controlgroup-data"); s && s[e] && s[e]() }) }, _updateCornerClass: function (t, e) { var i = "ui-corner-top ui-corner-bottom ui-corner-left ui-corner-right ui-corner-all", s = this._buildSimpleOptions(e, "label").classes.label; this._removeClass(t, null, i), this._addClass(t, null, s) }, _buildSimpleOptions: function (t, e) { var i = "vertical" === this.options.direction, s = { classes: {} }; return s.classes[e] = { middle: "", first: "ui-corner-" + (i ? "top" : "left"), last: "ui-corner-" + (i ? "bottom" : "right"), only: "ui-corner-all" }[t], s }, _spinnerOptions: function (t) { var e = this._buildSimpleOptions(t, "ui-spinner"); return e.classes["ui-spinner-up"] = "", e.classes["ui-spinner-down"] = "", e }, _buttonOptions: function (t) { return this._buildSimpleOptions(t, "ui-button") }, _checkboxradioOptions: function (t) { return this._buildSimpleOptions(t, "ui-checkboxradio-label") }, _selectmenuOptions: function (t) { var e = "vertical" === this.options.direction; return { width: e ? "auto" : !1, classes: { middle: { "ui-selectmenu-button-open": "", "ui-selectmenu-button-closed": "" }, first: { "ui-selectmenu-button-open": "ui-corner-" + (e ? "top" : "tl"), "ui-selectmenu-button-closed": "ui-corner-" + (e ? "top" : "left") }, last: { "ui-selectmenu-button-open": e ? "" : "ui-corner-tr", "ui-selectmenu-button-closed": "ui-corner-" + (e ? "bottom" : "right") }, only: { "ui-selectmenu-button-open": "ui-corner-top", "ui-selectmenu-button-closed": "ui-corner-all" } }[t] } }, _resolveClassesValues: function (e, i) { var s = {}; return t.each(e, function (n) { var o = i.options.classes[n] || ""; o = t.trim(o.replace(d, "")), s[n] = (o + " " + e[n]).replace(/\s+/g, " ") }), s }, _setOption: function (t, e) { return "direction" === t && this._removeClass("ui-controlgroup-" + this.options.direction), this._super(t, e), "disabled" === t ? (this._callChildMethod(e ? "disable" : "enable"), void 0) : (this.refresh(), void 0) }, refresh: function () { var e, i = this; this._addClass("ui-controlgroup ui-controlgroup-" + this.options.direction), "horizontal" === this.options.direction && this._addClass(null, "ui-helper-clearfix"), this._initWidgets(), e = this.childWidgets, this.options.onlyVisible && (e = e.filter(":visible")), e.length && (t.each(["first", "last"], function (t, s) { var n = e[s]().data("ui-controlgroup-data"); if (n && i["_" + n.widgetName + "Options"]) { var o = i["_" + n.widgetName + "Options"](1 === e.length ? "only" : s); o.classes = i._resolveClassesValues(o.classes, n), n.element[n.widgetName](o) } else i._updateCornerClass(e[s](), s) }), this._callChildMethod("refresh")) } }), t.widget("ui.checkboxradio", [t.ui.formResetMixin, {
37        version: "1.12.1", options: { disabled: null, label: null, icon: !0, classes: { "ui-checkboxradio-label": "ui-corner-all", "ui-checkboxradio-icon": "ui-corner-all" } }, _getCreateOptions: function () { var e, i, s = this, n = this._super() || {}; return this._readType(), i = this.element.labels(), this.label = t(i[i.length - 1]), this.label.length || t.error("No label found for checkboxradio widget"), this.originalLabel = "", this.label.contents().not(this.element[0]).each(function () { s.originalLabel += 3 === this.nodeType ? t(this).text() : this.outerHTML }), this.originalLabel && (n.label = this.originalLabel), e = this.element[0].disabled, null != e && (n.disabled = e), n }, _create: function () { var t = this.element[0].checked; this._bindFormResetHandler(), null == this.options.disabled && (this.options.disabled = this.element[0].disabled), this._setOption("disabled", this.options.disabled), this._addClass("ui-checkboxradio", "ui-helper-hidden-accessible"), this._addClass(this.label, "ui-checkboxradio-label", "ui-button ui-widget"), "radio" === this.type && this._addClass(this.label, "ui-checkboxradio-radio-label"), this.options.label && this.options.label !== this.originalLabel ? this._updateLabel() : this.originalLabel && (this.options.label = this.originalLabel), this._enhance(), t && (this._addClass(this.label, "ui-checkboxradio-checked", "ui-state-active"), this.icon && this._addClass(this.icon, null, "ui-state-hover")), this._on({ change: "_toggleClasses", focus: function () { this._addClass(this.label, null, "ui-state-focus ui-visual-focus") }, blur: function () { this._removeClass(this.label, null, "ui-state-focus ui-visual-focus") } }) }, _readType: function () { var e = this.element[0].nodeName.toLowerCase(); this.type = this.element[0].type, "input" === e && /radio|checkbox/.test(this.type) || t.error("Can't create checkboxradio on element.nodeName=" + e + " and element.type=" + this.type) }, _enhance: function () { this._updateIcon(this.element[0].checked) }, widget: function () { return this.label }, _getRadioGroup: function () { var e, i = this.element[0].name, s = "input[name='" + t.ui.escapeSelector(i) + "']"; return i ? (e = this.form.length ? t(this.form[0].elements).filter(s) : t(s).filter(function () { return 0 === t(this).form().length }), e.not(this.element)) : t([]) }, _toggleClasses: function () { var e = this.element[0].checked; this._toggleClass(this.label, "ui-checkboxradio-checked", "ui-state-active", e), this.options.icon && "checkbox" === this.type && this._toggleClass(this.icon, null, "ui-icon-check ui-state-checked", e)._toggleClass(this.icon, null, "ui-icon-blank", !e), "radio" === this.type && this._getRadioGroup().each(function () { var e = t(this).checkboxradio("instance"); e && e._removeClass(e.label, "ui-checkboxradio-checked", "ui-state-active") }) }, _destroy: function () { this._unbindFormResetHandler(), this.icon && (this.icon.remove(), this.iconSpace.remove()) }, _setOption: function (t, e) { return "label" !== t || e ? (this._super(t, e), "disabled" === t ? (this._toggleClass(this.label, null, "ui-state-disabled", e), this.element[0].disabled = e, void 0) : (this.refresh(), void 0)) : void 0 }, _updateIcon: function (e) {
38            var i = "ui-icon ui-icon-background "; this.options.icon ? (this.icon || (this.icon = t("<span>"), this.iconSpace = t("<span> </span>"), this._addClass(this.iconSpace, "ui-checkboxradio-icon-space")), "checkbox" === this.type ? (i += e ? "ui-icon-check ui-state-checked" : "ui-icon-blank", this._removeClass(this.icon, null, e ? "ui-icon-blank" : "ui-icon-check")) : i += "ui-icon-blank", this._addClass(this.icon, "ui-checkboxradio-icon", i), e || 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)
39        }, _updateLabel: function () { var t = this.label.contents().not(this.element[0]); this.icon && (t = t.not(this.icon[0])), this.iconSpace && (t = t.not(this.iconSpace[0])), t.remove(), this.label.append(this.options.label) }, refresh: function () { var t = this.element[0].checked, e = this.element[0].disabled; 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 }) }
40    }]), t.ui.checkboxradio, t.widget("ui.button", { version: "1.12.1", defaultElement: "<button>", options: { classes: { "ui-button": "ui-corner-all" }, disabled: null, icon: null, iconPosition: "beginning", label: null, showLabel: !0 }, _getCreateOptions: function () { var t, e = this._super() || {}; return this.isInput = this.element.is("input"), t = this.element[0].disabled, null != t && (e.disabled = t), this.originalLabel = this.isInput ? this.element.val() : this.element.html(), this.originalLabel && (e.label = this.originalLabel), e }, _create: function () { !this.option.showLabel & !this.options.icon && (this.options.showLabel = !0), null == this.options.disabled && (this.options.disabled = this.element[0].disabled || !1), this.hasTitle = !!this.element.attr("title"), this.options.label && this.options.label !== this.originalLabel && (this.isInput ? this.element.val(this.options.label) : this.element.html(this.options.label)), this._addClass("ui-button", "ui-widget"), this._setOption("disabled", this.options.disabled), this._enhance(), this.element.is("a") && this._on({ keyup: function (e) { e.keyCode === t.ui.keyCode.SPACE && (e.preventDefault(), this.element[0].click ? this.element[0].click() : this.element.trigger("click")) } }) }, _enhance: function () { this.element.is("button") || this.element.attr("role", "button"), this.options.icon && (this._updateIcon("icon", this.options.icon), this._updateTooltip()) }, _updateTooltip: function () { this.title = this.element.attr("title"), this.options.showLabel || this.title || this.element.attr("title", this.options.label) }, _updateIcon: function (e, i) { var s = "iconPosition" !== e, n = s ? this.options.iconPosition : i, o = "top" === n || "bottom" === n; this.icon ? s && this._removeClass(this.icon, null, this.options.icon) : (this.icon = t("<span>"), this._addClass(this.icon, "ui-button-icon", "ui-icon"), this.options.showLabel || this._addClass("ui-button-icon-only")), s && this._addClass(this.icon, null, i), this._attachIcon(n), o ? (this._addClass(this.icon, null, "ui-widget-icon-block"), this.iconSpace && this.iconSpace.remove()) : (this.iconSpace || (this.iconSpace = t("<span> </span>
40"), this._addClass(this.iconSpace, "ui-button-icon-space")), this._removeClass(this.icon, null, "ui-wiget-icon-block"), this._attachIconSpace(n)) }, _destroy: function () { this.element.removeAttr("role"), this.icon && this.icon.remove(), this.iconSpace && this.iconSpace.remove(), this.hasTitle || this.element.removeAttr("title") }, _attachIconSpace: function (t) { this.icon[/^(?:end|bottom)/.test(t) ? "before" : "after"](this.iconSpace) }, _attachIcon: function (t) { this.element[/^(?:end|bottom)/.test(t) ? "append" : "prepend"](this.icon) }, _setOptions: function (t) { var e = void 0 === t.showLabel ? this.options.showLabel : t.showLabel, i = void 0 === t.icon ? this.options.icon : t.icon; e || i || (t.showLabel = !0), this._super(t) }, _setOption: function (t, e) { "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, e && this.element.blur()) }, refresh: function () { var t = this.element.is("input, button") ? this.element[0].disabled : this.element.hasClass("ui-button-disabled"); t !== this.options.disabled && this._setOptions({ disabled: t }), this._updateTooltip() } }), t.uiBackCompat !== !1 && (t.widget("ui.button", t.ui.button, { options: { text: !0, icons: { primary: null, secondary: null } }, _create: function () { this.options.showLabel && !this.options.text && (this.options.showLabel = this.options.text), !this.options.showLabel && this.options.text && (this.options.text = this.options.showLabel), this.options.icon || !this.options.icons.primary && !this.options.icons.secondary ? this.options.icon && (this.options.icons.primary = this.options.icon) : this.options.icons.primary ? this.options.icon = this.options.icons.primary : (this.options.icon = this.options.icons.secondary, this.options.iconPosition = "end"), this._super() }, _setOption: function (t, e) { return "text" === t ? (this._super("showLabel", e), void 0) : ("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"))), this._superApply(arguments), void 0) } }), t.fn.button = function (e) { return function () { return !this.length || this.length && "INPUT" !== this[0].tagName || this.length && "INPUT" === this[0].tagName && "checkbox" !== this.attr("type") && "radio" !== this.attr("type") ? e.apply(this, arguments) : (t.ui.checkboxradio || t.error("Checkboxradio widget missing"), 0 === arguments.length ? this.checkboxradio({ icon: !1 }) : this.checkboxradio.apply(this, arguments)) } }(t.fn.button), t.fn.buttonset = function () { return t.ui.controlgroup || t.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)) }), t.ui.button, t.extend(t.ui, { datepicker: { version: "1.12.1" } }); var p; t.extend(s.prototype, {
41        markerClassName: "hasDatepicker", maxRows: 4, _widgetDatepicker: function () { return this.dpDiv }, setDefaults: function (t) { return a(this._defaults, t || {}), this }, _attachDatepicker: function (e, i) { var s, n, o; s = e.nodeName.toLowerCase(), n = "div" === s || "span" === s, e.id || (this.uuid += 1, e.id = "dp" + this.uuid), o = this._newInst(t(e), n), o.settings = t.extend({}, i || {}), "input" === s ? this._connectDatepicker(e, o) : n && this._inlineDatepicker(e, o) }, _newInst: function (e, i) { var s = e[0].id.replace(/([^A-Za-z0-9_\-])/g, "\\\\$1"); return { id: s, input: e, selectedDay: 0, selectedMonth: 0, selectedYear: 0, drawMonth: 0, drawYear: 0, inline: i, dpDiv: i ? n(t("<
41div class='" + this._inlineClass + " ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")) : this.dpDiv } }, _connectDatepicker: function (e, i) { var s = t(e); i.append = t([]), i.trigger = t([]), s.hasClass(this.markerClassName) || (this._attachments(s, i), s.addClass(this.markerClassName).on("keydown", this._doKeyDown).on("keypress", this._doKeyPress).on("keyup", this._doKeyUp), this._autoSize(i), t.data(e, "datepicker", i), i.settings.disabled && this._disableDatepicker(e)) }, _attachments: function (e, i) { var s, n, o, a = this._get(i, "appendText"), r = this._get(i, "isRTL"); i.append && i.append.remove(), a && (i.append = t("<span class='" + this._appendClass + "'>" + a + "</span>"), e[r ? "before" : "after"](i.append)), e.off("focus", this._showDatepicker), i.trigger && i.trigger.remove(), s = this._get(i, "showOn"), ("focus" === s || "both" === s) && e.on("focus", this._showDatepicker), ("button" === s || "both" === s) && (n = this._get(i, "buttonText"), o = this._get(i, "buttonImage"), i.trigger = t(this._get(i, "buttonImageOnly") ? t("<img/>").addClass(this._triggerClass).attr({ src: o, alt: n, title: n }) : t("<button type='button'></button>").addClass(this._triggerClass).html(o ? t("<img/>").attr({ src: o, alt: n, title: n }) : n)), e[r ? "before" : "after"](i.trigger), i.trigger.on("click", function () { return t.datepicker._datepickerShowing && t.datepicker._lastInput === e[0] ? t.datepicker._hideDatepicker() : t.datepicker._datepickerShowing && t.datepicker._lastInput !== e[0] ? (t.datepicker._hideDatepicker(), t.datepicker._showDatepicker(e[0])) : t.datepicker._showDatepicker(e[0]), !1 })) }, _autoSize: function (t) { if (this._get(t, "autoSize") && !t.inline) { var e, i, s, n, o = new Date(2009, 11, 20), a = this._get(t, "dateFormat"); a.match(/[DM]/) && (e = function (t) { for (i = 0, s = 0, n = 0; t.length > n; n++)t[n].length > i && (i = t[n].length, s = n); return s }, 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) } }, _inlineDatepicker: function (e, i) { var s = t(e); s.hasClass(this.markerClassName) || (s.addClass(this.markerClassName).append(i.dpDiv), t.data(e, "datepicker", i), this._setDate(i, this._getDefaultDate(i), !0), this._updateDatepicker(i), this._updateAlternate(i), i.settings.disabled && this._disableDatepicker(e), i.dpDiv.css("display", "block")) }, _dialogDatepicker: function (e, i, s, n, o) { var r, l, h, c, u, d = this._dialogInst; return d || (this.uuid += 1, r = "dp" + this.uuid, this._dialogInput = t("<input type='text' id='" + r + "' style='position: absolute; top: -100px; width: 0px;'/>"), this._dialogInput.on("keydown", this._doKeyDown), t("body").append(this._dialogInput), d = this._dialogInst = this._newInst(this._dialogInput, !1), d.settings = {}, t.data(this._dialogInput[0], "datepicker", d)), a(d.settings, n || {}), i = i && i.constructor === Date ? this._formatDate(d, i) : i, this._dialogInput.val(i), this._pos = o ? o.length ? o : [o.pageX, o.pageY] : null, this._pos || (l = document.documentElement.clientWidth, h = document.documentElement.clientHeight, c = document.documentElement.scrollLeft || document.body.scrollLeft, u = document.documentElement.scrollTop || document.body.scrollTop, this._pos = [l / 2 - 100 + c, h / 2 - 150 + u]), this._dialogInput.css("left", this._pos[0] + 20 + "px").css("top", this._pos[1] + "px"), d.settings.onSelect = s, this._inDialog = !0, this.dpDiv.addClass(this._dialogClass), this._showDatepicker(this._dialogInput[0]), t.blockUI && t.blockUI(this.dpDiv), t.data(this._dialogInput[0], "datepicker", d), this }, _destroyDatepicker: function (e) { var i, s = t(e), n = t.data(e, "datepicker");
vendor: 5,954 bytes, line 41
41 s.hasClass(this.markerClassName) && (i = e.nodeName.toLowerCase(), t.removeData(e, "datepicker"), "input" === i ? (n.append.remove(), n.trigger.remove(), s.removeClass(this.markerClassName).off("focus", this._showDatepicker).off("keydown", this._doKeyDown).off("keypress", this._doKeyPress).off("keyup", this._doKeyUp)) : ("div" === i || "span" === i) && s.removeClass(this.markerClassName).empty(), p === n && (p = null)) }, _enableDatepicker: function (e) { var i, s, n = t(e), o = t.data(e, "datepicker"); n.hasClass(this.markerClassName) && (i = e.nodeName.toLowerCase(), "input" === i ? (e.disabled = !1, o.trigger.filter("button").each(function () { this.disabled = !1 }).end().filter("img").css({ opacity: "1.0", cursor: "" })) : ("div" === i || "span" === i) && (s = n.children("." + this._inlineClass), s.children().removeClass("ui-state-disabled"), s.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled", !1)), this._disabledInputs = t.map(this._disabledInputs, function (t) { return t === e ? null : t })) }, _disableDatepicker: function (e) { var i, s, n = t(e), o = t.data(e, "datepicker"); n.hasClass(this.markerClassName) && (i = e.nodeName.toLowerCase(), "input" === i ? (e.disabled = !0, o.trigger.filter("button").each(function () { this.disabled = !0 }).end().filter("img").css({ opacity: "0.5", cursor: "default" })) : ("div" === i || "span" === i) && (s = n.children("." + this._inlineClass), s.children().addClass("ui-state-disabled"), s.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled", !0)), this._disabledInputs = t.map(this._disabledInputs, function (t) { return t === e ? null : t }), this._disabledInputs[this._disabledInputs.length] = e) }, _isDisabledDatepicker: function (t) { if (!t) return !1; for (var e = 0; this._disabledInputs.length > e; e++)if (this._disabledInputs[e] === t) return !0; return !1 }, _getInst: function (e) { try { return t.data(e, "datepicker") } catch (i) { throw "Missing instance data for this datepicker" } }, _optionDatepicker: function (e, i, s) { var n, o, r, l, h = this._getInst(e); return 2 === arguments.length && "string" == typeof i ? "defaults" === i ? t.extend({}, t.datepicker._defaults) : h ? "all" === i ? t.extend({}, h.settings) : this._get(h, i) : null : (n = i || {}, "string" == typeof i && (n = {}, n[i] = s), h && (this._curInst === h && this._hideDatepicker(), o = this._getDateDatepicker(e, !0), r = this._getMinMaxDate(h, "min"), l = this._getMinMaxDate(h, "max"), a(h.settings, n), null !== r && void 0 !== n.dateFormat && void 0 === n.minDate && (h.settings.minDate = this._formatDate(h, r)), null !== l && void 0 !== n.dateFormat && void 0 === n.maxDate && (h.settings.maxDate = this._formatDate(h, l)), "disabled" in n && (n.disabled ? this._disableDatepicker(e) : this._enableDatepicker(e)), this._attachments(t(e), h), this._autoSize(h), this._setDate(h, o), this._updateAlternate(h), this._updateDatepicker(h)), void 0) }, _changeDatepicker: function (t, e, i) { this._optionDatepicker(t, e, i) }, _refreshDatepicker: function (t) { var e = this._getInst(t); e && this._updateDatepicker(e) }, _setDateDatepicker: function (t, e) { var i = this._getInst(t); i && (this._setDate(i, e), this._updateDatepicker(i), this._updateAlternate(i)) }, _getDateDatepicker: function (t, e) { var i = this._getInst(t); return i && !i.inline && this._setDateFromField(i, e), i ? this._getDate(i) : null }, _doKeyDown: function (e) { var i, s, n, o = t.datepicker._getInst(e.target), a = !0, r = o.dpDiv.is(".ui-datepicker-rtl"); if (o._keyEvent = !0, t.datepicker._datepickerShowing) switch (e.keyCode) { case 9: t.datepicker._hideDatepicker(), a = !1; break; case 13: return n = t("td." + t.datepicker._dayOverClass + ":not(." + t.datepicker._currentClass + ")", o.dpDiv), n[0] && t.datepicker._selectDay(e.target, o.selectedMonth, o.selectedYear, n[0]), i = t.datepicker._get(o, "onSelect"), i ? (s = t.datepicker._formatDate(o), i.apply(o.input ? o.input[0] : null, [s, o])) : t.datepicker._hideDatepicker(), !1; case 27: t.datepicker._hideDatepicker(); break; case 33: t.datepicker._adjustDate(e.target, e.ctrlKey ? -t.datepicker._get(o, "stepBigMonths") : -t.datepicker._get(o, "stepMonths"), "M"); break; case 34: t.datepicker._adjustDate(e.target, e.ctrlKey ? +t.datepicker._get(o, "stepBigMonths") : +t.datepicker._get(o, "stepMonths"), "M"); break; case 35: (e.ctrlKey || e.metaKey) && t.datepicker._clearDate(e.target), a = e.ctrlKey || e.metaKey; break; case 36: (e.ctrlKey || e.metaKey) && t.datepicker._gotoToday(e.target), a = e.ctrlKey || e.metaKey; break; case 37: (e.ctrlKey || e.metaKey) && t.datepicker._adjustDate(e.target, r ? 1 : -1, "D"), a = e.ctrlKey || e.metaKey, e.originalEvent.altKey && t.datepicker._adjustDate(e.target, e.ctrlKey ? -t.datepicker._get(o, "stepBigMonths") : -t.datepicker._get(o, "stepMonths"), "M"); break; case 38: (e.ctrlKey || e.metaKey) && t.datepicker._adjustDate(e.target, -7, "D"), a = e.ctrlKey || e.metaKey; break; case 39: (e.ctrlKey || e.metaKey) && t.datepicker._adjustDate(e.target, r ? -1 : 1, "D"), a = e.ctrlKey || e.metaKey, e.originalEvent.altKey && t.datepicker._adjustDate(e.target, e.ctrlKey ? +t.datepicker._get(o, "stepBigMonths") : +t.datepicker._get(o, "stepMonths"), "M"); break; case 40: (e.ctrlKey || e.metaKey) && t.datepicker._adjustDate(e.target, 7, "D"), a = e.ctrlKey || e.metaKey; break; default: a = !1 } else 36 === e.keyCode && e.ctrlKey ? t.datepicker._showDatepicker(this) : a = !1; a && (e.preventDefault(), e.stopPropagation()) }, _doKeyPress: function (e) { var i, s, n = t.datepicker._getInst(e.target); return t.datepicker._get(n, "constrainInput") ? (i = t.datepicker._possibleChars(t.datepicker._get(n, "dateFormat")), s = String.fromCharCode(null == e.charCode ? e.keyCode : e.charCode), e.ctrlKey || e.metaKey || " " > s || !i || i.indexOf(s) > -1) : void 0 }, _doKeyUp: function (e) { var i, s = t.datepicker._getInst(e.target);
vendor: 9,831 bytes, line 41
41 if (s.input.val() !== s.lastVal) try { i = t.datepicker.parseDate(t.datepicker._get(s, "dateFormat"), s.input ? s.input.val() : null, t.datepicker._getFormatConfig(s)), i && (t.datepicker._setDateFromField(s), t.datepicker._updateAlternate(s), t.datepicker._updateDatepicker(s)) } catch (n) { } return !0 }, _showDatepicker: function (e) { if (e = e.target || e, "input" !== e.nodeName.toLowerCase() && (e = t("input", e.parentNode)[0]), !t.datepicker._isDisabledDatepicker(e) && t.datepicker._lastInput !== e) { var s, n, o, r, l, h, c; s = t.datepicker._getInst(e), t.datepicker._curInst && t.datepicker._curInst !== s && (t.datepicker._curInst.dpDiv.stop(!0, !0), s && t.datepicker._datepickerShowing && t.datepicker._hideDatepicker(t.datepicker._curInst.input[0])), n = t.datepicker._get(s, "beforeShow"), o = n ? n.apply(e, [e, s]) : {}, o !== !1 && (a(s.settings, o), s.lastVal = null, t.datepicker._lastInput = e, t.datepicker._setDateFromField(s), t.datepicker._inDialog && (e.value = ""), t.datepicker._pos || (t.datepicker._pos = t.datepicker._findPos(e), t.datepicker._pos[1] += e.offsetHeight), r = !1, t(e).parents().each(function () { return r |= "fixed" === t(this).css("position"), !r }), l = { left: t.datepicker._pos[0], top: t.datepicker._pos[1] }, t.datepicker._pos = null, s.dpDiv.empty(), s.dpDiv.css({ position: "absolute", display: "block", top: "-1000px" }), t.datepicker._updateDatepicker(s), l = t.datepicker._checkOffset(s, l, r), s.dpDiv.css({ position: t.datepicker._inDialog && t.blockUI ? "static" : r ? "fixed" : "absolute", display: "none", left: l.left + "px", top: l.top + "px" }), s.inline || (h = t.datepicker._get(s, "showAnim"), c = t.datepicker._get(s, "duration"), s.dpDiv.css("z-index", i(t(e)) + 1), t.datepicker._datepickerShowing = !0, t.effects && t.effects.effect[h] ? s.dpDiv.show(h, t.datepicker._get(s, "showOptions"), c) : s.dpDiv[h || "show"](h ? c : null), t.datepicker._shouldFocusInput(s) && s.input.trigger("focus"), t.datepicker._curInst = s)) } }, _updateDatepicker: function (e) { this.maxRows = 4, p = e, e.dpDiv.empty().append(this._generateHTML(e)), this._attachHandlers(e); var i, s = this._getNumberOfMonths(e), n = s[1], a = 17, r = e.dpDiv.find("." + this._dayOverClass + " a"); r.length > 0 && o.apply(r.get(0)), e.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""), n > 1 && e.dpDiv.addClass("ui-datepicker-multi-" + n).css("width", a * n + "em"), e.dpDiv[(1 !== s[0] || 1 !== s[1] ? "add" : "remove") + "Class"]("ui-datepicker-multi"), e.dpDiv[(this._get(e, "isRTL") ? "add" : "remove") + "Class"]("ui-datepicker-rtl"), e === t.datepicker._curInst && t.datepicker._datepickerShowing && t.datepicker._shouldFocusInput(e) && e.input.trigger("focus"), e.yearshtml && (i = e.yearshtml, setTimeout(function () { i === e.yearshtml && e.yearshtml && e.dpDiv.find("select.ui-datepicker-year:first").replaceWith(e.yearshtml), i = e.yearshtml = null }, 0)) }, _shouldFocusInput: function (t) { return t.input && t.input.is(":visible") && !t.input.is(":disabled") && !t.input.is(":focus") }, _checkOffset: function (e, i, s) { var n = e.dpDiv.outerWidth(), o = e.dpDiv.outerHeight(), a = e.input ? e.input.outerWidth() : 0, r = e.input ? e.input.outerHeight() : 0, l = document.documentElement.clientWidth + (s ? 0 : t(document).scrollLeft()), h = document.documentElement.clientHeight + (s ? 0 : t(document).scrollTop()); return i.left -= this._get(e, "isRTL") ? n - a : 0, i.left -= s && i.left === e.input.offset().left ? t(document).scrollLeft() : 0, i.top -= s && i.top === e.input.offset().top + r ? t(document).scrollTop() : 0, i.left -= Math.min(i.left, i.left + n > l && l > n ? Math.abs(i.left + n - l) : 0), i.top -= Math.min(i.top, i.top + o > h && h > o ? Math.abs(o + r) : 0), i }, _findPos: function (e) { for (var i, s = this._getInst(e), n = this._get(s, "isRTL"); e && ("hidden" === e.type || 1 !== e.nodeType || t.expr.filters.hidden(e));)e = e[n ? "previousSibling" : "nextSibling"]; return i = t(e).offset(), [i.left, i.top] }, _hideDatepicker: function (e) { var i, s, n, o, a = this._curInst; !a || e && a !== t.data(e, "datepicker") || this._datepickerShowing && (i = this._get(a, "showAnim"), s = this._get(a, "duration"), n = function () { t.datepicker._tidyDialog(a) }, t.effects && (t.effects.effect[i] || t.effects[i]) ? a.dpDiv.hide(i, t.datepicker._get(a, "showOptions"), s, n) : a.dpDiv["slideDown" === i ? "slideUp" : "fadeIn" === i ? "fadeOut" : "hide"](i ? s : null, n), i || n(), this._datepickerShowing = !1, o = this._get(a, "onClose"), o && o.apply(a.input ? a.input[0] : null, [a.input ? a.input.val() : "", a]), this._lastInput = null, this._inDialog && (this._dialogInput.css({ position: "absolute", left: "0", top: "-100px" }), t.blockUI && (t.unblockUI(), t("body").append(this.dpDiv))), this._inDialog = !1) }, _tidyDialog: function (t) { t.dpDiv.removeClass(this._dialogClass).off(".ui-datepicker-calendar") }, _checkExternalClick: function (e) { if (t.datepicker._curInst) { var i = t(e.target), s = t.datepicker._getInst(i[0]); (i[0].id !== t.datepicker._mainDivId && 0 === i.parents("#" + t.datepicker._mainDivId).length && !i.hasClass(t.datepicker.markerClassName) && !i.closest("." + t.datepicker._triggerClass).length && t.datepicker._datepickerShowing && (!t.datepicker._inDialog || !t.blockUI) || i.hasClass(t.datepicker.markerClassName) && t.datepicker._curInst !== s) && t.datepicker._hideDatepicker() } }, _adjustDate: function (e, i, s) { var n = t(e), o = this._getInst(n[0]); this._isDisabledDatepicker(n[0]) || (this._adjustInstDate(o, i + ("M" === s ? this._get(o, "showCurrentAtPos") : 0), s), this._updateDatepicker(o)) }, _gotoToday: function (e) { var i, s = t(e), n = this._getInst(s[0]); this._get(n, "gotoCurrent") && n.currentDay ? (n.selectedDay = n.currentDay, n.drawMonth = n.selectedMonth = n.currentMonth, n.drawYear = n.selectedYear = n.currentYear) : (i = new Date, n.selectedDay = i.getDate(), n.drawMonth = n.selectedMonth = i.getMonth(), n.drawYear = n.selectedYear = i.getFullYear()), this._notifyChange(n), this._adjustDate(s) }, _selectMonthYear: function (e, i, s) { var n = t(e), o = this._getInst(n[0]); o["selected" + ("M" === s ? "Month" : "Year")] = o["draw" + ("M" === s ? "Month" : "Year")] = parseInt(i.options[i.selectedIndex].value, 10), this._notifyChange(o), this._adjustDate(n) }, _selectDay: function (e, i, s, n) { var o, a = t(e); t(n).hasClass(this._unselectableClass) || this._isDisabledDatepicker(a[0]) || (o = this._getInst(a[0]), o.selectedDay = o.currentDay = t("a", n).html(), o.selectedMonth = o.currentMonth = i, o.selectedYear = o.currentYear = s, this._selectDate(e, this._formatDate(o, o.currentDay, o.currentMonth, o.currentYear))) }, _clearDate: function (e) { var i = t(e); this._selectDate(i, "") }, _selectDate: function (e, i) { var s, n = t(e), o = this._getInst(n[0]); i = null != i ? i : this._formatDate(o), o.input && o.input.val(i), this._updateAlternate(o), s = this._get(o, "onSelect"), s ? s.apply(o.input ? o.input[0] : null, [i, o]) : o.input && o.input.trigger("change"), o.inline ? this._updateDatepicker(o) : (this._hideDatepicker(), this._lastInput = o.input[0], "object" != typeof o.input[0] && o.input.trigger("focus"), this._lastInput = null) }, _updateAlternate: function (e) { var i, s, n, o = this._get(e, "altField"); o && (i = this._get(e, "altFormat") || this._get(e, "dateFormat"), s = this._getDate(e), n = this.formatDate(i, s, this._getFormatConfig(e)), t(o).val(n)) }, noWeekends: function (t) { var e = t.getDay(); return [e > 0 && 6 > e, ""] }, iso8601Week: function (t) { var e, i = new Date(t.getTime()); 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 }, parseDate: function (e, i, s) { if (null == e || null == i) throw "Invalid arguments"; if (i = "object" == typeof i ? "" + i : i + "", "" === i) return null; var n, o, a, r, l = 0, h = (s ? s.shortYearCutoff : null) || this._defaults.shortYearCutoff, c = "string" != typeof h ? h : (new Date).getFullYear() % 100 + parseInt(h, 10), u = (s ? s.dayNamesShort : null) || this._defaults.dayNamesShort, d = (s ? s.dayNames : null) || this._defaults.dayNames, p = (s ? s.monthNamesShort : null) || this._defaults.monthNamesShort, f = (s ? s.monthNames : null) || this._defaults.monthNames, g = -1, m = -1, _ = -1, v = -1, b = !1, y = function (t) { var i = e.length > n + 1 && e.charAt(n + 1) === t; return i && n++, i }, w = function (t) { var e = y(t), s = "@" === t ? 14 : "!" === t ? 20 : "y" === t && e ? 4 : "o" === t ? 3 : 2, n = "y" === t ? s : 1, o = RegExp("^\\d{" + n + "," + s + "}"), a = i.substring(l).match(o); if (!a) throw "Missing number at position " + l; return l += a[0].length, parseInt(a[0], 10) }, k = function (e, s, n) { var o = -1, a = t.map(y(e) ? n : s, function (t, e) { return [[e, t]] }).sort(function (t, e) { return -(t[1].length - e[1].length) }); if (t.each(a, function (t, e) { var s = e[1]; return i.substr(l, s.length).toLowerCase() === s.toLowerCase() ? (o = e[0], l += s.length, !1) : void 0 }), -1 !== o) return o + 1; throw "Unknown name at position " + l }, x = function () { if (i.charAt(l) !== e.charAt(n)) throw "Unexpected literal at position " + l; l++ }; for (n = 0; e.length > n; n++)if (b) "'" !== e.charAt(n) || y("'") ? x() : b = !1; else switch (e.charAt(n)) { case "d": _ = w("d"); break; case "D": k("D", u, d); break; case "o": v = w("o"); break; case "m": m = w("m"); break; case "M": m = k("M", p, f); break; case "y": g = w("y"); break; case "@": r = new Date(w("@")), g = r.getFullYear(), m = r.getMonth() + 1, _ = r.getDate(); break; case "!": r = new Date((w("!") - this._ticksTo1970) / 1e4), g = r.getFullYear(), m = r.getMonth() + 1, _ = r.getDate(); break;
vendor: 10,208 bytes, lines 41-49
41 case "'": y("'") ? x() : b = !0; break; default: x() }if (i.length > l && (a = i.substr(l), !/^\s+/.test(a))) throw "Extra/unparsed characters found in date: " + a; if (-1 === g ? g = (new Date).getFullYear() : 100 > g && (g += (new Date).getFullYear() - (new Date).getFullYear() % 100 + (c >= g ? 0 : -100)), v > -1) for (m = 1, _ = v; ;) { if (o = this._getDaysInMonth(g, m - 1), o >= _) break; m++, _ -= o } if (r = this._daylightSavingAdjust(new Date(g, m - 1, _)), r.getFullYear() !== g || r.getMonth() + 1 !== m || r.getDate() !== _) throw "Invalid date"; return r }, ATOM: "yy-mm-dd", COOKIE: "D, dd M yy", ISO_8601: "yy-mm-dd", RFC_822: "D, d M y", RFC_850: "DD, dd-M-y", RFC_1036: "D, d M y", RFC_1123: "D, d M yy", RFC_2822: "D, d M yy", RSS: "D, d M y", TICKS: "!", TIMESTAMP: "@", W3C: "yy-mm-dd", _ticksTo1970: 1e7 * 60 * 60 * 24 * (718685 + Math.floor(492.5) - Math.floor(19.7) + Math.floor(4.925)), formatDate: function (t, e, i) { if (!e) return ""; var s, n = (i ? i.dayNamesShort : null) || this._defaults.dayNamesShort, o = (i ? i.dayNames : null) || this._defaults.dayNames, a = (i ? i.monthNamesShort : null) || this._defaults.monthNamesShort, r = (i ? i.monthNames : null) || this._defaults.monthNames, l = function (e) { var i = t.length > s + 1 && t.charAt(s + 1) === e; return i && s++, i }, h = function (t, e, i) { var s = "" + e; if (l(t)) for (; i > s.length;)s = "0" + s; return s }, c = function (t, e, i, s) { return l(t) ? s[e] : i[e] }, u = "", d = !1; if (e) for (s = 0; t.length > s; s++)if (d) "'" !== t.charAt(s) || l("'") ? u += t.charAt(s) : d = !1; else switch (t.charAt(s)) { case "d": u += h("d", e.getDate(), 2); break; case "D": u += c("D", e.getDay(), n, o); break; case "o": u += h("o", Math.round((new Date(e.getFullYear(), e.getMonth(), e.getDate()).getTime() - new Date(e.getFullYear(), 0, 0).getTime()) / 864e5), 3); break; case "m": u += h("m", e.getMonth() + 1, 2); break; case "M": u += c("M", e.getMonth(), a, r); break; case "y": u += l("y") ? e.getFullYear() : (10 > e.getFullYear() % 100 ? "0" : "") + e.getFullYear() % 100; break; case "@": u += e.getTime(); break; case "!": u += 1e4 * e.getTime() + this._ticksTo1970; break; case "'": l("'") ? u += "'" : d = !0; break; default: u += t.charAt(s) }return u }, _possibleChars: function (t) { var e, i = "", s = !1, n = function (i) { var s = t.length > e + 1 && t.charAt(e + 1) === i; return s && e++, s }; for (e = 0; t.length > e; e++)if (s) "'" !== t.charAt(e) || n("'") ? i += t.charAt(e) : s = !1; else switch (t.charAt(e)) { case "d": case "m": case "y": case "@": i += "0123456789"; break; case "D": case "M": return null; case "'": n("'") ? i += "'" : s = !0; break; default: i += t.charAt(e) }return i }, _get: function (t, e) { return void 0 !== t.settings[e] ? t.settings[e] : this._defaults[e] }, _setDateFromField: function (t, e) { if (t.input.val() !== t.lastVal) { var i = this._get(t, "dateFormat"), s = t.lastVal = t.input ? t.input.val() : null, n = this._getDefaultDate(t), o = n, a = this._getFormatConfig(t); try { o = this.parseDate(i, s, a) || n } catch (r) { s = e ? "" : s } t.selectedDay = o.getDate(), t.drawMonth = t.selectedMonth = o.getMonth(), t.drawYear = t.selectedYear = o.getFullYear(), t.currentDay = s ? o.getDate() : 0, t.currentMonth = s ? o.getMonth() : 0, t.currentYear = s ? o.getFullYear() : 0, this._adjustInstDate(t) } }, _getDefaultDate: function (t) { return this._restrictMinMax(t, this._determineDate(t, this._get(t, "defaultDate"), new Date)) }, _determineDate: function (e, i, s) { var n = function (t) { var e = new Date; return e.setDate(e.getDate() + t), e }, o = function (i) { try { return t.datepicker.parseDate(t.datepicker._get(e, "dateFormat"), i, t.datepicker._getFormatConfig(e)) } catch (s) { } for (var n = (i.toLowerCase().match(/^c/) ? t.datepicker._getDate(e) : null) || new Date, o = n.getFullYear(), a = n.getMonth(), r = n.getDate(), l = /([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g, h = l.exec(i); h;) { switch (h[2] || "d") { case "d": case "D": r += parseInt(h[1], 10); break; case "w": case "W": r += 7 * parseInt(h[1], 10); break; case "m": case "M": a += parseInt(h[1], 10), r = Math.min(r, t.datepicker._getDaysInMonth(o, a)); break; case "y": case "Y": o += parseInt(h[1], 10), r = Math.min(r, t.datepicker._getDaysInMonth(o, a)) }h = l.exec(i) } return new Date(o, a, r) }, a = null == i || "" === i ? s : "string" == typeof i ? o(i) : "number" == typeof i ? isNaN(i) ? s : n(i) : new Date(i.getTime()); return a = a && "Invalid Date" == "" + a ? s : a, a && (a.setHours(0), a.setMinutes(0), a.setSeconds(0), a.setMilliseconds(0)), this._daylightSavingAdjust(a) }, _daylightSavingAdjust: function (t) { return t ? (t.setHours(t.getHours() > 12 ? t.getHours() + 2 : 0), t) : null }, _setDate: function (t, e, i) { var s = !e, n = t.selectedMonth, o = t.selectedYear, a = this._restrictMinMax(t, this._determineDate(t, e, new Date)); t.selectedDay = t.currentDay = a.getDate(), t.drawMonth = t.selectedMonth = t.currentMonth = a.getMonth(), t.drawYear = t.selectedYear = t.currentYear = a.getFullYear(), n === t.selectedMonth && o === t.selectedYear || i || this._notifyChange(t), this._adjustInstDate(t), t.input && t.input.val(s ? "" : this._formatDate(t)) }, _getDate: function (t) { var e = !t.currentYear || t.input && "" === t.input.val() ? null : this._daylightSavingAdjust(new Date(t.currentYear, t.currentMonth, t.currentDay)); return e }, _attachHandlers: function (e) { var i = this._get(e, "stepMonths"), s = "#" + e.id.replace(/\\\\/g, "\\"); e.dpDiv.find("[data-handler]").map(function () { var e = { prev: function () { t.datepicker._adjustDate(s, -i, "M") }, next: function () { t.datepicker._adjustDate(s, +i, "M") }, hide: function () { t.datepicker._hideDatepicker() }, today: function () { t.datepicker._gotoToday(s) }, selectDay: function () { return t.datepicker._selectDay(s, +this.getAttribute("data-month"), +this.getAttribute("data-year"), this), !1 }, selectMonth: function () { return t.datepicker._selectMonthYear(s, this, "M"), !1 }, selectYear: function () { return t.datepicker._selectMonthYear(s, this, "Y"), !1 } }; t(this).on(this.getAttribute("data-event"), e[this.getAttribute("data-handler")]) }) }, _generateHTML: function (t) {
42            var e, i, s, n, o, a, r, l, h, c, u, d, p, f, g, m, _, v, b, y, w, k, x, C, D, T, I, M, P, S, N, H, A, z, O, E, W, F, L, R = new Date, Y = this._daylightSavingAdjust(new Date(R.getFullYear(), R.getMonth(), R.getDate())), B = this._get(t, "isRTL"), j = this._get(t, "showButtonPanel"), q = this._get(t, "hideIfNoPrevNext"), K = this._get(t, "navigationAsDateFormat"), U = this._getNumberOfMonths(t), V = this._get(t, "showCurrentAtPos"), X = this._get(t, "stepMonths"), $ = 1 !== U[0] || 1 !== U[1], G = this._daylightSavingAdjust(t.currentDay ? new Date(t.currentYear, t.currentMonth, t.currentDay) : new Date(9999, 9, 9)), J = this._getMinMaxDate(t, "min"), Q = this._getMinMaxDate(t, "max"), Z = t.drawMonth - V, te = t.drawYear; if (0 > Z && (Z += 12, te--), Q) for (e = this._daylightSavingAdjust(new Date(Q.getFullYear(), Q.getMonth() - U[0] * U[1] + 1, Q.getDate())), e = J && J > e ? J : e; this._daylightSavingAdjust(new Date(te, Z, 1)) > e;)Z--, 0 > Z && (Z = 11, te--); for (t.drawMonth = Z, t.drawYear = te, i = this._get(t, "prevText"), i = K ? this.formatDate(i, this._daylightSavingAdjust(new Date(te, Z - X, 1)), this._getFormatConfig(t)) : i, s = this._canAdjustMonth(t, -1, te, 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-" + (B ? "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-" + (B ? "e" : "w") + "'>" + i + "</span></a>", n = this._get(t, "nextText"), n = K ? this.formatDate(n, this._daylightSavingAdjust(new Date(te, Z + X, 1)), this._getFormatConfig(t)) : n, o = this._canAdjustMonth(t, 1, te, Z) ? "<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click' title='" + n + "'><span class='ui-icon ui-icon-circle-triangle-" + (B ? "w" : "e") + "'>" + n + "</span></a>" : q ? "" : "<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='" + n + "'><span class='ui-icon ui-icon-circle-triangle-" + (B ? "w" : "e") + "'>" + n + "</span></a>", a = this._get(t, "currentText"), r = this._get(t, "gotoCurrent") && t.currentDay ? G : Y, a = K ? 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 = j ? "<div class='ui-datepicker-buttonpane ui-widget-content'>" + (B ? 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>" : "") + (B ? "" : 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"), g = this._get(t, "monthNamesShort"), m = this._get(t, "beforeShowDay"), _ = this._get(t, "showOtherMonths"), v = this._get(t, "selectOtherMonths"), b = this._getDefaultDate(t), y = "", k = 0; U[0] > k; k++) {
43                for (x = "", this.maxRows = 4, C = 0; U[1] > C; C++) {
44                    if (D = this._daylightSavingAdjust(new Date(te, Z, t.selectedDay)), T = " ui-corner-all", I = "", $) {
45                        if (I += "<div class='ui-datepicker-group", U[1] > 1) switch (C) {
46                            case 0: I += " ui-datepicker-group-first", T = " ui-corner-" + (B ? "right" : "left");
47                                break; case U[1] - 1: I += " ui-datepicker-group-last", T = " ui-corner-" + (B ? "left" : "right"); break; default: I += " ui-datepicker-group-middle", T = ""
48                        }I += "'>"
49                    } for (I += "<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix" + T + "'>
vendor: 14,207 bytes, lines 49-53
49" + (/all|left/.test(T) && 0 === k ? B ? o : s : "") + (/all|right/.test(T) && 0 === k ? B ? s : o : "") + this._generateMonthYearHeader(t, Z, te, J, Q, k > 0 || C > 0, f, g) + "</div><table class='ui-datepicker-calendar'><thead>" + "<tr>", M = u ? "<th class='ui-datepicker-week-col'>" + this._get(t, "weekHeader") + "</th>" : "", w = 0; 7 > w; w++)P = (w + c) % 7, M += "<th scope='col'" + ((w + c + 6) % 7 >= 5 ? " class='ui-datepicker-week-end'" : "") + ">" + "<span title='" + d[P] + "'>" + p[P] + "</span></th>"; for (I += M + "</tr></thead><tbody>", S = this._getDaysInMonth(te, Z), te === t.selectedYear && Z === t.selectedMonth && (t.selectedDay = Math.min(t.selectedDay, S)), N = (this._getFirstDayOfMonth(te, Z) - c + 7) % 7, H = Math.ceil((N + S) / 7), A = $ ? this.maxRows > H ? this.maxRows : H : H, this.maxRows = A, z = this._daylightSavingAdjust(new Date(te, Z, 1 - N)), O = 0; A > O; O++) { for (I += "<tr>", E = u ? "<td class='ui-datepicker-week-col'>" + this._get(t, "calculateWeek")(z) + "</td>" : "", w = 0; 7 > w; w++)W = m ? m.apply(t.input ? t.input[0] : null, [z]) : [!0, ""], F = z.getMonth() !== Z, L = F && !v || !W[0] || J && J > z || Q && z > Q, E += "<td class='" + ((w + c + 6) % 7 >= 5 ? " ui-datepicker-week-end" : "") + (F ? " ui-datepicker-other-month" : "") + (z.getTime() === D.getTime() && Z === t.selectedMonth && t._keyEvent || b.getTime() === z.getTime() && b.getTime() === D.getTime() ? " " + this._dayOverClass : "") + (L ? " " + this._unselectableClass + " ui-state-disabled" : "") + (F && !_ ? "" : " " + W[1] + (z.getTime() === G.getTime() ? " " + this._currentClass : "") + (z.getTime() === Y.getTime() ? " ui-datepicker-today" : "")) + "'" + (F && !_ || !W[2] ? "" : " title='" + W[2].replace(/'/g, "&#39;") + "'") + (L ? "" : " data-handler='selectDay' data-event='click' data-month='" + z.getMonth() + "' data-year='" + z.getFullYear() + "'") + ">" + (F && !_ ? "&#xa0;" : L ? "<span class='ui-state-default'>" + z.getDate() + "</span>" : "<a class='ui-state-default" + (z.getTime() === Y.getTime() ? " ui-state-highlight" : "") + (z.getTime() === G.getTime() ? " ui-state-active" : "") + (F ? " ui-priority-secondary" : "") + "' href='#'>" + z.getDate() + "</a>") + "</td>", z.setDate(z.getDate() + 1), z = this._daylightSavingAdjust(z); I += E + "</tr>" } Z++, Z > 11 && (Z = 0, te++), I += "</tbody></table>" + ($ ? "</div>" + (U[0] > 0 && C === U[1] - 1 ? "<div class='ui-datepicker-row-break'></div>" : "") : ""), x += I
50                } y += x
51            } return y += h, t._keyEvent = !1, y
52        }, _generateMonthYearHeader: function (t, e, i, s, n, o, a, r) { var l, h, c, u, d, p, f, g, m = this._get(t, "changeMonth"), _ = this._get(t, "changeYear"), v = this._get(t, "showMonthAfterYear"), b = "<div class='ui-datepicker-title'>", y = ""; if (o || !m) y += "<span class='ui-datepicker-month'>" + a[e] + "</span>"; else { for (l = s && s.getFullYear() === i, h = n && n.getFullYear() === i, y += "<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>", c = 0; 12 > c; c++)(!l || c >= s.getMonth()) && (!h || n.getMonth() >= c) && (y += "<option value='" + c + "'" + (c === e ? " selected='selected'" : "") + ">" + r[c] + "</option>"); y += "</select>" } if (v || (b += y + (!o && m && _ ? "" : "&#xa0;")), !t.yearshtml) if (t.yearshtml = "", o || !_) b += "<span class='ui-datepicker-year'>" + i + "</span>"; else { for (u = this._get(t, "yearRange").split(":"), d = (new Date).getFullYear(), p = function (t) { var e = t.match(/c[+\-].*/) ? i + parseInt(t.substring(1), 10) : t.match(/[+\-].*/) ? d + parseInt(t, 10) : parseInt(t, 10); return isNaN(e) ? d : e }, f = p(u[0]), g = Math.max(f, p(u[1] || "")), f = s ? Math.max(f, s.getFullYear()) : f, g = n ? Math.min(g, n.getFullYear()) : g, t.yearshtml += "<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>"; g >= f; f++)t.yearshtml += "<option value='" + f + "'" + (f === i ? " selected='selected'" : "") + ">" + f + "</option>"; t.yearshtml += "</select>", b += t.yearshtml, t.yearshtml = null } return b += this._get(t, "yearSuffix"), v && (b += (!o && m && _ ? "" : "&#xa0;") + y), b += "</div>" }, _adjustInstDate: function (t, e, i) { var s = t.selectedYear + ("Y" === i ? e : 0), n = t.selectedMonth + ("M" === i ? e : 0), o = Math.min(t.selectedDay, this._getDaysInMonth(s, n)) + ("D" === i ? e : 0), a = this._restrictMinMax(t, this._daylightSavingAdjust(new Date(s, n, o))); t.selectedDay = a.getDate(), t.drawMonth = t.selectedMonth = a.getMonth(), t.drawYear = t.selectedYear = a.getFullYear(), ("M" === i || "Y" === i) && this._notifyChange(t) }, _restrictMinMax: function (t, e) { var i = this._getMinMaxDate(t, "min"), s = this._getMinMaxDate(t, "max"), n = i && i > e ? i : e; return s && n > s ? s : n }, _notifyChange: function (t) { var e = this._get(t, "onChangeMonthYear"); e && e.apply(t.input ? t.input[0] : null, [t.selectedYear, t.selectedMonth + 1, t]) }, _getNumberOfMonths: function (t) { var e = this._get(t, "numberOfMonths"); return null == e ? [1, 1] : "number" == typeof e ? [1, e] : e }, _getMinMaxDate: function (t, e) { return this._determineDate(t, this._get(t, e + "Date"), null) }, _getDaysInMonth: function (t, e) { return 32 - this._daylightSavingAdjust(new Date(t, e, 32)).getDate() }, _getFirstDayOfMonth: function (t, e) { return new Date(t, e, 1).getDay() }, _canAdjustMonth: function (t, e, i, s) { var n = this._getNumberOfMonths(t), o = this._daylightSavingAdjust(new Date(i, s + (0 > e ? e : n[0] * n[1]), 1)); return 0 > e && o.setDate(this._getDaysInMonth(o.getFullYear(), o.getMonth())), this._isInRange(t, o) }, _isInRange: function (t, e) { var i, s, n = this._getMinMaxDate(t, "min"), o = this._getMinMaxDate(t, "max"), a = null, r = null, l = this._get(t, "yearRange"); return l && (i = l.split(":"), s = (new Date).getFullYear(), a = parseInt(i[0], 10), r = parseInt(i[1], 10), i[0].match(/[+\-].*/) && (a += s), i[1].match(/[+\-].*/) && (r += s)), (!n || e.getTime() >= n.getTime()) && (!o || e.getTime() <= o.getTime()) && (!a || e.getFullYear() >= a) && (!r || r >= e.getFullYear()) }, _getFormatConfig: function (t) { var e = this._get(t, "shortYearCutoff"); return e = "string" != typeof e ? e : (new Date).getFullYear() % 100 + parseInt(e, 10), { shortYearCutoff: e, dayNamesShort: this._get(t, "dayNamesShort"), dayNames: this._get(t, "dayNames"), monthNamesShort: this._get(t, "monthNamesShort"), monthNames: this._get(t, "monthNames") } }, _formatDate: function (t, e, i, s) { e || (t.currentDay = t.selectedDay, t.currentMonth = t.selectedMonth, t.currentYear = t.selectedYear); var n = e ? "object" == typeof e ? e : this._daylightSavingAdjust(new Date(s, i, e)) : this._daylightSavingAdjust(new Date(t.currentYear, t.currentMonth, t.currentDay)); return this.formatDate(this._get(t, "dateFormat"), n, this._getFormatConfig(t)) }
53    }), t.fn.datepicker = function (e) { if (!this.length) return this; t.datepicker.initialized || (t(document).on("mousedown", t.datepicker._checkExternalClick), t.datepicker.initialized = !0), 0 === t("#" + t.datepicker._mainDivId).length && t("body").append(t.datepicker.dpDiv); var i = Array.prototype.slice.call(arguments, 1); return "string" != typeof e || "isDisabled" !== e && "getDate" !== e && "widget" !== e ? "option" === e && 2 === arguments.length && "string" == typeof arguments[1] ? t.datepicker["_" + e + "Datepicker"].apply(t.datepicker, [this[0]].concat(i)) : this.each(function () { "string" == typeof e ? t.datepicker["_" + e + "Datepicker"].apply(t.datepicker, [this].concat(i)) : t.datepicker._attachDatepicker(this, e) }) : t.datepicker["_" + e + "Datepicker"].apply(t.datepicker, [this[0]].concat(i)) }, t.datepicker = new s, t.datepicker.initialized = !1, t.datepicker.uuid = (new Date).getTime(), t.datepicker.version = "1.12.1", t.datepicker, t.widget("ui.dialog", { version: "1.12.1", options: { appendTo: "body", autoOpen: !0, buttons: [], classes: { "ui-dialog": "ui-corner-all", "ui-dialog-titlebar": "ui-corner-all" }, closeOnEscape: !0, closeText: "Close", draggable: !0, hide: null, height: "auto", maxHeight: null, maxWidth: null, minHeight: 150, minWidth: 150, modal: !1, position: { my: "center", at: "center", of: window, collision: "fit", using: function (e) { var i = t(this).css(e).offset().top; 0 > i && t(this).css("top", e.top - i) } }, resizable: !0, show: null, title: null, width: 300, beforeClose: null, close: null, drag: null, dragStart: null, dragStop: null, focus: null, open: null, resize: null, resizeStart: null, resizeStop: null }, sizeRelatedOptions: { buttons: !0, height: !0, maxHeight: !0, maxWidth: !0, minHeight: !0, minWidth: !0, width: !0 }, resizableRelatedOptions: { maxHeight: !0, maxWidth: !0, minHeight: !0, minWidth: !0 }, _create: function () { this.originalCss = { display: this.element[0].style.display, width: this.element[0].style.width, minHeight: this.element[0].style.minHeight, maxHeight: this.element[0].style.maxHeight, height: this.element[0].style.height }, this.originalPosition = { parent: this.element.parent(), index: this.element.parent().children().index(this.element) }, this.originalTitle = this.element.attr("title"), null == this.options.title && null != this.originalTitle && (this.options.title = this.originalTitle), this.options.disabled && (this.options.disabled = !1), this._createWrapper(), this.element.show().removeAttr("title").appendTo(this.uiDialog), this._addClass("ui-dialog-content", "ui-widget-content"), this._createTitlebar(), this._createButtonPane(), this.options.draggable && t.fn.draggable && this._makeDraggable(), this.options.resizable && t.fn.resizable && this._makeResizable(), this._isOpen = !1, this._trackFocus() }, _init: function () { this.options.autoOpen && this.open() }, _appendTo: function () { var e = this.options.appendTo; return e && (e.jquery || e.nodeType) ? t(e) : this.document.find(e || "body").eq(0) }, _destroy: function () { var t, e = this.originalPosition; 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), t.length && t[0] !== this.element[0] ? t.before(this.element) : e.parent.append(this.element) }, widget: function () { return this.uiDialog }, disable: t.noop, enable: t.noop, close: function (e) { var i = this; this._isOpen && this._trigger("beforeClose", e) !== !1 && (this._isOpen = !1, this._focusedElement = null, this._destroyOverlay(), this._untrackInstance(), this.opener.filter(":focusable").trigger("focus").length || t.ui.safeBlur(t.ui.safeActiveElement(this.document[0])), this._hide(this.uiDialog, this.options.hide, function () { i._trigger("close", e) })) }, isOpen: function () { return this._isOpen }, moveToTop: function () { this._moveToTop() }, _moveToTop: function (e, i) { var s = !1, n = this.uiDialog.siblings(".ui-front:visible").map(function () { return +t(this).css("z-index") }).get(), o = Math.max.apply(null, n); return o >= +this.uiDialog.css("z-index") && (this.uiDialog.css("z-index", o + 1), s = !0), s && !i && this._trigger("focus", e), s }, open: function () { var e = this; return this._isOpen ? (this._moveToTop() && this._focusTabbable(), void 0) : (this._isOpen = !0, this.opener = t(t.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 () { e._focusTabbable(), e._trigger("focus") }), this._makeFocusTarget(), this._trigger("open"), void 0) }, _focusTabbable: function () { var t = this._focusedElement; t || (t = this.element.find("[autofocus]")), t.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") }, _keepFocus: function (e) { function i() { var e = t.ui.safeActiveElement(this.document[0]), i = this.uiDialog[0] === e || t.contains(this.uiDialog[0], e); i || this._focusTabbable() } e.preventDefault(), i.call(this), this._delay(i) }, _createWrapper: function () { this.uiDialog = t("<div>").hide().attr({ tabIndex: -1, role: "dialog" }).appendTo(this._appendTo()), this._addClass(this.uiDialog, "ui-dialog", "ui-widget ui-widget-content ui-front"), this._on(this.uiDialog, { keydown: function (e) { if (this.options.closeOnEscape && !e.isDefaultPrevented() && e.keyCode && e.keyCode === t.ui.keyCode.ESCAPE) return e.preventDefault(), this.close(e), void 0; if (e.keyCode === t.ui.keyCode.TAB && !e.isDefaultPrevented()) { var i = this.uiDialog.find(":tabbable"), s = i.filter(":first"), n = i.filter(":last"); e.target !== n[0] && e.target !== this.uiDialog[0] || e.shiftKey ? e.target !== s[0] && e.target !== this.uiDialog[0] || !e.shiftKey || (this._delay(function () { n.trigger("focus") }), e.preventDefault()) : (this._delay(function () { s.trigger("focus") }), e.preventDefault()) } }, mousedown: function (t) { this._moveToTop(t) && this._focusTabbable() } }), this.element.find("[aria-describedby]").length || this.uiDialog.attr({ "aria-describedby": this.element.uniqueId().attr("id") }) }, _createTitlebar: function () { var e; this.uiDialogTitlebar = t("<div>"), this._addClass(this.uiDialogTitlebar, "ui-dialog-titlebar", "ui-widget-header ui-helper-clearfix"), this._on(this.uiDialogTitlebar, { mousedown: function (e) { t(e.target).closest(".ui-dialog-titlebar-close") || this.uiDialog.trigger("focus") } }), this.uiDialogTitlebarClose = t("<button type='button'></button>").button({ label: t("<a>").text(this.options.closeText).html(), icon: "ui-icon-closethick", showLabel: !1 }).appendTo(this.uiDialogTitlebar), this._addClass(this.uiDialogTitlebarClose, "ui-dialog-titlebar-close"), this._on(this.uiDialogTitlebarClose, { click: function (t) { t.preventDefault(), this.close(t) } }), e = t("<span>").uniqueId().prependTo(this.uiDialogTitlebar), this._addClass(e, "ui-dialog-title"), this._title(e), this.uiDialogTitlebar.prepe
vendor: 4,177 bytes, line 53
53ndTo(this.uiDialog), this.uiDialog.attr({ "aria-labelledby": e.attr("id") }) }, _title: function (t) { this.options.title ? t.text(this.options.title) : t.html("&#160;") }, _createButtonPane: function () { this.uiDialogButtonPane = t("<div>"), this._addClass(this.uiDialogButtonPane, "ui-dialog-buttonpane", "ui-widget-content ui-helper-clearfix"), this.uiButtonSet = t("<div>").appendTo(this.uiDialogButtonPane), this._addClass(this.uiButtonSet, "ui-dialog-buttonset"), this._createButtons() }, _createButtons: function () { var e = this, i = this.options.buttons; return this.uiDialogButtonPane.remove(), this.uiButtonSet.empty(), t.isEmptyObject(i) || t.isArray(i) && !i.length ? (this._removeClass(this.uiDialog, "ui-dialog-buttons"), void 0) : (t.each(i, function (i, s) { var n, o; s = t.isFunction(s) ? { click: s, text: i } : s, s = t.extend({ type: "button" }, s), n = s.click, o = { icon: s.icon, iconPosition: s.iconPosition, showLabel: s.showLabel, icons: s.icons, text: s.text }, delete s.click, delete s.icon, delete s.iconPosition, delete s.showLabel, delete s.icons, "boolean" == typeof s.text && delete s.text, t("<button></button>", s).button(o).appendTo(e.uiButtonSet).on("click", function () { n.apply(e.element[0], arguments) }) }), this._addClass(this.uiDialog, "ui-dialog-buttons"), this.uiDialogButtonPane.appendTo(this.uiDialog), void 0) }, _makeDraggable: function () { function e(t) { return { position: t.position, offset: t.offset } } var i = this, s = this.options; this.uiDialog.draggable({ cancel: ".ui-dialog-content, .ui-dialog-titlebar-close", handle: ".ui-dialog-titlebar", containment: "document", start: function (s, n) { i._addClass(t(this), "ui-dialog-dragging"), i._blockFrames(), i._trigger("dragStart", s, e(n)) }, drag: function (t, s) { i._trigger("drag", t, e(s)) }, stop: function (n, o) { var a = o.offset.left - i.document.scrollLeft(), r = o.offset.top - i.document.scrollTop(); s.position = { my: "left top", at: "left" + (a >= 0 ? "+" : "") + a + " " + "top" + (r >= 0 ? "+" : "") + r, of: i.window }, i._removeClass(t(this), "ui-dialog-dragging"), i._unblockFrames(), i._trigger("dragStop", n, e(o)) } }) }, _makeResizable: function () { function e(t) { return { originalPosition: t.originalPosition, originalSize: t.originalSize, position: t.position, size: t.size } } var i = this, s = this.options, n = s.resizable, o = this.uiDialog.css("position"), a = "string" == typeof n ? n : "n,e,s,w,se,sw,ne,nw"; this.uiDialog.resizable({ cancel: ".ui-dialog-content", containment: "document", alsoResize: this.element, maxWidth: s.maxWidth, maxHeight: s.maxHeight, minWidth: s.minWidth, minHeight: this._minHeight(), handles: a, start: function (s, n) { i._addClass(t(this), "ui-dialog-resizing"), i._blockFrames(), i._trigger("resizeStart", s, e(n)) }, resize: function (t, s) { i._trigger("resize", t, e(s)) }, stop: function (n, o) { var a = i.uiDialog.offset(), r = a.left - i.document.scrollLeft(), l = a.top - i.document.scrollTop(); s.height = i.uiDialog.height(), s.width = i.uiDialog.width(), s.position = { my: "left top", at: "left" + (r >= 0 ? "+" : "") + r + " " + "top" + (l >= 0 ? "+" : "") + l, of: i.window }, i._removeClass(t(this), "ui-dialog-resizing"), i._unblockFrames(), i._trigger("resizeStop", n, e(o)) } }).css("position", o) }, _trackFocus: function () { this._on(this.widget(), { focusin: function (e) { this._makeFocusTarget(), this._focusedElement = t(e.target) } }) }, _makeFocusTarget: function () { this._untrackInstance(), this._trackingInstances().unshift(this) }, _untrackInstance: function () { var e = this._trackingInstances(), i = t.inArray(this, e); -1 !== i && e.splice(i, 1) }, _trackingInstances: function () { var t = this.document.data("ui-dialog-instances"); return t || (t = [], this.document.data("ui-dialog-instances", t)), t }, _minHeight: function () { var t = this.options; return "auto" === t.height ? t.minHeight : Math.min(t.minHeight, t.height) }, _position: function () { var t = this.uiDialog.is(":visible"); t || this.uiDialog.show(), this.uiDialog.position(this.options.position), t || this.uiDialog.hide() }, _setOptions: function (e) { var i = this, s = !1, n = {};
vendor: 16,883 bytes, lines 53-54
53 t.each(e, function (t, e) { i._setOption(t, e), t in i.sizeRelatedOptions && (s = !0), t in i.resizableRelatedOptions && (n[t] = e) }), s && (this._size(), this._position()), this.uiDialog.is(":data(ui-resizable)") && this.uiDialog.resizable("option", n) }, _setOption: function (e, i) { var s, n, o = this.uiDialog; "disabled" !== e && (this._super(e, i), "appendTo" === e && this.uiDialog.appendTo(this._appendTo()), "buttons" === e && this._createButtons(), "closeText" === e && this.uiDialogTitlebarClose.button({ label: t("<a>").text("" + this.options.closeText).html() }), "draggable" === e && (s = o.is(":data(ui-draggable)"), s && !i && o.draggable("destroy"), !s && i && this._makeDraggable()), "position" === e && this._position(), "resizable" === e && (n = o.is(":data(ui-resizable)"), n && !i && o.resizable("destroy"), n && "string" == typeof i && o.resizable("option", "handles", i), n || i === !1 || this._makeResizable()), "title" === e && this._title(this.uiDialogTitlebar.find(".ui-dialog-title"))) }, _size: function () { var t, e, i, s = this.options; this.element.show().css({ width: "auto", minHeight: 0, maxHeight: "none", height: 0 }), s.minWidth > s.width && (s.width = s.minWidth), t = this.uiDialog.css({ height: "auto", width: s.width }).outerHeight(), e = Math.max(0, s.minHeight - t), i = "number" == typeof s.maxHeight ? Math.max(0, s.maxHeight - t) : "none", "auto" === s.height ? this.element.css({ minHeight: e, maxHeight: i, height: "auto" }) : this.element.height(Math.max(0, s.height - t)), this.uiDialog.is(":data(ui-resizable)") && this.uiDialog.resizable("option", "minHeight", this._minHeight()) }, _blockFrames: function () { this.iframeBlocks = this.document.find("iframe").map(function () { var e = t(this); return t("<div>").css({ position: "absolute", width: e.outerWidth(), height: e.outerHeight() }).appendTo(e.parent()).offset(e.offset())[0] }) }, _unblockFrames: function () { this.iframeBlocks && (this.iframeBlocks.remove(), delete this.iframeBlocks) }, _allowInteraction: function (e) { return t(e.target).closest(".ui-dialog").length ? !0 : !!t(e.target).closest(".ui-datepicker").length }, _createOverlay: function () { if (this.options.modal) { var e = !0; this._delay(function () { e = !1 }), this.document.data("ui-dialog-overlays") || this._on(this.document, { focusin: function (t) { e || this._allowInteraction(t) || (t.preventDefault(), this._trackingInstances()[0]._focusTabbable()) } }), this.overlay = t("<div>").appendTo(this._appendTo()), this._addClass(this.overlay, null, "ui-widget-overlay ui-front"), this._on(this.overlay, { mousedown: "_keepFocus" }), this.document.data("ui-dialog-overlays", (this.document.data("ui-dialog-overlays") || 0) + 1) } }, _destroyOverlay: function () { if (this.options.modal && this.overlay) { var t = this.document.data("ui-dialog-overlays") - 1; 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 } } }), t.uiBackCompat !== !1 && t.widget("ui.dialog", t.ui.dialog, { options: { dialogClass: "" }, _createWrapper: function () { this._super(), this.uiDialog.addClass(this.options.dialogClass) }, _setOption: function (t, e) { "dialogClass" === t && this.uiDialog.removeClass(this.options.dialogClass).addClass(e), this._superApply(arguments) } }), t.ui.dialog, t.widget("ui.progressbar", { version: "1.12.1", options: { classes: { "ui-progressbar": "ui-corner-all", "ui-progressbar-value": "ui-corner-left", "ui-progressbar-complete": "ui-corner-right" }, max: 100, value: 0, change: null, complete: null }, min: 0, _create: function () { this.oldValue = this.options.value = this._constrainedValue(), this.element.attr({ role: "progressbar", "aria-valuemin": this.min }), this._addClass("ui-progressbar", "ui-widget ui-widget-content"), this.valueDiv = t("<div>").appendTo(this.element), this._addClass(this.valueDiv, "ui-progressbar-value", "ui-widget-header"), this._refreshValue() }, _destroy: function () { this.element.removeAttr("role aria-valuemin aria-valuemax aria-valuenow"), this.valueDiv.remove() }, value: function (t) { return void 0 === t ? this.options.value : (this.options.value = this._constrainedValue(t), this._refreshValue(), void 0) }, _constrainedValue: function (t) { return void 0 === t && (t = this.options.value), this.indeterminate = t === !1, "number" != typeof t && (t = 0), this.indeterminate ? !1 : Math.min(this.options.max, Math.max(this.min, t)) }, _setOptions: function (t) { var e = t.value; delete t.value, this._super(t), this.options.value = this._constrainedValue(e), this._refreshValue() }, _setOption: function (t, e) { "max" === t && (e = Math.max(this.min, e)), this._super(t, e) }, _setOptionDisabled: function (t) { this._super(t), this.element.attr("aria-disabled", t), this._toggleClass(null, "ui-state-disabled", !!t) }, _percentage: function () { return this.indeterminate ? 100 : 100 * (this.options.value - this.min) / (this.options.max - this.min) }, _refreshValue: function () { var e = this.options.value, i = this._percentage(); this.valueDiv.toggle(this.indeterminate || e > this.min).width(i.toFixed(0) + "%"), this._toggleClass(this.valueDiv, "ui-progressbar-complete", null, e === this.options.max)._toggleClass("ui-progressbar-indeterminate", null, this.indeterminate), this.indeterminate ? (this.element.removeAttr("aria-valuenow"), this.overlayDiv || (this.overlayDiv = t("<div>").appendTo(this.valueDiv), this._addClass(this.overlayDiv, "ui-progressbar-overlay"))) : (this.element.attr({ "aria-valuemax": this.options.max, "aria-valuenow": e }), this.overlayDiv && (this.overlayDiv.remove(), this.overlayDiv = null)), this.oldValue !== e && (this.oldValue = e, this._trigger("change")), e === this.options.max && this._trigger("complete") } }), t.widget("ui.selectmenu", [t.ui.formResetMixin, { version: "1.12.1", defaultElement: "<select>", options: { appendTo: null, classes: { "ui-selectmenu-button-open": "ui-corner-top", "ui-selectmenu-button-closed": "ui-corner-all" }, disabled: null, icons: { button: "ui-icon-triangle-1-s" }, position: { my: "left top", at: "left bottom", collision: "none" }, width: !1, change: null, close: null, focus: null, open: null, select: null }, _create: function () { var e = this.element.uniqueId().attr("id"); this.ids = { element: e, button: e + "-button", menu: e + "-menu" }, this._drawButton(), this._drawMenu(), this._bindFormResetHandler(), this._rendered = !1, this.menuItems = t() }, _drawButton: function () { var e, i = this, s = this._parseOption(this.element.find("option:selected"), this.element[0].selectedIndex); this.labels = this.element.labels().attr("for", this.ids.button), this._on(this.labels, { click: function (t) { this.button.focus(), t.preventDefault() } }), this.element.hide(), this.button = t("<span>", { tabindex: this.options.disabled ? -1 : 0, id: this.ids.button, role: "combobox", "aria-expanded": "false", "aria-autocomplete": "list", "aria-owns": this.ids.menu, "aria-haspopup": "true", title: this.element.attr("title") }).insertAfter(this.element), this._addClass(this.button, "ui-selectmenu-button ui-selectmenu-button-closed", "ui-button ui-widget"), e = t("<span>").appendTo(this.button), this._addClass(e, "ui-selectmenu-icon", "ui-icon " + this.options.icons.button), this.buttonItem = this._renderButtonItem(s).appendTo(this.button), this.options.width !== !1 && this._resizeButton(), this._on(this.button, this._buttonEvents), this.button.one("focusin", function () { i._rendered || i._refreshMenu() }) }, _drawMenu: function () { var e = this; this.menu = t("<ul>", { "aria-hidden": "true", "aria-labelledby": this.ids.button, id: this.ids.menu }), this.menuWrap = t("<div>").append(this.menu), this._addClass(this.menuWrap, "ui-selectmenu-menu", "ui-front"), this.menuWrap.appendTo(this._appendTo()), this.menuInstance = this.menu.menu({ classes: { "ui-menu": "ui-corner-bottom" }, role: "listbox", select: function (t, i) { t.preventDefault(), e._setSelection(), e._select(i.item.data("ui-selectmenu-item"), t) }, focus: function (t, i) { var s = i.item.data("ui-selectmenu-item"); null != e.focusIndex && s.index !== e.focusIndex && (e._trigger("focus", t, { item: s }), e.isOpen || e._select(s, t)), e.focusIndex = s.index, e.button.attr("aria-activedescendant", e.menuItems.eq(s.index).attr("id")) } }).menu("instance"), this.menuInstance._off(this.menu, "mouseleave"), this.menuInstance._closeOnDocumentClick = function () { return !1 }, this.menuInstance._isDivider = function () { return !1 } }, refresh: function () { this._refreshMenu(), this.buttonItem.replaceWith(this.buttonItem = this._renderButtonItem(this._getSelectedItem().data("ui-selectmenu-item") || {})), null === this.options.width && this._resizeButton() }, _refreshMenu: function () { var t, e = this.element.find("option"); 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"))) }, open: function (t) { 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))) }, _position: function () { this.menuWrap.position(t.extend({ of: this.button }, this.options.position)) }, close: function (t) { this.isOpen && (this.isOpen = !1, this._toggleAttr(), this.range = null, this._off(this.document), this._trigger("close", t)) }, widget: function () { return this.button }, menuWidget: function () { return this.menu }, _renderButtonItem: function (e) { var i = t("<span>"); return this._setText(i, e.label), this._addClass(i, "ui-selectmenu-text"), i }, _renderMenu: function (e, i) { var s = this, n = ""; t.each(i, function (i, o) { var a; o.optgroup !== n && (a = t("<li>", { text: o.optgroup }), s._addClass(a, "ui-selectmenu-optgroup", "ui-menu-divider" + (o.element.parent("optgroup").prop("disabled") ? " ui-state-disabled" : "")), a.appendTo(e), n = o.optgroup), s._renderItemData(e, o) }) }, _renderItemData: function (t, e) { return this._renderItem(t, e).data("ui-selectmenu-item", e) }, _renderItem: function (e, i) { var s = t("<li>"), n = t("<div>", { title: i.element.attr("title") }); return i.disabled && this._addClass(s, null, "ui-state-disabled"), this._setText(n, i.label), s.append(n).appendTo(e) }, _setText: function (t, e) { e ? t.text(e) : t.html("&#160;") }, _move: function (t, e) { var i, s, n = ".ui-menu-item"; this.isOpen ? i = this.menuItems.eq(this.focusIndex).parent("li") : (i = this.menuItems.eq(this.element[0].selectedIndex).parent("li"), n += ":not(.ui-state-disabled)"), s = "first" === t || "last" === t ? i["first" === t ? "prevAll" : "nextAll"](n).eq(-1) : i[t + "All"](n).eq(0), s.length && this.menuInstance.focus(e, s) }, _getSelectedItem: function () { return this.menuItems.eq(this.element[0].selectedIndex).parent("li") }, _toggle: function (t) { this[this.isOpen ? "close" : "open"](t) }, _setSelection: function () { var t; this.range && (window.getSelection ? (t = window.getSelection(), t.removeAllRanges(), t.addRange(this.range)) : this.range.select(), this.button.focus()) }, _documentClick: { mousedown: function (e) { this.isOpen && (t(e.target).closest(".ui-selectmenu-menu, #" + t.ui.escapeSelector(this.ids.button)).length || this.close(e)) } }, _buttonEvents: { mousedown: function () { var t; window.getSelection ? (t = window.getSelection(), t.rangeCount && (this.range = t.getRangeAt(0))) : this.range = document.selection.createRange() }, click: function (t) { this._setSelection(), this._toggle(t) }, keydown: function (e) { var i = !0; switch (e.keyCode) { case t.ui.keyCode.TAB: case t.ui.keyCode.ESCAPE: this.close(e), i = !1; break; case t.ui.keyCode.ENTER: this.isOpen && this._selectFocusedItem(e); break; case t.ui.keyCode.UP: e.altKey ? this._toggle(e) : this._move("prev", e); break; case t.ui.keyCode.DOWN: e.altKey ? this._toggle(e) : this._move("next", e); break; case t.ui.keyCode.SPACE: this.isOpen ? this._selectFocusedItem(e) : this._toggle(e); break; case t.ui.keyCode.LEFT: this._move("prev", e); break; case t.ui.keyCode.RIGHT: this._move("next", e); break; case t.ui.keyCode.HOME: case t.ui.keyCode.PAGE_UP: this._move("first", e); break; case t.ui.keyCode.END: case t.ui.keyCode.PAGE_DOWN: this._move("last", e); break; default: this.menu.trigger(e), i = !1 }i && e.preventDefault() } }, _selectFocusedItem: function (t) { var e = this.menuItems.eq(this.focusIndex).parent("li"); e.hasClass("ui-state-disabled") || this._select(e.data("ui-selectmenu-item"), t) }, _select: function (t, e) { var i = this.element[0].selectedIndex; 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) }, _setAria: function (t) { var e = this.menuItems.eq(t.index).attr("id"); this.button.attr({ "aria-labelledby": e, "aria-activedescendant": e }), this.menu.attr("aria-activedescendant", e) }, _setOption: function (t, e) { if ("icons" === t) { var i = this.button.find("span.ui-icon"); this._removeClass(i, null, this.options.icons.button)._addClass(i, null, e.button) } this._super(t, e), "appendTo" === t && this.menuWrap.appendTo(this._appendTo()), "width" === t && this._resizeButton() }, _setOptionDisabled: function (t) { 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) }, _appendTo: function () { var e = this.options.appendTo; return e && (e = e.jquery || e.nodeType ? t(e) : this.document.find(e).eq(0)), e && e[0] || (e = this.element.closest(".ui-front, dialog")), e.length || (e = this.document[0].body), e }, _toggleAttr: function () { this.button.attr("aria-expanded", this.isOpen), this._removeClass(this.button, "ui-selectmenu-button-" + (this.isOpen ? "closed" : "open"))._addClass(this.button, "ui-selectmenu-button-" + (this.isOpen ? "open" : "closed"))._toggleClass(this.menuWrap, "ui-selectmenu-open", null, this.isOpen), this.menu.attr("aria-hidden", !this.isOpen) }, _resizeButton: function () { var t = this.options.width; return t === !1 ? (this.button.css("width", ""), void 0) : (null === t && (t = this.element.show().outerWidth(), this.element.hide()), this.button.outerWidth(t), void 0) }, _resizeMenu: function () { this.menu.outerWidth(Math.max(this.button.outerWidth(), this.menu.width("").outerWidth() + 1)) }, _getCreateOptions: function () { var t = this._super(); return t.disabled = this.element.prop("disabled"), t }, _parseOptions: function (e) { var i = this, s = []; e.each(function (e, n) { s.push(i._parseOption(t(n), e)) }), this.items = s }, _parseOption: function (t, e) { var i = t.parent("optgroup"); return { element: t, index: e, value: t.val(), label: t.text(), optgroup: i.attr("label") || "", disabled: i.prop("disabled") || t.prop("disabled") } }, _destroy: function () { this._unbindFormResetHandler(), this.menuWrap.remove(), this.button.remove(), this.element.show(), this.element.removeUniqueId(), this.labels.attr("for", this.ids.element) } }]), t.widget("ui.slider", t.ui.mouse, {
54        version: "1.12.1", widgetEventPrefix: "slide", options: { animate: !1, classes: { "ui-slider": "ui-corner-all", "ui-slider-handle": "ui-corner-all", "ui-slider-range": "ui-corner-all ui-widget-header" }, distance: 0, max: 100, min: 0, orientation: "horizontal", range: !1, step: 1, value: 0, values: null, change: null, slide: null, start: null, stop: null }, numPages: 5, _create: function () { this._keySliding = !1, this._mouseSliding = !1, this._animateOff = !0, this._handleIndex = null, this._detectOrientation(), this._mouseInit(), this._calculateNewMax(), this._addClass("ui-slider ui-slider-" + this.orientation, "ui-widget ui-widget-content"), this._refresh(), this._animateOff = !1 }, _refresh: function () { this._createRange(), this._createHandles(), this._setupEvents(), this._refreshValue() }, _createHandles: function () { var e, i, s = this.options, n = this.element.find(".ui-slider-handle"), o = "<span tabindex='0'></span>", a = []; for (i = s.values && s.values.length || 1, n.length >
vendor: 4,779 bytes, lines 54-56
54 i && (n.slice(i).remove(), n = n.slice(0, i)), e = n.length; i > e; e++)a.push(o); this.handles = n.add(t(a.join("")).appendTo(this.element)), this._addClass(this.handles, "ui-slider-handle", "ui-state-default"), this.handle = this.handles.eq(0), this.handles.each(function (e) { t(this).data("ui-slider-handle-index", e).attr("tabIndex", 0) }) }, _createRange: function () {
55            var e = this.options; e.range ? (e.range === !0 && (e.values ? e.values.length && 2 !== e.values.length ? e.values = [e.values[0], e.values[0]] : t.isArray(e.values) && (e.values = e.values.slice(0)) : e.values = [this._valueMin(), this._valueMin()]), this.range && this.range.length ? (this._removeClass(this.range, "ui-slider-range-min ui-slider-range-max"), this.range.css({ left: "", bottom: "" })) : (this.range = t("<div>").appendTo(this.element), this._addClass(this.range, "ui-slider-range")), ("min" === e.range || "max" === e.range) && this._addClass(this.range, "ui-slider-range-" + e.range)) : (this.range && this.range.remove(), this.range = null)
56        }, _setupEvents: function () { this._off(this.handles), this._on(this.handles, this._handleEvents), this._hoverable(this.handles), this._focusable(this.handles) }, _destroy: function () { this.handles.remove(), this.range && this.range.remove(), this._mouseDestroy() }, _mouseCapture: function (e) { var i, s, n, o, a, r, l, h, c = this, u = this.options; return u.disabled ? !1 : (this.elementSize = { width: this.element.outerWidth(), height: this.element.outerHeight() }, this.elementOffset = this.element.offset(), i = { x: e.pageX, y: e.pageY }, s = this._normValueFromMouse(i), n = this._valueMax() - this._valueMin() + 1, this.handles.each(function (e) { var i = Math.abs(s - c.values(e)); (n > i || n === i && (e === c._lastChangedValue || c.values(e) === u.min)) && (n = i, o = t(this), a = e) }), r = this._start(e, a), r === !1 ? !1 : (this._mouseSliding = !0, this._handleIndex = a, this._addClass(o, null, "ui-state-active"), o.trigger("focus"), l = o.offset(), h = !t(e.target).parents().addBack().is(".ui-slider-handle"), this._clickOffset = h ? { left: 0, top: 0 } : { left: e.pageX - l.left - o.width() / 2, top: e.pageY - l.top - o.height() / 2 - (parseInt(o.css("borderTopWidth"), 10) || 0) - (parseInt(o.css("borderBottomWidth"), 10) || 0) + (parseInt(o.css("marginTop"), 10) || 0) }, this.handles.hasClass("ui-state-hover") || this._slide(e, a, s), this._animateOff = !0, !0)) }, _mouseStart: function () { return !0 }, _mouseDrag: function (t) { var e = { x: t.pageX, y: t.pageY }, i = this._normValueFromMouse(e); return this._slide(t, this._handleIndex, i), !1 }, _mouseStop: function (t) { 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, !1 }, _detectOrientation: function () { this.orientation = "vertical" === this.options.orientation ? "vertical" : "horizontal" }, _normValueFromMouse: function (t) { var e, i, s, n, o; return "horizontal" === this.orientation ? (e = this.elementSize.width, i = t.x - this.elementOffset.left - (this._clickOffset ? this._clickOffset.left : 0)) : (e = this.elementSize.height, i = t.y - this.elementOffset.top - (this._clickOffset ? this._clickOffset.top : 0)), s = i / e, s > 1 && (s = 1), 0 > s && (s = 0), "vertical" === this.orientation && (s = 1 - s), n = this._valueMax() - this._valueMin(), o = this._valueMin() + s * n, this._trimAlignValue(o) }, _uiHash: function (t, e, i) { var s = { handle: this.handles[t], handleIndex: t, value: void 0 !== e ? e : this.value() }; return this._hasMultipleValues() && (s.value = void 0 !== e ? e : this.values(t), s.values = i || this.values()), s }, _hasMultipleValues: function () { return this.options.values && this.options.values.length }, _start: function (t, e) { return this._trigger("start", t, this._uiHash(e)) }, _slide: function (t, e, i) { var s, n, o = this.value(), a = this.values(); this._hasMultipleValues() && (n = this.values(e ? 0 : 1), o = this.values(e), 2 === this.options.values.length && this.options.range === !0 && (i = 0 === e ? Math.min(n, i) : Math.max(n, i)), a[e] = i), i !== o && (s = this._trigger("slide", t, this._uiHash(e, i, a)), s !== !1 && (this._hasMultipleValues() ? this.values(e, i) : this.value(i))) }, _stop: function (t, e) { this._trigger("stop", t, this._uiHash(e)) }, _change: function (t, e) { this._keySliding || this._mouseSliding || (this._lastChangedValue = e, this._trigger("change", t, this._uiHash(e))) }, value: function (t) { return arguments.length ? (this.options.value = this._trimAlignValue(t), this._refreshValue(), this._change(null, 0), void 0) : this._value(
vendor: 21,154 bytes, lines 56-57
56) }, values: function (e, i) { var s, n, o; if (arguments.length > 1) return this.options.values[e] = this._trimAlignValue(i), this._refreshValue(), this._change(null, e), void 0; if (!arguments.length) return this._values(); if (!t.isArray(arguments[0])) return this._hasMultipleValues() ? this._values(e) : this.value(); for (s = this.options.values, n = arguments[0], o = 0; s.length > o; o += 1)s[o] = this._trimAlignValue(n[o]), this._change(null, o); this._refreshValue() }, _setOption: function (e, i) { var s, n = 0; switch ("range" === e && this.options.range === !0 && ("min" === i ? (this.options.value = this._values(0), this.options.values = null) : "max" === i && (this.options.value = this._values(this.options.values.length - 1), this.options.values = null)), t.isArray(this.options.values) && (n = this.options.values.length), this._super(e, i), e) { case "orientation": this._detectOrientation(), this._removeClass("ui-slider-horizontal ui-slider-vertical")._addClass("ui-slider-" + this.orientation), this._refreshValue(), this.options.range && this._refreshRange(i), this.handles.css("horizontal" === i ? "bottom" : "left", ""); break; case "value": this._animateOff = !0, this._refreshValue(), this._change(null, 0), this._animateOff = !1; break; case "values": for (this._animateOff = !0, this._refreshValue(), s = n - 1; s >= 0; s--)this._change(null, s); this._animateOff = !1; break; case "step": case "min": case "max": this._animateOff = !0, this._calculateNewMax(), this._refreshValue(), this._animateOff = !1; break; case "range": this._animateOff = !0, this._refresh(), this._animateOff = !1 } }, _setOptionDisabled: function (t) { this._super(t), this._toggleClass(null, "ui-state-disabled", !!t) }, _value: function () { var t = this.options.value; return t = this._trimAlignValue(t) }, _values: function (t) { var e, i, s; if (arguments.length) return e = this.options.values[t], e = this._trimAlignValue(e); if (this._hasMultipleValues()) { for (i = this.options.values.slice(), s = 0; i.length > s; s += 1)i[s] = this._trimAlignValue(i[s]); return i } return [] }, _trimAlignValue: function (t) { if (this._valueMin() >= t) return this._valueMin(); if (t >= this._valueMax()) return this._valueMax(); var e = this.options.step > 0 ? this.options.step : 1, i = (t - this._valueMin()) % e, s = t - i; return 2 * Math.abs(i) >= e && (s += i > 0 ? e : -e), parseFloat(s.toFixed(5)) }, _calculateNewMax: function () { var t = this.options.max, e = this._valueMin(), i = this.options.step, s = Math.round((t - e) / i) * i; t = s + e, t > this.options.max && (t -= i), this.max = parseFloat(t.toFixed(this._precision())) }, _precision: function () { var t = this._precisionOf(this.options.step); return null !== this.options.min && (t = Math.max(t, this._precisionOf(this.options.min))), t }, _precisionOf: function (t) { var e = "" + t, i = e.indexOf("."); return -1 === i ? 0 : e.length - i - 1 }, _valueMin: function () { return this.options.min }, _valueMax: function () { return this.max }, _refreshRange: function (t) { "vertical" === t && this.range.css({ width: "", left: "" }), "horizontal" === t && this.range.css({ height: "", bottom: "" }) }, _refreshValue: function () { var e, i, s, n, o, a = this.options.range, r = this.options, l = this, h = this._animateOff ? !1 : r.animate, c = {}; this._hasMultipleValues() ? this.handles.each(function (s) { i = 100 * ((l.values(s) - l._valueMin()) / (l._valueMax() - l._valueMin())), c["horizontal" === l.orientation ? "left" : "bottom"] = i + "%", t(this).stop(1, 1)[h ? "animate" : "css"](c, r.animate), l.options.range === !0 && ("horizontal" === l.orientation ? (0 === s && l.range.stop(1, 1)[h ? "animate" : "css"]({ left: i + "%" }, r.animate), 1 === s && l.range[h ? "animate" : "css"]({ width: i - e + "%" }, { queue: !1, duration: r.animate })) : (0 === s && l.range.stop(1, 1)[h ? "animate" : "css"]({ bottom: i + "%" }, r.animate), 1 === s && l.range[h ? "animate" : "css"]({ height: i - e + "%" }, { queue: !1, duration: r.animate }))), e = i }) : (s = this.value(), n = this._valueMin(), o = this._valueMax(), i = o !== n ? 100 * ((s - n) / (o - n)) : 0, c["horizontal" === this.orientation ? "left" : "bottom"] = i + "%", this.handle.stop(1, 1)[h ? "animate" : "css"](c, r.animate), "min" === a && "horizontal" === this.orientation && this.range.stop(1, 1)[h ? "animate" : "css"]({ width: i + "%" }, r.animate), "max" === a && "horizontal" === this.orientation && this.range.stop(1, 1)[h ? "animate" : "css"]({ width: 100 - i + "%" }, r.animate), "min" === a && "vertical" === this.orientation && this.range.stop(1, 1)[h ? "animate" : "css"]({ height: i + "%" }, r.animate), "max" === a && "vertical" === this.orientation && this.range.stop(1, 1)[h ? "animate" : "css"]({ height: 100 - i + "%" }, r.animate)) }, _handleEvents: { keydown: function (e) { var i, s, n, o, a = t(e.target).data("ui-slider-handle-index"); switch (e.keyCode) { case t.ui.keyCode.HOME: case t.ui.keyCode.END: case t.ui.keyCode.PAGE_UP: case t.ui.keyCode.PAGE_DOWN: case t.ui.keyCode.UP: case t.ui.keyCode.RIGHT: case t.ui.keyCode.DOWN: case t.ui.keyCode.LEFT: if (e.preventDefault(), !this._keySliding && (this._keySliding = !0, this._addClass(t(e.target), null, "ui-state-active"), i = this._start(e, a), i === !1)) return }switch (o = this.options.step, s = n = this._hasMultipleValues() ? this.values(a) : this.value(), e.keyCode) { case t.ui.keyCode.HOME: n = this._valueMin(); break; case t.ui.keyCode.END: n = this._valueMax(); break; case t.ui.keyCode.PAGE_UP: n = this._trimAlignValue(s + (this._valueMax() - this._valueMin()) / this.numPages); break; case t.ui.keyCode.PAGE_DOWN: n = this._trimAlignValue(s - (this._valueMax() - this._valueMin()) / this.numPages); break; case t.ui.keyCode.UP: case t.ui.keyCode.RIGHT: if (s === this._valueMax()) return; n = this._trimAlignValue(s + o); break; case t.ui.keyCode.DOWN: case t.ui.keyCode.LEFT: if (s === this._valueMin()) return; n = this._trimAlignValue(s - o) }this._slide(e, a, n) }, keyup: function (e) { var i = t(e.target).data("ui-slider-handle-index"); this._keySliding && (this._keySliding = !1, this._stop(e, i), this._change(e, i), this._removeClass(t(e.target), null, "ui-state-active")) } }
57    }), t.widget("ui.spinner", { version: "1.12.1", defaultElement: "<input>", widgetEventPrefix: "spin", options: { classes: { "ui-spinner": "ui-corner-all", "ui-spinner-down": "ui-corner-br", "ui-spinner-up": "ui-corner-tr" }, culture: null, icons: { down: "ui-icon-triangle-1-s", up: "ui-icon-triangle-1-n" }, incremental: !0, max: null, min: null, numberFormat: null, page: 10, step: 1, change: null, spin: null, start: null, stop: null }, _create: function () { this._setOption("max", this.options.max), this._setOption("min", this.options.min), this._setOption("step", this.options.step), "" !== this.value() && this._value(this.element.val(), !0), this._draw(), this._on(this._events), this._refresh(), this._on(this.window, { beforeunload: function () { this.element.removeAttr("autocomplete") } }) }, _getCreateOptions: function () { var e = this._super(), i = this.element; return t.each(["min", "max", "step"], function (t, s) { var n = i.attr(s); null != n && n.length && (e[s] = n) }), e }, _events: { keydown: function (t) { this._start(t) && this._keydown(t) && t.preventDefault() }, keyup: "_stop", focus: function () { this.previous = this.element.val() }, blur: function (t) { return this.cancelBlur ? (delete this.cancelBlur, void 0) : (this._stop(), this._refresh(), this.previous !== this.element.val() && this._trigger("change", t), void 0) }, mousewheel: function (t, e) { if (e) { if (!this.spinning && !this._start(t)) return !1; this._spin((e > 0 ? 1 : -1) * this.options.step, t), clearTimeout(this.mousewheelTimer), this.mousewheelTimer = this._delay(function () { this.spinning && this._stop(t) }, 100), t.preventDefault() } }, "mousedown .ui-spinner-button": function (e) { function i() { var e = this.element[0] === t.ui.safeActiveElement(this.document[0]); e || (this.element.trigger("focus"), this.previous = s, this._delay(function () { this.previous = s })) } var s; s = this.element[0] === t.ui.safeActiveElement(this.document[0]) ? this.previous : this.element.val(), e.preventDefault(), i.call(this), this.cancelBlur = !0, this._delay(function () { delete this.cancelBlur, i.call(this) }), this._start(e) !== !1 && this._repeat(null, t(e.currentTarget).hasClass("ui-spinner-up") ? 1 : -1, e) }, "mouseup .ui-spinner-button": "_stop", "mouseenter .ui-spinner-button": function (e) { return t(e.currentTarget).hasClass("ui-state-active") ? this._start(e) === !1 ? !1 : (this._repeat(null, t(e.currentTarget).hasClass("ui-spinner-up") ? 1 : -1, e), void 0) : void 0 }, "mouseleave .ui-spinner-button": "_stop" }, _enhance: function () { this.uiSpinner = this.element.attr("autocomplete", "off").wrap("<span>").parent().append("<a></a><a></a>") }, _draw: function () { this._enhance(), this._addClass(this.uiSpinner, "ui-spinner", "ui-widget ui-widget-content"), this._addClass("ui-spinner-input"), this.element.attr("role", "spinbutton"), this.buttons = this.uiSpinner.children("a").attr("tabIndex", -1).attr("aria-hidden", !0).button({ classes: { "ui-button": "" } }), this._removeClass(this.buttons, "ui-corner-all"), this._addClass(this.buttons.first(), "ui-spinner-button ui-spinner-up"), this._addClass(this.buttons.last(), "ui-spinner-button ui-spinner-down"), this.buttons.first().button({ icon: this.options.icons.up, showLabel: !1 }), this.buttons.last().button({ icon: this.options.icons.down, showLabel: !1 }), this.buttons.height() > Math.ceil(.5 * this.uiSpinner.height()) && this.uiSpinner.height() > 0 && this.uiSpinner.height(this.uiSpinner.height()) }, _keydown: function (e) { var i = this.options, s = t.ui.keyCode; switch (e.keyCode) { case s.UP: return this._repeat(null, 1, e), !0; case s.DOWN: return this._repeat(null, -1, e), !0; case s.PAGE_UP: return this._repeat(null, i.page, e), !0; case s.PAGE_DOWN: return this._repeat(null, -i.page, e), !0 }return !1 }, _start: function (t) { return this.spinning || this._trigger("start", t) !== !1 ? (this.counter || (this.counter = 1), this.spinning = !0, !0) : !1 }, _repeat: function (t, e, i) { t = t || 500, clearTimeout(this.timer), this.timer = this._delay(function () { this._repeat(40, e, i) }, t), this._spin(e * this.options.step, i) }, _spin: function (t, e) { var i = this.value() || 0; this.counter || (this.counter = 1), i = this._adjustValue(i + t * this._increment(this.counter)), this.spinning && this._trigger("spin", e, { value: i }) === !1 || (this._value(i), this.counter++) }, _increment: function (e) { var i = this.options.incremental; return i ? t.isFunction(i) ? i(e) : Math.floor(e * e * e / 5e4 - e * e / 500 + 17 * e / 200 + 1) : 1 }, _precision: function () { var t = this._precisionOf(this.options.step); return null !== this.options.min && (t = Math.max(t, this._precisionOf(this.options.min))), t }, _precisionOf: function (t) { var e = "" + t, i = e.indexOf("."); return -1 === i ? 0 : e.length - i - 1 }, _adjustValue: function (t) { var e, i, s = this.options; return e = null !== s.min ? s.min : 0, i = t - e, i = Math.round(i / s.step) * s.step, t = e + i, t = parseFloat(t.toFixed(this._precision())), null !== s.max && t > s.max ? s.max : null !== s.min && s.min > t ? s.min : t }, _stop: function (t) { this.spinning && (clearTimeout(this.timer), clearTimeout(this.mousewheelTimer), this.counter = 0, this.spinning = !1, this._trigger("stop", t)) }, _setOption: function (t, e) { var i, s, n; return "culture" === t || "numberFormat" === t ? (i = this._parse(this.element.val()), this.options[t] = e, this.element.val(this._format(i)), void 0) : (("max" === t || "min" === t || "step" === t) && "string" == typeof e && (e = this._parse(e)), "icons" === t && (s = this.buttons.first().find(".ui-icon"), this._removeClass(s, null, this.options.icons.up), this._addClass(s, null, e.up), n = this.buttons.last().find(".ui-icon"), this._removeClass(n, null, this.options.icons.down), this._addClass(n, null, e.down)), this._super(t, e), void 0) }, _setOptionDisabled: function (t) { this._super(t), this._toggleClass(this.uiSpinner, null, "ui-state-disabled", !!t), this.element.prop("disabled", !!t), this.buttons.button(t ? "disable" : "enable") }, _setOptions: r(function (t) { this._super(t) }), _parse: function (t) { return "string" == typeof t && "" !== t && (t = window.Globalize && this.options.numberFormat ? Globalize.parseFloat(t, 10, this.options.culture) : +t), "" === t || isNaN(t) ? null : t }, _format: function (t) { return "" === t ? "" : window.Globalize && this.options.numberFormat ? Globalize.format(t, this.options.numberFormat, this.options.culture) : t }, _refresh: function () { this.element.attr({ "aria-valuemin": this.options.min, "aria-valuemax": this.options.max, "aria-valuenow": this._parse(this.element.val()) }) }, isValid: function () { var t = this.value(); return null === t ? !1 : t === this._adjustValue(t) }, _value: function (t, e) { var i; "" !== t && (i = this._parse(t), null !== i && (e || (i = this._adjustValue(i)), t = this._format(i))), this.element.val(t), this._refresh() }, _destroy: function () { this.element.prop("disabled", !1).removeAttr("autocomplete role aria-valuemin aria-valuemax aria-valuenow"), this.uiSpinner.replaceWith(this.element) }, stepUp: r(function (t) { this._stepUp(t) }), _stepUp: function (t) { this._start() && (this._spin((t || 1) * this.options.step), this._stop()) }, stepDown: r(function (t) { this._stepDown(t) }), _stepDown: function (t) { this._start() && (this._spin((t || 1) * -this.options.step), this._stop()) }, pageUp: r(function (t) { this._stepUp((t || 1) * this.options.page) }), pageDown: r(function (t) { this._stepDown((t || 1) * this.options.page) }), value: function (t) { return arguments.length ? (r(this._value).call(this, t), void 0) : this._parse(this.element.val()) }, widget: function () { return this.uiSpinner } }), t.uiBackCompat !== !1 && t.widget("ui.spinner", t.ui.spinner, { _enhance: function () { this.uiSpinner = this.element.attr("autocomplete", "off").wrap(this._uiSpinnerHtml()).parent().append(this._buttonHtml()) }, _uiSpinnerHtml: function () { return "<span>" }, _buttonHtml: function () { return "<a></a><a></a>" } }), t.ui.spinner, t.widget("ui.tabs", { version: "1.12.1", delay: 300, options: { active: null, classes: { "ui-tabs": "ui-corner-all", "ui-tabs-nav": "ui-corner-all", "ui-tabs-panel": "ui-corner-bottom", "ui-tabs-tab": "ui-corner-top" }, collapsible: !1, event: "click", heightStyle: "content", hide: null, show: null, activate: null, beforeActivate: null, beforeLoad: null, load: null }, _isLocal: function () { var t = /#.*$/; return function (e) { var i, s; i = e.href.replace(t, ""), s = location.href.replace(t, ""); try { i = decodeURIComponent(i) } catch (n) { } try { s = decodeURIComponent(s) } catch (n) { } return e.hash.length > 1 && i === s } }(), _create: function () { var e = this, i = this.options; this.running = !1, this._addClass("ui-tabs", "ui-widget ui-widget-content"), this._toggleClass("ui-tabs-collapsible", null, i.collapsible), this._processTabs(), i.active = this._initialActive(), t.isArray(i.disabled) && (i.disabled = t.unique(i.disabled.concat(t.map(this.tabs.filter(".ui-state-disabled"), function (t) { return e.tabs.index(t) }))).sort()), this.active = this.options.active !== !1 && this.anchors.length ? this._findActive(i.active) : t(), this._refresh(), this.active.length && this.load(i.active) }, _initialActive: function () { var e = this.options.active, i = this.options.collapsible, s = location.hash.substring(1); return null === e && (s && this.tabs.each(function (i, n) { return t(n).attr("aria-controls") === s ? (e = i, !1) : void 0 }), null === e && (e = this.tabs.index(this.tabs.filter(".ui-tabs-active"))), (null === e || -1 === e) && (e = this.tabs.length ? 0 : !1)), e !== !1 && (e = this.tabs.index(this.tabs.eq(e)), -1 === e && (e = i ? !1 : 0)), !i && e === !1 && this.anchors.length && (e = 0), e }, _getCreateEventData: function () { return { tab: this.active, panel: this.active.length ? this._getPanelForTab(this.active) : t() } }, _tabKeydown: function (e) { var i = t(t.ui.safeActiveElement(this.document[0])).closest("li"), s = this.tabs.index(i), n = !0; if (!this._handlePageNav(e)) { switch (e.keyCode) { case t.ui.keyCode.RIGHT: case t.ui.keyCode.DOWN: s++; break; case t.ui.keyCode.UP: case t.ui.keyCode.LEFT: n = !1, s--; break; case t.ui.keyCode.END: s = this.anchors.length - 1; break; case t.ui.keyCode.HOME: s = 0; break; case t.ui.keyCode.SPACE: return e.preventDefault(), clearTimeout(this.activating), this._activate(s), void 0; case t.ui.keyCode.ENTER: return e.preventDefault(), clearTimeout(this.activating), this._activate(s === this.options.active ? !1 : s), void 0; default: return }e.preventDefault(), clearTimeout(this.activating), s = this._focusNextTab(s, n), e.ctrlKey || e.metaKey || (i.attr("aria-selected", "false"), this.tabs.eq(s).attr("aria-selected", "true"), this.activating = this._delay(function () { this.option("active", s) }, this.delay)) } }, _panelKeydown: function (e) { this._handlePageNav(e) || e.ctrlKey && e.keyCode === t.ui.keyCode.UP && (e.preventDefault(), this.active.trigger("focus")) }, _handlePageNav: function (e) { return e.altKey && e.keyCode === t.ui.keyCode.PAGE_UP ? (this._activate(this._focusNextTab(this.options.active - 1, !1)), !0) : e.altKey && e.keyCode === t.ui.keyCode.PAGE_DOWN ? (this._activate(this._focusNextTab(this.options.active + 1, !0)), !0) : void 0 }, _findNextTab: function (e, i) { function s() { return e > n && (e = 0), 0 > e && (e = n), e } for (var n = this.tabs.length - 1; -1 !== t.inArray(s(), this.options.disabled);)e = i ? e + 1 : e - 1; return e }, _focusNextTab: function (t, e) { return t = this._findNextTab(t, e), this.tabs.eq(t).trigger("focus"), t }, _setOption: function (t, e) { return "active" === t ? (this._activate(e), void 0) : (this._super(t, e), "collapsible" === t && (this._toggleClass("ui-tabs-collapsible", null, e), e || this.options.active !== !1 || this._activate(0)), "event" === t && this._setupEvents(e), "heightStyle" === t && this._setupHeightStyle(e), void 0) }, _sanitizeSelector: function (t) { return t ? t.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g, "\\$&") : "" }, refresh: function () { var e = this.options, i = this.tablist.children(":has(a[href])"); e.disabled = t.map(i.filter(".ui-state-disabled"), function (t) { return i.index(t) }), this._processTabs(), e.active !== !1 && this.anchors.length ? this.active.length && !t.contains(this.tablist[0], this.active[0]) ? this.tabs.length === e.disabled.length ? (e.active = !1, this.active = t()) : this._activate(this._findNextTab(Math.max(0, e.active - 1), !1)) : e.active = this.tabs.index(this.active) : (e.active = !1, this.active = t()), this._refresh() }, _refresh: function () { this._setOptionDisabled(this.options.disabled), this._setupEvents(this.options.event), this._setupHeightStyle(this.options.heightStyle), this.tabs.not(this.active).attr({ "aria-selected": "false", "aria-expanded": "false", tabIndex: -1 }), this.panels.not(this._getPanelForTab(this.active)).hide().attr({ "aria-hidden": "true" }), this.active.length ? (this.active.attr({ "aria-selected": "true", "aria-expanded": "true", tabIndex: 0 }), this._addClass(this.active, "ui-tabs-active", "ui-state-active"), this._getPanelForTab(this.active).show().attr({ "aria-hidden": "false" })) : this.tabs.eq(0).attr("tabIndex", 0) }, _processTabs: function () { var e = this, i = this.tabs, s = this.anchors, n = this.panels; this.tablist = this._getList().attr("role", "tablist"), this._addClass(this.tablist, "ui-tabs-nav", "ui-helper-reset ui-helper-clearfix ui-widget-header"), this.tablist.on("mousedown" + this.eventNamespace, "> li", function (e) { t(this).is(".ui-state-disabled") && e.preventDefault() }).on("focus" + this.eventNamespace, ".ui-tabs-anchor", function () { t(this).closest("li").is(".ui-state-disabled") && this.blur() }), this.tabs = this.tablist.find("> li:has(a[href])").attr({ role: "tab", tabIndex: -1 }), this._addClass(this.tabs, "ui-tabs-tab", "ui-state-default"), this.anchors = this.tabs.map(function () { return t("a", this)[0] }).attr({ role: "presentation", tabIndex: -1 }), this._addClass(this.anchors, "ui-tabs-anchor"), this.panels = t(), this.anchors.each(function (i, s) { var n, o, a, r = t(s).uniqueId().attr("id"), l = t(s).closest("li"), h = l.attr("aria-controls"); e._isLocal(s) ? (n = s.hash, a = n.substring(1), o = e.element.find(e._sanitizeSelector(n))) : (a = l.attr("aria-controls") || t({}).uniqueId()[0].id, n = "#" + a, o = e.element.find(n), o.length || (o = e._createPanel(a), o.insertAfter(e.panels[i - 1] || e.tablist)), o.attr("aria-live", "polite")), o.length && (e.panels = e.panels.add(o)), h && l.data("ui-tabs-aria-controls", h), l.attr({ "aria-controls": a, "aria-labelledby": r }), o.attr("aria-labelledby", r) }), this.panels.attr("role", "tabpanel"), this._addClass(this.panels, "ui-tabs-panel", "ui-widget-content"), i && (this._off(i.not(this.tabs)
vendor: 7,260 bytes, lines 57-58
57), this._off(s.not(this.anchors)), this._off(n.not(this.panels))) }, _getList: function () { return this.tablist || this.element.find("ol, ul").eq(0) }, _createPanel: function (e) { return t("<div>").attr("id", e).data("ui-tabs-destroy", !0) }, _setOptionDisabled: function (e) { var i, s, n; for (t.isArray(e) && (e.length ? e.length === this.anchors.length && (e = !0) : e = !1), n = 0; s = this.tabs[n]; n++)i = t(s), e === !0 || -1 !== t.inArray(n, e) ? (i.attr("aria-disabled", "true"), this._addClass(i, null, "ui-state-disabled")) : (i.removeAttr("aria-disabled"), this._removeClass(i, null, "ui-state-disabled")); this.options.disabled = e, this._toggleClass(this.widget(), this.widgetFullName + "-disabled", null, e === !0) }, _setupEvents: function (e) { var i = {}; e && t.each(e.split(" "), function (t, e) { i[e] = "_eventHandler" }), this._off(this.anchors.add(this.tabs).add(this.panels)), this._on(!0, this.anchors, { click: function (t) { t.preventDefault() } }), this._on(this.anchors, i), this._on(this.tabs, { keydown: "_tabKeydown" }), this._on(this.panels, { keydown: "_panelKeydown" }), this._focusable(this.tabs), this._hoverable(this.tabs) }, _setupHeightStyle: function (e) { var i, s = this.element.parent(); "fill" === e ? (i = s.height(), i -= this.element.outerHeight() - this.element.height(), this.element.siblings(":visible").each(function () { var e = t(this), s = e.css("position"); "absolute" !== s && "fixed" !== s && (i -= e.outerHeight(!0)) }), this.element.children().not(this.panels).each(function () { i -= t(this).outerHeight(!0) }), this.panels.each(function () { t(this).height(Math.max(0, i - t(this).innerHeight() + t(this).height())) }).css("overflow", "auto")) : "auto" === e && (i = 0, this.panels.each(function () { i = Math.max(i, t(this).height("").height()) }).height(i)) }, _eventHandler: function (e) { var i = this.options, s = this.active, n = t(e.currentTarget), o = n.closest("li"), a = o[0] === s[0], r = a && i.collapsible, l = r ? t() : this._getPanelForTab(o), h = s.length ? this._getPanelForTab(s) : t(), c = { oldTab: s, oldPanel: h, newTab: r ? t() : o, newPanel: l }; e.preventDefault(), o.hasClass("ui-state-disabled") || o.hasClass("ui-tabs-loading") || this.running || a && !i.collapsible || this._trigger("beforeActivate", e, c) === !1 || (i.active = r ? !1 : this.tabs.index(o), this.active = a ? t() : o, this.xhr && this.xhr.abort(), h.length || l.length || t.error("jQuery UI Tabs: Mismatching fragment identifier."), l.length && this.load(this.tabs.index(o), e), this._toggle(e, c)) }, _toggle: function (e, i) { function s() { o.running = !1, o._trigger("activate", e, i) } function n() { o._addClass(i.newTab.closest("li"), "ui-tabs-active", "ui-state-active"), a.length && o.options.show ? o._show(a, o.options.show, s) : (a.show(), s()) } var o = this, a = i.newPanel, r = i.oldPanel; this.running = !0, r.length && this.options.hide ? this._hide(r, this.options.hide, function () { o._removeClass(i.oldTab.closest("li"), "ui-tabs-active", "ui-state-active"), n() }) : (this._removeClass(i.oldTab.closest("li"), "ui-tabs-active", "ui-state-active"), r.hide(), n()), r.attr("aria-hidden", "true"), i.oldTab.attr({ "aria-selected": "false", "aria-expanded": "false" }), a.length && r.length ? i.oldTab.attr("tabIndex", -1) : a.length && this.tabs.filter(function () { return 0 === t(this).attr("tabIndex") }).attr("tabIndex", -1), a.attr("aria-hidden", "false"), i.newTab.attr({ "aria-selected": "true", "aria-expanded": "true", tabIndex: 0 }) }, _activate: function (e) { var i, s = this._findActive(e); s[0] !== this.active[0] && (s.length || (s = this.active), i = s.find(".ui-tabs-anchor")[0], this._eventHandler({ target: i, currentTarget: i, preventDefault: t.noop })) }, _findActive: function (e) { return e === !1 ? t() : this.tabs.eq(e) }, _getIndex: function (e) { return "string" == typeof e && (e = this.anchors.index(this.anchors.filter("[href$='" + t.ui.escapeSelector(e) + "']"))), e }, _destroy: function () { this.xhr && this.xhr.abort(), this.tablist.removeAttr("role").off(this.eventNamespace), this.anchors.removeAttr("role tabIndex").removeUniqueId(), this.tabs.add(this.panels).each(function () { t.data(this, "ui-tabs-destroy") ? t(this).remove() : t(this).removeAttr("role tabIndex aria-live aria-busy aria-selected aria-labelledby aria-hidden aria-expanded") }), this.tabs.each(function () { var e = t(this), i = e.data("ui-tabs-aria-controls"); i ? e.attr("aria-controls", i).removeData("ui-tabs-aria-controls") : e.removeAttr("aria-controls") }), this.panels.show(), "content" !== this.options.heightStyle && this.panels.css("height", "") }, enable: function (e) { var i = this.options.disabled; i !== !1 && (void 0 === e ? i = !1 : (e = this._getIndex(e), i = t.isArray(i) ? t.map(i, function (t) { return t !== e ? t : null }) : t.map(this.tabs, function (t, i) { return i !== e ? i : null })), this._setOptionDisabled(i)) }, disable: function (e) { var i = this.options.disabled; if (i !== !0) { if (void 0 === e) i = !0; else { if (e = this._getIndex(e), -1 !== t.inArray(e, i)) return; i = t.isArray(i) ? t.merge([e], i).sort() : [e] } this._setOptionDisabled(i) } }, load: function (e, i) { e = this._getIndex(e); var s = this, n = this.tabs.eq(e), o = n.find(".ui-tabs-anchor"), a = this._getPanelForTab(n), r = { tab: n, panel: a }, l = function (t, e) { "abort" === e && s.panels.stop(!1, !0), s._removeClass(n, "ui-tabs-loading"), a.removeAttr("aria-busy"), t === s.xhr && delete s.xhr }; this._isLocal(o[0]) || (this.xhr = t.ajax(this._ajaxSettings(o, i, r)), this.xhr && "canceled" !== this.xhr.statusText && (this._addClass(n, "ui-tabs-loading"), a.attr("aria-busy", "true"), this.xhr.done(function (t, e, n) { setTimeout(function () { a.html(t), s._trigger("load", i, r), l(n, e) }, 1) }).fail(function (t, e) { setTimeout(function () { l(t, e) }, 1) }))) }, _ajaxSettings: function (e, i, s) { var n = this; return { url: e.attr("href").replace(/#.*$/, ""), beforeSend: function (e, o) { return n._trigger("beforeLoad", i, t.extend({ jqXHR: e, ajaxSettings: o }, s)) } } }, _getPanelForTab: function (e) { var i = t(e).attr("aria-controls"); return this.element.find(this._sanitizeSelector("#" + i)) } }), t.uiBackCompat !== !1 && t.widget("ui.tabs", t.ui.tabs, { _processTabs: function () { this._superApply(arguments), this._addClass(this.tabs, "ui-tab") } }), t.ui.tabs, t.widget("ui.tooltip", {
58        version: "1.12.1", options: { classes: { "ui-tooltip": "ui-corner-all ui-widget-shadow" }, content: function () { var e = t(this).attr("title") || ""; return t("<a>").text(e).html() }, hide: !0, items: "[title]:not([disabled])", position: { my: "left top+15", at: "left bottom", collision: "flipfit flip" }, show: !0, track: !1, close: null, open: null }, _addDescribedBy: function (e, i) { var s = (e.attr("aria-describedby") || "").split(/\s+/); s.push(i), e.data("ui-tooltip-id", i).attr("aria-describedby", t.trim(s.join(" "))) }, _removeDescribedBy: function (e) { var i = e.data("ui-tooltip-id"), s = (e.attr("aria-describedby") || "").split(/\s+/), n = t.inArray(i, s); -1 !== n && s.splice(n, 1), e.removeData("ui-tooltip-id"), s = t.trim(s.join(" ")), s ? e.attr("aria-describedby", s) : e.removeAttr("aria-describedby") }
vendor: 36,863 bytes, lines 58-105
58, _create: function () { this._on({ mouseover: "open", focusin: "open" }), this.tooltips = {}, this.parents = {}, this.liveRegion = t("<div>").attr({ role: "log", "aria-live": "assertive", "aria-relevant": "additions" }).appendTo(this.document[0].body), this._addClass(this.liveRegion, null, "ui-helper-hidden-accessible"), this.disabledTitles = t([]) }, _setOption: function (e, i) { var s = this; this._super(e, i), "content" === e && t.each(this.tooltips, function (t, e) { s._updateContent(e.element) }) }, _setOptionDisabled: function (t) { this[t ? "_disable" : "_enable"]() }, _disable: function () { var e = this; t.each(this.tooltips, function (i, s) { var n = t.Event("blur"); n.target = n.currentTarget = s.element[0], e.close(n, !0) }), this.disabledTitles = this.disabledTitles.add(this.element.find(this.options.items).addBack().filter(function () { var e = t(this); return e.is("[title]") ? e.data("ui-tooltip-title", e.attr("title")).removeAttr("title") : void 0 })) }, _enable: function () { this.disabledTitles.each(function () { var e = t(this); e.data("ui-tooltip-title") && e.attr("title", e.data("ui-tooltip-title")) }), this.disabledTitles = t([]) }, open: function (e) { var i = this, s = t(e ? e.target : this.element).closest(this.options.items); s.length && !s.data("ui-tooltip-id") && (s.attr("title") && s.data("ui-tooltip-title", s.attr("title")), s.data("ui-tooltip-open", !0), e && "mouseover" === e.type && s.parents().each(function () { var e, s = t(this); s.data("ui-tooltip-open") && (e = t.Event("blur"), e.target = e.currentTarget = this, i.close(e, !0)), s.attr("title") && (s.uniqueId(), i.parents[this.id] = { element: this, title: s.attr("title") }, s.attr("title", "")) }), this._registerCloseHandlers(e, s), this._updateContent(s, e)) }, _updateContent: function (t, e) { var i, s = this.options.content, n = this, o = e ? e.type : null; return "string" == typeof s || s.nodeType || s.jquery ? this._open(e, t, s) : (i = s.call(t[0], function (i) { n._delay(function () { t.data("ui-tooltip-open") && (e && (e.type = o), this._open(e, t, i)) }) }), i && this._open(e, t, i), void 0) }, _open: function (e, i, s) { function n(t) { h.of = t, a.is(":hidden") || a.position(h) } var o, a, r, l, h = t.extend({}, this.options.position); if (s) { if (o = this._find(i)) return o.tooltip.find(".ui-tooltip-content").html(s), void 0; i.is("[title]") && (e && "mouseover" === e.type ? i.attr("title", "") : i.removeAttr("title")), o = this._tooltip(i), a = o.tooltip, this._addDescribedBy(i, a.attr("id")), a.find(".ui-tooltip-content").html(s), this.liveRegion.children().hide(), l = t("<div>").html(a.find(".ui-tooltip-content").html()), l.removeAttr("name").find("[name]").removeAttr("name"), l.removeAttr("id").find("[id]").removeAttr("id"), l.appendTo(this.liveRegion), this.options.track && e && /^mouse/.test(e.type) ? (this._on(this.document, { mousemove: n }), n(e)) : a.position(t.extend({ of: i }, this.options.position)), a.hide(), this._show(a, this.options.show), this.options.track && this.options.show && this.options.show.delay && (r = this.delayedShow = setInterval(function () { a.is(":visible") && (n(h.of), clearInterval(r)) }, t.fx.interval)), this._trigger("open", e, { tooltip: a }) } }, _registerCloseHandlers: function (e, i) { var s = { keyup: function (e) { if (e.keyCode === t.ui.keyCode.ESCAPE) { var s = t.Event(e); s.currentTarget = i[0], this.close(s, !0) } } }; i[0] !== this.element[0] && (s.remove = function () { this._removeTooltip(this._find(i).tooltip) }), e && "mouseover" !== e.type || (s.mouseleave = "close"), e && "focusin" !== e.type || (s.focusout = "close"), this._on(!0, i, s) }, close: function (e) {
59            var i, s = this, n = t(e ? e.currentTarget : this.element), o = this._find(n); return o ? (i = o.tooltip, o.closing || (clearInterval(this.delayedShow), n.data("ui-tooltip-title") && !n.attr("title") && n.attr("title", n.data("ui-tooltip-title")), this._removeDescribedBy(n), o.hiding = !0, i.stop(!0), this._hide(i, this.options.hide, function () { s._removeTooltip(t(this)) }), 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"), e && "mouseleave" === e.type && t.each(this.parents, function (e, i) {
60                t(i.element).attr("title", i.title), delete s.parents[e]
61            }), o.closing = !0, this._trigger("close", e, { tooltip: i }), o.hiding || (o.closing = !1)), void 0) : (n.removeData("ui-tooltip-open"), void 0)
62        }, _tooltip: function (e) { var i = t("<div>").attr("role", "tooltip"), s = t("<div>").appendTo(i), n = i.uniqueId().attr("id"); return this._addClass(s, "ui-tooltip-content"), this._addClass(i, "ui-tooltip", "ui-widget ui-widget-content"), i.appendTo(this._appendTo(e)), this.tooltips[n] = { element: e, tooltip: i } }, _find: function (t) { var e = t.data("ui-tooltip-id"); return e ? this.tooltips[e] : null }, _removeTooltip: function (t) { t.remove(), delete this.tooltips[t.attr("id")] }, _appendTo: function (t) { var e = t.closest(".ui-front, dialog"); return e.length || (e = this.document[0].body), e }, _destroy: function () { var e = this; t.each(this.tooltips, function (i, s) { var n = t.Event("blur"), o = s.element; n.target = n.currentTarget = o[0], e.close(n, !0), t("#" + i).remove(), o.data("ui-tooltip-title") && (o.attr("title") || o.attr("title", o.data("ui-tooltip-title")), o.removeData("ui-tooltip-title")) }), this.liveRegion.remove() }
63    }), t.uiBackCompat !== !1 && t.widget("ui.tooltip", t.ui.tooltip, { options: { tooltipClass: null }, _tooltip: function () { var t = this._superApply(arguments); return this.options.tooltipClass && t.tooltip.addClass(this.options.tooltipClass), t } }), t.ui.tooltip; var f = "ui-effects-", g = "ui-effects-style", m = "ui-effects-animated", _ = t; t.effects = { effect: {} }, function (t, e) { function i(t, e, i) { var s = u[e.type] || {}; return null == t ? i || !e.def ? null : e.def : (t = s.floor ? ~~t : parseFloat(t), isNaN(t) ? e.def : s.mod ? (t + s.mod) % s.mod : 0 > t ? 0 : t > s.max ? s.max : t) } function s(i) { var s = h(), n = s._rgba = []; return i = i.toLowerCase(), f(l, function (t, o) { var a, r = o.re.exec(i), l = r && o.parse(r), h = o.space || "rgba"; return l ? (a = s[h](l), s[c[h].cache] = a[c[h].cache], n = s._rgba = a._rgba, !1) : e }), n.length ? ("0,0,0,0" === n.join() && t.extend(n, o.transparent), s) : o[i] } function n(t, e, i) { return i = (i + 1) % 1, 1 > 6 * i ? t + 6 * (e - t) * i : 1 > 2 * i ? e : 2 > 3 * i ? t + 6 * (e - t) * (2 / 3 - i) : t } var o, a = "backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor", r = /^([\-+])=\s*(\d+\.?\d*)/, l = [{ re: /rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/, parse: function (t) { return [t[1], t[2], t[3], t[4]] } }, { re: /rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/, parse: function (t) { return [2.55 * t[1], 2.55 * t[2], 2.55 * t[3], t[4]] } }, { re: /#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/, parse: function (t) { return [parseInt(t[1], 16), parseInt(t[2], 16), parseInt(t[3], 16)] } }, { re: /#([a-f0-9])([a-f0-9])([a-f0-9])/, parse: function (t) { return [parseInt(t[1] + t[1], 16), parseInt(t[2] + t[2], 16), parseInt(t[3] + t[3], 16)] } }, { re: /hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/, space: "hsla", parse: function (t) { return [t[1], t[2] / 100, t[3] / 100, t[4]] } }], h = t.Color = function (e, i, s, n) { return new t.Color.fn.parse(e, i, s, n) }, c = { rgba: { props: { red: { idx: 0, type: "byte" }, green: { idx: 1, type: "byte" }, blue: { idx: 2, type: "byte" } } }, hsla: { props: { hue: { idx: 0, type: "degrees" }, saturation: { idx: 1, type: "percent" }, lightness: { idx: 2, type: "percent" } } } }, u = { "byte": { floor: !0, max: 255 }, percent: { max: 1 }, degrees: { mod: 360, floor: !0 } }, d = h.support = {}, p = t("<p>")[0], f = t.each; p.style.cssText = "background-color:rgba(1,1,1,.5)", d.rgba = p.style.backgroundColor.indexOf("rgba") > -1, f(c, function (t, e) { e.cache = "_" + t, e.props.alpha = { idx: 3, type: "percent", def: 1 } }), h.fn = t.extend(h.prototype, { parse: function (n, a, r, l) { if (n === e) return this._rgba = [null, null, null, null], this; (n.jquery || n.nodeType) && (n = t(n).css(a), a = e); var u = this, d = t.type(n), p = this._rgba = []; return a !== e && (n = [n, a, r, l], d = "array"), "string" === d ? this.parse(s(n) || o._default) : "array" === d ? (f(c.rgba.props, function (t, e) { p[e.idx] = i(n[e.idx], e) }), this) : "object" === d ? (n instanceof h ? f(c, function (t, e) { n[e.cache] && (u[e.cache] = n[e.cache].slice()) }) : f(c, function (e, s) { var o = s.cache; f(s.props, function (t, e) { if (!u[o] && s.to) { if ("alpha" === t || null == n[t]) return; u[o] = s.to(u._rgba) } u[o][e.idx] = i(n[t], e, !0) }), u[o] && 0 > t.inArray(null, u[o].slice(0, 3)) && (u[o][3] = 1, s.from && (u._rgba = s.from(u[o]))) }), this) : e }, is: function (t) { var i = h(t), s = !0, n = this; return f(c, function (t, o) { var a, r = i[o.cache]; return r && (a = n[o.cache] || o.to && o.to(n._rgba) || [], f(o.props, function (t, i) { return null != r[i.idx] ? s = r[i.idx] === a[i.idx] : e })), s }), s }, _space: function () { var t = [], e = this; return f(c, function (i, s) { e[s.cache] && t.push(i) }), t.pop() }, transition: function (t, e) { var s = h(t), n = s._space(), o = c[n], a = 0 === this.alpha() ? h("transparent") : this, r = a[o.cache] || o.to(a._rgba), l = r.slice(); return s = s[o.cache], f(o.props, function (t, n) { var o = n.idx, a = r[o], h = s[o], c = u[n.type] || {}; null !== h && (null === a ? l[o] = h : (c.mod && (h - a > c.mod / 2 ? a += c.mod : a - h > c.mod / 2 && (a -= c.mod)), l[o] = i((h - a) * e + a, n))) }), this[n](l) }, blend: function (e) { if (1 === this._rgba[3]) return this; var i = this._rgba.slice(), s = i.pop(), n = h(e)._rgba; return h(t.map(i, function (t, e) { return (1 - s) * n[e] + s * t })) }, toRgbaString: function () { var e = "rgba(", i = t.map(this._rgba, function (t, e) { return null == t ? e > 2 ? 1 : 0 : t }); return 1 === i[3] && (i.pop(), e = "rgb("), e + i.join() + ")" }, toHslaString: function () { var e = "hsla(", i = t.map(this.hsla(), function (t, e) { return null == t && (t = e > 2 ? 1 : 0), e && 3 > e && (t = Math.round(100 * t) + "%"), t }); return 1 === i[3] && (i.pop(), e = "hsl("), e + i.join() + ")" }, toHexString: function (e) { var i = this._rgba.slice(), s = i.pop(); return e && i.push(~~(255 * s)), "#" + t.map(i, function (t) { return t = (t || 0).toString(16), 1 === t.length ? "0" + t : t }).join("") }, toString: function () { return 0 === this._rgba[3] ? "transparent" : this.toRgbaString() } }), h.fn.parse.prototype = h.fn, c.hsla.to = function (t) { if (null == t[0] || null == t[1] || null == t[2]) return [null, null, null, t[3]]; var e, i, s = t[0] / 255, n = t[1] / 255, o = t[2] / 255, a = t[3], r = Math.max(s, n, o), l = Math.min(s, n, o), h = r - l, c = r + l, u = .5 * c; return e = l === r ? 0 : s === r ? 60 * (n - o) / h + 360 : n === r ? 60 * (o - s) / h + 120 : 60 * (s - n) / h + 240, i = 0 === h ? 0 : .5 >= u ? h / c : h / (2 - c), [Math.round(e) % 360, i, u, null == a ? 1 : a] }, c.hsla.from = function (t) { if (null == t[0] || null == t[1] || null == t[2]) return [null, null, null, t[3]]; var e = t[0] / 360, i = t[1], s = t[2], o = t[3], a = .5 >= s ? s * (1 + i) : s + i - s * i, r = 2 * s - a; return [Math.round(255 * n(r, a, e + 1 / 3)), Math.round(255 * n(r, a, e)), Math.round(255 * n(r, a, e - 1 / 3)), o] }, f(c, function (s, n) { var o = n.props, a = n.cache, l = n.to, c = n.from; h.fn[s] = function (s) { if (l && !this[a] && (this[a] = l(this._rgba)), s === e) return this[a].slice(); var n, r = t.type(s), u = "array" === r || "object" === r ? s : arguments, d = this[a].slice(); return f(o, function (t, e) { var s = u["object" === r ? t : e.idx]; null == s && (s = d[e.idx]), d[e.idx] = i(s, e) }), c ? (n = h(c(d)), n[a] = d, n) : h(d) }, f(o, function (e, i) { h.fn[e] || (h.fn[e] = function (n) { var o, a = t.type(n), l = "alpha" === e ? this._hsla ? "hsla" : "rgba" : s, h = this[l](), c = h[i.idx]; return "undefined" === a ? c : ("function" === a && (n = n.call(this, c), a = t.type(n)), null == n && i.empty ? this : ("string" === a && (o = r.exec(n), o && (n = c + parseFloat(o[2]) * ("+" === o[1] ? 1 : -1))), h[i.idx] = n, this[l](h))) }) }) }), h.hook = function (e) { var i = e.split(" "); f(i, function (e, i) { t.cssHooks[i] = { set: function (e, n) { var o, a, r = ""; if ("transparent" !== n && ("string" !== t.type(n) || (o = s(n)))) { if (n = h(o || n), !d.rgba && 1 !== n._rgba[3]) { for (a = "backgroundColor" === i ? e.parentNode : e; ("" === r || "transparent" === r) && a && a.style;)try { r = t.css(a, "backgroundColor"), a = a.parentNode } catch (l) { } n = n.blend(r && "transparent" !== r ? r : "_default") } n = n.toRgbaString() } try { e.style[i] = n } catch (l) { } } }, t.fx.step[i] = function (e) { e.colorInit || (e.start = h(e.elem, i), e.end = h(e.end), e.colorInit = !0), t.cssHooks[i].set(e.elem, e.start.transition(e.end, e.pos)) } }) }, h.hook(a), t.cssHooks.borderColor = { expand: function (t) { var e = {}; return f(["Top", "Right", "Bottom", "Left"], function (i, s) { e["border" + s + "Color"] = t }), e } }, o = t.Color.names = { aqua: "#00ffff", black: "#000000", blue: "#0000ff", fuchsia: "#ff00ff", gray: "#808080", green: "#008000", lime: "#00ff00", maroon: "#800000", navy: "#000080", olive: "#808000", purple: "#800080", red: "#ff0000", silver: "#c0c0c0", teal: "#008080", white: "#ffffff", yellow: "#ffff00", transparent: [null, null, null, 0], _default: "#ffffff" } }(_), function () { function e(e) { var i, s, n = e.ownerDocument.defaultView ? e.ownerDocument.defaultView.getComputedStyle(e, null) : e.currentStyle, o = {}; if (n && n.length && n[0] && n[n[0]]) for (s = n.length; s--;)i = n[s], "string" == typeof n[i] && (o[t.camelCase(i)] = n[i]); else for (i in n) "string" == typeof n[i] && (o[i] = n[i]); return o } function i(e, i) { var s, o, a = {}; for (s in i) o = i[s], e[s] !== o && (n[s] || (t.fx.step[s] || !isNaN(parseFloat(o))) && (a[s] = o)); return a } var s = ["add", "remove", "toggle"], n = { border: 1, borderBottom: 1, borderColor: 1, borderLeft: 1, borderRight: 1, borderTop: 1, borderWidth: 1, margin: 1, padding: 1 }; t.each(["borderLeftStyle", "borderRightStyle", "borderBottomStyle", "borderTopStyle"], function (e, i) { t.fx.step[i] = function (t) { ("none" !== t.end && !t.setAttr || 1 === t.pos && !t.setAttr) && (_.style(t.elem, i, t.end), t.setAttr = !0) } }), t.fn.addBack || (t.fn.addBack = function (t) { return this.add(null == t ? this.prevObject : this.prevObject.filter(t)) }), t.effects.animateClass = function (n, o, a, r) { var l = t.speed(o, a, r); return this.queue(function () { var o, a = t(this), r = a.attr("class") || "", h = l.children ? a.find("*").addBack() : a; h = h.map(function () { var i = t(this); return { el: i, start: e(this) } }), o = function () { t.each(s, function (t, e) { n[e] && a[e + "Class"](n[e]) }) }, o(), h = h.map(function () { return this.end = e(this.el[0]), this.diff = i(this.start, this.end), this }), a.attr("class", r), h = h.map(function () { var e = this, i = t.Deferred(), s = t.extend({}, l, { queue: !1, complete: function () { i.resolve(e) } }); return this.el.animate(this.diff, s), i.promise() }), t.when.apply(t, h.get()).done(function () { o(), t.each(arguments, function () { var e = this.el; t.each(this.diff, function (t) { e.css(t, "") }) }), l.complete.call(a[0]) }) }) }, t.fn.extend({ addClass: function (e) { return function (i, s, n, o) { return s ? t.effects.animateClass.call(this, { add: i }, s, n, o) : e.apply(this, arguments) } }(t.fn.addClass), removeClass: function (e) { return function (i, s, n, o) { return arguments.length > 1 ? t.effects.animateClass.call(this, { remove: i }, s, n, o) : e.apply(this, arguments) } }(t.fn.removeClass), toggleClass: function (e) { return function (i, s, n, o, a) { return "boolean" == typeof s || void 0 === s ? n ? t.effects.animateClass.call(this, s ? { add: i } : { remove: i }, n, o, a) : e.apply(this, arguments) : t.effects.animateClass.call(this, { toggle: i }, s, n, o) } }(t.fn.toggleClass), switchClass: function (e, i, s, n, o) { return t.effects.animateClass.call(this, { add: i, remove: e }, s, n, o) } }) }(), function () { function e(e, i, s, n) { return t.isPlainObject(e) && (i = e, e = e.effect), e = { effect: e }, null == i && (i = {}), t.isFunction(i) && (n = i, s = null, i = {}), ("number" == typeof i || t.fx.speeds[i]) && (n = s, s = i, i = {}), t.isFunction(s) && (n = s, s = null), i && t.extend(e, i), s = s || i.duration, e.duration = t.fx.off ? 0 : "number" == typeof s ? s : s in t.fx.speeds ? t.fx.speeds[s] : t.fx.speeds._default, e.complete = n || i.complete, e } function i(e) { return !e || "number" == typeof e || t.fx.speeds[e] ? !0 : "string" != typeof e || t.effects.effect[e] ? t.isFunction(e) ? !0 : "object" != typeof e || e.effect ? !1 : !0 : !0 } function s(t, e) { var i = e.outerWidth(), s = e.outerHeight(), n = /^rect\((-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto)\)$/, o = n.exec(t) || ["", 0, i, s, 0]; return { top: parseFloat(o[1]) || 0, right: "auto" === o[2] ? i : parseFloat(o[2]), bottom: "auto" === o[3] ? s : parseFloat(o[3]), left: parseFloat(o[4]) || 0 } } t.expr && t.expr.filters && t.expr.filters.animated && (t.expr.filters.animated = function (e) { return function (i) { return !!t(i).data(m) || e(i) } }(t.expr.filters.animated)), t.uiBackCompat !== !1 && t.extend(t.effects, { save: function (t, e) { for (var i = 0, s = e.length; s > i; i++)null !== e[i] && t.data(f + e[i], t[0].style[e[i]]) }, restore: function (t, e) { for (var i, s = 0, n = e.length; n > s; s++)null !== e[s] && (i = t.data(f + e[s]), t.css(e[s], i)) }, setMode: function (t, e) { return "toggle" === e && (e = t.is(":hidden") ? "show" : "hide"), e }, createWrapper: function (e) { if (e.parent().is(".ui-effects-wrapper")) return e.parent(); var i = { width: e.outerWidth(!0), height: e.outerHeight(!0), "float": e.css("float") }, s = t("<div></div>").addClass("ui-effects-wrapper").css({ fontSize: "100%", background: "transparent", border: "none", margin: 0, padding: 0 }), n = { width: e.width(), height: e.height() }, o = document.activeElement; try { o.id } catch (a) { o = document.body } return e.wrap(s), (e[0] === o || t.contains(e[0], o)) && t(o).trigger("focus"), s = e.parent(), "static" === e.css("position") ? (s.css({ position: "relative" }), e.css({ position: "relative" })) : (t.extend(i, { position: e.css("position"), zIndex: e.css("z-index") }), t.each(["top", "left", "bottom", "right"], function (t, s) { i[s] = e.css(s), isNaN(parseInt(i[s], 10)) && (i[s] = "auto") }), e.css({ position: "relative", top: 0, left: 0, right: "auto", bottom: "auto" })), e.css(n), s.css(i).show() }, removeWrapper: function (e) { var i = document.activeElement; return e.parent().is(".ui-effects-wrapper") && (e.parent().replaceWith(e), (e[0] === i || t.contains(e[0], i)) && t(i).trigger("focus")), e } }), t.extend(t.effects, { version: "1.12.1", define: function (e, i, s) { return s || (s = i, i = "effect"), t.effects.effect[e] = s, t.effects.effect[e].mode = i, s }, scaledDimensions: function (t, e, i) { if (0 === e) return { height: 0, width: 0, outerHeight: 0, outerWidth: 0 }; var s = "horizontal" !== i ? (e || 100) / 100 : 1, n = "vertical" !== i ? (e || 100) / 100 : 1; return { height: t.height() * n, width: t.width() * s, outerHeight: t.outerHeight() * n, outerWidth: t.outerWidth() * s } }, clipToBox: function (t) { return { width: t.clip.right - t.clip.left, height: t.clip.bottom - t.clip.top, left: t.clip.left, top: t.clip.top } }, unshift: function (t, e, i) { var s = t.queue(); e > 1 && s.splice.apply(s, [1, 0].concat(s.splice(e, i))), t.dequeue() }, saveStyle: function (t) { t.data(g, t[0].style.cssText) }, restoreStyle: function (t) { t[0].style.cssText = t.data(g) || "", t.removeData(g) }, mode: function (t, e) { var i = t.is(":hidden"); return "toggle" === e && (e = i ? "show" : "hide"), (i ? "hide" === e : "show" === e) && (e = "none"), e }, getBaseline: function (t, e) { var i, s; switch (t[0]) { case "top": i = 0; break; case "middle": i = .5; break; case "bottom": i = 1; break; default: i = t[0] / e.height }switch (t[1]) { case "left": s = 0; break; case "center": s = .5; break; case "right": s = 1; break; default: s = t[1] / e.width }return { x: s, y: i } }, createPlaceholder: function (e) { var i, s = e.css("position"), n = e.position(); return e.css({ marginTop: e.css("marginTop"), marginBottom: e.css("marginBottom"), marginLeft: e.css("marginLeft"), marginRight: e.css("marginRight") }).outerWidth(e.outerWidth()).outerHeight(e.outerHeight()), /^(static|relative)/.test(s) && (s = "absolute", i = t("<" + e[0].nodeName + ">").insertAfter(e).css({ display: /^(inline|ruby)/.test(e.css("display")) ? "inline-block" : "block", visibility: "hidden", marginTop: e.css("marginTop"), marginBottom: e.css("marginBottom"), marginLeft: e.css("marginLeft"), marginRight: e.css("marginRight"), "float": e.css("float") }).outerWidth(e.outerWidth()).outerHeight(e.outerHeight()).addClass("ui-effects-placeholder"), e.data(f + "placeholder", i)), e.css({ position: s, left: n.left, top: n.top }), i }, removePlaceholder: function (t) { var e = f + "placeholder", i = t.data(e); i && (i.remove(), t.removeData(e)) }, cleanUp: function (e) { t.effects.restoreStyle(e), t.effects.removePlaceholder(e) }, setTransition: function (e, i, s, n) { return n = n || {}, t.each(i, function (t, i) { var o = e.cssUnit(i); o[0] > 0 && (n[i] = o[0] * s + o[1]) }), n } }), t.fn.extend({ effect: function () { function i(e) { function i() { r.removeData(m), t.effects.cleanUp(r), "hide" === s.mode && r.hide(), a() } function a() { t.isFunction(l) && l.call(r[0]), t.isFunction(e) && e() } var r = t(this); s.mode = c.shift(), t.uiBackCompat === !1 || o ? "none" === s.mode ? (r[h](), a()) : n.call(r[0], s, i) : (r.is(":hidden") ? "hide" === h : "show" === h) ? (r[h](), a()) : n.call(r[0], s, a) } var s = e.apply(this, arguments), n = t.effects.effect[s.effect], o = n.mode, a = s.queue, r = a || "fx", l = s.complete, h = s.mode, c = [], u = function (e) { var i = t(this), s = t.effects.mode(i, h) || o; i.data(m, !0), c.push(s), o && ("show" === s || s === o && "hide" === s) && i.show(), o && "none" === s || t.effects.saveStyle(i), t.isFunction(e) && e() }; return t.fx.off || !n ? h ? this[h](s.duration, l) : this.each(function () { l && l.call(this) }) : a === !1 ? this.each(u).each(i) : this.queue(r, u).queue(r, i) }, show: function (t) { return function (s) { if (i(s)) return t.apply(this, arguments); var n = e.apply(this, arguments); return n.mode = "show", this.effect.call(this, n) } }(t.fn.show), hide: function (t) { return function (s) { if (i(s)) return t.apply(this, arguments); var n = e.apply(this, arguments); return n.mode = "hide", this.effect.call(this, n) } }(t.fn.hide), toggle: function (t) { return function (s) { if (i(s) || "boolean" == typeof s) return t.apply(this, arguments); var n = e.apply(this, arguments); return n.mode = "toggle", this.effect.call(this, n) } }(t.fn.toggle), cssUnit: function (e) { var i = this.css(e), s = []; return t.each(["em", "px", "%", "pt"], function (t, e) { i.indexOf(e) > 0 && (s = [parseFloat(i), e]) }), s }, cssClip: function (t) { return t ? this.css("clip", "rect(" + t.top + "px " + t.right + "px " + t.bottom + "px " + t.left + "px)") : s(this.css("clip"), this) }, transfer: function (e, i) { var s = t(this), n = t(e.to), o = "fixed" === n.css("position"), a = t("body"), r = o ? a.scrollTop() : 0, l = o ? a.scrollLeft() : 0, h = n.offset(), c = { top: h.top - r, left: h.left - l, height: n.innerHeight(), width: n.innerWidth() }, u = s.offset(), d = t("<div class='ui-effects-transfer'></div>").appendTo("body").addClass(e.className).css({ top: u.top - r, left: u.left - l, height: s.innerHeight(), width: s.innerWidth(), position: o ? "fixed" : "absolute" }).animate(c, e.duration, e.easing, function () { d.remove(), t.isFunction(i) && i() }) } }), t.fx.step.clip = function (e) { e.clipInit || (e.start = t(e.elem).cssClip(), "string" == typeof e.end && (e.end = s(e.end, e.elem)), e.clipInit = !0), t(e.elem).cssClip({ top: e.pos * (e.end.top - e.start.top) + e.start.top, right: e.pos * (e.end.right - e.start.right) + e.start.right, bottom: e.pos * (e.end.bottom - e.start.bottom) + e.start.bottom, left: e.pos * (e.end.left - e.start.left) + e.start.left }) } }(), function () { var e = {}; t.each(["Quad", "Cubic", "Quart", "Quint", "Expo"], function (t, i) { e[i] = function (e) { return Math.pow(e, t + 2) } }), t.extend(e, { Sine: function (t) { return 1 - Math.cos(t * Math.PI / 2) }, Circ: function (t) { return 1 - Math.sqrt(1 - t * t) }, Elastic: function (t) { return 0 === t || 1 === t ? t : -Math.pow(2, 8 * (t - 1)) * Math.sin((80 * (t - 1) - 7.5) * Math.PI / 15) }, Back: function (t) { return t * t * (3 * t - 2) }, Bounce: function (t) { for (var e, i = 4; ((e = Math.pow(2, --i)) - 1) / 11 > t;); return 1 / Math.pow(4, 3 - i) - 7.5625 * Math.pow((3 * e - 2) / 22 - t, 2) } }), t.each(e, function (e, i) { t.easing["easeIn" + e] = i, t.easing["easeOut" + e] = function (t) { return 1 - i(1 - t) }, t.easing["easeInOut" + e] = function (t) { return .5 > t ? i(2 * t) / 2 : 1 - i(-2 * t + 2) / 2 } }) }(); var v = t.effects; t.effects.define("blind", "hide", function (e, i) { var s = { up: ["bottom", "top"], vertical: ["bottom", "top"], down: ["top", "bottom"], left: ["right", "left"], horizontal: ["right", "left"], right: ["left", "right"] }, n = t(this), o = e.direction || "up", a = n.cssClip(), r = { clip: t.extend({}, a) }, l = t.effects.createPlaceholder(n); r.clip[s[o][0]] = r.clip[s[o][1]], "show" === e.mode && (n.cssClip(r.clip), l && l.css(t.effects.clipToBox(r)), r.clip = a), l && l.animate(t.effects.clipToBox(r), e.duration, e.easing), n.animate(r, { queue: !1, duration: e.duration, easing: e.easing, complete: i }) }), t.effects.define("bounce", function (e, i) { var s, n, o, a = t(this), r = e.mode, l = "hide" === r, h = "show" === r, c = e.direction || "up", u = e.distance, d = e.times || 5, p = 2 * d + (h || l ? 1 : 0), f = e.duration / p, g = e.easing, m = "up" === c || "down" === c ? "top" : "left", _ = "up" === c || "left" === c, v = 0, b = a.queue().length; for (t.effects.createPlaceholder(a), o = a.css(m), u || (u = a["top" === m ? "outerHeight" : "outerWidth"]() / 3), h && (n = { opacity: 1 }, n[m] = o, a.css("opacity", 0).css(m, _ ? 2 * -u : 2 * u).animate(n, f, g)), l && (u /= Math.pow(2, d - 1)), n = {}, n[m] = o; d > v; v++)s = {}, s[m] = (_ ? "-=" : "+=") + u, a.animate(s, f, g).animate(n, f, g), u = l ? 2 * u : u / 2; l && (s = { opacity: 0 }, s[m] = (_ ? "-=" : "+=") + u, a.animate(s, f, g)), a.queue(i), t.effects.unshift(a, b, p + 1) }), t.effects.define("clip", "hide", function (e, i) { var s, n = {}, o = t(this), a = e.direction || "vertical", r = "both" === a, l = r || "horizontal" === a, h = r || "vertical" === a; s = o.cssClip(), n.clip = { top: h ? (s.bottom - s.top) / 2 : s.top, right: l ? (s.right - s.left) / 2 : s.right, bottom: h ? (s.bottom - s.top) / 2 : s.bottom, left: l ? (s.right - s.left) / 2 : s.left }, t.effects.createPlaceholder(o), "show" === e.mode && (o.cssClip(n.clip), n.clip = s), o.animate(n, { queue: !1, duration: e.duration, easing: e.easing, complete: i }) }), t.effects.define("drop", "hide", function (e, i) { var s, n = t(this), o = e.mode, a = "show" === o, r = e.direction || "left", l = "up" === r || "down" === r ? "top" : "left", h = "up" === r || "left" === r ? "-=" : "+=", c = "+=" === h ? "-=" : "+=", u = { opacity: 0 }; t.effects.createPlaceholder(n), s = e.distance || n["top" === l ? "outerHeight" : "outerWidth"](!0) / 2, u[l] = h + s, a && (n.css(u), u[l] = c + s, u.opacity = 1), n.animate(u, { queue: !1, duration: e.duration, easing: e.easing, complete: i }) }), t.effects.define("explode", "hide", function (e, i) { function s() { b.push(this), b.length === u * d && n() } function n() { p.css({ visibility: "visible" }), t(b).remove(), i() } var o, a, r, l, h, c, u = e.pieces ? Math.round(Math.sqrt(e.pieces)) : 3, d = u, p = t(this), f = e.mode, g = "show" === f, m = p.show().css("visibility", "hidden").offset(), _ = Math.ceil(p.outerWidth() / d), v = Math.ceil(p.outerHeight() / u), b = []; for (o = 0; u > o; o++)for (l = m.top + o * v, c = o - (u - 1) / 2, a = 0; d > a; a++)r = m.left + a * _, h = a - (d - 1) / 2, p.clone().appendTo("body").wrap("<div></div>").css({ position: "absolute", visibility: "visible", left: -a * _, top: -o * v }).parent().addClass("ui-effects-explode").css({ position: "absolute", overflow: "hidden", width: _, height: v, left: r + (g ? h * _ : 0), top: l + (g ? c * v : 0), opacity: g ? 0 : 1 }).animate({ left: r + (g ? 0 : h * _), top: l + (g ? 0 : c * v), opacity: g ? 1 : 0 }, e.duration || 500, e.easing, s) }), t.effects.define("fade", "toggle", function (e, i) { var s = "show" === e.mode; t(this).css("opacity", s ? 0 : 1).animate({ opacity: s ? 1 : 0 }, { queue: !1, duration: e.duration, easing: e.easing, complete: i }) }), t.effects.define("fold", "hide", function (e, i) { var s = t(this), n = e.mode, o = "show" === n, a = "hide" === n, r = e.size || 15, l = /([0-9]+)%/.exec(r), h = !!e.horizFirst, c = h ? ["right", "bottom"] : ["bottom", "right"], u = e.duration / 2, d = t.effects.createPlaceholder(s), p = s.cssClip(), f = { clip: t.extend({}, p) }, g = { clip: t.extend({}, p) }, m = [p[c[0]], p[c[1]]], _ = s.queue().length; l && (r = parseInt(l[1], 10) / 100 * m[a ? 0 : 1]), f.clip[c[0]] = r, g.clip[c[0]] = r, g.clip[c[1]] = 0, o && (s.cssClip(g.clip), d && d.css(t.effects.clipToBox(g)), g.clip = p), s.queue(function (i) { d && d.animate(t.effects.clipToBox(f), u, e.easing).animate(t.effects.clipToBox(g), u, e.easing), i() }).animate(f, u, e.easing).animate(g, u, e.easing).queue(i), t.effects.unshift(s, _, 4) }), t.effects.define("highlight", "show", function (e, i) { var s = t(this), n = { backgroundColor: s.css("backgroundColor") }; "hide" === e.mode && (n.opacity = 0), t.effects.saveStyle(s), s.css({ backgroundImage: "none", backgroundColor: e.color || "#ffff99" }).animate(n, { queue: !1, duration: e.duration, easing: e.easing, complete: i }) }), t.effects.define("size", function (e, i) { var s, n, o, a = t(this), r = ["fontSize"], l = ["borderTopWidth", "borderBottomWidth", "paddingTop", "paddingBottom"], h = ["borderLeftWidth", "borderRightWidth", "paddingLeft", "paddingRight"], c = e.mode, u = "effect" !== c, d = e.scale || "both", p = e.origin || ["middle", "center"], f = a.css("position"), g = a.position(), m = t.effects.scaledDimensions(a), _ = e.from || m, v = e.to || t.effects.scaledDimensions(a, 0); t.effects.createPlaceholder(a), "show" === c && (o = _, _ = v, v = o), n = { from: { y: _.height / m.height, x: _.width / m.width }, to: { y: v.height / m.height, x: v.width / m.width } }, ("box" === d || "both" === d) && (n.from.y !== n.to.y && (_ = t.effects.setTransition(a, l, n.from.y, _), v = t.effects.setTransition(a, l, n.to.y, v)), n.from.x !== n.to.x && (_ = t.effects.setTransition(a, h, n.from.x, _), v = t.effects.setTransition(a, h, n.to.x, v))), ("content" === d || "both" === d) && n.from.y !== n.to.y && (_ = t.effects.setTransition(a, r, n.from.y, _), v = t.effects.setTransition(a, r, n.to.y, v)), p && (s = t.effects.getBaseline(p, m), _.top = (m.outerHeight - _.outerHeight) * s.y + g.top, _.left = (m.outerWidth - _.outerWidth) * s.x + g.left, v.top = (m.outerHeight - v.outerHeight) * s.y + g.top, v.left = (m.outerWidth - v.outerWidth) * s.x + g.left), a.css(_), ("content" === d || "both" === d) && (l = l.concat(["marginTop", "marginBottom"]).concat(r), h = h.concat(["marginLeft", "marginRight"]), a.find("*[width]").each(function () { var i = t(this), s = t.effects.scaledDimensions(i), o = { height: s.height * n.from.y, width: s.width * n.from.x, outerHeight: s.outerHeight * n.from.y, outerWidth: s.outerWidth * n.from.x }, a = { height: s.height * n.to.y, width: s.width * n.to.x, outerHeight: s.height * n.to.y, outerWidth: s.width * n.to.x }; n.from.y !== n.to.y && (o = t.effects.setTransition(i, l, n.from.y, o), a = t.effects.setTransition(i, l, n.to.y, a)), n.from.x !== n.to.x && (o = t.effects.setTransition(i, h, n.from.x, o), a = t.effects.setTransition(i, h, n.to.x, a)), u && t.effects.saveStyle(i), i.css(o), i.animate(a, e.duration, e.easing, function () { u && t.effects.restoreStyle(i) }) })), a.animate(v, { queue: !1, duration: e.duration, easing: e.easing, complete: function () { var e = a.offset(); 0 === v.opacity && a.css("opacity", _.opacity), u || (a.css("position", "static" === f ? "relative" : f).offset(e), t.effects.saveStyle(a)), i() } }) }), t.effects.define("scale", function (e, i) { var s = t(this), n = e.mode, o = parseInt(e.percent, 10) || (0 === parseInt(e.percent, 10) ? 0 : "effect" !== n ? 0 : 100), a = t.extend(!0, { from: t.effects.scaledDimensions(s), to: t.effects.scaledDimensions(s, o, e.direction || "both"), origin: e.origin || ["middle", "center"] }, e); e.fade && (a.from.opacity = 1, a.to.opacity = 0), t.effects.effect.size.call(this, a, i) }), t.effects.define("puff", "hide", function (e, i) { var s = t.extend(!0, {}, e, { fade: !0, percent: parseInt(e.percent, 10) || 150 }); t.effects.effect.scale.call(this, s, i) }), t.effects.define("pulsate", "show", function (e, i) { var s = t(this), n = e.mode, o = "show" === n, a = "hide" === n, r = o || a, l = 2 * (e.times || 5) + (r ? 1 : 0), h = e.duration / l, c = 0, u = 1, d = s.queue().length; for ((o || !s.is(":visible")) && (s.css("opacity", 0).show(), c = 1); l > u; u++)s.animate({ opacity: c }, h, e.easing), c = 1 - c; s.animate({ opacity: c }, h, e.easing), s.queue(i), t.effects.unshift(s, d, l + 1) }), t.effects.define("shake", function (e, i) { var s = 1, n = t(this), o = e.direction || "left", a = e.distance || 20, r = e.times || 3, l = 2 * r + 1, h = Math.round(e.duration / l), c = "up" === o || "down" === o ? "top" : "left", u = "up" === o || "left" === o, d = {}, p = {}, f = {}, g = n.queue().length; for (t.effects.createPlaceholder(n), d[c] = (u ? "-=" : "+=") + a, p[c] = (u ? "+=" : "-=") + 2 * a, f[c] = (u ? "-=" : "+=") + 2 * a, n.animate(d, h, e.easing); r > s; s++)n.animate(p, h, e.easing).animate(f, h, e.easing); n.animate(p, h, e.easing).animate(d, h / 2, e.easing).queue(i), t.effects.unshift(n, g, l + 1) }), t.effects.define("slide", "show", function (e, i) { var s, n, o = t(this), a = { up: ["bottom", "top"], down: ["top", "bottom"], left: ["right", "left"], right: ["left", "right"] }, r = e.mode, l = e.direction || "left", h = "up" === l || "down" === l ? "top" : "left", c = "up" === l || "left" === l, u = e.distance || o["top" === h ? "outerHeight" : "outerWidth"](!0), d = {}; t.effects.createPlaceholder(o), s = o.cssClip(), n = o.position()[h], d[h] = (c ? -1 : 1) * u + n, d.clip = o.cssClip(), d.clip[a[l][1]] = d.clip[a[l][0]], "show" === r && (o.cssClip(d.clip), o.css(h, d[h]), d.clip = s, d[h] = n), o.animate(d, { queue: !1, duration: e.duration, easing: e.easing, complete: i }) }); var v; t.uiBackCompat !== !1 && (v = t.effects.define("transfer", function (e, i) { t(this).transfer(e, i) }))
64});
65'use strict';
66// jquery.onscreen 2018-01-22 https://github.com/adaptlearning/jquery.onscreen
67
68(function () {
69
70    //ENUMERATION SUPPORT
71    function ENUM(e) { for (var i = 0, l = e.length; i < l; i++) { var n = e[i].toLowerCase(); this[n] = (new Number(i)); this[n].string = n; } }
72
73    //handler id generation
74    var expando = {
75        index: 0,
76
77        check: function (element) {
78            //check that the element has a valid jquery expando property, or make one
79
80            var hasExpando = (element[$.expando]);
81            if (hasExpando) return;
82
83            element[$.expando] = ++expando.index;
84
85        },
86
87        make: function (element, data) {
88            //make a unique event id from the element's expando property and the event handler guid
89
90            expando.check(element);
91            return data.guid + "-" + element[$.expando];
92
93        }
94    };
95
96    //handler functions
97    var handlers = {
98        //types definition
99        TYPE: new ENUM(["onscreen", "inview"]),
100        INVIEW_STATES: new ENUM(["none", "top", "bottom", "left", "right", "both"]),
101
102        registered: [],
103        shouldReProcess: true,
104
105        register: function (element, data, type) {
106            var isLocked = locking.isLocked();
107
108            var $element = $(element);
109            handlers.registered.push({
110                id: expando.make(element, data),
111                data: data,
112                $element: $element,
113                type: type,
114                _onscreen: isLocked ? null : measurements.get($element).uniqueMeasurementId,
115                _hasTriggered: false
116            });
117            handlers.shouldReProcess = true;
118
119        },
120
121        unregister: function (element, data, type) {
122
123            var registered = handlers.registered;
124
125            var findId = expando.make(element, data);
126            for (var i = registered.length - 1, l = -1; i > l; i--) {
127                var item = registered[i]
128                if (item.id != findId || item.type != type) continue;
129                registered.splice(i, 1);
130                handlers.shouldReProcess = true;
131            }
132
133        },
134
135        process: function () {
136
137            var registered = handlers.registered;
138            var registeredCount;
139
140            handlers.shouldReProcess = true;
141            while (handlers.shouldReProcess) {
142                handlers.shouldReProcess = false;
143
144                registeredCount = registered.length;
145                if (registeredCount == 0) return;
146
147                for (var i = 0; i < registeredCount; i++) {
148                    var item = registered[i];
149                    var measure = measurements.get(item.$element);
150
151                    //check if measure has the same values as last
152                    var wasPreviouslyMeasured = (item._onscreen !== undefined);
153
154                    if (wasPreviouslyMeasured && item._hasTriggered) {
155                        var hasMeasureChanged = (item._onscreen != measure.uniqueMeasurementId);
156                        if (!hasMeasureChanged) {
157                            continue;
158                        }
159                    }
160
161                    item._onscreen = measure.uniqueMeasurementId;
162                    item._hasTriggered = true;
163
164                    switch (item.type) {
165                        case handlers.TYPE.onscreen:
166                            handlers.processOnScreen(item, measure);
167                            break;
168                        case handlers.TYPE.inview:
169                            handlers.processInView(item, measure);
170                    }
171                    if (handlers.shouldReProcess) {
172                        break;
173                    }
174                }
175            }
176
177        },
178
179        processOnScreen: function (item, measure) {
180
181            item.$element.trigger('onscreen', measure);
182
183        },
184
185        processInView: function (item, measure) {
186
187            var isTopOnScreen = (measure.percentFromTop >= 0 && measure.percentFromTop <= 100);
188            var isBottomOnScreen = (measure.percentFromBottom >= 0 && measure.percentFromBottom <= 100);
189            var isLeftOnScreen = (measure.percentFromLeft >= 0 && measure.percentFromLeft <= 100);
190            var isRightOnScreen = (measure.percentFromRight >= 0 && measure.percentFromRight <= 100);
191
192            var visiblePartY;
193            if (isTopOnScreen && isBottomOnScreen) visiblePartY = handlers.INVIEW_STATES.both.string;
194            else if (isTopOnScreen) visiblePartY = handlers.INVIEW_STATES.top.string;
195            else if (isBottomOnScreen) visiblePartY = handlers.INVIEW_STATES.bottom.string;
196            else visiblePartY = handlers.INVIEW_STATES.none.string;
197
198            var visiblePartX;
199            if (isLeftOnScreen && isRightOnScreen) visiblePartX = handlers.INVIEW_STATES.both.string;
200            else if (isLeftOnScreen) visiblePartX = handlers.INVIEW_STATES.left.string;
201            else if (isRightOnScreen) visiblePartX = handlers.INVIEW_STATES.right.string;
202            else visiblePartX = handlers.INVIEW_STATES.none.string;
203
204            var inviewState = [
205                measure.onscreen, //inview true/false
206                visiblePartX, //left, right, both, none
207                visiblePartY //top, bottom, both, none
208            ];
209
210            item._inviewPreviousState = inviewState;
211            item._measurePreviousState = measure;
212
213            item.$element.trigger('inview', inviewState);
214
215        }
216    };
217
218    //checking loop management
219    var loop = {
220
221        lastStartEvent: 0,
222        timeoutHandle: null,
223        intervalDuration: 100,
224        hasRaf: false,
225
226        start: function () {
227
228            loop.lastStartEvent = (new Date()).getTime();
229            loop.repeat();
230
231        },
232
233        repeat: function () {
234
235            loop.stop();
236
237            if (loop.hasRaf) {
238                loop.timeoutHandle = requestAnimationFrame(loop.main);
239            } else {
240                loop.timeoutHandle = setTimeout(loop.main, loop.intervalDuration);
241            }
242
243        },
244
245        hasExpired: function () {
246
247            var timeSinceLast = (new Date()).getTime() - loop.lastStartEvent;
248            if (timeSinceLast < 1500) return;
249
250            loop.stop()
251            return true;
252        },
253
254        isThrottled: function () {
255            var passedTime = (new Date()).getTime() - loop.lastMain;
256            if (passedTime > loop.intervalDuration) return false;
257            return true;
258        },
259
260        lastMain: (new Date()).getTime(),
261
262        main: function () {
263
264            if (loop.isThrottled()) {
265                loop.repeat();
266                return;
267            }
268
269            loop.lastMain = (new Date()).getTime();
270
271            if (loop.hasExpired()) return;
272
273            if (handlers.registered.length == 0) {
274                //nothing to check
275                loop.stop();
276                //slow down to save cycles
277                loop.intervalDuration = 200;
278                loop.repeat();
279            } else {
280                //something to check
281                loop.stop();
282                //speed up to make more responsive
283                loop.intervalDuration = 100;
284                loop.repeat();
285            }
286
287            if (locking.isLocked()) return;
288
289            handlers.process();
290
291        },
292
293        stop: function () {
294
295            var intervalAttached = (loop.timeoutHandle !== null);
296            if (!intervalAttached) return;
297
298            if (loop.hasRaf) {
299                cancelAnimationFrame(loop.timeoutHandle);
300                loop.timeoutHandle = null;
301            } else {
302                clearTimeout(loop.timeoutHandle);
303                loop.timeoutHandle = null;
304            }
305
306        }
307
308    };
309
310    //jQuery element + event handler attachment / removal
311    $.extend($.event.special, {
312
313        onscreen: {
314
315            noBubble: true,
316
317            add: function (data) {
318                handlers.register(this, data, handlers.TYPE.onscreen);
319            },
320
321            remove: function (data) {
322                handlers.unregister(this, data, handlers.TYPE.onscreen);
323            }
324
325        },
326
327        inview: {
328
329            noBubble: true,
330
331            add: function (data) {
332                handlers.register(this, data, handlers.TYPE.inview);
333            },
334
335            remove: function (data) {
336                handlers.unregister(this, data, handlers.TYPE.inview);
337            }
338
339        }
340
341    });
342
343    //jQuery interfaces
344    //element functions
345    $.extend($.fn, {
346
347        onscreen: function onscreen(callback) {
348
349            if (callback) {
350                //standard event attachment jquery api behaviour
351                this.on("onscreen", callback);
352                return this;
353            }
354
355            return measurements.get(this);
356
357        },
358
359        inview: function inview(callback) {
360
361            if (callback) {
362                //standard event attachment jquery api behaviour
363                this.on("inview", callback);
364                return this;
365            }
366
367            return measurements.get(this);
368
369        }
370
371    });
372
373    //interface to allow for inview/onscreen to be disabled
374    var locking = {
375        locks: [],
376
377        lock: function (name) {
378
379            if (locking.isLocked(name)) return;
380            locking.locks.push(name);
381
382        },
383
384        unlock: function (name) {
385
386            if (!locking.isLocked(name)) return;
387
388            for (var i = 0, l = locking.locks.length; i < l; i++) {
389                var lock = locking.locks[i];
390                if (lock == name) {
391                    locking.locks.splice(i, 1);
392                    break;
393                }
394            }
395
396            loop.start();
397
398        },
399
400        isLocked: function (name) {
401
402            if (!name) return (locking.locks.length > 0);
403
404            for (var i = 0, l = locking.locks.length; i < l; i++) {
405                var lock = locking.locks[i];
406                if (lock == name) {
407                    return true;
408                }
409            }
410            return false;
411
412        }
413
414    };
415
416    var config = {
417
418        options: {},
419
420        config: function (options) {
421            if (typeof options !== "object") return;
422
423            $.extend(config.options, options);
424
425        }
426
427    };
428
429
430    //force an inview check - standard trigger event jquery api behaviour
431    $.inview = $.onscreen = function () {
432        loop.start();
433    };
434    //attach locking interface to $.inview.lock(name); etc
435    $.extend($.inview, locking, config);
436
437    //window size handlers
438    var wndw = {
439
440        $el: $(window),
441        height: null,
442        width: null,
443        heightRatio: null,
444        widthRatio: null,
445
446        resize: function () {
447            wndw.height = window.innerHeight || wndw.$el.height();
448            wndw.width = window.innerWidth || wndw.$el.width();
449            wndw.heightRatio = (100 / wndw.height);
450            wndw.widthRatio = (100 / wndw.width);
451            loop.start();
452        }
453
454    };
455
456    var measurements = {
457
458        featureDetect: function () {
459
460            loop.hasRaf = (window.requestAnimationFrame && window.cancelAnimationFrame);
461
462        },
463
464        get: function get($element) {
465
466            if ($element.length == 0) return;
467
468            var el = $element[0];
469            var offset;
470
471            try {
472                offset = el.getBoundingClientRect();
473            } catch (e) {
474                // IE11 throws an error if the element isn't present in the DOM
475                offset = { top: 0, right: 0, bottom: 0, left: 0, width: 0, height: 0 };
476            }
477
478            var height = offset.height;
479            var width = offset.width;
480
481            //topleft from topleft of window
482            var top = offset["top"];
483            var left = offset["left"];
484
485            //bottomright from bottomright of window
486            var bottom = wndw.height - (top + height);
487            var right = wndw.width - (left + width)
488
489            //percentages of above
490            var percentFromTop = Math.round(wndw.heightRatio * top);
491            var percentFromLeft = Math.round(wndw.widthRatio * left);
492            var percentFromBottom = Math.round(wndw.heightRatio * bottom);
493            var percentFromRight = Math.round(wndw.widthRatio * right);
494
495            //inview
496            var inviewHorizontal = null;
497            if (left + width > 0 && right < 0 && left < 0) {
498                inviewHorizontal = width;
499            } else if (left < 0) { //offscreen left
500                inviewHorizontal = (width + left);
501            } else if (left + width > wndw.width) { //offscreen right
502                inviewHorizontal = (wndw.width - left);
503            } else { //fully inscreen
504                inviewHorizontal = width;
505            }
506
507            var inviewVertical = null;
508            if (top + height > 0 && bottom < 0 && top < 0) {
509                inviewVertical = height;
510            } else if (top < 0) { //offscreen top
511                inviewVertical = (height + top);
512            } else if (top + height > wndw.height) { //offscreen bottom
513                inviewVertical = (wndw.height - top);
514            } else { //fully inscreen
515                inviewVertical = height;
516            }
517
518            // cap floor at 0 - cannot have negative inviews.
519            if (inviewVertical < 0) inviewVertical = 0;
520            if (inviewHorizontal < 0) inviewHorizontal = 0;
521
522            var percentInviewVertical = Math.round((100 / height) * inviewVertical);
523            var percentInviewHorizontal = Math.round((100 / width) * inviewHorizontal);
524
525            var elementArea = height * width;
526            var inviewArea = inviewVertical * inviewHorizontal;
527            var percentInview = Math.round((100 / elementArea) * inviewArea);
528
529            var onscreen = true;
530            var offScreenSide = (percentFromRight > 100 || percentFromLeft > 100 || percentFromBottom > 100 || percentFromTop > 100);
531            if (offScreenSide) onscreen = false;
532
533            var hasNoSize = (height <= 0 && width <= 0);
534            if (hasNoSize) onscreen = false;
535
536            var cssHidden = measurements.isElementHidden(el);
537            if (cssHidden) onscreen = false;
538
539            if (onscreen) {
540
541                // perform some extra checks to make sure item is onscreen
542                var parents = measurements.getParents(el);
543
544                // go through all the parents except the html tag
545                for (var i = 0, l = parents.length - 1; i < l; i++) {
546                    var parent = parents[i];
547
548                    cssHidden = measurements.isElementHidden(parent);
549
550                    // check if parents are visibility hidden or display none
551                    if (cssHidden) {
552                        onscreen = false;
553                        break;
554                    }
555
556                    // check if child is out of bounds inside its parent
557                    var isOutOfBounds = measurements.isOutOfBounds(el, parent)
558                    if (isOutOfBounds) {
559                        onscreen = false;
560                        break;
561                    }
562
563                }
564
565            }
566
567            var uniqueMeasurementId = "" + top + left + bottom + right + height + width + wndw.height + wndw.width + onscreen;
568
569            return {
570                top: top,
571                left: left,
572                bottom: bottom,
573                right: right,
574                percentFromTop: percentFromTop,
575                percentFromLeft: percentFromLeft,
576                percentFromBottom: percentFromBottom,
577                percentFromRight: percentFromRight,
578                percentInview: percentInview,
579                percentInviewHorizontal: percentInviewHorizontal,
580                percentInviewVertical: percentInviewVertical,
581                onscreen: onscreen,
582                uniqueMeasurementId: uniqueMeasurementId,
583                timestamp: (new Date()).getTime()
584            };
585
586        },
587
588        getParents: function (element) {
589            var parents = [];
590            var parent;
591            while (parent = element.parentElement) {
592                parents.push(parent);
593                element = parent;
594            }
595            return parents;
596        },
597
598        isElementHidden: function (element) {
599            var cssHidden = (element.style.display == "none" || element.style.visibility == "hidden");
600            if (cssHidden) return true;
601
602            var style = window.getComputedStyle(element, null);
603            cssHidden = (style.display == "none" || style.visibility == "hidden");
604            return cssHidden;
605        },
606
607        isOutOfBounds: function (element, parent) {
608
609            var isScrollWidthOverflowing = (parent.clientWidth < parent.scrollWidth);
610            var isScrollHeightOverflowing = (parent.clientHeight < parent.scrollHeight);
611            var isOverflowing = (isScrollWidthOverflowing || isScrollHeightOverflowing);
612
613            var $parent = $(parent);
614
615            if (!isOverflowing || ($parent.css("overflow") === "visible")) {
616                return false;
617            }
618
619            var $element = $(element);
620
621            var childPos = $element.offset();
622            var parentPos = $parent.offset();
623
624            var childOffsetTop = (childPos.top - parentPos.top);
625            var childOffsetLeft = (childPos.left - parentPos.left);
626            var childOffsetBottom = (childOffsetTop + element.clientHeight);
627            var childOffsetRight = (childOffsetLeft + element.clientWidth);
628
629            // check inclusive of bounding rectangle edges
630            var isOutOfBounds = (childOffsetTop >= parent.clientHeight
631                || childOffsetLeft >= parent.clientWidth
632                || childOffsetBottom <= 0
633                || childOffsetRight <= 0);
634
635            return isOutOfBounds;
636
637        }
638
639    };
640
641    //attach event handlers
642    $(window).on({
643        "touchmove scroll mousedown keydown": loop.start,
644        "resize": wndw.resize
645    });
646
647    $(measurements.featureDetect);
648    wndw.resize();
649
650})();
651/**
652* jquery-match-height 0.7.2 by @liabru
653* http://brm.io/jquery-match-height/
654* License: MIT
655*/
656
657; (function (factory) { // eslint-disable-line no-extra-semi
658    'use strict';
659    if (typeof define === 'function' && define.amd) {
660        // AMD
661        define(['jquery'], factory);
662    } else if (typeof module !== 'undefined' && module.exports) {
663        // CommonJS
664        module.exports = factory(require('jquery'));
665    } else {
666        // Global
667        factory(jQuery);
668    }
669})(function ($) {
670    /*
671    *  internal
672    */
673
674    var _previousResizeWidth = -1,
675        _updateTimeout = -1;
676
677    /*
678    *  _parse
679    *  value parse utility function
680    */
681
682    var _parse = function (value) {
683        // parse value and convert NaN to 0
684        return parseFloat(value) || 0;
685    };
686
687    /*
688    *  _rows
689    *  utility function returns array of jQuery selections representing each row
690    *  (as displayed after float wrapping applied by browser)
691    */
692
693    var _rows = function (elements) {
694        var tolerance = 1,
695            $elements = $(elements),
696            lastTop = null,
697            rows = [];
698
699        // group elements by their top position
700        $elements.each(function () {
701            var $that = $(this),
702                top = $that.offset().top - _parse($that.css('margin-top')),
703                lastRow = rows.length > 0 ? rows[rows.length - 1] : null;
704
705            if (lastRow === null) {
706                // first item on the row, so just push it
707                rows.push($that);
708            } else {
709                // if the row top is the same, add to the row group
710                if (Math.floor(Math.abs(lastTop - top)) <= tolerance) {
711                    rows[rows.length - 1] = lastRow.add($that);
712                } else {
713                    // otherwise start a new row group
714                    rows.push($that);
715                }
716            }
717
718            // keep track of the last row top
719            lastTop = top;
720        });
721
722        return rows;
723    };
724
725    /*
726    *  _parseOptions
727    *  handle plugin options
728    */
729
730    var _parseOptions = function (options) {
731        var opts = {
732            byRow: true,
733            property: 'height',
734            target: null,
735            remove: false
736        };
737
738        if (typeof options === 'object') {
739            return $.extend(opts, options);
740        }
741
742        if (typeof options === 'boolean') {
743            opts.byRow = options;
744        } else if (options === 'remove') {
745            opts.remove = true;
746        }
747
748        return opts;
749    };
750
751    /*
752    *  matchHeight
753    *  plugin definition
754    */
755
756    var matchHeight = $.fn.matchHeight = function (options) {
757        var opts = _parseOptions(options);
758
759        // handle remove
760        if (opts.remove) {
761            var that = this;
762
763            // remove fixed height from all selected elements
764            this.css(opts.property, '');
765
766            // remove selected elements from all groups
767            $.each(matchHeight._groups, function (key, group) {
768                group.elements = group.elements.not(that);
769            });
770
771            // TODO: cleanup empty groups
772
773            return this;
774        }
775
776        if (this.length <= 1 && !opts.target) {
777            return this;
778        }
779
780        // keep track of this group so we can re-apply later on load and resize events
781        matchHeight._groups.push({
782            elements: this,
783            options: opts
784        });
785
786        // match each element's height to the tallest element in the selection
787        matchHeight._apply(this, opts);
788
789        return this;
790    };
791
792    /*
793    *  plugin global options
794    */
795
796    matchHeight.version = '0.7.2';
797    matchHeight._groups = [];
798    matchHeight._throttle = 80;
799    matchHeight._maintainScroll = false;
800    matchHeight._beforeUpdate = null;
801    matchHeight._afterUpdate = null;
802    matchHeight._rows = _rows;
803    matchHeight._parse = _parse;
804    matchHeight._parseOptions = _parseOptions;
805
806    /*
807    *  matchHeight._apply
808    *  apply matchHeight to given elements
809    */
810
811    matchHeight._apply = function (elements, options) {
812        var opts = _parseOptions(options),
813            $elements = $(elements),
814            rows = [$elements];
815
816        // take note of scroll position
817        var scrollTop = $(window).scrollTop(),
818            htmlHeight = $('html').outerHeight(true);
819
820        // get hidden parents
821        var $hiddenParents = $elements.parents().filter(':hidden');
822
823        // cache the original inline style
824        $hiddenParents.each(function () {
825            var $that = $(this);
826            $that.data('style-cache', $that.attr('style'));
827        });
828
829        // temporarily must force hidden parents visible
830        $hiddenParents.css('display', 'block');
831
832        // get rows if using byRow, otherwise assume one row
833        if (opts.byRow && !opts.target) {
834
835            // must first force an arbitrary equal height so floating elements break evenly
836            $elements.each(function () {
837                var $that = $(this),
838                    display = $that.css('display');
839
840                // temporarily force a usable display value
841                if (display !== 'inline-block' && display !== 'flex' && display !== 'inline-flex') {
842                    display = 'block';
843                }
844
845                // cache the original inline style
846                $that.data('style-cache', $that.attr('style'));
847
848                $that.css({
849                    'display': display,
850                    'padding-top': '0',
851                    'padding-bottom': '0',
852                    'margin-top': '0',
853                    'margin-bottom': '0',
854                    'border-top-width': '0',
855                    'border-bottom-width': '0',
856                    'height': '100px',
857                    'overflow': 'hidden'
858                });
859            });
860
861            // get the array of rows (based on element top position)
862            rows = _rows($elements);
863
864            // revert original inline styles
865            $elements.each(function () {
866                var $that = $(this);
867                $that.attr('style', $that.data('style-cache') || '');
868            });
869        }
870
871        $.each(rows, function (key, row) {
872            var $row = $(row),
873                targetHeight = 0;
874
875            if (!opts.target) {
876                // skip apply to rows with only one item
877                if (opts.byRow && $row.length <= 1) {
878                    $row.css(opts.property, '');
879                    return;
880                }
881
882                // iterate the row and find the max height
883                $row.each(function () {
884                    var $that = $(this),
885                        style = $that.attr('style'),
886                        display = $that.css('display');
887
888                    // temporarily force a usable display value
889                    if (display !== 'inline-block' && display !== 'flex' && display !== 'inline-flex') {
890                        display = 'block';
891                    }
892
893                    // ensure we get the correct actual height (and not a previously set height value)
894                    var css = { 'display': display };
895                    css[opts.property] = '';
896                    $that.css(css);
897
898                    // find the max height (including padding, but not margin)
899                    if ($that.outerHeight(false) > targetHeight) {
900                        targetHeight = $that.outerHeight(false);
901                    }
902
903                    // revert styles
904                    if (style) {
905                        $that.attr('style', style);
906                    } else {
907                        $that.css('display', '');
908                    }
909                });
910            } else {
911                // if target set, use the height of the target element
912                targetHeight = opts.target.outerHeight(false);
913            }
914
915            // iterate the row and apply the height to all elements
916            $row.each(function () {
917                var $that = $(this),
918                    verticalPadding = 0;
919
920                // don't apply to a target
921                if (opts.target && $that.is(opts.target)) {
922                    return;
923                }
924
925                // handle padding and border correctly (required when not using border-box)
926                if ($that.css('box-sizing') !== 'border-box') {
927                    verticalPadding += _parse($that.css('border-top-width')) + _parse($that.css('border-bottom-width'));
928                    verticalPadding += _parse($that.css('padding-top')) + _parse($that.css('padding-bottom'));
929                }
930
931                // set the height (accounting for padding and border)
932                $that.css(opts.property, (targetHeight - verticalPadding) + 'px');
933            });
934        });
935
936        // revert hidden parents
937        $hiddenParents.each(function () {
938            var $that = $(this);
939            $that.attr('style', $that.data('style-cache') || null);
940        });
941
942        // restore scroll position if enabled
943        if (matchHeight._maintainScroll) {
944            $(window).scrollTop((scrollTop / htmlHeight) * $('html').outerHeight(true));
945        }
946
947        return this;
948    };
949
950    /*
951    *  matchHeight._applyDataApi
952    *  applies matchHeight to all elements with a data-match-height attribute
953    */
954
955    matchHeight._applyDataApi = function () {
956        var groups = {};
957
958        // generate groups by their groupId set by elements using data-match-height
959        $('[data-match-height], [data-mh]').each(function () {
960            var $this = $(this),
961                groupId = $this.attr('data-mh') || $this.attr('data-match-height');
962
963            if (groupId in groups) {
964                groups[groupId] = groups[groupId].add($this);
965            } else {
966                groups[groupId] = $this;
967            }
968        });
969
970        // apply matchHeight to each group
971        $.each(groups, function () {
972            this.matchHeight(true);
973        });
974    };
975
976    /*
977    *  matchHeight._update
978    *  updates matchHeight on all current groups with their correct options
979    */
980
981    var _update = function (event) {
982        if (matchHeight._beforeUpdate) {
983            matchHeight._beforeUpdate(event, matchHeight._groups);
984        }
985
986        $.each(matchHeight._groups, function () {
987            matchHeight._apply(this.elements, this.options);
988        });
989
990        if (matchHeight._afterUpdate) {
991            matchHeight._afterUpdate(event, matchHeight._groups);
992        }
993    };
994
995    matchHeight._update = function (throttle, event) {
996        // prevent update if fired from a resize event
997        // where the viewport width hasn't actually changed
998        // fixes an event looping bug in IE8
999        if (event && event.type === 'resize') {
1000            var windowWidth = $(window).width();
1001            if (windowWidth === _previousResizeWidth) {
1002                return;
1003            }
1004            _previousResizeWidth = windowWidth;
1005        }
1006
1007        // throttle updates
1008        if (!throttle) {
1009            _update(event);
1010        } else if (_updateTimeout === -1) {
1011            _updateTimeout = setTimeout(function () {
1012                _update(event);
1013                _updateTimeout = -1;
1014            }, matchHeight._throttle);
1015        }
1016    };
1017
1018    /*
1019    *  bind events
1020    */
1021
1022    // apply on DOM ready event
1023    $(matchHeight._applyDataApi);
1024
1025    // use on or bind where supported
1026    var on = $.fn.on ? 'on' : 'bind';
1027
1028    // update heights on load and resize events
1029    $(window)[on]('load', function (event) {
1030        matchHeight._update(false, event);
1031    });
1032
1033    // throttled update heights on resize events
1034    $(window)[on]('resize orientationchange', function (event) {
1035        matchHeight._update(true, event);
1036    });
1037
1038});
1039/*!
1040 * jQuery.scrollTo
1041 * Copyright (c) 2007 Ariel Flesler - aflesler ○ gmail • com | https://github.com/flesler
1042 * Licensed under MIT
1043 * https://github.com/flesler/jquery.scrollTo
1044 * @projectDescription Lightweight, cross-browser and highly customizable animated scrolling with jQuery
1045 * @author Ariel Flesler
1046 * @version 2.1.2
1047 */
1048; (function (factory) {
1049    'use strict';
1050    if (typeof define === 'function' && define.amd) {
1051        // AMD
1052        define(['jquery'], factory);
1053    } else if (typeof module !== 'undefined' && module.exports) {
1054        // CommonJS
1055        module.exports = factory(require('jquery'));
1056    } else {
1057        // Global
1058        factory(jQuery);
1059    }
1060})(function ($) {
1061    'use strict';
1062
1063    var $scrollTo = $.scrollTo = function (target, duration, settings) {
1064        return $(window).scrollTo(target, duration, settings);
1065    };
1066
1067    $scrollTo.defaults = {
1068        axis: 'xy',
1069        duration: 0,
1070        limit: true
1071    };
1072
1073    function isWin(elem) {
1074        return !elem.nodeName ||
1075            $.inArray(elem.nodeName.toLowerCase(), ['iframe', '#document', 'html', 'body']) !== -1;
1076    }
1077
1078    $.fn.scrollTo = function (target, duration, settings) {
1079        if (typeof duration === 'object') {
1080            settings = duration;
1081            duration = 0;
1082        }
1083        if (typeof settings === 'function') {
1084            settings = { onAfter: settings };
1085        }
1086        if (target === 'max') {
1087            target = 9e9;
1088        }
1089
1090        settings = $.extend({}, $scrollTo.defaults, settings);
1091        // Speed is still recognized for backwards compatibility
1092        duration = duration || settings.duration;
1093        // Make sure the settings are given right
1094        var queue = settings.queue && settings.axis.length > 1;
1095        if (queue) {
1096            // Let's keep the overall duration
1097            duration /= 2;
1098        }
1099        settings.offset = both(settings.offset);
1100        settings.over = both(settings.over);
1101
1102        return this.each(function () {
1103            // Null target yields nothing, just like jQuery does
1104            if (target === null) return;
1105
1106            var win = isWin(this),
1107                elem = win ? this.contentWindow || window : this,
1108                $elem = $(elem),
1109                targ = target,
1110                attr = {},
1111                toff;
1112
1113            switch (typeof targ) {
1114                // A number will pass the regex
1115                case 'number':
1116                case 'string':
1117                    if (/^([+-]=?)?\d+(\.\d+)?(px|%)?$/.test(targ)) {
1118                        targ = both(targ);
1119                        // We are done
1120                        break;
1121                    }
1122                    // Relative/Absolute selector
1123                    targ = win ? $(targ) : $(targ, elem);
1124                /* falls through */
1125                case 'object':
1126                    if (targ.length === 0) return;
1127                    // DOMElement / jQuery
1128                    if (targ.is || targ.style) {
1129                        // Get the real position of the target
1130                        toff = (targ = $(targ)).offset();
1131                    }
1132            }
1133
1134            var offset = $.isFunction(settings.offset) && settings.offset(elem, targ) || settings.offset;
1135
1136            $.each(settings.axis.split(''), function (i, axis) {
vendor: 5,595 bytes, lines 1137-1294
1137                var Pos = axis === 'x' ? 'Left' : 'Top',
1138                    pos = Pos.toLowerCase(),
1139                    key = 'scroll' + Pos,
1140                    prev = $elem[key](),
1141                    max = $scrollTo.max(elem, axis);
1142
1143                if (toff) {// jQuery / DOMElement
1144                    attr[key] = toff[pos] + (win ? 0 : prev - $elem.offset()[pos]);
1145
1146                    // If it's a dom element, reduce the margin
1147                    if (settings.margin) {
1148                        attr[key] -= parseInt(targ.css('margin' + Pos), 10) || 0;
1149                        attr[key] -= parseInt(targ.css('border' + Pos + 'Width'), 10) || 0;
1150                    }
1151
1152                    attr[key] += offset[pos] || 0;
1153
1154                    if (settings.over[pos]) {
1155                        // Scroll to a fraction of its width/height
1156                        attr[key] += targ[axis === 'x' ? 'width' : 'height']() * settings.over[pos];
1157                    }
1158                } else {
1159                    var val = targ[pos];
1160                    // Handle percentage values
1161                    attr[key] = val.slice && val.slice(-1) === '%' ?
1162                        parseFloat(val) / 100 * max
1163                        : val;
1164                }
1165
1166                // Number or 'number'
1167                if (settings.limit && /^\d+$/.test(attr[key])) {
1168                    // Check the limits
1169                    attr[key] = attr[key] <= 0 ? 0 : Math.min(attr[key], max);
1170                }
1171
1172                // Don't waste time animating, if there's no need.
1173                if (!i && settings.axis.length > 1) {
1174                    if (prev === attr[key]) {
1175                        // No animation needed
1176                        attr = {};
1177                    } else if (queue) {
1178                        // Intermediate animation
1179                        animate(settings.onAfterFirst);
1180                        // Don't animate this axis again in the next iteration.
1181                        attr = {};
1182                    }
1183                }
1184            });
1185
1186            animate(settings.onAfter);
1187
1188            function animate(callback) {
1189                var opts = $.extend({}, settings, {
1190                    // The queue setting conflicts with animate()
1191                    // Force it to always be true
1192                    queue: true,
1193                    duration: duration,
1194                    complete: callback && function () {
1195                        callback.call(elem, targ, settings);
1196                    }
1197                });
1198                $elem.animate(attr, opts);
1199            }
1200        });
1201    };
1202
1203    // Max scrolling position, works on quirks mode
1204    // It only fails (not too badly) on IE, quirks mode.
1205    $scrollTo.max = function (elem, axis) {
1206        var Dim = axis === 'x' ? 'Width' : 'Height',
1207            scroll = 'scroll' + Dim;
1208
1209        if (!isWin(elem))
1210            return elem[scroll] - $(elem)[Dim.toLowerCase()]();
1211
1212        var size = 'client' + Dim,
1213            doc = elem.ownerDocument || elem.document,
1214            html = doc.documentElement,
1215            body = doc.body;
1216
1217        return Math.max(html[scroll], body[scroll]) - Math.min(html[size], body[size]);
1218    };
1219
1220    function both(val) {
1221        return $.isFunction(val) || $.isPlainObject(val) ? val : { top: val, left: val };
1222    }
1223
1224    // Add special hooks so that window scroll properties can be animated
1225    $.Tween.propHooks.scrollLeft =
1226        $.Tween.propHooks.scrollTop = {
1227            get: function (t) {
1228                return $(t.elem)[t.prop]();
1229            },
1230            set: function (t) {
1231                var curr = this.get(t);
1232                // If interrupt is true and user scrolled, stop animating
1233                if (t.options.interrupt && t._last && t._last !== curr) {
1234                    return $(t.elem).stop();
1235                }
1236                var next = Math.round(t.now);
1237                // Don't waste CPU
1238                // Browsers don't render floating point scroll
1239                if (curr !== next) {
1240                    $(t.elem)[t.prop](next);
1241                    t._last = this.get(t);
1242                }
1243            }
1244        };
1245
1246    // AMD requirement
1247    return $scrollTo;
1248});
1249/*!
1250 * Lightbox v2.10.0
1251 * by Lokesh Dhakar
1252 *
1253 * More info:
1254 * http://lokeshdhakar.com/projects/lightbox2/
1255 *
1256 * Copyright 2007, 2018 Lokesh Dhakar
1257 * Released under the MIT license
1258 * https://github.com/lokesh/lightbox2/blob/master/LICENSE
1259 *
1260 * @preserve
1261 */
1262
1263// Uses Node, AMD or browser globals to create a module.
1264(function (root, factory) {
1265    if (typeof define === 'function' && define.amd) {
1266        // AMD. Register as an anonymous module.
1267        define(['jquery'], factory);
1268    } else if (typeof exports === 'object') {
1269        // Node. Does not work with strict CommonJS, but
1270        // only CommonJS-like environments that support module.exports,
1271        // like Node.
1272        module.exports = factory(require('jquery'));
1273    } else {
1274        // Browser globals (root is window)
1275        root.lightbox = factory(root.jQuery);
1276    }
1277}(this, function ($) {
1278
1279    function Lightbox(options) {
1280        this.album = [];
1281        this.currentImageIndex = void 0;
1282        this.init();
1283
1284        // options
1285        this.options = $.extend({}, this.constructor.defaults);
1286        this.option(options);
1287    }
1288
1289    // Descriptions of all options available on the demo site:
1290    // http://lokeshdhakar.com/projects/lightbox2/index.html#options
1291    Lightbox.defaults = {
1292        albumLabel: 'Image %1 of %2',
1293        alwaysShowNavOnTouchDevices: false,
1294        fadeDuration: 600,
vendor: 4,153 bytes, lines 1295-1385
1295        fitImagesInViewport: true,
1296        imageFadeDuration: 600,
1297        // maxWidth: 800,
1298        // maxHeight: 600,
1299        positionFromTop: 50,
1300        resizeDuration: 700,
1301        showImageNumberLabel: true,
1302        wrapAround: false,
1303        disableScrolling: false,
1304        /*
1305        Sanitize Title
1306        If the caption data is trusted, for example you are hardcoding it in, then leave this to false.
1307        This will free you to add html tags, such as links, in the caption.
1308    
1309        If the caption data is user submitted or from some other untrusted source, then set this to true
1310        to prevent xss and other injection attacks.
1311         */
1312        sanitizeTitle: false
1313    };
1314
1315    Lightbox.prototype.option = function (options) {
1316        $.extend(this.options, options);
1317    };
1318
1319    Lightbox.prototype.imageCountLabel = function (currentImageNum, totalImages) {
1320        return this.options.albumLabel.replace(/%1/g, currentImageNum).replace(/%2/g, totalImages);
1321    };
1322
1323    Lightbox.prototype.init = function () {
1324        var self = this;
1325        // Both enable and build methods require the body tag to be in the DOM.
1326        $(document).ready(function () {
1327            self.enable();
1328            self.build();
1329        });
1330    };
1331
1332    // Loop through anchors and areamaps looking for either data-lightbox attributes or rel attributes
1333    // that contain 'lightbox'. When these are clicked, start lightbox.
1334    Lightbox.prototype.enable = function () {
1335        var self = this;
1336        $('body').on('click', 'a[rel^=lightbox], area[rel^=lightbox], a[data-lightbox], area[data-lightbox]', function (event) {
1337            self.start($(event.currentTarget));
1338            return false;
1339        });
1340    };
1341
1342    // Build html for the lightbox and the overlay.
1343    // Attach event handlers to the new DOM elements. click click click
1344    Lightbox.prototype.build = function () {
1345        if ($('#lightbox').length > 0) {
1346            return;
1347        }
1348
1349        var self = this;
1350        $('<div id="lightboxOverlay" class="lightboxOverlay"></div><div id="lightbox" class="lightbox"><div class="lb-outerContainer"><div class="lb-container"><img class="lb-image" src="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" /><div class="lb-nav"><a class="lb-prev" href="" ></a><a class="lb-next" href="" ></a></div><div class="lb-loader"><a class="lb-cancel"></a></div><div class="lb-info"><h3 class="lb-caption"></h3><p class="lb-desc"></p></div></div></div><div class="lb-dataContainer"><div class="lb-data"><div class="lb-details"><span class="lb-number"></span></div><div class="lb-closeContainer"><a class="lb-close"></a></div></div></div></div>').appendTo($('body'));
1351
1352        // Cache jQuery objects
1353        this.$lightbox = $('#lightbox');
1354        this.$overlay = $('#lightboxOverlay');
1355        this.$outerContainer = this.$lightbox.find('.lb-outerContainer');
1356        this.$container = this.$lightbox.find('.lb-container');
1357        this.$image = this.$lightbox.find('.lb-image');
1358        this.$nav = this.$lightbox.find('.lb-nav');
1359
1360        // Store css values for future lookup
1361        this.containerPadding = {
1362            top: parseInt(this.$container.css('padding-top'), 10),
1363            right: parseInt(this.$container.css('padding-right'), 10),
1364            bottom: parseInt(this.$container.css('padding-bottom'), 10),
1365            left: parseInt(this.$container.css('padding-left'), 10)
1366        };
1367
1368        this.imageBorderWidth = {
1369            top: parseInt(this.$image.css('border-top-width'), 10),
1370            right: parseInt(this.$image.css('border-right-width'), 10),
1371            bottom: parseInt(this.$image.css('border-bottom-width'), 10),
1372            left: parseInt(this.$image.css('border-left-width'), 10)
1373        };
1374
1375        // Attach event handlers to the newly minted DOM elements
1376        this.$overlay.hide().on('click', function () {
1377            self.end();
1378            return false;
1379        });
1380
1381        this.$lightbox.hide().on('click', function (event) {
1382            if ($(event.target).attr('id') === 'lightbox') {
1383                self.end();
1384            }
1385            return false;
1386        });
1387
1388        this.$outerContainer.on('click', function (event) {
1389            if ($(event.target).attr('id') === 'lightbox') {
1390                self.end();
1391            }
1392            return false;
1393        });
1394
1395        this.$lightbox.find('.lb-prev').on('click', function () {
1396            if (self.currentImageIndex === 0) {
1397                self.changeImage(self.album.length - 1);
1398            } else {
1399                self.changeImage(self.currentImageIndex - 1);
1400            }
1401            return false;
1402        });
1403
1404        this.$lightbox.find('.lb-next').on('click', function () {
1405            if (self.currentImageIndex === self.album.length - 1) {
1406                self.changeImage(0);
1407            } else {
1408                self.changeImage(self.currentImageIndex + 1);
1409            }
1410            return false;
1411        });
1412
1413        /*
1414          Show context menu for image on right-click
1415    
1416          There is a div containing the navigation that spans the entire image and lives above of it. If
1417          you right-click, you are right clicking this div and not the image. This prevents users from
1418          saving the image or using other context menu actions with the image.
1419    
1420          To fix this, when we detect the right mouse button is pressed down, but not yet clicked, we
1421          set pointer-events to none on the nav div. This is so that the upcoming right-click event on
1422          the next mouseup will bubble down to the image. Once the right-click/contextmenu event occurs
1423          we set the pointer events back to auto for the nav div so it can capture hover and left-click
1424          events as usual.
1425         */
1426        this.$nav.on('mousedown', function (event) {
1427            if (event.which === 3) {
1428                self.$nav.css('pointer-events', 'none');
1429
1430                self.$lightbox.one('contextmenu', function () {
1431                    setTimeout(function () {
1432                        this.$nav.css('pointer-events', 'auto');
1433                    }.bind(self), 0);
1434                });
1435            }
1436        });
1437
1438
1439        this.$lightbox.find('.lb-loader, .lb-close').on('click', function () {
1440            self.end();
1441            return false;
1442        });
1443    };
1444
1445    // Show overlay and lightbox. If the image is part of a set, add siblings to album array.
1446    Lightbox.prototype.start = function ($link) {
1447        var self = this;
1448        var $window = $(window);
1449
1450        $window.on('resize', $.proxy(this.sizeOverlay, this));
1451
1452        $('select, object, embed').css({
1453            visibility: 'hidden'
1454        });
1455
1456        this.sizeOverlay();
1457
1458        this.album = [];
1459        var imageNumber = 0;
1460
1461        function addToAlbum($link) {
1462            self.album.push({
1463                alt: $link.attr('data-alt'),
1464                link: $link.attr('href'),
1465                title: $link.attr('data-title') || $link.attr('title'),
1466                desc: $link.attr('data-desc') || $link.attr('desc')
1467            });
1468        }
1469
1470        // Support both data-lightbox attribute and rel attribute implementations
1471        var dataLightboxValue = $link.attr('data-lightbox');
1472        var $links;
1473
1474        if (dataLightboxValue) {
1475            $links = $($link.prop('tagName') + '[data-lightbox="' + dataLightboxValue + '"]');
1476            for (var i = 0; i < $links.length; i = ++i) {
1477                addToAlbum($($links[i]));
1478                if ($links[i] === $link[0]) {
1479                    imageNumber = i;
1480                }
1481            }
1482        } else {
1483            if ($link.attr('rel') === 'lightbox') {
1484                // If image is not part of a set
1485                addToAlbum($link);
1486            } else {
1487                // If image is part of a set
1488                $links = $($link.prop('tagName') + '[rel="' + $link.attr('rel') + '"]');
1489                for (var j = 0; j < $links.length; j = ++j) {
1490                    addToAlbum($($links[j]));
1491                    if ($links[j] === $link[0]) {
1492                        imageNumber = j;
1493                    }
1494                }
1495            }
1496        }
1497
1498        // Position Lightbox
1499        var top = $window.scrollTop() + this.options.positionFromTop;
1500        var left = $window.scrollLeft();
1501        this.$lightbox.css({
1502            top: top + 'px',
1503            left: left + 'px'
1504        }).fadeIn(this.options.fadeDuration);
1505
1506        // Disable scrolling of the page while open
1507        if (this.options.disableScrolling) {
1508            $('html').addClass('lb-disable-scrolling');
1509        }
1510
1511        this.changeImage(imageNumber);
1512    };
1513
1514    // Hide most UI elements in preparation for the animated resizing of the lightbox.
1515    Lightbox.prototype.changeImage = function (imageNumber) {
1516        var self = this;
1517
1518        this.disableKeyboardNav();
1519        var $image = this.$lightbox.find('.lb-image');
1520
1521        this.$overlay.fadeIn(this.options.fadeDuration);
1522
1523        $('.lb-loader').fadeIn('slow');
1524        this.$lightbox.find('.lb-image, .lb-nav, .lb-prev, .lb-next, .lb-dataContainer, .lb-numbers, .lb-caption').hide();
1525
1526        this.$outerContainer.addClass('animating');
1527
1528        // When image to show is preloaded, we send the width and height to sizeContainer()
1529        var preloader = new Image();
1530        preloader.onload = function () {
1531            var $preloader;
1532            var imageHeight;
1533            var imageWidth;
1534            var maxImageHeight;
1535            var maxImageWidth;
1536            var windowHeight;
1537            var windowWidth;
1538
1539            $image.attr({
1540                'alt': self.album[imageNumber].alt,
1541                'src': self.album[imageNumber].link
1542            });
1543
1544            $preloader = $(preloader);
1545
1546            $image.width(preloader.width);
1547            $image.height(preloader.height);
1548
1549            if (self.options.fitImagesInViewport) {
1550                // Fit image inside the viewport.
1551                // Take into account the border around the image and an additional 10px gutter on each side.
1552
1553                windowWidth = $(window).width();
1554                windowHeight = $(window).height();
1555                maxImageWidth = windowWidth - self.containerPadding.left - self.containerPadding.right - self.imageBorderWidth.left - self.imageBorderWidth.right - 20;
1556                maxImageHeight = windowHeight - self.containerPadding.top - self.containerPadding.bottom - self.imageBorderWidth.top - self.imageBorderWidth.bottom - 120;
1557
1558                // Check if image size is larger then maxWidth|maxHeight in settings
1559                if (self.options.maxWidth && self.options.maxWidth < maxImageWidth) {
1560                    maxImageWidth = self.options.maxWidth;
1561                }
1562                if (self.options.maxHeight && self.options.maxHeight < maxImageWidth) {
1563                    maxImageHeight = self.options.maxHeight;
1564                }
1565
1566                // Is the current image's width or height is greater than the maxImageWidth or maxImageHeight
1567                // option than we need to size down while maintaining the aspect ratio.
1568                if ((preloader.width > maxImageWidth) || (preloader.height > maxImageHeight)) {
1569                    if ((preloader.width / maxImageWidth) > (preloader.height / maxImageHeight)) {
1570                        imageWidth = maxImageWidth;
1571                        imageHeight = parseInt(preloader.height / (preloader.width / imageWidth), 10);
1572                        $image.width(imageWidth);
1573                        $image.height(imageHeight);
1574                    } else {
1575                        imageHeight = maxImageHeight;
1576                        imageWidth = parseInt(preloader.width / (preloader.height / imageHeight), 10);
1577                        $image.width(imageWidth);
1578                        $image.height(imageHeight);
1579                    }
1580                }
1581            }
1582            self.sizeContainer($image.width(), $image.height());
1583        };
1584
1585        preloader.src = this.album[imageNumber].link;
1586        this.currentImageIndex = imageNumber;
1587    };
1588
1589    // Stretch overlay to fit the viewport
1590    Lightbox.prototype.sizeOverlay = function () {
1591        this.$overlay
1592            .width($(document).width())
1593            .height($(document).height());
1594    };
1595
1596    // Animate the size of the lightbox to fit the image we are showing
1597    Lightbox.prototype.sizeContainer = function (imageWidth, imageHeight) {
1598        var self = this;
1599
1600        var oldWidth = this.$outerContainer.outerWidth();
1601        var oldHeight = this.$outerContainer.outerHeight();
1602        var newWidth = imageWidth + this.containerPadding.left + this.containerPadding.right + this.imageBorderWidth.left + this.imageBorderWidth.right;
1603        var newHeight = imageHeight + this.containerPadding.top + this.containerPadding.bottom + this.imageBorderWidth.top + this.imageBorderWidth.bottom;
1604
1605        function postResize() {
1606            self.$lightbox.find('.lb-dataContainer').width(newWidth);
1607            self.$lightbox.find('.lb-prevLink').height(newHeight);
1608            self.$lightbox.find('.lb-nextLink').height(newHeight);
1609            self.showImage();
1610        }
1611
1612        if (oldWidth !== newWidth || oldHeight !== newHeight) {
1613            this.$outerContainer.animate({
1614                width: newWidth,
1615                height: newHeight
1616            }, this.options.resizeDuration, 'swing', function () {
1617                postResize();
1618            });
1619        } else {
1620            postResize();
1621        }
1622    };
1623
1624    // Display the image and its details and begin preload neighboring images.
1625    Lightbox.prototype.showImage = function () {
1626        this.$lightbox.find('.lb-loader').stop(true).hide();
1627        this.$lightbox.find('.lb-image').fadeIn(this.options.imageFadeDuration);
1628
1629        this.updateNav();
1630        this.updateDetails();
1631        this.preloadNeighboringImages();
1632        this.enableKeyboardNav();
1633    };
1634
1635    // Display previous and next navigation if appropriate.
1636    Lightbox.prototype.updateNav = function () {
1637        // Check to see if the browser supports touch events. If so, we take the conservative approach
1638        // and assume that mouse hover events are not supported and always show prev/next navigation
1639        // arrows in image sets.
1640        var alwaysShowNav = true;
1641        try {
1642            document.createEvent('TouchEvent');
1643            alwaysShowNav = (this.options.alwaysShowNavOnTouchDevices) ? true : false;
1644        } catch (e) { }
1645
1646        this.$lightbox.find('.lb-nav').show();
1647
1648        if (this.album.length > 1) {
1649            if (this.options.wrapAround) {
1650                if (alwaysShowNav) {
1651                    this.$lightbox.find('.lb-prev, .lb-next').css('opacity', '1');
1652                }
1653                this.$lightbox.find('.lb-prev, .lb-next').show();
1654            } else {
1655                if (this.currentImageIndex > 0) {
1656                    this.$lightbox.find('.lb-prev').show();
1657                    if (alwaysShowNav) {
1658                        this.$lightbox.find('.lb-prev').css('opacity', '1');
1659                    }
1660                }
1661                if (this.currentImageIndex < this.album.length - 1) {
1662                    this.$lightbox.find('.lb-next').show();
1663                    if (alwaysShowNav) {
1664                        this.$lightbox.find('.lb-next').css('opacity', '1');
1665                    }
1666                }
1667            }
1668        }
1669    };
1670
1671    // Display caption, image number, and closing button.
1672    Lightbox.prototype.updateDetails = function () {
1673        var self = this;
1674
1675        // Enable anchor clicks in the injected caption html.
1676        // Thanks Nate Wright for the fix. @https://github.com/NateWr
1677        if (typeof this.album[this.currentImageIndex].title !== 'undefined' &&
1678            this.album[this.currentImageIndex].title !== '') {
1679
1680            var $caption = this.$lightbox.find('.lb-caption');
1681            $caption.html(this.album[this.currentImageIndex].title);
1682
1683            //alert(this.album[this.currentImageIndex].desc);
1684
1685            var $description = this.$lightbox.find('.lb-desc');
1686            if (this.album[this.currentImageIndex].desc !== undefined) {
1687                $description.html(this.album[this.currentImageIndex].desc);
1688            } else {
1689                $description.html('');
1690            }
1691
1692            $caption.fadeIn('fast')
1693                .find('a').on('click', function (event) {
1694                    if ($(this).attr('target') !== undefined) {
1695                        window.open($(this).attr('href'), $(this).attr('target'));
1696                    } else {
1697                        location.href = $(this).attr('href');
1698                    }
1699                });
1700        }
1701
1702        if (this.album.length > 1 && this.options.showImageNumberLabel) {
1703            var labelText = this.imageCountLabel(this.currentImageIndex + 1, this.album.length);
1704            this.$lightbox.find('.lb-number').text(labelText).fadeIn('fast');
1705        } else {
1706            this.$lightbox.find('.lb-number').hide();
1707        }
1708
1709        this.$outerContainer.removeClass('animating');
1710
1711        this.$lightbox.find('.lb-dataContainer').fadeIn(this.options.resizeDuration, function () {
1712            return self.sizeOverlay();
1713        });
1714    };
1715
1716    // Preload previous and next images in set.
1717    Lightbox.prototype.preloadNeighboringImages = function () {
1718        if (this.album.length > this.currentImageIndex + 1) {
1719            var preloadNext = new Image();
1720            preloadNext.src = this.album[this.currentImageIndex + 1].link;
1721        }
1722        if (this.currentImageIndex > 0) {
1723            var preloadPrev = new Image();
1724            preloadPrev.src = this.album[this.currentImageIndex - 1].link;
1725        }
1726    };
1727
1728    Lightbox.prototype.enableKeyboardNav = function () {
1729        $(document).on('keyup.keyboard', $.proxy(this.keyboardAction, this));
1730    };
1731
1732    Lightbox.prototype.disableKeyboardNav = function () {
1733        $(document).off('.keyboard');
1734    };
1735
1736    Lightbox.prototype.keyboardAction = function (event) {
1737        var KEYCODE_ESC = 27;
1738        var KEYCODE_LEFTARROW = 37;
1739        var KEYCODE_RIGHTARROW = 39;
1740
1741        var keycode = event.keyCode;
1742        var key = String.fromCharCode(keycode).toLowerCase();
1743        if (keycode === KEYCODE_ESC || key.match(/x|o|c/)) {
1744            this.end();
1745        } else if (key === 'p' || keycode === KEYCODE_LEFTARROW) {
1746            if (this.currentImageIndex !== 0) {
1747                this.changeImage(this.currentImageIndex - 1);
1748            } else if (this.options.wrapAround && this.album.length > 1) {
1749                this.changeImage(this.album.length - 1);
1750            }
1751        } else if (key === 'n' || keycode === KEYCODE_RIGHTARROW) {
1752            if (this.currentImageIndex !== this.album.length - 1) {
1753                this.changeImage(this.currentImageIndex + 1);
1754            } else if (this.options.wrapAround && this.album.length > 1) {
1755                this.changeImage(0);
1756            }
1757        }
1758    };
1759
1760    // Closing time. :-(
1761    Lightbox.prototype.end = function () {
1762        this.disableKeyboardNav();
1763        $(window).off('resize', this.sizeOverlay);
1764        this.$lightbox.fadeOut(this.options.fadeDuration);
1765        this.$overlay.fadeOut(this.options.fadeDuration);
1766        $('select, object, embed').css({
1767            visibility: 'visible'
1768        });
1769        if (this.options.disableScrolling) {
1770            $('html').removeClass('lb-disable-scrolling');
1771        }
1772    };
1773
1774    return new Lightbox();
1775}));
1776
1777/*!
1778 *         ,/
1779 *       ,'/
1780 *     ,' /
1781 *   ,'  /_____,
1782 * .'____    ,'
1783 *      /  ,'
1784 *     / ,'
1785 *    /,'
1786 *   /'
1787 *
1788 * Selectric ϟ v1.13.0 (Aug 22 2017) - http://lcdsantos.github.io/jQuery-Selectric/
1789 *
1790 * Copyright (c) 2017 Leonardo Santos; MIT License
1791 *
1792 */
1793
1794(function (factory) {
1795    /* global define */
1796    /* istanbul ignore next */
1797    if (typeof define === 'function' && define.amd) {
1798        define(['jquery'], factory);
1799    } else if (typeof module === 'object' && module.exports) {
1800        // Node/CommonJS
1801        module.exports = function (root, jQuery) {
1802            if (jQuery === undefined) {
1803                if (typeof window !== 'undefined') {
1804                    jQuery = require('jquery');
1805                } else {
1806                    jQuery = require('jquery')(root);
1807                }
1808            }
1809            factory(jQuery);
1810            return jQuery;
1811        };
1812    } else {
1813        // Browser globals
1814        factory(jQuery);
1815    }
1816}(function ($) {
1817    'use strict';
1818
1819    var $doc = $(document);
1820    var $win = $(window);
1821
1822    var pluginName = 'selectric';
1823    var classList = 'Input Items Open Disabled TempShow HideSelect Wrapper Focus Hover Responsive Above Below Scroll Group GroupLabel';
1824    var eventNamespaceSuffix = '.sl';
1825
1826    var chars = ['a', 'e', 'i', 'o', 'u', 'n', 'c', 'y'];
1827    var diacritics = [
1828        /[\xE0-\xE5]/g, // a
1829        /[\xE8-\xEB]/g, // e
1830        /[\xEC-\xEF]/g, // i
1831        /[\xF2-\xF6]/g, // o
1832        /[\xF9-\xFC]/g, // u
1833        /[\xF1]/g,      // n
1834        /[\xE7]/g,      // c
1835        /[\xFD-\xFF]/g  // y
1836    ];
1837
1838    /**
1839     * Create an instance of Selectric
1840     *
1841     * @constructor
1842     * @param {Node} element - The &lt;select&gt; element
1843     * @param {object}  opts - Options
1844     */
1845    var Selectric = function (element, opts) {
1846        var _this = this;
1847
1848        _this.element = element;
1849        _this.$element = $(element);
1850
1851        _this.state = {
1852            multiple: !!_this.$element.attr('multiple'),
1853            enabled: false,
1854            opened: false,
1855            currValue: -1,
1856            selectedIdx: -1,
1857            highlightedIdx: -1
1858        };
1859
1860        _this.eventTriggers = {
1861            open: _this.open,
1862            close: _this.close,
1863            destroy: _this.destroy,
1864            refresh: _this.refresh,
1865            init: _this.init
1866        };
1867
1868        _this.init(opts);
1869    };
1870
1871    Selectric.prototype = {
1872        utils: {
1873            /**
1874             * Detect mobile browser
1875             *
1876             * @return {boolean}
1877             */
1878            isMobile: function () {
1879                return /android|ip(hone|od|ad)/i.test(navigator.userAgent);
1880            },
1881
1882            /**
1883             * Escape especial characters in string (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions)
1884             *
1885             * @param  {string} str - The string to be escaped
1886             * @return {string}       The string with the special characters escaped
1887             */
1888            escapeRegExp: function (str) {
1889                return str.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); // $& means the whole matched string
1890            },
1891
1892            /**
1893             * Replace diacritics
1894             *
1895             * @param  {string} str - The string to replace the diacritics
1896             * @return {string}       The string with diacritics replaced with ascii characters
1897             */
1898            replaceDiacritics: function (str) {
1899                var k = diacritics.length;
1900
1901                while (k--) {
1902                    str = str.toLowerCase().replace(diacritics[k], chars[k]);
1903                }
1904
1905                return str;
1906            },
1907
1908            /**
1909             * Format string
1910             * https://gist.github.com/atesgoral/984375
1911             *
1912             * @param  {string} f - String to be formated
1913             * @return {string}     String formated
1914             */
1915            format: function (f) {
1916                var a = arguments; // store outer arguments
1917                return ('' + f) // force format specifier to String
1918                    .replace( // replace tokens in format specifier
1919                        /\{(?:(\d+)|(\w+))\}/g, // match {token} references
1920                        function (
1921                            s, // the matched string (ignored)
1922                            i, // an argument index
1923                            p // a property name
1924                        ) {
1925                            return p && a[1] // if property name and first argument exist
1926                                ? a[1][p] // return property from first argument
1927                                : a[i]; // assume argument index and return i-th argument
1928                        });
1929            },
1930
1931            /**
1932             * Get the next enabled item in the options list.
1933             *
1934             * @param  {object} selectItems - The options object.
1935             * @param  {number}    selected - Index of the currently selected option.
1936             * @return {object}               The next enabled item.
1937             */
1938            nextEnabledItem: function (selectItems, selected) {
1939                while (selectItems[selected = (selected + 1) % selectItems.length].disabled) {
1940                    // empty
1941                }
1942                return selected;
1943            },
1944
1945            /**
1946             * Get the previous enabled item in the options list.
1947             *
1948             * @param  {object} selectItems - The options object.
1949             * @param  {number}    selected - Index of the currently selected option.
1950             * @return {object}               The previous enabled item.
1951             */
1952            previousEnabledItem: function (selectItems, selected) {
1953                while (selectItems[selected = (selected > 0 ? selected : selectItems.length) - 1].disabled) {
1954                    // empty
1955                }
1956                return selected;
1957            },
1958
1959            /**
1960             * Transform camelCase string to dash-case.
1961             *
1962             * @param  {string} str - The camelCased string.
1963             * @return {string}       The string transformed to dash-case.
1964             */
1965            toDash: function (str) {
1966                return str.replace(/([a-z0-9])([A-Z])/g, '$1-$2').toLowerCase();
1967            },
1968
1969            /**
1970             * Calls the events registered with function name.
1971             *
1972             * @param {string}
1972    fn - The name of the function.
1973             * @param {number} scope - Scope that should be set on the function.
1974             */
1975            triggerCallback: function (fn, scope) {
1976                var elm = scope.element;
1977                var func = scope.options['on' + fn];
1978                var args = [elm].concat([].slice.call(arguments).slice(1));
1979
1980                if ($.isFunction(func)) {
1981                    func.apply(elm, args);
1982                }
1983
1984                $(elm).trigger(pluginName + '-' + this.toDash(fn), args);
1985            },
1986
1987            /**
1988             * Transform array list to concatenated string and remove empty values
1989             * @param  {array} arr - Class list
1990             * @return {string}      Concatenated string
1991             */
1992            arrayToClassname: function (arr) {
1993                var newArr = $.grep(arr, function (item) {
1994                    return !!item;
1995                });
1996
1997                return $.trim(newArr.join(' '));
1998            }
1999        },
2000
2001        /** Initializes */
2002        init: function (opts) {
2003            var _this = this;
2004
2005            // Set options
2006            _this.options = $.extend(true, {}, $.fn[pluginName].defaults, _this.options, opts);
2007
2008            _this.utils.triggerCallback('BeforeInit', _this);
2009
2010            // Preserve data
2011            _this.destroy(true);
2012
2013            // Disable on mobile browsers
2014            if (_this.options.disableOnMobile && _this.utils.isMobile()) {
2015                _this.disableOnMobile = true;
2016                return;
2017            }
2018
2019            // Get classes
2020            _this.classes = _this.getClassNames();
2021
2022            // Create elements
2023            var input = $('<input/>', { 'class': _this.classes.input, 'readonly': _this.utils.isMobile() });
2024            var items = $('<div/>', { 'class': _this.classes.items, 'tabindex': -1 });
2025            var itemsScroll = $('<div/>', { 'class': _this.classes.scroll });
2026            var wrapper = $('<div/>', { 'class': _this.classes.prefix, 'html': _this.options.arrowButtonMarkup });
2027            var label = $('<span/>', { 'class': 'label' });
2028            var outerWrapper = _this.$element.wrap('<div/>').parent().append(wrapper.prepend(label), items, input);
2029            var hideSelectWrapper = $('<div/>', { 'class': _this.classes.hideselect });
2030
2031            _this.elements = {
2032                input: input,
2033                items: items,
2034                itemsScroll: itemsScroll,
2035                wrapper: wrapper,
2036                label: label,
2037                outerWrapper: outerWrapper
2038            };
2039
2040            if (_this.options.nativeOnMobile && _this.utils.isMobile()) {
2041                _this.elements.input = undefined;
2042                hideSelectWrapper.addClass(_this.classes.prefix + '-is-native');
2043
2044                _this.$element.on('change', function () {
2045                    _this.refresh();
2046                });
2047            }
2048
2049            _this.$element
2050                .on(_this.eventTriggers)
2051                .wrap(hideSelectWrapper);
2052
2053            _this.originalTabindex = _this.$element.prop('tabindex');
2054            _this.$element.prop('tabindex', -1);
2055
2056            _this.populate();
2057            _this.activate();
2058
2059            _this.utils.triggerCallback('Init', _this);
2060        },
2061
2062        /** Activates the plugin */
2063        activate: function () {
2064            var _this = this;
2065            var hiddenChildren = _this.elements.items.closest(':visible').children(':hidden').addClass(_this.classes.tempshow);
2066            var originalWidth = _this.$element.width();
2067
2068            hiddenChildren.removeClass(_this.classes.tempshow);
2069
2070            _this.utils.triggerCallback('BeforeActivate', _this);
2071
2072            _this.elements.outerWrapper.prop('class',
2073                _this.utils.arrayToClassname([
2074                    _this.classes.wrapper,
2075                    _this.$element.prop('class').replace(/\S+/g, _this.classes.prefix + '-$&'),
2076                    _this.options.responsive ? _this.classes.responsive : ''
2077                ])
2078            );
2079
2080            if (_this.options.inheritOriginalWidth && originalWidth > 0) {
2081                _this.elements.outerWrapper.width(originalWidth);
2082            }
2083
2084            _this.unbindEvents();
2085
2086            if (!_this.$element.prop('disabled')) {
2087                _this.state.enabled = true;
2088
2089                // Not disabled, so... Removing disabled class
2090                _this.elements.outerWrapper.removeClass(_this.classes.disabled);
2091
2092                // Remove styles from items box
2093                // Fix incorrect height when refreshed is triggered with fewer options
2094                _this.$li = _this.elements.items.removeAttr('style').find('li');
2095
2096                _this.bindEvents();
2097            } else {
2098                _this.elements.outerWrapper.addClass(_this.classes.disabled);
2099
2100                if (_this.elements.input) {
2101                    _this.elements.input.prop('disabled', true);
2102                }
2103            }
2104
2105            _this.utils.triggerCallback('Activate', _this);
2106        },
2107
2108        /**
2109         * Generate classNames for elements
2110         *
2111         * @return {object} Classes object
2112         */
2113        getClassNames: function () {
2114            var _this = this;
2115            var customClass = _this.options.customClass;
2116            var classesObj = {};
2117
2118            $.each(classList.split(' '), function (i, currClass) {
2119                var c = customClass.prefix + currClass;
2120                classesObj[currClass.toLowerCase()] = customClass.camelCase ? c : _this.utils.toDash(c);
2121            });
2122
2123            classesObj.prefix = customClass.prefix;
2124
2125            return classesObj;
2126        },
2127
2128        /** Set the label text */
2129        setLabel: function () {
2130            var _this = this;
2131            var labelBuilder = _this.options.labelBuilder;
2132
2133            if (_this.state.multiple) {
2134                // Make sure currentValues is an array
2135                var currentValues = $.isArray(_this.state.currValue) ? _this.state.currValue : [_this.state.currValue];
2136                // I'm not happy with this, but currentValues can be an empty
2137                // array and we need to fallback to the default option.
2138                currentValues = currentValues.length === 0 ? [0] : currentValues;
2139
2140                var labelMarkup = $.map(currentValues, function (value) {
2141                    return $.grep(_this.lookupItems, function (item) {
2142                        return item.index === value;
2143                    })[0]; // we don't want nested arrays here
2144                });
2145
2146                labelMarkup = $.grep(labelMarkup, function (item) {
2147                    // Hide default (please choose) if more then one element were selected.
2148                    // If no option value were given value is set to option text by default
2149                    if (labelMarkup.length > 1 || labelMarkup.length === 0) {
2150                        return $.trim(item.value) !== '';
2151                    }
2152                    return item;
2153                });
2154
2155                labelMarkup = $.map(labelMarkup, function (item) {
2156                    return $.isFunction(labelBuilder)
2157                        ? labelBuilder(item)
2158                        : _this.utils.format(labelBuilder, item);
2159                });
2160
2161                // Limit the amount of selected values shown in label
2162                if (_this.options.multiple.maxLabelEntries) {
2163                    if (labelMarkup.length >= _this.options.multiple.maxLabelEntries + 1) {
2164                        labelMarkup = labelMarkup.slice(0, _this.options.multiple.maxLabelEntries);
2165                        labelMarkup.push(
2166                            $.isFunction(labelBuilder)
2167                                ? labelBuilder({ text: '...' })
2168                                : _this.utils.format(labelBuilder, { text: '...' }));
2169                    } else {
2170                        labelMarkup.slice(labelMarkup.length - 1);
2171                    }
2172                }
2173                _this.elements.label.html(labelMarkup.join(_this.options.multiple.separator));
2174
2175            } else {
2176                var currItem = _this.lookupItems[_this.state.currValue];
2177
2178                _this.elements.label.html(
2179                    $.isFunction(labelBuilder)
2180                        ? labelBuilder(currItem)
2181                        : _this.utils.format(labelBuilder, currItem)
2182                );
2183            }
2184        },
2185
2186        /** Get and save the available options */
2187        populate: function () {
2188            var _this = this;
2189            var $options = _this.$element.children();
2190            var $justOptions = _this.$element.find('option');
2191            var $selected = $justOptions.filter(':selected');
2192            var selectedIndex = $justOptions.index($selected);
2193            var currIndex = 0;
2194            var emptyValue = (_this.state.multiple ? [] : 0);
2195
2196            if ($selected.length > 1 && _this.state.multiple) {
2197                selectedIndex = [];
2198                $selected.each(function () {
2199                    selectedIndex.push($(this).index());
2200                });
2201            }
2202
2203            _this.state.currValue = (~selectedIndex ? selectedIndex : emptyValue);
2204            _this.state.selectedIdx = _this.state.currValue;
2205            _this.state.highlightedIdx = _this.state.currValue;
2206            _this.items = [];
2207            _this.lookupItems = [];
2208
2209            if ($options.length) {
2210                // Build options markup
2211                $options.each(function (i) {
2212                    var $elm = $(this);
2213
2214                    if ($elm.is('optgroup')) {
2215
2216                        var optionsGroup = {
2217                            element: $elm,
2218                            label: $elm.prop('label'),
2219                            groupDisabled: $elm.prop('disabled'),
2220                            items: []
2221                        };
2222
2223                        $elm.children().each(function (i) {
2224                            var $elm = $(this);
2225
2226                            optionsGroup.items[i] = _this.getItemData(currIndex, $elm, optionsGroup.groupDisabled || $elm.prop('disabled'));
2227
2228                            _this.lookupItems[currIndex] = optionsGroup.items[i];
2229
2230                            currIndex++;
2231                        });
2232
2233                        _this.items[i] = optionsGroup;
2234
2235                    } else {
2236
2237                        _this.items[i] = _this.getItemData(currIndex, $elm, $elm.prop('disabled'));
2238
2239                        _this.lookupItems[currIndex] = _this.items[i];
2240
2241                        currIndex++;
2242
2243                    }
2244                });
2245
2246                _this.setLabel();
2247                _this.elements.items.append(_this.elements.itemsScroll.html(_this.getItemsMarkup(_this.items)));
2248            }
2249        },
2250
2251        /**
2252         * Generate items object data
2253         * @param  {integer} index      - Current item index
2254         * @param  {node}    $elm       - Current element node
2255         * @param  {boolean} isDisabled - Current element disabled state
2256         * @return {object}               Item object
2257         */
2258        getItemData: function (index, $elm, isDisabled) {
2259            var _this = this;
2260
2261            return {
2262                index: index,
2263                element: $elm,
2264                value: $elm.val(),
2265                className: $elm.prop('class'),
2266                text: $elm.html(),
2267                slug: $.trim(_this.utils.replaceDiacritics($elm.html())),
2268                alt: $elm.attr('data-alt'),
2269                selected: $elm.prop('selected'),
2270                disabled: isDisabled
2271            };
2272        },
2273
2274        /**
2275         * Generate options markup
2276         *
2277         * @param  {object} items - Object containing all available options
2278         * @return {string}         HTML for the options box
2279         */
2280        getItemsMarkup: function (items) {
2281            var _this = this;
2282            var markup = '<ul>';
2283
2284            if ($.isFunction(_this.options.listBuilder) && _this.options.listBuilder) {
2285                items = _this.options.listBuilder(items);
2286            }
2287
2288            $.each(items, function (i, elm) {
2289                if (elm.label !== undefined) {
2290
2291                    markup += _this.utils.format('<ul class="{1}"><li class="{2}">{3}</li>',
2292                        _this.utils.arrayToClassname([
2293                            _this.classes.group,
2294                            elm.groupDisabled ? 'disabled' : '',
2295                            elm.element.prop('class')
2296                        ]),
2297                        _this.classes.grouplabel,
2298                        elm.element.prop('label')
2299                    );
2300
2301                    $.each(elm.items, function (i, elm) {
2302                        markup += _this.getItemMarkup(elm.index, elm);
2303                    });
2304
2305                    markup += '</ul>';
2306
2307                } else {
2308
2309                    markup += _this.getItemMarkup(elm.index, elm);
2310
2311                }
2312            });
2313
2314            return markup + '</ul>';
2315        },
2316
2317        /**
2318         * Generate every option markup
2319         *
2320         * @param  {number} index    - Index of current item
2321         * @param  {object} itemData - Current item
2322         * @return {string}            HTML for the option
2323         */
2324        getItemMarkup: function (index, itemData) {
2325            var _this = this;
2326            var itemBuilder = _this.options.optionsItemBuilder;
2327            // limit access to item data to provide a simple interface
2328            // to most relevant options.
2329            var filteredItemData = {
2330                value: itemData.value,
2331                text: itemData.text,
2332                slug: itemData.slug,
2333                index: itemData.index
2334            };
2335
2336            return _this.utils.format('<li data-index="{1}" class="{2}">{3}</li>',
2337                index,
2338                _this.utils.arrayToClassname([
2339                    itemData.className,
2340                    index === _this.items.length - 1 ? 'last' : '',
2341                    itemData.disabled ? 'disabled' : '',
2342                    itemData.selected ? 'selected' : ''
2343                ]),
2344                $.isFunction(itemBuilder)
2345                    ? _this.utils.format(itemBuilder(itemData, this.$element, index), itemData)
2346                    : _this.utils.format(itemBuilder, filteredItemData)
2347            );
2348        },
2349
2350        /** Remove events on the elements */
2351        unbindEvents: function () {
2352            var _this = this;
2353
2354            _this.elements.wrapper
2355                .add(_this.$element)
2356                .add(_this.elements.outerWrapper)
2357                .add(_this.elements.input)
2358                .off(eventNamespaceSuffix);
2359        },
2360
2361        /** Bind events on the elements */
2362        bindEvents: function () {
2363            var _this = this;
2364
2365            _this.elements.outerWrapper.on('mouseenter' + eventNamespaceSuffix + ' mouseleave' + eventNamespaceSuffix, function (e) {
2366                $(this).toggleClass(_this.classes.hover, e.type === 'mouseenter');
2367
2368                // Delay close effect when openOnHover is true
2369                if (_this.options.openOnHover) {
2370                    clearTimeout(_this.closeTimer);
2371
2372                    if (e.type === 'mouseleave') {
2373                        _this.closeTimer = setTimeout($.proxy(_this.close, _this), _this.options.hoverIntentTimeout);
2374                    } else {
2375                        _this.open();
2376                    }
2377                }
2378            });
2379
2380            // Toggle open/close
2381            _this.elements.wrapper.on('click' + eventNamespaceSuffix, function (e) {
2382                _this.state.opened ? _this.close() : _this.open(e);
2383            });
2384
2385            // Translate original element focus event to dummy input.
2386            // Disabled on mobile devices because the default option list isn't
2387            // shown due the fact that hidden input gets focused
2388            if (!(_this.options.nativeOnMobile && _this.utils.isMobile())) {
2389                _this.$element.on('focus' + eventNamespaceSuffix, function () {
2390                    _this.elements.input.focus();
2391                });
2392
2393                _this.elements.input
2394                    .prop({ tabindex: _this.originalTabindex, disabled: false })
2395                    .on('keydown' + eventNamespaceSuffix, $.proxy(_this.handleKeys, _this))
2396                    .on('focusin' + eventNamespaceSuffix, function (e) {
2397                        _this.elements.outerWrapper.addClass(_this.classes.focus);
2398
2399                        // Prevent the flicker when focusing out and back again in the browser window
2400                        _this.elements.input.one('blur', function () {
2401                            _this.elements.input.blur();
2402                        });
2403
2404                        if (_this.options.openOnFocus && !_this.state.opened) {
2405                            _this.open(e);
2406                        }
2407                    })
2408                    .on('focusout' + eventNamespaceSuffix, function () {
2409                        _this.elements.outerWrapper.removeClass(_this.classes.focus);
2410                    })
2411                    .on('input propertychange', function () {
2412                        var val = _this.elements.input.val();
2413                        var searchRegExp = new RegExp('^' + _this.utils.escapeRegExp(val), 'i');
2414
2415                        // Clear search
2416                        clearTimeout(_this.resetStr);
2417                        _this.resetStr = setTimeout(function () {
2418                            _this.elements.input.val('');
2419                        }, _this.options.keySearchTimeout);
2420
2421                        if (val.length) {
2422                            // Search in select options
2423                            $.each(_this.items, function (i, elm) {
2424                                if (elm.disabled) {
2425                                    return;
2426                                }
2427                                if (searchRegExp.test(elm.text) || searchRegExp.test(elm.slug)) {
2428                                    _this.highlight(i);
2429                                    return;
2430                                }
2431                                if (!elm.alt) {
2432                                    return;
2433                                }
2434                                var altItems = elm.alt.split('|');
2435                                for (var ai = 0; ai < altItems.length; ai++) {
2436                                    if (!altItems[ai]) {
2437                                        break;
2438                                    }
2439                                    if (searchRegExp.test(altItems[ai].trim())) {
2440                                        _this.highlight(i);
2441                                        return;
2442                                    }
2443                                }
2444                            });
2445                        }
2446                    });
2447            }
2448
2449            _this.$li.on({
2450                // Prevent <input> blur on Chrome
2451                mousedown: function (e) {
2452                    e.preventDefault();
2453                    e.stopPropagation();
2454                },
2455                click: function () {
2456                    _this.select($(this).data('index'));
2457
2458                    // Chrome doesn't close options box if select is wrapped with a label
2459                    // We need to 'return false' to avoid that
2460                    return false;
2461                }
2462            });
2463        },
2464
2465        /**
2466         * Behavior when keyboard keys is pressed
2467         *
2468         * @param {object} e - Event object
2469         */
2470        handleKeys: function (e) {
2471            var _this = this;
2472            var key = e.which;
2473            var keys = _this.options.keys;
2474
2475            var isPrevKey = $.inArray(key, keys.previous) > -1;
2476            var isNextKey = $.inArray(key, keys.next) > -1;
2477            var isSelectKey = $.inArray(key, keys.select) > -1;
2478            var isOpenKey = $.inArray(key, keys.open) > -1;
2479            var idx = _this.state.highlightedIdx;
2480            var isFirstOrLastItem = (isPrevKey && idx === 0) || (isNextKey && (idx + 1) === _this.items.length);
2481            var goToItem = 0;
2482
2483            // Enter / Space
2484            if (key === 13 || key === 32) {
2485                e.preventDefault();
2486            }
2487
2488            // If it's a directional key
2489            if (isPrevKey || isNextKey) {
2490                if (!_this.options.allowWrap && isFirstOrLastItem) {
2491                    return;
2492                }
2493
2494                if (isPrevKey) {
2495                    goToItem = _this.utils.previousEnabledItem(_this.lookupItems, idx);
2496                }
2497
2498                if (isNextKey) {
2499                    goToItem = _this.utils.nextEnabledItem(_this.lookupItems, idx);
2500                }
2501
2502                _this.highlight(goToItem);
2503            }
2504
2505            // Tab / Enter / ESC
2506            if (isSelectKey && _this.state.opened) {
2507                _this.select(idx);
2508
2509                if (!_this.state.multiple || !_this.options.multiple.keepMenuOpen) {
2510                    _this.close();
2511                }
2512
2513                return;
2514            }
2515
2516            // Space / Enter / Left / Up / Right / Down
2517            if (isOpenKey && !_this.state.opened) {
2518                _this.open();
2519            }
2520        },
2521
2522        /** Update the items object */
2523        refresh: function () {
2524            var _this = this;
2525
2526            _this.populate();
2527            _this.activate();
2528            _this.utils.triggerCallback('Refresh', _this);
2529        },
2530
2531        /** Set options box width/height */
2532        setOptionsDimensions: function () {
2533            var _this = this;
2534
2535            // Calculate options box height
2536            // Set a temporary class on the hidden parent of the element
2537            var hiddenChildren = _this.elements.items.closest(':visible').children(':hidden').addClass(_this.classes.tempshow);
2538            var maxHeight = _this.options.maxHeight;
2539            var itemsWidth = _this.elements.items.outerWidth();
2540            var wrapperWidth = _this.elements.wrapper.outerWidth() - (itemsWidth - _this.elements.items.width());
2541
2542            // Set the dimensions, minimum is wrapper width, expand for long items if option is true
2543            if (!_this.options.expandToItemText || wrapperWidth > itemsWidth) {
2544                _this.finalWidth = wrapperWidth;
2545            } else {
2546                // Make sure the scrollbar width is included
2547                _this.elements.items.css('overflow', 'scroll');
2548
2549                // Set a really long width for _this.elements.outerWrapper
2550                _this.elements.outerWrapper.width(9e4);
2551                _this.finalWidth = _this.elements.items.width();
2552                // Set scroll bar to auto
2553                _this.elements.items.css('overflow', '');
2554                _this.elements.outerWrapper.width('');
2555            }
2556
2557            _this.elements.items.width(_this.finalWidth).height() > maxHeight && _this.elements.items.height(maxHeight);
2558
2559            // Remove the temporary class
2560            hiddenChildren.removeClass(_this.classes.tempshow);
2561        },
2562
2563        /** Detect if the options box is inside the window */
2564        isInViewport: function () {
2565            var _this = this;
2566
2567            if (_this.options.forceRenderAbove === true) {
2568                _this.elements.outerWrapper.addClass(_this.classes.above);
2569            } else if (_this.options.forceRenderBelow === true) {
2570                _this.elements.outerWrapper.addClass(_this.classes.below);
2571            } else {
2572                var scrollTop = $win.scrollTop();
2573                var winHeight = $win.height();
2574                var uiPosX = _this.elements.outerWrapper.offset().top;
2575                var uiHeight = _this.elements.outerWrapper.outerHeight();
2576
2577                var fitsDown = (uiPosX + uiHeight + _this.itemsHeight) <= (scrollTop + winHeight);
2578                var fitsAbove = (uiPosX - _this.itemsHeight) > scrollTop;
2579
2580                // If it does not fit below, only render it
2581                // above it fit's there.
2582                // It's acceptable that the user needs to
2583                // scroll the viewport to see the cut off UI
2584                var renderAbove = !fitsDown && fitsAbove;
2585                var renderBelow = !renderAbove;
2586
2587                _this.elements.outerWrapper.toggleClass(_this.classes.above, renderAbove);
2588                _this.elements.outerWrapper.toggleClass(_this.classes.below, renderBelow);
2589            }
2590        },
2591
2592        /**
2593         * Detect if currently selected option is visible and scroll the options box to show it
2594         *
2595         * @param {Number|Array} index - Index of the selected items
2596         */
2597        detectItemVisibility: function (index) {
2598            var _this = this;
2599            var $filteredLi = _this.$li.filter('[data-index]');
2600
2601            if (_this.state.multiple) {
2602                // If index is an array, we can assume a multiple select and we
2603                // want to scroll to the uppermost selected item!
2604                // Math.min.apply(Math, index) returns the lowest entry in an Array.
2605                index = ($.isArray(index) && index.length === 0) ? 0 : index;
2606                index = $.isArray(index) ? Math.min.apply(Math, index) : index;
2607            }
2608
2609            var liHeight = $filteredLi.eq(index).outerHeight();
2610            var liTop = $filteredLi[index].offsetTop;
2611            var itemsScrollTop = _this.elements.itemsScroll.scrollTop();
2612            var scrollT = liTop + liHeight * 2;
2613
2614            _this.elements.itemsScroll.scrollTop(
2615                scrollT > itemsScrollTop + _this.itemsHeight ? scrollT - _this.itemsHeight :
2616                    liTop - liHeight < itemsScrollTop ? liTop - liHeight :
2617                        itemsScrollTop
2618            );
2619        },
2620
2621        /**
2622         * Open the select options box
2623         *
2624         * @param {Event} e - Event
2625         */
2626        open: function (e) {
2627            var _this = this;
2628
2629            if (_this.options.nativeOnMobile && _this.utils.isMobile()) {
2630                return false;
2631            }
2632
2633            _this.utils.triggerCallback('BeforeOpen', _this);
2634
2635            if (e) {
2636                e.preventDefault();
2637                if (_this.options.stopPropagation) {
2638                    e.stopPropagation();
2639                }
2640            }
2641
2642            if (_this.state.enabled) {
2643                _this.setOptionsDimensions();
2644
2645                // Find any other opened instances of select and close it
2646                $('.' + _this.classes.hideselect, '.' + _this.classes.open).children()[pluginName]('close');
2647
2648                _this.state.opened = true;
2649                _this.itemsHeight = _this.elements.items.outerHeight();
2650                _this.itemsInnerHeight = _this.elements.items.height();
2651
2652                // Toggle options box visibility
2653                _this.elements.outerWrapper.addClass(_this.classes.open);
2654
2655                // Give dummy input focus
2656                _this.elements.input.val('');
2657                if (e && e.type !== 'focusin') {
2658                    _this.elements.input.focus();
2659                }
2660
2661                // Delayed binds events on Document to make label clicks work
2662                setTimeout(function () {
2663                    $doc
2664                        .on('click' + eventNamespaceSuffix, $.proxy(_this.close, _this))
2665                        .on('scroll' + eventNamespaceSuffix, $.proxy(_this.isInViewport, _this));
2666                }, 1);
2667
2668                _this.isInViewport();
2669
2670                // Prevent window scroll when using mouse wheel inside items box
2671                if (_this.options.preventWindowScroll) {
2672                    /* istanbul ignore next */
2673                    $doc.on('mousewheel' + eventNamespaceSuffix + ' DOMMouseScroll' + eventNamespaceSuffix, '.' + _this.classes.scroll, function (e) {
2674                        var orgEvent = e.originalEvent;
2675                        var scrollTop = $(this).scrollTop();
2676                        var deltaY = 0;
2677
2678                        if ('detail' in orgEvent) { deltaY = orgEvent.detail * -1; }
2679                        if ('wheelDelta' in orgEvent) { deltaY = orgEvent.wheelDelta; }
2680                        if ('wheelDeltaY' in orgEvent) { deltaY = orgEvent.wheelDeltaY; }
2681                        if ('deltaY' in orgEvent) { deltaY = orgEvent.deltaY * -1; }
2682
2683                        if (scrollTop === (this.scrollHeight - _this.itemsInnerHeight) && deltaY < 0 || scrollTop === 0 && deltaY > 0) {
2684                            e.preventDefault();
2685                        }
2686                    });
2687                }
2688
2689                _this.detectItemVisibility(_this.state.selectedIdx);
2690
2691                _this.highlight(_this.state.multiple ? -1 : _this.state.selectedIdx);
2692
2693                _this.utils.triggerCallback('Open', _this);
2694            }
2695        },
2696
2697        /** Close the select options box */
2698        close: function () {
2699            var _this = this;
2700
2701            _this.utils.triggerCallback('BeforeClose', _this);
2702
2703            // Remove custom events on document
2704            $doc.off(eventNamespaceSuffix);
2705
2706            // Remove visible class to hide options box
2707            _this.elements.outerWrapper.removeClass(_this.classes.open);
2708
2709            _this.state.opened = false;
2710
2711            _this.utils.triggerCallback('Close', _this);
2712        },
2713
2714        /** Select current option and change the label */
2715        change: function () {
2716            var _this = this;
2717
2718            _this.utils.triggerCallback('BeforeChange', _this);
2719
2720            if (_this.state.multiple) {
2721                // Reset old selected
2722                $.each(_this.lookupItems, function (idx) {
2723                    _this.lookupItems[idx].selected = false;
2724                    _this.$element.find('option').prop('selected', false);
2725                });
2726
2727                // Set new selected
2728                $.each(_this.state.selectedIdx, function (idx, value) {
2729                    _this.lookupItems[value].selected = true;
2730                    _this.$element.find('option').eq(value).prop('selected', true);
2731                });
2732
2733                _this.state.currValue = _this.state.selectedIdx;
2734
2735                _this.setLabel();
2736
2737                _this.utils.triggerCallback('Change', _this);
2738            } else if (_this.state.currValue !== _this.state.selectedIdx) {
2739                // Apply changed value to original select
2740                _this.$element
2741                    .prop('selectedIndex', _this.state.currValue = _this.state.selectedIdx)
2742                    .data('value', _this.lookupItems[_this.state.selectedIdx].text);
2743
2744                // Change label text
2745                _this.setLabel();
2746
2747                _this.utils.triggerCallback('Change', _this);
2748            }
2749        },
2750
2751        /**
2752         * Highlight option
2753         * @param {number} index - Index of the options that will be highlighted
2754         */
2755        highlight: function (index) {
2756            var _this = this;
2757            var $filteredLi = _this.$li.filter('[data-index]').removeClass('highlighted');
2758
2759            _this.utils.triggerCallback('BeforeHighlight', _this);
2760
2761            // Parameter index is required and should not be a disabled item
2762            if (index === undefined || index === -1 || _this.lookupItems[index].disabled) {
2763                return;
2764            }
2765
2766            $filteredLi
2767                .eq(_this.state.highlightedIdx = index)
2768                .addClass('highlighted');
2769
2770            _this.detectItemVisibility(index);
2771
2772            _this.utils.triggerCallback('Highlight', _this);
2773        },
2774
2775        /**
2776         * Select option
2777         *
2778         * @param {number} index - Index of the option that will be selected
2779         */
2780        select: function (index) {
2781            var _this = this;
2782            var $filteredLi = _this.$li.filter('[data-index]');
2783
2784            _this.utils.triggerCallback('BeforeSelect', _this, index);
2785
2786            // Parameter index is required and should not be a disabled item
2787            if (index === undefined || index === -1 || _this.lookupItems[index].disabled) {
2788                return;
2789            }
2790
2791            if (_this.state.multiple) {
2792                // Make sure selectedIdx is an array
2793                _this.state.selectedIdx = $.isArray(_this.state.selectedIdx) ? _this.state.selectedIdx : [_this.state.selectedIdx];
2794
2795                var hasSelectedIndex = $.inArray(index, _this.state.selectedIdx);
2796                if (hasSelectedIndex !== -1) {
2797                    _this.state.selectedIdx.splice(hasSelectedIndex, 1);
2798                } else {
2799                    _this.state.selectedIdx.push(index);
2800                }
2801
2802                $filteredLi
2803                    .removeClass('selected')
2804                    .filter(function (index) {
2805                        return $.inArray(index, _this.state.selectedIdx) !== -1;
2806                    })
2807                    .addClass('selected');
2808            } else {
2809                $filteredLi
2810                    .removeClass('selected')
2811                    .eq(_this.state.selectedIdx = index)
2812                    .addClass('selected');
2813            }
2814
2815            if (!_this.state.multiple || !_this.options.multiple.keepMenuOpen) {
2816                _this.close();
2817            }
2818
2819            _this.change();
2820
2821            _this.utils.triggerCallback('Select', _this, index);
2822        },
2823
2824        /**
2825         * Unbind and remove
2826         *
2827         * @param {boolean} preserveData - Check if the data on the element should be removed too
2828         */
2829        destroy: function (preserveData) {
2830            var _this = this;
2831
2832            if (_this.state && _this.state.enabled) {
2833                _this.elements.items.add(_this.elements.wrapper).add(_this.elements.input).remove();
2834
2835                if (!preserveData) {
2836                    _this.$element.removeData(pluginName).removeData('value');
2837                }
2838
2839                _this.$element.prop('tabindex', _this.originalTabindex).off(eventNamespaceSuffix).off(_this.eventTriggers).unwrap().unwrap();
2840
2841                _this.state.enabled = false;
2842            }
2843        }
2844    };
2845
2846    // A really lightweight plugin wrapper around the constructor,
2847    // preventing against multiple instantiations
2848    $.fn[pluginName] = function (args) {
2849        return this.each(function () {
2850            var data = $.data(this, pluginName);
2851
2852            if (data && !data.disableOnMobile) {
2853                (typeof args === 'string' && data[args]) ? data[args]() : data.init(args);
2854            } else {
2855                $.data(this, pluginName, new Selectric(this, args));
2856            }
2857        });
2858    };
2859
2860    /**
2861     * Default plugin options
2862     *
2863     * @type {object}
2864     */
2865    $.fn[pluginName].defaults = {
2866        onChange: function (elm) { $(elm).change(); },
2867        maxHeight: 300,
2868        keySearchTimeout: 500,
2869        arrowButtonMarkup: '<b class="button">&#x25be;</b>',
2870        disableOnMobile: false,
2871        nativeOnMobile: true,
2872        openOnFocus: true,
2873        openOnHover: false,
2874        hoverIntentTimeout: 500,
2875        expandToItemText: false,
2876        responsive: false,
2877        preventWindowScroll: true,
2878        inheritOriginalWidth: false,
2879        allowWrap: true,
2880        forceRenderAbove: false,
2881        forceRenderBelow: false,
2882        stopPropagation: true,
2883        optionsItemBuilder: '{text}', // function(itemData, element, index)
2884        labelBuilder: '{text}', // function(currItem)
2885        listBuilder: false,    // function(items)
2886        keys: {
2887            previous: [37, 38],                 // Left / Up
2888            next: [39, 40],                 // Right / Down
2889            select: [9, 13, 27],              // Tab / Enter / Escape
2890            open: [13, 32, 37, 38, 39, 40], // Enter / Space / Left / Up / Right / Down
2891            close: [9, 27]                   // Tab / Escape
2892        },
2893        customClass: {
2894            prefix: pluginName,
2895            camelCase: false
2896        },
2897        multiple: {
2898            separator: ', ',
2899            keepMenuOpen: true,
2900            maxLabelEntries: false
2901        }
2902    };
2903}));
2904/*
2905     _ _      _       _
2906 ___| (_) ___| | __  (_)___
2907/ __| | |/ __| |/ /  | / __|
2908\__ \ | | (__|   < _ | \__ \
2909|___/_|_|\___|_|\_(_)/ |___/
2910                   |__/
2911
2912 Version: 1.6.0
2913  Author: Ken Wheeler
2914 Website: http://kenwheeler.github.io
2915    Docs: http://kenwheeler.github.io/slick
2916    Repo: http://github.com/kenwheeler/slick
2917  Issues: http://github.com/kenwheeler/slick/issues
2918
2919 */
2920/* global window, document, define, jQuery, setInterval, clearInterval */
2921(function (factory) {
2922    'use strict';
2923    if (typeof define === 'function' && define.amd) {
2924        define(['jquery'], factory);
2925    } else if (typeof exports !== 'undefined') {
2926        module.exports = factory(require('jquery'));
2927    } else {
2928        factory(jQuery);
2929    }
2930
2931}(function ($) {
2932    'use strict';
2933    var Slick = window.Slick || {};
2934
2935    Slick = (function () {
2936
2937        var instanceUid = 0;
2938
2939        function Slick(element, settings) {
2940
2941            var _ = this, dataSettings;
2942
2943            _.defaults = {
2944                accessibility: true,
2945                adaptiveHeight: false,
2946                appendArrows: $(element),
2947                appendDots: $(element),
2948                arrows: true,
2949                asNavFor: null,
2950                prevArrow: '<button type="button" data-role="none" class="slick-prev" aria-label="Previous" tabindex="0" role="button">Previous</button>',
2951                nextArrow: '<button type="button" data-role="none" class="slick-next" aria-label="Next" tabindex="0" role="button">Next</button>',
2952                autoplay: false,
2953                autoplaySpeed: 3000,
2954                centerMode: false,
2955                centerPadding: '50px',
2956                cssEase: 'ease',
2957                customPaging: function (slider, i) {
2958                    return $('<button type="button" data-role="none" role="button" tabindex="0" />').text(i + 1);
2959                },
2960                dots: false,
2961                dotsClass: 'slick-dots',
2962                draggable: true,
2963                easing: 'linear',
2964                edgeFriction: 0.35,
2965                fade: false,
2966                focusOnSelect: false,
2967                infinite: true,
2968                initialSlide: 0,
2969                lazyLoad: 'ondemand',
2970                mobileFirst: false,
2971                pauseOnHover: true,
2972                pauseOnFocus: true,
2973                pauseOnDotsHover: false,
2974                respondTo: 'window',
2975                responsive: null,
2976                rows: 1,
2977                rtl: false,
2978                slide: '',
2979                slidesPerRow: 1,
2980                slidesToShow: 1,
2981                slidesToScroll: 1,
2982                speed: 500,
2983                swipe: true,
2984                swipeToSlide: false,
2985                touchMove: true,
2986                touchThreshold: 5,
2987                useCSS: true,
2988                useTransform: true,
2989                variableWidth: false,
2990                vertical: false,
2991                verticalSwiping: false,
2992                waitForAnimate: true,
2993                zIndex: 1000
2994            };
2995
2996            _.initials = {
2997                animating: false,
2998                dragging: false,
2999                autoPlayTimer: null,
3000                currentDirection: 0,
3001                currentLeft: null,
3002                currentSlide: 0,
3003                direction: 1,
3004                $dots: null,
3005                listWidth: null,
3006                listHeight: null,
3007                loadIndex: 0,
3008                $nextArrow: null,
3009                $prevArrow: null,
3010                slideCount: null,
3011                slideWidth: null,
3012                $slideTrack: null,
3013                $slides: null,
3014                sliding: false,
3015                slideOffset: 0,
3016                swipeLeft: null,
3017                $list: null,
3018                touchObject: {},
3019                transformsEnabled: false,
vendor: 34,993 bytes, lines 3020-4173
3020                unslicked: false
3021            };
3022
3023            $.extend(_, _.initials);
3024
3025            _.activeBreakpoint = null;
3026            _.animType = null;
3027            _.animProp = null;
3028            _.breakpoints = [];
3029            _.breakpointSettings = [];
3030            _.cssTransitions = false;
3031            _.focussed = false;
3032            _.interrupted = false;
3033            _.hidden = 'hidden';
3034            _.paused = true;
3035            _.positionProp = null;
3036            _.respondTo = null;
3037            _.rowCount = 1;
3038            _.shouldClick = true;
3039            _.$slider = $(element);
3040            _.$slidesCache = null;
3041            _.transformType = null;
3042            _.transitionType = null;
3043            _.visibilityChange = 'visibilitychange';
3044            _.windowWidth = 0;
3045            _.windowTimer = null;
3046
3047            dataSettings = $(element).data('slick') || {};
3048
3049            _.options = $.extend({}, _.defaults, settings, dataSettings);
3050
3051            _.currentSlide = _.options.initialSlide;
3052
3053            _.originalSettings = _.options;
3054
3055            if (typeof document.mozHidden !== 'undefined') {
3056                _.hidden = 'mozHidden';
3057                _.visibilityChange = 'mozvisibilitychange';
3058            } else if (typeof document.webkitHidden !== 'undefined') {
3059                _.hidden = 'webkitHidden';
3060                _.visibilityChange = 'webkitvisibilitychange';
3061            }
3062
3063            _.autoPlay = $.proxy(_.autoPlay, _);
3064            _.autoPlayClear = $.proxy(_.autoPlayClear, _);
3065            _.autoPlayIterator = $.proxy(_.autoPlayIterator, _);
3066            _.changeSlide = $.proxy(_.changeSlide, _);
3067            _.clickHandler = $.proxy(_.clickHandler, _);
3068            _.selectHandler = $.proxy(_.selectHandler, _);
3069            _.setPosition = $.proxy(_.setPosition, _);
3070            _.swipeHandler = $.proxy(_.swipeHandler, _);
3071            _.dragHandler = $.proxy(_.dragHandler, _);
3072            _.keyHandler = $.proxy(_.keyHandler, _);
3073
3074            _.instanceUid = instanceUid++;
3075
3076            // A simple way to check for HTML strings
3077            // Strict HTML recognition (must start with <)
3078            // Extracted from jQuery v1.11 source
3079            _.htmlExpr = /^(?:\s*(<[\w\W]+>)[^>]*)$/;
3080
3081
3082            _.registerBreakpoints();
3083            _.init(true);
3084
3085        }
3086
3087        return Slick;
3088
3089    }());
3090
3091    Slick.prototype.activateADA = function () {
3092        var _ = this;
3093
3094        _.$slideTrack.find('.slick-active').attr({
3095            'aria-hidden': 'false'
3096        }).find('a, input, button, select').attr({
3097            'tabindex': '0'
3098        });
3099
3100    };
3101
3102    Slick.prototype.addSlide = Slick.prototype.slickAdd = function (markup, index, addBefore) {
3103
3104        var _ = this;
3105
3106        if (typeof (index) === 'boolean') {
3107            addBefore = index;
3108            index = null;
3109        } else if (index < 0 || (index >= _.slideCount)) {
3110            return false;
3111        }
3112
3113        _.unload();
3114
3115        if (typeof (index) === 'number') {
3116            if (index === 0 && _.$slides.length === 0) {
3117                $(markup).appendTo(_.$slideTrack);
3118            } else if (addBefore) {
3119                $(markup).insertBefore(_.$slides.eq(index));
3120            } else {
3121                $(markup).insertAfter(_.$slides.eq(index));
3122            }
3123        } else {
3124            if (addBefore === true) {
3125                $(markup).prependTo(_.$slideTrack);
3126            } else {
3127                $(markup).appendTo(_.$slideTrack);
3128            }
3129        }
3130
3131        _.$slides = _.$slideTrack.children(this.options.slide);
3132
3133        _.$slideTrack.children(this.options.slide).detach();
3134
3135        _.$slideTrack.append(_.$slides);
3136
3137        _.$slides.each(function (index, element) {
3138            $(element).attr('data-slick-index', index);
3139        });
3140
3141        _.$slidesCache = _.$slides;
3142
3143        _.reinit();
3144
3145    };
3146
3147    Slick.prototype.animateHeight = function () {
3148        var _ = this;
3149        if (_.options.slidesToShow === 1 && _.options.adaptiveHeight === true && _.options.vertical === false) {
3150            var targetHeight = _.$slides.eq(_.currentSlide).outerHeight(true);
3151            _.$list.animate({
3152                height: targetHeight
3153            }, _.options.speed);
3154        }
3155    };
3156
3157    Slick.prototype.animateSlide = function (targetLeft, callback) {
3158
3159        var animProps = {},
3160            _ = this;
3161
3162        _.animateHeight();
3163
3164        if (_.options.rtl === true && _.options.vertical === false) {
3165            targetLeft = -targetLeft;
3166        }
3167        if (_.transformsEnabled === false) {
3168            if (_.options.vertical === false) {
3169                _.$slideTrack.animate({
3170                    left: targetLeft
3171                }, _.options.speed, _.options.easing, callback);
3172            } else {
3173                _.$slideTrack.animate({
3174                    top: targetLeft
3175                }, _.options.speed, _.options.easing, callback);
3176            }
3177
3178        } else {
3179
3180            if (_.cssTransitions === false) {
3181                if (_.options.rtl === true) {
3182                    _.currentLeft = -(_.currentLeft);
3183                }
3184                $({
3185                    animStart: _.currentLeft
3186                }).animate({
3187                    animStart: targetLeft
3188                }, {
3189                    duration: _.options.speed,
3190                    easing: _.options.easing,
3191                    step: function (now) {
3192                        now = Math.ceil(now);
3193                        if (_.options.vertical === false) {
3194                            animProps[_.animType] = 'translate(' +
3195                                now + 'px, 0px)';
3196                            _.$slideTrack.css(animProps);
3197                        } else {
3198                            animProps[_.animType] = 'translate(0px,' +
3199                                now + 'px)';
3200                            _.$slideTrack.css(animProps);
3201                        }
3202                    },
3203                    complete: function () {
3204                        if (callback) {
3205                            callback.call();
3206                        }
3207                    }
3208                });
3209
3210            } else {
3211
3212                _.applyTransition();
3213                targetLeft = Math.ceil(targetLeft);
3214
3215                if (_.options.vertical === false) {
3216                    animProps[_.animType] = 'translate3d(' + targetLeft + 'px, 0px, 0px)';
3217                } else {
3218                    animProps[_.animType] = 'translate3d(0px,' + targetLeft + 'px, 0px)';
3219                }
3220                _.$slideTrack.css(animProps);
3221
3222                if (callback) {
3223                    setTimeout(function () {
3224
3225                        _.disableTransition();
3226
3227                        callback.call();
3228                    }, _.options.speed);
3229                }
3230
3231            }
3232
3233        }
3234
3235    };
3236
3237    Slick.prototype.getNavTarget = function () {
3238
3239        var _ = this,
3240            asNavFor = _.options.asNavFor;
3241
3242        if (asNavFor && asNavFor !== null) {
3243            asNavFor = $(asNavFor).not(_.$slider);
3244        }
3245
3246        return asNavFor;
3247
3248    };
3249
3250    Slick.prototype.asNavFor = function (index) {
3251
3252        var _ = this,
3253            asNavFor = _.getNavTarget();
3254
3255        if (asNavFor !== null && typeof asNavFor === 'object') {
3256            asNavFor.each(function () {
3257                var target = $(this).slick('getSlick');
3258                if (!target.unslicked) {
3259                    target.slideHandler(index, true);
3260                }
3261            });
3262        }
3263
3264    };
3265
3266    Slick.prototype.applyTransition = function (slide) {
3267
3268        var _ = this,
3269            transition = {};
3270
3271        if (_.options.fade === false) {
3272            transition[_.transitionType] = _.transformType + ' ' + _.options.speed + 'ms ' + _.options.cssEase;
3273        } else {
3274            transition[_.transitionType] = 'opacity ' + _.options.speed + 'ms ' + _.options.cssEase;
3275        }
3276
3277        if (_.options.fade === false) {
3278            _.$slideTrack.css(transition);
3279        } else {
3280            _.$slides.eq(slide).css(transition);
3281        }
3282
3283    };
3284
3285    Slick.prototype.autoPlay = function () {
3286
3287        var _ = this;
3288
3289        _.autoPlayClear();
3290
3291        if (_.slideCount > _.options.slidesToShow) {
3292            _.autoPlayTimer = setInterval(_.autoPlayIterator, _.options.autoplaySpeed);
3293        }
3294
3295    };
3296
3297    Slick.prototype.autoPlayClear = function () {
3298
3299        var _ = this;
3300
3301        if (_.autoPlayTimer) {
3302            clearInterval(_.autoPlayTimer);
3303        }
3304
3305    };
3306
3307    Slick.prototype.autoPlayIterator = function () {
3308
3309        var _ = this,
3310            slideTo = _.currentSlide + _.options.slidesToScroll;
3311
3312        if (!_.paused && !_.interrupted && !_.focussed) {
3313
3314            if (_.options.infinite === false) {
3315
3316                if (_.direction === 1 && (_.currentSlide + 1) === (_.slideCount - 1)) {
3317                    _.direction = 0;
3318                }
3319
3320                else if (_.direction === 0) {
3321
3322                    slideTo = _.currentSlide - _.options.slidesToScroll;
3323
3324                    if (_.currentSlide - 1 === 0) {
3325                        _.direction = 1;
3326                    }
3327
3328                }
3329
3330            }
3331
3332            _.slideHandler(slideTo);
3333
3334        }
3335
3336    };
3337
3338    Slick.prototype.buildArrows = function () {
3339
3340        var _ = this;
3341
3342        if (_.options.arrows === true) {
3343
3344            _.$prevArrow = $(_.options.prevArrow).addClass('slick-arrow');
3345            _.$nextArrow = $(_.options.nextArrow).addClass('slick-arrow');
3346
3347            if (_.slideCount > _.options.slidesToShow) {
3348
3349                _.$prevArrow.removeClass('slick-hidden').removeAttr('aria-hidden tabindex');
3350                _.$nextArrow.removeClass('slick-hidden').removeAttr('aria-hidden tabindex');
3351
3352                if (_.htmlExpr.test(_.options.prevArrow)) {
3353                    _.$prevArrow.prependTo(_.options.appendArrows);
3354                }
3355
3356                if (_.htmlExpr.test(_.options.nextArrow)) {
3357                    _.$nextArrow.appendTo(_.options.appendArrows);
3358                }
3359
3360                if (_.options.infinite !== true) {
3361                    _.$prevArrow
3362                        .addClass('slick-disabled')
3363                        .attr('aria-disabled', 'true');
3364                }
3365
3366            } else {
3367
3368                _.$prevArrow.add(_.$nextArrow)
3369
3370                    .addClass('slick-hidden')
3371                    .attr({
3372                        'aria-disabled': 'true',
3373                        'tabindex': '-1'
3374                    });
3375
3376            }
3377
3378        }
3379
3380    };
3381
3382    Slick.prototype.buildDots = function () {
3383
3384        var _ = this,
3385            i, dot;
3386
3387        if (_.options.dots === true && _.slideCount > _.options.slidesToShow) {
3388
3389            _.$slider.addClass('slick-dotted');
3390
3391            dot = $('<ul />').addClass(_.options.dotsClass);
3392
3393            for (i = 0; i <= _.getDotCount(); i += 1) {
3394                dot.append($('<li />').append(_.options.customPaging.call(this, _, i)));
3395            }
3396
3397            _.$dots = dot.appendTo(_.options.appendDots);
3398
3399            _.$dots.find('li').first().addClass('slick-active').attr('aria-hidden', 'false');
3400
3401        }
3402
3403    };
3404
3405    Slick.prototype.buildOut = function () {
3406
3407        var _ = this;
3408
3409        _.$slides =
3410            _.$slider
3411                .children(_.options.slide + ':not(.slick-cloned)')
3412                .addClass('slick-slide');
3413
3414        _.slideCount = _.$slides.length;
3415
3416        _.$slides.each(function (index, element) {
3417            $(element)
3418                .attr('data-slick-index', index)
3419                .data('originalStyling', $(element).attr('style') || '');
3420        });
3421
3422        _.$slider.addClass('slick-slider');
3423
3424        _.$slideTrack = (_.slideCount === 0) ?
3425            $('<div class="slick-track"/>').appendTo(_.$slider) :
3426            _.$slides.wrapAll('<div class="slick-track"/>').parent();
3427
3428        _.$list = _.$slideTrack.wrap(
3429            '<div aria-live="polite" class="slick-list"/>').parent();
3430        _.$slideTrack.css('opacity', 0);
3431
3432        if (_.options.centerMode === true || _.options.swipeToSlide === true) {
3433            _.options.slidesToScroll = 1;
3434        }
3435
3436        $('img[data-lazy]', _.$slider).not('[src]').addClass('slick-loading');
3437
3438        _.setupInfinite();
3439
3440        _.buildArrows();
3441
3442        _.buildDots();
3443
3444        _.updateDots();
3445
3446
3447        _.setSlideClasses(typeof _.currentSlide === 'number' ? _.currentSlide : 0);
3448
3449        if (_.options.draggable === true) {
3450            _.$list.addClass('draggable');
3451        }
3452
3453    };
3454
3455    Slick.prototype.buildRows = function () {
3456
3457        var _ = this, a, b, c, newSlides, numOfSlides, originalSlides, slidesPerSection;
3458
3459        newSlides = document.createDocumentFragment();
3460        originalSlides = _.$slider.children();
3461
3462        if (_.options.rows > 1) {
3463
3464            slidesPerSection = _.options.slidesPerRow * _.options.rows;
3465            numOfSlides = Math.ceil(
3466                originalSlides.length / slidesPerSection
3467            );
3468
3469            for (a = 0; a < numOfSlides; a++) {
3470                var slide = document.createElement('div');
3471                for (b = 0; b < _.options.rows; b++) {
3472                    var row = document.createElement('div');
3473                    for (c = 0; c < _.options.slidesPerRow; c++) {
3474                        var target = (a * slidesPerSection + ((b * _.options.slidesPerRow) + c));
3475                        if (originalSlides.get(target)) {
3476                            row.appendChild(originalSlides.get(target));
3477                        }
3478                    }
3479                    slide.appendChild(row);
3480                }
3481                newSlides.appendChild(slide);
3482            }
3483
3484            _.$slider.empty().append(newSlides);
3485            _.$slider.children().children().children()
3486                .css({
3487                    'width': (100 / _.options.slidesPerRow) + '%',
3488                    'display': 'inline-block'
3489                });
3490
3491        }
3492
3493    };
3494
3495    Slick.prototype.checkResponsive = function (initial, forceUpdate) {
3496
3497        var _ = this,
3498            breakpoint, targetBreakpoint, respondToWidth, triggerBreakpoint = false;
3499        var sliderWidth = _.$slider.width();
3500        var windowWidth = window.innerWidth || $(window).width();
3501
3502        if (_.respondTo === 'window') {
3503            respondToWidth = windowWidth;
3504        } else if (_.respondTo === 'slider') {
3505            respondToWidth = sliderWidth;
3506        } else if (_.respondTo === 'min') {
3507            respondToWidth = Math.min(windowWidth, sliderWidth);
3508        }
3509
3510        if (_.options.responsive &&
3511            _.options.responsive.length &&
3512            _.options.responsive !== null) {
3513
3514            targetBreakpoint = null;
3515
3516            for (breakpoint in _.breakpoints) {
3517                if (_.breakpoints.hasOwnProperty(breakpoint)) {
3518                    if (_.originalSettings.mobileFirst === false) {
3519                        if (respondToWidth < _.breakpoints[breakpoint]) {
3520                            targetBreakpoint = _.breakpoints[breakpoint];
3521                        }
3522                    } else {
3523                        if (respondToWidth > _.breakpoints[breakpoint]) {
3524                            targetBreakpoint = _.breakpoints[breakpoint];
3525                        }
3526                    }
3527                }
3528            }
3529
3530            if (targetBreakpoint !== null) {
3531                if (_.activeBreakpoint !== null) {
3532                    if (targetBreakpoint !== _.activeBreakpoint || forceUpdate) {
3533                        _.activeBreakpoint =
3534                            targetBreakpoint;
3535                        if (_.breakpointSettings[targetBreakpoint] === 'unslick') {
3536                            _.unslick(targetBreakpoint);
3537                        } else {
3538                            _.options = $.extend({}, _.originalSettings,
3539                                _.breakpointSettings[
3540                                targetBreakpoint]);
3541                            if (initial === true) {
3542                                _.currentSlide = _.options.initialSlide;
3543                            }
3544                            _.refresh(initial);
3545                        }
3546                        triggerBreakpoint = targetBreakpoint;
3547                    }
3548                } else {
3549                    _.activeBreakpoint = targetBreakpoint;
3550                    if (_.breakpointSettings[targetBreakpoint] === 'unslick') {
3551                        _.unslick(targetBreakpoint);
3552                    } else {
3553                        _.options = $.extend({}, _.originalSettings,
3554                            _.breakpointSettings[
3555                            targetBreakpoint]);
3556                        if (initial === true) {
3557                            _.currentSlide = _.options.initialSlide;
3558                        }
3559                        _.refresh(initial);
3560                    }
3561                    triggerBreakpoint = targetBreakpoint;
3562                }
3563            } else {
3564                if (_.activeBreakpoint !== null) {
3565                    _.activeBreakpoint = null;
3566                    _.options = _.originalSettings;
3567                    if (initial === true) {
3568                        _.currentSlide = _.options.initialSlide;
3569                    }
3570                    _.refresh(initial);
3571                    triggerBreakpoint = targetBreakpoint;
3572                }
3573            }
3574
3575            // only trigger breakpoints during an actual break. not on initialize.
3576            if (!initial && triggerBreakpoint !== false) {
3577                _.$slider.trigger('breakpoint', [_, triggerBreakpoint]);
3578            }
3579        }
3580
3581    };
3582
3583    Slick.prototype.changeSlide = function (event, dontAnimate) {
3584
3585        var _ = this,
3586            $target = $(event.currentTarget),
3587            indexOffset, slideOffset, unevenOffset;
3588
3589        // If target is a link, prevent default action.
3590        if ($target.is('a')) {
3591            event.preventDefault();
3592        }
3593
3594        // If target is not the <li> element (ie: a child), find the <li>.
3595        if (!$target.is('li')) {
3596            $target = $target.closest('li');
3597        }
3598
3599        unevenOffset = (_.slideCount % _.options.slidesToScroll !== 0);
3600        indexOffset = unevenOffset ? 0 : (_.slideCount - _.currentSlide) % _.options.slidesToScroll;
3601
3602        switch (event.data.message) {
3603
3604            case 'previous':
3605                slideOffset = indexOffset === 0 ? _.options.slidesToScroll : _.options.slidesToShow - indexOffset;
3606                if (_.slideCount > _.options.slidesToShow) {
3607                    _.slideHandler(_.currentSlide - slideOffset, false, dontAnimate);
3608                }
3609                break;
3610
3611            case 'next':
3612                slideOffset = indexOffset === 0 ? _.options.slidesToScroll : indexOffset;
3613                if (_.slideCount > _.options.slidesToShow) {
3614                    _.slideHandler(_.currentSlide + slideOffset, false, dontAnimate);
3615                }
3616                break;
3617
3618            case 'index':
3619                var index = event.data.index === 0 ? 0 :
3620                    event.data.index || $target.index() * _.options.slidesToScroll;
3621
3622                _.slideHandler(_.checkNavigable(index), false, dontAnimate);
3623                $target.children().trigger('focus');
3624                break;
3625
3626            default:
3627                return;
3628        }
3629
3630    };
3631
3632    Slick.prototype.checkNavigable = function (index) {
3633
3634        var _ = this,
3635            navigables, prevNavigable;
3636
3637        navigables = _.getNavigableIndexes();
3638        prevNavigable = 0;
3639        if (index > navigables[navigables.length - 1]) {
3640            index = navigables[navigables.length - 1];
3641        } else {
3642            for (var n in navigables) {
3643                if (index < navigables[n]) {
3644                    index = prevNavigable;
3645                    break;
3646                }
3647                prevNavigable = navigables[n];
3648            }
3649        }
3650
3651        return index;
3652    };
3653
3654    Slick.prototype.cleanUpEvents = function () {
3655
3656        var _ = this;
3657
3658        if (_.options.dots && _.$dots !== null) {
3659
3660            $('li', _.$dots)
3661                .off('click.slick', _.changeSlide)
3662                .off('mouseenter.slick', $.proxy(_.interrupt, _, true))
3663                .off('mouseleave.slick', $.proxy(_.interrupt, _, false));
3664
3665        }
3666
3667        _.$slider.off('focus.slick blur.slick');
3668
3669        if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) {
3670            _.$prevArrow && _.$prevArrow.off('click.slick', _.changeSlide);
3671            _.$nextArrow && _.$nextArrow.off('click.slick', _.changeSlide);
3672        }
3673
3674        _.$list.off('touchstart.slick mousedown.slick', _.swipeHandler);
3675        _.$list.off('touchmove.slick mousemove.slick', _.swipeHandler);
3676        _.$list.off('touchend.slick mouseup.slick', _.swipeHandler);
3677        _.$list.off('touchcancel.slick mouseleave.slick', _.swipeHandler);
3678
3679        _.$list.off('click.slick', _.clickHandler);
3680
3681        $(document).off(_.visibilityChange, _.visibility);
3682
3683        _.cleanUpSlideEvents();
3684
3685        if (_.options.accessibility === true) {
3686            _.$list.off('keydown.slick', _.keyHandler);
3687        }
3688
3689        if (_.options.focusOnSelect === true) {
3690            $(_.$slideTrack).children().off('click.slick', _.selectHandler);
3691        }
3692
3693        $(window).off('orientationchange.slick.slick-' + _.instanceUid, _.orientationChange);
3694
3695        $(window).off('resize.slick.slick-' + _.instanceUid, _.resize);
3696
3697        $('[draggable!=true]', _.$slideTrack).off('dragstart', _.preventDefault);
3698
3699        $(window).off('load.slick.slick-' + _.instanceUid, _.setPosition);
3700        $(document).off('ready.slick.slick-' + _.instanceUid, _.setPosition);
3701
3702    };
3703
3704    Slick.prototype.cleanUpSlideEvents = function () {
3705
3706        var _ = this;
3707
3708        _.$list.off('mouseenter.slick', $.proxy(_.interrupt, _, true));
3709        _.$list.off('mouseleave.slick', $.proxy(_.interrupt, _, false));
3710
3711    };
3712
3713    Slick.prototype.cleanUpRows = function () {
3714
3715        var _ = this, originalSlides;
3716
3717        if (_.options.rows > 1) {
3718            originalSlides = _.$slides.children().children();
3719            originalSlides.removeAttr('style');
3720            _.$slider.empty().append(originalSlides);
3721        }
3722
3723    };
3724
3725    Slick.prototype.clickHandler = function (event) {
3726
3727        var _ = this;
3728
3729        if (_.shouldClick === false) {
3730            event.stopImmediatePropagation();
3731            event.stopPropagation();
3732            event.preventDefault();
3733        }
3734
3735    };
3736
3737    Slick.prototype.destroy = function (refresh) {
3738
3739        var _ = this;
3740
3741        _.autoPlayClear();
3742
3743        _.touchObject = {};
3744
3745        _.cleanUpEvents();
3746
3747        $('.slick-cloned', _.$slider).detach();
3748
3749        if (_.$dots) {
3750            _.$dots.remove();
3751        }
3752
3753
3754        if (_.$prevArrow && _.$prevArrow.length) {
3755
3756            _.$prevArrow
3757                .removeClass('slick-disabled slick-arrow slick-hidden')
3758                .removeAttr('aria-hidden aria-disabled tabindex')
3759                .css('display', '');
3760
3761            if (_.htmlExpr.test(_.options.prevArrow)) {
3762                _.$prevArrow.remove();
3763            }
3764        }
3765
3766        if (_.$nextArrow && _.$nextArrow.length) {
3767
3768            _.$nextArrow
3769                .removeClass('slick-disabled slick-arrow slick-hidden')
3770                .removeAttr('aria-hidden aria-disabled tabindex')
3771                .css('display', '');
3772
3773            if (_.htmlExpr.test(_.options.nextArrow)) {
3774                _.$nextArrow.remove();
3775            }
3776
3777        }
3778
3779
3780        if (_.$slides) {
3781
3782            _.$slides
3783                .removeClass('slick-slide slick-active slick-center slick-visible slick-current')
3784                .removeAttr('aria-hidden')
3785                .removeAttr('data-slick-index')
3786                .each(function () {
3787                    $(this).attr('style', $(this).data('originalStyling'));
3788                });
3789
3790            _.$slideTrack.children(this.options.slide).detach();
3791
3792            _.$slideTrack.detach();
3793
3794            _.$list.detach();
3795
3796            _.$slider.append(_.$slides);
3797        }
3798
3799        _.cleanUpRows();
3800
3801        _.$slider.removeClass('slick-slider');
3802        _.$slider.removeClass('slick-initialized');
3803        _.$slider.removeClass('slick-dotted');
3804
3805        _.unslicked = true;
3806
3807        if (!refresh) {
3808            _.$slider.trigger('destroy', [_]);
3809        }
3810
3811    };
3812
3813    Slick.prototype.disableTransition = function (slide) {
3814
3815        var _ = this,
3816            transition = {};
3817
3818        transition[_.transitionType] = '';
3819
3820        if (_.options.fade === false) {
3821            _.$slideTrack.css(transition);
3822        } else {
3823            _.$slides.eq(slide).css(transition);
3824        }
3825
3826    };
3827
3828    Slick.prototype.fadeSlide = function (slideIndex, callback) {
3829
3830        var _ = this;
3831
3832        if (_.cssTransitions === false) {
3833
3834            _.$slides.eq(slideIndex).css({
3835                zIndex: _.options.zIndex
3836            });
3837
3838            _.$slides.eq(slideIndex).animate({
3839                opacity: 1
3840            }, _.options.speed, _.options.easing, callback);
3841
3842        } else {
3843
3844            _.applyTransition(slideIndex);
3845
3846            _.$slides.eq(slideIndex).css({
3847                opacity: 1,
3848                zIndex: _.options.zIndex
3849            });
3850
3851            if (callback) {
3852                setTimeout(function () {
3853
3854                    _.disableTransition(slideIndex);
3855
3856                    callback.call();
3857                }, _.options.speed);
3858            }
3859
3860        }
3861
3862    };
3863
3864    Slick.prototype.fadeSlideOut = function (slideIndex) {
3865
3866        var _ = this;
3867
3868        if (_.cssTransitions === false) {
3869
3870            _.$slides.eq(slideIndex).animate({
3871                opacity: 0,
3872                zIndex: _.options.zIndex - 2
3873            }, _.options.speed, _.options.easing);
3874
3875        } else {
3876
3877            _.applyTransition(slideIndex);
3878
3879            _.$slides.eq(slideIndex).css({
3880                opacity: 0,
3881                zIndex: _.options.zIndex - 2
3882            });
3883
3884        }
3885
3886    };
3887
3888    Slick.prototype.filterSlides = Slick.prototype.slickFilter = function (filter) {
3889
3890        var _ = this;
3891
3892        if (filter !== null) {
3893
3894            _.$slidesCache = _.$slides;
3895
3896            _.unload();
3897
3898            _.$slideTrack.children(this.options.slide).detach();
3899
3900            _.$slidesCache.filter(filter).appendTo(_.$slideTrack);
3901
3902            _.reinit();
3903
3904        }
3905
3906    };
3907
3908    Slick.prototype.focusHandler = function () {
3909
3910        var _ = this;
3911
3912        _.$slider
3913            .off('focus.slick blur.slick')
3914            .on('focus.slick blur.slick',
3915                '*:not(.slick-arrow)', function (event) {
3916
3917                    event.stopImmediatePropagation();
3918                    var $sf = $(this);
3919
3920                    setTimeout(function () {
3921
3922                        if (_.options.pauseOnFocus) {
3923                            _.focussed = $sf.is(':focus');
3924                            _.autoPlay();
3925                        }
3926
3927                    }, 0);
3928
3929                });
3930    };
3931
3932    Slick.prototype.getCurrent = Slick.prototype.slickCurrentSlide = function () {
3933
3934        var _ = this;
3935        return _.currentSlide;
3936
3937    };
3938
3939    Slick.prototype.getDotCount = function () {
3940
3941        var _ = this;
3942
3943        var breakPoint = 0;
3944        var counter = 0;
3945        var pagerQty = 0;
3946
3947        if (_.options.infinite === true) {
3948            while (breakPoint < _.slideCount) {
3949                ++pagerQty;
3950                breakPoint = counter + _.options.slidesToScroll;
3951                counter += _.options.slidesToScroll <= _.options.slidesToShow ? _.options.slidesToScroll : _.options.slidesToShow;
3952            }
3953        } else if (_.options.centerMode === true) {
3954            pagerQty = _.slideCount;
3955        } else if (!_.options.asNavFor) {
3956            pagerQty = 1 + Math.ceil((_.slideCount - _.options.slidesToShow) / _.options.slidesToScroll);
3957        } else {
3958            while (breakPoint < _.slideCount) {
3959                ++pagerQty;
3960                breakPoint = counter + _.options.slidesToScroll;
3961                counter += _.options.slidesToScroll <= _.options.slidesToShow ? _.options.slidesToScroll : _.options.slidesToShow;
3962            }
3963        }
3964
3965        return pagerQty - 1;
3966
3967    };
3968
3969    Slick.prototype.getLeft = function (slideIndex) {
3970
3971        var _ = this,
3972            targetLeft,
3973            verticalHeight,
3974            verticalOffset = 0,
3975            targetSlide;
3976
3977        _.slideOffset = 0;
3978        verticalHeight = _.$slides.first().outerHeight(true);
3979
3980        if (_.options.infinite === true) {
3981            if (_.slideCount > _.options.slidesToShow) {
3982                _.slideOffset = (_.slideWidth * _.options.slidesToShow) * -1;
3983                verticalOffset = (verticalHeight * _.options.slidesToShow) * -1;
3984            }
3985            if (_.slideCount % _.options.slidesToScroll !== 0) {
3986                if (slideIndex + _.options.slidesToScroll > _.slideCount && _.slideCount > _.options.slidesToShow) {
3987                    if (slideIndex > _.slideCount) {
3988                        _.slideOffset = ((_.options.slidesToShow - (slideIndex - _.slideCount)) * _.slideWidth) * -1;
3989                        verticalOffset = ((_.options.slidesToShow - (slideIndex - _.slideCount)) * verticalHeight) * -1;
3990                    } else {
3991                        _.slideOffset = ((_.slideCount % _.options.slidesToScroll) * _.slideWidth) * -1;
3992                        verticalOffset = ((_.slideCount % _.options.slidesToScroll) * verticalHeight) * -1;
3993                    }
3994                }
3995            }
3996        } else {
3997            if (slideIndex + _.options.slidesToShow > _.slideCount) {
3998                _.slideOffset = ((slideIndex + _.options.slidesToShow) - _.slideCount) * _.slideWidth;
3999                verticalOffset = ((slideIndex + _.options.slidesToShow) - _.slideCount) * verticalHeight;
4000            }
4001        }
4002
4003        if (_.slideCount <= _.options.slidesToShow) {
4004            _.slideOffset = 0;
4005            verticalOffset = 0;
4006        }
4007
4008        if (_.options.centerMode === true && _.options.infinite === true) {
4009            _.slideOffset += _.slideWidth * Math.floor(_.options.slidesToShow / 2) - _.slideWidth;
4010        } else if (_.options.centerMode === true) {
4011            _.slideOffset = 0;
4012            _.slideOffset += _.slideWidth * Math.floor(_.options.slidesToShow / 2);
4013        }
4014
4015        if (_.options.vertical === false) {
4016            targetLeft = ((slideIndex * _.slideWidth) * -1) + _.slideOffset;
4017        } else {
4018            targetLeft = ((slideIndex * verticalHeight) * -1) + verticalOffset;
4019        }
4020
4021        if (_.options.variableWidth === true) {
4022
4023            if (_.slideCount <= _.options.slidesToShow || _.options.infinite === false) {
4024                targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex);
4025            } else {
4026                targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex + _.options.slidesToShow);
4027            }
4028
4029            if (_.options.rtl === true) {
4030                if (targetSlide[0]) {
4031                    targetLeft = (_.$slideTrack.width() - targetSlide[0].offsetLeft - targetSlide.width()) * -1;
4032                } else {
4033                    targetLeft = 0;
4034                }
4035            } else {
4036                targetLeft = targetSlide[0] ? targetSlide[0].offsetLeft * -1 : 0;
4037            }
4038
4039            if (_.options.centerMode === true) {
4040                if (_.slideCount <= _.options.slidesToShow || _.options.infinite === false) {
4041                    targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex);
4042                } else {
4043                    targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex + _.options.slidesToShow + 1);
4044                }
4045
4046                if (_.options.rtl === true) {
4047                    if (targetSlide[0]) {
4048                        targetLeft = (_.$slideTrack.width() - targetSlide[0].offsetLeft - targetSlide.width()) * -1;
4049                    } else {
4050                        targetLeft = 0;
4051                    }
4052                } else {
4053                    targetLeft = targetSlide[0] ? targetSlide[0].offsetLeft * -1 : 0;
4054                }
4055
4056                targetLeft += (_.$list.width() - targetSlide.outerWidth()) / 2;
4057            }
4058        }
4059
4060        return targetLeft;
4061
4062    };
4063
4064    Slick.prototype.getOption = Slick.prototype.slickGetOption = function (option) {
4065
4066        var _ = this;
4067
4068        return _.options[option];
4069
4070    };
4071
4072    Slick.prototype.getNavigableIndexes = function () {
4073
4074        var _ = this,
4075            breakPoint = 0,
4076            counter = 0,
4077            indexes = [],
4078            max;
4079
4080        if (_.options.infinite === false) {
4081            max = _.slideCount;
4082        } else {
4083            breakPoint = _.options.slidesToScroll * -1;
4084            counter = _.options.slidesToScroll * -1;
4085            max = _.slideCount * 2;
4086        }
4087
4088        while (breakPoint < max) {
4089            indexes.push(breakPoint);
4090            breakPoint = counter + _.options.slidesToScroll;
4091            counter += _.options.slidesToScroll <= _.options.slidesToShow ? _.options.slidesToScroll : _.options.slidesToShow;
4092        }
4093
4094        return indexes;
4095
4096    };
4097
4098    Slick.prototype.getSlick = function () {
4099
4100        return this;
4101
4102    };
4103
4104    Slick.prototype.getSlideCount = function () {
4105
4106        var _ = this,
4107            slidesTraversed, swipedSlide, centerOffset;
4108
4109        centerOffset = _.options.centerMode === true ? _.slideWidth * Math.floor(_.options.slidesToShow / 2) : 0;
4110
4111        if (_.options.swipeToSlide === true) {
4112            _.$slideTrack.find('.slick-slide').each(function (index, slide) {
4113                if (slide.offsetLeft - centerOffset + ($(slide).outerWidth() / 2) > (_.swipeLeft * -1)) {
4114                    swipedSlide = slide;
4115                    return false;
4116                }
4117            });
4118
4119            slidesTraversed = Math.abs($(swipedSlide).attr('data-slick-index') - _.currentSlide) || 1;
4120
4121            return slidesTraversed;
4122
4123        } else {
4124            return _.options.slidesToScroll;
4125        }
4126
4127    };
4128
4129    Slick.prototype.goTo = Slick.prototype.slickGoTo = function (slide, dontAnimate) {
4130
4131        var _ = this;
4132
4133        _.changeSlide({
4134            data: {
4135                message: 'index',
4136                index: parseInt(slide)
4137            }
4138        }, dontAnimate);
4139
4140    };
4141
4142    Slick.prototype.init = function (creation) {
4143
4144        var _ = this;
4145
4146        if (!$(_.$slider).hasClass('slick-initialized')) {
4147
4148            $(_.$slider).addClass('slick-initialized');
4149
4150            _.buildRows();
4151            _.buildOut();
4152            _.setProps();
4153            _.startLoad();
4154            _.loadSlider();
4155            _.initializeEvents();
4156            _.updateArrows();
4157            _.updateDots();
4158            _.checkResponsive(true);
4159            _.focusHandler();
4160
4161        }
4162
4163        if (creation) {
4164            _.$slider.trigger('init', [_]);
4165        }
4166
4167        if (_.options.accessibility === true) {
4168            _.initADA();
4169        }
4170
4171        if (_.options.autoplay) {
4172
4173            _.paused = false;
4174            _.autoPlay();
4175
4176        }
4177
4178    };
4179
4180    Slick.prototype.initADA = function () {
4181        var _ = this;
4182        _.$slides.add(_.$slideTrack.find('.slick-cloned')).attr({
4183            'aria-hidden': 'true',
4184            'tabindex': '-1'
4185        }).find('a, input, button, select').attr({
4186            'tabindex': '-1'
4187        });
4188
4189        _.$slideTrack.attr('role', 'listbox');
4190
4191        _.$slides.not(_.$slideTrack.find('.slick-cloned')).each(function (i) {
4192            $(this).attr({
4193                'role': 'option',
4194                'aria-describedby': 'slick-slide' + _.instanceUid + i + ''
4195            });
4196        });
4197
4198        if (_.$dots !== null) {
4199            _.$dots.attr('role', 'tablist').find('li').each(function (i) {
4200                $(this).attr({
4201                    'role': 'presentation',
4202                    'aria-selected': 'false',
4203                    'aria-controls': 'navigation' + _.instanceUid + i + '',
4204                    'id': 'slick-slide' + _.instanceUid + i + ''
4205                });
4206            })
4207                .first().attr('aria-selected', 'true').end()
4208                .find('button').attr('role', 'button').end()
4209                .closest('div').attr('role', 'toolbar');
4210        }
4211        _.activateADA();
4212
4213    };
4214
4215    Slick.prototype.initArrowEvents = function () {
4216
4217        var _ = this;
4218
4219        if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) {
4220            _.$prevArrow
4221                .off('click.slick')
4222                .on('click.slick', {
4223                    message: 'previous'
4224                }, _.changeSlide);
4225            _.$nextArrow
4226                .off('click.slick')
4227                .on('click.slick', {
4228                    message: 'next'
4229                }, _.changeSlide);
4230        }
4231
4232    };
4233
4234    Slick.prototype.initDotEvents = function () {
4235
4236        var _ = this;
4237
4238        if (_.options.dots === true && _.slideCount > _.options.slidesToShow) {
4239            $('li', _.$dots).on('click.slick', {
4240                message: 'index'
4241            }, _.changeSlide);
4242        }
4243
4244        if (_.options.dots === true && _.options.pauseOnDotsHover === true) {
4245
4246            $('li', _.$dots)
4247                .on('mouseenter.slick', $.proxy(_.interrupt, _, true))
4248                .on('mouseleave.slick', $.proxy(_.interrupt, _, false));
4249
4250        }
4251
4252    };
4253
4254    Slick.prototype.initSlideEvents = function () {
4255
4256        var _ = this;
4257
4258        if (_.options.pauseOnHover) {
4259
4260            _.$list.on('mouseenter.slick', $.proxy(_.interrupt, _, true));
4261            _.$list.on('mouseleave.slick', $.proxy(_.interrupt, _, false));
4262
4263        }
4264
4265    };
4266
4267    Slick.prototype.initializeEvents = function () {
4268
4269        var _ = this;
4270
4271        _.initArrowEvents();
4272
4273        _.initDotEvents();
4274        _.initSlideEvents();
4275
4276        _.$list.on('touchstart.slick mousedown.slick', {
4277            action: 'start'
4278        }, _.swipeHandler);
4279        _.$list.on('touchmove.slick mousemove.slick', {
4280            action: 'move'
4281        }, _.swipeHandler);
4282        _.$list.on('touchend.slick mouseup.slick', {
4283            action: 'end'
4284        }, _.swipeHandler);
vendor: 40,762 bytes, lines 4285-5721
4285        _.$list.on('touchcancel.slick mouseleave.slick', {
4286            action: 'end'
4287        }, _.swipeHandler);
4288
4289        _.$list.on('click.slick', _.clickHandler);
4290
4291        $(document).on(_.visibilityChange, $.proxy(_.visibility, _));
4292
4293        if (_.options.accessibility === true) {
4294            _.$list.on('keydown.slick', _.keyHandler);
4295        }
4296
4297        if (_.options.focusOnSelect === true) {
4298            $(_.$slideTrack).children().on('click.slick', _.selectHandler);
4299        }
4300
4301        $(window).on('orientationchange.slick.slick-' + _.instanceUid, $.proxy(_.orientationChange, _));
4302
4303        $(window).on('resize.slick.slick-' + _.instanceUid, $.proxy(_.resize, _));
4304
4305        $('[draggable!=true]', _.$slideTrack).on('dragstart', _.preventDefault);
4306
4307        $(window).on('load.slick.slick-' + _.instanceUid, _.setPosition);
4308        $(document).on('ready.slick.slick-' + _.instanceUid, _.setPosition);
4309
4310    };
4311
4312    Slick.prototype.initUI = function () {
4313
4314        var _ = this;
4315
4316        if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) {
4317
4318            _.$prevArrow.show();
4319            _.$nextArrow.show();
4320
4321        }
4322
4323        if (_.options.dots === true && _.slideCount > _.options.slidesToShow) {
4324
4325            _.$dots.show();
4326
4327        }
4328
4329    };
4330
4331    Slick.prototype.keyHandler = function (event) {
4332
4333        var _ = this;
4334        //Dont slide if the cursor is inside the form fields and arrow keys are pressed
4335        if (!event.target.tagName.match('TEXTAREA|INPUT|SELECT')) {
4336            if (event.keyCode === 37 && _.options.accessibility === true) {
4337                _.changeSlide({
4338                    data: {
4339                        message: _.options.rtl === true ? 'next' : 'previous'
4340                    }
4341                });
4342            } else if (event.keyCode === 39 && _.options.accessibility === true) {
4343                _.changeSlide({
4344                    data: {
4345                        message: _.options.rtl === true ? 'previous' : 'next'
4346                    }
4347                });
4348            }
4349        }
4350
4351    };
4352
4353    Slick.prototype.lazyLoad = function () {
4354
4355        var _ = this,
4356            loadRange, cloneRange, rangeStart, rangeEnd;
4357
4358        function loadImages(imagesScope) {
4359
4360            $('img[data-lazy]', imagesScope).each(function () {
4361
4362                var image = $(this),
4363                    imageSource = $(this).attr('data-lazy'),
4364                    imageToLoad = document.createElement('img');
4365
4366                imageToLoad.onload = function () {
4367
4368                    image
4369                        .animate({ opacity: 0 }, 100, function () {
4370                            image
4371                                .attr('src', imageSource)
4372                                .animate({ opacity: 1 }, 200, function () {
4373                                    image
4374                                        .removeAttr('data-lazy')
4375                                        .removeClass('slick-loading');
4376                                });
4377                            _.$slider.trigger('lazyLoaded', [_, image, imageSource]);
4378                        });
4379
4380                };
4381
4382                imageToLoad.onerror = function () {
4383
4384                    image
4385                        .removeAttr('data-lazy')
4386                        .removeClass('slick-loading')
4387                        .addClass('slick-lazyload-error');
4388
4389                    _.$slider.trigger('lazyLoadError', [_, image, imageSource]);
4390
4391                };
4392
4393                imageToLoad.src = imageSource;
4394
4395            });
4396
4397        }
4398
4399        if (_.options.centerMode === true) {
4400            if (_.options.infinite === true) {
4401                rangeStart = _.currentSlide + (_.options.slidesToShow / 2 + 1);
4402                rangeEnd = rangeStart + _.options.slidesToShow + 2;
4403            } else {
4404                rangeStart = Math.max(0, _.currentSlide - (_.options.slidesToShow / 2 + 1));
4405                rangeEnd = 2 + (_.options.slidesToShow / 2 + 1) + _.currentSlide;
4406            }
4407        } else {
4408            rangeStart = _.options.infinite ? _.options.slidesToShow + _.currentSlide : _.currentSlide;
4409            rangeEnd = Math.ceil(rangeStart + _.options.slidesToShow);
4410            if (_.options.fade === true) {
4411                if (rangeStart > 0) rangeStart--;
4412                if (rangeEnd <= _.slideCount) rangeEnd++;
4413            }
4414        }
4415
4416        loadRange = _.$slider.find('.slick-slide').slice(rangeStart, rangeEnd);
4417        loadImages(loadRange);
4418
4419        if (_.slideCount <= _.options.slidesToShow) {
4420            cloneRange = _.$slider.find('.slick-slide');
4421            loadImages(cloneRange);
4422        } else
4423            if (_.currentSlide >= _.slideCount - _.options.slidesToShow) {
4424                cloneRange = _.$slider.find('.slick-cloned').slice(0, _.options.slidesToShow);
4425                loadImages(cloneRange);
4426            } else if (_.currentSlide === 0) {
4427                cloneRange = _.$slider.find('.slick-cloned').slice(_.options.slidesToShow * -1);
4428                loadImages(cloneRange);
4429            }
4430
4431    };
4432
4433    Slick.prototype.loadSlider = function () {
4434
4435        var _ = this;
4436
4437        _.setPosition();
4438
4439        _.$slideTrack.css({
4440            opacity: 1
4441        });
4442
4443        _.$slider.removeClass('slick-loading');
4444
4445        _.initUI();
4446
4447        if (_.options.lazyLoad === 'progressive') {
4448            _.progressiveLazyLoad();
4449        }
4450
4451    };
4452
4453    Slick.prototype.next = Slick.prototype.slickNext = function () {
4454
4455        var _ = this;
4456
4457        _.changeSlide({
4458            data: {
4459                message: 'next'
4460            }
4461        });
4462
4463    };
4464
4465    Slick.prototype.orientationChange = function () {
4466
4467        var _ = this;
4468
4469        _.checkResponsive();
4470        _.setPosition();
4471
4472    };
4473
4474    Slick.prototype.pause = Slick.prototype.slickPause = function () {
4475
4476        var _ = this;
4477
4478        _.autoPlayClear();
4479        _.paused = true;
4480
4481    };
4482
4483    Slick.prototype.play = Slick.prototype.slickPlay = function () {
4484
4485        var _ = this;
4486
4487        _.autoPlay();
4488        _.options.autoplay = true;
4489        _.paused = false;
4490        _.focussed = false;
4491        _.interrupted = false;
4492
4493    };
4494
4495    Slick.prototype.postSlide = function (index) {
4496
4497        var _ = this;
4498
4499        if (!_.unslicked) {
4500
4501            _.$slider.trigger('afterChange', [_, index]);
4502
4503            _.animating = false;
4504
4505            _.setPosition();
4506
4507            _.swipeLeft = null;
4508
4509            if (_.options.autoplay) {
4510                _.autoPlay();
4511            }
4512
4513            if (_.options.accessibility === true) {
4514                _.initADA();
4515            }
4516
4517        }
4518
4519    };
4520
4521    Slick.prototype.prev = Slick.prototype.slickPrev = function () {
4522
4523        var _ = this;
4524
4525        _.changeSlide({
4526            data: {
4527                message: 'previous'
4528            }
4529        });
4530
4531    };
4532
4533    Slick.prototype.preventDefault = function (event) {
4534
4535        event.preventDefault();
4536
4537    };
4538
4539    Slick.prototype.progressiveLazyLoad = function (tryCount) {
4540
4541        tryCount = tryCount || 1;
4542
4543        var _ = this,
4544            $imgsToLoad = $('img[data-lazy]', _.$slider),
4545            image,
4546            imageSource,
4547            imageToLoad;
4548
4549        if ($imgsToLoad.length) {
4550
4551            image = $imgsToLoad.first();
4552            imageSource = image.attr('data-lazy');
4553            imageToLoad = document.createElement('img');
4554
4555            imageToLoad.onload = function () {
4556
4557                image
4558                    .attr('src', imageSource)
4559                    .removeAttr('data-lazy')
4560                    .removeClass('slick-loading');
4561
4562                if (_.options.adaptiveHeight === true) {
4563                    _.setPosition();
4564                }
4565
4566                _.$slider.trigger('lazyLoaded', [_, image, imageSource]);
4567                _.progressiveLazyLoad();
4568
4569            };
4570
4571            imageToLoad.onerror = function () {
4572
4573                if (tryCount < 3) {
4574
4575                    /**
4576                     * try to load the image 3 times,
4577                     * leave a slight delay so we don't get
4578                     * servers blocking the request.
4579                     */
4580                    setTimeout(function () {
4581                        _.progressiveLazyLoad(tryCount + 1);
4582                    }, 500);
4583
4584                } else {
4585
4586                    image
4587                        .removeAttr('data-lazy')
4588                        .removeClass('slick-loading')
4589                        .addClass('slick-lazyload-error');
4590
4591                    _.$slider.trigger('lazyLoadError', [_, image, imageSource]);
4592
4593                    _.progressiveLazyLoad();
4594
4595                }
4596
4597            };
4598
4599            imageToLoad.src = imageSource;
4600
4601        } else {
4602
4603            _.$slider.trigger('allImagesLoaded', [_]);
4604
4605        }
4606
4607    };
4608
4609    Slick.prototype.refresh = function (initializing) {
4610
4611        var _ = this, currentSlide, lastVisibleIndex;
4612
4613        lastVisibleIndex = _.slideCount - _.options.slidesToShow;
4614
4615        // in non-infinite sliders, we don't want to go past the
4616        // last visible index.
4617        if (!_.options.infinite && (_.currentSlide > lastVisibleIndex)) {
4618            _.currentSlide = lastVisibleIndex;
4619        }
4620
4621        // if less slides than to show, go to start.
4622        if (_.slideCount <= _.options.slidesToShow) {
4623            _.currentSlide = 0;
4624
4625        }
4626
4627        currentSlide = _.currentSlide;
4628
4629        _.destroy(true);
4630
4631        $.extend(_, _.initials, { currentSlide: currentSlide });
4632
4633        _.init();
4634
4635        if (!initializing) {
4636
4637            _.changeSlide({
4638                data: {
4639                    message: 'index',
4640                    index: currentSlide
4641                }
4642            }, false);
4643
4644        }
4645
4646    };
4647
4648    Slick.prototype.registerBreakpoints = function () {
4649
4650        var _ = this, breakpoint, currentBreakpoint, l,
4651            responsiveSettings = _.options.responsive || null;
4652
4653        if ($.type(responsiveSettings) === 'array' && responsiveSettings.length) {
4654
4655            _.respondTo = _.options.respondTo || 'window';
4656
4657            for (breakpoint in responsiveSettings) {
4658
4659                l = _.breakpoints.length - 1;
4660                currentBreakpoint = responsiveSettings[breakpoint].breakpoint;
4661
4662                if (responsiveSettings.hasOwnProperty(breakpoint)) {
4663
4664                    // loop through the breakpoints and cut out any existing
4665                    // ones with the same breakpoint number, we don't want dupes.
4666                    while (l >= 0) {
4667                        if (_.breakpoints[l] && _.breakpoints[l] === currentBreakpoint) {
4668                            _.breakpoints.splice(l, 1);
4669                        }
4670                        l--;
4671                    }
4672
4673                    _.breakpoints.push(currentBreakpoint);
4674                    _.breakpointSettings[currentBreakpoint] = responsiveSettings[breakpoint].settings;
4675
4676                }
4677
4678            }
4679
4680            _.breakpoints.sort(function (a, b) {
4681                return (_.options.mobileFirst) ? a - b : b - a;
4682            });
4683
4684        }
4685
4686    };
4687
4688    Slick.prototype.reinit = function () {
4689
4690        var _ = this;
4691
4692        _.$slides =
4693            _.$slideTrack
4694                .children(_.options.slide)
4695                .addClass('slick-slide');
4696
4697        _.slideCount = _.$slides.length;
4698
4699        if (_.currentSlide >= _.slideCount && _.currentSlide !== 0) {
4700            _.currentSlide = _.currentSlide - _.options.slidesToScroll;
4701        }
4702
4703        if (_.slideCount <= _.options.slidesToShow) {
4704            _.currentSlide = 0;
4705        }
4706
4707        _.registerBreakpoints();
4708
4709        _.setProps();
4710        _.setupInfinite();
4711        _.buildArrows();
4712        _.updateArrows();
4713        _.initArrowEvents();
4714        _.buildDots();
4715        _.updateDots();
4716        _.initDotEvents();
4717        _.cleanUpSlideEvents();
4718        _.initSlideEvents();
4719
4720        _.checkResponsive(false, true);
4721
4722        if (_.options.focusOnSelect === true) {
4723            $(_.$slideTrack).children().on('click.slick', _.selectHandler);
4724        }
4725
4726        _.setSlideClasses(typeof _.currentSlide === 'number' ? _.currentSlide : 0);
4727
4728        _.setPosition();
4729        _.focusHandler();
4730
4731        _.paused = !_.options.autoplay;
4732        _.autoPlay();
4733
4734        _.$slider.trigger('reInit', [_]);
4735
4736    };
4737
4738    Slick.prototype.resize = function () {
4739
4740        var _ = this;
4741
4742        if ($(window).width() !== _.windowWidth) {
4743            clearTimeout(_.windowDelay);
4744            _.windowDelay = window.setTimeout(function () {
4745                _.windowWidth = $(window).width();
4746                _.checkResponsive();
4747                if (!_.unslicked) { _.setPosition(); }
4748            }, 50);
4749        }
4750    };
4751
4752    Slick.prototype.removeSlide = Slick.prototype.slickRemove = function (index, removeBefore, removeAll) {
4753
4754        var _ = this;
4755
4756        if (typeof (index) === 'boolean') {
4757            removeBefore = index;
4758            index = removeBefore === true ? 0 : _.slideCount - 1;
4759        } else {
4760            index = removeBefore === true ? --index : index;
4761        }
4762
4763        if (_.slideCount < 1 || index < 0 || index > _.slideCount - 1) {
4764            return false;
4765        }
4766
4767        _.unload();
4768
4769        if (removeAll === true) {
4770            _.$slideTrack.children().remove();
4771        } else {
4772            _.$slideTrack.children(this.options.slide).eq(index).remove();
4773        }
4774
4775        _.$slides = _.$slideTrack.children(this.options.slide);
4776
4777        _.$slideTrack.children(this.options.slide).detach();
4778
4779        _.$slideTrack.append(_.$slides);
4780
4781        _.$slidesCache = _.$slides;
4782
4783        _.reinit();
4784
4785    };
4786
4787    Slick.prototype.setCSS = function (position) {
4788
4789        var _ = this,
4790            positionProps = {},
4791            x, y;
4792
4793        if (_.options.rtl === true) {
4794            position = -position;
4795        }
4796        x = _.positionProp == 'left' ? Math.ceil(position) + 'px' : '0px';
4797        y = _.positionProp == 'top' ? Math.ceil(position) + 'px' : '0px';
4798
4799        positionProps[_.positionProp] = position;
4800
4801        if (_.transformsEnabled === false) {
4802            _.$slideTrack.css(positionProps);
4803        } else {
4804            positionProps = {};
4805            if (_.cssTransitions === false) {
4806                positionProps[_.animType] = 'translate(' + x + ', ' + y + ')';
4807                _.$slideTrack.css(positionProps);
4808            } else {
4809                positionProps[_.animType] = 'translate3d(' + x + ', ' + y + ', 0px)';
4810                _.$slideTrack.css(positionProps);
4811            }
4812        }
4813
4814    };
4815
4816    Slick.prototype.setDimensions = function () {
4817
4818        var _ = this;
4819
4820        if (_.options.vertical === false) {
4821            if (_.options.centerMode === true) {
4822                _.$list.css({
4823                    padding: ('0px ' + _.options.centerPadding)
4824                });
4825            }
4826        } else {
4827            _.$list.height(_.$slides.first().outerHeight(true) * _.options.slidesToShow);
4828            if (_.options.centerMode === true) {
4829                _.$list.css({
4830                    padding: (_.options.centerPadding + ' 0px')
4831                });
4832            }
4833        }
4834
4835        _.listWidth = _.$list.width();
4836        _.listHeight = _.$list.height();
4837
4838
4839        if (_.options.vertical === false && _.options.variableWidth === false) {
4840            _.slideWidth = Math.ceil(_.listWidth / _.options.slidesToShow);
4841            _.$slideTrack.width(Math.ceil((_.slideWidth * _.$slideTrack.children('.slick-slide').length)));
4842
4843        } else if (_.options.variableWidth === true) {
4844            _.$slideTrack.width(5000 * _.slideCount);
4845        } else {
4846            _.slideWidth = Math.ceil(_.listWidth);
4847            _.$slideTrack.height(Math.ceil((_.$slides.first().outerHeight(true) * _.$slideTrack.children('.slick-slide').length)));
4848        }
4849
4850        var offset = _.$slides.first().outerWidth(true) - _.$slides.first().width();
4851        if (_.options.variableWidth === false) _.$slideTrack.children('.slick-slide').width(_.slideWidth - offset);
4852
4853    };
4854
4855    Slick.prototype.setFade = function () {
4856
4857        var _ = this,
4858            targetLeft;
4859
4860        _.$slides.each(function (index, element) {
4861            targetLeft = (_.slideWidth * index) * -1;
4862            if (_.options.rtl === true) {
4863                $(element).css({
4864                    position: 'relative',
4865                    right: targetLeft,
4866                    top: 0,
4867                    zIndex: _.options.zIndex - 2,
4868                    opacity: 0
4869                });
4870            } else {
4871                $(element).css({
4872                    position: 'relative',
4873                    left: targetLeft,
4874                    top: 0,
4875                    zIndex: _.options.zIndex - 2,
4876                    opacity: 0
4877                });
4878            }
4879        });
4880
4881        _.$slides.eq(_.currentSlide).css({
4882            zIndex: _.options.zIndex - 1,
4883            opacity: 1
4884        });
4885
4886    };
4887
4888    Slick.prototype.setHeight = function () {
4889
4890        var _ = this;
4891
4892        if (_.options.slidesToShow === 1 && _.options.adaptiveHeight === true && _.options.vertical === false) {
4893            var targetHeight = _.$slides.eq(_.currentSlide).outerHeight(true);
4894            _.$list.css('height', targetHeight);
4895        }
4896
4897    };
4898
4899    Slick.prototype.setOption =
4900        Slick.prototype.slickSetOption = function () {
4901
4902            /**
4903             * accepts arguments in format of:
4904             *
4905             *  - for changing a single option's value:
4906             *     .slick("setOption", option, value, refresh )
4907             *
4908             *  - for changing a set of responsive options:
4909             *     .slick("setOption", 'responsive', [{}, ...], refresh )
4910             *
4911             *  - for updating multiple values at once (not responsive)
4912             *     .slick("setOption", { 'option': value, ... }, refresh )
4913             */
4914
4915            var _ = this, l, item, option, value, refresh = false, type;
4916
4917            if ($.type(arguments[0]) === 'object') {
4918
4919                option = arguments[0];
4920                refresh = arguments[1];
4921                type = 'multiple';
4922
4923            } else if ($.type(arguments[0]) === 'string') {
4924
4925                option = arguments[0];
4926                value = arguments[1];
4927                refresh = arguments[2];
4928
4929                if (arguments[0] === 'responsive' && $.type(arguments[1]) === 'array') {
4930
4931                    type = 'responsive';
4932
4933                } else if (typeof arguments[1] !== 'undefined') {
4934
4935                    type = 'single';
4936
4937                }
4938
4939            }
4940
4941            if (type === 'single') {
4942
4943                _.options[option] = value;
4944
4945
4946            } else if (type === 'multiple') {
4947
4948                $.each(option, function (opt, val) {
4949
4950                    _.options[opt] = val;
4951
4952                });
4953
4954
4955            } else if (type === 'responsive') {
4956
4957                for (item in value) {
4958
4959                    if ($.type(_.options.responsive) !== 'array') {
4960
4961                        _.options.responsive = [value[item]];
4962
4963                    } else {
4964
4965                        l = _.options.responsive.length - 1;
4966
4967                        // loop through the responsive object and splice out duplicates.
4968                        while (l >= 0) {
4969
4970                            if (_.options.responsive[l].breakpoint === value[item].breakpoint) {
4971
4972                                _.options.responsive.splice(l, 1);
4973
4974                            }
4975
4976                            l--;
4977
4978                        }
4979
4980                        _.options.responsive.push(value[item]);
4981
4982                    }
4983
4984                }
4985
4986            }
4987
4988            if (refresh) {
4989
4990                _.unload();
4991                _.reinit();
4992
4993            }
4994
4995        };
4996
4997    Slick.prototype.setPosition = function () {
4998
4999        var _ = this;
5000
5001        _.setDimensions();
5002
5003        _.setHeight();
5004
5005        if (_.options.fade === false) {
5006            _.setCSS(_.getLeft(_.currentSlide));
5007        } else {
5008            _.setFade();
5009        }
5010
5011        _.$slider.trigger('setPosition', [_]);
5012
5013    };
5014
5015    Slick.prototype.setProps = function () {
5016
5017        var _ = this,
5018            bodyStyle = document.body.style;
5019
5020        _.positionProp = _.options.vertical === true ? 'top' : 'left';
5021
5022        if (_.positionProp === 'top') {
5023            _.$slider.addClass('slick-vertical');
5024        } else {
5025            _.$slider.removeClass('slick-vertical');
5026        }
5027
5028        if (bodyStyle.WebkitTransition !== undefined ||
5029            bodyStyle.MozTransition !== undefined ||
5030            bodyStyle.msTransition !== undefined) {
5031            if (_.options.useCSS === true) {
5032                _.cssTransitions = true;
5033            }
5034        }
5035
5036        if (_.options.fade) {
5037            if (typeof _.options.zIndex === 'number') {
5038                if (_.options.zIndex < 3) {
5039                    _.options.zIndex = 3;
5040                }
5041            } else {
5042                _.options.zIndex = _.defaults.zIndex;
5043            }
5044        }
5045
5046        if (bodyStyle.OTransform !== undefined) {
5047            _.animType = 'OTransform';
5048            _.transformType = '-o-transform';
5049            _.transitionType = 'OTransition';
5050            if (bodyStyle.perspectiveProperty === undefined && bodyStyle.webkitPerspective === undefined) _.animType = false;
5051        }
5052        if (bodyStyle.MozTransform !== undefined) {
5053            _.animType = 'MozTransform';
5054            _.transformType = '-moz-transform';
5055            _.transitionType = 'MozTransition';
5056            if (bodyStyle.perspectiveProperty === undefined && bodyStyle.MozPerspective === undefined) _.animType = false;
5057        }
5058        if (bodyStyle.webkitTransform !== undefined) {
5059            _.animType = 'webkitTransform';
5060            _.transformType = '-webkit-transform';
5061            _.transitionType = 'webkitTransition';
5062            if (bodyStyle.perspectiveProperty === undefined && bodyStyle.webkitPerspective === undefined) _.animType = false;
5063        }
5064        if (bodyStyle.msTransform !== undefined) {
5065            _.animType = 'msTransform';
5066            _.transformType = '-ms-transform';
5067            _.transitionType = 'msTransition';
5068            if (bodyStyle.msTransform === undefined) _.animType = false;
5069        }
5070        if (bodyStyle.transform !== undefined && _.animType !== false) {
5071            _.animType = 'transform';
5072            _.transformType = 'transform';
5073            _.transitionType = 'transition';
5074        }
5075        _.transformsEnabled = _.options.useTransform && (_.animType !== null && _.animType !== false);
5076    };
5077
5078
5079    Slick.prototype.setSlideClasses = function (index) {
5080
5081        var _ = this,
5082            centerOffset, allSlides, indexOffset, remainder;
5083
5084        allSlides = _.$slider
5085            .find('.slick-slide')
5086            .removeClass('slick-active slick-center slick-current')
5087            .attr('aria-hidden', 'true');
5088
5089        _.$slides
5090            .eq(index)
5091            .addClass('slick-current');
5092
5093        if (_.options.centerMode === true) {
5094
5095            centerOffset = Math.floor(_.options.slidesToShow / 2);
5096
5097            if (_.options.infinite === true) {
5098
5099                if (index >= centerOffset && index <= (_.slideCount - 1) - centerOffset) {
5100
5101                    _.$slides
5102                        .slice(index - centerOffset, index + centerOffset + 1)
5103                        .addClass('slick-active')
5104                        .attr('aria-hidden', 'false');
5105
5106                } else {
5107
5108                    indexOffset = _.options.slidesToShow + index;
5109                    allSlides
5110                        .slice(indexOffset - centerOffset + 1, indexOffset + centerOffset + 2)
5111                        .addClass('slick-active')
5112                        .attr('aria-hidden', 'false');
5113
5114                }
5115
5116                if (index === 0) {
5117
5118                    allSlides
5119                        .eq(allSlides.length - 1 - _.options.slidesToShow)
5120                        .addClass('slick-center');
5121
5122                } else if (index === _.slideCount - 1) {
5123
5124                    allSlides
5125                        .eq(_.options.slidesToShow)
5126                        .addClass('slick-center');
5127
5128                }
5129
5130            }
5131
5132            _.$slides
5133                .eq(index)
5134                .addClass('slick-center');
5135
5136        } else {
5137
5138            if (index >= 0 && index <= (_.slideCount - _.options.slidesToShow)) {
5139
5140                _.$slides
5141                    .slice(index, index + _.options.slidesToShow)
5142                    .addClass('slick-active')
5143                    .attr('aria-hidden', 'false');
5144
5145            } else if (allSlides.length <= _.options.slidesToShow) {
5146
5147                allSlides
5148                    .addClass('slick-active')
5149                    .attr('aria-hidden', 'false');
5150
5151            } else {
5152
5153                remainder = _.slideCount % _.options.slidesToShow;
5154                indexOffset = _.options.infinite === true ? _.options.slidesToShow + index : index;
5155
5156                if (_.options.slidesToShow == _.options.slidesToScroll && (_.slideCount - index) < _.options.slidesToShow) {
5157
5158                    allSlides
5159                        .slice(indexOffset - (_.options.slidesToShow - remainder), indexOffset + remainder)
5160                        .addClass('slick-active')
5161                        .attr('aria-hidden', 'false');
5162
5163                } else {
5164
5165                    allSlides
5166                        .slice(indexOffset, indexOffset + _.options.slidesToShow)
5167                        .addClass('slick-active')
5168                        .attr('aria-hidden', 'false');
5169
5170                }
5171
5172            }
5173
5174        }
5175
5176        if (_.options.lazyLoad === 'ondemand') {
5177            _.lazyLoad();
5178        }
5179
5180    };
5181
5182    Slick.prototype.setupInfinite = function () {
5183
5184        var _ = this,
5185            i, slideIndex, infiniteCount;
5186
5187        if (_.options.fade === true) {
5188            _.options.centerMode = false;
5189        }
5190
5191        if (_.options.infinite === true && _.options.fade === false) {
5192
5193            slideIndex = null;
5194
5195            if (_.slideCount > _.options.slidesToShow) {
5196
5197                if (_.options.centerMode === true) {
5198                    infiniteCount = _.options.slidesToShow + 1;
5199                } else {
5200                    infiniteCount = _.options.slidesToShow;
5201                }
5202
5203                for (i = _.slideCount; i > (_.slideCount -
5204                    infiniteCount); i -= 1) {
5205                    slideIndex = i - 1;
5206                    $(_.$slides[slideIndex]).clone(true).attr('id', '')
5207                        .attr('data-slick-index', slideIndex - _.slideCount)
5208                        .prependTo(_.$slideTrack).addClass('slick-cloned');
5209                }
5210                for (i = 0; i < infiniteCount; i += 1) {
5211                    slideIndex = i;
5212                    $(_.$slides[slideIndex]).clone(true).attr('id', '')
5213                        .attr('data-slick-index', slideIndex + _.slideCount)
5214                        .appendTo(_.$slideTrack).addClass('slick-cloned');
5215                }
5216                _.$slideTrack.find('.slick-cloned').find('[id]').each(function () {
5217                    $(this).attr('id', '');
5218                });
5219
5220            }
5221
5222        }
5223
5224    };
5225
5226    Slick.prototype.interrupt = function (toggle) {
5227
5228        var _ = this;
5229
5230        if (!toggle) {
5231            _.autoPlay();
5232        }
5233        _.interrupted = toggle;
5234
5235    };
5236
5237    Slick.prototype.selectHandler = function (event) {
5238
5239        var _ = this;
5240
5241        var targetElement =
5242            $(event.target).is('.slick-slide') ?
5243                $(event.target) :
5244                $(event.target).parents('.slick-slide');
5245
5246        var index = parseInt(targetElement.attr('data-slick-index'));
5247
5248        if (!index) index = 0;
5249
5250        if (_.slideCount <= _.options.slidesToShow) {
5251
5252            _.setSlideClasses(index);
5253            _.asNavFor(index);
5254            return;
5255
5256        }
5257
5258        _.slideHandler(index);
5259
5260    };
5261
5262    Slick.prototype.slideHandler = function (index, sync, dontAnimate) {
5263
5264        var targetSlide, animSlide, oldSlide, slideLeft, targetLeft = null,
5265            _ = this, navTarget;
5266
5267        sync = sync || false;
5268
5269        if (_.animating === true && _.options.waitForAnimate === true) {
5270            return;
5271        }
5272
5273        if (_.options.fade === true && _.currentSlide === index) {
5274            return;
5275        }
5276
5277        if (_.slideCount <= _.options.slidesToShow) {
5278            return;
5279        }
5280
5281        if (sync === false) {
5282            _.asNavFor(index);
5283        }
5284
5285        targetSlide = index;
5286        targetLeft = _.getLeft(targetSlide);
5287        slideLeft = _.getLeft(_.currentSlide);
5288
5289        _.currentLeft = _.swipeLeft === null ? slideLeft : _.swipeLeft;
5290
5291        if (_.options.infinite === false && _.options.centerMode === false && (index < 0 || index > _.getDotCount() * _.options.slidesToScroll)) {
5292            if (_.options.fade === false) {
5293                targetSlide = _.currentSlide;
5294                if (dontAnimate !== true) {
5295                    _.animateSlide(slideLeft, function () {
5296                        _.postSlide(targetSlide);
5297                    });
5298                } else {
5299                    _.postSlide(targetSlide);
5300                }
5301            }
5302            return;
5303        } else if (_.options.infinite === false && _.options.centerMode === true && (index < 0 || index > (_.slideCount - _.options.slidesToScroll))) {
5304            if (_.options.fade === false) {
5305                targetSlide = _.currentSlide;
5306                if (dontAnimate !== true) {
5307                    _.animateSlide(slideLeft, function () {
5308                        _.postSlide(targetSlide);
5309                    });
5310                } else {
5311                    _.postSlide(targetSlide);
5312                }
5313            }
5314            return;
5315        }
5316
5317        if (_.options.autoplay) {
5318            clearInterval(_.autoPlayTimer);
5319        }
5320
5321        if (targetSlide < 0) {
5322            if (_.slideCount % _.options.slidesToScroll !== 0) {
5323                animSlide = _.slideCount - (_.slideCount % _.options.slidesToScroll);
5324            } else {
5325                animSlide = _.slideCount + targetSlide;
5326            }
5327        } else if (targetSlide >= _.slideCount) {
5328            if (_.slideCount % _.options.slidesToScroll !== 0) {
5329                animSlide = 0;
5330            } else {
5331                animSlide = targetSlide - _.slideCount;
5332            }
5333        } else {
5334            animSlide = targetSlide;
5335        }
5336
5337        _.animating = true;
5338
5339        _.$slider.trigger('beforeChange', [_, _.currentSlide, animSlide]);
5340
5341        oldSlide = _.currentSlide;
5342        _.currentSlide = animSlide;
5343
5344        _.setSlideClasses(_.currentSlide);
5345
5346        if (_.options.asNavFor) {
5347
5348            navTarget = _.getNavTarget();
5349            navTarget = navTarget.slick('getSlick');
5350
5351            if (navTarget.slideCount <= navTarget.options.slidesToShow) {
5352                navTarget.setSlideClasses(_.currentSlide);
5353            }
5354
5355        }
5356
5357        _.updateDots();
5358        _.updateArrows();
5359
5360        if (_.options.fade === true) {
5361            if (dontAnimate !== true) {
5362
5363                _.fadeSlideOut(oldSlide);
5364
5365                _.fadeSlide(animSlide, function () {
5366                    _.postSlide(animSlide);
5367                });
5368
5369            } else {
5370                _.postSlide(animSlide);
5371            }
5372            _.animateHeight();
5373            return;
5374        }
5375
5376        if (dontAnimate !== true) {
5377            _.animateSlide(targetLeft, function () {
5378                _.postSlide(animSlide);
5379            });
5380        } else {
5381            _.postSlide(animSlide);
5382        }
5383
5384    };
5385
5386    Slick.prototype.startLoad = function () {
5387
5388        var _ = this;
5389
5390        if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) {
5391
5392            _.$prevArrow.hide();
5393            _.$nextArrow.hide();
5394
5395        }
5396
5397        if (_.options.dots === true && _.slideCount > _.options.slidesToShow) {
5398
5399            _.$dots.hide();
5400
5401        }
5402
5403        _.$slider.addClass('slick-loading');
5404
5405    };
5406
5407    Slick.prototype.swipeDirection = function () {
5408
5409        var xDist, yDist, r, swipeAngle, _ = this;
5410
5411        xDist = _.touchObject.startX - _.touchObject.curX;
5412        yDist = _.touchObject.startY - _.touchObject.curY;
5413        r = Math.atan2(yDist, xDist);
5414
5415        swipeAngle = Math.round(r * 180 / Math.PI);
5416        if (swipeAngle < 0) {
5417            swipeAngle = 360 - Math.abs(swipeAngle);
5418        }
5419
5420        if ((swipeAngle <= 45) && (swipeAngle >= 0)) {
5421            return (_.options.rtl === false ? 'left' : 'right');
5422        }
5423        if ((swipeAngle <= 360) && (swipeAngle >= 315)) {
5424            return (_.options.rtl === false ? 'left' : 'right');
5425        }
5426        if ((swipeAngle >= 135) && (swipeAngle <= 225)) {
5427            return (_.options.rtl === false ? 'right' : 'left');
5428        }
5429        if (_.options.verticalSwiping === true) {
5430            if ((swipeAngle >= 35) && (swipeAngle <= 135)) {
5431                return 'down';
5432            } else {
5433                return 'up';
5434            }
5435        }
5436
5437        return 'vertical';
5438
5439    };
5440
5441    Slick.prototype.swipeEnd = function (event) {
5442
5443        var _ = this,
5444            slideCount,
5445            direction;
5446
5447        _.dragging = false;
5448        _.interrupted = false;
5449        _.shouldClick = (_.touchObject.swipeLength > 10) ? false : true;
5450
5451        if (_.touchObject.curX === undefined) {
5452            return false;
5453        }
5454
5455        if (_.touchObject.edgeHit === true) {
5456            _.$slider.trigger('edge', [_, _.swipeDirection()]);
5457        }
5458
5459        if (_.touchObject.swipeLength >= _.touchObject.minSwipe) {
5460
5461            direction = _.swipeDirection();
5462
5463            switch (direction) {
5464
5465                case 'left':
5466                case 'down':
5467
5468                    slideCount =
5469                        _.options.swipeToSlide ?
5470                            _.checkNavigable(_.currentSlide + _.getSlideCount()) :
5471                            _.currentSlide + _.getSlideCount();
5472
5473                    _.currentDirection = 0;
5474
5475                    break;
5476
5477                case 'right':
5478                case 'up':
5479
5480                    slideCount =
5481                        _.options.swipeToSlide ?
5482                            _.checkNavigable(_.currentSlide - _.getSlideCount()) :
5483                            _.currentSlide - _.getSlideCount();
5484
5485                    _.currentDirection = 1;
5486
5487                    break;
5488
5489                default:
5490
5491
5492            }
5493
5494            if (direction != 'vertical') {
5495
5496                _.slideHandler(slideCount);
5497                _.touchObject = {};
5498                _.$slider.trigger('swipe', [_, direction]);
5499
5500            }
5501
5502        } else {
5503
5504            if (_.touchObject.startX !== _.touchObject.curX) {
5505
5506                _.slideHandler(_.currentSlide);
5507                _.touchObject = {};
5508
5509            }
5510
5511        }
5512
5513    };
5514
5515    Slick.prototype.swipeHandler = function (event) {
5516
5517        var _ = this;
5518
5519        if ((_.options.swipe === false) || ('ontouchend' in document && _.options.swipe === false)) {
5520            return;
5521        } else if (_.options.draggable === false && event.type.indexOf('mouse') !== -1) {
5522            return;
5523        }
5524
5525        _.touchObject.fingerCount = event.originalEvent && event.originalEvent.touches !== undefined ?
5526            event.originalEvent.touches.length : 1;
5527
5528        _.touchObject.minSwipe = _.listWidth / _.options
5529            .touchThreshold;
5530
5531        if (_.options.verticalSwiping === true) {
5532            _.touchObject.minSwipe = _.listHeight / _.options
5533                .touchThreshold;
5534        }
5535
5536        switch (event.data.action) {
5537
5538            case 'start':
5539                _.swipeStart(event);
5540                break;
5541
5542            case 'move':
5543                _.swipeMove(event);
5544                break;
5545
5546            case 'end':
5547                _.swipeEnd(event);
5548                break;
5549
5550        }
5551
5552    };
5553
5554    Slick.prototype.swipeMove = function (event) {
5555
5556        var _ = this,
5557            edgeWasHit = false,
5558            curLeft, swipeDirection, swipeLength, positionOffset, touches;
5559
5560        touches = event.originalEvent !== undefined ? event.originalEvent.touches : null;
5561
5562        if (!_.dragging || touches && touches.length !== 1) {
5563            return false;
5564        }
5565
5566        curLeft = _.getLeft(_.currentSlide);
5567
5568        _.touchObject.curX = touches !== undefined ? touches[0].pageX : event.clientX;
5569        _.touchObject.curY = touches !== undefined ? touches[0].pageY : event.clientY;
5570
5571        _.touchObject.swipeLength = Math.round(Math.sqrt(
5572            Math.pow(_.touchObject.curX - _.touchObject.startX, 2)));
5573
5574        if (_.options.verticalSwiping === true) {
5575            _.touchObject.swipeLength = Math.round(Math.sqrt(
5576                Math.pow(_.touchObject.curY - _.touchObject.startY, 2)));
5577        }
5578
5579        swipeDirection = _.swipeDirection();
5580
5581        if (swipeDirection === 'vertical') {
5582            return;
5583        }
5584
5585        if (event.originalEvent !== undefined && _.touchObject.swipeLength > 4) {
5586            event.preventDefault();
5587        }
5588
5589        positionOffset = (_.options.rtl === false ? 1 : -1) * (_.touchObject.curX > _.touchObject.startX ? 1 : -1);
5590        if (_.options.verticalSwiping === true) {
5591            positionOffset = _.touchObject.curY > _.touchObject.startY ? 1 : -1;
5592        }
5593
5594
5595        swipeLength = _.touchObject.swipeLength;
5596
5597        _.touchObject.edgeHit = false;
5598
5599        if (_.options.infinite === false) {
5600            if ((_.currentSlide === 0 && swipeDirection === 'right') || (_.currentSlide >= _.getDotCount() && swipeDirection === 'left')) {
5601                swipeLength = _.touchObject.swipeLength * _.options.edgeFriction;
5602                _.touchObject.edgeHit = true;
5603            }
5604        }
5605
5606        if (_.options.vertical === false) {
5607            _.swipeLeft = curLeft + swipeLength * positionOffset;
5608        } else {
5609            _.swipeLeft = curLeft + (swipeLength * (_.$list.height() / _.listWidth)) * positionOffset;
5610        }
5611        if (_.options.verticalSwiping === true) {
5612            _.swipeLeft = curLeft + swipeLength * positionOffset;
5613        }
5614
5615        if (_.options.fade === true || _.options.touchMove === false) {
5616            return false;
5617        }
5618
5619        if (_.animating === true) {
5620            _.swipeLeft = null;
5621            return false;
5622        }
5623
5624        _.setCSS(_.swipeLeft);
5625
5626    };
5627
5628    Slick.prototype.swipeStart = function (event) {
5629
5630        var _ = this,
5631            touches;
5632
5633        _.interrupted = true;
5634
5635        if (_.touchObject.fingerCount !== 1 || _.slideCount <= _.options.slidesToShow) {
5636            _.touchObject = {};
5637            return false;
5638        }
5639
5640        if (event.originalEvent !== undefined && event.originalEvent.touches !== undefined) {
5641            touches = event.originalEvent.touches[0];
5642        }
5643
5644        _.touchObject.startX = _.touchObject.curX = touches !== undefined ? touches.pageX : event.clientX;
5645        _.touchObject.startY = _.touchObject.curY = touches !== undefined ? touches.pageY : event.clientY;
5646
5647        _.dragging = true;
5648
5649    };
5650
5651    Slick.prototype.unfilterSlides = Slick.prototype.slickUnfilter = function () {
5652
5653        var _ = this;
5654
5655        if (_.$slidesCache !== null) {
5656
5657            _.unload();
5658
5659            _.$slideTrack.children(this.options.slide).detach();
5660
5661            _.$slidesCache.appendTo(_.$slideTrack);
5662
5663            _.reinit();
5664
5665        }
5666
5667    };
5668
5669    Slick.prototype.unload = function () {
5670
5671        var _ = this;
5672
5673        $('.slick-cloned', _.$slider).remove();
5674
5675        if (_.$dots) {
5676            _.$dots.remove();
5677        }
5678
5679        if (_.$prevArrow && _.htmlExpr.test(_.options.prevArrow)) {
5680            _.$prevArrow.remove();
5681        }
5682
5683        if (_.$nextArrow && _.htmlExpr.test(_.options.nextArrow)) {
5684            _.$nextArrow.remove();
5685        }
5686
5687        _.$slides
5688            .removeClass('slick-slide slick-active slick-visible slick-current')
5689            .attr('aria-hidden', 'true')
5690            .css('width', '');
5691
5692    };
5693
5694    Slick.prototype.unslick = function (fromBreakpoint) {
5695
5696        var _ = this;
5697        _.$slider.trigger('unslick', [_, fromBreakpoint]);
5698        _.destroy();
5699
5700    };
5701
5702    Slick.prototype.updateArrows = function () {
5703
5704        var _ = this,
5705            centerOffset;
5706
5707        centerOffset = Math.floor(_.options.slidesToShow / 2);
5708
5709        if (_.options.arrows === true &&
5710            _.slideCount > _.options.slidesToShow &&
5711            !_.options.infinite) {
5712
5713            _.$prevArrow.removeClass('slick-disabled').attr('aria-disabled', 'false');
5714            _.$nextArrow.removeClass('slick-disabled').attr('aria-disabled', 'false');
5715
5716            if (_.currentSlide === 0) {
5717
5718                _.$prevArrow.addClass('slick-disabled').attr('aria-disabled', 'true');
5719                _.$nextArrow.removeClass('slick-disabled').attr('aria-disabled', 'false');
5720
5721            } else if (_.currentSlide >
5721= _.slideCount - _.options.slidesToShow && _.options.centerMode === false) {
5722
5723                _.$nextArrow.addClass('slick-disabled').attr('aria-disabled', 'true');
5724                _.$prevArrow.removeClass('slick-disabled').attr('aria-disabled', 'false');
5725
5726            } else if (_.currentSlide >= _.slideCount - 1 && _.options.centerMode === true) {
5727
5728                _.$nextArrow.addClass('slick-disabled').attr('aria-disabled', 'true');
5729                _.$prevArrow.removeClass('slick-disabled').attr('aria-disabled', 'false');
5730
5731            }
5732
5733        }
5734
5735    };
5736
5737    Slick.prototype.updateDots = function () {
5738
5739        var _ = this;
5740
5741        if (_.$dots !== null) {
5742
5743            _.$dots
5744                .find('li')
5745                .removeClass('slick-active')
5746                .attr('aria-hidden', 'true');
5747
5748            _.$dots
5749                .find('li')
5750                .eq(Math.floor(_.currentSlide / _.options.slidesToScroll))
5751                .addClass('slick-active')
5752                .attr('aria-hidden', 'false');
5753
5754        }
5755
5756    };
5757
5758    Slick.prototype.visibility = function () {
5759
5760        var _ = this;
5761
5762        if (_.options.autoplay) {
5763
5764            if (document[_.hidden]) {
5765
5766                _.interrupted = true;
5767
5768            } else {
5769
5770                _.interrupted = false;
5771
5772            }
5773
5774        }
5775
5776    };
5777
5778    $.fn.slick = function () {
5779        var _ = this,
5780            opt = arguments[0],
5781            args = Array.prototype.slice.call(arguments, 1),
5782            l = _.length,
5783            i,
5784            ret;
5785        for (i = 0; i < l; i++) {
5786            if (typeof opt == 'object' || typeof opt == 'undefined')
5787                _[i].slick = new Slick(_[i], opt);
5788            else
5789                ret = _[i].slick[opt].apply(_[i].slick, args);
5790            if (typeof ret != 'undefined') return ret;
5791        }
5792        return _;
5793    };
5794
5795}));
5796
5797
5798/*
5799Tipr 4.1
5800Copyright (c) 2019 Tipue
5801Tipr is released under the MIT License
5802http://www.tipue.com/tipr
5803*/
5804
5805(function ($) {
5806
5807    $.fn.tipr = function (options) {
5808
5809        var set = $.extend({
5810
5811            'alt': false,
5812            'marginAbove': -65,
5813            'marginBelow': 7,
5814            'mode': 'below',
5815            'space': 70,
5816            'speed': 300
5817
5818        }, options);
5819
5820        return this.each(function () {
5821
5822            var mouseY = -1;
5823            $(document).on('mousemove', function (event) {
5824                mouseY = event.clientY;
5825            });
5826            var viewY = $(window).height();
5827
5828            $(this).hover(
5829                function () {
5830                    var m = set.mode;
5831                    var m_alt = set.alt;
5832                    var a = '';
5833                    var m_a = set.marginAbove;
5834                    var m_b = set.marginBelow;
5835
5836                    $(window).on('resize', function () {
5837                        viewY = $(window).height();
5838                    });
5839
5840                    if (viewY - mouseY < set.space) {
5841                        m = 'above';
5842                    }
5843                    else {
5844                        m = set.mode;
5845
5846                        if ($(this).attr('data-mode')) {
5847                            m = $(this).attr('data-mode')
5848                        }
5849                    }
5850
5851                    if ($(this).attr('data-alt')) {
5852                        m_alt = $(this).attr('data-alt')
5853                    }
5854                    if ($(this).attr('data-marginAbove')) {
5855                        m_a = $(this).attr('data-marginAbove')
5856                    }
5857                    if ($(this).attr('data-marginBelow')) {
5858                        m_b = $(this).attr('data-marginBelow')
5859                    }
5860
5861                    if (m_alt) {
5862                        a = '_alt';
5863                    }
5864                    tipr_cont = '.tipr_container_' + m + a;
5865
5866                    var out = '<div class="tipr_container_' + m + a + '" style="margin-top: ';
5867
5868                    if (m == 'above') {
5869                        out += m_a + 'px;">';
5870                    }
5871                    else {
5872                        out += m_b + 'px;">';
5873                    }
5874
5875                    out += '<div class="tipr_point_' + m + a + '"><div class="tipr_content' + a + '">' + $(this).attr('data-tip') + '</div></div></div>';
5876
5877                    $(this).after(out);
5878
5879                    var w_t = $(tipr_cont).outerWidth();
5880                    var w_e = $(this).width();
5881                    var m_l = (w_e / 2) - (w_t / 2);
5882
5883                    $(tipr_cont).css('margin-left', m_l + 'px');
5884                    $(this).removeAttr('title alt');
5885
5886                    $(tipr_cont).fadeIn(set.speed);
5887                },
5888                function () {
5889                    $(tipr_cont).remove();
5890                }
5891            );
5892        });
5893    };
5894
5895})(jQuery);
5896
5897$(document).ready(function () {
5898    init();
5899    $(window).trigger('scroll');
5900});
5901
5902
5903function init() {
5904
5905    initFAQs();
5906
5907    //Lazyload Images
5908    $(window).on('load scroll resize', function () {
5909        $('.js__lazyload:visible').each(function () {
5910            if (isVisible($(this))) {
5911                if ($(this).data('srcset')) {
5912                    $(this).attr('srcset', $(this).data('srcset'));
5913                    $(this).removeAttr('data-srcset');
5914                }
5915
5916                if ($(this).data('src')) {
5917                    $(this).attr('src', $(this).data('src'));
5918                    $(this).removeAttr('data-src');
5919                }
5920
5921                if ($(this).data('bg-image')) {
5922                    var imageUrl = $(this).data('bg-image');
5923                    $(this).css('background-image', 'url(' + imageUrl + ')');
5924                    $(this).removeAttr('bg-image');
5925                }
5926            }
5927        });
5928    });
5929
5930    function isVisible(elem) {
5931        var scrollTop = $(window).scrollTop();
5932        var windowBottom = scrollTop + $(window).height();
5933        var offset = 100;
5934        var elementTop = elem.offset().top;
5935
5936        if ((windowBottom + offset) > elementTop) {
5937            return true;
5938        } else {
5939            return false;
5940        }
5941    }
5942
5943    // Custom select
5944    $('select').selectric();
5945
5946    // Filter functionality
5947    $('.filter__btn').each(function () {
5948        $(this).click(function (e) {
5949            e.preventDefault();
5950
5951            var category = $(this).closest('li').data('category');
5952            var slide = $(this).closest('body').find('.featured-slider [data-category="' + category + '"]').attr('data-slick-index');
5953
5954            $('.featured-slider').slick('slickGoTo', slide);
5955
5956            $('.latest-news > div').removeClass('active');
5957            $('.latest-news > [data-category="' + category + '"]').addClass('active');
5958
5959            // toggle filter btn
5960            $('.filter li').removeClass('active');
5961            $(this).closest('li').addClass('active');
5962        });
5963    });
5964
5965    // event scroll down
5966    $(".day-inner").each(function (e) {
5967        $(this).on("click", function (e) {
5968            e.preventDefault();
5969
5970            var event_id = $(this).data('id');
5971            $('.card--event').addClass('card--inactive');
5972            $('#article-' + event_id).removeClass('card--inactive');
5973
5974
5975            $(window).stop(true).scrollTo(this.hash, { duration: 500, interrupt: true });
5976        });
5977    });
5978
5979    lightbox.option({
5980        albumLabel: "%1 / %2",
5981        disableScrolling: true,
5982        fixedNavigation: true
5983    });
5984
5985    Fancybox.bind("[data-fancybox]", {
5986        Thumbs: {
5987            type: false
5988        },
5989        Toolbar: {
5990            display: {
5991                left: [],
5992                middle: [],
5993                right: ["fullscreen", "close"]
5994            }
5995        },
5996        caption: (fancybox, slide) => {
5997            const caption = slide.caption || "";
5998            const description = slide.description || "";
5999
6000            const captionHtml = `
6001                <div class="fancybox__caption-wrapper">
6002                    ${caption ? `<h3 class="fancybox__caption">${caption}</h3>` : ""}
6003                    ${description ? `<p class="fancybox__description">${description}</p>` : ""}
6004                </div>
6005            `;
6006
6007            // Insert caption into content
6008            const content = slide.el?.querySelector('.fancybox__content');
6009            if (content) {
6010                content.insertAdjacentHTML('beforeend', captionHtml);
6011            }
6012
6013            return null; // Don't return caption HTML since we're inserting it directly
6014        },
6015        Carousel: {
6016            caption: {
6017                position: "bottom"
6018            },
6019        },
6020        Image: {
6021            zoom: false,
6022        }
6023    });
6024
6025    //Hero viewfinder effect
6026    if ($(window).width() > 991) {
6027        $('.head.head--home').hover(function () {
6028            $(".head__image-observe").addClass("hovered");
6029        })
6030        var clicked = 'false';
6031        $(document).bind('mousemove', function (e) {
6032            if (clicked == 'false') {
6033                $('.head__image-observe').css({ left: e.pageX - 100, top: e.pageY - 100 });
6034            }
6035            $('.head.head--home').click(function () {
6036                $(".head__image-observe").addClass("clicked");
6037                clicked = 'true';
6038            });
6039        });
6040    }
6041
6042    // Promo slider
6043    $('.slider').slick({
6044        infinite: false,
6045        lazyLoad: 'ondemand',
6046        slidesToShow: 1,
6047        arrows: true,
6048        dots: true,
6049        autoplay: true,
6050        autoplaySpeed: 5000
6051    });
6052
6053    // Featured Slider
6054    $('.featured-slider').slick({
6055        infinite: false,
6056        lazyLoad: 'ondemand',
6057        slidesToShow: 1,
6058        arrows: false,
6059        dots: false,
6060        swipe: false
6061    });
6062
6063    // Carousel (for events)
6064    $('.gallery-slider').slick({
6065        infinite: true,
6066        lazyLoad: 'ondemand',
6067        slidesToShow: 1,
6068        arrows: true,
6069        dots: false
6070    });
6071
6072    // Carousel (for events)
6073    $('.promo__slider').slick({
6074        infinite: true,
6075        autoplay: true,
6076        autoplaySpeed: 5000,
6077        fade: true,
6078        speed: 1000,
6079        lazyLoad: 'ondemand',
6080        slidesToShow: 1,
6081        arrows: true,
6082        dots: false
6083    });
6084
6085    // matchHeight
6086    $('.card__title').matchHeight();
6087    $('.card__text').matchHeight();
6088    $('.filter__btn > span').matchHeight();
6089
6090    $('.content-triple-card .card__content').matchHeight();
6091
6092
6093    // tooltips
6094    $('.icon--amenities').tipr();
6095
6096    // Toggle booking modal
6097    $('#booking-modal, #booking-trigger').on('click', function (e) {
6098        e.preventDefault();
6099
6100        $('html').toggleClass('booking-modal--active');
6101        $('html').toggleClass('booking-modal--inactive');
6102    });
6103
6104    // Toggle menu open/close
6105    $('.booking-close').on('click', function (e) {
6106        e.preventDefault();
6107
6108        $('html').toggleClass('booking-modal--active');
6109        $('html').toggleClass('booking-modal--inactive');
6110    });
6111
6112    // Toggle menu open/close
6113    $('#hamburger').on('click', function (e) {
6114        e.preventDefault();
6115
6116        $('html').toggleClass('nav--inactive');
6117        $('html').toggleClass('nav--active');
6118        $('.rooms-popup').removeClass('active');
6119    });
6120
6121    // Toggle menu open/close
6122    $('.navigation-close').on('click', function (e) {
6123        e.preventDefault();
6124
6125        $('html').toggleClass('nav--inactive');
6126        $('html').toggleClass('nav--active');
6127    });
6128
6129    // Datepicker
6130    // Check-in
6131    $('.date__check-in').each(function () {
6132        $(this).datepicker({
6133            minDate: 0,
6134            dateFormat: "dd/mm/yy",
6135            altField: $(this).parent().find('.datepickeralt'),
6136            altFormat: "yy-mm-dd",
6137            onSelect: function (dateText, inst) {
6138                $(this).parent('.input-container').addClass('date-chosen');
6139
6140                var from = $(this).val().split('/');
6141                var checkInDate = new Date(from[2] + '-' + from[1] + '-' + from[0]);
6142
6143                var to = $(this).closest('form').find('.date__check-out').val().split('/');
6144                var checkOutDate = new Date(to[2] + '-' + to[1] + '-' + to[0]);
6145
6146                //alert( checkInDate );
6147
6148                if (checkInDate >= checkOutDate) {
6149                    var dateOffset = (24 * 60 * 60 * 1000) * 1;
6150                    var convert = new Date(checkInDate.getTime() + dateOffset);
6151                    var formatted = convert.getDate() + '/' + (convert.getMonth() + 1) + '/' + convert.getFullYear();
6152
6153                    $(this).closest('form').find('.date__check-out').datepicker("setDate", formatted);
6154                    $(this).closest('form').find('.date__check-out').datepicker("option", "minDate", formatted);
6155                }
6156            }
6157        });
6158    });
6159
6160    // Check-out
6161    $('.date__check-out').each(function () {
6162        $(this).datepicker({
6163            minDate: 0,
6164            dateFormat: "dd/mm/yy",
6165            altField: $(this).parent().find('.datepickeralt'),
6166            altFormat: "yy-mm-dd",
6167            onSelect: function (dateText, inst) {
6168                $(this).parent('.input-container').addClass('date-chosen');
6169            }
6170        });
6171    });
6172
6173    // Check Availability (aka. Booking)
6174
6175    // submit booking form (either CTA or modal)
6176    $('.btn--submit').each(function () {
6177        $(this).on('click', function (e) {
6178            e.preventDefault();
6179
6180            //Remove any empty rooms inputs
6181            var i = 1;
6182            while (i <= 5) {
6183                if ($('.booking-rooms.adult-input[data-room="' + i + '"]').val() <= 0 && $('.booking-rooms.children-input[data-room="' + i + '"]').val() <= 0) { //If no adults/children in this room, then remove!
6184                    $('.booking-rooms.adult-input[data-room="' + i + '"]').remove();
6185                    $('.booking-rooms.children-input[data-room="' + i + '"]').remove();
6186                }
6187                i++;
6188            }
6189
6190            var bookingForm = $(this).closest('form');
6191
6192            var action = bookingForm.attr('action');
6193            var search = bookingForm.serialize();
6194            var searchArray = bookingForm.serializeArray();
6195            var searchString = '';
6196
6197            $.each(searchArray, function (key, value) {
6198
6199                var isLastElement = key == searchArray.length - 1;
6200
6201                if (isLastElement) {
6202
6203                    searchString += value.name + '=' + value.value;
6204
6205                } else {
6206
6207                    if (value.name == 'adults[]' || value.name == 'children[]') {
6208
6209                        var name = value.name;
6210                        name = name.replace('[]', '%5B%5D');
6211                        searchString += name + '=' + value.value + '&';
6212
6213                    } else {
6214
6215                        searchString += value.name + '=' + value.value + '&';
6216
6217                    }
6218                }
6219            });
6220
6221            const abTestData = getAbTestCookieData();
6222            console.log(abTestData);
6223            let abTestString = '';
6224
6225            if (abTestData) {
6226                if (abTestData.value === 1) {
6227                    abTestString = `&icid=vwopph-${abTestData.campaignId}control1`;
6228                } else {
6229                    const variationNumber = abTestData.value - 1;
6230                    abTestString = `&icid=vwopph-${abTestData.campaignId}variation${variationNumber}`;
6231                }
6232            }
6233
6234            var bookingUrl = `${action}${searchString}&rhgext=Qm9PSty6s3HG${abTestString}`;
6235
6236            window.open(bookingUrl, '_blank');
6237        });
6238    });
6239
6240    // inview for sticky header
6241    $('.head').on('inview', function (event, isInView) {
6242        if (isInView) {
6243            $('html').addClass('head--in');
6244            $('html').removeClass('head--out');
6245        } else {
6246            $('html').removeClass('head--in');
6247            $('html').addClass('head--out');
6248        }
6249    });
6250
6251    // tag module as inview after +50% is inview
6252    $('.module--os-50').on('onscreen', function (event, measurement) {
6253        if (measurement.percentInview >= 50) {
6254            $(this).addClass('module--inview');
6255        }
6256    });
6257
6258
6259    // tag module as inview after +25% is inview
6260    $('.module--os-25').on('onscreen', function (event, measurement) {
6261        if (measurement.percentInview >= 25) {
6262            $(this).addClass('module--inview');
6263        }
6264    });
6265
6266    // tag module as inview
6267    $('.module--os-10').on('onscreen', function (event, measurement) {
6268        if (measurement.percentInview >= 10) {
6269            $(this).addClass('module--inview');
6270        }
6271    });
6272
6273    // More to toggle
6274    $('.more-options').each(function () {
6275        $(this).click(function (e) {
6276            e.preventDefault();
6277
6278            var text = $(this).find('.text').text();
6279
6280            if (text == 'More Options') {
6281                $(this).find('.text').text('Fewer Options');
6282            } else {
6283                $(this).find('.text').text('More Options');
6284            }
6285
6286            $(this).closest('.booking').toggleClass('booking--condensed');
6287            $(this).closest('.booking').toggleClass('booking--expanded');
6288        });
6289    });
6290
6291    //Show promo card option only after the user has selected promo type
6292    $('.form__group--rate select').change(function () {
6293        $('.form__group--code').removeClass('inactive');
6294    })
6295
6296    $('.festive__popup .js__close-popup').on('click', function (e) {
6297        setCookie('showFestivePopup', 'true', 90);
6298        $('.festive__popup').fadeOut();
6299    });
6300
6301    $('.festive__popup .btn').on('click', function (e) {
6302        setCookie('showFestivePopup', 'true', 90);
6303    });
6304
6305    function setCookie(name, value, days) {
6306        var expires = "";
6307        if (days) {
6308            var date = new Date();
6309            date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
6310            expires = "; expires=" + date.toUTCString();
6311        }
6312        document.cookie = name + "=" + (value || "") + expires + "; path=/";
6313    }
6314
6315
6316
6317    //Interactive Map
6318    if ($('.module__interactive-map').length > 0) {
6319        initMap();
6320    }
6321
6322
6323    if ($('#particles-js').length > 0) {
6324        particlesJS("particles-js", { "particles": { "number": { "value": 180, "density": { "enable": true, "value_area": 800 } }, "color": { "value": "#fff" }, "shape": { "type": "circle", "stroke": { "width": 0, "color": "#000000" }, "polygon": { "nb_sides": 5 }, "image": { "src": "img/github.svg", "width": 100, "height": 100 } }, "opacity": { "value": 0.5, "random": true, "anim": { "enable": false, "speed": 1, "opacity_min": 0.1, "sync": false } }, "size": { "value": 3.945738208161363, "random": true, "anim": { "enable": false, "speed": 40, "size_min": 0.1, "sync": false } }, "line_linked": { "enable": false, "distance": 500, "color": "#ffffff", "opacity": 0.4, "width": 2 }, "move": { "enable": true, "speed": 6, "direction": "bottom", "random": false, "straight": false, "out_mode": "out", "bounce": false, "attract": { "enable": false, "rotateX": 600, "rotateY": 1200 } } }, "interactivity": { "detect_on": "canvas", "events": { "onhover": { "enable": false, "mode": "grab" }, "onclick": { "enable": true, "mode": "repulse" }, "resize": true }, "modes": { "grab": { "distance": 400, "line_linked": { "opacity": 0.5 } }, "bubble": { "distance": 400, "size": 4, "duration": 0.3, "opacity": 1, "speed": 3 }, "repulse": { "distance": 200, "duration": 0.4 }, "push": { "particles_nb": 4 }, "remove": { "particles_nb": 2 } } }, "retina_detect": true });
6325    }
6326
6327
6328    // Contactless services scrollTo
6329    $('a[href="#cs-download-app"]').on('click', function (e) {
6330        e.preventDefault();
6331        $(window).stop(true).scrollTo('.module-on-page--3', { duration: 400, interrupt: true });
6332    })
6333
6334
6335    // Booking widget rooms popup
6336    // Open booking popup
6337    $('.js__rooms-popup-trigger').on('click', function (e) {
6338        e.preventDefault();
6339        var popup = $(this).data('popup');
6340        $('#' + popup).addClass('active');
6341    });
6342
6343    // Close booking popup
6344    $('.js__rooms-popup-close').on('click', function (e) {
6345        e.preventDefault();
6346        $('.rooms-popup').removeClass('active');
6347    });
6348
6349    //Update Adults/Children amount
6350    $('.rooms-popup .rooms-popup__content .input-container select').on('change', function (e) {
6351        var hiddenField = $(this).data('field');
6352        var value = $(this).val();
6353        $('.booking-rooms#' + hiddenField).val(value);
6354
6355        calculateOccupancy();
6356    });
6357
6358    //Add another room
6359    $('.js__additional-add-rooms-trigger').on('click', function (e) {
6360        e.preventDefault();
6361
6362        var numRooms = parseInt($('.js__book-num-rooms').attr('data-rooms'));
6363        $('.js__book-num-rooms').attr('data-rooms', (numRooms + 1));
6364
6365        var triggerType = $(this).data('trigger-type');
6366
6367        if (triggerType == 'inline') {
6368            var container = '.reservations-overlay';
6369        } else if (triggerType == 'popup') {
6370            var container = '.rooms-popup';
6371        }
6372
6373        var roomNumber = $(container + ' .additional-room:visible').length + 2;
6374        $('.room-counter__counter p').html(roomNumber);
6375        if (!$(container + ' .additional-room:visible').length) {
6376            roomNumber = 2;
6377        }
6378
6379        if (roomNumber <= 5) {
6380            $(container + ' .additional-room.room-' + roomNumber).slideDown();
6381
6382            if (triggerType == 'inline') {
6383                $(container + ' .additional-room.room-' + roomNumber + ' select#adults-' + roomNumber).prop('disabled', false);
6384                $(container + ' .additional-room.room-' + roomNumber + ' select#children-' + roomNumber).prop('disabled', false);
6385            } else if (triggerType == 'popup') {
6386                $('.form__group--rooms #adults-' + roomNumber).prop('disabled', false);
6387                $('.form__group--rooms #children-' + roomNumber).prop('disabled', false);
6388            }
6389
6390            if (roomNumber === 2) {
6391                $(container + ' .js__additional-remove-rooms-trigger').removeClass('fade-out');
6392            }
6393
6394            if (roomNumber === 5) {
6395                $(this).addClass('fade-out');
6396            }
6397        }
6398
6399        calculateOccupancy();
6400    });
6401
6402    //Reduce num of rooms
6403    $('.js__additional-remove-rooms-trigger').on('click', function (e) {
6404        e.preventDefault();
6405
6406        var numRooms = parseInt($('.js__book-num-rooms').attr('data-rooms'));
6407        $('.js__book-num-rooms').attr('data-rooms', (numRooms - 1));
6408
6409        var triggerType = $(this).data('trigger-type');
6410
6411        if (triggerType == 'inline') {
6412            var container = '.reservations-overlay';
6413        } else if (triggerType == 'popup') {
6414            var container = '.rooms-popup';
6415        }
6416
6417        var roomNumber = $('.additional-room:visible').length + 1;
6418
6419        $('.room-counter__counter p').html(roomNumber - 1);
6420        $(container + ' .additional-room.room-' + roomNumber).slideUp();
6421
6422        if (triggerType == 'inline') {
6423
6424            $(container + ' .additional-room.room-' + roomNumber + ' select#adults-' + roomNumber).val(0);
6425            $(container + ' .additional-room.room-' + roomNumber + ' select#adults-' + roomNumber).prop('disabled', true);
6426            $(container + ' .additional-room.room-' + roomNumber + ' select#children-' + roomNumber).val(0);
6427            $(container + ' .additional-room.room-' + roomNumber + ' select#children-' + roomNumber).prop('disabled', true);
6428
6429        } else if (triggerType == 'popup') {
6430
6431            $('.form__group--rooms #adults-' + roomNumber).val(0);
6432            $('.form__group--rooms #adults-' + roomNumber).prop('disabled', true);
6433
6434            $('.form__group--rooms #children-' + roomNumber).val(0);
6435            $('.form__group--rooms #children-' + roomNumber).prop('disabled', true);
6436        }
6437
6438        if (roomNumber === 2) {
6439            $(this).addClass('fade-out');
6440        }
6441
6442        if (roomNumber === 5) {
6443            $(container + ' .js__additional-add-rooms-trigger').removeClass('fade-out');
6444        }
6445
6446        calculateOccupancy();
6447    });
6448
6449    function calculateOccupancy() {
6450        //Init the various vara
6451        var rooms = 0,
6452            adults = 0,
6453            childs = 0;
6454
6455        //Loop through all possible rooms
6456        var i = 1,
6457            iTotal = $('.js__book-num-rooms').attr('data-rooms');
6458
6459        while (i <= iTotal) {
6460            if ($('#popup-adults-' + i).first().val() > 0) {
6461                //This room is occupado! 
6462                rooms++;
6463                adults = (adults + parseInt($('#popup-adults-' + i).first().val()));
6464                childs = (childs + parseInt($('#popup-children-' + i).first().val()));
6465            }
6466            i++;
6467        }
6468
6469        //Get the labels right innit!
6470        var roomsLabel = 'Room',
6471            adultsLabel = 'Adult',
6472            childsLabel = 'Child';
6473
6474        if (rooms > 1) {
6475            roomsLabel += 's';
6476        }
6477
6478        if (adults > 1) {
6479            adultsLabel += 's';
6480        }
6481
6482        if (childs > 1) {
6483            childsLabel = 'Children';
6484        }
6485
6486        //Update the client facing label
6487        if (rooms > 0) {
6488            $('.js__book__rooms').html(rooms + " " + roomsLabel);
6489        }
6490
6491        if (adults > 0) {
6492            $('.js__book__adults').html(adults + " " + adultsLabel);
6493        } else {
6494            $('.js__book__adults').html("");
6495        }
6496
6497        if (childs > 0) {
6498            $('.js__book__children').html(childs + " " + childsLabel);
6499        } else {
6500            $('.js__book__children').html("");
6501        }
6502    }
6503
6504    if ($('#js-meeting-package-container').length > 0) {
6505
6506        if ($(window).width() < 768) {
6507            $('.header .header__booking-modal-btn a').css('display', 'none');
6508        } else {
6509            $('.header .header__booking-modal-btn a').css('display', 'inline-block');
6510        }
6511    }
6512
6513    // MeetingsPackage Code
6514    if (document.getElementById('js-meeting-package-container')) {
6515        var widgetID = document.getElementById('js-meeting-package-container').getAttribute('data-widget-id');
6516        var whitelabelID = document.getElementById('js-meeting-package-container').getAttribute('data-whitelabel-id');
6517        var locationID = document.getElementById('js-meeting-package-container').getAttribute('data-location');
6518        var lang = document.getElementById('js-meeting-package-container').getAttribute('data-language');
6519
6520        if (typeof existingScript === 'undefined') {
6521            let existingScript
6522        }
6523        if (typeof existingIframe === 'undefined') {
6524            let existingIframe
6525        }
6526        if (typeof scriptTag === 'undefined') {
6527            let scriptTag
6528        }
6529        existingScript = document.getElementById("mp_snippet_script")
6530        if (existingScript) {
6531            existingScript.remove()
6532        }
6533        existingIframe = document.getElementById("mp-bookingengine")
6534        if (existingIframe) {
6535            existingIframe.remove()
6536        }
6537
6538        scriptTag = document.createElement('script')
6539        scriptTag.setAttribute('id', 'mp_snippet_script')
6540        scriptTag.setAttribute('type', 'text/javascript')
6541        scriptTag.setAttribute('src', 'https://bookingengine-mp.s3.eu-west-2.amazonaws.com/script_dynamic.js')
6542        scriptTag.setAttribute("async", true)
6543        scriptTag.setAttribute('langcode', lang)
6544        scriptTag.setAttribute('whitelabel_id', whitelabelID)
6545        scriptTag.setAttribute('widget_id', widgetID)
6546        scriptTag.setAttribute('version', 'frontpage-v4')
6547        scriptTag.setAttribute('people', '10')
6548        scriptTag.setAttribute('destination', locationID);
6549
6550        document.getElementById("mp-booking-engine-iframe-container").appendChild(scriptTag)
6551
6552        console.log('hel,lo');
6553
6554        setTimeout(() => {
6555            $('.head__content .loader').hide();
6556        }, 2000);
6557    }
6558
6559    // Create session storage for tracking params passed in URL
6560    setSessionStorageForTrackingParams();
6561
6562    // Add tracking hidden input fields
6563    addTrackingElems();
6564
6565    // Add tracking params to radisson URLs
6566    addTrackingParamsToRadissonUrls();
6567
6568    // Rooms/Suites
6569    const roomSuiteBtns = document.querySelectorAll('.room-suites__scroll-btn-container .btn');
6570
6571    if (roomSuiteBtns) {
6572        roomSuiteBtns.forEach(btn => {
6573            btn.addEventListener('click', (e) => {
6574                e.preventDefault();
6575
6576                const roomType = btn.parentElement.getAttribute('data-room-type');
6577                const sectionTop = document.querySelector(`.js-rooms-suites-section[data-room-type="${roomType}"]`).offsetTop;
6578                const offset = document.querySelector('.header').offsetHeight + 40;
6579
6580                $('html, body').animate({ scrollTop: sectionTop - offset }, 600);
6581            });
6582        });
6583    }
6584}
6585
6586
6587
6588/**
6589 * Tracking parameters
6590 */
6591
6592function setSessionStorageForTrackingParams() {
6593    const paramTypes = ['facilitatorId', 'cid', 'utm_source', 'utm_medium', 'utm_campaign', 'utm_content', 'utm_term'];
6594    const currentUrlParams = new URLSearchParams(window.location.search);
6595
6596    paramTypes.forEach(param => {
6597        if (currentUrlParams.has(param)) {
6598            var cookieVal = currentUrlParams.get(param).replaceAll(' ', '+');
6599
6600            sessionStorage.setItem(param, cookieVal);
6601        }
6602    });
6603}
6604
6605function addTrackingElems() {
6606    if (sessionStorage.facilitatorId) {
6607        var inputHTML = '<input type="hidden" name="facilitatorId" id="facilitatorId" value="' + sessionStorage.facilitatorId + '">';
6608        $('.js__booking-form-hidden-elements').append(inputHTML);
6609    }
6610    if (sessionStorage.cid) {
6611        var inputHTML = '<input type="hidden" name="cid" id="cid" value="' + sessionStorage.cid + '">';
6612        $('.js__booking-form-hidden-elements').append(inputHTML);
6613    }
6614    if (sessionStorage.utm_source) {
6615        var inputHTML = '<input type="hidden" name="utm_source" id="utm_source" value="' + sessionStorage.utm_source + '">';
6616        $('.js__booking-form-hidden-elements').append(inputHTML);
6617    }
6618    if (sessionStorage.utm_medium) {
6619        var inputHTML = '<input type="hidden" name="utm_medium" id="utm_medium" value="' + sessionStorage.utm_medium + '">';
6620        $('.js__booking-form-hidden-elements').append(inputHTML);
6621    }
6622    if (sessionStorage.utm_campaign) {
6623        var inputHTML = '<input type="hidden" name="utm_campaign" id="utm_campaign" value="' + sessionStorage.utm_campaign + '">';
6624        $('.js__booking-form-hidden-elements').append(inputHTML);
6625    }
6626    if (sessionStorage.utm_content) {
6627        var inputHTML = '<input type="hidden" name="utm_content" id="utm_content" value="' + sessionStorage.utm_content + '">';
6628        $('.js__booking-form-hidden-elements').append(inputHTML);
6629    }
6630    if (sessionStorage.utm_term) {
6631        var inputHTML = '<input type="hidden" name="utm_term" id="utm_term" value="' + sessionStorage.utm_term + '">';
6632        $('.js__booking-form-hidden-elements').append(inputHTML);
6633    }
6634}
6635
6636function addTrackingParamsToRadissonUrls() {
6637    const paramTypes = ['facilitatorId', 'cid', 'utm_source', 'utm_medium', 'utm_campaign', 'utm_content'];
6638    const currentUrlParams = new URLSearchParams(window.location.search);
6639    const radissonLinksNodeList = document.querySelectorAll('a[href*="radissonhotels.com"]');
6640    const radissonLinks = [...radissonLinksNodeList];
6641
6642    radissonLinks.forEach(link => {
6643        let href = link.getAttribute('href');
6644
6645        paramTypes.forEach(param => {
6646            if (!href.includes(param)) {
6647                let paramVal = false;
6648                if (currentUrlParams.has(param)) { // Check for param in query string
6649                    paramVal = currentUrlParams.get(param);
6650                } else if (typeof getCookie === 'function' && getCookie(param)) {  // Check for param in cookies
6651                    paramVal = getCookie(param);
6652                }
6653
6654                if (paramVal && paramVal > '') {
6655                    href = addParamToUrl(href, param, paramVal);
6656                    link.setAttribute('href', href);
6657                }
6658            }
6659        })
6660    })
6661}
6662
6663function addParamToUrl(url, param, value) {
6664    if (url.includes('?')) {
6665        const lastChar = url.charAt(url.length - 1);
6666        if (lastChar === '/') {
6667            const urlWithoutTrailingSlash = url.slice(0, -1);
6668            return `${urlWithoutTrailingSlash}&${param}=${value}`;
6669        }
6670        return `${url}&${param}=${value}`;
6671    }
6672
6673    return `${url}?${param}=${value}`;
6674}
6675
6676// A/B Test functions
6677function getAbTestCookieData() {
6678    const cookies = document.cookie.split(';');
6679    let returnData = false;
6680
6681    for (let i = 0; i < cookies.length; i++) {
6682        let cookie = cookies[i].trim();
6683
6684        // Check if the cookie starts with the expected prefix
6685        if (cookie.indexOf('_vis_opt_exp_') === 0) {
6686            const [initial, prefix, opt, exp, campaignId, suffix] = cookie.split('_');
6687
6688            // Check if the cookie structure matches
6689            if (suffix.indexOf('combi=') === 0) {
6690                const [name, value] = suffix.split('=');
6691
6692                return {
6693                    name: name,
6694                    value: parseInt(value),
6695                    campaignId: parseInt(campaignId)
6696                };
6697            }
6698        }
6699    }
6700
6701    return false;
6702}
6703
6704function initMap() {
6705    var map;
6706    var markersArray = [];
6707
6708    console.log('Initialising map...');
6709
6710    loadMap();
6711    markersArray = addMapMarkers(markersArray);
6712
6713    $('.js__close-info-box').click(function () {
6714        $('#js__info-box').removeClass('active');
6715    })
6716
6717    /* filters */
6718    $('.js__map-filter-cats li').click(function () {
6719
6720        var all_lists = $('.js__map-filter-cats li'),
6721            parentContainer = $(this).parents('.content');
6722
6723        if (!$(parentContainer).hasClass('filter-active')) {
6724            $(parentContainer).addClass('filter-active');
6725        }
6726
6727        if ($(this).hasClass('inactive')) { //Not currently active, so make it active!
6728
6729            $(this).removeClass('inactive');
6730            $(this).addClass('active');
6731
6732
6733            $(all_lists).not(this).each(function () {
6734                $(this).addClass('inactive')
6735            });
6736
6737            $('#js__info-box').removeClass('active');
6738            $('.js__map-filter-cats').data('selected', $(this).data('cat-id'));
6739
6740        } else if ($(this).hasClass('active')) {	//Currently active, so treat this as clearing all filters
6741
6742
6743            $(parentContainer).removeClass('filter-active');
6744            $('.js__map-filter-cats').data('selected', '');
6745            $('#js__info-box').removeClass('active');
6746
6747            $('.js__map-filter-cats li').each(function () {
6748                $(this).removeClass('inactive');
6749                $(this).removeClass('active');
6750            });
6751
6752        } else { //Not active or inactive - in initial state
6753
6754            $(this).addClass('active');
6755
6756            $(all_lists).not(this).each(function () {
6757                $(this).addClass('inactive')
6758            });
6759
6760            $('#js__info-box').removeClass('active');
6761            $('.js__map-filter-cats').data('selected', $(this).data('cat-id'));
6762
6763        }
6764
6765
6766
6767        markersArray = addMapMarkers(markersArray);
6768
6769    });
6770
6771    /* Clear Filters */
6772    $('.js__clear-filter').click(function () {
6773
6774        var parentContainer = $(this).parents('.content');
6775        $(parentContainer).removeClass('filter-active');
6776        $('.js__map-filter-cats').data('selected', '');
6777        $('#js__info-box').removeClass('active');
6778        $('.js__map-filter-cats li').each(function () {
6779            $(this).removeClass('inactive')
6780        });
6781
6782        markersArray = addMapMarkers(markersArray);
6783    })
6784}
6785
6786
6787
6788
6789
6790
6791
6792
6793
6794
6795
6796
6797function loadMap() {
6798    map = new google.maps.Map(
6799        document.getElementById('map'),
6800        {
6801            center: new google.maps.LatLng($('#js__map-details').data('lat'), $('#js__map-details').data('lng')),
6802            zoom: 17,
6803            disableDefaultUI: true,
6804            zoomControl: true,
6805            styles: [
6806                {
6807                    "featureType": "administrative",
6808                    "elementType": "labels.text.fill",
6809                    "stylers": [
6810                        {
6811                            "color": "#444444"
6812                        }
6813                    ]
6814                },
6815                {
6816                    "featureType": "landscape",
6817                    "elementType": "all",
6818                    "stylers": [
6819                        {
6820                            "color": "#f2f2f2"
6821                        }
6822                    ]
6823                },
6824                {
6825                    "featureType": "landscape",
6826                    "elementType": "geometry.fill",
6827                    "stylers": [
6828                        {
6829                            "visibility": "on"
6830                        },
6831                        {
6832                            "color": "#fff7da"
6833                        }
6834                    ]
6835                },
6836                {
6837                    "featureType": "poi",
6838                    "elementType": "all",
6839                    "stylers": [
6840                        {
6841                            "visibility": "off"
6842                        }
6843                    ]
6844                },
6845                {
6846                    "featureType": "road",
6847                    "elementType": "all",
6848                    "stylers": [
6849                        {
6850                            "saturation": -100
6851                        },
6852                        {
6853                            "lightness": 45
6854                        }
6855                    ]
6856                },
6857                {
6858                    "featureType": "road.highway",
6859                    "elementType": "all",
6860                    "stylers": [
6861                        {
6862                            "visibility": "simplified"
6863                        },
6864                        {
6865                            "color": "#C5BBAA"
6866                        }
6867                    ]
6868                },
6869                {
6870                    "featureType": "road.arterial",
6871                    "elementType": "labels.icon",
6872                    "stylers": [
6873                        {
6874                            "visibility": "off"
6875                        }
6876                    ]
6877                },
6878                {
6879                    "featureType": "transit",
6880                    "elementType": "all",
6881                    "stylers": [
6882                        {
6883                            "visibility": "off"
6884                        }
6885                    ]
6886                },
6887                {
6888                    "featureType": "water",
6889                    "elementType": "all",
6890                    "stylers": [
6891                        {
6892                            "color": "#73a2a5"
6893                        },
6894                        {
6895                            "visibility": "on"
6896                        }
6897                    ]
6898                }
6899            ]
6900        });
6901
6902    console.log('Map Initialised!');
6903
6904    return;
6905}
6906
6907
6908function addMapMarkers(markersArray = []) {
6909
6910    //Check to see if we're only showing a specific category
6911    var catToShow = $('.js__map-filter-cats').data('selected');
6912
6913    if ($.isNumeric(catToShow)) {
6914        var selectedPins = $('.js__map-locations[data-category="' + catToS
6914how + '"], .js__map-locations[data-category="8"]');
6915    } else {
6916        var selectedPins = $('.js__map-locations');
6917    }
6918
6919    //Clear any existing markers
6920    if (typeof markersArray !== 'undefined') {
6921        if (markersArray.length > 0) {
6922            for (var i = 0; i < markersArray.length; i++) {
6923                markersArray[i].setMap(null);
6924            }
6925        }
6926    }
6927
6928    //Draw Map Markers
6929    markers = selectedPins.each(function () { //Loop through all of them
6930
6931
6932
6933
6934        var iconUrl = $('#js__map-details').data('icons-root') + '' + $(this).data('icon');
6935
6936        console.log('New Marker');
6937        console.log($(this).children('.js__location-title').text());
6938        console.log('Lat: ' + $(this).data('lat'));
6939        console.log('Lng: ' + $(this).data('lng'));
6940        console.log('');
6941
6942
6943
6944        //Draw the filtered pins
6945        var icon = {
6946            url: iconUrl,
6947            scaledSize: new google.maps.Size(61, 61), // scaled size
6948            origin: new google.maps.Point(0, 0), // origin 
6949            anchor: new google.maps.Point(30, 30) // anchor (set to middle of image)
6950        };
6951
6952        var marker = new google.maps.Marker({
6953            position: new google.maps.LatLng({ lat: parseFloat($(this).data('lat')), lng: parseFloat($(this).data('lng')) }),
6954            icon: icon,
6955            map: map,
6956            //popupIndex = $(this).data('index'),
6957        });
6958
6959        markersArray.push(marker);
6960
6961
6962        if ($(this).data('icon') != 'holmes-hotel-pin.png') { // No info popup for the Holmes Hotel box
6963
6964            //Data for the popup
6965            var title = $(this).children('.js__location-title').text(),
6966                copy = $(this).children('.js__location-copy').text(),
6967                linkTitle = $(this).children('.js__location-link').text(),
6968                linkURL = $(this).children('.js__location-link').attr('href'),
6969                linkTarget = $(this).children('.js__location-link').attr('target'),
6970                directionsTitle = $(this).children('.js__directions-link').text(),
6971                directionsURL = $(this).children('.js__directions-link').attr('href'),
6972                directionsTarget = $(this).children('.js__directions-link').attr('target');
6973
6974            google.maps.event.addListener(marker, "click", (function (marker) {
6975                return function (evt) {
6976
6977                    //Empty the info box first (to rest the overflow scroll)
6978                    $('#js__info-box .js__location-title').html('');
6979                    $('#js__info-box .js__location-copy').html('');
6980                    $('#js__info-box .js__location-link').html('');
6981                    $('#js__info-box .js__location-link').attr('href', '');
6982                    $('#js__info-box .js__location-link').attr('target', '');
6983                    $('#js__info-box .js__directions-link').html('');
6984                    $('#js__info-box .js__directions-link').attr('href', '');
6985                    $('#js__info-box .js__directions-link').attr('target', '');
6986
6987                    //Now put the actual content in !
6988                    $('#js__info-box').addClass('active');
6989                    $('#js__info-box .js__location-title').html(title);
6990                    $('#js__info-box .js__location-copy').html(copy);
6991                    $('#js__info-box .js__location-link').html(linkTitle);
6992                    $('#js__info-box .js__location-link').attr('href', linkURL);
6993                    $('#js__info-box .js__location-link').attr('target', linkTarget);
6994
6995                    $('#js__info-box .js__directions-link').html(directionsTitle);
6996                    $('#js__info-box .js__directions-link').attr('href', directionsURL);
6997                    $('#js__info-box .js__directions-link').attr('target', directionsTarget);
6998
6999                    if (linkTitle <= '') {
7000                        $('#js__info-box .js__location-link').addClass('hidden');
7001                    } else {
7002                        $('#js__info-box .js__location-link').removeClass('hidden');
7003                    }
7004
7005                    if (directionsTitle <= '') {
7006                        $('#js__info-box .js__directions-link').addClass('hidden');
7007                    } else {
7008                        $('#js__info-box .js__directions-link').removeClass('hidden');
7009                    }
7010
7011                }
7012            })(marker));
7013        }
7014
7015    });
7016
7017
7018
7019
7020
7021
7022
7023    return markersArray;
7024
7025}
7026
7027
7028
7029function clearOverlays() {
7030    for (var i = 0; i < markersArray.length; i++) {
7031        markersArray[i].setMap(null);
7032    }
7033    markersArray.length = 0;
7034}
7035
7036function initFAQs() {
7037    if (!$('.m__faqs').length) {
7038        return;
7039    }
7040
7041    $('.m__faqs').each(function () {
7042        var $module = $(this);
7043        var $filter = $module.find('.js__faqs-filter');
7044        var $questions = $module.find('.js__faqs-questions');
7045
7046        $module.find('.m__faqs-item:visible:last').addClass('is-last');
7047
7048        $module.on('click', '.js__faqs-toggle', function () {
7049            var $toggle = $(this);
7050            $toggle.toggleClass('is-open');
7051            $toggle.siblings('.js__faqs-answer').stop(true, true).slideToggle();
7052        });
7053
7054        if ($filter.length && $.fn.slick) {
7055            $filter.slick({
7056                slidesToShow: 1,
7057                mobileFirst: true,
7058                dots: false,
7059                arrows: false,
7060                adaptiveHeight: true,
7061                responsive: [
7062                    {
7063                        breakpoint: 992,
7064                        settings: 'unslick'
7065                    }
7066                ]
7067            });
7068        }
7069
7070        $module.on('click', '.js__faqs-slider-prev', function () {
7071            if ($filter.hasClass('slick-initialized')) {
7072                $filter.slick('slickPrev');
7073            }
7074        });
7075
7076        $module.on('click', '.js__faqs-slider-next', function () {
7077            if ($filter.hasClass('slick-initialized')) {
7078                $filter.slick('slickNext');
7079            }
7080        });
7081
7082        $filter.on('beforeChange', function (event, slick, currentSlide, nextSlide) {
7083            var $slide = $filter.find('.slick-slide[data-slick-index="' + nextSlide + '"]').first();
7084            changeFAQCategory(
7085                $module,
7086                $slide.data('category'),
7087                $.trim($slide.find('.m__faqs-category-text').text())
7088            );
7089        });
7090
7091        $module.on('click', '.js__faqs-category', function (e) {
7092            e.preventDefault();
7093
7094            $module.find('.js__faqs-category').removeClass('is-active');
7095            $(this).addClass('is-active');
7096
7097            if ($(window).innerWidth() > 991) {
7098                changeFAQCategory(
7099                    $module,
7100                    $(this).data('category'),
7101                    $.trim($(this).find('.m__faqs-category-text').text())
7102                );
7103            }
7104        });
7105
7106        function changeFAQCategory($module, catId, catName) {
7107            var showAll = String(catId) === 'all';
7108            $questions.css('min-height', $questions.outerHeight());
7109
7110            $questions.fadeOut(function () {
7111                $module.find('.m__faqs-item-answer').hide();
7112                $module.find('.m__faqs-item-question').removeClass('is-open');
7113
7114                $module.find('.m__faqs-item').hide();
7115                var $visible = showAll
7116                    ? $module.find('.m__faqs-item')
7117                    : $module.find('.m__faqs-item[data-category="' + catId + '"]');
7118                $visible.show();
7119
7120                $module.find('.m__faqs-item').removeClass('is-last');
7121                $visible.last().addClass('is-last');
7122
7123                $module.find('.js__faqs-title').text(catName);
7124            });
7125
7126            setTimeout(function () {
7127                $questions.fadeIn();
7128                $questions.css('min-height', '');
7129            }, 500);
7130        }
7131    });
7132}
7133

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.