@quantlab/handsontable
Version:
Spreadsheet-like data grid editor that provides copy/paste functionality compatible with Excel/Google Docs
935 lines (933 loc) • 133 kB
JavaScript
"use strict";
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
/*! jQuery v1.8.2 jquery.com | jquery.org/license */
(function (a, b) {
function G(a) {
var b = F[a] = {};return p.each(a.split(s), function (a, c) {
b[c] = !0;
}), b;
}function J(a, c, d) {
if (d === b && a.nodeType === 1) {
var e = "data-" + c.replace(I, "-$1").toLowerCase();d = a.getAttribute(e);if (typeof d == "string") {
try {
d = d === "true" ? !0 : d === "false" ? !1 : d === "null" ? null : +d + "" === d ? +d : H.test(d) ? p.parseJSON(d) : d;
} catch (f) {}p.data(a, c, d);
} else d = b;
}return d;
}function K(a) {
var b;for (b in a) {
if (b === "data" && p.isEmptyObject(a[b])) continue;if (b !== "toJSON") return !1;
}return !0;
}function ba() {
return !1;
}function bb() {
return !0;
}function bh(a) {
return !a || !a.parentNode || a.parentNode.nodeType === 11;
}function bi(a, b) {
do {
a = a[b];
} while (a && a.nodeType !== 1);return a;
}function bj(a, b, c) {
b = b || 0;if (p.isFunction(b)) return p.grep(a, function (a, d) {
var e = !!b.call(a, d, a);return e === c;
});if (b.nodeType) return p.grep(a, function (a, d) {
return a === b === c;
});if (typeof b == "string") {
var d = p.grep(a, function (a) {
return a.nodeType === 1;
});if (be.test(b)) return p.filter(b, d, !c);b = p.filter(b, d);
}return p.grep(a, function (a, d) {
return p.inArray(a, b) >= 0 === c;
});
}function bk(a) {
var b = bl.split("|"),
c = a.createDocumentFragment();if (c.createElement) while (b.length) {
c.createElement(b.pop());
}return c;
}function bC(a, b) {
return a.getElementsByTagName(b)[0] || a.appendChild(a.ownerDocument.createElement(b));
}function bD(a, b) {
if (b.nodeType !== 1 || !p.hasData(a)) return;var c,
d,
e,
f = p._data(a),
g = p._data(b, f),
h = f.events;if (h) {
delete g.handle, g.events = {};for (c in h) {
for (d = 0, e = h[c].length; d < e; d++) {
p.event.add(b, c, h[c][d]);
}
}
}g.data && (g.data = p.extend({}, g.data));
}function bE(a, b) {
var c;if (b.nodeType !== 1) return;b.clearAttributes && b.clearAttributes(), b.mergeAttributes && b.mergeAttributes(a), c = b.nodeName.toLowerCase(), c === "object" ? (b.parentNode && (b.outerHTML = a.outerHTML), p.support.html5Clone && a.innerHTML && !p.trim(b.innerHTML) && (b.innerHTML = a.innerHTML)) : c === "input" && bv.test(a.type) ? (b.defaultChecked = b.checked = a.checked, b.value !== a.value && (b.value = a.value)) : c === "option" ? b.selected = a.defaultSelected : c === "input" || c === "textarea" ? b.defaultValue = a.defaultValue : c === "script" && b.text !== a.text && (b.text = a.text), b.removeAttribute(p.expando);
}function bF(a) {
return typeof a.getElementsByTagName != "undefined" ? a.getElementsByTagName("*") : typeof a.querySelectorAll != "undefined" ? a.querySelectorAll("*") : [];
}function bG(a) {
bv.test(a.type) && (a.defaultChecked = a.checked);
}function bY(a, b) {
if (b in a) return b;var c = b.charAt(0).toUpperCase() + b.slice(1),
d = b,
e = bW.length;while (e--) {
b = bW[e] + c;if (b in a) return b;
}return d;
}function bZ(a, b) {
return a = b || a, p.css(a, "display") === "none" || !p.contains(a.ownerDocument, a);
}function b$(a, b) {
var c,
d,
e = [],
f = 0,
g = a.length;for (; f < g; f++) {
c = a[f];if (!c.style) continue;e[f] = p._data(c, "olddisplay"), b ? (!e[f] && c.style.display === "none" && (c.style.display = ""), c.style.display === "" && bZ(c) && (e[f] = p._data(c, "olddisplay", cc(c.nodeName)))) : (d = bH(c, "display"), !e[f] && d !== "none" && p._data(c, "olddisplay", d));
}for (f = 0; f < g; f++) {
c = a[f];if (!c.style) continue;if (!b || c.style.display === "none" || c.style.display === "") c.style.display = b ? e[f] || "" : "none";
}return a;
}function b_(a, b, c) {
var d = bP.exec(b);return d ? Math.max(0, d[1] - (c || 0)) + (d[2] || "px") : b;
}function ca(a, b, c, d) {
var e = c === (d ? "border" : "content") ? 4 : b === "width" ? 1 : 0,
f = 0;for (; e < 4; e += 2) {
c === "margin" && (f += p.css(a, c + bV[e], !0)), d ? (c === "content" && (f -= parseFloat(bH(a, "padding" + bV[e])) || 0), c !== "margin" && (f -= parseFloat(bH(a, "border" + bV[e] + "Width")) || 0)) : (f += parseFloat(bH(a, "padding" + bV[e])) || 0, c !== "padding" && (f += parseFloat(bH(a, "border" + bV[e] + "Width")) || 0));
}return f;
}function cb(a, b, c) {
var d = b === "width" ? a.offsetWidth : a.offsetHeight,
e = !0,
f = p.support.boxSizing && p.css(a, "boxSizing") === "border-box";if (d <= 0 || d == null) {
d = bH(a, b);if (d < 0 || d == null) d = a.style[b];if (bQ.test(d)) return d;e = f && (p.support.boxSizingReliable || d === a.style[b]), d = parseFloat(d) || 0;
}return d + ca(a, b, c || (f ? "border" : "content"), e) + "px";
}function cc(a) {
if (bS[a]) return bS[a];var b = p("<" + a + ">").appendTo(e.body),
c = b.css("display");b.remove();if (c === "none" || c === "") {
bI = e.body.appendChild(bI || p.extend(e.createElement("iframe"), { frameBorder: 0, width: 0, height: 0 }));if (!bJ || !bI.createElement) bJ = (bI.contentWindow || bI.contentDocument).document, bJ.write("<!doctype html><html><body>"), bJ.close();b = bJ.body.appendChild(bJ.createElement(a)), c = bH(b, "display"), e.body.removeChild(bI);
}return bS[a] = c, c;
}function ci(a, b, c, d) {
var e;if (p.isArray(b)) p.each(b, function (b, e) {
c || ce.test(a) ? d(a, e) : ci(a + "[" + ((typeof e === "undefined" ? "undefined" : _typeof(e)) == "object" ? b : "") + "]", e, c, d);
});else if (!c && p.type(b) === "object") for (e in b) {
ci(a + "[" + e + "]", b[e], c, d);
} else d(a, b);
}function cz(a) {
return function (b, c) {
typeof b != "string" && (c = b, b = "*");var d,
e,
f,
g = b.toLowerCase().split(s),
h = 0,
i = g.length;if (p.isFunction(c)) for (; h < i; h++) {
d = g[h], f = /^\+/.test(d), f && (d = d.substr(1) || "*"), e = a[d] = a[d] || [], e[f ? "unshift" : "push"](c);
}
};
}function cA(a, c, d, e, f, g) {
f = f || c.dataTypes[0], g = g || {}, g[f] = !0;var h,
i = a[f],
j = 0,
k = i ? i.length : 0,
l = a === cv;for (; j < k && (l || !h); j++) {
h = i[j](c, d, e), typeof h == "string" && (!l || g[h] ? h = b : (c.dataTypes.unshift(h), h = cA(a, c, d, e, h, g)));
}return (l || !h) && !g["*"] && (h = cA(a, c, d, e, "*", g)), h;
}function cB(a, c) {
var d,
e,
f = p.ajaxSettings.flatOptions || {};for (d in c) {
c[d] !== b && ((f[d] ? a : e || (e = {}))[d] = c[d]);
}e && p.extend(!0, a, e);
}function cC(a, c, d) {
var e,
f,
g,
h,
i = a.contents,
j = a.dataTypes,
k = a.responseFields;for (f in k) {
f in d && (c[k[f]] = d[f]);
}while (j[0] === "*") {
j.shift(), e === b && (e = a.mimeType || c.getResponseHeader("content-type"));
}if (e) for (f in i) {
if (i[f] && i[f].test(e)) {
j.unshift(f);break;
}
}if (j[0] in d) g = j[0];else {
for (f in d) {
if (!j[0] || a.converters[f + " " + j[0]]) {
g = f;break;
}h || (h = f);
}g = g || h;
}if (g) return g !== j[0] && j.unshift(g), d[g];
}function cD(a, b) {
var c,
d,
e,
f,
g = a.dataTypes.slice(),
h = g[0],
i = {},
j = 0;a.dataFilter && (b = a.dataFilter(b, a.dataType));if (g[1]) for (c in a.converters) {
i[c.toLowerCase()] = a.converters[c];
}for (; e = g[++j];) {
if (e !== "*") {
if (h !== "*" && h !== e) {
c = i[h + " " + e] || i["* " + e];if (!c) for (d in i) {
f = d.split(" ");if (f[1] === e) {
c = i[h + " " + f[0]] || i["* " + f[0]];if (c) {
c === !0 ? c = i[d] : i[d] !== !0 && (e = f[0], g.splice(j--, 0, e));break;
}
}
}if (c !== !0) if (c && a["throws"]) b = c(b);else try {
b = c(b);
} catch (k) {
return { state: "parsererror", error: c ? k : "No conversion from " + h + " to " + e };
}
}h = e;
}
}return { state: "success", data: b };
}function cL() {
try {
return new a.XMLHttpRequest();
} catch (b) {}
}function cM() {
try {
return new a.ActiveXObject("Microsoft.XMLHTTP");
} catch (b) {}
}function cU() {
return setTimeout(function () {
cN = b;
}, 0), cN = p.now();
}function cV(a, b) {
p.each(b, function (b, c) {
var d = (cT[b] || []).concat(cT["*"]),
e = 0,
f = d.length;for (; e < f; e++) {
if (d[e].call(a, b, c)) return;
}
});
}function cW(a, b, c) {
var d,
e = 0,
f = 0,
g = cS.length,
h = p.Deferred().always(function () {
delete i.elem;
}),
i = function i() {
var b = cN || cU(),
c = Math.max(0, j.startTime + j.duration - b),
d = 1 - (c / j.duration || 0),
e = 0,
f = j.tweens.length;for (; e < f; e++) {
j.tweens[e].run(d);
}return h.notifyWith(a, [j, d, c]), d < 1 && f ? c : (h.resolveWith(a, [j]), !1);
},
j = h.promise({ elem: a, props: p.extend({}, b), opts: p.extend(!0, { specialEasing: {} }, c), originalProperties: b, originalOptions: c, startTime: cN || cU(), duration: c.duration, tweens: [], createTween: function createTween(b, c, d) {
var e = p.Tween(a, j.opts, b, c, j.opts.specialEasing[b] || j.opts.easing);return j.tweens.push(e), e;
}, stop: function stop(b) {
var c = 0,
d = b ? j.tweens.length : 0;for (; c < d; c++) {
j.tweens[c].run(1);
}return b ? h.resolveWith(a, [j, b]) : h.rejectWith(a, [j, b]), this;
} }),
k = j.props;cX(k, j.opts.specialEasing);for (; e < g; e++) {
d = cS[e].call(j, a, k, j.opts);if (d) return d;
}return cV(j, k), p.isFunction(j.opts.start) && j.opts.start.call(a, j), p.fx.timer(p.extend(i, { anim: j, queue: j.opts.queue, elem: a })), j.progress(j.opts.progress).done(j.opts.done, j.opts.complete).fail(j.opts.fail).always(j.opts.always);
}function cX(a, b) {
var c, d, e, f, g;for (c in a) {
d = p.camelCase(c), e = b[d], f = a[c], p.isArray(f) && (e = f[1], f = a[c] = f[0]), c !== d && (a[d] = f, delete a[c]), g = p.cssHooks[d];if (g && "expand" in g) {
f = g.expand(f), delete a[d];for (c in f) {
c in a || (a[c] = f[c], b[c] = e);
}
} else b[d] = e;
}
}function cY(a, b, c) {
var d,
e,
f,
g,
h,
i,
j,
k,
l = this,
m = a.style,
n = {},
o = [],
q = a.nodeType && bZ(a);c.queue || (j = p._queueHooks(a, "fx"), j.unqueued == null && (j.unqueued = 0, k = j.empty.fire, j.empty.fire = function () {
j.unqueued || k();
}), j.unqueued++, l.always(function () {
l.always(function () {
j.unqueued--, p.queue(a, "fx").length || j.empty.fire();
});
})), a.nodeType === 1 && ("height" in b || "width" in b) && (c.overflow = [m.overflow, m.overflowX, m.overflowY], p.css(a, "display") === "inline" && p.css(a, "float") === "none" && (!p.support.inlineBlockNeedsLayout || cc(a.nodeName) === "inline" ? m.display = "inline-block" : m.zoom = 1)), c.overflow && (m.overflow = "hidden", p.support.shrinkWrapBlocks || l.done(function () {
m.overflow = c.overflow[0], m.overflowX = c.overflow[1], m.overflowY = c.overflow[2];
}));for (d in b) {
f = b[d];if (cP.exec(f)) {
delete b[d];if (f === (q ? "hide" : "show")) continue;o.push(d);
}
}g = o.length;if (g) {
h = p._data(a, "fxshow") || p._data(a, "fxshow", {}), q ? p(a).show() : l.done(function () {
p(a).hide();
}), l.done(function () {
var b;p.removeData(a, "fxshow", !0);for (b in n) {
p.style(a, b, n[b]);
}
});for (d = 0; d < g; d++) {
e = o[d], i = l.createTween(e, q ? h[e] : 0), n[e] = h[e] || p.style(a, e), e in h || (h[e] = i.start, q && (i.end = i.start, i.start = e === "width" || e === "height" ? 1 : 0));
}
}
}function cZ(a, b, c, d, e) {
return new cZ.prototype.init(a, b, c, d, e);
}function c$(a, b) {
var c,
d = { height: a },
e = 0;b = b ? 1 : 0;for (; e < 4; e += 2 - b) {
c = bV[e], d["margin" + c] = d["padding" + c] = a;
}return b && (d.opacity = d.width = a), d;
}function da(a) {
return p.isWindow(a) ? a : a.nodeType === 9 ? a.defaultView || a.parentWindow : !1;
}var c,
d,
e = a.document,
f = a.location,
g = a.navigator,
h = a.jQuery,
i = a.$,
j = Array.prototype.push,
k = Array.prototype.slice,
l = Array.prototype.indexOf,
m = Object.prototype.toString,
n = Object.prototype.hasOwnProperty,
o = String.prototype.trim,
p = function p(a, b) {
return new p.fn.init(a, b, c);
},
q = /[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source,
r = /\S/,
s = /\s+/,
t = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,
u = /^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,
v = /^<(\w+)\s*\/?>(?:<\/\1>|)$/,
w = /^[\],:{}\s]*$/,
x = /(?:^|:|,)(?:\s*\[)+/g,
y = /\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,
z = /"[^"\\\r\n]*"|true|false|null|-?(?:\d\d*\.|)\d+(?:[eE][\-+]?\d+|)/g,
A = /^-ms-/,
B = /-([\da-z])/gi,
C = function C(a, b) {
return (b + "").toUpperCase();
},
D = function D() {
e.addEventListener ? (e.removeEventListener("DOMContentLoaded", D, !1), p.ready()) : e.readyState === "complete" && (e.detachEvent("onreadystatechange", D), p.ready());
},
E = {};p.fn = p.prototype = { constructor: p, init: function init(a, c, d) {
var f, g, h, i;if (!a) return this;if (a.nodeType) return this.context = this[0] = a, this.length = 1, this;if (typeof a == "string") {
a.charAt(0) === "<" && a.charAt(a.length - 1) === ">" && a.length >= 3 ? f = [null, a, null] : f = u.exec(a);if (f && (f[1] || !c)) {
if (f[1]) return c = c instanceof p ? c[0] : c, i = c && c.nodeType ? c.ownerDocument || c : e, a = p.parseHTML(f[1], i, !0), v.test(f[1]) && p.isPlainObject(c) && this.attr.call(a, c, !0), p.merge(this, a);g = e.getElementById(f[2]);if (g && g.parentNode) {
if (g.id !== f[2]) return d.find(a);this.length = 1, this[0] = g;
}return this.context = e, this.selector = a, this;
}return !c || c.jquery ? (c || d).find(a) : this.constructor(c).find(a);
}return p.isFunction(a) ? d.ready(a) : (a.selector !== b && (this.selector = a.selector, this.context = a.context), p.makeArray(a, this));
}, selector: "", jquery: "1.8.2", length: 0, size: function size() {
return this.length;
}, toArray: function toArray() {
return k.call(this);
}, get: function get(a) {
return a == null ? this.toArray() : a < 0 ? this[this.length + a] : this[a];
}, pushStack: function pushStack(a, b, c) {
var d = p.merge(this.constructor(), a);return d.prevObject = this, d.context = this.context, b === "find" ? d.selector = this.selector + (this.selector ? " " : "") + c : b && (d.selector = this.selector + "." + b + "(" + c + ")"), d;
}, each: function each(a, b) {
return p.each(this, a, b);
}, ready: function ready(a) {
return p.ready.promise().done(a), this;
}, eq: function eq(a) {
return a = +a, a === -1 ? this.slice(a) : this.slice(a, a + 1);
}, first: function first() {
return this.eq(0);
}, last: function last() {
return this.eq(-1);
}, slice: function slice() {
return this.pushStack(k.apply(this, arguments), "slice", k.call(arguments).join(","));
}, map: function map(a) {
return this.pushStack(p.map(this, function (b, c) {
return a.call(b, c, b);
}));
}, end: function end() {
return this.prevObject || this.constructor(null);
}, push: j, sort: [].sort, splice: [].splice }, p.fn.init.prototype = p.fn, p.extend = p.fn.extend = function () {
var a,
c,
d,
e,
f,
g,
h = arguments[0] || {},
i = 1,
j = arguments.length,
k = !1;typeof h == "boolean" && (k = h, h = arguments[1] || {}, i = 2), (typeof h === "undefined" ? "undefined" : _typeof(h)) != "object" && !p.isFunction(h) && (h = {}), j === i && (h = this, --i);for (; i < j; i++) {
if ((a = arguments[i]) != null) for (c in a) {
d = h[c], e = a[c];if (h === e) continue;k && e && (p.isPlainObject(e) || (f = p.isArray(e))) ? (f ? (f = !1, g = d && p.isArray(d) ? d : []) : g = d && p.isPlainObject(d) ? d : {}, h[c] = p.extend(k, g, e)) : e !== b && (h[c] = e);
}
}return h;
}, p.extend({ noConflict: function noConflict(b) {
return a.$ === p && (a.$ = i), b && a.jQuery === p && (a.jQuery = h), p;
}, isReady: !1, readyWait: 1, holdReady: function holdReady(a) {
a ? p.readyWait++ : p.ready(!0);
}, ready: function ready(a) {
if (a === !0 ? --p.readyWait : p.isReady) return;if (!e.body) return setTimeout(p.ready, 1);p.isReady = !0;if (a !== !0 && --p.readyWait > 0) return;d.resolveWith(e, [p]), p.fn.trigger && p(e).trigger("ready").off("ready");
}, isFunction: function isFunction(a) {
return p.type(a) === "function";
}, isArray: Array.isArray || function (a) {
return p.type(a) === "array";
}, isWindow: function isWindow(a) {
return a != null && a == a.window;
}, isNumeric: function isNumeric(a) {
return !isNaN(parseFloat(a)) && isFinite(a);
}, type: function type(a) {
return a == null ? String(a) : E[m.call(a)] || "object";
}, isPlainObject: function isPlainObject(a) {
if (!a || p.type(a) !== "object" || a.nodeType || p.isWindow(a)) return !1;try {
if (a.constructor && !n.call(a, "constructor") && !n.call(a.constructor.prototype, "isPrototypeOf")) return !1;
} catch (c) {
return !1;
}var d;for (d in a) {}return d === b || n.call(a, d);
}, isEmptyObject: function isEmptyObject(a) {
var b;for (b in a) {
return !1;
}return !0;
}, error: function error(a) {
throw new Error(a);
}, parseHTML: function parseHTML(a, b, c) {
var d;return !a || typeof a != "string" ? null : (typeof b == "boolean" && (c = b, b = 0), b = b || e, (d = v.exec(a)) ? [b.createElement(d[1])] : (d = p.buildFragment([a], b, c ? null : []), p.merge([], (d.cacheable ? p.clone(d.fragment) : d.fragment).childNodes)));
}, parseJSON: function parseJSON(b) {
if (!b || typeof b != "string") return null;b = p.trim(b);if (a.JSON && a.JSON.parse) return a.JSON.parse(b);if (w.test(b.replace(y, "@").replace(z, "]").replace(x, ""))) return new Function("return " + b)();p.error("Invalid JSON: " + b);
}, parseXML: function parseXML(c) {
var d, e;if (!c || typeof c != "string") return null;try {
a.DOMParser ? (e = new DOMParser(), d = e.parseFromString(c, "text/xml")) : (d = new ActiveXObject("Microsoft.XMLDOM"), d.async = "false", d.loadXML(c));
} catch (f) {
d = b;
}return (!d || !d.documentElement || d.getElementsByTagName("parsererror").length) && p.error("Invalid XML: " + c), d;
}, noop: function noop() {}, globalEval: function globalEval(b) {
b && r.test(b) && (a.execScript || function (b) {
a.eval.call(a, b);
})(b);
}, camelCase: function camelCase(a) {
return a.replace(A, "ms-").replace(B, C);
}, nodeName: function nodeName(a, b) {
return a.nodeName && a.nodeName.toLowerCase() === b.toLowerCase();
}, each: function each(a, c, d) {
var e,
f = 0,
g = a.length,
h = g === b || p.isFunction(a);if (d) {
if (h) {
for (e in a) {
if (c.apply(a[e], d) === !1) break;
}
} else for (; f < g;) {
if (c.apply(a[f++], d) === !1) break;
}
} else if (h) {
for (e in a) {
if (c.call(a[e], e, a[e]) === !1) break;
}
} else for (; f < g;) {
if (c.call(a[f], f, a[f++]) === !1) break;
}return a;
}, trim: o && !o.call(" ") ? function (a) {
return a == null ? "" : o.call(a);
} : function (a) {
return a == null ? "" : (a + "").replace(t, "");
}, makeArray: function makeArray(a, b) {
var c,
d = b || [];return a != null && (c = p.type(a), a.length == null || c === "string" || c === "function" || c === "regexp" || p.isWindow(a) ? j.call(d, a) : p.merge(d, a)), d;
}, inArray: function inArray(a, b, c) {
var d;if (b) {
if (l) return l.call(b, a, c);d = b.length, c = c ? c < 0 ? Math.max(0, d + c) : c : 0;for (; c < d; c++) {
if (c in b && b[c] === a) return c;
}
}return -1;
}, merge: function merge(a, c) {
var d = c.length,
e = a.length,
f = 0;if (typeof d == "number") for (; f < d; f++) {
a[e++] = c[f];
} else while (c[f] !== b) {
a[e++] = c[f++];
}return a.length = e, a;
}, grep: function grep(a, b, c) {
var d,
e = [],
f = 0,
g = a.length;c = !!c;for (; f < g; f++) {
d = !!b(a[f], f), c !== d && e.push(a[f]);
}return e;
}, map: function map(a, c, d) {
var e,
f,
g = [],
h = 0,
i = a.length,
j = a instanceof p || i !== b && typeof i == "number" && (i > 0 && a[0] && a[i - 1] || i === 0 || p.isArray(a));if (j) for (; h < i; h++) {
e = c(a[h], h, d), e != null && (g[g.length] = e);
} else for (f in a) {
e = c(a[f], f, d), e != null && (g[g.length] = e);
}return g.concat.apply([], g);
}, guid: 1, proxy: function proxy(a, c) {
var d, e, f;return typeof c == "string" && (d = a[c], c = a, a = d), p.isFunction(a) ? (e = k.call(arguments, 2), f = function f() {
return a.apply(c, e.concat(k.call(arguments)));
}, f.guid = a.guid = a.guid || p.guid++, f) : b;
}, access: function access(a, c, d, e, f, g, h) {
var i,
j = d == null,
k = 0,
l = a.length;if (d && (typeof d === "undefined" ? "undefined" : _typeof(d)) == "object") {
for (k in d) {
p.access(a, c, k, d[k], 1, g, e);
}f = 1;
} else if (e !== b) {
i = h === b && p.isFunction(e), j && (i ? (i = c, c = function c(a, b, _c) {
return i.call(p(a), _c);
}) : (c.call(a, e), c = null));if (c) for (; k < l; k++) {
c(a[k], d, i ? e.call(a[k], k, c(a[k], d)) : e, h);
}f = 1;
}return f ? a : j ? c.call(a) : l ? c(a[0], d) : g;
}, now: function now() {
return new Date().getTime();
} }), p.ready.promise = function (b) {
if (!d) {
d = p.Deferred();if (e.readyState === "complete") setTimeout(p.ready, 1);else if (e.addEventListener) e.addEventListener("DOMContentLoaded", D, !1), a.addEventListener("load", p.ready, !1);else {
e.attachEvent("onreadystatechange", D), a.attachEvent("onload", p.ready);var c = !1;try {
c = a.frameElement == null && e.documentElement;
} catch (f) {}c && c.doScroll && function g() {
if (!p.isReady) {
try {
c.doScroll("left");
} catch (a) {
return setTimeout(g, 50);
}p.ready();
}
}();
}
}return d.promise(b);
}, p.each("Boolean Number String Function Array Date RegExp Object".split(" "), function (a, b) {
E["[object " + b + "]"] = b.toLowerCase();
}), c = p(e);var F = {};p.Callbacks = function (a) {
a = typeof a == "string" ? F[a] || G(a) : p.extend({}, a);var c,
d,
e,
f,
g,
h,
i = [],
j = !a.once && [],
k = function k(b) {
c = a.memory && b, d = !0, h = f || 0, f = 0, g = i.length, e = !0;for (; i && h < g; h++) {
if (i[h].apply(b[0], b[1]) === !1 && a.stopOnFalse) {
c = !1;break;
}
}e = !1, i && (j ? j.length && k(j.shift()) : c ? i = [] : l.disable());
},
l = { add: function add() {
if (i) {
var b = i.length;(function d(b) {
p.each(b, function (b, c) {
var e = p.type(c);e === "function" && (!a.unique || !l.has(c)) ? i.push(c) : c && c.length && e !== "string" && d(c);
});
})(arguments), e ? g = i.length : c && (f = b, k(c));
}return this;
}, remove: function remove() {
return i && p.each(arguments, function (a, b) {
var c;while ((c = p.inArray(b, i, c)) > -1) {
i.splice(c, 1), e && (c <= g && g--, c <= h && h--);
}
}), this;
}, has: function has(a) {
return p.inArray(a, i) > -1;
}, empty: function empty() {
return i = [], this;
}, disable: function disable() {
return i = j = c = b, this;
}, disabled: function disabled() {
return !i;
}, lock: function lock() {
return j = b, c || l.disable(), this;
}, locked: function locked() {
return !j;
}, fireWith: function fireWith(a, b) {
return b = b || [], b = [a, b.slice ? b.slice() : b], i && (!d || j) && (e ? j.push(b) : k(b)), this;
}, fire: function fire() {
return l.fireWith(this, arguments), this;
}, fired: function fired() {
return !!d;
} };return l;
}, p.extend({ Deferred: function Deferred(a) {
var b = [["resolve", "done", p.Callbacks("once memory"), "resolved"], ["reject", "fail", p.Callbacks("once memory"), "rejected"], ["notify", "progress", p.Callbacks("memory")]],
c = "pending",
d = { state: function state() {
return c;
}, always: function always() {
return e.done(arguments).fail(arguments), this;
}, then: function then() {
var a = arguments;return p.Deferred(function (c) {
p.each(b, function (b, d) {
var f = d[0],
g = a[b];e[d[1]](p.isFunction(g) ? function () {
var a = g.apply(this, arguments);a && p.isFunction(a.promise) ? a.promise().done(c.resolve).fail(c.reject).progress(c.notify) : c[f + "With"](this === e ? c : this, [a]);
} : c[f]);
}), a = null;
}).promise();
}, promise: function promise(a) {
return a != null ? p.extend(a, d) : d;
} },
e = {};return d.pipe = d.then, p.each(b, function (a, f) {
var g = f[2],
h = f[3];d[f[1]] = g.add, h && g.add(function () {
c = h;
}, b[a ^ 1][2].disable, b[2][2].lock), e[f[0]] = g.fire, e[f[0] + "With"] = g.fireWith;
}), d.promise(e), a && a.call(e, e), e;
}, when: function when(a) {
var b = 0,
c = k.call(arguments),
d = c.length,
e = d !== 1 || a && p.isFunction(a.promise) ? d : 0,
f = e === 1 ? a : p.Deferred(),
g = function g(a, b, c) {
return function (d) {
b[a] = this, c[a] = arguments.length > 1 ? k.call(arguments) : d, c === h ? f.notifyWith(b, c) : --e || f.resolveWith(b, c);
};
},
h,
i,
j;if (d > 1) {
h = new Array(d), i = new Array(d), j = new Array(d);for (; b < d; b++) {
c[b] && p.isFunction(c[b].promise) ? c[b].promise().done(g(b, j, c)).fail(f.reject).progress(g(b, i, h)) : --e;
}
}return e || f.resolveWith(j, c), f.promise();
} }), p.support = function () {
var b,
c,
d,
f,
g,
h,
i,
j,
k,
l,
m,
n = e.createElement("div");n.setAttribute("className", "t"), n.innerHTML = " <link/><table></table><a href='/a'>a</a><input type='checkbox'/>", c = n.getElementsByTagName("*"), d = n.getElementsByTagName("a")[0], d.style.cssText = "top:1px;float:left;opacity:.5";if (!c || !c.length) return {};f = e.createElement("select"), g = f.appendChild(e.createElement("option")), h = n.getElementsByTagName("input")[0], b = { leadingWhitespace: n.firstChild.nodeType === 3, tbody: !n.getElementsByTagName("tbody").length, htmlSerialize: !!n.getElementsByTagName("link").length, style: /top/.test(d.getAttribute("style")), hrefNormalized: d.getAttribute("href") === "/a", opacity: /^0.5/.test(d.style.opacity), cssFloat: !!d.style.cssFloat, checkOn: h.value === "on", optSelected: g.selected, getSetAttribute: n.className !== "t", enctype: !!e.createElement("form").enctype, html5Clone: e.createElement("nav").cloneNode(!0).outerHTML !== "<:nav></:nav>", boxModel: e.compatMode === "CSS1Compat", submitBubbles: !0, changeBubbles: !0, focusinBubbles: !1, deleteExpando: !0, noCloneEvent: !0, inlineBlockNeedsLayout: !1, shrinkWrapBlocks: !1, reliableMarginRight: !0, boxSizingReliable: !0, pixelPosition: !1 }, h.checked = !0, b.noCloneChecked = h.cloneNode(!0).checked, f.disabled = !0, b.optDisabled = !g.disabled;try {
delete n.test;
} catch (o) {
b.deleteExpando = !1;
}!n.addEventListener && n.attachEvent && n.fireEvent && (n.attachEvent("onclick", m = function m() {
b.noCloneEvent = !1;
}), n.cloneNode(!0).fireEvent("onclick"), n.detachEvent("onclick", m)), h = e.createElement("input"), h.value = "t", h.setAttribute("type", "radio"), b.radioValue = h.value === "t", h.setAttribute("checked", "checked"), h.setAttribute("name", "t"), n.appendChild(h), i = e.createDocumentFragment(), i.appendChild(n.lastChild), b.checkClone = i.cloneNode(!0).cloneNode(!0).lastChild.checked, b.appendChecked = h.checked, i.removeChild(h), i.appendChild(n);if (n.attachEvent) for (k in { submit: !0, change: !0, focusin: !0 }) {
j = "on" + k, l = j in n, l || (n.setAttribute(j, "return;"), l = typeof n[j] == "function"), b[k + "Bubbles"] = l;
}return p(function () {
var c,
d,
f,
g,
h = "padding:0;margin:0;border:0;display:block;overflow:hidden;",
i = e.getElementsByTagName("body")[0];if (!i) return;c = e.createElement("div"), c.style.cssText = "visibility:hidden;border:0;width:0;height:0;position:static;top:0;margin-top:1px", i.insertBefore(c, i.firstChild), d = e.createElement("div"), c.appendChild(d), d.innerHTML = "<table><tr><td></td><td>t</td></tr></table>", f = d.getElementsByTagName("td"), f[0].style.cssText = "padding:0;margin:0;border:0;display:none", l = f[0].offsetHeight === 0, f[0].style.display = "", f[1].style.display = "none", b.reliableHiddenOffsets = l && f[0].offsetHeight === 0, d.innerHTML = "", d.style.cssText = "box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;", b.boxSizing = d.offsetWidth === 4, b.doesNotIncludeMarginInBodyOffset = i.offsetTop !== 1, a.getComputedStyle && (b.pixelPosition = (a.getComputedStyle(d, null) || {}).top !== "1%", b.boxSizingReliable = (a.getComputedStyle(d, null) || { width: "4px" }).width === "4px", g = e.createElement("div"), g.style.cssText = d.style.cssText = h, g.style.marginRight = g.style.width = "0", d.style.width = "1px", d.appendChild(g), b.reliableMarginRight = !parseFloat((a.getComputedStyle(g, null) || {}).marginRight)), typeof d.style.zoom != "undefined" && (d.innerHTML = "", d.style.cssText = h + "width:1px;padding:1px;display:inline;zoom:1", b.inlineBlockNeedsLayout = d.offsetWidth === 3, d.style.display = "block", d.style.overflow = "visible", d.innerHTML = "<div></div>", d.firstChild.style.width = "5px", b.shrinkWrapBlocks = d.offsetWidth !== 3, c.style.zoom = 1), i.removeChild(c), c = d = f = g = null;
}), i.removeChild(n), c = d = f = g = h = i = n = null, b;
}();var H = /(?:\{[\s\S]*\}|\[[\s\S]*\])$/,
I = /([A-Z])/g;p.extend({ cache: {}, deletedIds: [], uuid: 0, expando: "jQuery" + (p.fn.jquery + Math.random()).replace(/\D/g, ""), noData: { embed: !0, object: "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000", applet: !0 }, hasData: function hasData(a) {
return a = a.nodeType ? p.cache[a[p.expando]] : a[p.expando], !!a && !K(a);
}, data: function data(a, c, d, e) {
if (!p.acceptData(a)) return;var f,
g,
h = p.expando,
i = typeof c == "string",
j = a.nodeType,
k = j ? p.cache : a,
l = j ? a[h] : a[h] && h;if ((!l || !k[l] || !e && !k[l].data) && i && d === b) return;l || (j ? a[h] = l = p.deletedIds.pop() || p.guid++ : l = h), k[l] || (k[l] = {}, j || (k[l].toJSON = p.noop));if ((typeof c === "undefined" ? "undefined" : _typeof(c)) == "object" || typeof c == "function") e ? k[l] = p.extend(k[l], c) : k[l].data = p.extend(k[l].data, c);return f = k[l], e || (f.data || (f.data = {}), f = f.data), d !== b && (f[p.camelCase(c)] = d), i ? (g = f[c], g == null && (g = f[p.camelCase(c)])) : g = f, g;
}, removeData: function removeData(a, b, c) {
if (!p.acceptData(a)) return;var d,
e,
f,
g = a.nodeType,
h = g ? p.cache : a,
i = g ? a[p.expando] : p.expando;if (!h[i]) return;if (b) {
d = c ? h[i] : h[i].data;if (d) {
p.isArray(b) || (b in d ? b = [b] : (b = p.camelCase(b), b in d ? b = [b] : b = b.split(" ")));for (e = 0, f = b.length; e < f; e++) {
delete d[b[e]];
}if (!(c ? K : p.isEmptyObject)(d)) return;
}
}if (!c) {
delete h[i].data;if (!K(h[i])) return;
}g ? p.cleanData([a], !0) : p.support.deleteExpando || h != h.window ? delete h[i] : h[i] = null;
}, _data: function _data(a, b, c) {
return p.data(a, b, c, !0);
}, acceptData: function acceptData(a) {
var b = a.nodeName && p.noData[a.nodeName.toLowerCase()];return !b || b !== !0 && a.getAttribute("classid") === b;
} }), p.fn.extend({ data: function data(a, c) {
var d,
e,
f,
g,
h,
i = this[0],
j = 0,
k = null;if (a === b) {
if (this.length) {
k = p.data(i);if (i.nodeType === 1 && !p._data(i, "parsedAttrs")) {
f = i.attributes;for (h = f.length; j < h; j++) {
g = f[j].name, g.indexOf("data-") || (g = p.camelCase(g.substring(5)), J(i, g, k[g]));
}p._data(i, "parsedAttrs", !0);
}
}return k;
}return (typeof a === "undefined" ? "undefined" : _typeof(a)) == "object" ? this.each(function () {
p.data(this, a);
}) : (d = a.split(".", 2), d[1] = d[1] ? "." + d[1] : "", e = d[1] + "!", p.access(this, function (c) {
if (c === b) return k = this.triggerHandler("getData" + e, [d[0]]), k === b && i && (k = p.data(i, a), k = J(i, a, k)), k === b && d[1] ? this.data(d[0]) : k;d[1] = c, this.each(function () {
var b = p(this);b.triggerHandler("setData" + e, d), p.data(this, a, c), b.triggerHandler("changeData" + e, d);
});
}, null, c, arguments.length > 1, null, !1));
}, removeData: function removeData(a) {
return this.each(function () {
p.removeData(this, a);
});
} }), p.extend({ queue: function queue(a, b, c) {
var d;if (a) return b = (b || "fx") + "queue", d = p._data(a, b), c && (!d || p.isArray(c) ? d = p._data(a, b, p.makeArray(c)) : d.push(c)), d || [];
}, dequeue: function dequeue(a, b) {
b = b || "fx";var c = p.queue(a, b),
d = c.length,
e = c.shift(),
f = p._queueHooks(a, b),
g = function g() {
p.dequeue(a, b);
};e === "inprogress" && (e = c.shift(), d--), e && (b === "fx" && c.unshift("inprogress"), delete f.stop, e.call(a, g, f)), !d && f && f.empty.fire();
}, _queueHooks: function _queueHooks(a, b) {
var c = b + "queueHooks";return p._data(a, c) || p._data(a, c, { empty: p.Callbacks("once memory").add(function () {
p.removeData(a, b + "queue", !0), p.removeData(a, c, !0);
}) });
} }), p.fn.extend({ queue: function queue(a, c) {
var d = 2;return typeof a != "string" && (c = a, a = "fx", d--), arguments.length < d ? p.queue(this[0], a) : c === b ? this : this.each(function () {
var b = p.queue(this, a, c);p._queueHooks(this, a), a === "fx" && b[0] !== "inprogress" && p.dequeue(this, a);
});
}, dequeue: function dequeue(a) {
return this.each(function () {
p.dequeue(this, a);
});
}, delay: function delay(a, b) {
return a = p.fx ? p.fx.speeds[a] || a : a, b = b || "fx", this.queue(b, function (b, c) {
var d = setTimeout(b, a);c.stop = function () {
clearTimeout(d);
};
});
}, clearQueue: function clearQueue(a) {
return this.queue(a || "fx", []);
}, promise: function promise(a, c) {
var d,
e = 1,
f = p.Deferred(),
g = this,
h = this.length,
i = function i() {
--e || f.resolveWith(g, [g]);
};typeof a != "string" && (c = a, a = b), a = a || "fx";while (h--) {
d = p._data(g[h], a + "queueHooks"), d && d.empty && (e++, d.empty.add(i));
}return i(), f.promise(c);
} });var L,
M,
N,
O = /[\t\r\n]/g,
P = /\r/g,
Q = /^(?:button|input)$/i,
R = /^(?:button|input|object|select|textarea)$/i,
S = /^a(?:rea|)$/i,
T = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,
U = p.support.getSetAttribute;p.fn.extend({ attr: function attr(a, b) {
return p.access(this, p.attr, a, b, arguments.length > 1);
}, removeAttr: function removeAttr(a) {
return this.each(function () {
p.removeAttr(this, a);
});
}, prop: function prop(a, b) {
return p.access(this, p.prop, a, b, arguments.length > 1);
}, removeProp: function removeProp(a) {
return a = p.propFix[a] || a, this.each(function () {
try {
this[a] = b, delete this[a];
} catch (c) {}
});
}, addClass: function addClass(a) {
var b, c, d, e, f, g, h;if (p.isFunction(a)) return this.each(function (b) {
p(this).addClass(a.call(this, b, this.className));
});if (a && typeof a == "string") {
b = a.split(s);for (c = 0, d = this.length; c < d; c++) {
e = this[c];if (e.nodeType === 1) if (!e.className && b.length === 1) e.className = a;else {
f = " " + e.className + " ";for (g = 0, h = b.length; g < h; g++) {
f.indexOf(" " + b[g] + " ") < 0 && (f += b[g] + " ");
}e.className = p.trim(f);
}
}
}return this;
}, removeClass: function removeClass(a) {
var c, d, e, f, g, h, i;if (p.isFunction(a)) return this.each(function (b) {
p(this).removeClass(a.call(this, b, this.className));
});if (a && typeof a == "string" || a === b) {
c = (a || "").split(s);for (h = 0, i = this.length; h < i; h++) {
e = this[h];if (e.nodeType === 1 && e.className) {
d = (" " + e.className + " ").replace(O, " ");for (f = 0, g = c.length; f < g; f++) {
while (d.indexOf(" " + c[f] + " ") >= 0) {
d = d.replace(" " + c[f] + " ", " ");
}
}e.className = a ? p.trim(d) : "";
}
}
}return this;
}, toggleClass: function toggleClass(a, b) {
var c = typeof a === "undefined" ? "undefined" : _typeof(a),
d = typeof b == "boolean";return p.isFunction(a) ? this.each(function (c) {
p(this).toggleClass(a.call(this, c, this.className, b), b);
}) : this.each(function () {
if (c === "string") {
var e,
f = 0,
g = p(this),
h = b,
i = a.split(s);while (e = i[f++]) {
h = d ? h : !g.hasClass(e), g[h ? "addClass" : "removeClass"](e);
}
} else if (c === "undefined" || c === "boolean") this.className && p._data(this, "__className__", this.className), this.className = this.className || a === !1 ? "" : p._data(this, "__className__") || "";
});
}, hasClass: function hasClass(a) {
var b = " " + a + " ",
c = 0,
d = this.length;for (; c < d; c++) {
if (this[c].nodeType === 1 && (" " + this[c].className + " ").replace(O, " ").indexOf(b) >= 0) return !0;
}return !1;
}, val: function val(a) {
var c,
d,
e,
f = this[0];if (!arguments.length) {
if (f) return c = p.valHooks[f.type] || p.valHooks[f.nodeName.toLowerCase()], c && "get" in c && (d = c.get(f, "value")) !== b ? d : (d = f.value, typeof d == "string" ? d.replace(P, "") : d == null ? "" : d);return;
}return e = p.isFunction(a), this.each(function (d) {
var f,
g = p(this);if (this.nodeType !== 1) return;e ? f = a.call(this, d, g.val()) : f = a, f == null ? f = "" : typeof f == "number" ? f += "" : p.isArray(f) && (f = p.map(f, function (a) {
return a == null ? "" : a + "";
})), c = p.valHooks[this.type] || p.valHooks[this.nodeName.toLowerCase()];if (!c || !("set" in c) || c.set(this, f, "value") === b) this.value = f;
});
} }), p.extend({ valHooks: { option: { get: function get(a) {
var b = a.attributes.value;return !b || b.specified ? a.value : a.text;
} }, select: { get: function get(a) {
var b,
c,
d,
e,
f = a.selectedIndex,
g = [],
h = a.options,
i = a.type === "select-one";if (f < 0) return null;c = i ? f : 0, d = i ? f + 1 : h.length;for (; c < d; c++) {
e = h[c];if (e.selected && (p.support.optDisabled ? !e.disabled : e.getAttribute("disabled") === null) && (!e.parentNode.disabled || !p.nodeName(e.parentNode, "optgroup"))) {
b = p(e).val();if (i) return b;g.push(b);
}
}return i && !g.length && h.length ? p(h[f]).val() : g;
}, set: function set(a, b) {
var c = p.makeArray(b);return p(a).find("option").each(function () {
this.selected = p.inArray(p(this).val(), c) >= 0;
}), c.length || (a.selectedIndex = -1), c;
} } }, attrFn: {}, attr: function attr(a, c, d, e) {
var f,
g,
h,
i = a.nodeType;if (!a || i === 3 || i === 8 || i === 2) return;if (e && p.isFunction(p.fn[c])) return p(a)[c](d);if (typeof a.getAttribute == "undefined") return p.prop(a, c, d);h = i !== 1 || !p.isXMLDoc(a), h && (c = c.toLowerCase(), g = p.attrHooks[c] || (T.test(c) ? M : L));if (d !== b) {
if (d === null) {
p.removeAttr(a, c);return;
}return g && "set" in g && h && (f = g.set(a, d, c)) !== b ? f : (a.setAttribute(c, d + ""), d);
}return g && "get" in g && h && (f = g.get(a, c)) !== null ? f : (f = a.getAttribute(c), f === null ? b : f);
}, removeAttr: function removeAttr(a, b) {
var c,
d,
e,
f,
g = 0;if (b && a.nodeType === 1) {
d = b.split(s);for (; g < d.length; g++) {
e = d[g], e && (c = p.propFix[e] || e, f = T.test(e), f || p.attr(a, e, ""), a.removeAttribute(U ? e : c), f && c in a && (a[c] = !1));
}
}
}, attrHooks: { type: { set: function set(a, b) {
if (Q.test(a.nodeName) && a.parentNode) p.error("type property can't be changed");else if (!p.support.radioValue && b === "radio" && p.nodeName(a, "input")) {
var c = a.value;return a.setAttribute("type", b), c && (a.value = c), b;
}
} }, value: { get: function get(a, b) {
return L && p.nodeName(a, "button") ? L.get(a, b) : b in a ? a.value : null;
}, set: function set(a, b, c) {
if (L && p.nodeName(a, "button")) return L.set(a, b, c);a.value = b;
} } }, propFix: { tabindex: "tabIndex", readonly: "readOnly", "for": "htmlFor", "class": "className", maxlength: "maxLength", cellspacing: "cellSpacing", cellpadding: "cellPadding", rowspan: "rowSpan", colspan: "colSpan", usemap: "useMap", frameborder: "frameBorder", contenteditable: "contentEditable" }, prop: function prop(a, c, d) {
var e,
f,
g,
h = a.nodeType;if (!a || h === 3 || h === 8 || h === 2) return;return g = h !== 1 || !p.isXMLDoc(a), g && (c = p.propFix[c] || c, f = p.propHooks[c]), d !== b ? f && "set" in f && (e = f.set(a, d, c)) !== b ? e : a[c] = d : f && "get" in f && (e = f.get(a, c)) !== null ? e : a[c];
}, propHooks: { tabIndex: { get: function get(a) {
var c = a.getAttributeNode("tabindex");return c && c.specified ? parseInt(c.value, 10) : R.test(a.nodeName) || S.test(a.nodeName) && a.href ? 0 : b;
} } } }), M = { get: function get(a, c) {
var d,
e = p.prop(a, c);return e === !0 || typeof e != "boolean" && (d = a.getAttributeNode(c)) && d.nodeValue !== !1 ? c.toLowerCase() : b;
}, set: function set(a, b, c) {
var d;return b === !1 ? p.removeAttr(a, c) : (d = p.propFix[c] || c, d in a && (a[d] = !0), a.setAttribute(c, c.toLowerCase())), c;
} }, U || (N = { name: !0, id: !0, coords: !0 }, L = p.valHooks.button = { get: function get(a, c) {
var d;return d = a.getAttributeNode(c), d && (N[c] ? d.value !== "" : d.specified) ? d.value : b;
}, set: function set(a, b, c) {
var d = a.getAttributeNode(c);return d || (d = e.createAttribute(c), a.setAttributeNode(d)), d.value = b + "";
} }, p.each(["width", "height"], function (a, b) {
p.attrHooks[b] = p.extend(p.attrHooks[b], { set: function set(a, c) {
if (c === "") return a.setAttribute(b, "auto"), c;
} });
}), p.attrHooks.contenteditable = { get: L.get, set: function set(a, b, c) {
b === "" && (b = "false"), L.set(a, b, c);
} }), p.support.hrefNormalized || p.each(["href", "src", "width", "height"], function (a, c) {
p.attrHooks[c] = p.extend(p.attrHooks[c], { get: function get(a) {
var d = a.getAttribute(c, 2);return d === null ? b : d;
} });
}), p.support.style || (p.attrHooks.style = { get: function get(a) {
return a.style.cssText.toLowerCase() || b;
}, set: function set(a, b) {
return a.style.cssText = b + "";
} }), p.support.optSelected || (p.propHooks.selected = p.extend(p.propHooks.selected, { get: function get(a) {
var b = a.parentNode;return b && (b.selectedIndex, b.parentNode && b.parentNode.selectedIndex), null;
} })), p.support.enctype || (p.propFix.enctype = "encoding"), p.support.checkOn || p.each(["radio", "checkbox"], function () {
p.valHooks[this] = { get: function get(a) {
return a.getAttribute("value") === null ? "on" : a.value;
} };
}), p.each(["radio", "checkbox"], function () {
p.valHooks[this] = p.extend(p.valHooks[this], { set: function set(a, b) {
if (p.isArray(b)) return a.checked = p.inArray(p(a).val(), b) >= 0;
} });
});var V = /^(?:textarea|input|select)$/i,
W = /^([^\.]*|)(?:\.(.+)|)$/,
X = /(?:^|\s)hover(\.\S+|)\b/,
Y = /^key/,
Z = /^(?:mouse|contextmenu)|click/,
$ = /^(?:focusinfocus|focusoutblur)$/,
_ = function _(a) {
return p.event.special.hover ? a : a.replace(X, "mouseenter$1 mouseleave$1");
};p.event = { add: function add(a, c, d, e, f) {
var g, _h, i, j, k, l, m, n, o, q, r;if (a.nodeType === 3 || a.nodeType === 8 || !c || !d || !(g = p._data(a))) return;d.handler && (o = d, d = o.handler, f = o.selector), d.guid || (d.guid = p.guid++), i = g.events, i || (g.events = i = {}), _h = g.handle, _h || (g.handle = _h = function h(a) {
return typeof p != "undefined" && (!a || p.event.triggered !== a.type) ? p.event.dispatch.apply(_h.elem, arguments) : b;
}, _h.elem = a), c = p.trim(_(c)).split(" ");for (j = 0; j < c.length; j++) {
k = W.exec(c[j]) || [], l = k[1], m = (k[2] || "").split(".").sort(), r = p.event.special[l] || {}, l = (f ? r.delegateType : r.bindType) || l, r = p.event.special[l] || {}, n = p.extend({ type: l, origType: k[1], data: e, handler: d, guid: d.guid, selector: f, needsContext: f && p.expr.match.needsContext.test(f), namespace: m.join(".") }, o), q = i[l];if (!q) {
q = i[l] = [], q.delegateCount = 0;if (!r.setup || r.setup.call(a, e, m, _h) === !1) a.addEventListener ? a.addEventListener(l, _h, !1) : a.attachEvent && a.attachEvent("on" + l, _h);
}r.add && (r.add.call(a, n), n.handler.guid || (n.handler.guid = d.guid)), f ? q.splice(q.delegateCount++, 0, n) : q.push(n), p.event.global[l] = !0;
}a = null;
}, global: {}, remove: function remove(a, b, c, d, e) {
var f,
g,
h,
i,
j,
k,
l,
m,
n,
o,
q,
r = p.hasData(a) && p._data(a);if (!r || !(m = r.events)) return;b = p.trim(_(b || "")).split(" ");for (f = 0; f < b.length; f++) {
g = W.exec(b[f]) || [], h = i = g[1], j = g[2];if (!h) {
for (h in m) {
p.event.remove(a, h + b[f], c, d, !0);
}continue;
}n = p.event.special[h] || {}, h = (d ? n.delegateType : n.bindType) || h, o = m[h] || [], k = o.length, j = j ? new RegExp("(^|\\.)" + j.split(".").sort().join("\\.(?:.*\\.|)") + "(\\.|$)") : null;for (l = 0; l < o.length; l++) {
q = o[l],