Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ! function(e, t) {
- "use strict";
- "object" == typeof module && "object" == typeof module.exports ? module.exports = e.document ? t(e, !0) : function(e) {
- if (!e.document) throw new Error("jQuery requires a window with a document");
- return t(e)
- } : t(e)
- }("undefined" != typeof window ? window : this, function(e, t) {
- "use strict";
- function n(e, t) {
- t = t || te;
- var n = t.createElement("script");
- n.text = e, t.head.appendChild(n).parentNode.removeChild(n)
- }
- function r(e) {
- var t = !!e && "length" in e && e.length,
- n = de.type(e);
- return "function" !== n && !de.isWindow(e) && ("array" === n || 0 === t || "number" == typeof t && t > 0 && t - 1 in e)
- }
- function i(e, t, n) {
- return de.isFunction(t) ? de.grep(e, function(e, r) {
- return !!t.call(e, r, e) !== n
- }) : t.nodeType ? de.grep(e, function(e) {
- return e === t !== n
- }) : "string" != typeof t ? de.grep(e, function(e) {
- return ae.call(t, e) > -1 !== n
- }) : Te.test(t) ? de.filter(t, e, n) : (t = de.filter(t, e), de.grep(e, function(e) {
- return ae.call(t, e) > -1 !== n && 1 === e.nodeType
- }))
- }
- function o(e, t) {
- for (;
- (e = e[t]) && 1 !== e.nodeType;);
- return e
- }
- function a(e) {
- var t = {};
- return de.each(e.match(Ne) || [], function(e, n) {
- t[n] = !0
- }), t
- }
- function s(e) {
- return e
- }
- function u(e) {
- throw e
- }
- function c(e, t, n) {
- var r;
- try {
- e && de.isFunction(r = e.promise) ? r.call(e).done(t).fail(n) : e && de.isFunction(r = e.then) ? r.call(e, t, n) : t.call(void 0, e)
- } catch (e) {
- n.call(void 0, e)
- }
- }
- function l() {
- te.removeEventListener("DOMContentLoaded", l), e.removeEventListener("load", l), de.ready()
- }
- function f() {
- this.expando = de.expando + f.uid++
- }
- function p(e) {
- return "true" === e || "false" !== e && ("null" === e ? null : e === +e + "" ? +e : He.test(e) ? JSON.parse(e) : e)
- }
- function h(e, t, n) {
- var r;
- if (void 0 === n && 1 === e.nodeType)
- if (r = "data-" + t.replace(Ie, "-$&").toLowerCase(), n = e.getAttribute(r), "string" == typeof n) {
- try {
- n = p(n)
- } catch (i) {}
- qe.set(e, t, n)
- } else n = void 0;
- return n
- }
- function d(e, t, n, r) {
- var i, o = 1,
- a = 20,
- s = r ? function() {
- return r.cur()
- } : function() {
- return de.css(e, t, "")
- },
- u = s(),
- c = n && n[3] || (de.cssNumber[t] ? "" : "px"),
- l = (de.cssNumber[t] || "px" !== c && +u) && $e.exec(de.css(e, t));
- if (l && l[3] !== c) {
- c = c || l[3], n = n || [], l = +u || 1;
- do o = o || ".5", l /= o, de.style(e, t, l + c); while (o !== (o = s() / u) && 1 !== o && --a)
- }
- return n && (l = +l || +u || 0, i = n[1] ? l + (n[1] + 1) * n[2] : +n[2], r && (r.unit = c, r.start = l, r.end = i)), i
- }
- function g(e) {
- var t, n = e.ownerDocument,
- r = e.nodeName,
- i = Be[r];
- return i ? i : (t = n.body.appendChild(n.createElement(r)), i = de.css(t, "display"), t.parentNode.removeChild(t), "none" === i && (i = "block"), Be[r] = i, i)
- }
- function m(e, t) {
- for (var n, r, i = [], o = 0, a = e.length; o < a; o++) r = e[o], r.style && (n = r.style.display, t ? ("none" === n && (i[o] = Oe.get(r, "display") || null, i[o] || (r.style.display = "")), "" === r.style.display && We(r) && (i[o] = g(r))) : "none" !== n && (i[o] = "none", Oe.set(r, "display", n)));
- for (o = 0; o < a; o++) null != i[o] && (e[o].style.display = i[o]);
- return e
- }
- function v(e, t) {
- var n;
- return n = "undefined" != typeof e.getElementsByTagName ? e.getElementsByTagName(t || "*") : "undefined" != typeof e.querySelectorAll ? e.querySelectorAll(t || "*") : [], void 0 === t || t && de.nodeName(e, t) ? de.merge([e], n) : n
- }
- function y(e, t) {
- for (var n = 0, r = e.length; n < r; n++) Oe.set(e[n], "globalEval", !t || Oe.get(t[n], "globalEval"))
- }
- function b(e, t, n, r, i) {
- for (var o, a, s, u, c, l, f = t.createDocumentFragment(), p = [], h = 0, d = e.length; h < d; h++)
- if (o = e[h], o || 0 === o)
- if ("object" === de.type(o)) de.merge(p, o.nodeType ? [o] : o);
- else if (Je.test(o)) {
- for (a = a || f.appendChild(t.createElement("div")), s = (Ue.exec(o) || ["", ""])[1].toLowerCase(), u = Ye[s] || Ye._default, a.innerHTML = u[1] + de.htmlPrefilter(o) + u[2], l = u[0]; l--;) a = a.lastChild;
- de.merge(p, a.childNodes), a = f.firstChild, a.textContent = ""
- } else p.push(t.createTextNode(o));
- for (f.textContent = "", h = 0; o = p[h++];)
- if (r && de.inArray(o, r) > -1) i && i.push(o);
- else if (c = de.contains(o.ownerDocument, o), a = v(f.appendChild(o), "script"), c && y(a), n)
- for (l = 0; o = a[l++];) Xe.test(o.type || "") && n.push(o);
- return f
- }
- function w() {
- return !0
- }
- function x() {
- return !1
- }
- function _() {
- try {
- return te.activeElement
- } catch (e) {}
- }
- function k(e, t, n, r, i, o) {
- var a, s;
- if ("object" == typeof t) {
- "string" != typeof n && (r = r || n, n = void 0);
- for (s in t) k(e, s, n, r, t[s], o);
- return e
- }
- if (null == r && null == i ? (i = n, r = n = void 0) : null == i && ("string" == typeof n ? (i = r, r = void 0) : (i = r, r = n, n = void 0)), i === !1) i = x;
- else if (!i) return e;
- return 1 === o && (a = i, i = function(e) {
- return de().off(e), a.apply(this, arguments)
- }, i.guid = a.guid || (a.guid = de.guid++)), e.each(function() {
- de.event.add(this, t, i, r, n)
- })
- }
- function T(e, t) {
- return de.nodeName(e, "table") && de.nodeName(11 !== t.nodeType ? t : t.firstChild, "tr") ? e.getElementsByTagName("tbody")[0] || e : e
- }
- function C(e) {
- return e.type = (null !== e.getAttribute("type")) + "/" + e.type, e
- }
- function S(e) {
- var t = rt.exec(e.type);
- return t ? e.type = t[1] : e.removeAttribute("type"), e
- }
- function E(e, t) {
- var n, r, i, o, a, s, u, c;
- if (1 === t.nodeType) {
- if (Oe.hasData(e) && (o = Oe.access(e), a = Oe.set(t, o), c = o.events)) {
- delete a.handle, a.events = {};
- for (i in c)
- for (n = 0, r = c[i].length; n < r; n++) de.event.add(t, i, c[i][n])
- }
- qe.hasData(e) && (s = qe.access(e), u = de.extend({}, s), qe.set(t, u))
- }
- }
- function j(e, t) {
- var n = t.nodeName.toLowerCase();
- "input" === n && Ke.test(e.type) ? t.checked = e.checked : "input" !== n && "textarea" !== n || (t.defaultValue = e.defaultValue)
- }
- function A(e, t, r, i) {
- t = ie.apply([], t);
- var o, a, s, u, c, l, f = 0,
- p = e.length,
- h = p - 1,
- d = t[0],
- g = de.isFunction(d);
- if (g || p > 1 && "string" == typeof d && !pe.checkClone && nt.test(d)) return e.each(function(n) {
- var o = e.eq(n);
- g && (t[0] = d.call(this, n, o.html())), A(o, t, r, i)
- });
- if (p && (o = b(t, e[0].ownerDocument, !1, e, i), a = o.firstChild, 1 === o.childNodes.length && (o = a), a || i)) {
- for (s = de.map(v(o, "script"), C), u = s.length; f < p; f++) c = o, f !== h && (c = de.clone(c, !0, !0), u && de.merge(s, v(c, "script"))), r.call(e[f], c, f);
- if (u)
- for (l = s[s.length - 1].ownerDocument, de.map(s, S), f = 0; f < u; f++) c = s[f], Xe.test(c.type || "") && !Oe.access(c, "globalEval") && de.contains(l, c) && (c.src ? de._evalUrl && de._evalUrl(c.src) : n(c.textContent.replace(it, ""), l))
- }
- return e
- }
- function N(e, t, n) {
- for (var r, i = t ? de.filter(t, e) : e, o = 0; null != (r = i[o]); o++) n || 1 !== r.nodeType || de.cleanData(v(r)), r.parentNode && (n && de.contains(r.ownerDocument, r) && y(v(r, "script")), r.parentNode.removeChild(r));
- return e
- }
- function D(e, t, n) {
- var r, i, o, a, s = e.style;
- return n = n || st(e), n && (a = n.getPropertyValue(t) || n[t], "" !== a || de.contains(e.ownerDocument, e) || (a = de.style(e, t)), !pe.pixelMarginRight() && at.test(a) && ot.test(t) && (r = s.width, i = s.minWidth, o = s.maxWidth, s.minWidth = s.maxWidth = s.width = a, a = n.width, s.width = r, s.minWidth = i, s.maxWidth = o)), void 0 !== a ? a + "" : a
- }
- function F(e, t) {
- return {
- get: function() {
- return e() ? void delete this.get : (this.get = t).apply(this, arguments)
- }
- }
- }
- function L(e) {
- if (e in pt) return e;
- for (var t = e[0].toUpperCase() + e.slice(1), n = ft.length; n--;)
- if (e = ft[n] + t, e in pt) return e
- }
- function R(e, t, n) {
- var r = $e.exec(t);
- return r ? Math.max(0, r[2] - (n || 0)) + (r[3] || "px") : t
- }
- function O(e, t, n, r, i) {
- var o, a = 0;
- for (o = n === (r ? "border" : "content") ? 4 : "width" === t ? 1 : 0; o < 4; o += 2) "margin" === n && (a += de.css(e, n + Me[o], !0, i)), r ? ("content" === n && (a -= de.css(e, "padding" + Me[o], !0, i)), "margin" !== n && (a -= de.css(e, "border" + Me[o] + "Width", !0, i))) : (a += de.css(e, "padding" + Me[o], !0, i), "padding" !== n && (a += de.css(e, "border" + Me[o] + "Width", !0, i)));
- return a
- }
- function q(e, t, n) {
- var r, i = !0,
- o = st(e),
- a = "border-box" === de.css(e, "boxSizing", !1, o);
- if (e.getClientRects().length && (r = e.getBoundingClientRect()[t]), r <= 0 || null == r) {
- if (r = D(e, t, o), (r < 0 || null == r) && (r = e.style[t]), at.test(r)) return r;
- i = a && (pe.boxSizingReliable() || r === e.style[t]), r = parseFloat(r) || 0
- }
- return r + O(e, t, n || (a ? "border" : "content"), i, o) + "px"
- }
- function H(e, t, n, r, i) {
- return new H.prototype.init(e, t, n, r, i)
- }
- function I() {
- dt && (e.requestAnimationFrame(I), de.fx.tick())
- }
- function P() {
- return e.setTimeout(function() {
- ht = void 0
- }), ht = de.now()
- }
- function $(e, t) {
- var n, r = 0,
- i = {
- height: e
- };
- for (t = t ? 1 : 0; r < 4; r += 2 - t) n = Me[r], i["margin" + n] = i["padding" + n] = e;
- return t && (i.opacity = i.width = e), i
- }
- function M(e, t, n) {
- for (var r, i = (B.tweeners[t] || []).concat(B.tweeners["*"]), o = 0, a = i.length; o < a; o++)
- if (r = i[o].call(n, t, e)) return r
- }
- function W(e, t, n) {
- var r, i, o, a, s, u, c, l, f = "width" in t || "height" in t,
- p = this,
- h = {},
- d = e.style,
- g = e.nodeType && We(e),
- v = Oe.get(e, "fxshow");
- n.queue || (a = de._queueHooks(e, "fx"), null == a.unqueued && (a.unqueued = 0, s = a.empty.fire, a.empty.fire = function() {
- a.unqueued || s()
- }), a.unqueued++, p.always(function() {
- p.always(function() {
- a.unqueued--, de.queue(e, "fx").length || a.empty.fire()
- })
- }));
- for (r in t)
- if (i = t[r], gt.test(i)) {
- if (delete t[r], o = o || "toggle" === i, i === (g ? "hide" : "show")) {
- if ("show" !== i || !v || void 0 === v[r]) continue;
- g = !0
- }
- h[r] = v && v[r] || de.style(e, r)
- }
- if (u = !de.isEmptyObject(t), u || !de.isEmptyObject(h)) {
- f && 1 === e.nodeType && (n.overflow = [d.overflow, d.overflowX, d.overflowY], c = v && v.display, null == c && (c = Oe.get(e, "display")), l = de.css(e, "display"), "none" === l && (c ? l = c : (m([e], !0), c = e.style.display || c, l = de.css(e, "display"), m([e]))), ("inline" === l || "inline-block" === l && null != c) && "none" === de.css(e, "float") && (u || (p.done(function() {
- d.display = c
- }), null == c && (l = d.display, c = "none" === l ? "" : l)), d.display = "inline-block")), n.overflow && (d.overflow = "hidden", p.always(function() {
- d.overflow = n.overflow[0], d.overflowX = n.overflow[1], d.overflowY = n.overflow[2]
- })), u = !1;
- for (r in h) u || (v ? "hidden" in v && (g = v.hidden) : v = Oe.access(e, "fxshow", {
- display: c
- }), o && (v.hidden = !g), g && m([e], !0), p.done(function() {
- g || m([e]), Oe.remove(e, "fxshow");
- for (r in h) de.style(e, r, h[r])
- })), u = M(g ? v[r] : 0, r, p), r in v || (v[r] = u.start, g && (u.end = u.start, u.start = 0))
- }
- }
- function z(e, t) {
- var n, r, i, o, a;
- for (n in e)
- if (r = de.camelCase(n), i = t[r], o = e[n], de.isArray(o) && (i = o[1], o = e[n] = o[0]), n !== r && (e[r] = o, delete e[n]), a = de.cssHooks[r], a && "expand" in a) {
- o = a.expand(o), delete e[r];
- for (n in o) n in e || (e[n] = o[n], t[n] = i)
- } else t[r] = i
- }
- function B(e, t, n) {
- var r, i, o = 0,
- a = B.prefilters.length,
- s = de.Deferred().always(function() {
- delete u.elem
- }),
- u = function() {
- if (i) return !1;
- for (var t = ht || P(), n = Math.max(0, c.startTime + c.duration - t), r = n / c.duration || 0, o = 1 - r, a = 0, u = c.tweens.length; a < u; a++) c.tweens[a].run(o);
- return s.notifyWith(e, [c, o, n]), o < 1 && u ? n : (s.resolveWith(e, [c]), !1)
- },
- c = s.promise({
- elem: e,
- props: de.extend({}, t),
- opts: de.extend(!0, {
- specialEasing: {},
- easing: de.easing._default
- }, n),
- originalProperties: t,
- originalOptions: n,
- startTime: ht || P(),
- duration: n.duration,
- tweens: [],
- createTween: function(t, n) {
- var r = de.Tween(e, c.opts, t, n, c.opts.specialEasing[t] || c.opts.easing);
- return c.tweens.push(r), r
- },
- stop: function(t) {
- var n = 0,
- r = t ? c.tweens.length : 0;
- if (i) return this;
- for (i = !0; n < r; n++) c.tweens[n].run(1);
- return t ? (s.notifyWith(e, [c, 1, 0]), s.resolveWith(e, [c, t])) : s.rejectWith(e, [c, t]), this
- }
- }),
- l = c.props;
- for (z(l, c.opts.specialEasing); o < a; o++)
- if (r = B.prefilters[o].call(c, e, l, c.opts)) return de.isFunction(r.stop) && (de._queueHooks(c.elem, c.opts.queue).stop = de.proxy(r.stop, r)), r;
- return de.map(l, M, c), de.isFunction(c.opts.start) && c.opts.start.call(e, c), de.fx.timer(de.extend(u, {
- elem: e,
- anim: c,
- queue: c.opts.queue
- })), c.progress(c.opts.progress).done(c.opts.done, c.opts.complete).fail(c.opts.fail).always(c.opts.always)
- }
- function K(e) {
- var t = e.match(Ne) || [];
- return t.join(" ")
- }
- function U(e) {
- return e.getAttribute && e.getAttribute("class") || ""
- }
- function X(e, t, n, r) {
- var i;
- if (de.isArray(t)) de.each(t, function(t, i) {
- n || St.test(e) ? r(e, i) : X(e + "[" + ("object" == typeof i && null != i ? t : "") + "]", i, n, r)
- });
- else if (n || "object" !== de.type(t)) r(e, t);
- else
- for (i in t) X(e + "[" + i + "]", t[i], n, r)
- }
- function Y(e) {
- return function(t, n) {
- "string" != typeof t && (n = t, t = "*");
- var r, i = 0,
- o = t.toLowerCase().match(Ne) || [];
- if (de.isFunction(n))
- for (; r = o[i++];) "+" === r[0] ? (r = r.slice(1) || "*", (e[r] = e[r] || []).unshift(n)) : (e[r] = e[r] || []).push(n)
- }
- }
- function J(e, t, n, r) {
- function i(s) {
- var u;
- return o[s] = !0, de.each(e[s] || [], function(e, s) {
- var c = s(t, n, r);
- return "string" != typeof c || a || o[c] ? a ? !(u = c) : void 0 : (t.dataTypes.unshift(c), i(c), !1)
- }), u
- }
- var o = {},
- a = e === It;
- return i(t.dataTypes[0]) || !o["*"] && i("*")
- }
- function V(e, t) {
- var n, r, i = de.ajaxSettings.flatOptions || {};
- for (n in t) void 0 !== t[n] && ((i[n] ? e : r || (r = {}))[n] = t[n]);
- return r && de.extend(!0, e, r), e
- }
- function G(e, t, n) {
- for (var r, i, o, a, s = e.contents, u = e.dataTypes;
- "*" === u[0];) u.shift(), void 0 === r && (r = e.mimeType || t.getResponseHeader("Content-Type"));
- if (r)
- for (i in s)
- if (s[i] && s[i].test(r)) {
- u.unshift(i);
- break
- }
- if (u[0] in n) o = u[0];
- else {
- for (i in n) {
- if (!u[0] || e.converters[i + " " + u[0]]) {
- o = i;
- break
- }
- a || (a = i)
- }
- o = o || a
- }
- if (o) return o !== u[0] && u.unshift(o), n[o]
- }
- function Q(e, t, n, r) {
- var i, o, a, s, u, c = {},
- l = e.dataTypes.slice();
- if (l[1])
- for (a in e.converters) c[a.toLowerCase()] = e.converters[a];
- for (o = l.shift(); o;)
- if (e.responseFields[o] && (n[e.responseFields[o]] = t), !u && r && e.dataFilter && (t = e.dataFilter(t, e.dataType)), u = o, o = l.shift())
- if ("*" === o) o = u;
- else if ("*" !== u && u !== o) {
- if (a = c[u + " " + o] || c["* " + o], !a)
- for (i in c)
- if (s = i.split(" "), s[1] === o && (a = c[u + " " + s[0]] || c["* " + s[0]])) {
- a === !0 ? a = c[i] : c[i] !== !0 && (o = s[0], l.unshift(s[1]));
- break
- }
- if (a !== !0)
- if (a && e["throws"]) t = a(t);
- else try {
- t = a(t)
- } catch (f) {
- return {
- state: "parsererror",
- error: a ? f : "No conversion from " + u + " to " + o
- }
- }
- }
- return {
- state: "success",
- data: t
- }
- }
- function Z(e) {
- return de.isWindow(e) ? e : 9 === e.nodeType && e.defaultView
- }
- var ee = [],
- te = e.document,
- ne = Object.getPrototypeOf,
- re = ee.slice,
- ie = ee.concat,
- oe = ee.push,
- ae = ee.indexOf,
- se = {},
- ue = se.toString,
- ce = se.hasOwnProperty,
- le = ce.toString,
- fe = le.call(Object),
- pe = {},
- he = "3.1.1",
- de = function(e, t) {
- return new de.fn.init(e, t)
- },
- ge = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,
- me = /^-ms-/,
- ve = /-([a-z])/g,
- ye = function(e, t) {
- return t.toUpperCase()
- };
- de.fn = de.prototype = {
- jquery: he,
- constructor: de,
- length: 0,
- toArray: function() {
- return re.call(this)
- },
- get: function(e) {
- return null == e ? re.call(this) : e < 0 ? this[e + this.length] : this[e]
- },
- pushStack: function(e) {
- var t = de.merge(this.constructor(), e);
- return t.prevObject = this, t
- },
- each: function(e) {
- return de.each(this, e)
- },
- map: function(e) {
- return this.pushStack(de.map(this, function(t, n) {
- return e.call(t, n, t)
- }))
- },
- slice: function() {
- return this.pushStack(re.apply(this, arguments))
- },
- first: function() {
- return this.eq(0)
- },
- last: function() {
- return this.eq(-1)
- },
- eq: function(e) {
- var t = this.length,
- n = +e + (e < 0 ? t : 0);
- return this.pushStack(n >= 0 && n < t ? [this[n]] : [])
- },
- end: function() {
- return this.prevObject || this.constructor()
- },
- push: oe,
- sort: ee.sort,
- splice: ee.splice
- }, de.extend = de.fn.extend = function() {
- var e, t, n, r, i, o, a = arguments[0] || {},
- s = 1,
- u = arguments.length,
- c = !1;
- for ("boolean" == typeof a && (c = a, a = arguments[s] || {}, s++), "object" == typeof a || de.isFunction(a) || (a = {}), s === u && (a = this, s--); s < u; s++)
- if (null != (e = arguments[s]))
- for (t in e) n = a[t], r = e[t], a !== r && (c && r && (de.isPlainObject(r) || (i = de.isArray(r))) ? (i ? (i = !1, o = n && de.isArray(n) ? n : []) : o = n && de.isPlainObject(n) ? n : {}, a[t] = de.extend(c, o, r)) : void 0 !== r && (a[t] = r));
- return a
- }, de.extend({
- expando: "jQuery" + (he + Math.random()).replace(/\D/g, ""),
- isReady: !0,
- error: function(e) {
- throw new Error(e)
- },
- noop: function() {},
- isFunction: function(e) {
- return "function" === de.type(e)
- },
- isArray: Array.isArray,
- isWindow: function(e) {
- return null != e && e === e.window
- },
- isNumeric: function(e) {
- var t = de.type(e);
- return ("number" === t || "string" === t) && !isNaN(e - parseFloat(e))
- },
- isPlainObject: function(e) {
- var t, n;
- return !(!e || "[object Object]" !== ue.call(e)) && (!(t = ne(e)) || (n = ce.call(t, "constructor") && t.constructor, "function" == typeof n && le.call(n) === fe))
- },
- isEmptyObject: function(e) {
- var t;
- for (t in e) return !1;
- return !0
- },
- type: function(e) {
- return null == e ? e + "" : "object" == typeof e || "function" == typeof e ? se[ue.call(e)] || "object" : typeof e
- },
- globalEval: function(e) {
- n(e)
- },
- camelCase: function(e) {
- return e.replace(me, "ms-").replace(ve, ye)
- },
- nodeName: function(e, t) {
- return e.nodeName && e.nodeName.toLowerCase() === t.toLowerCase()
- },
- each: function(e, t) {
- var n, i = 0;
- if (r(e))
- for (n = e.length; i < n && t.call(e[i], i, e[i]) !== !1; i++);
- else
- for (i in e)
- if (t.call(e[i], i, e[i]) === !1) break; return e
- },
- trim: function(e) {
- return null == e ? "" : (e + "").replace(ge, "")
- },
- makeArray: function(e, t) {
- var n = t || [];
- return null != e && (r(Object(e)) ? de.merge(n, "string" == typeof e ? [e] : e) : oe.call(n, e)), n
- },
- inArray: function(e, t, n) {
- return null == t ? -1 : ae.call(t, e, n)
- },
- merge: function(e, t) {
- for (var n = +t.length, r = 0, i = e.length; r < n; r++) e[i++] = t[r];
- return e.length = i, e
- },
- grep: function(e, t, n) {
- for (var r, i = [], o = 0, a = e.length, s = !n; o < a; o++) r = !t(e[o], o), r !== s && i.push(e[o]);
- return i
- },
- map: function(e, t, n) {
- var i, o, a = 0,
- s = [];
- if (r(e))
- for (i = e.length; a < i; a++) o = t(e[a], a, n), null != o && s.push(o);
- else
- for (a in e) o = t(e[a], a, n), null != o && s.push(o);
- return ie.apply([], s)
- },
- guid: 1,
- proxy: function(e, t) {
- var n, r, i;
- if ("string" == typeof t && (n = e[t], t = e, e = n), de.isFunction(e)) return r = re.call(arguments, 2), i = function() {
- return e.apply(t || this, r.concat(re.call(arguments)))
- }, i.guid = e.guid = e.guid || de.guid++, i
- },
- now: Date.now,
- support: pe
- }), "function" == typeof Symbol && (de.fn[Symbol.iterator] = ee[Symbol.iterator]), de.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "), function(e, t) {
- se["[object " + t + "]"] = t.toLowerCase()
- });
- var be = function(e) {
- function t(e, t, n, r) {
- var i, o, a, s, u, c, l, p = t && t.ownerDocument,
- d = t ? t.nodeType : 9;
- if (n = n || [], "string" != typeof e || !e || 1 !== d && 9 !== d && 11 !== d) return n;
- if (!r && ((t ? t.ownerDocument || t : M) !== L && F(t), t = t || L, O)) {
- if (11 !== d && (u = ve.exec(e)))
- if (i = u[1]) {
- if (9 === d) {
- if (!(a = t.getElementById(i))) return n;
- if (a.id === i) return n.push(a), n
- } else if (p && (a = p.getElementById(i)) && P(t, a) && a.id === i) return n.push(a), n
- } else {
- if (u[2]) return Q.apply(n, t.getElementsByTagName(e)), n;
- if ((i = u[3]) && _.getElementsByClassName && t.getElementsByClassName) return Q.apply(n, t.getElementsByClassName(i)), n
- }
- if (_.qsa && !U[e + " "] && (!q || !q.test(e))) {
- if (1 !== d) p = t, l = e;
- else if ("object" !== t.nodeName.toLowerCase()) {
- for ((s = t.getAttribute("id")) ? s = s.replace(xe, _e) : t.setAttribute("id", s = $), c = S(e), o = c.length; o--;) c[o] = "#" + s + " " + h(c[o]);
- l = c.join(","), p = ye.test(e) && f(t.parentNode) || t
- }
- if (l) try {
- return Q.apply(n, p.querySelectorAll(l)), n
- } catch (g) {} finally {
- s === $ && t.removeAttribute("id")
- }
- }
- }
- return j(e.replace(se, "$1"), t, n, r)
- }
- function n() {
- function e(n, r) {
- return t.push(n + " ") > k.cacheLength && delete e[t.shift()], e[n + " "] = r
- }
- var t = [];
- return e
- }
- function r(e) {
- return e[$] = !0, e
- }
- function i(e) {
- var t = L.createElement("fieldset");
- try {
- return !!e(t)
- } catch (n) {
- return !1
- } finally {
- t.parentNode && t.parentNode.removeChild(t), t = null
- }
- }
- function o(e, t) {
- for (var n = e.split("|"), r = n.length; r--;) k.attrHandle[n[r]] = t
- }
- function a(e, t) {
- var n = t && e,
- r = n && 1 === e.nodeType && 1 === t.nodeType && e.sourceIndex - t.sourceIndex;
- if (r) return r;
- if (n)
- for (; n = n.nextSibling;)
- if (n === t) return -1;
- return e ? 1 : -1
- }
- function s(e) {
- return function(t) {
- var n = t.nodeName.toLowerCase();
- return "input" === n && t.type === e
- }
- }
- function u(e) {
- return function(t) {
- var n = t.nodeName.toLowerCase();
- return ("input" === n || "button" === n) && t.type === e
- }
- }
- function c(e) {
- return function(t) {
- return "form" in t ? t.parentNode && t.disabled === !1 ? "label" in t ? "label" in t.parentNode ? t.parentNode.disabled === e : t.disabled === e : t.isDisabled === e || t.isDisabled !== !e && Te(t) === e : t.disabled === e : "label" in t && t.disabled === e
- }
- }
- function l(e) {
- return r(function(t) {
- return t = +t, r(function(n, r) {
- for (var i, o = e([], n.length, t), a = o.length; a--;) n[i = o[a]] && (n[i] = !(r[i] = n[i]))
- })
- })
- }
- function f(e) {
- return e && "undefined" != typeof e.getElementsByTagName && e
- }
- function p() {}
- function h(e) {
- for (var t = 0, n = e.length, r = ""; t < n; t++) r += e[t].value;
- return r
- }
- function d(e, t, n) {
- var r = t.dir,
- i = t.next,
- o = i || r,
- a = n && "parentNode" === o,
- s = z++;
- return t.first ? function(t, n, i) {
- for (; t = t[r];)
- if (1 === t.nodeType || a) return e(t, n, i);
- return !1
- } : function(t, n, u) {
- var c, l, f, p = [W, s];
- if (u) {
- for (; t = t[r];)
- if ((1 === t.nodeType || a) && e(t, n, u)) return !0
- } else
- for (; t = t[r];)
- if (1 === t.nodeType || a)
- if (f = t[$] || (t[$] = {}), l = f[t.uniqueID] || (f[t.uniqueID] = {}), i && i === t.nodeName.toLowerCase()) t = t[r] || t;
- else {
- if ((c = l[o]) && c[0] === W && c[1] === s) return p[2] = c[2];
- if (l[o] = p, p[2] = e(t, n, u)) return !0
- } return !1
- }
- }
- function g(e) {
- return e.length > 1 ? function(t, n, r) {
- for (var i = e.length; i--;)
- if (!e[i](t, n, r)) return !1;
- return !0
- } : e[0]
- }
- function m(e, n, r) {
- for (var i = 0, o = n.length; i < o; i++) t(e, n[i], r);
- return r
- }
- function v(e, t, n, r, i) {
- for (var o, a = [], s = 0, u = e.length, c = null != t; s < u; s++)(o = e[s]) && (n && !n(o, r, i) || (a.push(o), c && t.push(s)));
- return a
- }
- function y(e, t, n, i, o, a) {
- return i && !i[$] && (i = y(i)), o && !o[$] && (o = y(o, a)), r(function(r, a, s, u) {
- var c, l, f, p = [],
- h = [],
- d = a.length,
- g = r || m(t || "*", s.nodeType ? [s] : s, []),
- y = !e || !r && t ? g : v(g, p, e, s, u),
- b = n ? o || (r ? e : d || i) ? [] : a : y;
- if (n && n(y, b, s, u), i)
- for (c = v(b, h), i(c, [], s, u), l = c.length; l--;)(f = c[l]) && (b[h[l]] = !(y[h[l]] = f));
- if (r) {
- if (o || e) {
- if (o) {
- for (c = [], l = b.length; l--;)(f = b[l]) && c.push(y[l] = f);
- o(null, b = [], c, u)
- }
- for (l = b.length; l--;)(f = b[l]) && (c = o ? ee(r, f) : p[l]) > -1 && (r[c] = !(a[c] = f))
- }
- } else b = v(b === a ? b.splice(d, b.length) : b), o ? o(null, a, b, u) : Q.apply(a, b)
- })
- }
- function b(e) {
- for (var t, n, r, i = e.length, o = k.relative[e[0].type], a = o || k.relative[" "], s = o ? 1 : 0, u = d(function(e) {
- return e === t
- }, a, !0), c = d(function(e) {
- return ee(t, e) > -1
- }, a, !0), l = [function(e, n, r) {
- var i = !o && (r || n !== A) || ((t = n).nodeType ? u(e, n, r) : c(e, n, r));
- return t = null, i
- }]; s < i; s++)
- if (n = k.relative[e[s].type]) l = [d(g(l), n)];
- else {
- if (n = k.filter[e[s].type].apply(null, e[s].matches), n[$]) {
- for (r = ++s; r < i && !k.relative[e[r].type]; r++);
- return y(s > 1 && g(l), s > 1 && h(e.slice(0, s - 1).concat({
- value: " " === e[s - 2].type ? "*" : ""
- })).replace(se, "$1"), n, s < r && b(e.slice(s, r)), r < i && b(e = e.slice(r)), r < i && h(e))
- }
- l.push(n)
- }
- return g(l)
- }
- function w(e, n) {
- var i = n.length > 0,
- o = e.length > 0,
- a = function(r, a, s, u, c) {
- var l, f, p, h = 0,
- d = "0",
- g = r && [],
- m = [],
- y = A,
- b = r || o && k.find.TAG("*", c),
- w = W += null == y ? 1 : Math.random() || .1,
- x = b.length;
- for (c && (A = a === L || a || c); d !== x && null != (l = b[d]); d++) {
- if (o && l) {
- for (f = 0, a || l.ownerDocument === L || (F(l), s = !O); p = e[f++];)
- if (p(l, a || L, s)) {
- u.push(l);
- break
- }
- c && (W = w)
- }
- i && ((l = !p && l) && h--, r && g.push(l))
- }
- if (h += d, i && d !== h) {
- for (f = 0; p = n[f++];) p(g, m, a, s);
- if (r) {
- if (h > 0)
- for (; d--;) g[d] || m[d] || (m[d] = V.call(u));
- m = v(m)
- }
- Q.apply(u, m), c && !r && m.length > 0 && h + n.length > 1 && t.uniqueSort(u)
- }
- return c && (W = w, A = y), g
- };
- return i ? r(a) : a
- }
- var x, _, k, T, C, S, E, j, A, N, D, F, L, R, O, q, H, I, P, $ = "sizzle" + 1 * new Date,
- M = e.document,
- W = 0,
- z = 0,
- B = n(),
- K = n(),
- U = n(),
- X = function(e, t) {
- return e === t && (D = !0), 0
- },
- Y = {}.hasOwnProperty,
- J = [],
- V = J.pop,
- G = J.push,
- Q = J.push,
- Z = J.slice,
- ee = function(e, t) {
- for (var n = 0, r = e.length; n < r; n++)
- if (e[n] === t) return n;
- return -1
- },
- te = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",
- ne = "[\\x20\\t\\r\\n\\f]",
- re = "(?:\\\\.|[\\w-]|[^\0-\\xa0])+",
- ie = "\\[" + ne + "*(" + re + ")(?:" + ne + "*([*^$|!~]?=)" + ne + "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + re + "))|)" + ne + "*\\]",
- oe = ":(" + re + ")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|" + ie + ")*)|.*)\\)|)",
- ae = new RegExp(ne + "+", "g"),
- se = new RegExp("^" + ne + "+|((?:^|[^\\\\])(?:\\\\.)*)" + ne + "+$", "g"),
- ue = new RegExp("^" + ne + "*," + ne + "*"),
- ce = new RegExp("^" + ne + "*([>+~]|" + ne + ")" + ne + "*"),
- le = new RegExp("=" + ne + "*([^\\]'\"]*?)" + ne + "*\\]", "g"),
- fe = new RegExp(oe),
- pe = new RegExp("^" + re + "$"),
- he = {
- ID: new RegExp("^#(" + re + ")"),
- CLASS: new RegExp("^\\.(" + re + ")"),
- TAG: new RegExp("^(" + re + "|[*])"),
- ATTR: new RegExp("^" + ie),
- PSEUDO: new RegExp("^" + oe),
- CHILD: new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + ne + "*(even|odd|(([+-]|)(\\d*)n|)" + ne + "*(?:([+-]|)" + ne + "*(\\d+)|))" + ne + "*\\)|)", "i"),
- bool: new RegExp("^(?:" + te + ")$", "i"),
- needsContext: new RegExp("^" + ne + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + ne + "*((?:-\\d)?\\d*)" + ne + "*\\)|)(?=[^-]|$)", "i")
- },
- de = /^(?:input|select|textarea|button)$/i,
- ge = /^h\d$/i,
- me = /^[^{]+\{\s*\[native \w/,
- ve = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,
- ye = /[+~]/,
- be = new RegExp("\\\\([\\da-f]{1,6}" + ne + "?|(" + ne + ")|.)", "ig"),
- we = function(e, t, n) {
- var r = "0x" + t - 65536;
- return r !== r || n ? t : r < 0 ? String.fromCharCode(r + 65536) : String.fromCharCode(r >> 10 | 55296, 1023 & r | 56320)
- },
- xe = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,
- _e = function(e, t) {
- return t ? "\0" === e ? "�" : e.slice(0, -1) + "\\" + e.charCodeAt(e.length - 1).toString(16) + " " : "\\" + e
- },
- ke = function() {
- F()
- },
- Te = d(function(e) {
- return e.disabled === !0 && ("form" in e || "label" in e)
- }, {
- dir: "parentNode",
- next: "legend"
- });
- try {
- Q.apply(J = Z.call(M.childNodes), M.childNodes), J[M.childNodes.length].nodeType
- } catch (Ce) {
- Q = {
- apply: J.length ? function(e, t) {
- G.apply(e, Z.call(t))
- } : function(e, t) {
- for (var n = e.length, r = 0; e[n++] = t[r++];);
- e.length = n - 1
- }
- }
- }
- _ = t.support = {}, C = t.isXML = function(e) {
- var t = e && (e.ownerDocument || e).documentElement;
- return !!t && "HTML" !== t.nodeName
- }, F = t.setDocument = function(e) {
- var t, n, r = e ? e.ownerDocument || e : M;
- return r !== L && 9 === r.nodeType && r.documentElement ? (L = r, R = L.documentElement, O = !C(L), M !== L && (n = L.defaultView) && n.top !== n && (n.addEventListener ? n.addEventListener("unload", ke, !1) : n.attachEvent && n.attachEvent("onunload", ke)), _.attributes = i(function(e) {
- return e.className = "i", !e.getAttribute("className")
- }), _.getElementsByTagName = i(function(e) {
- return e.appendChild(L.createComment("")), !e.getElementsByTagName("*").length
- }), _.getElementsByClassName = me.test(L.getElementsByClassName), _.getById = i(function(e) {
- return R.appendChild(e).id = $, !L.getElementsByName || !L.getElementsByName($).length
- }), _.getById ? (k.filter.ID = function(e) {
- var t = e.replace(be, we);
- return function(e) {
- return e.getAttribute("id") === t
- }
- }, k.find.ID = function(e, t) {
- if ("undefined" != typeof t.getElementById && O) {
- var n = t.getElementById(e);
- return n ? [n] : []
- }
- }) : (k.filter.ID = function(e) {
- var t = e.replace(be, we);
- return function(e) {
- var n = "undefined" != typeof e.getAttributeNode && e.getAttributeNode("id");
- return n && n.value === t
- }
- }, k.find.ID = function(e, t) {
- if ("undefined" != typeof t.getElementById && O) {
- var n, r, i, o = t.getElementById(e);
- if (o) {
- if (n = o.getAttributeNode("id"), n && n.value === e) return [o];
- for (i = t.getElementsByName(e), r = 0; o = i[r++];)
- if (n = o.getAttributeNode("id"), n && n.value === e) return [o]
- }
- return []
- }
- }), k.find.TAG = _.getElementsByTagName ? function(e, t) {
- return "undefined" != typeof t.getElementsByTagName ? t.getElementsByTagName(e) : _.qsa ? t.querySelectorAll(e) : void 0
- } : function(e, t) {
- var n, r = [],
- i = 0,
- o = t.getElementsByTagName(e);
- if ("*" === e) {
- for (; n = o[i++];) 1 === n.nodeType && r.push(n);
- return r
- }
- return o
- }, k.find.CLASS = _.getElementsByClassName && function(e, t) {
- if ("undefined" != typeof t.getElementsByClassName && O) return t.getElementsByClassName(e)
- }, H = [], q = [], (_.qsa = me.test(L.querySelectorAll)) && (i(function(e) {
- R.appendChild(e).innerHTML = "<a id='" + $ + "'></a><select id='" + $ + "-\r\\' msallowcapture=''><option selected=''></option></select>", e.querySelectorAll("[msallowcapture^='']").length && q.push("[*^$]=" + ne + "*(?:''|\"\")"), e.querySelectorAll("[selected]").length || q.push("\\[" + ne + "*(?:value|" + te + ")"), e.querySelectorAll("[id~=" + $ + "-]").length || q.push("~="), e.querySelectorAll(":checked").length || q.push(":checked"), e.querySelectorAll("a#" + $ + "+*").length || q.push(".#.+[+~]")
- }), i(function(e) {
- e.innerHTML = "<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";
- var t = L.createElement("input");
- t.setAttribute("type", "hidden"), e.appendChild(t).setAttribute("name", "D"), e.querySelectorAll("[name=d]").length && q.push("name" + ne + "*[*^$|!~]?="), 2 !== e.querySelectorAll(":enabled").length && q.push(":enabled", ":disabled"), R.appendChild(e).disabled = !0, 2 !== e.querySelectorAll(":disabled").length && q.push(":enabled", ":disabled"), e.querySelectorAll("*,:x"), q.push(",.*:")
- })), (_.matchesSelector = me.test(I = R.matches || R.webkitMatchesSelector || R.mozMatchesSelector || R.oMatchesSelector || R.msMatchesSelector)) && i(function(e) {
- _.disconnectedMatch = I.call(e, "*"), I.call(e, "[s!='']:x"), H.push("!=", oe)
- }), q = q.length && new RegExp(q.join("|")), H = H.length && new RegExp(H.join("|")), t = me.test(R.compareDocumentPosition), P = t || me.test(R.contains) ? function(e, t) {
- var n = 9 === e.nodeType ? e.documentElement : e,
- r = t && t.parentNode;
- return e === r || !(!r || 1 !== r.nodeType || !(n.contains ? n.contains(r) : e.compareDocumentPosition && 16 & e.compareDocumentPosition(r)))
- } : function(e, t) {
- if (t)
- for (; t = t.parentNode;)
- if (t === e) return !0;
- return !1
- }, X = t ? function(e, t) {
- if (e === t) return D = !0, 0;
- var n = !e.compareDocumentPosition - !t.compareDocumentPosition;
- return n ? n : (n = (e.ownerDocument || e) === (t.ownerDocument || t) ? e.compareDocumentPosition(t) : 1, 1 & n || !_.sortDetached && t.compareDocumentPosition(e) === n ? e === L || e.ownerDocument === M && P(M, e) ? -1 : t === L || t.ownerDocument === M && P(M, t) ? 1 : N ? ee(N, e) - ee(N, t) : 0 : 4 & n ? -1 : 1)
- } : function(e, t) {
- if (e === t) return D = !0, 0;
- var n, r = 0,
- i = e.parentNode,
- o = t.parentNode,
- s = [e],
- u = [t];
- if (!i || !o) return e === L ? -1 : t === L ? 1 : i ? -1 : o ? 1 : N ? ee(N, e) - ee(N, t) : 0;
- if (i === o) return a(e, t);
- for (n = e; n = n.parentNode;) s.unshift(n);
- for (n = t; n = n.parentNode;) u.unshift(n);
- for (; s[r] === u[r];) r++;
- return r ? a(s[r], u[r]) : s[r] === M ? -1 : u[r] === M ? 1 : 0
- }, L) : L
- }, t.matches = function(e, n) {
- return t(e, null, null, n)
- }, t.matchesSelector = function(e, n) {
- if ((e.ownerDocument || e) !== L && F(e), n = n.replace(le, "='$1']"), _.matchesSelector && O && !U[n + " "] && (!H || !H.test(n)) && (!q || !q.test(n))) try {
- var r = I.call(e, n);
- if (r || _.disconnectedMatch || e.document && 11 !== e.document.nodeType) return r
- } catch (i) {}
- return t(n, L, null, [e]).length > 0
- }, t.contains = function(e, t) {
- return (e.ownerDocument || e) !== L && F(e), P(e, t)
- }, t.attr = function(e, t) {
- (e.ownerDocument || e) !== L && F(e);
- var n = k.attrHandle[t.toLowerCase()],
- r = n && Y.call(k.attrHandle, t.toLowerCase()) ? n(e, t, !O) : void 0;
- return void 0 !== r ? r : _.attributes || !O ? e.getAttribute(t) : (r = e.getAttributeNode(t)) && r.specified ? r.value : null
- }, t.escape = function(e) {
- return (e + "").replace(xe, _e)
- }, t.error = function(e) {
- throw new Error("Syntax error, unrecognized expression: " + e)
- }, t.uniqueSort = function(e) {
- var t, n = [],
- r = 0,
- i = 0;
- if (D = !_.detectDuplicates, N = !_.sortStable && e.slice(0), e.sort(X), D) {
- for (; t = e[i++];) t === e[i] && (r = n.push(i));
- for (; r--;) e.splice(n[r], 1)
- }
- return N = null, e
- }, T = t.getText = function(e) {
- var t, n = "",
- r = 0,
- i = e.nodeType;
- if (i) {
- if (1 === i || 9 === i || 11 === i) {
- if ("string" == typeof e.textContent) return e.textContent;
- for (e = e.firstChild; e; e = e.nextSibling) n += T(e)
- } else if (3 === i || 4 === i) return e.nodeValue
- } else
- for (; t = e[r++];) n += T(t);
- return n
- }, k = t.selectors = {
- cacheLength: 50,
- createPseudo: r,
- match: he,
- attrHandle: {},
- find: {},
- relative: {
- ">": {
- dir: "parentNode",
- first: !0
- },
- " ": {
- dir: "parentNode"
- },
- "+": {
- dir: "previousSibling",
- first: !0
- },
- "~": {
- dir: "previousSibling"
- }
- },
- preFilter: {
- ATTR: function(e) {
- return e[1] = e[1].replace(be, we), e[3] = (e[3] || e[4] || e[5] || "").replace(be, we), "~=" === e[2] && (e[3] = " " + e[3] + " "), e.slice(0, 4)
- },
- CHILD: function(e) {
- return e[1] = e[1].toLowerCase(), "nth" === e[1].slice(0, 3) ? (e[3] || t.error(e[0]), e[4] = +(e[4] ? e[5] + (e[6] || 1) : 2 * ("even" === e[3] || "odd" === e[3])), e[5] = +(e[7] + e[8] || "odd" === e[3])) : e[3] && t.error(e[0]), e
- },
- PSEUDO: function(e) {
- var t, n = !e[6] && e[2];
- return he.CHILD.test(e[0]) ? null : (e[3] ? e[2] = e[4] || e[5] || "" : n && fe.test(n) && (t = S(n, !0)) && (t = n.indexOf(")", n.length - t) - n.length) && (e[0] = e[0].slice(0, t), e[2] = n.slice(0, t)), e.slice(0, 3))
- }
- },
- filter: {
- TAG: function(e) {
- var t = e.replace(be, we).toLowerCase();
- return "*" === e ? function() {
- return !0
- } : function(e) {
- return e.nodeName && e.nodeName.toLowerCase() === t
- }
- },
- CLASS: function(e) {
- var t = B[e + " "];
- return t || (t = new RegExp("(^|" + ne + ")" + e + "(" + ne + "|$)")) && B(e, function(e) {
- return t.test("string" == typeof e.className && e.className || "undefined" != typeof e.getAttribute && e.getAttribute("class") || "")
- })
- },
- ATTR: function(e, n, r) {
- return function(i) {
- var o = t.attr(i, e);
- return null == o ? "!=" === n : !n || (o += "", "=" === n ? o === r : "!=" === n ? o !== r : "^=" === n ? r && 0 === o.indexOf(r) : "*=" === n ? r && o.indexOf(r) > -1 : "$=" === n ? r && o.slice(-r.length) === r : "~=" === n ? (" " + o.replace(ae, " ") + " ").indexOf(r) > -1 : "|=" === n && (o === r || o.slice(0, r.length + 1) === r + "-"))
- }
- },
- CHILD: function(e, t, n, r, i) {
- var o = "nth" !== e.slice(0, 3),
- a = "last" !== e.slice(-4),
- s = "of-type" === t;
- return 1 === r && 0 === i ? function(e) {
- return !!e.parentNode
- } : function(t, n, u) {
- var c, l, f, p, h, d, g = o !== a ? "nextSibling" : "previousSibling",
- m = t.parentNode,
- v = s && t.nodeName.toLowerCase(),
- y = !u && !s,
- b = !1;
- if (m) {
- if (o) {
- for (; g;) {
- for (p = t; p = p[g];)
- if (s ? p.nodeName.toLowerCase() === v : 1 === p.nodeType) return !1;
- d = g = "only" === e && !d && "nextSibling"
- }
- return !0
- }
- if (d = [a ? m.firstChild : m.lastChild], a && y) {
- for (p = m, f = p[$] || (p[$] = {}), l = f[p.uniqueID] || (f[p.uniqueID] = {}), c = l[e] || [], h = c[0] === W && c[1], b = h && c[2], p = h && m.childNodes[h]; p = ++h && p && p[g] || (b = h = 0) || d.pop();)
- if (1 === p.nodeType && ++b && p === t) {
- l[e] = [W, h, b];
- break
- }
- } else if (y && (p = t, f = p[$] || (p[$] = {}), l = f[p.uniqueID] || (f[p.uniqueID] = {}), c = l[e] || [], h = c[0] === W && c[1], b = h), b === !1)
- for (;
- (p = ++h && p && p[g] || (b = h = 0) || d.pop()) && ((s ? p.nodeName.toLowerCase() !== v : 1 !== p.nodeType) || !++b || (y && (f = p[$] || (p[$] = {}), l = f[p.uniqueID] || (f[p.uniqueID] = {}), l[e] = [W, b]), p !== t)););
- return b -= i, b === r || b % r === 0 && b / r >= 0
- }
- }
- },
- PSEUDO: function(e, n) {
- var i, o = k.pseudos[e] || k.setFilters[e.toLowerCase()] || t.error("unsupported pseudo: " + e);
- return o[$] ? o(n) : o.length > 1 ? (i = [e, e, "", n], k.setFilters.hasOwnProperty(e.toLowerCase()) ? r(function(e, t) {
- for (var r, i = o(e, n), a = i.length; a--;) r = ee(e, i[a]), e[r] = !(t[r] = i[a])
- }) : function(e) {
- return o(e, 0, i)
- }) : o
- }
- },
- pseudos: {
- not: r(function(e) {
- var t = [],
- n = [],
- i = E(e.replace(se, "$1"));
- return i[$] ? r(function(e, t, n, r) {
- for (var o, a = i(e, null, r, []), s = e.length; s--;)(o = a[s]) && (e[s] = !(t[s] = o))
- }) : function(e, r, o) {
- return t[0] = e, i(t, null, o, n), t[0] = null, !n.pop()
- }
- }),
- has: r(function(e) {
- return function(n) {
- return t(e, n).length > 0
- }
- }),
- contains: r(function(e) {
- return e = e.replace(be, we),
- function(t) {
- return (t.textContent || t.innerText || T(t)).indexOf(e) > -1
- }
- }),
- lang: r(function(e) {
- return pe.test(e || "") || t.error("unsupported lang: " + e), e = e.replace(be, we).toLowerCase(),
- function(t) {
- var n;
- do
- if (n = O ? t.lang : t.getAttribute("xml:lang") || t.getAttribute("lang")) return n = n.toLowerCase(), n === e || 0 === n.indexOf(e + "-");
- while ((t = t.parentNode) && 1 === t.nodeType);
- return !1;
- }
- }),
- target: function(t) {
- var n = e.location && e.location.hash;
- return n && n.slice(1) === t.id
- },
- root: function(e) {
- return e === R
- },
- focus: function(e) {
- return e === L.activeElement && (!L.hasFocus || L.hasFocus()) && !!(e.type || e.href || ~e.tabIndex)
- },
- enabled: c(!1),
- disabled: c(!0),
- checked: function(e) {
- var t = e.nodeName.toLowerCase();
- return "input" === t && !!e.checked || "option" === t && !!e.selected
- },
- selected: function(e) {
- return e.parentNode && e.parentNode.selectedIndex, e.selected === !0
- },
- empty: function(e) {
- for (e = e.firstChild; e; e = e.nextSibling)
- if (e.nodeType < 6) return !1;
- return !0
- },
- parent: function(e) {
- return !k.pseudos.empty(e)
- },
- header: function(e) {
- return ge.test(e.nodeName)
- },
- input: function(e) {
- return de.test(e.nodeName)
- },
- button: function(e) {
- var t = e.nodeName.toLowerCase();
- return "input" === t && "button" === e.type || "button" === t
- },
- text: function(e) {
- var t;
- return "input" === e.nodeName.toLowerCase() && "text" === e.type && (null == (t = e.getAttribute("type")) || "text" === t.toLowerCase())
- },
- first: l(function() {
- return [0]
- }),
- last: l(function(e, t) {
- return [t - 1]
- }),
- eq: l(function(e, t, n) {
- return [n < 0 ? n + t : n]
- }),
- even: l(function(e, t) {
- for (var n = 0; n < t; n += 2) e.push(n);
- return e
- }),
- odd: l(function(e, t) {
- for (var n = 1; n < t; n += 2) e.push(n);
- return e
- }),
- lt: l(function(e, t, n) {
- for (var r = n < 0 ? n + t : n; --r >= 0;) e.push(r);
- return e
- }),
- gt: l(function(e, t, n) {
- for (var r = n < 0 ? n + t : n; ++r < t;) e.push(r);
- return e
- })
- }
- }, k.pseudos.nth = k.pseudos.eq;
- for (x in {
- radio: !0,
- checkbox: !0,
- file: !0,
- password: !0,
- image: !0
- }) k.pseudos[x] = s(x);
- for (x in {
- submit: !0,
- reset: !0
- }) k.pseudos[x] = u(x);
- return p.prototype = k.filters = k.pseudos, k.setFilters = new p, S = t.tokenize = function(e, n) {
- var r, i, o, a, s, u, c, l = K[e + " "];
- if (l) return n ? 0 : l.slice(0);
- for (s = e, u = [], c = k.preFilter; s;) {
- r && !(i = ue.exec(s)) || (i && (s = s.slice(i[0].length) || s), u.push(o = [])), r = !1, (i = ce.exec(s)) && (r = i.shift(), o.push({
- value: r,
- type: i[0].replace(se, " ")
- }), s = s.slice(r.length));
- for (a in k.filter) !(i = he[a].exec(s)) || c[a] && !(i = c[a](i)) || (r = i.shift(), o.push({
- value: r,
- type: a,
- matches: i
- }), s = s.slice(r.length));
- if (!r) break
- }
- return n ? s.length : s ? t.error(e) : K(e, u).slice(0)
- }, E = t.compile = function(e, t) {
- var n, r = [],
- i = [],
- o = U[e + " "];
- if (!o) {
- for (t || (t = S(e)), n = t.length; n--;) o = b(t[n]), o[$] ? r.push(o) : i.push(o);
- o = U(e, w(i, r)), o.selector = e
- }
- return o
- }, j = t.select = function(e, t, n, r) {
- var i, o, a, s, u, c = "function" == typeof e && e,
- l = !r && S(e = c.selector || e);
- if (n = n || [], 1 === l.length) {
- if (o = l[0] = l[0].slice(0), o.length > 2 && "ID" === (a = o[0]).type && 9 === t.nodeType && O && k.relative[o[1].type]) {
- if (t = (k.find.ID(a.matches[0].replace(be, we), t) || [])[0], !t) return n;
- c && (t = t.parentNode), e = e.slice(o.shift().value.length)
- }
- for (i = he.needsContext.test(e) ? 0 : o.length; i-- && (a = o[i], !k.relative[s = a.type]);)
- if ((u = k.find[s]) && (r = u(a.matches[0].replace(be, we), ye.test(o[0].type) && f(t.parentNode) || t))) {
- if (o.splice(i, 1), e = r.length && h(o), !e) return Q.apply(n, r), n;
- break
- }
- }
- return (c || E(e, l))(r, t, !O, n, !t || ye.test(e) && f(t.parentNode) || t), n
- }, _.sortStable = $.split("").sort(X).join("") === $, _.detectDuplicates = !!D, F(), _.sortDetached = i(function(e) {
- return 1 & e.compareDocumentPosition(L.createElement("fieldset"))
- }), i(function(e) {
- return e.innerHTML = "<a href='#'></a>", "#" === e.firstChild.getAttribute("href")
- }) || o("type|href|height|width", function(e, t, n) {
- if (!n) return e.getAttribute(t, "type" === t.toLowerCase() ? 1 : 2)
- }), _.attributes && i(function(e) {
- return e.innerHTML = "<input/>", e.firstChild.setAttribute("value", ""), "" === e.firstChild.getAttribute("value")
- }) || o("value", function(e, t, n) {
- if (!n && "input" === e.nodeName.toLowerCase()) return e.defaultValue
- }), i(function(e) {
- return null == e.getAttribute("disabled")
- }) || o(te, function(e, t, n) {
- var r;
- if (!n) return e[t] === !0 ? t.toLowerCase() : (r = e.getAttributeNode(t)) && r.specified ? r.value : null
- }), t
- }(e);
- de.find = be, de.expr = be.selectors, de.expr[":"] = de.expr.pseudos, de.uniqueSort = de.unique = be.uniqueSort, de.text = be.getText, de.isXMLDoc = be.isXML, de.contains = be.contains, de.escapeSelector = be.escape;
- var we = function(e, t, n) {
- for (var r = [], i = void 0 !== n;
- (e = e[t]) && 9 !== e.nodeType;)
- if (1 === e.nodeType) {
- if (i && de(e).is(n)) break;
- r.push(e)
- }
- return r
- },
- xe = function(e, t) {
- for (var n = []; e; e = e.nextSibling) 1 === e.nodeType && e !== t && n.push(e);
- return n
- },
- _e = de.expr.match.needsContext,
- ke = /^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i,
- Te = /^.[^:#\[\.,]*$/;
- de.filter = function(e, t, n) {
- var r = t[0];
- return n && (e = ":not(" + e + ")"), 1 === t.length && 1 === r.nodeType ? de.find.matchesSelector(r, e) ? [r] : [] : de.find.matches(e, de.grep(t, function(e) {
- return 1 === e.nodeType
- }))
- }, de.fn.extend({
- find: function(e) {
- var t, n, r = this.length,
- i = this;
- if ("string" != typeof e) return this.pushStack(de(e).filter(function() {
- for (t = 0; t < r; t++)
- if (de.contains(i[t], this)) return !0
- }));
- for (n = this.pushStack([]), t = 0; t < r; t++) de.find(e, i[t], n);
- return r > 1 ? de.uniqueSort(n) : n
- },
- filter: function(e) {
- return this.pushStack(i(this, e || [], !1))
- },
- not: function(e) {
- return this.pushStack(i(this, e || [], !0))
- },
- is: function(e) {
- return !!i(this, "string" == typeof e && _e.test(e) ? de(e) : e || [], !1).length
- }
- });
- var Ce, Se = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,
- Ee = de.fn.init = function(e, t, n) {
- var r, i;
- if (!e) return this;
- if (n = n || Ce, "string" == typeof e) {
- if (r = "<" === e[0] && ">" === e[e.length - 1] && e.length >= 3 ? [null, e, null] : Se.exec(e), !r || !r[1] && t) return !t || t.jquery ? (t || n).find(e) : this.constructor(t).find(e);
- if (r[1]) {
- if (t = t instanceof de ? t[0] : t, de.merge(this, de.parseHTML(r[1], t && t.nodeType ? t.ownerDocument || t : te, !0)), ke.test(r[1]) && de.isPlainObject(t))
- for (r in t) de.isFunction(this[r]) ? this[r](t[r]) : this.attr(r, t[r]);
- return this
- }
- return i = te.getElementById(r[2]), i && (this[0] = i, this.length = 1), this
- }
- return e.nodeType ? (this[0] = e, this.length = 1, this) : de.isFunction(e) ? void 0 !== n.ready ? n.ready(e) : e(de) : de.makeArray(e, this)
- };
- Ee.prototype = de.fn, Ce = de(te);
- var je = /^(?:parents|prev(?:Until|All))/,
- Ae = {
- children: !0,
- contents: !0,
- next: !0,
- prev: !0
- };
- de.fn.extend({
- has: function(e) {
- var t = de(e, this),
- n = t.length;
- return this.filter(function() {
- for (var e = 0; e < n; e++)
- if (de.contains(this, t[e])) return !0
- })
- },
- closest: function(e, t) {
- var n, r = 0,
- i = this.length,
- o = [],
- a = "string" != typeof e && de(e);
- if (!_e.test(e))
- for (; r < i; r++)
- for (n = this[r]; n && n !== t; n = n.parentNode)
- if (n.nodeType < 11 && (a ? a.index(n) > -1 : 1 === n.nodeType && de.find.matchesSelector(n, e))) {
- o.push(n);
- break
- }
- return this.pushStack(o.length > 1 ? de.uniqueSort(o) : o)
- },
- index: function(e) {
- return e ? "string" == typeof e ? ae.call(de(e), this[0]) : ae.call(this, e.jquery ? e[0] : e) : this[0] && this[0].parentNode ? this.first().prevAll().length : -1
- },
- add: function(e, t) {
- return this.pushStack(de.uniqueSort(de.merge(this.get(), de(e, t))))
- },
- addBack: function(e) {
- return this.add(null == e ? this.prevObject : this.prevObject.filter(e))
- }
- }), de.each({
- parent: function(e) {
- var t = e.parentNode;
- return t && 11 !== t.nodeType ? t : null
- },
- parents: function(e) {
- return we(e, "parentNode")
- },
- parentsUntil: function(e, t, n) {
- return we(e, "parentNode", n)
- },
- next: function(e) {
- return o(e, "nextSibling")
- },
- prev: function(e) {
- return o(e, "previousSibling")
- },
- nextAll: function(e) {
- return we(e, "nextSibling")
- },
- prevAll: function(e) {
- return we(e, "previousSibling")
- },
- nextUntil: function(e, t, n) {
- return we(e, "nextSibling", n)
- },
- prevUntil: function(e, t, n) {
- return we(e, "previousSibling", n)
- },
- siblings: function(e) {
- return xe((e.parentNode || {}).firstChild, e)
- },
- children: function(e) {
- return xe(e.firstChild)
- },
- contents: function(e) {
- return e.contentDocument || de.merge([], e.childNodes)
- }
- }, function(e, t) {
- de.fn[e] = function(n, r) {
- var i = de.map(this, t, n);
- return "Until" !== e.slice(-5) && (r = n), r && "string" == typeof r && (i = de.filter(r, i)), this.length > 1 && (Ae[e] || de.uniqueSort(i), je.test(e) && i.reverse()), this.pushStack(i)
- }
- });
- var Ne = /[^\x20\t\r\n\f]+/g;
- de.Callbacks = function(e) {
- e = "string" == typeof e ? a(e) : de.extend({}, e);
- var t, n, r, i, o = [],
- s = [],
- u = -1,
- c = function() {
- for (i = e.once, r = t = !0; s.length; u = -1)
- for (n = s.shift(); ++u < o.length;) o[u].apply(n[0], n[1]) === !1 && e.stopOnFalse && (u = o.length, n = !1);
- e.memory || (n = !1), t = !1, i && (o = n ? [] : "")
- },
- l = {
- add: function() {
- return o && (n && !t && (u = o.length - 1, s.push(n)), function r(t) {
- de.each(t, function(t, n) {
- de.isFunction(n) ? e.unique && l.has(n) || o.push(n) : n && n.length && "string" !== de.type(n) && r(n)
- })
- }(arguments), n && !t && c()), this
- },
- remove: function() {
- return de.each(arguments, function(e, t) {
- for (var n;
- (n = de.inArray(t, o, n)) > -1;) o.splice(n, 1), n <= u && u--
- }), this
- },
- has: function(e) {
- return e ? de.inArray(e, o) > -1 : o.length > 0
- },
- empty: function() {
- return o && (o = []), this
- },
- disable: function() {
- return i = s = [], o = n = "", this
- },
- disabled: function() {
- return !o
- },
- lock: function() {
- return i = s = [], n || t || (o = n = ""), this
- },
- locked: function() {
- return !!i
- },
- fireWith: function(e, n) {
- return i || (n = n || [], n = [e, n.slice ? n.slice() : n], s.push(n), t || c()), this
- },
- fire: function() {
- return l.fireWith(this, arguments), this
- },
- fired: function() {
- return !!r
- }
- };
- return l
- }, de.extend({
- Deferred: function(t) {
- var n = [
- ["notify", "progress", de.Callbacks("memory"), de.Callbacks("memory"), 2],
- ["resolve", "done", de.Callbacks("once memory"), de.Callbacks("once memory"), 0, "resolved"],
- ["reject", "fail", de.Callbacks("once memory"), de.Callbacks("once memory"), 1, "rejected"]
- ],
- r = "pending",
- i = {
- state: function() {
- return r
- },
- always: function() {
- return o.done(arguments).fail(arguments), this
- },
- "catch": function(e) {
- return i.then(null, e)
- },
- pipe: function() {
- var e = arguments;
- return de.Deferred(function(t) {
- de.each(n, function(n, r) {
- var i = de.isFunction(e[r[4]]) && e[r[4]];
- o[r[1]](function() {
- var e = i && i.apply(this, arguments);
- e && de.isFunction(e.promise) ? e.promise().progress(t.notify).done(t.resolve).fail(t.reject) : t[r[0] + "With"](this, i ? [e] : arguments)
- })
- }), e = null
- }).promise()
- },
- then: function(t, r, i) {
- function o(t, n, r, i) {
- return function() {
- var c = this,
- l = arguments,
- f = function() {
- var e, f;
- if (!(t < a)) {
- if (e = r.apply(c, l), e === n.promise()) throw new TypeError("Thenable self-resolution");
- f = e && ("object" == typeof e || "function" == typeof e) && e.then, de.isFunction(f) ? i ? f.call(e, o(a, n, s, i), o(a, n, u, i)) : (a++, f.call(e, o(a, n, s, i), o(a, n, u, i), o(a, n, s, n.notifyWith))) : (r !== s && (c = void 0, l = [e]), (i || n.resolveWith)(c, l))
- }
- },
- p = i ? f : function() {
- try {
- f()
- } catch (e) {
- de.Deferred.exceptionHook && de.Deferred.exceptionHook(e, p.stackTrace), t + 1 >= a && (r !== u && (c = void 0, l = [e]), n.rejectWith(c, l))
- }
- };
- t ? p() : (de.Deferred.getStackHook && (p.stackTrace = de.Deferred.getStackHook()), e.setTimeout(p))
- }
- }
- var a = 0;
- return de.Deferred(function(e) {
- n[0][3].add(o(0, e, de.isFunction(i) ? i : s, e.notifyWith)), n[1][3].add(o(0, e, de.isFunction(t) ? t : s)), n[2][3].add(o(0, e, de.isFunction(r) ? r : u))
- }).promise()
- },
- promise: function(e) {
- return null != e ? de.extend(e, i) : i
- }
- },
- o = {};
- return de.each(n, function(e, t) {
- var a = t[2],
- s = t[5];
- i[t[1]] = a.add, s && a.add(function() {
- r = s
- }, n[3 - e][2].disable, n[0][2].lock), a.add(t[3].fire), o[t[0]] = function() {
- return o[t[0] + "With"](this === o ? void 0 : this, arguments), this
- }, o[t[0] + "With"] = a.fireWith
- }), i.promise(o), t && t.call(o, o), o
- },
- when: function(e) {
- var t = arguments.length,
- n = t,
- r = Array(n),
- i = re.call(arguments),
- o = de.Deferred(),
- a = function(e) {
- return function(n) {
- r[e] = this, i[e] = arguments.length > 1 ? re.call(arguments) : n, --t || o.resolveWith(r, i)
- }
- };
- if (t <= 1 && (c(e, o.done(a(n)).resolve, o.reject), "pending" === o.state() || de.isFunction(i[n] && i[n].then))) return o.then();
- for (; n--;) c(i[n], a(n), o.reject);
- return o.promise()
- }
- });
- var De = /^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;
- de.Deferred.exceptionHook = function(t, n) {
- e.console && e.console.warn && t && De.test(t.name) && e.console.warn("jQuery.Deferred exception: " + t.message, t.stack, n)
- }, de.readyException = function(t) {
- e.setTimeout(function() {
- throw t
- })
- };
- var Fe = de.Deferred();
- de.fn.ready = function(e) {
- return Fe.then(e)["catch"](function(e) {
- de.readyException(e)
- }), this
- }, de.extend({
- isReady: !1,
- readyWait: 1,
- holdReady: function(e) {
- e ? de.readyWait++ : de.ready(!0)
- },
- ready: function(e) {
- (e === !0 ? --de.readyWait : de.isReady) || (de.isReady = !0, e !== !0 && --de.readyWait > 0 || Fe.resolveWith(te, [de]))
- }
- }), de.ready.then = Fe.then, "complete" === te.readyState || "loading" !== te.readyState && !te.documentElement.doScroll ? e.setTimeout(de.ready) : (te.addEventListener("DOMContentLoaded", l), e.addEventListener("load", l));
- var Le = function(e, t, n, r, i, o, a) {
- var s = 0,
- u = e.length,
- c = null == n;
- if ("object" === de.type(n)) {
- i = !0;
- for (s in n) Le(e, t, s, n[s], !0, o, a)
- } else if (void 0 !== r && (i = !0, de.isFunction(r) || (a = !0), c && (a ? (t.call(e, r), t = null) : (c = t, t = function(e, t, n) {
- return c.call(de(e), n)
- })), t))
- for (; s < u; s++) t(e[s], n, a ? r : r.call(e[s], s, t(e[s], n)));
- return i ? e : c ? t.call(e) : u ? t(e[0], n) : o
- },
- Re = function(e) {
- return 1 === e.nodeType || 9 === e.nodeType || !+e.nodeType
- };
- f.uid = 1, f.prototype = {
- cache: function(e) {
- var t = e[this.expando];
- return t || (t = {}, Re(e) && (e.nodeType ? e[this.expando] = t : Object.defineProperty(e, this.expando, {
- value: t,
- configurable: !0
- }))), t
- },
- set: function(e, t, n) {
- var r, i = this.cache(e);
- if ("string" == typeof t) i[de.camelCase(t)] = n;
- else
- for (r in t) i[de.camelCase(r)] = t[r];
- return i
- },
- get: function(e, t) {
- return void 0 === t ? this.cache(e) : e[this.expando] && e[this.expando][de.camelCase(t)]
- },
- access: function(e, t, n) {
- return void 0 === t || t && "string" == typeof t && void 0 === n ? this.get(e, t) : (this.set(e, t, n), void 0 !== n ? n : t)
- },
- remove: function(e, t) {
- var n, r = e[this.expando];
- if (void 0 !== r) {
- if (void 0 !== t) {
- de.isArray(t) ? t = t.map(de.camelCase) : (t = de.camelCase(t), t = t in r ? [t] : t.match(Ne) || []), n = t.length;
- for (; n--;) delete r[t[n]]
- }(void 0 === t || de.isEmptyObject(r)) && (e.nodeType ? e[this.expando] = void 0 : delete e[this.expando])
- }
- },
- hasData: function(e) {
- var t = e[this.expando];
- return void 0 !== t && !de.isEmptyObject(t)
- }
- };
- var Oe = new f,
- qe = new f,
- He = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,
- Ie = /[A-Z]/g;
- de.extend({
- hasData: function(e) {
- return qe.hasData(e) || Oe.hasData(e)
- },
- data: function(e, t, n) {
- return qe.access(e, t, n)
- },
- removeData: function(e, t) {
- qe.remove(e, t)
- },
- _data: function(e, t, n) {
- return Oe.access(e, t, n)
- },
- _removeData: function(e, t) {
- Oe.remove(e, t)
- }
- }), de.fn.extend({
- data: function(e, t) {
- var n, r, i, o = this[0],
- a = o && o.attributes;
- if (void 0 === e) {
- if (this.length && (i = qe.get(o), 1 === o.nodeType && !Oe.get(o, "hasDataAttrs"))) {
- for (n = a.length; n--;) a[n] && (r = a[n].name, 0 === r.indexOf("data-") && (r = de.camelCase(r.slice(5)), h(o, r, i[r])));
- Oe.set(o, "hasDataAttrs", !0)
- }
- return i
- }
- return "object" == typeof e ? this.each(function() {
- qe.set(this, e)
- }) : Le(this, function(t) {
- var n;
- if (o && void 0 === t) {
- if (n = qe.get(o, e), void 0 !== n) return n;
- if (n = h(o, e), void 0 !== n) return n
- } else this.each(function() {
- qe.set(this, e, t)
- })
- }, null, t, arguments.length > 1, null, !0)
- },
- removeData: function(e) {
- return this.each(function() {
- qe.remove(this, e)
- })
- }
- }), de.extend({
- queue: function(e, t, n) {
- var r;
- if (e) return t = (t || "fx") + "queue", r = Oe.get(e, t), n && (!r || de.isArray(n) ? r = Oe.access(e, t, de.makeArray(n)) : r.push(n)), r || []
- },
- dequeue: function(e, t) {
- t = t || "fx";
- var n = de.queue(e, t),
- r = n.length,
- i = n.shift(),
- o = de._queueHooks(e, t),
- a = function() {
- de.dequeue(e, t)
- };
- "inprogress" === i && (i = n.shift(), r--), i && ("fx" === t && n.unshift("inprogress"), delete o.stop, i.call(e, a, o)), !r && o && o.empty.fire()
- },
- _queueHooks: function(e, t) {
- var n = t + "queueHooks";
- return Oe.get(e, n) || Oe.access(e, n, {
- empty: de.Callbacks("once memory").add(function() {
- Oe.remove(e, [t + "queue", n])
- })
- })
- }
- }), de.fn.extend({
- queue: function(e, t) {
- var n = 2;
- return "string" != typeof e && (t = e, e = "fx", n--), arguments.length < n ? de.queue(this[0], e) : void 0 === t ? this : this.each(function() {
- var n = de.queue(this, e, t);
- de._queueHooks(this, e), "fx" === e && "inprogress" !== n[0] && de.dequeue(this, e)
- })
- },
- dequeue: function(e) {
- return this.each(function() {
- de.dequeue(this, e)
- })
- },
- clearQueue: function(e) {
- return this.queue(e || "fx", [])
- },
- promise: function(e, t) {
- var n, r = 1,
- i = de.Deferred(),
- o = this,
- a = this.length,
- s = function() {
- --r || i.resolveWith(o, [o])
- };
- for ("string" != typeof e && (t = e, e = void 0), e = e || "fx"; a--;) n = Oe.get(o[a], e + "queueHooks"), n && n.empty && (r++, n.empty.add(s));
- return s(), i.promise(t)
- }
- });
- var Pe = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,
- $e = new RegExp("^(?:([+-])=|)(" + Pe + ")([a-z%]*)$", "i"),
- Me = ["Top", "Right", "Bottom", "Left"],
- We = function(e, t) {
- return e = t || e, "none" === e.style.display || "" === e.style.display && de.contains(e.ownerDocument, e) && "none" === de.css(e, "display")
- },
- ze = function(e, t, n, r) {
- var i, o, a = {};
- for (o in t) a[o] = e.style[o], e.style[o] = t[o];
- i = n.apply(e, r || []);
- for (o in t) e.style[o] = a[o];
- return i
- },
- Be = {};
- de.fn.extend({
- show: function() {
- return m(this, !0)
- },
- hide: function() {
- return m(this)
- },
- toggle: function(e) {
- return "boolean" == typeof e ? e ? this.show() : this.hide() : this.each(function() {
- We(this) ? de(this).show() : de(this).hide()
- })
- }
- });
- var Ke = /^(?:checkbox|radio)$/i,
- Ue = /<([a-z][^\/\0>\x20\t\r\n\f]+)/i,
- Xe = /^$|\/(?:java|ecma)script/i,
- Ye = {
- 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, "", ""]
- };
- Ye.optgroup = Ye.option, Ye.tbody = Ye.tfoot = Ye.colgroup = Ye.caption = Ye.thead, Ye.th = Ye.td;
- var Je = /<|&#?\w+;/;
- ! function() {
- var e = te.createDocumentFragment(),
- t = e.appendChild(te.createElement("div")),
- n = te.createElement("input");
- n.setAttribute("type", "radio"), n.setAttribute("checked", "checked"), n.setAttribute("name", "t"), t.appendChild(n), pe.checkClone = t.cloneNode(!0).cloneNode(!0).lastChild.checked, t.innerHTML = "<textarea>x</textarea>", pe.noCloneChecked = !!t.cloneNode(!0).lastChild.defaultValue
- }();
- var Ve = te.documentElement,
- Ge = /^key/,
- Qe = /^(?:mouse|pointer|contextmenu|drag|drop)|click/,
- Ze = /^([^.]*)(?:\.(.+)|)/;
- de.event = {
- global: {},
- add: function(e, t, n, r, i) {
- var o, a, s, u, c, l, f, p, h, d, g, m = Oe.get(e);
- if (m)
- for (n.handler && (o = n, n = o.handler, i = o.selector), i && de.find.matchesSelector(Ve, i), n.guid || (n.guid = de.guid++), (u = m.events) || (u = m.events = {}), (a = m.handle) || (a = m.handle = function(t) {
- return "undefined" != typeof de && de.event.triggered !== t.type ? de.event.dispatch.apply(e, arguments) : void 0
- }), t = (t || "").match(Ne) || [""], c = t.length; c--;) s = Ze.exec(t[c]) || [], h = g = s[1], d = (s[2] || "").split(".").sort(), h && (f = de.event.special[h] || {}, h = (i ? f.delegateType : f.bindType) || h, f = de.event.special[h] || {}, l = de.extend({
- type: h,
- origType: g,
- data: r,
- handler: n,
- guid: n.guid,
- selector: i,
- needsContext: i && de.expr.match.needsContext.test(i),
- namespace: d.join(".")
- }, o), (p = u[h]) || (p = u[h] = [], p.delegateCount = 0, f.setup && f.setup.call(e, r, d, a) !== !1 || e.addEventListener && e.addEventListener(h, a)), f.add && (f.add.call(e, l), l.handler.guid || (l.handler.guid = n.guid)), i ? p.splice(p.delegateCount++, 0, l) : p.push(l), de.event.global[h] = !0)
- },
- remove: function(e, t, n, r, i) {
- var o, a, s, u, c, l, f, p, h, d, g, m = Oe.hasData(e) && Oe.get(e);
- if (m && (u = m.events)) {
- for (t = (t || "").match(Ne) || [""], c = t.length; c--;)
- if (s = Ze.exec(t[c]) || [], h = g = s[1], d = (s[2] || "").split(".").sort(), h) {
- for (f = de.event.special[h] || {}, h = (r ? f.delegateType : f.bindType) || h, p = u[h] || [], s = s[2] && new RegExp("(^|\\.)" + d.join("\\.(?:.*\\.|)") + "(\\.|$)"), a = o = p.length; o--;) l = p[o], !i && g !== l.origType || n && n.guid !== l.guid || s && !s.test(l.namespace) || r && r !== l.selector && ("**" !== r || !l.selector) || (p.splice(o, 1), l.selector && p.delegateCount--, f.remove && f.remove.call(e, l));
- a && !p.length && (f.teardown && f.teardown.call(e, d, m.handle) !== !1 || de.removeEvent(e, h, m.handle), delete u[h])
- } else
- for (h in u) de.event.remove(e, h + t[c], n, r, !0);
- de.isEmptyObject(u) && Oe.remove(e, "handle events")
- }
- },
- dispatch: function(e) {
- var t, n, r, i, o, a, s = de.event.fix(e),
- u = new Array(arguments.length),
- c = (Oe.get(this, "events") || {})[s.type] || [],
- l = de.event.special[s.type] || {};
- for (u[0] = s, t = 1; t < arguments.length; t++) u[t] = arguments[t];
- if (s.delegateTarget = this, !l.preDispatch || l.preDispatch.call(this, s) !== !1) {
- for (a = de.event.handlers.call(this, s, c), t = 0;
- (i = a[t++]) && !s.isPropagationStopped();)
- for (s.currentTarget = i.elem, n = 0;
- (o = i.handlers[n++]) && !s.isImmediatePropagationStopped();) s.rnamespace && !s.rnamespace.test(o.namespace) || (s.handleObj = o, s.data = o.data, r = ((de.event.special[o.origType] || {}).handle || o.handler).apply(i.elem, u), void 0 !== r && (s.result = r) === !1 && (s.preventDefault(), s.stopPropagation()));
- return l.postDispatch && l.postDispatch.call(this, s), s.result
- }
- },
- handlers: function(e, t) {
- var n, r, i, o, a, s = [],
- u = t.delegateCount,
- c = e.target;
- if (u && c.nodeType && !("click" === e.type && e.button >= 1))
- for (; c !== this; c = c.parentNode || this)
- if (1 === c.nodeType && ("click" !== e.type || c.disabled !== !0)) {
- for (o = [], a = {}, n = 0; n < u; n++) r = t[n], i = r.selector + " ", void 0 === a[i] && (a[i] = r.needsContext ? de(i, this).index(c) > -1 : de.find(i, this, null, [c]).length), a[i] && o.push(r);
- o.length && s.push({
- elem: c,
- handlers: o
- })
- }
- return c = this, u < t.length && s.push({
- elem: c,
- handlers: t.slice(u)
- }), s
- },
- addProp: function(e, t) {
- Object.defineProperty(de.Event.prototype, e, {
- enumerable: !0,
- configurable: !0,
- get: de.isFunction(t) ? function() {
- if (this.originalEvent) return t(this.originalEvent)
- } : function() {
- if (this.originalEvent) return this.originalEvent[e]
- },
- set: function(t) {
- Object.defineProperty(this, e, {
- enumerable: !0,
- configurable: !0,
- writable: !0,
- value: t
- })
- }
- })
- },
- fix: function(e) {
- return e[de.expando] ? e : new de.Event(e)
- },
- special: {
- load: {
- noBubble: !0
- },
- focus: {
- trigger: function() {
- if (this !== _() && this.focus) return this.focus(), !1
- },
- delegateType: "focusin"
- },
- blur: {
- trigger: function() {
- if (this === _() && this.blur) return this.blur(), !1
- },
- delegateType: "focusout"
- },
- click: {
- trigger: function() {
- if ("checkbox" === this.type && this.click && de.nodeName(this, "input")) return this.click(), !1
- },
- _default: function(e) {
- return de.nodeName(e.target, "a")
- }
- },
- beforeunload: {
- postDispatch: function(e) {
- void 0 !== e.result && e.originalEvent && (e.originalEvent.returnValue = e.result)
- }
- }
- }
- }, de.removeEvent = function(e, t, n) {
- e.removeEventListener && e.removeEventListener(t, n)
- }, de.Event = function(e, t) {
- return this instanceof de.Event ? (e && e.type ? (this.originalEvent = e, this.type = e.type, this.isDefaultPrevented = e.defaultPrevented || void 0 === e.defaultPrevented && e.returnValue === !1 ? w : x, this.target = e.target && 3 === e.target.nodeType ? e.target.parentNode : e.target, this.currentTarget = e.currentTarget, this.relatedTarget = e.relatedTarget) : this.type = e, t && de.extend(this, t), this.timeStamp = e && e.timeStamp || de.now(), void(this[de.expando] = !0)) : new de.Event(e, t)
- }, de.Event.prototype = {
- constructor: de.Event,
- isDefaultPrevented: x,
- isPropagationStopped: x,
- isImmediatePropagationStopped: x,
- isSimulated: !1,
- preventDefault: function() {
- var e = this.originalEvent;
- this.isDefaultPrevented = w, e && !this.isSimulated && e.preventDefault()
- },
- stopPropagation: function() {
- var e = this.originalEvent;
- this.isPropagationStopped = w, e && !this.isSimulated && e.stopPropagation()
- },
- stopImmediatePropagation: function() {
- var e = this.originalEvent;
- this.isImmediatePropagationStopped = w, e && !this.isSimulated && e.stopImmediatePropagation(), this.stopPropagation()
- }
- }, de.each({
- altKey: !0,
- bubbles: !0,
- cancelable: !0,
- changedTouches: !0,
- ctrlKey: !0,
- detail: !0,
- eventPhase: !0,
- metaKey: !0,
- pageX: !0,
- pageY: !0,
- shiftKey: !0,
- view: !0,
- "char": !0,
- charCode: !0,
- key: !0,
- keyCode: !0,
- button: !0,
- buttons: !0,
- clientX: !0,
- clientY: !0,
- offsetX: !0,
- offsetY: !0,
- pointerId: !0,
- pointerType: !0,
- screenX: !0,
- screenY: !0,
- targetTouches: !0,
- toElement: !0,
- touches: !0,
- which: function(e) {
- var t = e.button;
- return null == e.which && Ge.test(e.type) ? null != e.charCode ? e.charCode : e.keyCode : !e.which && void 0 !== t && Qe.test(e.type) ? 1 & t ? 1 : 2 & t ? 3 : 4 & t ? 2 : 0 : e.which
- }
- }, de.event.addProp), de.each({
- mouseenter: "mouseover",
- mouseleave: "mouseout",
- pointerenter: "pointerover",
- pointerleave: "pointerout"
- }, function(e, t) {
- de.event.special[e] = {
- delegateType: t,
- bindType: t,
- handle: function(e) {
- var n, r = this,
- i = e.relatedTarget,
- o = e.handleObj;
- return i && (i === r || de.contains(r, i)) || (e.type = o.origType, n = o.handler.apply(this, arguments), e.type = t), n
- }
- }
- }), de.fn.extend({
- on: function(e, t, n, r) {
- return k(this, e, t, n, r)
- },
- one: function(e, t, n, r) {
- return k(this, e, t, n, r, 1)
- },
- off: function(e, t, n) {
- var r, i;
- if (e && e.preventDefault && e.handleObj) return r = e.handleObj, de(e.delegateTarget).off(r.namespace ? r.origType + "." + r.namespace : r.origType, r.selector, r.handler), this;
- if ("object" == typeof e) {
- for (i in e) this.off(i, t, e[i]);
- return this
- }
- return t !== !1 && "function" != typeof t || (n = t, t = void 0), n === !1 && (n = x), this.each(function() {
- de.event.remove(this, e, n, t)
- })
- }
- });
- var et = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,
- tt = /<script|<style|<link/i,
- nt = /checked\s*(?:[^=]|=\s*.checked.)/i,
- rt = /^true\/(.*)/,
- it = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;
- de.extend({
- htmlPrefilter: function(e) {
- return e.replace(et, "<$1></$2>")
- },
- clone: function(e, t, n) {
- var r, i, o, a, s = e.cloneNode(!0),
- u = de.contains(e.ownerDocument, e);
- if (!(pe.noCloneChecked || 1 !== e.nodeType && 11 !== e.nodeType || de.isXMLDoc(e)))
- for (a = v(s), o = v(e), r = 0, i = o.length; r < i; r++) j(o[r], a[r]);
- if (t)
- if (n)
- for (o = o || v(e), a = a || v(s), r = 0, i = o.length; r < i; r++) E(o[r], a[r]);
- else E(e, s);
- return a = v(s, "script"), a.length > 0 && y(a, !u && v(e, "script")), s
- },
- cleanData: function(e) {
- for (var t, n, r, i = de.event.special, o = 0; void 0 !== (n = e[o]); o++)
- if (Re(n)) {
- if (t = n[Oe.expando]) {
- if (t.events)
- for (r in t.events) i[r] ? de.event.remove(n, r) : de.removeEvent(n, r, t.handle);
- n[Oe.expando] = void 0
- }
- n[qe.expando] && (n[qe.expando] = void 0)
- }
- }
- }), de.fn.extend({
- detach: function(e) {
- return N(this, e, !0)
- },
- remove: function(e) {
- return N(this, e)
- },
- text: function(e) {
- return Le(this, function(e) {
- return void 0 === e ? de.text(this) : this.empty().each(function() {
- 1 !== this.nodeType && 11 !== this.nodeType && 9 !== this.nodeType || (this.textContent = e)
- })
- }, null, e, arguments.length)
- },
- append: function() {
- return A(this, arguments, function(e) {
- if (1 === this.nodeType || 11 === this.nodeType || 9 === this.nodeType) {
- var t = T(this, e);
- t.appendChild(e)
- }
- })
- },
- prepend: function() {
- return A(this, arguments, function(e) {
- if (1 === this.nodeType || 11 === this.nodeType || 9 === this.nodeType) {
- var t = T(this, e);
- t.insertBefore(e, t.firstChild)
- }
- })
- },
- before: function() {
- return A(this, arguments, function(e) {
- this.parentNode && this.parentNode.insertBefore(e, this)
- })
- },
- after: function() {
- return A(this, arguments, function(e) {
- this.parentNode && this.parentNode.insertBefore(e, this.nextSibling)
- })
- },
- empty: function() {
- for (var e, t = 0; null != (e = this[t]); t++) 1 === e.nodeType && (de.cleanData(v(e, !1)), e.textContent = "");
- return this
- },
- clone: function(e, t) {
- return e = null != e && e, t = null == t ? e : t, this.map(function() {
- return de.clone(this, e, t)
- })
- },
- html: function(e) {
- return Le(this, function(e) {
- var t = this[0] || {},
- n = 0,
- r = this.length;
- if (void 0 === e && 1 === t.nodeType) return t.innerHTML;
- if ("string" == typeof e && !tt.test(e) && !Ye[(Ue.exec(e) || ["", ""])[1].toLowerCase()]) {
- e = de.htmlPrefilter(e);
- try {
- for (; n < r; n++) t = this[n] || {}, 1 === t.nodeType && (de.cleanData(v(t, !1)), t.innerHTML = e);
- t = 0
- } catch (i) {}
- }
- t && this.empty().append(e)
- }, null, e, arguments.length)
- },
- replaceWith: function() {
- var e = [];
- return A(this, arguments, function(t) {
- var n = this.parentNode;
- de.inArray(this, e) < 0 && (de.cleanData(v(this)), n && n.replaceChild(t, this))
- }, e)
- }
- }), de.each({
- appendTo: "append",
- prependTo: "prepend",
- insertBefore: "before",
- insertAfter: "after",
- replaceAll: "replaceWith"
- }, function(e, t) {
- de.fn[e] = function(e) {
- for (var n, r = [], i = de(e), o = i.length - 1, a = 0; a <= o; a++) n = a === o ? this : this.clone(!0), de(i[a])[t](n), oe.apply(r, n.get());
- return this.pushStack(r)
- }
- });
- var ot = /^margin/,
- at = new RegExp("^(" + Pe + ")(?!px)[a-z%]+$", "i"),
- st = function(t) {
- var n = t.ownerDocument.defaultView;
- return n && n.opener || (n = e), n.getComputedStyle(t)
- };
- ! function() {
- function t() {
- if (s) {
- s.style.cssText = "box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%", s.innerHTML = "", Ve.appendChild(a);
- var t = e.getComputedStyle(s);
- n = "1%" !== t.top, o = "2px" === t.marginLeft, r = "4px" === t.width, s.style.marginRight = "50%", i = "4px" === t.marginRight, Ve.removeChild(a), s = null
- }
- }
- var n, r, i, o, a = te.createElement("div"),
- s = te.createElement("div");
- s.style && (s.style.backgroundClip = "content-box", s.cloneNode(!0).style.backgroundClip = "", pe.clearCloneStyle = "content-box" === s.style.backgroundClip, a.style.cssText = "border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute", a.appendChild(s), de.extend(pe, {
- pixelPosition: function() {
- return t(), n
- },
- boxSizingReliable: function() {
- return t(), r
- },
- pixelMarginRight: function() {
- return t(), i
- },
- reliableMarginLeft: function() {
- return t(), o
- }
- }))
- }();
- var ut = /^(none|table(?!-c[ea]).+)/,
- ct = {
- position: "absolute",
- visibility: "hidden",
- display: "block"
- },
- lt = {
- letterSpacing: "0",
- fontWeight: "400"
- },
- ft = ["Webkit", "Moz", "ms"],
- pt = te.createElement("div").style;
- de.extend({
- cssHooks: {
- opacity: {
- get: function(e, t) {
- if (t) {
- var n = D(e, "opacity");
- return "" === n ? "1" : n
- }
- }
- }
- },
- cssNumber: {
- animationIterationCount: !0,
- columnCount: !0,
- fillOpacity: !0,
- flexGrow: !0,
- flexShrink: !0,
- fontWeight: !0,
- lineHeight: !0,
- opacity: !0,
- order: !0,
- orphans: !0,
- widows: !0,
- zIndex: !0,
- zoom: !0
- },
- cssProps: {
- "float": "cssFloat"
- },
- style: function(e, t, n, r) {
- if (e && 3 !== e.nodeType && 8 !== e.nodeType && e.style) {
- var i, o, a, s = de.camelCase(t),
- u = e.style;
- return t = de.cssProps[s] || (de.cssProps[s] = L(s) || s), a = de.cssHooks[t] || de.cssHooks[s], void 0 === n ? a && "get" in a && void 0 !== (i = a.get(e, !1, r)) ? i : u[t] : (o = typeof n, "string" === o && (i = $e.exec(n)) && i[1] && (n = d(e, t, i), o = "number"), null != n && n === n && ("number" === o && (n += i && i[3] || (de.cssNumber[s] ? "" : "px")), pe.clearCloneStyle || "" !== n || 0 !== t.indexOf("background") || (u[t] = "inherit"), a && "set" in a && void 0 === (n = a.set(e, n, r)) || (u[t] = n)), void 0)
- }
- },
- css: function(e, t, n, r) {
- var i, o, a, s = de.camelCase(t);
- return t = de.cssProps[s] || (de.cssProps[s] = L(s) || s), a = de.cssHooks[t] || de.cssHooks[s], a && "get" in a && (i = a.get(e, !0, n)), void 0 === i && (i = D(e, t, r)), "normal" === i && t in lt && (i = lt[t]), "" === n || n ? (o = parseFloat(i), n === !0 || isFinite(o) ? o || 0 : i) : i
- }
- }), de.each(["height", "width"], function(e, t) {
- de.cssHooks[t] = {
- get: function(e, n, r) {
- if (n) return !ut.test(de.css(e, "display")) || e.getClientRects().length && e.getBoundingClientRect().width ? q(e, t, r) : ze(e, ct, function() {
- return q(e, t, r)
- })
- },
- set: function(e, n, r) {
- var i, o = r && st(e),
- a = r && O(e, t, r, "border-box" === de.css(e, "boxSizing", !1, o), o);
- return a && (i = $e.exec(n)) && "px" !== (i[3] || "px") && (e.style[t] = n, n = de.css(e, t)), R(e, n, a)
- }
- }
- }), de.cssHooks.marginLeft = F(pe.reliableMarginLeft, function(e, t) {
- if (t) return (parseFloat(D(e, "marginLeft")) || e.getBoundingClientRect().left - ze(e, {
- marginLeft: 0
- }, function() {
- return e.getBoundingClientRect().left
- })) + "px"
- }), de.each({
- margin: "",
- padding: "",
- border: "Width"
- }, function(e, t) {
- de.cssHooks[e + t] = {
- expand: function(n) {
- for (var r = 0, i = {}, o = "string" == typeof n ? n.split(" ") : [n]; r < 4; r++) i[e + Me[r] + t] = o[r] || o[r - 2] || o[0];
- return i
- }
- }, ot.test(e) || (de.cssHooks[e + t].set = R)
- }), de.fn.extend({
- css: function(e, t) {
- return Le(this, function(e, t, n) {
- var r, i, o = {},
- a = 0;
- if (de.isArray(t)) {
- for (r = st(e), i = t.length; a < i; a++) o[t[a]] = de.css(e, t[a], !1, r);
- return o
- }
- return void 0 !== n ? de.style(e, t, n) : de.css(e, t)
- }, e, t, arguments.length > 1)
- }
- }), de.Tween = H, H.prototype = {
- constructor: H,
- init: function(e, t, n, r, i, o) {
- this.elem = e, this.prop = n, this.easing = i || de.easing._default, this.options = t, this.start = this.now = this.cur(), this.end = r, this.unit = o || (de.cssNumber[n] ? "" : "px")
- },
- cur: function() {
- var e = H.propHooks[this.prop];
- return e && e.get ? e.get(this) : H.propHooks._default.get(this)
- },
- run: function(e) {
- var t, n = H.propHooks[this.prop];
- return this.options.duration ? this.pos = t = de.easing[this.easing](e, this.options.duration * e, 0, 1, this.options.duration) : this.pos = t = e, this.now = (this.end - this.start) * t + this.start, this.options.step && this.options.step.call(this.elem, this.now, this), n && n.set ? n.set(this) : H.propHooks._default.set(this), this
- }
- }, H.prototype.init.prototype = H.prototype, H.propHooks = {
- _default: {
- get: function(e) {
- var t;
- return 1 !== e.elem.nodeType || null != e.elem[e.prop] && null == e.elem.style[e.prop] ? e.elem[e.prop] : (t = de.css(e.elem, e.prop, ""), t && "auto" !== t ? t : 0)
- },
- set: function(e) {
- de.fx.step[e.prop] ? de.fx.step[e.prop](e) : 1 !== e.elem.nodeType || null == e.elem.style[de.cssProps[e.prop]] && !de.cssHooks[e.prop] ? e.elem[e.prop] = e.now : de.style(e.elem, e.prop, e.now + e.unit)
- }
- }
- }, H.propHooks.scrollTop = H.propHooks.scrollLeft = {
- set: function(e) {
- e.elem.nodeType && e.elem.parentNode && (e.elem[e.prop] = e.now)
- }
- }, de.easing = {
- linear: function(e) {
- return e
- },
- swing: function(e) {
- return .5 - Math.cos(e * Math.PI) / 2
- },
- _default: "swing"
- }, de.fx = H.prototype.init, de.fx.step = {};
- var ht, dt, gt = /^(?:toggle|show|hide)$/,
- mt = /queueHooks$/;
- de.Animation = de.extend(B, {
- tweeners: {
- "*": [function(e, t) {
- var n = this.createTween(e, t);
- return d(n.elem, e, $e.exec(t), n), n
- }]
- },
- tweener: function(e, t) {
- de.isFunction(e) ? (t = e, e = ["*"]) : e = e.match(Ne);
- for (var n, r = 0, i = e.length; r < i; r++) n = e[r], B.tweeners[n] = B.tweeners[n] || [], B.tweeners[n].unshift(t)
- },
- prefilters: [W],
- prefilter: function(e, t) {
- t ? B.prefilters.unshift(e) : B.prefilters.push(e)
- }
- }), de.speed = function(e, t, n) {
- var r = e && "object" == typeof e ? de.extend({}, e) : {
- complete: n || !n && t || de.isFunction(e) && e,
- duration: e,
- easing: n && t || t && !de.isFunction(t) && t
- };
- return de.fx.off || te.hidden ? r.duration = 0 : "number" != typeof r.duration && (r.duration in de.fx.speeds ? r.duration = de.fx.speeds[r.duration] : r.duration = de.fx.speeds._default), null != r.queue && r.queue !== !0 || (r.queue = "fx"), r.old = r.complete, r.complete = function() {
- de.isFunction(r.old) && r.old.call(this), r.queue && de.dequeue(this, r.queue)
- }, r
- }, de.fn.extend({
- fadeTo: function(e, t, n, r) {
- return this.filter(We).css("opacity", 0).show().end().animate({
- opacity: t
- }, e, n, r)
- },
- animate: function(e, t, n, r) {
- var i = de.isEmptyObject(e),
- o = de.speed(t, n, r),
- a = function() {
- var t = B(this, de.extend({}, e), o);
- (i || Oe.get(this, "finish")) && t.stop(!0)
- };
- return a.finish = a, i || o.queue === !1 ? this.each(a) : this.queue(o.queue, a)
- },
- stop: function(e, t, n) {
- var r = function(e) {
- var t = e.stop;
- delete e.stop, t(n)
- };
- return "string" != typeof e && (n = t, t = e, e = void 0), t && e !== !1 && this.queue(e || "fx", []), this.each(function() {
- var t = !0,
- i = null != e && e + "queueHooks",
- o = de.timers,
- a = Oe.get(this);
- if (i) a[i] && a[i].stop && r(a[i]);
- else
- for (i in a) a[i] && a[i].stop && mt.test(i) && r(a[i]);
- for (i = o.length; i--;) o[i].elem !== this || null != e && o[i].queue !== e || (o[i].anim.stop(n), t = !1, o.splice(i, 1));
- !t && n || de.dequeue(this, e)
- })
- },
- finish: function(e) {
- return e !== !1 && (e = e || "fx"), this.each(function() {
- var t, n = Oe.get(this),
- r = n[e + "queue"],
- i = n[e + "queueHooks"],
- o = de.timers,
- a = r ? r.length : 0;
- for (n.finish = !0, de.queue(this, e, []), i && i.stop && i.stop.call(this, !0), t = o.length; t--;) o[t].elem === this && o[t].queue === e && (o[t].anim.stop(!0), o.splice(t, 1));
- for (t = 0; t < a; t++) r[t] && r[t].finish && r[t].finish.call(this);
- delete n.finish
- })
- }
- }), de.each(["toggle", "show", "hide"], function(e, t) {
- var n = de.fn[t];
- de.fn[t] = function(e, r, i) {
- return null == e || "boolean" == typeof e ? n.apply(this, arguments) : this.animate($(t, !0), e, r, i)
- }
- }), de.each({
- slideDown: $("show"),
- slideUp: $("hide"),
- slideToggle: $("toggle"),
- fadeIn: {
- opacity: "show"
- },
- fadeOut: {
- opacity: "hide"
- },
- fadeToggle: {
- opacity: "toggle"
- }
- }, function(e, t) {
- de.fn[e] = function(e, n, r) {
- return this.animate(t, e, n, r)
- }
- }), de.timers = [], de.fx.tick = function() {
- var e, t = 0,
- n = de.timers;
- for (ht = de.now(); t < n.length; t++) e = n[t], e() || n[t] !== e || n.splice(t--, 1);
- n.length || de.fx.stop(), ht = void 0
- }, de.fx.timer = function(e) {
- de.timers.push(e), e() ? de.fx.start() : de.timers.pop()
- }, de.fx.interval = 13, de.fx.start = function() {
- dt || (dt = e.requestAnimationFrame ? e.requestAnimationFrame(I) : e.setInterval(de.fx.tick, de.fx.interval))
- }, de.fx.stop = function() {
- e.cancelAnimationFrame ? e.cancelAnimationFrame(dt) : e.clearInterval(dt), dt = null
- }, de.fx.speeds = {
- slow: 600,
- fast: 200,
- _default: 400
- }, de.fn.delay = function(t, n) {
- return t = de.fx ? de.fx.speeds[t] || t : t, n = n || "fx", this.queue(n, function(n, r) {
- var i = e.setTimeout(n, t);
- r.stop = function() {
- e.clearTimeout(i)
- }
- })
- },
- function() {
- var e = te.createElement("input"),
- t = te.createElement("select"),
- n = t.appendChild(te.createElement("option"));
- e.type = "checkbox", pe.checkOn = "" !== e.value, pe.optSelected = n.selected, e = te.createElement("input"), e.value = "t", e.type = "radio", pe.radioValue = "t" === e.value
- }();
- var vt, yt = de.expr.attrHandle;
- de.fn.extend({
- attr: function(e, t) {
- return Le(this, de.attr, e, t, arguments.length > 1)
- },
- removeAttr: function(e) {
- return this.each(function() {
- de.removeAttr(this, e)
- })
- }
- }), de.extend({
- attr: function(e, t, n) {
- var r, i, o = e.nodeType;
- if (3 !== o && 8 !== o && 2 !== o) return "undefined" == typeof e.getAttribute ? de.prop(e, t, n) : (1 === o && de.isXMLDoc(e) || (i = de.attrHooks[t.toLowerCase()] || (de.expr.match.bool.test(t) ? vt : void 0)), void 0 !== n ? null === n ? void de.removeAttr(e, t) : i && "set" in i && void 0 !== (r = i.set(e, n, t)) ? r : (e.setAttribute(t, n + ""), n) : i && "get" in i && null !== (r = i.get(e, t)) ? r : (r = de.find.attr(e, t), null == r ? void 0 : r))
- },
- attrHooks: {
- type: {
- set: function(e, t) {
- if (!pe.radioValue && "radio" === t && de.nodeName(e, "input")) {
- var n = e.value;
- return e.setAttribute("type", t), n && (e.value = n), t
- }
- }
- }
- },
- removeAttr: function(e, t) {
- var n, r = 0,
- i = t && t.match(Ne);
- if (i && 1 === e.nodeType)
- for (; n = i[r++];) e.removeAttribute(n)
- }
- }), vt = {
- set: function(e, t, n) {
- return t === !1 ? de.removeAttr(e, n) : e.setAttribute(n, n), n
- }
- }, de.each(de.expr.match.bool.source.match(/\w+/g), function(e, t) {
- var n = yt[t] || de.find.attr;
- yt[t] = function(e, t, r) {
- var i, o, a = t.toLowerCase();
- return r || (o = yt[a], yt[a] = i, i = null != n(e, t, r) ? a : null, yt[a] = o), i
- }
- });
- var bt = /^(?:input|select|textarea|button)$/i,
- wt = /^(?:a|area)$/i;
- de.fn.extend({
- prop: function(e, t) {
- return Le(this, de.prop, e, t, arguments.length > 1)
- },
- removeProp: function(e) {
- return this.each(function() {
- delete this[de.propFix[e] || e]
- })
- }
- }), de.extend({
- prop: function(e, t, n) {
- var r, i, o = e.nodeType;
- if (3 !== o && 8 !== o && 2 !== o) return 1 === o && de.isXMLDoc(e) || (t = de.propFix[t] || t, i = de.propHooks[t]), void 0 !== n ? i && "set" in i && void 0 !== (r = i.set(e, n, t)) ? r : e[t] = n : i && "get" in i && null !== (r = i.get(e, t)) ? r : e[t]
- },
- propHooks: {
- tabIndex: {
- get: function(e) {
- var t = de.find.attr(e, "tabindex");
- return t ? parseInt(t, 10) : bt.test(e.nodeName) || wt.test(e.nodeName) && e.href ? 0 : -1
- }
- }
- },
- propFix: {
- "for": "htmlFor",
- "class": "className"
- }
- }), pe.optSelected || (de.propHooks.selected = {
- get: function(e) {
- var t = e.parentNode;
- return t && t.parentNode && t.parentNode.selectedIndex, null
- },
- set: function(e) {
- var t = e.parentNode;
- t && (t.selectedIndex, t.parentNode && t.parentNode.selectedIndex)
- }
- }), de.each(["tabIndex", "readOnly", "maxLength", "cellSpacing", "cellPadding", "rowSpan", "colSpan", "useMap", "frameBorder", "contentEditable"], function() {
- de.propFix[this.toLowerCase()] = this
- }), de.fn.extend({
- addClass: function(e) {
- var t, n, r, i, o, a, s, u = 0;
- if (de.isFunction(e)) return this.each(function(t) {
- de(this).addClass(e.call(this, t, U(this)))
- });
- if ("string" == typeof e && e)
- for (t = e.match(Ne) || []; n = this[u++];)
- if (i = U(n), r = 1 === n.nodeType && " " + K(i) + " ") {
- for (a = 0; o = t[a++];) r.indexOf(" " + o + " ") < 0 && (r += o + " ");
- s = K(r), i !== s && n.setAttribute("class", s)
- }
- return this
- },
- removeClass: function(e) {
- var t, n, r, i, o, a, s, u = 0;
- if (de.isFunction(e)) return this.each(function(t) {
- de(this).removeClass(e.call(this, t, U(this)))
- });
- if (!arguments.length) return this.attr("class", "");
- if ("string" == typeof e && e)
- for (t = e.match(Ne) || []; n = this[u++];)
- if (i = U(n), r = 1 === n.nodeType && " " + K(i) + " ") {
- for (a = 0; o = t[a++];)
- for (; r.indexOf(" " + o + " ") > -1;) r = r.replace(" " + o + " ", " ");
- s = K(r), i !== s && n.setAttribute("class", s)
- }
- return this
- },
- toggleClass: function(e, t) {
- var n = typeof e;
- return "boolean" == typeof t && "string" === n ? t ? this.addClass(e) : this.removeClass(e) : de.isFunction(e) ? this.each(function(n) {
- de(this).toggleClass(e.call(this, n, U(this), t), t)
- }) : this.each(function() {
- var t, r, i, o;
- if ("string" === n)
- for (r = 0, i = de(this), o = e.match(Ne) || []; t = o[r++];) i.hasClass(t) ? i.removeClass(t) : i.addClass(t);
- else void 0 !== e && "boolean" !== n || (t = U(this), t && Oe.set(this, "__className__", t), this.setAttribute && this.setAttribute("class", t || e === !1 ? "" : Oe.get(this, "__className__") || ""))
- })
- },
- hasClass: function(e) {
- var t, n, r = 0;
- for (t = " " + e + " "; n = this[r++];)
- if (1 === n.nodeType && (" " + K(U(n)) + " ").indexOf(t) > -1) return !0;
- return !1
- }
- });
- var xt = /\r/g;
- de.fn.extend({
- val: function(e) {
- var t, n, r, i = this[0]; {
- if (arguments.length) return r = de.isFunction(e), this.each(function(n) {
- var i;
- 1 === this.nodeType && (i = r ? e.call(this, n, de(this).val()) : e, null == i ? i = "" : "number" == typeof i ? i += "" : de.isArray(i) && (i = de.map(i, function(e) {
- return null == e ? "" : e + ""
- })), t = de.valHooks[this.type] || de.valHooks[this.nodeName.toLowerCase()], t && "set" in t && void 0 !== t.set(this, i, "value") || (this.value = i))
- });
- if (i) return t = de.valHooks[i.type] || de.valHooks[i.nodeName.toLowerCase()], t && "get" in t && void 0 !== (n = t.get(i, "value")) ? n : (n = i.value, "string" == typeof n ? n.replace(xt, "") : null == n ? "" : n)
- }
- }
- }), de.extend({
- valHooks: {
- option: {
- get: function(e) {
- var t = de.find.attr(e, "value");
- return null != t ? t : K(de.text(e))
- }
- },
- select: {
- get: function(e) {
- var t, n, r, i = e.options,
- o = e.selectedIndex,
- a = "select-one" === e.type,
- s = a ? null : [],
- u = a ? o + 1 : i.length;
- for (r = o < 0 ? u : a ? o : 0; r < u; r++)
- if (n = i[r], (n.selected || r === o) && !n.disabled && (!n.parentNode.disabled || !de.nodeName(n.parentNode, "optgroup"))) {
- if (t = de(n).val(), a) return t;
- s.push(t)
- }
- return s
- },
- set: function(e, t) {
- for (var n, r, i = e.options, o = de.makeArray(t), a = i.length; a--;) r = i[a], (r.selected = de.inArray(de.valHooks.option.get(r), o) > -1) && (n = !0);
- return n || (e.selectedIndex = -1), o
- }
- }
- }
- }), de.each(["radio", "checkbox"], function() {
- de.valHooks[this] = {
- set: function(e, t) {
- if (de.isArray(t)) return e.checked = de.inArray(de(e).val(), t) > -1
- }
- }, pe.checkOn || (de.valHooks[this].get = function(e) {
- return null === e.getAttribute("value") ? "on" : e.value
- })
- });
- var _t = /^(?:focusinfocus|focusoutblur)$/;
- de.extend(de.event, {
- trigger: function(t, n, r, i) {
- var o, a, s, u, c, l, f, p = [r || te],
- h = ce.call(t, "type") ? t.type : t,
- d = ce.call(t, "namespace") ? t.namespace.split(".") : [];
- if (a = s = r = r || te, 3 !== r.nodeType && 8 !== r.nodeType && !_t.test(h + de.event.triggered) && (h.indexOf(".") > -1 && (d = h.split("."), h = d.shift(), d.sort()), c = h.indexOf(":") < 0 && "on" + h, t = t[de.expando] ? t : new de.Event(h, "object" == typeof t && t), t.isTrigger = i ? 2 : 3, t.namespace = d.join("."), t.rnamespace = t.namespace ? new RegExp("(^|\\.)" + d.join("\\.(?:.*\\.|)") + "(\\.|$)") : null, t.result = void 0, t.target || (t.target = r), n = null == n ? [t] : de.makeArray(n, [t]), f = de.event.special[h] || {}, i || !f.trigger || f.trigger.apply(r, n) !== !1)) {
- if (!i && !f.noBubble && !de.isWindow(r)) {
- for (u = f.delegateType || h, _t.test(u + h) || (a = a.parentNode); a; a = a.parentNode) p.push(a), s = a;
- s === (r.ownerDocument || te) && p.push(s.defaultView || s.parentWindow || e)
- }
- for (o = 0;
- (a = p[o++]) && !t.isPropagationStopped();) t.type = o > 1 ? u : f.bindType || h, l = (Oe.get(a, "events") || {})[t.type] && Oe.get(a, "handle"), l && l.apply(a, n), l = c && a[c], l && l.apply && Re(a) && (t.result = l.apply(a, n), t.result === !1 && t.preventDefault());
- return t.type = h, i || t.isDefaultPrevented() || f._default && f._default.apply(p.pop(), n) !== !1 || !Re(r) || c && de.isFunction(r[h]) && !de.isWindow(r) && (s = r[c], s && (r[c] = null), de.event.triggered = h, r[h](), de.event.triggered = void 0, s && (r[c] = s)), t.result
- }
- },
- simulate: function(e, t, n) {
- var r = de.extend(new de.Event, n, {
- type: e,
- isSimulated: !0
- });
- de.event.trigger(r, null, t)
- }
- }), de.fn.extend({
- trigger: function(e, t) {
- return this.each(function() {
- de.event.trigger(e, t, this)
- })
- },
- triggerHandler: function(e, t) {
- var n = this[0];
- if (n) return de.event.trigger(e, t, n, !0)
- }
- }), de.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "), function(e, t) {
- de.fn[t] = function(e, n) {
- return arguments.length > 0 ? this.on(t, null, e, n) : this.trigger(t)
- }
- }), de.fn.extend({
- hover: function(e, t) {
- return this.mouseenter(e).mouseleave(t || e)
- }
- }), pe.focusin = "onfocusin" in e, pe.focusin || de.each({
- focus: "focusin",
- blur: "focusout"
- }, function(e, t) {
- var n = function(e) {
- de.event.simulate(t, e.target, de.event.fix(e))
- };
- de.event.special[t] = {
- setup: function() {
- var r = this.ownerDocument || this,
- i = Oe.access(r, t);
- i || r.addEventListener(e, n, !0), Oe.access(r, t, (i || 0) + 1)
- },
- teardown: function() {
- var r = this.ownerDocument || this,
- i = Oe.access(r, t) - 1;
- i ? Oe.access(r, t, i) : (r.removeEventListener(e, n, !0), Oe.remove(r, t))
- }
- }
- });
- var kt = e.location,
- Tt = de.now(),
- Ct = /\?/;
- de.parseXML = function(t) {
- var n;
- if (!t || "string" != typeof t) return null;
- try {
- n = (new e.DOMParser).parseFromString(t, "text/xml")
- } catch (r) {
- n = void 0
- }
- return n && !n.getElementsByTagName("parsererror").length || de.error("Invalid XML: " + t), n
- };
- var St = /\[\]$/,
- Et = /\r?\n/g,
- jt = /^(?:submit|button|image|reset|file)$/i,
- At = /^(?:input|select|textarea|keygen)/i;
- de.param = function(e, t) {
- var n, r = [],
- i = function(e, t) {
- var n = de.isFunction(t) ? t() : t;
- r[r.length] = encodeURIComponent(e) + "=" + encodeURIComponent(null == n ? "" : n)
- };
- if (de.isArray(e) || e.jquery && !de.isPlainObject(e)) de.each(e, function() {
- i(this.name, this.value)
- });
- else
- for (n in e) X(n, e[n], t, i);
- return r.join("&")
- }, de.fn.extend({
- serialize: function() {
- return de.param(this.serializeArray())
- },
- serializeArray: function() {
- return this.map(function() {
- var e = de.prop(this, "elements");
- return e ? de.makeArray(e) : this
- }).filter(function() {
- var e = this.type;
- return this.name && !de(this).is(":disabled") && At.test(this.nodeName) && !jt.test(e) && (this.checked || !Ke.test(e))
- }).map(function(e, t) {
- var n = de(this).val();
- return null == n ? null : de.isArray(n) ? de.map(n, function(e) {
- return {
- name: t.name,
- value: e.replace(Et, "\r\n")
- }
- }) : {
- name: t.name,
- value: n.replace(Et, "\r\n")
- }
- }).get()
- }
- });
- var Nt = /%20/g,
- Dt = /#.*$/,
- Ft = /([?&])_=[^&]*/,
- Lt = /^(.*?):[ \t]*([^\r\n]*)$/gm,
- Rt = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/,
- Ot = /^(?:GET|HEAD)$/,
- qt = /^\/\//,
- Ht = {},
- It = {},
- Pt = "*/".concat("*"),
- $t = te.createElement("a");
- $t.href = kt.href, de.extend({
- active: 0,
- lastModified: {},
- etag: {},
- ajaxSettings: {
- url: kt.href,
- type: "GET",
- isLocal: Rt.test(kt.protocol),
- global: !0,
- processData: !0,
- async: !0,
- contentType: "application/x-www-form-urlencoded; charset=UTF-8",
- accepts: {
- "*": Pt,
- text: "text/plain",
- html: "text/html",
- xml: "application/xml, text/xml",
- json: "application/json, text/javascript"
- },
- contents: {
- xml: /\bxml\b/,
- html: /\bhtml/,
- json: /\bjson\b/
- },
- responseFields: {
- xml: "responseXML",
- text: "responseText",
- json: "responseJSON"
- },
- converters: {
- "* text": String,
- "text html": !0,
- "text json": JSON.parse,
- "text xml": de.parseXML
- },
- flatOptions: {
- url: !0,
- context: !0
- }
- },
- ajaxSetup: function(e, t) {
- return t ? V(V(e, de.ajaxSettings), t) : V(de.ajaxSettings, e)
- },
- ajaxPrefilter: Y(Ht),
- ajaxTransport: Y(It),
- ajax: function(t, n) {
- function r(t, n, r, s) {
- var c, p, h, w, x, _ = n;
- l || (l = !0, u && e.clearTimeout(u), i = void 0, a = s || "", k.readyState = t > 0 ? 4 : 0, c = t >= 200 && t < 300 || 304 === t, r && (w = G(d, k, r)), w = Q(d, w, k, c), c ? (d.ifModified && (x = k.getResponseHeader("Last-Modified"), x && (de.lastModified[o] = x), x = k.getResponseHeader("etag"), x && (de.etag[o] = x)), 204 === t || "HEAD" === d.type ? _ = "nocontent" : 304 === t ? _ = "notmodified" : (_ = w.state, p = w.data, h = w.error, c = !h)) : (h = _, !t && _ || (_ = "error", t < 0 && (t = 0))), k.status = t, k.statusText = (n || _) + "", c ? v.resolveWith(g, [p, _, k]) : v.rejectWith(g, [k, _, h]), k.statusCode(b), b = void 0, f && m.trigger(c ? "ajaxSuccess" : "ajaxError", [k, d, c ? p : h]), y.fireWith(g, [k, _]), f && (m.trigger("ajaxComplete", [k, d]), --de.active || de.event.trigger("ajaxStop")))
- }
- "object" == typeof t && (n = t, t = void 0), n = n || {};
- var i, o, a, s, u, c, l, f, p, h, d = de.ajaxSetup({}, n),
- g = d.context || d,
- m = d.context && (g.nodeType || g.jquery) ? de(g) : de.event,
- v = de.Deferred(),
- y = de.Callbacks("once memory"),
- b = d.statusCode || {},
- w = {},
- x = {},
- _ = "canceled",
- k = {
- readyState: 0,
- getResponseHeader: function(e) {
- var t;
- if (l) {
- if (!s)
- for (s = {}; t = Lt.exec(a);) s[t[1].toLowerCase()] = t[2];
- t = s[e.toLowerCase()]
- }
- return null == t ? null : t
- },
- getAllResponseHeaders: function() {
- return l ? a : null
- },
- setRequestHeader: function(e, t) {
- return null == l && (e = x[e.toLowerCase()] = x[e.toLowerCase()] || e, w[e] = t), this
- },
- overrideMimeType: function(e) {
- return null == l && (d.mimeType = e), this
- },
- statusCode: function(e) {
- var t;
- if (e)
- if (l) k.always(e[k.status]);
- else
- for (t in e) b[t] = [b[t], e[t]];
- return this
- },
- abort: function(e) {
- var t = e || _;
- return i && i.abort(t), r(0, t), this
- }
- };
- if (v.promise(k), d.url = ((t || d.url || kt.href) + "").replace(qt, kt.protocol + "//"), d.type = n.method || n.type || d.method || d.type, d.dataTypes = (d.dataType || "*").toLowerCase().match(Ne) || [""], null == d.crossDomain) {
- c = te.createElement("a");
- try {
- c.href = d.url, c.href = c.href, d.crossDomain = $t.protocol + "//" + $t.host != c.protocol + "//" + c.host
- } catch (T) {
- d.crossDomain = !0
- }
- }
- if (d.data && d.processData && "string" != typeof d.data && (d.data = de.param(d.data, d.traditional)), J(Ht, d, n, k), l) return k;
- f = de.event && d.global, f && 0 === de.active++ && de.event.trigger("ajaxStart"), d.type = d.type.toUpperCase(), d.hasContent = !Ot.test(d.type), o = d.url.replace(Dt, ""), d.hasContent ? d.data && d.processData && 0 === (d.contentType || "").indexOf("application/x-www-form-urlencoded") && (d.data = d.data.replace(Nt, "+")) : (h = d.url.slice(o.length), d.data && (o += (Ct.test(o) ? "&" : "?") + d.data, delete d.data), d.cache === !1 && (o = o.replace(Ft, "$1"), h = (Ct.test(o) ? "&" : "?") + "_=" + Tt++ + h), d.url = o + h), d.ifModified && (de.lastModified[o] && k.setRequestHeader("If-Modified-Since", de.lastModified[o]), de.etag[o] && k.setRequestHeader("If-None-Match", de.etag[o])), (d.data && d.hasContent && d.contentType !== !1 || n.contentType) && k.setRequestHeader("Content-Type", d.contentType), k.setRequestHeader("Accept", d.dataTypes[0] && d.accepts[d.dataTypes[0]] ? d.accepts[d.dataTypes[0]] + ("*" !== d.dataTypes[0] ? ", " + Pt + "; q=0.01" : "") : d.accepts["*"]);
- for (p in d.headers) k.setRequestHeader(p, d.headers[p]);
- if (d.beforeSend && (d.beforeSend.call(g, k, d) === !1 || l)) return k.abort();
- if (_ = "abort", y.add(d.complete), k.done(d.success), k.fail(d.error), i = J(It, d, n, k)) {
- if (k.readyState = 1, f && m.trigger("ajaxSend", [k, d]), l) return k;
- d.async && d.timeout > 0 && (u = e.setTimeout(function() {
- k.abort("timeout")
- }, d.timeout));
- try {
- l = !1, i.send(w, r)
- } catch (T) {
- if (l) throw T;
- r(-1, T)
- }
- } else r(-1, "No Transport");
- return k
- },
- getJSON: function(e, t, n) {
- return de.get(e, t, n, "json")
- },
- getScript: function(e, t) {
- return de.get(e, void 0, t, "script")
- }
- }), de.each(["get", "post"], function(e, t) {
- de[t] = function(e, n, r, i) {
- return de.isFunction(n) && (i = i || r, r = n, n = void 0), de.ajax(de.extend({
- url: e,
- type: t,
- dataType: i,
- data: n,
- success: r
- }, de.isPlainObject(e) && e))
- }
- }), de._evalUrl = function(e) {
- return de.ajax({
- url: e,
- type: "GET",
- dataType: "script",
- cache: !0,
- async: !1,
- global: !1,
- "throws": !0
- })
- }, de.fn.extend({
- wrapAll: function(e) {
- var t;
- return this[0] && (de.isFunction(e) && (e = e.call(this[0])), t = de(e, this[0].ownerDocument).eq(0).clone(!0), this[0].parentNode && t.insertBefore(this[0]), t.map(function() {
- for (var e = this; e.firstElementChild;) e = e.firstElementChild;
- return e
- }).append(this)), this
- },
- wrapInner: function(e) {
- return de.isFunction(e) ? this.each(function(t) {
- de(this).wrapInner(e.call(this, t))
- }) : this.each(function() {
- var t = de(this),
- n = t.contents();
- n.length ? n.wrapAll(e) : t.append(e)
- })
- },
- wrap: function(e) {
- var t = de.isFunction(e);
- return this.each(function(n) {
- de(this).wrapAll(t ? e.call(this, n) : e)
- })
- },
- unwrap: function(e) {
- return this.parent(e).not("body").each(function() {
- de(this).replaceWith(this.childNodes)
- }), this
- }
- }), de.expr.pseudos.hidden = function(e) {
- return !de.expr.pseudos.visible(e)
- }, de.expr.pseudos.visible = function(e) {
- return !!(e.offsetWidth || e.offsetHeight || e.getClientRects().length)
- }, de.ajaxSettings.xhr = function() {
- try {
- return new e.XMLHttpRequest
- } catch (t) {}
- };
- var Mt = {
- 0: 200,
- 1223: 204
- },
- Wt = de.ajaxSettings.xhr();
- pe.cors = !!Wt && "withCredentials" in Wt, pe.ajax = Wt = !!Wt, de.ajaxTransport(function(t) {
- var n, r;
- if (pe.cors || Wt && !t.crossDomain) return {
- send: function(i, o) {
- var a, s = t.xhr();
- if (s.open(t.type, t.url, t.async, t.username, t.password), t.xhrFields)
- for (a in t.xhrFields) s[a] = t.xhrFields[a];
- t.mimeType && s.overrideMimeType && s.overrideMimeType(t.mimeType), t.crossDomain || i["X-Requested-With"] || (i["X-Requested-With"] = "XMLHttpRequest");
- for (a in i) s.setRequestHeader(a, i[a]);
- n = function(e) {
- return function() {
- n && (n = r = s.onload = s.onerror = s.onabort = s.onreadystatechange = null, "abort" === e ? s.abort() : "error" === e ? "number" != typeof s.status ? o(0, "error") : o(s.status, s.statusText) : o(Mt[s.status] || s.status, s.statusText, "text" !== (s.responseType || "text") || "string" != typeof s.responseText ? {
- binary: s.response
- } : {
- text: s.responseText
- }, s.getAllResponseHeaders()))
- }
- }, s.onload = n(), r = s.onerror = n("error"), void 0 !== s.onabort ? s.onabort = r : s.onreadystatechange = function() {
- 4 === s.readyState && e.setTimeout(function() {
- n && r()
- })
- }, n = n("abort");
- try {
- s.send(t.hasContent && t.data || null)
- } catch (u) {
- if (n) throw u
- }
- },
- abort: function() {
- n && n()
- }
- }
- }), de.ajaxPrefilter(function(e) {
- e.crossDomain && (e.contents.script = !1)
- }), de.ajaxSetup({
- accepts: {
- script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"
- },
- contents: {
- script: /\b(?:java|ecma)script\b/
- },
- converters: {
- "text script": function(e) {
- return de.globalEval(e), e
- }
- }
- }), de.ajaxPrefilter("script", function(e) {
- void 0 === e.cache && (e.cache = !1), e.crossDomain && (e.type = "GET")
- }), de.ajaxTransport("script", function(e) {
- if (e.crossDomain) {
- var t, n;
- return {
- send: function(r, i) {
- t = de("<script>").prop({
- charset: e.scriptCharset,
- src: e.url
- }).on("load error", n = function(e) {
- t.remove(), n = null, e && i("error" === e.type ? 404 : 200, e.type)
- }), te.head.appendChild(t[0])
- },
- abort: function() {
- n && n()
- }
- }
- }
- });
- var zt = [],
- Bt = /(=)\?(?=&|$)|\?\?/;
- de.ajaxSetup({
- jsonp: "callback",
- jsonpCallback: function() {
- var e = zt.pop() || de.expando + "_" + Tt++;
- return this[e] = !0, e
- }
- }), de.ajaxPrefilter("json jsonp", function(t, n, r) {
- var i, o, a, s = t.jsonp !== !1 && (Bt.test(t.url) ? "url" : "string" == typeof t.data && 0 === (t.contentType || "").indexOf("application/x-www-form-urlencoded") && Bt.test(t.data) && "data");
- if (s || "jsonp" === t.dataTypes[0]) return i = t.jsonpCallback = de.isFunction(t.jsonpCallback) ? t.jsonpCallback() : t.jsonpCallback, s ? t[s] = t[s].replace(Bt, "$1" + i) : t.jsonp !== !1 && (t.url += (Ct.test(t.url) ? "&" : "?") + t.jsonp + "=" + i), t.converters["script json"] = function() {
- return a || de.error(i + " was not called"), a[0]
- }, t.dataTypes[0] = "json", o = e[i], e[i] = function() {
- a = arguments
- }, r.always(function() {
- void 0 === o ? de(e).removeProp(i) : e[i] = o, t[i] && (t.jsonpCallback = n.jsonpCallback, zt.push(i)), a && de.isFunction(o) && o(a[0]), a = o = void 0
- }), "script"
- }), pe.createHTMLDocument = function() {
- var e = te.implementation.createHTMLDocument("").body;
- return e.innerHTML = "<form></form><form></form>", 2 === e.childNodes.length
- }(), de.parseHTML = function(e, t, n) {
- if ("string" != typeof e) return [];
- "boolean" == typeof t && (n = t, t = !1);
- var r, i, o;
- return t || (pe.createHTMLDocument ? (t = te.implementation.createHTMLDocument(""), r = t.createElement("base"), r.href = te.location.href, t.head.appendChild(r)) : t = te), i = ke.exec(e), o = !n && [], i ? [t.createElement(i[1])] : (i = b([e], t, o), o && o.length && de(o).remove(), de.merge([], i.childNodes))
- }, de.fn.load = function(e, t, n) {
- var r, i, o, a = this,
- s = e.indexOf(" ");
- return s > -1 && (r = K(e.slice(s)), e = e.slice(0, s)), de.isFunction(t) ? (n = t, t = void 0) : t && "object" == typeof t && (i = "POST"), a.length > 0 && de.ajax({
- url: e,
- type: i || "GET",
- dataType: "html",
- data: t
- }).done(function(e) {
- o = arguments, a.html(r ? de("<div>").append(de.parseHTML(e)).find(r) : e)
- }).always(n && function(e, t) {
- a.each(function() {
- n.apply(this, o || [e.responseText, t, e])
- })
- }), this
- }, de.each(["ajaxStart", "ajaxStop", "ajaxComplete", "ajaxError", "ajaxSuccess", "ajaxSend"], function(e, t) {
- de.fn[t] = function(e) {
- return this.on(t, e)
- }
- }), de.expr.pseudos.animated = function(e) {
- return de.grep(de.timers, function(t) {
- return e === t.elem
- }).length
- }, de.offset = {
- setOffset: function(e, t, n) {
- var r, i, o, a, s, u, c, l = de.css(e, "position"),
- f = de(e),
- p = {};
- "static" === l && (e.style.position = "relative"), s = f.offset(), o = de.css(e, "top"), u = de.css(e, "left"), c = ("absolute" === l || "fixed" === l) && (o + u).indexOf("auto") > -1, c ? (r = f.position(), a = r.top, i = r.left) : (a = parseFloat(o) || 0, i = parseFloat(u) || 0), de.isFunction(t) && (t = t.call(e, n, de.extend({}, s))), null != t.top && (p.top = t.top - s.top + a), null != t.left && (p.left = t.left - s.left + i), "using" in t ? t.using.call(e, p) : f.css(p)
- }
- }, de.fn.extend({
- offset: function(e) {
- if (arguments.length) return void 0 === e ? this : this.each(function(t) {
- de.offset.setOffset(this, e, t)
- });
- var t, n, r, i, o = this[0];
- if (o) return o.getClientRects().length ? (r = o.getBoundingClientRect(), r.width || r.height ? (i = o.ownerDocument, n = Z(i), t = i.documentElement, {
- top: r.top + n.pageYOffset - t.clientTop,
- left: r.left + n.pageXOffset - t.clientLeft
- }) : r) : {
- top: 0,
- left: 0
- }
- },
- position: function() {
- if (this[0]) {
- var e, t, n = this[0],
- r = {
- top: 0,
- left: 0
- };
- return "fixed" === de.css(n, "position") ? t = n.getBoundingClientRect() : (e = this.offsetParent(), t = this.offset(), de.nodeName(e[0], "html") || (r = e.offset()), r = {
- top: r.top + de.css(e[0], "borderTopWidth", !0),
- left: r.left + de.css(e[0], "borderLeftWidth", !0)
- }), {
- top: t.top - r.top - de.css(n, "marginTop", !0),
- left: t.left - r.left - de.css(n, "marginLeft", !0)
- }
- }
- },
- offsetParent: function() {
- return this.map(function() {
- for (var e = this.offsetParent; e && "static" === de.css(e, "position");) e = e.offsetParent;
- return e || Ve
- })
- }
- }), de.each({
- scrollLeft: "pageXOffset",
- scrollTop: "pageYOffset"
- }, function(e, t) {
- var n = "pageYOffset" === t;
- de.fn[e] = function(r) {
- return Le(this, function(e, r, i) {
- var o = Z(e);
- return void 0 === i ? o ? o[t] : e[r] : void(o ? o.scrollTo(n ? o.pageXOffset : i, n ? i : o.pageYOffset) : e[r] = i)
- }, e, r, arguments.length)
- }
- }), de.each(["top", "left"], function(e, t) {
- de.cssHooks[t] = F(pe.pixelPosition, function(e, n) {
- if (n) return n = D(e, t), at.test(n) ? de(e).position()[t] + "px" : n
- })
- }), de.each({
- Height: "height",
- Width: "width"
- }, function(e, t) {
- de.each({
- padding: "inner" + e,
- content: t,
- "": "outer" + e
- }, function(n, r) {
- de.fn[r] = function(i, o) {
- var a = arguments.length && (n || "boolean" != typeof i),
- s = n || (i === !0 || o === !0 ? "margin" : "border");
- return Le(this, function(t, n, i) {
- var o;
- return de.isWindow(t) ? 0 === r.indexOf("outer") ? t["inner" + e] : t.document.documentElement["client" + e] : 9 === t.nodeType ? (o = t.documentElement, Math.max(t.body["scroll" + e], o["scroll" + e], t.body["offset" + e], o["offset" + e], o["client" + e])) : void 0 === i ? de.css(t, n, s) : de.style(t, n, i, s)
- }, t, a ? i : void 0, a)
- }
- })
- }), de.fn.extend({
- bind: function(e, t, n) {
- return this.on(e, null, t, n)
- },
- unbind: function(e, t) {
- return this.off(e, null, t)
- },
- delegate: function(e, t, n, r) {
- return this.on(t, e, n, r)
- },
- undelegate: function(e, t, n) {
- return 1 === arguments.length ? this.off(e, "**") : this.off(t, e || "**", n)
- }
- }), de.parseJSON = JSON.parse, "function" == typeof define && define.amd && define("jquery", [], function() {
- return de
- });
- var Kt = e.jQuery,
- Ut = e.$;
- return de.noConflict = function(t) {
- return e.$ === de && (e.$ = Ut), t && e.jQuery === de && (e.jQuery = Kt), de
- }, t || (e.jQuery = e.$ = de), de
- }),
- function(e) {
- function t(e) {
- return Object.prototype.toString.call(e).slice(8, -1).toLowerCase()
- }
- function n(e, t) {
- for (var n = []; t > 0; n[--t] = e);
- return n.join("")
- }
- var r = function() {
- return r.cache.hasOwnProperty(arguments[0]) || (r.cache[arguments[0]] = r.parse(arguments[0])), r.format.call(null, r.cache[arguments[0]], arguments)
- };
- r.format = function(e, i) {
- var o, a, s, u, c, l, f, p = 1,
- h = e.length,
- d = "",
- g = [];
- for (a = 0; a < h; a++)
- if (d = t(e[a]), "string" === d) g.push(e[a]);
- else if ("array" === d) {
- if (u = e[a], u[2])
- for (o = i[p], s = 0; s < u[2].length; s++) {
- if (!o.hasOwnProperty(u[2][s])) throw r('[sprintf] property "%s" does not exist', u[2][s]);
- o = o[u[2][s]]
- } else o = u[1] ? i[u[1]] : i[p++];
- if (/[^s]/.test(u[8]) && "number" != t(o)) throw r("[sprintf] expecting number but found %s", t(o));
- switch (u[8]) {
- case "b":
- o = o.toString(2);
- break;
- case "c":
- o = String.fromCharCode(o);
- break;
- case "d":
- o = parseInt(o, 10);
- break;
- case "e":
- o = u[7] ? o.toExponential(u[7]) : o.toExponential();
- break;
- case "f":
- o = u[7] ? parseFloat(o).toFixed(u[7]) : parseFloat(o);
- break;
- case "o":
- o = o.toString(8);
- break;
- case "s":
- o = (o = String(o)) && u[7] ? o.substring(0, u[7]) : o;
- break;
- case "u":
- o >>>= 0;
- break;
- case "x":
- o = o.toString(16);
- break;
- case "X":
- o = o.toString(16).toUpperCase()
- }
- o = /[def]/.test(u[8]) && u[3] && o >= 0 ? "+" + o : o, l = u[4] ? "0" == u[4] ? "0" : u[4].charAt(1) : " ", f = u[6] - String(o).length, c = u[6] ? n(l, f) : "", g.push(u[5] ? o + c : c + o)
- }
- return g.join("")
- }, r.cache = {}, r.parse = function(e) {
- for (var t = e, n = [], r = [], i = 0; t;) {
- if (null !== (n = /^[^\x25]+/.exec(t))) r.push(n[0]);
- else if (null !== (n = /^\x25{2}/.exec(t))) r.push("%");
- else {
- if (null === (n = /^\x25(?:([1-9]\d*)\$|\(([^\)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-fosuxX])/.exec(t))) throw "[sprintf] huh?";
- if (n[2]) {
- i |= 1;
- var o = [],
- a = n[2],
- s = [];
- if (null === (s = /^([a-z_][a-z_\d]*)/i.exec(a))) throw "[sprintf] huh?";
- for (o.push(s[1]);
- "" !== (a = a.substring(s[0].length));)
- if (null !== (s = /^\.([a-z_][a-z_\d]*)/i.exec(a))) o.push(s[1]);
- else {
- if (null === (s = /^\[(\d+)\]/.exec(a))) throw "[sprintf] huh?";
- o.push(s[1])
- }
- n[2] = o
- } else i |= 2;
- if (3 === i) throw "[sprintf] mixing positional and named placeholders is not (yet) supported";
- r.push(n)
- }
- t = t.substring(n[0].length)
- }
- return r
- };
- var i = function(e, t, n) {
- return n = t.slice(0), n.splice(0, 0, e), r.apply(null, n)
- };
- e.sprintf = r, e.vsprintf = i
- }("undefined" != typeof global ? global : window),
- function(e, t) {
- "use strict";
- function n(e, t) {
- var n;
- if ("string" == typeof e && "string" == typeof t) return localStorage[e] = t, !0;
- if ("object" == typeof e && "undefined" == typeof t) {
- for (n in e) e.hasOwnProperty(n) && (localStorage[n] = e[n]);
- return !0
- }
- return !1
- }
- function r(e, t) {
- var n, r, i;
- if (n = new Date, n.setTime(n.getTime() + 31536e6), r = "; expires=" + n.toGMTString(), "string" == typeof e && "string" == typeof t) return document.cookie = e + "=" + t + r + "; path=/", !0;
- if ("object" == typeof e && "undefined" == typeof t) {
- for (i in e) e.hasOwnProperty(i) && (document.cookie = i + "=" + e[i] + r + "; path=/");
- return !0
- }
- return !1
- }
- function i(e) {
- return localStorage[e]
- }
- function o(e) {
- var t, n, r, i;
- for (t = e + "=", n = document.cookie.split(";"), r = 0; r < n.length; r++) {
- for (i = n[r];
- " " === i.charAt(0);) i = i.substring(1, i.length);
- if (0 === i.indexOf(t)) return i.substring(t.length, i.length)
- }
- return null
- }
- function a(e) {
- return delete localStorage[e]
- }
- function s(e) {
- return r(e, "", -1)
- }
- function u(e, t) {
- var n = [],
- r = e.length;
- if (r < t) return [e];
- if (t < 0) throw new Error("str_parts: length can't be negative");
- for (var i = 0; i < r; i += t) n.push(e.substring(i, i + t));
- return n
- }
- function c(t) {
- var n = t ? [t] : [],
- r = 0;
- e.extend(this, {
- get: function() {
- return n
- },
- rotate: function() {
- if (n.filter(Boolean).length) return 1 === n.length ? n[0] : (r === n.length - 1 ? r = 0 : ++r, n[r] ? n[r] : this.rotate())
- },
- length: function() {
- return n.length
- },
- remove: function(e) {
- delete n[e]
- },
- set: function(e) {
- for (var t = n.length; t--;)
- if (n[t] === e) return void(r = t);
- this.append(e)
- },
- front: function() {
- if (n.length) {
- for (var e = r, t = !1; !n[e];)
- if (e++, e > n.length) {
- if (t) break;
- e = 0, t = !0
- }
- return n[e]
- }
- },
- append: function(e) {
- n.push(e)
- }
- })
- }
- function l(t) {
- var n = t instanceof Array ? t : t ? [t] : [];
- e.extend(this, {
- data: function() {
- return n
- },
- map: function(t) {
- return e.map(n, t)
- },
- size: function() {
- return n.length
- },
- pop: function() {
- if (0 === n.length) return null;
- var e = n[n.length - 1];
- return n = n.slice(0, n.length - 1), e
- },
- push: function(e) {
- return n = n.concat([e]), e
- },
- top: function() {
- return n.length > 0 ? n[n.length - 1] : null
- },
- clone: function() {
- return new l(n.slice(0))
- }
- })
- }
- function f(t, n) {
- var r = !0,
- i = "";
- "string" == typeof t && "" !== t && (i = t + "_"), i += "commands";
- var o = e.Storage.get(i);
- o = o ? e.parseJSON(o) : [];
- var a = o.length - 1;
- e.extend(this, {
- append: function(t) {
- r && o[o.length - 1] !== t && (o.push(t), n && o.length > n && (o = o.slice(-n)), a = o.length - 1, e.Storage.set(i, e.json_stringify(o)))
- },
- data: function() {
- return o
- },
- reset: function() {
- a = o.length - 1
- },
- last: function() {
- return o[o.length - 1]
- },
- end: function() {
- return a === o.length - 1
- },
- position: function() {
- return a
- },
- current: function() {
- return o[a]
- },
- next: function() {
- if (a < o.length - 1 && ++a, a !== -1) return o[a]
- },
- previous: function() {
- var e = a;
- if (a > 0 && --a, e !== -1) return o[a]
- },
- clear: function() {
- o = [], this.purge()
- },
- enabled: function() {
- return r
- },
- enable: function() {
- r = !0
- },
- purge: function() {
- e.Storage.remove(i)
- },
- disable: function() {
- r = !1
- }
- })
- }
- function p(t, n) {
- var r = n(t);
- if (r.length) {
- var i = r.shift(),
- o = new RegExp("^" + e.terminal.escape_regex(i)),
- a = t.replace(o, "").trim();
- return {
- command: t,
- name: i,
- args: r,
- rest: a
- }
- }
- return {
- command: t,
- name: "",
- args: [],
- rest: ""
- }
- }
- function h() {
- var t = e('<div class="terminal temp"><div class="cmd"><span class="cursor"> </span></div></div>').appendTo("body"),
- n = t.find("span"),
- r = {
- width: n.width(),
- height: n.outerHeight()
- };
- return t.remove(), r
- }
- function d(t) {
- var n = e('<div class="terminal wrap"><span class="cursor"> </span></div>').appendTo("body").css("padding", 0),
- r = n.find("span"),
- i = r[0].getBoundingClientRect().width,
- o = Math.floor(t.width() / i);
- if (n.remove(), v(t)) {
- var a = 20,
- s = t.innerWidth() - t.width();
- o -= Math.ceil((a - s / 2) / (i - 1))
- }
- return o
- }
- function g(e) {
- return Math.floor(e.height() / h().height)
- }
- function m() {
- if (window.getSelection || document.getSelection) {
- var e = (window.getSelection || document.getSelection)();
- return e.text ? e.text : e.toString()
- }
- if (document.selection) return document.selection.createRange().text
- }
- function v(t) {
- return "scroll" == t.css("overflow") || "scroll" == t.css("overflow-y") || (t.is("body") ? e("body").height() > e(window).height() : t.get(0).scrollHeight > t.innerHeight())
- }
- e.omap = function(t, n) {
- var r = {};
- return e.each(t, function(e, i) {
- r[e] = n.call(t, e, i)
- }), r
- };
- var y = {
- clone_object: function(t) {
- var n = {};
- if ("object" == typeof t) {
- if (e.isArray(t)) return this.clone_array(t);
- if (null === t) return t;
- for (var r in t) e.isArray(t[r]) ? n[r] = this.clone_array(t[r]) : "object" == typeof t[r] ? n[r] = this.clone_object(t[r]) : n[r] = t[r]
- }
- return n
- },
- clone_array: function(t) {
- if (!e.isFunction(Array.prototype.map)) throw new Error("You'r browser don't support ES5 array map use es5-shim");
- return t.slice(0).map(function(e) {
- return "object" == typeof e ? this.clone_object(e) : e
- }.bind(this))
- }
- },
- b = function(e) {
- return y.clone_object(e)
- },
- w = function() {
- var e = "test",
- t = window.localStorage;
- try {
- return t.setItem(e, "1"), t.removeItem(e), !0
- } catch (n) {
- return !1
- }
- },
- x = w();
- e.extend({
- Storage: {
- set: x ? n : r,
- get: x ? i : o,
- remove: x ? a : s
- }
- });
- var _ = e;
- _.fn.extend({
- everyTime: function(e, t, n, r, i) {
- return this.each(function() {
- _.timer.add(this, e, t, n, r, i)
- })
- },
- oneTime: function(e, t, n) {
- return this.each(function() {
- _.timer.add(this, e, t, n, 1)
- })
- },
- stopTime: function(e, t) {
- return this.each(function() {
- _.timer.remove(this, e, t)
- })
- }
- }), _.extend({
- timer: {
- guid: 1,
- global: {},
- regex: /^([0-9]+)\s*(.*s)?$/,
- powers: {
- ms: 1,
- cs: 10,
- ds: 100,
- s: 1e3,
- das: 1e4,
- hs: 1e5,
- ks: 1e6
- },
- timeParse: function(e) {
- if (e === t || null === e) return null;
- var n = this.regex.exec(_.trim(e.toString()));
- if (n[2]) {
- var r = parseInt(n[1], 10),
- i = this.powers[n[2]] || 1;
- return r * i
- }
- return e
- },
- add: function(e, t, n, r, i, o) {
- var a = 0;
- if (_.isFunction(n) && (i || (i = r), r = n, n = t), t = _.timer.timeParse(t), !("number" != typeof t || isNaN(t) || t <= 0)) {
- i && i.constructor !== Number && (o = !!i, i = 0), i = i || 0, o = o || !1, e.$timers || (e.$timers = {}), e.$timers[n] || (e.$timers[n] = {}), r.$timerID = r.$timerID || this.guid++;
- var s = function() {
- o && s.inProgress || (s.inProgress = !0, (++a > i && 0 !== i || r.call(e, a) === !1) && _.timer.remove(e, n, r), s.inProgress = !1)
- };
- s.$timerID = r.$timerID, e.$timers[n][r.$timerID] || (e.$timers[n][r.$timerID] = window.setInterval(s, t)), this.global[n] || (this.global[n] = []), this.global[n].push(e)
- }
- },
- remove: function(e, t, n) {
- var r, i = e.$timers;
- if (i) {
- if (t) {
- if (i[t]) {
- if (n) n.$timerID && (window.clearInterval(i[t][n.$timerID]), delete i[t][n.$timerID]);
- else
- for (var o in i[t]) i[t].hasOwnProperty(o) && (window.clearInterval(i[t][o]), delete i[t][o]);
- for (r in i[t])
- if (i[t].hasOwnProperty(r)) break;
- r || (r = null, delete i[t])
- }
- } else
- for (var a in i) i.hasOwnProperty(a) && this.remove(e, a, n);
- for (r in i)
- if (i.hasOwnProperty(r)) break;
- r || (e.$timers = null)
- }
- }
- }
- }), /(msie) ([\w.]+)/.exec(navigator.userAgent.toLowerCase()) && _(window).one("unload", function() {
- var e = _.timer.global;
- for (var t in e)
- if (e.hasOwnProperty(t))
- for (var n = e[t], r = n.length; --r;) _.timer.remove(n[r], t)
- }),
- function(e) {
- if (String.prototype.split.toString().match(/\[native/)) {
- var t, n = String.prototype.split,
- r = /()??/.exec("")[1] === e;
- return t = function(t, i, o) {
- if ("[object RegExp]" !== Object.prototype.toString.call(i)) return n.call(t, i, o);
- var a, s, u, c, l = [],
- f = (i.ignoreCase ? "i" : "") + (i.multiline ? "m" : "") + (i.extended ? "x" : "") + (i.sticky ? "y" : ""),
- p = 0;
- for (i = new RegExp(i.source, f + "g"), t += "", r || (a = new RegExp("^" + i.source + "$(?!\\s)", f)), o = o === e ? -1 >>> 0 : o >>> 0;
- (s = i.exec(t)) && (u = s.index + s[0].length, !(u > p && (l.push(t.slice(p, s.index)), !r && s.length > 1 && s[0].replace(a, function() {
- for (var t = 1; t < arguments.length - 2; t++) arguments[t] === e && (s[t] = e)
- }), s.length > 1 && s.index < t.length && Array.prototype.push.apply(l, s.slice(1)), c = s[0].length, p = u, l.length >= o)));) i.lastIndex === s.index && i.lastIndex++;
- return p === t.length ? !c && i.test("") || l.push("") : l.push(t.slice(p)), l.length > o ? l.slice(0, o) : l
- }, String.prototype.split = function(e, n) {
- return t(this, e, n)
- }, t
- }
- }(), e.fn.caret = function(e) {
- var t = this[0],
- n = "true" === t.contentEditable;
- if (0 == arguments.length) {
- if (window.getSelection) {
- if (n) {
- t.focus();
- var r = window.getSelection().getRangeAt(0),
- i = r.cloneRange();
- return i.selectNodeContents(t), i.setEnd(r.endContainer, r.endOffset), i.toString().length
- }
- return t.selectionStart
- }
- if (document.selection) {
- if (t.focus(), n) {
- var r = document.selection.createRange(),
- i = document.body.createTextRange();
- return i.moveToElementText(t), i.setEndPoint("EndToEnd", r), i.text.length
- }
- var e = 0,
- o = t.createTextRange(),
- i = document.selection.createRange().duplicate(),
- a = i.getBookmark();
- for (o.moveToBookmark(a); 0 !== o.moveStart("character", -1);) e++;
- return e
- }
- return 0
- }
- if (e == -1 && (e = this[n ? "text" : "val"]().length), window.getSelection) n ? (t.focus(), window.getSelection().collapse(t.firstChild, e)) : t.setSelectionRange(e, e);
- else if (document.body.createTextRange) {
- var o = document.body.createTextRange();
- o.moveToElementText(t), o.moveStart("character", e), o.collapse(!0), o.select()
- }
- return n || t.focus(), e
- }, e.json_stringify = function(n, r) {
- var i, o = "";
- r = r === t ? 1 : r;
- var a = typeof n;
- switch (a) {
- case "function":
- o += n;
- break;
- case "boolean":
- o += n ? "true" : "false";
- break;
- case "object":
- if (null === n) o += "null";
- else if (n instanceof Array) {
- o += "[";
- var s = n.length;
- for (i = 0; i < s - 1; ++i) o += e.json_stringify(n[i], r + 1);
- o += e.json_stringify(n[s - 1], r + 1) + "]"
- } else {
- o += "{";
- for (var u in n) n.hasOwnProperty(u) && (o += '"' + u + '":' + e.json_stringify(n[u], r + 1));
- o += "}"
- }
- break;
- case "string":
- var c = n,
- l = {
- "\\\\": "\\\\",
- '"': '\\"',
- "/": "\\/",
- "\\n": "\\n",
- "\\r": "\\r",
- "\\t": "\\t"
- };
- for (i in l) l.hasOwnProperty(i) && (c = c.replace(new RegExp(i, "g"), l[i]));
- o += '"' + c + '"';
- break;
- case "number":
- o += String(n)
- }
- return o += r > 1 ? "," : "", 1 === r && (o = o.replace(/,([\]}])/g, "$1")), o.replace(/([\[{]),/g, "$1")
- };
- var k = function() {
- var e = document.createElement("div");
- return e.setAttribute("onpaste", "return;"), "function" == typeof e.onpaste
- }();
- e.fn.cmd = function(n) {
- function r() {
- var e = x.is(":focus");
- D ? e || (x.focus(), b.oneTime(10, function() {
- x.focus()
- })) : e && x.blur()
- }
- function i() {
- S && b.oneTime(10, function() {
- x.val($), b.oneTime(10, function() {
- x.caret(z)
- })
- })
- }
- function o(e) {
- K.toggleClass("inverted")
- }
- function a() {
- N = "(reverse-i-search)`" + H + "': ", V()
- }
- function s() {
- N = j, q = !1, I = null, H = ""
- }
- function c(t) {
- var n, r, i = L.data(),
- o = i.length;
- if (t && I > 0 && (o -= I), H.length > 0)
- for (var s = H.length; s > 0; s--) {
- r = e.terminal.escape_regex(H.substring(0, s)), n = new RegExp(r);
- for (var u = o; u--;)
- if (n.test(i[u])) return I = i.length - u, b.position(i[u].indexOf(r)), b.set(i[u], !0), J(), void(H.length !== s && (H = H.substring(0, s), a()))
- }
- H = ""
- }
- function l() {
- var e = b.width(),
- t = K[0].getBoundingClientRect().width;
- _ = Math.floor(e / t)
- }
- function p(e) {
- var t = e.substring(0, _ - E),
- n = e.substring(_ - E);
- return [t].concat(u(n, _))
- }
- function h(e) {
- if (!(U++ > 0) && (e.originalEvent && (e = e.originalEvent), b.isenabled())) {
- var t = b.find("textarea");
- t.is(":focus") || t.focus(), b.oneTime(100, function() {
- b.insert(t.val()), t.val(""), i()
- })
- }
- }
- function d(r) {
- var i, o, u;
- if (D) {
- if (e.isFunction(n.keydown) && (i = n.keydown(r), i !== t)) return i;
- if (38 === r.which || 80 === r.which && r.ctrlKey || (G = !0), !q || 35 !== r.which && 36 !== r.which && 37 !== r.which && 38 !== r.which && 39 !== r.which && 40 !== r.which && 13 !== r.which && 27 !== r.which) {
- if (r.altKey) return 68 !== r.which || (b.set($.slice(0, z) + $.slice(z).replace(/ *[^ ]+ *(?= )|[^ ]+$/, ""), !0), !1);
- if (13 === r.keyCode)
- if (r.shiftKey) b.insert("\n");
- else {
- (L && $ && !P && e.isFunction(n.historyFilter) && n.historyFilter($) || n.historyFilter instanceof RegExp && $.match(n.historyFilter) || !n.historyFilter) && L.append($);
- var l = $;
- L.reset(), b.set(""), n.commands && n.commands(l), e.isFunction(N) && V()
- } else if (8 === r.which) {
- if (q ? (H = H.slice(0, -1), a()) : "" !== $ && z > 0 && b["delete"](-1), S) return !0
- } else if (67 === r.which && r.ctrlKey && r.shiftKey) M = m();
- else if (86 === r.which && r.ctrlKey && r.shiftKey) "" !== M && b.insert(M);
- else if (9 !== r.which || r.ctrlKey || r.altKey) {
- if (46 === r.which) return void b["delete"](1);
- if (L && 38 === r.which && !r.ctrlKey || 80 === r.which && r.ctrlKey) G ? (A = $, b.set(L.current())) : b.set(L.previous()), G = !1;
- else if (L && 40 === r.which && !r.ctrlKey || 78 === r.which && r.ctrlKey) b.set(L.end() ? A : L.next());
- else if (37 === r.which || 66 === r.which && r.ctrlKey)
- if (r.ctrlKey && 66 !== r.which) {
- u = z - 1, o = 0, " " === $[u] && --u;
- for (var f = u; f > 0; --f) {
- if (" " === $[f] && " " !== $[f + 1]) {
- o = f + 1;
- break
- }
- if ("\n" === $[f] && "\n" !== $[f + 1]) {
- o = f;
- break
- }
- }
- b.position(o)
- } else z > 0 && (b.position(-1, !0), J());
- else if (82 === r.which && r.ctrlKey) q ? c(!0) : (j = N, a(), A = $, b.set(""), J(), q = !0);
- else if (71 == r.which && r.ctrlKey) q && (N = j, V(), b.set(A), J(), q = !1, H = "");
- else if (39 === r.which || 70 === r.which && r.ctrlKey)
- if (r.ctrlKey && 70 !== r.which) {
- " " === $[z] && ++z;
- var p = /\S[\n\s]{2,}|[\n\s]+\S?/,
- g = $.slice(z).match(p);
- !g || g[0].match(/^\s+$/) ? b.position($.length) : " " !== g[0][0] ? z += g.index + 1 : (z += g.index + g[0].length - 1, " " !== g[0][g[0].length - 1] && --z), J()
- } else z < $.length && b.position(1, !0);
- else {
- if (123 === r.which) return;
- if (36 === r.which) b.position(0);
- else if (35 === r.which) b.position($.length);
- else {
- if (r.shiftKey && 45 == r.which) return x.val(""), U = 0, void(k ? x.focus() : h(r));
- if (!r.ctrlKey && !r.metaKey) return Q = !1, void(Y = !0);
- if (192 === r.which) return;
- if (r.metaKey) {
- if (82 === r.which) return;
- if (76 === r.which) return
- }
- if (r.shiftKey) {
- if (84 === r.which) return
- } else {
- if (81 === r.which) {
- if ("" !== $ && 0 !== z) {
- var v = $.slice(0, z).match(/([^ ]+ *$)/);
- W = b["delete"](-v[0].length)
- }
- return !1
- }
- if (72 === r.which) return "" !== $ && z > 0 && b["delete"](-1), !1;
- if (65 === r.which) b.position(0);
- else if (69 === r.which) b.position($.length);
- else {
- if (88 === r.which || 67 === r.which || 84 === r.which) return;
- if (89 === r.which) "" !== W && b.insert(W);
- else {
- if (86 === r.which || 118 === r.which) return x.val(""), U = 0, void(k ? (x.focus(), x.on("input", function y(e) {
- h(e), x.off("input", y)
- })) : h(r));
- if (75 === r.which) W = b["delete"]($.length - z);
- else if (85 === r.which) "" !== $ && 0 !== z && (W = b["delete"](-z));
- else if (17 === r.which) return !1
- }
- }
- }
- }
- }
- } else b.insert("\t")
- } else s(), V(), 27 === r.which && b.set(""), J(), d.call(this, r);
- r.preventDefault()
- }
- }
- function g() {
- e.isFunction(n.onCommandChange) && n.onCommandChange($)
- }
- function v(r) {
- var i;
- if (Y = !1, (!r.ctrlKey && !r.metaKey || [99, 118, 86].indexOf(r.which) === -1) && !Q) {
- if (!q && e.isFunction(n.keypress) && (i = n.keypress(r)), i !== t && !i) return i;
- if (D) {
- if (e.inArray(r.which, [38, 13, 0, 8]) > -1 && (38 !== r.which || !r.shiftKey)) {
- if (123 == r.keyCode) return;
- return !1
- }
- if (!r.ctrlKey && (!r.altKey || 100 !== r.which) || r.altKey) return q ? (H += String.fromCharCode(r.which), c(), a()) : b.insert(String.fromCharCode(r.which)), !1
- }
- }
- }
- function y(e) {
- if (Y) {
- var t = x.val();
- (t || 8 == e.which) && b.set(t)
- }
- }
- var b = this,
- w = b.data("cmd");
- if (w) return w;
- b.addClass("cmd"), b.append('<span class="prompt"></span><span></span><span class="cursor"> </span><span></span>');
- var x = e("<textarea>").addClass("clipboard").appendTo(b);
- n.width && b.width(n.width);
- var _, E, j, A, N, D, F, L, R, O = b.find(".prompt"),
- q = !1,
- H = "",
- I = null,
- P = n.mask || !1,
- $ = "",
- M = "",
- W = "",
- z = 0,
- B = n.historySize || 60,
- K = b.find(".cursor"),
- U = 0;
- if (T && !C) R = function(e) {
- e ? K.addClass("blink") : K.removeClass("blink")
- };
- else {
- var X = !1;
- R = function(e) {
- e && !X ? (X = !0, K.addClass("inverted blink"), b.everyTime(500, "blink", o)) : X && !e && (X = !1, b.stopTime("blink", o), K.removeClass("inverted blink"))
- }
- }
- var Y, J = function(t) {
- function n(t, n) {
- var r = t.length;
- if (n === r) a.html(e.terminal.encode(t)), K.html(" "), s.html("");
- else if (0 === n) a.html(""), K.html(e.terminal.encode(t.slice(0, 1))), s.html(e.terminal.encode(t.slice(1)));
- else {
- var i = t.slice(0, n);
- a.html(e.terminal.encode(i));
- var o = t.slice(n, n + 1);
- K.html(e.terminal.encode(o)), n === t.length - 1 ? s.html("") : s.html(e.terminal.encode(t.slice(n + 1)))
- }
- }
- function r(t) {
- return "<div>" + e.terminal.encode(t) + "</div>"
- }
- function i(t) {
- var n = s;
- e.each(t, function(t, i) {
- n = e(r(i)).insertAfter(n).addClass("clear")
- })
- }
- function o(t) {
- e.each(t, function(e, t) {
- a.before(r(t))
- })
- }
- var a = K.prev(),
- s = K.next();
- return function() {
- var c, l;
- switch (typeof P) {
- case "boolean":
- c = P ? $.replace(/./g, "*") : $;
- break;
- case "string":
- c = $.replace(/./g, P)
- }
- var f, h;
- if (t.find("div").remove(), a.html(""), c.length > _ - E - 1 || c.match(/\n/)) {
- var d, g = c.match(/\t/g),
- m = g ? 3 * g.length : 0;
- if (g && (c = c.replace(/\t/g, "\0\0\0\0")), c.match(/\n/)) {
- var v = c.split("\n");
- for (h = _ - E - 1, f = 0; f < v.length - 1; ++f) v[f] += " ";
- for (v[0].length > h ? (d = [v[0].substring(0, h)], l = v[0].substring(h), d = d.concat(u(l, _))) : d = [v[0]], f = 1; f < v.length; ++f) v[f].length > _ ? d = d.concat(u(v[f], _)) : d.push(v[f])
- } else d = p(c);
- if (g && (d = e.map(d, function(e) {
- return e.replace(/\x00\x00\x00\x00/g, "\t")
- })), h = d[0].length, 0 === h && 1 === d.length);
- else if (z < h) n(d[0], z), i(d.slice(1));
- else if (z === h) a.before(r(d[0])), n(d[1], 0), i(d.slice(2));
- else {
- var y = d.length;
- if (z < h) n(d[0], z), i(d.slice(1));
- else if (z === h) a.before(r(d[0])), n(d[1], 0), i(d.slice(2));
- else {
- var b = d.slice(-1)[0],
- w = c.length - z - m,
- x = b.length,
- k = 0;
- if (w <= x) o(d.slice(0, -1)), k = x === w ? 0 : x - w, n(b, k);
- else if (3 === y) l = e.terminal.encode(d[0]), a.before("<div>" + l + "</div>"), n(d[1], z - h - 1), l = e.terminal.encode(d[2]), s.after('<div class="clear">' + l + "</div>");
- else {
- var T, C;
- for (k = z, f = 0; f < d.length; ++f) {
- var S = d[f].length;
- if (!(k > S)) break;
- k -= S
- }
- C = d[f], T = f, k === C.length && (k = 0, C = d[++T]), n(C, k), o(d.slice(0, T)), i(d.slice(T + 1))
- }
- }
- }
- } else "" === c ? (a.html(""), K.html(" "), s.html("")) : n(c, z)
- }
- }(b),
- V = function() {
- function t(t) {
- O.html(e.terminal.format(e.terminal.encode(t))), E = O.text().length
- }
- return function() {
- switch (typeof N) {
- case "string":
- t(N);
- break;
- case "function":
- N(t)
- }
- }
- }(),
- G = !0,
- Q = !1;
- e.extend(b, {
- name: function(e) {
- if (e !== t) {
- F = e;
- var n = L && L.enabled() || !L;
- return L = new f(e, B), n || L.disable(), b
- }
- return F
- },
- purge: function() {
- return L.clear(), b
- },
- history: function() {
- return L
- },
- "delete": function(e, t) {
- var n;
- return 0 === e ? b : (e < 0 ? z > 0 && (n = $.slice(0, z).slice(e), $ = $.slice(0, z + e) + $.slice(z, $.length), t ? g() : b.position(z + e)) : "" !== $ && z < $.length && (n = $.slice(z).slice(0, e), $ = $.slice(0, z) + $.slice(z + e, $.length), g()), J(), i(), n)
- },
- set: function(e, n) {
- return e !== t && ($ = e, n || b.position($.length), J(), i(), g()), b
- },
- insert: function(e, t) {
- return z === $.length ? $ += e : $ = 0 === z ? e + $ : $.slice(0, z) + e + $.slice(z), t ? i() : b.position(e.length, !0), J(), g(), b
- },
- get: function() {
- return $
- },
- commands: function(e) {
- return e ? (n.commands = e, b) : e
- },
- destroy: function() {
- return Z.unbind("keypress.cmd", v), Z.unbind("keydown.cmd", d), Z.unbind("paste.cmd", h), Z.unbind("input.cmd", y), b.stopTime("blink", o), b.find(".cursor").next().remove().end().prev().remove().end().remove(), b.find(".prompt, .clipboard").remove(), b.removeClass("cmd").removeData("cmd"), b
- },
- prompt: function(e) {
- if (e === t) return N;
- if ("string" != typeof e && "function" != typeof e) throw new Error("prompt must be a function or string");
- return N = e, V(), J(), b
- },
- kill_text: function() {
- return W
- },
- position: function(t, r) {
- return "number" == typeof t ? (r ? z += t : z = t < 0 ? 0 : t > $.length ? $.length : t, e.isFunction(n.onPositionChange) && n.onPositionChange(z), J(), i(), b) : z
- },
- visible: function() {
- var e = b.visible;
- return function() {
- e.apply(b, []), J(), V()
- }
- }(),
- show: function() {
- var e = b.show;
- return function() {
- e.apply(b, []), J(), V()
- }
- }(),
- resize: function(e) {
- return e ? _ = e : l(), J(), b
- },
- enable: function() {
- return D = !0, b.addClass("enabled"), R(!0), r(), b
- },
- isenabled: function() {
- return D
- },
- disable: function() {
- return D = !1, b.removeClass("enabled"), R(!1), r(), b
- },
- mask: function(e) {
- return "undefined" == typeof e ? P : (P = e, J(), b)
- }
- }), b.name(n.name || n.prompt || ""), N = "string" == typeof n.prompt ? n.prompt : "> ", V(), n.enabled !== t && n.enabled !== !0 || b.enable();
- var Z = e(document.documentElement || window);
- return Z.bind("keypress.cmd", v).bind("keydown.cmd", d).bind("input.cmd", y), b.data("cmd", b), b
- };
- var T = function() {
- var e = !1,
- n = "animation",
- r = "",
- i = "Webkit Moz O ms Khtml".split(" "),
- o = "",
- a = document.createElement("div");
- if (a.style.animationName && (e = !0), e === !1)
- for (var s = 0; s < i.length; s++) {
- var u = i[s] + "AnimationName";
- if (a.style[u] !== t) {
- o = i[s], n = o + "Animation", r = "-" + o.toLowerCase() + "-", e = !0;
- break
- }
- }
- return e
- }(),
- C = navigator.userAgent.toLowerCase().indexOf("android") != -1,
- S = function() {
- return "ontouchstart" in window || window.DocumentTouch && document instanceof DocumentTouch
- }(),
- E = /(\[\[[!gbiuso]*;[^;]*;[^\]]*\](?:[^\]]*\\\][^\]]*|[^\]]*|[^\[]*\[[^\]]*)\]?)/i,
- j = /\[\[([!gbiuso]*);([^;]*);([^;\]]*);?([^;\]]*);?([^\]]*)\]([^\]]*\\\][^\]]*|[^\]]*|[^\[]*\[[^\]]*)\]?/gi,
- A = /\[\[([!gbiuso]*;[^;\]]*;[^;\]]*(?:;|[^\]()]*);?[^\]]*)\]([^\]]*\\\][^\]]*|[^\]]*|[^\[]*\[[^\]]*)\]?/gi,
- N = /\[\[([!gbiuso]*;[^;\]]*;[^;\]]*(?:;|[^\]()]*);?[^\]]*)\]([^\]]*\\\][^\]]*|[^\]]*|[^\[]*\[[^\]]*)\]/gi,
- D = /^\[\[([!gbiuso]*;[^;\]]*;[^;\]]*(?:;|[^\]()]*);?[^\]]*)\]([^\]]*\\\][^\]]*|[^\]]*|[^\[]*\[[^\]]*)\]$/gi,
- F = /^#([0-9a-f]{3}|[0-9a-f]{6})$/i,
- L = /(\bhttps?:\/\/(?:(?:(?!&[^;]+;)|(?=&))[^\s"'<>\]\[)])+\b)/gi,
- R = /\b(https?:\/\/(?:(?:(?!&[^;]+;)|(?=&))[^\s"'<>\][)])+)\b(?![^[\]]*])/gi,
- O = /((([^<>('")[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,})))/g,
- q = /('[^']*'|"(\\"|[^"])*"|(?:\/(\\\/|[^\/])+\/[gimy]*)(?=:? |$)|(\\ |[^ ])+|[\w-]+)/gi,
- H = /(\[\[[!gbiuso]*;[^;]*;[^\]]*\])/i,
- I = /^(\[\[[!gbiuso]*;[^;]*;[^\]]*\])/i,
- P = /\[\[[!gbiuso]*;[^;]*;[^\]]*\]?$/i,
- $ = /(\[\[(?:[^\]]|\\\])*\]\])/;
- e.terminal = {
- version: "0.11.10",
- color_names: ["black", "silver", "gray", "white", "maroon", "red", "purple", "fuchsia", "green", "lime", "olive", "yellow", "navy", "blue", "teal", "aqua", "aliceblue", "antiquewhite", "aqua", "aquamarine", "azure", "beige", "bisque", "black", "blanchedalmond", "blue", "blueviolet", "brown", "burlywood", "cadetblue", "chartreuse", "chocolate", "coral", "cornflowerblue", "cornsilk", "crimson", "cyan", "darkblue", "darkcyan", "darkgoldenrod", "darkgray", "darkgreen", "darkgrey", "darkkhaki", "darkmagenta", "darkolivegreen", "darkorange", "darkorchid", "darkred", "darksalmon", "darkseagreen", "darkslateblue", "darkslategray", "darkslategrey", "darkturquoise", "darkviolet", "deeppink", "deepskyblue", "dimgray", "dimgrey", "dodgerblue", "firebrick", "floralwhite", "forestgreen", "fuchsia", "gainsboro", "ghostwhite", "gold", "goldenrod", "gray", "green", "greenyellow", "grey", "honeydew", "hotpink", "indianred", "indigo", "ivory", "khaki", "lavender", "lavenderblush", "lawngreen", "lemonchiffon", "lightblue", "lightcoral", "lightcyan", "lightgoldenrodyellow", "lightgray", "lightgreen", "lightgrey", "lightpink", "lightsalmon", "lightseagreen", "lightskyblue", "lightslategray", "lightslategrey", "lightsteelblue", "lightyellow", "lime", "limegreen", "linen", "magenta", "maroon", "mediumaquamarine", "mediumblue", "mediumorchid", "mediumpurple", "mediumseagreen", "mediumslateblue", "mediumspringgreen", "mediumturquoise", "mediumvioletred", "midnightblue", "mintcream", "mistyrose", "moccasin", "navajowhite", "navy", "oldlace", "olive", "olivedrab", "orange", "orangered", "orchid", "palegoldenrod", "palegreen", "paleturquoise", "palevioletred", "papayawhip", "peachpuff", "peru", "pink", "plum", "powderblue", "purple", "red", "rosybrown", "royalblue", "saddlebrown", "salmon", "sandybrown", "seagreen", "seashell", "sienna", "silver", "skyblue", "slateblue", "slategray", "slategrey", "snow", "springgreen", "steelblue", "tan", "teal", "thistle", "tomato", "turquoise", "violet", "wheat", "white", "whitesmoke", "yellow", "yellowgreen"],
- valid_color: function(t) {
- return !!t.match(F) || e.inArray(t.toLowerCase(), e.terminal.color_names) !== -1
- },
- escape_regex: function(e) {
- if ("string" == typeof e) {
- var t = /([-\\\^$\[\]()+{}?*.|])/g;
- return e.replace(t, "\\$1")
- }
- },
- have_formatting: function(e) {
- return "string" == typeof e && !!e.match(N)
- },
- is_formatting: function(e) {
- return "string" == typeof e && !!e.match(D)
- },
- format_split: function(e) {
- return e.split(E)
- },
- split_equal: function(t, n, r) {
- function i() {
- return " " == p.substring(m - 6, m) || " " == p.substring(m - 1, m)
- }
- for (var o = !1, a = !1, s = "", u = [], c = t.replace(A, function(e, t, n) {
- var r = t.match(/;/g).length;
- if (r >= 4) return e;
- r = 2 == r ? ";;" : 3 == r ? ";" : "";
- var i = n.replace(/\\\]/g, "]").replace(/\n/g, "\\n").replace(/ /g, " ");
- return "[[" + t + r + i + "]" + n + "]"
- }).split(/\n/g), l = 0, f = c.length; l < f; ++l)
- if ("" !== c[l])
- for (var p = c[l], h = 0, d = 0, g = -1, m = 0, v = p.length; m < v; ++m) {
- if (p.substring(m).match(I)) o = !0, a = !1;
- else if (o && "]" === p[m]) a ? (o = !1, a = !1) : a = !0;
- else if (o && a || !o) {
- if ("&" === p[m]) {
- var y = p.substring(m).match(/^(&[^;]+;)/);
- if (!y) throw new Error("Unclosed html entity in line " + (l + 1) + " at char " + (m + 1));
- m += y[1].length - 2, m === v - 1 && u.push(b + y[1]);
- continue
- }
- "]" === p[m] && "\\" === p[m - 1] ? --d : ++d
- }
- if (i() && (o && a || !o || "[" === p[m] && "[" === p[m + 1]) && (g = m), (d === n || m === v - 1) && (o && a || !o)) {
- var b, w = e.terminal.strip(p.substring(g));
- w = e("<span>" + w + "</span>").text();
- var x = w.length;
- w = w.substring(0, m + n + 1);
- var _ = !!w.match(/\s/) || m + n + 1 > x;
- r && g != -1 && m !== v - 1 && _ ? (b = p.substring(h, g), m = g - 1) : b = p.substring(h, m + 1), r && (b = b.replace(/( |\s)+$/g, "")), g = -1, h = m + 1, d = 0, s && (b = s + b, b.match("]") && (s = ""));
- var k = b.match(A);
- if (k) {
- var T = k[k.length - 1];
- if ("]" !== T[T.length - 1]) s = T.match(H)[1], b += "]";
- else if (b.match(P)) {
- b.length;
- b = b.replace(P, ""), s = T.match(H)[1]
- }
- }
- u.push(b)
- }
- } else u.push("");
- return u
- },
- encode: function(e) {
- return e = e.replace(/&(?!#[0-9]+;|[a-zA-Z]+;)/g, "&"), e.replace(/</g, "<").replace(/>/g, ">").replace(/ /g, " ").replace(/\t/g, " ")
- },
- escape_formatting: function(t) {
- return e.terminal.escape_brackets(e.terminal.encode(t))
- },
- format: function(t, n) {
- var r = e.extend({}, {
- linksNoReferrer: !1
- }, n || {});
- if ("string" == typeof t) {
- var i = e.terminal.format_split(t);
- return t = e.map(i, function(t) {
- return "" === t ? t : e.terminal.is_formatting(t) ? (t = t.replace(/\[\[[^\]]+\]/, function(e) {
- return e.replace(/ /g, " ")
- }), t.replace(j, function(t, n, i, o, a, s, u) {
- if ("" === u) return "";
- u = u.replace(/\\]/g, "]");
- var c = "";
- n.indexOf("b") !== -1 && (c += "font-weight:bold;");
- var l = [];
- n.indexOf("u") !== -1 && l.push("underline"), n.indexOf("s") !== -1 && l.push("line-through"), n.indexOf("o") !== -1 && l.push("overline"), l.length && (c += "text-decoration:" + l.join(" ") + ";"), n.indexOf("i") !== -1 && (c += "font-style:italic;"), e.terminal.valid_color(i) && (c += "color:" + i + ";", n.indexOf("g") !== -1 && (c += "text-shadow:0 0 5px " + i + ";")), e.terminal.valid_color(o) && (c += "background-color:" + o);
- var f;
- f = "" === s ? u : s.replace(/]/g, "]");
- var p;
- return n.indexOf("!") !== -1 ? f.match(O) ? p = '<a href="mailto:' + f + '" ' : (p = '<a target="_blank" href="' + f + '" ', r.linksNoReferrer && (p += 'rel="noreferrer" ')) : p = "<span", "" !== c && (p += ' style="' + c + '"'), "" !== a && (p += ' class="' + a + '"'), p += n.indexOf("!") !== -1 ? ">" + u + "</a>" : ' data-text="' + f.replace('"', ""e;") + '">' + u + "</span>"
- })) : "<span>" + t.replace(/\\\]/g, "]") + "</span>"
- }).join(""), t.replace(/<span><br\s*\/?><\/span>/gi, "<br/>")
- }
- return ""
- },
- escape_brackets: function(e) {
- return e.replace(/\[/g, "[").replace(/\]/g, "]")
- },
- strip: function(e) {
- return e.replace(j, "$6")
- },
- active: function() {
- return V.front()
- },
- last_id: function() {
- var e = V.length();
- if (e) return e - 1
- },
- parseArguments: function(t) {
- return e.terminal.parse_arguments(t)
- },
- splitArguments: function(t) {
- return e.terminal.split_arguments(t)
- },
- parseCommand: function(t) {
- return e.terminal.parse_command(t)
- },
- splitCommand: function(t) {
- return e.terminal.split_command(t)
- },
- parse_arguments: function(t) {
- var n = /^[-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?$/;
- return e.map(t.match(q) || [], function(e) {
- if ("'" === e[0] && "'" === e[e.length - 1]) return e.replace(/^'|'$/g, "");
- if ('"' === e[0] && '"' === e[e.length - 1]) return e = e.replace(/^"|"$/g, "").replace(/\\([" ])/g, "$1"), e.replace(/\\\\|\\t|\\n/g, function(e) {
- return "t" === e[1] ? "\t" : "n" === e[1] ? "\n" : "\\"
- }).replace(/\\x([0-9a-f]+)/gi, function(e, t) {
- return String.fromCharCode(parseInt(t, 16))
- }).replace(/\\0([0-7]+)/g, function(e, t) {
- return String.fromCharCode(parseInt(t, 8))
- });
- if (e.match(/^\/(\\\/|[^\/])+\/[gimy]*$/)) {
- var t = e.match(/^\/([^\/]+)\/([^\/]*)$/);
- return new RegExp(t[1], t[2])
- }
- return e.match(/^-?[0-9]+$/) ? parseInt(e, 10) : e.match(n) ? parseFloat(e) : e.replace(/\\ /g, " ")
- })
- },
- split_arguments: function(t) {
- return e.map(t.match(q) || [], function(e) {
- return "'" === e[0] && "'" === e[e.length - 1] ? e.replace(/^'|'$/g, "") : '"' === e[0] && '"' === e[e.length - 1] ? e.replace(/^"|"$/g, "").replace(/\\([" ])/g, "$1") : e.match(/\/.*\/[gimy]*$/) ? e : e.replace(/\\ /g, " ")
- })
- },
- parse_command: function(t) {
- return p(t, e.terminal.parse_arguments)
- },
- split_command: function(t) {
- return p(t, e.terminal.split_arguments)
- },
- extended_command: function(e, t) {
- try {
- Q = !1, e.exec(t, !0).then(function() {
- Q = !0
- })
- } catch (n) {}
- }
- }, e.fn.visible = function() {
- return this.css("visibility", "visible")
- }, e.fn.hidden = function() {
- return this.css("visibility", "hidden")
- };
- var M = {};
- e.jrpc = function(t, n, r, i, o) {
- M[t] = M[t] || 0;
- var a = e.json_stringify({
- jsonrpc: "2.0",
- method: n,
- params: r,
- id: ++M[t]
- });
- return e.ajax({
- url: t,
- data: a,
- success: function(t, n, r) {
- var a = r.getResponseHeader("Content-Type");
- if (!a.match(/application\/json/)) {
- var s = "Response Content-Type is not application/json";
- if (!console || !console.warn) throw new Error("WARN: " + s)
- }
- var u;
- try {
- u = e.parseJSON(t)
- } catch (c) {
- if (!o) throw new Error("Invalid JSON");
- return void o(r, "Invalid JSON", c)
- }
- i(u, n, r)
- },
- error: o,
- contentType: "application/json",
- dataType: "text",
- async: !0,
- cache: !1,
- type: "POST"
- })
- };
- var W = !e.terminal.version.match(/^\{\{/),
- z = "Copyright (c) 2011-2016 Jakub Jankiewicz <http://jcubic.pl>",
- B = W ? " v. " + e.terminal.version : " ",
- K = new RegExp(" {" + B.length + "}$"),
- U = "jQuery Terminal Emulator" + (W ? B : ""),
- X = [
- ["jQuery Terminal", "(c) 2011-2016 jcubic"],
- [U, z.replace(/^Copyright | *<.*>/g, "")],
- [U, z.replace(/^Copyright /, "")],
- [" _______ ________ __", " / / _ /_ ____________ _/__ ___/______________ _____ / /", " __ / / // / // / _ / _/ // / / / _ / _/ / / \\/ / _ \\/ /", "/ / / // / // / ___/ // // / / / ___/ // / / / / /\\ / // / /__", "\\___/____ \\\\__/____/_/ \\__ / /_/____/_//_/_/_/ /_/ \\/\\__\\_\\___/", " \\/ /____/ ".replace(K, " ") + B, z],
- [" __ _____ ________ __", " / // _ /__ __ _____ ___ __ _/__ ___/__ ___ ______ __ __ __ ___ / /", " __ / // // // // // _ // _// // / / // _ // _// // // \\/ // _ \\/ /", "/ / // // // // // ___// / / // / / // ___// / / / / // // /\\ // // / /__", "\\___//____ \\\\___//____//_/ _\\_ / /_//____//_/ /_/ /_//_//_/ /_/ \\__\\_\\___/", " \\/ /____/ ".replace(K, "") + B, z]
- ];
- e.terminal.defaults = {
- prompt: "> ",
- history: !0,
- exit: !0,
- clear: !0,
- enabled: !0,
- historySize: 60,
- maskChar: "*",
- checkArity: !0,
- raw: !1,
- exceptionHandler: null,
- cancelableAjax: !0,
- processArguments: !0,
- linksNoReferrer: !1,
- processRPCResponse: null,
- Token: !0,
- convertLinks: !0,
- historyState: !1,
- echoCommand: !0,
- scrollOnEcho: !0,
- login: null,
- outputLimit: -1,
- formatters: [],
- onAjaxError: null,
- onRPCError: null,
- completion: !1,
- historyFilter: null,
- onInit: e.noop,
- onClear: e.noop,
- onBlur: e.noop,
- onFocus: e.noop,
- onTerminalChange: e.noop,
- onExit: e.noop,
- keypress: e.noop,
- keydown: e.noop,
- strings: {
- wrongPasswordTryAgain: "Wrong password try again!",
- wrongPassword: "Wrong password!",
- ajaxAbortError: "Error while aborting ajax call!",
- wrongArity: "Wrong number of arguments. Function '%s' expects %s got %s!",
- commandNotFound: "Command '%s' Not Found!",
- oneRPCWithIgnore: "You can use only one rpc with ignoreSystemDescribe",
- oneInterpreterFunction: "You can't use more than one function (rpcwith ignoreSystemDescribe counts as one)",
- loginFunctionMissing: "You didn't specify a login function",
- noTokenError: "Access denied (no token)",
- serverResponse: "Server responded",
- wrongGreetings: "Wrong value of greetings parameter",
- notWhileLogin: "You can't call `%s' function while in login",
- loginIsNotAFunction: "Authenticate must be a function",
- canExitError: "You can't exit from main interpreter",
- invalidCompletion: "Invalid completion",
- invalidSelector: 'Sorry, but terminal said that "%s" is not valid selector!',
- invalidTerminalId: "Invalid Terminal ID",
- login: "login",
- password: "password",
- recursiveCall: "Recursive call detected, skip"
- }
- };
- var Y, J = [],
- V = new c,
- G = [],
- Q = !1,
- Z = !0,
- ee = !0;
- e.fn.terminal = function(n, r) {
- function i(t) {
- return e.isFunction(Te.processArguments) ? p(t, Te.processArguments) : Te.processArguments ? e.terminal.parse_command(t) : e.terminal.split_command(t)
- }
- function o(t) {
- "string" == typeof t ? se.echo(t) : t instanceof Array ? se.echo(e.map(t, function(t) {
- return e.json_stringify(t)
- }).join(" ")) : "object" == typeof t ? se.echo(e.json_stringify(t)) : se.echo(t)
- }
- function a(t) {
- var n = /(.*):([0-9]+):([0-9]+)$/,
- r = t.match(n);
- r && (se.pause(), e.get(r[1], function(t) {
- var n = location.href.replace(/[^\/]+$/, ""),
- i = r[1].replace(n, "");
- se.echo("[[b;white;]" + i + "]");
- var o = t.split("\n"),
- a = +r[2] - 1;
- se.echo(o.slice(a - 2, a + 3).map(function(t, n) {
- return 2 == n && (t = "[[;#f00;]" + e.terminal.escape_brackets(t) + "]"), "[" + (a + n) + "]: " + t
- }).join("\n")).resume()
- }, "text"))
- }
- function s(t) {
- if (e.isFunction(Te.onRPCError)) Te.onRPCError.call(se, t);
- else if (se.error("[RPC] " + t.message), t.error && t.error.message) {
- t = t.error;
- var n = "\t" + t.message;
- t.file && (n += ' in file "' + t.file.replace(/.*\//, "") + '"'), t.at && (n += " at line " + t.at), se.error(n)
- }
- }
- function u(t, n) {
- var r = function(n, r) {
- se.pause(), e.jrpc(t, n, r, function(t) {
- t.error ? s(t.error) : e.isFunction(Te.processRPCResponse) ? Te.processRPCResponse.call(se, t.result, se) : o(t.result), se.resume()
- }, f)
- };
- return function(e, t) {
- if ("" !== e) {
- try {
- e = i(e)
- } catch (o) {
- return void t.error(o.toString())
- }
- if (n && "help" !== e.name) {
- var a = t.token();
- a ? r(e.name, [a].concat(e.args)) : t.error("[AUTH] " + Ce.noTokenError)
- } else r(e.name, e.args)
- }
- }
- }
- function c(n, r, o, a) {
- return function(s, u) {
- if ("" !== s) {
- var l;
- try {
- l = i(s)
- } catch (f) {
- return void se.error(f.toString())
- }
- var p = n[l.name],
- h = e.type(p);
- if ("function" === h) {
- if (!r || p.length === l.args.length) return p.apply(se, l.args);
- se.error("[Arity] " + sprintf(Ce.wrongArity, l.name, p.length, l.args.length))
- } else if ("object" === h || "string" === h) {
- var d = [];
- "object" === h && (d = Object.keys(p), p = c(p, r, o)), u.push(p, {
- prompt: l.name + "> ",
- name: l.name,
- completion: "object" === h ? d : t
- })
- } else e.isFunction(a) ? a(s, se) : e.isFunction(Te.onCommandNotFound) ? Te.onCommandNotFound(s, se) : u.error(sprintf(Ce.commandNotFound, l.name))
- }
- }
- }
- function f(t, n, r) {
- se.resume(), e.isFunction(Te.onAjaxError) ? Te.onAjaxError.call(se, t, n, r) : "abort" !== n && se.error("[AJAX] " + n + " - " + Ce.serverResponse + ": \n" + e.terminal.escape_brackets(t.responseText))
- }
- function h(t, n, r) {
- e.jrpc(t, "system.describe", [], function(i) {
- if (i.procs) {
- var a = {};
- e.each(i.procs, function(r, i) {
- a[i.name] = function() {
- var r = n && "help" != i.name,
- a = Array.prototype.slice.call(arguments),
- u = a.length + (r ? 1 : 0);
- if (Te.checkArity && i.params && i.params.length !== u) se.error("[Arity] " + sprintf(Ce.wrongArity, i.name, i.params.length, u));
- else {
- if (se.pause(), r) {
- var c = se.token(!0);
- c ? a = [c].concat(a) : se.error("[AUTH] " + Ce.noTokenError)
- }
- e.jrpc(t, i.name, a, function(t) {
- t.error ? s(t.error) : e.isFunction(Te.processRPCResponse) ? Te.processRPCResponse.call(se, t.result, se) : o(t.result), se.resume()
- }, f)
- }
- }
- }), a.help = a.help || function(t) {
- if ("undefined" == typeof t) se.echo("Available commands: " + i.procs.map(function(e) {
- return e.name
- }).join(", ") + ", help");
- else {
- var n = !1;
- if (e.each(i.procs, function(e, r) {
- if (r.name == t) {
- n = !0;
- var i = "";
- return i += "[[bu;#fff;]" + r.name + "]", r.params && (i += " " + r.params.join(" ")), r.help && (i += "\n" + r.help), se.echo(i), !1
- }
- }), !n)
- if ("help" == t) se.echo("[[bu;#fff;]help] [method]\ndisplay help for the method or list of methods if not specified");
- else {
- var r = "Method `" + t.toString() + "' not found ";
- se.error(r)
- }
- }
- }, r(a)
- } else r(null)
- }, function() {
- r(null)
- })
- }
- function y(t, n, r) {
- r = r || e.noop;
- var i, o, a = e.type(t),
- s = {},
- l = 0;
- if ("array" === a) i = {},
- function f(t, r) {
- if (t.length) {
- var a = t[0],
- s = t.slice(1),
- c = e.type(a);
- "string" === c ? (l++, se.pause(), Te.ignoreSystemDescribe ? (1 === l ? o = u(a, n) : se.error(Ce.oneRPCWithIgnore), f(s, r)) : h(a, n, function(t) {
- t && e.extend(i, t), se.resume(), f(s, r)
- })) : "function" === c ? (o ? se.error(Ce.oneInterpreterFunction) : o = a, f(s, r)) : "object" === c && (e.extend(i, a), f(s, r))
- } else r()
- }(t, function() {
- r({
- interpreter: c(i, !1, n, o),
- completion: Object.keys(i)
- })
- });
- else if ("string" === a) Te.ignoreSystemDescribe ? (i = {
- interpreter: u(t, n)
- }, e.isArray(Te.completion) && (i.completion = Te.completion), r(i)) : (se.pause(), h(t, n, function(e) {
- e ? (s.interpreter = c(e, !1, n), s.completion = Object.keys(e)) : s.interpreter = u(t, n), r(s), se.resume()
- }));
- else if ("object" === a) r({
- interpreter: c(t, Te.checkArity),
- completion: Object.keys(t)
- });
- else {
- if ("undefined" === a) t = e.noop;
- else if ("function" !== a) throw a + " is invalid interpreter value";
- r({
- interpreter: t,
- completion: Te.completion
- })
- }
- }
- function w(t, n) {
- var r = "boolean" === e.type(n) ? "login" : n;
- return function(n, i, o, a) {
- se.pause(), e.jrpc(t, r, [n, i], function(e) {
- o(!e.error && e.result ? e.result : null), se.resume()
- }, f)
- }
- }
- function x(e) {
- return "string" == typeof e ? e : "string" == typeof e.fileName ? e.fileName + ": " + e.message : e.message
- }
- function _(t, n) {
- e.isFunction(Te.exceptionHandler) ? Te.exceptionHandler.call(se, t) : se.exception(t, n)
- }
- function k() {
- var e;
- e = ue.prop ? ue.prop("scrollHeight") : ue.attr("scrollHeight"), ue.scrollTop(e)
- }
- function T(t, n) {
- try {
- if (e.isFunction(n)) n(function() {});
- else if ("string" != typeof n) {
- var r = t + " must be string or function";
- throw r
- }
- } catch (i) {
- return _(i, t.toUpperCase()), !1
- }
- return !0
- }
- function C(t, n) {
- Te.convertLinks && (t = t.replace(O, "[[!;;]$1]").replace(R, "[[!;;]$1]"));
- var r, i, o = e.terminal.defaults.formatters;
- if (!n.raw) {
- for (r = 0; r < o.length; ++r) try {
- if ("function" == typeof o[r]) {
- var a = o[r](t);
- "string" == typeof a && (t = a)
- }
- } catch (s) {
- alert("formatting error at formatters[" + r + "]\n" + (s.stack ? s.stack : s))
- }
- t = e.terminal.encode(t)
- }
- if (re.push(ie), !n.raw && (t.length > fe || t.match(/\n/))) {
- var u = n.keepWords,
- c = e.terminal.split_equal(t, fe, u);
- for (r = 0, i = c.length; r < i; ++r) "" === c[r] || "\r" === c[r] ? re.push("<span></span>") : n.raw ? re.push(c[r]) : re.push(e.terminal.format(c[r], {
- linksNoReferrer: Te.linksNoReferrer
- }))
- } else n.raw || (t = e.terminal.format(t, {
- linksNoReferrer: Te.linksNoReferrer
- })), re.push(t);
- re.push(n.finalize)
- }
- function E(t, n) {
- try {
- var r = e.extend({
- exec: !0,
- raw: !1,
- finalize: e.noop
- }, n || {}),
- i = "function" === e.type(t) ? t() : t;
- i = "string" === e.type(i) ? i : String(i), "" !== i && (r.exec ? (i = e.map(i.split($), function(t) {
- return t.match($) && !e.terminal.is_formatting(t) ? (t = t.replace(/^\[\[|\]\]$/g, ""), ce && ce.command == t ? se.error(Ce.recursiveCall) : e.terminal.extended_command(se, t), "") : t
- }).join(""), "" !== i && C(i, r)) : C(i, r))
- } catch (o) {
- re = [], alert("[Internal Exception(process_line)]:" + x(o) + "\n" + o.stack)
- }
- }
- function j() {
- qe.resize(fe);
- var t, n = le.empty().detach();
- if (Te.outputLimit >= 0) {
- var r = 0 === Te.outputLimit ? se.rows() : Te.outputLimit;
- t = ve.slice(ve.length - r - 1)
- } else t = ve;
- try {
- re = [], e.each(t, function(e, t) {
- E.apply(null, t)
- }), qe.before(n), se.flush()
- } catch (i) {
- alert("Exception in redraw\n" + i.stack)
- }
- }
- function A() {
- if (Te.greetings === t) se.echo(se.signature);
- else if (Te.greetings) {
- var e = typeof Te.greetings;
- "string" === e ? se.echo(Te.greetings) : "function" === e ? Te.greetings.call(se, se.echo) : se.error(Ce.wrongGreetings)
- }
- }
- function N(t) {
- var n = qe.prompt(),
- r = qe.mask();
- switch (typeof r) {
- case "string":
- t = t.replace(/./g, r);
- break;
- case "boolean":
- t = r ? t.replace(/./g, Te.maskChar) : e.terminal.escape_formatting(t)
- }
- var i = {
- finalize: function(e) {
- e.addClass("command")
- }
- };
- e.isFunction(n) ? n(function(e) {
- se.echo(e + t, i)
- }) : se.echo(n + t, i)
- }
- function D(e) {
- var t = V.get()[e[0]];
- if (!t) throw new Error(Ce.invalidTerminalId);
- var n = e[1];
- if (G[n]) t.import_view(G[n]);
- else {
- Q = !1;
- var r = e[2];
- r && t.exec(r).then(function() {
- Q = !0, G[n] = t.export_view()
- })
- }
- }
- function F() {
- Q && (Z = !1, location.hash = "#" + e.json_stringify(Y), setTimeout(function() {
- Z = !0
- }, 100))
- }
- function q(n, r, i) {
- function a() {
- i || (Q = !0, Te.historyState && se.save_state(n, !1), Q = c), u.resolve(), e.isFunction(Te.onAfterCommand) && Te.onAfterCommand(se, n)
- }
- ne = n, oe && (oe = !1, (Te.historyState || Te.execHash && i) && (G.length ? se.save_state(null) : se.save_state()));
- try {
- if (e.isFunction(Te.onBeforeCommand) && Te.onBeforeCommand(se, n) === !1) return;
- i || (ce = e.terminal.split_command(n)), B() || i && (e.isFunction(Te.historyFilter) && Te.historyFilter(n) || n.match(Te.historyFilter)) && qe.history().append(n);
- var s = Oe.top();
- !r && Te.echoCommand && N(n);
- var u = new e.Deferred,
- c = Q;
- if (n.match(/^\s*login\s*$/) && se.token(!0)) se.level() > 1 ? se.logout(!0) : se.logout(), a();
- else if (Te.exit && n.match(/^\s*exit\s*$/) && !xe) {
- var l = se.level();
- (1 == l && se.get_token() || l > 1) && (se.get_token(!0) && se.set_token(t, !0), se.pop()), a()
- } else if (Te.clear && n.match(/^\s*clear\s*$/) && !xe) se.clear(), a();
- else {
- var f = ve.length - 1,
- p = s.interpreter.call(se, n, se);
- if (p !== t) return se.pause(!0), e.when(p).then(function(e) {
- e && f === ve.length - 1 && o(e), a(), se.resume()
- });
- if (Ee) {
- ae.push(function() {
- a()
- })
- } else a()
- }
- return u.promise()
- } catch (h) {
- throw _(h, "USER"), se.resume(), h
- }
- }
- function H() {
- if (e.isFunction(Te.onBeforeLogout)) try {
- if (Te.onBeforeLogout(se) === !1) return
- } catch (t) {
- _(t, "onBeforeLogout")
- }
- if (I(), e.isFunction(Te.onAfterLogout)) try {
- Te.onAfterLogout(se)
- } catch (t) {
- _(t, "onAfterlogout")
- }
- se.login(Te.login, !0, W)
- }
- function I() {
- var t = se.prefix_name(!0) + "_";
- e.Storage.remove(t + "token"), e.Storage.remove(t + "login")
- }
- function P(t) {
- var n = se.prefix_name() + "_interpreters",
- r = e.Storage.get(n);
- r = r ? e.parseJSON(r) : [], e.inArray(t, r) == -1 && (r.push(t), e.Storage.set(n, e.json_stringify(r)))
- }
- function M(t) {
- var n = Oe.top(),
- r = se.prefix_name(!0);
- B() || P(r), qe.name(r), e.isFunction(n.prompt) ? qe.prompt(function(e) {
- n.prompt(e, se)
- }) : qe.prompt(n.prompt), qe.set(""), !t && e.isFunction(n.onStart) && n.onStart(se)
- }
- function W() {
- function t() {
- if (Z && Te.execHash) try {
- if (location.hash) {
- var t = location.hash.replace(/^#/, "");
- Y = e.parseJSON(decodeURIComponent(t))
- } else Y = [];
- Y.length ? D(Y[Y.length - 1]) : G[0] && se.import_view(G[0])
- } catch (n) {
- _(n, "TERMINAL")
- }
- }
- M(), A();
- var n = !1;
- if (e.isFunction(Te.onInit)) {
- _e = function() {
- n = !0
- };
- try {
- Te.onInit(se)
- } catch (r) {
- _(r, "OnInit")
- } finally {
- _e = e.noop, n || se.resume()
- }
- }
- ee && (ee = !1, e.fn.hashchange ? e(window).hashchange(t) : e(window).bind("hashchange", t))
- }
- function z(t, n, r) {
- Te.clear && e.inArray("clear", r) == -1 && r.push("clear"), Te.exit && e.inArray("exit", r) == -1 && r.push("exit");
- var i = qe.get().substring(0, qe.position());
- if (i === t) {
- for (var o = new RegExp("^" + e.terminal.escape_regex(n)), a = [], s = r.length; s--;) o.test(r[s]) && a.push(r[s]);
- if (1 === a.length) se.insert(a[0].replace(o, ""));
- else if (a.length > 1)
- if (me >= 2) {
- N(t);
- var u = a.reverse().join("\t");
- se.echo(e.terminal.escape_brackets(u), {
- keepWords: !0
- }), me = 0
- } else {
- var c, l = !1;
- e: for (c = n.length; c < a[0].length; ++c) {
- for (s = 1; s < a.length; ++s)
- if (a[0].charAt(c) !== a[s].charAt(c)) break e;
- l = !0
- }
- l && se.insert(a[0].slice(0, c).replace(o, ""))
- }
- }
- }
- function B() {
- return xe || qe.mask() !== !1
- }
- function K(n) {
- var r, i, o, a = Oe.top();
- if (!se.paused() && se.enabled()) {
- if (e.isFunction(a.keydown)) {
- if (r = a.keydown(n, se), r !== t) return r
- } else if (e.isFunction(Te.keydown) && (r = Te.keydown(n, se), r !== t)) return r;
- if (o = Te.completion && "boolean" != e.type(Te.completion) && a.completion === t ? Te.completion : a.completion, "settings" == o && (o = Te.completion), se.oneTime(10, function() {
- Ae()
- }), 9 !== n.which && (me = 0), 68 === n.which && n.ctrlKey) return xe || ("" === qe.get() ? Oe.size() > 1 || Te.login !== t ? se.pop("") : (se.resume(), se.echo("")) : se.set_command("")), !1;
- if (76 === n.which && n.ctrlKey) se.clear();
- else {
- if (o && 9 === n.which) {
- ++me;
- var s, u = qe.position(),
- c = qe.get().substring(0, u),
- l = c.split(" ");
- if (1 == Ce.length) s = l[0];
- else
- for (s = l[l.length - 1], i = l.length - 1; i > 0 && "\\" == l[i - 1][l[i - 1].length - 1]; i--) s = l[i - 1] + " " + s;
- switch (e.type(o)) {
- case "function":
- o(se, s, function(e) {
- z(c, s, e)
- });
- break;
- case "array":
- z(c, s, o);
- break;
- default:
- throw new Error(Ce.invalidCompletion)
- }
- return !1
- }
- if ((118 === n.which || 86 === n.which) && (n.ctrlKey || n.metaKey)) return void se.oneTime(1, function() {
- k()
- });
- if (9 === n.which && n.ctrlKey) {
- if (V.length() > 1) return se.focus(!1), !1
- } else 34 === n.which ? se.scroll(se.height()) : 33 === n.which ? se.scroll(-se.height()) : se.attr({
- scrollTop: se.attr("scrollHeight")
- })
- }
- } else if (68 === n.which && n.ctrlKey) {
- if (J.length) {
- for (i = J.length; i--;) {
- var f = J[i];
- if (4 !== f.readyState) try {
- f.abort()
- } catch (p) {
- se.error(Ce.ajaxAbortError)
- }
- }
- J = [], se.resume()
- }
- return !1
- }
- }
- function U() {
- He && se.focus()
- }
- function te() {
- He = Se, se.disable()
- }
- var ne, re = [],
- ie = 1,
- oe = !0,
- ae = [],
- se = this;
- if (this.length > 1) return this.each(function() {
- e.fn.terminal.call(e(this), n, e.extend({
- name: se.selector
- }, r))
- });
- if (se.data("terminal")) return se.data("terminal");
- if (0 === se.length) throw sprintf(e.terminal.defaults.strings.invalidSelector, se.selector);
- var ue, ce, le, fe, pe, he, de, ge, me = 0,
- ve = [],
- ye = V.length(),
- be = new l,
- we = e.Deferred(),
- xe = !1,
- _e = e.noop,
- ke = [],
- Te = e.extend({}, e.terminal.defaults, {
- name: se.selector
- }, r || {}),
- Ce = e.terminal.defaults.strings,
- Se = Te.enabled,
- Ee = !1,
- je = !0;
- e.extend(se, e.omap({
- id: function() {
- return ye
- },
- clear: function() {
- le.html(""), ve = [];
- try {
- Te.onClear(se)
- } catch (e) {
- _(e, "onClear")
- }
- return se.attr({
- scrollTop: 0
- }), se
- },
- export_view: function() {
- var t = {};
- if (e.isFunction(Te.onExport)) try {
- t = Te.onExport()
- } catch (n) {
- _(n, "onExport")
- }
- return e.extend({}, {
- focus: Se,
- mask: qe.mask(),
- prompt: se.get_prompt(),
- command: se.get_command(),
- position: qe.position(),
- lines: b(ve),
- interpreters: Oe.clone()
- }, t)
- },
- import_view: function(t) {
- if (xe) throw new Error(sprintf(Ce.notWhileLogin, "import_view"));
- if (e.isFunction(Te.onImport)) try {
- Te.onImport(t)
- } catch (n) {
- _(n, "onImport")
- }
- return we.then(function() {
- se.set_prompt(t.prompt), se.set_command(t.command), qe.position(t.position), qe.mask(t.mask), t.focus && se.focus(), ve = b(t.lines), Oe = t.interpreters, j()
- }), se
- },
- save_state: function(n, r, i) {
- if ("undefined" != typeof i ? G[i] = se.export_view() : G.push(se.export_view()), e.isArray(Y) || (Y = []), n !== t && !r) {
- var o = [ye, G.length - 1, n];
- Y.push(o), F()
- }
- },
- exec: function(t, n, r) {
- function i() {
- e.isArray(t) ? ! function r() {
- var e = t.shift();
- e ? se.exec(e, n).then(r) : o.resolve()
- }() : Ee ? ke.push([t, n, o]) : q(t, n, !0).then(function() {
- o.resolve(se)
- })
- }
- var o = r || new e.Deferred;
- return "resolved" != we.state() ? we.then(i) : i(), o.promise()
- },
- autologin: function(e, t, n) {
- return se.trigger("terminal.autologin", [e, t, n]), se
- },
- login: function(t, n, r, i) {
- function o(t, o, s, u) {
- if (o) {
- for (; se.level() > a;) se.pop();
- Te.history && qe.history().enable();
- var c = se.prefix_name(!0) + "_";
- e.Storage.set(c + "token", o), e.Storage.set(c + "login", t), xe = !1, e.isFunction(r) && r()
- } else n ? (s || se.error(Ce.wrongPasswordTryAgain), se.pop().set_mask(!1)) : (xe = !1, s || se.error(Ce.wrongPassword), se.pop().pop()), e.isFunction(i) && i();
- se.off("terminal.autologin")
- }
- if (be.push([].slice.call(arguments)), xe) throw new Error(sprintf(Ce.notWhileLogin, "login"));
- if (!e.isFunction(t)) throw new Error(Ce.loginIsNotAFunction);
- if (xe = !0, se.token() && 1 == se.level() && !je) xe = !1, se.logout(!0);
- else if (se.token(!0) && se.login_name(!0)) return xe = !1, e.isFunction(r) && r(), se;
- Te.history && qe.history().disable();
- var a = se.level();
- return se.on("terminal.autologin", function(e, t, n, r) {
- o(t, n, r)
- }), se.push(function(e) {
- se.set_mask(Te.maskChar).push(function(n) {
- try {
- t.call(se, e, n, function(t, n) {
- o(e, t, n)
- })
- } catch (r) {
- _(r, "AUTH")
- }
- }, {
- prompt: Ce.password + ": ",
- name: "password"
- })
- }, {
- prompt: Ce.login + ": ",
- name: "login"
- }), se
- },
- settings: function() {
- return Te
- },
- commands: function() {
- return Oe.top().interpreter
- },
- setInterpreter: function() {
- return window.console && console.warn, se.set_interpreter.apply(se, arguments)
- },
- set_interpreter: function(t, n) {
- function r() {
- se.pause(), y(t, !!n, function(t) {
- se.resume();
- var n = Oe.top();
- e.extend(n, t), M(!0)
- })
- }
- return "string" == e.type(t) && n ? se.login(w(t, n), !0, r) : r(), se
- },
- greetings: function() {
- return A(), se
- },
- paused: function() {
- return Ee
- },
- pause: function(t) {
- return _e(), !Ee && qe && we.then(function() {
- Ee = !0, qe.disable(), t || qe.hidden(), e.isFunction(Te.onPause) && Te.onPause()
- }), se
- },
- resume: function() {
- function t() {
- Ee = !1, V.front() == se && qe.enable(), qe.visible();
- var t = ke;
- ke = [];
- for (var n = 0; n < t.length; ++n) se.exec.apply(se, t[n]);
- se.trigger("resume");
- var r = ae.shift();
- r && r(), k(), e.isFunction(Te.onResume) && Te.onResume()
- }
- return Ee && qe && ("resolved" != we.state() ? we.then(t) : t()), se
- },
- cols: function() {
- return Te.numChars ? Te.numChars : d(se)
- },
- rows: function() {
- return Te.numRows ? Te.numRows : g(se)
- },
- history: function() {
- return qe.history()
- },
- history_state: function(e) {
- return e ? se.oneTime(1, function() {
- Te.historyState = !0, G.length ? V.length() > 1 && se.save_state(null) : se.save_state()
- }) : Te.historyState = !1, se
- },
- clear_history_state: function() {
- Y = [], G = []
- },
- next: function() {
- if (1 === V.length()) return se;
- se.offset().top, se.height(), se.scrollTop();
- V.front().disable();
- var t = V.rotate().enable(),
- n = t.offset().top - 50;
- e("html,body").animate({
- scrollTop: n
- }, 500);
- try {
- Te.onTerminalChange(t)
- } catch (r) {
- _(r, "onTerminalChange")
- }
- return t
- },
- focus: function(e, t) {
- return we.then(function() {
- if (1 === V.length())
- if (e === !1) try {
- (!t && Te.onBlur(se) !== !1 || t) && se.disable()
- } catch (n) {
- _(n, "onBlur")
- } else try {
- (!t && Te.onFocus(se) !== !1 || t) && se.enable()
- } catch (n) {
- _(n, "onFocus")
- } else if (e === !1) se.next();
- else {
- var r = V.front();
- if (r != se && (r.disable(), !t)) try {
- Te.onTerminalChange(se)
- } catch (n) {
- _(n, "onTerminalChange")
- }
- V.set(se), se.enable()
- }
- }), se
- },
- freeze: function(e) {
- we.then(function() {
- e ? (se.disable(), ge = !0) : (ge = !1, se.enable())
- })
- },
- frozen: function() {
- return ge
- },
- enable: function() {
- return Se || ge || (fe === t && se.resize(), we.then(function() {
- qe.enable(), Se = !0
- })), se
- },
- disable: function() {
- return Se && !ge && we.then(function() {
- Se = !1, qe.disable()
- }), se
- },
- enabled: function() {
- return Se
- },
- signature: function() {
- var e = se.cols(),
- t = e < 15 ? null : e < 35 ? 0 : e < 55 ? 1 : e < 64 ? 2 : e < 75 ? 3 : 4;
- return null !== t ? X[t].join("\n") + "\n" : ""
- },
- version: function() {
- return e.terminal.version
- },
- cmd: function() {
- return qe
- },
- get_command: function() {
- return qe.get()
- },
- set_command: function(e) {
- return we.then(function() {
- qe.set(e)
- }), se
- },
- insert: function(e) {
- if ("string" == typeof e) return we.then(function() {
- qe.insert(e)
- }), se;
- throw "insert function argument is not a string"
- },
- set_prompt: function(t) {
- return we.then(function() {
- T("prompt", t) && (e.isFunction(t) ? qe.prompt(function(e) {
- t(e, se)
- }) : qe.prompt(t), Oe.top().prompt = t)
- }), se
- },
- get_prompt: function() {
- return Oe.top().prompt
- },
- set_mask: function(e) {
- return we.then(function() {
- qe.mask(e === !0 ? Te.maskChar : e)
- }), se
- },
- get_output: function(t) {
- return t ? ve : e.map(ve, function(t) {
- return e.isFunction(t[0]) ? t[0]() : t[0]
- }).join("\n")
- },
- resize: function(t, n) {
- if (se.is(":visible")) {
- t && n && (se.width(t), se.height(n)), t = se.width(), n = se.height();
- var r = se.cols(),
- i = se.rows();
- if (r !== fe || i !== pe) {
- fe = r, pe = i, j();
- var o = Oe.top();
- e.isFunction(o.resize) ? o.resize(se) : e.isFunction(Te.onResize) && Te.onResize(se), de = n, he = t, k()
- }
- } else se.stopTime("resize"), se.oneTime(500, "resize", function() {
- se.resize(t, n)
- });
- return se
- },
- flush: function() {
- try {
- var t;
- if (e.each(re, function(n, r) {
- if (r === ie) t = e("<div></div>");
- else if (e.isFunction(r)) {
- t.appendTo(le);
- try {
- r(t)
- } catch (i) {
- _(i, "USER:echo(finalize)")
- }
- } else e("<div/>").html(r).appendTo(t).width("100%")
- }), Te.outputLimit >= 0) {
- var n = 0 === Te.outputLimit ? se.rows() : Te.outputLimit,
- r = le.find("div div");
- if (r.length > n) {
- var i = r.length - n + 1,
- o = r.slice(0, i),
- a = o.parent();
- o.remove(), a.each(function() {
- var t = e(this);
- t.is(":empty") && t.remove()
- })
- }
- }
- pe = g(se), Ae(), Te.scrollOnEcho && k(), re = []
- } catch (s) {
- alert("[Flush] " + x(s) + "\n" + s.stack)
- }
- return se
- },
- update: function(e, t) {
- return we.then(function() {
- e < 0 && (e = ve.length + e), ve[e] ? (null === t ? ve.splice(e, 1) : ve[e][0] = t, j()) : se.error("Invalid line number " + e)
- }), se
- },
- last_index: function() {
- return ve.length - 1
- },
- echo: function(t, n) {
- return t = t || "", e.when(t).then(function(t) {
- try {
- var r = e.extend({
- flush: !0,
- raw: Te.raw,
- finalize: e.noop,
- keepWords: !1
- }, n || {});
- r.flush && (re = []), E(t, r), ve.push([t, e.extend(r, {
- exec: !1
- })]), r.flush && se.flush()
- } catch (i) {
- alert("[Terminal.echo] " + x(i) + "\n" + i.stack)
- }
- }), se
- },
- error: function(t, n) {
- var r = e.terminal.escape_brackets(t).replace(/\\$/, "\").replace(L, "]$1[[;;;error]");
- return se.echo("[[;;;error]" + r + "]", n)
- },
- exception: function(t, n) {
- var r = x(t);
- if (n && (r = "[" + n + "]: " + r), r && se.error(r, {
- finalize: function(e) {
- e.addClass("exception message")
- }
- }), "string" == typeof t.fileName && (se.pause(), e.get(t.fileName, function(e) {
- se.resume();
- var n = t.lineNumber - 1,
- r = e.split("\n")[n];
- r && se.error("[" + t.lineNumber + "]: " + r)
- })), t.stack) {
- var i = e.terminal.escape_brackets(t.stack);
- se.echo(i.split(/\n/g).map(function(e) {
- return "[[;;;error]" + e.replace(L, function(e) {
- return "]" + e + "[[;;;error]"
- }) + "]"
- }).join("\n"), {
- finalize: function(e) {
- e.addClass("exception stack-trace")
- }
- })
- }
- },
- scroll: function(e) {
- var t;
- return e = Math.round(e), ue.prop ? (e > ue.prop("scrollTop") && e > 0 && ue.prop("scrollTop", 0), t = ue.prop("scrollTop"), ue.scrollTop(t + e)) : (e > ue.attr("scrollTop") && e > 0 && ue.attr("scrollTop", 0), t = ue.attr("scrollTop"), ue.scrollTop(t + e)), se
- },
- logout: function(e) {
- if (xe) throw new Error(sprintf(Ce.notWhileLogin, "logout"));
- return we.then(function() {
- if (e) {
- var n = be.pop();
- se.set_token(t, !0), se.login.apply(se, n)
- } else
- for (; Oe.size() > 0 && !se.pop(););
- }), se
- },
- token: function(t) {
- return e.Storage.get(se.prefix_name(t) + "_token")
- },
- set_token: function(t, n) {
- var r = se.prefix_name(n) + "_token";
- return "undefined" == typeof t ? e.Storage.remove(r, t) : e.Storage.set(r, t), se
- },
- get_token: function(t) {
- return e.Storage.get(se.prefix_name(t) + "_token")
- },
- login_name: function(t) {
- return e.Storage.get(se.prefix_name(t) + "_login")
- },
- name: function() {
- return Oe.top().name
- },
- prefix_name: function(e) {
- var t = (Te.name ? Te.name + "_" : "") + ye;
- if (e && Oe.size() > 1) {
- var n = Oe.map(function(e) {
- return e.name
- }).slice(1).join("_");
- n && (t += "_" + n)
- }
- return t
- },
- read: function(t, n) {
- var r = new e.Deferred;
- return se.push(function(t) {
- se.pop(), e.isFunction(n) && n(t), r.resolve(t)
- }, {
- prompt: t
- }), r.promise()
- },
- push: function(n, r) {
- return we.then(function() {
- r = r || {};
- var i = {
- infiniteLogin: !1
- },
- o = e.extend({}, i, r);
- !o.name && ce && (o.name = ce.name), o.prompt === t && (o.prompt = (o.name || ">") + " ");
- var a = Oe.top();
- a && (a.mask = qe.mask());
- var s = Ee;
- y(n, !!r.login, function(t) {
- if (Oe.push(e.extend({}, t, o)), e.isArray(t.completion) && o.completion === !0 ? Oe.top().completion = t.completion : t.completion || o.completion !== !0 || (Oe.top().completion = !1), o.login) {
- var r = e.type(o.login);
- "function" == r ? se.login(o.login, o.infiniteLogin, M, o.infiniteLogin ? e.noop : se.pop) : ("string" == e.type(n) && "string" == r || "boolean" == r) && se.login(w(n, o.login), o.infiniteLogin, M, o.infiniteLogin ? e.noop : se.pop)
- } else M();
- s || se.resume()
- })
- }), se
- },
- pop: function(n) {
- n !== t && N(n);
- se.token(!0);
- if (1 == Oe.size()) {
- if (Te.login) {
- if (H(), e.isFunction(Te.onExit)) try {
- Te.onExit(se)
- } catch (r) {
- _(r, "onExit")
- }
- return !0
- }
- se.error(Ce.canExitError)
- } else {
- se.token(!0) && I();
- var i = Oe.pop();
- if (M(), xe && se.get_prompt() != Ce.login + ": " && (xe = !1), e.isFunction(i.onExit)) try {
- i.onExit(se)
- } catch (r) {
- _(r, "onExit")
- }
- se.set_mask(Oe.top().mask)
- }
- return se
- },
- option: function(t, n) {
- if ("undefined" == typeof n) {
- if ("string" == typeof t) return Te[t];
- "object" == typeof t && e.each(t, function(e, t) {
- Te[e] = t
- })
- } else Te[t] = n;
- return se
- },
- level: function() {
- return Oe.size()
- },
- reset: function() {
- return we.then(function() {
- for (se.clear(); Oe.size() > 1;) Oe.pop();
- W()
- }), se
- },
- purge: function() {
- return we.then(function() {
- var t = se.prefix_name() + "_",
- n = e.Storage.get(t + "interpreters");
- e.each(e.parseJSON(n), function(t, n) {
- e.Storage.remove(n + "_commands"), e.Storage.remove(n + "_token"), e.Storage.remove(n + "_login")
- }), qe.purge(), e.Storage.remove(t + "interpreters")
- }), se
- },
- destroy: function() {
- return we.then(function() {
- qe.destroy().remove(), le.remove(), e(document).unbind(".terminal"), e(window).unbind(".terminal"), se.unbind("click mousewheel mousedown mouseup"), se.removeData("terminal").removeClass("terminal"), Te.width && se.css("width", ""), Te.height && se.css("height", ""), e(window).off("blur", te).off("focus", U), V.remove(ye)
- }), se
- }
- }, function(e, t) {
- return function() {
- try {
- return t.apply(se, [].slice.apply(arguments))
- } catch (n) {
- throw "exec" !== e && "resume" !== e && _(n, "TERMINAL"), n
- }
- }
- }));
- var Ae = function() {
- var e = v(se);
- return function() {
- e !== v(se) && (se.resize(), e = v(se))
- }
- }();
- Te.width && se.width(Te.width), Te.height && se.height(Te.height);
- var Ne = navigator.userAgent.toLowerCase();
- if (ue = Ne.match(/(webkit)[ \/]([\w.]+)/) || "body" != se[0].tagName.toLowerCase() ? se : e("html"), e(document).bind("ajaxSend.terminal", function(e, t, n) {
- J.push(t)
- }), le = e("<div>").addClass("terminal-output").appendTo(se), se.addClass("terminal"), Te.login && e.isFunction(Te.onBeforeLogin)) try {
- Te.onBeforeLogin(se) === !1 && (je = !1)
- } catch (De) {
- throw _(De, "onBeforeLogin"), De
- }
- var Fe;
- Te.login;
- if ("string" == typeof n) Fe = n;
- else if (n instanceof Array)
- for (var Le = 0, Re = n.length; Le < Re; ++Le)
- if ("string" == typeof n[Le]) {
- Fe = n[Le];
- break
- }!Fe || "string" != typeof Te.login && Te.login !== !0 || (Te.login = w(Fe, Te.login)), V.append(se);
- var Oe, qe, He;
- return y(n, !!Te.login, function(n) {
- function r(t) {
- var n = V.get()[t[0]];
- if (n && ye == n.id() && t[2]) try {
- if (Ee) {
- var r = e.Deferred();
- return ae.push(function() {
- return n.exec(t[2]).then(function(e, i) {
- n.save_state(t[2], !0, t[1]), r.resolve()
- })
- }), r.promise()
- }
- return n.exec(t[2]).then(function(e, r) {
- n.save_state(t[2], !0, t[1])
- })
- } catch (i) {
- var o = e.terminal.escape_brackets(command),
- a = "Error while exec with command " + o;
- n.error(a).exception(i)
- }
- }(Te.completion && "boolean" != typeof Te.completion || !Te.completion) && (n.completion = "settings"), Oe = new l(e.extend({
- name: Te.name,
- prompt: Te.prompt,
- keypress: Te.keypress,
- keydown: Te.keydown,
- resize: Te.onResize,
- greetings: Te.greetings,
- mousewheel: Te.mousewheel
- }, n)), qe = e("<div/>").appendTo(se).cmd({
- prompt: Te.prompt,
- history: Te.history,
- historyFilter: Te.historyFilter,
- historySize: Te.historySize,
- width: "100%",
- enabled: Se && !S,
- keydown: K,
- keypress: function(t) {
- var n = Oe.top();
- return e.isFunction(n.keypress) ? n.keypress(t, se) : e.isFunction(Te.keypress) ? Te.keypress(t, se) : void 0
- },
- onCommandChange: function(t) {
- if (e.isFunction(Te.onCommandChange)) try {
- Te.onCommandChange(t, se)
- } catch (n) {
- throw _(n, "onCommandChange"), n
- }
- k()
- },
- commands: q
- }), Se && se.is(":visible") && !S ? se.focus(t, !0) : se.disable(), se.oneTime(100, function() {
- function t(t) {
- var n = e(t.target);
- !n.closest(".terminal").length && se.enabled() && Te.onBlur(se) !== !1 && se.disable()
- }
- e(document).bind("click.terminal", t).bind("contextmenu.terminal", t)
- });
- var i = e(window);
- if (S || i.on("focus", U).on("blur", te), function() {
- var t = 0,
- n = !1;
- se.mousedown(function() {
- e(window).mousemove(function() {
- n = !0, t = 0, e(window).unbind("mousemove")
- })
- }).mouseup(function() {
- var r = n;
- n = !1, e(window).unbind("mousemove"), r || 1 != ++t || (t = 0, se.enabled() || ge || (se.focus(), qe.enable()))
- })
- }(), S && se.click(function() {
- se.enabled() || ge ? se.focus(!1) : (se.focus(), qe.enable())
- }), se.delegate(".exception a", "click", function(t) {
- var n = e(this).attr("href");
- n.match(/:[0-9]+$/) && (t.preventDefault(), a(n))
- }), navigator.platform.match(/linux/i) || se.mousedown(function(e) {
- if (2 == e.which) {
- var t = m();
- se.insert(t)
- }
- }), se.is(":visible") && (fe = se.cols(), qe.resize(fe), pe = g(se)), Te.login ? se.login(Te.login, !0, W) : W(), se.oneTime(100, function() {
- i.bind("resize.terminal", function() {
- if (se.is(":visible")) {
- var e = se.width(),
- t = se.height();
- de === t && he === e || se.resize()
- }
- })
- }), Te.execHash && location.hash ? setTimeout(function() {
- try {
- var t = location.hash.replace(/^#/, "");
- Y = e.parseJSON(decodeURIComponent(t));
- var n = 0;
- ! function o() {
- var e = Y[n++];
- e ? r(e).then(o) : Q = !0
- }()
- } catch (i) {}
- }) : Q = !0, e.event.special.mousewheel) {
- var o = !1;
- e(document).bind("keydown.terminal", function(e) {
- e.shiftKey && (o = !0)
- }).bind("keyup.terminal", function(e) {
- (e.shiftKey || 16 == e.which) && (o = !1)
- }), se.mousewheel(function(t, n) {
- if (!o) {
- var r = Oe.top();
- if (e.isFunction(r.mousewheel)) {
- var i = r.mousewheel(t, n, se);
- if (i === !1) return
- } else e.isFunction(Te.mousewheel) && Te.mousewheel(t, n, se);
- n > 0 ? se.scroll(-40) : se.scroll(40)
- }
- })
- }
- we.resolve()
- }), se.data("terminal", se), se
- }
- }(jQuery),
- function(e) {
- function t(t) {
- var n = t || window.event,
- r = [].slice.call(arguments, 1),
- i = 0,
- o = 0,
- a = 0;
- return t = e.event.fix(n), t.type = "mousewheel", n.wheelDelta && (i = n.wheelDelta / 120), n.detail && (i = -n.detail / 3), a = i, void 0 !== n.axis && n.axis === n.HORIZONTAL_AXIS && (a = 0, o = -1 * i), void 0 !== n.wheelDeltaY && (a = n.wheelDeltaY / 120), void 0 !== n.wheelDeltaX && (o = -1 * n.wheelDeltaX / 120), r.unshift(t, i, o, a), (e.event.dispatch || e.event.handle).apply(this, r)
- }
- var n = ["DOMMouseScroll", "mousewheel"];
- if (e.event.fixHooks)
- for (var r = n.length; r;) e.event.fixHooks[n[--r]] = e.event.mouseHooks;
- e.event.special.mousewheel = {
- setup: function() {
- if (this.addEventListener)
- for (var e = n.length; e;) this.addEventListener(n[--e], t, !1);
- else this.onmousewheel = t
- },
- teardown: function() {
- if (this.removeEventListener)
- for (var e = n.length; e;) this.removeEventListener(n[--e], t, !1);
- else this.onmousewheel = null
- }
- }, e.fn.extend({
- mousewheel: function(e) {
- return e ? this.bind("mousewheel", e) : this.trigger("mousewheel")
- },
- unmousewheel: function(e) {
- return this.unbind("mousewheel", e)
- }
- })
- }(jQuery);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement