· 8 years ago · Nov 27, 2017, 01:30 PM
1/*! jQuery v2.1.4 | (c) 2005, 2015 jQuery Foundation, Inc. | jquery.org/license */
2!function (a, b) { "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 var c = [], d = c.slice, e = c.concat, f = c.push, g = c.indexOf, h = {}, i = h.toString, j = h.hasOwnProperty, k = {}, l = a.document, m = "2.1.4", n = function (a, b) { return new n.fn.init(a, b) }, o = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, p = /^-ms-/, q = /-([\da-z])/gi, r = function (a, b) { return b.toUpperCase() }; n.fn = n.prototype = { jquery: m, constructor: n, selector: "", length: 0, toArray: function () { return d.call(this) }, get: function (a) { return null != a ? 0 > a ? this[a + this.length] : this[a] : d.call(this) }, pushStack: function (a) { var b = n.merge(this.constructor(), a); return b.prevObject = this, b.context = this.context, b }, each: function (a, b) { return n.each(this, a, b) }, map: function (a) { return this.pushStack(n.map(this, function (b, c) { return a.call(b, c, b) })) }, slice: function () { return this.pushStack(d.apply(this, arguments)) }, first: function () { return this.eq(0) }, last: function () { return this.eq(-1) }, eq: function (a) { var b = this.length, c = +a + (0 > a ? b : 0); return this.pushStack(c >= 0 && b > c ? [this[c]] : []) }, end: function () { return this.prevObject || this.constructor(null) }, push: f, sort: c.sort, splice: c.splice }, n.extend = n.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 || n.isFunction(g) || (g = {}), h === i && (g = this, h--) ; i > h; h++) if (null != (a = arguments[h])) for (b in a) c = g[b], d = a[b], g !== d && (j && d && (n.isPlainObject(d) || (e = n.isArray(d))) ? (e ? (e = !1, f = c && n.isArray(c) ? c : []) : f = c && n.isPlainObject(c) ? c : {}, g[b] = n.extend(j, f, d)) : void 0 !== d && (g[b] = d)); return g }, n.extend({ expando: "jQuery" + (m + Math.random()).replace(/\D/g, ""), isReady: !0, error: function (a) { throw new Error(a) }, noop: function () { }, isFunction: function (a) { return "function" === n.type(a) }, isArray: Array.isArray, isWindow: function (a) { return null != a && a === a.window }, isNumeric: function (a) { return !n.isArray(a) && a - parseFloat(a) + 1 >= 0 }, isPlainObject: function (a) { return "object" !== n.type(a) || a.nodeType || n.isWindow(a) ? !1 : a.constructor && !j.call(a.constructor.prototype, "isPrototypeOf") ? !1 : !0 }, 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 ? h[i.call(a)] || "object" : typeof a }, globalEval: function (a) { var b, c = eval; a = n.trim(a), a && (1 === a.indexOf("use strict") ? (b = l.createElement("script"), b.text = a, l.head.appendChild(b).parentNode.removeChild(b)) : c(a)) }, camelCase: function (a) { return a.replace(p, "ms-").replace(q, r) }, nodeName: function (a, b) { return a.nodeName && a.nodeName.toLowerCase() === b.toLowerCase() }, each: function (a, b, c) { var d, e = 0, f = a.length, g = s(a); if (c) { if (g) { for (; f > e; e++) if (d = b.apply(a[e], c), d === !1) break } else for (e in a) if (d = b.apply(a[e], c), d === !1) break } else if (g) { for (; f > e; e++) if (d = b.call(a[e], e, a[e]), d === !1) break } else for (e in a) if (d = b.call(a[e], e, a[e]), d === !1) break; return a }, trim: function (a) { return null == a ? "" : (a + "").replace(o, "") }, makeArray: function (a, b) { var c = b || []; return null != a && (s(Object(a)) ? n.merge(c, "string" == typeof a ? [a] : a) : f.call(c, a)), c }, inArray: function (a, b, c) { return null == b ? -1 : g.call(b, a, c) }, merge: function (a, b) { for (var c = +b.length, d = 0, e = a.length; c > d; 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; g > f; f++) d = !b(a[f], f), d !== h && e.push(a[f]); return e }, map: function (a, b, c) { var d, f = 0, g = a.length, h = s(a), i = []; if (h) for (; g > f; f++) d = b(a[f], f, c), null != d && i.push(d); else for (f in a) d = b(a[f], f, c), null != d && i.push(d); return e.apply([], i) }, guid: 1, proxy: function (a, b) { var c, e, f; return "string" == typeof b && (c = a[b], b = a, a = c), n.isFunction(a) ? (e = d.call(arguments, 2), f = function () { return a.apply(b || this, e.concat(d.call(arguments))) }, f.guid = a.guid = a.guid || n.guid++, f) : void 0 }, now: Date.now, support: k }), n.each("Boolean Number String Function Array Date RegExp Object Error".split(" "), function (a, b) { h["[object " + b + "]"] = b.toLowerCase() }); function s(a) { var b = "length" in a && a.length, c = n.type(a); return "function" === c || n.isWindow(a) ? !1 : 1 === a.nodeType && b ? !0 : "array" === c || 0 === b || "number" == typeof b && b > 0 && b - 1 in a } var t = 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 = 1 << 31, D = {}.hasOwnProperty, E = [], F = E.pop, G = E.push, H = E.push, I = E.slice, J = function (a, b) { for (var c = 0, d = a.length; d > c; c++) if (a[c] === b) return c; return -1 }, K = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped", L = "[\\x20\\t\\r\\n\\f]", M = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+", N = M.replace("w", "w#"), O = "\\[" + L + "*(" + M + ")(?:" + L + "*([*^$|!~]?=)" + L + "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + N + "))|)" + L + "*\\]", P = ":(" + M + ")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|" + O + ")*)|.*)\\)|)", Q = new RegExp(L + "+", "g"), R = new RegExp("^" + L + "+|((?:^|[^\\\\])(?:\\\\.)*)" + L + "+$", "g"), S = new RegExp("^" + L + "*," + L + "*"), T = new RegExp("^" + L + "*([>+~]|" + L + ")" + L + "*"), U = new RegExp("=" + L + "*([^\\]'\"]*?)" + L + "*\\]", "g"), V = new RegExp(P), W = new RegExp("^" + N + "$"), X = { ID: new RegExp("^#(" + M + ")"), CLASS: new RegExp("^\\.(" + M + ")"), TAG: new RegExp("^(" + M.replace("w", "w*") + ")"), ATTR: new RegExp("^" + O), PSEUDO: new RegExp("^" + P), CHILD: new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + L + "*(even|odd|(([+-]|)(\\d*)n|)" + L + "*(?:([+-]|)" + L + "*(\\d+)|))" + L + "*\\)|)", "i"), bool: new RegExp("^(?:" + K + ")$", "i"), needsContext: new RegExp("^" + L + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + L + "*((?:-\\d)?\\d*)" + L + "*\\)|)(?=[^-]|$)", "i") }, Y = /^(?:input|select|textarea|button)$/i, Z = /^h\d$/i, $ = /^[^{]+\{\s*\[native \w/, _ = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, aa = /[+~]/, ba = /'|\\/g, ca = new RegExp("\\\\([\\da-f]{1,6}" + L + "?|(" + L + ")|.)", "ig"), da = function (a, b, c) { var d = "0x" + b - 65536; return d !== d || c ? b : 0 > d ? String.fromCharCode(d + 65536) : String.fromCharCode(d >> 10 | 55296, 1023 & d | 56320) }, ea = function () { m() }; try { H.apply(E = I.call(v.childNodes), v.childNodes), E[v.childNodes.length].nodeType } catch (fa) { H = { apply: E.length ? function (a, b) { G.apply(a, I.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, w, x; if ((b ? b.ownerDocument || b : v) !== n && m(b), b = b || n, d = d || [], k = b.nodeType, "string" != typeof a || !a || 1 !== k && 9 !== k && 11 !== k) return d; if (!e && p) { if (11 !== k && (f = _.exec(a))) if (j = f[1]) { if (9 === k) { if (h = b.getElementById(j), !h || !h.parentNode) return d; if (h.id === j) return d.push(h), d } else if (b.ownerDocument && (h = b.ownerDocument.getElementById(j)) && t(b, h) && h.id === j) return d.push(h), d } else { if (f[2]) return H.apply(d, b.getElementsByTagName(a)), d; if ((j = f[3]) && c.getElementsByClassName) return H.apply(d, b.getElementsByClassName(j)), d } if (c.qsa && (!q || !q.test(a))) { if (s = r = u, w = b, x = 1 !== k && a, 1 === k && "object" !== b.nodeName.toLowerCase()) { o = g(a), (r = b.getAttribute("id")) ? s = r.replace(ba, "\\$&") : b.setAttribute("id", s), s = "[id='" + s + "'] ", l = o.length; while (l--) o[l] = s + ra(o[l]); w = aa.test(a) && pa(b.parentNode) || b, x = o.join(",") } if (x) try { return H.apply(d, w.querySelectorAll(x)), d } catch (y) { } finally { r || b.removeAttribute("id") } } } return i(a.replace(R, "$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("div"); 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 = a.length; while (e--) d.attrHandle[c[e]] = b } function la(a, b) { var c = b && a, d = c && 1 === a.nodeType && 1 === b.nodeType && (~b.sourceIndex || C) - (~a.sourceIndex || C); 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 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 pa(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 : !1 }, 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 = g.documentElement, e = g.defaultView, e && e !== e.top && (e.addEventListener ? e.addEventListener("unload", ea, !1) : e.attachEvent && e.attachEvent("onunload", ea)), p = !f(g), c.attributes = ja(function (a) { return a.className = "i", !a.getAttribute("className") }), c.getElementsByTagName = ja(function (a) { return a.appendChild(g.createComment("")), !a.getElementsByTagName("*").length }), c.getElementsByClassName = $.test(g.getElementsByClassName), c.getById = ja(function (a) { return o.appendChild(a).id = u, !g.getElementsByName || !g.getElementsByName(u).length }), c.getById ? (d.find.ID = function (a, b) { if ("undefined" != typeof b.getElementById && p) { var c = b.getElementById(a); return c && c.parentNode ? [c] : [] } }, d.filter.ID = function (a) { var b = a.replace(ca, da); return function (a) { return a.getAttribute("id") === b } }) : (delete d.find.ID, d.filter.ID = function (a) { var b = a.replace(ca, da); return function (a) { var c = "undefined" != typeof a.getAttributeNode && a.getAttributeNode("id"); return c && c.value === b } }), 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) { return p ? b.getElementsByClassName(a) : void 0 }, r = [], q = [], (c.qsa = $.test(g.querySelectorAll)) && (ja(function (a) { o.appendChild(a).innerHTML = "<a id='" + u + "'></a><select id='" + u + "-\f]' msallowcapture=''><option selected=''></option></select>", a.querySelectorAll("[msallowcapture^='']").length && q.push("[*^$]=" + L + "*(?:''|\"\")"), a.querySelectorAll("[selected]").length || q.push("\\[" + L + "*(?:value|" + K + ")"), a.querySelectorAll("[id~=" + u + "-]").length || q.push("~="), a.querySelectorAll(":checked").length || q.push(":checked"), a.querySelectorAll("a#" + u + "+*").length || q.push(".#.+[+~]") }), ja(function (a) { var b = g.createElement("input"); b.setAttribute("type", "hidden"), a.appendChild(b).setAttribute("name", "D"), a.querySelectorAll("[name=d]").length && q.push("name" + L + "*[*^$|!~]?="), a.querySelectorAll(":enabled").length || q.push(":enabled", ":disabled"), a.querySelectorAll("*,:x"), q.push(",.*:") })), (c.matchesSelector = $.test(s = o.matches || o.webkitMatchesSelector || o.mozMatchesSelector || o.oMatchesSelector || o.msMatchesSelector)) && ja(function (a) { c.disconnectedMatch = s.call(a, "div"), s.call(a, "[s!='']:x"), r.push("!=", P) }), q = q.length && new RegExp(q.join("|")), r = r.length && new RegExp(r.join("|")), b = $.test(o.compareDocumentPosition), t = b || $.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 === g || a.ownerDocument === v && t(v, a) ? -1 : b === g || b.ownerDocument === v && t(v, b) ? 1 : k ? J(k, a) - J(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, h = [a], i = [b]; if (!e || !f) return a === g ? -1 : b === g ? 1 : e ? -1 : f ? 1 : k ? J(k, a) - J(k, b) : 0; if (e === f) return la(a, b); c = a; while (c = c.parentNode) h.unshift(c); c = b; while (c = c.parentNode) i.unshift(c); while (h[d] === i[d]) d++; return d ? la(h[d], i[d]) : h[d] === v ? -1 : i[d] === v ? 1 : 0 }, g) : 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(U, "='$1']"), !(!c.matchesSelector || !p || 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 && D.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.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: X, 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(ca, da), a[3] = (a[3] || a[4] || a[5] || "").replace(ca, da), "~=" === 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 X.CHILD.test(a[0]) ? null : (a[3] ? a[2] = a[4] || a[5] || "" : c && V.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(ca, da).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("(^|" + L + ")" + a + "(" + L + "|$)")) && 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(Q, " ") + " ").indexOf(c) > -1 : "|=" === b ? e === c || e.slice(0, c.length + 1) === c + "-" : !1) : !0 } }, 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; if (q) { if (f) { while (p) { l = b; while (l = l[p]) if (h ? l.nodeName.toLowerCase() === r : 1 === l.nodeType) return !1; o = p = "only" === a && !o && "nextSibling" } return !0 } if (o = [g ? q.firstChild : q.lastChild], g && s) { k = q[u] || (q[u] = {}), j = k[a] || [], n = j[0] === w && j[1], m = j[0] === w && j[2], l = n && q.childNodes[n]; while (l = ++n && l && l[p] || (m = n = 0) || o.pop()) if (1 === l.nodeType && ++m && l === b) { k[a] = [w, n, m]; break } } else if (s && (j = (b[u] || (b[u] = {}))[a]) && j[0] === w) m = j[1]; else while (l = ++n && l && l[p] || (m = n = 0) || o.pop()) if ((h ? l.nodeName.toLowerCase() === r : 1 === l.nodeType) && ++m && (s && ((l[u] || (l[u] = {}))[a] = [w, m]), l === b)) break; return m -= e, m === d || m % d === 0 && m / 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 = J(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(R, "$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(ca, da), function (b) { return (b.textContent || b.innerText || e(b)).indexOf(a) > -1 } }), lang: ia(function (a) { return W.test(a || "") || ga.error("unsupported lang: " + a), a = a.replace(ca, da).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: function (a) { return a.disabled === !1 }, disabled: function (a) { return a.disabled === !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 Z.test(a.nodeName) }, input: function (a) { return Y.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: oa(function () { return [0] }), last: oa(function (a, b) { return [b - 1] }), eq: oa(function (a, b, c) { return [0 > c ? c + b : c] }), even: oa(function (a, b) { for (var c = 0; b > c; c += 2) a.push(c); return a }), odd: oa(function (a, b) { for (var c = 1; b > c; c += 2) a.push(c); return a }), lt: oa(function (a, b, c) { for (var d = 0 > c ? c + b : c; --d >= 0;) a.push(d); return a }), gt: oa(function (a, b, c) { for (var d = 0 > c ? 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 qa() { } qa.prototype = d.filters = d.pseudos, d.setFilters = new qa, 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 = S.exec(h))) && (e && (h = h.slice(e[0].length) || h), i.push(f = [])), c = !1, (e = T.exec(h)) && (c = e.shift(), f.push({ value: c, type: e[0].replace(R, " ") }), h = h.slice(c.length)); for (g in d.filter) !(e = X[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 ra(a) { for (var b = 0, c = a.length, d = ""; c > b; b++) d += a[b].value; return d } function sa(a, b, c) { var d = b.dir, e = c && "parentNode" === d, f = x++; return b.first ? function (b, c, f) { while (b = b[d]) if (1 === b.nodeType || e) return a(b, c, f) } : function (b, c, g) { var h, i, j = [w, f]; if (g) { while (b = b[d]) if ((1 === b.nodeType || e) && a(b, c, g)) return !0 } else while (b = b[d]) if (1 === b.nodeType || e) { if (i = b[u] || (b[u] = {}), (h = i[d]) && h[0] === w && h[1] === f) return j[2] = h[2]; if (i[d] = j, j[2] = a(b, c, g)) return !0 } } } function ta(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 ua(a, b, c) { for (var d = 0, e = b.length; e > d; d++) ga(a, b[d], c); return c } function va(a, b, c, d, e) { for (var f, g = [], h = 0, i = a.length, j = null != b; i > h; h++) (f = a[h]) && (!c || c(f, d, e)) && (g.push(f), j && b.push(h)); return g } function wa(a, b, c, d, e, f) { return d && !d[u] && (d = wa(d)), e && !e[u] && (e = wa(e, f)), ia(function (f, g, h, i) { var j, k, l, m = [], n = [], o = g.length, p = f || ua(b || "*", h.nodeType ? [h] : h, []), q = !a || !f && b ? p : va(p, m, a, h, i), r = c ? e || (f ? a : o || d) ? [] : g : q; if (c && c(q, r, h, i), d) { j = va(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 ? J(f, l) : m[k]) > -1 && (f[j] = !(g[j] = l)) } } else r = va(r === g ? r.splice(o, r.length) : r), e ? e(null, g, r, i) : H.apply(g, r) }) } function xa(a) { for (var b, c, e, f = a.length, g = d.relative[a[0].type], h = g || d.relative[" "], i = g ? 1 : 0, k = sa(function (a) { return a === b }, h, !0), l = sa(function (a) { return J(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 }]; f > i; i++) if (c = d.relative[a[i].type]) m = [sa(ta(m), c)]; else { if (c = d.filter[a[i].type].apply(null, a[i].matches), c[u]) { for (e = ++i; f > e; e++) if (d.relative[a[e].type]) break; return wa(i > 1 && ta(m), i > 1 && ra(a.slice(0, i - 1).concat({ value: " " === a[i - 2].type ? "*" : "" })).replace(R, "$1"), c, e > i && xa(a.slice(i, e)), f > e && xa(a = a.slice(e)), f > e && ra(a)) } m.push(c) } return ta(m) } function ya(a, b) { var c = b.length > 0, e = a.length > 0, f = function (f, g, h, i, k) { var l, m, o, p = 0, q = "0", r = f && [], s = [], t = j, u = f || e && d.find.TAG("*", k), v = w += null == t ? 1 : Math.random() || .1, x = u.length; for (k && (j = g !== n && g) ; q !== x && null != (l = u[q]) ; q++) { if (e && l) { m = 0; while (o = a[m++]) if (o(l, g, h)) { i.push(l); break } k && (w = v) } c && ((l = !o && l) && p--, f && r.push(l)) } if (p += q, c && q !== p) { m = 0; while (o = b[m++]) o(r, s, g, h); if (f) { if (p > 0) while (q--) r[q] || s[q] || (s[q] = F.call(i)); s = va(s) } H.apply(i, s), k && !f && s.length > 0 && p + b.length > 1 && ga.uniqueSort(i) } return k && (w = v, j = t), r }; 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 = xa(b[c]), f[u] ? d.push(f) : e.push(f); f = A(a, ya(e, d)), f.selector = a } return f }, i = ga.select = function (a, b, e, f) { var i, j, k, l, m, n = "function" == typeof a && a, o = !f && g(a = n.selector || a); if (e = e || [], 1 === o.length) { if (j = o[0] = o[0].slice(0), j.length > 2 && "ID" === (k = j[0]).type && c.getById && 9 === b.nodeType && p && d.relative[j[1].type]) { if (b = (d.find.ID(k.matches[0].replace(ca, da), b) || [])[0], !b) return e; n && (b = b.parentNode), a = a.slice(j.shift().value.length) } i = X.needsContext.test(a) ? 0 : j.length; while (i--) { if (k = j[i], d.relative[l = k.type]) break; if ((m = d.find[l]) && (f = m(k.matches[0].replace(ca, da), aa.test(j[0].type) && pa(b.parentNode) || b))) { if (j.splice(i, 1), a = f.length && ra(j), !a) return H.apply(e, f), e; break } } } return (n || h(a, o))(f, b, !p, e, aa.test(a) && pa(b.parentNode) || b), e }, c.sortStable = u.split("").sort(B).join("") === u, c.detectDuplicates = !!l, m(), c.sortDetached = ja(function (a) { return 1 & a.compareDocumentPosition(n.createElement("div")) }), ja(function (a) { return a.innerHTML = "<a href='#'></a>", "#" === a.firstChild.getAttribute("href") }) || ka("type|href|height|width", function (a, b, c) { return c ? void 0 : 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) { return c || "input" !== a.nodeName.toLowerCase() ? void 0 : a.defaultValue }), ja(function (a) { return null == a.getAttribute("disabled") }) || ka(K, function (a, b, c) { var d; return c ? void 0 : a[b] === !0 ? b.toLowerCase() : (d = a.getAttributeNode(b)) && d.specified ? d.value : null }), ga }(a); n.find = t, n.expr = t.selectors, n.expr[":"] = n.expr.pseudos, n.unique = t.uniqueSort, n.text = t.getText, n.isXMLDoc = t.isXML, n.contains = t.contains; var u = n.expr.match.needsContext, v = /^<(\w+)\s*\/?>(?:<\/\1>|)$/, w = /^.[^:#\[\.,]*$/; function x(a, b, c) { if (n.isFunction(b)) return n.grep(a, function (a, d) { return !!b.call(a, d, a) !== c }); if (b.nodeType) return n.grep(a, function (a) { return a === b !== c }); if ("string" == typeof b) { if (w.test(b)) return n.filter(b, a, c); b = n.filter(b, a) } return n.grep(a, function (a) { return g.call(b, a) >= 0 !== c }) } n.filter = function (a, b, c) { var d = b[0]; return c && (a = ":not(" + a + ")"), 1 === b.length && 1 === d.nodeType ? n.find.matchesSelector(d, a) ? [d] : [] : n.find.matches(a, n.grep(b, function (a) { return 1 === a.nodeType })) }, n.fn.extend({ find: function (a) { var b, c = this.length, d = [], e = this; if ("string" != typeof a) return this.pushStack(n(a).filter(function () { for (b = 0; c > b; b++) if (n.contains(e[b], this)) return !0 })); for (b = 0; c > b; b++) n.find(a, e[b], d); return d = this.pushStack(c > 1 ? n.unique(d) : d), d.selector = this.selector ? this.selector + " " + a : a, d }, filter: function (a) { return this.pushStack(x(this, a || [], !1)) }, not: function (a) { return this.pushStack(x(this, a || [], !0)) }, is: function (a) { return !!x(this, "string" == typeof a && u.test(a) ? n(a) : a || [], !1).length } }); var y, z = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/, A = n.fn.init = function (a, b) { var c, d; if (!a) return this; if ("string" == typeof a) { if (c = "<" === a[0] && ">" === a[a.length - 1] && a.length >= 3 ? [null, a, null] : z.exec(a), !c || !c[1] && b) return !b || b.jquery ? (b || y).find(a) : this.constructor(b).find(a); if (c[1]) { if (b = b instanceof n ? b[0] : b, n.merge(this, n.parseHTML(c[1], b && b.nodeType ? b.ownerDocument || b : l, !0)), v.test(c[1]) && n.isPlainObject(b)) for (c in b) n.isFunction(this[c]) ? this[c](b[c]) : this.attr(c, b[c]); return this } return d = l.getElementById(c[2]), d && d.parentNode && (this.length = 1, this[0] = d), this.context = l, this.selector = a, this } return a.nodeType ? (this.context = this[0] = a, this.length = 1, this) : n.isFunction(a) ? "undefined" != typeof y.ready ? y.ready(a) : a(n) : (void 0 !== a.selector && (this.selector = a.selector, this.context = a.context), n.makeArray(a, this)) }; A.prototype = n.fn, y = n(l); var B = /^(?:parents|prev(?:Until|All))/, C = { children: !0, contents: !0, next: !0, prev: !0 }; n.extend({ dir: function (a, b, c) { var d = [], e = void 0 !== c; while ((a = a[b]) && 9 !== a.nodeType) if (1 === a.nodeType) { if (e && n(a).is(c)) break; d.push(a) } return d }, sibling: function (a, b) { for (var c = []; a; a = a.nextSibling) 1 === a.nodeType && a !== b && c.push(a); return c } }), n.fn.extend({ has: function (a) { var b = n(a, this), c = b.length; return this.filter(function () { for (var a = 0; c > a; a++) if (n.contains(this, b[a])) return !0 }) }, closest: function (a, b) { for (var c, d = 0, e = this.length, f = [], g = u.test(a) || "string" != typeof a ? n(a, b || this.context) : 0; e > d; d++) for (c = this[d]; c && c !== b; c = c.parentNode) if (c.nodeType < 11 && (g ? g.index(c) > -1 : 1 === c.nodeType && n.find.matchesSelector(c, a))) { f.push(c); break } return this.pushStack(f.length > 1 ? n.unique(f) : f) }, index: function (a) { return a ? "string" == typeof a ? g.call(n(a), this[0]) : g.call(this, a.jquery ? a[0] : a) : this[0] && this[0].parentNode ? this.first().prevAll().length : -1 }, add: function (a, b) { return this.pushStack(n.unique(n.merge(this.get(), n(a, b)))) }, addBack: function (a) { return this.add(null == a ? this.prevObject : this.prevObject.filter(a)) } }); function D(a, b) { while ((a = a[b]) && 1 !== a.nodeType); return a } n.each({ parent: function (a) { var b = a.parentNode; return b && 11 !== b.nodeType ? b : null }, parents: function (a) { return n.dir(a, "parentNode") }, parentsUntil: function (a, b, c) { return n.dir(a, "parentNode", c) }, next: function (a) { return D(a, "nextSibling") }, prev: function (a) { return D(a, "previousSibling") }, nextAll: function (a) { return n.dir(a, "nextSibling") }, prevAll: function (a) { return n.dir(a, "previousSibling") }, nextUntil: function (a, b, c) { return n.dir(a, "nextSibling", c) }, prevUntil: function (a, b, c) { return n.dir(a, "previousSibling", c) }, siblings: function (a) { return n.sibling((a.parentNode || {}).firstChild, a) }, children: function (a) { return n.sibling(a.firstChild) }, contents: function (a) { return a.contentDocument || n.merge([], a.childNodes) } }, function (a, b) { n.fn[a] = function (c, d) { var e = n.map(this, b, c); return "Until" !== a.slice(-5) && (d = c), d && "string" == typeof d && (e = n.filter(d, e)), this.length > 1 && (C[a] || n.unique(e), B.test(a) && e.reverse()), this.pushStack(e) } }); var E = /\S+/g, F = {}; function G(a) { var b = F[a] = {}; return n.each(a.match(E) || [], function (a, c) { b[c] = !0 }), b } n.Callbacks = function (a) { a = "string" == typeof a ? F[a] || G(a) : n.extend({}, a); var b, c, d, e, f, g, h = [], i = !a.once && [], j = function (l) { for (b = a.memory && l, c = !0, g = e || 0, e = 0, f = h.length, d = !0; h && f > g; g++) if (h[g].apply(l[0], l[1]) === !1 && a.stopOnFalse) { b = !1; break } d = !1, h && (i ? i.length && j(i.shift()) : b ? h = [] : k.disable()) }, k = { add: function () { if (h) { var c = h.length; !function g(b) { n.each(b, function (b, c) { var d = n.type(c); "function" === d ? a.unique && k.has(c) || h.push(c) : c && c.length && "string" !== d && g(c) }) }(arguments), d ? f = h.length : b && (e = c, j(b)) } return this }, remove: function () { return h && n.each(arguments, function (a, b) { var c; while ((c = n.inArray(b, h, c)) > -1) h.splice(c, 1), d && (f >= c && f--, g >= c && g--) }), this }, has: function (a) { return a ? n.inArray(a, h) > -1 : !(!h || !h.length) }, empty: function () { return h = [], f = 0, this }, disable: function () { return h = i = b = void 0, this }, disabled: function () { return !h }, lock: function () { return i = void 0, b || k.disable(), this }, locked: function () { return !i }, fireWith: function (a, b) { return !h || c && !i || (b = b || [], b = [a, b.slice ? b.slice() : b], d ? i.push(b) : j(b)), this }, fire: function () { return k.fireWith(this, arguments), this }, fired: function () { return !!c } }; return k }, n.extend({ Deferred: function (a) { var b = [["resolve", "done", n.Callbacks("once memory"), "resolved"], ["reject", "fail", n.Callbacks("once memory"), "rejected"], ["notify", "progress", n.Callbacks("memory")]], c = "pending", d = { state: function () { return c }, always: function () { return e.done(arguments).fail(arguments), this }, then: function () { var a = arguments; return n.Deferred(function (c) { n.each(b, function (b, f) { var g = n.isFunction(a[b]) && a[b]; e[f[1]](function () { var a = g && g.apply(this, arguments); a && n.isFunction(a.promise) ? a.promise().done(c.resolve).fail(c.reject).progress(c.notify) : c[f[0] + "With"](this === d ? c.promise() : this, g ? [a] : arguments) }) }), a = null }).promise() }, promise: function (a) { return null != a ? n.extend(a, d) : d } }, e = {}; return d.pipe = d.then, n.each(b, function (a, f) { var g = f[2], h = f[3]; d[f[1]] = g.add, h && g.add(function () { c = h }, b[1 ^ a][2].disable, b[2][2].lock), e[f[0]] = function () { return e[f[0] + "With"](this === e ? d : this, arguments), this }, e[f[0] + "With"] = g.fireWith }), d.promise(e), a && a.call(e, e), e }, when: function (a) { var b = 0, c = d.call(arguments), e = c.length, f = 1 !== e || a && n.isFunction(a.promise) ? e : 0, g = 1 === f ? a : n.Deferred(), h = function (a, b, c) { return function (e) { b[a] = this, c[a] = arguments.length > 1 ? d.call(arguments) : e, c === i ? g.notifyWith(b, c) : --f || g.resolveWith(b, c) } }, i, j, k; if (e > 1) for (i = new Array(e), j = new Array(e), k = new Array(e) ; e > b; b++) c[b] && n.isFunction(c[b].promise) ? c[b].promise().done(h(b, k, c)).fail(g.reject).progress(h(b, j, i)) : --f; return f || g.resolveWith(k, c), g.promise() } }); var H; n.fn.ready = function (a) { return n.ready.promise().done(a), this }, n.extend({ isReady: !1, readyWait: 1, holdReady: function (a) { a ? n.readyWait++ : n.ready(!0) }, ready: function (a) { (a === !0 ? --n.readyWait : n.isReady) || (n.isReady = !0, a !== !0 && --n.readyWait > 0 || (H.resolveWith(l, [n]), n.fn.triggerHandler && (n(l).triggerHandler("ready"), n(l).off("ready")))) } }); function I() { l.removeEventListener("DOMContentLoaded", I, !1), a.removeEventListener("load", I, !1), n.ready() } n.ready.promise = function (b) { return H || (H = n.Deferred(), "complete" === l.readyState ? setTimeout(n.ready) : (l.addEventListener("DOMContentLoaded", I, !1), a.addEventListener("load", I, !1))), H.promise(b) }, n.ready.promise(); var J = n.access = function (a, b, c, d, e, f, g) { var h = 0, i = a.length, j = null == c; if ("object" === n.type(c)) { e = !0; for (h in c) n.access(a, b, h, c[h], !0, f, g) } else if (void 0 !== d && (e = !0, n.isFunction(d) || (g = !0), j && (g ? (b.call(a, d), b = null) : (j = b, b = function (a, b, c) { return j.call(n(a), c) })), b)) for (; i > h; 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 }; n.acceptData = function (a) { return 1 === a.nodeType || 9 === a.nodeType || !+a.nodeType }; function K() { Object.defineProperty(this.cache = {}, 0, { get: function () { return {} } }), this.expando = n.expando + K.uid++ } K.uid = 1, K.accepts = n.acceptData, K.prototype = { key: function (a) { if (!K.accepts(a)) return 0; var b = {}, c = a[this.expando]; if (!c) { c = K.uid++; try { b[this.expando] = { value: c }, Object.defineProperties(a, b) } catch (d) { b[this.expando] = c, n.extend(a, b) } } return this.cache[c] || (this.cache[c] = {}), c }, set: function (a, b, c) { var d, e = this.key(a), f = this.cache[e]; if ("string" == typeof b) f[b] = c; else if (n.isEmptyObject(f)) n.extend(this.cache[e], b); else for (d in b) f[d] = b[d]; return f }, get: function (a, b) { var c = this.cache[this.key(a)]; return void 0 === b ? c : c[b] }, access: function (a, b, c) { var d; return void 0 === b || b && "string" == typeof b && void 0 === c ? (d = this.get(a, b), void 0 !== d ? d : this.get(a, n.camelCase(b))) : (this.set(a, b, c), void 0 !== c ? c : b) }, remove: function (a, b) { var c, d, e, f = this.key(a), g = this.cache[f]; if (void 0 === b) this.cache[f] = {}; else { n.isArray(b) ? d = b.concat(b.map(n.camelCase)) : (e = n.camelCase(b), b in g ? d = [b, e] : (d = e, d = d in g ? [d] : d.match(E) || [])), c = d.length; while (c--) delete g[d[c]] } }, hasData: function (a) { return !n.isEmptyObject(this.cache[a[this.expando]] || {}) }, discard: function (a) { a[this.expando] && delete this.cache[a[this.expando]] } }; var L = new K, M = new K, N = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/, O = /([A-Z])/g; function P(a, b, c) { var d; if (void 0 === c && 1 === a.nodeType) if (d = "data-" + b.replace(O, "-$1").toLowerCase(), c = a.getAttribute(d), "string" == typeof c) { try { c = "true" === c ? !0 : "false" === c ? !1 : "null" === c ? null : +c + "" === c ? +c : N.test(c) ? n.parseJSON(c) : c } catch (e) { } M.set(a, b, c) } else c = void 0; return c } n.extend({
4 hasData: function (a) { return M.hasData(a) || L.hasData(a) }, data: function (a, b, c) {
5 return M.access(a, b, c)
6 }, removeData: function (a, b) { M.remove(a, b) }, _data: function (a, b, c) { return L.access(a, b, c) }, _removeData: function (a, b) { L.remove(a, b) }
7 }), n.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 = M.get(f), 1 === f.nodeType && !L.get(f, "hasDataAttrs"))) { c = g.length; while (c--) g[c] && (d = g[c].name, 0 === d.indexOf("data-") && (d = n.camelCase(d.slice(5)), P(f, d, e[d]))); L.set(f, "hasDataAttrs", !0) } return e } return "object" == typeof a ? this.each(function () { M.set(this, a) }) : J(this, function (b) { var c, d = n.camelCase(a); if (f && void 0 === b) { if (c = M.get(f, a), void 0 !== c) return c; if (c = M.get(f, d), void 0 !== c) return c; if (c = P(f, d, void 0), void 0 !== c) return c } else this.each(function () { var c = M.get(this, d); M.set(this, d, b), -1 !== a.indexOf("-") && void 0 !== c && M.set(this, a, b) }) }, null, b, arguments.length > 1, null, !0) }, removeData: function (a) { return this.each(function () { M.remove(this, a) }) } }), n.extend({ queue: function (a, b, c) { var d; return a ? (b = (b || "fx") + "queue", d = L.get(a, b), c && (!d || n.isArray(c) ? d = L.access(a, b, n.makeArray(c)) : d.push(c)), d || []) : void 0 }, dequeue: function (a, b) { b = b || "fx"; var c = n.queue(a, b), d = c.length, e = c.shift(), f = n._queueHooks(a, b), g = function () { n.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 L.get(a, c) || L.access(a, c, { empty: n.Callbacks("once memory").add(function () { L.remove(a, [b + "queue", c]) }) }) } }), n.fn.extend({ queue: function (a, b) { var c = 2; return "string" != typeof a && (b = a, a = "fx", c--), arguments.length < c ? n.queue(this[0], a) : void 0 === b ? this : this.each(function () { var c = n.queue(this, a, b); n._queueHooks(this, a), "fx" === a && "inprogress" !== c[0] && n.dequeue(this, a) }) }, dequeue: function (a) { return this.each(function () { n.dequeue(this, a) }) }, clearQueue: function (a) { return this.queue(a || "fx", []) }, promise: function (a, b) { var c, d = 1, e = n.Deferred(), f = this, g = this.length, h = function () { --d || e.resolveWith(f, [f]) }; "string" != typeof a && (b = a, a = void 0), a = a || "fx"; while (g--) c = L.get(f[g], a + "queueHooks"), c && c.empty && (d++, c.empty.add(h)); return h(), e.promise(b) } }); var Q = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source, R = ["Top", "Right", "Bottom", "Left"], S = function (a, b) { return a = b || a, "none" === n.css(a, "display") || !n.contains(a.ownerDocument, a) }, T = /^(?:checkbox|radio)$/i; !function () { var a = l.createDocumentFragment(), b = a.appendChild(l.createElement("div")), c = l.createElement("input"); c.setAttribute("type", "radio"), c.setAttribute("checked", "checked"), c.setAttribute("name", "t"), b.appendChild(c), k.checkClone = b.cloneNode(!0).cloneNode(!0).lastChild.checked, b.innerHTML = "<textarea>x</textarea>", k.noCloneChecked = !!b.cloneNode(!0).lastChild.defaultValue }(); var U = "undefined"; k.focusinBubbles = "onfocusin" in a; var V = /^key/, W = /^(?:mouse|pointer|contextmenu)|click/, X = /^(?:focusinfocus|focusoutblur)$/, Y = /^([^.]*)(?:\.(.+)|)$/; function Z() { return !0 } function $() { return !1 } function _() { try { return l.activeElement } catch (a) { } } n.event = { global: {}, add: function (a, b, c, d, e) { var f, g, h, i, j, k, l, m, o, p, q, r = L.get(a); if (r) { c.handler && (f = c, c = f.handler, e = f.selector), c.guid || (c.guid = n.guid++), (i = r.events) || (i = r.events = {}), (g = r.handle) || (g = r.handle = function (b) { return typeof n !== U && n.event.triggered !== b.type ? n.event.dispatch.apply(a, arguments) : void 0 }), b = (b || "").match(E) || [""], j = b.length; while (j--) h = Y.exec(b[j]) || [], o = q = h[1], p = (h[2] || "").split(".").sort(), o && (l = n.event.special[o] || {}, o = (e ? l.delegateType : l.bindType) || o, l = n.event.special[o] || {}, k = n.extend({ type: o, origType: q, data: d, handler: c, guid: c.guid, selector: e, needsContext: e && n.expr.match.needsContext.test(e), namespace: p.join(".") }, f), (m = i[o]) || (m = i[o] = [], m.delegateCount = 0, l.setup && l.setup.call(a, d, p, g) !== !1 || a.addEventListener && a.addEventListener(o, g, !1)), l.add && (l.add.call(a, k), k.handler.guid || (k.handler.guid = c.guid)), e ? m.splice(m.delegateCount++, 0, k) : m.push(k), n.event.global[o] = !0) } }, remove: function (a, b, c, d, e) { var f, g, h, i, j, k, l, m, o, p, q, r = L.hasData(a) && L.get(a); if (r && (i = r.events)) { b = (b || "").match(E) || [""], j = b.length; while (j--) if (h = Y.exec(b[j]) || [], o = q = h[1], p = (h[2] || "").split(".").sort(), o) { l = n.event.special[o] || {}, o = (d ? l.delegateType : l.bindType) || o, m = i[o] || [], h = h[2] && new RegExp("(^|\\.)" + p.join("\\.(?:.*\\.|)") + "(\\.|$)"), g = f = m.length; while (f--) k = m[f], !e && q !== 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, p, r.handle) !== !1 || n.removeEvent(a, o, r.handle), delete i[o]) } else for (o in i) n.event.remove(a, o + b[j], c, d, !0); n.isEmptyObject(i) && (delete r.handle, L.remove(a, "events")) } }, trigger: function (b, c, d, e) { var f, g, h, i, k, m, o, p = [d || l], q = j.call(b, "type") ? b.type : b, r = j.call(b, "namespace") ? b.namespace.split(".") : []; if (g = h = d = d || l, 3 !== d.nodeType && 8 !== d.nodeType && !X.test(q + n.event.triggered) && (q.indexOf(".") >= 0 && (r = q.split("."), q = r.shift(), r.sort()), k = q.indexOf(":") < 0 && "on" + q, b = b[n.expando] ? b : new n.Event(q, "object" == typeof b && b), b.isTrigger = e ? 2 : 3, b.namespace = r.join("."), b.namespace_re = b.namespace ? new RegExp("(^|\\.)" + r.join("\\.(?:.*\\.|)") + "(\\.|$)") : null, b.result = void 0, b.target || (b.target = d), c = null == c ? [b] : n.makeArray(c, [b]), o = n.event.special[q] || {}, e || !o.trigger || o.trigger.apply(d, c) !== !1)) { if (!e && !o.noBubble && !n.isWindow(d)) { for (i = o.delegateType || q, X.test(i + q) || (g = g.parentNode) ; g; g = g.parentNode) p.push(g), h = g; h === (d.ownerDocument || l) && p.push(h.defaultView || h.parentWindow || a) } f = 0; while ((g = p[f++]) && !b.isPropagationStopped()) b.type = f > 1 ? i : o.bindType || q, m = (L.get(g, "events") || {})[b.type] && L.get(g, "handle"), m && m.apply(g, c), m = k && g[k], m && m.apply && n.acceptData(g) && (b.result = m.apply(g, c), b.result === !1 && b.preventDefault()); return b.type = q, e || b.isDefaultPrevented() || o._default && o._default.apply(p.pop(), c) !== !1 || !n.acceptData(d) || k && n.isFunction(d[q]) && !n.isWindow(d) && (h = d[k], h && (d[k] = null), n.event.triggered = q, d[q](), n.event.triggered = void 0, h && (d[k] = h)), b.result } }, dispatch: function (a) { a = n.event.fix(a); var b, c, e, f, g, h = [], i = d.call(arguments), j = (L.get(this, "events") || {})[a.type] || [], k = n.event.special[a.type] || {}; if (i[0] = a, a.delegateTarget = this, !k.preDispatch || k.preDispatch.call(this, a) !== !1) { h = n.event.handlers.call(this, a, j), b = 0; while ((f = h[b++]) && !a.isPropagationStopped()) { a.currentTarget = f.elem, c = 0; while ((g = f.handlers[c++]) && !a.isImmediatePropagationStopped()) (!a.namespace_re || a.namespace_re.test(g.namespace)) && (a.handleObj = g, a.data = g.data, e = ((n.event.special[g.origType] || {}).handle || g.handler).apply(f.elem, i), void 0 !== e && (a.result = e) === !1 && (a.preventDefault(), a.stopPropagation())) } return k.postDispatch && k.postDispatch.call(this, a), a.result } }, handlers: function (a, b) { var c, d, e, f, g = [], h = b.delegateCount, i = a.target; if (h && i.nodeType && (!a.button || "click" !== a.type)) for (; i !== this; i = i.parentNode || this) if (i.disabled !== !0 || "click" !== a.type) { for (d = [], c = 0; h > c; c++) f = b[c], e = f.selector + " ", void 0 === d[e] && (d[e] = f.needsContext ? n(e, this).index(i) >= 0 : n.find(e, this, null, [i]).length), d[e] && d.push(f); d.length && g.push({ elem: i, handlers: d }) } return h < b.length && g.push({ elem: this, handlers: b.slice(h) }), g }, props: "altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "), fixHooks: {}, keyHooks: { props: "char charCode key keyCode".split(" "), filter: function (a, b) { return null == a.which && (a.which = null != b.charCode ? b.charCode : b.keyCode), a } }, mouseHooks: { props: "button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "), filter: function (a, b) { var c, d, e, f = b.button; return null == a.pageX && null != b.clientX && (c = a.target.ownerDocument || l, d = c.documentElement, e = c.body, a.pageX = b.clientX + (d && d.scrollLeft || e && e.scrollLeft || 0) - (d && d.clientLeft || e && e.clientLeft || 0), a.pageY = b.clientY + (d && d.scrollTop || e && e.scrollTop || 0) - (d && d.clientTop || e && e.clientTop || 0)), a.which || void 0 === f || (a.which = 1 & f ? 1 : 2 & f ? 3 : 4 & f ? 2 : 0), a } }, fix: function (a) { if (a[n.expando]) return a; var b, c, d, e = a.type, f = a, g = this.fixHooks[e]; g || (this.fixHooks[e] = g = W.test(e) ? this.mouseHooks : V.test(e) ? this.keyHooks : {}), d = g.props ? this.props.concat(g.props) : this.props, a = new n.Event(f), b = d.length; while (b--) c = d[b], a[c] = f[c]; return a.target || (a.target = l), 3 === a.target.nodeType && (a.target = a.target.parentNode), g.filter ? g.filter(a, f) : a }, special: { load: { noBubble: !0 }, focus: { trigger: function () { return this !== _() && this.focus ? (this.focus(), !1) : void 0 }, delegateType: "focusin" }, blur: { trigger: function () { return this === _() && this.blur ? (this.blur(), !1) : void 0 }, delegateType: "focusout" }, click: { trigger: function () { return "checkbox" === this.type && this.click && n.nodeName(this, "input") ? (this.click(), !1) : void 0 }, _default: function (a) { return n.nodeName(a.target, "a") } }, beforeunload: { postDispatch: function (a) { void 0 !== a.result && a.originalEvent && (a.originalEvent.returnValue = a.result) } } }, simulate: function (a, b, c, d) { var e = n.extend(new n.Event, c, { type: a, isSimulated: !0, originalEvent: {} }); d ? n.event.trigger(e, null, b) : n.event.dispatch.call(b, e), e.isDefaultPrevented() && c.preventDefault() } }, n.removeEvent = function (a, b, c) { a.removeEventListener && a.removeEventListener(b, c, !1) }, n.Event = function (a, b) { return this instanceof n.Event ? (a && a.type ? (this.originalEvent = a, this.type = a.type, this.isDefaultPrevented = a.defaultPrevented || void 0 === a.defaultPrevented && a.returnValue === !1 ? Z : $) : this.type = a, b && n.extend(this, b), this.timeStamp = a && a.timeStamp || n.now(), void (this[n.expando] = !0)) : new n.Event(a, b) }, n.Event.prototype = { isDefaultPrevented: $, isPropagationStopped: $, isImmediatePropagationStopped: $, preventDefault: function () { var a = this.originalEvent; this.isDefaultPrevented = Z, a && a.preventDefault && a.preventDefault() }, stopPropagation: function () { var a = this.originalEvent; this.isPropagationStopped = Z, a && a.stopPropagation && a.stopPropagation() }, stopImmediatePropagation: function () { var a = this.originalEvent; this.isImmediatePropagationStopped = Z, a && a.stopImmediatePropagation && a.stopImmediatePropagation(), this.stopPropagation() } }, n.each({ mouseenter: "mouseover", mouseleave: "mouseout", pointerenter: "pointerover", pointerleave: "pointerout" }, function (a, b) { n.event.special[a] = { delegateType: b, bindType: b, handle: function (a) { var c, d = this, e = a.relatedTarget, f = a.handleObj; return (!e || e !== d && !n.contains(d, e)) && (a.type = f.origType, c = f.handler.apply(this, arguments), a.type = b), c } } }), k.focusinBubbles || n.each({ focus: "focusin", blur: "focusout" }, function (a, b) { var c = function (a) { n.event.simulate(b, a.target, n.event.fix(a), !0) }; n.event.special[b] = { setup: function () { var d = this.ownerDocument || this, e = L.access(d, b); e || d.addEventListener(a, c, !0), L.access(d, b, (e || 0) + 1) }, teardown: function () { var d = this.ownerDocument || this, e = L.access(d, b) - 1; e ? L.access(d, b, e) : (d.removeEventListener(a, c, !0), L.remove(d, b)) } } }), n.fn.extend({ on: function (a, b, c, d, e) { var f, g; if ("object" == typeof a) { "string" != typeof b && (c = c || b, b = void 0); for (g in a) this.on(g, b, c, a[g], e); return this } if (null == c && null == d ? (d = b, c = b = void 0) : null == d && ("string" == typeof b ? (d = c, c = void 0) : (d = c, c = b, b = void 0)), d === !1) d = $; else if (!d) return this; return 1 === e && (f = d, d = function (a) { return n().off(a), f.apply(this, arguments) }, d.guid = f.guid || (f.guid = n.guid++)), this.each(function () { n.event.add(this, a, d, c, b) }) }, one: function (a, b, c, d) { return this.on(a, b, c, d, 1) }, off: function (a, b, c) { var d, e; if (a && a.preventDefault && a.handleObj) return d = a.handleObj, n(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 = $), this.each(function () { n.event.remove(this, a, c, b) }) }, trigger: function (a, b) { return this.each(function () { n.event.trigger(a, b, this) }) }, triggerHandler: function (a, b) { var c = this[0]; return c ? n.event.trigger(a, b, c, !0) : void 0 } }); var aa = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi, ba = /<([\w:]+)/, ca = /<|&#?\w+;/, da = /<(?:script|style|link)/i, ea = /checked\s*(?:[^=]|=\s*.checked.)/i, fa = /^$|\/(?:java|ecma)script/i, ga = /^true\/(.*)/, ha = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g, ia = { 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, "", ""] }; ia.optgroup = ia.option, ia.tbody = ia.tfoot = ia.colgroup = ia.caption = ia.thead, ia.th = ia.td; function ja(a, b) { return n.nodeName(a, "table") && n.nodeName(11 !== b.nodeType ? b : b.firstChild, "tr") ? a.getElementsByTagName("tbody")[0] || a.appendChild(a.ownerDocument.createElement("tbody")) : a } function ka(a) { return a.type = (null !== a.getAttribute("type")) + "/" + a.type, a } function la(a) { var b = ga.exec(a.type); return b ? a.type = b[1] : a.removeAttribute("type"), a } function ma(a, b) { for (var c = 0, d = a.length; d > c; c++) L.set(a[c], "globalEval", !b || L.get(b[c], "globalEval")) } function na(a, b) { var c, d, e, f, g, h, i, j; if (1 === b.nodeType) { if (L.hasData(a) && (f = L.access(a), g = L.set(b, f), j = f.events)) { delete g.handle, g.events = {}; for (e in j) for (c = 0, d = j[e].length; d > c; c++) n.event.add(b, e, j[e][c]) } M.hasData(a) && (h = M.access(a), i = n.extend({}, h), M.set(b, i)) } } function oa(a, b) { var c = a.getElementsByTagName ? a.getElementsByTagName(b || "*") : a.querySelectorAll ? a.querySelectorAll(b || "*") : []; return void 0 === b || b && n.nodeName(a, b) ? n.merge([a], c) : c } function pa(a, b) { var c = b.nodeName.toLowerCase(); "input" === c && T.test(a.type) ? b.checked = a.checked : ("input" === c || "textarea" === c) && (b.defaultValue = a.defaultValue) } n.extend({ clone: function (a, b, c) { var d, e, f, g, h = a.cloneNode(!0), i = n.contains(a.ownerDocument, a); if (!(k.noCloneChecked || 1 !== a.nodeType && 11 !== a.nodeType || n.isXMLDoc(a))) for (g = oa(h), f = oa(a), d = 0, e = f.length; e > d; d++) pa(f[d], g[d]); if (b) if (c) for (f = f || oa(a), g = g || oa(h), d = 0, e = f.length; e > d; d++) na(f[d], g[d]); else na(a, h); return g = oa(h, "script"), g.length > 0 && ma(g, !i && oa(a, "script")), h }, buildFragment: function (a, b, c, d) { for (var e, f, g, h, i, j, k = b.createDocumentFragment(), l = [], m = 0, o = a.length; o > m; m++) if (e = a[m], e || 0 === e) if ("object" === n.type(e)) n.merge(l, e.nodeType ? [e] : e); else if (ca.test(e)) { f = f || k.appendChild(b.createElement("div")), g = (ba.exec(e) || ["", ""])[1].toLowerCase(), h = ia[g] || ia._default, f.innerHTML = h[1] + e.replace(aa, "<$1></$2>") + h[2], j = h[0]; while (j--) f = f.lastChild; n.merge(l, f.childNodes), f = k.firstChild, f.textContent = "" } else l.push(b.createTextNode(e)); k.textContent = "", m = 0; while (e = l[m++]) if ((!d || -1 === n.inArray(e, d)) && (i = n.contains(e.ownerDocument, e), f = oa(k.appendChild(e), "script"), i && ma(f), c)) { j = 0; while (e = f[j++]) fa.test(e.type || "") && c.push(e) } return k }, cleanData: function (a) { for (var b, c, d, e, f = n.event.special, g = 0; void 0 !== (c = a[g]) ; g++) { if (n.acceptData(c) && (e = c[L.expando], e && (b = L.cache[e]))) { if (b.events) for (d in b.events) f[d] ? n.event.remove(c, d) : n.removeEvent(c, d, b.handle); L.cache[e] && delete L.cache[e] } delete M.cache[c[M.expando]] } } }), n.fn.extend({ text: function (a) { return J(this, function (a) { return void 0 === a ? n.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 this.domManip(arguments, function (a) { if (1 === this.nodeType || 11 === this.nodeType || 9 === this.nodeType) { var b = ja(this, a); b.appendChild(a) } }) }, prepend: function () { return this.domManip(arguments, function (a) { if (1 === this.nodeType || 11 === this.nodeType || 9 === this.nodeType) { var b = ja(this, a); b.insertBefore(a, b.firstChild) } }) }, before: function () { return this.domManip(arguments, function (a) { this.parentNode && this.parentNode.insertBefore(a, this) }) }, after: function () { return this.domManip(arguments, function (a) { this.parentNode && this.parentNode.insertBefore(a, this.nextSibling) }) }, remove: function (a, b) { for (var c, d = a ? n.filter(a, this) : this, e = 0; null != (c = d[e]) ; e++) b || 1 !== c.nodeType || n.cleanData(oa(c)), c.parentNode && (b && n.contains(c.ownerDocument, c) && ma(oa(c, "script")), c.parentNode.removeChild(c)); return this }, empty: function () { for (var a, b = 0; null != (a = this[b]) ; b++) 1 === a.nodeType && (n.cleanData(oa(a, !1)), a.textContent = ""); return this }, clone: function (a, b) { return a = null == a ? !1 : a, b = null == b ? a : b, this.map(function () { return n.clone(this, a, b) }) }, html: function (a) { return J(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 && !da.test(a) && !ia[(ba.exec(a) || ["", ""])[1].toLowerCase()]) { a = a.replace(aa, "<$1></$2>"); try { for (; d > c; c++) b = this[c] || {}, 1 === b.nodeType && (n.cleanData(oa(b, !1)), b.innerHTML = a); b = 0 } catch (e) { } } b && this.empty().append(a) }, null, a, arguments.length) }, replaceWith: function () { var a = arguments[0]; return this.domManip(arguments, function (b) { a = this.parentNode, n.cleanData(oa(this)), a && a.replaceChild(b, this) }), a && (a.length || a.nodeType) ? this : this.remove() }, detach: function (a) { return this.remove(a, !0) }, domManip: function (a, b) { a = e.apply([], a); var c, d, f, g, h, i, j = 0, l = this.length, m = this, o = l - 1, p = a[0], q = n.isFunction(p); if (q || l > 1 && "string" == typeof p && !k.checkClone && ea.test(p)) return this.each(function (c) { var d = m.eq(c); q && (a[0] = p.call(this, c, d.html())), d.domManip(a, b) }); if (l && (c = n.buildFragment(a, this[0].ownerDocument, !1, this), d = c.firstChild, 1 === c.childNodes.length && (c = d), d)) { for (f = n.map(oa(c, "script"), ka), g = f.length; l > j; j++) h = c, j !== o && (h = n.clone(h, !0, !0), g && n.merge(f, oa(h, "script"))), b.call(this[j], h, j); if (g) for (i = f[f.length - 1].ownerDocument, n.map(f, la), j = 0; g > j; j++) h = f[j], fa.test(h.type || "") && !L.access(h, "globalEval") && n.contains(i, h) && (h.src ? n._evalUrl && n._evalUrl(h.src) : n.globalEval(h.textContent.replace(ha, ""))) } return this } }), n.each({ appendTo: "append", prependTo: "prepend", insertBefore: "before", insertAfter: "after", replaceAll: "replaceWith" }, function (a, b) { n.fn[a] = function (a) { for (var c, d = [], e = n(a), g = e.length - 1, h = 0; g >= h; h++) c = h === g ? this : this.clone(!0), n(e[h])[b](c), f.apply(d, c.get()); return this.pushStack(d) } }); var qa, ra = {}; function sa(b, c) { var d, e = n(c.createElement(b)).appendTo(c.body), f = a.getDefaultComputedStyle && (d = a.getDefaultComputedStyle(e[0])) ? d.display : n.css(e[0], "display"); return e.detach(), f } function ta(a) { var b = l, c = ra[a]; return c || (c = sa(a, b), "none" !== c && c || (qa = (qa || n("<iframe frameborder='0' width='0' height='0'/>")).appendTo(b.documentElement), b = qa[0].contentDocument, b.write(), b.close(), c = sa(a, b), qa.detach()), ra[a] = c), c } var ua = /^margin/, va = new RegExp("^(" + Q + ")(?!px)[a-z%]+$", "i"), wa = function (b) { return b.ownerDocument.defaultView.opener ? b.ownerDocument.defaultView.getComputedStyle(b, null) : a.getComputedStyle(b, null) }; function xa(a, b, c) { var d, e, f, g, h = a.style; return c = c || wa(a), c && (g = c.getPropertyValue(b) || c[b]), c && ("" !== g || n.contains(a.ownerDocument, a) || (g = n.style(a, b)), va.test(g) && ua.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 ya(a, b) { return { get: function () { return a() ? void delete this.get : (this.get = b).apply(this, arguments) } } } !function () { var b, c, d = l.documentElement, e = l.createElement("div"), f = l.createElement("div"); if (f.style) { f.style.backgroundClip = "content-box", f.cloneNode(!0).style.backgroundClip = "", k.clearCloneStyle = "content-box" === f.style.backgroundClip, e.style.cssText = "border:0;width:0;height:0;top:0;left:-9999px;margin-top:1px;position:absolute", e.appendChild(f); function g() { f.style.cssText = "-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute", f.innerHTML = "", d.appendChild(e); var g = a.getComputedStyle(f, null); b = "1%" !== g.top, c = "4px" === g.width, d.removeChild(e) } a.getComputedStyle && n.extend(k, { pixelPosition: function () { return g(), b }, boxSizingReliable: function () { return null == c && g(), c }, reliableMarginRight: function () { var b, c = f.appendChild(l.createElement("div")); return c.style.cssText = f.style.cssText = "-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0", c.style.marginRight = c.style.width = "0", f.style.width = "1px", d.appendChild(e), b = !parseFloat(a.getComputedStyle(c, null).marginRight), d.removeChild(e), f.removeChild(c), b } }) } }(), n.swap = 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 }; var za = /^(none|table(?!-c[ea]).+)/, Aa = new RegExp("^(" + Q + ")(.*)$", "i"), Ba = new RegExp("^([+-])=(" + Q + ")", "i"), Ca = { position: "absolute", visibility: "hidden", display: "block" }, Da = { letterSpacing: "0", fontWeight: "400" }, Ea = ["Webkit", "O", "Moz", "ms"]; function Fa(a, b) { if (b in a) return b; var c = b[0].toUpperCase() + b.slice(1), d = b, e = Ea.length; while (e--) if (b = Ea[e] + c, b in a) return b; return d } function Ga(a, b, c) { var d = Aa.exec(b); return d ? Math.max(0, d[1] - (c || 0)) + (d[2] || "px") : b } function Ha(a, b, c, d, e) { for (var f = c === (d ? "border" : "content") ? 4 : "width" === b ? 1 : 0, g = 0; 4 > f; f += 2) "margin" === c && (g += n.css(a, c + R[f], !0, e)), d ? ("content" === c && (g -= n.css(a, "padding" + R[f], !0, e)), "margin" !== c && (g -= n.css(a, "border" + R[f] + "Width", !0, e))) : (g += n.css(a, "padding" + R[f], !0, e), "padding" !== c && (g += n.css(a, "border" + R[f] + "Width", !0, e))); return g } function Ia(a, b, c) { var d = !0, e = "width" === b ? a.offsetWidth : a.offsetHeight, f = wa(a), g = "border-box" === n.css(a, "boxSizing", !1, f); if (0 >= e || null == e) { if (e = xa(a, b, f), (0 > e || null == e) && (e = a.style[b]), va.test(e)) return e; d = g && (k.boxSizingReliable() || e === a.style[b]), e = parseFloat(e) || 0 } return e + Ha(a, b, c || (g ? "border" : "content"), d, f) + "px" } function Ja(a, b) { for (var c, d, e, f = [], g = 0, h = a.length; h > g; g++) d = a[g], d.style && (f[g] = L.get(d, "olddisplay"), c = d.style.display, b ? (f[g] || "none" !== c || (d.style.display = ""), "" === d.style.display && S(d) && (f[g] = L.access(d, "olddisplay", ta(d.nodeName)))) : (e = S(d), "none" === c && e || L.set(d, "olddisplay", e ? c : n.css(d, "display")))); for (g = 0; h > g; g++) d = a[g], d.style && (b && "none" !== d.style.display && "" !== d.style.display || (d.style.display = b ? f[g] || "" : "none")); return a } n.extend({ cssHooks: { opacity: { get: function (a, b) { if (b) { var c = xa(a, "opacity"); return "" === c ? "1" : c } } } }, cssNumber: { 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 = n.camelCase(b), i = a.style; return b = n.cssProps[h] || (n.cssProps[h] = Fa(i, h)), g = n.cssHooks[b] || n.cssHooks[h], void 0 === c ? g && "get" in g && void 0 !== (e = g.get(a, !1, d)) ? e : i[b] : (f = typeof c, "string" === f && (e = Ba.exec(c)) && (c = (e[1] + 1) * e[2] + parseFloat(n.css(a, b)), f = "number"), null != c && c === c && ("number" !== f || n.cssNumber[h] || (c += "px"), k.clearCloneStyle || "" !== c || 0 !== b.indexOf("background") || (i[b] = "inherit"), g && "set" in g && void 0 === (c = g.set(a, c, d)) || (i[b] = c)), void 0) } }, css: function (a, b, c, d) { var e, f, g, h = n.camelCase(b); return b = n.cssProps[h] || (n.cssProps[h] = Fa(a.style, h)), g = n.cssHooks[b] || n.cssHooks[h], g && "get" in g && (e = g.get(a, !0, c)), void 0 === e && (e = xa(a, b, d)), "normal" === e && b in Da && (e = Da[b]), "" === c || c ? (f = parseFloat(e), c === !0 || n.isNumeric(f) ? f || 0 : e) : e } }), n.each(["height", "width"], function (a, b) { n.cssHooks[b] = { get: function (a, c, d) { return c ? za.test(n.css(a, "display")) && 0 === a.offsetWidth ? n.swap(a, Ca, function () { return Ia(a, b, d) }) : Ia(a, b, d) : void 0 }, set: function (a, c, d) { var e = d && wa(a); return Ga(a, c, d ? Ha(a, b, d, "border-box" === n.css(a, "boxSizing", !1, e), e) : 0) } } }), n.cssHooks.marginRight = ya(k.reliableMarginRight, function (a, b) { return b ? n.swap(a, { display: "inline-block" }, xa, [a, "marginRight"]) : void 0 }), n.each({ margin: "", padding: "", border: "Width" }, function (a, b) { n.cssHooks[a + b] = { expand: function (c) { for (var d = 0, e = {}, f = "string" == typeof c ? c.split(" ") : [c]; 4 > d; d++) e[a + R[d] + b] = f[d] || f[d - 2] || f[0]; return e } }, ua.test(a) || (n.cssHooks[a + b].set = Ga) }), n.fn.extend({ css: function (a, b) { return J(this, function (a, b, c) { var d, e, f = {}, g = 0; if (n.isArray(b)) { for (d = wa(a), e = b.length; e > g; g++) f[b[g]] = n.css(a, b[g], !1, d); return f } return void 0 !== c ? n.style(a, b, c) : n.css(a, b) }, a, b, arguments.length > 1) }, show: function () { return Ja(this, !0) }, hide: function () { return Ja(this) }, toggle: function (a) { return "boolean" == typeof a ? a ? this.show() : this.hide() : this.each(function () { S(this) ? n(this).show() : n(this).hide() }) } }); function Ka(a, b, c, d, e) { return new Ka.prototype.init(a, b, c, d, e) } n.Tween = Ka, Ka.prototype = { constructor: Ka, init: function (a, b, c, d, e, f) { this.elem = a, this.prop = c, this.easing = e || "swing", this.options = b, this.start = this.now = this.cur(), this.end = d, this.unit = f || (n.cssNumber[c] ? "" : "px") }, cur: function () { var a = Ka.propHooks[this.prop]; return a && a.get ? a.get(this) : Ka.propHooks._default.get(this) }, run: function (a) { var b, c = Ka.propHooks[this.prop]; return this.options.duration ? this.pos = b = n.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) : Ka.propHooks._default.set(this), this } }, Ka.prototype.init.prototype = Ka.prototype, Ka.propHooks = { _default: { get: function (a) { var b; return null == a.elem[a.prop] || a.elem.style && null != a.elem.style[a.prop] ? (b = n.css(a.elem, a.prop, ""), b && "auto" !== b ? b : 0) : a.elem[a.prop] }, set: function (a) { n.fx.step[a.prop] ? n.fx.step[a.prop](a) : a.elem.style && (null != a.elem.style[n.cssProps[a.prop]] || n.cssHooks[a.prop]) ? n.style(a.elem, a.prop, a.now + a.unit) : a.elem[a.prop] = a.now } } }, Ka.propHooks.scrollTop = Ka.propHooks.scrollLeft = { set: function (a) { a.elem.nodeType && a.elem.parentNode && (a.elem[a.prop] = a.now) } }, n.easing = { linear: function (a) { return a }, swing: function (a) { return .5 - Math.cos(a * Math.PI) / 2 } }, n.fx = Ka.prototype.init, n.fx.step = {}; var La, Ma, Na = /^(?:toggle|show|hide)$/, Oa = new RegExp("^(?:([+-])=|)(" + Q + ")([a-z%]*)$", "i"), Pa = /queueHooks$/, Qa = [Va], Ra = { "*": [function (a, b) { var c = this.createTween(a, b), d = c.cur(), e = Oa.exec(b), f = e && e[3] || (n.cssNumber[a] ? "" : "px"), g = (n.cssNumber[a] || "px" !== f && +d) && Oa.exec(n.css(c.elem, a)), h = 1, i = 20; if (g && g[3] !== f) { f = f || g[3], e = e || [], g = +d || 1; do h = h || ".5", g /= h, n.style(c.elem, a, g + f); while (h !== (h = c.cur() / d) && 1 !== h && --i) } return e && (g = c.start = +g || +d || 0, c.unit = f, c.end = e[1] ? g + (e[1] + 1) * e[2] : +e[2]), c }] }; function Sa() { return setTimeout(function () { La = void 0 }), La = n.now() } function Ta(a, b) { var c, d = 0, e = { height: a }; for (b = b ? 1 : 0; 4 > d; d += 2 - b) c = R[d], e["margin" + c] = e["padding" + c] = a; return b && (e.opacity = e.width = a), e } function Ua(a, b, c) { for (var d, e = (Ra[b] || []).concat(Ra["*"]), f = 0, g = e.length; g > f; f++) if (d = e[f].call(c, b, a)) return d } function Va(a, b, c) { var d, e, f, g, h, i, j, k, l = this, m = {}, o = a.style, p = a.nodeType && S(a), q = L.get(a, "fxshow"); c.queue || (h = n._queueHooks(a, "fx"), null == h.unqueued && (h.unqueued = 0, i = h.empty.fire, h.empty.fire = function () { h.unqueued || i() }), h.unqueued++, l.always(function () { l.always(function () { h.unqueued--, n.queue(a, "fx").length || h.empty.fire() }) })), 1 === a.nodeType && ("height" in b || "width" in b) && (c.overflow = [o.overflow, o.overflowX, o.overflowY], j = n.css(a, "display"), k = "none" === j ? L.get(a, "olddisplay") || ta(a.nodeName) : j, "inline" === k && "none" === n.css(a, "float") && (o.display = "inline-block")), c.overflow && (o.overflow = "hidden", l.always(function () { o.overflow = c.overflow[0], o.overflowX = c.overflow[1], o.overflowY = c.overflow[2] })); for (d in b) if (e = b[d], Na.exec(e)) { if (delete b[d], f = f || "toggle" === e, e === (p ? "hide" : "show")) { if ("show" !== e || !q || void 0 === q[d]) continue; p = !0 } m[d] = q && q[d] || n.style(a, d) } else j = void 0; if (n.isEmptyObject(m)) "inline" === ("none" === j ? ta(a.nodeName) : j) && (o.display = j); else { q ? "hidden" in q && (p = q.hidden) : q = L.access(a, "fxshow", {}), f && (q.hidden = !p), p ? n(a).show() : l.done(function () { n(a).hide() }), l.done(function () { var b; L.remove(a, "fxshow"); for (b in m) n.style(a, b, m[b]) }); for (d in m) g = Ua(p ? q[d] : 0, d, l), d in q || (q[d] = g.start, p && (g.end = g.start, g.start = "width" === d || "height" === d ? 1 : 0)) } } function Wa(a, b) { var c, d, e, f, g; for (c in a) if (d = n.camelCase(c), e = b[d], f = a[c], n.isArray(f) && (e = f[1], f = a[c] = f[0]), c !== d && (a[d] = f, delete a[c]), g = n.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 Xa(a, b, c) { var d, e, f = 0, g = Qa.length, h = n.Deferred().always(function () { delete i.elem }), i = function () { if (e) return !1; for (var b = La || Sa(), c = Math.max(0, j.startTime + j.duration - b), d = c / j.duration || 0, f = 1 - d, g = 0, i = j.tweens.length; i > g; g++) j.tweens[g].run(f); return h.notifyWith(a, [j, f, c]), 1 > f && i ? c : (h.resolveWith(a, [j]), !1) }, j = h.promise({ elem: a, props: n.extend({}, b), opts: n.extend(!0, { specialEasing: {} }, c), originalProperties: b, originalOptions: c, startTime: La || Sa(), duration: c.duration, tweens: [], createTween: function (b, c) { var d = n.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; d > c; c++) j.tweens[c].run(1); return b ? h.resolveWith(a, [j, b]) : h.rejectWith(a, [j, b]), this } }), k = j.props; for (Wa(k, j.opts.specialEasing) ; g > f; f++) if (d = Qa[f].call(j, a, k, j.opts)) return d; return n.map(k, Ua, j), n.isFunction(j.opts.start) && j.opts.start.call(a, j), n.fx.timer(n.extend(i, { elem: a, anim: j, queue: j.opts.queue })), j.progress(j.opts.progress).done(j.opts.done, j.opts.complete).fail(j.opts.fail).always(j.opts.always) } n.Animation = n.extend(Xa, { tweener: function (a, b) { n.isFunction(a) ? (b = a, a = ["*"]) : a = a.split(" "); for (var c, d = 0, e = a.length; e > d; d++) c = a[d], Ra[c] = Ra[c] || [], Ra[c].unshift(b) }, prefilter: function (a, b) { b ? Qa.unshift(a) : Qa.push(a) } }), n.speed = function (a, b, c) { var d = a && "object" == typeof a ? n.extend({}, a) : { complete: c || !c && b || n.isFunction(a) && a, duration: a, easing: c && b || b && !n.isFunction(b) && b }; return d.duration = n.fx.off ? 0 : "number" == typeof d.duration ? d.duration : d.duration in n.fx.speeds ? n.fx.speeds[d.duration] : n.fx.speeds._default, (null == d.queue || d.queue === !0) && (d.queue = "fx"), d.old = d.complete, d.complete = function () { n.isFunction(d.old) && d.old.call(this), d.queue && n.dequeue(this, d.queue) }, d }, n.fn.extend({ fadeTo: function (a, b, c, d) { return this.filter(S).css("opacity", 0).show().end().animate({ opacity: b }, a, c, d) }, animate: function (a, b, c, d) { var e = n.isEmptyObject(a), f = n.speed(b, c, d), g = function () { var b = Xa(this, n.extend({}, a), f); (e || L.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 = n.timers, g = L.get(this); if (e) g[e] && g[e].stop && d(g[e]); else for (e in g) g[e] && g[e].stop && Pa.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) && n.dequeue(this, a) }) }, finish: function (a) { return a !== !1 && (a = a || "fx"), this.each(function () { var b, c = L.get(this), d = c[a + "queue"], e = c[a + "queueHooks"], f = n.timers, g = d ? d.length : 0; for (c.finish = !0, n.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; g > b; b++) d[b] && d[b].finish && d[b].finish.call(this); delete c.finish }) } }), n.each(["toggle", "show", "hide"], function (a, b) { var c = n.fn[b]; n.fn[b] = function (a, d, e) { return null == a || "boolean" == typeof a ? c.apply(this, arguments) : this.animate(Ta(b, !0), a, d, e) } }), n.each({ slideDown: Ta("show"), slideUp: Ta("hide"), slideToggle: Ta("toggle"), fadeIn: { opacity: "show" }, fadeOut: { opacity: "hide" }, fadeToggle: { opacity: "toggle" } }, function (a, b) { n.fn[a] = function (a, c, d) { return this.animate(b, a, c, d) } }), n.timers = [], n.fx.tick = function () { var a, b = 0, c = n.timers; for (La = n.now() ; b < c.length; b++) a = c[b], a() || c[b] !== a || c.splice(b--, 1); c.length || n.fx.stop(), La = void 0 }, n.fx.timer = function (a) { n.timers.push(a), a() ? n.fx.start() : n.timers.pop() }, n.fx.interval = 13, n.fx.start = function () { Ma || (Ma = setInterval(n.fx.tick, n.fx.interval)) }, n.fx.stop = function () { clearInterval(Ma), Ma = null }, n.fx.speeds = { slow: 600, fast: 200, _default: 400 }, n.fn.delay = function (a, b) { return a = n.fx ? n.fx.speeds[a] || a : a, b = b || "fx", this.queue(b, function (b, c) { var d = setTimeout(b, a); c.stop = function () { clearTimeout(d) } }) }, function () { var a = l.createElement("input"), b = l.createElement("select"), c = b.appendChild(l.createElement("option")); a.type = "checkbox", k.checkOn = "" !== a.value, k.optSelected = c.selected, b.disabled = !0, k.optDisabled = !c.disabled, a = l.createElement("input"), a.value = "t", a.type = "radio", k.radioValue = "t" === a.value }(); var Ya, Za, $a = n.expr.attrHandle; n.fn.extend({ attr: function (a, b) { return J(this, n.attr, a, b, arguments.length > 1) }, removeAttr: function (a) { return this.each(function () { n.removeAttr(this, a) }) } }), n.extend({
8 attr: function (a, b, c) {
9 var d, e, f = a.nodeType; if (a && 3 !== f && 8 !== f && 2 !== f) return typeof a.getAttribute === U ? n.prop(a, b, c) : (1 === f && n.isXMLDoc(a) || (b = b.toLowerCase(), d = n.attrHooks[b] || (n.expr.match.bool.test(b) ? Za : Ya)),
10 void 0 === c ? d && "get" in d && null !== (e = d.get(a, b)) ? e : (e = n.find.attr(a, b), null == e ? void 0 : e) : null !== c ? d && "set" in d && void 0 !== (e = d.set(a, c, b)) ? e : (a.setAttribute(b, c + ""), c) : void n.removeAttr(a, b))
11 }, removeAttr: function (a, b) { var c, d, e = 0, f = b && b.match(E); if (f && 1 === a.nodeType) while (c = f[e++]) d = n.propFix[c] || c, n.expr.match.bool.test(c) && (a[d] = !1), a.removeAttribute(c) }, attrHooks: { type: { set: function (a, b) { if (!k.radioValue && "radio" === b && n.nodeName(a, "input")) { var c = a.value; return a.setAttribute("type", b), c && (a.value = c), b } } } }
12 }), Za = { set: function (a, b, c) { return b === !1 ? n.removeAttr(a, c) : a.setAttribute(c, c), c } }, n.each(n.expr.match.bool.source.match(/\w+/g), function (a, b) { var c = $a[b] || n.find.attr; $a[b] = function (a, b, d) { var e, f; return d || (f = $a[b], $a[b] = e, e = null != c(a, b, d) ? b.toLowerCase() : null, $a[b] = f), e } }); var _a = /^(?:input|select|textarea|button)$/i; n.fn.extend({ prop: function (a, b) { return J(this, n.prop, a, b, arguments.length > 1) }, removeProp: function (a) { return this.each(function () { delete this[n.propFix[a] || a] }) } }), n.extend({ propFix: { "for": "htmlFor", "class": "className" }, prop: function (a, b, c) { var d, e, f, g = a.nodeType; if (a && 3 !== g && 8 !== g && 2 !== g) return f = 1 !== g || !n.isXMLDoc(a), f && (b = n.propFix[b] || b, e = n.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) { return a.hasAttribute("tabindex") || _a.test(a.nodeName) || a.href ? a.tabIndex : -1 } } } }), k.optSelected || (n.propHooks.selected = { get: function (a) { var b = a.parentNode; return b && b.parentNode && b.parentNode.selectedIndex, null } }), n.each(["tabIndex", "readOnly", "maxLength", "cellSpacing", "cellPadding", "rowSpan", "colSpan", "useMap", "frameBorder", "contentEditable"], function () { n.propFix[this.toLowerCase()] = this }); var ab = /[\t\r\n\f]/g; n.fn.extend({ addClass: function (a) { var b, c, d, e, f, g, h = "string" == typeof a && a, i = 0, j = this.length; if (n.isFunction(a)) return this.each(function (b) { n(this).addClass(a.call(this, b, this.className)) }); if (h) for (b = (a || "").match(E) || []; j > i; i++) if (c = this[i], d = 1 === c.nodeType && (c.className ? (" " + c.className + " ").replace(ab, " ") : " ")) { f = 0; while (e = b[f++]) d.indexOf(" " + e + " ") < 0 && (d += e + " "); g = n.trim(d), c.className !== g && (c.className = g) } return this }, removeClass: function (a) { var b, c, d, e, f, g, h = 0 === arguments.length || "string" == typeof a && a, i = 0, j = this.length; if (n.isFunction(a)) return this.each(function (b) { n(this).removeClass(a.call(this, b, this.className)) }); if (h) for (b = (a || "").match(E) || []; j > i; i++) if (c = this[i], d = 1 === c.nodeType && (c.className ? (" " + c.className + " ").replace(ab, " ") : "")) { f = 0; while (e = b[f++]) while (d.indexOf(" " + e + " ") >= 0) d = d.replace(" " + e + " ", " "); g = a ? n.trim(d) : "", c.className !== g && (c.className = g) } return this }, toggleClass: function (a, b) { var c = typeof a; return "boolean" == typeof b && "string" === c ? b ? this.addClass(a) : this.removeClass(a) : this.each(n.isFunction(a) ? function (c) { n(this).toggleClass(a.call(this, c, this.className, b), b) } : function () { if ("string" === c) { var b, d = 0, e = n(this), f = a.match(E) || []; while (b = f[d++]) e.hasClass(b) ? e.removeClass(b) : e.addClass(b) } else (c === U || "boolean" === c) && (this.className && L.set(this, "__className__", this.className), this.className = this.className || a === !1 ? "" : L.get(this, "__className__") || "") }) }, hasClass: function (a) { for (var b = " " + a + " ", c = 0, d = this.length; d > c; c++) if (1 === this[c].nodeType && (" " + this[c].className + " ").replace(ab, " ").indexOf(b) >= 0) return !0; return !1 } }); var bb = /\r/g; n.fn.extend({ val: function (a) { var b, c, d, e = this[0]; { if (arguments.length) return d = n.isFunction(a), this.each(function (c) { var e; 1 === this.nodeType && (e = d ? a.call(this, c, n(this).val()) : a, null == e ? e = "" : "number" == typeof e ? e += "" : n.isArray(e) && (e = n.map(e, function (a) { return null == a ? "" : a + "" })), b = n.valHooks[this.type] || n.valHooks[this.nodeName.toLowerCase()], b && "set" in b && void 0 !== b.set(this, e, "value") || (this.value = e)) }); if (e) return b = n.valHooks[e.type] || n.valHooks[e.nodeName.toLowerCase()], b && "get" in b && void 0 !== (c = b.get(e, "value")) ? c : (c = e.value, "string" == typeof c ? c.replace(bb, "") : null == c ? "" : c) } } }), n.extend({ valHooks: { option: { get: function (a) { var b = n.find.attr(a, "value"); return null != b ? b : n.trim(n.text(a)) } }, select: { get: function (a) { for (var b, c, d = a.options, e = a.selectedIndex, f = "select-one" === a.type || 0 > e, g = f ? null : [], h = f ? e + 1 : d.length, i = 0 > e ? h : f ? e : 0; h > i; i++) if (c = d[i], !(!c.selected && i !== e || (k.optDisabled ? c.disabled : null !== c.getAttribute("disabled")) || c.parentNode.disabled && n.nodeName(c.parentNode, "optgroup"))) { if (b = n(c).val(), f) return b; g.push(b) } return g }, set: function (a, b) { var c, d, e = a.options, f = n.makeArray(b), g = e.length; while (g--) d = e[g], (d.selected = n.inArray(d.value, f) >= 0) && (c = !0); return c || (a.selectedIndex = -1), f } } } }), n.each(["radio", "checkbox"], function () { n.valHooks[this] = { set: function (a, b) { return n.isArray(b) ? a.checked = n.inArray(n(a).val(), b) >= 0 : void 0 } }, k.checkOn || (n.valHooks[this].get = function (a) { return null === a.getAttribute("value") ? "on" : a.value }) }), n.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "), function (a, b) { n.fn[b] = function (a, c) { return arguments.length > 0 ? this.on(b, null, a, c) : this.trigger(b) } }), n.fn.extend({ hover: function (a, b) { return this.mouseenter(a).mouseleave(b || a) }, 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) } }); var cb = n.now(), db = /\?/; n.parseJSON = function (a) { return JSON.parse(a + "") }, n.parseXML = function (a) { var b, c; if (!a || "string" != typeof a) return null; try { c = new DOMParser, b = c.parseFromString(a, "text/xml") } catch (d) { b = void 0 } return (!b || b.getElementsByTagName("parsererror").length) && n.error("Invalid XML: " + a), b }; var eb = /#.*$/, fb = /([?&])_=[^&]*/, gb = /^(.*?):[ \t]*([^\r\n]*)$/gm, hb = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/, ib = /^(?:GET|HEAD)$/, jb = /^\/\//, kb = /^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/, lb = {}, mb = {}, nb = "*/".concat("*"), ob = a.location.href, pb = kb.exec(ob.toLowerCase()) || []; function qb(a) { return function (b, c) { "string" != typeof b && (c = b, b = "*"); var d, e = 0, f = b.toLowerCase().match(E) || []; if (n.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 rb(a, b, c, d) { var e = {}, f = a === mb; function g(h) { var i; return e[h] = !0, n.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 sb(a, b) { var c, d, e = n.ajaxSettings.flatOptions || {}; for (c in b) void 0 !== b[c] && ((e[c] ? a : d || (d = {}))[c] = b[c]); return d && n.extend(!0, a, d), a } function tb(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 } return f ? (f !== i[0] && i.unshift(f), c[f]) : void 0 } function ub(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 } } n.extend({ active: 0, lastModified: {}, etag: {}, ajaxSettings: { url: ob, type: "GET", isLocal: hb.test(pb[1]), global: !0, processData: !0, async: !0, contentType: "application/x-www-form-urlencoded; charset=UTF-8", accepts: { "*": nb, text: "text/plain", html: "text/html", xml: "application/xml, text/xml", json: "application/json, text/javascript" }, contents: { xml: /xml/, html: /html/, json: /json/ }, responseFields: { xml: "responseXML", text: "responseText", json: "responseJSON" }, converters: { "* text": String, "text html": !0, "text json": n.parseJSON, "text xml": n.parseXML }, flatOptions: { url: !0, context: !0 } }, ajaxSetup: function (a, b) { return b ? sb(sb(a, n.ajaxSettings), b) : sb(n.ajaxSettings, a) }, ajaxPrefilter: qb(lb), ajaxTransport: qb(mb), ajax: function (a, b) { "object" == typeof a && (b = a, a = void 0), b = b || {}; var c, d, e, f, g, h, i, j, k = n.ajaxSetup({}, b), l = k.context || k, m = k.context && (l.nodeType || l.jquery) ? n(l) : n.event, o = n.Deferred(), p = n.Callbacks("once memory"), q = k.statusCode || {}, r = {}, s = {}, t = 0, u = "canceled", v = { readyState: 0, getResponseHeader: function (a) { var b; if (2 === t) { if (!f) { f = {}; while (b = gb.exec(e)) f[b[1].toLowerCase()] = b[2] } b = f[a.toLowerCase()] } return null == b ? null : b }, getAllResponseHeaders: function () { return 2 === t ? e : null }, setRequestHeader: function (a, b) { var c = a.toLowerCase(); return t || (a = s[c] = s[c] || a, r[a] = b), this }, overrideMimeType: function (a) { return t || (k.mimeType = a), this }, statusCode: function (a) { var b; if (a) if (2 > t) for (b in a) q[b] = [q[b], a[b]]; else v.always(a[v.status]); return this }, abort: function (a) { var b = a || u; return c && c.abort(b), x(0, b), this } }; if (o.promise(v).complete = p.add, v.success = v.done, v.error = v.fail, k.url = ((a || k.url || ob) + "").replace(eb, "").replace(jb, pb[1] + "//"), k.type = b.method || b.type || k.method || k.type, k.dataTypes = n.trim(k.dataType || "*").toLowerCase().match(E) || [""], null == k.crossDomain && (h = kb.exec(k.url.toLowerCase()), k.crossDomain = !(!h || h[1] === pb[1] && h[2] === pb[2] && (h[3] || ("http:" === h[1] ? "80" : "443")) === (pb[3] || ("http:" === pb[1] ? "80" : "443")))), k.data && k.processData && "string" != typeof k.data && (k.data = n.param(k.data, k.traditional)), rb(lb, k, b, v), 2 === t) return v; i = n.event && k.global, i && 0 === n.active++ && n.event.trigger("ajaxStart"), k.type = k.type.toUpperCase(), k.hasContent = !ib.test(k.type), d = k.url, k.hasContent || (k.data && (d = k.url += (db.test(d) ? "&" : "?") + k.data, delete k.data), k.cache === !1 && (k.url = fb.test(d) ? d.replace(fb, "$1_=" + cb++) : d + (db.test(d) ? "&" : "?") + "_=" + cb++)), k.ifModified && (n.lastModified[d] && v.setRequestHeader("If-Modified-Since", n.lastModified[d]), n.etag[d] && v.setRequestHeader("If-None-Match", n.etag[d])), (k.data && k.hasContent && k.contentType !== !1 || b.contentType) && v.setRequestHeader("Content-Type", k.contentType), v.setRequestHeader("Accept", k.dataTypes[0] && k.accepts[k.dataTypes[0]] ? k.accepts[k.dataTypes[0]] + ("*" !== k.dataTypes[0] ? ", " + nb + "; q=0.01" : "") : k.accepts["*"]); for (j in k.headers) v.setRequestHeader(j, k.headers[j]); if (k.beforeSend && (k.beforeSend.call(l, v, k) === !1 || 2 === t)) return v.abort(); u = "abort"; for (j in { success: 1, error: 1, complete: 1 }) v[j](k[j]); if (c = rb(mb, k, b, v)) { v.readyState = 1, i && m.trigger("ajaxSend", [v, k]), k.async && k.timeout > 0 && (g = setTimeout(function () { v.abort("timeout") }, k.timeout)); try { t = 1, c.send(r, x) } catch (w) { if (!(2 > t)) throw w; x(-1, w) } } else x(-1, "No Transport"); function x(a, b, f, h) { var j, r, s, u, w, x = b; 2 !== t && (t = 2, g && clearTimeout(g), c = void 0, e = h || "", v.readyState = a > 0 ? 4 : 0, j = a >= 200 && 300 > a || 304 === a, f && (u = tb(k, v, f)), u = ub(k, u, v, j), j ? (k.ifModified && (w = v.getResponseHeader("Last-Modified"), w && (n.lastModified[d] = w), w = v.getResponseHeader("etag"), w && (n.etag[d] = w)), 204 === a || "HEAD" === k.type ? x = "nocontent" : 304 === a ? x = "notmodified" : (x = u.state, r = u.data, s = u.error, j = !s)) : (s = x, (a || !x) && (x = "error", 0 > a && (a = 0))), v.status = a, v.statusText = (b || x) + "", j ? o.resolveWith(l, [r, x, v]) : o.rejectWith(l, [v, x, s]), v.statusCode(q), q = void 0, i && m.trigger(j ? "ajaxSuccess" : "ajaxError", [v, k, j ? r : s]), p.fireWith(l, [v, x]), i && (m.trigger("ajaxComplete", [v, k]), --n.active || n.event.trigger("ajaxStop"))) } return v }, getJSON: function (a, b, c) { return n.get(a, b, c, "json") }, getScript: function (a, b) { return n.get(a, void 0, b, "script") } }), n.each(["get", "post"], function (a, b) { n[b] = function (a, c, d, e) { return n.isFunction(c) && (e = e || d, d = c, c = void 0), n.ajax({ url: a, type: b, dataType: e, data: c, success: d }) } }), n._evalUrl = function (a) { return n.ajax({ url: a, type: "GET", dataType: "script", async: !1, global: !1, "throws": !0 }) }, n.fn.extend({ wrapAll: function (a) { var b; return n.isFunction(a) ? this.each(function (b) { n(this).wrapAll(a.call(this, b)) }) : (this[0] && (b = n(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 this.each(n.isFunction(a) ? function (b) { n(this).wrapInner(a.call(this, b)) } : function () { var b = n(this), c = b.contents(); c.length ? c.wrapAll(a) : b.append(a) }) }, wrap: function (a) { var b = n.isFunction(a); return this.each(function (c) { n(this).wrapAll(b ? a.call(this, c) : a) }) }, unwrap: function () { return this.parent().each(function () { n.nodeName(this, "body") || n(this).replaceWith(this.childNodes) }).end() } }), n.expr.filters.hidden = function (a) { return a.offsetWidth <= 0 && a.offsetHeight <= 0 }, n.expr.filters.visible = function (a) { return !n.expr.filters.hidden(a) }; var vb = /%20/g, 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 (n.isArray(b)) n.each(b, function (b, e) { c || wb.test(a) ? d(a, e) : Ab(a + "[" + ("object" == typeof e ? b : "") + "]", e, c, d) }); else if (c || "object" !== n.type(b)) d(a, b); else for (e in b) Ab(a + "[" + e + "]", b[e], c, d) } n.param = function (a, b) { var c, d = [], e = function (a, b) { b = n.isFunction(b) ? b() : null == b ? "" : b, d[d.length] = encodeURIComponent(a) + "=" + encodeURIComponent(b) }; if (void 0 === b && (b = n.ajaxSettings && n.ajaxSettings.traditional), n.isArray(a) || a.jquery && !n.isPlainObject(a)) n.each(a, function () { e(this.name, this.value) }); else for (c in a) Ab(c, a[c], b, e); return d.join("&").replace(vb, "+") }, n.fn.extend({ serialize: function () { return n.param(this.serializeArray()) }, serializeArray: function () { return this.map(function () { var a = n.prop(this, "elements"); return a ? n.makeArray(a) : this }).filter(function () { var a = this.type; return this.name && !n(this).is(":disabled") && zb.test(this.nodeName) && !yb.test(a) && (this.checked || !T.test(a)) }).map(function (a, b) { var c = n(this).val(); return null == c ? null : n.isArray(c) ? n.map(c, function (a) { return { name: b.name, value: a.replace(xb, "\r\n") } }) : { name: b.name, value: c.replace(xb, "\r\n") } }).get() } }), n.ajaxSettings.xhr = function () { try { return new XMLHttpRequest } catch (a) { } }; var Bb = 0, Cb = {}, Db = { 0: 200, 1223: 204 }, Eb = n.ajaxSettings.xhr(); a.attachEvent && a.attachEvent("onunload", function () { for (var a in Cb) Cb[a]() }), k.cors = !!Eb && "withCredentials" in Eb, k.ajax = Eb = !!Eb, n.ajaxTransport(function (a) { var b; return k.cors || Eb && !a.crossDomain ? { send: function (c, d) { var e, f = a.xhr(), g = ++Bb; if (f.open(a.type, a.url, a.async, a.username, a.password), a.xhrFields) for (e in a.xhrFields) f[e] = a.xhrFields[e]; a.mimeType && f.overrideMimeType && f.overrideMimeType(a.mimeType), a.crossDomain || c["X-Requested-With"] || (c["X-Requested-With"] = "XMLHttpRequest"); for (e in c) f.setRequestHeader(e, c[e]); b = function (a) { return function () { b && (delete Cb[g], b = f.onload = f.onerror = null, "abort" === a ? f.abort() : "error" === a ? d(f.status, f.statusText) : d(Db[f.status] || f.status, f.statusText, "string" == typeof f.responseText ? { text: f.responseText } : void 0, f.getAllResponseHeaders())) } }, f.onload = b(), f.onerror = b("error"), b = Cb[g] = b("abort"); try { f.send(a.hasContent && a.data || null) } catch (h) { if (b) throw h } }, abort: function () { b && b() } } : void 0 }), n.ajaxSetup({ accepts: { script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript" }, contents: { script: /(?:java|ecma)script/ }, converters: { "text script": function (a) { return n.globalEval(a), a } } }), n.ajaxPrefilter("script", function (a) { void 0 === a.cache && (a.cache = !1), a.crossDomain && (a.type = "GET") }), n.ajaxTransport("script", function (a) { if (a.crossDomain) { var b, c; return { send: function (d, e) { b = n("<script>").prop({ async: !0, charset: a.scriptCharset, src: a.url }).on("load error", c = function (a) { b.remove(), c = null, a && e("error" === a.type ? 404 : 200, a.type) }), l.head.appendChild(b[0]) }, abort: function () { c && c() } } } }); var Fb = [], Gb = /(=)\?(?=&|$)|\?\?/; n.ajaxSetup({ jsonp: "callback", jsonpCallback: function () { var a = Fb.pop() || n.expando + "_" + cb++; return this[a] = !0, a } }), n.ajaxPrefilter("json jsonp", function (b, c, d) { var e, f, g, h = b.jsonp !== !1 && (Gb.test(b.url) ? "url" : "string" == typeof b.data && !(b.contentType || "").indexOf("application/x-www-form-urlencoded") && Gb.test(b.data) && "data"); return h || "jsonp" === b.dataTypes[0] ? (e = b.jsonpCallback = n.isFunction(b.jsonpCallback) ? b.jsonpCallback() : b.jsonpCallback, h ? b[h] = b[h].replace(Gb, "$1" + e) : b.jsonp !== !1 && (b.url += (db.test(b.url) ? "&" : "?") + b.jsonp + "=" + e), b.converters["script json"] = function () { return g || n.error(e + " was not called"), g[0] }, b.dataTypes[0] = "json", f = a[e], a[e] = function () { g = arguments }, d.always(function () { a[e] = f, b[e] && (b.jsonpCallback = c.jsonpCallback, Fb.push(e)), g && n.isFunction(f) && f(g[0]), g = f = void 0 }), "script") : void 0 }), n.parseHTML = function (a, b, c) { if (!a || "string" != typeof a) return null; "boolean" == typeof b && (c = b, b = !1), b = b || l; var d = v.exec(a), e = !c && []; return d ? [b.createElement(d[1])] : (d = n.buildFragment([a], b, e), e && e.length && n(e).remove(), n.merge([], d.childNodes)) }; var Hb = n.fn.load; n.fn.load = function (a, b, c) { if ("string" != typeof a && Hb) return Hb.apply(this, arguments); var d, e, f, g = this, h = a.indexOf(" "); return h >= 0 && (d = n.trim(a.slice(h)), a = a.slice(0, h)), n.isFunction(b) ? (c = b, b = void 0) : b && "object" == typeof b && (e = "POST"), g.length > 0 && n.ajax({ url: a, type: e, dataType: "html", data: b }).done(function (a) { f = arguments, g.html(d ? n("<div>").append(n.parseHTML(a)).find(d) : a) }).complete(c && function (a, b) { g.each(c, f || [a.responseText, b, a]) }), this }, n.each(["ajaxStart", "ajaxStop", "ajaxComplete", "ajaxError", "ajaxSuccess", "ajaxSend"], function (a, b) { n.fn[b] = function (a) { return this.on(b, a) } }), n.expr.filters.animated = function (a) { return n.grep(n.timers, function (b) { return a === b.elem }).length }; var Ib = a.document.documentElement; function Jb(a) { return n.isWindow(a) ? a : 9 === a.nodeType && a.defaultView } n.offset = { setOffset: function (a, b, c) { var d, e, f, g, h, i, j, k = n.css(a, "position"), l = n(a), m = {}; "static" === k && (a.style.position = "relative"), h = l.offset(), f = n.css(a, "top"), i = n.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), n.isFunction(b) && (b = b.call(a, c, 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) } }, n.fn.extend({ offset: function (a) { if (arguments.length) return void 0 === a ? this : this.each(function (b) { n.offset.setOffset(this, a, b) }); var b, c, d = this[0], e = { top: 0, left: 0 }, f = d && d.ownerDocument; if (f) return b = f.documentElement, n.contains(b, d) ? (typeof d.getBoundingClientRect !== U && (e = d.getBoundingClientRect()), c = Jb(f), { top: e.top + c.pageYOffset - b.clientTop, left: e.left + c.pageXOffset - b.clientLeft }) : e }, position: function () { if (this[0]) { var a, b, c = this[0], d = { top: 0, left: 0 }; return "fixed" === n.css(c, "position") ? b = c.getBoundingClientRect() : (a = this.offsetParent(), b = this.offset(), n.nodeName(a[0], "html") || (d = a.offset()), d.top += n.css(a[0], "borderTopWidth", !0), d.left += n.css(a[0], "borderLeftWidth", !0)), { top: b.top - d.top - n.css(c, "marginTop", !0), left: b.left - d.left - n.css(c, "marginLeft", !0) } } }, offsetParent: function () { return this.map(function () { var a = this.offsetParent || Ib; while (a && !n.nodeName(a, "html") && "static" === n.css(a, "position")) a = a.offsetParent; return a || Ib }) } }), n.each({ scrollLeft: "pageXOffset", scrollTop: "pageYOffset" }, function (b, c) { var d = "pageYOffset" === c; n.fn[b] = function (e) { return J(this, function (b, e, f) { var g = Jb(b); return void 0 === f ? g ? g[c] : b[e] : void (g ? g.scrollTo(d ? a.pageXOffset : f, d ? f : a.pageYOffset) : b[e] = f) }, b, e, arguments.length, null) } }), n.each(["top", "left"], function (a, b) { n.cssHooks[b] = ya(k.pixelPosition, function (a, c) { return c ? (c = xa(a, b), va.test(c) ? n(a).position()[b] + "px" : c) : void 0 }) }), n.each({ Height: "height", Width: "width" }, function (a, b) { n.each({ padding: "inner" + a, content: b, "": "outer" + a }, function (c, d) { n.fn[d] = function (d, e) { var f = arguments.length && (c || "boolean" != typeof d), g = c || (d === !0 || e === !0 ? "margin" : "border"); return J(this, function (b, c, d) { var e; return n.isWindow(b) ? b.document.documentElement["client" + a] : 9 === b.nodeType ? (e = b.documentElement, Math.max(b.body["scroll" + a], e["scroll" + a], b.body["offset" + a], e["offset" + a], e["client" + a])) : void 0 === d ? n.css(b, c, g) : n.style(b, c, d, g) }, b, f ? d : void 0, f, null) } }) }), n.fn.size = function () { return this.length }, n.fn.andSelf = n.fn.addBack, "function" == typeof define && define.amd && define("jquery", [], function () { return n }); var Kb = a.jQuery, Lb = a.$; return n.noConflict = function (b) { return a.$ === n && (a.$ = Lb), b && a.jQuery === n && (a.jQuery = Kb), n }, typeof b === U && (a.jQuery = a.$ = n), n
13});
14/*!
15 * https://github.com/es-shims/es5-shim
16 * @license es5-shim Copyright 2009-2015 by contributors, MIT License
17 * see https://github.com/es-shims/es5-shim/blob/v4.5.7/LICENSE
18 */
19(function(t,r){"use strict";if(typeof define==="function"&&define.amd){define(r)}else if(typeof exports==="object"){module.exports=r()}else{t.returnExports=r()}})(this,function(){var t=Array;var r=t.prototype;var e=Object;var n=e.prototype;var i=Function;var a=i.prototype;var o=String;var f=o.prototype;var u=Number;var l=u.prototype;var s=r.slice;var c=r.splice;var v=r.push;var h=r.unshift;var p=r.concat;var y=r.join;var d=a.call;var g=a.apply;var w=Math.max;var b=Math.min;var T=n.toString;var m=typeof Symbol==="function"&&typeof Symbol.toStringTag==="symbol";var D;var x=Function.prototype.toString,S=/^\s*class /,O=function isES6ClassFn(t){try{var r=x.call(t);var e=r.replace(/\/\/.*\n/g,"");var n=e.replace(/\/\*[.\s\S]*\*\//g,"");var i=n.replace(/\n/gm," ").replace(/ {2}/g," ");return S.test(i)}catch(a){return false}},E=function tryFunctionObject(t){try{if(O(t)){return false}x.call(t);return true}catch(r){return false}},j="[object Function]",I="[object GeneratorFunction]",D=function isCallable(t){if(!t){return false}if(typeof t!=="function"&&typeof t!=="object"){return false}if(m){return E(t)}if(O(t)){return false}var r=T.call(t);return r===j||r===I};var M;var U=RegExp.prototype.exec,F=function tryRegexExec(t){try{U.call(t);return true}catch(r){return false}},N="[object RegExp]";M=function isRegex(t){if(typeof t!=="object"){return false}return m?F(t):T.call(t)===N};var C;var k=String.prototype.valueOf,R=function tryStringObject(t){try{k.call(t);return true}catch(r){return false}},A="[object String]";C=function isString(t){if(typeof t==="string"){return true}if(typeof t!=="object"){return false}return m?R(t):T.call(t)===A};var P=e.defineProperty&&function(){try{var t={};e.defineProperty(t,"x",{enumerable:false,value:t});for(var r in t){return false}return t.x===t}catch(n){return false}}();var $=function(t){var r;if(P){r=function(t,r,n,i){if(!i&&r in t){return}e.defineProperty(t,r,{configurable:true,enumerable:false,writable:true,value:n})}}else{r=function(t,r,e,n){if(!n&&r in t){return}t[r]=e}}return function defineProperties(e,n,i){for(var a in n){if(t.call(n,a)){r(e,a,n[a],i)}}}}(n.hasOwnProperty);var J=function isPrimitive(t){var r=typeof t;return t===null||r!=="object"&&r!=="function"};var Y=u.isNaN||function(t){return t!==t};var Z={ToInteger:function ToInteger(t){var r=+t;if(Y(r)){r=0}else if(r!==0&&r!==1/0&&r!==-(1/0)){r=(r>0||-1)*Math.floor(Math.abs(r))}return r},ToPrimitive:function ToPrimitive(t){var r,e,n;if(J(t)){return t}e=t.valueOf;if(D(e)){r=e.call(t);if(J(r)){return r}}n=t.toString;if(D(n)){r=n.call(t);if(J(r)){return r}}throw new TypeError},ToObject:function(t){if(t==null){throw new TypeError("can't convert "+t+" to object")}return e(t)},ToUint32:function ToUint32(t){return t>>>0}};var z=function Empty(){};$(a,{bind:function bind(t){var r=this;if(!D(r)){throw new TypeError("Function.prototype.bind called on incompatible "+r)}var n=s.call(arguments,1);var a;var o=function(){if(this instanceof a){var i=g.call(r,this,p.call(n,s.call(arguments)));if(e(i)===i){return i}return this}else{return g.call(r,t,p.call(n,s.call(arguments)))}};var f=w(0,r.length-n.length);var u=[];for(var l=0;l<f;l++){v.call(u,"$"+l)}a=i("binder","return function ("+y.call(u,",")+"){ return binder.apply(this, arguments); }")(o);if(r.prototype){z.prototype=r.prototype;a.prototype=new z;z.prototype=null}return a}});var G=d.bind(n.hasOwnProperty);var B=d.bind(n.toString);var H=d.bind(s);var W=g.bind(s);var L=d.bind(f.slice);var X=d.bind(f.split);var q=d.bind(f.indexOf);var K=d.bind(v);var Q=d.bind(n.propertyIsEnumerable);var V=d.bind(r.sort);var _=t.isArray||function isArray(t){return B(t)==="[object Array]"};var tt=[].unshift(0)!==1;$(r,{unshift:function(){h.apply(this,arguments);return this.length}},tt);$(t,{isArray:_});var rt=e("a");var et=rt[0]!=="a"||!(0 in rt);var nt=function properlyBoxed(t){var r=true;var e=true;var n=false;if(t){try{t.call("foo",function(t,e,n){if(typeof n!=="object"){r=false}});t.call([1],function(){"use strict";e=typeof this==="string"},"x")}catch(i){n=true}}return!!t&&!n&&r&&e};$(r,{forEach:function forEach(t){var r=Z.ToObject(this);var e=et&&C(this)?X(this,""):r;var n=-1;var i=Z.ToUint32(e.length);var a;if(arguments.length>1){a=arguments[1]}if(!D(t)){throw new TypeError("Array.prototype.forEach callback must be a function")}while(++n<i){if(n in e){if(typeof a==="undefined"){t(e[n],n,r)}else{t.call(a,e[n],n,r)}}}}},!nt(r.forEach));$(r,{map:function map(r){var e=Z.ToObject(this);var n=et&&C(this)?X(this,""):e;var i=Z.ToUint32(n.length);var a=t(i);var o;if(arguments.length>1){o=arguments[1]}if(!D(r)){throw new TypeError("Array.prototype.map callback must be a function")}for(var f=0;f<i;f++){if(f in n){if(typeof o==="undefined"){a[f]=r(n[f],f,e)}else{a[f]=r.call(o,n[f],f,e)}}}return a}},!nt(r.map));$(r,{filter:function filter(t){var r=Z.ToObject(this);var e=et&&C(this)?X(this,""):r;var n=Z.ToUint32(e.length);var i=[];var a;var o;if(arguments.length>1){o=arguments[1]}if(!D(t)){throw new TypeError("Array.prototype.filter callback must be a function")}for(var f=0;f<n;f++){if(f in e){a=e[f];if(typeof o==="undefined"?t(a,f,r):t.call(o,a,f,r)){K(i,a)}}}return i}},!nt(r.filter));$(r,{every:function every(t){var r=Z.ToObject(this);var e=et&&C(this)?X(this,""):r;var n=Z.ToUint32(e.length);var i;if(arguments.length>1){i=arguments[1]}if(!D(t)){throw new TypeError("Array.prototype.every callback must be a function")}for(var a=0;a<n;a++){if(a in e&&!(typeof i==="undefined"?t(e[a],a,r):t.call(i,e[a],a,r))){return false}}return true}},!nt(r.every));$(r,{some:function some(t){var r=Z.ToObject(this);var e=et&&C(this)?X(this,""):r;var n=Z.ToUint32(e.length);var i;if(arguments.length>1){i=arguments[1]}if(!D(t)){throw new TypeError("Array.prototype.some callback must be a function")}for(var a=0;a<n;a++){if(a in e&&(typeof i==="undefined"?t(e[a],a,r):t.call(i,e[a],a,r))){return true}}return false}},!nt(r.some));var it=false;if(r.reduce){it=typeof r.reduce.call("es5",function(t,r,e,n){return n})==="object"}$(r,{reduce:function reduce(t){var r=Z.ToObject(this);var e=et&&C(this)?X(this,""):r;var n=Z.ToUint32(e.length);if(!D(t)){throw new TypeError("Array.prototype.reduce callback must be a function")}if(n===0&&arguments.length===1){throw new TypeError("reduce of empty array with no initial value")}var i=0;var a;if(arguments.length>=2){a=arguments[1]}else{do{if(i in e){a=e[i++];break}if(++i>=n){throw new TypeError("reduce of empty array with no initial value")}}while(true)}for(;i<n;i++){if(i in e){a=t(a,e[i],i,r)}}return a}},!it);var at=false;if(r.reduceRight){at=typeof r.reduceRight.call("es5",function(t,r,e,n){return n})==="object"}$(r,{reduceRight:function reduceRight(t){var r=Z.ToObject(this);var e=et&&C(this)?X(this,""):r;var n=Z.ToUint32(e.length);if(!D(t)){throw new TypeError("Array.prototype.reduceRight callback must be a function")}if(n===0&&arguments.length===1){throw new TypeError("reduceRight of empty array with no initial value")}var i;var a=n-1;if(arguments.length>=2){i=arguments[1]}else{do{if(a in e){i=e[a--];break}if(--a<0){throw new TypeError("reduceRight of empty array with no initial value")}}while(true)}if(a<0){return i}do{if(a in e){i=t(i,e[a],a,r)}}while(a--);return i}},!at);var ot=r.indexOf&&[0,1].indexOf(1,2)!==-1;$(r,{indexOf:function indexOf(t){var r=et&&C(this)?X(this,""):Z.ToObject(this);var e=Z.ToUint32(r.length);if(e===0){return-1}var n=0;if(arguments.length>1){n=Z.ToInteger(arguments[1])}n=n>=0?n:w(0,e+n);for(;n<e;n++){if(n in r&&r[n]===t){return n}}return-1}},ot);var ft=r.lastIndexOf&&[0,1].lastIndexOf(0,-3)!==-1;$(r,{lastIndexOf:function lastIndexOf(t){var r=et&&C(this)?X(this,""):Z.ToObject(this);var e=Z.ToUint32(r.length);if(e===0){return-1}var n=e-1;if(arguments.length>1){n=b(n,Z.ToInteger(arguments[1]))}n=n>=0?n:e-Math.abs(n);for(;n>=0;n--){if(n in r&&t===r[n]){return n}}return-1}},ft);var ut=function(){var t=[1,2];var r=t.splice();return t.length===2&&_(r)&&r.length===0}();$(r,{splice:function splice(t,r){if(arguments.length===0){return[]}else{return c.apply(this,arguments)}}},!ut);var lt=function(){var t={};r.splice.call(t,0,0,1);return t.length===1}();$(r,{splice:function splice(t,r){if(arguments.length===0){return[]}var e=arguments;this.length=w(Z.ToInteger(this.length),0);if(arguments.length>0&&typeof r!=="number"){e=H(arguments);if(e.length<2){K(e,this.length-t)}else{e[1]=Z.ToInteger(r)}}return c.apply(this,e)}},!lt);var st=function(){var r=new t(1e5);r[8]="x";r.splice(1,1);return r.indexOf("x")===7}();var ct=function(){var t=256;var r=[];r[t]="a";r.splice(t+1,0,"b");return r[t]==="a"}();$(r,{splice:function splice(t,r){var e=Z.ToObject(this);var n=[];var i=Z.ToUint32(e.length);var a=Z.ToInteger(t);var f=a<0?w(i+a,0):b(a,i);var u=b(w(Z.ToInteger(r),0),i-f);var l=0;var s;while(l<u){s=o(f+l);if(G(e,s)){n[l]=e[s]}l+=1}var c=H(arguments,2);var v=c.length;var h;if(v<u){l=f;var p=i-u;while(l<p){s=o(l+u);h=o(l+v);if(G(e,s)){e[h]=e[s]}else{delete e[h]}l+=1}l=i;var y=i-u+v;while(l>y){delete e[l-1];l-=1}}else if(v>u){l=i-u;while(l>f){s=o(l+u-1);h=o(l+v-1);if(G(e,s)){e[h]=e[s]}else{delete e[h]}l-=1}}l=f;for(var d=0;d<c.length;++d){e[l]=c[d];l+=1}e.length=i-u+v;return n}},!st||!ct);var vt=r.join;var ht;try{ht=Array.prototype.join.call("123",",")!=="1,2,3"}catch(pt){ht=true}if(ht){$(r,{join:function join(t){var r=typeof t==="undefined"?",":t;return vt.call(C(this)?X(this,""):this,r)}},ht)}var yt=[1,2].join(undefined)!=="1,2";if(yt){$(r,{join:function join(t){var r=typeof t==="undefined"?",":t;return vt.call(this,r)}},yt)}var dt=function push(t){var r=Z.ToObject(this);var e=Z.ToUint32(r.length);var n=0;while(n<arguments.length){r[e+n]=arguments[n];n+=1}r.length=e+n;return e+n};var gt=function(){var t={};var r=Array.prototype.push.call(t,undefined);return r!==1||t.length!==1||typeof t[0]!=="undefined"||!G(t,0)}();$(r,{push:function push(t){if(_(this)){return v.apply(this,arguments)}return dt.apply(this,arguments)}},gt);var wt=function(){var t=[];var r=t.push(undefined);return r!==1||t.length!==1||typeof t[0]!=="undefined"||!G(t,0)}();$(r,{push:dt},wt);$(r,{slice:function(t,r){var e=C(this)?X(this,""):this;return W(e,arguments)}},et);var bt=function(){try{[1,2].sort(null);[1,2].sort({});return true}catch(t){}return false}();var Tt=function(){try{[1,2].sort(/a/);return false}catch(t){}return true}();var mt=function(){try{[1,2].sort(undefined);return true}catch(t){}return false}();$(r,{sort:function sort(t){if(typeof t==="undefined"){return V(this)}if(!D(t)){throw new TypeError("Array.prototype.sort callback must be a function")}return V(this,t)}},bt||!mt||!Tt);var Dt=!{toString:null}.propertyIsEnumerable("toString");var xt=function(){}.propertyIsEnumerable("prototype");var St=!G("x","0");var Ot=function(t){var r=t.constructor;return r&&r.prototype===t};var Et={$window:true,$console:true,$parent:true,$self:true,$frame:true,$frames:true,$frameElement:true,$webkitIndexedDB:true,$webkitStorageInfo:true,$external:true};var jt=function(){if(typeof window==="undefined"){return false}for(var t in window){try{if(!Et["$"+t]&&G(window,t)&&window[t]!==null&&typeof window[t]==="object"){Ot(window[t])}}catch(r){return true}}return false}();var It=function(t){if(typeof window==="undefined"||!jt){return Ot(t)}try{return Ot(t)}catch(r){return false}};var Mt=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"];var Ut=Mt.length;var Ft=function isArguments(t){return B(t)==="[object Arguments]"};var Nt=function isArguments(t){return t!==null&&typeof t==="object"&&typeof t.length==="number"&&t.length>=0&&!_(t)&&D(t.callee)};var Ct=Ft(arguments)?Ft:Nt;$(e,{keys:function keys(t){var r=D(t);var e=Ct(t);var n=t!==null&&typeof t==="object";var i=n&&C(t);if(!n&&!r&&!e){throw new TypeError("Object.keys called on a non-object")}var a=[];var f=xt&&r;if(i&&St||e){for(var u=0;u<t.length;++u){K(a,o(u))}}if(!e){for(var l in t){if(!(f&&l==="prototype")&&G(t,l)){K(a,o(l))}}}if(Dt){var s=It(t);for(var c=0;c<Ut;c++){var v=Mt[c];if(!(s&&v==="constructor")&&G(t,v)){K(a,v)}}}return a}});var kt=e.keys&&function(){return e.keys(arguments).length===2}(1,2);var Rt=e.keys&&function(){var t=e.keys(arguments);return arguments.length!==1||t.length!==1||t[0]!==1}(1);var At=e.keys;$(e,{keys:function keys(t){if(Ct(t)){return At(H(t))}else{return At(t)}}},!kt||Rt);var Pt=new Date(-0xc782b5b342b24).getUTCMonth()!==0;var $t=new Date(-0x55d318d56a724);var Jt=new Date(14496624e5);var Yt=$t.toUTCString()!=="Mon, 01 Jan -45875 11:59:59 GMT";var Zt;var zt;var Gt=$t.getTimezoneOffset();if(Gt<-720){Zt=$t.toDateString()!=="Tue Jan 02 -45875";zt=!/^Thu Dec 10 2015 \d\d:\d\d:\d\d GMT[-\+]\d\d\d\d(?: |$)/.test(Jt.toString())}else{Zt=$t.toDateString()!=="Mon Jan 01 -45875";zt=!/^Wed Dec 09 2015 \d\d:\d\d:\d\d GMT[-\+]\d\d\d\d(?: |$)/.test(Jt.toString())}var Bt=d.bind(Date.prototype.getFullYear);var Ht=d.bind(Date.prototype.getMonth);var Wt=d.bind(Date.prototype.getDate);var Lt=d.bind(Date.prototype.getUTCFullYear);var Xt=d.bind(Date.prototype.getUTCMonth);var qt=d.bind(Date.prototype.getUTCDate);var Kt=d.bind(Date.prototype.getUTCDay);var Qt=d.bind(Date.prototype.getUTCHours);var Vt=d.bind(Date.prototype.getUTCMinutes);var _t=d.bind(Date.prototype.getUTCSeconds);var tr=d.bind(Date.prototype.getUTCMilliseconds);var rr=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"];var er=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];var nr=function daysInMonth(t,r){return Wt(new Date(r,t,0))};$(Date.prototype,{getFullYear:function getFullYear(){if(!this||!(this instanceof Date)){throw new TypeError("this is not a Date object.")}var t=Bt(this);if(t<0&&Ht(this)>11){return t+1}return t},getMonth:function getMonth(){if(!this||!(this instanceof Date)){throw new TypeError("this is not a Date object.")}var t=Bt(this);var r=Ht(this);if(t<0&&r>11){return 0}return r},getDate:function getDate(){if(!this||!(this instanceof Date)){throw new TypeError("this is not a Date object.")}var t=Bt(this);var r=Ht(this);var e=Wt(this);if(t<0&&r>11){if(r===12){return e}var n=nr(0,t+1);return n-e+1}return e},getUTCFullYear:function getUTCFullYear(){if(!this||!(this instanceof Date)){throw new TypeError("this is not a Date object.")}var t=Lt(this);if(t<0&&Xt(this)>11){return t+1}return t},getUTCMonth:function getUTCMonth(){if(!this||!(this instanceof Date)){throw new TypeError("this is not a Date object.")}var t=Lt(this);var r=Xt(this);if(t<0&&r>11){return 0}return r},getUTCDate:function getUTCDate(){if(!this||!(this instanceof Date)){throw new TypeError("this is not a Date object.")}var t=Lt(this);var r=Xt(this);var e=qt(this);if(t<0&&r>11){if(r===12){return e}var n=nr(0,t+1);return n-e+1}return e}},Pt);$(Date.prototype,{toUTCString:function toUTCString(){if(!this||!(this instanceof Date)){throw new TypeError("this is not a Date object.")}var t=Kt(this);var r=qt(this);var e=Xt(this);var n=Lt(this);var i=Qt(this);var a=Vt(this);var o=_t(this);return rr[t]+", "+(r<10?"0"+r:r)+" "+er[e]+" "+n+" "+(i<10?"0"+i:i)+":"+(a<10?"0"+a:a)+":"+(o<10?"0"+o:o)+" GMT"}},Pt||Yt);$(Date.prototype,{toDateString:function toDateString(){if(!this||!(this instanceof Date)){throw new TypeError("this is not a Date object.")}var t=this.getDay();var r=this.getDate();var e=this.getMonth();var n=this.getFullYear();return rr[t]+" "+er[e]+" "+(r<10?"0"+r:r)+" "+n}},Pt||Zt);if(Pt||zt){Date.prototype.toString=function toString(){if(!this||!(this instanceof Date)){throw new TypeError("this is not a Date object.")}var t=this.getDay();var r=this.getDate();var e=this.getMonth();var n=this.getFullYear();var i=this.getHours();var a=this.getMinutes();var o=this.getSeconds();var f=this.getTimezoneOffset();var u=Math.floor(Math.abs(f)/60);var l=Math.floor(Math.abs(f)%60);return rr[t]+" "+er[e]+" "+(r<10?"0"+r:r)+" "+n+" "+(i<10?"0"+i:i)+":"+(a<10?"0"+a:a)+":"+(o<10?"0"+o:o)+" GMT"+(f>0?"-":"+")+(u<10?"0"+u:u)+(l<10?"0"+l:l)};if(P){e.defineProperty(Date.prototype,"toString",{configurable:true,enumerable:false,writable:true})}}var ir=-621987552e5;var ar="-000001";var or=Date.prototype.toISOString&&new Date(ir).toISOString().indexOf(ar)===-1;var fr=Date.prototype.toISOString&&new Date(-1).toISOString()!=="1969-12-31T23:59:59.999Z";var ur=d.bind(Date.prototype.getTime);$(Date.prototype,{toISOString:function toISOString(){if(!isFinite(this)||!isFinite(ur(this))){throw new RangeError("Date.prototype.toISOString called on non-finite value.")}var t=Lt(this);var r=Xt(this);t+=Math.floor(r/12);r=(r%12+12)%12;var e=[r+1,qt(this),Qt(this),Vt(this),_t(this)];t=(t<0?"-":t>9999?"+":"")+L("00000"+Math.abs(t),0<=t&&t<=9999?-4:-6);for(var n=0;n<e.length;++n){e[n]=L("00"+e[n],-2)}return t+"-"+H(e,0,2).join("-")+"T"+H(e,2).join(":")+"."+L("000"+tr(this),-3)+"Z"}},or||fr);var lr=function(){try{return Date.prototype.toJSON&&new Date(NaN).toJSON()===null&&new Date(ir).toJSON().indexOf(ar)!==-1&&Date.prototype.toJSON.call({toISOString:function(){return true}})}catch(t){return false}}();if(!lr){Date.prototype.toJSON=function toJSON(t){var r=e(this);var n=Z.ToPrimitive(r);if(typeof n==="number"&&!isFinite(n)){return null}var i=r.toISOString;if(!D(i)){throw new TypeError("toISOString property is not callable")}return i.call(r)}}var sr=Date.parse("+033658-09-27T01:46:40.000Z")===1e15;var cr=!isNaN(Date.parse("2012-04-04T24:00:00.500Z"))||!isNaN(Date.parse("2012-11-31T23:59:59.000Z"))||!isNaN(Date.parse("2012-12-31T23:59:60.000Z"));var vr=isNaN(Date.parse("2000-01-01T00:00:00.000Z"));if(vr||cr||!sr){var hr=Math.pow(2,31)-1;var pr=Y(new Date(1970,0,1,0,0,0,hr+1).getTime());Date=function(t){var r=function Date(e,n,i,a,f,u,l){var s=arguments.length;var c;if(this instanceof t){var v=u;var h=l;if(pr&&s>=7&&l>hr){var p=Math.floor(l/hr)*hr;var y=Math.floor(p/1e3);v+=y;h-=y*1e3}c=s===1&&o(e)===e?new t(r.parse(e)):s>=7?new t(e,n,i,a,f,v,h):s>=6?new t(e,n,i,a,f,v):s>=5?new t(e,n,i,a,f):s>=4?new t(e,n,i,a):s>=3?new t(e,n,i):s>=2?new t(e,n):s>=1?new t(e instanceof t?+e:e):new t}else{c=t.apply(this,arguments)}if(!J(c)){$(c,{constructor:r},true)}return c};var e=new RegExp("^"+"(\\d{4}|[+-]\\d{6})"+"(?:-(\\d{2})"+"(?:-(\\d{2})"+"(?:"+"T(\\d{2})"+":(\\d{2})"+"(?:"+":(\\d{2})"+"(?:(\\.\\d{1,}))?"+")?"+"("+"Z|"+"(?:"+"([-+])"+"(\\d{2})"+":(\\d{2})"+")"+")?)?)?)?"+"$");var n=[0,31,59,90,120,151,181,212,243,273,304,334,365];var i=function dayFromMonth(t,r){var e=r>1?1:0;return n[r]+Math.floor((t-1969+e)/4)-Math.floor((t-1901+e)/100)+Math.floor((t-1601+e)/400)+365*(t-1970)};var a=function toUTC(r){var e=0;var n=r;if(pr&&n>hr){var i=Math.floor(n/hr)*hr;var a=Math.floor(i/1e3);e+=a;n-=a*1e3}return u(new t(1970,0,1,0,0,e,n))};for(var f in t){if(G(t,f)){r[f]=t[f]}}$(r,{now:t.now,UTC:t.UTC},true);r.prototype=t.prototype;$(r.prototype,{constructor:r},true);var l=function parse(r){var n=e.exec(r);if(n){var o=u(n[1]),f=u(n[2]||1)-1,l=u(n[3]||1)-1,s=u(n[4]||0),c=u(n[5]||0),v=u(n[6]||0),h=Math.floor(u(n[7]||0)*1e3),p=Boolean(n[4]&&!n[8]),y=n[9]==="-"?1:-1,d=u(n[10]||0),g=u(n[11]||0),w;var b=c>0||v>0||h>0;if(s<(b?24:25)&&c<60&&v<60&&h<1e3&&f>-1&&f<12&&d<24&&g<60&&l>-1&&l<i(o,f+1)-i(o,f)){w=((i(o,f)+l)*24+s+d*y)*60;w=((w+c+g*y)*60+v)*1e3+h;if(p){w=a(w)}if(-864e13<=w&&w<=864e13){return w}}return NaN}return t.parse.apply(this,arguments)};$(r,{parse:l});return r}(Date)}if(!Date.now){Date.now=function now(){return(new Date).getTime()}}var yr=l.toFixed&&(8e-5.toFixed(3)!=="0.000"||.9.toFixed(0)!=="1"||1.255.toFixed(2)!=="1.25"||0xde0b6b3a7640080.toFixed(0)!=="1000000000000000128");var dr={base:1e7,size:6,data:[0,0,0,0,0,0],multiply:function multiply(t,r){var e=-1;var n=r;while(++e<dr.size){n+=t*dr.data[e];dr.data[e]=n%dr.base;n=Math.floor(n/dr.base)}},divide:function divide(t){var r=dr.size;var e=0;while(--r>=0){e+=dr.data[r];dr.data[r]=Math.floor(e/t);e=e%t*dr.base}},numToString:function numToString(){var t=dr.size;var r="";while(--t>=0){if(r!==""||t===0||dr.data[t]!==0){var e=o(dr.data[t]);if(r===""){r=e}else{r+=L("0000000",0,7-e.length)+e}}}return r},pow:function pow(t,r,e){return r===0?e:r%2===1?pow(t,r-1,e*t):pow(t*t,r/2,e)},log:function log(t){var r=0;var e=t;while(e>=4096){r+=12;e/=4096}while(e>=2){r+=1;e/=2}return r}};var gr=function toFixed(t){var r,e,n,i,a,f,l,s;r=u(t);r=Y(r)?0:Math.floor(r);if(r<0||r>20){throw new RangeError("Number.toFixed called with invalid number of decimals")}e=u(this);if(Y(e)){return"NaN"}if(e<=-1e21||e>=1e21){return o(e)}n="";if(e<0){n="-";e=-e}i="0";if(e>1e-21){a=dr.log(e*dr.pow(2,69,1))-69;f=a<0?e*dr.pow(2,-a,1):e/dr.pow(2,a,1);f*=4503599627370496;a=52-a;if(a>0){dr.multiply(0,f);l=r;while(l>=7){dr.multiply(1e7,0);l-=7}dr.multiply(dr.pow(10,l,1),0);l=a-1;while(l>=23){dr.divide(1<<23);l-=23}dr.divide(1<<l);dr.multiply(1,1);dr.divide(2);i=dr.numToString()}else{dr.multiply(0,f);dr.multiply(1<<-a,0);i=dr.numToString()+L("0.00000000000000000000",2,2+r)}}if(r>0){s=i.length;if(s<=r){i=n+L("0.0000000000000000000",0,r-s+2)+i}else{i=n+L(i,0,s-r)+"."+L(i,s-r)}}else{i=n+i}return i};$(l,{toFixed:gr},yr);var wr=function(){try{return 1..toPrecision(undefined)==="1"}catch(t){return true}}();var br=l.toPrecision;$(l,{toPrecision:function toPrecision(t){return typeof t==="undefined"?br.call(this):br.call(this,t)}},wr);if("ab".split(/(?:ab)*/).length!==2||".".split(/(.?)(.?)/).length!==4||"tesst".split(/(s)*/)[1]==="t"||"test".split(/(?:)/,-1).length!==4||"".split(/.?/).length||".".split(/()()/).length>1){(function(){var t=typeof/()??/.exec("")[1]==="undefined";var r=Math.pow(2,32)-1;f.split=function(e,n){var i=String(this);if(typeof e==="undefined"&&n===0){return[]}if(!M(e)){return X(this,e,n)}var a=[];var o=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),f=0,u,l,s,c;var h=new RegExp(e.source,o+"g");if(!t){u=new RegExp("^"+h.source+"$(?!\\s)",o)}var p=typeof n==="undefined"?r:Z.ToUint32(n);l=h.exec(i);while(l){s=l.index+l[0].length;if(s>f){K(a,L(i,f,l.index));if(!t&&l.length>1){l[0].replace(u,function(){for(var t=1;t<arguments.length-2;t++){if(typeof arguments[t]==="undefined"){l[t]=void 0}}})}if(l.length>1&&l.index<i.length){v.apply(a,H(l,1))}c=l[0].length;f=s;if(a.length>=p){break}}if(h.lastIndex===l.index){h.lastIndex++}l=h.exec(i)}if(f===i.length){if(c||!h.test("")){K(a,"")}}else{K(a,L(i,f))}return a.length>p?H(a,0,p):a}})()}else if("0".split(void 0,0).length){f.split=function split(t,r){if(typeof t==="undefined"&&r===0){return[]}return X(this,t,r)}}var Tr=f.replace;var mr=function(){var t=[];"x".replace(/x(.)?/g,function(r,e){K(t,e)});return t.length===1&&typeof t[0]==="undefined"}();if(!mr){f.replace=function replace(t,r){var e=D(r);var n=M(t)&&/\)[*?]/.test(t.source);if(!e||!n){return Tr.call(this,t,r)}else{var i=function(e){var n=arguments.length;var i=t.lastIndex;t.lastIndex=0;var a=t.exec(e)||[];t.lastIndex=i;K(a,arguments[n-2],arguments[n-1]);return r.apply(this,a)};return Tr.call(this,t,i)}}}var Dr=f.substr;var xr="".substr&&"0b".substr(-1)!=="b";$(f,{substr:function substr(t,r){var e=t;if(t<0){e=w(this.length+t,0)}return Dr.call(this,e,r)}},xr);var Sr=" \n\x0B\f\r \xa0\u1680\u180e\u2000\u2001\u2002\u2003"+"\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028"+"\u2029\ufeff";var Or="\u200b";var Er="["+Sr+"]";var jr=new RegExp("^"+Er+Er+"*");var Ir=new RegExp(Er+Er+"*$");var Mr=f.trim&&(Sr.trim()||!Or.trim());$(f,{trim:function trim(){if(typeof this==="undefined"||this===null){throw new TypeError("can't convert "+this+" to object")}return o(this).replace(jr,"").replace(Ir,"")}},Mr);var Ur=d.bind(String.prototype.trim);var Fr=f.lastIndexOf&&"abc\u3042\u3044".lastIndexOf("\u3042\u3044",2)!==-1;$(f,{lastIndexOf:function lastIndexOf(t){if(typeof this==="undefined"||this===null){throw new TypeError("can't convert "+this+" to object")}var r=o(this);var e=o(t);var n=arguments.length>1?u(arguments[1]):NaN;var i=Y(n)?Infinity:Z.ToInteger(n);var a=b(w(i,0),r.length);var f=e.length;var l=a+f;while(l>0){l=w(0,l-f);var s=q(L(r,l,a+f),e);if(s!==-1){return l+s}}return-1}},Fr);var Nr=f.lastIndexOf;$(f,{lastIndexOf:function lastIndexOf(t){return Nr.apply(this,arguments)}},f.lastIndexOf.length!==1);if(parseInt(Sr+"08")!==8||parseInt(Sr+"0x16")!==22){parseInt=function(t){var r=/^[\-+]?0[xX]/;return function parseInt(e,n){var i=Ur(e);var a=u(n)||(r.test(i)?16:10);return t(i,a)}}(parseInt)}if(1/parseFloat("-0")!==-Infinity){parseFloat=function(t){return function parseFloat(r){var e=Ur(r);var n=t(e);return n===0&&L(e,0,1)==="-"?-0:n}}(parseFloat)}if(String(new RangeError("test"))!=="RangeError: test"){var Cr=function toString(){if(typeof this==="undefined"||this===null){throw new TypeError("can't convert "+this+" to object")}var t=this.name;if(typeof t==="undefined"){t="Error"}else if(typeof t!=="string"){t=o(t)}var r=this.message;if(typeof r==="undefined"){r=""}else if(typeof r!=="string"){r=o(r)}if(!t){return r}if(!r){return t}return t+": "+r};Error.prototype.toString=Cr}if(P){var kr=function(t,r){if(Q(t,r)){var e=Object.getOwnPropertyDescriptor(t,r);e.enumerable=false;Object.defineProperty(t,r,e)}};kr(Error.prototype,"message");if(Error.prototype.message!==""){Error.prototype.message=""}kr(Error.prototype,"name")}if(String(/a/gim)!=="/a/gim"){var Rr=function toString(){var t="/"+this.source+"/";if(this.global){t+="g"}if(this.ignoreCase){t+="i"}if(this.multiline){t+="m"}return t};RegExp.prototype.toString=Rr}});
20//# sourceMappingURL=es5-shim.map
21/*!
22 * https://github.com/es-shims/es5-shim
23 * @license es5-shim Copyright 2009-2015 by contributors, MIT License
24 * see https://github.com/es-shims/es5-shim/blob/v4.5.7/LICENSE
25 */
26(function (e, t) { "use strict"; if (typeof define === "function" && define.amd) { define(t) } else if (typeof exports === "object") { module.exports = t() } else { e.returnExports = t() } })(this, function () { var e = Function.call; var t = Object.prototype; var r = e.bind(t.hasOwnProperty); var n = e.bind(t.propertyIsEnumerable); var o = e.bind(t.toString); var i; var c; var f; var a; var l = r(t, "__defineGetter__"); if (l) { i = e.bind(t.__defineGetter__); c = e.bind(t.__defineSetter__); f = e.bind(t.__lookupGetter__); a = e.bind(t.__lookupSetter__) } if (!Object.getPrototypeOf) { Object.getPrototypeOf = function getPrototypeOf(e) { var r = e.__proto__; if (r || r === null) { return r } else if (o(e.constructor) === "[object Function]") { return e.constructor.prototype } else if (e instanceof Object) { return t } else { return null } } } var u = function doesGetOwnPropertyDescriptorWork(e) { try { e.sentinel = 0; return Object.getOwnPropertyDescriptor(e, "sentinel").value === 0 } catch (t) { return false } }; if (Object.defineProperty) { var p = u({}); var s = typeof document === "undefined" || u(document.createElement("div")); if (!s || !p) { var b = Object.getOwnPropertyDescriptor } } if (!Object.getOwnPropertyDescriptor || b) { var O = "Object.getOwnPropertyDescriptor called on a non-object: "; Object.getOwnPropertyDescriptor = function getOwnPropertyDescriptor(e, o) { if (typeof e !== "object" && typeof e !== "function" || e === null) { throw new TypeError(O + e) } if (b) { try { return b.call(Object, e, o) } catch (i) { } } var c; if (!r(e, o)) { return c } c = { enumerable: n(e, o), configurable: true }; if (l) { var u = e.__proto__; var p = e !== t; if (p) { e.__proto__ = t } var s = f(e, o); var y = a(e, o); if (p) { e.__proto__ = u } if (s || y) { if (s) { c.get = s } if (y) { c.set = y } return c } } c.value = e[o]; c.writable = true; return c } } if (!Object.getOwnPropertyNames) { Object.getOwnPropertyNames = function getOwnPropertyNames(e) { return Object.keys(e) } } if (!Object.create) { var y; var d = !({ __proto__: null } instanceof Object); var j = function shouldUseActiveX() { if (!document.domain) { return false } try { return !!new ActiveXObject("htmlfile") } catch (e) { return false } }; var v = function getEmptyViaActiveX() { var e; var t; t = new ActiveXObject("htmlfile"); t.write("<script></script>"); t.close(); e = t.parentWindow.Object.prototype; t = null; return e }; var _ = function getEmptyViaIFrame() { var e = document.createElement("iframe"); var t = document.body || document.documentElement; var r; e.style.display = "none"; t.appendChild(e); e.src = "javascript:"; r = e.contentWindow.Object.prototype; t.removeChild(e); e = null; return r }; if (d || typeof document === "undefined") { y = function () { return { __proto__: null } } } else { y = function () { var e = j() ? v() : _(); delete e.constructor; delete e.hasOwnProperty; delete e.propertyIsEnumerable; delete e.isPrototypeOf; delete e.toLocaleString; delete e.toString; delete e.valueOf; var t = function Empty() { }; t.prototype = e; y = function () { return new t }; return new t } } Object.create = function create(e, t) { var r; var n = function Type() { }; if (e === null) { r = y() } else { if (typeof e !== "object" && typeof e !== "function") { throw new TypeError("Object prototype may only be an Object or null") } n.prototype = e; r = new n; r.__proto__ = e } if (t !== void 0) { Object.defineProperties(r, t) } return r } } var w = function doesDefinePropertyWork(e) { try { Object.defineProperty(e, "sentinel", {}); return "sentinel" in e } catch (t) { return false } }; if (Object.defineProperty) { var m = w({}); var P = typeof document === "undefined" || w(document.createElement("div")); if (!m || !P) { var E = Object.defineProperty, h = Object.defineProperties } } if (!Object.defineProperty || E) { var g = "Property description must be an object: "; var z = "Object.defineProperty called on non-object: "; var T = "getters & setters can not be defined on this javascript engine"; Object.defineProperty = function defineProperty(e, r, n) { if (typeof e !== "object" && typeof e !== "function" || e === null) { throw new TypeError(z + e) } if (typeof n !== "object" && typeof n !== "function" || n === null) { throw new TypeError(g + n) } if (E) { try { return E.call(Object, e, r, n) } catch (o) { } } if ("value" in n) { if (l && (f(e, r) || a(e, r))) { var u = e.__proto__; e.__proto__ = t; delete e[r]; e[r] = n.value; e.__proto__ = u } else { e[r] = n.value } } else { if (!l && ("get" in n || "set" in n)) { throw new TypeError(T) } if ("get" in n) { i(e, r, n.get) } if ("set" in n) { c(e, r, n.set) } } return e } } if (!Object.defineProperties || h) { Object.defineProperties = function defineProperties(e, t) { if (h) { try { return h.call(Object, e, t) } catch (r) { } } Object.keys(t).forEach(function (r) { if (r !== "__proto__") { Object.defineProperty(e, r, t[r]) } }); return e } } if (!Object.seal) { Object.seal = function seal(e) { if (Object(e) !== e) { throw new TypeError("Object.seal can only be called on Objects.") } return e } } if (!Object.freeze) { Object.freeze = function freeze(e) { if (Object(e) !== e) { throw new TypeError("Object.freeze can only be called on Objects.") } return e } } try { Object.freeze(function () { }) } catch (x) { Object.freeze = function (e) { return function freeze(t) { if (typeof t === "function") { return t } else { return e(t) } } }(Object.freeze) } if (!Object.preventExtensions) { Object.preventExtensions = function preventExtensions(e) { if (Object(e) !== e) { throw new TypeError("Object.preventExtensions can only be called on Objects.") } return e } } if (!Object.isSealed) { Object.isSealed = function isSealed(e) { if (Object(e) !== e) { throw new TypeError("Object.isSealed can only be called on Objects.") } return false } } if (!Object.isFrozen) { Object.isFrozen = function isFrozen(e) { if (Object(e) !== e) { throw new TypeError("Object.isFrozen can only be called on Objects.") } return false } } if (!Object.isExtensible) { Object.isExtensible = function isExtensible(e) { if (Object(e) !== e) { throw new TypeError("Object.isExtensible can only be called on Objects.") } var t = ""; while (r(e, t)) { t += "?" } e[t] = true; var n = r(e, t); delete e[t]; return n } } });
27//# sourceMappingURL=es5-sham.map
28/*! JSON v3.3.2 | http://bestiejs.github.io/json3 | Copyright 2012-2014, Kit Cambridge | http://kit.mit-license.org */
29(function () {
30 function N(p, r) {
31 function q(a) {
32 if (q[a] !== w) return q[a]; var c; if ("bug-string-char-index" == a) c = "a" != "a"[0]; else if ("json" == a) c = q("json-stringify") && q("json-parse"); else {
33 var e; if ("json-stringify" == a) {
34 c = r.stringify; var b = "function" == typeof c && s; if (b) {
35 (e = function () { return 1 }).toJSON = e; try {
36 b = "0" === c(0) && "0" === c(new t) && '""' == c(new A) && c(u) === w && c(w) === w && c() === w && "1" === c(e) && "[1]" == c([e]) && "[null]" == c([w]) && "null" == c(null) && "[null,null,null]" == c([w, u, null]) && '{"a":[1,true,false,null,"\\u0000\\b\\n\\f\\r\\t"]}' ==
37 c({ a: [e, !0, !1, null, "\x00\b\n\f\r\t"] }) && "1" === c(null, e) && "[\n 1,\n 2\n]" == c([1, 2], null, 1) && '"-271821-04-20T00:00:00.000Z"' == c(new C(-864E13)) && '"+275760-09-13T00:00:00.000Z"' == c(new C(864E13)) && '"-000001-01-01T00:00:00.000Z"' == c(new C(-621987552E5)) && '"1969-12-31T23:59:59.999Z"' == c(new C(-1))
38 } catch (f) { b = !1 }
39 } c = b
40 } if ("json-parse" == a) {
41 c = r.parse; if ("function" == typeof c) try {
42 if (0 === c("0") && !c(!1)) {
43 e = c('{"a":[1,true,false,null,"\\u0000\\b\\n\\f\\r\\t"]}'); var n = 5 == e.a.length && 1 === e.a[0]; if (n) {
44 try { n = !c('"\t"') } catch (d) { } if (n) try {
45 n =
46 1 !== c("01")
47 } catch (g) { } if (n) try { n = 1 !== c("1.") } catch (m) { }
48 }
49 }
50 } catch (X) { n = !1 } c = n
51 }
52 } return q[a] = !!c
53 } p || (p = k.Object()); r || (r = k.Object()); var t = p.Number || k.Number, A = p.String || k.String, H = p.Object || k.Object, C = p.Date || k.Date, G = p.SyntaxError || k.SyntaxError, K = p.TypeError || k.TypeError, L = p.Math || k.Math, I = p.JSON || k.JSON; "object" == typeof I && I && (r.stringify = I.stringify, r.parse = I.parse); var H = H.prototype, u = H.toString, v, B, w, s = new C(-0xc782b5b800cec); try {
54 s = -109252 == s.getUTCFullYear() && 0 === s.getUTCMonth() && 1 === s.getUTCDate() &&
55 10 == s.getUTCHours() && 37 == s.getUTCMinutes() && 6 == s.getUTCSeconds() && 708 == s.getUTCMilliseconds()
56 } catch (Q) { } if (!q("json")) {
57 var D = q("bug-string-char-index"); if (!s) var x = L.floor, M = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334], E = function (a, c) { return M[c] + 365 * (a - 1970) + x((a - 1969 + (c = +(1 < c))) / 4) - x((a - 1901 + c) / 100) + x((a - 1601 + c) / 400) }; (v = H.hasOwnProperty) || (v = function (a) {
58 var c = {}, e; (c.__proto__ = null, c.__proto__ = { toString: 1 }, c).toString != u ? v = function (a) {
59 var c = this.__proto__; a = a in (this.__proto__ = null, this); this.__proto__ =
60 c; return a
61 } : (e = c.constructor, v = function (a) { var c = (this.constructor || e).prototype; return a in this && !(a in c && this[a] === c[a]) }); c = null; return v.call(this, a)
62 }); B = function (a, c) {
63 var e = 0, b, f, n; (b = function () { this.valueOf = 0 }).prototype.valueOf = 0; f = new b; for (n in f) v.call(f, n) && e++; b = f = null; e ? B = 2 == e ? function (a, c) { var e = {}, b = "[object Function]" == u.call(a), f; for (f in a) b && "prototype" == f || v.call(e, f) || !(e[f] = 1) || !v.call(a, f) || c(f) } : function (a, c) {
64 var e = "[object Function]" == u.call(a), b, f; for (b in a) e && "prototype" ==
65 b || !v.call(a, b) || (f = "constructor" === b) || c(b); (f || v.call(a, b = "constructor")) && c(b)
66 } : (f = "valueOf toString toLocaleString propertyIsEnumerable isPrototypeOf hasOwnProperty constructor".split(" "), B = function (a, c) { var e = "[object Function]" == u.call(a), b, h = !e && "function" != typeof a.constructor && F[typeof a.hasOwnProperty] && a.hasOwnProperty || v; for (b in a) e && "prototype" == b || !h.call(a, b) || c(b); for (e = f.length; b = f[--e]; h.call(a, b) && c(b)); }); return B(a, c)
67 }; if (!q("json-stringify")) {
68 var U = {
69 92: "\\\\", 34: '\\"', 8: "\\b",
70 12: "\\f", 10: "\\n", 13: "\\r", 9: "\\t"
71 }, y = function (a, c) { return ("000000" + (c || 0)).slice(-a) }, R = function (a) { for (var c = '"', b = 0, h = a.length, f = !D || 10 < h, n = f && (D ? a.split("") : a); b < h; b++) { var d = a.charCodeAt(b); switch (d) { case 8: case 9: case 10: case 12: case 13: case 34: case 92: c += U[d]; break; default: if (32 > d) { c += "\\u00" + y(2, d.toString(16)); break } c += f ? n[b] : a.charAt(b) } } return c + '"' }, O = function (a, c, b, h, f, n, d) {
72 var g, m, k, l, p, r, s, t, q; try { g = c[a] } catch (z) { } if ("object" == typeof g && g) if (m = u.call(g), "[object Date]" != m || v.call(g,
73 "toJSON")) "function" == typeof g.toJSON && ("[object Number]" != m && "[object String]" != m && "[object Array]" != m || v.call(g, "toJSON")) && (g = g.toJSON(a)); else if (g > -1 / 0 && g < 1 / 0) {
74 if (E) { l = x(g / 864E5); for (m = x(l / 365.2425) + 1970 - 1; E(m + 1, 0) <= l; m++); for (k = x((l - E(m, 0)) / 30.42); E(m, k + 1) <= l; k++); l = 1 + l - E(m, k); p = (g % 864E5 + 864E5) % 864E5; r = x(p / 36E5) % 24; s = x(p / 6E4) % 60; t = x(p / 1E3) % 60; p %= 1E3 } else m = g.getUTCFullYear(), k = g.getUTCMonth(), l = g.getUTCDate(), r = g.getUTCHours(), s = g.getUTCMinutes(), t = g.getUTCSeconds(), p = g.getUTCMilliseconds();
75 g = (0 >= m || 1E4 <= m ? (0 > m ? "-" : "+") + y(6, 0 > m ? -m : m) : y(4, m)) + "-" + y(2, k + 1) + "-" + y(2, l) + "T" + y(2, r) + ":" + y(2, s) + ":" + y(2, t) + "." + y(3, p) + "Z"
76 } else g = null; b && (g = b.call(c, a, g)); if (null === g) return "null"; m = u.call(g); if ("[object Boolean]" == m) return "" + g; if ("[object Number]" == m) return g > -1 / 0 && g < 1 / 0 ? "" + g : "null"; if ("[object String]" == m) return R("" + g); if ("object" == typeof g) {
77 for (a = d.length; a--;)if (d[a] === g) throw K(); d.push(g); q = []; c = n; n += f; if ("[object Array]" == m) {
78 k = 0; for (a = g.length; k < a; k++)m = O(k, g, b, h, f, n, d), q.push(m === w ? "null" :
79 m); a = q.length ? f ? "[\n" + n + q.join(",\n" + n) + "\n" + c + "]" : "[" + q.join(",") + "]" : "[]"
80 } else B(h || g, function (a) { var c = O(a, g, b, h, f, n, d); c !== w && q.push(R(a) + ":" + (f ? " " : "") + c) }), a = q.length ? f ? "{\n" + n + q.join(",\n" + n) + "\n" + c + "}" : "{" + q.join(",") + "}" : "{}"; d.pop(); return a
81 }
82 }; r.stringify = function (a, c, b) {
83 var h, f, n, d; if (F[typeof c] && c) if ("[object Function]" == (d = u.call(c))) f = c; else if ("[object Array]" == d) { n = {}; for (var g = 0, k = c.length, l; g < k; l = c[g++], (d = u.call(l), "[object String]" == d || "[object Number]" == d) && (n[l] = 1)); } if (b) if ("[object Number]" ==
84 (d = u.call(b))) { if (0 < (b -= b % 1)) for (h = "", 10 < b && (b = 10); h.length < b; h += " "); } else "[object String]" == d && (h = 10 >= b.length ? b : b.slice(0, 10)); return O("", (l = {}, l[""] = a, l), f, n, h, "", [])
85 }
86 } if (!q("json-parse")) {
87 var V = A.fromCharCode, W = { 92: "\\", 34: '"', 47: "/", 98: "\b", 116: "\t", 110: "\n", 102: "\f", 114: "\r" }, b, J, l = function () { b = J = null; throw G(); }, z = function () {
88 for (var a = J, c = a.length, e, h, f, k, d; b < c;)switch (d = a.charCodeAt(b), d) {
89 case 9: case 10: case 13: case 32: b++; break; case 123: case 125: case 91: case 93: case 58: case 44: return e =
90 D ? a.charAt(b) : a[b], b++ , e; case 34: e = "@"; for (b++; b < c;)if (d = a.charCodeAt(b), 32 > d) l(); else if (92 == d) switch (d = a.charCodeAt(++b), d) { case 92: case 34: case 47: case 98: case 116: case 110: case 102: case 114: e += W[d]; b++; break; case 117: h = ++b; for (f = b + 4; b < f; b++)d = a.charCodeAt(b), 48 <= d && 57 >= d || 97 <= d && 102 >= d || 65 <= d && 70 >= d || l(); e += V("0x" + a.slice(h, b)); break; default: l() } else { if (34 == d) break; d = a.charCodeAt(b); for (h = b; 32 <= d && 92 != d && 34 != d;)d = a.charCodeAt(++b); e += a.slice(h, b) } if (34 == a.charCodeAt(b)) return b++ , e; l(); default: h =
91 b; 45 == d && (k = !0, d = a.charCodeAt(++b)); if (48 <= d && 57 >= d) { for (48 == d && (d = a.charCodeAt(b + 1), 48 <= d && 57 >= d) && l(); b < c && (d = a.charCodeAt(b), 48 <= d && 57 >= d); b++); if (46 == a.charCodeAt(b)) { for (f = ++b; f < c && (d = a.charCodeAt(f), 48 <= d && 57 >= d); f++); f == b && l(); b = f } d = a.charCodeAt(b); if (101 == d || 69 == d) { d = a.charCodeAt(++b); 43 != d && 45 != d || b++; for (f = b; f < c && (d = a.charCodeAt(f), 48 <= d && 57 >= d); f++); f == b && l(); b = f } return +a.slice(h, b) } k && l(); if ("true" == a.slice(b, b + 4)) return b += 4, !0; if ("false" == a.slice(b, b + 5)) return b += 5, !1; if ("null" == a.slice(b,
92 b + 4)) return b += 4, null; l()
93 }return "$"
94 }, P = function (a) { var c, b; "$" == a && l(); if ("string" == typeof a) { if ("@" == (D ? a.charAt(0) : a[0])) return a.slice(1); if ("[" == a) { for (c = []; ; b || (b = !0)) { a = z(); if ("]" == a) break; b && ("," == a ? (a = z(), "]" == a && l()) : l()); "," == a && l(); c.push(P(a)) } return c } if ("{" == a) { for (c = {}; ; b || (b = !0)) { a = z(); if ("}" == a) break; b && ("," == a ? (a = z(), "}" == a && l()) : l()); "," != a && "string" == typeof a && "@" == (D ? a.charAt(0) : a[0]) && ":" == z() || l(); c[a.slice(1)] = P(z()) } return c } l() } return a }, T = function (a, b, e) {
95 e = S(a, b, e); e ===
96 w ? delete a[b] : a[b] = e
97 }, S = function (a, b, e) { var h = a[b], f; if ("object" == typeof h && h) if ("[object Array]" == u.call(h)) for (f = h.length; f--;)T(h, f, e); else B(h, function (a) { T(h, a, e) }); return e.call(a, b, h) }; r.parse = function (a, c) { var e, h; b = 0; J = "" + a; e = P(z()); "$" != z() && l(); b = J = null; return c && "[object Function]" == u.call(c) ? S((h = {}, h[""] = e, h), "", c) : e }
98 }
99 } r.runInContext = N; return r
100 } var K = typeof define === "function" && define.amd, F = { "function": !0, object: !0 }, G = F[typeof exports] && exports && !exports.nodeType && exports, k = F[typeof window] &&
101 window || this, t = G && F[typeof module] && module && !module.nodeType && "object" == typeof global && global; !t || t.global !== t && t.window !== t && t.self !== t || (k = t); if (G && !K) N(k, G); else { var L = k.JSON, Q = k.JSON3, M = !1, A = N(k, k.JSON3 = { noConflict: function () { M || (M = !0, k.JSON = L, k.JSON3 = Q, L = Q = null); return A } }); k.JSON = { parse: A.parse, stringify: A.stringify } } K && define(function () { return A })
102}).call(this);
103/*!
104 * https://github.com/paulmillr/es6-shim
105 * @license es6-shim Copyright 2013-2016 by Paul Miller (http://paulmillr.com)
106 * and contributors, MIT License
107 * es6-shim: v0.34.2
108 * see https://github.com/paulmillr/es6-shim/blob/0.34.2/LICENSE
109 * Details and documentation:
110 * https://github.com/paulmillr/es6-shim/
111 */
112(function (e, t) { if (typeof define === "function" && define.amd) { define(t) } else if (typeof exports === "object") { module.exports = t() } else { e.returnExports = t() } })(this, function () {
113 "use strict"; var e = Function.call.bind(Function.apply); var t = Function.call.bind(Function.call); var r = Array.isArray; var n = Object.keys; var o = function notThunker(t) { return function notThunk() { return !e(t, this, arguments) } }; var i = function (e) { try { e(); return false } catch (t) { return true } }; var a = function valueOrFalseIfThrows(e) { try { return e() } catch (t) { return false } }; var u = o(i); var f = function () { return !i(function () { Object.defineProperty({}, "x", { get: function () { } }) }) }; var s = !!Object.defineProperty && f(); var c = function foo() { }.name === "foo"; var l = Function.call.bind(Array.prototype.forEach); var p = Function.call.bind(Array.prototype.reduce); var v = Function.call.bind(Array.prototype.filter); var y = Function.call.bind(Array.prototype.some); var h = function (e, t, r, n) { if (!n && t in e) { return } if (s) { Object.defineProperty(e, t, { configurable: true, enumerable: false, writable: true, value: r }) } else { e[t] = r } }; var g = function (e, t, r) { l(n(t), function (n) { var o = t[n]; h(e, n, o, !!r) }) }; var b = Function.call.bind(Object.prototype.toString); var d = typeof /abc/ === "function" ? function IsCallableSlow(e) { return typeof e === "function" && b(e) === "[object Function]" } : function IsCallableFast(e) { return typeof e === "function" }; var m = { getter: function (e, t, r) { if (!s) { throw new TypeError("getters require true ES5 support") } Object.defineProperty(e, t, { configurable: true, enumerable: false, get: r }) }, proxy: function (e, t, r) { if (!s) { throw new TypeError("getters require true ES5 support") } var n = Object.getOwnPropertyDescriptor(e, t); Object.defineProperty(r, t, { configurable: n.configurable, enumerable: n.enumerable, get: function getKey() { return e[t] }, set: function setKey(r) { e[t] = r } }) }, redefine: function (e, t, r) { if (s) { var n = Object.getOwnPropertyDescriptor(e, t); n.value = r; Object.defineProperty(e, t, n) } else { e[t] = r } }, defineByDescriptor: function (e, t, r) { if (s) { Object.defineProperty(e, t, r) } else if ("value" in r) { e[t] = r.value } }, preserveToString: function (e, t) { if (t && d(t.toString)) { h(e, "toString", t.toString.bind(t), true) } } }; var O = Object.create || function (e, t) { var r = function Prototype() { }; r.prototype = e; var o = new r; if (typeof t !== "undefined") { n(t).forEach(function (e) { m.defineByDescriptor(o, e, t[e]) }) } return o }; var w = function (e, t) { if (!Object.setPrototypeOf) { return false } return a(function () { var r = function Subclass(t) { var r = new e(t); Object.setPrototypeOf(r, Subclass.prototype); return r }; Object.setPrototypeOf(r, e); r.prototype = O(e.prototype, { constructor: { value: r } }); return t(r) }) }; var j = function () { if (typeof self !== "undefined") { return self } if (typeof window !== "undefined") { return window } if (typeof global !== "undefined") { return global } throw new Error("unable to locate global object") }; var S = j(); var T = S.isFinite; var I = Function.call.bind(String.prototype.indexOf); var E = Function.call.bind(Array.prototype.concat); var P = Function.call.bind(Array.prototype.sort); var C = Function.call.bind(String.prototype.slice); var M = Function.call.bind(Array.prototype.push); var x = Function.apply.bind(Array.prototype.push); var N = Function.call.bind(Array.prototype.shift); var A = Math.max; var R = Math.min; var _ = Math.floor; var k = Math.abs; var F = Math.log; var L = Math.sqrt; var D = Function.call.bind(Object.prototype.hasOwnProperty); var z; var q = function () { }; var W = S.Symbol || {}; var G = W.species || "@@species"; var H = Number.isNaN || function isNaN(e) { return e !== e }; var B = Number.isFinite || function isFinite(e) { return typeof e === "number" && T(e) }; var $ = function isArguments(e) { return b(e) === "[object Arguments]" }; var V = function isArguments(e) { return e !== null && typeof e === "object" && typeof e.length === "number" && e.length >= 0 && b(e) !== "[object Array]" && b(e.callee) === "[object Function]" }; var J = $(arguments) ? $ : V; var K = { primitive: function (e) { return e === null || typeof e !== "function" && typeof e !== "object" }, object: function (e) { return e !== null && typeof e === "object" }, string: function (e) { return b(e) === "[object String]" }, regex: function (e) { return b(e) === "[object RegExp]" }, symbol: function (e) { return typeof S.Symbol === "function" && typeof e === "symbol" } }; var U = function overrideNative(e, t, r) { var n = e[t]; h(e, t, r, true); m.preserveToString(e[t], n) }; var X = typeof W === "function" && typeof W["for"] === "function" && K.symbol(W()); var Z = K.symbol(W.iterator) ? W.iterator : "_es6-shim iterator_"; if (S.Set && typeof (new S.Set)["@@iterator"] === "function") { Z = "@@iterator" } if (!S.Reflect) { h(S, "Reflect", {}) } var Q = S.Reflect; var Y = String; var ee = { Call: function Call(t, r) { var n = arguments.length > 2 ? arguments[2] : []; if (!ee.IsCallable(t)) { throw new TypeError(t + " is not a function") } return e(t, r, n) }, RequireObjectCoercible: function (e, t) { if (e == null) { throw new TypeError(t || "Cannot call method on " + e) } return e }, TypeIsObject: function (e) { if (e === void 0 || e === null || e === true || e === false) { return false } return typeof e === "function" || typeof e === "object" }, ToObject: function (e, t) { return Object(ee.RequireObjectCoercible(e, t)) }, IsCallable: d, IsConstructor: function (e) { return ee.IsCallable(e) }, ToInt32: function (e) { return ee.ToNumber(e) >> 0 }, ToUint32: function (e) { return ee.ToNumber(e) >>> 0 }, ToNumber: function (e) { if (b(e) === "[object Symbol]") { throw new TypeError("Cannot convert a Symbol value to a number") } return +e }, ToInteger: function (e) { var t = ee.ToNumber(e); if (H(t)) { return 0 } if (t === 0 || !B(t)) { return t } return (t > 0 ? 1 : -1) * _(k(t)) }, ToLength: function (e) { var t = ee.ToInteger(e); if (t <= 0) { return 0 } if (t > Number.MAX_SAFE_INTEGER) { return Number.MAX_SAFE_INTEGER } return t }, SameValue: function (e, t) { if (e === t) { if (e === 0) { return 1 / e === 1 / t } return true } return H(e) && H(t) }, SameValueZero: function (e, t) { return e === t || H(e) && H(t) }, IsIterable: function (e) { return ee.TypeIsObject(e) && (typeof e[Z] !== "undefined" || J(e)) }, GetIterator: function (e) { if (J(e)) { return new z(e, "value") } var t = ee.GetMethod(e, Z); if (!ee.IsCallable(t)) { throw new TypeError("value is not an iterable") } var r = ee.Call(t, e); if (!ee.TypeIsObject(r)) { throw new TypeError("bad iterator") } return r }, GetMethod: function (e, t) { var r = ee.ToObject(e)[t]; if (r === void 0 || r === null) { return void 0 } if (!ee.IsCallable(r)) { throw new TypeError("Method not callable: " + t) } return r }, IteratorComplete: function (e) { return !!e.done }, IteratorClose: function (e, t) { var r = ee.GetMethod(e, "return"); if (r === void 0) { return } var n, o; try { n = ee.Call(r, e) } catch (i) { o = i } if (t) { return } if (o) { throw o } if (!ee.TypeIsObject(n)) { throw new TypeError("Iterator's return method returned a non-object.") } }, IteratorNext: function (e) { var t = arguments.length > 1 ? e.next(arguments[1]) : e.next(); if (!ee.TypeIsObject(t)) { throw new TypeError("bad iterator") } return t }, IteratorStep: function (e) { var t = ee.IteratorNext(e); var r = ee.IteratorComplete(t); return r ? false : t }, Construct: function (e, t, r, n) { var o = typeof r === "undefined" ? e : r; if (!n && Q.construct) { return Q.construct(e, t, o) } var i = o.prototype; if (!ee.TypeIsObject(i)) { i = Object.prototype } var a = O(i); var u = ee.Call(e, a, t); return ee.TypeIsObject(u) ? u : a }, SpeciesConstructor: function (e, t) { var r = e.constructor; if (r === void 0) { return t } if (!ee.TypeIsObject(r)) { throw new TypeError("Bad constructor") } var n = r[G]; if (n === void 0 || n === null) { return t } if (!ee.IsConstructor(n)) { throw new TypeError("Bad @@species") } return n }, CreateHTML: function (e, t, r, n) { var o = ee.ToString(e); var i = "<" + t; if (r !== "") { var a = ee.ToString(n); var u = a.replace(/"/g, """); i += " " + r + '="' + u + '"' } var f = i + ">"; var s = f + o; return s + "</" + t + ">" }, IsRegExp: function IsRegExp(e) { if (!ee.TypeIsObject(e)) { return false } var t = e[W.match]; if (typeof t !== "undefined") { return !!t } return K.regex(e) }, ToString: function ToString(e) { return Y(e) } }; if (s && X) { var te = function defineWellKnownSymbol(e) { if (K.symbol(W[e])) { return W[e] } var t = W["for"]("Symbol." + e); Object.defineProperty(W, e, { configurable: false, enumerable: false, writable: false, value: t }); return t }; if (!K.symbol(W.search)) { var re = te("search"); var ne = String.prototype.search; h(RegExp.prototype, re, function search(e) { return ee.Call(ne, e, [this]) }); var oe = function search(e) { var t = ee.RequireObjectCoercible(this); if (e !== null && typeof e !== "undefined") { var r = ee.GetMethod(e, re); if (typeof r !== "undefined") { return ee.Call(r, e, [t]) } } return ee.Call(ne, t, [ee.ToString(e)]) }; U(String.prototype, "search", oe) } if (!K.symbol(W.replace)) { var ie = te("replace"); var ae = String.prototype.replace; h(RegExp.prototype, ie, function replace(e, t) { return ee.Call(ae, e, [this, t]) }); var ue = function replace(e, t) { var r = ee.RequireObjectCoercible(this); if (e !== null && typeof e !== "undefined") { var n = ee.GetMethod(e, ie); if (typeof n !== "undefined") { return ee.Call(n, e, [r, t]) } } return ee.Call(ae, r, [ee.ToString(e), t]) }; U(String.prototype, "replace", ue) } if (!K.symbol(W.split)) { var fe = te("split"); var se = String.prototype.split; h(RegExp.prototype, fe, function split(e, t) { return ee.Call(se, e, [this, t]) }); var ce = function split(e, t) { var r = ee.RequireObjectCoercible(this); if (e !== null && typeof e !== "undefined") { var n = ee.GetMethod(e, fe); if (typeof n !== "undefined") { return ee.Call(n, e, [r, t]) } } return ee.Call(se, r, [ee.ToString(e), t]) }; U(String.prototype, "split", ce) } var le = K.symbol(W.match); var pe = le && function () { var e = {}; e[W.match] = function () { return 42 }; return "a".match(e) !== 42 }(); if (!le || pe) { var ve = te("match"); var ye = String.prototype.match; h(RegExp.prototype, ve, function match(e) { return ee.Call(ye, e, [this]) }); var he = function match(e) { var t = ee.RequireObjectCoercible(this); if (e !== null && typeof e !== "undefined") { var r = ee.GetMethod(e, ve); if (typeof r !== "undefined") { return ee.Call(r, e, [t]) } } return ee.Call(ye, t, [ee.ToString(e)]) }; U(String.prototype, "match", he) } } var ge = function wrapConstructor(e, t, r) { m.preserveToString(t, e); if (Object.setPrototypeOf) { Object.setPrototypeOf(e, t) } if (s) { l(Object.getOwnPropertyNames(e), function (n) { if (n in q || r[n]) { return } m.proxy(e, n, t) }) } else { l(Object.keys(e), function (n) { if (n in q || r[n]) { return } t[n] = e[n] }) } t.prototype = e.prototype; m.redefine(e.prototype, "constructor", t) }; var be = function () { return this }; var de = function (e) { if (s && !D(e, G)) { m.getter(e, G, be) } }; var me = function (e, t) { var r = t || function iterator() { return this }; h(e, Z, r); if (!e[Z] && K.symbol(Z)) { e[Z] = r } }; var Oe = function createDataProperty(e, t, r) { if (s) { Object.defineProperty(e, t, { configurable: true, enumerable: true, writable: true, value: r }) } else { e[t] = r } }; var we = function createDataPropertyOrThrow(e, t, r) { Oe(e, t, r); if (!ee.SameValue(e[t], r)) { throw new TypeError("property is nonconfigurable") } }; var je = function (e, t, r, n) { if (!ee.TypeIsObject(e)) { throw new TypeError("Constructor requires `new`: " + t.name) } var o = t.prototype; if (!ee.TypeIsObject(o)) { o = r } var i = O(o); for (var a in n) { if (D(n, a)) { var u = n[a]; h(i, a, u, true) } } return i }; if (String.fromCodePoint && String.fromCodePoint.length !== 1) { var Se = String.fromCodePoint; U(String, "fromCodePoint", function fromCodePoint(e) { return ee.Call(Se, this, arguments) }) } var Te = { fromCodePoint: function fromCodePoint(e) { var t = []; var r; for (var n = 0, o = arguments.length; n < o; n++) { r = Number(arguments[n]); if (!ee.SameValue(r, ee.ToInteger(r)) || r < 0 || r > 1114111) { throw new RangeError("Invalid code point " + r) } if (r < 65536) { M(t, String.fromCharCode(r)) } else { r -= 65536; M(t, String.fromCharCode((r >> 10) + 55296)); M(t, String.fromCharCode(r % 1024 + 56320)) } } return t.join("") }, raw: function raw(e) { var t = ee.ToObject(e, "bad callSite"); var r = ee.ToObject(t.raw, "bad raw value"); var n = r.length; var o = ee.ToLength(n); if (o <= 0) { return "" } var i = []; var a = 0; var u, f, s, c; while (a < o) { u = ee.ToString(a); s = ee.ToString(r[u]); M(i, s); if (a + 1 >= o) { break } f = a + 1 < arguments.length ? arguments[a + 1] : ""; c = ee.ToString(f); M(i, c); a += 1 } return i.join("") } }; if (String.raw && String.raw({ raw: { 0: "x", 1: "y", length: 2 } }) !== "xy") { U(String, "raw", Te.raw) } g(String, Te); var Ie = function repeat(e, t) { if (t < 1) { return "" } if (t % 2) { return repeat(e, t - 1) + e } var r = repeat(e, t / 2); return r + r }; var Ee = Infinity; var Pe = { repeat: function repeat(e) { var t = ee.ToString(ee.RequireObjectCoercible(this)); var r = ee.ToInteger(e); if (r < 0 || r >= Ee) { throw new RangeError("repeat count must be less than infinity and not overflow maximum string size") } return Ie(t, r) }, startsWith: function startsWith(e) { var t = ee.ToString(ee.RequireObjectCoercible(this)); if (ee.IsRegExp(e)) { throw new TypeError('Cannot call method "startsWith" with a regex') } var r = ee.ToString(e); var n; if (arguments.length > 1) { n = arguments[1] } var o = A(ee.ToInteger(n), 0); return C(t, o, o + r.length) === r }, endsWith: function endsWith(e) { var t = ee.ToString(ee.RequireObjectCoercible(this)); if (ee.IsRegExp(e)) { throw new TypeError('Cannot call method "endsWith" with a regex') } var r = ee.ToString(e); var n = t.length; var o; if (arguments.length > 1) { o = arguments[1] } var i = typeof o === "undefined" ? n : ee.ToInteger(o); var a = R(A(i, 0), n); return C(t, a - r.length, a) === r }, includes: function includes(e) { if (ee.IsRegExp(e)) { throw new TypeError('"includes" does not accept a RegExp') } var t = ee.ToString(e); var r; if (arguments.length > 1) { r = arguments[1] } return I(this, t, r) !== -1 }, codePointAt: function codePointAt(e) { var t = ee.ToString(ee.RequireObjectCoercible(this)); var r = ee.ToInteger(e); var n = t.length; if (r >= 0 && r < n) { var o = t.charCodeAt(r); var i = r + 1 === n; if (o < 55296 || o > 56319 || i) { return o } var a = t.charCodeAt(r + 1); if (a < 56320 || a > 57343) { return o } return (o - 55296) * 1024 + (a - 56320) + 65536 } } }; if (String.prototype.includes && "a".includes("a", Infinity) !== false) { U(String.prototype, "includes", Pe.includes) } if (String.prototype.startsWith && String.prototype.endsWith) { var Ce = i(function () { "/a/".startsWith(/a/) }); var Me = "abc".startsWith("a", Infinity) === false; if (!Ce || !Me) { U(String.prototype, "startsWith", Pe.startsWith); U(String.prototype, "endsWith", Pe.endsWith) } } if (X) { var xe = a(function () { var e = /a/; e[W.match] = false; return "/a/".startsWith(e) }); if (!xe) { U(String.prototype, "startsWith", Pe.startsWith) } var Ne = a(function () { var e = /a/; e[W.match] = false; return "/a/".endsWith(e) }); if (!Ne) { U(String.prototype, "endsWith", Pe.endsWith) } var Ae = a(function () { var e = /a/; e[W.match] = false; return "/a/".includes(e) }); if (!Ae) { U(String.prototype, "includes", Pe.includes) } } g(String.prototype, Pe); var Re = [" \n\x0B\f\r \xa0\u1680\u180e\u2000\u2001\u2002\u2003", "\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028", "\u2029\ufeff"].join(""); var _e = new RegExp("(^[" + Re + "]+)|([" + Re + "]+$)", "g"); var ke = function trim() { return ee.ToString(ee.RequireObjectCoercible(this)).replace(_e, "") }; var Fe = ["\x85", "\u200b", "\ufffe"].join(""); var Le = new RegExp("[" + Fe + "]", "g"); var De = /^[\-+]0x[0-9a-f]+$/i; var ze = Fe.trim().length !== Fe.length; h(String.prototype, "trim", ke, ze); var qe = function (e) { ee.RequireObjectCoercible(e); this._s = ee.ToString(e); this._i = 0 }; qe.prototype.next = function () { var e = this._s, t = this._i; if (typeof e === "undefined" || t >= e.length) { this._s = void 0; return { value: void 0, done: true } } var r = e.charCodeAt(t), n, o; if (r < 55296 || r > 56319 || t + 1 === e.length) { o = 1 } else { n = e.charCodeAt(t + 1); o = n < 56320 || n > 57343 ? 1 : 2 } this._i = t + o; return { value: e.substr(t, o), done: false } }; me(qe.prototype); me(String.prototype, function () { return new qe(this) }); var We = { from: function from(e) { var r = this; var n; if (arguments.length > 1) { n = arguments[1] } var o, i; if (typeof n === "undefined") { o = false } else { if (!ee.IsCallable(n)) { throw new TypeError("Array.from: when provided, the second argument must be a function") } if (arguments.length > 2) { i = arguments[2] } o = true } var a = typeof (J(e) || ee.GetMethod(e, Z)) !== "undefined"; var u, f, s; if (a) { f = ee.IsConstructor(r) ? Object(new r) : []; var c = ee.GetIterator(e); var l, p; s = 0; while (true) { l = ee.IteratorStep(c); if (l === false) { break } p = l.value; try { if (o) { p = typeof i === "undefined" ? n(p, s) : t(n, i, p, s) } f[s] = p } catch (v) { ee.IteratorClose(c, true); throw v } s += 1 } u = s } else { var y = ee.ToObject(e); u = ee.ToLength(y.length); f = ee.IsConstructor(r) ? Object(new r(u)) : new Array(u); var h; for (s = 0; s < u; ++s) { h = y[s]; if (o) { h = typeof i === "undefined" ? n(h, s) : t(n, i, h, s) } f[s] = h } } f.length = u; return f }, of: function of() { var e = arguments.length; var t = this; var n = r(t) || !ee.IsCallable(t) ? new Array(e) : ee.Construct(t, [e]); for (var o = 0; o < e; ++o) { we(n, o, arguments[o]) } n.length = e; return n } }; g(Array, We); de(Array); var Ge = function (e) { return { value: e, done: arguments.length === 0 } }; z = function (e, t) { this.i = 0; this.array = e; this.kind = t }; g(z.prototype, { next: function () { var e = this.i, t = this.array; if (!(this instanceof z)) { throw new TypeError("Not an ArrayIterator") } if (typeof t !== "undefined") { var r = ee.ToLength(t.length); for (; e < r; e++) { var n = this.kind; var o; if (n === "key") { o = e } else if (n === "value") { o = t[e] } else if (n === "entry") { o = [e, t[e]] } this.i = e + 1; return { value: o, done: false } } } this.array = void 0; return { value: void 0, done: true } } }); me(z.prototype); var He = function orderKeys(e, t) { var r = String(ee.ToInteger(e)) === e; var n = String(ee.ToInteger(t)) === t; if (r && n) { return t - e } else if (r && !n) { return -1 } else if (!r && n) { return 1 } else { return e.localeCompare(t) } }; var Be = function getAllKeys(e) { var t = []; var r = []; for (var n in e) { M(D(e, n) ? t : r, n) } P(t, He); P(r, He); return E(t, r) }; var $e = function (e, t) { g(this, { object: e, array: Be(e), kind: t }) }; g($e.prototype, { next: function next() { var e; var t = this.array; if (!(this instanceof $e)) { throw new TypeError("Not an ObjectIterator") } while (t.length > 0) { e = N(t); if (!(e in this.object)) { continue } if (this.kind === "key") { return Ge(e) } else if (this.kind === "value") { return Ge(this.object[e]) } else { return Ge([e, this.object[e]]) } } return Ge() } }); me($e.prototype); var Ve = Array.of === We.of || function () { var e = function Foo(e) { this.length = e }; e.prototype = []; var t = Array.of.apply(e, [1, 2]); return t instanceof e && t.length === 2 }(); if (!Ve) { U(Array, "of", We.of) } var Je = { copyWithin: function copyWithin(e, t) { var r = ee.ToObject(this); var n = ee.ToLength(r.length); var o = ee.ToInteger(e); var i = ee.ToInteger(t); var a = o < 0 ? A(n + o, 0) : R(o, n); var u = i < 0 ? A(n + i, 0) : R(i, n); var f; if (arguments.length > 2) { f = arguments[2] } var s = typeof f === "undefined" ? n : ee.ToInteger(f); var c = s < 0 ? A(n + s, 0) : R(s, n); var l = R(c - u, n - a); var p = 1; if (u < a && a < u + l) { p = -1; u += l - 1; a += l - 1 } while (l > 0) { if (u in r) { r[a] = r[u] } else { delete r[a] } u += p; a += p; l -= 1 } return r }, fill: function fill(e) { var t; if (arguments.length > 1) { t = arguments[1] } var r; if (arguments.length > 2) { r = arguments[2] } var n = ee.ToObject(this); var o = ee.ToLength(n.length); t = ee.ToInteger(typeof t === "undefined" ? 0 : t); r = ee.ToInteger(typeof r === "undefined" ? o : r); var i = t < 0 ? A(o + t, 0) : R(t, o); var a = r < 0 ? o + r : r; for (var u = i; u < o && u < a; ++u) { n[u] = e } return n }, find: function find(e) { var r = ee.ToObject(this); var n = ee.ToLength(r.length); if (!ee.IsCallable(e)) { throw new TypeError("Array#find: predicate must be a function") } var o = arguments.length > 1 ? arguments[1] : null; for (var i = 0, a; i < n; i++) { a = r[i]; if (o) { if (t(e, o, a, i, r)) { return a } } else if (e(a, i, r)) { return a } } }, findIndex: function findIndex(e) { var r = ee.ToObject(this); var n = ee.ToLength(r.length); if (!ee.IsCallable(e)) { throw new TypeError("Array#findIndex: predicate must be a function") } var o = arguments.length > 1 ? arguments[1] : null; for (var i = 0; i < n; i++) { if (o) { if (t(e, o, r[i], i, r)) { return i } } else if (e(r[i], i, r)) { return i } } return -1 }, keys: function keys() { return new z(this, "key") }, values: function values() { return new z(this, "value") }, entries: function entries() { return new z(this, "entry") } }; if (Array.prototype.keys && !ee.IsCallable([1].keys().next)) { delete Array.prototype.keys } if (Array.prototype.entries && !ee.IsCallable([1].entries().next)) { delete Array.prototype.entries } if (Array.prototype.keys && Array.prototype.entries && !Array.prototype.values && Array.prototype[Z]) { g(Array.prototype, { values: Array.prototype[Z] }); if (K.symbol(W.unscopables)) { Array.prototype[W.unscopables].values = true } } if (c && Array.prototype.values && Array.prototype.values.name !== "values") { var Ke = Array.prototype.values; U(Array.prototype, "values", function values() { return ee.Call(Ke, this, arguments) }); h(Array.prototype, Z, Array.prototype.values, true) } g(Array.prototype, Je); me(Array.prototype, function () { return this.values() }); if (Object.getPrototypeOf) { me(Object.getPrototypeOf([].values())) } var Ue = function () { return a(function () { return Array.from({ length: -1 }).length === 0 }) }(); var Xe = function () { var e = Array.from([0].entries()); return e.length === 1 && r(e[0]) && e[0][0] === 0 && e[0][1] === 0 }(); if (!Ue || !Xe) { U(Array, "from", We.from) } var Ze = function () { return a(function () { return Array.from([0], void 0) }) }(); if (!Ze) { var Qe = Array.from; U(Array, "from", function from(e) { if (arguments.length > 1 && typeof arguments[1] !== "undefined") { return ee.Call(Qe, this, arguments) } else { return t(Qe, this, e) } }) } var Ye = -(Math.pow(2, 32) - 1); var et = function (e, r) { var n = { length: Ye }; n[r ? (n.length >>> 0) - 1 : 0] = true; return a(function () { t(e, n, function () { throw new RangeError("should not reach here") }, []); return true }) }; if (!et(Array.prototype.forEach)) { var tt = Array.prototype.forEach; U(Array.prototype, "forEach", function forEach(e) { return ee.Call(tt, this.length >= 0 ? this : [], arguments) }, true) } if (!et(Array.prototype.map)) { var rt = Array.prototype.map; U(Array.prototype, "map", function map(e) { return ee.Call(rt, this.length >= 0 ? this : [], arguments) }, true) } if (!et(Array.prototype.filter)) { var nt = Array.prototype.filter; U(Array.prototype, "filter", function filter(e) { return ee.Call(nt, this.length >= 0 ? this : [], arguments) }, true) } if (!et(Array.prototype.some)) { var ot = Array.prototype.some; U(Array.prototype, "some", function some(e) { return ee.Call(ot, this.length >= 0 ? this : [], arguments) }, true) } if (!et(Array.prototype.every)) { var it = Array.prototype.every; U(Array.prototype, "every", function every(e) { return ee.Call(it, this.length >= 0 ? this : [], arguments) }, true) } if (!et(Array.prototype.reduce)) { var at = Array.prototype.reduce; U(Array.prototype, "reduce", function reduce(e) { return ee.Call(at, this.length >= 0 ? this : [], arguments) }, true) } if (!et(Array.prototype.reduceRight, true)) { var ut = Array.prototype.reduceRight; U(Array.prototype, "reduceRight", function reduceRight(e) { return ee.Call(ut, this.length >= 0 ? this : [], arguments) }, true) } var ft = Number("0o10") !== 8; var st = Number("0b10") !== 2; var ct = y(Fe, function (e) { return Number(e + 0 + e) === 0 }); if (ft || st || ct) { var lt = Number; var pt = /^0b[01]+$/i; var vt = /^0o[0-7]+$/i; var yt = pt.test.bind(pt); var ht = vt.test.bind(vt); var gt = function (e) { var t; if (typeof e.valueOf === "function") { t = e.valueOf(); if (K.primitive(t)) { return t } } if (typeof e.toString === "function") { t = e.toString(); if (K.primitive(t)) { return t } } throw new TypeError("No default value") }; var bt = Le.test.bind(Le); var dt = De.test.bind(De); var mt = function () { var e = function Number(t) { var r; if (arguments.length > 0) { r = K.primitive(t) ? t : gt(t, "number") } else { r = 0 } if (typeof r === "string") { r = ee.Call(ke, r); if (yt(r)) { r = parseInt(C(r, 2), 2) } else if (ht(r)) { r = parseInt(C(r, 2), 8) } else if (bt(r) || dt(r)) { r = NaN } } var n = this; var o = a(function () { lt.prototype.valueOf.call(n); return true }); if (n instanceof e && !o) { return new lt(r) } return lt(r) }; return e }(); ge(lt, mt, {}); Number = mt; m.redefine(S, "Number", mt) } var Ot = Math.pow(2, 53) - 1; g(Number, { MAX_SAFE_INTEGER: Ot, MIN_SAFE_INTEGER: -Ot, EPSILON: 2.220446049250313e-16, parseInt: S.parseInt, parseFloat: S.parseFloat, isFinite: B, isInteger: function isInteger(e) { return B(e) && ee.ToInteger(e) === e }, isSafeInteger: function isSafeInteger(e) { return Number.isInteger(e) && k(e) <= Number.MAX_SAFE_INTEGER }, isNaN: H }); h(Number, "parseInt", S.parseInt, Number.parseInt !== S.parseInt); if (![, 1].find(function (e, t) { return t === 0 })) { U(Array.prototype, "find", Je.find) } if ([, 1].findIndex(function (e, t) { return t === 0 }) !== 0) { U(Array.prototype, "findIndex", Je.findIndex) } var wt = Function.bind.call(Function.bind, Object.prototype.propertyIsEnumerable); var jt = function ensureEnumerable(e, t) { if (s && wt(e, t)) { Object.defineProperty(e, t, { enumerable: false }) } }; var St = function sliceArgs() { var e = Number(this); var t = arguments.length; var r = t - e; var n = new Array(r < 0 ? 0 : r); for (var o = e; o < t; ++o) { n[o - e] = arguments[o] } return n }; var Tt = function assignTo(e) { return function assignToSource(t, r) { t[r] = e[r]; return t } }; var It = function (e, t) { var r = n(Object(t)); var o; if (ee.IsCallable(Object.getOwnPropertySymbols)) { o = v(Object.getOwnPropertySymbols(Object(t)), wt(t)) } return p(E(r, o || []), Tt(t), e) }; var Et = { assign: function (e, t) { var r = ee.ToObject(e, "Cannot convert undefined or null to object"); return p(ee.Call(St, 1, arguments), It, r) }, is: function is(e, t) { return ee.SameValue(e, t) } }; var Pt = Object.assign && Object.preventExtensions && function () { var e = Object.preventExtensions({ 1: 2 }); try { Object.assign(e, "xy") } catch (t) { return e[1] === "y" } }(); if (Pt) { U(Object, "assign", Et.assign) } g(Object, Et); if (s) { var Ct = { setPrototypeOf: function (e, r) { var n; var o = function (e, t) { if (!ee.TypeIsObject(e)) { throw new TypeError("cannot set prototype on a non-object") } if (!(t === null || ee.TypeIsObject(t))) { throw new TypeError("can only set prototype to an object or null" + t) } }; var i = function (e, r) { o(e, r); t(n, e, r); return e }; try { n = e.getOwnPropertyDescriptor(e.prototype, r).set; t(n, {}, null) } catch (a) { if (e.prototype !== {}[r]) { return } n = function (e) { this[r] = e }; i.polyfill = i(i({}, null), e.prototype) instanceof e } return i }(Object, "__proto__") }; g(Object, Ct) } if (Object.setPrototypeOf && Object.getPrototypeOf && Object.getPrototypeOf(Object.setPrototypeOf({}, null)) !== null && Object.getPrototypeOf(Object.create(null)) === null) { (function () { var e = Object.create(null); var t = Object.getPrototypeOf, r = Object.setPrototypeOf; Object.getPrototypeOf = function (r) { var n = t(r); return n === e ? null : n }; Object.setPrototypeOf = function (t, n) { var o = n === null ? e : n; return r(t, o) }; Object.setPrototypeOf.polyfill = false })() } var Mt = !i(function () { Object.keys("foo") }); if (!Mt) { var xt = Object.keys; U(Object, "keys", function keys(e) { return xt(ee.ToObject(e)) }); n = Object.keys } if (Object.getOwnPropertyNames) { var Nt = !i(function () { Object.getOwnPropertyNames("foo") }); if (!Nt) { var At = typeof window === "object" ? Object.getOwnPropertyNames(window) : []; var Rt = Object.getOwnPropertyNames; U(Object, "getOwnPropertyNames", function getOwnPropertyNames(e) { var t = ee.ToObject(e); if (b(t) === "[object Window]") { try { return Rt(t) } catch (r) { return E([], At) } } return Rt(t) }) } } if (Object.getOwnPropertyDescriptor) { var _t = !i(function () { Object.getOwnPropertyDescriptor("foo", "bar") }); if (!_t) { var kt = Object.getOwnPropertyDescriptor; U(Object, "getOwnPropertyDescriptor", function getOwnPropertyDescriptor(e, t) { return kt(ee.ToObject(e), t) }) } } if (Object.seal) { var Ft = !i(function () { Object.seal("foo") }); if (!Ft) { var Lt = Object.seal; U(Object, "seal", function seal(e) { if (!K.object(e)) { return e } return Lt(e) }) } } if (Object.isSealed) { var Dt = !i(function () { Object.isSealed("foo") }); if (!Dt) { var zt = Object.isSealed; U(Object, "isSealed", function isSealed(e) { if (!K.object(e)) { return true } return zt(e) }) } } if (Object.freeze) { var qt = !i(function () { Object.freeze("foo") }); if (!qt) { var Wt = Object.freeze; U(Object, "freeze", function freeze(e) { if (!K.object(e)) { return e } return Wt(e) }) } } if (Object.isFrozen) { var Gt = !i(function () { Object.isFrozen("foo") }); if (!Gt) { var Ht = Object.isFrozen; U(Object, "isFrozen", function isFrozen(e) { if (!K.object(e)) { return true } return Ht(e) }) } } if (Object.preventExtensions) { var Bt = !i(function () { Object.preventExtensions("foo") }); if (!Bt) { var $t = Object.preventExtensions; U(Object, "preventExtensions", function preventExtensions(e) { if (!K.object(e)) { return e } return $t(e) }) } } if (Object.isExtensible) { var Vt = !i(function () { Object.isExtensible("foo") }); if (!Vt) { var Jt = Object.isExtensible; U(Object, "isExtensible", function isExtensible(e) { if (!K.object(e)) { return false } return Jt(e) }) } } if (Object.getPrototypeOf) { var Kt = !i(function () { Object.getPrototypeOf("foo") }); if (!Kt) { var Ut = Object.getPrototypeOf; U(Object, "getPrototypeOf", function getPrototypeOf(e) { return Ut(ee.ToObject(e)) }) } } var Xt = s && function () { var e = Object.getOwnPropertyDescriptor(RegExp.prototype, "flags"); return e && ee.IsCallable(e.get) }(); if (s && !Xt) { var Zt = function flags() { if (!ee.TypeIsObject(this)) { throw new TypeError("Method called on incompatible type: must be an object.") } var e = ""; if (this.global) { e += "g" } if (this.ignoreCase) { e += "i" } if (this.multiline) { e += "m" } if (this.unicode) { e += "u" } if (this.sticky) { e += "y" } return e }; m.getter(RegExp.prototype, "flags", Zt) } var Qt = s && a(function () { return String(new RegExp(/a/g, "i")) === "/a/i" }); var Yt = X && s && function () { var e = /./; e[W.match] = false; return RegExp(e) === e }(); if (s && (!Qt || Yt)) { var er = Object.getOwnPropertyDescriptor(RegExp.prototype, "flags").get; var tr = Object.getOwnPropertyDescriptor(RegExp.prototype, "source") || {}; var rr = function () { return this.source }; var nr = ee.IsCallable(tr.get) ? tr.get : rr; var or = RegExp; var ir = function () { return function RegExp(e, t) { var r = ee.IsRegExp(e); var n = this instanceof RegExp; if (!n && r && typeof t === "undefined" && e.constructor === RegExp) { return e } var o = e; var i = t; if (K.regex(e)) { o = ee.Call(nr, e); i = typeof t === "undefined" ? ee.Call(er, e) : t; return new RegExp(o, i) } else if (r) { o = e.source; i = typeof t === "undefined" ? e.flags : t } return new or(e, t) } }(); ge(or, ir, { $input: true }); RegExp = ir; m.redefine(S, "RegExp", ir) } if (s) { var ar = { input: "$_", lastMatch: "$&", lastParen: "$+", leftContext: "$`", rightContext: "$'" }; l(n(ar), function (e) { if (e in RegExp && !(ar[e] in RegExp)) { m.getter(RegExp, ar[e], function get() { return RegExp[e] }) } }) } de(RegExp); var ur = 1 / Number.EPSILON; var fr = function roundTiesToEven(e) { return e + ur - ur }; var sr = Math.pow(2, -23); var cr = Math.pow(2, 127) * (2 - sr); var lr = Math.pow(2, -126); var pr = Number.prototype.clz; delete Number.prototype.clz; var vr = { acosh: function acosh(e) { var t = Number(e); if (Number.isNaN(t) || e < 1) { return NaN } if (t === 1) { return 0 } if (t === Infinity) { return t } return F(t / Math.E + L(t + 1) * L(t - 1) / Math.E) + 1 }, asinh: function asinh(e) { var t = Number(e); if (t === 0 || !T(t)) { return t } return t < 0 ? -Math.asinh(-t) : F(t + L(t * t + 1)) }, atanh: function atanh(e) { var t = Number(e); if (Number.isNaN(t) || t < -1 || t > 1) { return NaN } if (t === -1) { return -Infinity } if (t === 1) { return Infinity } if (t === 0) { return t } return .5 * F((1 + t) / (1 - t)) }, cbrt: function cbrt(e) { var t = Number(e); if (t === 0) { return t } var r = t < 0, n; if (r) { t = -t } if (t === Infinity) { n = Infinity } else { n = Math.exp(F(t) / 3); n = (t / (n * n) + 2 * n) / 3 } return r ? -n : n }, clz32: function clz32(e) { var t = Number(e); var r = ee.ToUint32(t); if (r === 0) { return 32 } return pr ? ee.Call(pr, r) : 31 - _(F(r + .5) * Math.LOG2E) }, cosh: function cosh(e) { var t = Number(e); if (t === 0) { return 1 } if (Number.isNaN(t)) { return NaN } if (!T(t)) { return Infinity } if (t < 0) { t = -t } if (t > 21) { return Math.exp(t) / 2 } return (Math.exp(t) + Math.exp(-t)) / 2 }, expm1: function expm1(e) { var t = Number(e); if (t === -Infinity) { return -1 } if (!T(t) || t === 0) { return t } if (k(t) > .5) { return Math.exp(t) - 1 } var r = t; var n = 0; var o = 1; while (n + r !== n) { n += r; o += 1; r *= t / o } return n }, hypot: function hypot(e, t) { var r = 0; var n = 0; for (var o = 0; o < arguments.length; ++o) { var i = k(Number(arguments[o])); if (n < i) { r *= n / i * (n / i); r += 1; n = i } else { r += i > 0 ? i / n * (i / n) : i } } return n === Infinity ? Infinity : n * L(r) }, log2: function log2(e) { return F(e) * Math.LOG2E }, log10: function log10(e) { return F(e) * Math.LOG10E }, log1p: function log1p(e) { var t = Number(e); if (t < -1 || Number.isNaN(t)) { return NaN } if (t === 0 || t === Infinity) { return t } if (t === -1) { return -Infinity } return 1 + t - 1 === 0 ? t : t * (F(1 + t) / (1 + t - 1)) }, sign: function sign(e) { var t = Number(e); if (t === 0) { return t } if (Number.isNaN(t)) { return t } return t < 0 ? -1 : 1 }, sinh: function sinh(e) { var t = Number(e); if (!T(t) || t === 0) { return t } if (k(t) < 1) { return (Math.expm1(t) - Math.expm1(-t)) / 2 } return (Math.exp(t - 1) - Math.exp(-t - 1)) * Math.E / 2 }, tanh: function tanh(e) { var t = Number(e); if (Number.isNaN(t) || t === 0) { return t } if (t === Infinity) { return 1 } if (t === -Infinity) { return -1 } var r = Math.expm1(t); var n = Math.expm1(-t); if (r === Infinity) { return 1 } if (n === Infinity) { return -1 } return (r - n) / (Math.exp(t) + Math.exp(-t)) }, trunc: function trunc(e) { var t = Number(e); return t < 0 ? -_(-t) : _(t) }, imul: function imul(e, t) { var r = ee.ToUint32(e); var n = ee.ToUint32(t); var o = r >>> 16 & 65535; var i = r & 65535; var a = n >>> 16 & 65535; var u = n & 65535; return i * u + (o * u + i * a << 16 >>> 0) | 0 }, fround: function fround(e) { var t = Number(e); if (t === 0 || t === Infinity || t === -Infinity || H(t)) { return t } var r = Math.sign(t); var n = k(t); if (n < lr) { return r * fr(n / lr / sr) * lr * sr } var o = (1 + sr / Number.EPSILON) * n; var i = o - (o - n); if (i > cr || H(i)) { return r * Infinity } return r * i } }; g(Math, vr); h(Math, "log1p", vr.log1p, Math.log1p(-1e-17) !== -1e-17); h(Math, "asinh", vr.asinh, Math.asinh(-1e7) !== -Math.asinh(1e7)); h(Math, "tanh", vr.tanh, Math.tanh(-2e-17) !== -2e-17); h(Math, "acosh", vr.acosh, Math.acosh(Number.MAX_VALUE) === Infinity); h(Math, "cbrt", vr.cbrt, Math.abs(1 - Math.cbrt(1e-300) / 1e-100) / Number.EPSILON > 8); h(Math, "sinh", vr.sinh, Math.sinh(-2e-17) !== -2e-17); var yr = Math.expm1(10); h(Math, "expm1", vr.expm1, yr > 22025.465794806718 || yr < 22025.465794806718); var hr = Math.round; var gr = Math.round(.5 - Number.EPSILON / 4) === 0 && Math.round(-.5 + Number.EPSILON / 3.99) === 1; var br = ur + 1; var dr = 2 * ur - 1; var mr = [br, dr].every(function (e) { return Math.round(e) === e }); h(Math, "round", function round(e) { var t = _(e); var r = t === -1 ? -0 : t + 1; return e - t < .5 ? t : r }, !gr || !mr); m.preserveToString(Math.round, hr); var Or = Math.imul; if (Math.imul(4294967295, 5) !== -5) { Math.imul = vr.imul; m.preserveToString(Math.imul, Or) } if (Math.imul.length !== 2) { U(Math, "imul", function imul(e, t) { return ee.Call(Or, Math, arguments) }) } var wr = function () {
114 var e = S.setTimeout;
115 if (typeof e !== "function" && typeof e !== "object") { return } ee.IsPromise = function (e) { if (!ee.TypeIsObject(e)) { return false } if (typeof e._promise === "undefined") { return false } return true }; var r = function (e) { if (!ee.IsConstructor(e)) { throw new TypeError("Bad promise constructor") } var t = this; var r = function (e, r) { if (t.resolve !== void 0 || t.reject !== void 0) { throw new TypeError("Bad Promise implementation!") } t.resolve = e; t.reject = r }; t.resolve = void 0; t.reject = void 0; t.promise = new e(r); if (!(ee.IsCallable(t.resolve) && ee.IsCallable(t.reject))) { throw new TypeError("Bad promise constructor") } }; var n; if (typeof window !== "undefined" && ee.IsCallable(window.postMessage)) { n = function () { var e = []; var t = "zero-timeout-message"; var r = function (r) { M(e, r); window.postMessage(t, "*") }; var n = function (r) { if (r.source === window && r.data === t) { r.stopPropagation(); if (e.length === 0) { return } var n = N(e); n() } }; window.addEventListener("message", n, true); return r } } var o = function () { var e = S.Promise; var t = e && e.resolve && e.resolve(); return t && function (e) { return t.then(e) } }; var i = ee.IsCallable(S.setImmediate) ? S.setImmediate : typeof process === "object" && process.nextTick ? process.nextTick : o() || (ee.IsCallable(n) ? n() : function (t) { e(t, 0) }); var a = function (e) { return e }; var u = function (e) { throw e }; var f = 0; var s = 1; var c = 2; var l = 0; var p = 1; var v = 2; var y = {}; var h = function (e, t, r) { i(function () { b(e, t, r) }) }; var b = function (e, t, r) { var n, o; if (t === y) { return e(r) } try { n = e(r); o = t.resolve } catch (i) { n = i; o = t.reject } o(n) }; var d = function (e, t) { var r = e._promise; var n = r.reactionLength; if (n > 0) { h(r.fulfillReactionHandler0, r.reactionCapability0, t); r.fulfillReactionHandler0 = void 0; r.rejectReactions0 = void 0; r.reactionCapability0 = void 0; if (n > 1) { for (var o = 1, i = 0; o < n; o++ , i += 3) { h(r[i + l], r[i + v], t); e[i + l] = void 0; e[i + p] = void 0; e[i + v] = void 0 } } } r.result = t; r.state = s; r.reactionLength = 0 }; var m = function (e, t) { var r = e._promise; var n = r.reactionLength; if (n > 0) { h(r.rejectReactionHandler0, r.reactionCapability0, t); r.fulfillReactionHandler0 = void 0; r.rejectReactions0 = void 0; r.reactionCapability0 = void 0; if (n > 1) { for (var o = 1, i = 0; o < n; o++ , i += 3) { h(r[i + p], r[i + v], t); e[i + l] = void 0; e[i + p] = void 0; e[i + v] = void 0 } } } r.result = t; r.state = c; r.reactionLength = 0 }; var O = function (e) { var t = false; var r = function (r) { var n; if (t) { return } t = true; if (r === e) { return m(e, new TypeError("Self resolution")) } if (!ee.TypeIsObject(r)) { return d(e, r) } try { n = r.then } catch (o) { return m(e, o) } if (!ee.IsCallable(n)) { return d(e, r) } i(function () { j(e, r, n) }) }; var n = function (r) { if (t) { return } t = true; return m(e, r) }; return { resolve: r, reject: n } }; var w = function (e, r, n, o) { if (e === I) { t(e, r, n, o, y) } else { t(e, r, n, o) } }; var j = function (e, t, r) { var n = O(e); var o = n.resolve; var i = n.reject; try { w(r, t, o, i) } catch (a) { i(a) } }; var T, I; var E = function () { var e = function Promise(t) { if (!(this instanceof e)) { throw new TypeError('Constructor Promise requires "new"') } if (this && this._promise) { throw new TypeError("Bad construction") } if (!ee.IsCallable(t)) { throw new TypeError("not a valid resolver") } var r = je(this, e, T, { _promise: { result: void 0, state: f, reactionLength: 0, fulfillReactionHandler0: void 0, rejectReactionHandler0: void 0, reactionCapability0: void 0 } }); var n = O(r); var o = n.reject; try { t(n.resolve, o) } catch (i) { o(i) } return r }; return e }(); T = E.prototype; var P = function (e, t, r, n) { var o = false; return function (i) { if (o) { return } o = true; t[e] = i; if (--n.count === 0) { var a = r.resolve; a(t) } } }; var C = function (e, t, r) { var n = e.iterator; var o = [], i = { count: 1 }, a, u; var f = 0; while (true) { try { a = ee.IteratorStep(n); if (a === false) { e.done = true; break } u = a.value } catch (s) { e.done = true; throw s } o[f] = void 0; var c = t.resolve(u); var l = P(f, o, r, i); i.count += 1; w(c.then, c, l, r.reject); f += 1 } if (--i.count === 0) { var p = r.resolve; p(o) } return r.promise }; var x = function (e, t, r) { var n = e.iterator, o, i, a; while (true) { try { o = ee.IteratorStep(n); if (o === false) { e.done = true; break } i = o.value } catch (u) { e.done = true; throw u } a = t.resolve(i); w(a.then, a, r.resolve, r.reject) } return r.promise }; g(E, { all: function all(e) { var t = this; if (!ee.TypeIsObject(t)) { throw new TypeError("Promise is not object") } var n = new r(t); var o, i; try { o = ee.GetIterator(e); i = { iterator: o, done: false }; return C(i, t, n) } catch (a) { var u = a; if (i && !i.done) { try { ee.IteratorClose(o, true) } catch (f) { u = f } } var s = n.reject; s(u); return n.promise } }, race: function race(e) { var t = this; if (!ee.TypeIsObject(t)) { throw new TypeError("Promise is not object") } var n = new r(t); var o, i; try { o = ee.GetIterator(e); i = { iterator: o, done: false }; return x(i, t, n) } catch (a) { var u = a; if (i && !i.done) { try { ee.IteratorClose(o, true) } catch (f) { u = f } } var s = n.reject; s(u); return n.promise } }, reject: function reject(e) { var t = this; if (!ee.TypeIsObject(t)) { throw new TypeError("Bad promise constructor") } var n = new r(t); var o = n.reject; o(e); return n.promise }, resolve: function resolve(e) { var t = this; if (!ee.TypeIsObject(t)) { throw new TypeError("Bad promise constructor") } if (ee.IsPromise(e)) { var n = e.constructor; if (n === t) { return e } } var o = new r(t); var i = o.resolve; i(e); return o.promise } }); g(T, { "catch": function (e) { return this.then(null, e) }, then: function then(e, t) { var n = this; if (!ee.IsPromise(n)) { throw new TypeError("not a promise") } var o = ee.SpeciesConstructor(n, E); var i; var g = arguments.length > 2 && arguments[2] === y; if (g && o === E) { i = y } else { i = new r(o) } var b = ee.IsCallable(e) ? e : a; var d = ee.IsCallable(t) ? t : u; var m = n._promise; var O; if (m.state === f) { if (m.reactionLength === 0) { m.fulfillReactionHandler0 = b; m.rejectReactionHandler0 = d; m.reactionCapability0 = i } else { var w = 3 * (m.reactionLength - 1); m[w + l] = b; m[w + p] = d; m[w + v] = i } m.reactionLength += 1 } else if (m.state === s) { O = m.result; h(b, i, O) } else if (m.state === c) { O = m.result; h(d, i, O) } else { throw new TypeError("unexpected Promise state") } return i.promise } }); y = new r(E); I = T.then; return E
116 }(); if (S.Promise) { delete S.Promise.accept; delete S.Promise.defer; delete S.Promise.prototype.chain } if (typeof wr === "function") { g(S, { Promise: wr }); var jr = w(S.Promise, function (e) { return e.resolve(42).then(function () { }) instanceof e }); var Sr = !i(function () { S.Promise.reject(42).then(null, 5).then(null, q) }); var Tr = i(function () { S.Promise.call(3, q) }); var Ir = function (e) { var t = e.resolve(5); t.constructor = {}; var r = e.resolve(t); return t === r }(S.Promise); var Er = s && function () { var e = 0; var t = Object.defineProperty({}, "then", { get: function () { e += 1 } }); Promise.resolve(t); return e === 1 }(); var Pr = function BadResolverPromise(e) { var t = new Promise(e); e(3, function () { }); this.then = t.then; this.constructor = BadResolverPromise }; Pr.prototype = Promise.prototype; Pr.all = Promise.all; var Cr = a(function () { return !!Pr.all([1, 2]) }); if (!jr || !Sr || !Tr || Ir || !Er || Cr) { Promise = wr; U(S, "Promise", wr) } if (Promise.all.length !== 1) { var Mr = Promise.all; U(Promise, "all", function all(e) { return ee.Call(Mr, this, arguments) }) } if (Promise.race.length !== 1) { var xr = Promise.race; U(Promise, "race", function race(e) { return ee.Call(xr, this, arguments) }) } if (Promise.resolve.length !== 1) { var Nr = Promise.resolve; U(Promise, "resolve", function resolve(e) { return ee.Call(Nr, this, arguments) }) } if (Promise.reject.length !== 1) { var Ar = Promise.reject; U(Promise, "reject", function reject(e) { return ee.Call(Ar, this, arguments) }) } jt(Promise, "all"); jt(Promise, "race"); jt(Promise, "resolve"); jt(Promise, "reject"); de(Promise) } var Rr = function (e) { var t = n(p(e, function (e, t) { e[t] = true; return e }, {})); return e.join(":") === t.join(":") }; var _r = Rr(["z", "a", "bb"]); var kr = Rr(["z", 1, "a", "3", 2]); if (s) { var Fr = function fastkey(e) { if (!_r) { return null } if (typeof e === "undefined" || e === null) { return "^" + ee.ToString(e) } else if (typeof e === "string") { return "$" + e } else if (typeof e === "number") { if (!kr) { return "n" + e } return e } else if (typeof e === "boolean") { return "b" + e } return null }; var Lr = function emptyObject() { return Object.create ? Object.create(null) : {} }; var Dr = function addIterableToMap(e, n, o) { if (r(o) || K.string(o)) { l(o, function (e) { if (!ee.TypeIsObject(e)) { throw new TypeError("Iterator value " + e + " is not an entry object") } n.set(e[0], e[1]) }) } else if (o instanceof e) { t(e.prototype.forEach, o, function (e, t) { n.set(t, e) }) } else { var i, a; if (o !== null && typeof o !== "undefined") { a = n.set; if (!ee.IsCallable(a)) { throw new TypeError("bad map") } i = ee.GetIterator(o) } if (typeof i !== "undefined") { while (true) { var u = ee.IteratorStep(i); if (u === false) { break } var f = u.value; try { if (!ee.TypeIsObject(f)) { throw new TypeError("Iterator value " + f + " is not an entry object") } t(a, n, f[0], f[1]) } catch (s) { ee.IteratorClose(i, true); throw s } } } } }; var zr = function addIterableToSet(e, n, o) { if (r(o) || K.string(o)) { l(o, function (e) { n.add(e) }) } else if (o instanceof e) { t(e.prototype.forEach, o, function (e) { n.add(e) }) } else { var i, a; if (o !== null && typeof o !== "undefined") { a = n.add; if (!ee.IsCallable(a)) { throw new TypeError("bad set") } i = ee.GetIterator(o) } if (typeof i !== "undefined") { while (true) { var u = ee.IteratorStep(i); if (u === false) { break } var f = u.value; try { t(a, n, f) } catch (s) { ee.IteratorClose(i, true); throw s } } } } }; var qr = { Map: function () { var e = {}; var r = function MapEntry(e, t) { this.key = e; this.value = t; this.next = null; this.prev = null }; r.prototype.isRemoved = function isRemoved() { return this.key === e }; var n = function isMap(e) { return !!e._es6map }; var o = function requireMapSlot(e, t) { if (!ee.TypeIsObject(e) || !n(e)) { throw new TypeError("Method Map.prototype." + t + " called on incompatible receiver " + ee.ToString(e)) } }; var i = function MapIterator(e, t) { o(e, "[[MapIterator]]"); this.head = e._head; this.i = this.head; this.kind = t }; i.prototype = { next: function next() { var e = this.i, t = this.kind, r = this.head, n; if (typeof this.i === "undefined") { return { value: void 0, done: true } } while (e.isRemoved() && e !== r) { e = e.prev } while (e.next !== r) { e = e.next; if (!e.isRemoved()) { if (t === "key") { n = e.key } else if (t === "value") { n = e.value } else { n = [e.key, e.value] } this.i = e; return { value: n, done: false } } } this.i = void 0; return { value: void 0, done: true } } }; me(i.prototype); var a; var u = function Map() { if (!(this instanceof Map)) { throw new TypeError('Constructor Map requires "new"') } if (this && this._es6map) { throw new TypeError("Bad construction") } var e = je(this, Map, a, { _es6map: true, _head: null, _storage: Lr(), _size: 0 }); var t = new r(null, null); t.next = t.prev = t; e._head = t; if (arguments.length > 0) { Dr(Map, e, arguments[0]) } return e }; a = u.prototype; m.getter(a, "size", function () { if (typeof this._size === "undefined") { throw new TypeError("size method called on incompatible Map") } return this._size }); g(a, { get: function get(e) { o(this, "get"); var t = Fr(e); if (t !== null) { var r = this._storage[t]; if (r) { return r.value } else { return } } var n = this._head, i = n; while ((i = i.next) !== n) { if (ee.SameValueZero(i.key, e)) { return i.value } } }, has: function has(e) { o(this, "has"); var t = Fr(e); if (t !== null) { return typeof this._storage[t] !== "undefined" } var r = this._head, n = r; while ((n = n.next) !== r) { if (ee.SameValueZero(n.key, e)) { return true } } return false }, set: function set(e, t) { o(this, "set"); var n = this._head, i = n, a; var u = Fr(e); if (u !== null) { if (typeof this._storage[u] !== "undefined") { this._storage[u].value = t; return this } else { a = this._storage[u] = new r(e, t); i = n.prev } } while ((i = i.next) !== n) { if (ee.SameValueZero(i.key, e)) { i.value = t; return this } } a = a || new r(e, t); if (ee.SameValue(-0, e)) { a.key = +0 } a.next = this._head; a.prev = this._head.prev; a.prev.next = a; a.next.prev = a; this._size += 1; return this }, "delete": function (t) { o(this, "delete"); var r = this._head, n = r; var i = Fr(t); if (i !== null) { if (typeof this._storage[i] === "undefined") { return false } n = this._storage[i].prev; delete this._storage[i] } while ((n = n.next) !== r) { if (ee.SameValueZero(n.key, t)) { n.key = n.value = e; n.prev.next = n.next; n.next.prev = n.prev; this._size -= 1; return true } } return false }, clear: function clear() { o(this, "clear"); this._size = 0; this._storage = Lr(); var t = this._head, r = t, n = r.next; while ((r = n) !== t) { r.key = r.value = e; n = r.next; r.next = r.prev = t } t.next = t.prev = t }, keys: function keys() { o(this, "keys"); return new i(this, "key") }, values: function values() { o(this, "values"); return new i(this, "value") }, entries: function entries() { o(this, "entries"); return new i(this, "key+value") }, forEach: function forEach(e) { o(this, "forEach"); var r = arguments.length > 1 ? arguments[1] : null; var n = this.entries(); for (var i = n.next(); !i.done; i = n.next()) { if (r) { t(e, r, i.value[1], i.value[0], this) } else { e(i.value[1], i.value[0], this) } } } }); me(a, a.entries); return u }(), Set: function () { var e = function isSet(e) { return e._es6set && typeof e._storage !== "undefined" }; var r = function requireSetSlot(t, r) { if (!ee.TypeIsObject(t) || !e(t)) { throw new TypeError("Set.prototype." + r + " called on incompatible receiver " + ee.ToString(t)) } }; var o; var i = function Set() { if (!(this instanceof Set)) { throw new TypeError('Constructor Set requires "new"') } if (this && this._es6set) { throw new TypeError("Bad construction") } var e = je(this, Set, o, { _es6set: true, "[[SetData]]": null, _storage: Lr() }); if (!e._es6set) { throw new TypeError("bad set") } if (arguments.length > 0) { zr(Set, e, arguments[0]) } return e }; o = i.prototype; var a = function (e) { var t = e; if (t === "^null") { return null } else if (t === "^undefined") { return void 0 } else { var r = t.charAt(0); if (r === "$") { return C(t, 1) } else if (r === "n") { return +C(t, 1) } else if (r === "b") { return t === "btrue" } } return +t }; var u = function ensureMap(e) { if (!e["[[SetData]]"]) { var t = e["[[SetData]]"] = new qr.Map; l(n(e._storage), function (e) { var r = a(e); t.set(r, r) }); e["[[SetData]]"] = t } e._storage = null }; m.getter(i.prototype, "size", function () { r(this, "size"); if (this._storage) { return n(this._storage).length } u(this); return this["[[SetData]]"].size }); g(i.prototype, { has: function has(e) { r(this, "has"); var t; if (this._storage && (t = Fr(e)) !== null) { return !!this._storage[t] } u(this); return this["[[SetData]]"].has(e) }, add: function add(e) { r(this, "add"); var t; if (this._storage && (t = Fr(e)) !== null) { this._storage[t] = true; return this } u(this); this["[[SetData]]"].set(e, e); return this }, "delete": function (e) { r(this, "delete"); var t; if (this._storage && (t = Fr(e)) !== null) { var n = D(this._storage, t); return delete this._storage[t] && n } u(this); return this["[[SetData]]"]["delete"](e) }, clear: function clear() { r(this, "clear"); if (this._storage) { this._storage = Lr() } if (this["[[SetData]]"]) { this["[[SetData]]"].clear() } }, values: function values() { r(this, "values"); u(this); return this["[[SetData]]"].values() }, entries: function entries() { r(this, "entries"); u(this); return this["[[SetData]]"].entries() }, forEach: function forEach(e) { r(this, "forEach"); var n = arguments.length > 1 ? arguments[1] : null; var o = this; u(o); this["[[SetData]]"].forEach(function (r, i) { if (n) { t(e, n, i, i, o) } else { e(i, i, o) } }) } }); h(i.prototype, "keys", i.prototype.values, true); me(i.prototype, i.prototype.values); return i }() }; if (S.Map || S.Set) { var Wr = a(function () { return new Map([[1, 2]]).get(1) === 2 }); if (!Wr) { var Gr = S.Map; S.Map = function Map() { if (!(this instanceof Map)) { throw new TypeError('Constructor Map requires "new"') } var e = new Gr; if (arguments.length > 0) { Dr(Map, e, arguments[0]) } delete e.constructor; Object.setPrototypeOf(e, S.Map.prototype); return e }; S.Map.prototype = O(Gr.prototype); h(S.Map.prototype, "constructor", S.Map, true); m.preserveToString(S.Map, Gr) } var Hr = new Map; var Br = function () { var e = new Map([[1, 0], [2, 0], [3, 0], [4, 0]]); e.set(-0, e); return e.get(0) === e && e.get(-0) === e && e.has(0) && e.has(-0) }(); var $r = Hr.set(1, 2) === Hr; if (!Br || !$r) { var Vr = Map.prototype.set; U(Map.prototype, "set", function set(e, r) { t(Vr, this, e === 0 ? 0 : e, r); return this }) } if (!Br) { var Jr = Map.prototype.get; var Kr = Map.prototype.has; g(Map.prototype, { get: function get(e) { return t(Jr, this, e === 0 ? 0 : e) }, has: function has(e) { return t(Kr, this, e === 0 ? 0 : e) } }, true); m.preserveToString(Map.prototype.get, Jr); m.preserveToString(Map.prototype.has, Kr) } var Ur = new Set; var Xr = function (e) { e["delete"](0); e.add(-0); return !e.has(0) }(Ur); var Zr = Ur.add(1) === Ur; if (!Xr || !Zr) { var Qr = Set.prototype.add; Set.prototype.add = function add(e) { t(Qr, this, e === 0 ? 0 : e); return this }; m.preserveToString(Set.prototype.add, Qr) } if (!Xr) { var Yr = Set.prototype.has; Set.prototype.has = function has(e) { return t(Yr, this, e === 0 ? 0 : e) }; m.preserveToString(Set.prototype.has, Yr); var en = Set.prototype["delete"]; Set.prototype["delete"] = function SetDelete(e) { return t(en, this, e === 0 ? 0 : e) }; m.preserveToString(Set.prototype["delete"], en) } var tn = w(S.Map, function (e) { var t = new e([]); t.set(42, 42); return t instanceof e }); var rn = Object.setPrototypeOf && !tn; var nn = function () { try { return !(S.Map() instanceof S.Map) } catch (e) { return e instanceof TypeError } }(); if (S.Map.length !== 0 || rn || !nn) { var on = S.Map; S.Map = function Map() { if (!(this instanceof Map)) { throw new TypeError('Constructor Map requires "new"') } var e = new on; if (arguments.length > 0) { Dr(Map, e, arguments[0]) } delete e.constructor; Object.setPrototypeOf(e, Map.prototype); return e }; S.Map.prototype = on.prototype; h(S.Map.prototype, "constructor", S.Map, true); m.preserveToString(S.Map, on) } var an = w(S.Set, function (e) { var t = new e([]); t.add(42, 42); return t instanceof e }); var un = Object.setPrototypeOf && !an; var fn = function () { try { return !(S.Set() instanceof S.Set) } catch (e) { return e instanceof TypeError } }(); if (S.Set.length !== 0 || un || !fn) { var sn = S.Set; S.Set = function Set() { if (!(this instanceof Set)) { throw new TypeError('Constructor Set requires "new"') } var e = new sn; if (arguments.length > 0) { zr(Set, e, arguments[0]) } delete e.constructor; Object.setPrototypeOf(e, Set.prototype); return e }; S.Set.prototype = sn.prototype; h(S.Set.prototype, "constructor", S.Set, true); m.preserveToString(S.Set, sn) } var cn = !a(function () { return (new Map).keys().next().done }); if (typeof S.Map.prototype.clear !== "function" || (new S.Set).size !== 0 || (new S.Map).size !== 0 || typeof S.Map.prototype.keys !== "function" || typeof S.Set.prototype.keys !== "function" || typeof S.Map.prototype.forEach !== "function" || typeof S.Set.prototype.forEach !== "function" || u(S.Map) || u(S.Set) || typeof (new S.Map).keys().next !== "function" || cn || !tn) { g(S, { Map: qr.Map, Set: qr.Set }, true) } if (S.Set.prototype.keys !== S.Set.prototype.values) { h(S.Set.prototype, "keys", S.Set.prototype.values, true) } me(Object.getPrototypeOf((new S.Map).keys())); me(Object.getPrototypeOf((new S.Set).keys())); if (c && S.Set.prototype.has.name !== "has") { var ln = S.Set.prototype.has; U(S.Set.prototype, "has", function has(e) { return t(ln, this, e) }) } } g(S, qr); de(S.Map); de(S.Set) } var pn = function throwUnlessTargetIsObject(e) { if (!ee.TypeIsObject(e)) { throw new TypeError("target must be an object") } }; var vn = { apply: function apply() { return ee.Call(ee.Call, null, arguments) }, construct: function construct(e, t) { if (!ee.IsConstructor(e)) { throw new TypeError("First argument must be a constructor.") } var r = arguments.length > 2 ? arguments[2] : e; if (!ee.IsConstructor(r)) { throw new TypeError("new.target must be a constructor.") } return ee.Construct(e, t, r, "internal") }, deleteProperty: function deleteProperty(e, t) { pn(e); if (s) { var r = Object.getOwnPropertyDescriptor(e, t); if (r && !r.configurable) { return false } } return delete e[t] }, enumerate: function enumerate(e) { pn(e); return new $e(e, "key") }, has: function has(e, t) { pn(e); return t in e } }; if (Object.getOwnPropertyNames) { Object.assign(vn, { ownKeys: function ownKeys(e) { pn(e); var t = Object.getOwnPropertyNames(e); if (ee.IsCallable(Object.getOwnPropertySymbols)) { x(t, Object.getOwnPropertySymbols(e)) } return t } }) } var yn = function ConvertExceptionToBoolean(e) { return !i(e) }; if (Object.preventExtensions) { Object.assign(vn, { isExtensible: function isExtensible(e) { pn(e); return Object.isExtensible(e) }, preventExtensions: function preventExtensions(e) { pn(e); return yn(function () { Object.preventExtensions(e) }) } }) } if (s) { var hn = function get(e, t, r) { var n = Object.getOwnPropertyDescriptor(e, t); if (!n) { var o = Object.getPrototypeOf(e); if (o === null) { return void 0 } return hn(o, t, r) } if ("value" in n) { return n.value } if (n.get) { return ee.Call(n.get, r) } return void 0 }; var gn = function set(e, r, n, o) { var i = Object.getOwnPropertyDescriptor(e, r); if (!i) { var a = Object.getPrototypeOf(e); if (a !== null) { return gn(a, r, n, o) } i = { value: void 0, writable: true, enumerable: true, configurable: true } } if ("value" in i) { if (!i.writable) { return false } if (!ee.TypeIsObject(o)) { return false } var u = Object.getOwnPropertyDescriptor(o, r); if (u) { return Q.defineProperty(o, r, { value: n }) } else { return Q.defineProperty(o, r, { value: n, writable: true, enumerable: true, configurable: true }) } } if (i.set) { t(i.set, o, n); return true } return false }; Object.assign(vn, { defineProperty: function defineProperty(e, t, r) { pn(e); return yn(function () { Object.defineProperty(e, t, r) }) }, getOwnPropertyDescriptor: function getOwnPropertyDescriptor(e, t) { pn(e); return Object.getOwnPropertyDescriptor(e, t) }, get: function get(e, t) { pn(e); var r = arguments.length > 2 ? arguments[2] : e; return hn(e, t, r) }, set: function set(e, t, r) { pn(e); var n = arguments.length > 3 ? arguments[3] : e; return gn(e, t, r, n) } }) } if (Object.getPrototypeOf) { var bn = Object.getPrototypeOf; vn.getPrototypeOf = function getPrototypeOf(e) { pn(e); return bn(e) } } if (Object.setPrototypeOf && vn.getPrototypeOf) { var dn = function (e, t) { var r = t; while (r) { if (e === r) { return true } r = vn.getPrototypeOf(r) } return false }; Object.assign(vn, { setPrototypeOf: function setPrototypeOf(e, t) { pn(e); if (t !== null && !ee.TypeIsObject(t)) { throw new TypeError("proto must be an object or null") } if (t === Q.getPrototypeOf(e)) { return true } if (Q.isExtensible && !Q.isExtensible(e)) { return false } if (dn(e, t)) { return false } Object.setPrototypeOf(e, t); return true } }) } var mn = function (e, t) { if (!ee.IsCallable(S.Reflect[e])) { h(S.Reflect, e, t) } else { var r = a(function () { S.Reflect[e](1); S.Reflect[e](NaN); S.Reflect[e](true); return true }); if (r) { U(S.Reflect, e, t) } } }; Object.keys(vn).forEach(function (e) { mn(e, vn[e]) }); if (c && S.Reflect.getPrototypeOf.name !== "getPrototypeOf") { var On = S.Reflect.getPrototypeOf; U(S.Reflect, "getPrototypeOf", function getPrototypeOf(e) { return t(On, S.Reflect, e) }) } if (S.Reflect.setPrototypeOf) { if (a(function () { S.Reflect.setPrototypeOf(1, {}); return true })) { U(S.Reflect, "setPrototypeOf", vn.setPrototypeOf) } } if (S.Reflect.defineProperty) { if (!a(function () { var e = !S.Reflect.defineProperty(1, "test", { value: 1 }); var t = typeof Object.preventExtensions !== "function" || !S.Reflect.defineProperty(Object.preventExtensions({}), "test", {}); return e && t })) { U(S.Reflect, "defineProperty", vn.defineProperty) } } if (S.Reflect.construct) { if (!a(function () { var e = function F() { }; return S.Reflect.construct(function () { }, [], e) instanceof e })) { U(S.Reflect, "construct", vn.construct) } } if (String(new Date(NaN)) !== "Invalid Date") { var wn = Date.prototype.toString; var jn = function toString() { var e = +this; if (e !== e) { return "Invalid Date" } return ee.Call(wn, this) }; U(Date.prototype, "toString", jn) } var Sn = { anchor: function anchor(e) { return ee.CreateHTML(this, "a", "name", e) }, big: function big() { return ee.CreateHTML(this, "big", "", "") }, blink: function blink() { return ee.CreateHTML(this, "blink", "", "") }, bold: function bold() { return ee.CreateHTML(this, "b", "", "") }, fixed: function fixed() { return ee.CreateHTML(this, "tt", "", "") }, fontcolor: function fontcolor(e) { return ee.CreateHTML(this, "font", "color", e) }, fontsize: function fontsize(e) { return ee.CreateHTML(this, "font", "size", e) }, italics: function italics() { return ee.CreateHTML(this, "i", "", "") }, link: function link(e) { return ee.CreateHTML(this, "a", "href", e) }, small: function small() { return ee.CreateHTML(this, "small", "", "") }, strike: function strike() { return ee.CreateHTML(this, "strike", "", "") }, sub: function sub() { return ee.CreateHTML(this, "sub", "", "") }, sup: function sub() { return ee.CreateHTML(this, "sup", "", "") } }; l(Object.keys(Sn), function (e) { var r = String.prototype[e]; var n = false; if (ee.IsCallable(r)) { var o = t(r, "", ' " '); var i = E([], o.match(/"/g)).length; n = o !== o.toLowerCase() || i > 2 } else { n = true } if (n) { U(String.prototype, e, Sn[e]) } }); var Tn = function () { if (!X) { return false } var e = typeof JSON === "object" && typeof JSON.stringify === "function" ? JSON.stringify : null; if (!e) { return false } if (typeof e(W()) !== "undefined") { return true } if (e([W()]) !== "[null]") { return true } var t = { a: W() }; t[W()] = true; if (e(t) !== "{}") { return true } return false }(); var In = a(function () { if (!X) { return true } return JSON.stringify(Object(W())) === "{}" && JSON.stringify([Object(W())]) === "[{}]" }); if (Tn || !In) { var En = JSON.stringify; U(JSON, "stringify", function stringify(e) { if (typeof e === "symbol") { return } var n; if (arguments.length > 1) { n = arguments[1] } var o = [e]; if (!r(n)) { var i = ee.IsCallable(n) ? n : null; var a = function (e, r) { var n = i ? t(i, this, e, r) : r; if (typeof n !== "symbol") { if (K.symbol(n)) { return Tt({})(n) } else { return n } } }; o.push(a) } else { o.push(n) } if (arguments.length > 2) { o.push(arguments[2]) } return En.apply(this, o) }) } return S
117});
118//# sourceMappingURL=es6-shim.map
119/*!
120 * https://github.com/paulmillr/es6-shim
121 * @license es6-shim Copyright 2013-2016 by Paul Miller (http://paulmillr.com)
122 * and contributors, MIT License
123 * es6-sham: v0.34.2
124 * see https://github.com/paulmillr/es6-shim/blob/0.34.2/LICENSE
125 * Details and documentation:
126 * https://github.com/paulmillr/es6-shim/
127 */
128(function (t, e) { if (typeof define === "function" && define.amd) { define(e) } else if (typeof exports === "object") { module.exports = e() } else { t.returnExports = e() } })(this, function () { "use strict"; var t = new Function("return this;"); var e = t(); var r = e.Object; (function () { if (r.setPrototypeOf) { return } var t = r.getOwnPropertyNames; var e = r.getOwnPropertyDescriptor; var n = r.create; var o = r.defineProperty; var f = r.getPrototypeOf; var i = r.prototype; var u = function (r, n) { t(n).forEach(function (t) { o(r, t, e(n, t)) }); return r }; var c = function (t, e) { return u(n(e), t) }; var a, _; try { a = e(i, "__proto__").set; a.call({}, null); _ = function (t, e) { a.call(t, e); return t } } catch (p) { a = { __proto__: null }; if (a instanceof r) { _ = c } else { a.__proto__ = i; if (a instanceof r) { _ = function (t, e) { t.__proto__ = e; return t } } else { _ = function (t, e) { if (f(t)) { t.__proto__ = e; return t } else { return c(t, e) } } } } } r.setPrototypeOf = _ })() });
129//# sourceMappingURL=es6-sham.map
130/*!
131 * ASP.NET SignalR JavaScript Library v2.2.1
132 * http://signalr.net/
133 *
134 * Copyright (c) .NET Foundation. All rights reserved.
135 * Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
136 *
137 */
138(function(n,t,i){function w(t,i){var u,f;if(n.isArray(t)){for(u=t.length-1;u>=0;u--)f=t[u],n.type(f)==="string"&&r.transports[f]||(i.log("Invalid transport: "+f+", removing it from the transports list."),t.splice(u,1));t.length===0&&(i.log("No transports remain within the specified transport array."),t=null)}else if(r.transports[t]||t==="auto"){if(t==="auto"&&r._.ieVersion<=8)return["longPolling"]}else i.log("Invalid transport: "+t.toString()+"."),t=null;return t}function b(n){return n==="http:"?80:n==="https:"?443:void 0}function a(n,t){return t.match(/:\d+$/)?t:t+":"+b(n)}function k(t,i){var u=this,r=[];u.tryBuffer=function(i){return t.state===n.signalR.connectionState.connecting?(r.push(i),!0):!1};u.drain=function(){if(t.state===n.signalR.connectionState.connected)while(r.length>0)i(r.shift())};u.clear=function(){r=[]}}var f={nojQuery:"jQuery was not found. Please ensure jQuery is referenced before the SignalR client JavaScript file.",noTransportOnInit:"No transport could be initialized successfully. Try specifying a different transport or none at all for auto initialization.",errorOnNegotiate:"Error during negotiation request.",stoppedWhileLoading:"The connection was stopped during page load.",stoppedWhileNegotiating:"The connection was stopped during the negotiate request.",errorParsingNegotiateResponse:"Error parsing negotiate response.",errorDuringStartRequest:"Error during start request. Stopping the connection.",stoppedDuringStartRequest:"The connection was stopped during the start request.",errorParsingStartResponse:"Error parsing start response: '{0}'. Stopping the connection.",invalidStartResponse:"Invalid start response: '{0}'. Stopping the connection.",protocolIncompatible:"You are using a version of the client that isn't compatible with the server. Client version {0}, server version {1}.",sendFailed:"Send failed.",parseFailed:"Failed at parsing response: {0}",longPollFailed:"Long polling request failed.",eventSourceFailedToConnect:"EventSource failed to connect.",eventSourceError:"Error raised by EventSource",webSocketClosed:"WebSocket closed.",pingServerFailedInvalidResponse:"Invalid ping response when pinging server: '{0}'.",pingServerFailed:"Failed to ping server.",pingServerFailedStatusCode:"Failed to ping server. Server responded with status code {0}, stopping the connection.",pingServerFailedParse:"Failed to parse ping server response, stopping the connection.",noConnectionTransport:"Connection is in an invalid state, there is no transport active.",webSocketsInvalidState:"The Web Socket transport is in an invalid state, transitioning into reconnecting.",reconnectTimeout:"Couldn't reconnect within the configured timeout of {0} ms, disconnecting.",reconnectWindowTimeout:"The client has been inactive since {0} and it has exceeded the inactivity timeout of {1} ms. Stopping the connection."};if(typeof n!="function")throw new Error(f.nojQuery);var r,h,o=t.document.readyState==="complete",e=n(t),c="__Negotiate Aborted__",u={onStart:"onStart",onStarting:"onStarting",onReceived:"onReceived",onError:"onError",onConnectionSlow:"onConnectionSlow",onReconnecting:"onReconnecting",onReconnect:"onReconnect",onStateChanged:"onStateChanged",onDisconnect:"onDisconnect"},v=function(n,i){if(i!==!1){var r;typeof t.console!="undefined"&&(r="["+(new Date).toTimeString()+"] SignalR: "+n,t.console.debug?t.console.debug(r):t.console.log&&t.console.log(r))}},s=function(t,i,r){return i===t.state?(t.state=r,n(t).triggerHandler(u.onStateChanged,[{oldState:i,newState:r}]),!0):!1},y=function(n){return n.state===r.connectionState.disconnected},l=function(n){return n._.keepAliveData.activated&&n.transport.supportsKeepAlive(n)},p=function(i){var f,e;i._.configuredStopReconnectingTimeout||(e=function(t){var i=r._.format(r.resources.reconnectTimeout,t.disconnectTimeout);t.log(i);n(t).triggerHandler(u.onError,[r._.error(i,"TimeoutException")]);t.stop(!1,!1)},i.reconnecting(function(){var n=this;n.state===r.connectionState.reconnecting&&(f=t.setTimeout(function(){e(n)},n.disconnectTimeout))}),i.stateChanged(function(n){n.oldState===r.connectionState.reconnecting&&t.clearTimeout(f)}),i._.configuredStopReconnectingTimeout=!0)};if(r=function(n,t,i){return new r.fn.init(n,t,i)},r._={defaultContentType:"application/x-www-form-urlencoded; charset=UTF-8",ieVersion:function(){var i,n;return t.navigator.appName==="Microsoft Internet Explorer"&&(n=/MSIE ([0-9]+\.[0-9]+)/.exec(t.navigator.userAgent),n&&(i=t.parseFloat(n[1]))),i}(),error:function(n,t,i){var r=new Error(n);return r.source=t,typeof i!="undefined"&&(r.context=i),r},transportError:function(n,t,r,u){var f=this.error(n,r,u);return f.transport=t?t.name:i,f},format:function(){for(var t=arguments[0],n=0;n<arguments.length-1;n++)t=t.replace("{"+n+"}",arguments[n+1]);return t},firefoxMajorVersion:function(n){var t=n.match(/Firefox\/(\d+)/);return!t||!t.length||t.length<2?0:parseInt(t[1],10)},configurePingInterval:function(i){var f=i._.config,e=function(t){n(i).triggerHandler(u.onError,[t])};f&&!i._.pingIntervalId&&f.pingInterval&&(i._.pingIntervalId=t.setInterval(function(){r.transports._logic.pingServer(i).fail(e)},f.pingInterval))}},r.events=u,r.resources=f,r.ajaxDefaults={processData:!0,timeout:null,async:!0,global:!1,cache:!1},r.changeState=s,r.isDisconnecting=y,r.connectionState={connecting:0,connected:1,reconnecting:2,disconnected:4},r.hub={start:function(){throw new Error("SignalR: Error loading hubs. Ensure your hubs reference is correct, e.g. <script src='/signalr/js'><\/script>.");}},typeof e.on=="function")e.on("load",function(){o=!0});else e.load(function(){o=!0});r.fn=r.prototype={init:function(t,i,r){var f=n(this);this.url=t;this.qs=i;this.lastError=null;this._={keepAliveData:{},connectingMessageBuffer:new k(this,function(n){f.triggerHandler(u.onReceived,[n])}),lastMessageAt:(new Date).getTime(),lastActiveAt:(new Date).getTime(),beatInterval:5e3,beatHandle:null,totalTransportConnectTimeout:0};typeof r=="boolean"&&(this.logging=r)},_parseResponse:function(n){var t=this;return n?typeof n=="string"?t.json.parse(n):n:n},_originalJson:t.JSON,json:t.JSON,isCrossDomain:function(i,r){var u;return(i=n.trim(i),r=r||t.location,i.indexOf("http")!==0)?!1:(u=t.document.createElement("a"),u.href=i,u.protocol+a(u.protocol,u.host)!==r.protocol+a(r.protocol,r.host))},ajaxDataType:"text",contentType:"application/json; charset=UTF-8",logging:!1,state:r.connectionState.disconnected,clientProtocol:"1.5",reconnectDelay:2e3,transportConnectTimeout:0,disconnectTimeout:3e4,reconnectWindow:3e4,keepAliveWarnAt:2/3,start:function(i,h){var a=this,v={pingInterval:3e5,waitForPageLoad:!0,transport:"auto",jsonp:!1},d,y=a._deferral||n.Deferred(),b=t.document.createElement("a"),k,g;if(a.lastError=null,a._deferral=y,!a.json)throw new Error("SignalR: No JSON parser found. Please ensure json2.js is referenced before the SignalR.js file if you need to support clients without native JSON parsing support, e.g. IE<8.");if(n.type(i)==="function"?h=i:n.type(i)==="object"&&(n.extend(v,i),n.type(v.callback)==="function"&&(h=v.callback)),v.transport=w(v.transport,a),!v.transport)throw new Error("SignalR: Invalid transport(s) specified, aborting start.");return(a._.config=v,!o&&v.waitForPageLoad===!0)?(a._.deferredStartHandler=function(){a.start(i,h)},e.bind("load",a._.deferredStartHandler),y.promise()):a.state===r.connectionState.connecting?y.promise():s(a,r.connectionState.disconnected,r.connectionState.connecting)===!1?(y.resolve(a),y.promise()):(p(a),b.href=a.url,b.protocol&&b.protocol!==":"?(a.protocol=b.protocol,a.host=b.host):(a.protocol=t.document.location.protocol,a.host=b.host||t.document.location.host),a.baseUrl=a.protocol+"//"+a.host,a.wsProtocol=a.protocol==="https:"?"wss://":"ws://",v.transport==="auto"&&v.jsonp===!0&&(v.transport="longPolling"),a.url.indexOf("//")===0&&(a.url=t.location.protocol+a.url,a.log("Protocol relative URL detected, normalizing it to '"+a.url+"'.")),this.isCrossDomain(a.url)&&(a.log("Auto detected cross domain url."),v.transport==="auto"&&(v.transport=["webSockets","serverSentEvents","longPolling"]),typeof v.withCredentials=="undefined"&&(v.withCredentials=!0),v.jsonp||(v.jsonp=!n.support.cors,v.jsonp&&a.log("Using jsonp because this browser doesn't support CORS.")),a.contentType=r._.defaultContentType),a.withCredentials=v.withCredentials,a.ajaxDataType=v.jsonp?"jsonp":"text",n(a).bind(u.onStart,function(){n.type(h)==="function"&&h.call(a);y.resolve(a)}),a._.initHandler=r.transports._logic.initHandler(a),d=function(i,o){var c=r._.error(f.noTransportOnInit);if(o=o||0,o>=i.length){o===0?a.log("No transports supported by the server were selected."):o===1?a.log("No fallback transports were selected."):a.log("Fallback transports exhausted.");n(a).triggerHandler(u.onError,[c]);y.reject(c);a.stop();return}if(a.state!==r.connectionState.disconnected){var p=i[o],h=r.transports[p],v=function(){d(i,o+1)};a.transport=h;try{a._.initHandler.start(h,function(){var i=r._.firefoxMajorVersion(t.navigator.userAgent)>=11,f=!!a.withCredentials&&i;a.log("The start request succeeded. Transitioning to the connected state.");l(a)&&r.transports._logic.monitorKeepAlive(a);r.transports._logic.startHeartbeat(a);r._.configurePingInterval(a);s(a,r.connectionState.connecting,r.connectionState.connected)||a.log("WARNING! The connection was not in the connecting state.");a._.connectingMessageBuffer.drain();n(a).triggerHandler(u.onStart);e.bind("unload",function(){a.log("Window unloading, stopping the connection.");a.stop(f)});i&&e.bind("beforeunload",function(){t.setTimeout(function(){a.stop(f)},0)})},v)}catch(w){a.log(h.name+" transport threw '"+w.message+"' when attempting to start.");v()}}},k=a.url+"/negotiate",g=function(t,i){var e=r._.error(f.errorOnNegotiate,t,i._.negotiateRequest);n(i).triggerHandler(u.onError,e);y.reject(e);i.stop()},n(a).triggerHandler(u.onStarting),k=r.transports._logic.prepareQueryString(a,k),a.log("Negotiating with '"+k+"'."),a._.negotiateRequest=r.transports._logic.ajax(a,{url:k,error:function(n,t){t!==c?g(n,a):y.reject(r._.error(f.stoppedWhileNegotiating,null,a._.negotiateRequest))},success:function(t){var i,e,h,o=[],s=[];try{i=a._parseResponse(t)}catch(c){g(r._.error(f.errorParsingNegotiateResponse,c),a);return}if(e=a._.keepAliveData,a.appRelativeUrl=i.Url,a.id=i.ConnectionId,a.token=i.ConnectionToken,a.webSocketServerUrl=i.WebSocketServerUrl,a._.pollTimeout=i.ConnectionTimeout*1e3+1e4,a.disconnectTimeout=i.DisconnectTimeout*1e3,a._.totalTransportConnectTimeout=a.transportConnectTimeout+i.TransportConnectTimeout*1e3,i.KeepAliveTimeout?(e.activated=!0,e.timeout=i.KeepAliveTimeout*1e3,e.timeoutWarning=e.timeout*a.keepAliveWarnAt,a._.beatInterval=(e.timeout-e.timeoutWarning)/3):e.activated=!1,a.reconnectWindow=a.disconnectTimeout+(e.timeout||0),!i.ProtocolVersion||i.ProtocolVersion!==a.clientProtocol){h=r._.error(r._.format(f.protocolIncompatible,a.clientProtocol,i.ProtocolVersion));n(a).triggerHandler(u.onError,[h]);y.reject(h);return}n.each(r.transports,function(n){if(n.indexOf("_")===0||n==="webSockets"&&!i.TryWebSockets)return!0;s.push(n)});n.isArray(v.transport)?n.each(v.transport,function(t,i){n.inArray(i,s)>=0&&o.push(i)}):v.transport==="auto"?o=s:n.inArray(v.transport,s)>=0&&o.push(v.transport);d(o)}}),y.promise())},starting:function(t){var i=this;return n(i).bind(u.onStarting,function(){t.call(i)}),i},send:function(n){var t=this;if(t.state===r.connectionState.disconnected)throw new Error("SignalR: Connection must be started before data can be sent. Call .start() before .send()");if(t.state===r.connectionState.connecting)throw new Error("SignalR: Connection has not been fully initialized. Use .start().done() or .start().fail() to run logic after the connection has started.");return t.transport.send(t,n),t},received:function(t){var i=this;return n(i).bind(u.onReceived,function(n,r){t.call(i,r)}),i},stateChanged:function(t){var i=this;return n(i).bind(u.onStateChanged,function(n,r){t.call(i,r)}),i},error:function(t){var i=this;return n(i).bind(u.onError,function(n,r,u){i.lastError=r;t.call(i,r,u)}),i},disconnected:function(t){var i=this;return n(i).bind(u.onDisconnect,function(){t.call(i)}),i},connectionSlow:function(t){var i=this;return n(i).bind(u.onConnectionSlow,function(){t.call(i)}),i},reconnecting:function(t){var i=this;return n(i).bind(u.onReconnecting,function(){t.call(i)}),i},reconnected:function(t){var i=this;return n(i).bind(u.onReconnect,function(){t.call(i)}),i},stop:function(i,h){var a=this,v=a._deferral;if(a._.deferredStartHandler&&e.unbind("load",a._.deferredStartHandler),delete a._.config,delete a._.deferredStartHandler,!o&&(!a._.config||a._.config.waitForPageLoad===!0)){a.log("Stopping connection prior to negotiate.");v&&v.reject(r._.error(f.stoppedWhileLoading));return}if(a.state!==r.connectionState.disconnected)return a.log("Stopping connection."),t.clearTimeout(a._.beatHandle),t.clearInterval(a._.pingIntervalId),a.transport&&(a.transport.stop(a),h!==!1&&a.transport.abort(a,i),l(a)&&r.transports._logic.stopMonitoringKeepAlive(a),a.transport=null),a._.negotiateRequest&&(a._.negotiateRequest.abort(c),delete a._.negotiateRequest),a._.initHandler&&a._.initHandler.stop(),delete a._deferral,delete a.messageId,delete a.groupsToken,delete a.id,delete a._.pingIntervalId,delete a._.lastMessageAt,delete a._.lastActiveAt,a._.connectingMessageBuffer.clear(),s(a,a.state,r.connectionState.disconnected),n(a).triggerHandler(u.onDisconnect),a},log:function(n){v(n,this.logging)}};r.fn.init.prototype=r.fn;r.noConflict=function(){return n.connection===r&&(n.connection=h),r};n.connection&&(h=n.connection);n.connection=n.signalR=r})(window.jQuery,window),function(n,t,i){function s(n){n._.keepAliveData.monitoring&&l(n);u.markActive(n)&&(n._.beatHandle=t.setTimeout(function(){s(n)},n._.beatInterval))}function l(t){var i=t._.keepAliveData,u;t.state===r.connectionState.connected&&(u=(new Date).getTime()-t._.lastMessageAt,u>=i.timeout?(t.log("Keep alive timed out. Notifying transport that connection has been lost."),t.transport.lostConnection(t)):u>=i.timeoutWarning?i.userNotified||(t.log("Keep alive has been missed, connection may be dead/slow."),n(t).triggerHandler(f.onConnectionSlow),i.userNotified=!0):i.userNotified=!1)}function e(n,t){var i=n.url+t;return n.transport&&(i+="?transport="+n.transport.name),u.prepareQueryString(n,i)}function h(n){this.connection=n;this.startRequested=!1;this.startCompleted=!1;this.connectionStopped=!1}var r=n.signalR,f=n.signalR.events,c=n.signalR.changeState,o="__Start Aborted__",u;r.transports={};h.prototype={start:function(n,r,u){var f=this,e=f.connection,o=!1;if(f.startRequested||f.connectionStopped){e.log("WARNING! "+n.name+" transport cannot be started. Initialization ongoing or completed.");return}e.log(n.name+" transport starting.");n.start(e,function(){o||f.initReceived(n,r)},function(t){return o||(o=!0,f.transportFailed(n,t,u)),!f.startCompleted||f.connectionStopped});f.transportTimeoutHandle=t.setTimeout(function(){o||(o=!0,e.log(n.name+" transport timed out when trying to connect."),f.transportFailed(n,i,u))},e._.totalTransportConnectTimeout)},stop:function(){this.connectionStopped=!0;t.clearTimeout(this.transportTimeoutHandle);r.transports._logic.tryAbortStartRequest(this.connection)},initReceived:function(n,i){var u=this,f=u.connection;if(u.startRequested){f.log("WARNING! The client received multiple init messages.");return}u.connectionStopped||(u.startRequested=!0,t.clearTimeout(u.transportTimeoutHandle),f.log(n.name+" transport connected. Initiating start request."),r.transports._logic.ajaxStart(f,function(){u.startCompleted=!0;i()}))},transportFailed:function(i,u,e){var o=this.connection,h=o._deferral,s;this.connectionStopped||(t.clearTimeout(this.transportTimeoutHandle),this.startRequested?this.startCompleted||(s=r._.error(r.resources.errorDuringStartRequest,u),o.log(i.name+" transport failed during the start request. Stopping the connection."),n(o).triggerHandler(f.onError,[s]),h&&h.reject(s),o.stop()):(i.stop(o),o.log(i.name+" transport failed to connect. Attempting to fall back."),e()))}};u=r.transports._logic={ajax:function(t,i){return n.ajax(n.extend(!0,{},n.signalR.ajaxDefaults,{type:"GET",data:{},xhrFields:{withCredentials:t.withCredentials},contentType:t.contentType,dataType:t.ajaxDataType},i))},pingServer:function(t){var e,f,i=n.Deferred();return t.transport?(e=t.url+"/ping",e=u.addQs(e,t.qs),f=u.ajax(t,{url:e,success:function(n){var u;try{u=t._parseResponse(n)}catch(e){i.reject(r._.transportError(r.resources.pingServerFailedParse,t.transport,e,f));t.stop();return}u.Response==="pong"?i.resolve():i.reject(r._.transportError(r._.format(r.resources.pingServerFailedInvalidResponse,n),t.transport,null,f))},error:function(n){n.status===401||n.status===403?(i.reject(r._.transportError(r._.format(r.resources.pingServerFailedStatusCode,n.status),t.transport,n,f)),t.stop()):i.reject(r._.transportError(r.resources.pingServerFailed,t.transport,n,f))}})):i.reject(r._.transportError(r.resources.noConnectionTransport,t.transport)),i.promise()},prepareQueryString:function(n,i){var r;return r=u.addQs(i,"clientProtocol="+n.clientProtocol),r=u.addQs(r,n.qs),n.token&&(r+="&connectionToken="+t.encodeURIComponent(n.token)),n.data&&(r+="&connectionData="+t.encodeURIComponent(n.data)),r},addQs:function(t,i){var r=t.indexOf("?")!==-1?"&":"?",u;if(!i)return t;if(typeof i=="object")return t+r+n.param(i);if(typeof i=="string")return u=i.charAt(0),(u==="?"||u==="&")&&(r=""),t+r+i;throw new Error("Query string property must be either a string or object.");},getUrl:function(n,i,r,f,e){var h=i==="webSockets"?"":n.baseUrl,o=h+n.appRelativeUrl,s="transport="+i;return!e&&n.groupsToken&&(s+="&groupsToken="+t.encodeURIComponent(n.groupsToken)),r?(o+=f?"/poll":"/reconnect",!e&&n.messageId&&(s+="&messageId="+t.encodeURIComponent(n.messageId))):o+="/connect",o+="?"+s,o=u.prepareQueryString(n,o),e||(o+="&tid="+Math.floor(Math.random()*11)),o},maximizePersistentResponse:function(n){return{MessageId:n.C,Messages:n.M,Initialized:typeof n.S!="undefined"?!0:!1,ShouldReconnect:typeof n.T!="undefined"?!0:!1,LongPollDelay:n.L,GroupsToken:n.G}},updateGroups:function(n,t){t&&(n.groupsToken=t)},stringifySend:function(n,t){return typeof t=="string"||typeof t=="undefined"||t===null?t:n.json.stringify(t)},ajaxSend:function(t,i){var h=u.stringifySend(t,i),c=e(t,"/send"),o,s=function(t,u){n(u).triggerHandler(f.onError,[r._.transportError(r.resources.sendFailed,u.transport,t,o),i])};return o=u.ajax(t,{url:c,type:t.ajaxDataType==="jsonp"?"GET":"POST",contentType:r._.defaultContentType,data:{data:h},success:function(n){var i;if(n){try{i=t._parseResponse(n)}catch(r){s(r,t);t.stop();return}u.triggerReceived(t,i)}},error:function(n,i){i!=="abort"&&i!=="parsererror"&&s(n,t)}})},ajaxAbort:function(n,t){if(typeof n.transport!="undefined"){t=typeof t=="undefined"?!0:t;var i=e(n,"/abort");u.ajax(n,{url:i,async:t,timeout:1e3,type:"POST"});n.log("Fired ajax abort async = "+t+".")}},ajaxStart:function(t,i){var h=function(n){var i=t._deferral;i&&i.reject(n)},s=function(i){t.log("The start request failed. Stopping the connection.");n(t).triggerHandler(f.onError,[i]);h(i);t.stop()};t._.startRequest=u.ajax(t,{url:e(t,"/start"),success:function(n,u,f){var e;try{e=t._parseResponse(n)}catch(o){s(r._.error(r._.format(r.resources.errorParsingStartResponse,n),o,f));return}e.Response==="started"?i():s(r._.error(r._.format(r.resources.invalidStartResponse,n),null,f))},error:function(n,i,u){i!==o?s(r._.error(r.resources.errorDuringStartRequest,u,n)):(t.log("The start request aborted because connection.stop() was called."),h(r._.error(r.resources.stoppedDuringStartRequest,null,n)))}})},tryAbortStartRequest:function(n){n._.startRequest&&(n._.startRequest.abort(o),delete n._.startRequest)},tryInitialize:function(n,t,i){t.Initialized&&i?i():t.Initialized&&n.log("WARNING! The client received an init message after reconnecting.")},triggerReceived:function(t,i){t._.connectingMessageBuffer.tryBuffer(i)||n(t).triggerHandler(f.onReceived,[i])},processMessages:function(t,i,r){var f;u.markLastMessage(t);i&&(f=u.maximizePersistentResponse(i),u.updateGroups(t,f.GroupsToken),f.MessageId&&(t.messageId=f.MessageId),f.Messages&&(n.each(f.Messages,function(n,i){u.triggerReceived(t,i)}),u.tryInitialize(t,f,r)))},monitorKeepAlive:function(t){var i=t._.keepAliveData;i.monitoring?t.log("Tried to monitor keep alive but it's already being monitored."):(i.monitoring=!0,u.markLastMessage(t),t._.keepAliveData.reconnectKeepAliveUpdate=function(){u.markLastMessage(t)},n(t).bind(f.onReconnect,t._.keepAliveData.reconnectKeepAliveUpdate),t.log("Now monitoring keep alive with a warning timeout of "+i.timeoutWarning+", keep alive timeout of "+i.timeout+" and disconnecting timeout of "+t.disconnectTimeout))},stopMonitoringKeepAlive:function(t){var i=t._.keepAliveData;i.monitoring&&(i.monitoring=!1,n(t).unbind(f.onReconnect,t._.keepAliveData.reconnectKeepAliveUpdate),t._.keepAliveData={},t.log("Stopping the monitoring of the keep alive."))},startHeartbeat:function(n){n._.lastActiveAt=(new Date).getTime();s(n)},markLastMessage:function(n){n._.lastMessageAt=(new Date).getTime()},markActive:function(n){return u.verifyLastActive(n)?(n._.lastActiveAt=(new Date).getTime(),!0):!1},isConnectedOrReconnecting:function(n){return n.state===r.connectionState.connected||n.state===r.connectionState.reconnecting},ensureReconnectingState:function(t){return c(t,r.connectionState.connected,r.connectionState.reconnecting)===!0&&n(t).triggerHandler(f.onReconnecting),t.state===r.connectionState.reconnecting},clearReconnectTimeout:function(n){n&&n._.reconnectTimeout&&(t.clearTimeout(n._.reconnectTimeout),delete n._.reconnectTimeout)},verifyLastActive:function(t){if((new Date).getTime()-t._.lastActiveAt>=t.reconnectWindow){var i=r._.format(r.resources.reconnectWindowTimeout,new Date(t._.lastActiveAt),t.reconnectWindow);return t.log(i),n(t).triggerHandler(f.onError,[r._.error(i,"TimeoutException")]),t.stop(!1,!1),!1}return!0},reconnect:function(n,i){var f=r.transports[i];if(u.isConnectedOrReconnecting(n)&&!n._.reconnectTimeout){if(!u.verifyLastActive(n))return;n._.reconnectTimeout=t.setTimeout(function(){u.verifyLastActive(n)&&(f.stop(n),u.ensureReconnectingState(n)&&(n.log(i+" reconnecting."),f.start(n)))},n.reconnectDelay)}},handleParseFailure:function(t,i,u,e,o){var s=r._.transportError(r._.format(r.resources.parseFailed,i),t.transport,u,o);e&&e(s)?t.log("Failed to parse server response while attempting to connect."):(n(t).triggerHandler(f.onError,[s]),t.stop())},initHandler:function(n){return new h(n)},foreverFrame:{count:0,connections:{}}}}(window.jQuery,window),function(n,t){var r=n.signalR,u=n.signalR.events,f=n.signalR.changeState,i=r.transports._logic;r.transports.webSockets={name:"webSockets",supportsKeepAlive:function(){return!0},send:function(t,f){var e=i.stringifySend(t,f);try{t.socket.send(e)}catch(o){n(t).triggerHandler(u.onError,[r._.transportError(r.resources.webSocketsInvalidState,t.transport,o,t.socket),f])}},start:function(e,o,s){var h,c=!1,l=this,a=!o,v=n(e);if(!t.WebSocket){s();return}e.socket||(h=e.webSocketServerUrl?e.webSocketServerUrl:e.wsProtocol+e.host,h+=i.getUrl(e,this.name,a),e.log("Connecting to websocket endpoint '"+h+"'."),e.socket=new t.WebSocket(h),e.socket.onopen=function(){c=!0;e.log("Websocket opened.");i.clearReconnectTimeout(e);f(e,r.connectionState.reconnecting,r.connectionState.connected)===!0&&v.triggerHandler(u.onReconnect)},e.socket.onclose=function(t){var i;this===e.socket&&(c&&typeof t.wasClean!="undefined"&&t.wasClean===!1?(i=r._.transportError(r.resources.webSocketClosed,e.transport,t),e.log("Unclean disconnect from websocket: "+(t.reason||"[no reason given]."))):e.log("Websocket closed."),s&&s(i)||(i&&n(e).triggerHandler(u.onError,[i]),l.reconnect(e)))},e.socket.onmessage=function(t){var r;try{r=e._parseResponse(t.data)}catch(u){i.handleParseFailure(e,t.data,u,s,t);return}r&&(n.isEmptyObject(r)||r.M?i.processMessages(e,r,o):i.triggerReceived(e,r))})},reconnect:function(n){i.reconnect(n,this.name)},lostConnection:function(n){this.reconnect(n)},stop:function(n){i.clearReconnectTimeout(n);n.socket&&(n.log("Closing the Websocket."),n.socket.close(),n.socket=null)},abort:function(n,t){i.ajaxAbort(n,t)}}}(window.jQuery,window),function(n,t){var i=n.signalR,u=n.signalR.events,e=n.signalR.changeState,r=i.transports._logic,f=function(n){t.clearTimeout(n._.reconnectAttemptTimeoutHandle);delete n._.reconnectAttemptTimeoutHandle};i.transports.serverSentEvents={name:"serverSentEvents",supportsKeepAlive:function(){return!0},timeOut:3e3,start:function(o,s,h){var c=this,l=!1,a=n(o),v=!s,y;if(o.eventSource&&(o.log("The connection already has an event source. Stopping it."),o.stop()),!t.EventSource){h&&(o.log("This browser doesn't support SSE."),h());return}y=r.getUrl(o,this.name,v);try{o.log("Attempting to connect to SSE endpoint '"+y+"'.");o.eventSource=new t.EventSource(y,{withCredentials:o.withCredentials})}catch(p){o.log("EventSource failed trying to connect with error "+p.Message+".");h?h():(a.triggerHandler(u.onError,[i._.transportError(i.resources.eventSourceFailedToConnect,o.transport,p)]),v&&c.reconnect(o));return}v&&(o._.reconnectAttemptTimeoutHandle=t.setTimeout(function(){l===!1&&o.eventSource.readyState!==t.EventSource.OPEN&&c.reconnect(o)},c.timeOut));o.eventSource.addEventListener("open",function(){o.log("EventSource connected.");f(o);r.clearReconnectTimeout(o);l===!1&&(l=!0,e(o,i.connectionState.reconnecting,i.connectionState.connected)===!0&&a.triggerHandler(u.onReconnect))},!1);o.eventSource.addEventListener("message",function(n){var t;if(n.data!=="initialized"){try{t=o._parseResponse(n.data)}catch(i){r.handleParseFailure(o,n.data,i,h,n);return}r.processMessages(o,t,s)}},!1);o.eventSource.addEventListener("error",function(n){var r=i._.transportError(i.resources.eventSourceError,o.transport,n);this===o.eventSource&&(h&&h(r)||(o.log("EventSource readyState: "+o.eventSource.readyState+"."),n.eventPhase===t.EventSource.CLOSED?(o.log("EventSource reconnecting due to the server connection ending."),c.reconnect(o)):(o.log("EventSource error."),a.triggerHandler(u.onError,[r]))))},!1)},reconnect:function(n){r.reconnect(n,this.name)},lostConnection:function(n){this.reconnect(n)},send:function(n,t){r.ajaxSend(n,t)},stop:function(n){f(n);r.clearReconnectTimeout(n);n&&n.eventSource&&(n.log("EventSource calling close()."),n.eventSource.close(),n.eventSource=null,delete n.eventSource)},abort:function(n,t){r.ajaxAbort(n,t)}}}(window.jQuery,window),function(n,t){var r=n.signalR,e=n.signalR.events,o=n.signalR.changeState,i=r.transports._logic,u=function(){var n=t.document.createElement("iframe");return n.setAttribute("style","position:absolute;top:0;left:0;width:0;height:0;visibility:hidden;"),n},f=function(){var i=null,f=1e3,n=0;return{prevent:function(){r._.ieVersion<=8&&(n===0&&(i=t.setInterval(function(){var n=u();t.document.body.appendChild(n);t.document.body.removeChild(n);n=null},f)),n++)},cancel:function(){n===1&&t.clearInterval(i);n>0&&n--}}}();r.transports.foreverFrame={name:"foreverFrame",supportsKeepAlive:function(){return!0},iframeClearThreshold:50,start:function(n,r,e){var l=this,s=i.foreverFrame.count+=1,h,o=u(),c=function(){n.log("Forever frame iframe finished loading and is no longer receiving messages.");e&&e()||l.reconnect(n)};if(t.EventSource){e&&(n.log("Forever Frame is not supported by SignalR on browsers with SSE support."),e());return}o.setAttribute("data-signalr-connection-id",n.id);f.prevent();h=i.getUrl(n,this.name);h+="&frameId="+s;t.document.documentElement.appendChild(o);n.log("Binding to iframe's load event.");o.addEventListener?o.addEventListener("load",c,!1):o.attachEvent&&o.attachEvent("onload",c);o.src=h;i.foreverFrame.connections[s]=n;n.frame=o;n.frameId=s;r&&(n.onSuccess=function(){n.log("Iframe transport started.");r()})},reconnect:function(n){var r=this;i.isConnectedOrReconnecting(n)&&i.verifyLastActive(n)&&t.setTimeout(function(){if(i.verifyLastActive(n)&&n.frame&&i.ensureReconnectingState(n)){var u=n.frame,t=i.getUrl(n,r.name,!0)+"&frameId="+n.frameId;n.log("Updating iframe src to '"+t+"'.");u.src=t}},n.reconnectDelay)},lostConnection:function(n){this.reconnect(n)},send:function(n,t){i.ajaxSend(n,t)},receive:function(t,u){var f,e,o;if(t.json!==t._originalJson&&(u=t._originalJson.stringify(u)),o=t._parseResponse(u),i.processMessages(t,o,t.onSuccess),t.state===n.signalR.connectionState.connected&&(t.frameMessageCount=(t.frameMessageCount||0)+1,t.frameMessageCount>r.transports.foreverFrame.iframeClearThreshold&&(t.frameMessageCount=0,f=t.frame.contentWindow||t.frame.contentDocument,f&&f.document&&f.document.body)))for(e=f.document.body;e.firstChild;)e.removeChild(e.firstChild)},stop:function(n){var r=null;if(f.cancel(),n.frame){if(n.frame.stop)n.frame.stop();else try{r=n.frame.contentWindow||n.frame.contentDocument;r.document&&r.document.execCommand&&r.document.execCommand("Stop")}catch(u){n.log("Error occurred when stopping foreverFrame transport. Message = "+u.message+".")}n.frame.parentNode===t.document.body&&t.document.body.removeChild(n.frame);delete i.foreverFrame.connections[n.frameId];n.frame=null;n.frameId=null;delete n.frame;delete n.frameId;delete n.onSuccess;delete n.frameMessageCount;n.log("Stopping forever frame.")}},abort:function(n,t){i.ajaxAbort(n,t)},getConnection:function(n){return i.foreverFrame.connections[n]},started:function(t){o(t,r.connectionState.reconnecting,r.connectionState.connected)===!0&&n(t).triggerHandler(e.onReconnect)}}}(window.jQuery,window),function(n,t){var r=n.signalR,u=n.signalR.events,e=n.signalR.changeState,f=n.signalR.isDisconnecting,i=r.transports._logic;r.transports.longPolling={name:"longPolling",supportsKeepAlive:function(){return!1},reconnectDelay:3e3,start:function(o,s,h){var a=this,v=function(){v=n.noop;o.log("LongPolling connected.");s?s():o.log("WARNING! The client received an init message after reconnecting.")},y=function(n){return h(n)?(o.log("LongPolling failed to connect."),!0):!1},c=o._,l=0,p=function(i){t.clearTimeout(c.reconnectTimeoutId);c.reconnectTimeoutId=null;e(i,r.connectionState.reconnecting,r.connectionState.connected)===!0&&(i.log("Raising the reconnect event"),n(i).triggerHandler(u.onReconnect))},w=36e5;o.pollXhr&&(o.log("Polling xhr requests already exists, aborting."),o.stop());o.messageId=null;c.reconnectTimeoutId=null;c.pollTimeoutId=t.setTimeout(function(){(function e(s,h){var g=s.messageId,nt=g===null,k=!nt,tt=!h,d=i.getUrl(s,a.name,k,tt,!0),b={};(s.messageId&&(b.messageId=s.messageId),s.groupsToken&&(b.groupsToken=s.groupsToken),f(s)!==!0)&&(o.log("Opening long polling request to '"+d+"'."),s.pollXhr=i.ajax(o,{xhrFields:{onprogress:function(){i.markLastMessage(o)}},url:d,type:"POST",contentType:r._.defaultContentType,data:b,timeout:o._.pollTimeout,success:function(r){var h,w=0,u,a;o.log("Long poll complete.");l=0;try{h=o._parseResponse(r)}catch(b){i.handleParseFailure(s,r,b,y,s.pollXhr);return}(c.reconnectTimeoutId!==null&&p(s),h&&(u=i.maximizePersistentResponse(h)),i.processMessages(s,h,v),u&&n.type(u.LongPollDelay)==="number"&&(w=u.LongPollDelay),f(s)!==!0)&&(a=u&&u.ShouldReconnect,!a||i.ensureReconnectingState(s))&&(w>0?c.pollTimeoutId=t.setTimeout(function(){e(s,a)},w):e(s,a))},error:function(f,h){var v=r._.transportError(r.resources.longPollFailed,o.transport,f,s.pollXhr);if(t.clearTimeout(c.reconnectTimeoutId),c.reconnectTimeoutId=null,h==="abort"){o.log("Aborted xhr request.");return}if(!y(v)){if(l++,o.state!==r.connectionState.reconnecting&&(o.log("An error occurred using longPolling. Status = "+h+". Response = "+f.responseText+"."),n(s).triggerHandler(u.onError,[v])),(o.state===r.connectionState.connected||o.state===r.connectionState.reconnecting)&&!i.verifyLastActive(o))return;if(!i.ensureReconnectingState(s))return;c.pollTimeoutId=t.setTimeout(function(){e(s,!0)},a.reconnectDelay)}}}),k&&h===!0&&(c.reconnectTimeoutId=t.setTimeout(function(){p(s)},Math.min(1e3*(Math.pow(2,l)-1),w))))})(o)},250)},lostConnection:function(n){n.pollXhr&&n.pollXhr.abort("lostConnection")},send:function(n,t){i.ajaxSend(n,t)},stop:function(n){t.clearTimeout(n._.pollTimeoutId);t.clearTimeout(n._.reconnectTimeoutId);delete n._.pollTimeoutId;delete n._.reconnectTimeoutId;n.pollXhr&&(n.pollXhr.abort(),n.pollXhr=null,delete n.pollXhr)},abort:function(n,t){i.ajaxAbort(n,t)}}}(window.jQuery,window),function(n){function r(n){return n+e}function s(n,t,i){for(var f=n.length,u=[],r=0;r<f;r+=1)n.hasOwnProperty(r)&&(u[r]=t.call(i,n[r],r,n));return u}function h(t){return n.isFunction(t)?null:n.type(t)==="undefined"?null:t}function u(n){for(var t in n)if(n.hasOwnProperty(t))return!0;return!1}function f(n,t){var i=n._.invocationCallbacks,r,f;u(i)&&n.log("Clearing hub invocation callbacks with error: "+t+".");n._.invocationCallbackId=0;delete n._.invocationCallbacks;n._.invocationCallbacks={};for(f in i)r=i[f],r.method.call(r.scope,{E:t})}function i(n,t){return new i.fn.init(n,t)}function t(i,r){var u={qs:null,logging:!1,useDefaultPath:!0};return n.extend(u,r),(!i||u.useDefaultPath)&&(i=(i||"")+"/signalr"),new t.fn.init(i,u)}var e=".hubProxy",o=n.signalR;i.fn=i.prototype={init:function(n,t){this.state={};this.connection=n;this.hubName=t;this._={callbackMap:{}}},constructor:i,hasSubscriptions:function(){return u(this._.callbackMap)},on:function(t,i){var u=this,f=u._.callbackMap;return t=t.toLowerCase(),f[t]||(f[t]={}),f[t][i]=function(n,t){i.apply(u,t)},n(u).bind(r(t),f[t][i]),u},off:function(t,i){var e=this,o=e._.callbackMap,f;return t=t.toLowerCase(),f=o[t],f&&(f[i]?(n(e).unbind(r(t),f[i]),delete f[i],u(f)||delete o[t]):i||(n(e).unbind(r(t)),delete o[t])),e},invoke:function(t){var i=this,r=i.connection,e=n.makeArray(arguments).slice(1),c=s(e,h),f={H:i.hubName,M:t,A:c,I:r._.invocationCallbackId},u=n.Deferred(),l=function(f){var e=i._maximizeHubResponse(f),h,s;n.extend(i.state,e.State);e.Progress?u.notifyWith?u.notifyWith(i,[e.Progress.Data]):r._.progressjQueryVersionLogged||(r.log("A hub method invocation progress update was received but the version of jQuery in use ("+n.prototype.jquery+") does not support progress updates. Upgrade to jQuery 1.7+ to receive progress notifications."),r._.progressjQueryVersionLogged=!0):e.Error?(e.StackTrace&&r.log(e.Error+"\n"+e.StackTrace+"."),h=e.IsHubException?"HubException":"Exception",s=o._.error(e.Error,h),s.data=e.ErrorData,r.log(i.hubName+"."+t+" failed to execute. Error: "+s.message),u.rejectWith(i,[s])):(r.log("Invoked "+i.hubName+"."+t),u.resolveWith(i,[e.Result]))};return r._.invocationCallbacks[r._.invocationCallbackId.toString()]={scope:i,method:l},r._.invocationCallbackId+=1,n.isEmptyObject(i.state)||(f.S=i.state),r.log("Invoking "+i.hubName+"."+t),r.send(f),u.promise()},_maximizeHubResponse:function(n){return{State:n.S,Result:n.R,Progress:n.P?{Id:n.P.I,Data:n.P.D}:null,Id:n.I,IsHubException:n.H,Error:n.E,StackTrace:n.T,ErrorData:n.D}}};i.fn.init.prototype=i.fn;t.fn=t.prototype=n.connection();t.fn.init=function(t,i){var e={qs:null,logging:!1,useDefaultPath:!0},u=this;n.extend(e,i);n.signalR.fn.init.call(u,t,e.qs,e.logging);u.proxies={};u._.invocationCallbackId=0;u._.invocationCallbacks={};u.received(function(t){var f,o,e,i,s,h;t&&(typeof t.P!="undefined"?(e=t.P.I.toString(),i=u._.invocationCallbacks[e],i&&i.method.call(i.scope,t)):typeof t.I!="undefined"?(e=t.I.toString(),i=u._.invocationCallbacks[e],i&&(u._.invocationCallbacks[e]=null,delete u._.invocationCallbacks[e],i.method.call(i.scope,t))):(f=this._maximizeClientHubInvocation(t),u.log("Triggering client hub event '"+f.Method+"' on hub '"+f.Hub+"'."),s=f.Hub.toLowerCase(),h=f.Method.toLowerCase(),o=this.proxies[s],n.extend(o.state,f.State),n(o).triggerHandler(r(h),[f.Args])))});u.error(function(n,t){var i,r;t&&(i=t.I,r=u._.invocationCallbacks[i],r&&(u._.invocationCallbacks[i]=null,delete u._.invocationCallbacks[i],r.method.call(r.scope,{E:n})))});u.reconnecting(function(){u.transport&&u.transport.name==="webSockets"&&f(u,"Connection started reconnecting before invocation result was received.")});u.disconnected(function(){f(u,"Connection was disconnected before invocation result was received.")})};t.fn._maximizeClientHubInvocation=function(n){return{Hub:n.H,Method:n.M,Args:n.A,State:n.S}};t.fn._registerSubscribedHubs=function(){var t=this;t._subscribedToHubs||(t._subscribedToHubs=!0,t.starting(function(){var i=[];n.each(t.proxies,function(n){this.hasSubscriptions()&&(i.push({name:n}),t.log("Client subscribed to hub '"+n+"'."))});i.length===0&&t.log("No hubs have been subscribed to. The client will not receive data from hubs. To fix, declare at least one client side function prior to connection start for each hub you wish to subscribe to.");t.data=t.json.stringify(i)}))};t.fn.createHubProxy=function(n){n=n.toLowerCase();var t=this.proxies[n];return t||(t=i(this,n),this.proxies[n]=t),this._registerSubscribedHubs(),t};t.fn.init.prototype=t.fn;n.hubConnection=t}(window.jQuery,window),function(n){n.signalR.version="2.2.1"}(window.jQuery)
139(function(factory) {
140 /* global define */
141 /* istanbul ignore next */
142 if ( typeof define === 'function' && define.amd ) {
143 define(['jquery'], factory);
144 } else if ( typeof module === 'object' && module.exports ) {
145 // Node/CommonJS
146 module.exports = function( root, jQuery ) {
147 if ( jQuery === undefined ) {
148 if ( typeof window !== 'undefined' ) {
149 jQuery = require('jquery');
150 } else {
151 jQuery = require('jquery')(root);
152 }
153 }
154 factory(jQuery);
155 return jQuery;
156 };
157 } else {
158 // Browser globals
159 factory(jQuery);
160 }
161}(function($) {
162 'use strict';
163
164 var $doc = $(document);
165 var $win = $(window);
166
167 var pluginName = 'selectric';
168 var classList = 'Input Items Open Disabled TempShow HideSelect Wrapper Focus Hover Responsive Above Below Scroll Group GroupLabel';
169 var eventNamespaceSuffix = '.sl';
170
171 var chars = ['a', 'e', 'i', 'o', 'u', 'n', 'c', 'y'];
172 var diacritics = [
173 /[\xE0-\xE5]/g, // a
174 /[\xE8-\xEB]/g, // e
175 /[\xEC-\xEF]/g, // i
176 /[\xF2-\xF6]/g, // o
177 /[\xF9-\xFC]/g, // u
178 /[\xF1]/g, // n
179 /[\xE7]/g, // c
180 /[\xFD-\xFF]/g // y
181 ];
182
183 /**
184 * Create an instance of Selectric
185 *
186 * @constructor
187 * @param {Node} element - The <select> element
188 * @param {object} opts - Options
189 */
190 var Selectric = function(element, opts) {
191 var _this = this;
192
193 _this.element = element;
194 _this.$element = $(element);
195
196 _this.state = {
197 multiple : !!_this.$element.attr('multiple'),
198 enabled : false,
199 opened : false,
200 currValue : -1,
201 selectedIdx : -1,
202 highlightedIdx : -1
203 };
204
205 _this.eventTriggers = {
206 open : _this.open,
207 close : _this.close,
208 destroy : _this.destroy,
209 refresh : _this.refresh,
210 init : _this.init
211 };
212
213 _this.init(opts);
214 };
215
216 Selectric.prototype = {
217 utils: {
218 /**
219 * Detect mobile browser
220 *
221 * @return {boolean}
222 */
223 isMobile: function() {
224 return /android|ip(hone|od|ad)/i.test(navigator.userAgent);
225 },
226
227 /**
228 * Escape especial characters in string (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions)
229 *
230 * @param {string} str - The string to be escaped
231 * @return {string} The string with the special characters escaped
232 */
233 escapeRegExp: function(str) {
234 return str.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); // $& means the whole matched string
235 },
236
237 /**
238 * Replace diacritics
239 *
240 * @param {string} str - The string to replace the diacritics
241 * @return {string} The string with diacritics replaced with ascii characters
242 */
243 replaceDiacritics: function(str) {
244 var k = diacritics.length;
245
246 while (k--) {
247 str = str.toLowerCase().replace(diacritics[k], chars[k]);
248 }
249
250 return str;
251 },
252
253 /**
254 * Format string
255 * https://gist.github.com/atesgoral/984375
256 *
257 * @param {string} f - String to be formated
258 * @return {string} String formated
259 */
260 format: function(f) {
261 var a = arguments; // store outer arguments
262 return ('' + f) // force format specifier to String
263 .replace( // replace tokens in format specifier
264 /\{(?:(\d+)|(\w+))\}/g, // match {token} references
265 function(
266 s, // the matched string (ignored)
267 i, // an argument index
268 p // a property name
269 ) {
270 return p && a[1] // if property name and first argument exist
271 ? a[1][p] // return property from first argument
272 : a[i]; // assume argument index and return i-th argument
273 });
274 },
275
276 /**
277 * Get the next enabled item in the options list.
278 *
279 * @param {object} selectItems - The options object.
280 * @param {number} selected - Index of the currently selected option.
281 * @return {object} The next enabled item.
282 */
283 nextEnabledItem: function(selectItems, selected) {
284 while ( selectItems[ selected = (selected + 1) % selectItems.length ].disabled ) {
285 // empty
286 }
287 return selected;
288 },
289
290 /**
291 * Get the previous enabled item in the options list.
292 *
293 * @param {object} selectItems - The options object.
294 * @param {number} selected - Index of the currently selected option.
295 * @return {object} The previous enabled item.
296 */
297 previousEnabledItem: function(selectItems, selected) {
298 while ( selectItems[ selected = (selected > 0 ? selected : selectItems.length) - 1 ].disabled ) {
299 // empty
300 }
301 return selected;
302 },
303
304 /**
305 * Transform camelCase string to dash-case.
306 *
307 * @param {string} str - The camelCased string.
308 * @return {string} The string transformed to dash-case.
309 */
310 toDash: function(str) {
311 return str.replace(/([a-z0-9])([A-Z])/g, '$1-$2').toLowerCase();
312 },
313
314 /**
315 * Calls the events registered with function name.
316 *
317 * @param {string} fn - The name of the function.
318 * @param {number} scope - Scope that should be set on the function.
319 */
320 triggerCallback: function(fn, scope) {
321 var elm = scope.element;
322 var func = scope.options['on' + fn];
323 var args = [elm].concat([].slice.call(arguments).slice(1));
324
325 if ( $.isFunction(func) ) {
326 func.apply(elm, args);
327 }
328
329 $(elm).trigger(pluginName + '-' + this.toDash(fn), args);
330 },
331
332 /**
333 * Transform array list to concatenated string and remove empty values
334 * @param {array} arr - Class list
335 * @return {string} Concatenated string
336 */
337 arrayToClassname: function(arr) {
338 var newArr = $.grep(arr, function(item) {
339 return !!item;
340 });
341
342 return $.trim(newArr.join(' '));
343 }
344 },
345
346 /** Initializes */
347 init: function(opts) {
348 var _this = this;
349
350 // Set options
351 _this.options = $.extend(true, {}, $.fn[pluginName].defaults, _this.options, opts);
352
353 _this.utils.triggerCallback('BeforeInit', _this);
354
355 // Preserve data
356 _this.destroy(true);
357
358 // Disable on mobile browsers
359 if ( _this.options.disableOnMobile && _this.utils.isMobile() ) {
360 _this.disableOnMobile = true;
361 return;
362 }
363
364 // Get classes
365 _this.classes = _this.getClassNames();
366
367 // Create elements
368 var input = $('<input/>', { 'class': _this.classes.input, 'readonly': _this.utils.isMobile() });
369 var items = $('<div/>', { 'class': _this.classes.items, 'tabindex': -1 });
370 var itemsScroll = $('<div/>', { 'class': _this.classes.scroll });
371 var wrapper = $('<div/>', { 'class': _this.classes.prefix, 'html': _this.options.arrowButtonMarkup });
372 var label = $('<span/>', { 'class': 'label' });
373 var outerWrapper = _this.$element.wrap('<div/>').parent().append(wrapper.prepend(label), items, input);
374 var hideSelectWrapper = $('<div/>', { 'class': _this.classes.hideselect });
375
376 _this.elements = {
377 input : input,
378 items : items,
379 itemsScroll : itemsScroll,
380 wrapper : wrapper,
381 label : label,
382 outerWrapper : outerWrapper
383 };
384
385 if ( _this.options.nativeOnMobile && _this.utils.isMobile() ) {
386 _this.elements.input = undefined;
387 hideSelectWrapper.addClass(_this.classes.prefix + '-is-native');
388
389 _this.$element.on('change', function() {
390 _this.refresh();
391 });
392 }
393
394 _this.$element
395 .on(_this.eventTriggers)
396 .wrap(hideSelectWrapper);
397
398 _this.originalTabindex = _this.$element.prop('tabindex');
399 _this.$element.prop('tabindex', -1);
400
401 _this.populate();
402 _this.activate();
403
404 _this.utils.triggerCallback('Init', _this);
405 },
406
407 /** Activates the plugin */
408 activate: function() {
409 var _this = this;
410 var hiddenChildren = _this.elements.items.closest(':visible').children(':hidden').addClass(_this.classes.tempshow);
411 var originalWidth = _this.$element.width();
412
413 hiddenChildren.removeClass(_this.classes.tempshow);
414
415 _this.utils.triggerCallback('BeforeActivate', _this);
416
417 _this.elements.outerWrapper.prop('class',
418 _this.utils.arrayToClassname([
419 _this.classes.wrapper,
420 _this.$element.prop('class').replace(/\S+/g, _this.classes.prefix + '-$&'),
421 _this.options.responsive ? _this.classes.responsive : ''
422 ])
423 );
424
425 if ( _this.options.inheritOriginalWidth && originalWidth > 0 ) {
426 _this.elements.outerWrapper.width(originalWidth);
427 }
428
429 _this.unbindEvents();
430
431 if ( !_this.$element.prop('disabled') ) {
432 _this.state.enabled = true;
433
434 // Not disabled, so... Removing disabled class
435 _this.elements.outerWrapper.removeClass(_this.classes.disabled);
436
437 // Remove styles from items box
438 // Fix incorrect height when refreshed is triggered with fewer options
439 _this.$li = _this.elements.items.removeAttr('style').find('li');
440
441 _this.bindEvents();
442 } else {
443 _this.elements.outerWrapper.addClass(_this.classes.disabled);
444
445 if ( _this.elements.input ) {
446 _this.elements.input.prop('disabled', true);
447 }
448 }
449
450 _this.utils.triggerCallback('Activate', _this);
451 },
452
453 /**
454 * Generate classNames for elements
455 *
456 * @return {object} Classes object
457 */
458 getClassNames: function() {
459 var _this = this;
460 var customClass = _this.options.customClass;
461 var classesObj = {};
462
463 $.each(classList.split(' '), function(i, currClass) {
464 var c = customClass.prefix + currClass;
465 classesObj[currClass.toLowerCase()] = customClass.camelCase ? c : _this.utils.toDash(c);
466 });
467
468 classesObj.prefix = customClass.prefix;
469
470 return classesObj;
471 },
472
473 /** Set the label text */
474 setLabel: function() {
475 var _this = this;
476 var labelBuilder = _this.options.labelBuilder;
477
478 if ( _this.state.multiple ) {
479 // Make sure currentValues is an array
480 var currentValues = $.isArray(_this.state.currValue) ? _this.state.currValue : [_this.state.currValue];
481 // I'm not happy with this, but currentValues can be an empty
482 // array and we need to fallback to the default option.
483 currentValues = currentValues.length === 0 ? [0] : currentValues;
484
485 var labelMarkup = $.map(currentValues, function(value) {
486 return $.grep(_this.lookupItems, function(item) {
487 return item.index === value;
488 })[0]; // we don't want nested arrays here
489 });
490
491 labelMarkup = $.grep(labelMarkup, function(item) {
492 // Hide default (please choose) if more then one element were selected.
493 // If no option value were given value is set to option text by default
494 if ( labelMarkup.length > 1 || labelMarkup.length === 0 ) {
495 return $.trim(item.value) !== '';
496 }
497 return item;
498 });
499
500 labelMarkup = $.map(labelMarkup, function(item) {
501 return $.isFunction(labelBuilder)
502 ? labelBuilder(item)
503 : _this.utils.format(labelBuilder, item);
504 });
505
506 // Limit the amount of selected values shown in label
507 if ( _this.options.multiple.maxLabelEntries ) {
508 if ( labelMarkup.length >= _this.options.multiple.maxLabelEntries + 1 ) {
509 labelMarkup = labelMarkup.slice(0, _this.options.multiple.maxLabelEntries);
510 labelMarkup.push(
511 $.isFunction(labelBuilder)
512 ? labelBuilder({ text: '...' })
513 : _this.utils.format(labelBuilder, { text: '...' }));
514 } else {
515 labelMarkup.slice(labelMarkup.length - 1);
516 }
517 }
518 _this.elements.label.html(labelMarkup.join(_this.options.multiple.separator));
519
520 } else {
521 var currItem = _this.lookupItems[_this.state.currValue];
522
523 _this.elements.label.html(
524 $.isFunction(labelBuilder)
525 ? labelBuilder(currItem)
526 : _this.utils.format(labelBuilder, currItem)
527 );
528 }
529 },
530
531 /** Get and save the available options */
532 populate: function() {
533 var _this = this;
534 var $options = _this.$element.children();
535 var $justOptions = _this.$element.find('option');
536 var $selected = $justOptions.filter(':selected');
537 var selectedIndex = $justOptions.index($selected);
538 var currIndex = 0;
539 var emptyValue = (_this.state.multiple ? [] : 0);
540
541 if ( $selected.length > 1 && _this.state.multiple ) {
542 selectedIndex = [];
543 $selected.each(function() {
544 selectedIndex.push($(this).index());
545 });
546 }
547
548 _this.state.currValue = (~selectedIndex ? selectedIndex : emptyValue);
549 _this.state.selectedIdx = _this.state.currValue;
550 _this.state.highlightedIdx = _this.state.currValue;
551 _this.items = [];
552 _this.lookupItems = [];
553
554 if ( $options.length ) {
555 // Build options markup
556 $options.each(function(i) {
557 var $elm = $(this);
558
559 if ( $elm.is('optgroup') ) {
560
561 var optionsGroup = {
562 element : $elm,
563 label : $elm.prop('label'),
564 groupDisabled : $elm.prop('disabled'),
565 items : []
566 };
567
568 $elm.children().each(function(i) {
569 var $elm = $(this);
570
571 optionsGroup.items[i] = _this.getItemData(currIndex, $elm, optionsGroup.groupDisabled || $elm.prop('disabled'));
572
573 _this.lookupItems[currIndex] = optionsGroup.items[i];
574
575 currIndex++;
576 });
577
578 _this.items[i] = optionsGroup;
579
580 } else {
581
582 _this.items[i] = _this.getItemData(currIndex, $elm, $elm.prop('disabled'));
583
584 _this.lookupItems[currIndex] = _this.items[i];
585
586 currIndex++;
587
588 }
589 });
590
591 _this.setLabel();
592 _this.elements.items.append( _this.elements.itemsScroll.html( _this.getItemsMarkup(_this.items) ) );
593 }
594 },
595
596 /**
597 * Generate items object data
598 * @param {integer} index - Current item index
599 * @param {node} $elm - Current element node
600 * @param {boolean} isDisabled - Current element disabled state
601 * @return {object} Item object
602 */
603 getItemData: function(index, $elm, isDisabled) {
604 var _this = this;
605
606 return {
607 index : index,
608 element : $elm,
609 value : $elm.val(),
610 className : $elm.prop('class'),
611 text : $elm.html(),
612 slug : $.trim(_this.utils.replaceDiacritics($elm.html())),
613 alt : $elm.attr('data-alt'),
614 selected : $elm.prop('selected'),
615 disabled : isDisabled
616 };
617 },
618
619 /**
620 * Generate options markup
621 *
622 * @param {object} items - Object containing all available options
623 * @return {string} HTML for the options box
624 */
625 getItemsMarkup: function(items) {
626 var _this = this;
627 var markup = '<ul>';
628
629 if ( $.isFunction(_this.options.listBuilder) && _this.options.listBuilder ) {
630 items = _this.options.listBuilder(items);
631 }
632
633 $.each(items, function(i, elm) {
634 if ( elm.label !== undefined ) {
635
636 markup += _this.utils.format('<ul class="{1}"><li class="{2}">{3}</li>',
637 _this.utils.arrayToClassname([
638 _this.classes.group,
639 elm.groupDisabled ? 'disabled' : '',
640 elm.element.prop('class')
641 ]),
642 _this.classes.grouplabel,
643 elm.element.prop('label')
644 );
645
646 $.each(elm.items, function(i, elm) {
647 markup += _this.getItemMarkup(elm.index, elm);
648 });
649
650 markup += '</ul>';
651
652 } else {
653
654 markup += _this.getItemMarkup(elm.index, elm);
655
656 }
657 });
658
659 return markup + '</ul>';
660 },
661
662 /**
663 * Generate every option markup
664 *
665 * @param {number} index - Index of current item
666 * @param {object} itemData - Current item
667 * @return {string} HTML for the option
668 */
669 getItemMarkup: function(index, itemData) {
670 var _this = this;
671 var itemBuilder = _this.options.optionsItemBuilder;
672 // limit access to item data to provide a simple interface
673 // to most relevant options.
674 var filteredItemData = {
675 value: itemData.value,
676 text : itemData.text,
677 slug : itemData.slug,
678 index: itemData.index
679 };
680
681 return _this.utils.format('<li data-index="{1}" class="{2}">{3}</li>',
682 index,
683 _this.utils.arrayToClassname([
684 itemData.className,
685 index === _this.items.length - 1 ? 'last' : '',
686 itemData.disabled ? 'disabled' : '',
687 itemData.selected ? 'selected' : ''
688 ]),
689 $.isFunction(itemBuilder)
690 ? _this.utils.format(itemBuilder(itemData, this.$element, index), itemData)
691 : _this.utils.format(itemBuilder, filteredItemData)
692 );
693 },
694
695 /** Remove events on the elements */
696 unbindEvents: function() {
697 var _this = this;
698
699 _this.elements.wrapper
700 .add(_this.$element)
701 .add(_this.elements.outerWrapper)
702 .add(_this.elements.input)
703 .off(eventNamespaceSuffix);
704 },
705
706 /** Bind events on the elements */
707 bindEvents: function() {
708 var _this = this;
709
710 _this.elements.outerWrapper.on('mouseenter' + eventNamespaceSuffix + ' mouseleave' + eventNamespaceSuffix, function(e) {
711 $(this).toggleClass(_this.classes.hover, e.type === 'mouseenter');
712
713 // Delay close effect when openOnHover is true
714 if ( _this.options.openOnHover ) {
715 clearTimeout(_this.closeTimer);
716
717 if ( e.type === 'mouseleave' ) {
718 _this.closeTimer = setTimeout($.proxy(_this.close, _this), _this.options.hoverIntentTimeout);
719 } else {
720 _this.open();
721 }
722 }
723 });
724
725 // Toggle open/close
726 _this.elements.wrapper.on('click' + eventNamespaceSuffix, function(e) {
727 _this.state.opened ? _this.close() : _this.open(e);
728 });
729
730 // Translate original element focus event to dummy input.
731 // Disabled on mobile devices because the default option list isn't
732 // shown due the fact that hidden input gets focused
733 if ( !(_this.options.nativeOnMobile && _this.utils.isMobile()) ) {
734 _this.$element.on('focus' + eventNamespaceSuffix, function() {
735 _this.elements.input.focus();
736 });
737
738 _this.elements.input
739 .prop({ tabindex: _this.originalTabindex, disabled: false })
740 .on('keydown' + eventNamespaceSuffix, $.proxy(_this.handleKeys, _this))
741 .on('focusin' + eventNamespaceSuffix, function(e) {
742 _this.elements.outerWrapper.addClass(_this.classes.focus);
743
744 // Prevent the flicker when focusing out and back again in the browser window
745 _this.elements.input.one('blur', function() {
746 _this.elements.input.blur();
747 });
748
749 if ( _this.options.openOnFocus && !_this.state.opened ) {
750 _this.open(e);
751 }
752 })
753 .on('focusout' + eventNamespaceSuffix, function() {
754 _this.elements.outerWrapper.removeClass(_this.classes.focus);
755 })
756 .on('input propertychange', function() {
757 var val = _this.elements.input.val();
758 var searchRegExp = new RegExp('^' + _this.utils.escapeRegExp(val), 'i');
759
760 // Clear search
761 clearTimeout(_this.resetStr);
762 _this.resetStr = setTimeout(function() {
763 _this.elements.input.val('');
764 }, _this.options.keySearchTimeout);
765
766 if ( val.length ) {
767 // Search in select options
768 $.each(_this.items, function(i, elm) {
769 if (elm.disabled) {
770 return;
771 }
772 if (searchRegExp.test(elm.text) || searchRegExp.test(elm.slug)) {
773 _this.highlight(i);
774 return;
775 }
776 if (!elm.alt) {
777 return;
778 }
779 var altItems = elm.alt.split('|');
780 for (var ai = 0; ai < altItems.length; ai++) {
781 if (!altItems[ai]) {
782 break;
783 }
784 if (searchRegExp.test(altItems[ai].trim())) {
785 _this.highlight(i);
786 return;
787 }
788 }
789 });
790 }
791 });
792 }
793
794 _this.$li.on({
795 // Prevent <input> blur on Chrome
796 mousedown: function(e) {
797 e.preventDefault();
798 e.stopPropagation();
799 },
800 click: function() {
801 _this.select($(this).data('index'));
802
803 // Chrome doesn't close options box if select is wrapped with a label
804 // We need to 'return false' to avoid that
805 return false;
806 }
807 });
808 },
809
810 /**
811 * Behavior when keyboard keys is pressed
812 *
813 * @param {object} e - Event object
814 */
815 handleKeys: function(e) {
816 var _this = this;
817 var key = e.which;
818 var keys = _this.options.keys;
819
820 var isPrevKey = $.inArray(key, keys.previous) > -1;
821 var isNextKey = $.inArray(key, keys.next) > -1;
822 var isSelectKey = $.inArray(key, keys.select) > -1;
823 var isOpenKey = $.inArray(key, keys.open) > -1;
824 var idx = _this.state.highlightedIdx;
825 var isFirstOrLastItem = (isPrevKey && idx === 0) || (isNextKey && (idx + 1) === _this.items.length);
826 var goToItem = 0;
827
828 // Enter / Space
829 if ( key === 13 || key === 32 ) {
830 e.preventDefault();
831 }
832
833 // If it's a directional key
834 if ( isPrevKey || isNextKey ) {
835 if ( !_this.options.allowWrap && isFirstOrLastItem ) {
836 return;
837 }
838
839 if ( isPrevKey ) {
840 goToItem = _this.utils.previousEnabledItem(_this.lookupItems, idx);
841 }
842
843 if ( isNextKey ) {
844 goToItem = _this.utils.nextEnabledItem(_this.lookupItems, idx);
845 }
846
847 _this.highlight(goToItem);
848 }
849
850 // Tab / Enter / ESC
851 if ( isSelectKey && _this.state.opened ) {
852 _this.select(idx);
853
854 if ( !_this.state.multiple || !_this.options.multiple.keepMenuOpen ) {
855 _this.close();
856 }
857
858 return;
859 }
860
861 // Space / Enter / Left / Up / Right / Down
862 if ( isOpenKey && !_this.state.opened ) {
863 _this.open();
864 }
865 },
866
867 /** Update the items object */
868 refresh: function() {
869 var _this = this;
870
871 _this.populate();
872 _this.activate();
873 _this.utils.triggerCallback('Refresh', _this);
874 },
875
876 /** Set options box width/height */
877 setOptionsDimensions: function() {
878 var _this = this;
879
880 // Calculate options box height
881 // Set a temporary class on the hidden parent of the element
882 var hiddenChildren = _this.elements.items.closest(':visible').children(':hidden').addClass(_this.classes.tempshow);
883 var maxHeight = _this.options.maxHeight;
884 var itemsWidth = _this.elements.items.outerWidth();
885 var wrapperWidth = _this.elements.wrapper.outerWidth() - (itemsWidth - _this.elements.items.width());
886
887 // Set the dimensions, minimum is wrapper width, expand for long items if option is true
888 if ( !_this.options.expandToItemText || wrapperWidth > itemsWidth ) {
889 _this.finalWidth = wrapperWidth;
890 } else {
891 // Make sure the scrollbar width is included
892 _this.elements.items.css('overflow', 'scroll');
893
894 // Set a really long width for _this.elements.outerWrapper
895 _this.elements.outerWrapper.width(9e4);
896 _this.finalWidth = _this.elements.items.width();
897 // Set scroll bar to auto
898 _this.elements.items.css('overflow', '');
899 _this.elements.outerWrapper.width('');
900 }
901
902 _this.elements.items.width(_this.finalWidth).height() > maxHeight && _this.elements.items.height(maxHeight);
903
904 // Remove the temporary class
905 hiddenChildren.removeClass(_this.classes.tempshow);
906 },
907
908 /** Detect if the options box is inside the window */
909 isInViewport: function() {
910 var _this = this;
911
912 if (_this.options.forceRenderAbove === true) {
913 _this.elements.outerWrapper.addClass(_this.classes.above);
914 } else if (_this.options.forceRenderBelow === true) {
915 _this.elements.outerWrapper.addClass(_this.classes.below);
916 } else {
917 var scrollTop = $win.scrollTop();
918 var winHeight = $win.height();
919 var uiPosX = _this.elements.outerWrapper.offset().top;
920 var uiHeight = _this.elements.outerWrapper.outerHeight();
921
922 var fitsDown = (uiPosX + uiHeight + _this.itemsHeight) <= (scrollTop + winHeight);
923 var fitsAbove = (uiPosX - _this.itemsHeight) > scrollTop;
924
925 // If it does not fit below, only render it
926 // above it fit's there.
927 // It's acceptable that the user needs to
928 // scroll the viewport to see the cut off UI
929 var renderAbove = !fitsDown && fitsAbove;
930 var renderBelow = !renderAbove;
931
932 _this.elements.outerWrapper.toggleClass(_this.classes.above, renderAbove);
933 _this.elements.outerWrapper.toggleClass(_this.classes.below, renderBelow);
934 }
935 },
936
937 /**
938 * Detect if currently selected option is visible and scroll the options box to show it
939 *
940 * @param {Number|Array} index - Index of the selected items
941 */
942 detectItemVisibility: function(index) {
943 var _this = this;
944 var $filteredLi = _this.$li.filter('[data-index]');
945
946 if ( _this.state.multiple ) {
947 // If index is an array, we can assume a multiple select and we
948 // want to scroll to the uppermost selected item!
949 // Math.min.apply(Math, index) returns the lowest entry in an Array.
950 index = ($.isArray(index) && index.length === 0) ? 0 : index;
951 index = $.isArray(index) ? Math.min.apply(Math, index) : index;
952 }
953
954 var liHeight = $filteredLi.eq(index).outerHeight();
955 if (!$filteredLi[index]) {
956 return;
957 }
958 var liTop = $filteredLi[index].offsetTop;
959 var itemsScrollTop = _this.elements.itemsScroll.scrollTop();
960 var scrollT = liTop + liHeight * 2;
961
962 _this.elements.itemsScroll.scrollTop(
963 scrollT > itemsScrollTop + _this.itemsHeight ? scrollT - _this.itemsHeight :
964 liTop - liHeight < itemsScrollTop ? liTop - liHeight :
965 itemsScrollTop
966 );
967 },
968
969 /**
970 * Open the select options box
971 *
972 * @param {Event} e - Event
973 */
974 open: function(e) {
975 var _this = this;
976
977 if ( _this.options.nativeOnMobile && _this.utils.isMobile()) {
978 return false;
979 }
980
981 _this.utils.triggerCallback('BeforeOpen', _this);
982
983 if ( e ) {
984 e.preventDefault();
985 if (_this.options.stopPropagation) {
986 e.stopPropagation();
987 }
988 }
989
990 if ( _this.state.enabled ) {
991 _this.setOptionsDimensions();
992
993 // Find any other opened instances of select and close it
994 $('.' + _this.classes.hideselect, '.' + _this.classes.open).children()[pluginName]('close');
995
996 _this.state.opened = true;
997 _this.itemsHeight = _this.elements.items.outerHeight();
998 _this.itemsInnerHeight = _this.elements.items.height();
999
1000 // Toggle options box visibility
1001 _this.elements.outerWrapper.addClass(_this.classes.open);
1002
1003 // Give dummy input focus
1004 _this.elements.input.val('');
1005 if ( e && e.type !== 'focusin' ) {
1006 _this.elements.input.focus();
1007 }
1008
1009 // Delayed binds events on Document to make label clicks work
1010 setTimeout(function() {
1011 $doc
1012 .on('click' + eventNamespaceSuffix, $.proxy(_this.close, _this))
1013 .on('scroll' + eventNamespaceSuffix, $.proxy(_this.isInViewport, _this));
1014 }, 1);
1015
1016 _this.isInViewport();
1017
1018 // Prevent window scroll when using mouse wheel inside items box
1019 if ( _this.options.preventWindowScroll ) {
1020 /* istanbul ignore next */
1021 $doc.on('mousewheel' + eventNamespaceSuffix + ' DOMMouseScroll' + eventNamespaceSuffix, '.' + _this.classes.scroll, function(e) {
1022 var orgEvent = e.originalEvent;
1023 var scrollTop = $(this).scrollTop();
1024 var deltaY = 0;
1025
1026 if ( 'detail' in orgEvent ) { deltaY = orgEvent.detail * -1; }
1027 if ( 'wheelDelta' in orgEvent ) { deltaY = orgEvent.wheelDelta; }
1028 if ( 'wheelDeltaY' in orgEvent ) { deltaY = orgEvent.wheelDeltaY; }
1029 if ( 'deltaY' in orgEvent ) { deltaY = orgEvent.deltaY * -1; }
1030
1031 if ( scrollTop === (this.scrollHeight - _this.itemsInnerHeight) && deltaY < 0 || scrollTop === 0 && deltaY > 0 ) {
1032 e.preventDefault();
1033 }
1034 });
1035 }
1036
1037 _this.detectItemVisibility(_this.state.selectedIdx);
1038
1039 _this.highlight(_this.state.multiple ? -1 : _this.state.selectedIdx);
1040
1041 _this.utils.triggerCallback('Open', _this);
1042 }
1043 },
1044
1045 /** Close the select options box */
1046 close: function() {
1047 var _this = this;
1048
1049 _this.utils.triggerCallback('BeforeClose', _this);
1050
1051 // Remove custom events on document
1052 $doc.off(eventNamespaceSuffix);
1053
1054 // Remove visible class to hide options box
1055 _this.elements.outerWrapper.removeClass(_this.classes.open);
1056
1057 _this.state.opened = false;
1058
1059 _this.utils.triggerCallback('Close', _this);
1060 },
1061
1062 /** Select current option and change the label */
1063 change: function() {
1064 var _this = this;
1065
1066 _this.utils.triggerCallback('BeforeChange', _this);
1067
1068 if ( _this.state.multiple ) {
1069 // Reset old selected
1070 $.each(_this.lookupItems, function(idx) {
1071 _this.lookupItems[idx].selected = false;
1072 _this.$element.find('option').prop('selected', false);
1073 });
1074
1075 // Set new selected
1076 $.each(_this.state.selectedIdx, function(idx, value) {
1077 _this.lookupItems[value].selected = true;
1078 _this.$element.find('option').eq(value).prop('selected', true);
1079 });
1080
1081 _this.state.currValue = _this.state.selectedIdx;
1082
1083 _this.setLabel();
1084
1085 _this.utils.triggerCallback('Change', _this);
1086 } else if ( _this.state.currValue !== _this.state.selectedIdx ) {
1087 // Apply changed value to original select
1088 _this.$element
1089 .prop('selectedIndex', _this.state.currValue = _this.state.selectedIdx)
1090 .data('value', _this.lookupItems[_this.state.selectedIdx].text);
1091
1092 // Change label text
1093 _this.setLabel();
1094
1095 _this.utils.triggerCallback('Change', _this);
1096 }
1097 },
1098
1099 /**
1100 * Highlight option
1101 * @param {number} index - Index of the options that will be highlighted
1102 */
1103 highlight: function(index) {
1104 var _this = this;
1105 var $filteredLi = _this.$li.filter('[data-index]').removeClass('highlighted');
1106
1107 _this.utils.triggerCallback('BeforeHighlight', _this);
1108
1109 // Parameter index is required and should not be a disabled item
1110 if (index === undefined || index === -1 || !_this.lookupItems[index] || _this.lookupItems[index].disabled ) {
1111 return;
1112 }
1113
1114 $filteredLi
1115 .eq(_this.state.highlightedIdx = index)
1116 .addClass('highlighted');
1117
1118 _this.detectItemVisibility(index);
1119
1120 _this.utils.triggerCallback('Highlight', _this);
1121 },
1122
1123 /**
1124 * Select option
1125 *
1126 * @param {number} index - Index of the option that will be selected
1127 */
1128 select: function(index) {
1129 var _this = this;
1130 var $filteredLi = _this.$li.filter('[data-index]');
1131
1132 _this.utils.triggerCallback('BeforeSelect', _this, index);
1133
1134 // Parameter index is required and should not be a disabled item
1135 if ( index === undefined || index === -1 || _this.lookupItems[index].disabled ) {
1136 return;
1137 }
1138
1139 if ( _this.state.multiple ) {
1140 // Make sure selectedIdx is an array
1141 _this.state.selectedIdx = $.isArray(_this.state.selectedIdx) ? _this.state.selectedIdx : [_this.state.selectedIdx];
1142
1143 var hasSelectedIndex = $.inArray(index, _this.state.selectedIdx);
1144 if ( hasSelectedIndex !== -1 ) {
1145 _this.state.selectedIdx.splice(hasSelectedIndex, 1);
1146 } else {
1147 _this.state.selectedIdx.push(index);
1148 }
1149
1150 $filteredLi
1151 .removeClass('selected')
1152 .filter(function(index) {
1153 return $.inArray(index, _this.state.selectedIdx) !== -1;
1154 })
1155 .addClass('selected');
1156 } else {
1157 $filteredLi
1158 .removeClass('selected')
1159 .eq(_this.state.selectedIdx = index)
1160 .addClass('selected');
1161 }
1162
1163 if ( !_this.state.multiple || !_this.options.multiple.keepMenuOpen ) {
1164 _this.close();
1165 }
1166
1167 _this.change();
1168
1169 _this.utils.triggerCallback('Select', _this, index);
1170 },
1171
1172 /**
1173 * Unbind and remove
1174 *
1175 * @param {boolean} preserveData - Check if the data on the element should be removed too
1176 */
1177 destroy: function(preserveData) {
1178 var _this = this;
1179
1180 if ( _this.state && _this.state.enabled ) {
1181 _this.elements.items.add(_this.elements.wrapper).add(_this.elements.input).remove();
1182
1183 if ( !preserveData ) {
1184 _this.$element.removeData(pluginName).removeData('value');
1185 }
1186
1187 _this.$element.prop('tabindex', _this.originalTabindex).off(eventNamespaceSuffix).off(_this.eventTriggers).unwrap().unwrap();
1188
1189 _this.state.enabled = false;
1190 }
1191 }
1192 };
1193
1194 // A really lightweight plugin wrapper around the constructor,
1195 // preventing against multiple instantiations
1196 $.fn[pluginName] = function(args) {
1197 return this.each(function() {
1198 var data = $.data(this, pluginName);
1199
1200 if ( data && !data.disableOnMobile ) {
1201 (typeof args === 'string' && data[args]) ? data[args]() : data.init(args);
1202 } else {
1203 $.data(this, pluginName, new Selectric(this, args));
1204 }
1205 });
1206 };
1207
1208 /**
1209 * Default plugin options
1210 *
1211 * @type {object}
1212 */
1213 $.fn[pluginName].defaults = {
1214 onChange: function (elm) { $(elm).change(); },
1215 /*Made by Andrew*/
1216 //maxHeight : 300,
1217 maxHeight : 200,
1218 /*Made by Andrew*/
1219 keySearchTimeout : 500,
1220 arrowButtonMarkup : '<b class="button">▾</b>',
1221 disableOnMobile : false,
1222 nativeOnMobile : true,
1223 openOnFocus : true,
1224 openOnHover : false,
1225 hoverIntentTimeout : 500,
1226 expandToItemText : false,
1227 responsive : false,
1228 preventWindowScroll : true,
1229 inheritOriginalWidth : false,
1230 allowWrap : true,
1231 forceRenderAbove : false,
1232 forceRenderBelow : false,
1233 stopPropagation : true,
1234 optionsItemBuilder : '{text}', // function(itemData, element, index)
1235 labelBuilder : '{text}', // function(currItem)
1236 listBuilder : false, // function(items)
1237 keys : {
1238 previous : [37, 38], // Left / Up
1239 next : [39, 40], // Right / Down
1240 select : [9, 13, 27], // Tab / Enter / Escape
1241 open : [13, 32, 37, 38, 39, 40], // Enter / Space / Left / Up / Right / Down
1242 close : [9, 27] // Tab / Escape
1243 },
1244 customClass : {
1245 prefix: pluginName,
1246 camelCase: false
1247 },
1248 multiple : {
1249 separator: ', ',
1250 keepMenuOpen: true,
1251 maxLabelEntries: false
1252 }
1253 };
1254}));
1255
1256/*! Selectric Placeholder ÏŸ v0.2.0 (<%= date %>) - git.io/tjl9sQ - Copyright (c) <%= year %> Leonardo Santos - MIT License */
1257(function(factory) {
1258 /* global define */
1259 if ( typeof define === 'function' && define.amd ) {
1260 define(['jquery'], factory);
1261 } else if ( typeof module === 'object' && module.exports ) {
1262 // Node/CommonJS
1263 module.exports = function( root, jQuery ) {
1264 if ( jQuery === undefined ) {
1265 if ( typeof window !== 'undefined' ) {
1266 jQuery = require('jquery');
1267 } else {
1268 jQuery = require('jquery')(root);
1269 }
1270 }
1271 factory(jQuery);
1272 return jQuery;
1273 };
1274 } else {
1275 // Browser globals
1276 factory(jQuery);
1277 }
1278}(function($) {
1279 'use strict';
1280
1281 if ( !$.fn.selectric ) {
1282 $.error('Selectric not initialized');
1283 }
1284
1285 $.fn.selectricPlaceholder = function(opts) {
1286 return this.each(function() {
1287 var $this = $(this);
1288 var data = $this.data('selectric');
1289 var options = $.extend({
1290 placeholderOnOpen: true
1291 }, opts);
1292
1293 data.elements.label.html(data.$element.attr('placeholder'));
1294
1295 $this.on('selectric-before-open', function(event, element, data) {
1296 if ( options.placeholderOnOpen ) {
1297 data.elements.label.data('value', data.elements.label.html()).html(data.$element.attr('placeholder'));
1298 }
1299 });
1300
1301 $this.on('selectric-before-close', function(event, element, data) {
1302 if ( options.placeholderOnOpen ) {
1303 data.elements.label.html(data.elements.label.data('value'));
1304 }
1305 });
1306 });
1307 };
1308}));
1309!function(i){"use strict";"function"==typeof define&&define.amd?define(["jquery"],i):"undefined"!=typeof exports?module.exports=i(require("jquery")):i(jQuery)}(function(i){"use strict";var e=window.Slick||{};(e=function(){var e=0;return function(t,o){var s,n=this;n.defaults={accessibility:!0,adaptiveHeight:!1,appendArrows:i(t),appendDots:i(t),arrows:!0,asNavFor:null,prevArrow:'<button class="slick-prev" aria-label="Previous" type="button">Previous</button>',nextArrow:'<button class="slick-next" aria-label="Next" type="button">Next</button>',autoplay:!1,autoplaySpeed:3e3,centerMode:!1,centerPadding:"50px",cssEase:"ease",customPaging:function(e,t){return i('<button type="button" />').text(t+1)},dots:!1,dotsClass:"slick-dots",draggable:!0,easing:"linear",edgeFriction:.35,fade:!1,focusOnSelect:!1,focusOnChange:!1,infinite:!0,initialSlide:0,lazyLoad:"ondemand",mobileFirst:!1,pauseOnHover:!0,pauseOnFocus:!0,pauseOnDotsHover:!1,respondTo:"window",responsive:null,rows:1,rtl:!1,slide:"",slidesPerRow:1,slidesToShow:1,slidesToScroll:1,speed:500,swipe:!0,swipeToSlide:!1,touchMove:!0,touchThreshold:5,useCSS:!0,useTransform:!0,variableWidth:!1,vertical:!1,verticalSwiping:!1,waitForAnimate:!0,zIndex:1e3},n.initials={animating:!1,dragging:!1,autoPlayTimer:null,currentDirection:0,currentLeft:null,currentSlide:0,direction:1,$dots:null,listWidth:null,listHeight:null,loadIndex:0,$nextArrow:null,$prevArrow:null,scrolling:!1,slideCount:null,slideWidth:null,$slideTrack:null,$slides:null,sliding:!1,slideOffset:0,swipeLeft:null,swiping:!1,$list:null,touchObject:{},transformsEnabled:!1,unslicked:!1},i.extend(n,n.initials),n.activeBreakpoint=null,n.animType=null,n.animProp=null,n.breakpoints=[],n.breakpointSettings=[],n.cssTransitions=!1,n.focussed=!1,n.interrupted=!1,n.hidden="hidden",n.paused=!0,n.positionProp=null,n.respondTo=null,n.rowCount=1,n.shouldClick=!0,n.$slider=i(t),n.$slidesCache=null,n.transformType=null,n.transitionType=null,n.visibilityChange="visibilitychange",n.windowWidth=0,n.windowTimer=null,s=i(t).data("slick")||{},n.options=i.extend({},n.defaults,o,s),n.currentSlide=n.options.initialSlide,n.originalSettings=n.options,void 0!==document.mozHidden?(n.hidden="mozHidden",n.visibilityChange="mozvisibilitychange"):void 0!==document.webkitHidden&&(n.hidden="webkitHidden",n.visibilityChange="webkitvisibilitychange"),n.autoPlay=i.proxy(n.autoPlay,n),n.autoPlayClear=i.proxy(n.autoPlayClear,n),n.autoPlayIterator=i.proxy(n.autoPlayIterator,n),n.changeSlide=i.proxy(n.changeSlide,n),n.clickHandler=i.proxy(n.clickHandler,n),n.selectHandler=i.proxy(n.selectHandler,n),n.setPosition=i.proxy(n.setPosition,n),n.swipeHandler=i.proxy(n.swipeHandler,n),n.dragHandler=i.proxy(n.dragHandler,n),n.keyHandler=i.proxy(n.keyHandler,n),n.instanceUid=e++,n.htmlExpr=/^(?:\s*(<[\w\W]+>)[^>]*)$/,n.registerBreakpoints(),n.init(!0)}}()).prototype.activateADA=function(){this.$slideTrack.find(".slick-active").attr({"aria-hidden":"false"}).find("a, input, button, select").attr({tabindex:"0"})},e.prototype.addSlide=e.prototype.slickAdd=function(e,t,o){var s=this;if("boolean"==typeof t)o=t,t=null;else if(t<0||t>=s.slideCount)return!1;s.unload(),"number"==typeof t?0===t&&0===s.$slides.length?i(e).appendTo(s.$slideTrack):o?i(e).insertBefore(s.$slides.eq(t)):i(e).insertAfter(s.$slides.eq(t)):!0===o?i(e).prependTo(s.$slideTrack):i(e).appendTo(s.$slideTrack),s.$slides=s.$slideTrack.children(this.options.slide),s.$slideTrack.children(this.options.slide).detach(),s.$slideTrack.append(s.$slides),s.$slides.each(function(e,t){i(t).attr("data-slick-index",e)}),s.$slidesCache=s.$slides,s.reinit()},e.prototype.animateHeight=function(){var i=this;if(1===i.options.slidesToShow&&!0===i.options.adaptiveHeight&&!1===i.options.vertical){var e=i.$slides.eq(i.currentSlide).outerHeight(!0);i.$list.animate({height:e},i.options.speed)}},e.prototype.animateSlide=function(e,t){var o={},s=this;s.animateHeight(),!0===s.options.rtl&&!1===s.options.vertical&&(e=-e),!1===s.transformsEnabled?!1===s.options.vertical?s.$slideTrack.animate({left:e},s.options.speed,s.options.easing,t):s.$slideTrack.animate({top:e},s.options.speed,s.options.easing,t):!1===s.cssTransitions?(!0===s.options.rtl&&(s.currentLeft=-s.currentLeft),i({animStart:s.currentLeft}).animate({animStart:e},{duration:s.options.speed,easing:s.options.easing,step:function(i){i=Math.ceil(i),!1===s.options.vertical?(o[s.animType]="translate("+i+"px, 0px)",s.$slideTrack.css(o)):(o[s.animType]="translate(0px,"+i+"px)",s.$slideTrack.css(o))},complete:function(){t&&t.call()}})):(s.applyTransition(),e=Math.ceil(e),!1===s.options.vertical?o[s.animType]="translate3d("+e+"px, 0px, 0px)":o[s.animType]="translate3d(0px,"+e+"px, 0px)",s.$slideTrack.css(o),t&&setTimeout(function(){s.disableTransition(),t.call()},s.options.speed))},e.prototype.getNavTarget=function(){var e=this,t=e.options.asNavFor;return t&&null!==t&&(t=i(t).not(e.$slider)),t},e.prototype.asNavFor=function(e){var t=this.getNavTarget();null!==t&&"object"==typeof t&&t.each(function(){var t=i(this).slick("getSlick");t.unslicked||t.slideHandler(e,!0)})},e.prototype.applyTransition=function(i){var e=this,t={};!1===e.options.fade?t[e.transitionType]=e.transformType+" "+e.options.speed+"ms "+e.options.cssEase:t[e.transitionType]="opacity "+e.options.speed+"ms "+e.options.cssEase,!1===e.options.fade?e.$slideTrack.css(t):e.$slides.eq(i).css(t)},e.prototype.autoPlay=function(){var i=this;i.autoPlayClear(),i.slideCount>i.options.slidesToShow&&(i.autoPlayTimer=setInterval(i.autoPlayIterator,i.options.autoplaySpeed))},e.prototype.autoPlayClear=function(){var i=this;i.autoPlayTimer&&clearInterval(i.autoPlayTimer)},e.prototype.autoPlayIterator=function(){var i=this,e=i.currentSlide+i.options.slidesToScroll;i.paused||i.interrupted||i.focussed||(!1===i.options.infinite&&(1===i.direction&&i.currentSlide+1===i.slideCount-1?i.direction=0:0===i.direction&&(e=i.currentSlide-i.options.slidesToScroll,i.currentSlide-1==0&&(i.direction=1))),i.slideHandler(e))},e.prototype.buildArrows=function(){var e=this;!0===e.options.arrows&&(e.$prevArrow=i(e.options.prevArrow).addClass("slick-arrow"),e.$nextArrow=i(e.options.nextArrow).addClass("slick-arrow"),e.slideCount>e.options.slidesToShow?(e.$prevArrow.removeClass("slick-hidden").removeAttr("aria-hidden tabindex"),e.$nextArrow.removeClass("slick-hidden").removeAttr("aria-hidden tabindex"),e.htmlExpr.test(e.options.prevArrow)&&e.$prevArrow.prependTo(e.options.appendArrows),e.htmlExpr.test(e.options.nextArrow)&&e.$nextArrow.appendTo(e.options.appendArrows),!0!==e.options.infinite&&e.$prevArrow.addClass("slick-disabled").attr("aria-disabled","true")):e.$prevArrow.add(e.$nextArrow).addClass("slick-hidden").attr({"aria-disabled":"true",tabindex:"-1"}))},e.prototype.buildDots=function(){var e,t,o=this;if(!0===o.options.dots){for(o.$slider.addClass("slick-dotted"),t=i("<ul />").addClass(o.options.dotsClass),e=0;e<=o.getDotCount();e+=1)t.append(i("<li />").append(o.options.customPaging.call(this,o,e)));o.$dots=t.appendTo(o.options.appendDots),o.$dots.find("li").first().addClass("slick-active")}},e.prototype.buildOut=function(){var e=this;e.$slides=e.$slider.children(e.options.slide+":not(.slick-cloned)").addClass("slick-slide"),e.slideCount=e.$slides.length,e.$slides.each(function(e,t){i(t).attr("data-slick-index",e).data("originalStyling",i(t).attr("style")||"")}),e.$slider.addClass("slick-slider"),e.$slideTrack=0===e.slideCount?i('<div class="slick-track"/>').appendTo(e.$slider):e.$slides.wrapAll('<div class="slick-track"/>').parent(),e.$list=e.$slideTrack.wrap('<div class="slick-list"/>').parent(),e.$slideTrack.css("opacity",0),!0!==e.options.centerMode&&!0!==e.options.swipeToSlide||(e.options.slidesToScroll=1),i("img[data-lazy]",e.$slider).not("[src]").addClass("slick-loading"),e.setupInfinite(),e.buildArrows(),e.buildDots(),e.updateDots(),e.setSlideClasses("number"==typeof e.currentSlide?e.currentSlide:0),!0===e.options.draggable&&e.$list.addClass("draggable")},e.prototype.buildRows=function(){var i,e,t,o,s,n,r,l=this;if(o=document.createDocumentFragment(),n=l.$slider.children(),l.options.rows>1){for(r=l.options.slidesPerRow*l.options.rows,s=Math.ceil(n.length/r),i=0;i<s;i++){var d=document.createElement("div");for(e=0;e<l.options.rows;e++){var a=document.createElement("div");for(t=0;t<l.options.slidesPerRow;t++){var c=i*r+(e*l.options.slidesPerRow+t);n.get(c)&&a.appendChild(n.get(c))}d.appendChild(a)}o.appendChild(d)}l.$slider.empty().append(o),l.$slider.children().children().children().css({width:100/l.options.slidesPerRow+"%",display:"inline-block"})}},e.prototype.checkResponsive=function(e,t){var o,s,n,r=this,l=!1,d=r.$slider.width(),a=window.innerWidth||i(window).width();if("window"===r.respondTo?n=a:"slider"===r.respondTo?n=d:"min"===r.respondTo&&(n=Math.min(a,d)),r.options.responsive&&r.options.responsive.length&&null!==r.options.responsive){s=null;for(o in r.breakpoints)r.breakpoints.hasOwnProperty(o)&&(!1===r.originalSettings.mobileFirst?n<r.breakpoints[o]&&(s=r.breakpoints[o]):n>r.breakpoints[o]&&(s=r.breakpoints[o]));null!==s?null!==r.activeBreakpoint?(s!==r.activeBreakpoint||t)&&(r.activeBreakpoint=s,"unslick"===r.breakpointSettings[s]?r.unslick(s):(r.options=i.extend({},r.originalSettings,r.breakpointSettings[s]),!0===e&&(r.currentSlide=r.options.initialSlide),r.refresh(e)),l=s):(r.activeBreakpoint=s,"unslick"===r.breakpointSettings[s]?r.unslick(s):(r.options=i.extend({},r.originalSettings,r.breakpointSettings[s]),!0===e&&(r.currentSlide=r.options.initialSlide),r.refresh(e)),l=s):null!==r.activeBreakpoint&&(r.activeBreakpoint=null,r.options=r.originalSettings,!0===e&&(r.currentSlide=r.options.initialSlide),r.refresh(e),l=s),e||!1===l||r.$slider.trigger("breakpoint",[r,l])}},e.prototype.changeSlide=function(e,t){var o,s,n,r=this,l=i(e.currentTarget);switch(l.is("a")&&e.preventDefault(),l.is("li")||(l=l.closest("li")),n=r.slideCount%r.options.slidesToScroll!=0,o=n?0:(r.slideCount-r.currentSlide)%r.options.slidesToScroll,e.data.message){case"previous":s=0===o?r.options.slidesToScroll:r.options.slidesToShow-o,r.slideCount>r.options.slidesToShow&&r.slideHandler(r.currentSlide-s,!1,t);break;case"next":s=0===o?r.options.slidesToScroll:o,r.slideCount>r.options.slidesToShow&&r.slideHandler(r.currentSlide+s,!1,t);break;case"index":var d=0===e.data.index?0:e.data.index||l.index()*r.options.slidesToScroll;r.slideHandler(r.checkNavigable(d),!1,t),l.children().trigger("focus");break;default:return}},e.prototype.checkNavigable=function(i){var e,t;if(e=this.getNavigableIndexes(),t=0,i>e[e.length-1])i=e[e.length-1];else for(var o in e){if(i<e[o]){i=t;break}t=e[o]}return i},e.prototype.cleanUpEvents=function(){var e=this;e.options.dots&&null!==e.$dots&&(i("li",e.$dots).off("click.slick",e.changeSlide).off("mouseenter.slick",i.proxy(e.interrupt,e,!0)).off("mouseleave.slick",i.proxy(e.interrupt,e,!1)),!0===e.options.accessibility&&e.$dots.off("keydown.slick",e.keyHandler)),e.$slider.off("focus.slick blur.slick"),!0===e.options.arrows&&e.slideCount>e.options.slidesToShow&&(e.$prevArrow&&e.$prevArrow.off("click.slick",e.changeSlide),e.$nextArrow&&e.$nextArrow.off("click.slick",e.changeSlide),!0===e.options.accessibility&&(e.$prevArrow&&e.$prevArrow.off("keydown.slick",e.keyHandler),e.$nextArrow&&e.$nextArrow.off("keydown.slick",e.keyHandler))),e.$list.off("touchstart.slick mousedown.slick",e.swipeHandler),e.$list.off("touchmove.slick mousemove.slick",e.swipeHandler),e.$list.off("touchend.slick mouseup.slick",e.swipeHandler),e.$list.off("touchcancel.slick mouseleave.slick",e.swipeHandler),e.$list.off("click.slick",e.clickHandler),i(document).off(e.visibilityChange,e.visibility),e.cleanUpSlideEvents(),!0===e.options.accessibility&&e.$list.off("keydown.slick",e.keyHandler),!0===e.options.focusOnSelect&&i(e.$slideTrack).children().off("click.slick",e.selectHandler),i(window).off("orientationchange.slick.slick-"+e.instanceUid,e.orientationChange),i(window).off("resize.slick.slick-"+e.instanceUid,e.resize),i("[draggable!=true]",e.$slideTrack).off("dragstart",e.preventDefault),i(window).off("load.slick.slick-"+e.instanceUid,e.setPosition)},e.prototype.cleanUpSlideEvents=function(){var e=this;e.$list.off("mouseenter.slick",i.proxy(e.interrupt,e,!0)),e.$list.off("mouseleave.slick",i.proxy(e.interrupt,e,!1))},e.prototype.cleanUpRows=function(){var i,e=this;e.options.rows>1&&((i=e.$slides.children().children()).removeAttr("style"),e.$slider.empty().append(i))},e.prototype.clickHandler=function(i){!1===this.shouldClick&&(i.stopImmediatePropagation(),i.stopPropagation(),i.preventDefault())},e.prototype.destroy=function(e){var t=this;t.autoPlayClear(),t.touchObject={},t.cleanUpEvents(),i(".slick-cloned",t.$slider).detach(),t.$dots&&t.$dots.remove(),t.$prevArrow&&t.$prevArrow.length&&(t.$prevArrow.removeClass("slick-disabled slick-arrow slick-hidden").removeAttr("aria-hidden aria-disabled tabindex").css("display",""),t.htmlExpr.test(t.options.prevArrow)&&t.$prevArrow.remove()),t.$nextArrow&&t.$nextArrow.length&&(t.$nextArrow.removeClass("slick-disabled slick-arrow slick-hidden").removeAttr("aria-hidden aria-disabled tabindex").css("display",""),t.htmlExpr.test(t.options.nextArrow)&&t.$nextArrow.remove()),t.$slides&&(t.$slides.removeClass("slick-slide slick-active slick-center slick-visible slick-current").removeAttr("aria-hidden").removeAttr("data-slick-index").each(function(){i(this).attr("style",i(this).data("originalStyling"))}),t.$slideTrack.children(this.options.slide).detach(),t.$slideTrack.detach(),t.$list.detach(),t.$slider.append(t.$slides)),t.cleanUpRows(),t.$slider.removeClass("slick-slider"),t.$slider.removeClass("slick-initialized"),t.$slider.removeClass("slick-dotted"),t.unslicked=!0,e||t.$slider.trigger("destroy",[t])},e.prototype.disableTransition=function(i){var e=this,t={};t[e.transitionType]="",!1===e.options.fade?e.$slideTrack.css(t):e.$slides.eq(i).css(t)},e.prototype.fadeSlide=function(i,e){var t=this;!1===t.cssTransitions?(t.$slides.eq(i).css({zIndex:t.options.zIndex}),t.$slides.eq(i).animate({opacity:1},t.options.speed,t.options.easing,e)):(t.applyTransition(i),t.$slides.eq(i).css({opacity:1,zIndex:t.options.zIndex}),e&&setTimeout(function(){t.disableTransition(i),e.call()},t.options.speed))},e.prototype.fadeSlideOut=function(i){var e=this;!1===e.cssTransitions?e.$slides.eq(i).animate({opacity:0,zIndex:e.options.zIndex-2},e.options.speed,e.options.easing):(e.applyTransition(i),e.$slides.eq(i).css({opacity:0,zIndex:e.options.zIndex-2}))},e.prototype.filterSlides=e.prototype.slickFilter=function(i){var e=this;null!==i&&(e.$slidesCache=e.$slides,e.unload(),e.$slideTrack.children(this.options.slide).detach(),e.$slidesCache.filter(i).appendTo(e.$slideTrack),e.reinit())},e.prototype.focusHandler=function(){var e=this;e.$slider.off("focus.slick blur.slick").on("focus.slick blur.slick","*",function(t){t.stopImmediatePropagation();var o=i(this);setTimeout(function(){e.options.pauseOnFocus&&(e.focussed=o.is(":focus"),e.autoPlay())},0)})},e.prototype.getCurrent=e.prototype.slickCurrentSlide=function(){return this.currentSlide},e.prototype.getDotCount=function(){var i=this,e=0,t=0,o=0;if(!0===i.options.infinite)if(i.slideCount<=i.options.slidesToShow)++o;else for(;e<i.slideCount;)++o,e=t+i.options.slidesToScroll,t+=i.options.slidesToScroll<=i.options.slidesToShow?i.options.slidesToScroll:i.options.slidesToShow;else if(!0===i.options.centerMode)o=i.slideCount;else if(i.options.asNavFor)for(;e<i.slideCount;)++o,e=t+i.options.slidesToScroll,t+=i.options.slidesToScroll<=i.options.slidesToShow?i.options.slidesToScroll:i.options.slidesToShow;else o=1+Math.ceil((i.slideCount-i.options.slidesToShow)/i.options.slidesToScroll);return o-1},e.prototype.getLeft=function(i){var e,t,o,s,n=this,r=0;return n.slideOffset=0,t=n.$slides.first().outerHeight(!0),!0===n.options.infinite?(n.slideCount>n.options.slidesToShow&&(n.slideOffset=n.slideWidth*n.options.slidesToShow*-1,s=-1,!0===n.options.vertical&&!0===n.options.centerMode&&(2===n.options.slidesToShow?s=-1.5:1===n.options.slidesToShow&&(s=-2)),r=t*n.options.slidesToShow*s),n.slideCount%n.options.slidesToScroll!=0&&i+n.options.slidesToScroll>n.slideCount&&n.slideCount>n.options.slidesToShow&&(i>n.slideCount?(n.slideOffset=(n.options.slidesToShow-(i-n.slideCount))*n.slideWidth*-1,r=(n.options.slidesToShow-(i-n.slideCount))*t*-1):(n.slideOffset=n.slideCount%n.options.slidesToScroll*n.slideWidth*-1,r=n.slideCount%n.options.slidesToScroll*t*-1))):i+n.options.slidesToShow>n.slideCount&&(n.slideOffset=(i+n.options.slidesToShow-n.slideCount)*n.slideWidth,r=(i+n.options.slidesToShow-n.slideCount)*t),n.slideCount<=n.options.slidesToShow&&(n.slideOffset=0,r=0),!0===n.options.centerMode&&n.slideCount<=n.options.slidesToShow?n.slideOffset=n.slideWidth*Math.floor(n.options.slidesToShow)/2-n.slideWidth*n.slideCount/2:!0===n.options.centerMode&&!0===n.options.infinite?n.slideOffset+=n.slideWidth*Math.floor(n.options.slidesToShow/2)-n.slideWidth:!0===n.options.centerMode&&(n.slideOffset=0,n.slideOffset+=n.slideWidth*Math.floor(n.options.slidesToShow/2)),e=!1===n.options.vertical?i*n.slideWidth*-1+n.slideOffset:i*t*-1+r,!0===n.options.variableWidth&&(o=n.slideCount<=n.options.slidesToShow||!1===n.options.infinite?n.$slideTrack.children(".slick-slide").eq(i):n.$slideTrack.children(".slick-slide").eq(i+n.options.slidesToShow),e=!0===n.options.rtl?o[0]?-1*(n.$slideTrack.width()-o[0].offsetLeft-o.width()):0:o[0]?-1*o[0].offsetLeft:0,!0===n.options.centerMode&&(o=n.slideCount<=n.options.slidesToShow||!1===n.options.infinite?n.$slideTrack.children(".slick-slide").eq(i):n.$slideTrack.children(".slick-slide").eq(i+n.options.slidesToShow+1),e=!0===n.options.rtl?o[0]?-1*(n.$slideTrack.width()-o[0].offsetLeft-o.width()):0:o[0]?-1*o[0].offsetLeft:0,e+=(n.$list.width()-o.outerWidth())/2)),e},e.prototype.getOption=e.prototype.slickGetOption=function(i){return this.options[i]},e.prototype.getNavigableIndexes=function(){var i,e=this,t=0,o=0,s=[];for(!1===e.options.infinite?i=e.slideCount:(t=-1*e.options.slidesToScroll,o=-1*e.options.slidesToScroll,i=2*e.slideCount);t<i;)s.push(t),t=o+e.options.slidesToScroll,o+=e.options.slidesToScroll<=e.options.slidesToShow?e.options.slidesToScroll:e.options.slidesToShow;return s},e.prototype.getSlick=function(){return this},e.prototype.getSlideCount=function(){var e,t,o=this;return t=!0===o.options.centerMode?o.slideWidth*Math.floor(o.options.slidesToShow/2):0,!0===o.options.swipeToSlide?(o.$slideTrack.find(".slick-slide").each(function(s,n){if(n.offsetLeft-t+i(n).outerWidth()/2>-1*o.swipeLeft)return e=n,!1}),Math.abs(i(e).attr("data-slick-index")-o.currentSlide)||1):o.options.slidesToScroll},e.prototype.goTo=e.prototype.slickGoTo=function(i,e){this.changeSlide({data:{message:"index",index:parseInt(i)}},e)},e.prototype.init=function(e){var t=this;i(t.$slider).hasClass("slick-initialized")||(i(t.$slider).addClass("slick-initialized"),t.buildRows(),t.buildOut(),t.setProps(),t.startLoad(),t.loadSlider(),t.initializeEvents(),t.updateArrows(),t.updateDots(),t.checkResponsive(!0),t.focusHandler()),e&&t.$slider.trigger("init",[t]),!0===t.options.accessibility&&t.initADA(),t.options.autoplay&&(t.paused=!1,t.autoPlay())},e.prototype.initADA=function(){var e=this,t=Math.ceil(e.slideCount/e.options.slidesToShow),o=e.getNavigableIndexes().filter(function(i){return i>=0&&i<e.slideCount});e.$slides.add(e.$slideTrack.find(".slick-cloned")).attr({"aria-hidden":"true",tabindex:"-1"}).find("a, input, button, select").attr({tabindex:"-1"}),null!==e.$dots&&(e.$slides.not(e.$slideTrack.find(".slick-cloned")).each(function(t){var s=o.indexOf(t);i(this).attr({role:"tabpanel",id:"slick-slide"+e.instanceUid+t,tabindex:-1}),-1!==s&&i(this).attr({"aria-describedby":"slick-slide-control"+e.instanceUid+s})}),e.$dots.attr("role","tablist").find("li").each(function(s){var n=o[s];i(this).attr({role:"presentation"}),i(this).find("button").first().attr({role:"tab",id:"slick-slide-control"+e.instanceUid+s,"aria-controls":"slick-slide"+e.instanceUid+n,"aria-label":s+1+" of "+t,"aria-selected":null,tabindex:"-1"})}).eq(e.currentSlide).find("button").attr({"aria-selected":"true",tabindex:"0"}).end());for(var s=e.currentSlide,n=s+e.options.slidesToShow;s<n;s++)e.$slides.eq(s).attr("tabindex",0);e.activateADA()},e.prototype.initArrowEvents=function(){var i=this;!0===i.options.arrows&&i.slideCount>i.options.slidesToShow&&(i.$prevArrow.off("click.slick").on("click.slick",{message:"previous"},i.changeSlide),i.$nextArrow.off("click.slick").on("click.slick",{message:"next"},i.changeSlide),!0===i.options.accessibility&&(i.$prevArrow.on("keydown.slick",i.keyHandler),i.$nextArrow.on("keydown.slick",i.keyHandler)))},e.prototype.initDotEvents=function(){var e=this;!0===e.options.dots&&(i("li",e.$dots).on("click.slick",{message:"index"},e.changeSlide),!0===e.options.accessibility&&e.$dots.on("keydown.slick",e.keyHandler)),!0===e.options.dots&&!0===e.options.pauseOnDotsHover&&i("li",e.$dots).on("mouseenter.slick",i.proxy(e.interrupt,e,!0)).on("mouseleave.slick",i.proxy(e.interrupt,e,!1))},e.prototype.initSlideEvents=function(){var e=this;e.options.pauseOnHover&&(e.$list.on("mouseenter.slick",i.proxy(e.interrupt,e,!0)),e.$list.on("mouseleave.slick",i.proxy(e.interrupt,e,!1)))},e.prototype.initializeEvents=function(){var e=this;e.initArrowEvents(),e.initDotEvents(),e.initSlideEvents(),e.$list.on("touchstart.slick mousedown.slick",{action:"start"},e.swipeHandler),e.$list.on("touchmove.slick mousemove.slick",{action:"move"},e.swipeHandler),e.$list.on("touchend.slick mouseup.slick",{action:"end"},e.swipeHandler),e.$list.on("touchcancel.slick mouseleave.slick",{action:"end"},e.swipeHandler),e.$list.on("click.slick",e.clickHandler),i(document).on(e.visibilityChange,i.proxy(e.visibility,e)),!0===e.options.accessibility&&e.$list.on("keydown.slick",e.keyHandler),!0===e.options.focusOnSelect&&i(e.$slideTrack).children().on("click.slick",e.selectHandler),i(window).on("orientationchange.slick.slick-"+e.instanceUid,i.proxy(e.orientationChange,e)),i(window).on("resize.slick.slick-"+e.instanceUid,i.proxy(e.resize,e)),i("[draggable!=true]",e.$slideTrack).on("dragstart",e.preventDefault),i(window).on("load.slick.slick-"+e.instanceUid,e.setPosition),i(e.setPosition)},e.prototype.initUI=function(){var i=this;!0===i.options.arrows&&i.slideCount>i.options.slidesToShow&&(i.$prevArrow.show(),i.$nextArrow.show()),!0===i.options.dots&&i.slideCount>i.options.slidesToShow&&i.$dots.show()},e.prototype.keyHandler=function(i){var e=this;i.target.tagName.match("TEXTAREA|INPUT|SELECT")||(37===i.keyCode&&!0===e.options.accessibility?e.changeSlide({data:{message:!0===e.options.rtl?"next":"previous"}}):39===i.keyCode&&!0===e.options.accessibility&&e.changeSlide({data:{message:!0===e.options.rtl?"previous":"next"}}))},e.prototype.lazyLoad=function(){function e(e){i("img[data-lazy]",e).each(function(){var e=i(this),t=i(this).attr("data-lazy"),o=i(this).attr("data-srcset"),s=i(this).attr("data-sizes")||n.$slider.attr("data-sizes"),r=document.createElement("img");r.onload=function(){e.animate({opacity:0},100,function(){o&&(e.attr("srcset",o),s&&e.attr("sizes",s)),e.attr("src",t).animate({opacity:1},200,function(){e.removeAttr("data-lazy data-srcset data-sizes").removeClass("slick-loading")}),n.$slider.trigger("lazyLoaded",[n,e,t])})},r.onerror=function(){e.removeAttr("data-lazy").removeClass("slick-loading").addClass("slick-lazyload-error"),n.$slider.trigger("lazyLoadError",[n,e,t])},r.src=t})}var t,o,s,n=this;if(!0===n.options.centerMode?!0===n.options.infinite?s=(o=n.currentSlide+(n.options.slidesToShow/2+1))+n.options.slidesToShow+2:(o=Math.max(0,n.currentSlide-(n.options.slidesToShow/2+1)),s=n.options.slidesToShow/2+1+2+n.currentSlide):(o=n.options.infinite?n.options.slidesToShow+n.currentSlide:n.currentSlide,s=Math.ceil(o+n.options.slidesToShow),!0===n.options.fade&&(o>0&&o--,s<=n.slideCount&&s++)),t=n.$slider.find(".slick-slide").slice(o,s),"anticipated"===n.options.lazyLoad)for(var r=o-1,l=s,d=n.$slider.find(".slick-slide"),a=0;a<n.options.slidesToScroll;a++)r<0&&(r=n.slideCount-1),t=(t=t.add(d.eq(r))).add(d.eq(l)),r--,l++;e(t),n.slideCount<=n.options.slidesToShow?e(n.$slider.find(".slick-slide")):n.currentSlide>=n.slideCount-n.options.slidesToShow?e(n.$slider.find(".slick-cloned").slice(0,n.options.slidesToShow)):0===n.currentSlide&&e(n.$slider.find(".slick-cloned").slice(-1*n.options.slidesToShow))},e.prototype.loadSlider=function(){var i=this;i.setPosition(),i.$slideTrack.css({opacity:1}),i.$slider.removeClass("slick-loading"),i.initUI(),"progressive"===i.options.lazyLoad&&i.progressiveLazyLoad()},e.prototype.next=e.prototype.slickNext=function(){this.changeSlide({data:{message:"next"}})},e.prototype.orientationChange=function(){var i=this;i.checkResponsive(),i.setPosition()},e.prototype.pause=e.prototype.slickPause=function(){var i=this;i.autoPlayClear(),i.paused=!0},e.prototype.play=e.prototype.slickPlay=function(){var i=this;i.autoPlay(),i.options.autoplay=!0,i.paused=!1,i.focussed=!1,i.interrupted=!1},e.prototype.postSlide=function(e){var t=this;t.unslicked||(t.$slider.trigger("afterChange",[t,e]),t.animating=!1,t.slideCount>t.options.slidesToShow&&t.setPosition(),t.swipeLeft=null,t.options.autoplay&&t.autoPlay(),!0===t.options.accessibility&&(t.initADA(),t.options.focusOnChange&&i(t.$slides.get(t.currentSlide)).attr("tabindex",0).focus()))},e.prototype.prev=e.prototype.slickPrev=function(){this.changeSlide({data:{message:"previous"}})},e.prototype.preventDefault=function(i){i.preventDefault()},e.prototype.progressiveLazyLoad=function(e){e=e||1;var t,o,s,n,r,l=this,d=i("img[data-lazy]",l.$slider);d.length?(t=d.first(),o=t.attr("data-lazy"),s=t.attr("data-srcset"),n=t.attr("data-sizes")||l.$slider.attr("data-sizes"),(r=document.createElement("img")).onload=function(){s&&(t.attr("srcset",s),n&&t.attr("sizes",n)),t.attr("src",o).removeAttr("data-lazy data-srcset data-sizes").removeClass("slick-loading"),!0===l.options.adaptiveHeight&&l.setPosition(),l.$slider.trigger("lazyLoaded",[l,t,o]),l.progressiveLazyLoad()},r.onerror=function(){e<3?setTimeout(function(){l.progressiveLazyLoad(e+1)},500):(t.removeAttr("data-lazy").removeClass("slick-loading").addClass("slick-lazyload-error"),l.$slider.trigger("lazyLoadError",[l,t,o]),l.progressiveLazyLoad())},r.src=o):l.$slider.trigger("allImagesLoaded",[l])},e.prototype.refresh=function(e){var t,o,s=this;o=s.slideCount-s.options.slidesToShow,!s.options.infinite&&s.currentSlide>o&&(s.currentSlide=o),s.slideCount<=s.options.slidesToShow&&(s.currentSlide=0),t=s.currentSlide,s.destroy(!0),i.extend(s,s.initials,{currentSlide:t}),s.init(),e||s.changeSlide({data:{message:"index",index:t}},!1)},e.prototype.registerBreakpoints=function(){var e,t,o,s=this,n=s.options.responsive||null;if("array"===i.type(n)&&n.length){s.respondTo=s.options.respondTo||"window";for(e in n)if(o=s.breakpoints.length-1,n.hasOwnProperty(e)){for(t=n[e].breakpoint;o>=0;)s.breakpoints[o]&&s.breakpoints[o]===t&&s.breakpoints.splice(o,1),o--;s.breakpoints.push(t),s.breakpointSettings[t]=n[e].settings}s.breakpoints.sort(function(i,e){return s.options.mobileFirst?i-e:e-i})}},e.prototype.reinit=function(){var e=this;e.$slides=e.$slideTrack.children(e.options.slide).addClass("slick-slide"),e.slideCount=e.$slides.length,e.currentSlide>=e.slideCount&&0!==e.currentSlide&&(e.currentSlide=e.currentSlide-e.options.slidesToScroll),e.slideCount<=e.options.slidesToShow&&(e.currentSlide=0),e.registerBreakpoints(),e.setProps(),e.setupInfinite(),e.buildArrows(),e.updateArrows(),e.initArrowEvents(),e.buildDots(),e.updateDots(),e.initDotEvents(),e.cleanUpSlideEvents(),e.initSlideEvents(),e.checkResponsive(!1,!0),!0===e.options.focusOnSelect&&i(e.$slideTrack).children().on("click.slick",e.selectHandler),e.setSlideClasses("number"==typeof e.currentSlide?e.currentSlide:0),e.setPosition(),e.focusHandler(),e.paused=!e.options.autoplay,e.autoPlay(),e.$slider.trigger("reInit",[e])},e.prototype.resize=function(){var e=this;i(window).width()!==e.windowWidth&&(clearTimeout(e.windowDelay),e.windowDelay=window.setTimeout(function(){e.windowWidth=i(window).width(),e.checkResponsive(),e.unslicked||e.setPosition()},50))},e.prototype.removeSlide=e.prototype.slickRemove=function(i,e,t){var o=this;if(i="boolean"==typeof i?!0===(e=i)?0:o.slideCount-1:!0===e?--i:i,o.slideCount<1||i<0||i>o.slideCount-1)return!1;o.unload(),!0===t?o.$slideTrack.children().remove():o.$slideTrack.children(this.options.slide).eq(i).remove(),o.$slides=o.$slideTrack.children(this.options.slide),o.$slideTrack.children(this.options.slide).detach(),o.$slideTrack.append(o.$slides),o.$slidesCache=o.$slides,o.reinit()},e.prototype.setCSS=function(i){var e,t,o=this,s={};!0===o.options.rtl&&(i=-i),e="left"==o.positionProp?Math.ceil(i)+"px":"0px",t="top"==o.positionProp?Math.ceil(i)+"px":"0px",s[o.positionProp]=i,!1===o.transformsEnabled?o.$slideTrack.css(s):(s={},!1===o.cssTransitions?(s[o.animType]="translate("+e+", "+t+")",o.$slideTrack.css(s)):(s[o.animType]="translate3d("+e+", "+t+", 0px)",o.$slideTrack.css(s)))},e.prototype.setDimensions=function(){var i=this;!1===i.options.vertical?!0===i.options.centerMode&&i.$list.css({padding:"0px "+i.options.centerPadding}):(i.$list.height(i.$slides.first().outerHeight(!0)*i.options.slidesToShow),!0===i.options.centerMode&&i.$list.css({padding:i.options.centerPadding+" 0px"})),i.listWidth=i.$list.width(),i.listHeight=i.$list.height(),!1===i.options.vertical&&!1===i.options.variableWidth?(i.slideWidth=Math.ceil(i.listWidth/i.options.slidesToShow),i.$slideTrack.width(Math.ceil(i.slideWidth*i.$slideTrack.children(".slick-slide").length))):!0===i.options.variableWidth?i.$slideTrack.width(5e3*i.slideCount):(i.slideWidth=Math.ceil(i.listWidth),i.$slideTrack.height(Math.ceil(i.$slides.first().outerHeight(!0)*i.$slideTrack.children(".slick-slide").length)));var e=i.$slides.first().outerWidth(!0)-i.$slides.first().width();!1===i.options.variableWidth&&i.$slideTrack.children(".slick-slide").width(i.slideWidth-e)},e.prototype.setFade=function(){var e,t=this;t.$slides.each(function(o,s){e=t.slideWidth*o*-1,!0===t.options.rtl?i(s).css({position:"relative",right:e,top:0,zIndex:t.options.zIndex-2,opacity:0}):i(s).css({position:"relative",left:e,top:0,zIndex:t.options.zIndex-2,opacity:0})}),t.$slides.eq(t.currentSlide).css({zIndex:t.options.zIndex-1,opacity:1})},e.prototype.setHeight=function(){var i=this;if(1===i.options.slidesToShow&&!0===i.options.adaptiveHeight&&!1===i.options.vertical){var e=i.$slides.eq(i.currentSlide).outerHeight(!0);i.$list.css("height",e)}},e.prototype.setOption=e.prototype.slickSetOption=function(){var e,t,o,s,n,r=this,l=!1;if("object"===i.type(arguments[0])?(o=arguments[0],l=arguments[1],n="multiple"):"string"===i.type(arguments[0])&&(o=arguments[0],s=arguments[1],l=arguments[2],"responsive"===arguments[0]&&"array"===i.type(arguments[1])?n="responsive":void 0!==arguments[1]&&(n="single")),"single"===n)r.options[o]=s;else if("multiple"===n)i.each(o,function(i,e){r.options[i]=e});else if("responsive"===n)for(t in s)if("array"!==i.type(r.options.responsive))r.options.responsive=[s[t]];else{for(e=r.options.responsive.length-1;e>=0;)r.options.responsive[e].breakpoint===s[t].breakpoint&&r.options.responsive.splice(e,1),e--;r.options.responsive.push(s[t])}l&&(r.unload(),r.reinit())},e.prototype.setPosition=function(){var i=this;i.setDimensions(),i.setHeight(),!1===i.options.fade?i.setCSS(i.getLeft(i.currentSlide)):i.setFade(),i.$slider.trigger("setPosition",[i])},e.prototype.setProps=function(){var i=this,e=document.body.style;i.positionProp=!0===i.options.vertical?"top":"left","top"===i.positionProp?i.$slider.addClass("slick-vertical"):i.$slider.removeClass("slick-vertical"),void 0===e.WebkitTransition&&void 0===e.MozTransition&&void 0===e.msTransition||!0===i.options.useCSS&&(i.cssTransitions=!0),i.options.fade&&("number"==typeof i.options.zIndex?i.options.zIndex<3&&(i.options.zIndex=3):i.options.zIndex=i.defaults.zIndex),void 0!==e.OTransform&&(i.animType="OTransform",i.transformType="-o-transform",i.transitionType="OTransition",void 0===e.perspectiveProperty&&void 0===e.webkitPerspective&&(i.animType=!1)),void 0!==e.MozTransform&&(i.animType="MozTransform",i.transformType="-moz-transform",i.transitionType="MozTransition",void 0===e.perspectiveProperty&&void 0===e.MozPerspective&&(i.animType=!1)),void 0!==e.webkitTransform&&(i.animType="webkitTransform",i.transformType="-webkit-transform",i.transitionType="webkitTransition",void 0===e.perspectiveProperty&&void 0===e.webkitPerspective&&(i.animType=!1)),void 0!==e.msTransform&&(i.animType="msTransform",i.transformType="-ms-transform",i.transitionType="msTransition",void 0===e.msTransform&&(i.animType=!1)),void 0!==e.transform&&!1!==i.animType&&(i.animType="transform",i.transformType="transform",i.transitionType="transition"),i.transformsEnabled=i.options.useTransform&&null!==i.animType&&!1!==i.animType},e.prototype.setSlideClasses=function(i){var e,t,o,s,n=this;if(t=n.$slider.find(".slick-slide").removeClass("slick-active slick-center slick-current").attr("aria-hidden","true"),n.$slides.eq(i).addClass("slick-current"),!0===n.options.centerMode){var r=n.options.slidesToShow%2==0?1:0;e=Math.floor(n.options.slidesToShow/2),!0===n.options.infinite&&(i>=e&&i<=n.slideCount-1-e?n.$slides.slice(i-e+r,i+e+1).addClass("slick-active").attr("aria-hidden","false"):(o=n.options.slidesToShow+i,t.slice(o-e+1+r,o+e+2).addClass("slick-active").attr("aria-hidden","false")),0===i?t.eq(t.length-1-n.options.slidesToShow).addClass("slick-center"):i===n.slideCount-1&&t.eq(n.options.slidesToShow).addClass("slick-center")),n.$slides.eq(i).addClass("slick-center")}else i>=0&&i<=n.slideCount-n.options.slidesToShow?n.$slides.slice(i,i+n.options.slidesToShow).addClass("slick-active").attr("aria-hidden","false"):t.length<=n.options.slidesToShow?t.addClass("slick-active").attr("aria-hidden","false"):(s=n.slideCount%n.options.slidesToShow,o=!0===n.options.infinite?n.options.slidesToShow+i:i,n.options.slidesToShow==n.options.slidesToScroll&&n.slideCount-i<n.options.slidesToShow?t.slice(o-(n.options.slidesToShow-s),o+s).addClass("slick-active").attr("aria-hidden","false"):t.slice(o,o+n.options.slidesToShow).addClass("slick-active").attr("aria-hidden","false"));"ondemand"!==n.options.lazyLoad&&"anticipated"!==n.options.lazyLoad||n.lazyLoad()},e.prototype.setupInfinite=function(){var e,t,o,s=this;if(!0===s.options.fade&&(s.options.centerMode=!1),!0===s.options.infinite&&!1===s.options.fade&&(t=null,s.slideCount>s.options.slidesToShow)){for(o=!0===s.options.centerMode?s.options.slidesToShow+1:s.options.slidesToShow,e=s.slideCount;e>s.slideCount-o;e-=1)t=e-1,i(s.$slides[t]).clone(!0).attr("id","").attr("data-slick-index",t-s.slideCount).prependTo(s.$slideTrack).addClass("slick-cloned");for(e=0;e<o+s.slideCount;e+=1)t=e,i(s.$slides[t]).clone(!0).attr("id","").attr("data-slick-index",t+s.slideCount).appendTo(s.$slideTrack).addClass("slick-cloned");s.$slideTrack.find(".slick-cloned").find("[id]").each(function(){i(this).attr("id","")})}},e.prototype.interrupt=function(i){var e=this;i||e.autoPlay(),e.interrupted=i},e.prototype.selectHandler=function(e){var t=this,o=i(e.target).is(".slick-slide")?i(e.target):i(e.target).parents(".slick-slide"),s=parseInt(o.attr("data-slick-index"));s||(s=0),t.slideCount<=t.options.slidesToShow?t.slideHandler(s,!1,!0):t.slideHandler(s)},e.prototype.slideHandler=function(i,e,t){var o,s,n,r,l,d=null,a=this;if(e=e||!1,!(!0===a.animating&&!0===a.options.waitForAnimate||!0===a.options.fade&&a.currentSlide===i))if(!1===e&&a.asNavFor(i),o=i,d=a.getLeft(o),r=a.getLeft(a.currentSlide),a.currentLeft=null===a.swipeLeft?r:a.swipeLeft,!1===a.options.infinite&&!1===a.options.centerMode&&(i<0||i>a.getDotCount()*a.options.slidesToScroll))!1===a.options.fade&&(o=a.currentSlide,!0!==t?a.animateSlide(r,function(){a.postSlide(o)}):a.postSlide(o));else if(!1===a.options.infinite&&!0===a.options.centerMode&&(i<0||i>a.slideCount-a.options.slidesToScroll))!1===a.options.fade&&(o=a.currentSlide,!0!==t?a.animateSlide(r,function(){a.postSlide(o)}):a.postSlide(o));else{if(a.options.autoplay&&clearInterval(a.autoPlayTimer),s=o<0?a.slideCount%a.options.slidesToScroll!=0?a.slideCount-a.slideCount%a.options.slidesToScroll:a.slideCount+o:o>=a.slideCount?a.slideCount%a.options.slidesToScroll!=0?0:o-a.slideCount:o,a.animating=!0,a.$slider.trigger("beforeChange",[a,a.currentSlide,s]),n=a.currentSlide,a.currentSlide=s,a.setSlideClasses(a.currentSlide),a.options.asNavFor&&(l=(l=a.getNavTarget()).slick("getSlick")).slideCount<=l.options.slidesToShow&&l.setSlideClasses(a.currentSlide),a.updateDots(),a.updateArrows(),!0===a.options.fade)return!0!==t?(a.fadeSlideOut(n),a.fadeSlide(s,function(){a.postSlide(s)})):a.postSlide(s),void a.animateHeight();!0!==t?a.animateSlide(d,function(){a.postSlide(s)}):a.postSlide(s)}},e.prototype.startLoad=function(){var i=this;!0===i.options.arrows&&i.slideCount>i.options.slidesToShow&&(i.$prevArrow.hide(),i.$nextArrow.hide()),!0===i.options.dots&&i.slideCount>i.options.slidesToShow&&i.$dots.hide(),i.$slider.addClass("slick-loading")},e.prototype.swipeDirection=function(){var i,e,t,o,s=this;return i=s.touchObject.startX-s.touchObject.curX,e=s.touchObject.startY-s.touchObject.curY,t=Math.atan2(e,i),(o=Math.round(180*t/Math.PI))<0&&(o=360-Math.abs(o)),o<=45&&o>=0?!1===s.options.rtl?"left":"right":o<=360&&o>=315?!1===s.options.rtl?"left":"right":o>=135&&o<=225?!1===s.options.rtl?"right":"left":!0===s.options.verticalSwiping?o>=35&&o<=135?"down":"up":"vertical"},e.prototype.swipeEnd=function(i){var e,t,o=this;if(o.dragging=!1,o.swiping=!1,o.scrolling)return o.scrolling=!1,!1;if(o.interrupted=!1,o.shouldClick=!(o.touchObject.swipeLength>10),void 0===o.touchObject.curX)return!1;if(!0===o.touchObject.edgeHit&&o.$slider.trigger("edge",[o,o.swipeDirection()]),o.touchObject.swipeLength>=o.touchObject.minSwipe){switch(t=o.swipeDirection()){case"left":case"down":e=o.options.swipeToSlide?o.checkNavigable(o.currentSlide+o.getSlideCount()):o.currentSlide+o.getSlideCount(),o.currentDirection=0;break;case"right":case"up":e=o.options.swipeToSlide?o.checkNavigable(o.currentSlide-o.getSlideCount()):o.currentSlide-o.getSlideCount(),o.currentDirection=1}"vertical"!=t&&(o.slideHandler(e),o.touchObject={},o.$slider.trigger("swipe",[o,t]))}else o.touchObject.startX!==o.touchObject.curX&&(o.slideHandler(o.currentSlide),o.touchObject={})},e.prototype.swipeHandler=function(i){var e=this;if(!(!1===e.options.swipe||"ontouchend"in document&&!1===e.options.swipe||!1===e.options.draggable&&-1!==i.type.indexOf("mouse")))switch(e.touchObject.fingerCount=i.originalEvent&&void 0!==i.originalEvent.touches?i.originalEvent.touches.length:1,e.touchObject.minSwipe=e.listWidth/e.options.touchThreshold,!0===e.options.verticalSwiping&&(e.touchObject.minSwipe=e.listHeight/e.options.touchThreshold),i.data.action){case"start":e.swipeStart(i);break;case"move":e.swipeMove(i);break;case"end":e.swipeEnd(i)}},e.prototype.swipeMove=function(i){var e,t,o,s,n,r,l=this;return n=void 0!==i.originalEvent?i.originalEvent.touches:null,!(!l.dragging||l.scrolling||n&&1!==n.length)&&(e=l.getLeft(l.currentSlide),l.touchObject.curX=void 0!==n?n[0].pageX:i.clientX,l.touchObject.curY=void 0!==n?n[0].pageY:i.clientY,l.touchObject.swipeLength=Math.round(Math.sqrt(Math.pow(l.touchObject.curX-l.touchObject.startX,2))),r=Math.round(Math.sqrt(Math.pow(l.touchObject.curY-l.touchObject.startY,2))),!l.options.verticalSwiping&&!l.swiping&&r>4?(l.scrolling=!0,!1):(!0===l.options.verticalSwiping&&(l.touchObject.swipeLength=r),t=l.swipeDirection(),void 0!==i.originalEvent&&l.touchObject.swipeLength>4&&(l.swiping=!0,i.preventDefault()),s=(!1===l.options.rtl?1:-1)*(l.touchObject.curX>l.touchObject.startX?1:-1),!0===l.options.verticalSwiping&&(s=l.touchObject.curY>l.touchObject.startY?1:-1),o=l.touchObject.swipeLength,l.touchObject.edgeHit=!1,!1===l.options.infinite&&(0===l.currentSlide&&"right"===t||l.currentSlide>=l.getDotCount()&&"left"===t)&&(o=l.touchObject.swipeLength*l.options.edgeFriction,l.touchObject.edgeHit=!0),!1===l.options.vertical?l.swipeLeft=e+o*s:l.swipeLeft=e+o*(l.$list.height()/l.listWidth)*s,!0===l.options.verticalSwiping&&(l.swipeLeft=e+o*s),!0!==l.options.fade&&!1!==l.options.touchMove&&(!0===l.animating?(l.swipeLeft=null,!1):void l.setCSS(l.swipeLeft))))},e.prototype.swipeStart=function(i){var e,t=this;if(t.interrupted=!0,1!==t.touchObject.fingerCount||t.slideCount<=t.options.slidesToShow)return t.touchObject={},!1;void 0!==i.originalEvent&&void 0!==i.originalEvent.touches&&(e=i.originalEvent.touches[0]),t.touchObject.startX=t.touchObject.curX=void 0!==e?e.pageX:i.clientX,t.touchObject.startY=t.touchObject.curY=void 0!==e?e.pageY:i.clientY,t.dragging=!0},e.prototype.unfilterSlides=e.prototype.slickUnfilter=function(){var i=this;null!==i.$slidesCache&&(i.unload(),i.$slideTrack.children(this.options.slide).detach(),i.$slidesCache.appendTo(i.$slideTrack),i.reinit())},e.prototype.unload=function(){var e=this;i(".slick-cloned",e.$slider).remove(),e.$dots&&e.$dots.remove(),e.$prevArrow&&e.htmlExpr.test(e.options.prevArrow)&&e.$prevArrow.remove(),e.$nextArrow&&e.htmlExpr.test(e.options.nextArrow)&&e.$nextArrow.remove(),e.$slides.removeClass("slick-slide slick-active slick-visible slick-current").attr("aria-hidden","true").css("width","")},e.prototype.unslick=function(i){var e=this;e.$slider.trigger("unslick",[e,i]),e.destroy()},e.prototype.updateArrows=function(){var i=this;Math.floor(i.options.slidesToShow/2),!0===i.options.arrows&&i.slideCount>i.options.slidesToShow&&!i.options.infinite&&(i.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false"),i.$nextArrow.removeClass("slick-disabled").attr("aria-disabled","false"),0===i.currentSlide?(i.$prevArrow.addClass("slick-disabled").attr("aria-disabled","true"),i.$nextArrow.removeClass("slick-disabled").attr("aria-disabled","false")):i.currentSlide>=i.slideCount-i.options.slidesToShow&&!1===i.options.centerMode?(i.$nextArrow.addClass("slick-disabled").attr("aria-disabled","true"),i.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false")):i.currentSlide>=i.slideCount-1&&!0===i.options.centerMode&&(i.$nextArrow.addClass("slick-disabled").attr("aria-disabled","true"),i.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false")))},e.prototype.updateDots=function(){var i=this;null!==i.$dots&&(i.$dots.find("li").removeClass("slick-active").end(),i.$dots.find("li").eq(Math.floor(i.currentSlide/i.options.slidesToScroll)).addClass("slick-active"))},e.prototype.visibility=function(){var i=this;i.options.autoplay&&(document[i.hidden]?i.interrupted=!0:i.interrupted=!1)},i.fn.slick=function(){var i,t,o=this,s=arguments[0],n=Array.prototype.slice.call(arguments,1),r=o.length;for(i=0;i<r;i++)if("object"==typeof s||void 0===s?o[i].slick=new e(o[i],s):t=o[i].slick[s].apply(o[i].slick,n),void 0!==t)return t;return o}});
1310
1311(function (window, factory) {
1312 var lazySizes = factory(window, window.document);
1313 window.lazySizes = lazySizes;
1314 if (typeof module == 'object' && module.exports) {
1315 module.exports = lazySizes;
1316 }
1317}(window, function l(window, document) {
1318 'use strict';
1319 /*jshint eqnull:true */
1320 if (!document.getElementsByClassName) { return; }
1321
1322 var lazysizes, lazySizesConfig;
1323
1324 var docElem = document.documentElement;
1325
1326 var Date = window.Date;
1327
1328 var supportPicture = window.HTMLPictureElement;
1329
1330 var _addEventListener = 'addEventListener';
1331
1332 var _getAttribute = 'getAttribute';
1333
1334 var addEventListener = window[_addEventListener];
1335
1336 var setTimeout = window.setTimeout;
1337
1338 var requestAnimationFrame = window.requestAnimationFrame || setTimeout;
1339
1340 var requestIdleCallback = window.requestIdleCallback;
1341
1342 var regPicture = /^picture$/i;
1343
1344 var loadEvents = ['load', 'error', 'lazyincluded', '_lazyloaded'];
1345
1346 var regClassCache = {};
1347
1348 var forEach = Array.prototype.forEach;
1349
1350 var hasClass = function (ele, cls) {
1351 if (!regClassCache[cls]) {
1352 regClassCache[cls] = new RegExp('(\\s|^)' + cls + '(\\s|$)');
1353 }
1354 return regClassCache[cls].test(ele[_getAttribute]('class') || '') && regClassCache[cls];
1355 };
1356
1357 var addClass = function (ele, cls) {
1358 if (!hasClass(ele, cls)) {
1359 ele.setAttribute('class', (ele[_getAttribute]('class') || '').trim() + ' ' + cls);
1360 }
1361 };
1362
1363 var removeClass = function (ele, cls) {
1364 var reg;
1365 if ((reg = hasClass(ele, cls))) {
1366 ele.setAttribute('class', (ele[_getAttribute]('class') || '').replace(reg, ' '));
1367 }
1368 };
1369
1370 var addRemoveLoadEvents = function (dom, fn, add) {
1371 var action = add ? _addEventListener : 'removeEventListener';
1372 if (add) {
1373 addRemoveLoadEvents(dom, fn);
1374 }
1375 loadEvents.forEach(function (evt) {
1376 dom[action](evt, fn);
1377 });
1378 };
1379
1380 var triggerEvent = function (elem, name, detail, noBubbles, noCancelable) {
1381 var event = document.createEvent('CustomEvent');
1382
1383 if (!detail) {
1384 detail = {};
1385 }
1386
1387 detail.instance = lazysizes;
1388
1389 event.initCustomEvent(name, !noBubbles, !noCancelable, detail);
1390
1391 elem.dispatchEvent(event);
1392 return event;
1393 };
1394
1395 var updatePolyfill = function (el, full) {
1396 var polyfill;
1397 if (!supportPicture && (polyfill = (window.picturefill || lazySizesConfig.pf))) {
1398 polyfill({ reevaluate: true, elements: [el] });
1399 } else if (full && full.src) {
1400 el.src = full.src;
1401 }
1402 };
1403
1404 var getCSS = function (elem, style) {
1405 return (getComputedStyle(elem, null) || {})[style];
1406 };
1407
1408 var getWidth = function (elem, parent, width) {
1409 width = width || elem.offsetWidth;
1410
1411 while (width < lazySizesConfig.minSize && parent && !elem._lazysizesWidth) {
1412 width = parent.offsetWidth;
1413 parent = parent.parentNode;
1414 }
1415
1416 return width;
1417 };
1418
1419 var rAF = (function () {
1420 var running, waiting;
1421 var firstFns = [];
1422 var secondFns = [];
1423 var fns = firstFns;
1424
1425 var run = function () {
1426 var runFns = fns;
1427
1428 fns = firstFns.length ? secondFns : firstFns;
1429
1430 running = true;
1431 waiting = false;
1432
1433 while (runFns.length) {
1434 runFns.shift()();
1435 }
1436
1437 running = false;
1438 };
1439
1440 var rafBatch = function (fn, queue) {
1441 if (running && !queue) {
1442 fn.apply(this, arguments);
1443 } else {
1444 fns.push(fn);
1445
1446 if (!waiting) {
1447 waiting = true;
1448 (document.hidden ? setTimeout : requestAnimationFrame)(run);
1449 }
1450 }
1451 };
1452
1453 rafBatch._lsFlush = run;
1454
1455 return rafBatch;
1456 })();
1457
1458 var rAFIt = function (fn, simple) {
1459 return simple ?
1460 function () {
1461 rAF(fn);
1462 } :
1463 function () {
1464 var that = this;
1465 var args = arguments;
1466 rAF(function () {
1467 fn.apply(that, args);
1468 });
1469 }
1470 ;
1471 };
1472
1473 var throttle = function (fn) {
1474 var running;
1475 var lastTime = 0;
1476 var gDelay = 125;
1477 var rICTimeout = lazySizesConfig.ricTimeout;
1478 var run = function () {
1479 running = false;
1480 lastTime = Date.now();
1481 fn();
1482 };
1483 var idleCallback = requestIdleCallback && lazySizesConfig.ricTimeout ?
1484 function () {
1485 requestIdleCallback(run, { timeout: rICTimeout });
1486
1487 if (rICTimeout !== lazySizesConfig.ricTimeout) {
1488 rICTimeout = lazySizesConfig.ricTimeout;
1489 }
1490 } :
1491 rAFIt(function () {
1492 setTimeout(run);
1493 }, true)
1494 ;
1495
1496 return function (isPriority) {
1497 var delay;
1498
1499 if ((isPriority = isPriority === true)) {
1500 rICTimeout = 33;
1501 }
1502
1503 if (running) {
1504 return;
1505 }
1506
1507 running = true;
1508
1509 delay = gDelay - (Date.now() - lastTime);
1510
1511 if (delay < 0) {
1512 delay = 0;
1513 }
1514
1515 if (isPriority || (delay < 9 && requestIdleCallback)) {
1516 idleCallback();
1517 } else {
1518 setTimeout(idleCallback, delay);
1519 }
1520 };
1521 };
1522
1523 //based on http://modernjavascript.blogspot.de/2013/08/building-better-debounce.html
1524 var debounce = function (func) {
1525 var timeout, timestamp;
1526 var wait = 99;
1527 var run = function () {
1528 timeout = null;
1529 func();
1530 };
1531 var later = function () {
1532 var last = Date.now() - timestamp;
1533
1534 if (last < wait) {
1535 setTimeout(later, wait - last);
1536 } else {
1537 (requestIdleCallback || run)(run);
1538 }
1539 };
1540
1541 return function () {
1542 timestamp = Date.now();
1543
1544 if (!timeout) {
1545 timeout = setTimeout(later, wait);
1546 }
1547 };
1548 };
1549
1550 (function () {
1551 var prop;
1552
1553 var lazySizesDefaults = {
1554 lazyClass: 'lazyload',
1555 loadedClass: 'lazyloaded',
1556 loadingClass: 'lazyloading',
1557 preloadClass: 'lazypreload',
1558 errorClass: 'lazyerror',
1559 //strictClass: 'lazystrict',
1560 autosizesClass: 'lazyautosizes',
1561 srcAttr: 'data-src',
1562 srcsetAttr: 'data-srcset',
1563 sizesAttr: 'data-sizes',
1564 //preloadAfterLoad: false,
1565 minSize: 40,
1566 customMedia: {},
1567 init: true,
1568 expFactor: 1.5,
1569 hFac: 0.8,
1570 loadMode: 2,
1571 loadHidden: true,
1572 ricTimeout: 300,
1573 };
1574
1575 lazySizesConfig = window.lazySizesConfig || window.lazysizesConfig || {};
1576
1577 for (prop in lazySizesDefaults) {
1578 if (!(prop in lazySizesConfig)) {
1579 lazySizesConfig[prop] = lazySizesDefaults[prop];
1580 }
1581 }
1582
1583 window.lazySizesConfig = lazySizesConfig;
1584
1585 setTimeout(function () {
1586 if (lazySizesConfig.init) {
1587 init();
1588 }
1589 });
1590 })();
1591
1592 var loader = (function () {
1593 var preloadElems, isCompleted, resetPreloadingTimer, loadMode, started;
1594
1595 var eLvW, elvH, eLtop, eLleft, eLright, eLbottom;
1596
1597 var defaultExpand, preloadExpand, hFac;
1598
1599 var regImg = /^img$/i;
1600 var regIframe = /^iframe$/i;
1601
1602 var supportScroll = ('onscroll' in window) && !(/glebot/.test(navigator.userAgent));
1603
1604 var shrinkExpand = 0;
1605 var currentExpand = 0;
1606
1607 var isLoading = 0;
1608 var lowRuns = -1;
1609
1610 var resetPreloading = function (e) {
1611 isLoading--;
1612 if (e && e.target) {
1613 addRemoveLoadEvents(e.target, resetPreloading);
1614 }
1615
1616 if (!e || isLoading < 0 || !e.target) {
1617 isLoading = 0;
1618 }
1619 };
1620
1621 var isNestedVisible = function (elem, elemExpand) {
1622 var outerRect;
1623 var parent = elem;
1624 var visible = getCSS(document.body, 'visibility') == 'hidden' || getCSS(elem, 'visibility') != 'hidden';
1625
1626 eLtop -= elemExpand;
1627 eLbottom += elemExpand;
1628 eLleft -= elemExpand;
1629 eLright += elemExpand;
1630
1631 while (visible && (parent = parent.offsetParent) && parent != document.body && parent != docElem) {
1632 visible = ((getCSS(parent, 'opacity') || 1) > 0);
1633
1634 if (visible && getCSS(parent, 'overflow') != 'visible') {
1635 outerRect = parent.getBoundingClientRect();
1636 visible = eLright > outerRect.left &&
1637 eLleft < outerRect.right &&
1638 eLbottom > outerRect.top - 1 &&
1639 eLtop < outerRect.bottom + 1
1640 ;
1641 }
1642 }
1643
1644 return visible;
1645 };
1646
1647 var checkElements = function () {
1648 var eLlen, i, rect, autoLoadElem, loadedSomething, elemExpand, elemNegativeExpand, elemExpandVal, beforeExpandVal;
1649
1650 var lazyloadElems = lazysizes.elements;
1651
1652 if ((loadMode = lazySizesConfig.loadMode) && isLoading < 8 && (eLlen = lazyloadElems.length)) {
1653
1654 i = 0;
1655
1656 lowRuns++;
1657
1658 if (preloadExpand == null) {
1659 if (!('expand' in lazySizesConfig)) {
1660 lazySizesConfig.expand = docElem.clientHeight > 500 && docElem.clientWidth > 500 ? 500 : 370;
1661 }
1662
1663 defaultExpand = lazySizesConfig.expand;
1664 preloadExpand = defaultExpand * lazySizesConfig.expFactor;
1665 }
1666
1667 if (currentExpand < preloadExpand && isLoading < 1 && lowRuns > 2 && loadMode > 2 && !document.hidden) {
1668 currentExpand = preloadExpand;
1669 lowRuns = 0;
1670 } else if (loadMode > 1 && lowRuns > 1 && isLoading < 6) {
1671 currentExpand = defaultExpand;
1672 } else {
1673 currentExpand = shrinkExpand;
1674 }
1675
1676 for (; i < eLlen; i++) {
1677
1678 if (!lazyloadElems[i] || lazyloadElems[i]._lazyRace) { continue; }
1679
1680 if (!supportScroll) { unveilElement(lazyloadElems[i]); continue; }
1681
1682 if (!(elemExpandVal = lazyloadElems[i][_getAttribute]('data-expand')) || !(elemExpand = elemExpandVal * 1)) {
1683 elemExpand = currentExpand;
1684 }
1685
1686 if (beforeExpandVal !== elemExpand) {
1687 eLvW = innerWidth + (elemExpand * hFac);
1688 elvH = innerHeight + elemExpand;
1689 elemNegativeExpand = elemExpand * -1;
1690 beforeExpandVal = elemExpand;
1691 }
1692
1693 rect = lazyloadElems[i].getBoundingClientRect();
1694
1695 if ((eLbottom = rect.bottom) >= elemNegativeExpand &&
1696 (eLtop = rect.top) <= elvH &&
1697 (eLright = rect.right) >= elemNegativeExpand * hFac &&
1698 (eLleft = rect.left) <= eLvW &&
1699 (eLbottom || eLright || eLleft || eLtop) &&
1700 (lazySizesConfig.loadHidden || getCSS(lazyloadElems[i], 'visibility') != 'hidden') &&
1701 ((isCompleted && isLoading < 3 && !elemExpandVal && (loadMode < 3 || lowRuns < 4)) || isNestedVisible(lazyloadElems[i], elemExpand))) {
1702 unveilElement(lazyloadElems[i]);
1703 loadedSomething = true;
1704 if (isLoading > 9) { break; }
1705 } else if (!loadedSomething && isCompleted && !autoLoadElem &&
1706 isLoading < 4 && lowRuns < 4 && loadMode > 2 &&
1707 (preloadElems[0] || lazySizesConfig.preloadAfterLoad) &&
1708 (preloadElems[0] || (!elemExpandVal && ((eLbottom || eLright || eLleft || eLtop) || lazyloadElems[i][_getAttribute](lazySizesConfig.sizesAttr) != 'auto')))) {
1709 autoLoadElem = preloadElems[0] || lazyloadElems[i];
1710 }
1711 }
1712
1713 if (autoLoadElem && !loadedSomething) {
1714 unveilElement(autoLoadElem);
1715 }
1716 }
1717 };
1718
1719 var throttledCheckElements = throttle(checkElements);
1720
1721 var switchLoadingClass = function (e) {
1722 addClass(e.target, lazySizesConfig.loadedClass);
1723 removeClass(e.target, lazySizesConfig.loadingClass);
1724 addRemoveLoadEvents(e.target, rafSwitchLoadingClass);
1725 triggerEvent(e.target, 'lazyloaded');
1726 };
1727 var rafedSwitchLoadingClass = rAFIt(switchLoadingClass);
1728 var rafSwitchLoadingClass = function (e) {
1729 rafedSwitchLoadingClass({ target: e.target });
1730 };
1731
1732 var changeIframeSrc = function (elem, src) {
1733 try {
1734 elem.contentWindow.location.replace(src);
1735 } catch (e) {
1736 elem.src = src;
1737 }
1738 };
1739
1740 var handleSources = function (source) {
1741 var customMedia;
1742
1743 var sourceSrcset = source[_getAttribute](lazySizesConfig.srcsetAttr);
1744
1745 if ((customMedia = lazySizesConfig.customMedia[source[_getAttribute]('data-media') || source[_getAttribute]('media')])) {
1746 source.setAttribute('media', customMedia);
1747 }
1748
1749 if (sourceSrcset) {
1750 source.setAttribute('srcset', sourceSrcset);
1751 }
1752 };
1753
1754 var lazyUnveil = rAFIt(function (elem, detail, isAuto, sizes, isImg) {
1755 var src, srcset, parent, isPicture, event, firesLoad;
1756
1757 if (!(event = triggerEvent(elem, 'lazybeforeunveil', detail)).defaultPrevented) {
1758
1759 if (sizes) {
1760 if (isAuto) {
1761 addClass(elem, lazySizesConfig.autosizesClass);
1762 } else {
1763 elem.setAttribute('sizes', sizes);
1764 }
1765 }
1766
1767 srcset = elem[_getAttribute](lazySizesConfig.srcsetAttr);
1768 src = elem[_getAttribute](lazySizesConfig.srcAttr);
1769
1770 if (isImg) {
1771 parent = elem.parentNode;
1772 isPicture = parent && regPicture.test(parent.nodeName || '');
1773 }
1774
1775 firesLoad = detail.firesLoad || (('src' in elem) && (srcset || src || isPicture));
1776
1777 event = { target: elem };
1778
1779 if (firesLoad) {
1780 addRemoveLoadEvents(elem, resetPreloading, true);
1781 clearTimeout(resetPreloadingTimer);
1782 resetPreloadingTimer = setTimeout(resetPreloading, 2500);
1783
1784 addClass(elem, lazySizesConfig.loadingClass);
1785 addRemoveLoadEvents(elem, rafSwitchLoadingClass, true);
1786 }
1787
1788 if (isPicture) {
1789 forEach.call(parent.getElementsByTagName('source'), handleSources);
1790 }
1791
1792 if (srcset) {
1793 elem.setAttribute('srcset', srcset);
1794 } else if (src && !isPicture) {
1795 if (regIframe.test(elem.nodeName)) {
1796 changeIframeSrc(elem, src);
1797 } else {
1798 elem.src = src;
1799 }
1800 }
1801
1802 if (isImg && (srcset || isPicture)) {
1803 updatePolyfill(elem, { src: src });
1804 }
1805 }
1806
1807 if (elem._lazyRace) {
1808 delete elem._lazyRace;
1809 }
1810 removeClass(elem, lazySizesConfig.lazyClass);
1811
1812 rAF(function () {
1813 if (!firesLoad || (elem.complete && elem.naturalWidth > 1)) {
1814 if (firesLoad) {
1815 resetPreloading(event);
1816 } else {
1817 isLoading--;
1818 }
1819 switchLoadingClass(event);
1820 }
1821 }, true);
1822 });
1823
1824 var unveilElement = function (elem) {
1825 var detail;
1826
1827 var isImg = regImg.test(elem.nodeName);
1828
1829 //allow using sizes="auto", but don't use. it's invalid. Use data-sizes="auto" or a valid value for sizes instead (i.e.: sizes="80vw")
1830 var sizes = isImg && (elem[_getAttribute](lazySizesConfig.sizesAttr) || elem[_getAttribute]('sizes'));
1831 var isAuto = sizes == 'auto';
1832
1833 if ((isAuto || !isCompleted) && isImg && (elem[_getAttribute]('src') || elem.srcset) && !elem.complete && !hasClass(elem, lazySizesConfig.errorClass) && hasClass(elem, lazySizesConfig.lazyClass)) { return; }
1834
1835 detail = triggerEvent(elem, 'lazyunveilread').detail;
1836
1837 if (isAuto) {
1838 autoSizer.updateElem(elem, true, elem.offsetWidth);
1839 }
1840
1841 elem._lazyRace = true;
1842 isLoading++;
1843
1844 lazyUnveil(elem, detail, isAuto, sizes, isImg);
1845 };
1846
1847 var onload = function () {
1848 if (isCompleted) { return; }
1849 if (Date.now() - started < 999) {
1850 setTimeout(onload, 999);
1851 return;
1852 }
1853 var afterScroll = debounce(function () {
1854 lazySizesConfig.loadMode = 3;
1855 throttledCheckElements();
1856 });
1857
1858 isCompleted = true;
1859
1860 lazySizesConfig.loadMode = 3;
1861
1862 throttledCheckElements();
1863
1864 addEventListener('scroll', function () {
1865 if (lazySizesConfig.loadMode == 3) {
1866 lazySizesConfig.loadMode = 2;
1867 }
1868 afterScroll();
1869 }, true);
1870 };
1871
1872 return {
1873 _: function () {
1874 started = Date.now();
1875
1876 lazysizes.elements = document.getElementsByClassName(lazySizesConfig.lazyClass);
1877 preloadElems = document.getElementsByClassName(lazySizesConfig.lazyClass + ' ' + lazySizesConfig.preloadClass);
1878 hFac = lazySizesConfig.hFac;
1879
1880 addEventListener('scroll', throttledCheckElements, true);
1881
1882 addEventListener('resize', throttledCheckElements, true);
1883
1884 if (window.MutationObserver) {
1885 new MutationObserver(throttledCheckElements).observe(docElem, { childList: true, subtree: true, attributes: true });
1886 } else {
1887 docElem[_addEventListener]('DOMNodeInserted', throttledCheckElements, true);
1888 docElem[_addEventListener]('DOMAttrModified', throttledCheckElements, true);
1889 setInterval(throttledCheckElements, 999);
1890 }
1891
1892 addEventListener('hashchange', throttledCheckElements, true);
1893
1894 //, 'fullscreenchange'
1895 ['focus', 'mouseover', 'click', 'load', 'transitionend', 'animationend', 'webkitAnimationEnd'].forEach(function (name) {
1896 document[_addEventListener](name, throttledCheckElements, true);
1897 });
1898
1899 if ((/d$|^c/.test(document.readyState))) {
1900 onload();
1901 } else {
1902 addEventListener('load', onload);
1903 document[_addEventListener]('DOMContentLoaded', throttledCheckElements);
1904 setTimeout(onload, 20000);
1905 }
1906
1907 if (lazysizes.elements.length) {
1908 checkElements();
1909 rAF._lsFlush();
1910 } else {
1911 throttledCheckElements();
1912 }
1913 },
1914 checkElems: throttledCheckElements,
1915 unveil: unveilElement
1916 };
1917 })();
1918
1919
1920 var autoSizer = (function () {
1921 var autosizesElems;
1922
1923 var sizeElement = rAFIt(function (elem, parent, event, width) {
1924 var sources, i, len;
1925 elem._lazysizesWidth = width;
1926 width += 'px';
1927
1928 elem.setAttribute('sizes', width);
1929
1930 if (regPicture.test(parent.nodeName || '')) {
1931 sources = parent.getElementsByTagName('source');
1932 for (i = 0, len = sources.length; i < len; i++) {
1933 sources[i].setAttribute('sizes', width);
1934 }
1935 }
1936
1937 if (!event.detail.dataAttr) {
1938 updatePolyfill(elem, event.detail);
1939 }
1940 });
1941 var getSizeElement = function (elem, dataAttr, width) {
1942 var event;
1943 var parent = elem.parentNode;
1944
1945 if (parent) {
1946 width = getWidth(elem, parent, width);
1947 event = triggerEvent(elem, 'lazybeforesizes', { width: width, dataAttr: !!dataAttr });
1948
1949 if (!event.defaultPrevented) {
1950 width = event.detail.width;
1951
1952 if (width && width !== elem._lazysizesWidth) {
1953 sizeElement(elem, parent, event, width);
1954 }
1955 }
1956 }
1957 };
1958
1959 var updateElementsSizes = function () {
1960 var i;
1961 var len = autosizesElems.length;
1962 if (len) {
1963 i = 0;
1964
1965 for (; i < len; i++) {
1966 getSizeElement(autosizesElems[i]);
1967 }
1968 }
1969 };
1970
1971 var debouncedUpdateElementsSizes = debounce(updateElementsSizes);
1972
1973 return {
1974 _: function () {
1975 autosizesElems = document.getElementsByClassName(lazySizesConfig.autosizesClass);
1976 addEventListener('resize', debouncedUpdateElementsSizes);
1977 },
1978 checkElems: debouncedUpdateElementsSizes,
1979 updateElem: getSizeElement
1980 };
1981 })();
1982
1983 var init = function () {
1984 if (!init.i) {
1985 init.i = true;
1986 autoSizer._();
1987 loader._();
1988 }
1989 };
1990
1991 lazysizes = {
1992 cfg: lazySizesConfig,
1993 autoSizer: autoSizer,
1994 loader: loader,
1995 init: init,
1996 uP: updatePolyfill,
1997 aC: addClass,
1998 rC: removeClass,
1999 hC: hasClass,
2000 fire: triggerEvent,
2001 gW: getWidth,
2002 rAF: rAF,
2003 };
2004
2005 return lazysizes;
2006}
2007 ));
2008window.onload = function () {
2009 moveHotel();
2010 reRenderHotels();
2011 setHeaderHeight();
2012 resizeTabs();
2013 checkDoubeHotels();
2014 window.onresize = function () {
2015 moveHotel();
2016 checkDoubeHotels();
2017 reRenderHotels();
2018 moveDestinations();
2019 resizeTabs();
2020
2021 }
2022}
2023setHeaderHeight();
2024function getCountOfHotels() {
2025 var divHotel = $(".hotel-container.country");
2026 var width = $(divHotel[0]).hasClass("double") ? divHotel[0].clientWidth / 2 : divHotel[0].clientWidth;
2027 var countOfBlocks = parseInt(window.innerWidth / width);
2028 return countOfBlocks;
2029}
2030function reRenderHotels()
2031{
2032 var iterator = 1;
2033 if (getCountOfHotels() == 1)
2034 {
2035 return;
2036 }
2037 $("#hotel-items-container-home > div.hotel-container").each(function () {
2038 if ((iterator) % getCountOfHotels() == 0 && $(this).hasClass("double-hotel")) {
2039 if ($(this).hasClass("prev")) {
2040 $(this).addClass("next");
2041 $(this).removeClass("prev");
2042 $(this).insertAfter($($(this).next()[0]));
2043 }
2044 else {
2045 $(this).addClass("prev");
2046 $(this).removeClass("next");
2047 $(this).insertBefore($($(this).prev()[0]));
2048 }
2049 }
2050 if ($(this).hasClass("double-hotel")) {
2051 iterator++;
2052 }
2053 iterator++;
2054
2055 });
2056}
2057function checkDoubeHotels() {
2058 if (window.innerWidth <=609) {
2059 $(".double").removeClass("double-hotel");
2060 return;
2061 }
2062 $(".double").addClass("double-hotel");
2063 return;
2064}
2065
2066function moveHotel() {
2067
2068 setHeaderHeight();
2069 var divHotel = $(".hotel-container.country");
2070 if (divHotel) {
2071 var widthDiv = divHotel[0] ? ($(divHotel[0]).hasClass("double-hotel") ? divHotel[0].clientWidth / 2 : divHotel[0].clientWidth) : 360;
2072 var countCol = Math.floor(window.innerWidth / widthDiv);
2073 var width = countCol * widthDiv;
2074
2075 var block = $("#hotel-items-container-home");
2076 if (block) {
2077 block.css({ 'margin': "0px auto" });
2078 if (window.innerWidth <= 609) {
2079 block.css({ 'width': "292px" });
2080 }
2081 else {
2082 block.css({ 'width': width + "px" });
2083 }
2084 }
2085 block = $(".holiday-bar");
2086 if (block) {
2087 block.css({ 'margin': "0px auto" });
2088 block.css({ 'width': (width - 10) + "px" });
2089 }
2090 block = $(".search-console");
2091 if (block) {
2092 block.css({ 'margin': "0px auto" });
2093 block.css({ 'width': (width - 10) + "px" });
2094 }
2095 block = $(".holiday-options");
2096 if (block) {
2097 block.css({ 'margin': "0px auto" });
2098 block.css({ 'width': (width - 10) + "px" });
2099 }
2100 block = $('#recent-searches');
2101 if (block) {
2102 block.css({ 'margin': "0px auto" });
2103 block.css({ 'width': (width - 10) + "px" });
2104 }
2105 }
2106}
2107
2108function setHeaderHeight() {
2109 if (window.innerWidth < 768) {
2110 var topHeaderMobile = $("#topHeader");
2111 if (topHeaderMobile != null) {
2112 topHeaderMobile.css('min-height', '0px');
2113 topHeaderMobile.css('top', '116px');
2114 }
2115 return;
2116 }
2117 var height = (window.innerHeight / 100) * 60;
2118 var topHeader = $("#topHeader");
2119
2120 if (topHeader != null) {
2121 topHeader.css('max-height', height + 'px');
2122 topHeader.css('top', '0px');
2123 }
2124 var slider = $("#topHeader .slick-carousel");
2125 if (slider != null) {
2126 var sliderHeight = height + 222;
2127 slider.css('max-height', sliderHeight + 'px');
2128 slider.css('overflow', 'hidden');
2129 }
2130}
2131function moveDestinations() {
2132 var divHotel = document.getElementsByClassName("dropdown-nav-column");
2133 if (divHotel != null) {
2134 var widthDiv = divHotel[0].clientWidth;
2135 var countCol = Math.floor(window.innerWidth / widthDiv);
2136 var width = countCol * widthDiv;
2137
2138 var block = $("#destination-items-dropdown");
2139 if (block) {
2140 block.css({ 'margin': "0px auto" });
2141 block.css({ 'width': width + "px" });
2142 }
2143
2144 block = $("#destination-items-dropdown-more");
2145 if (block) {
2146 block.css({ 'margin': "0px auto" });
2147 block.css({ 'width': width + "px" });
2148 }
2149 }
2150
2151}
2152
2153function weddingRedirect() {
2154 window.open('http://weddings.caribbeanclassics.co.uk', '_blank'); //js.js//
2155}
2156
2157function paymentRedirect() {
2158 window.open('https://payments.caribbeanclassics.co.uk/payments', '_blank');//js.js//
2159}
2160
2161$(document).ready(function () {
2162 initSignalR();
2163});
2164
2165function refreshUserPage() {
2166 console.log("refreshUserPage");
2167 location.reload();
2168}
2169
2170function clearLocalStorage() {
2171 console.log("clearLocalStorage");
2172 var histories = readCacheHistory("searchHistories");
2173 var countries = readCache("countries", false);
2174 localStorage.clear();
2175 writeCacheHistory("searchHistories", histories, 24);
2176 writeCacheWithHours("countries", countries, 24, false);
2177}
2178
2179function clearLocalSearchHistory() {
2180 console.log("clearLocalSearchHistory");
2181 deleteCacheHistory("searchHistories");
2182}
2183
2184function clearCookies(guid) {
2185 console.log("clearCookies");
2186 var cookies = document.cookie.split(";");
2187
2188 for (var i = 0; i < cookies.length; i++) {
2189 var cookie = cookies[i];
2190 var eqPos = cookie.indexOf("=");
2191 var name = eqPos > -1 ? cookie.substr(0, eqPos) : cookie;
2192 document.cookie = name + "=;expires=Thu, 01 Jan 1970 00:00:00 GMT";
2193 }
2194}
2195window.onbeforeunload = function (e) {
2196 writeLeaveSiteLog();
2197};
2198function writeLeaveSiteLog() {
2199 var result;
2200 var xhr = new XMLHttpRequest();
2201 xhr.open("GET", window["WebApiUrl"]+"/api/session/writeLeaveSiteLog", false); //js.js//
2202 xhr.setRequestHeader('Content-Type', 'application/json');
2203 xhr.setRequestHeader('Access-Control-Allow-Origin', '*');
2204 xhr.setRequestHeader('AllowedHeader', 'origin');
2205 var session = get('SessionGUID');
2206 if (session) {
2207 xhr.setRequestHeader('session', session);
2208 }
2209 xhr.onload = function (e) {
2210 if (xhr.readyState === 4) {
2211 if (xhr.status === 200) {
2212 try {
2213 var decompressedData = LZString.decompressFromBase64(xhr.responseText);
2214 decompressedData = LZString.decompress(decompressedData);
2215 result = JSON.parse(decompressedData);
2216 } catch (err) {
2217 try {
2218 result = JSON.parse(xhr.responseText);
2219 } catch (ex) {
2220 result = xhr.responseText;
2221 }
2222 }
2223 } else {
2224 console.error(xhr.statusText);
2225 }
2226 }
2227 };
2228
2229 xhr.onerror = function (e) {
2230 console.error(xhr.statusText);
2231 };
2232 xhr.send(null);
2233 return result;
2234}
2235function clearAll() {
2236 setTimeout(function () {
2237 localStorage.clear();
2238 });
2239}
2240
2241function detectmob() {
2242 if (navigator.userAgent.match(/Android/i)
2243 || navigator.userAgent.match(/webOS/i)
2244 || navigator.userAgent.match(/iPhone/i)
2245 || navigator.userAgent.match(/iPad/i)
2246 || navigator.userAgent.match(/iPod/i)
2247 || navigator.userAgent.match(/BlackBerry/i)
2248 || navigator.userAgent.match(/Windows Phone/i)
2249 ) {
2250 return true;
2251 }
2252 else {
2253 return false;
2254 }
2255}
2256$(document).ready(function () {
2257 function openDrop() {
2258 $('#openDestination').on('click', function () {
2259
2260 if (window.innerWidth < 768 || detectmob()) {
2261 $(this).toggleClass('active');
2262 $('html').css("overflow", "hidden");
2263 if ($(this).hasClass('active')) {
2264 $('#moreOption').removeClass('active');
2265 $('#homeWed').hide();
2266 $('#homeList').show();
2267 moveDestinations()
2268 return;
2269 }
2270 $('html').css("overflow", "auto");
2271 $('#homeList').hide();
2272 }
2273 });
2274 $('#moreOption').on('click', function () {
2275 if (window.innerWidth < 768 || detectmob()) {
2276 $(this).toggleClass('active');
2277 $('html').css("overflow", "hidden");
2278 if ($(this).hasClass('active')) {
2279
2280 $('#openDestination').removeClass('active');
2281 $('#homeList').hide();
2282 $('#homeWed').show();
2283 moveDestinations()
2284 return;
2285 }
2286 $('html').css("overflow", "auto");
2287 $('#homeWed').hide();
2288 }
2289 });
2290 // };
2291
2292 $('#openDestination').hover(
2293 function () {
2294 if (!(window.innerWidth < 768 || detectmob())) {
2295 $(this).toggleClass('active');
2296 $('#homeWed').hide();
2297 $('#homeList').show();
2298 }
2299 moveDestinations()
2300 },
2301 function () {
2302 if (!(window.innerWidth < 768 || detectmob())) {
2303 $(this).removeClass('active');
2304 $('#homeWed').hide();
2305 $('#homeList').hide();
2306 }
2307 // moveDestinations()
2308
2309 });
2310 $('#homeList').hover(
2311 function () {
2312 if (!(window.innerWidth < 768 || detectmob())) {
2313 $('#openDestination').toggleClass('active');
2314 $('#homeWed').hide();
2315 $('#homeList').show();
2316 }
2317 moveDestinations()
2318
2319 },
2320 function () {
2321 if (!(window.innerWidth < 768 || detectmob())) {
2322 $('#openDestination').removeClass('active');
2323 $('#homeWed').hide();
2324 $('#homeList').hide();
2325 }
2326 moveDestinations()
2327
2328 });
2329 $('#moreOption').hover(
2330 function () {
2331 if (!(window.innerWidth < 768 || detectmob())) {
2332 $(this).toggleClass('active');
2333 $('#homeWed').show();
2334 $('#homeList').hide();
2335 }
2336 moveDestinations()
2337
2338 },
2339 function () {
2340 if (!(window.innerWidth < 768 || detectmob())) {
2341 $(this).removeClass('active');
2342 $('#homeWed').hide();
2343 $('#homeList').hide();
2344 }
2345 // moveDestinations()
2346
2347 });
2348 $('#homeWed').hover(
2349 function () {
2350 if (!(window.innerWidth < 768 || detectmob())) {
2351 $('#moreOption').toggleClass('active');
2352 $('#homeWed').show();
2353 $('#homeList').hide();
2354 }
2355 moveDestinations()
2356
2357 },
2358 function () {
2359 if (!(window.innerWidth < 768 || detectmob())) {
2360 $('#moreOption').removeClass('active');
2361 $('#homeWed').hide();
2362 $('#homeList').hide();
2363 }
2364 //moveDestinations()
2365
2366 });
2367
2368 return;
2369 };
2370 openDrop();
2371 loadPhone();
2372});
2373
2374
2375function loadPhone() {
2376 if (document.getElementById("contactPhone") == null) {
2377 setTimeout(loadPhone(), 10);
2378 return;
2379 }
2380 document.getElementById("contactPhone").innerHTML = window.currentPhone;
2381}
2382function hasItem(key) {
2383 return (new RegExp("(?:^|;\\s*)" + encodeURIComponent(key).replace(/[\-\.\+\*]/g, "\\$&") + "\\s*\\=")).test(document.cookie);
2384}
2385function encodeValue(value) {
2386 return encodeURIComponent(JSON.stringify(value));
2387}
2388
2389function decodeValue(value) {
2390 return JSON.parse(decodeURIComponent(value));
2391}
2392
2393function getCookieStore(key) {
2394 var value = document.cookie.replace(new RegExp("(?:(?:^|.*;)\\s*" + encodeURIComponent(key).replace(/[\-\.\+\*]/g, "\\$&") + "\\s*\\=\\s*([^;]*).*$)|^.*$"), "$1");
2395 return decodeValue(value) || undefined;
2396}
2397
2398function putCookieStore(key, value) {
2399 if (!key || /^(?:expires|max\-age|path|domain|secure)$/i.test(key)) {
2400 return false;
2401 }
2402 var expires = "";
2403 var secure = false;
2404 var path = '';
2405 var domain = "caribbeanclassics.co.uk";
2406 expires = "; expires=Fri, 31 Dec 9999 23:59:59 GMT";
2407
2408 document.cookie = encodeURIComponent(key) + "=" + encodeValue(value)
2409 + expires
2410 + (domain ? "; domain=" + domain : "")
2411 + (path ? "; path=" + path : "")
2412 + (secure ? "; secure" : "");
2413
2414 return true;
2415}
2416
2417function removeCookieStore(key, options) {
2418 if (!key || !hasItem(key)) {
2419 return false;
2420 }
2421
2422 var domain = (options && options.domain) || '',
2423 path = (options && options.path) || '';
2424
2425 document.cookie = encodeURIComponent(key) + "=; expires=Thu, 01 Jan 1970 00:00:00 GMT"
2426 + (domain ? "; domain=" + domain : "")
2427 + (path ? "; path=" + path : "");
2428
2429 return true;
2430}
2431function set(key, value, path) {
2432 if (key == "searchHistories") {
2433 return;
2434 }
2435 var cookieValue = value;
2436 if (key != "SessionGUID") {
2437 //var compressedString = LZString.compress(JSON.stringify(value));
2438 //var compressedStringBase64 = LZString.compressToBase64(compressedString);
2439 var compressedStringBase64 = btoa(JSON.stringify(value));
2440 cookieValue = compressedStringBase64;
2441 }
2442 putCookieStore(window["cookieVersion"] + key, cookieValue);
2443}
2444function setHistory(key, value, path) {
2445 var cookieValue = value;
2446 if (key != "SessionGUID") {
2447 //var compressedString = LZString.compress(JSON.stringify(value));
2448 //var compressedStringBase64 = LZString.compressToBase64(compressedString);
2449 var compressedStringBase64 = btoa(JSON.stringify(value));
2450 cookieValue = compressedStringBase64;
2451 }
2452 putCookieStore(window["cookieVersion"] + key, cookieValue);
2453}
2454function getArray(key) {
2455 var cookieString = "";
2456 try {
2457 cookieString = getCookieStore(window["cookieVersion"] + key);
2458 } catch (err) {
2459 cookieString = "";
2460 }
2461 //var smallJsonString = LZString.decompressFromBase64(cookieString);
2462 //var bigJsonString = LZString.decompress(smallJsonString);
2463 var bigJsonString = Base64.decode(cookieString);//atob(cookieString);
2464 if (bigJsonString == "") {
2465 bigJsonString = "[]";
2466 set(key, [], null);
2467 }
2468 return JSON.parse(bigJsonString);
2469}
2470
2471removeUnnecessary = function(){
2472 var cookies = document.cookie.split(";");
2473 for (var i = 0; i < cookies.length; i++) {
2474 var cookie = cookies[i];
2475 var eqPos = cookie.indexOf("=");
2476 var name = eqPos > -1 ? cookie.substr(0, eqPos) : cookie;
2477 var sessionGuid = window["sessionGUID"];
2478 var d = new Date();
2479 var exMins = 0;
2480 var cvalue = '';
2481 d.setTime(d.getTime() + (exMins * 60 * 1000));
2482 var expires = "expires=" + d.toUTCString();
2483 if (name.indexOf("campaignTSKey") != -1) {
2484 var newCookieValue = cookie.substr(eqPos + 1, cookie.length - 1);
2485 document.cookie = sessionGuid + "campaignTSKey" + "=" + newCookieValue + ";" + expires + ";path=/";
2486 continue;
2487 }
2488 if (name.indexOf("adminUser") != -1) {
2489 var newCookieValue = cookie.substr(eqPos + 1, cookie.length - 1);
2490 document.cookie = sessionGuid + "adminUser" + "=" + newCookieValue + ";" + expires + ";path=/";
2491 continue;
2492 }
2493 if (name.indexOf(sessionGuid) == -1) {
2494 document.cookie = name + "=" + cvalue + ";" + expires + ";path=/";
2495 }
2496 }
2497}
2498
2499function get(key) {
2500 var cookieString = "";
2501 try {
2502 cookieString = getCookieStore(window["cookieVersion"] + key);
2503 } catch (err) {
2504 cookieString = "";
2505 }
2506 if (key == "SessionGUID") {
2507 return cookieString;
2508 }
2509 //var smallJsonString = LZString.decompressFromBase64(cookieString);
2510 //var bigJsonString = LZString.decompress(smallJsonString);
2511 var bigJsonString = Base64.decode(cookieString);//atob(cookieString);
2512 if (bigJsonString == "") {
2513 return undefined;
2514 }
2515 return JSON.parse(bigJsonString);
2516}
2517
2518function remove(key, path) {
2519 removeCookieStore(window["cookieVersion"] + key, { domain: "caribbeanclassics.co.uk", path: path });
2520}
2521
2522(function () { function n(n) { function t(t, r, e, u, i, o) { for (; i >= 0 && o > i; i += n) { var a = u ? u[i] : i; e = r(e, t[a], a, t) } return e } return function (r, e, u, i) { e = b(e, i, 4); var o = !k(r) && m.keys(r), a = (o || r).length, c = n > 0 ? 0 : a - 1; return arguments.length < 3 && (u = r[o ? o[c] : c], c += n), t(r, e, u, o, c, a) } } function t(n) { return function (t, r, e) { r = x(r, e); for (var u = O(t), i = n > 0 ? 0 : u - 1; i >= 0 && u > i; i += n) if (r(t[i], i, t)) return i; return -1 } } function r(n, t, r) { return function (e, u, i) { var o = 0, a = O(e); if ("number" == typeof i) n > 0 ? o = i >= 0 ? i : Math.max(i + a, o) : a = i >= 0 ? Math.min(i + 1, a) : i + a + 1; else if (r && i && a) return i = r(e, u), e[i] === u ? i : -1; if (u !== u) return i = t(l.call(e, o, a), m.isNaN), i >= 0 ? i + o : -1; for (i = n > 0 ? o : a - 1; i >= 0 && a > i; i += n) if (e[i] === u) return i; return -1 } } function e(n, t) { var r = I.length, e = n.constructor, u = m.isFunction(e) && e.prototype || a, i = "constructor"; for (m.has(n, i) && !m.contains(t, i) && t.push(i) ; r--;) i = I[r], i in n && n[i] !== u[i] && !m.contains(t, i) && t.push(i) } var u = this, i = u._, o = Array.prototype, a = Object.prototype, c = Function.prototype, f = o.push, l = o.slice, s = a.toString, p = a.hasOwnProperty, h = Array.isArray, v = Object.keys, g = c.bind, y = Object.create, d = function () { }, m = function (n) { return n instanceof m ? n : this instanceof m ? void (this._wrapped = n) : new m(n) }; "undefined" != typeof exports ? ("undefined" != typeof module && module.exports && (exports = module.exports = m), exports._ = m) : u._ = m, m.VERSION = "1.8.3"; var b = function (n, t, r) { if (t === void 0) return n; switch (null == r ? 3 : r) { case 1: return function (r) { return n.call(t, r) }; case 2: return function (r, e) { return n.call(t, r, e) }; case 3: return function (r, e, u) { return n.call(t, r, e, u) }; case 4: return function (r, e, u, i) { return n.call(t, r, e, u, i) } } return function () { return n.apply(t, arguments) } }, x = function (n, t, r) { return null == n ? m.identity : m.isFunction(n) ? b(n, t, r) : m.isObject(n) ? m.matcher(n) : m.property(n) }; m.iteratee = function (n, t) { return x(n, t, 1 / 0) }; var _ = function (n, t) { return function (r) { var e = arguments.length; if (2 > e || null == r) return r; for (var u = 1; e > u; u++) for (var i = arguments[u], o = n(i), a = o.length, c = 0; a > c; c++) { var f = o[c]; t && r[f] !== void 0 || (r[f] = i[f]) } return r } }, j = function (n) { if (!m.isObject(n)) return {}; if (y) return y(n); d.prototype = n; var t = new d; return d.prototype = null, t }, w = function (n) { return function (t) { return null == t ? void 0 : t[n] } }, A = Math.pow(2, 53) - 1, O = w("length"), k = function (n) { var t = O(n); return "number" == typeof t && t >= 0 && A >= t }; m.each = m.forEach = function (n, t, r) { t = b(t, r); var e, u; if (k(n)) for (e = 0, u = n.length; u > e; e++) t(n[e], e, n); else { var i = m.keys(n); for (e = 0, u = i.length; u > e; e++) t(n[i[e]], i[e], n) } return n }, m.map = m.collect = function (n, t, r) { t = x(t, r); for (var e = !k(n) && m.keys(n), u = (e || n).length, i = Array(u), o = 0; u > o; o++) { var a = e ? e[o] : o; i[o] = t(n[a], a, n) } return i }, m.reduce = m.foldl = m.inject = n(1), m.reduceRight = m.foldr = n(-1), m.find = m.detect = function (n, t, r) { var e; return e = k(n) ? m.findIndex(n, t, r) : m.findKey(n, t, r), e !== void 0 && e !== -1 ? n[e] : void 0 }, m.filter = m.select = function (n, t, r) { var e = []; return t = x(t, r), m.each(n, function (n, r, u) { t(n, r, u) && e.push(n) }), e }, m.reject = function (n, t, r) { return m.filter(n, m.negate(x(t)), r) }, m.every = m.all = function (n, t, r) { t = x(t, r); for (var e = !k(n) && m.keys(n), u = (e || n).length, i = 0; u > i; i++) { var o = e ? e[i] : i; if (!t(n[o], o, n)) return !1 } return !0 }, m.some = m.any = function (n, t, r) { t = x(t, r); for (var e = !k(n) && m.keys(n), u = (e || n).length, i = 0; u > i; i++) { var o = e ? e[i] : i; if (t(n[o], o, n)) return !0 } return !1 }, m.contains = m.includes = m.include = function (n, t, r, e) { return k(n) || (n = m.values(n)), ("number" != typeof r || e) && (r = 0), m.indexOf(n, t, r) >= 0 }, m.invoke = function (n, t) { var r = l.call(arguments, 2), e = m.isFunction(t); return m.map(n, function (n) { var u = e ? t : n[t]; return null == u ? u : u.apply(n, r) }) }, m.pluck = function (n, t) { return m.map(n, m.property(t)) }, m.where = function (n, t) { return m.filter(n, m.matcher(t)) }, m.findWhere = function (n, t) { return m.find(n, m.matcher(t)) }, m.max = function (n, t, r) { var e, u, i = -1 / 0, o = -1 / 0; if (null == t && null != n) { n = k(n) ? n : m.values(n); for (var a = 0, c = n.length; c > a; a++) e = n[a], e > i && (i = e) } else t = x(t, r), m.each(n, function (n, r, e) { u = t(n, r, e), (u > o || u === -1 / 0 && i === -1 / 0) && (i = n, o = u) }); return i }, m.min = function (n, t, r) { var e, u, i = 1 / 0, o = 1 / 0; if (null == t && null != n) { n = k(n) ? n : m.values(n); for (var a = 0, c = n.length; c > a; a++) e = n[a], i > e && (i = e) } else t = x(t, r), m.each(n, function (n, r, e) { u = t(n, r, e), (o > u || 1 / 0 === u && 1 / 0 === i) && (i = n, o = u) }); return i }, m.shuffle = function (n) { for (var t, r = k(n) ? n : m.values(n), e = r.length, u = Array(e), i = 0; e > i; i++) t = m.random(0, i), t !== i && (u[i] = u[t]), u[t] = r[i]; return u }, m.sample = function (n, t, r) { return null == t || r ? (k(n) || (n = m.values(n)), n[m.random(n.length - 1)]) : m.shuffle(n).slice(0, Math.max(0, t)) }, m.sortBy = function (n, t, r) { return t = x(t, r), m.pluck(m.map(n, function (n, r, e) { return { value: n, index: r, criteria: t(n, r, e) } }).sort(function (n, t) { var r = n.criteria, e = t.criteria; if (r !== e) { if (r > e || r === void 0) return 1; if (e > r || e === void 0) return -1 } return n.index - t.index }), "value") }; var F = function (n) { return function (t, r, e) { var u = {}; return r = x(r, e), m.each(t, function (e, i) { var o = r(e, i, t); n(u, e, o) }), u } }; m.groupBy = F(function (n, t, r) { m.has(n, r) ? n[r].push(t) : n[r] = [t] }), m.indexBy = F(function (n, t, r) { n[r] = t }), m.countBy = F(function (n, t, r) { m.has(n, r) ? n[r]++ : n[r] = 1 }), m.toArray = function (n) { return n ? m.isArray(n) ? l.call(n) : k(n) ? m.map(n, m.identity) : m.values(n) : [] }, m.size = function (n) { return null == n ? 0 : k(n) ? n.length : m.keys(n).length }, m.partition = function (n, t, r) { t = x(t, r); var e = [], u = []; return m.each(n, function (n, r, i) { (t(n, r, i) ? e : u).push(n) }), [e, u] }, m.first = m.head = m.take = function (n, t, r) { return null == n ? void 0 : null == t || r ? n[0] : m.initial(n, n.length - t) }, m.initial = function (n, t, r) { return l.call(n, 0, Math.max(0, n.length - (null == t || r ? 1 : t))) }, m.last = function (n, t, r) { return null == n ? void 0 : null == t || r ? n[n.length - 1] : m.rest(n, Math.max(0, n.length - t)) }, m.rest = m.tail = m.drop = function (n, t, r) { return l.call(n, null == t || r ? 1 : t) }, m.compact = function (n) { return m.filter(n, m.identity) }; var S = function (n, t, r, e) { for (var u = [], i = 0, o = e || 0, a = O(n) ; a > o; o++) { var c = n[o]; if (k(c) && (m.isArray(c) || m.isArguments(c))) { t || (c = S(c, t, r)); var f = 0, l = c.length; for (u.length += l; l > f;) u[i++] = c[f++] } else r || (u[i++] = c) } return u }; m.flatten = function (n, t) { return S(n, t, !1) }, m.without = function (n) { return m.difference(n, l.call(arguments, 1)) }, m.uniq = m.unique = function (n, t, r, e) { m.isBoolean(t) || (e = r, r = t, t = !1), null != r && (r = x(r, e)); for (var u = [], i = [], o = 0, a = O(n) ; a > o; o++) { var c = n[o], f = r ? r(c, o, n) : c; t ? (o && i === f || u.push(c), i = f) : r ? m.contains(i, f) || (i.push(f), u.push(c)) : m.contains(u, c) || u.push(c) } return u }, m.union = function () { return m.uniq(S(arguments, !0, !0)) }, m.intersection = function (n) { for (var t = [], r = arguments.length, e = 0, u = O(n) ; u > e; e++) { var i = n[e]; if (!m.contains(t, i)) { for (var o = 1; r > o && m.contains(arguments[o], i) ; o++); o === r && t.push(i) } } return t }, m.difference = function (n) { var t = S(arguments, !0, !0, 1); return m.filter(n, function (n) { return !m.contains(t, n) }) }, m.zip = function () { return m.unzip(arguments) }, m.unzip = function (n) { for (var t = n && m.max(n, O).length || 0, r = Array(t), e = 0; t > e; e++) r[e] = m.pluck(n, e); return r }, m.object = function (n, t) { for (var r = {}, e = 0, u = O(n) ; u > e; e++) t ? r[n[e]] = t[e] : r[n[e][0]] = n[e][1]; return r }, m.findIndex = t(1), m.findLastIndex = t(-1), m.sortedIndex = function (n, t, r, e) { r = x(r, e, 1); for (var u = r(t), i = 0, o = O(n) ; o > i;) { var a = Math.floor((i + o) / 2); r(n[a]) < u ? i = a + 1 : o = a } return i }, m.indexOf = r(1, m.findIndex, m.sortedIndex), m.lastIndexOf = r(-1, m.findLastIndex), m.range = function (n, t, r) { null == t && (t = n || 0, n = 0), r = r || 1; for (var e = Math.max(Math.ceil((t - n) / r), 0), u = Array(e), i = 0; e > i; i++, n += r) u[i] = n; return u }; var E = function (n, t, r, e, u) { if (!(e instanceof t)) return n.apply(r, u); var i = j(n.prototype), o = n.apply(i, u); return m.isObject(o) ? o : i }; m.bind = function (n, t) { if (g && n.bind === g) return g.apply(n, l.call(arguments, 1)); if (!m.isFunction(n)) throw new TypeError("Bind must be called on a function"); var r = l.call(arguments, 2), e = function () { return E(n, e, t, this, r.concat(l.call(arguments))) }; return e }, m.partial = function (n) { var t = l.call(arguments, 1), r = function () { for (var e = 0, u = t.length, i = Array(u), o = 0; u > o; o++) i[o] = t[o] === m ? arguments[e++] : t[o]; for (; e < arguments.length;) i.push(arguments[e++]); return E(n, r, this, this, i) }; return r }, m.bindAll = function (n) { var t, r, e = arguments.length; if (1 >= e) throw new Error("bindAll must be passed function names"); for (t = 1; e > t; t++) r = arguments[t], n[r] = m.bind(n[r], n); return n }, m.memoize = function (n, t) { var r = function (e) { var u = r.cache, i = "" + (t ? t.apply(this, arguments) : e); return m.has(u, i) || (u[i] = n.apply(this, arguments)), u[i] }; return r.cache = {}, r }, m.delay = function (n, t) { var r = l.call(arguments, 2); return setTimeout(function () { return n.apply(null, r) }, t) }, m.defer = m.partial(m.delay, m, 1), m.throttle = function (n, t, r) { var e, u, i, o = null, a = 0; r || (r = {}); var c = function () { a = r.leading === !1 ? 0 : m.now(), o = null, i = n.apply(e, u), o || (e = u = null) }; return function () { var f = m.now(); a || r.leading !== !1 || (a = f); var l = t - (f - a); return e = this, u = arguments, 0 >= l || l > t ? (o && (clearTimeout(o), o = null), a = f, i = n.apply(e, u), o || (e = u = null)) : o || r.trailing === !1 || (o = setTimeout(c, l)), i } }, m.debounce = function (n, t, r) { var e, u, i, o, a, c = function () { var f = m.now() - o; t > f && f >= 0 ? e = setTimeout(c, t - f) : (e = null, r || (a = n.apply(i, u), e || (i = u = null))) }; return function () { i = this, u = arguments, o = m.now(); var f = r && !e; return e || (e = setTimeout(c, t)), f && (a = n.apply(i, u), i = u = null), a } }, m.wrap = function (n, t) { return m.partial(t, n) }, m.negate = function (n) { return function () { return !n.apply(this, arguments) } }, m.compose = function () { var n = arguments, t = n.length - 1; return function () { for (var r = t, e = n[t].apply(this, arguments) ; r--;) e = n[r].call(this, e); return e } }, m.after = function (n, t) { return function () { return --n < 1 ? t.apply(this, arguments) : void 0 } }, m.before = function (n, t) { var r; return function () { return --n > 0 && (r = t.apply(this, arguments)), 1 >= n && (t = null), r } }, m.once = m.partial(m.before, 2); var M = !{ toString: null }.propertyIsEnumerable("toString"), I = ["valueOf", "isPrototypeOf", "toString", "propertyIsEnumerable", "hasOwnProperty", "toLocaleString"]; m.keys = function (n) { if (!m.isObject(n)) return []; if (v) return v(n); var t = []; for (var r in n) m.has(n, r) && t.push(r); return M && e(n, t), t }, m.allKeys = function (n) { if (!m.isObject(n)) return []; var t = []; for (var r in n) t.push(r); return M && e(n, t), t }, m.values = function (n) { for (var t = m.keys(n), r = t.length, e = Array(r), u = 0; r > u; u++) e[u] = n[t[u]]; return e }, m.mapObject = function (n, t, r) { t = x(t, r); for (var e, u = m.keys(n), i = u.length, o = {}, a = 0; i > a; a++) e = u[a], o[e] = t(n[e], e, n); return o }, m.pairs = function (n) { for (var t = m.keys(n), r = t.length, e = Array(r), u = 0; r > u; u++) e[u] = [t[u], n[t[u]]]; return e }, m.invert = function (n) { for (var t = {}, r = m.keys(n), e = 0, u = r.length; u > e; e++) t[n[r[e]]] = r[e]; return t }, m.functions = m.methods = function (n) { var t = []; for (var r in n) m.isFunction(n[r]) && t.push(r); return t.sort() }, m.extend = _(m.allKeys), m.extendOwn = m.assign = _(m.keys), m.findKey = function (n, t, r) { t = x(t, r); for (var e, u = m.keys(n), i = 0, o = u.length; o > i; i++) if (e = u[i], t(n[e], e, n)) return e }, m.pick = function (n, t, r) { var e, u, i = {}, o = n; if (null == o) return i; m.isFunction(t) ? (u = m.allKeys(o), e = b(t, r)) : (u = S(arguments, !1, !1, 1), e = function (n, t, r) { return t in r }, o = Object(o)); for (var a = 0, c = u.length; c > a; a++) { var f = u[a], l = o[f]; e(l, f, o) && (i[f] = l) } return i }, m.omit = function (n, t, r) { if (m.isFunction(t)) t = m.negate(t); else { var e = m.map(S(arguments, !1, !1, 1), String); t = function (n, t) { return !m.contains(e, t) } } return m.pick(n, t, r) }, m.defaults = _(m.allKeys, !0), m.create = function (n, t) { var r = j(n); return t && m.extendOwn(r, t), r }, m.clone = function (n) { return m.isObject(n) ? m.isArray(n) ? n.slice() : m.extend({}, n) : n }, m.tap = function (n, t) { return t(n), n }, m.isMatch = function (n, t) { var r = m.keys(t), e = r.length; if (null == n) return !e; for (var u = Object(n), i = 0; e > i; i++) { var o = r[i]; if (t[o] !== u[o] || !(o in u)) return !1 } return !0 }; var N = function (n, t, r, e) { if (n === t) return 0 !== n || 1 / n === 1 / t; if (null == n || null == t) return n === t; n instanceof m && (n = n._wrapped), t instanceof m && (t = t._wrapped); var u = s.call(n); if (u !== s.call(t)) return !1; switch (u) { case "[object RegExp]": case "[object String]": return "" + n == "" + t; case "[object Number]": return +n !== +n ? +t !== +t : 0 === +n ? 1 / +n === 1 / t : +n === +t; case "[object Date]": case "[object Boolean]": return +n === +t } var i = "[object Array]" === u; if (!i) { if ("object" != typeof n || "object" != typeof t) return !1; var o = n.constructor, a = t.constructor; if (o !== a && !(m.isFunction(o) && o instanceof o && m.isFunction(a) && a instanceof a) && "constructor" in n && "constructor" in t) return !1 } r = r || [], e = e || []; for (var c = r.length; c--;) if (r[c] === n) return e[c] === t; if (r.push(n), e.push(t), i) { if (c = n.length, c !== t.length) return !1; for (; c--;) if (!N(n[c], t[c], r, e)) return !1 } else { var f, l = m.keys(n); if (c = l.length, m.keys(t).length !== c) return !1; for (; c--;) if (f = l[c], !m.has(t, f) || !N(n[f], t[f], r, e)) return !1 } return r.pop(), e.pop(), !0 }; m.isEqual = function (n, t) { return N(n, t) }, m.isEmpty = function (n) { return null == n ? !0 : k(n) && (m.isArray(n) || m.isString(n) || m.isArguments(n)) ? 0 === n.length : 0 === m.keys(n).length }, m.isElement = function (n) { return !(!n || 1 !== n.nodeType) }, m.isArray = h || function (n) { return "[object Array]" === s.call(n) }, m.isObject = function (n) { var t = typeof n; return "function" === t || "object" === t && !!n }, m.each(["Arguments", "Function", "String", "Number", "Date", "RegExp", "Error"], function (n) { m["is" + n] = function (t) { return s.call(t) === "[object " + n + "]" } }), m.isArguments(arguments) || (m.isArguments = function (n) { return m.has(n, "callee") }), "function" != typeof /./ && "object" != typeof Int8Array && (m.isFunction = function (n) { return "function" == typeof n || !1 }), m.isFinite = function (n) { return isFinite(n) && !isNaN(parseFloat(n)) }, m.isNaN = function (n) { return m.isNumber(n) && n !== +n }, m.isBoolean = function (n) { return n === !0 || n === !1 || "[object Boolean]" === s.call(n) }, m.isNull = function (n) { return null === n }, m.isUndefined = function (n) { return n === void 0 }, m.has = function (n, t) { return null != n && p.call(n, t) }, m.noConflict = function () { return u._ = i, this }, m.identity = function (n) { return n }, m.constant = function (n) { return function () { return n } }, m.noop = function () { }, m.property = w, m.propertyOf = function (n) { return null == n ? function () { } : function (t) { return n[t] } }, m.matcher = m.matches = function (n) { return n = m.extendOwn({}, n), function (t) { return m.isMatch(t, n) } }, m.times = function (n, t, r) { var e = Array(Math.max(0, n)); t = b(t, r, 1); for (var u = 0; n > u; u++) e[u] = t(u); return e }, m.random = function (n, t) { return null == t && (t = n, n = 0), n + Math.floor(Math.random() * (t - n + 1)) }, m.now = Date.now || function () { return (new Date).getTime() }; var B = { "&": "&", "<": "<", ">": ">", '"': """, "'": "'", "`": "`" }, T = m.invert(B), R = function (n) { var t = function (t) { return n[t] }, r = "(?:" + m.keys(n).join("|") + ")", e = RegExp(r), u = RegExp(r, "g"); return function (n) { return n = null == n ? "" : "" + n, e.test(n) ? n.replace(u, t) : n } }; m.escape = R(B), m.unescape = R(T), m.result = function (n, t, r) { var e = null == n ? void 0 : n[t]; return e === void 0 && (e = r), m.isFunction(e) ? e.call(n) : e }; var q = 0; m.uniqueId = function (n) { var t = ++q + ""; return n ? n + t : t }, m.templateSettings = { evaluate: /<%([\s\S]+?)%>/g, interpolate: /<%=([\s\S]+?)%>/g, escape: /<%-([\s\S]+?)%>/g }; var K = /(.)^/, z = { "'": "'", "\\": "\\", "\r": "r", "\n": "n", "\u2028": "u2028", "\u2029": "u2029" }, D = /\\|'|\r|\n|\u2028|\u2029/g, L = function (n) { return "\\" + z[n] }; m.template = function (n, t, r) { !t && r && (t = r), t = m.defaults({}, t, m.templateSettings); var e = RegExp([(t.escape || K).source, (t.interpolate || K).source, (t.evaluate || K).source].join("|") + "|$", "g"), u = 0, i = "__p+='"; n.replace(e, function (t, r, e, o, a) { return i += n.slice(u, a).replace(D, L), u = a + t.length, r ? i += "'+\n((__t=(" + r + "))==null?'':_.escape(__t))+\n'" : e ? i += "'+\n((__t=(" + e + "))==null?'':__t)+\n'" : o && (i += "';\n" + o + "\n__p+='"), t }), i += "';\n", t.variable || (i = "with(obj||{}){\n" + i + "}\n"), i = "var __t,__p='',__j=Array.prototype.join," + "print=function(){__p+=__j.call(arguments,'');};\n" + i + "return __p;\n"; try { var o = new Function(t.variable || "obj", "_", i) } catch (a) { throw a.source = i, a } var c = function (n) { return o.call(this, n, m) }, f = t.variable || "obj"; return c.source = "function(" + f + "){\n" + i + "}", c }, m.chain = function (n) { var t = m(n); return t._chain = !0, t }; var P = function (n, t) { return n._chain ? m(t).chain() : t }; m.mixin = function (n) { m.each(m.functions(n), function (t) { var r = m[t] = n[t]; m.prototype[t] = function () { var n = [this._wrapped]; return f.apply(n, arguments), P(this, r.apply(m, n)) } }) }, m.mixin(m), m.each(["pop", "push", "reverse", "shift", "sort", "splice", "unshift"], function (n) { var t = o[n]; m.prototype[n] = function () { var r = this._wrapped; return t.apply(r, arguments), "shift" !== n && "splice" !== n || 0 !== r.length || delete r[0], P(this, r) } }), m.each(["concat", "join", "slice"], function (n) { var t = o[n]; m.prototype[n] = function () { return P(this, t.apply(this._wrapped, arguments)) } }), m.prototype.value = function () { return this._wrapped }, m.prototype.valueOf = m.prototype.toJSON = m.prototype.value, m.prototype.toString = function () { return "" + this._wrapped }, "function" == typeof define && define.amd && define("underscore", [], function () { return m }) }).call(this);
2523$(function () {
2524
2525 var map = null;
2526 var defaultHotel;
2527 var activeHotelLatLong = {};
2528 var activeHotel = null;
2529 var otherHotelsMarkers = [];
2530 var markers = [];
2531 var hotelMarker = null;
2532 var starRatingImage = "";
2533 var infowindow = new google.maps.InfoWindow({});
2534 var type = JSON.parse(window["holidayType"]);
2535 var homeUrl = window["homeUrl"]; //js.js//
2536 if (type == 1) {
2537 homeUrl = window["homeUrl"];//js.js//
2538 }
2539 if (type == 2) {
2540 homeUrl = "https://www.holidayusa.co.uk";//js.js//
2541 }
2542 var mapIcons = {
2543 hotel: homeUrl + "/images/maps/map-marker.png",
2544 airport: homeUrl + "/images/maps/airport-dot.png",
2545 marker: homeUrl + "/images/maps/map_icon_red.png"
2546 };
2547
2548 $(document).on("click touchstart tap", ".google-maps-init-details", function (e) {
2549 defaultHotel = window["defaultHotel"];
2550 activeHotel = null;
2551 e.preventDefault();
2552 var obj = $(this);
2553 var ttiCode = parseInt(obj.context.attributes.datahotelid.value);
2554 var idMap = obj.data("map-id");
2555 var ttiCodeString = ttiCode.toString();
2556 var matchedHotel = _.find(defaultHotel, function (hotel) {
2557 return hotel.toString() === ttiCodeString;
2558 });
2559
2560 if (typeof matchedHotel !== "undefined") {
2561 activeHotel = defaultHotel;
2562 }
2563 activeHotelLatLong = { lat: parseFloat(activeHotel.GeoLat), lng: parseFloat(activeHotel.GeoLong) };
2564 setTimeout(function () {
2565 showMaps();
2566 showMap(idMap);
2567 }, 500);
2568
2569 });
2570
2571
2572 showMap = function (idMap) {
2573 map = null;
2574 if (!activeHotel) {
2575 return;
2576 }
2577 if (activeHotel.StarRating) {
2578 var double = activeHotel.StarRating % 2;
2579 var star = "";
2580 if (double == 0) {
2581 star = activeHotel.StarRating.toString() + "-0";
2582 } else {
2583 var split = activeHotel.StarRating.toString().split('.');
2584 star = split[0] + "-5";
2585 }
2586 starRatingImage = homeUrl + "/images/star-ratings/star_rating_" + star + ".svg";
2587 }
2588
2589 var airportMarker = null;
2590 map = new google.maps.Map(document.getElementById(idMap), {
2591 center: activeHotelLatLong,
2592 zoom: 12,
2593 streetViewControl: false,
2594 });
2595
2596 hotelMarker = new google.maps.Marker({
2597 position: activeHotelLatLong,
2598 map: map,
2599 icon: mapIcons.marker,
2600 title: activeHotel.Name
2601 });
2602
2603 markers.push(hotelMarker);
2604
2605 if (activeHotel.Airports && activeHotel.Airports.length > 0) {
2606 for (var j = 0; j < activeHotel.Airports.length; j++) {
2607 airportMarker = new google.maps.Marker({
2608 position: { lat: parseFloat(activeHotel.Airports[j].GeoLat), lng: parseFloat(activeHotel.Airports[j].GeoLong) },
2609 map: map,
2610 icon: mapIcons.airport,
2611 title: activeHotel.Airports[j].Description
2612 });
2613
2614 markers.push(airportMarker);
2615
2616 google.maps.event.addListener(airportMarker, 'click', (function (airportMarker, i) {
2617
2618 return function () {
2619
2620 infowindow.setContent(airportMarker.title);
2621 infowindow.open(map, airportMarker);
2622 };
2623
2624 })(airportMarker, 0));
2625 }
2626 }
2627
2628 google.maps.event.addListener(hotelMarker, 'click', (function (hotelMarker, i) {
2629 return function () {
2630
2631 var html = "<div class='info-window' style='overflow: hidden;'><div class='details'><h5 style='font-family: inherit;'>" + activeHotel.Name + "</h5><div class='star-rating' style='width: 100%;max-width: 87px;'><img src='" + starRatingImage + "'/></div></div>";
2632
2633 infowindow.setContent(html);
2634 infowindow.open(map, hotelMarker);
2635 };
2636
2637 })(hotelMarker, 0));
2638 if (idMap == "googleMapsMap") {
2639 $("#hotelName").text(activeHotel.Name);
2640 $("#hotelStars").html("<img src='" + starRatingImage + "'/>");
2641 $("#googleMapsModal").modal("show");
2642 }
2643
2644 google.maps.event.trigger(map, "resize");
2645 map.setCenter(activeHotelLatLong);
2646 };
2647
2648
2649 $(document).on("click", "#googleMapsShowAllHotels", function (e) {
2650 e.preventDefault();
2651 showAllHotels();
2652 });
2653
2654
2655 //show all hotels in master list for this page (defaultHotels) on the map using custom icon and pop up data
2656 var showAllHotels = function () {
2657 otherHotelsMarkers = [];
2658 if (defaultHotel === undefined) {
2659 defaultHotel = window["defaultHotel"];
2660 }
2661 _.each(defaultHotel, function (hotel) {
2662 var lat = parseFloat(hotel.GeoLat);
2663 var lng = parseFloat(hotel.GeoLong);
2664 if (!isNaN(lat) && !isNaN(lng)) {
2665 var latlng = new google.maps.LatLng(lat, lng);
2666 var marker = new google.maps.Marker({
2667 icon: mapIcons.marker,
2668 position: latlng,
2669 map: map,
2670 title: hotel.Name
2671 });
2672 google.maps.event.addListener(marker, 'click', function () {
2673 var html = "<div class='info-window' style='overflow: hidden;'><div class='details'><h5 style='font-family: inherit;'>" + hotel.name + "</h5><div class='star-rating' style='width: 100%;max-width: 87px;'><img src='" + starRatingImage + "'/></div></div>";
2674 infowindow.setContent(html);
2675 infowindow.open(map, marker);
2676 });
2677 otherHotelsMarkers.push(marker);
2678 }
2679 });
2680
2681 fitBounds(otherHotelsMarkers);
2682 };
2683
2684
2685 //centre the map to include all hotels and airport icons
2686 var autoCenter = function () {
2687
2688 var bounds = new google.maps.LatLngBounds();
2689 $.each(markers, function (index, marker) {
2690 bounds.extend(marker.position);
2691 });
2692
2693 $.each(otherHotelsMarkers, function (index, marker) {
2694 if (bounds.getNorthEast().equals(bounds.getSouthWest())) {
2695 var extendPoint = new google.maps.LatLng(bounds.getNorthEast().lat() + 0.01, bounds.getNorthEast().lng() + 0.01);
2696 bounds.extend(extendPoint);
2697 } else {
2698 bounds.extend(marker.position);
2699 }
2700 });
2701
2702
2703 map.fitBounds(bounds);
2704 };
2705 function fitBounds(markers) {
2706 var bounds = calculateBounds(markers);
2707 if (bounds != undefined) {
2708 map.fitBounds(bounds);
2709 }
2710 }
2711 function calculateBounds(markers) {
2712 var allMarkers = markers;
2713 if (allMarkers.length > 0) {
2714 var bounds = new google.maps.LatLngBounds();
2715 for (i = 0; i < allMarkers.length; i++) {
2716 if (bounds.getNorthEast().equals(bounds.getSouthWest())) {
2717 var extendPoint = new google.maps.LatLng(bounds.getNorthEast().lat() + 0.01, bounds.getNorthEast().lng() + 0.01);
2718 bounds.extend(extendPoint);
2719 } else {
2720 bounds.extend(allMarkers[i].getPosition());
2721 }
2722 }
2723 }
2724 return bounds;
2725 }
2726
2727
2728
2729
2730 //paste valid airport data here as stringified JSON here
2731 //var googleMapsData = JSON.parse('{"AirportGeoLatitude":"13.076134","AirportGeoLongitude":"-59.494057","AirportName":"Grantley Adams International Airport","ZoomLevel":12}');
2732 //END paste valid airport data here as stringified JSON here
2733
2734
2735 //initialise process
2736
2737});
2738
2739
2740function resizeTabs() {
2741 var divHotel = $(".hotel-container.country");
2742 var width = $(divHotel[0]).hasClass("double") ? divHotel[0].clientWidth / 2 : divHotel[0].clientWidth;
2743 $("#select-hotels > div > div").css("width", width-10);
2744 if (window.innerWidth < 768) {
2745 checkSelected();
2746 showMoreTabs();
2747 return
2748 }
2749 checkSelected();
2750 $("#allHotels").show();
2751 $("#allInclusive").show();
2752 $("#adultsOnly").show();
2753 $("#family").show();
2754 $("#luxury").show();
2755 $("#spa").show();
2756
2757}
2758function checkSelected() {
2759 if ($("#allHotels").hasClass("active") || $("#allInclusive").hasClass("active")) {
2760 moveNextTabCount = 0;
2761 }
2762 if ($("#adultsOnly").hasClass("active") || $("#family").hasClass("active")) {
2763 moveNextTabCount = 1;
2764 }
2765 if ($("#luxury").hasClass("active") || $("#spa").hasClass("active")) {
2766 moveNextTabCount = 2;
2767 }
2768}
2769var moveNextTabCount = 0;
2770function showMoreTabs() {
2771 if (moveNextTabCount > 2) {
2772 moveNextTabCount = 0;
2773 }
2774 if (moveNextTabCount == 0) {
2775 showMore("allHotels", "allInclusive");
2776 }
2777 if (moveNextTabCount == 1) {
2778 showMore("adultsOnly", "family");
2779 }
2780 if (moveNextTabCount == 2) {
2781 showMore("luxury", "spa");
2782 }
2783}
2784function editMoreTabs() {
2785 moveNextTabCount++;
2786 showMoreTabs();
2787}
2788function showMore(first, second) {
2789 $("#allHotels").hide();
2790 $("#allInclusive").hide();
2791 $("#adultsOnly").hide();
2792 $("#family").hide();
2793 $("#luxury").hide();
2794 $("#spa").hide();
2795 $("#" + first).show();
2796 $("#" + second).show();
2797}
2798
2799
2800$(document).ready(function () {
2801 $('.slick-carousel').slick({
2802 lazyLoad: 'ondemand',
2803 slidesToShow: 1,
2804 slidesToScroll: 1,
2805 adaptiveHeight: true,
2806 arrows: true,
2807 dots: true,
2808 infinite: true,
2809 autoplaySpeed: 2600,
2810 speed: 1500,
2811 autoplay: true,
2812 fade: true
2813 });
2814
2815 $('.slick-carousel').slick('slickPause');
2816
2817 setTimeout(function () {
2818 $('.slick-carousel').slick('slickPlay');
2819 }, 10000);
2820
2821 $('.slick-carousel').on('beforeChange', function (event, slick, currentSlide, nextSlide) {
2822 $("#setting_" + currentSlide).hide();
2823 $("#setting_" + nextSlide).show();
2824 });
2825 $("#setting_0").show();
2826
2827 $('.slick-carousel-details').slick({
2828 adaptiveHeight: true,
2829 arrows: true
2830 });
2831
2832
2833});
2834
2835function redirectToUrl(index) {
2836 var href = $("#setting_" + index + " a").attr('href');
2837 window.open(href, '_self');
2838}
2839
2840
2841
2842
2843
2844
2845function mappingToHistoryModel(searchModels) {
2846 var histories = [];
2847 for (var i = 0; i < searchModels.length; i++) {
2848 var history = {
2849 guid: searchModels[i].guid,
2850 searchHotel: {
2851 cabinType: {
2852 key: getCabinClass(searchModels[i].cabinType.trim()),
2853 value: searchModels[i].cabinType
2854 },
2855 type: searchModels[i].searchType,
2856 origin: {
2857 id: searchModels[i].originId,
2858 description: searchModels[i].originDescription,
2859 displayOrder: null
2860 },
2861 destination: {
2862 id: searchModels[i].destinationId,
2863 description: searchModels[i].destinationDescription,
2864 flightCode: searchModels[i].destinationDisplayOrder,
2865 hotelCount: searchModels[i].hotelCount
2866 },
2867 hotel: (searchModels[i].hotelId != null || searchModels[i].hotelName != null)
2868 ? {
2869 name: searchModels[i].hotelName,
2870 id: searchModels[i].hotelId,
2871 ttiCode: searchModels[i].hotelTtiCode,
2872 starRating: searchModels[i].starRating,
2873 trustYouRating: searchModels[i].trustYouRating,
2874 city: searchModels[i].city,
2875 trustYouLabel: searchModels[i].trustYouLabel,
2876 trustYouReviewCount: searchModels[i].trustYouReviewCount
2877 }
2878 : null,
2879 adult: searchModels[i].adult,
2880 child: searchModels[i].child,
2881 children: getChildren(searchModels[i].children1, searchModels[i].children2, searchModels[i].children3),
2882 date: { startDate: searchModels[i].dateStart, endDate: searchModels[i].dateEnd },
2883 dateMobile: { startDate: new Date(searchModels[i].dateStart), endDate: new Date(searchModels[i].dateEnd) },
2884 image: searchModels[i].image != null ? searchModels[i].image.toString() : null
2885 },
2886 date: new Date(searchModels[i].dateCreate)
2887 }
2888 histories.push(history);
2889 }
2890 return histories;
2891}
2892
2893function getCabinClass(value) {
2894 if (value == "any cabin class") {
2895 return 0;
2896 }
2897 if (value == "economy") {
2898 return 1;
2899 }
2900 if (value == "premium") {
2901 return 2;
2902 }
2903 if (value == "business") {
2904 return 3;
2905 }
2906 if (value == "first") {
2907 return 4;
2908 }
2909}
2910
2911function getChildren(children1, children2, children3) {
2912 var children = [];
2913 children.push(children1);
2914 children.push(children2);
2915 children.push(children3);
2916 return children;
2917}
2918function getSearchSync(accessToken, provider) {
2919 var xhr = new XMLHttpRequest();
2920 xhr.open('GET', "https://signin.caribbeanclassics.co.uk/api/search/get?provider=" + provider, false); //js.js//
2921 xhr.setRequestHeader("Authorization", "Bearer " + accessToken);
2922 xhr.setRequestHeader('Access-Control-Allow-Origin', '*');
2923 xhr.setRequestHeader('AllowedHeader', 'origin');
2924 xhr.send();
2925 if (xhr.status != 200) {
2926 return null;
2927 }
2928 var decompressedData = LZString.decompressFromBase64(xhr.responseText);
2929 decompressedData = LZString.decompress(decompressedData);
2930 return JSON.parse(decompressedData);
2931}
2932
2933function loadDbHistory(histories) {
2934 if (!histories || histories.length == 0) {
2935 return null;
2936 }
2937 histories = histories.slice().reverse();
2938 var returnHistories = mappingToHistoryModel(histories);
2939 return returnHistories;
2940}
2941
2942function setSearch(hotel, createDate, guid, accessToken, provider) {
2943 var startDate = moment(new Date(hotel.date.startDate)).set({ hour: 12, minute: 0, second: 0, millisecond: 0 });
2944 var endDate = moment(new Date(hotel.date.endDate)).set({ hour: 12, minute: 0, second: 0, millisecond: 0 });
2945 var adult = hotel.adult.toString();
2946 var child = hotel.child.toString();
2947 var children1 = hotel.child >= 1 ? hotel.children[0] != null ? hotel.children[0] : -1 : -1;
2948 var children2 = hotel.child >= 2 ? hotel.children[1] != null ? hotel.children[1] : -1 : -1;
2949 var children3 = hotel.child >= 3 ? hotel.children[2] != null ? hotel.children[2] : -1 : -1;
2950 var searchType = hotel.type.toString();
2951 var destinationId = hotel.destination.id.toString();
2952 var destinationDescription = hotel.destination.description;
2953 var destinationDisplayOrder = hotel.destination.flightCode == undefined ? "0" : hotel.destination.flightCode;
2954 var originId = hotel.origin.id.toString();
2955 var originDescription = hotel.origin.description;
2956 var hotelName = hotel.hotel != null ? hotel.hotel.name : null;
2957 var hotelId = hotel.hotel != null ? hotel.hotel.id.toString() : null;
2958 var cabinType = hotel.cabinType.value.toString();
2959 var dateStart = startDate.format();
2960 var dateEnd = endDate.format();
2961 var dateCreate = createDate.format();
2962 var hotelCount = hotel.destination.hotelCount;
2963 var hotelTtiCode = hotel.hotel != null ? hotel.hotel.ttiCode : null;
2964 var starRating = hotel.hotel != null ? hotel.hotel.starRating : null;
2965 var city = hotel.hotel != null ? hotel.hotel.city : null;
2966 var trustYouRating = hotel.hotel != null ? hotel.hotel.trustYouRating : null;
2967 var trustYouLabel = hotel.hotel != null ? hotel.hotel.trustYouLabel : null;
2968 var trustYouReviewCount = hotel.hotel != null ? hotel.hotel.trustYouReviewCount : null;
2969 var image = hotel.image;
2970 var requestString = "guid=" + guid + "&adult=" + adult + "&child=" + child + "&children1=" + children1 + "&children2=" + children2 + "&children3=" + children3 + "&searchType=" + searchType + "&destinationId=" + destinationId + "&destinationDescription=" + destinationDescription + "&destinationDisplayOrder=" + destinationDisplayOrder + "&originId=" + originId + "&originDescription=" + originDescription + "&hotelName=" + hotelName + "&hotelId=" + hotelId + "&cabinType=" + cabinType + "&dateStart=" + dateStart + "&dateEnd=" + dateEnd + "&dateCreate=" + dateCreate + "&provider=" + provider + "&hotelCount=" + hotelCount + "&hotelTtiCode=" + hotelTtiCode + "&starRating=" + starRating + "&city=" + city + "&trustYouRating=" + trustYouRating + "&trustYouLabel=" + trustYouLabel + "&trustYouReviewCount=" + trustYouReviewCount + "&image=" + image;
2971 var xhr = new XMLHttpRequest();
2972 xhr.open('GET', "https://signin.caribbeanclassics.co.uk/api/search/set?" + requestString, false);
2973 xhr.setRequestHeader("Authorization", "Bearer " + accessToken);
2974 xhr.setRequestHeader('Access-Control-Allow-Origin', '*');
2975 xhr.setRequestHeader('AllowedHeader', 'origin');
2976 xhr.send();
2977 if (xhr.status != 200) {
2978 return null;
2979 }
2980 var decompressedData = LZString.decompressFromBase64(xhr.responseText);
2981 decompressedData = LZString.decompress(decompressedData);
2982 return JSON.parse(decompressedData);
2983}
2984
2985function deleteHistorySignin(accessToken, history, provider) {
2986 var ttiCode = history.searchHotel.hotel ? history.searchHotel.hotel.ttiCode : null;
2987 var xhr = new XMLHttpRequest();
2988 xhr.open('GET', "https://signin.caribbeanclassics.co.uk/api/search/delete?guid=" + history.guid + "&ttiCode=" + ttiCode + "&provider=" + provider, false);
2989 xhr.setRequestHeader("Authorization", "Bearer " + accessToken);
2990 xhr.setRequestHeader('Access-Control-Allow-Origin', '*');
2991 xhr.setRequestHeader('AllowedHeader', 'origin');
2992 xhr.send();
2993 if (xhr.status != 200) {
2994 return null;
2995 }
2996 var decompressedData = LZString.decompressFromBase64(xhr.responseText);
2997 decompressedData = LZString.decompress(decompressedData);
2998 return JSON.parse(decompressedData);
2999}
3000function initSignalR() {
3001 try {
3002 $.connection.hub.url = window["WebApiUrl"] +'/signalr'; //js.js//
3003 var holidayHub = $.connection.holidayHub;
3004 holidayHub.client.refreshUserPage = function () {
3005 refreshUserPage();
3006 };
3007 holidayHub.client.clearLocalSearchHistory = function () {
3008 clearLocalSearchHistory();
3009 };
3010 holidayHub.client.clearCookies = function (guid) {
3011 clearCookies(guid);
3012 };
3013 holidayHub.client.clearLocalStorage = function () {
3014 clearLocalStorage();
3015 };
3016 holidayHub.client.removeOutputCacheUmbraco = function () {
3017 removeOutputCacheUmbraco();
3018 };
3019
3020 $.connection.hub.start().done(function () {
3021 }).fail(function () { });
3022 $.connection.hub.disconnected(function () {
3023 setTimeout(function () {
3024 $.connection.hub.start();
3025 }, 5000);
3026 });
3027 } catch (e) {
3028 setTimeout(function () { initSignalR(); }, 10);
3029 }
3030}
3031
3032function removeOutputCacheUmbraco() {
3033 console.log("removeOutputCacheUmbraco");
3034 $.ajax({
3035 url: 'umbraco/surface/Session/RemoveOutputCacheUmbraco',
3036 type: 'GET',
3037 success: function (result) {
3038 refreshUserPage()
3039 },
3040 error: function (error) {
3041 }
3042 });
3043}
3044/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
3045/* Base64 class: Base 64 encoding / decoding (c) Chris Veness 2002-2011 */
3046/* note: depends on Utf8 class */
3047/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
3048
3049var Base64 = {}; // Base64 namespace
3050
3051Base64.code = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
3052
3053/**
3054 * Encode string into Base64, as defined by RFC 4648 [http://tools.ietf.org/html/rfc4648]
3055 * (instance method extending String object). As per RFC 4648, no newlines are added.
3056 *
3057 * @param {String} str The string to be encoded as base-64
3058 * @param {Boolean} [utf8encode=false] Flag to indicate whether str is Unicode string to be encoded
3059 * to UTF8 before conversion to base64; otherwise string is assumed to be 8-bit characters
3060 * @returns {String} Base64-encoded string
3061 */
3062Base64.encode = function(str, utf8encode) { // http://tools.ietf.org/html/rfc4648
3063 utf8encode = (typeof utf8encode == 'undefined') ? false : utf8encode;
3064 var o1, o2, o3, bits, h1, h2, h3, h4, e=[], pad = '', c, plain, coded;
3065 var b64 = Base64.code;
3066
3067 plain = utf8encode ? Utf8.encode(str) : str;
3068
3069 c = plain.length % 3; // pad string to length of multiple of 3
3070 if (c > 0) { while (c++ < 3) { pad += '='; plain += '\0'; } }
3071 // note: doing padding here saves us doing special-case packing for trailing 1 or 2 chars
3072
3073 for (c=0; c<plain.length; c+=3) { // pack three octets into four hexets
3074 o1 = plain.charCodeAt(c);
3075 o2 = plain.charCodeAt(c+1);
3076 o3 = plain.charCodeAt(c+2);
3077
3078 bits = o1<<16 | o2<<8 | o3;
3079
3080 h1 = bits>>18 & 0x3f;
3081 h2 = bits>>12 & 0x3f;
3082 h3 = bits>>6 & 0x3f;
3083 h4 = bits & 0x3f;
3084
3085 // use hextets to index into code string
3086 e[c/3] = b64.charAt(h1) + b64.charAt(h2) + b64.charAt(h3) + b64.charAt(h4);
3087 }
3088 coded = e.join(''); // join() is far faster than repeated string concatenation in IE
3089
3090 // replace 'A's from padded nulls with '='s
3091 coded = coded.slice(0, coded.length-pad.length) + pad;
3092
3093 return coded;
3094}
3095
3096/**
3097 * Decode string from Base64, as defined by RFC 4648 [http://tools.ietf.org/html/rfc4648]
3098 * (instance method extending String object). As per RFC 4648, newlines are not catered for.
3099 *
3100 * @param {String} str The string to be decoded from base-64
3101 * @param {Boolean} [utf8decode=false] Flag to indicate whether str is Unicode string to be decoded
3102 * from UTF8 after conversion from base64
3103 * @returns {String} decoded string
3104 */
3105Base64.decode = function(str, utf8decode) {
3106 utf8decode = (typeof utf8decode == 'undefined') ? false : utf8decode;
3107 var o1, o2, o3, h1, h2, h3, h4, bits, d=[], plain, coded;
3108 var b64 = Base64.code;
3109
3110 coded = utf8decode ? Utf8.decode(str) : str;
3111
3112 for (var c=0; c<coded.length; c+=4) { // unpack four hexets into three octets
3113 h1 = b64.indexOf(coded.charAt(c));
3114 h2 = b64.indexOf(coded.charAt(c+1));
3115 h3 = b64.indexOf(coded.charAt(c+2));
3116 h4 = b64.indexOf(coded.charAt(c+3));
3117
3118 bits = h1<<18 | h2<<12 | h3<<6 | h4;
3119
3120 o1 = bits>>>16 & 0xff;
3121 o2 = bits>>>8 & 0xff;
3122 o3 = bits & 0xff;
3123
3124 d[c/4] = String.fromCharCode(o1, o2, o3);
3125 // check for padding
3126 if (h4 == 0x40) d[c/4] = String.fromCharCode(o1, o2);
3127 if (h3 == 0x40) d[c/4] = String.fromCharCode(o1);
3128 }
3129 plain = d.join(''); // join() is far faster than repeated string concatenation in IE
3130
3131 return utf8decode ? Utf8.decode(plain) : plain;
3132}
3133
3134/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */