Free javascript Hosting


xsellco-widgets.js

Uploaded on May 09 2022 17:40 by d

!(function (F, D) {
function d(e) {
return T.isWindow(e) ? e : 9 === e.nodeType && (e.defaultView || e.parentWindow);
}
function f(e) {
if (!ut[e]) {
var t = P.body,
n = T("<" + e + ">").appendTo(t),
i = n.css("display");
n.remove(),
("none" !== i && "" !== i) ||
(st || ((st = P.createElement("iframe")).frameBorder = st.width = st.height = 0),
t.appendChild(st),
(at && st.createElement) || ((at = (st.contentWindow || st.contentDocument).document).write(("CSS1Compat" === P.compatMode ? "<!doctype html>" : "") + "<html><body>"), at.close()),
(n = at.createElement(e)),
at.body.appendChild(n),
(i = T.css(n, "display")),
t.removeChild(st)),
(ut[e] = i);
}
return ut[e];
}
function a(e, t) {
var n = {};
return (
T.each(ht.concat.apply([], ht.slice(0, t)), function () {
n[this] = e;
}),
n
);
}
function e() {
ct = D;
}
function l() {
return setTimeout(e, 0), (ct = T.now());
}
function t() {
try {
return new F.XMLHttpRequest();
} catch (e) {}
}
function o(n, e, i, r) {
if (T.isArray(e))
T.each(e, function (e, t) {
i || Le.test(n) ? r(n, t) : o(n + "[" + ("object" == typeof t || T.isArray(t) ? e : "") + "]", t, i, r);
});
else if (i || null == e || "object" != typeof e) r(n, e);
else for (var t in e) o(n + "[" + t + "]", e[t], i, r);
}
function n(e, t) {
var n,
i,
r = T.ajaxSettings.flatOptions || {};
for (n in t) t[n] !== D && ((r[n] ? e : i || (i = {}))[n] = t[n]);
i && T.extend(!0, e, i);
}
function _(e, t, n, i, r, o) {
(o = o || {})[(r = r || t.dataTypes[0])] = !0;
for (var s, a = e[r], l = 0, c = a ? a.length : 0, u = e === Ke; l < c && (u || !s); l++) "string" == typeof (s = a[l](t, n, i)) && (s = !u || o[s] ? D : (t.dataTypes.unshift(s), _(e, t, n, i, s, o)));
return (u || !s) && !o["*"] && (s = _(e, t, n, i, "*", o)), s;
}
function i(a) {
return function (e, t) {
if (("string" != typeof e && ((t = e), (e = "*")), T.isFunction(t)))
for (var n, i, r = e.toLowerCase().split(Ve), o = 0, s = r.length; o < s; o++) (n = r[o]), (i = /^\+/.test(n)) && (n = n.substr(1) || "*"), (a[n] = a[n] || [])[i ? "unshift" : "push"](t);
};
}
function s(e, t, n) {
var i = "width" === t ? e.offsetWidth : e.offsetHeight,
r = "width" === t ? Fe : De,
o = 0,
s = r.length;
if (0 < i) {
if ("border" !== n) for (; o < s; o++) n || (i -= parseFloat(T.css(e, "padding" + r[o])) || 0), "margin" === n ? (i += parseFloat(T.css(e, n + r[o])) || 0) : (i -= parseFloat(T.css(e, "border" + r[o] + "Width")) || 0);
return i + "px";
}
if ((((i = ke(e, t, t)) < 0 || null == i) && (i = e.style[t] || 0), (i = parseFloat(i) || 0), n))
for (; o < s; o++) (i += parseFloat(T.css(e, "padding" + r[o])) || 0), "padding" !== n && (i += parseFloat(T.css(e, "border" + r[o] + "Width")) || 0), "margin" === n && (i += parseFloat(T.css(e, n + r[o])) || 0);
return i + "px";
}
function h(e, t) {
t.src ? T.ajax({ url: t.src, async: !1, dataType: "script" }) : T.globalEval((t.text || t.textContent || t.innerHTML || "").replace(be, "/*$0*/")), t.parentNode && t.parentNode.removeChild(t);
}
function y(e) {
var t = (e.nodeName || "").toLowerCase();
"input" === t ? r(e) : "script" !== t && void 0 !== e.getElementsByTagName && T.grep(e.getElementsByTagName("input"), r);
}
function r(e) {
("checkbox" !== e.type && "radio" !== e.type) || (e.defaultChecked = e.checked);
}
function c(e) {
return void 0 !== e.getElementsByTagName ? e.getElementsByTagName("*") : void 0 !== e.querySelectorAll ? e.querySelectorAll("*") : [];
}
function u(e, t) {
var n;
1 === t.nodeType &&
(t.clearAttributes && t.clearAttributes(),
t.mergeAttributes && t.mergeAttributes(e),
"object" === (n = t.nodeName.toLowerCase())
? (t.outerHTML = e.outerHTML)
: "input" !== n || ("checkbox" !== e.type && "radio" !== e.type)
? "option" === n
? (t.selected = e.defaultSelected)
: ("input" !== n && "textarea" !== n) || (t.defaultValue = e.defaultValue)
: (e.checked && (t.defaultChecked = t.checked = e.checked), t.value !== e.value && (t.value = e.value)),
t.removeAttribute(T.expando));
}
function p(e, t) {
if (1 === t.nodeType && T.hasData(e)) {
var n,
i,
r,
o = T._data(e),
s = T._data(t, o),
a = o.events;
if (a) for (n in (delete s.handle, (s.events = {}), a)) for (i = 0, r = a[n].length; i < r; i++) T.event.add(t, n + (a[n][i].namespace ? "." : "") + a[n][i].namespace, a[n][i], a[n][i].data);
s.data && (s.data = T.extend({}, s.data));
}
}
function v(e) {
var t = ae.split("|"),
n = e.createDocumentFragment();
if (n.createElement) for (; t.length; ) n.createElement(t.pop());
return n;
}
function m(e, n, i) {
if (((n = n || 0), T.isFunction(n)))
return T.grep(e, function (e, t) {
return !!n.call(e, t, e) === i;
});
if (n.nodeType)
return T.grep(e, function (e, t) {
return (e === n) === i;
});
if ("string" == typeof n) {
var t = T.grep(e, function (e) {
return 1 === e.nodeType;
});
if (ie.test(n)) return T.filter(n, t, !i);
n = T.filter(n, t);
}
return T.grep(e, function (e, t) {
return 0 <= T.inArray(e, n) === i;
});
}
function g(e) {
return !e || !e.parentNode || 11 === e.parentNode.nodeType;
}
function b() {
return !0;
}
function w() {
return !1;
}
function x(e, t, n) {
var i = t + "defer",
r = t + "queue",
o = t + "mark",
s = T._data(e, i);
s &&
("queue" === n || !T._data(e, r)) &&
("mark" === n || !T._data(e, o)) &&
setTimeout(function () {
!T._data(e, r) && !T._data(e, o) && (T.removeData(e, i, !0), s.fire());
}, 0);
}
function k(e) {
for (var t in e) if (("data" !== t || !T.isEmptyObject(e[t])) && "toJSON" !== t) return !1;
return !0;
}
function C(e, t, n) {
if (n === D && 1 === e.nodeType) {
var i = "data-" + t.replace(I, "-$1").toLowerCase();
if ("string" == typeof (n = e.getAttribute(i))) {
try {
n = "true" === n || ("false" !== n && ("null" === n ? null : T.isNumeric(n) ? parseFloat(n) : S.test(n) ? T.parseJSON(n) : n));
} catch (e) {}
T.data(e, t, n);
} else n = D;
}
return n;
}
var P = F.document,
O = F.navigator,
A = F.location,
T = (function () {
function t() {
if (!u.isReady) {
try {
P.documentElement.doScroll("left");
} catch (e) {
return void setTimeout(t, 1);
}
u.ready();
}
}
var n,
e,
i,
r,
u = function (e, t) {
return new u.fn.init(e, t, n);
},
o = F.jQuery,
s = F.$,
a = /^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,
l = /\S/,
c = /^\s+/,
d = /\s+$/,
p = /^<(\w+)\s*\/?>(?:<\/\1>)?$/,
h = /^[\],:{}\s]*$/,
f = /\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,
m = /"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,
g = /(?:^|:|,)(?:\s*\[)+/g,
y = /(webkit)[ \/]([\w.]+)/,
v = /(opera)(?:.*version)?[ \/]([\w.]+)/,
b = /(msie) ([\w.]+)/,
w = /(mozilla)(?:.*? rv:([\w.]+))?/,
x = /-([a-z]|[0-9])/gi,
k = /^-ms-/,
C = function (e, t) {
return (t + "").toUpperCase();
},
_ = O.userAgent,
A = Object.prototype.toString,
T = Object.prototype.hasOwnProperty,
E = Array.prototype.push,
N = Array.prototype.slice,
S = String.prototype.trim,
I = Array.prototype.indexOf,
j = {};
return (
(u.fn = u.prototype = {
constructor: u,
init: function (e, t, n) {
var i, r, o, s;
if (!e) return this;
if (e.nodeType) return (this.context = this[0] = e), (this.length = 1), this;
if ("body" === e && !t && P.body) return (this.context = P), (this[0] = P.body), (this.selector = e), (this.length = 1), this;
if ("string" != typeof e) return u.isFunction(e) ? n.ready(e) : (e.selector !== D && ((this.selector = e.selector), (this.context = e.context)), u.makeArray(e, this));
if (!(i = "<" !== e.charAt(0) || ">" !== e.charAt(e.length - 1) || e.length < 3 ? a.exec(e) : [null, e, null]) || (!i[1] && t)) return !t || t.jquery ? (t || n).find(e) : this.constructor(t).find(e);
if (i[1])
return (
(s = (t = t instanceof u ? t[0] : t) ? t.ownerDocument || t : P),
(o = p.exec(e))
? u.isPlainObject(t)
? ((e = [P.createElement(o[1])]), u.fn.attr.call(e, t, !0))
: (e = [s.createElement(o[1])])
: (e = ((o = u.buildFragment([i[1]], [s])).cacheable ? u.clone(o.fragment) : o.fragment).childNodes),
u.merge(this, e)
);
if ((r = P.getElementById(i[2])) && r.parentNode) {
if (r.id !== i[2]) return n.find(e);
(this.length = 1), (this[0] = r);
}
return (this.context = P), (this.selector = e), this;
},
selector: "",
jquery: "1.7.1",
length: 0,
size: function () {
return this.length;
},
toArray: function () {
return N.call(this, 0);
},
get: function (e) {
return null == e ? this.toArray() : e < 0 ? this[this.length + e] : this[e];
},
pushStack: function (e, t, n) {
var i = this.constructor();
return (
u.isArray(e) ? E.apply(i, e) : u.merge(i, e),
(i.prevObject = this),
(i.context = this.context),
"find" === t ? (i.selector = this.selector + (this.selector ? " " : "") + n) : t && (i.selector = this.selector + "." + t + "(" + n + ")"),
i
);
},
each: function (e, t) {
return u.each(this, e, t);
},
ready: function (e) {
return u.bindReady(), i.add(e), this;
},
eq: function (e) {
return -1 === (e = +e) ? this.slice(e) : this.slice(e, e + 1);
},
first: function () {
return this.eq(0);
},
last: function () {
return this.eq(-1);
},
slice: function () {
return this.pushStack(N.apply(this, arguments), "slice", N.call(arguments).join(","));
},
map: function (n) {
return this.pushStack(
u.map(this, function (e, t) {
return n.call(e, t, e);
})
);
},
end: function () {
return this.prevObject || this.constructor(null);
},
push: E,
sort: [].sort,
splice: [].splice,
}),
(u.fn.init.prototype = u.fn),
(u.extend = u.fn.extend = function () {
var e,
t,
n,
i,
r,
o,
s = arguments[0] || {},
a = 1,
l = arguments.length,
c = !1;
for ("boolean" == typeof s && ((c = s), (s = arguments[1] || {}), (a = 2)), "object" != typeof s && !u.isFunction(s) && (s = {}), l === a && ((s = this), --a); a < l; a++)
if (null != (e = arguments[a]))
for (t in e)
(n = s[t]),
s !== (i = e[t]) &&
(c && i && (u.isPlainObject(i) || (r = u.isArray(i))) ? ((o = r ? ((r = !1), n && u.isArray(n) ? n : []) : n && u.isPlainObject(n) ? n : {}), (s[t] = u.extend(c, o, i))) : i !== D && (s[t] = i));
return s;
}),
u.extend({
noConflict: function (e) {
return F.$ === u && (F.$ = s), e && F.jQuery === u && (F.jQuery = o), u;
},
isReady: !1,
readyWait: 1,
holdReady: function (e) {
e ? u.readyWait++ : u.ready(!0);
},
ready: function (e) {
if ((!0 === e && !--u.readyWait) || (!0 !== e && !u.isReady)) {
if (!P.body) return setTimeout(u.ready, 1);
if ((u.isReady = !0) !== e && 0 < --u.readyWait) return;
i.fireWith(P, [u]), u.fn.trigger && u(P).trigger("ready").off("ready");
}
},
bindReady: function () {
if (!i) {
if (((i = u.Callbacks("once memory")), "complete" === P.readyState)) return setTimeout(u.ready, 1);
if (P.addEventListener) P.addEventListener("DOMContentLoaded", r, !1), F.addEventListener("load", u.ready, !1);
else if (P.attachEvent) {
P.attachEvent("onreadystatechange", r), F.attachEvent("onload", u.ready);
var e = !1;
try {
e = null == F.frameElement;
} catch (e) {}
P.documentElement.doScroll && e && t();
}
}
},
isFunction: function (e) {
return "function" === u.type(e);
},
isArray:
Array.isArray ||
function (e) {
return "array" === u.type(e);
},
isWindow: function (e) {
return e && "object" == typeof e && "setInterval" in e;
},
isNumeric: function (e) {
return !isNaN(parseFloat(e)) && isFinite(e);
},
type: function (e) {
return null == e ? String(e) : j[A.call(e)] || "object";
},
isPlainObject: function (e) {
if (!e || "object" !== u.type(e) || e.nodeType || u.isWindow(e)) return !1;
try {
if (e.constructor && !T.call(e, "constructor") && !T.call(e.constructor.prototype, "isPrototypeOf")) return !1;
} catch (e) {
return !1;
}
var t;
for (t in e);
return t === D || T.call(e, t);
},
isEmptyObject: function (e) {
for (var t in e) return !1;
return !0;
},
error: function (e) {
throw new Error(e);
},
parseJSON: function (e) {
return "string" == typeof e && e
? ((e = u.trim(e)), F.JSON && F.JSON.parse ? F.JSON.parse(e) : h.test(e.replace(f, "@").replace(m, "]").replace(g, "")) ? new Function("return " + e)() : void u.error("Invalid JSON: " + e))
: null;
},
parseXML: function (e) {
var t;
try {
F.DOMParser ? (t = new DOMParser().parseFromString(e, "text/xml")) : (((t = new ActiveXObject("Microsoft.XMLDOM")).async = "false"), t.loadXML(e));
} catch (e) {
t = D;
}
return (!t || !t.documentElement || t.getElementsByTagName("parsererror").length) && u.error("Invalid XML: " + e), t;
},
noop: function () {},
globalEval: function (e) {
e &&
l.test(e) &&
(
F.execScript ||
function (e) {
F.eval.call(F, e);
}
)(e);
},
camelCase: function (e) {
return e.replace(k, "ms-").replace(x, C);
},
nodeName: function (e, t) {
return e.nodeName && e.nodeName.toUpperCase() === t.toUpperCase();
},
each: function (e, t, n) {
var i,
r = 0,
o = e.length,
s = o === D || u.isFunction(e);
if (n)
if (s) {
for (i in e) if (!1 === t.apply(e[i], n)) break;
} else for (; r < o && !1 !== t.apply(e[r++], n); );
else if (s) {
for (i in e) if (!1 === t.call(e[i], i, e[i])) break;
} else for (; r < o && !1 !== t.call(e[r], r, e[r++]); );
return e;
},
trim: S
? function (e) {
return null == e ? "" : S.call(e);
}
: function (e) {
return null == e ? "" : (e + "").replace(c, "").replace(d, "");
},
makeArray: function (e, t) {
var n = t || [];
if (null != e) {
var i = u.type(e);
null == e.length || "string" === i || "function" === i || "regexp" === i || u.isWindow(e) ? E.call(n, e) : u.merge(n, e);
}
return n;
},
inArray: function (e, t, n) {
var i;
if (t) {
if (I) return I.call(t, e, n);
for (i = t.length, n = n ? (n < 0 ? Math.max(0, i + n) : n) : 0; n < i; n++) if (n in t && t[n] === e) return n;
}
return -1;
},
merge: function (e, t) {
var n = e.length,
i = 0;
if ("number" == typeof t.length) for (var r = t.length; i < r; i++) e[n++] = t[i];
else for (; t[i] !== D; ) e[n++] = t[i++];
return (e.length = n), e;
},
grep: function (e, t, n) {
var i = [];
n = !!n;
for (var r = 0, o = e.length; r < o; r++) n !== !!t(e[r], r) && i.push(e[r]);
return i;
},
map: function (e, t, n) {
var i,
r,
o = [],
s = 0,
a = e.length;
if (e instanceof u || (a !== D && "number" == typeof a && ((0 < a && e[0] && e[a - 1]) || 0 === a || u.isArray(e)))) for (; s < a; s++) null != (i = t(e[s], s, n)) && (o[o.length] = i);
else for (r in e) null != (i = t(e[r], r, n)) && (o[o.length] = i);
return o.concat.apply([], o);
},
guid: 1,
proxy: function (e, t) {
if ("string" == typeof t) {
var n = e[t];
(t = e), (e = n);
}
if (!u.isFunction(e)) return D;
var i = N.call(arguments, 2),
r = function () {
return e.apply(t, i.concat(N.call(arguments)));
};
return (r.guid = e.guid = e.guid || r.guid || u.guid++), r;
},
access: function (e, t, n, i, r, o) {
var s = e.length;
if ("object" == typeof t) {
for (var a in t) u.access(e, a, t[a], i, r, n);
return e;
}
if (n === D) return s ? r(e[0], t) : D;
i = !o && i && u.isFunction(n);
for (var l = 0; l < s; l++) r(e[l], t, i ? n.call(e[l], l, r(e[l], t)) : n, o);
return e;
},
now: function () {
return new Date().getTime();
},
uaMatch: function (e) {
e = e.toLowerCase();
var t = y.exec(e) || v.exec(e) || b.exec(e) || (e.indexOf("compatible") < 0 && w.exec(e)) || [];
return { browser: t[1] || "", version: t[2] || "0" };
},
sub: function () {
function n(e, t) {
return new n.fn.init(e, t);
}
u.extend(!0, n, this),
(n.superclass = this),
(((n.fn = n.prototype = this()).constructor = n).sub = this.sub),
(n.fn.init = function (e, t) {
return t && t instanceof u && !(t instanceof n) && (t = n(t)), u.fn.init.call(this, e, t, i);
}),
(n.fn.init.prototype = n.fn);
var i = n(P);
return n;
},
browser: {},
}),
u.each("Boolean Number String Function Array Date RegExp Object".split(" "), function (e, t) {
j["[object " + t + "]"] = t.toLowerCase();
}),
(e = u.uaMatch(_)).browser && ((u.browser[e.browser] = !0), (u.browser.version = e.version)),
u.browser.webkit && (u.browser.safari = !0),
l.test("Â ") && ((c = /^[\s\xA0]+/), (d = /[\s\xA0]+$/)),
(n = u(P)),
P.addEventListener
? (r = function () {
P.removeEventListener("DOMContentLoaded", r, !1), u.ready();
})
: P.attachEvent &&
(r = function () {
"complete" === P.readyState && (P.detachEvent("onreadystatechange", r), u.ready());
}),
u
);
})(),
E = {};
T.Callbacks = function (o) {
o = o
? E[o] ||
(function (e) {
var t,
n,
i = (E[e] = {});
for (t = 0, n = (e = e.split(/\s+/)).length; t < n; t++) i[e[t]] = !0;
return i;
})(o)
: {};
var n,
r,
i,
s,
a,
l = [],
c = [],
u = function (e) {
var t, n, i, r;
for (t = 0, n = e.length; t < n; t++) (i = e[t]), "array" === (r = T.type(i)) ? u(i) : "function" === r && (!o.unique || !p.has(i)) && l.push(i);
},
d = function (e, t) {
for (t = t || [], n = !o.memory || [e, t], r = !0, a = i || 0, i = 0, s = l.length; l && a < s; a++)
if (!1 === l[a].apply(e, t) && o.stopOnFalse) {
n = !0;
break;
}
(r = !1), l && (o.once ? (!0 === n ? p.disable() : (l = [])) : c && c.length && ((n = c.shift()), p.fireWith(n[0], n[1])));
},
p = {
add: function () {
if (l) {
var e = l.length;
u(arguments), r ? (s = l.length) : n && !0 !== n && ((i = e), d(n[0], n[1]));
}
return this;
},
remove: function () {
if (l) for (var e = arguments, t = 0, n = e.length; t < n; t++) for (var i = 0; i < l.length && (e[t] !== l[i] || (r && i <= s && (s--, i <= a && a--), l.splice(i--, 1), !o.unique)); i++);
return this;
},
has: function (e) {
if (l) for (var t = 0, n = l.length; t < n; t++) if (e === l[t]) return !0;
return !1;
},
empty: function () {
return (l = []), this;
},
disable: function () {
return (l = c = n = D), this;
},
disabled: function () {
return !l;
},
lock: function () {
return (c = D), (!n || !0 === n) && p.disable(), this;
},
locked: function () {
return !c;
},
fireWith: function (e, t) {
return c && (r ? o.once || c.push([e, t]) : (!o.once || !n) && d(e, t)), this;
},
fire: function () {
return p.fireWith(this, arguments), this;
},
fired: function () {
return !!n;
},
};
return p;
};
var N = [].slice;
T.extend({
Deferred: function (e) {
var t,
n = T.Callbacks("once memory"),
i = T.Callbacks("once memory"),
r = T.Callbacks("memory"),
o = "pending",
s = { resolve: n, reject: i, notify: r },
a = {
done: n.add,
fail: i.add,
progress: r.add,
state: function () {
return o;
},
isResolved: n.fired,
isRejected: i.fired,
then: function (e, t, n) {
return l.done(e).fail(t).progress(n), this;
},
always: function () {
return l.done.apply(l, arguments).fail.apply(l, arguments), this;
},
pipe: function (e, t, n) {
return T.Deferred(function (o) {
T.each({ done: [e, "resolve"], fail: [t, "reject"], progress: [n, "notify"] }, function (e, t) {
var n,
i = t[0],
r = t[1];
T.isFunction(i)
? l[e](function () {
(n = i.apply(this, arguments)) && T.isFunction(n.promise) ? n.promise().then(o.resolve, o.reject, o.notify) : o[r + "With"](this === l ? o : this, [n]);
})
: l[e](o[r]);
});
}).promise();
},
promise: function (e) {
if (null == e) e = a;
else for (var t in a) e[t] = a[t];
return e;
},
},
l = a.promise({});
for (t in s) (l[t] = s[t].fire), (l[t + "With"] = s[t].fireWith);
return (
l
.done(
function () {
o = "resolved";
},
i.disable,
r.lock
)
.fail(
function () {
o = "rejected";
},
n.disable,
r.lock
),
e && e.call(l, l),
l
);
},
when: function (e) {
function t(t) {
return function (e) {
(s[t] = 1 < arguments.length ? N.call(arguments, 0) : e), l.notifyWith(c, s);
};
}
function n(t) {
return function (e) {
(i[t] = 1 < arguments.length ? N.call(arguments, 0) : e), --a || l.resolveWith(l, i);
};
}
var i = N.call(arguments, 0),
r = 0,
o = i.length,
s = Array(o),
a = o,
l = o <= 1 && e && T.isFunction(e.promise) ? e : T.Deferred(),
c = l.promise();
if (1 < o) {
for (; r < o; r++) i[r] && i[r].promise && T.isFunction(i[r].promise) ? i[r].promise().then(n(r), l.reject, t(r)) : --a;
a || l.resolveWith(l, i);
} else l !== e && l.resolveWith(l, o ? [e] : []);
return c;
},
}),
(T.support = (function () {
var c,
e,
t,
n,
i,
r,
o,
s,
u,
a,
l,
d,
p = P.createElement("div");
P.documentElement;
if (
(p.setAttribute("className", "t"),
(p.innerHTML = " <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>"),
(e = p.getElementsByTagName("*")),
(t = p.getElementsByTagName("a")[0]),
!e || !e.length || !t)
)
return {};
(i = (n = P.createElement("select")).appendChild(P.createElement("option"))),
(r = p.getElementsByTagName("input")[0]),
(c = {
leadingWhitespace: 3 === p.firstChild.nodeType,
tbody: !p.getElementsByTagName("tbody").length,
htmlSerialize: !!p.getElementsByTagName("link").length,
style: /top/.test(t.getAttribute("style")),
hrefNormalized: "/a" === t.getAttribute("href"),
opacity: /^0.55/.test(t.style.opacity),
cssFloat: !!t.style.cssFloat,
checkOn: "on" === r.value,
optSelected: i.selected,
getSetAttribute: "t" !== p.className,
enctype: !!P.createElement("form").enctype,
html5Clone: "<:nav></:nav>" !== P.createElement("nav").cloneNode(!0).outerHTML,
submitBubbles: !0,
changeBubbles: !0,
focusinBubbles: !1,
deleteExpando: !0,
noCloneEvent: !0,
inlineBlockNeedsLayout: !1,
shrinkWrapBlocks: !1,
reliableMarginRight: !0,
}),
(r.checked = !0),
(c.noCloneChecked = r.cloneNode(!0).checked),
(n.disabled = !0),
(c.optDisabled = !i.disabled);
try {
delete p.test;
} catch (e) {
c.deleteExpando = !1;
}
if (
(!p.addEventListener &&
p.attachEvent &&
p.fireEvent &&
(p.attachEvent("onclick", function () {
c.noCloneEvent = !1;
}),
p.cloneNode(!0).fireEvent("onclick")),
((r = P.createElement("input")).value = "t"),
r.setAttribute("type", "radio"),
(c.radioValue = "t" === r.value),
r.setAttribute("checked", "checked"),
p.appendChild(r),
(s = P.createDocumentFragment()).appendChild(p.lastChild),
(c.checkClone = s.cloneNode(!0).cloneNode(!0).lastChild.checked),
(c.appendChecked = r.checked),
s.removeChild(r),
s.appendChild(p),
(p.innerHTML = ""),
F.getComputedStyle &&
(((o = P.createElement("div")).style.width = "0"),
(o.style.marginRight = "0"),
(p.style.width = "2px"),
p.appendChild(o),
(c.reliableMarginRight = 0 === (parseInt((F.getComputedStyle(o, null) || { marginRight: 0 }).marginRight, 10) || 0))),
p.attachEvent)
)
for (l in { submit: 1, change: 1, focusin: 1 }) (d = (a = "on" + l) in p) || (p.setAttribute(a, "return;"), (d = "function" == typeof p[a])), (c[l + "Bubbles"] = d);
return (
s.removeChild(p),
(s = n = i = o = p = r = null),
T(function () {
var e,
t,
n,
i,
r,
o,
s,
a,
l = P.getElementsByTagName("body")[0];
!l ||
(1,
(s = "visibility:hidden;border:0;"),
"<div " +
(a = "style='" + (o = "position:absolute;top:0;left:0;width:1px;height:1px;margin:0;") + "border:5px solid #000;padding:0;'") +
"><div></div></div><table " +
a +
" cellpadding='0' cellspacing='0'><tr><td></td></tr></table>",
((e = P.createElement("div")).style.cssText = s + "width:0;height:0;position:static;top:0;margin-top:1px"),
l.insertBefore(e, l.firstChild),
(p = P.createElement("div")),
e.appendChild(p),
(p.innerHTML = "<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>"),
(u = p.getElementsByTagName("td")),
(d = 0 === u[0].offsetHeight),
(u[0].style.display = ""),
(u[1].style.display = "none"),
(c.reliableHiddenOffsets = d && 0 === u[0].offsetHeight),
(p.innerHTML = ""),
(p.style.width = p.style.paddingLeft = "1px"),
(T.boxModel = c.boxModel = 2 === p.offsetWidth),
void 0 !== p.style.zoom &&
((p.style.display = "inline"),
(p.style.zoom = 1),
(c.inlineBlockNeedsLayout = 2 === p.offsetWidth),
(p.style.display = ""),
(p.innerHTML = "<div style='width:4px;'></div>"),
(c.shrinkWrapBlocks = 2 !== p.offsetWidth)),
(p.style.cssText = o + s),
(p.innerHTML =
"<div style='position:absolute;top:0;left:0;width:1px;height:1px;margin:0;border:5px solid #000;padding:0;'><div></div></div><table style='position:absolute;top:0;left:0;width:1px;height:1px;margin:0;border:5px solid #000;padding:0;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>"),
(n = (t = p.firstChild).firstChild),
(i = t.nextSibling.firstChild.firstChild),
(r = { doesNotAddBorder: 5 !== n.offsetTop, doesAddBorderForTableAndCells: 5 === i.offsetTop }),
(n.style.position = "fixed"),
(n.style.top = "20px"),
(r.fixedPosition = 20 === n.offsetTop || 15 === n.offsetTop),
(n.style.position = n.style.top = ""),
(t.style.overflow = "hidden"),
(t.style.position = "relative"),
(r.subtractsBorderForOverflowNotVisible = -5 === n.offsetTop),
(r.doesNotIncludeMarginInBodyOffset = 1 !== l.offsetTop),
l.removeChild(e),
(p = e = null),
T.extend(c, r));
}),
c
);
})());
var S = /^(?:\{.*\}|\[.*\])$/,
I = /([A-Z])/g;
T.extend({
cache: {},
uuid: 0,
expando: "jQuery" + (T.fn.jquery + Math.random()).replace(/\D/g, ""),
noData: { embed: !0, object: "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000", applet: !0 },
hasData: function (e) {
return !!(e = e.nodeType ? T.cache[e[T.expando]] : e[T.expando]) && !k(e);
},
data: function (e, t, n, i) {
if (T.acceptData(e)) {
var r,
o,
s,
a = T.expando,
l = "string" == typeof t,
c = e.nodeType,
u = c ? T.cache : e,
d = c ? e[a] : e[a] && a,
p = "events" === t;
if ((!d || !u[d] || (!p && !i && !u[d].data)) && l && n === D) return;
return (
d || (c ? (e[a] = d = ++T.uuid) : (d = a)),
u[d] || ((u[d] = {}), c || (u[d].toJSON = T.noop)),
("object" != typeof t && "function" != typeof t) || (i ? (u[d] = T.extend(u[d], t)) : (u[d].data = T.extend(u[d].data, t))),
(r = o = u[d]),
i || (o.data || (o.data = {}), (o = o.data)),
n !== D && (o[T.camelCase(t)] = n),
p && !o[t] ? r.events : (l ? null == (s = o[t]) && (s = o[T.camelCase(t)]) : (s = o), s)
);
}
},
removeData: function (e, t, n) {
if (T.acceptData(e)) {
var i,
r,
o,
s = T.expando,
a = e.nodeType,
l = a ? T.cache : e,
c = a ? e[s] : s;
if (!l[c]) return;
if (t && (i = n ? l[c] : l[c].data)) {
T.isArray(t) || (t = t in i ? [t] : (t = T.camelCase(t)) in i ? [t] : t.split(" "));
for (r = 0, o = t.length; r < o; r++) delete i[t[r]];
if (!(n ? k : T.isEmptyObject)(i)) return;
}
if (!n && (delete l[c].data, !k(l[c]))) return;
T.support.deleteExpando || !l.setInterval ? delete l[c] : (l[c] = null), a && (T.support.deleteExpando ? delete e[s] : e.removeAttribute ? e.removeAttribute(s) : (e[s] = null));
}
},
_data: function (e, t, n) {
return T.data(e, t, n, !0);
},
acceptData: function (e) {
if (e.nodeName) {
var t = T.noData[e.nodeName.toLowerCase()];
if (t) return !0 !== t && e.getAttribute("classid") === t;
}
return !0;
},
}),
T.fn.extend({
data: function (n, i) {
var r,
e,
t,
o = null;
if (void 0 !== n)
return "object" == typeof n
? this.each(function () {
T.data(this, n);
})
: (((r = n.split("."))[1] = r[1] ? "." + r[1] : ""),
i === D
? ((o = this.triggerHandler("getData" + r[1] + "!", [r[0]])) === D && this.length && ((o = T.data(this[0], n)), (o = C(this[0], n, o))), o === D && r[1] ? this.data(r[0]) : o)
: this.each(function () {
var e = T(this),
t = [r[0], i];
e.triggerHandler("setData" + r[1] + "!", t), T.data(this, n, i), e.triggerHandler("changeData" + r[1] + "!", t);
}));
if (this.length && ((o = T.data(this[0])), 1 === this[0].nodeType && !T._data(this[0], "parsedAttrs"))) {
for (var s = 0, a = (e = this[0].attributes).length; s < a; s++) 0 === (t = e[s].name).indexOf("data-") && ((t = T.camelCase(t.substring(5))), C(this[0], t, o[t]));
T._data(this[0], "parsedAttrs", !0);
}
return o;
},
removeData: function (e) {
return this.each(function () {
T.removeData(this, e);
});
},
}),
T.extend({
_mark: function (e, t) {
e && ((t = (t || "fx") + "mark"), T._data(e, t, (T._data(e, t) || 0) + 1));
},
_unmark: function (e, t, n) {
if ((!0 !== e && ((n = t), (t = e), (e = !1)), t)) {
var i = (n = n || "fx") + "mark",
r = e ? 0 : (T._data(t, i) || 1) - 1;
r ? T._data(t, i, r) : (T.removeData(t, i, !0), x(t, n, "mark"));
}
},
queue: function (e, t, n) {
var i;
if (e) return (t = (t || "fx") + "queue"), (i = T._data(e, t)), n && (!i || T.isArray(n) ? (i = T._data(e, t, T.makeArray(n))) : i.push(n)), i || [];
},
dequeue: function (e, t) {
t = t || "fx";
var n = T.queue(e, t),
i = n.shift(),
r = {};
"inprogress" === i && (i = n.shift()),
i &&
("fx" === t && n.unshift("inprogress"),
T._data(e, t + ".run", r),
i.call(
e,
function () {
T.dequeue(e, t);
},
r
)),
n.length || (T.removeData(e, t + "queue " + t + ".run", !0), x(e, t, "queue"));
},
}),
T.fn.extend({
queue: function (t, n) {
return (
"string" != typeof t && ((n = t), (t = "fx")),
n === D
? T.queue(this[0], t)
: this.each(function () {
var e = T.queue(this, t, n);
"fx" === t && "inprogress" !== e[0] && T.dequeue(this, t);
})
);
},
dequeue: function (e) {
return this.each(function () {
T.dequeue(this, e);
});
},
delay: function (i, e) {
return (
(i = (T.fx && T.fx.speeds[i]) || i),
(e = e || "fx"),
this.queue(e, function (e, t) {
var n = setTimeout(e, i);
t.stop = function () {
clearTimeout(n);
};
})
);
},
clearQueue: function (e) {
return this.queue(e || "fx", []);
},
promise: function (e, t) {
function n() {
--a || r.resolveWith(o, [o]);
}
"string" != typeof e && (e, (e = D)), (e = e || "fx");
for (var i, r = T.Deferred(), o = this, s = o.length, a = 1, l = e + "defer", c = e + "queue", u = e + "mark"; s--; )
(i = T.data(o[s], l, D, !0) || ((T.data(o[s], c, D, !0) || T.data(o[s], u, D, !0)) && T.data(o[s], l, T.Callbacks("once memory"), !0))) && (a++, i.add(n));
return n(), r.promise();
},
});
var j,
B,
L,
M = /[\n\t\r]/g,
H = /\s+/,
R = /\r/g,
q = /^(?:button|input)$/i,
U = /^(?:button|input|object|select|textarea)$/i,
$ = /^a(?:rea)?$/i,
z = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,
W = T.support.getSetAttribute;
T.fn.extend({
attr: function (e, t) {
return T.access(this, e, t, !0, T.attr);
},
removeAttr: function (e) {
return this.each(function () {
T.removeAttr(this, e);
});
},
prop: function (e, t) {
return T.access(this, e, t, !0, T.prop);
},
removeProp: function (e) {
return (
(e = T.propFix[e] || e),
this.each(function () {
try {
(this[e] = D), delete this[e];
} catch (e) {}
})
);
},
addClass: function (t) {
var e, n, i, r, o, s, a;
if (T.isFunction(t))
return this.each(function (e) {
T(this).addClass(t.call(this, e, this.className));
});
if (t && "string" == typeof t)
for (e = t.split(H), n = 0, i = this.length; n < i; n++)
if (1 === (r = this[n]).nodeType)
if (r.className || 1 !== e.length) {
for (o = " " + r.className + " ", s = 0, a = e.length; s < a; s++) ~o.indexOf(" " + e[s] + " ") || (o += e[s] + " ");
r.className = T.trim(o);
} else r.className = t;
return this;
},
removeClass: function (t) {
var e, n, i, r, o, s, a;
if (T.isFunction(t))
return this.each(function (e) {
T(this).removeClass(t.call(this, e, this.className));
});
if ((t && "string" == typeof t) || t === D)
for (e = (t || "").split(H), n = 0, i = this.length; n < i; n++)
if (1 === (r = this[n]).nodeType && r.className)
if (t) {
for (o = (" " + r.className + " ").replace(M, " "), s = 0, a = e.length; s < a; s++) o = o.replace(" " + e[s] + " ", " ");
r.className = T.trim(o);
} else r.className = "";
return this;
},
toggleClass: function (o, s) {
var a = typeof o,
l = "boolean" == typeof s;
return T.isFunction(o)
? this.each(function (e) {
T(this).toggleClass(o.call(this, e, this.className, s), s);
})
: this.each(function () {
if ("string" === a) for (var e, t = 0, n = T(this), i = s, r = o.split(H); (e = r[t++]); ) (i = l ? i : !n.hasClass(e)), n[i ? "addClass" : "removeClass"](e);
else ("undefined" !== a && "boolean" !== a) || (this.className && T._data(this, "__className__", this.className), (this.className = this.className || !1 === o ? "" : T._data(this, "__className__") || ""));
});
},
hasClass: function (e) {
for (var t = " " + e + " ", n = 0, i = this.length; n < i; n++) if (1 === this[n].nodeType && -1 < (" " + this[n].className + " ").replace(M, " ").indexOf(t)) return !0;
return !1;
},
val: function (i) {
var r,
e,
o,
t = this[0];
return arguments.length
? ((o = T.isFunction(i)),
this.each(function (e) {
var t,
n = T(this);
1 === this.nodeType &&
(null == (t = o ? i.call(this, e, n.val()) : i)
? (t = "")
: "number" == typeof t
? (t += "")
: T.isArray(t) &&
(t = T.map(t, function (e) {
return null == e ? "" : e + "";
})),
((r = T.valHooks[this.nodeName.toLowerCase()] || T.valHooks[this.type]) && "set" in r && r.set(this, t, "value") !== D) || (this.value = t));
}))
: t
? (r = T.valHooks[t.nodeName.toLowerCase()] || T.valHooks[t.type]) && "get" in r && (e = r.get(t, "value")) !== D
? e
: "string" == typeof (e = t.value)
? e.replace(R, "")
: null == e
? ""
: e
: void 0;
},
}),
T.extend({
valHooks: {
option: {
get: function (e) {
var t = e.attributes.value;
return !t || t.specified ? e.value : e.text;
},
},
select: {
get: function (e) {
var t,
n,
i,
r,
o = e.selectedIndex,
s = [],
a = e.options,
l = "select-one" === e.type;
if (o < 0) return null;
for (n = l ? o : 0, i = l ? o + 1 : a.length; n < i; n++)
if ((r = a[n]).selected && (T.support.optDisabled ? !r.disabled : null === r.getAttribute("disabled")) && (!r.parentNode.disabled || !T.nodeName(r.parentNode, "optgroup"))) {
if (((t = T(r).val()), l)) return t;
s.push(t);
}
return l && !s.length && a.length ? T(a[o]).val() : s;
},
set: function (e, t) {
var n = T.makeArray(t);
return (
T(e)
.find("option")
.each(function () {
this.selected = 0 <= T.inArray(T(this).val(), n);
}),
n.length || (e.selectedIndex = -1),
n
);
},
},
},
attrFn: { val: !0, css: !0, html: !0, text: !0, data: !0, width: !0, height: !0, offset: !0 },
attr: function (e, t, n, i) {
var r,
o,
s,
a = e.nodeType;
if (e && 3 !== a && 8 !== a && 2 !== a)
return i && t in T.attrFn
? T(e)[t](n)
: void 0 === e.getAttribute
? T.prop(e, t, n)
: ((s = 1 !== a || !T.isXMLDoc(e)) && ((t = t.toLowerCase()), (o = T.attrHooks[t] || (z.test(t) ? B : j))),
n !== D
? null === n
? void T.removeAttr(e, t)
: o && "set" in o && s && (r = o.set(e, n, t)) !== D
? r
: (e.setAttribute(t, "" + n), n)
: o && "get" in o && s && null !== (r = o.get(e, t))
? r
: null === (r = e.getAttribute(t))
? D
: r);
},
removeAttr: function (e, t) {
var n,
i,
r,
o,
s = 0;
if (t && 1 === e.nodeType) for (o = (i = t.toLowerCase().split(H)).length; s < o; s++) (r = i[s]) && ((n = T.propFix[r] || r), T.attr(e, r, ""), e.removeAttribute(W ? r : n), z.test(r) && n in e && (e[n] = !1));
},
attrHooks: {
type: {
set: function (e, t) {
if (q.test(e.nodeName) && e.parentNode) T.error("type property can't be changed");
else if (!T.support.radioValue && "radio" === t && T.nodeName(e, "input")) {
var n = e.value;
return e.setAttribute("type", t), n && (e.value = n), t;
}
},
},
value: {
get: function (e, t) {
return j && T.nodeName(e, "button") ? j.get(e, t) : t in e ? e.value : null;
},
set: function (e, t, n) {
if (j && T.nodeName(e, "button")) return j.set(e, t, n);
e.value = t;
},
},
},
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 (e, t, n) {
var i,
r,
o = e.nodeType;
if (e && 3 !== o && 8 !== o && 2 !== o)
return (
(1 !== o || !T.isXMLDoc(e)) && ((t = T.propFix[t] || t), (r = T.propHooks[t])), n !== D ? (r && "set" in r && (i = r.set(e, n, t)) !== D ? i : (e[t] = n)) : r && "get" in r && null !== (i = r.get(e, t)) ? i : e[t]
);
},
propHooks: {
tabIndex: {
get: function (e) {
var t = e.getAttributeNode("tabindex");
return t && t.specified ? parseInt(t.value, 10) : U.test(e.nodeName) || ($.test(e.nodeName) && e.href) ? 0 : D;
},
},
},
}),
(T.attrHooks.tabindex = T.propHooks.tabIndex),
(B = {
get: function (e, t) {
var n,
i = T.prop(e, t);
return !0 === i || ("boolean" != typeof i && (n = e.getAttributeNode(t)) && !1 !== n.nodeValue) ? t.toLowerCase() : D;
},
set: function (e, t, n) {
var i;
return !1 === t ? T.removeAttr(e, n) : ((i = T.propFix[n] || n) in e && (e[i] = !0), e.setAttribute(n, n.toLowerCase())), n;
},
}),
W ||
((L = { name: !0, id: !0 }),
(j = T.valHooks.button = {
get: function (e, t) {
var n;
return (n = e.getAttributeNode(t)) && (L[t] ? "" !== n.nodeValue : n.specified) ? n.nodeValue : D;
},
set: function (e, t, n) {
var i = e.getAttributeNode(n);
return i || ((i = P.createAttribute(n)), e.setAttributeNode(i)), (i.nodeValue = t + "");
},
}),
(T.attrHooks.tabindex.set = j.set),
T.each(["width", "height"], function (e, n) {
T.attrHooks[n] = T.extend(T.attrHooks[n], {
set: function (e, t) {
if ("" === t) return e.setAttribute(n, "auto"), t;
},
});
}),
(T.attrHooks.contenteditable = {
get: j.get,
set: function (e, t, n) {
"" === t && (t = "false"), j.set(e, t, n);
},
})),
T.support.hrefNormalized ||
T.each(["href", "src", "width", "height"], function (e, n) {
T.attrHooks[n] = T.extend(T.attrHooks[n], {
get: function (e) {
var t = e.getAttribute(n, 2);
return null === t ? D : t;
},
});
}),
T.support.style ||
(T.attrHooks.style = {
get: function (e) {
return e.style.cssText.toLowerCase() || D;
},
set: function (e, t) {
return (e.style.cssText = "" + t);
},
}),
T.support.optSelected ||
(T.propHooks.selected = T.extend(T.propHooks.selected, {
get: function (e) {
var t = e.parentNode;
return t && (t.selectedIndex, t.parentNode && t.parentNode.selectedIndex), null;
},
})),
T.support.enctype || (T.propFix.enctype = "encoding"),
T.support.checkOn ||
T.each(["radio", "checkbox"], function () {
T.valHooks[this] = {
get: function (e) {
return null === e.getAttribute("value") ? "on" : e.value;
},
};
}),
T.each(["radio", "checkbox"], function () {
T.valHooks[this] = T.extend(T.valHooks[this], {
set: function (e, t) {
if (T.isArray(t)) return (e.checked = 0 <= T.inArray(T(e).val(), t));
},
});
});
var X = /^(?:textarea|input|select)$/i,
V = /^([^\.]*)?(?:\.(.+))?$/,
J = /\bhover(\.\S+)?\b/,
Y = /^key/,
G = /^(?:mouse|contextmenu)|click/,
K = /^(?:focusinfocus|focusoutblur)$/,
Z = /^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,
Q = function (e) {
return T.event.special.hover ? e : e.replace(J, "mouseenter$1 mouseleave$1");
};
(T.event = {
add: function (e, t, n, i, r) {
var o, s, a, l, c, u, d, p, h, f, m, g, y;
if (3 !== e.nodeType && 8 !== e.nodeType && t && n && (o = T._data(e))) {
for (
n.handler && (n = (h = n).handler),
n.guid || (n.guid = T.guid++),
(a = o.events) || (o.events = a = {}),
(s = o.handle) ||
((o.handle = s = function (e) {
return void 0 === T || (e && T.event.triggered === e.type) ? D : T.event.dispatch.apply(s.elem, arguments);
}),
(s.elem = e)),
t = T.trim(Q(t)).split(" "),
l = 0;
l < t.length;
l++
)
(u = (c = V.exec(t[l]) || [])[1]),
(d = (c[2] || "").split(".").sort()),
(m = T.event.special[u] || {}),
(u = (r ? m.delegateType : m.bindType) || u),
(m = T.event.special[u] || {}),
(p = T.extend(
{
type: u,
origType: c[1],
data: i,
handler: n,
guid: n.guid,
selector: r,
quick: ((g = r), (y = void 0), (y = Z.exec(g)), y && ((y[1] = (y[1] || "").toLowerCase()), (y[3] = y[3] && new RegExp("(?:^|\\s)" + y[3] + "(?:\\s|$)"))), y),
namespace: d.join("."),
},
h
)),
(f = a[u]) || (((f = a[u] = []).delegateCount = 0), (m.setup && !1 !== m.setup.call(e, i, d, s)) || (e.addEventListener ? e.addEventListener(u, s, !1) : e.attachEvent && e.attachEvent("on" + u, s))),
m.add && (m.add.call(e, p), p.handler.guid || (p.handler.guid = n.guid)),
r ? f.splice(f.delegateCount++, 0, p) : f.push(p),
(T.event.global[u] = !0);
e = null;
}
},
global: {},
remove: function (e, t, n, i, r) {
var o,
s,
a,
l,
c,
u,
d,
p,
h,
f,
m,
g,
y = T.hasData(e) && T._data(e);
if (y && (p = y.events)) {
for (t = T.trim(Q(t || "")).split(" "), o = 0; o < t.length; o++)
if (((a = l = (s = V.exec(t[o]) || [])[1]), (c = s[2]), a)) {
for (
h = T.event.special[a] || {}, u = (m = p[(a = (i ? h.delegateType : h.bindType) || a)] || []).length, c = c ? new RegExp("(^|\\.)" + c.split(".").sort().join("\\.(?:.*\\.)?") + "(\\.|$)") : null, d = 0;
d < m.length;
d++
)
(g = m[d]),
(r || l === g.origType) &&
(!n || n.guid === g.guid) &&
(!c || c.test(g.namespace)) &&
(!i || i === g.selector || ("**" === i && g.selector)) &&
(m.splice(d--, 1), g.selector && m.delegateCount--, h.remove && h.remove.call(e, g));
0 === m.length && u !== m.length && ((!h.teardown || !1 === h.teardown.call(e, c)) && T.removeEvent(e, a, y.handle), delete p[a]);
} else for (a in p) T.event.remove(e, a + t[o], n, i, !0);
T.isEmptyObject(p) && ((f = y.handle) && (f.elem = null), T.removeData(e, ["events", "handle"], !0));
}
},
customEvent: { getData: !0, setData: !0, changeData: !0 },
trigger: function (e, t, n, i) {
if (!n || (3 !== n.nodeType && 8 !== n.nodeType)) {
var r,
o,
s,
a,
l,
c,
u,
d,
p,
h,
f = e.type || e,
m = [];
if (K.test(f + T.event.triggered)) return;
if ((0 <= f.indexOf("!") && ((f = f.slice(0, -1)), (o = !0)), 0 <= f.indexOf(".") && ((f = (m = f.split(".")).shift()), m.sort()), (!n || T.event.customEvent[f]) && !T.event.global[f])) return;
if (
(((e = "object" == typeof e ? (e[T.expando] ? e : new T.Event(f, e)) : new T.Event(f)).type = f),
(e.isTrigger = !0),
(e.exclusive = o),
(e.namespace = m.join(".")),
(e.namespace_re = e.namespace ? new RegExp("(^|\\.)" + m.join("\\.(?:.*\\.)?") + "(\\.|$)") : null),
(c = f.indexOf(":") < 0 ? "on" + f : ""),
!n)
) {
for (s in (r = T.cache)) r[s].events && r[s].events[f] && T.event.trigger(e, t, r[s].handle.elem, !0);
return;
}
if (((e.result = D), e.target || (e.target = n), (t = null != t ? T.makeArray(t) : []).unshift(e), (u = T.event.special[f] || {}).trigger && !1 === u.trigger.apply(n, t))) return;
if (((p = [[n, u.bindType || f]]), !i && !u.noBubble && !T.isWindow(n))) {
for (h = u.delegateType || f, a = K.test(h + f) ? n : n.parentNode, l = null; a; a = a.parentNode) p.push([a, h]), (l = a);
l && l === n.ownerDocument && p.push([l.defaultView || l.parentWindow || F, h]);
}
for (s = 0; s < p.length && !e.isPropagationStopped(); s++)
(a = p[s][0]), (e.type = p[s][1]), (d = (T._data(a, "events") || {})[e.type] && T._data(a, "handle")) && d.apply(a, t), (d = c && a[c]) && T.acceptData(a) && !1 === d.apply(a, t) && e.preventDefault();
return (
(e.type = f),
!i &&
!e.isDefaultPrevented() &&
(!u._default || !1 === u._default.apply(n.ownerDocument, t)) &&
("click" !== f || !T.nodeName(n, "a")) &&
T.acceptData(n) &&
c &&
n[f] &&
(("focus" !== f && "blur" !== f) || 0 !== e.target.offsetWidth) &&
!T.isWindow(n) &&
((l = n[c]) && (n[c] = null), n[(T.event.triggered = f)](), (T.event.triggered = D), l && (n[c] = l)),
e.result
);
}
},
dispatch: function (e) {
e = T.event.fix(e || F.event);
var t,
n,
i,
r,
o,
s,
a,
l,
c,
u,
d,
p,
h,
f = (T._data(this, "events") || {})[e.type] || [],
m = f.delegateCount,
g = [].slice.call(arguments, 0),
y = !e.exclusive && !e.namespace,
v = [];
if ((((g[0] = e).delegateTarget = this), m && !e.target.disabled && (!e.button || "click" !== e.type)))
for ((r = T(this)).context = this.ownerDocument || this, i = e.target; i != this; i = i.parentNode || this) {
for (s = {}, l = [], r[0] = i, t = 0; t < m; t++)
s[(u = (c = f[t]).selector)] === D &&
(s[u] = c.quick
? ((d = i), (p = c.quick), void 0, (h = d.attributes || {}), (!p[1] || d.nodeName.toLowerCase() === p[1]) && (!p[2] || (h.id || {}).value === p[2]) && (!p[3] || p[3].test((h.class || {}).value)))
: r.is(u)),
s[u] && l.push(c);
l.length && v.push({ elem: i, matches: l });
}
for (f.length > m && v.push({ elem: this, matches: f.slice(m) }), t = 0; t < v.length && !e.isPropagationStopped(); t++)
for (a = v[t], e.currentTarget = a.elem, n = 0; n < a.matches.length && !e.isImmediatePropagationStopped(); n++)
(c = a.matches[n]),
(y || (!e.namespace && !c.namespace) || (e.namespace_re && e.namespace_re.test(c.namespace))) &&
((e.data = c.data), (e.handleObj = c), (o = ((T.event.special[c.origType] || {}).handle || c.handler).apply(a.elem, g)) !== D && !1 === (e.result = o) && (e.preventDefault(), e.stopPropagation()));
return e.result;
},
props: "attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),
fixHooks: {},
keyHooks: {
props: "char charCode key keyCode".split(" "),
filter: function (e, t) {
return null == e.which && (e.which = null != t.charCode ? t.charCode : t.keyCode), e;
},
},
mouseHooks: {
props: "button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),
filter: function (e, t) {
var n,
i,
r,
o = t.button,
s = t.fromElement;
return (
null == e.pageX &&
null != t.clientX &&
((i = (n = e.target.ownerDocument || P).documentElement),
(r = n.body),
(e.pageX = t.clientX + ((i && i.scrollLeft) || (r && r.scrollLeft) || 0) - ((i && i.clientLeft) || (r && r.clientLeft) || 0)),
(e.pageY = t.clientY + ((i && i.scrollTop) || (r && r.scrollTop) || 0) - ((i && i.clientTop) || (r && r.clientTop) || 0))),
!e.relatedTarget && s && (e.relatedTarget = s === e.target ? t.toElement : s),
!e.which && o !== D && (e.which = 1 & o ? 1 : 2 & o ? 3 : 4 & o ? 2 : 0),
e
);
},
},
fix: function (e) {
if (e[T.expando]) return e;
var t,
n,
i = e,
r = T.event.fixHooks[e.type] || {},
o = r.props ? this.props.concat(r.props) : this.props;
for (e = T.Event(i), t = o.length; t; ) e[(n = o[--t])] = i[n];
return e.target || (e.target = i.srcElement || P), 3 === e.target.nodeType && (e.target = e.target.parentNode), e.metaKey === D && (e.metaKey = e.ctrlKey), r.filter ? r.filter(e, i) : e;
},
special: {
ready: { setup: T.bindReady },
load: { noBubble: !0 },
focus: { delegateType: "focusin" },
blur: { delegateType: "focusout" },
beforeunload: {
setup: function (e, t, n) {
T.isWindow(this) && (this.onbeforeunload = n);
},
teardown: function (e, t) {
this.onbeforeunload === t && (this.onbeforeunload = null);
},
},
},
simulate: function (e, t, n, i) {
var r = T.extend(new T.Event(), n, { type: e, isSimulated: !0, originalEvent: {} });
i ? T.event.trigger(r, null, t) : T.event.dispatch.call(t, r), r.isDefaultPrevented() && n.preventDefault();
},
}),
(T.event.handle = T.event.dispatch),
(T.removeEvent = P.removeEventListener
? function (e, t, n) {
e.removeEventListener && e.removeEventListener(t, n, !1);
}
: function (e, t, n) {
e.detachEvent && e.detachEvent("on" + t, n);
}),
(T.Event = function (e, t) {
if (!(this instanceof T.Event)) return new T.Event(e, t);
e && e.type ? ((this.originalEvent = e), (this.type = e.type), (this.isDefaultPrevented = e.defaultPrevented || !1 === e.returnValue || (e.getPreventDefault && e.getPreventDefault()) ? b : w)) : (this.type = e),
t && T.extend(this, t),
(this.timeStamp = (e && e.timeStamp) || T.now()),
(this[T.expando] = !0);
}),
(T.Event.prototype = {
preventDefault: function () {
this.isDefaultPrevented = b;
var e = this.originalEvent;
!e || (e.preventDefault ? e.preventDefault() : (e.returnValue = !1));
},
stopPropagation: function () {
this.isPropagationStopped = b;
var e = this.originalEvent;
!e || (e.stopPropagation && e.stopPropagation(), (e.cancelBubble = !0));
},
stopImmediatePropagation: function () {
(this.isImmediatePropagationStopped = b), this.stopPropagation();
},
isDefaultPrevented: w,
isPropagationStopped: w,
isImmediatePropagationStopped: w,
}),
T.each({ mouseenter: "mouseover", mouseleave: "mouseout" }, function (e, r) {
T.event.special[e] = {
delegateType: r,
bindType: r,
handle: function (e) {
var t,
n = e.relatedTarget,
i = e.handleObj;
i.selector;
return (n && (n === this || T.contains(this, n))) || ((e.type = i.origType), (t = i.handler.apply(this, arguments)), (e.type = r)), t;
},
};
}),
T.support.submitBubbles ||
(T.event.special.submit = {
setup: function () {
if (T.nodeName(this, "form")) return !1;
T.event.add(this, "click._submit keypress._submit", function (e) {
var t = e.target,
n = T.nodeName(t, "input") || T.nodeName(t, "button") ? t.form : D;
n &&
!n._submit_attached &&
(T.event.add(n, "submit._submit", function (e) {
this.parentNode && !e.isTrigger && T.event.simulate("submit", this.parentNode, e, !0);
}),
(n._submit_attached = !0));
});
},
teardown: function () {
if (T.nodeName(this, "form")) return !1;
T.event.remove(this, "._submit");
},
}),
T.support.changeBubbles ||
(T.event.special.change = {
setup: function () {
if (X.test(this.nodeName))
return (
("checkbox" !== this.type && "radio" !== this.type) ||
(T.event.add(this, "propertychange._change", function (e) {
"checked" === e.originalEvent.propertyName && (this._just_changed = !0);
}),
T.event.add(this, "click._change", function (e) {
this._just_changed && !e.isTrigger && ((this._just_changed = !1), T.event.simulate("change", this, e, !0));
})),
!1
);
T.event.add(this, "beforeactivate._change", function (e) {
var t = e.target;
X.test(t.nodeName) &&
!t._change_attached &&
(T.event.add(t, "change._change", function (e) {
this.parentNode && !e.isSimulated && !e.isTrigger && T.event.simulate("change", this.parentNode, e, !0);
}),
(t._change_attached = !0));
});
},
handle: function (e) {
var t = e.target;
if (this !== t || e.isSimulated || e.isTrigger || ("radio" !== t.type && "checkbox" !== t.type)) return e.handleObj.handler.apply(this, arguments);
},
teardown: function () {
return T.event.remove(this, "._change"), X.test(this.nodeName);
},
}),
T.support.focusinBubbles ||
T.each({ focus: "focusin", blur: "focusout" }, function (e, t) {
var n = 0,
i = function (e) {
T.event.simulate(t, e.target, T.event.fix(e), !0);
};
T.event.special[t] = {
setup: function () {
0 == n++ && P.addEventListener(e, i, !0);
},
teardown: function () {
0 == --n && P.removeEventListener(e, i, !0);
},
};
}),
T.fn.extend({
on: function (e, t, n, i, r) {
var o, s;
if ("object" == typeof e) {
for (s in ("string" != typeof t && ((n = t), (t = D)), e)) this.on(s, t, n, e[s], r);
return this;
}
if ((null == n && null == i ? ((i = t), (n = t = D)) : null == i && ("string" == typeof t ? ((i = n), (n = D)) : ((i = n), (n = t), (t = D))), !1 === i)) i = w;
else if (!i) return this;
return (
1 === r &&
((o = i),
((i = function (e) {
return T().off(e), o.apply(this, arguments);
}).guid = o.guid || (o.guid = T.guid++))),
this.each(function () {
T.event.add(this, e, i, n, t);
})
);
},
one: function (e, t, n, i) {
return this.on.call(this, e, t, n, i, 1);
},
off: function (e, t, n) {
if (e && e.preventDefault && e.handleObj) {
var i = e.handleObj;
return T(e.delegateTarget).off(i.namespace ? i.type + "." + i.namespace : i.type, i.selector, i.handler), this;
}
if ("object" != typeof e)
return (
(!1 !== t && "function" != typeof t) || ((n = t), (t = D)),
!1 === n && (n = w),
this.each(function () {
T.event.remove(this, e, n, t);
})
);
for (var r in e) this.off(r, t, e[r]);
return this;
},
bind: function (e, t, n) {
return this.on(e, null, t, n);
},
unbind: function (e, t) {
return this.off(e, null, t);
},
live: function (e, t, n) {
return T(this.context).on(e, this.selector, t, n), this;
},
die: function (e, t) {
return T(this.context).off(e, this.selector || "**", t), this;
},
delegate: function (e, t, n, i) {
return this.on(t, e, n, i);
},
undelegate: function (e, t, n) {
return 1 == arguments.length ? this.off(e, "**") : this.off(t, e, n);
},
trigger: function (e, t) {
return this.each(function () {
T.event.trigger(e, t, this);
});
},
triggerHandler: function (e, t) {
if (this[0]) return T.event.trigger(e, t, this[0], !0);
},
toggle: function (n) {
var i = arguments,
e = n.guid || T.guid++,
r = 0,
t = function (e) {
var t = (T._data(this, "lastToggle" + n.guid) || 0) % r;
return T._data(this, "lastToggle" + n.guid, t + 1), e.preventDefault(), i[t].apply(this, arguments) || !1;
};
for (t.guid = e; r < i.length; ) i[r++].guid = e;
return this.click(t);
},
hover: function (e, t) {
return this.mouseenter(e).mouseleave(t || e);
},
}),
T.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "), function (
e,
n
) {
(T.fn[n] = function (e, t) {
return null == t && ((t = e), (e = null)), 0 < arguments.length ? this.on(n, null, e, t) : this.trigger(n);
}),
T.attrFn && (T.attrFn[n] = !0),
Y.test(n) && (T.event.fixHooks[n] = T.event.keyHooks),
G.test(n) && (T.event.fixHooks[n] = T.event.mouseHooks);
}),
(function () {
function s(e, t, n, i, r, o) {
for (var s = 0, a = i.length; s < a; s++) {
var l = i[s];
if (l) {
var c = !1;
for (l = l[e]; l; ) {
if (l[u] === n) {
c = i[l.sizset];
break;
}
if (1 === l.nodeType)
if ((o || ((l[u] = n), (l.sizset = s)), "string" != typeof t)) {
if (l === t) {
c = !0;
break;
}
} else if (0 < b.filter(t, [l]).length) {
c = l;
break;
}
l = l[e];
}
i[s] = c;
}
}
}
function a(e, t, n, i, r, o) {
for (var s = 0, a = i.length; s < a; s++) {
var l = i[s];
if (l) {
var c = !1;
for (l = l[e]; l; ) {
if (l[u] === n) {
c = i[l.sizset];
break;
}
if ((1 === l.nodeType && !o && ((l[u] = n), (l.sizset = s)), l.nodeName.toLowerCase() === t)) {
c = l;
break;
}
l = l[e];
}
i[s] = c;
}
}
}
var y = /((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,
u = "sizcache" + (Math.random() + "").replace(".", ""),
l = 0,
v = Object.prototype.toString,
d = !1,
n = !0,
c = /\\/g,
o = /\r\n/g,
p = /\W/;
[0, 0].sort(function () {
return (n = !1), 0;
});
var b = function (e, t, n, i) {
n = n || [];
var r = (t = t || P);
if (1 !== t.nodeType && 9 !== t.nodeType) return [];
if (!e || "string" != typeof e) return n;
var o,
s,
a,
l,
c,
u,
d,
p,
h = !0,
f = b.isXML(t),
m = [],
g = e;
do {
if ((y.exec(""), (o = y.exec(g)) && ((g = o[3]), m.push(o[1]), o[2]))) {
l = o[3];
break;
}
} while (o);
if (1 < m.length && x.exec(e))
if (2 === m.length && w.relative[m[0]]) s = _(m[0] + m[1], t, i);
else for (s = w.relative[m[0]] ? [t] : b(m.shift(), t); m.length; ) (e = m.shift()), w.relative[e] && (e += m.shift()), (s = _(e, s, i));
else if ((!i && 1 < m.length && 9 === t.nodeType && !f && w.match.ID.test(m[0]) && !w.match.ID.test(m[m.length - 1]) && (t = (c = b.find(m.shift(), t, f)).expr ? b.filter(c.expr, c.set)[0] : c.set[0]), t))
for (
s = (c = i ? { expr: m.pop(), set: C(i) } : b.find(m.pop(), 1 !== m.length || ("~" !== m[0] && "+" !== m[0]) || !t.parentNode ? t : t.parentNode, f)).expr ? b.filter(c.expr, c.set) : c.set,
0 < m.length ? (a = C(s)) : (h = !1);
m.length;

)
(d = u = m.pop()), w.relative[u] ? (d = m.pop()) : (u = ""), null == d && (d = t), w.relative[u](a, d, f);
else a = m = [];
if ((a || (a = s), a || b.error(u || e), "[object Array]" === v.call(a)))
if (h)
if (t && 1 === t.nodeType) for (p = 0; null != a[p]; p++) a[p] && (!0 === a[p] || (1 === a[p].nodeType && b.contains(t, a[p]))) && n.push(s[p]);
else for (p = 0; null != a[p]; p++) a[p] && 1 === a[p].nodeType && n.push(s[p]);
else n.push.apply(n, a);
else C(a, n);
return l && (b(l, r, n, i), b.uniqueSort(n)), n;
};
(b.uniqueSort = function (e) {
if (i && ((d = n), e.sort(i), d)) for (var t = 1; t < e.length; t++) e[t] === e[t - 1] && e.splice(t--, 1);
return e;
}),
(b.matches = function (e, t) {
return b(e, null, null, t);
}),
(b.matchesSelector = function (e, t) {
return 0 < b(t, null, null, [e]).length;
}),
(b.find = function (e, t, n) {
var i, r, o, s, a, l;
if (!e) return [];
for (r = 0, o = w.order.length; r < o; r++)
if (((a = w.order[r]), (s = w.leftMatch[a].exec(e)) && ((l = s[1]), s.splice(1, 1), "\\" !== l.substr(l.length - 1) && ((s[1] = (s[1] || "").replace(c, "")), null != (i = w.find[a](s, t, n)))))) {
e = e.replace(w.match[a], "");
break;
}
return i || (i = void 0 !== t.getElementsByTagName ? t.getElementsByTagName("*") : []), { set: i, expr: e };
}),
(b.filter = function (e, t, n, i) {
for (var r, o, s, a, l, c, u, d, p, h = e, f = [], m = t, g = t && t[0] && b.isXML(t[0]); e && t.length; ) {
for (s in w.filter)
if (null != (r = w.leftMatch[s].exec(e)) && r[2]) {
if (((c = w.filter[s]), (u = r[1]), (o = !1), r.splice(1, 1), "\\" === u.substr(u.length - 1))) continue;
if ((m === f && (f = []), w.preFilter[s]))
if ((r = w.preFilter[s](r, m, n, f, i, g))) {
if (!0 === r) continue;
} else o = a = !0;
if (r) for (d = 0; null != (l = m[d]); d++) l && ((p = i ^ (a = c(l, r, d, m))), n && null != a ? (p ? (o = !0) : (m[d] = !1)) : p && (f.push(l), (o = !0)));
if (a !== D) {
if ((n || (m = f), (e = e.replace(w.match[s], "")), !o)) return [];
break;
}
}
if (e === h) {
if (null != o) break;
b.error(e);
}
h = e;
}
return m;
}),
(b.error = function (e) {
throw new Error("Syntax error, unrecognized expression: " + e);
});
var h = (b.getText = function (e) {
var t,
n,
i = e.nodeType,
r = "";
if (i) {
if (1 === i || 9 === i) {
if ("string" == typeof e.textContent) return e.textContent;
if ("string" == typeof e.innerText) return e.innerText.replace(o, "");
for (e = e.firstChild; e; e = e.nextSibling) r += h(e);
} else if (3 === i || 4 === i) return e.nodeValue;
} else for (t = 0; (n = e[t]); t++) 8 !== n.nodeType && (r += h(n));
return r;
}),
w = (b.selectors = {
order: ["ID", "NAME", "TAG"],
match: {
ID: /#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,
CLASS: /\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,
NAME: /\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,
ATTR: /\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,
TAG: /^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,
CHILD: /:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,
POS: /:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,
PSEUDO: /:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/,
},
leftMatch: {},
attrMap: { class: "className", for: "htmlFor" },
attrHandle: {
href: function (e) {
return e.getAttribute("href");
},
type: function (e) {
return e.getAttribute("type");
},
},
relative: {
"+": function (e, t) {
var n = "string" == typeof t,
i = n && !p.test(t),
r = n && !i;
i && (t = t.toLowerCase());
for (var o, s = 0, a = e.length; s < a; s++)
if ((o = e[s])) {
for (; (o = o.previousSibling) && 1 !== o.nodeType; );
e[s] = r || (o && o.nodeName.toLowerCase() === t) ? o || !1 : o === t;
}
r && b.filter(t, e, !0);
},
">": function (e, t) {
var n,
i = "string" == typeof t,
r = 0,
o = e.length;
if (i && !p.test(t)) {
for (t = t.toLowerCase(); r < o; r++)
if ((n = e[r])) {
var s = n.parentNode;
e[r] = s.nodeName.toLowerCase() === t && s;
}
} else {
for (; r < o; r++) (n = e[r]) && (e[r] = i ? n.parentNode : n.parentNode === t);
i && b.filter(t, e, !0);
}
},
"": function (e, t, n) {
var i,
r = l++,
o = s;
"string" == typeof t && !p.test(t) && ((i = t = t.toLowerCase()), (o = a)), o("parentNode", t, r, e, i, n);
},
"~": function (e, t, n) {
var i,
r = l++,
o = s;
"string" == typeof t && !p.test(t) && ((i = t = t.toLowerCase()), (o = a)), o("previousSibling", t, r, e, i, n);
},
},
find: {
ID: function (e, t, n) {
if (void 0 !== t.getElementById && !n) {
var i = t.getElementById(e[1]);
return i && i.parentNode ? [i] : [];
}
},
NAME: function (e, t) {
if (void 0 !== t.getElementsByName) {
for (var n = [], i = t.getElementsByName(e[1]), r = 0, o = i.length; r < o; r++) i[r].getAttribute("name") === e[1] && n.push(i[r]);
return 0 === n.length ? null : n;
}
},
TAG: function (e, t) {
if (void 0 !== t.getElementsByTagName) return t.getElementsByTagName(e[1]);
},
},
preFilter: {
CLASS: function (e, t, n, i, r, o) {
if (((e = " " + e[1].replace(c, "") + " "), o)) return e;
for (var s, a = 0; null != (s = t[a]); a++) s && (r ^ (s.className && 0 <= (" " + s.className + " ").replace(/[\t\n\r]/g, " ").indexOf(e)) ? n || i.push(s) : n && (t[a] = !1));
return !1;
},
ID: function (e) {
return e[1].replace(c, "");
},
TAG: function (e, t) {
return e[1].replace(c, "").toLowerCase();
},
CHILD: function (e) {
if ("nth" === e[1]) {
e[2] || b.error(e[0]), (e[2] = e[2].replace(/^\+|\s*/g, ""));
var t = /(-?)(\d*)(?:n([+\-]?\d*))?/.exec(("even" === e[2] ? "2n" : "odd" === e[2] && "2n+1") || (!/\D/.test(e[2]) && "0n+" + e[2]) || e[2]);
(e[2] = t[1] + (t[2] || 1) - 0), (e[3] = t[3] - 0);
} else e[2] && b.error(e[0]);
return (e[0] = l++), e;
},
ATTR: function (e, t, n, i, r, o) {
var s = (e[1] = e[1].replace(c, ""));
return !o && w.attrMap[s] && (e[1] = w.attrMap[s]), (e[4] = (e[4] || e[5] || "").replace(c, "")), "~=" === e[2] && (e[4] = " " + e[4] + " "), e;
},
PSEUDO: function (e, t, n, i, r) {
if ("not" === e[1]) {
if (!(1 < (y.exec(e[3]) || "").length || /^\w/.test(e[3]))) {
var o = b.filter(e[3], t, n, !0 ^ r);
return n || i.push.apply(i, o), !1;
}
e[3] = b(e[3], null, null, t);
} else if (w.match.POS.test(e[0]) || w.match.CHILD.test(e[0])) return !0;
return e;
},
POS: function (e) {
return e.unshift(!0), e;
},
},
filters: {
enabled: function (e) {
return !1 === e.disabled && "hidden" !== e.type;
},
disabled: function (e) {
return !0 === e.disabled;
},
checked: function (e) {
return !0 === e.checked;
},
selected: function (e) {
return e.parentNode && e.parentNode.selectedIndex, !0 === e.selected;
},
parent: function (e) {
return !!e.firstChild;
},
empty: function (e) {
return !e.firstChild;
},
has: function (e, t, n) {
return !!b(n[3], e).length;
},
header: function (e) {
return /h\d/i.test(e.nodeName);
},
text: function (e) {
var t = e.getAttribute("type"),
n = e.type;
return "input" === e.nodeName.toLowerCase() && "text" === n && (t === n || null === t);
},
radio: function (e) {
return "input" === e.nodeName.toLowerCase() && "radio" === e.type;
},
checkbox: function (e) {
return "input" === e.nodeName.toLowerCase() && "checkbox" === e.type;
},
file: function (e) {
return "input" === e.nodeName.toLowerCase() && "file" === e.type;
},
password: function (e) {
return "input" === e.nodeName.toLowerCase() && "password" === e.type;
},
submit: function (e) {
var t = e.nodeName.toLowerCase();
return ("input" === t || "button" === t) && "submit" === e.type;
},
image: function (e) {
return "input" === e.nodeName.toLowerCase() && "image" === e.type;
},
reset: function (e) {
var t = e.nodeName.toLowerCase();
return ("input" === t || "button" === t) && "reset" === e.type;
},
button: function (e) {
var t = e.nodeName.toLowerCase();
return ("input" === t && "button" === e.type) || "button" === t;
},
input: function (e) {
return /input|select|textarea|button/i.test(e.nodeName);
},
focus: function (e) {
return e === e.ownerDocument.activeElement;
},
},
setFilters: {
first: function (e, t) {
return 0 === t;
},
last: function (e, t, n, i) {
return t === i.length - 1;
},
even: function (e, t) {
return t % 2 == 0;
},
odd: function (e, t) {
return t % 2 == 1;
},
lt: function (e, t, n) {
return t < n[3] - 0;
},
gt: function (e, t, n) {
return t > n[3] - 0;
},
nth: function (e, t, n) {
return n[3] - 0 === t;
},
eq: function (e, t, n) {
return n[3] - 0 === t;
},
},
filter: {
PSEUDO: function (e, t, n, i) {
var r = t[1],
o = w.filters[r];
if (o) return o(e, n, t, i);
if ("contains" === r) return 0 <= (e.textContent || e.innerText || h([e]) || "").indexOf(t[3]);
if ("not" === r) {
for (var s = t[3], a = 0, l = s.length; a < l; a++) if (s[a] === e) return !1;
return !0;
}
b.error(r);
},
CHILD: function (e, t) {
var n,
i,
r,
o,
s,
a,
l = t[1],
c = e;
switch (l) {
case "only":
case "first":
for (; (c = c.previousSibling); ) if (1 === c.nodeType) return !1;
if ("first" === l) return !0;
c = e;
case "last":
for (; (c = c.nextSibling); ) if (1 === c.nodeType) return !1;
return !0;
case "nth":
if (((n = t[2]), (i = t[3]), 1 === n && 0 === i)) return !0;
if (((r = t[0]), (o = e.parentNode) && (o[u] !== r || !e.nodeIndex))) {
for (s = 0, c = o.firstChild; c; c = c.nextSibling) 1 === c.nodeType && (c.nodeIndex = ++s);
o[u] = r;
}
return (a = e.nodeIndex - i), 0 === n ? 0 === a : a % n == 0 && 0 <= a / n;
}
},
ID: function (e, t) {
return 1 === e.nodeType && e.getAttribute("id") === t;
},
TAG: function (e, t) {
return ("*" === t && 1 === e.nodeType) || (!!e.nodeName && e.nodeName.toLowerCase() === t);
},
CLASS: function (e, t) {
return -1 < (" " + (e.className || e.getAttribute("class")) + " ").indexOf(t);
},
ATTR: function (e, t) {
var n = t[1],
i = b.attr ? b.attr(e, n) : w.attrHandle[n] ? w.attrHandle[n](e) : null != e[n] ? e[n] : e.getAttribute(n),
r = i + "",
o = t[2],
s = t[4];
return null == i
? "!=" === o
: !o && b.attr
? null != i
: "=" === o
? r === s
: "*=" === o
? 0 <= r.indexOf(s)
: "~=" === o
? 0 <= (" " + r + " ").indexOf(s)
: s
? "!=" === o
? r !== s
: "^=" === o
? 0 === r.indexOf(s)
: "$=" === o
? r.substr(r.length - s.length) === s
: "|=" === o && (r === s || r.substr(0, s.length + 1) === s + "-")
: r && !1 !== i;
},
POS: function (e, t, n, i) {
var r = t[2],
o = w.setFilters[r];
if (o) return o(e, n, t, i);
},
},
}),
x = w.match.POS,
e = function (e, t) {
return "\\" + (t - 0 + 1);
};
for (var t in w.match) (w.match[t] = new RegExp(w.match[t].source + /(?![^\[]*\])(?![^\(]*\))/.source)), (w.leftMatch[t] = new RegExp(/(^(?:.|\r|\n)*?)/.source + w.match[t].source.replace(/\\(\d+)/g, e)));
var i,
f,
r,
m,
g,
k,
C = function (e, t) {
return (e = Array.prototype.slice.call(e, 0)), t ? (t.push.apply(t, e), t) : e;
};
try {
Array.prototype.slice.call(P.documentElement.childNodes, 0)[0].nodeType;
} catch (e) {
C = function (e, t) {
var n = 0,
i = t || [];
if ("[object Array]" === v.call(e)) Array.prototype.push.apply(i, e);
else if ("number" == typeof e.length) for (var r = e.length; n < r; n++) i.push(e[n]);
else for (; e[n]; n++) i.push(e[n]);
return i;
};
}
P.documentElement.compareDocumentPosition
? (i = function (e, t) {
return e === t ? ((d = !0), 0) : e.compareDocumentPosition && t.compareDocumentPosition ? (4 & e.compareDocumentPosition(t) ? -1 : 1) : e.compareDocumentPosition ? -1 : 1;
})
: ((i = function (e, t) {
if (e === t) return (d = !0), 0;
if (e.sourceIndex && t.sourceIndex) return e.sourceIndex - t.sourceIndex;
var n,
i,
r = [],
o = [],
s = e.parentNode,
a = t.parentNode,
l = s;
if (s === a) return f(e, t);
if (!s) return -1;
if (!a) return 1;
for (; l; ) r.unshift(l), (l = l.parentNode);
for (l = a; l; ) o.unshift(l), (l = l.parentNode);
(n = r.length), (i = o.length);
for (var c = 0; c < n && c < i; c++) if (r[c] !== o[c]) return f(r[c], o[c]);
return c === n ? f(e, o[c], -1) : f(r[c], t, 1);
}),
(f = function (e, t, n) {
if (e === t) return n;
for (var i = e.nextSibling; i; ) {
if (i === t) return -1;
i = i.nextSibling;
}
return 1;
})),
(m = P.createElement("div")),
(g = "script" + new Date().getTime()),
(k = P.documentElement),
(m.innerHTML = "<a name='" + g + "'/>"),
k.insertBefore(m, k.firstChild),
P.getElementById(g) &&
((w.find.ID = function (e, t, n) {
if (void 0 !== t.getElementById && !n) {
var i = t.getElementById(e[1]);
return i ? (i.id === e[1] || (void 0 !== i.getAttributeNode && i.getAttributeNode("id").nodeValue === e[1]) ? [i] : D) : [];
}
}),
(w.filter.ID = function (e, t) {
var n = void 0 !== e.getAttributeNode && e.getAttributeNode("id");
return 1 === e.nodeType && n && n.nodeValue === t;
})),
k.removeChild(m),
(k = m = null),
(r = P.createElement("div")).appendChild(P.createComment("")),
0 < r.getElementsByTagName("*").length &&
(w.find.TAG = function (e, t) {
var n = t.getElementsByTagName(e[1]);
if ("*" === e[1]) {
for (var i = [], r = 0; n[r]; r++) 1 === n[r].nodeType && i.push(n[r]);
n = i;
}
return n;
}),
(r.innerHTML = "<a href='#'></a>"),
r.firstChild &&
void 0 !== r.firstChild.getAttribute &&
"#" !== r.firstChild.getAttribute("href") &&
(w.attrHandle.href = function (e) {
return e.getAttribute("href", 2);
}),
(r = null),
P.querySelectorAll &&
(function () {
var d = b,
e = P.createElement("div");
if (((e.innerHTML = "<p class='TEST'></p>"), !e.querySelectorAll || 0 !== e.querySelectorAll(".TEST").length)) {
for (var t in ((b = function (e, t, n, i) {
if (((t = t || P), !i && !b.isXML(t))) {
var r = /^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(e);
if (r && (1 === t.nodeType || 9 === t.nodeType)) {
if (r[1]) return C(t.getElementsByTagName(e), n);
if (r[2] && w.find.CLASS && t.getElementsByClassName) return C(t.getElementsByClassName(r[2]), n);
}
if (9 === t.nodeType) {
if ("body" === e && t.body) return C([t.body], n);
if (r && r[3]) {
var o = t.getElementById(r[3]);
if (!o || !o.parentNode) return C([], n);
if (o.id === r[3]) return C([o], n);
}
try {
return C(t.querySelectorAll(e), n);
} catch (e) {}
} else if (1 === t.nodeType && "object" !== t.nodeName.toLowerCase()) {
var s = t,
a = t.getAttribute("id"),
l = a || "__sizzle__",
c = t.parentNode,
u = /^\s*[+~]/.test(e);
a ? (l = l.replace(/'/g, "\\$&")) : t.setAttribute("id", l), u && c && (t = t.parentNode);
try {
if (!u || c) return C(t.querySelectorAll("[id='" + l + "'] " + e), n);
} catch (e) {
} finally {
a || s.removeAttribute("id");
}
}
}
return d(e, t, n, i);
}),
d))
b[t] = d[t];
e = null;
}
})(),
(function () {
var e = P.documentElement,
i = e.matchesSelector || e.mozMatchesSelector || e.webkitMatchesSelector || e.msMatchesSelector;
if (i) {
var r = !i.call(P.createElement("div"), "div"),
o = !1;
try {
i.call(P.documentElement, "[test!='']:sizzle");
} catch (e) {
o = !0;
}
b.matchesSelector = function (e, t) {
if (((t = t.replace(/\=\s*([^'"\]]*)\s*\]/g, "='$1']")), !b.isXML(e)))
try {
if (o || (!w.match.PSEUDO.test(t) && !/!=/.test(t))) {
var n = i.call(e, t);
if (n || !r || (e.document && 11 !== e.document.nodeType)) return n;
}
} catch (e) {}
return 0 < b(t, null, null, [e]).length;
};
}
})(),
(function () {
var e = P.createElement("div");
if (((e.innerHTML = "<div class='test e'></div><div class='test'></div>"), e.getElementsByClassName && 0 !== e.getElementsByClassName("e").length)) {
if (((e.lastChild.className = "e"), 1 === e.getElementsByClassName("e").length)) return;
w.order.splice(1, 0, "CLASS"),
(w.find.CLASS = function (e, t, n) {
if (void 0 !== t.getElementsByClassName && !n) return t.getElementsByClassName(e[1]);
}),
(e = null);
}
})(),
P.documentElement.contains
? (b.contains = function (e, t) {
return e !== t && (!e.contains || e.contains(t));
})
: P.documentElement.compareDocumentPosition
? (b.contains = function (e, t) {
return !!(16 & e.compareDocumentPosition(t));
})
: (b.contains = function () {
return !1;
}),
(b.isXML = function (e) {
var t = (e ? e.ownerDocument || e : 0).documentElement;
return !!t && "HTML" !== t.nodeName;
});
var _ = function (e, t, n) {
for (var i, r = [], o = "", s = t.nodeType ? [t] : t; (i = w.match.PSEUDO.exec(e)); ) (o += i[0]), (e = e.replace(w.match.PSEUDO, ""));
e = w.relative[e] ? e + "*" : e;
for (var a = 0, l = s.length; a < l; a++) b(e, s[a], r, n);
return b.filter(o, r);
};
(b.attr = T.attr), (b.selectors.attrMap = {}), (T.find = b), (T.expr = b.selectors), (T.expr[":"] = T.expr.filters), (T.unique = b.uniqueSort), (T.text = b.getText), (T.isXMLDoc = b.isXML), (T.contains = b.contains);
})();
var ee = /Until$/,
te = /^(?:parents|prevUntil|prevAll)/,
ne = /,/,
ie = /^.[^:#\[\.,]*$/,
re = Array.prototype.slice,
oe = T.expr.match.POS,
se = { children: !0, contents: !0, next: !0, prev: !0 };
T.fn.extend({
find: function (e) {
var t,
n,
i = this;
if ("string" != typeof e)
return T(e).filter(function () {
for (t = 0, n = i.length; t < n; t++) if (T.contains(i[t], this)) return !0;
});
var r,
o,
s,
a = this.pushStack("", "find", e);
for (t = 0, n = this.length; t < n; t++)
if (((r = a.length), T.find(e, this[t], a), 0 < t))
for (o = r; o < a.length; o++)
for (s = 0; s < r; s++)
if (a[s] === a[o]) {
a.splice(o--, 1);
break;
}
return a;
},
has: function (e) {
var n = T(e);
return this.filter(function () {
for (var e = 0, t = n.length; e < t; e++) if (T.contains(this, n[e])) return !0;
});
},
not: function (e) {
return this.pushStack(m(this, e, !1), "not", e);
},
filter: function (e) {
return this.pushStack(m(this, e, !0), "filter", e);
},
is: function (e) {
return !!e && ("string" == typeof e ? (oe.test(e) ? 0 <= T(e, this.context).index(this[0]) : 0 < T.filter(e, this).length) : 0 < this.filter(e).length);
},
closest: function (e, t) {
var n,
i,
r = [],
o = this[0];
if (T.isArray(e)) {
for (var s = 1; o && o.ownerDocument && o !== t; ) {
for (n = 0; n < e.length; n++) T(o).is(e[n]) && r.push({ selector: e[n], elem: o, level: s });
(o = o.parentNode), s++;
}
return r;
}
var a = oe.test(e) || "string" != typeof e ? T(e, t || this.context) : 0;
for (n = 0, i = this.length; n < i; n++)
for (o = this[n]; o; ) {
if (a ? -1 < a.index(o) : T.find.matchesSelector(o, e)) {
r.push(o);
break;
}
if (!(o = o.parentNode) || !o.ownerDocument || o === t || 11 === o.nodeType) break;
}
return (r = 1 < r.length ? T.unique(r) : r), this.pushStack(r, "closest", e);
},
index: function (e) {
return e ? ("string" == typeof e ? T.inArray(this[0], T(e)) : T.inArray(e.jquery ? e[0] : e, this)) : this[0] && this[0].parentNode ? this.prevAll().length : -1;
},
add: function (e, t) {
var n = "string" == typeof e ? T(e, t) : T.makeArray(e && e.nodeType ? [e] : e),
i = T.merge(this.get(), n);
return this.pushStack(g(n[0]) || g(i[0]) ? i : T.unique(i));
},
andSelf: function () {
return this.add(this.prevObject);
},
}),
T.each(
{
parent: function (e) {
var t = e.parentNode;
return t && 11 !== t.nodeType ? t : null;
},
parents: function (e) {
return T.dir(e, "parentNode");
},
parentsUntil: function (e, t, n) {
return T.dir(e, "parentNode", n);
},
next: function (e) {
return T.nth(e, 2, "nextSibling");
},
prev: function (e) {
return T.nth(e, 2, "previousSibling");
},
nextAll: function (e) {
return T.dir(e, "nextSibling");
},
prevAll: function (e) {
return T.dir(e, "previousSibling");
},
nextUntil: function (e, t, n) {
return T.dir(e, "nextSibling", n);
},
prevUntil: function (e, t, n) {
return T.dir(e, "previousSibling", n);
},
siblings: function (e) {
return T.sibling(e.parentNode.firstChild, e);
},
children: function (e) {
return T.sibling(e.firstChild);
},
contents: function (e) {
return T.nodeName(e, "iframe") ? e.contentDocument || e.contentWindow.document : T.makeArray(e.childNodes);
},
},
function (i, r) {
T.fn[i] = function (e, t) {
var n = T.map(this, r, e);
return (
ee.test(i) || (t = e),
t && "string" == typeof t && (n = T.filter(t, n)),
(n = 1 < this.length && !se[i] ? T.unique(n) : n),
(1 < this.length || ne.test(t)) && te.test(i) && (n = n.reverse()),
this.pushStack(n, i, re.call(arguments).join(","))
);
};
}
),
T.extend({
filter: function (e, t, n) {
return n && (e = ":not(" + e + ")"), 1 === t.length ? (T.find.matchesSelector(t[0], e) ? [t[0]] : []) : T.find.matches(e, t);
},
dir: function (e, t, n) {
for (var i = [], r = e[t]; r && 9 !== r.nodeType && (n === D || 1 !== r.nodeType || !T(r).is(n)); ) 1 === r.nodeType && i.push(r), (r = r[t]);
return i;
},
nth: function (e, t, n, i) {
t = t || 1;
for (var r = 0; e && (1 !== e.nodeType || ++r !== t); e = e[n]);
return e;
},
sibling: function (e, t) {
for (var n = []; e; e = e.nextSibling) 1 === e.nodeType && e !== t && n.push(e);
return n;
},
});
var ae = "abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",
le = / jQuery\d+="(?:\d+|null)"/g,
ce = /^\s+/,
ue = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,
de = /<([\w:]+)/,
pe = /<tbody/i,
he = /<|&#?\w+;/,
fe = /<(?:script|style)/i,
me = /<(?:script|object|embed|option|style)/i,
ge = new RegExp("<(?:" + ae + ")", "i"),
ye = /checked\s*(?:[^=]|=\s*.checked.)/i,
ve = /\/(java|ecma)script/i,
be = /^\s*<!(?:\[CDATA\[|\-\-)/,
we = {
option: [1, "<select multiple='multiple'>", "</select>"],
legend: [1, "<fieldset>", "</fieldset>"],
thead: [1, "<table>", "</table>"],
tr: [2, "<table><tbody>", "</tbody></table>"],
td: [3, "<table><tbody><tr>", "</tr></tbody></table>"],
col: [2, "<table><tbody></tbody><colgroup>", "</colgroup></table>"],
area: [1, "<map>", "</map>"],
_default: [0, "", ""],
},
xe = v(P);
(we.optgroup = we.option),
(we.tbody = we.tfoot = we.colgroup = we.caption = we.thead),
(we.th = we.td),
T.support.htmlSerialize || (we._default = [1, "div<div>", "</div>"]),
T.fn.extend({
text: function (n) {
return T.isFunction(n)
? this.each(function (e) {
var t = T(this);
t.text(n.call(this, e, t.text()));
})
: "object" != typeof n && n !== D
? this.empty().append(((this[0] && this[0].ownerDocument) || P).createTextNode(n))
: T.text(this);
},
wrapAll: function (t) {
if (T.isFunction(t))
return this.each(function (e) {
T(this).wrapAll(t.call(this, e));
});
if (this[0]) {
var e = T(t, this[0].ownerDocument).eq(0).clone(!0);
this[0].parentNode && e.insertBefore(this[0]),
e
.map(function () {
for (var e = this; e.firstChild && 1 === e.firstChild.nodeType; ) e = e.firstChild;
return e;
})
.append(this);
}
return this;
},
wrapInner: function (n) {
return T.isFunction(n)
? this.each(function (e) {
T(this).wrapInner(n.call(this, e));
})
: this.each(function () {
var e = T(this),
t = e.contents();
t.length ? t.wrapAll(n) : e.append(n);
});
},
wrap: function (t) {
var n = T.isFunction(t);
return this.each(function (e) {
T(this).wrapAll(n ? t.call(this, e) : t);
});
},
unwrap: function () {
return this.parent()
.each(function () {
T.nodeName(this, "body") || T(this).replaceWith(this.childNodes);
})
.end();
},
append: function () {
return this.domManip(arguments, !0, function (e) {
1 === this.nodeType && this.appendChild(e);
});
},
prepend: function () {
return this.domManip(arguments, !0, function (e) {
1 === this.nodeType && this.insertBefore(e, this.firstChild);
});
},
before: function () {
if (this[0] && this[0].parentNode)
return this.domManip(arguments, !1, function (e) {
this.parentNode.insertBefore(e, this);
});
if (arguments.length) {
var e = T.clean(arguments);
return e.push.apply(e, this.toArray()), this.pushStack(e, "before", arguments);
}
},
after: function () {
if (this[0] && this[0].parentNode)
return this.domManip(arguments, !1, function (e) {
this.parentNode.insertBefore(e, this.nextSibling);
});
if (arguments.length) {
var e = this.pushStack(this, "after", arguments);
return e.push.apply(e, T.clean(arguments)), e;
}
},
remove: function (e, t) {
for (var n, i = 0; null != (n = this[i]); i++) (e && !T.filter(e, [n]).length) || (!t && 1 === n.nodeType && (T.cleanData(n.getElementsByTagName("*")), T.cleanData([n])), n.parentNode && n.parentNode.removeChild(n));
return this;
},
empty: function () {
for (var e, t = 0; null != (e = this[t]); t++) for (1 === e.nodeType && T.cleanData(e.getElementsByTagName("*")); e.firstChild; ) e.removeChild(e.firstChild);
return this;
},
clone: function (e, t) {
return (
(e = null != e && e),
(t = null == t ? e : t),
this.map(function () {
return T.clone(this, e, t);
})
);
},
html: function (n) {
if (n === D) return this[0] && 1 === this[0].nodeType ? this[0].innerHTML.replace(le, "") : null;
if ("string" != typeof n || fe.test(n) || (!T.support.leadingWhitespace && ce.test(n)) || we[(de.exec(n) || ["", ""])[1].toLowerCase()])
T.isFunction(n)
? this.each(function (e) {
var t = T(this);
t.html(n.call(this, e, t.html()));
})
: this.empty().append(n);
else {
n = n.replace(ue, "<$1></$2>");
try {
for (var e = 0, t = this.length; e < t; e++) 1 === this[e].nodeType && (T.cleanData(this[e].getElementsByTagName("*")), (this[e].innerHTML = n));
} catch (e) {
this.empty().append(n);
}
}
return this;
},
replaceWith: function (i) {
return this[0] && this[0].parentNode
? T.isFunction(i)
? this.each(function (e) {
var t = T(this),
n = t.html();
t.replaceWith(i.call(this, e, n));
})
: ("string" != typeof i && (i = T(i).detach()),
this.each(function () {
var e = this.nextSibling,
t = this.parentNode;
T(this).remove(), e ? T(e).before(i) : T(t).append(i);
}))
: this.length
? this.pushStack(T(T.isFunction(i) ? i() : i), "replaceWith", i)
: this;
},
detach: function (e) {
return this.remove(e, !0);
},
domManip: function (n, i, r) {
var e,
t,
o,
s,
a,
l = n[0],
c = [];
if (!T.support.checkClone && 3 === arguments.length && "string" == typeof l && ye.test(l))
return this.each(function () {
T(this).domManip(n, i, r, !0);
});
if (T.isFunction(l))
return this.each(function (e) {
var t = T(this);
(n[0] = l.call(this, e, i ? t.html() : D)), t.domManip(n, i, r);
});
if (this[0]) {
if (
((s = l && l.parentNode),
(t =
1 === (o = (e = T.support.parentNode && s && 11 === s.nodeType && s.childNodes.length === this.length ? { fragment: s } : T.buildFragment(n, this, c)).fragment).childNodes.length
? (o = o.firstChild)
: o.firstChild))
) {
i = i && T.nodeName(t, "tr");
for (var u = 0, d = this.length, p = d - 1; u < d; u++)
r.call(
i ? ((a = this[u]), T.nodeName(a, "table") ? a.getElementsByTagName("tbody")[0] || a.appendChild(a.ownerDocument.createElement("tbody")) : a) : this[u],
e.cacheable || (1 < d && u < p) ? T.clone(o, !0, !0) : o
);
}
c.length && T.each(c, h);
}
return this;
},
}),
(T.buildFragment = function (e, t, n) {
var i,
r,
o,
s,
a = e[0];
return (
t && t[0] && (s = t[0].ownerDocument || t[0]),
s.createDocumentFragment || (s = P),
1 === e.length &&
"string" == typeof a &&
a.length < 512 &&
s === P &&
"<" === a.charAt(0) &&
!me.test(a) &&
(T.support.checkClone || !ye.test(a)) &&
(T.support.html5Clone || !ge.test(a)) &&
((r = !0), (o = T.fragments[a]) && 1 !== o && (i = o)),
i || ((i = s.createDocumentFragment()), T.clean(e, s, i, n)),
r && (T.fragments[a] = o ? i : 1),
{ fragment: i, cacheable: r }
);
}),
(T.fragments = {}),
T.each({ appendTo: "append", prependTo: "prepend", insertBefore: "before", insertAfter: "after", replaceAll: "replaceWith" }, function (a, l) {
T.fn[a] = function (e) {
var t = [],
n = T(e),
i = 1 === this.length && this[0].parentNode;
if (i && 11 === i.nodeType && 1 === i.childNodes.length && 1 === n.length) return n[l](this[0]), this;
for (var r = 0, o = n.length; r < o; r++) {
var s = (0 < r ? this.clone(!0) : this).get();
T(n[r])[l](s), (t = t.concat(s));
}
return this.pushStack(t, a, n.selector);
};
}),
T.extend({
clone: function (e, t, n) {
var i,
r,
o,
s,
a,
l = T.support.html5Clone || !ge.test("<" + e.nodeName) ? e.cloneNode(!0) : ((s = e), (a = P.createElement("div")), xe.appendChild(a), (a.innerHTML = s.outerHTML), a.firstChild);
if (!((T.support.noCloneEvent && T.support.noCloneChecked) || (1 !== e.nodeType && 11 !== e.nodeType) || T.isXMLDoc(e))) for (u(e, l), i = c(e), r = c(l), o = 0; i[o]; ++o) r[o] && u(i[o], r[o]);
if (t && (p(e, l), n)) for (i = c(e), r = c(l), o = 0; i[o]; ++o) p(i[o], r[o]);
return (i = r = null), l;
},
clean: function (e, t, n, i) {
var r;
void 0 === (t = t || P).createElement && (t = t.ownerDocument || (t[0] && t[0].ownerDocument) || P);
for (var o, s, a = [], l = 0; null != (s = e[l]); l++)
if (("number" == typeof s && (s += ""), s)) {
if ("string" == typeof s)
if (he.test(s)) {
s = s.replace(ue, "<$1></$2>");
var c = (de.exec(s) || ["", ""])[1].toLowerCase(),
u = we[c] || we._default,
d = u[0],
p = t.createElement("div");
for (t === P ? xe.appendChild(p) : v(t).appendChild(p), p.innerHTML = u[1] + s + u[2]; d--; ) p = p.lastChild;
if (!T.support.tbody) {
var h = pe.test(s),
f = "table" !== c || h ? ("<table>" !== u[1] || h ? [] : p.childNodes) : p.firstChild && p.firstChild.childNodes;
for (o = f.length - 1; 0 <= o; --o) T.nodeName(f[o], "tbody") && !f[o].childNodes.length && f[o].parentNode.removeChild(f[o]);
}
!T.support.leadingWhitespace && ce.test(s) && p.insertBefore(t.createTextNode(ce.exec(s)[0]), p.firstChild), (s = p.childNodes);
} else s = t.createTextNode(s);
var m;
if (!T.support.appendChecked)
if (s[0] && "number" == typeof (m = s.length)) for (o = 0; o < m; o++) y(s[o]);
else y(s);
s.nodeType ? a.push(s) : (a = T.merge(a, s));
}
if (n)
for (
r = function (e) {
return !e.type || ve.test(e.type);
},
l = 0;
a[l];
l++
)
if (!i || !T.nodeName(a[l], "script") || (a[l].type && "text/javascript" !== a[l].type.toLowerCase())) {
if (1 === a[l].nodeType) {
var g = T.grep(a[l].getElementsByTagName("script"), r);
a.splice.apply(a, [l + 1, 0].concat(g));
}
n.appendChild(a[l]);
} else i.push(a[l].parentNode ? a[l].parentNode.removeChild(a[l]) : a[l]);
return a;
},
cleanData: function (e) {
for (var t, n, i, r = T.cache, o = T.event.special, s = T.support.deleteExpando, a = 0; null != (i = e[a]); a++)
if ((!i.nodeName || !T.noData[i.nodeName.toLowerCase()]) && (n = i[T.expando])) {
if ((t = r[n]) && t.events) {
for (var l in t.events) o[l] ? T.event.remove(i, l) : T.removeEvent(i, l, t.handle);
t.handle && (t.handle.elem = null);
}
s ? delete i[T.expando] : i.removeAttribute && i.removeAttribute(T.expando), delete r[n];
}
},
});
var ke,
Ce,
_e,
Ae = /alpha\([^)]*\)/i,
Te = /opacity=([^)]*)/,
Ee = /([A-Z]|^ms)/g,
Ne = /^-?\d+(?:px)?$/i,
Se = /^-?\d/,
Ie = /^([\-+])=([\-+.\de]+)/,
je = { position: "absolute", visibility: "hidden", display: "block" },
Fe = ["Left", "Right"],
De = ["Top", "Bottom"];
(T.fn.css = function (e, t) {
return 2 === arguments.length && t === D
? this
: T.access(this, e, t, !0, function (e, t, n) {
return n !== D ? T.style(e, t, n) : T.css(e, t);
});
}),
T.extend({
cssHooks: {
opacity: {
get: function (e, t) {
if (t) {
var n = ke(e, "opacity", "opacity");
return "" === n ? "1" : n;
}
return e.style.opacity;
},
},
},
cssNumber: { fillOpacity: !0, fontWeight: !0, lineHeight: !0, opacity: !0, orphans: !0, widows: !0, zIndex: !0, zoom: !0 },
cssProps: { float: T.support.cssFloat ? "cssFloat" : "styleFloat" },
style: function (e, t, n, i) {
if (e && 3 !== e.nodeType && 8 !== e.nodeType && e.style) {
var r,
o,
s = T.camelCase(t),
a = e.style,
l = T.cssHooks[s];
if (((t = T.cssProps[s] || s), n === D)) return l && "get" in l && (r = l.get(e, !1, i)) !== D ? r : a[t];
if (("string" === (o = typeof n) && (r = Ie.exec(n)) && ((n = +(r[1] + 1) * +r[2] + parseFloat(T.css(e, t))), (o = "number")), null == n || ("number" === o && isNaN(n)))) return;
if (("number" === o && !T.cssNumber[s] && (n += "px"), !(l && "set" in l && (n = l.set(e, n)) === D)))
try {
a[t] = n;
} catch (e) {}
}
},
css: function (e, t, n) {
var i, r;
return (t = T.camelCase(t)), (r = T.cssHooks[t]), "cssFloat" === (t = T.cssProps[t] || t) && (t = "float"), r && "get" in r && (i = r.get(e, !0, n)) !== D ? i : ke ? ke(e, t) : void 0;
},
swap: function (e, t, n) {
var i = {};
for (var r in t) (i[r] = e.style[r]), (e.style[r] = t[r]);
for (r in (n.call(e), t)) e.style[r] = i[r];
},
}),
(T.curCSS = T.css),
T.each(["height", "width"], function (e, r) {
T.cssHooks[r] = {
get: function (e, t, n) {
var i;
if (t)
return 0 !== e.offsetWidth
? s(e, r, n)
: (T.swap(e, je, function () {
i = s(e, r, n);
}),
i);
},
set: function (e, t) {
return Ne.test(t) ? (0 <= (t = parseFloat(t)) ? t + "px" : void 0) : t;
},
};
}),
T.support.opacity ||
(T.cssHooks.opacity = {
get: function (e, t) {
return Te.test((t && e.currentStyle ? e.currentStyle.filter : e.style.filter) || "") ? parseFloat(RegExp.$1) / 100 + "" : t ? "1" : "";
},
set: function (e, t) {
var n = e.style,
i = e.currentStyle,
r = T.isNumeric(t) ? "alpha(opacity=" + 100 * t + ")" : "",
o = (i && i.filter) || n.filter || "";
((n.zoom = 1) <= t && "" === T.trim(o.replace(Ae, "")) && (n.removeAttribute("filter"), i && !i.filter)) || (n.filter = Ae.test(o) ? o.replace(Ae, r) : o + " " + r);
},
}),
T(function () {
T.support.reliableMarginRight ||
(T.cssHooks.marginRight = {
get: function (e, t) {
var n;
return (
T.swap(e, { display: "inline-block" }, function () {
n = t ? ke(e, "margin-right", "marginRight") : e.style.marginRight;
}),
n
);
},
});
}),
P.defaultView &&
P.defaultView.getComputedStyle &&
(Ce = function (e, t) {
var n, i, r;
return (
(t = t.replace(Ee, "-$1").toLowerCase()),
(i = e.ownerDocument.defaultView) && (r = i.getComputedStyle(e, null)) && "" === (n = r.getPropertyValue(t)) && !T.contains(e.ownerDocument.documentElement, e) && (n = T.style(e, t)),
n
);
}),
P.documentElement.currentStyle &&
(_e = function (e, t) {
var n,
i,
r,
o = e.currentStyle && e.currentStyle[t],
s = e.style;
return (
null === o && s && (r = s[t]) && (o = r),
!Ne.test(o) &&
Se.test(o) &&
((n = s.left),
(i = e.runtimeStyle && e.runtimeStyle.left) && (e.runtimeStyle.left = e.currentStyle.left),
(s.left = "fontSize" === t ? "1em" : o || 0),
(o = s.pixelLeft + "px"),
(s.left = n),
i && (e.runtimeStyle.left = i)),
"" === o ? "auto" : o
);
}),
(ke = Ce || _e),
T.expr &&
T.expr.filters &&
((T.expr.filters.hidden = function (e) {
var t = e.offsetWidth,
n = e.offsetHeight;
return (0 === t && 0 === n) || (!T.support.reliableHiddenOffsets && "none" === ((e.style && e.style.display) || T.css(e, "display")));
}),
(T.expr.filters.visible = function (e) {
return !T.expr.filters.hidden(e);
}));
var Pe,
Oe,
Be = /%20/g,
Le = /\[\]$/,
Me = /\r?\n/g,
He = /#.*$/,
Re = /^(.*?):[ \t]*([^\r\n]*)\r?$/gm,
qe = /^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,
Ue = /^(?:GET|HEAD)$/,
$e = /^\/\//,
ze = /\?/,
We = /<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,
Xe = /^(?:select|textarea)/i,
Ve = /\s+/,
Je = /([?&])_=[^&]*/,
Ye = /^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,
Ge = T.fn.load,
Ke = {},
Ze = {},
Qe = ["*/"] + ["*"];
try {
Pe = A.href;
} catch (e) {
((Pe = P.createElement("a")).href = ""), (Pe = Pe.href);
}
(Oe = Ye.exec(Pe.toLowerCase()) || []),
T.fn.extend({
load: function (e, t, i) {
if ("string" != typeof e && Ge) return Ge.apply(this, arguments);
if (!this.length) return this;
var n = e.indexOf(" ");
if (0 <= n) {
var r = e.slice(n, e.length);
e = e.slice(0, n);
}
var o = "GET";
t && (T.isFunction(t) ? ((i = t), (t = D)) : "object" == typeof t && ((t = T.param(t, T.ajaxSettings.traditional)), (o = "POST")));
var s = this;
return (
T.ajax({
url: e,
type: o,
dataType: "html",
data: t,
complete: function (e, t, n) {
(n = e.responseText),
e.isResolved() &&
(e.done(function (e) {
n = e;
}),
s.html(r ? T("<div>").append(n.replace(We, "")).find(r) : n)),
i && s.each(i, [n, t, e]);
},
}),
this
);
},
serialize: function () {
return T.param(this.serializeArray());
},
serializeArray: function () {
return this.map(function () {
return this.elements ? T.makeArray(this.elements) : this;
})
.filter(function () {
return this.name && !this.disabled && (this.checked || Xe.test(this.nodeName) || qe.test(this.type));
})
.map(function (e, n) {
var t = T(this).val();
return null == t
? null
: T.isArray(t)
? T.map(t, function (e, t) {
return { name: n.name, value: e.replace(Me, "\r\n") };
})
: { name: n.name, value: t.replace(Me, "\r\n") };
})
.get();
},
}),
T.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "), function (e, t) {
T.fn[t] = function (e) {
return this.on(t, e);
};
}),
T.each(["get", "post"], function (e, r) {
T[r] = function (e, t, n, i) {
return T.isFunction(t) && ((i = i || n), (n = t), (t = D)), T.ajax({ type: r, url: e, data: t, success: n, dataType: i });
};
}),
T.extend({
getScript: function (e, t) {
return T.get(e, D, t, "script");
},
getJSON: function (e, t, n) {
return T.get(e, t, n, "json");
},
ajaxSetup: function (e, t) {
return t ? n(e, T.ajaxSettings) : ((t = e), (e = T.ajaxSettings)), n(e, t), e;
},
ajaxSettings: {
url: Pe,
isLocal: /^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/.test(Oe[1]),
global: !0,
type: "GET",
contentType: "application/x-www-form-urlencoded",
processData: !0,
async: !0,
accepts: { xml: "application/xml, text/xml", html: "text/html", text: "text/plain", json: "application/json, text/javascript", "*": Qe },
contents: { xml: /xml/, html: /html/, json: /json/ },
responseFields: { xml: "responseXML", text: "responseText" },
converters: { "* text": F.String, "text html": !0, "text json": T.parseJSON, "text xml": T.parseXML },
flatOptions: { context: !0, url: !0 },
},
ajaxPrefilter: i(Ke),
ajaxTransport: i(Ze),
ajax: function (e, t) {
function n(e, t, n, i) {
if (2 !== k) {
(k = 2), f && clearTimeout(f), (h = D), (p = i || ""), (C.readyState = 0 < e ? 4 : 0);
var r,
o,
s,
a,
l,
c = t,
u = n
? (function (e, t, n) {
var i,
r,
o,
s,
a = e.contents,
l = e.dataTypes,
c = e.responseFields;
for (r in c) r in n && (t[c[r]] = n[r]);
for (; "*" === l[0]; ) l.shift(), i === D && (i = e.mimeType || t.getResponseHeader("content-type"));
if (i)
for (r in a)
if (a[r] && a[r].test(i)) {
l.unshift(r);
break;
}
if (l[0] in n) o = l[0];
else {
for (r in n) {
if (!l[0] || e.converters[r + " " + l[0]]) {
o = r;
break;
}
s || (s = r);
}
o = o || s;
}
if (o) return o !== l[0] && l.unshift(o), n[o];
})(g, C, n)
: D;
if ((200 <= e && e < 300) || 304 === e)
if ((g.ifModified && ((a = C.getResponseHeader("Last-Modified")) && (T.lastModified[d] = a), (l = C.getResponseHeader("Etag")) && (T.etag[d] = l)), 304 === e)) (c = "notmodified"), (r = !0);
else
try {
(o = (function (e, t) {
e.dataFilter && (t = e.dataFilter(t, e.dataType));
var n,
i,
r,
o,
s,
a,
l,
c,
u = e.dataTypes,
d = {},
p = u.length,
h = u[0];
for (n = 1; n < p; n++) {
if (1 === n) for (i in e.converters) "string" == typeof i && (d[i.toLowerCase()] = e.converters[i]);
if (((o = h), "*" === (h = u[n]))) h = o;
else if ("*" !== o && o !== h) {
if (!(a = d[(s = o + " " + h)] || d["* " + h]))
for (l in ((c = D), d))
if (((r = l.split(" "))[0] === o || "*" === r[0]) && (c = d[r[1] + " " + h])) {
!0 === (l = d[l]) ? (a = c) : !0 === c && (a = l);
break;
}
!a && !c && T.error("No conversion from " + s.replace(" ", " to ")), !0 !== a && (t = a ? a(t) : c(l(t)));
}
}
return t;
})(g, u)),
(c = "success"),
(r = !0);
} catch (e) {
(c = "parsererror"), (s = e);
}
else ((s = c) && !e) || ((c = "error"), e < 0 && (e = 0));
(C.status = e),
(C.statusText = "" + (t || c)),
r ? b.resolveWith(y, [o, c, C]) : b.rejectWith(y, [C, c, s]),
C.statusCode(x),
(x = D),
m && v.trigger("ajax" + (r ? "Success" : "Error"), [C, g, r ? o : s]),
w.fireWith(y, [C, c]),
m && (v.trigger("ajaxComplete", [C, g]), --T.active || T.event.trigger("ajaxStop"));
}
}
"object" == typeof e && ((t = e), (e = D)), (t = t || {});
var d,
p,
i,
h,
f,
r,
m,
o,
g = T.ajaxSetup({}, t),
y = g.context || g,
v = y !== g && (y.nodeType || y instanceof T) ? T(y) : T.event,
b = T.Deferred(),
w = T.Callbacks("once memory"),
x = g.statusCode || {},
s = {},
a = {},
k = 0,
C = {
readyState: 0,
setRequestHeader: function (e, t) {
if (!k) {
var n = e.toLowerCase();
(e = a[n] = a[n] || e), (s[e] = t);
}
return this;
},
getAllResponseHeaders: function () {
return 2 === k ? p : null;
},
getResponseHeader: function (e) {
var t;
if (2 === k) {
if (!i) for (i = {}; (t = Re.exec(p)); ) i[t[1].toLowerCase()] = t[2];
t = i[e.toLowerCase()];
}
return t === D ? null : t;
},
overrideMimeType: function (e) {
return k || (g.mimeType = e), this;
},
abort: function (e) {
return (e = e || "abort"), h && h.abort(e), n(0, e), this;
},
};
if (
(b.promise(C),
(C.success = C.done),
(C.error = C.fail),
(C.complete = w.add),
(C.statusCode = function (e) {
var t;
if (e)
if (k < 2) for (t in e) x[t] = [x[t], e[t]];
else (t = e[C.status]), C.then(t, t);
return this;
}),
(g.url = ((e || g.url) + "").replace(He, "").replace($e, Oe[1] + "//")),
(g.dataTypes = T.trim(g.dataType || "*")
.toLowerCase()
.split(Ve)),
null == g.crossDomain && ((r = Ye.exec(g.url.toLowerCase())), (g.crossDomain = !(!r || (r[1] == Oe[1] && r[2] == Oe[2] && (r[3] || ("http:" === r[1] ? 80 : 443)) == (Oe[3] || ("http:" === Oe[1] ? 80 : 443)))))),
g.data && g.processData && "string" != typeof g.data && (g.data = T.param(g.data, g.traditional)),
_(Ke, g, t, C),
2 === k)
)
return !1;
if (
((m = g.global),
(g.type = g.type.toUpperCase()),
(g.hasContent = !Ue.test(g.type)),
m && 0 == T.active++ && T.event.trigger("ajaxStart"),
!g.hasContent && (g.data && ((g.url += (ze.test(g.url) ? "&" : "?") + g.data), delete g.data), (d = g.url), !1 === g.cache))
) {
var l = T.now(),
c = g.url.replace(Je, "$1_=" + l);
g.url = c + (c === g.url ? (ze.test(g.url) ? "&" : "?") + "_=" + l : "");
}
for (o in (((g.data && g.hasContent && !1 !== g.contentType) || t.contentType) && C.setRequestHeader("Content-Type", g.contentType),
g.ifModified && ((d = d || g.url), T.lastModified[d] && C.setRequestHeader("If-Modified-Since", T.lastModified[d]), T.etag[d] && C.setRequestHeader("If-None-Match", T.etag[d])),
C.setRequestHeader("Accept", g.dataTypes[0] && g.accepts[g.dataTypes[0]] ? g.accepts[g.dataTypes[0]] + ("*" !== g.dataTypes[0] ? ", " + Qe + "; q=0.01" : "") : g.accepts["*"]),
g.headers))
C.setRequestHeader(o, g.headers[o]);
if (g.beforeSend && (!1 === g.beforeSend.call(y, C, g) || 2 === k)) return C.abort(), !1;
for (o in { success: 1, error: 1, complete: 1 }) C[o](g[o]);
if ((h = _(Ze, g, t, C))) {
(C.readyState = 1),
m && v.trigger("ajaxSend", [C, g]),
g.async &&
0 < g.timeout &&
(f = setTimeout(function () {
C.abort("timeout");
}, g.timeout));
try {
(k = 1), h.send(s, n);
} catch (e) {
if (!(k < 2)) throw e;
n(-1, e);
}
} else n(-1, "No Transport");
return C;
},
param: function (e, t) {
var n = [],
i = function (e, t) {
(t = T.isFunction(t) ? t() : t), (n[n.length] = encodeURIComponent(e) + "=" + encodeURIComponent(t));
};
if ((t === D && (t = T.ajaxSettings.traditional), T.isArray(e) || (e.jquery && !T.isPlainObject(e))))
T.each(e, function () {
i(this.name, this.value);
});
else for (var r in e) o(r, e[r], t, i);
return n.join("&").replace(Be, "+");
},
}),
T.extend({ active: 0, lastModified: {}, etag: {} });
var et = T.now(),
tt = /(\=)\?(&|$)|\?\?/i;
T.ajaxSetup({
jsonp: "callback",
jsonpCallback: function () {
return T.expando + "_" + et++;
},
}),
T.ajaxPrefilter("json jsonp", function (e, t, n) {
var i = "application/x-www-form-urlencoded" === e.contentType && "string" == typeof e.data;
if ("jsonp" === e.dataTypes[0] || (!1 !== e.jsonp && (tt.test(e.url) || (i && tt.test(e.data))))) {
var r,
o = (e.jsonpCallback = T.isFunction(e.jsonpCallback) ? e.jsonpCallback() : e.jsonpCallback),
s = F[o],
a = e.url,
l = e.data,
c = "$1" + o + "$2";
return (
!1 !== e.jsonp && ((a = a.replace(tt, c)), e.url === a && (i && (l = l.replace(tt, c)), e.data === l && (a += (/\?/.test(a) ? "&" : "?") + e.jsonp + "=" + o))),
(e.url = a),
(e.data = l),
(F[o] = function (e) {
r = [e];
}),
n.always(function () {
(F[o] = s), r && T.isFunction(s) && F[o](r[0]);
}),
(e.converters["script json"] = function () {
return r || T.error(o + " was not called"), r[0];
}),
(e.dataTypes[0] = "json"),
"script"
);
}
}),
T.ajaxSetup({
accepts: { script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript" },
contents: { script: /javascript|ecmascript/ },
converters: {
"text script": function (e) {
return T.globalEval(e), e;
},
},
}),
T.ajaxPrefilter("script", function (e) {
e.cache === D && (e.cache = !1), e.crossDomain && ((e.type = "GET"), (e.global = !1));
}),
T.ajaxTransport("script", function (t) {
if (t.crossDomain) {
var i,
r = P.head || P.getElementsByTagName("head")[0] || P.documentElement;
return {
send: function (e, n) {
((i = P.createElement("script")).async = "async"),
t.scriptCharset && (i.charset = t.scriptCharset),
(i.src = t.url),
(i.onload = i.onreadystatechange = function (e, t) {
(t || !i.readyState || /loaded|complete/.test(i.readyState)) && ((i.onload = i.onreadystatechange = null), r && i.parentNode && r.removeChild(i), (i = D), t || n(200, "success"));
}),
r.insertBefore(i, r.firstChild);
},
abort: function () {
i && i.onload(0, 1);
},
};
}
});
var nt,
it,
rt =
!!F.ActiveXObject &&
function () {
for (var e in nt) nt[e](0, 1);
},
ot = 0;
(T.ajaxSettings.xhr = F.ActiveXObject
? function () {
return (
(!this.isLocal && t()) ||
(function () {
try {
return new F.ActiveXObject("Microsoft.XMLHTTP");
} catch (e) {}
})()
);
}
: t),
(it = T.ajaxSettings.xhr()),
T.extend(T.support, { ajax: !!it, cors: !!it && "withCredentials" in it }),
T.support.ajax &&
T.ajaxTransport(function (u) {
var d;
if (!u.crossDomain || T.support.cors)
return {
send: function (e, a) {
var l,
t,
c = u.xhr();
if ((u.username ? c.open(u.type, u.url, u.async, u.username, u.password) : c.open(u.type, u.url, u.async), u.xhrFields)) for (t in u.xhrFields) c[t] = u.xhrFields[t];
u.mimeType && c.overrideMimeType && c.overrideMimeType(u.mimeType), !u.crossDomain && !e["X-Requested-With"] && (e["X-Requested-With"] = "XMLHttpRequest");
try {
for (t in e) c.setRequestHeader(t, e[t]);
} catch (e) {}
c.send((u.hasContent && u.data) || null),
(d = function (e, t) {
var n, i, r, o, s;
try {
if (d && (t || 4 === c.readyState))
if (((d = D), l && ((c.onreadystatechange = T.noop), rt && delete nt[l]), t)) 4 !== c.readyState && c.abort();
else {
(n = c.status), (r = c.getAllResponseHeaders()), (o = {}), (s = c.responseXML) && s.documentElement && (o.xml = s), (o.text = c.responseText);
try {
i = c.statusText;
} catch (e) {
i = "";
}
n || !u.isLocal || u.crossDomain ? 1223 === n && (n = 204) : (n = o.text ? 200 : 404);
}
} catch (e) {
t || a(-1, e);
}
o && a(n, i, o, r);
}),
u.async && 4 !== c.readyState ? ((l = ++ot), rt && (nt || ((nt = {}), T(F).unload(rt)), (nt[l] = d)), (c.onreadystatechange = d)) : d();
},
abort: function () {
d && d(0, 1);
},
};
});
var st,
at,
lt,
ct,
ut = {},
dt = /^(?:toggle|show|hide)$/,
pt = /^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,
ht = [["height", "marginTop", "marginBottom", "paddingTop", "paddingBottom"], ["width", "marginLeft", "marginRight", "paddingLeft", "paddingRight"], ["opacity"]];
T.fn.extend({
show: function (e, t, n) {
var i, r;
if (e || 0 === e) return this.animate(a("show", 3), e, t, n);
for (var o = 0, s = this.length; o < s; o++)
(i = this[o]).style && ((r = i.style.display), !T._data(i, "olddisplay") && "none" === r && (r = i.style.display = ""), "" === r && "none" === T.css(i, "display") && T._data(i, "olddisplay", f(i.nodeName)));
for (o = 0; o < s; o++) (i = this[o]).style && (("" !== (r = i.style.display) && "none" !== r) || (i.style.display = T._data(i, "olddisplay") || ""));
return this;
},
hide: function (e, t, n) {
if (e || 0 === e) return this.animate(a("hide", 3), e, t, n);
for (var i, r, o = 0, s = this.length; o < s; o++) (i = this[o]).style && "none" !== (r = T.css(i, "display")) && !T._data(i, "olddisplay") && T._data(i, "olddisplay", r);
for (o = 0; o < s; o++) this[o].style && (this[o].style.display = "none");
return this;
},
_toggle: T.fn.toggle,
toggle: function (t, e, n) {
var i = "boolean" == typeof t;
return (
T.isFunction(t) && T.isFunction(e)
? this._toggle.apply(this, arguments)
: null == t || i
? this.each(function () {
var e = i ? t : T(this).is(":hidden");
T(this)[e ? "show" : "hide"]();
})
: this.animate(a("toggle", 3), t, e, n),
this
);
},
fadeTo: function (e, t, n, i) {
return this.filter(":hidden").css("opacity", 0).show().end().animate({ opacity: t }, e, n, i);
},
animate: function (p, e, t, n) {
function i() {
!1 === h.queue && T._mark(this);
var e,
t,
n,
i,
r,
o,
s,
a,
l,
c = T.extend({}, h),
u = 1 === this.nodeType,
d = u && T(this).is(":hidden");
for (n in ((c.animatedProperties = {}), p)) {
if (
(n !== (e = T.camelCase(n)) && ((p[e] = p[n]), delete p[n]),
(t = p[e]),
T.isArray(t) ? ((c.animatedProperties[e] = t[1]), (t = p[e] = t[0])) : (c.animatedProperties[e] = (c.specialEasing && c.specialEasing[e]) || c.easing || "swing"),
("hide" === t && d) || ("show" === t && !d))
)
return c.complete.call(this);
u &&
("height" === e || "width" === e) &&
((c.overflow = [this.style.overflow, this.style.overflowX, this.style.overflowY]),
"inline" === T.css(this, "display") && "none" === T.css(this, "float") && (T.support.inlineBlockNeedsLayout && "inline" !== f(this.nodeName) ? (this.style.zoom = 1) : (this.style.display = "inline-block")));
}
for (n in (null != c.overflow && (this.style.overflow = "hidden"), p))
(i = new T.fx(this, c, n)),
(t = p[n]),
dt.test(t)
? (l = T._data(this, "toggle" + n) || ("toggle" === t ? (d ? "show" : "hide") : 0))
? (T._data(this, "toggle" + n, "show" === l ? "hide" : "show"), i[l]())
: i[t]()
: ((r = pt.exec(t)),
(o = i.cur()),
r
? ((s = parseFloat(r[2])),
"px" !== (a = r[3] || (T.cssNumber[n] ? "" : "px")) && (T.style(this, n, (s || 1) + a), (o = ((s || 1) / i.cur()) * o), T.style(this, n, o + a)),
r[1] && (s = ("-=" === r[1] ? -1 : 1) * s + o),
i.custom(o, s, a))
: i.custom(o, t, ""));
return !0;
}
var h = T.speed(e, t, n);
return T.isEmptyObject(p) ? this.each(h.complete, [!1]) : ((p = T.extend({}, p)), !1 === h.queue ? this.each(i) : this.queue(h.queue, i));
},
stop: function (o, e, s) {
return (
"string" != typeof o && ((s = e), (e = o), (o = D)),
e && !1 !== o && this.queue(o || "fx", []),
this.each(function () {
function e(e, t, n) {
var i = t[n];
T.removeData(e, n, !0), i.stop(s);
}
var t,
n = !1,
i = T.timers,
r = T._data(this);
if ((s || T._unmark(!0, this), null == o)) for (t in r) r[t] && r[t].stop && t.indexOf(".run") === t.length - 4 && e(this, r, t);
else r[(t = o + ".run")] && r[t].stop && e(this, r, t);
for (t = i.length; t--; ) i[t].elem === this && (null == o || i[t].queue === o) && (s ? i[t](!0) : i[t].saveState(), (n = !0), i.splice(t, 1));
(!s || !n) && T.dequeue(this, o);
})
);
},
}),
T.each({ slideDown: a("show", 1), slideUp: a("hide", 1), slideToggle: a("toggle", 1), fadeIn: { opacity: "show" }, fadeOut: { opacity: "hide" }, fadeToggle: { opacity: "toggle" } }, function (e, i) {
T.fn[e] = function (e, t, n) {
return this.animate(i, e, t, n);
};
}),
T.extend({
speed: function (e, t, n) {
var i = e && "object" == typeof e ? T.extend({}, e) : { complete: n || (!n && t) || (T.isFunction(e) && e), duration: e, easing: (n && t) || (t && !T.isFunction(t) && t) };
return (
(i.duration = T.fx.off ? 0 : "number" == typeof i.duration ? i.duration : i.duration in T.fx.speeds ? T.fx.speeds[i.duration] : T.fx.speeds._default),
(null != i.queue && !0 !== i.queue) || (i.queue = "fx"),
(i.old = i.complete),
(i.complete = function (e) {
T.isFunction(i.old) && i.old.call(this), i.queue ? T.dequeue(this, i.queue) : !1 !== e && T._unmark(this);
}),
i
);
},
easing: {
linear: function (e, t, n, i) {
return n + i * e;
},
swing: function (e, t, n, i) {
return (-Math.cos(e * Math.PI) / 2 + 0.5) * i + n;
},
},
timers: [],
fx: function (e, t, n) {
(this.options = t), (this.elem = e), (this.prop = n), (t.orig = t.orig || {});
},
}),
(T.fx.prototype = {
update: function () {
this.options.step && this.options.step.call(this.elem, this.now, this), (T.fx.step[this.prop] || T.fx.step._default)(this);
},
cur: function () {
if (null != this.elem[this.prop] && (!this.elem.style || null == this.elem.style[this.prop])) return this.elem[this.prop];
var e,
t = T.css(this.elem, this.prop);
return isNaN((e = parseFloat(t))) ? (t && "auto" !== t ? t : 0) : e;
},
custom: function (e, t, n) {
function i(e) {
return r.step(e);
}
var r = this,
o = T.fx;
(this.startTime = ct || l()),
(this.end = t),
(this.now = this.start = e),
(this.pos = this.state = 0),
(this.unit = n || this.unit || (T.cssNumber[this.prop] ? "" : "px")),
(i.queue = this.options.queue),
(i.elem = this.elem),
(i.saveState = function () {
r.options.hide && T._data(r.elem, "fxshow" + r.prop) === D && T._data(r.elem, "fxshow" + r.prop, r.start);
}),
i() && T.timers.push(i) && !lt && (lt = setInterval(o.tick, o.interval));
},
show: function () {
var e = T._data(this.elem, "fxshow" + this.prop);
(this.options.orig[this.prop] = e || T.style(this.elem, this.prop)),
(this.options.show = !0),
e !== D ? this.custom(this.cur(), e) : this.custom("width" === this.prop || "height" === this.prop ? 1 : 0, this.cur()),
T(this.elem).show();
},
hide: function () {
(this.options.orig[this.prop] = T._data(this.elem, "fxshow" + this.prop) || T.style(this.elem, this.prop)), (this.options.hide = !0), this.custom(this.cur(), 0);
},
step: function (e) {
var t,
n,
i,
r = ct || l(),
o = !0,
s = this.elem,
a = this.options;
if (e || r >= a.duration + this.startTime) {
for (t in ((this.now = this.end), (this.pos = this.state = 1), this.update(), (a.animatedProperties[this.prop] = !0), a.animatedProperties)) !0 !== a.animatedProperties[t] && (o = !1);
if (o) {
if (
(null != a.overflow &&
!T.support.shrinkWrapBlocks &&
T.each(["", "X", "Y"], function (e, t) {
s.style["overflow" + t] = a.overflow[e];
}),
a.hide && T(s).hide(),
a.hide || a.show)
)
for (t in a.animatedProperties) T.style(s, t, a.orig[t]), T.removeData(s, "fxshow" + t, !0), T.removeData(s, "toggle" + t, !0);
(i = a.complete) && ((a.complete = !1), i.call(s));
}
return !1;
}
return (
a.duration == 1 / 0
? (this.now = r)
: ((n = r - this.startTime), (this.state = n / a.duration), (this.pos = T.easing[a.animatedProperties[this.prop]](this.state, n, 0, 1, a.duration)), (this.now = this.start + (this.end - this.start) * this.pos)),
this.update(),
!0
);
},
}),
T.extend(T.fx, {
tick: function () {
for (var e, t = T.timers, n = 0; n < t.length; n++) !(e = t[n])() && t[n] === e && t.splice(n--, 1);
t.length || T.fx.stop();
},
interval: 13,
stop: function () {
clearInterval(lt), (lt = null);
},
speeds: { slow: 600, fast: 200, _default: 400 },
step: {
opacity: function (e) {
T.style(e.elem, "opacity", e.now);
},
_default: function (e) {
e.elem.style && null != e.elem.style[e.prop] ? (e.elem.style[e.prop] = e.now + e.unit) : (e.elem[e.prop] = e.now);
},
},
}),
T.each(["width", "height"], function (e, t) {
T.fx.step[t] = function (e) {
T.style(e.elem, t, Math.max(0, e.now) + e.unit);
};
}),
T.expr &&
T.expr.filters &&
(T.expr.filters.animated = function (t) {
return T.grep(T.timers, function (e) {
return t === e.elem;
}).length;
});
var ft = /^t(?:able|d|h)$/i,
mt = /^(?:body|html)$/i;
"getBoundingClientRect" in P.documentElement
? (T.fn.offset = function (t) {
var e,
n = this[0];
if (t)
return this.each(function (e) {
T.offset.setOffset(this, t, e);
});
if (!n || !n.ownerDocument) return null;
if (n === n.ownerDocument.body) return T.offset.bodyOffset(n);
try {
e = n.getBoundingClientRect();
} catch (e) {}
var i = n.ownerDocument,
r = i.documentElement;
if (!e || !T.contains(r, n)) return e ? { top: e.top, left: e.left } : { top: 0, left: 0 };
var o = i.body,
s = d(i),
a = r.clientTop || o.clientTop || 0,
l = r.clientLeft || o.clientLeft || 0,
c = s.pageYOffset || (T.support.boxModel && r.scrollTop) || o.scrollTop,
u = s.pageXOffset || (T.support.boxModel && r.scrollLeft) || o.scrollLeft;
return { top: e.top + c - a, left: e.left + u - l };
})
: (T.fn.offset = function (t) {
var e = this[0];
if (t)
return this.each(function (e) {
T.offset.setOffset(this, t, e);
});
if (!e || !e.ownerDocument) return null;
if (e === e.ownerDocument.body) return T.offset.bodyOffset(e);
for (
var n, i = e.offsetParent, r = e.ownerDocument, o = r.documentElement, s = r.body, a = r.defaultView, l = a ? a.getComputedStyle(e, null) : e.currentStyle, c = e.offsetTop, u = e.offsetLeft;
(e = e.parentNode) && e !== s && e !== o && (!T.support.fixedPosition || "fixed" !== l.position);

)
(n = a ? a.getComputedStyle(e, null) : e.currentStyle),
(c -= e.scrollTop),
(u -= e.scrollLeft),
e === i &&
((c += e.offsetTop),
(u += e.offsetLeft),
T.support.doesNotAddBorder && (!T.support.doesAddBorderForTableAndCells || !ft.test(e.nodeName)) && ((c += parseFloat(n.borderTopWidth) || 0), (u += parseFloat(n.borderLeftWidth) || 0)),
i,
(i = e.offsetParent)),
T.support.subtractsBorderForOverflowNotVisible && "visible" !== n.overflow && ((c += parseFloat(n.borderTopWidth) || 0), (u += parseFloat(n.borderLeftWidth) || 0)),
(l = n);
return (
("relative" !== l.position && "static" !== l.position) || ((c += s.offsetTop), (u += s.offsetLeft)),
T.support.fixedPosition && "fixed" === l.position && ((c += Math.max(o.scrollTop, s.scrollTop)), (u += Math.max(o.scrollLeft, s.scrollLeft))),
{ top: c, left: u }
);
}),
(T.offset = {
bodyOffset: function (e) {
var t = e.offsetTop,
n = e.offsetLeft;
return T.support.doesNotIncludeMarginInBodyOffset && ((t += parseFloat(T.css(e, "marginTop")) || 0), (n += parseFloat(T.css(e, "marginLeft")) || 0)), { top: t, left: n };
},
setOffset: function (e, t, n) {
var i = T.css(e, "position");
"static" === i && (e.style.position = "relative");
var r,
o,
s = T(e),
a = s.offset(),
l = T.css(e, "top"),
c = T.css(e, "left"),
u = {},
d = {};
(o = ("absolute" === i || "fixed" === i) && -1 < T.inArray("auto", [l, c]) ? ((r = (d = s.position()).top), d.left) : ((r = parseFloat(l) || 0), parseFloat(c) || 0)),
T.isFunction(t) && (t = t.call(e, n, a)),
null != t.top && (u.top = t.top - a.top + r),
null != t.left && (u.left = t.left - a.left + o),
"using" in t ? t.using.call(e, u) : s.css(u);
},
}),
T.fn.extend({
position: function () {
if (!this[0]) return null;
var e = this[0],
t = this.offsetParent(),
n = this.offset(),
i = mt.test(t[0].nodeName) ? { top: 0, left: 0 } : t.offset();
return (
(n.top -= parseFloat(T.css(e, "marginTop")) || 0),
(n.left -= parseFloat(T.css(e, "marginLeft")) || 0),
(i.top += parseFloat(T.css(t[0], "borderTopWidth")) || 0),
(i.left += parseFloat(T.css(t[0], "borderLeftWidth")) || 0),
{ top: n.top - i.top, left: n.left - i.left }
);
},
offsetParent: function () {
return this.map(function () {
for (var e = this.offsetParent || P.body; e && !mt.test(e.nodeName) && "static" === T.css(e, "position"); ) e = e.offsetParent;
return e;
});
},
}),
T.each(["Left", "Top"], function (i, e) {
var r = "scroll" + e;
T.fn[r] = function (e) {
var t, n;
return e === D
? (t = this[0])
? (n = d(t))
? "pageXOffset" in n
? n[i ? "pageYOffset" : "pageXOffset"]
: (T.support.boxModel && n.document.documentElement[r]) || n.document.body[r]
: t[r]
: null
: this.each(function () {
(n = d(this)) ? n.scrollTo(i ? T(n).scrollLeft() : e, i ? e : T(n).scrollTop()) : (this[r] = e);
});
};
}),
T.each(["Height", "Width"], function (e, s) {
var a = s.toLowerCase();
(T.fn["inner" + s] = function () {
var e = this[0];
return e ? (e.style ? parseFloat(T.css(e, a, "padding")) : this[a]()) : null;
}),
(T.fn["outer" + s] = function (e) {
var t = this[0];
return t ? (t.style ? parseFloat(T.css(t, a, e ? "margin" : "border")) : this[a]()) : null;
}),
(T.fn[a] = function (n) {
var e = this[0];
if (!e) return null == n ? null : this;
if (T.isFunction(n))
return this.each(function (e) {
var t = T(this);
t[a](n.call(this, e, t[a]()));
});
if (T.isWindow(e)) {
var t = e.document.documentElement["client" + s],
i = e.document.body;
return ("CSS1Compat" === e.document.compatMode && t) || (i && i["client" + s]) || t;
}
if (9 === e.nodeType) return Math.max(e.documentElement["client" + s], e.body["scroll" + s], e.documentElement["scroll" + s], e.body["offset" + s], e.documentElement["offset" + s]);
if (n !== D) return this.css(a, "string" == typeof n ? n : n + "px");
var r = T.css(e, a),
o = parseFloat(r);
return T.isNumeric(o) ? o : r;
});
}),
(F.jQuery = F.$ = T),
"function" == typeof define &&
define.amd &&
define.amd.jQuery &&
define("jquery", [], function () {
return T;
});
})(window),
(function (e) {
if ("object" == typeof exports && "undefined" != typeof module) module.exports = e();
else if ("function" == typeof define && define.amd) define([], e);
else {
("undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : this).io = e();
}
})(function () {
return (function o(s, a, l) {
function c(n, e) {
if (!a[n]) {
if (!s[n]) {
var t = "function" == typeof require && require;
if (!e && t) return t(n, !0);
if (u) return u(n, !0);
var i = new Error("Cannot find module '" + n + "'");
throw ((i.code = "MODULE_NOT_FOUND"), i);
}
var r = (a[n] = { exports: {} });
s[n][0].call(
r.exports,
function (e) {
var t = s[n][1][e];
return c(t || e);
},
r,
r.exports,
o,
s,
a,
l
);
}
return a[n].exports;
}
for (var u = "function" == typeof require && require, e = 0; e < l.length; e++) c(l[e]);
return c;
})(
{
1: [
function (e, t, n) {
t.exports = e("./lib/");
},
{ "./lib/": 2 },
],
2: [
function (e, t, n) {
(t.exports = e("./socket")), (t.exports.parser = e("engine.io-parser"));
},
{ "./socket": 3, "engine.io-parser": 19 },
],
3: [
function (t, c, e) {
(function (i) {
var n = t("./transports"),
e = t("component-emitter"),
d = t("debug")("engine.io-client:socket"),
r = t("indexof"),
o = t("engine.io-parser"),
s = t("parseuri"),
a = t("parsejson"),
l = t("parseqs");
function p(e, t) {
if (!(this instanceof p)) return new p(e, t);
(t = t || {}),
e && "object" == typeof e && ((t = e), (e = null)),
e ? ((e = s(e)), (t.hostname = e.host), (t.secure = "https" == e.protocol || "wss" == e.protocol), (t.port = e.port), e.query && (t.query = e.query)) : t.host && (t.hostname = s(t.host).host),
(this.secure = null != t.secure ? t.secure : i.location && "https:" == location.protocol),
t.hostname && !t.port && (t.port = this.secure ? "443" : "80"),
(this.agent = t.agent || !1),
(this.hostname = t.hostname || (i.location ? location.hostname : "localhost")),
(this.port = t.port || (i.location && location.port ? location.port : this.secure ? 443 : 80)),
(this.query = t.query || {}),
"string" == typeof this.query && (this.query = l.decode(this.query)),
(this.upgrade = !1 !== t.upgrade),
(this.path = (t.path || "/engine.io").replace(/\/$/, "") + "/"),
(this.forceJSONP = !!t.forceJSONP),
(this.jsonp = !1 !== t.jsonp),
(this.forceBase64 = !!t.forceBase64),
(this.enablesXDR = !!t.enablesXDR),
(this.timestampParam = t.timestampParam || "t"),
(this.timestampRequests = t.timestampRequests),
(this.transports = t.transports || ["polling", "websocket"]),
(this.readyState = ""),
(this.writeBuffer = []),
(this.policyPort = t.policyPort || 843),
(this.rememberUpgrade = t.rememberUpgrade || !1),
(this.binaryType = null),
(this.onlyBinaryUpgrades = t.onlyBinaryUpgrades),
(this.perMessageDeflate = !1 !== t.perMessageDeflate && (t.perMessageDeflate || {})),
!0 === this.perMessageDeflate && (this.perMessageDeflate = {}),
this.perMessageDeflate && null == this.perMessageDeflate.threshold && (this.perMessageDeflate.threshold = 1024),
(this.pfx = t.pfx || null),
(this.key = t.key || null),
(this.passphrase = t.passphrase || null),
(this.cert = t.cert || null),
(this.ca = t.ca || null),
(this.ciphers = t.ciphers || null),
(this.rejectUnauthorized = void 0 === t.rejectUnauthorized ? null : t.rejectUnauthorized);
var n = "object" == typeof i && i;
n.global === n && t.extraHeaders && 0 < Object.keys(t.extraHeaders).length && (this.extraHeaders = t.extraHeaders), this.open();
}
((c.exports = p).priorWebsocketSuccess = !1),
e(p.prototype),
(p.protocol = o.protocol),
((p.Socket = p).Transport = t("./transport")),
(p.transports = t("./transports")),
(p.parser = t("engine.io-parser")),
(p.prototype.createTransport = function (e) {
d('creating transport "%s"', e);
var t = (function (e) {
var t = {};
for (var n in e) e.hasOwnProperty(n) && (t[n] = e[n]);
return t;
})(this.query);
return (
(t.EIO = o.protocol),
(t.transport = e),
this.id && (t.sid = this.id),
new n[e]({
agent: this.agent,
hostname: this.hostname,
port: this.port,
secure: this.secure,
path: this.path,
query: t,
forceJSONP: this.forceJSONP,
jsonp: this.jsonp,
forceBase64: this.forceBase64,
enablesXDR: this.enablesXDR,
timestampRequests: this.timestampRequests,
timestampParam: this.timestampParam,
policyPort: this.policyPort,
socket: this,
pfx: this.pfx,
key: this.key,
passphrase: this.passphrase,
cert: this.cert,
ca: this.ca,
ciphers: this.ciphers,
rejectUnauthorized: this.rejectUnauthorized,
perMessageDeflate: this.perMessageDeflate,
extraHeaders: this.extraHeaders,
})
);
}),
(p.prototype.open = function () {
var e;
if (this.rememberUpgrade && p.priorWebsocketSuccess && -1 != this.transports.indexOf("websocket")) e = "websocket";
else {
if (0 === this.transports.length) {
var t = this;
return void setTimeout(function () {
t.emit("error", "No transports available");
}, 0);
}
e = this.transports[0];
}
this.readyState = "opening";
try {
e = this.createTransport(e);
} catch (e) {
return this.transports.shift(), void this.open();
}
e.open(), this.setTransport(e);
}),
(p.prototype.setTransport = function (e) {
d("setting transport %s", e.name);
var t = this;
this.transport && (d("clearing existing transport %s", this.transport.name), this.transport.removeAllListeners()),
(this.transport = e)
.on("drain", function () {
t.onDrain();
})
.on("packet", function (e) {
t.onPacket(e);
})
.on("error", function (e) {
t.onError(e);
})
.on("close", function () {
t.onClose("transport close");
});
}),
(p.prototype.probe = function (n) {
d('probing transport "%s"', n);
var i = this.createTransport(n, { probe: 1 }),
r = !1,
o = this;
function e() {
if (o.onlyBinaryUpgrades) {
var e = !this.supportsBinary && o.transport.supportsBinary;
r = r || e;
}
r ||
(d('probe transport "%s" opened', n),
i.send([{ type: "ping", data: "probe" }]),
i.once("packet", function (e) {
if (!r)
if ("pong" == e.type && "probe" == e.data) {
if ((d('probe transport "%s" pong', n), (o.upgrading = !0), o.emit("upgrading", i), !i)) return;
(p.priorWebsocketSuccess = "websocket" == i.name),
d('pausing current transport "%s"', o.transport.name),
o.transport.pause(function () {
r ||
("closed" != o.readyState &&
(d("changing transport and sending upgrade packet"),
u(),
o.setTransport(i),
i.send([{ type: "upgrade" }]),
o.emit("upgrade", i),
(i = null),
(o.upgrading = !1),
o.flush()));
});
} else {
d('probe transport "%s" failed', n);
var t = new Error("probe error");
(t.transport = i.name), o.emit("upgradeError", t);
}
}));
}
function s() {
r || ((r = !0), u(), i.close(), (i = null));
}
function t(e) {
var t = new Error("probe error: " + e);
(t.transport = i.name), s(), d('probe transport "%s" failed because of error: %s', n, e), o.emit("upgradeError", t);
}
function a() {
t("transport closed");
}
function l() {
t("socket closed");
}
function c(e) {
i && e.name != i.name && (d('"%s" works - aborting "%s"', e.name, i.name), s());
}
function u() {
i.removeListener("open", e), i.removeListener("error", t), i.removeListener("close", a), o.removeListener("close", l), o.removeListener("upgrading", c);
}
(p.priorWebsocketSuccess = !1), i.once("open", e), i.once("error", t), i.once("close", a), this.once("close", l), this.once("upgrading", c), i.open();
}),
(p.prototype.onOpen = function () {
if (
(d("socket open"),
(this.readyState = "open"),
(p.priorWebsocketSuccess = "websocket" == this.transport.name),
this.emit("open"),
this.flush(),
"open" == this.readyState && this.upgrade && this.transport.pause)
) {
d("starting upgrade probes");
for (var e = 0, t = this.upgrades.length; e < t; e++) this.probe(this.upgrades[e]);
}
}),
(p.prototype.onPacket = function (e) {
if ("opening" == this.readyState || "open" == this.readyState)
switch ((d('socket receive: type "%s", data "%s"', e.type, e.data), this.emit("packet", e), this.emit("heartbeat"), e.type)) {
case "open":
this.onHandshake(a(e.data));
break;
case "pong":
this.setPing(), this.emit("pong");
break;
case "error":
var t = new Error("server error");
(t.code = e.data), this.onError(t);
break;
case "message":
this.emit("data", e.data), this.emit("message", e.data);
}
else d('packet received with socket readyState "%s"', this.readyState);
}),
(p.prototype.onHandshake = function (e) {
this.emit("handshake", e),
(this.id = e.sid),
(this.transport.query.sid = e.sid),
(this.upgrades = this.filterUpgrades(e.upgrades)),
(this.pingInterval = e.pingInterval),
(this.pingTimeout = e.pingTimeout),
this.onOpen(),
"closed" != this.readyState && (this.setPing(), this.removeListener("heartbeat", this.onHeartbeat), this.on("heartbeat", this.onHeartbeat));
}),
(p.prototype.onHeartbeat = function (e) {
clearTimeout(this.pingTimeoutTimer);
var t = this;
t.pingTimeoutTimer = setTimeout(function () {
"closed" != t.readyState && t.onClose("ping timeout");
}, e || t.pingInterval + t.pingTimeout);
}),
(p.prototype.setPing = function () {
var e = this;
clearTimeout(e.pingIntervalTimer),
(e.pingIntervalTimer = setTimeout(function () {
d("writing ping packet - expecting pong within %sms", e.pingTimeout), e.ping(), e.onHeartbeat(e.pingTimeout);
}, e.pingInterval));
}),
(p.prototype.ping = function () {
var e = this;
this.sendPacket("ping", function () {
e.emit("ping");
});
}),
(p.prototype.onDrain = function () {
this.writeBuffer.splice(0, this.prevBufferLen), (this.prevBufferLen = 0) === this.writeBuffer.length ? this.emit("drain") : this.flush();
}),
(p.prototype.flush = function () {
"closed" != this.readyState &&
this.transport.writable &&
!this.upgrading &&
this.writeBuffer.length &&
(d("flushing %d packets in socket", this.writeBuffer.length), this.transport.send(this.writeBuffer), (this.prevBufferLen = this.writeBuffer.length), this.emit("flush"));
}),
(p.prototype.write = p.prototype.send = function (e, t, n) {
return this.sendPacket("message", e, t, n), this;
}),
(p.prototype.sendPacket = function (e, t, n, i) {
if (("function" == typeof t && ((i = t), (t = void 0)), "function" == typeof n && ((i = n), (n = null)), "closing" != this.readyState && "closed" != this.readyState)) {
(n = n || {}).compress = !1 !== n.compress;
var r = { type: e, data: t, options: n };
this.emit("packetCreate", r), this.writeBuffer.push(r), i && this.once("flush", i), this.flush();
}
}),
(p.prototype.close = function () {
if ("opening" == this.readyState || "open" == this.readyState) {
this.readyState = "closing";
var e = this;
this.writeBuffer.length
? this.once("drain", function () {
this.upgrading ? i() : t();
})
: this.upgrading
? i()
: t();
}
function t() {
e.onClose("forced close"), d("socket closing - telling transport to close"), e.transport.close();
}
function n() {
e.removeListener("upgrade", n), e.removeListener("upgradeError", n), t();
}
function i() {
e.once("upgrade", n), e.once("upgradeError", n);
}
return this;
}),
(p.prototype.onError = function (e) {
d("socket error %j", e), (p.priorWebsocketSuccess = !1), this.emit("error", e), this.onClose("transport error", e);
}),
(p.prototype.onClose = function (e, t) {
if ("opening" == this.readyState || "open" == this.readyState || "closing" == this.readyState) {
d('socket close with reason: "%s"', e);
clearTimeout(this.pingIntervalTimer),
clearTimeout(this.pingTimeoutTimer),
this.transport.removeAllListeners("close"),
this.transport.close(),
this.transport.removeAllListeners(),
(this.readyState = "closed"),
(this.id = null),
this.emit("close", e, t),
(this.writeBuffer = []),
(this.prevBufferLen = 0);
}
}),
(p.prototype.filterUpgrades = function (e) {
for (var t = [], n = 0, i = e.length; n < i; n++) ~r(this.transports, e[n]) && t.push(e[n]);
return t;
});
}.call(this, "undefined" != typeof self ? self : "undefined" != typeof window ? window : "undefined" != typeof global ? global : {}));
},
{ "./transport": 4, "./transports": 5, "component-emitter": 15, debug: 17, "engine.io-parser": 19, indexof: 23, parsejson: 26, parseqs: 27, parseuri: 28 },
],
4: [
function (e, t, n) {
var i = e("engine.io-parser");
function r(e) {
(this.path = e.path),
(this.hostname = e.hostname),
(this.port = e.port),
(this.secure = e.secure),
(this.query = e.query),
(this.timestampParam = e.timestampParam),
(this.timestampRequests = e.timestampRequests),
(this.readyState = ""),
(this.agent = e.agent || !1),
(this.socket = e.socket),
(this.enablesXDR = e.enablesXDR),
(this.pfx = e.pfx),
(this.key = e.key),
(this.passphrase = e.passphrase),
(this.cert = e.cert),
(this.ca = e.ca),
(this.ciphers = e.ciphers),
(this.rejectUnauthorized = e.rejectUnauthorized),
(this.extraHeaders = e.extraHeaders);
}
e("component-emitter")((t.exports = r).prototype),
(r.prototype.onError = function (e, t) {
var n = new Error(e);
return (n.type = "TransportError"), (n.description = t), this.emit("error", n), this;
}),
(r.prototype.open = function () {
return ("closed" != this.readyState && "" != this.readyState) || ((this.readyState = "opening"), this.doOpen()), this;
}),
(r.prototype.close = function () {
return ("opening" != this.readyState && "open" != this.readyState) || (this.doClose(), this.onClose()), this;
}),
(r.prototype.send = function (e) {
if ("open" != this.readyState) throw new Error("Transport not open");
this.write(e);
}),
(r.prototype.onOpen = function () {
(this.readyState = "open"), (this.writable = !0), this.emit("open");
}),
(r.prototype.onData = function (e) {
var t = i.decodePacket(e, this.socket.binaryType);
this.onPacket(t);
}),
(r.prototype.onPacket = function (e) {
this.emit("packet", e);
}),
(r.prototype.onClose = function () {
(this.readyState = "closed"), this.emit("close");
});
},
{ "component-emitter": 15, "engine.io-parser": 19 },
],
5: [
function (t, e, n) {
(function (s) {
var a = t("xmlhttprequest-ssl"),
l = t("./polling-xhr"),
c = t("./polling-jsonp"),
e = t("./websocket");
(n.polling = function (e) {
var t = !1,
n = !1,
i = !1 !== e.jsonp;
if (s.location) {
var r = "https:" == location.protocol,
o = location.port;
o || (o = r ? 443 : 80), (t = e.hostname != location.hostname || o != e.port), (n = e.secure != r);
}
{
if (((e.xdomain = t), (e.xscheme = n), "open" in new a(e) && !e.forceJSONP)) return new l(e);
if (!i) throw new Error("JSONP disabled");
return new c(e);
}
}),
(n.websocket = e);
}.call(this, "undefined" != typeof self ? self : "undefined" != typeof window ? window : "undefined" != typeof global ? global : {}));
},
{ "./polling-jsonp": 6, "./polling-xhr": 7, "./websocket": 9, "xmlhttprequest-ssl": 10 },
],
6: [
function (s, a, e) {
(function (n) {
var i = s("./polling"),
e = s("component-inherit");
a.exports = t;
var r,
c = /\n/g,
u = /\\n/g;
function o() {}
function t(e) {
i.call(this, e), (this.query = this.query || {}), r || (n.___eio || (n.___eio = []), (r = n.___eio)), (this.index = r.length);
var t = this;
r.push(function (e) {
t.onData(e);
}),
(this.query.j = this.index),
n.document &&
n.addEventListener &&
n.addEventListener(
"beforeunload",
function () {
t.script && (t.script.onerror = o);
},
!1
);
}
e(t, i),
(t.prototype.supportsBinary = !1),
(t.prototype.doClose = function () {
this.script && (this.script.parentNode.removeChild(this.script), (this.script = null)),
this.form && (this.form.parentNode.removeChild(this.form), (this.form = null), (this.iframe = null)),
i.prototype.doClose.call(this);
}),
(t.prototype.doPoll = function () {
var t = this,
e = document.createElement("script");
this.script && (this.script.parentNode.removeChild(this.script), (this.script = null)),
(e.async = !0),
(e.src = this.uri()),
(e.onerror = function (e) {
t.onError("jsonp poll error", e);
});
var n = document.getElementsByTagName("script")[0];
n ? n.parentNode.insertBefore(e, n) : (document.head || document.body).appendChild(e),
(this.script = e),
"undefined" != typeof navigator &&
/gecko/i.test(navigator.userAgent) &&
setTimeout(function () {
var e = document.createElement("iframe");
document.body.appendChild(e), document.body.removeChild(e);
}, 100);
}),
(t.prototype.doWrite = function (e, t) {
var n = this;
if (!this.form) {
var i,
r = document.createElement("form"),
o = document.createElement("textarea"),
s = (this.iframeId = "eio_iframe_" + this.index);
(r.className = "socketio"),
(r.style.position = "absolute"),
(r.style.top = "-1000px"),
(r.style.left = "-1000px"),
(r.target = s),
(r.method = "POST"),
r.setAttribute("accept-charset", "utf-8"),
(o.name = "d"),
r.appendChild(o),
document.body.appendChild(r),
(this.form = r),
(this.area = o);
}
function a() {
l(), t();
}
function l() {
if (n.iframe)
try {
n.form.removeChild(n.iframe);
} catch (e) {
n.onError("jsonp polling iframe removal error", e);
}
try {
var e = '<iframe src="javascript:0" name="' + n.iframeId + '">';
i = document.createElement(e);
} catch (e) {
((i = document.createElement("iframe")).name = n.iframeId), (i.src = "javascript:0");
}
(i.id = n.iframeId), n.form.appendChild(i), (n.iframe = i);
}
(this.form.action = this.uri()), l(), (e = e.replace(u, "\\\n")), (this.area.value = e.replace(c, "\\n"));
try {
this.form.submit();
} catch (e) {}
this.iframe.attachEvent
? (this.iframe.onreadystatechange = function () {
"complete" == n.iframe.readyState && a();
})
: (this.iframe.onload = a);
});
}.call(this, "undefined" != typeof self ? self : "undefined" != typeof window ? window : "undefined" != typeof global ? global : {}));
},
{ "./polling": 8, "component-inherit": 16 },
],
7: [
function (u, d, e) {
(function (r) {
var o = u("xmlhttprequest-ssl"),
i = u("./polling"),
e = u("component-emitter"),
t = u("component-inherit"),
s = u("debug")("engine.io-client:polling-xhr");
function n() {}
function a(e) {
if ((i.call(this, e), r.location)) {
var t = "https:" == location.protocol,
n = location.port;
n || (n = t ? 443 : 80), (this.xd = e.hostname != r.location.hostname || n != e.port), (this.xs = e.secure != t);
} else this.extraHeaders = e.extraHeaders;
}
function l(e) {
(this.method = e.method || "GET"),
(this.uri = e.uri),
(this.xd = !!e.xd),
(this.xs = !!e.xs),
(this.async = !1 !== e.async),
(this.data = null != e.data ? e.data : null),
(this.agent = e.agent),
(this.isBinary = e.isBinary),
(this.supportsBinary = e.supportsBinary),
(this.enablesXDR = e.enablesXDR),
(this.pfx = e.pfx),
(this.key = e.key),
(this.passphrase = e.passphrase),
(this.cert = e.cert),
(this.ca = e.ca),
(this.ciphers = e.ciphers),
(this.rejectUnauthorized = e.rejectUnauthorized),
(this.extraHeaders = e.extraHeaders),
this.create();
}
function c() {
for (var e in l.requests) l.requests.hasOwnProperty(e) && l.requests[e].abort();
}
(d.exports = a),
(d.exports.Request = l),
t(a, i),
(a.prototype.supportsBinary = !0),
(a.prototype.request = function (e) {
return (
((e = e || {}).uri = this.uri()),
(e.xd = this.xd),
(e.xs = this.xs),
(e.agent = this.agent || !1),
(e.supportsBinary = this.supportsBinary),
(e.enablesXDR = this.enablesXDR),
(e.pfx = this.pfx),
(e.key = this.key),
(e.passphrase = this.passphrase),
(e.cert = this.cert),
(e.ca = this.ca),
(e.ciphers = this.ciphers),
(e.rejectUnauthorized = this.rejectUnauthorized),
(e.extraHeaders = this.extraHeaders),
new l(e)
);
}),
(a.prototype.doWrite = function (e, t) {
var n = "string" != typeof e && void 0 !== e,
i = this.request({ method: "POST", data: e, isBinary: n }),
r = this;
i.on("success", t),
i.on("error", function (e) {
r.onError("xhr post error", e);
}),
(this.sendXhr = i);
}),
(a.prototype.doPoll = function () {
s("xhr poll");
var e = this.request(),
t = this;
e.on("data", function (e) {
t.onData(e);
}),
e.on("error", function (e) {
t.onError("xhr poll error", e);
}),
(this.pollXhr = e);
}),
e(l.prototype),
(l.prototype.create = function () {
var e = { agent: this.agent, xdomain: this.xd, xscheme: this.xs, enablesXDR: this.enablesXDR };
(e.pfx = this.pfx), (e.key = this.key), (e.passphrase = this.passphrase), (e.cert = this.cert), (e.ca = this.ca), (e.ciphers = this.ciphers), (e.rejectUnauthorized = this.rejectUnauthorized);
var t = (this.xhr = new o(e)),
n = this;
try {
s("xhr open %s: %s", this.method, this.uri), t.open(this.method, this.uri, this.async);
try {
if (this.extraHeaders) for (var i in (t.setDisableHeaderCheck(!0), this.extraHeaders)) this.extraHeaders.hasOwnProperty(i) && t.setRequestHeader(i, this.extraHeaders[i]);
} catch (e) {}
if ((this.supportsBinary && (t.responseType = "arraybuffer"), "POST" == this.method))
try {
this.isBinary ? t.setRequestHeader("Content-type", "application/octet-stream") : t.setRequestHeader("Content-type", "text/plain;charset=UTF-8");
} catch (e) {}
"withCredentials" in t && (t.withCredentials = !0),
this.hasXDR()
? ((t.onload = function () {
n.onLoad();
}),
(t.onerror = function () {
n.onError(t.responseText);
}))
: (t.onreadystatechange = function () {
4 == t.readyState &&
(200 == t.status || 1223 == t.status
? n.onLoad()
: setTimeout(function () {
n.onError(t.status);
}, 0));
}),
s("xhr data %s", this.data),
t.send(this.data);
} catch (e) {
return void setTimeout(function () {
n.onError(e);
}, 0);
}
r.document && ((this.index = l.requestsCount++), (l.requests[this.index] = this));
}),
(l.prototype.onSuccess = function () {
this.emit("success"), this.cleanup();
}),
(l.prototype.onData = function (e) {
this.emit("data", e), this.onSuccess();
}),
(l.prototype.onError = function (e) {
this.emit("error", e), this.cleanup(!0);
}),
(l.prototype.cleanup = function (e) {
if (void 0 !== this.xhr && null !== this.xhr) {
if ((this.hasXDR() ? (this.xhr.onload = this.xhr.onerror = n) : (this.xhr.onreadystatechange = n), e))
try {
this.xhr.abort();
} catch (e) {}
r.document && delete l.requests[this.index], (this.xhr = null);
}
}),
(l.prototype.onLoad = function () {
var t;
try {
var e;
try {
e = this.xhr.getResponseHeader("Content-Type").split(";")[0];
} catch (e) {}
if ("application/octet-stream" === e) t = this.xhr.response;
else if (this.supportsBinary)
try {
t = String.fromCharCode.apply(null, new Uint8Array(this.xhr.response));
} catch (e) {
for (var n = new Uint8Array(this.xhr.response), i = [], r = 0, o = n.length; r < o; r++) i.push(n[r]);
t = String.fromCharCode.apply(null, i);
}
else t = this.xhr.responseText;
} catch (e) {
this.onError(e);
}
null != t && this.onData(t);
}),
(l.prototype.hasXDR = function () {
return void 0 !== r.XDomainRequest && !this.xs && this.enablesXDR;
}),
(l.prototype.abort = function () {
this.cleanup();
}),
r.document && ((l.requestsCount = 0), (l.requests = {}), r.attachEvent ? r.attachEvent("onunload", c) : r.addEventListener && r.addEventListener("beforeunload", c, !1));
}.call(this, "undefined" != typeof self ? self : "undefined" != typeof window ? window : "undefined" != typeof global ? global : {}));
},
{ "./polling": 8, "component-emitter": 15, "component-inherit": 16, debug: 17, "xmlhttprequest-ssl": 10 },
],
8: [
function (e, t, n) {
var i = e("../transport"),
r = e("parseqs"),
o = e("engine.io-parser"),
s = e("component-inherit"),
a = e("yeast"),
l = e("debug")("engine.io-client:polling");
t.exports = u;
var c = null != new (e("xmlhttprequest-ssl"))({ xdomain: !1 }).responseType;
function u(e) {
var t = e && e.forceBase64;
(c && !t) || (this.supportsBinary = !1), i.call(this, e);
}
s(u, i),
(u.prototype.name = "polling"),
(u.prototype.doOpen = function () {
this.poll();
}),
(u.prototype.pause = function (e) {
var t = this;
function n() {
l("paused"), (t.readyState = "paused"), e();
}
if (((this.readyState = "pausing"), this.polling || !this.writable)) {
var i = 0;
this.polling &&
(l("we are currently polling - waiting to pause"),
i++,
this.once("pollComplete", function () {
l("pre-pause polling complete"), --i || n();
})),
this.writable ||
(l("we are currently writing - waiting to pause"),
i++,
this.once("drain", function () {
l("pre-pause writing complete"), --i || n();
}));
} else n();
}),
(u.prototype.poll = function () {
l("polling"), (this.polling = !0), this.doPoll(), this.emit("poll");
}),
(u.prototype.onData = function (e) {
var i = this;
l("polling got data %s", e);
o.decodePayload(e, this.socket.binaryType, function (e, t, n) {
if (("opening" == i.readyState && i.onOpen(), "close" == e.type)) return i.onClose(), !1;
i.onPacket(e);
}),
"closed" != this.readyState && ((this.polling = !1), this.emit("pollComplete"), "open" == this.readyState ? this.poll() : l('ignoring poll - transport state "%s"', this.readyState));
}),
(u.prototype.doClose = function () {
var e = this;
function t() {
l("writing close packet"), e.write([{ type: "close" }]);
}
"open" == this.readyState ? (l("transport open - closing"), t()) : (l("transport not open - deferring close"), this.once("open", t));
}),
(u.prototype.write = function (e) {
var t = this;
this.writable = !1;
var n = function () {
(t.writable = !0), t.emit("drain");
};
t = this;
o.encodePayload(e, this.supportsBinary, function (e) {
t.doWrite(e, n);
});
}),
(u.prototype.uri = function () {
var e = this.query || {},
t = this.secure ? "https" : "http",
n = "";
return (
!1 !== this.timestampRequests && (e[this.timestampParam] = a()),
this.supportsBinary || e.sid || (e.b64 = 1),
(e = r.encode(e)),
this.port && (("https" == t && 443 != this.port) || ("http" == t && 80 != this.port)) && (n = ":" + this.port),
e.length && (e = "?" + e),
t + "://" + (-1 !== this.hostname.indexOf(":") ? "[" + this.hostname + "]" : this.hostname) + n + this.path + e
);
});
},
{ "../transport": 4, "component-inherit": 16, debug: 17, "engine.io-parser": 19, parseqs: 27, "xmlhttprequest-ssl": 10, yeast: 30 },
],
9: [
function (u, d, e) {
(function (s) {
var n = u("../transport"),
a = u("engine.io-parser"),
i = u("parseqs"),
e = u("component-inherit"),
r = u("yeast"),
l = u("debug")("engine.io-client:websocket"),
c = s.WebSocket || s.MozWebSocket,
o = c;
if (!o && "undefined" == typeof window)
try {
o = u("ws");
} catch (e) {}
function t(e) {
e && e.forceBase64 && (this.supportsBinary = !1), (this.perMessageDeflate = e.perMessageDeflate), n.call(this, e);
}
e((d.exports = t), n),
(t.prototype.name = "websocket"),
(t.prototype.supportsBinary = !0),
(t.prototype.doOpen = function () {
if (this.check()) {
var e = this.uri(),
t = { agent: this.agent, perMessageDeflate: this.perMessageDeflate };
(t.pfx = this.pfx),
(t.key = this.key),
(t.passphrase = this.passphrase),
(t.cert = this.cert),
(t.ca = this.ca),
(t.ciphers = this.ciphers),
(t.rejectUnauthorized = this.rejectUnauthorized),
this.extraHeaders && (t.headers = this.extraHeaders),
(this.ws = c ? new o(e) : new o(e, void 0, t)),
void 0 === this.ws.binaryType && (this.supportsBinary = !1),
this.ws.supports && this.ws.supports.binary ? ((this.supportsBinary = !0), (this.ws.binaryType = "buffer")) : (this.ws.binaryType = "arraybuffer"),
this.addEventListeners();
}
}),
(t.prototype.addEventListeners = function () {
var t = this;
(this.ws.onopen = function () {
t.onOpen();
}),
(this.ws.onclose = function () {
t.onClose();
}),
(this.ws.onmessage = function (e) {
t.onData(e.data);
}),
(this.ws.onerror = function (e) {
t.onError("websocket error", e);
});
}),
"undefined" != typeof navigator &&
/iPad|iPhone|iPod/i.test(navigator.userAgent) &&
(t.prototype.onData = function (e) {
var t = this;
setTimeout(function () {
n.prototype.onData.call(t, e);
}, 0);
}),
(t.prototype.write = function (e) {
var i = this;
this.writable = !1;
for (var r = e.length, t = 0, n = r; t < n; t++)
!(function (n) {
a.encodePacket(n, i.supportsBinary, function (e) {
if (!c) {
var t = {};
if ((n.options && (t.compress = n.options.compress), i.perMessageDeflate)) ("string" == typeof e ? s.Buffer.byteLength(e) : e.length) < i.perMessageDeflate.threshold && (t.compress = !1);
}
try {
c ? i.ws.send(e) : i.ws.send(e, t);
} catch (e) {
l("websocket closed before onclose event");
}
--r || o();
});
})(e[t]);
function o() {
i.emit("flush"),
setTimeout(function () {
(i.writable = !0), i.emit("drain");
}, 0);
}
}),
(t.prototype.onClose = function () {
n.prototype.onClose.call(this);
}),
(t.prototype.doClose = function () {
void 0 !== this.ws && this.ws.close();
}),
(t.prototype.uri = function () {
var e = this.query || {},
t = this.secure ? "wss" : "ws",
n = "";
return (
this.port && (("wss" == t && 443 != this.port) || ("ws" == t && 80 != this.port)) && (n = ":" + this.port),
this.timestampRequests && (e[this.timestampParam] = r()),
this.supportsBinary || (e.b64 = 1),
(e = i.encode(e)).length && (e = "?" + e),
t + "://" + (-1 !== this.hostname.indexOf(":") ? "[" + this.hostname + "]" : this.hostname) + n + this.path + e
);
}),
(t.prototype.check = function () {
return !(!o || ("__initialize" in o && this.name === t.prototype.name));
});
}.call(this, "undefined" != typeof self ? self : "undefined" != typeof window ? window : "undefined" != typeof global ? global : {}));
},
{ "../transport": 4, "component-inherit": 16, debug: 17, "engine.io-parser": 19, parseqs: 27, ws: void 0, yeast: 30 },
],
10: [
function (e, t, n) {
var r = e("has-cors");
t.exports = function (e) {
var t = e.xdomain,
n = e.xscheme,
i = e.enablesXDR;
try {
if ("undefined" != typeof XMLHttpRequest && (!t || r)) return new XMLHttpRequest();
} catch (e) {}
try {
if ("undefined" != typeof XDomainRequest && !n && i) return new XDomainRequest();
} catch (e) {}
if (!t)
try {
return new ActiveXObject("Microsoft.XMLHTTP");
} catch (e) {}
};
},
{ "has-cors": 22 },
],
11: [
function (e, t, n) {
function s() {}
t.exports = function (e, n, i) {
var r = !1;
return (i = i || s), 0 === (o.count = e) ? n() : o;
function o(e, t) {
if (o.count <= 0) throw new Error("after called too many times");
--o.count, e ? ((r = !0), n(e), (n = i)) : 0 !== o.count || r || n(null, t);
}
};
},
{},
],
12: [
function (e, t, n) {
t.exports = function (e, t, n) {
var i = e.byteLength;
if (((t = t || 0), (n = n || i), e.slice)) return e.slice(t, n);
if ((t < 0 && (t += i), n < 0 && (n += i), i < n && (n = i), i <= t || n <= t || 0 === i)) return new ArrayBuffer(0);
for (var r = new Uint8Array(e), o = new Uint8Array(n - t), s = t, a = 0; s < n; s++, a++) o[a] = r[s];
return o.buffer;
};
},
{},
],
13: [
function (e, t, n) {
!(function (d) {
"use strict";
(n.encode = function (e) {
var t,
n = new Uint8Array(e),
i = n.length,
r = "";
for (t = 0; t < i; t += 3) (r += d[n[t] >> 2]), (r += d[((3 & n[t]) << 4) | (n[t + 1] >> 4)]), (r += d[((15 & n[t + 1]) << 2) | (n[t + 2] >> 6)]), (r += d[63 & n[t + 2]]);
return i % 3 == 2 ? (r = r.substring(0, r.length - 1) + "=") : i % 3 == 1 && (r = r.substring(0, r.length - 2) + "=="), r;
}),
(n.decode = function (e) {
var t,
n,
i,
r,
o,
s = 0.75 * e.length,
a = e.length,
l = 0;
"=" === e[e.length - 1] && (s--, "=" === e[e.length - 2] && s--);
var c = new ArrayBuffer(s),
u = new Uint8Array(c);
for (t = 0; t < a; t += 4)
(n = d.indexOf(e[t])),
(i = d.indexOf(e[t + 1])),
(r = d.indexOf(e[t + 2])),
(o = d.indexOf(e[t + 3])),
(u[l++] = (n << 2) | (i >> 4)),
(u[l++] = ((15 & i) << 4) | (r >> 2)),
(u[l++] = ((3 & r) << 6) | (63 & o));
return c;
});
})("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/");
},
{},
],
14: [
function (e, l, t) {
(function (e) {
var r = e.BlobBuilder || e.WebKitBlobBuilder || e.MSBlobBuilder || e.MozBlobBuilder,
t = (function () {
try {
return 2 === new Blob(["hi"]).size;
} catch (e) {
return !1;
}
})(),
n =
t &&
(function () {
try {
return 2 === new Blob([new Uint8Array([1, 2])]).size;
} catch (e) {
return !1;
}
})(),
i = r && r.prototype.append && r.prototype.getBlob;
function o(e) {
for (var t = 0; t < e.length; t++) {
var n = e[t];
if (n.buffer instanceof ArrayBuffer) {
var i = n.buffer;
if (n.byteLength !== i.byteLength) {
var r = new Uint8Array(n.byteLength);
r.set(new Uint8Array(i, n.byteOffset, n.byteLength)), (i = r.buffer);
}
e[t] = i;
}
}
}
function s(e, t) {
t = t || {};
var n = new r();
o(e);
for (var i = 0; i < e.length; i++) n.append(e[i]);
return t.type ? n.getBlob(t.type) : n.getBlob();
}
function a(e, t) {
return o(e), new Blob(e, t || {});
}
l.exports = t ? (n ? e.Blob : a) : i ? s : void 0;
}.call(this, "undefined" != typeof self ? self : "undefined" != typeof window ? window : "undefined" != typeof global ? global : {}));
},
{},
],
15: [
function (e, t, n) {
function i(e) {
if (e)
return (function (e) {
for (var t in i.prototype) e[t] = i.prototype[t];
return e;
})(e);
}
((t.exports = i).prototype.on = i.prototype.addEventListener = function (e, t) {
return (this._callbacks = this._callbacks || {}), (this._callbacks[e] = this._callbacks[e] || []).push(t), this;
}),
(i.prototype.once = function (e, t) {
var n = this;
function i() {
n.off(e, i), t.apply(this, arguments);
}
return (this._callbacks = this._callbacks || {}), (i.fn = t), this.on(e, i), this;
}),
(i.prototype.off = i.prototype.removeListener = i.prototype.removeAllListeners = i.prototype.removeEventListener = function (e, t) {
if (((this._callbacks = this._callbacks || {}), 0 == arguments.length)) return (this._callbacks = {}), this;
var n,
i = this._callbacks[e];
if (!i) return this;
if (1 == arguments.length) return delete this._callbacks[e], this;
for (var r = 0; r < i.length; r++)
if ((n = i[r]) === t || n.fn === t) {
i.splice(r, 1);
break;
}
return this;
}),
(i.prototype.emit = function (e) {
this._callbacks = this._callbacks || {};
var t = [].slice.call(arguments, 1),
n = this._callbacks[e];
if (n) for (var i = 0, r = (n = n.slice(0)).length; i < r; ++i) n[i].apply(this, t);
return this;
}),
(i.prototype.listeners = function (e) {
return (this._callbacks = this._callbacks || {}), this._callbacks[e] || [];
}),
(i.prototype.hasListeners = function (e) {
return !!this.listeners(e).length;
});
},
{},
],
16: [
function (e, t, n) {
t.exports = function (e, t) {
var n = function () {};
(n.prototype = t.prototype), (e.prototype = new n()), (e.prototype.constructor = e);
};
},
{},
],
17: [
function (e, t, o) {
function n() {
var e;
try {
e = o.storage.debug;
} catch (e) {}
return e;
}
((o = t.exports = e("./debug")).log = function () {
return "object" == typeof console && console.log && Function.prototype.apply.call(console.log, console, arguments);
}),
(o.formatArgs = function () {
var e = arguments,
t = this.useColors;
if (((e[0] = (t ? "%c" : "") + this.namespace + (t ? " %c" : " ") + e[0] + (t ? "%c " : " ") + "+" + o.humanize(this.diff)), !t)) return e;
var n = "color: " + this.color;
e = [e[0], n, "color: inherit"].concat(Array.prototype.slice.call(e, 1));
var i = 0,
r = 0;
return (
e[0].replace(/%[a-z%]/g, function (e) {
"%%" !== e && (i++, "%c" === e && (r = i));
}),
e.splice(r, 0, n),
e
);
}),
(o.save = function (e) {
try {
null == e ? o.storage.removeItem("debug") : (o.storage.debug = e);
} catch (e) {}
}),
(o.load = n),
(o.useColors = function () {
return (
"WebkitAppearance" in document.documentElement.style ||
(window.console && (console.firebug || (console.exception && console.table))) ||
(navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && 31 <= parseInt(RegExp.$1, 10))
);
}),
(o.storage =
"undefined" != typeof chrome && void 0 !== chrome.storage
? chrome.storage.local
: (function () {
try {
return window.localStorage;
} catch (e) {}
})()),
(o.colors = ["lightseagreen", "forestgreen", "goldenrod", "dodgerblue", "darkorchid", "crimson"]),
(o.formatters.j = function (e) {
return JSON.stringify(e);
}),
o.enable(n());
},
{ "./debug": 18 },
],
18: [
function (e, t, a) {
((a = t.exports = function (e) {
function t() {}
function i() {
var r = i,
e = +new Date(),
t = e - (l || e);
(r.diff = t), (r.prev = l), (r.curr = e), (l = e), null == r.useColors && (r.useColors = a.useColors()), null == r.color && r.useColors && (r.color = a.colors[c++ % a.colors.length]);
var o = Array.prototype.slice.call(arguments);
(o[0] = a.coerce(o[0])), "string" != typeof o[0] && (o = ["%o"].concat(o));
var s = 0;
(o[0] = o[0].replace(/%([a-z%])/g, function (e, t) {
if ("%%" === e) return e;
s++;
var n = a.formatters[t];
if ("function" == typeof n) {
var i = o[s];
(e = n.call(r, i)), o.splice(s, 1), s--;
}
return e;
})),
"function" == typeof a.formatArgs && (o = a.formatArgs.apply(r, o));
var n = i.log || a.log || console.log.bind(console);
n.apply(r, o);
}
(t.enabled = !1), (i.enabled = !0);
var n = a.enabled(e) ? i : t;
return (n.namespace = e), n;
}).coerce = function (e) {
return e instanceof Error ? e.stack || e.message : e;
}),
(a.disable = function () {
a.enable("");
}),
(a.enable = function (e) {
a.save(e);
for (var t = (e || "").split(/[\s,]+/), n = t.length, i = 0; i < n; i++)
t[i] && ("-" === (e = t[i].replace(/\*/g, ".*?"))[0] ? a.skips.push(new RegExp("^" + e.substr(1) + "$")) : a.names.push(new RegExp("^" + e + "$")));
}),
(a.enabled = function (e) {
var t, n;
for (t = 0, n = a.skips.length; t < n; t++) if (a.skips[t].test(e)) return !1;
for (t = 0, n = a.names.length; t < n; t++) if (a.names[t].test(e)) return !0;
return !1;
}),
(a.humanize = e("ms")),
(a.names = []),
(a.skips = []),
(a.formatters = {});
var l,
c = 0;
},
{ ms: 25 },
],
19: [
function (i, e, g) {
(function (c) {
var e = i("./keys"),
r = i("has-binary"),
h = i("arraybuffer.slice"),
o = i("base64-arraybuffer"),
a = i("after"),
u = i("utf8"),
t = navigator.userAgent.match(/Android/i),
n = /PhantomJS/i.test(navigator.userAgent),
d = t || n;
g.protocol = 3;
var p = (g.packets = { open: 0, close: 1, ping: 2, pong: 3, message: 4, upgrade: 5, noop: 6 }),
s = e(p),
f = { type: "error", data: "parser error" },
m = i("blob");
function l(e, t, n) {
for (
var r = new Array(e.length),
i = a(e.length, n),
o = function (n, e, i) {
t(e, function (e, t) {
(r[n] = t), i(e, r);
});
},
s = 0;
s < e.length;
s++
)
o(s, e[s], i);
}
(g.encodePacket = function (e, t, n, i) {
"function" == typeof t && ((i = t), (t = !1)), "function" == typeof n && ((i = n), (n = null));
var r,
o,
s,
a = void 0 === e.data ? void 0 : e.data.buffer || e.data;
if (c.ArrayBuffer && a instanceof ArrayBuffer)
return (function (e, t, n) {
if (!t) return g.encodeBase64Packet(e, n);
var i = e.data,
r = new Uint8Array(i),
o = new Uint8Array(1 + i.byteLength);
o[0] = p[e.type];
for (var s = 0; s < r.length; s++) o[s + 1] = r[s];
return n(o.buffer);
})(e, t, i);
if (m && a instanceof c.Blob)
return (function (e, t, n) {
if (!t) return g.encodeBase64Packet(e, n);
if (d)
return (function (e, t, n) {
if (!t) return g.encodeBase64Packet(e, n);
var i = new FileReader();
return (
(i.onload = function () {
(e.data = i.result), g.encodePacket(e, t, !0, n);
}),
i.readAsArrayBuffer(e.data)
);
})(e, t, n);
var i = new Uint8Array(1);
i[0] = p[e.type];
var r = new m([i.buffer, e.data]);
return n(r);
})(e, t, i);
if (a && a.base64) return (r = e), (o = i), (s = "b" + g.packets[r.type] + r.data.data), o(s);
var l = p[e.type];
return void 0 !== e.data && (l += n ? u.encode(String(e.data)) : String(e.data)), i("" + l);
}),
(g.encodeBase64Packet = function (t, n) {
var i,
r = "b" + g.packets[t.type];
if (m && t.data instanceof c.Blob) {
var o = new FileReader();
return (
(o.onload = function () {
var e = o.result.split(",")[1];
n(r + e);
}),
o.readAsDataURL(t.data)
);
}
try {
i = String.fromCharCode.apply(null, new Uint8Array(t.data));
} catch (e) {
for (var s = new Uint8Array(t.data), a = new Array(s.length), l = 0; l < s.length; l++) a[l] = s[l];
i = String.fromCharCode.apply(null, a);
}
return (r += c.btoa(i)), n(r);
}),
(g.decodePacket = function (e, t, n) {
if ("string" == typeof e || void 0 === e) {
if ("b" == e.charAt(0)) return g.decodeBase64Packet(e.substr(1), t);
if (n)
try {
e = u.decode(e);
} catch (e) {
return f;
}
var i = e.charAt(0);
return Number(i) == i && s[i] ? (1 < e.length ? { type: s[i], data: e.substring(1) } : { type: s[i] }) : f;
}
i = new Uint8Array(e)[0];
var r = h(e, 1);
return m && "blob" === t && (r = new m([r])), { type: s[i], data: r };
}),
(g.decodeBase64Packet = function (e, t) {
var n = s[e.charAt(0)];
if (!c.ArrayBuffer) return { type: n, data: { base64: !0, data: e.substr(1) } };
var i = o.decode(e.substr(1));
return "blob" === t && m && (i = new m([i])), { type: n, data: i };
}),
(g.encodePayload = function (e, t, n) {
"function" == typeof t && ((n = t), (t = null));
var i = r(e);
if (t && i) return m && !d ? g.encodePayloadAsBlob(e, n) : g.encodePayloadAsArrayBuffer(e, n);
if (!e.length) return n("0:");
l(
e,
function (e, n) {
g.encodePacket(e, !!i && t, !0, function (e) {
var t;
n(null, (t = e).length + ":" + t);
});
},
function (e, t) {
return n(t.join(""));
}
);
}),
(g.decodePayload = function (e, t, n) {
if ("string" != typeof e) return g.decodePayloadAsBinary(e, t, n);
var i;
if (("function" == typeof t && ((n = t), (t = null)), "" == e)) return n(f, 0, 1);
for (var r, o, s = "", a = 0, l = e.length; a < l; a++) {
var c = e.charAt(a);
if (":" != c) s += c;
else {
if ("" == s || s != (r = Number(s))) return n(f, 0, 1);
if (s != (o = e.substr(a + 1, r)).length) return n(f, 0, 1);
if (o.length) {
if (((i = g.decodePacket(o, t, !0)), f.type == i.type && f.data == i.data)) return n(f, 0, 1);
if (!1 === n(i, a + r, l)) return;
}
(a += r), (s = "");
}
}
return "" != s ? n(f, 0, 1) : void 0;
}),
(g.encodePayloadAsArrayBuffer = function (e, i) {
if (!e.length) return i(new ArrayBuffer(0));
l(
e,
function (e, t) {
g.encodePacket(e, !0, !0, function (e) {
return t(null, e);
});
},
function (e, t) {
var n = t.reduce(function (e, t) {
var n;
return e + (n = "string" == typeof t ? t.length : t.byteLength).toString().length + n + 2;
}, 0),
s = new Uint8Array(n),
a = 0;
return (
t.forEach(function (e) {
var t = "string" == typeof e,
n = e;
if (t) {
for (var i = new Uint8Array(e.length), r = 0; r < e.length; r++) i[r] = e.charCodeAt(r);
n = i.buffer;
}
s[a++] = t ? 0 : 1;
var o = n.byteLength.toString();
for (r = 0; r < o.length; r++) s[a++] = parseInt(o[r]);
s[a++] = 255;
for (i = new Uint8Array(n), r = 0; r < i.length; r++) s[a++] = i[r];
}),
i(s.buffer)
);
}
);
}),
(g.encodePayloadAsBlob = function (e, n) {
l(
e,
function (e, a) {
g.encodePacket(e, !0, !0, function (e) {
var t = new Uint8Array(1);
if (((t[0] = 1), "string" == typeof e)) {
for (var n = new Uint8Array(e.length), i = 0; i < e.length; i++) n[i] = e.charCodeAt(i);
(e = n.buffer), (t[0] = 0);
}
var r = (e instanceof ArrayBuffer ? e.byteLength : e.size).toString(),
o = new Uint8Array(r.length + 1);
for (i = 0; i < r.length; i++) o[i] = parseInt(r[i]);
if (((o[r.length] = 255), m)) {
var s = new m([t.buffer, o.buffer, e]);
a(null, s);
}
});
},
function (e, t) {
return n(new m(t));
}
);
}),
(g.decodePayloadAsBinary = function (e, n, i) {
"function" == typeof n && ((i = n), (n = null));
for (var t = e, r = [], o = !1; 0 < t.byteLength; ) {
for (var s = new Uint8Array(t), a = 0 === s[0], l = "", c = 1; 255 != s[c]; c++) {
if (310 < l.length) {
o = !0;
break;
}
l += s[c];
}
if (o) return i(f, 0, 1);
(t = h(t, 2 + l.length)), (l = parseInt(l));
var u = h(t, 0, l);
if (a)
try {
u = String.fromCharCode.apply(null, new Uint8Array(u));
} catch (e) {
var d = new Uint8Array(u);
u = "";
for (c = 0; c < d.length; c++) u += String.fromCharCode(d[c]);
}
r.push(u), (t = h(t, l));
}
var p = r.length;
r.forEach(function (e, t) {
i(g.decodePacket(e, n, !0), t, p);
});
});
}.call(this, "undefined" != typeof self ? self : "undefined" != typeof window ? window : "undefined" != typeof global ? global : {}));
},
{ "./keys": 20, after: 11, "arraybuffer.slice": 12, "base64-arraybuffer": 13, blob: 14, "has-binary": 21, utf8: 29 },
],
20: [
function (e, t, n) {
t.exports =
Object.keys ||
function (e) {
var t = [],
n = Object.prototype.hasOwnProperty;
for (var i in e) n.call(e, i) && t.push(i);
return t;
};
},
{},
],
21: [
function (e, t, n) {
(function (r) {
var o = e("isarray");
t.exports = function (e) {
return (function e(t) {
if (!t) return !1;
if ((r.Buffer && r.Buffer.isBuffer(t)) || (r.ArrayBuffer && t instanceof ArrayBuffer) || (r.Blob && t instanceof Blob) || (r.File && t instanceof File)) return !0;
if (o(t)) {
for (var n = 0; n < t.length; n++) if (e(t[n])) return !0;
} else if (t && "object" == typeof t) for (var i in (t.toJSON && (t = t.toJSON()), t)) if (Object.prototype.hasOwnProperty.call(t, i) && e(t[i])) return !0;
return !1;
})(e);
};
}.call(this, "undefined" != typeof self ? self : "undefined" != typeof window ? window : "undefined" != typeof global ? global : {}));
},
{ isarray: 24 },
],
22: [
function (e, t, n) {
try {
t.exports = "undefined" != typeof XMLHttpRequest && "withCredentials" in new XMLHttpRequest();
} catch (e) {
t.exports = !1;
}
},
{},
],
23: [
function (e, t, n) {
var i = [].indexOf;
t.exports = function (e, t) {
if (i) return e.indexOf(t);
for (var n = 0; n < e.length; ++n) if (e[n] === t) return n;
return -1;
};
},
{},
],
24: [
function (e, t, n) {
t.exports =
Array.isArray ||
function (e) {
return "[object Array]" == Object.prototype.toString.call(e);
};
},
{},
],
25: [
function (e, t, n) {
var r = 36e5,
o = 864e5;
function s(e, t, n) {
if (!(e < t)) return e < 1.5 * t ? Math.floor(e / t) + " " + n : Math.ceil(e / t) + " " + n + "s";
}
t.exports = function (e, t) {
return (
(t = t || {}),
"string" == typeof e
? (function (e) {
if (1e4 < (e = "" + e).length) return;
var t = /^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);
if (!t) return;
var n = parseFloat(t[1]);
switch ((t[2] || "ms").toLowerCase()) {
case "years":
case "year":
case "yrs":
case "yr":
case "y":
return 315576e5 * n;
case "days":
case "day":
case "d":
return n * o;
case "hours":
case "hour":
case "hrs":
case "hr":
case "h":
return n * r;
case "minutes":
case "minute":
case "mins":
case "min":
case "m":
return 6e4 * n;
case "seconds":
case "second":
case "secs":
case "sec":
case "s":
return 1e3 * n;
case "milliseconds":
case "millisecond":
case "msecs":
case "msec":
case "ms":
return n;
}
})(e)
: t.long
? s((i = e), o, "day") || s(i, r, "hour") || s(i, 6e4, "minute") || s(i, 1e3, "second") || i + " ms"
: o <= (n = e)
? Math.round(n / o) + "d"
: r <= n
? Math.round(n / r) + "h"
: 6e4 <= n
? Math.round(n / 6e4) + "m"
: 1e3 <= n
? Math.round(n / 1e3) + "s"
: n + "ms"
);
var n, i;
};
},
{},
],
26: [
function (e, l, t) {
(function (t) {
var n = /^[\],:{}\s]*$/,
i = /\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,
r = /"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,
o = /(?:^|:|,)(?:\s*\[)+/g,
s = /^\s+/,
a = /\s+$/;
l.exports = function (e) {
return "string" == typeof e && e
? ((e = e.replace(s, "").replace(a, "")), t.JSON && JSON.parse ? JSON.parse(e) : n.test(e.replace(i, "@").replace(r, "]").replace(o, "")) ? new Function("return " + e)() : void 0)
: null;
};
}.call(this, "undefined" != typeof self ? self : "undefined" != typeof window ? window : "undefined" != typeof global ? global : {}));
},
{},
],
27: [
function (e, t, n) {
(n.encode = function (e) {
var t = "";
for (var n in e) e.hasOwnProperty(n) && (t.length && (t += "&"), (t += encodeURIComponent(n) + "=" + encodeURIComponent(e[n])));
return t;
}),
(n.decode = function (e) {
for (var t = {}, n = e.split("&"), i = 0, r = n.length; i < r; i++) {
var o = n[i].split("=");
t[decodeURIComponent(o[0])] = decodeURIComponent(o[1]);
}
return t;
});
},
{},
],
28: [
function (e, t, n) {
var a = /^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,
l = ["source", "protocol", "authority", "userInfo", "user", "password", "host", "port", "relative", "path", "directory", "file", "query", "anchor"];
t.exports = function (e) {
var t = e,
n = e.indexOf("["),
i = e.indexOf("]");
-1 != n && -1 != i && (e = e.substring(0, n) + e.substring(n, i).replace(/:/g, ";") + e.substring(i, e.length));
for (var r = a.exec(e || ""), o = {}, s = 14; s--; ) o[l[s]] = r[s] || "";
return (
-1 != n &&
-1 != i &&
((o.source = t), (o.host = o.host.substring(1, o.host.length - 1).replace(/;/g, ":")), (o.authority = o.authority.replace("[", "").replace("]", "").replace(/;/g, ":")), (o.ipv6uri = !0)),
o
);
};
},
{},
],
29: [
function (e, v, b) {
(function (y) {
!(function (e) {
var t = "object" == typeof b && b,
n = "object" == typeof v && v && v.exports == t && v,
i = "object" == typeof y && y;
(i.global !== i && i.window !== i) || (e = i);
var r,
o,
s,
a = String.fromCharCode;
function l(e) {
for (var t, n, i = [], r = 0, o = e.length; r < o; )
55296 <= (t = e.charCodeAt(r++)) && t <= 56319 && r < o ? (56320 == (64512 & (n = e.charCodeAt(r++))) ? i.push(((1023 & t) << 10) + (1023 & n) + 65536) : (i.push(t), r--)) : i.push(t);
return i;
}
function c(e) {
if (55296 <= e && e <= 57343) throw Error("Lone surrogate U+" + e.toString(16).toUpperCase() + " is not a scalar value");
}
function u(e, t) {
return a(((e >> t) & 63) | 128);
}
function d(e) {
if (0 == (4294967168 & e)) return a(e);
var t = "";
return (
0 == (4294965248 & e)
? (t = a(((e >> 6) & 31) | 192))
: 0 == (4294901760 & e)
? (c(e), (t = a(((e >> 12) & 15) | 224)), (t += u(e, 6)))
: 0 == (4292870144 & e) && ((t = a(((e >> 18) & 7) | 240)), (t += u(e, 12)), (t += u(e, 6))),
(t += a((63 & e) | 128))
);
}
function p() {
if (o <= s) throw Error("Invalid byte index");
var e = 255 & r[s];
if ((s++, 128 == (192 & e))) return 63 & e;
throw Error("Invalid continuation byte");
}
function h() {
var e, t;
if (o < s) throw Error("Invalid byte index");
if (s == o) return !1;
if (((e = 255 & r[s]), s++, 0 == (128 & e))) return e;
if (192 == (224 & e)) {
if (128 <= (t = ((31 & e) << 6) | p())) return t;
throw Error("Invalid continuation byte");
}
if (224 == (240 & e)) {
if (2048 <= (t = ((15 & e) << 12) | (p() << 6) | p())) return c(t), t;
throw Error("Invalid continuation byte");
}
if (240 == (248 & e) && 65536 <= (t = ((15 & e) << 18) | (p() << 12) | (p() << 6) | p()) && t <= 1114111) return t;
throw Error("Invalid UTF-8 detected");
}
var f = {
version: "2.0.0",
encode: function (e) {
for (var t = l(e), n = t.length, i = -1, r = ""; ++i < n; ) r += d(t[i]);
return r;
},
decode: function (e) {
(r = l(e)), (o = r.length), (s = 0);
for (var t, n = []; !1 !== (t = h()); ) n.push(t);
return (function (e) {
for (var t, n = e.length, i = -1, r = ""; ++i < n; ) 65535 < (t = e[i]) && ((r += a((((t -= 65536) >>> 10) & 1023) | 55296)), (t = 56320 | (1023 & t))), (r += a(t));
return r;
})(n);
},
};
if (t && !t.nodeType)
if (n) n.exports = f;
else {
var m = {}.hasOwnProperty;
for (var g in f) m.call(f, g) && (t[g] = f[g]);
}
else e.utf8 = f;
})(this);
}.call(this, "undefined" != typeof self ? self : "undefined" != typeof window ? window : "undefined" != typeof global ? global : {}));
},
{},
],
30: [
function (e, t, n) {
"use strict";
var i,
r = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),
o = 64,
s = {},
a = 0,
l = 0;
function c(e) {
for (var t = ""; (t = r[e % o] + t), 0 < (e = Math.floor(e / o)); );
return t;
}
function u() {
var e = c(+new Date());
return e !== i ? ((a = 0), (i = e)) : e + "." + c(a++);
}
for (; l < o; l++) s[r[l]] = l;
(u.encode = c),
(u.decode = function (e) {
var t = 0;
for (l = 0; l < e.length; l++) t = t * o + s[e.charAt(l)];
return t;
}),
(t.exports = u);
},
{},
],
31: [
function (e, t, n) {
var a = e("./url"),
i = e("socket.io-parser"),
l = e("./manager"),
c = e("debug")("socket.io-client");
t.exports = n = r;
var u = (n.managers = {});
function r(e, t) {
"object" == typeof e && ((t = e), (e = void 0)), (t = t || {});
var n = a(e),
i = n.source,
r = n.id,
o = n.path,
s = u[r] && o in u[r].nsps;
return (t.forceNew || t["force new connection"] || !1 === t.multiplex || s ? (c("ignoring socket cache for %s", i), l(i, t)) : (u[r] || (c("new io instance for %s", i), (u[r] = l(i, t))), u[r])).socket(n.path);
}
(n.protocol = i.protocol), (n.connect = r), (n.Manager = e("./manager")), (n.Socket = e("./socket"));
},
{ "./manager": 32, "./socket": 34, "./url": 35, debug: 39, "socket.io-parser": 47 },
],
32: [
function (e, t, n) {
var a = e("engine.io-client"),
r = e("./socket"),
i = e("component-emitter"),
o = e("socket.io-parser"),
l = e("./on"),
s = e("component-bind"),
c = e("debug")("socket.io-client:manager"),
u = e("indexof"),
d = e("backo2"),
p = Object.prototype.hasOwnProperty;
function h(e, t) {
if (!(this instanceof h)) return new h(e, t);
e && "object" == typeof e && ((t = e), (e = void 0)),
((t = t || {}).path = t.path || "/socket.io"),
(this.nsps = {}),
(this.subs = []),
(this.opts = t),
this.reconnection(!1 !== t.reconnection),
this.reconnectionAttempts(t.reconnectionAttempts || 1 / 0),
this.reconnectionDelay(t.reconnectionDelay || 1e3),
this.reconnectionDelayMax(t.reconnectionDelayMax || 5e3),
this.randomizationFactor(t.randomizationFactor || 0.5),
(this.backoff = new d({ min: this.reconnectionDelay(), max: this.reconnectionDelayMax(), jitter: this.randomizationFactor() })),
this.timeout(null == t.timeout ? 2e4 : t.timeout),
(this.readyState = "closed"),
(this.uri = e),
(this.connecting = []),
(this.lastPing = null),
(this.encoding = !1),
(this.packetBuffer = []),
(this.encoder = new o.Encoder()),
(this.decoder = new o.Decoder()),
(this.autoConnect = !1 !== t.autoConnect),
this.autoConnect && this.open();
}
((t.exports = h).prototype.emitAll = function () {
for (var e in (this.emit.apply(this, arguments), this.nsps)) p.call(this.nsps, e) && this.nsps[e].emit.apply(this.nsps[e], arguments);
}),
(h.prototype.updateSocketIds = function () {
for (var e in this.nsps) p.call(this.nsps, e) && (this.nsps[e].id = this.engine.id);
}),
i(h.prototype),
(h.prototype.reconnection = function (e) {
return arguments.length ? ((this._reconnection = !!e), this) : this._reconnection;
}),
(h.prototype.reconnectionAttempts = function (e) {
return arguments.length ? ((this._reconnectionAttempts = e), this) : this._reconnectionAttempts;
}),
(h.prototype.reconnectionDelay = function (e) {
return arguments.length ? ((this._reconnectionDelay = e), this.backoff && this.backoff.setMin(e), this) : this._reconnectionDelay;
}),
(h.prototype.randomizationFactor = function (e) {
return arguments.length ? ((this._randomizationFactor = e), this.backoff && this.backoff.setJitter(e), this) : this._randomizationFactor;
}),
(h.prototype.reconnectionDelayMax = function (e) {
return arguments.length ? ((this._reconnectionDelayMax = e), this.backoff && this.backoff.setMax(e), this) : this._reconnectionDelayMax;
}),
(h.prototype.timeout = function (e) {
return arguments.length ? ((this._timeout = e), this) : this._timeout;
}),
(h.prototype.maybeReconnectOnOpen = function () {
!this.reconnecting && this._reconnection && 0 === this.backoff.attempts && this.reconnect();
}),
(h.prototype.open = h.prototype.connect = function (n) {
if ((c("readyState %s", this.readyState), ~this.readyState.indexOf("open"))) return this;
c("opening %s", this.uri), (this.engine = a(this.uri, this.opts));
var e = this.engine,
i = this;
(this.readyState = "opening"), (this.skipReconnect = !1);
var t = l(e, "open", function () {
i.onopen(), n && n();
}),
r = l(e, "error", function (e) {
if ((c("connect_error"), i.cleanup(), (i.readyState = "closed"), i.emitAll("connect_error", e), n)) {
var t = new Error("Connection error");
(t.data = e), n(t);
} else i.maybeReconnectOnOpen();
});
if (!1 !== this._timeout) {
var o = this._timeout;
c("connect attempt will timeout after %d", o);
var s = setTimeout(function () {
c("connect attempt timed out after %d", o), t.destroy(), e.close(), e.emit("error", "timeout"), i.emitAll("connect_timeout", o);
}, o);
this.subs.push({
destroy: function () {
clearTimeout(s);
},
});
}
return this.subs.push(t), this.subs.push(r), this;
}),
(h.prototype.onopen = function () {
c("open"), this.cleanup(), (this.readyState = "open"), this.emit("open");
var e = this.engine;
this.subs.push(l(e, "data", s(this, "ondata"))),
this.subs.push(l(e, "ping", s(this, "onping"))),
this.subs.push(l(e, "pong", s(this, "onpong"))),
this.subs.push(l(e, "error", s(this, "onerror"))),
this.subs.push(l(e, "close", s(this, "onclose"))),
this.subs.push(l(this.decoder, "decoded", s(this, "ondecoded")));
}),
(h.prototype.onping = function () {
(this.lastPing = new Date()), this.emitAll("ping");
}),
(h.prototype.onpong = function () {
this.emitAll("pong", new Date() - this.lastPing);
}),
(h.prototype.ondata = function (e) {
this.decoder.add(e);
}),
(h.prototype.ondecoded = function (e) {
this.emit("packet", e);
}),
(h.prototype.onerror = function (e) {
c("error", e), this.emitAll("error", e);
}),
(h.prototype.socket = function (e) {
var t = this.nsps[e];
if (!t) {
(t = new r(this, e)), (this.nsps[e] = t);
var n = this;
t.on("connecting", i),
t.on("connect", function () {
t.id = n.engine.id;
}),
this.autoConnect && i();
}
function i() {
~u(n.connecting, t) || n.connecting.push(t);
}
return t;
}),
(h.prototype.destroy = function (e) {
var t = u(this.connecting, e);
~t && this.connecting.splice(t, 1), this.connecting.length || this.close();
}),
(h.prototype.packet = function (n) {
c("writing packet %j", n);
var i = this;
i.encoding
? i.packetBuffer.push(n)
: ((i.encoding = !0),
this.encoder.encode(n, function (e) {
for (var t = 0; t < e.length; t++) i.engine.write(e[t], n.options);
(i.encoding = !1), i.processPacketQueue();
}));
}),
(h.prototype.processPacketQueue = function () {
if (0 < this.packetBuffer.length && !this.encoding) {
var e = this.packetBuffer.shift();
this.packet(e);
}
}),
(h.prototype.cleanup = function () {
var e;
for (c("cleanup"); (e = this.subs.shift()); ) e.destroy();
(this.packetBuffer = []), (this.encoding = !1), (this.lastPing = null), this.decoder.destroy();
}),
(h.prototype.close = h.prototype.disconnect = function () {
c("disconnect"), (this.skipReconnect = !0), (this.reconnecting = !1), "opening" == this.readyState && this.cleanup(), this.backoff.reset(), (this.readyState = "closed"), this.engine && this.engine.close();
}),
(h.prototype.onclose = function (e) {
c("onclose"), this.cleanup(), this.backoff.reset(), (this.readyState = "closed"), this.emit("close", e), this._reconnection && !this.skipReconnect && this.reconnect();
}),
(h.prototype.reconnect = function () {
if (this.reconnecting || this.skipReconnect) return this;
var t = this;
if (this.backoff.attempts >= this._reconnectionAttempts) c("reconnect failed"), this.backoff.reset(), this.emitAll("reconnect_failed"), (this.reconnecting = !1);
else {
var e = this.backoff.duration();
c("will wait %dms before reconnect attempt", e), (this.reconnecting = !0);
var n = setTimeout(function () {
t.skipReconnect ||
(c("attempting reconnect"),
t.emitAll("reconnect_attempt", t.backoff.attempts),
t.emitAll("reconnecting", t.backoff.attempts),
t.skipReconnect ||
t.open(function (e) {
e ? (c("reconnect attempt error"), (t.reconnecting = !1), t.reconnect(), t.emitAll("reconnect_error", e.data)) : (c("reconnect success"), t.onreconnect());
}));
}, e);
this.subs.push({
destroy: function () {
clearTimeout(n);
},
});
}
}),
(h.prototype.onreconnect = function () {
var e = this.backoff.attempts;
(this.reconnecting = !1), this.backoff.reset(), this.updateSocketIds(), this.emitAll("reconnect", e);
});
},
{ "./on": 33, "./socket": 34, backo2: 36, "component-bind": 37, "component-emitter": 38, debug: 39, "engine.io-client": 1, indexof: 42, "socket.io-parser": 47 },
],
33: [
function (e, t, n) {
t.exports = function (e, t, n) {
return (
e.on(t, n),
{
destroy: function () {
e.removeListener(t, n);
},
}
);
};
},
{},
],
34: [
function (e, t, n) {
var o = e("socket.io-parser"),
i = e("component-emitter"),
s = e("to-array"),
r = e("./on"),
a = e("component-bind"),
l = e("debug")("socket.io-client:socket"),
c = e("has-binary");
t.exports = p;
var u = { connect: 1, connect_error: 1, connect_timeout: 1, connecting: 1, disconnect: 1, error: 1, reconnect: 1, reconnect_attempt: 1, reconnect_failed: 1, reconnect_error: 1, reconnecting: 1, ping: 1, pong: 1 },
d = i.prototype.emit;
function p(e, t) {
(this.io = e),
(this.nsp = t),
((this.json = this).ids = 0),
(this.acks = {}),
(this.receiveBuffer = []),
(this.sendBuffer = []),
(this.connected = !1),
(this.disconnected = !0),
this.io.autoConnect && this.open();
}
i(p.prototype),
(p.prototype.subEvents = function () {
if (!this.subs) {
var e = this.io;
this.subs = [r(e, "open", a(this, "onopen")), r(e, "packet", a(this, "onpacket")), r(e, "close", a(this, "onclose"))];
}
}),
(p.prototype.open = p.prototype.connect = function () {
return this.connected || (this.subEvents(), this.io.open(), "open" == this.io.readyState && this.onopen(), this.emit("connecting")), this;
}),
(p.prototype.send = function () {
var e = s(arguments);
return e.unshift("message"), this.emit.apply(this, e), this;
}),
(p.prototype.emit = function (e) {
if (u.hasOwnProperty(e)) return d.apply(this, arguments), this;
var t = s(arguments),
n = o.EVENT;
c(t) && (n = o.BINARY_EVENT);
var i = { type: n, data: t, options: {} };
return (
(i.options.compress = !this.flags || !1 !== this.flags.compress),
"function" == typeof t[t.length - 1] && (l("emitting packet with ack id %d", this.ids), (this.acks[this.ids] = t.pop()), (i.id = this.ids++)),
this.connected ? this.packet(i) : this.sendBuffer.push(i),
delete this.flags,
this
);
}),
(p.prototype.packet = function (e) {
(e.nsp = this.nsp), this.io.packet(e);
}),
(p.prototype.onopen = function () {
l("transport is open - connecting"), "/" != this.nsp && this.packet({ type: o.CONNECT });
}),
(p.prototype.onclose = function (e) {
l("close (%s)", e), (this.connected = !1), (this.disconnected = !0), delete this.id, this.emit("disconnect", e);
}),
(p.prototype.onpacket = function (e) {
if (e.nsp == this.nsp)
switch (e.type) {
case o.CONNECT:
this.onconnect();
break;
case o.EVENT:
case o.BINARY_EVENT:
this.onevent(e);
break;
case o.ACK:
case o.BINARY_ACK:
this.onack(e);
break;
case o.DISCONNECT:
this.ondisconnect();
break;
case o.ERROR:
this.emit("error", e.data);
}
}),
(p.prototype.onevent = function (e) {
var t = e.data || [];
l("emitting event %j", t), null != e.id && (l("attaching ack callback to event"), t.push(this.ack(e.id))), this.connected ? d.apply(this, t) : this.receiveBuffer.push(t);
}),
(p.prototype.ack = function (n) {
var i = this,
r = !1;
return function () {
if (!r) {
r = !0;
var e = s(arguments);
l("sending ack %j", e);
var t = c(e) ? o.BINARY_ACK : o.ACK;
i.packet({ type: t, id: n, data: e });
}
};
}),
(p.prototype.onack = function (e) {
var t = this.acks[e.id];
"function" == typeof t ? (l("calling ack %s with %j", e.id, e.data), t.apply(this, e.data), delete this.acks[e.id]) : l("bad ack %s", e.id);
}),
(p.prototype.onconnect = function () {
(this.connected = !0), (this.disconnected = !1), this.emit("connect"), this.emitBuffered();
}),
(p.prototype.emitBuffered = function () {
var e;
for (e = 0; e < this.receiveBuffer.length; e++) d.apply(this, this.receiveBuffer[e]);
for (this.receiveBuffer = [], e = 0; e < this.sendBuffer.length; e++) this.packet(this.sendBuffer[e]);
this.sendBuffer = [];
}),
(p.prototype.ondisconnect = function () {
l("server disconnect (%s)", this.nsp), this.destroy(), this.onclose("io server disconnect");
}),
(p.prototype.destroy = function () {
if (this.subs) {
for (var e = 0; e < this.subs.length; e++) this.subs[e].destroy();
this.subs = null;
}
this.io.destroy(this);
}),
(p.prototype.close = p.prototype.disconnect = function () {
return this.connected && (l("performing disconnect (%s)", this.nsp), this.packet({ type: o.DISCONNECT })), this.destroy(), this.connected && this.onclose("io client disconnect"), this;
}),
(p.prototype.compress = function (e) {
return (this.flags = this.flags || {}), (this.flags.compress = e), this;
});
},
{ "./on": 33, "component-bind": 37, "component-emitter": 38, debug: 39, "has-binary": 41, "socket.io-parser": 47, "to-array": 51 },
],
35: [
function (e, t, n) {
(function (r) {
var o = e("parseuri"),
s = e("debug")("socket.io-client:url");
t.exports = function (e, t) {
var n = e,
t = t || r.location;
null == e && (e = t.protocol + "//" + t.host);
"string" == typeof e &&
("/" == e.charAt(0) && (e = "/" == e.charAt(1) ? t.protocol + e : t.host + e),
/^(https?|wss?):\/\//.test(e) || (s("protocol-less url %s", e), (e = void 0 !== t ? t.protocol + "//" + e : "https://" + e)),
s("parse %s", e),
(n = o(e)));
n.port || (/^(http|ws)$/.test(n.protocol) ? (n.port = "80") : /^(http|ws)s$/.test(n.protocol) && (n.port = "443"));
n.path = n.path || "/";
var i = -1 !== n.host.indexOf(":") ? "[" + n.host + "]" : n.host;
return (n.id = n.protocol + "://" + i + ":" + n.port), (n.href = n.protocol + "://" + i + (t && t.port == n.port ? "" : ":" + n.port)), n;
};
}.call(this, "undefined" != typeof self ? self : "undefined" != typeof window ? window : "undefined" != typeof global ? global : {}));
},
{ debug: 39, parseuri: 45 },
],
36: [
function (e, t, n) {
function i(e) {
(e = e || {}), (this.ms = e.min || 100), (this.max = e.max || 1e4), (this.factor = e.factor || 2), (this.jitter = 0 < e.jitter && e.jitter <= 1 ? e.jitter : 0), (this.attempts = 0);
}
((t.exports = i).prototype.duration = function () {
var e = this.ms * Math.pow(this.factor, this.attempts++);
if (this.jitter) {
var t = Math.random(),
n = Math.floor(t * this.jitter * e);
e = 0 == (1 & Math.floor(10 * t)) ? e - n : e + n;
}
return 0 | Math.min(e, this.max);
}),
(i.prototype.reset = function () {
this.attempts = 0;
}),
(i.prototype.setMin = function (e) {
this.ms = e;
}),
(i.prototype.setMax = function (e) {
this.max = e;
}),
(i.prototype.setJitter = function (e) {
this.jitter = e;
});
},
{},
],
37: [
function (e, t, n) {
var i = [].slice;
t.exports = function (e, t) {
if (("string" == typeof t && (t = e[t]), "function" != typeof t)) throw new Error("bind() requires a function");
var n = i.call(arguments, 2);
return function () {
return t.apply(e, n.concat(i.call(arguments)));
};
};
},
{},
],
38: [
function (e, t, n) {
function i(e) {
if (e)
return (function (e) {
for (var t in i.prototype) e[t] = i.prototype[t];
return e;
})(e);
}
((t.exports = i).prototype.on = i.prototype.addEventListener = function (e, t) {
return (this._callbacks = this._callbacks || {}), (this._callbacks["$" + e] = this._callbacks["$" + e] || []).push(t), this;
}),
(i.prototype.once = function (e, t) {
function n() {
this.off(e, n), t.apply(this, arguments);
}
return (n.fn = t), this.on(e, n), this;
}),
(i.prototype.off = i.prototype.removeListener = i.prototype.removeAllListeners = i.prototype.removeEventListener = function (e, t) {
if (((this._callbacks = this._callbacks || {}), 0 == arguments.length)) return (this._callbacks = {}), this;
var n,
i = this._callbacks["$" + e];
if (!i) return this;
if (1 == arguments.length) return delete this._callbacks["$" + e], this;
for (var r = 0; r < i.length; r++)
if ((n = i[r]) === t || n.fn === t) {
i.splice(r, 1);
break;
}
return this;
}),
(i.prototype.emit = function (e) {
this._callbacks = this._callbacks || {};
var t = [].slice.call(arguments, 1),
n = this._callbacks["$" + e];
if (n) for (var i = 0, r = (n = n.slice(0)).length; i < r; ++i) n[i].apply(this, t);
return this;
}),
(i.prototype.listeners = function (e) {
return (this._callbacks = this._callbacks || {}), this._callbacks["$" + e] || [];
}),
(i.prototype.hasListeners = function (e) {
return !!this.listeners(e).length;
});
},
{},
],
39: [
function (e, t, n) {
arguments[4][17][0].apply(n, arguments);
},
{ "./debug": 40, dup: 17 },
],
40: [
function (e, t, n) {
arguments[4][18][0].apply(n, arguments);
},
{ dup: 18, ms: 44 },
],
41: [
function (e, t, n) {
(function (r) {
var o = e("isarray");
t.exports = function (e) {
return (function e(t) {
if (!t) return !1;
if ((r.Buffer && r.Buffer.isBuffer && r.Buffer.isBuffer(t)) || (r.ArrayBuffer && t instanceof ArrayBuffer) || (r.Blob && t instanceof Blob) || (r.File && t instanceof File)) return !0;
if (o(t)) {
for (var n = 0; n < t.length; n++) if (e(t[n])) return !0;
} else if (t && "object" == typeof t) for (var i in (t.toJSON && "function" == typeof t.toJSON && (t = t.toJSON()), t)) if (Object.prototype.hasOwnProperty.call(t, i) && e(t[i])) return !0;
return !1;
})(e);
};
}.call(this, "undefined" != typeof self ? self : "undefined" != typeof window ? window : "undefined" != typeof global ? global : {}));
},
{ isarray: 43 },
],
42: [
function (e, t, n) {
arguments[4][23][0].apply(n, arguments);
},
{ dup: 23 },
],
43: [
function (e, t, n) {
arguments[4][24][0].apply(n, arguments);
},
{ dup: 24 },
],
44: [
function (e, t, n) {
arguments[4][25][0].apply(n, arguments);
},
{ dup: 25 },
],
45: [
function (e, t, n) {
arguments[4][28][0].apply(n, arguments);
},
{ dup: 28 },
],
46: [
function (e, t, n) {
(function (u) {
var d = e("isarray"),
p = e("./is-buffer");
(n.deconstructPacket = function (e) {
var s = [],
t = e.data;
var n = e;
return (
(n.data = (function e(t) {
if (!t) return t;
if (p(t)) {
var n = { _placeholder: !0, num: s.length };
return s.push(t), n;
}
if (d(t)) {
for (var i = new Array(t.length), r = 0; r < t.length; r++) i[r] = e(t[r]);
return i;
}
if ("object" != typeof t || t instanceof Date) return t;
i = {};
for (var o in t) i[o] = e(t[o]);
return i;
})(t)),
(n.attachments = s.length),
{ packet: n, buffers: s }
);
}),
(n.reconstructPacket = function (e, r) {
return (
(e.data = (function e(t) {
if (t && t._placeholder) return r[t.num];
if (d(t)) {
for (var n = 0; n < t.length; n++) t[n] = e(t[n]);
return t;
}
if (t && "object" == typeof t) {
for (var i in t) t[i] = e(t[i]);
return t;
}
return t;
})(e.data)),
(e.attachments = void 0),
e
);
}),
(n.removeBlobs = function (e, a) {
var l = 0,
c = e;
!(function e(t, n, i) {
if (!t) return t;
if ((u.Blob && t instanceof Blob) || (u.File && t instanceof File)) {
l++;
var r = new FileReader();
(r.onload = function () {
i ? (i[n] = this.result) : (c = this.result), --l || a(c);
}),
r.readAsArrayBuffer(t);
} else if (d(t)) for (var o = 0; o < t.length; o++) e(t[o], o, t);
else if (t && "object" == typeof t && !p(t)) for (var s in t) e(t[s], s, t);
})(c),
l || a(c);
});
}.call(this, "undefined" != typeof self ? self : "undefined" != typeof window ? window : "undefined" != typeof global ? global : {}));
},
{ "./is-buffer": 48, isarray: 43 },
],
47: [
function (e, t, s) {
var a = e("debug")("socket.io-parser"),
l = e("json3"),
n = (e("isarray"), e("component-emitter")),
o = e("./binary"),
i = e("./is-buffer");
function r() {}
function c(e) {
var t = "",
n = !1;
return (
(t += e.type),
(s.BINARY_EVENT != e.type && s.BINARY_ACK != e.type) || ((t += e.attachments), (t += "-")),
e.nsp && "/" != e.nsp && ((n = !0), (t += e.nsp)),
null != e.id && (n && ((t += ","), (n = !1)), (t += e.id)),
null != e.data && (n && (t += ","), (t += l.stringify(e.data))),
a("encoded %j as %s", e, t),
t
);
}
function u() {
this.reconstructor = null;
}
function d(e) {
(this.reconPack = e), (this.buffers = []);
}
function p(e) {
return { type: s.ERROR, data: "parser error" };
}
(s.protocol = 4),
(s.types = ["CONNECT", "DISCONNECT", "EVENT", "BINARY_EVENT", "ACK", "BINARY_ACK", "ERROR"]),
(s.CONNECT = 0),
(s.DISCONNECT = 1),
(s.EVENT = 2),
(s.ACK = 3),
(s.ERROR = 4),
(s.BINARY_EVENT = 5),
(s.BINARY_ACK = 6),
(s.Encoder = r),
(s.Decoder = u),
(r.prototype.encode = function (e, t) {
var n, r;
(a("encoding packet %j", e), s.BINARY_EVENT == e.type || s.BINARY_ACK == e.type)
? ((n = e),
(r = t),
o.removeBlobs(n, function (e) {
var t = o.deconstructPacket(e),
n = c(t.packet),
i = t.buffers;
i.unshift(n), r(i);
}))
: t([c(e)]);
}),
n(u.prototype),
(u.prototype.add = function (e) {
var t;
if ("string" == typeof e)
(t = (function (e) {
var t = {},
n = 0;
if (((t.type = Number(e.charAt(0))), null == s.types[t.type])) return p();
if (s.BINARY_EVENT == t.type || s.BINARY_ACK == t.type) {
for (var i = ""; "-" != e.charAt(++n) && ((i += e.charAt(n)), n != e.length); );
if (i != Number(i) || "-" != e.charAt(n)) throw new Error("Illegal attachments");
t.attachments = Number(i);
}
if ("/" == e.charAt(n + 1))
for (t.nsp = ""; ++n; ) {
var r = e.charAt(n);
if ("," == r) break;
if (((t.nsp += r), n == e.length)) break;
}
else t.nsp = "/";
var o = e.charAt(n + 1);
if ("" !== o && Number(o) == o) {
for (t.id = ""; ++n; ) {
var r = e.charAt(n);
if (null == r || Number(r) != r) {
--n;
break;
}
if (((t.id += e.charAt(n)), n == e.length)) break;
}
t.id = Number(t.id);
}
if (e.charAt(++n))
try {
t.data = l.parse(e.substr(n));
} catch (e) {
return p();
}
return a("decoded %s as %j", e, t), t;
})(e)),
s.BINARY_EVENT == t.type || s.BINARY_ACK == t.type ? ((this.reconstructor = new d(t)), 0 === this.reconstructor.reconPack.attachments && this.emit("decoded", t)) : this.emit("decoded", t);
else {
if (!i(e) && !e.base64) throw new Error("Unknown type: " + e);
if (!this.reconstructor) throw new Error("got binary data when not reconstructing a packet");
(t = this.reconstructor.takeBinaryData(e)) && ((this.reconstructor = null), this.emit("decoded", t));
}
}),
(u.prototype.destroy = function () {
this.reconstructor && this.reconstructor.finishedReconstruction();
}),
(d.prototype.takeBinaryData = function (e) {
if ((this.buffers.push(e), this.buffers.length != this.reconPack.attachments)) return null;
var t = o.reconstructPacket(this.reconPack, this.buffers);
return this.finishedReconstruction(), t;
}),
(d.prototype.finishedReconstruction = function () {
(this.reconPack = null), (this.buffers = []);
});
},
{ "./binary": 46, "./is-buffer": 48, "component-emitter": 49, debug: 39, isarray: 43, json3: 50 },
],
48: [
function (e, n, t) {
(function (t) {
n.exports = function (e) {
return (t.Buffer && t.Buffer.isBuffer(e)) || (t.ArrayBuffer && e instanceof ArrayBuffer);
};
}.call(this, "undefined" != typeof self ? self : "undefined" != typeof window ? window : "undefined" != typeof global ? global : {}));
},
{},
],
49: [
function (e, t, n) {
arguments[4][15][0].apply(n, arguments);
},
{ dup: 15 },
],
50: [
function (e, a, l) {
(function (s) {
(function () {
var M = { function: !0, object: !0 },
e = M[typeof l] && l && !l.nodeType && l,
H = (M[typeof window] && window) || this,
t = e && M[typeof a] && a && !a.nodeType && "object" == typeof s && s;
function R(e, l) {
e || (e = H.Object()), l || (l = H.Object());
var c = e.Number || H.Number,
u = e.String || H.String,
t = e.Object || H.Object,
d = e.Date || H.Date,
n = e.SyntaxError || H.SyntaxError,
C = e.TypeError || H.TypeError,
i = e.Math || H.Math,
r = e.JSON || H.JSON;
"object" == typeof r && r && ((l.stringify = r.stringify), (l.parse = r.parse));
var _,
A,
T,
o = t.prototype,
E = o.toString,
p = new d(-0xc782b5b800cec);
try {
p = -109252 == p.getUTCFullYear() && 0 === p.getUTCMonth() && 1 === p.getUTCDate() && 10 == p.getUTCHours() && 37 == p.getUTCMinutes() && 6 == p.getUTCSeconds() && 708 == p.getUTCMilliseconds();
} catch (e) {}
function h(e) {
if (h[e] !== T) return h[e];
var t;
if ("bug-string-char-index" == e) t = "a" != "a"[0];
else if ("json" == e) t = h("json-stringify") && h("json-parse");
else {
var n,
i = '{"a":[1,true,false,null,"\\u0000\\b\\n\\f\\r\\t"]}';
if ("json-stringify" == e) {
var r = l.stringify,
o = "function" == typeof r && p;
if (o) {
(n = function () {
return 1;
}).toJSON = n;
try {
o =
"0" === r(0) &&
"0" === r(new c()) &&
'""' == r(new u()) &&
r(E) === T &&
r(T) === T &&
r() === T &&
"1" === r(n) &&
"[1]" == r([n]) &&
"[null]" == r([T]) &&
"null" == r(null) &&
"[null,null,null]" == r([T, E, null]) &&
r({ a: [n, !0, !1, null, "\0\b\n\f\r\t"] }) == i &&
"1" === r(null, n) &&
"[\n 1,\n 2\n]" == r([1, 2], null, 1) &&
'"-271821-04-20T00:00:00.000Z"' == r(new d(-864e13)) &&
'"+275760-09-13T00:00:00.000Z"' == r(new d(864e13)) &&
'"-000001-01-01T00:00:00.000Z"' == r(new d(-621987552e5)) &&
'"1969-12-31T23:59:59.999Z"' == r(new d(-1));
} catch (e) {
o = !1;
}
}
t = o;
}
if ("json-parse" == e) {
var s = l.parse;
if ("function" == typeof s)
try {
if (0 === s("0") && !s(!1)) {
var a = 5 == (n = s(i)).a.length && 1 === n.a[0];
if (a) {
try {
a = !s('"\t"');
} catch (e) {}
if (a)
try {
a = 1 !== s("01");
} catch (e) {}
if (a)
try {
a = 1 !== s("1.");
} catch (e) {}
}
}
} catch (e) {
a = !1;
}
t = a;
}
}
return (h[e] = !!t);
}
if (!h("json")) {
var f = "[object Function]",
N = "[object Number]",
S = "[object String]",
I = "[object Array]",
a = h("bug-string-char-index");
if (!p)
var j = i.floor,
s = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334],
F = function (e, t) {
return s[t] + 365 * (e - 1970) + j((e - 1969 + (t = +(1 < t))) / 4) - j((e - 1901 + t) / 100) + j((e - 1601 + t) / 400);
};
if (
((_ = o.hasOwnProperty) ||
(_ = function (e) {
var n,
t = {};
return (
(_ =
((t.__proto__ = null), (t.__proto__ = { toString: 1 }), t).toString != E
? function (e) {
var t = this.__proto__,
n = e in ((this.__proto__ = null), this);
return (this.__proto__ = t), n;
}
: ((n = t.constructor),
function (e) {
var t = (this.constructor || n).prototype;
return e in this && !(e in t && this[e] === t[e]);
})),
(t = null),
_.call(this, e)
);
}),
(A = function (e, t) {
var n,
s,
i,
r = 0;
for (i in (((n = function () {
this.valueOf = 0;
}).prototype.valueOf = 0),
(s = new n())))
_.call(s, i) && r++;
return (
(n = s = null),
(A = r
? 2 == r
? function (e, t) {
var n,
i = {},
r = E.call(e) == f;
for (n in e) (r && "prototype" == n) || _.call(i, n) || !(i[n] = 1) || !_.call(e, n) || t(n);
}
: function (e, t) {
var n,
i,
r = E.call(e) == f;
for (n in e) (r && "prototype" == n) || !_.call(e, n) || (i = "constructor" === n) || t(n);
(i || _.call(e, (n = "constructor"))) && t(n);
}
: ((s = ["valueOf", "toString", "toLocaleString", "propertyIsEnumerable", "isPrototypeOf", "hasOwnProperty", "constructor"]),
function (e, t) {
var n,
i,
r = E.call(e) == f,
o = (!r && "function" != typeof e.constructor && M[typeof e.hasOwnProperty] && e.hasOwnProperty) || _;
for (n in e) (r && "prototype" == n) || !o.call(e, n) || t(n);
for (i = s.length; (n = s[--i]); o.call(e, n) && t(n));
}))(e, t)
);
}),
!h("json-stringify"))
) {
var m = { 92: "\\\\", 34: '\\"', 8: "\\b", 12: "\\f", 10: "\\n", 13: "\\r", 9: "\\t" },
D = function (e, t) {
return ("000000" + (t || 0)).slice(-e);
},
P = function (e) {
for (var t = '"', n = 0, i = e.length, r = !a || 10 < i, o = r && (a ? e.split("") : e); n < i; n++) {
var s = e.charCodeAt(n);
switch (s) {
case 8:
case 9:
case 10:
case 12:
case 13:
case 34:
case 92:
t += m[s];
break;
default:
if (s < 32) {
t += "\\u00" + D(2, s.toString(16));
break;
}
t += r ? o[n] : e.charAt(n);
}
}
return t + '"';
},
O = function (e, t, n, i, r, o, s) {
var a, l, c, u, d, p, h, f, m, g, y, v, b, w, x, k;
try {
a = t[e];
} catch (e) {}
if ("object" == typeof a && a)
if ("[object Date]" != (l = E.call(a)) || _.call(a, "toJSON")) "function" == typeof a.toJSON && ((l != N && l != S && l != I) || _.call(a, "toJSON")) && (a = a.toJSON(e));
else if (-1 / 0 < a && a < 1 / 0) {
if (F) {
for (d = j(a / 864e5), c = j(d / 365.2425) + 1970 - 1; F(c + 1, 0) <= d; c++);
for (u = j((d - F(c, 0)) / 30.42); F(c, u + 1) <= d; u++);
(d = 1 + d - F(c, u)), (h = j((p = ((a % 864e5) + 864e5) % 864e5) / 36e5) % 24), (f = j(p / 6e4) % 60), (m = j(p / 1e3) % 60), (g = p % 1e3);
} else (c = a.getUTCFullYear()), (u = a.getUTCMonth()), (d = a.getUTCDate()), (h = a.getUTCHours()), (f = a.getUTCMinutes()), (m = a.getUTCSeconds()), (g = a.getUTCMilliseconds());
a =
(c <= 0 || 1e4 <= c ? (c < 0 ? "-" : "+") + D(6, c < 0 ? -c : c) : D(4, c)) +
"-" +
D(2, u + 1) +
"-" +
D(2, d) +
"T" +
D(2, h) +
":" +
D(2, f) +
":" +
D(2, m) +
"." +
D(3, g) +
"Z";
} else a = null;
if ((n && (a = n.call(t, e, a)), null === a)) return "null";
if ("[object Boolean]" == (l = E.call(a))) return "" + a;
if (l == N) return -1 / 0 < a && a < 1 / 0 ? "" + a : "null";
if (l == S) return P("" + a);
if ("object" == typeof a) {
for (w = s.length; w--; ) if (s[w] === a) throw C();
if ((s.push(a), (y = []), (x = o), (o += r), l == I)) {
for (b = 0, w = a.length; b < w; b++) (v = O(b, a, n, i, r, o, s)), y.push(v === T ? "null" : v);
k = y.length ? (r ? "[\n" + o + y.join(",\n" + o) + "\n" + x + "]" : "[" + y.join(",") + "]") : "[]";
} else
A(i || a, function (e) {
var t = O(e, a, n, i, r, o, s);
t !== T && y.push(P(e) + ":" + (r ? " " : "") + t);
}),
(k = y.length ? (r ? "{\n" + o + y.join(",\n" + o) + "\n" + x + "}" : "{" + y.join(",") + "}") : "{}");
return s.pop(), k;
}
};
l.stringify = function (e, t, n) {
var i, r, o, s;
if (M[typeof t] && t)
if ((s = E.call(t)) == f) r = t;
else if (s == I) {
o = {};
for (var a, l = 0, c = t.length; l < c; a = t[l++], ((s = E.call(a)) == S || s == N) && (o[a] = 1));
}
if (n)
if ((s = E.call(n)) == N) {
if (0 < (n -= n % 1)) for (i = "", 10 < n && (n = 10); i.length < n; i += " ");
} else s == S && (i = n.length <= 10 ? n : n.slice(0, 10));
return O("", (((a = {})[""] = e), a), r, o, i, "", []);
};
}
if (!h("json-parse")) {
var g,
y,
v = u.fromCharCode,
b = { 92: "\\", 34: '"', 47: "/", 98: "\b", 116: "\t", 110: "\n", 102: "\f", 114: "\r" },
w = function () {
throw ((g = y = null), n());
},
x = function () {
for (var e, t, n, i, r, o = y, s = o.length; g < s; )
switch ((r = o.charCodeAt(g))) {
case 9:
case 10:
case 13:
case 32:
g++;
break;
case 123:
case 125:
case 91:
case 93:
case 58:
case 44:
return (e = a ? o.charAt(g) : o[g]), g++, e;
case 34:
for (e = "@", g++; g < s; )
if ((r = o.charCodeAt(g)) < 32) w();
else if (92 == r)
switch ((r = o.charCodeAt(++g))) {
case 92:
case 34:
case 47:
case 98:
case 116:
case 110:
case 102:
case 114:
(e += b[r]), g++;
break;
case 117:
for (t = ++g, n = g + 4; g < n; g++) (48 <= (r = o.charCodeAt(g)) && r <= 57) || (97 <= r && r <= 102) || (65 <= r && r <= 70) || w();
e += v("0x" + o.slice(t, g));
break;
default:
w();
}
else {
if (34 == r) break;
for (r = o.charCodeAt(g), t = g; 32 <= r && 92 != r && 34 != r; ) r = o.charCodeAt(++g);
e += o.slice(t, g);
}
if (34 == o.charCodeAt(g)) return g++, e;
w();
default:
if (((t = g), 45 == r && ((i = !0), (r = o.charCodeAt(++g))), 48 <= r && r <= 57)) {
for (48 == r && 48 <= (r = o.charCodeAt(g + 1)) && r <= 57 && w(), i = !1; g < s && 48 <= (r = o.charCodeAt(g)) && r <= 57; g++);
if (46 == o.charCodeAt(g)) {
for (n = ++g; n < s && 48 <= (r = o.charCodeAt(n)) && r <= 57; n++);
n == g && w(), (g = n);
}
if (101 == (r = o.charCodeAt(g)) || 69 == r) {
for ((43 != (r = o.charCodeAt(++g)) && 45 != r) || g++, n = g; n < s && 48 <= (r = o.charCodeAt(n)) && r <= 57; n++);
n == g && w(), (g = n);
}
return +o.slice(t, g);
}
if ((i && w(), "true" == o.slice(g, g + 4))) return (g += 4), !0;
if ("false" == o.slice(g, g + 5)) return (g += 5), !1;
if ("null" == o.slice(g, g + 4)) return (g += 4), null;
w();
}
return "$";
},
k = function (e) {
var t, n;
if (("$" == e && w(), "string" == typeof e)) {
if ("@" == (a ? e.charAt(0) : e[0])) return e.slice(1);
if ("[" == e) {
for (t = []; "]" != (e = x()); n || (n = !0)) n && ("," == e ? "]" == (e = x()) && w() : w()), "," == e && w(), t.push(k(e));
return t;
}
if ("{" == e) {
for (t = {}; "}" != (e = x()); n || (n = !0))
n && ("," == e ? "}" == (e = x()) && w() : w()), ("," != e && "string" == typeof e && "@" == (a ? e.charAt(0) : e[0]) && ":" == x()) || w(), (t[e.slice(1)] = k(x()));
return t;
}
w();
}
return e;
},
B = function (e, t, n) {
var i = L(e, t, n);
i === T ? delete e[t] : (e[t] = i);
},
L = function (e, t, n) {
var i,
r = e[t];
if ("object" == typeof r && r)
if (E.call(r) == I) for (i = r.length; i--; ) B(r, i, n);
else
A(r, function (e) {
B(r, e, n);
});
return n.call(e, t, r);
};
l.parse = function (e, t) {
var n, i;
return (g = 0), (y = "" + e), (n = k(x())), "$" != x() && w(), (g = y = null), t && E.call(t) == f ? L((((i = {})[""] = n), i), "", t) : n;
};
}
}
return (l.runInContext = R), l;
}
if ((!t || (t.global !== t && t.window !== t && t.self !== t) || (H = t), e)) R(H, e);
else {
var n = H.JSON,
i = H.JSON3,
r = !1,
o = R(
H,
(H.JSON3 = {
noConflict: function () {
return r || ((r = !0), (H.JSON = n), (H.JSON3 = i), (n = i = null)), o;
},
})
);
H.JSON = { parse: o.parse, stringify: o.stringify };
}
}.call(this));
}.call(this, "undefined" != typeof self ? self : "undefined" != typeof window ? window : "undefined" != typeof global ? global : {}));
},
{},
],
51: [
function (e, t, n) {
t.exports = function (e, t) {
for (var n = [], i = (t = t || 0) || 0; i < e.length; i++) n[i - t] = e[i];
return n;
};
},
{},
],
},
{},
[31]
)(31);
}),
(GLOBAL = window);
var scriptElement = document.getElementById("js-iframe-async");
window.parent != window && scriptElement && (GLOBAL = window.parent), (GLOBAL._xsq = GLOBAL._xsq || []), (_queue = GLOBAL._xsq);
var latestWidgetId = null,
defaultLabels = {
promptClose: "Are you sure you want to end this conversation?",
agentIsTyping: "%s is typing...",
closed: "Closed",
messageFailedToSend: "Unfortunately, your message was failed to send.",
ago: {
AMA: "just a minute ago",
AHA: "an hour ago",
ADA: "a day ago",
AWA: "a week ago",
AOA: "a month ago",
AYA: "a year ago",
NMA: "%d minutes ago",
NHA: "%d hours ago",
NDA: "%d days ago",
NWA: "%d weeks ago",
NOA: "%d months ago",
NYA: "%d years ago",
AMF: "within a minute",
AHF: "within an hour",
ADF: "within a day",
AWF: "within a week",
AOF: "within a month",
AYF: "within a year",
NMF: "in %d minutes",
NHF: "in %d hours",
NDF: "in %d days",
NWF: "in %d weeks",
NOF: "in %d months",
NYF: "in %d years",
numbers: [],
},
},
translations = {},
EDESK_DEFAULT_THEME = "edesk_default";
function captureError(e) {
e.name, e.line, document.location.href, e.stack;
}
function wrapErrors(e) {
return (
e.__wrapped__ ||
(e.__wrapped__ = function () {
try {
return e.apply(this, arguments);
} catch (e) {
throw (captureError(e), e);
}
}),
e.__wrapped__
);
}
Array.prototype.indexOf ||
(Array.prototype.indexOf = function (e, t) {
for (var n = t || 0, i = this.length; n < i; n++) if (this[n] === e) return n;
return -1;
});
var getFirstBrowserLanguage = function () {
var e,
t,
n = window.navigator,
i = ["language", "browserLanguage", "systemLanguage", "userLanguage"];
if (Array.isArray(n.languages)) for (e = 0; e < n.languages.length; e++) if ((t = n.languages[e]) && t.length) return t;
for (e = 0; e < i.length; e++) if ((t = n[i[e]]) && t.length) return t;
return null;
};
!(function (a) {
function e(e) {
return "object" == typeof e ? e : { top: e, left: e };
}
var g = (a.scrollTo = function (e, t, n) {
a(window).scrollTo(e, t, n);
});
(g.defaults = { axis: "xy", duration: 1.3 <= parseFloat(a.fn.jquery) ? 0 : 1, limit: !0 }),
(g.window = function (e) {
return a(window)._scrollable();
}),
(a.fn._scrollable = function () {
return this.map(function () {
var e = this;
if (!(!e.nodeName || -1 != a.inArray(e.nodeName.toLowerCase(), ["iframe", "#document", "html", "body"]))) return e;
var t = (e.contentWindow || e).document || e.ownerDocument || e;
return /webkit/i.test(navigator.userAgent) || "BackCompat" == t.compatMode ? t.body : t.documentElement;
});
}),
(a.fn.scrollTo = function (t, n, m) {
return (
"object" == typeof n && ((m = n), (n = 0)),
"function" == typeof m && (m = { onAfter: m }),
"max" == t && (t = 9e9),
(m = a.extend({}, g.defaults, m)),
(n = n || m.duration),
(m.queue = m.queue && 1 < m.axis.length),
m.queue && (n /= 2),
(m.offset = e(m.offset)),
(m.over = e(m.over)),
this._scrollable()
.each(function () {
function l(e) {
d.animate(
h,
n,
m.easing,
e &&
function () {
e.call(this, t, m);
}
);
}
if (null != t) {
var c,
u = this,
d = a(u),
p = t,
h = {},
f = d.is("html,body");
switch (typeof p) {
case "number":
case "string":
if (/^([+-]=)?\d+(\.\d+)?(px|%)?$/.test(p)) {
p = e(p);
break;
}
if (!(p = a(p, this)).length) return;
case "object":
(p.is || p.style) && (c = (p = a(p)).offset());
}
a.each(m.axis.split(""), function (e, t) {
var n = "x" == t ? "Left" : "Top",
i = n.toLowerCase(),
r = "scroll" + n,
o = u[r],
s = g.max(u, t);
if (c)
(h[r] = c[i] + (f ? 0 : o - d.offset()[i])),
m.margin && ((h[r] -= parseInt(p.css("margin" + n)) || 0), (h[r] -= parseInt(p.css("border" + n + "Width")) || 0)),
(h[r] += m.offset[i] || 0),
m.over[i] && (h[r] += p["x" == t ? "width" : "height"]() * m.over[i]);
else if (p[i]) {
var a = p[i];
h[r] = a.slice && "%" == a.slice(-1) ? (parseFloat(a) / 100) * s : a;
}
m.limit && /^\d+$/.test(h[r]) && (h[r] = h[r] <= 0 ? 0 : Math.min(h[r], s)), !e && m.queue && (o != h[r] && l(m.onAfterFirst), delete h[r]);
}),
l(m.onAfter);
}
})
.end()
);
}),
(g.max = function (e, t) {
var n = "x" == t ? "Width" : "Height",
i = "scroll" + n;
if (!a(e).is("html,body")) return e[i] - a(e)[n.toLowerCase()]();
var r = "client" + n,
o = e.ownerDocument.documentElement,
s = e.ownerDocument.body;
return Math.max(o[i], s[i]) - Math.min(o[r], s[r]);
});
})(jQuery),
(function (e) {
"function" == typeof define && define.amd ? define(["jquery"], e) : "object" == typeof module && "object" == typeof module.exports ? e(require("jquery")) : e(jQuery);
})(function (c) {
c.timeago = function (e) {
return e instanceof Date ? o(e) : o("string" == typeof e ? c.timeago.parse(e) : "number" == typeof e ? new Date(e) : c.timeago.datetime(e));
};
var n = c.timeago;
c.extend(c.timeago, {
settings: { refreshMillis: 6e4, allowPast: !0, allowFuture: !1, localeTitle: !1, cutoff: 0, autoDispose: !0 },
inWords: function (r) {
if (!this.settings.allowPast && !this.settings.allowFuture) throw "timeago allowPast and allowFuture settings can not both be set to false.";
var o = translations.ago,
e = "A";
if ((this.settings.allowFuture && r < 0 && (e = "F"), !this.settings.allowPast && 0 <= r)) return translations.ago.AMF;
var t = Math.abs(r) / 1e3,
n = t / 60,
i = n / 60,
s = i / 24,
a = s / 365;
function l(e, t) {
var n = c.isFunction(e) ? e(t, r) : e,
i = (o.numbers && o.numbers[t]) || t;
return n.replace(/%d/i, i);
}
return (
(t < 45 && l(o["AM" + e], Math.round(t))) ||
(t < 90 && l(o["AM" + e], 1)) ||
(n < 45 && l(o["NM" + e], Math.round(n))) ||
(n < 90 && l(o["AH" + e], 1)) ||
(i < 24 && l(o["NH" + e], Math.round(i))) ||
(i < 42 && l(o["AD" + e], 1)) ||
(s < 30 && l(o["ND" + e], Math.round(s))) ||
(s < 45 && l(o["AO" + e], 1)) ||
(s < 365 && l(o["NO" + e], Math.round(s / 30))) ||
(a < 1.5 && l(o["AY" + e], 1)) ||
l(o["NY" + e], Math.round(a))
);
},
parse: function (e) {
var t = c.trim(e);
return (t = (t = (t = (t = (t = t.replace(/\.\d+/, "")).replace(/-/, "/").replace(/-/, "/")).replace(/T/, " ").replace(/Z/, " UTC")).replace(/([\+\-]\d\d)\:?(\d\d)/, " $1$2")).replace(/([\+\-]\d\d)$/, " $100")), new Date(t);
},
datetime: function (e) {
var t = n.isTime(e) ? c(e).attr("datetime") : c(e).attr("title");
return n.parse(t);
},
isTime: function (e) {
return "time" === c(e).get(0).tagName.toLowerCase();
},
});
var i = {
init: function () {
var e = c.proxy(r, this);
e();
var t = n.settings;
0 < t.refreshMillis && (this._timeagoInterval = setInterval(e, t.refreshMillis));
},
update: function (e) {
var t = e instanceof Date ? e : n.parse(e);
c(this).data("timeago", { datetime: t }), n.settings.localeTitle && c(this).attr("title", t.toLocaleString()), r.apply(this);
},
updateFromDOM: function () {
c(this).data("timeago", { datetime: n.parse(n.isTime(this) ? c(this).attr("datetime") : c(this).attr("title")) }), r.apply(this);
},
dispose: function () {
this._timeagoInterval && (window.clearInterval(this._timeagoInterval), (this._timeagoInterval = null));
},
};
function r() {
var e = n.settings,
t = (function (e) {
if (!(e = c(e)).data("timeago")) {
e.data("timeago", { datetime: n.datetime(e) });
var t = c.trim(e.text());
n.settings.localeTitle ? e.attr("title", e.data("timeago").datetime.toLocaleString()) : !(0 < t.length) || (n.isTime(e) && e.attr("title")) || e.attr("title", t);
}
return e.data("timeago");
})(this);
return isNaN(t.datetime) || ((0 == e.cutoff || Math.abs(s(t.datetime)) < e.cutoff) && c(this).text(o(t.datetime))), this;
}
function o(e) {
return n.inWords(s(e));
}
function s(e) {
return new Date().getTime() - e.getTime();
}
(c.fn.timeago = function (e, t) {
var n = e ? i[e] : i.init;
if (!n) throw new Error("Unknown function name '" + e + "' for timeago");
return (
this.each(function () {
n.call(this, t);
}),
this
);
}),
document.createElement("abbr"),
document.createElement("time");
}),
(function (e) {
"function" == typeof define && define.amd ? define(["jquery", "./version"], e) : e(jQuery);
})(function (u) {
var r,
n = 0,
s = Array.prototype.hasOwnProperty,
a = Array.prototype.slice;
return (
(u.cleanData =
((r = u.cleanData),
function (e) {
var t, n, i;
for (i = 0; null != (n = e[i]); i++) (t = u._data(n, "events")) && t.remove && u(n).triggerHandler("remove");
r(e);
})),
(u.widget = function (e, n, t) {
var i,
r,
o,
s = {},
a = e.split(".")[0],
l = a + "-" + (e = e.split(".")[1]);
return (
t || ((t = n), (n = u.Widget)),
u.isArray(t) && (t = u.extend.apply(null, [{}].concat(t))),
(u.expr[":"][l.toLowerCase()] = function (e) {
return !!u.data(e, l);
}),
(u[a] = u[a] || {}),
(i = u[a][e]),
(r = u[a][e] = function (e, t) {
if (!this._createWidget) return new r(e, t);
arguments.length && this._createWidget(e, t);
}),
u.extend(r, i, { version: t.version, _proto: u.extend({}, t), _childConstructors: [] }),
((o = new n()).options = u.widget.extend({}, o.options)),
u.each(t, function (t, o) {
u.isFunction(o)
? (s[t] = (function () {
function i() {
return n.prototype[t].apply(this, arguments);
}
function r(e) {
return n.prototype[t].apply(this, e);
}
return function () {
var e,
t = this._super,
n = this._superApply;
return (this._super = i), (this._superApply = r), (e = o.apply(this, arguments)), (this._super = t), (this._superApply = n), e;
};
})())
: (s[t] = o);
}),
(r.prototype = u.widget.extend(o, { widgetEventPrefix: (i && o.widgetEventPrefix) || e }, s, { constructor: r, namespace: a, widgetName: e, widgetFullName: l })),
i
? (u.each(i._childConstructors, function (e, t) {
var n = t.prototype;
u.widget(n.namespace + "." + n.widgetName, r, t._proto);
}),
delete i._childConstructors)
: n._childConstructors.push(r),
u.widget.bridge(e, r),
r
);
}),
(u.widget.extend = function (e) {
for (var t, n, i = a.call(arguments, 1), r = 0, o = i.length; r < o; r++)
for (t in i[r]) (n = i[r][t]), s.call(i[r], t) && void 0 !== n && (u.isPlainObject(n) ? (e[t] = u.isPlainObject(e[t]) ? u.widget.extend({}, e[t], n) : u.widget.extend({}, n)) : (e[t] = n));
return e;
}),
(u.widget.bridge = function (o, t) {
var s = t.prototype.widgetFullName || o;
u.fn[o] = function (n) {
var e = "string" == typeof n,
i = a.call(arguments, 1),
r = this;
return (
e
? this.length || "instance" !== n
? this.each(function () {
var e,
t = u.data(this, s);
return "instance" === n
? ((r = t), !1)
: t
? u.isFunction(t[n]) && "_" !== n.charAt(0)
? (e = t[n].apply(t, i)) !== t && void 0 !== e
? ((r = e && e.jquery ? r.pushStack(e.get()) : e), !1)
: void 0
: u.error("no such method '" + n + "' for " + o + " widget instance")
: u.error("cannot call methods on " + o + " prior to initialization; attempted to call method '" + n + "'");
})
: (r = void 0)
: (i.length && (n = u.widget.extend.apply(null, [n].concat(i))),
this.each(function () {
var e = u.data(this, s);
e ? (e.option(n || {}), e._init && e._init()) : u.data(this, s, new t(n, this));
})),
r
);
};
}),
(u.Widget = function () {}),
(u.Widget._childConstructors = []),
(u.Widget.prototype = {
widgetName: "widget",
widgetEventPrefix: "",
defaultElement: "<div>",
options: { classes: {}, disabled: !1, create: null },
_createWidget: function (e, t) {
(t = u(t || this.defaultElement || this)[0]),
(this.element = u(t)),
(this.uuid = n++),
(this.eventNamespace = "." + this.widgetName + this.uuid),
(this.bindings = u()),
(this.hoverable = u()),
(this.focusable = u()),
(this.classesElementLookup = {}),
t !== this &&
(u.data(t, this.widgetFullName, this),
this._on(!0, this.element, {
remove: function (e) {
e.target === t && this.destroy();
},
}),
(this.document = u(t.style ? t.ownerDocument : t.document || t)),
(this.window = u(this.document[0].defaultView || this.document[0].parentWindow))),
(this.options = u.widget.extend({}, this.options, this._getCreateOptions(), e)),
this._create(),
this.options.disabled && this._setOptionDisabled(this.options.disabled),
this._trigger("create", null, this._getCreateEventData()),
this._init();
},
_getCreateOptions: function () {
return {};
},
_getCreateEventData: u.noop,
_create: u.noop,
_init: u.noop,
destroy: function () {
var n = this;
this._destroy(),
u.each(this.classesElementLookup, function (e, t) {
n._removeClass(t, e);
}),
this.element.off(this.eventNamespace).removeData(this.widgetFullName),
this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),
this.bindings.off(this.eventNamespace);
},
_destroy: u.noop,
widget: function () {
return this.element;
},
option: function (e, t) {
var n,
i,
r,
o = e;
if (0 === arguments.length) return u.widget.extend({}, this.options);
if ("string" == typeof e)
if (((o = {}), (e = (n = e.split(".")).shift()), n.length)) {
for (i = o[e] = u.widget.extend({}, this.options[e]), r = 0; r < n.length - 1; r++) (i[n[r]] = i[n[r]] || {}), (i = i[n[r]]);
if (((e = n.pop()), 1 === arguments.length)) return void 0 === i[e] ? null : i[e];
i[e] = t;
} else {
if (1 === arguments.length) return void 0 === this.options[e] ? null : this.options[e];
o[e] = t;
}
return this._setOptions(o), this;
},
_setOptions: function (e) {
var t;
for (t in e) this._setOption(t, e[t]);
return this;
},
_setOption: function (e, t) {
return "classes" === e && this._setOptionClasses(t), (this.options[e] = t), "disabled" === e && this._setOptionDisabled(t), this;
},
_setOptionClasses: function (e) {
var t, n, i;
for (t in e) (i = this.classesElementLookup[t]), e[t] !== this.options.classes[t] && i && i.length && ((n = u(i.get())), this._removeClass(i, t), n.addClass(this._classes({ element: n, keys: t, classes: e, add: !0 })));
},
_setOptionDisabled: function (e) {
this._toggleClass(this.widget(), this.widgetFullName + "-disabled", null, !!e), e && (this._removeClass(this.hoverable, null, "ui-state-hover"), this._removeClass(this.focusable, null, "ui-state-focus"));
},
enable: function () {
return this._setOptions({ disabled: !1 });
},
disable: function () {
return this._setOptions({ disabled: !0 });
},
_classes: function (r) {
var o = [],
s = this;
function e(e, t) {
var n, i;
for (i = 0; i < e.length; i++)
(n = s.classesElementLookup[e[i]] || u()),
(n = r.add
? (r.element.each(function (e, t) {
u
.map(s.classesElementLookup, function (e) {
return e;
})
.some(function (e) {
return e.is(t);
}) || s._on(u(t), { remove: "_untrackClassesElement" });
}),
u(u.uniqueSort(n.get().concat(r.element.get()))))
: u(n.not(r.element).get())),
(s.classesElementLookup[e[i]] = n),
o.push(e[i]),
t && r.classes[e[i]] && o.push(r.classes[e[i]]);
}
return (r = u.extend({ element: this.element, classes: this.options.classes || {} }, r)).keys && e(r.keys.match(/\S+/g) || [], !0), r.extra && e(r.extra.match(/\S+/g) || []), o.join(" ");
},
_untrackClassesElement: function (n) {
var i = this;
u.each(i.classesElementLookup, function (e, t) {
-1 !== u.inArray(n.target, t) && (i.classesElementLookup[e] = u(t.not(n.target).get()));
}),
this._off(u(n.target));
},
_removeClass: function (e, t, n) {
return this._toggleClass(e, t, n, !1);
},
_addClass: function (e, t, n) {
return this._toggleClass(e, t, n, !0);
},
_toggleClass: function (e, t, n, i) {
i = "boolean" == typeof i ? i : n;
var r = "string" == typeof e || null === e,
o = { extra: r ? t : n, keys: r ? e : t, element: r ? this.element : e, add: i };
return o.element.toggleClass(this._classes(o), i), this;
},
_on: function (s, a, e) {
var l,
c = this;
"boolean" != typeof s && ((e = a), (a = s), (s = !1)),
e ? ((a = l = u(a)), (this.bindings = this.bindings.add(a))) : ((e = a), (a = this.element), (l = this.widget())),
u.each(e, function (e, t) {
function n() {
if (s || (!0 !== c.options.disabled && !u(this).hasClass("ui-state-disabled"))) return ("string" == typeof t ? c[t] : t).apply(c, arguments);
}
"string" != typeof t && (n.guid = t.guid = t.guid || n.guid || u.guid++);
var i = e.match(/^([\w:-]*)\s*(.*)$/),
r = i[1] + c.eventNamespace,
o = i[2];
o ? l.on(r, o, n) : a.on(r, n);
});
},
_off: function (e, t) {
(t = (t || "").split(" ").join(this.eventNamespace + " ") + this.eventNamespace),
e.off(t),
(this.bindings = u(this.bindings.not(e).get())),
(this.focusable = u(this.focusable.not(e).get())),
(this.hoverable = u(this.hoverable.not(e).get()));
},
_delay: function (e, t) {
var n = this;
return setTimeout(function () {
return ("string" == typeof e ? n[e] : e).apply(n, arguments);
}, t || 0);
},
_hoverable: function (e) {
(this.hoverable = this.hoverable.add(e)),
this._on(e, {
mouseenter: function (e) {
this._addClass(u(e.currentTarget), null, "ui-state-hover");
},
mouseleave: function (e) {
this._removeClass(u(e.currentTarget), null, "ui-state-hover");
},
});
},
_focusable: function (e) {
(this.focusable = this.focusable.add(e)),
this._on(e, {
focusin: function (e) {
this._addClass(u(e.currentTarget), null, "ui-state-focus");
},
focusout: function (e) {
this._removeClass(u(e.currentTarget), null, "ui-state-focus");
},
});
},
_trigger: function (e, t, n) {
var i,
r,
o = this.options[e];
if (((n = n || {}), ((t = u.Event(t)).type = (e === this.widgetEventPrefix ? e : this.widgetEventPrefix + e).toLowerCase()), (t.target = this.element[0]), (r = t.originalEvent))) for (i in r) i in t || (t[i] = r[i]);
return this.element.trigger(t, n), !((u.isFunction(o) && !1 === o.apply(this.element[0], [t].concat(n))) || t.isDefaultPrevented());
},
}),
u.each({ show: "fadeIn", hide: "fadeOut" }, function (o, s) {
u.Widget.prototype["_" + o] = function (t, e, n) {
var i;
"string" == typeof e && (e = { effect: e });
var r = e ? (!0 === e || "number" == typeof e ? s : e.effect || s) : o;
"number" == typeof (e = e || {}) && (e = { duration: e }),
(i = !u.isEmptyObject(e)),
(e.complete = n),
e.delay && t.delay(e.delay),
i && u.effects && u.effects.effect[r]
? t[o](e)
: r !== o && t[r]
? t[r](e.duration, e.easing, n)
: t.queue(function (e) {
u(this)[o](), n && n.call(t[0]), e();
});
};
}),
u.widget
);
}),
(function (e) {
"use strict";
"function" == typeof define && define.amd ? define(["jquery", "jquery.ui.widget"], e) : e(window.jQuery);
})(function (p) {
"use strict";
(p.support.xhrFileUpload = !(!window.XMLHttpRequestUpload || !window.FileReader)),
(p.support.xhrFormDataFileUpload = !!window.FormData),
p.widget("blueimp.fileupload", {
options: {
namespace: void 0,
dropZone: p(document),
fileInput: void 0,
replaceFileInput: !0,
paramName: void 0,
singleFileUploads: !0,
limitMultiFileUploads: void 0,
sequentialUploads: !1,
limitConcurrentUploads: void 0,
forceIframeTransport: !1,
redirect: void 0,
redirectParamName: void 0,
postMessage: void 0,
multipart: !0,
maxChunkSize: void 0,
uploadedBytes: void 0,
recalculateProgress: !0,
progressInterval: 100,
bitrateInterval: 500,
autoSubmit: !0,
formData: function (e) {
return e.serializeArray();
},
add: function (e, t) {
t.autoSubmit && t.submit();
},
processData: !1,
contentType: !1,
cache: !1,
},
_refreshOptionsList: ["namespace", "dropZone", "fileInput", "multipart", "forceIframeTransport"],
_BitrateTimer: function () {
(this.timestamp = +new Date()),
(this.loaded = 0),
(this.bitrate = 0),
(this.getBitrate = function (e, t, n) {
var i = e - this.timestamp;
return (!this.bitrate || !n || n < i) && ((this.bitrate = (t - this.loaded) * (1e3 / i) * 8), (this.loaded = t), (this.timestamp = e)), this.bitrate;
});
},
_isXHRUpload: function (e) {
return !e.forceIframeTransport && ((!e.multipart && p.support.xhrFileUpload) || p.support.xhrFormDataFileUpload);
},
_getFormData: function (e) {
var n;
return "function" == typeof e.formData
? e.formData(e.form)
: p.isArray(e.formData)
? e.formData
: e.formData
? ((n = []),
p.each(e.formData, function (e, t) {
n.push({ name: e, value: t });
}),
n)
: [];
},
_getTotal: function (e) {
var n = 0;
return (
p.each(e, function (e, t) {
n += t.size || 1;
}),
n
);
},
_onProgress: function (e, t) {
if (e.lengthComputable) {
var n,
i,
r = +new Date();
if (t._time && t.progressInterval && r - t._time < t.progressInterval && e.loaded !== e.total) return;
(t._time = r),
(n = t.total || this._getTotal(t.files)),
(i = parseInt((e.loaded / e.total) * (t.chunkSize || n), 10) + (t.uploadedBytes || 0)),
(this._loaded += i - (t.loaded || t.uploadedBytes || 0)),
(t.lengthComputable = !0),
(t.loaded = i),
(t.total = n),
(t.bitrate = t._bitrateTimer.getBitrate(r, i, t.bitrateInterval)),
this._trigger("progress", e, t),
this._trigger("progressall", e, { lengthComputable: !0, loaded: this._loaded, total: this._total, bitrate: this._bitrateTimer.getBitrate(r, this._loaded, t.bitrateInterval) });
}
},
_initProgressListener: function (n) {
var i = this,
e = n.xhr ? n.xhr() : p.ajaxSettings.xhr();
e.upload &&
(p(e.upload).bind("progress", function (e) {
var t = e.originalEvent;
(e.lengthComputable = t.lengthComputable), (e.loaded = t.loaded), (e.total = t.total), i._onProgress(e, n);
}),
(n.xhr = function () {
return e;
}));
},
_initXHRData: function (n) {
var i,
e = n.files[0],
t = n.multipart || !p.support.xhrFileUpload,
r = n.paramName[0];
(t && !n.blob) ||
((n.headers = p.extend(n.headers, { "X-File-Name": e.name, "X-File-Type": e.type, "X-File-Size": e.size })),
n.blob ? t || ((n.contentType = "application/octet-stream"), (n.data = n.blob)) : ((n.contentType = e.type), (n.data = e))),
t &&
p.support.xhrFormDataFileUpload &&
(n.postMessage
? ((i = this._getFormData(n)),
n.blob
? i.push({ name: r, value: n.blob })
: p.each(n.files, function (e, t) {
i.push({ name: n.paramName[e] || r, value: t });
}))
: (n.formData instanceof FormData
? (i = n.formData)
: ((i = new FormData()),
p.each(this._getFormData(n), function (e, t) {
i.append(t.name, t.value);
})),
n.blob
? i.append(r, n.blob, e.name)
: p.each(n.files, function (e, t) {
(t instanceof Blob || "File" === t.constructor.name) && i.append(n.paramName[e] || r, t, t.name);
})),
(n.data = i)),
(n.blob = null);
},
_initIframeSettings: function (e) {
(e.dataType = "iframe " + (e.dataType || "")),
(e.formData = this._getFormData(e)),
e.redirect && p("<a></a>").prop("href", e.url).prop("host") !== location.host && e.formData.push({ name: e.redirectParamName || "redirect", value: e.redirect });
},
_initDataSettings: function (e) {
this._isXHRUpload(e)
? (this._chunkedUpload(e, !0) || (e.data || this._initXHRData(e), this._initProgressListener(e)), e.postMessage && (e.dataType = "postmessage " + (e.dataType || "")))
: this._initIframeSettings(e, "iframe");
},
_getParamName: function (e) {
var t = p(e.fileInput),
i = e.paramName;
return (
i
? p.isArray(i) || (i = [i])
: ((i = []),
t.each(function () {
for (var e = p(this), t = e.prop("name") || "files[]", n = (e.prop("files") || [1]).length; n; ) i.push(t), (n -= 1);
}),
i.length || (i = [t.prop("name") || "files[]"])),
i
);
},
_initFormSettings: function (e) {
(e.form && e.form.length) || (e.form = p(e.fileInput.prop("form"))),
(e.paramName = this._getParamName(e)),
e.url || (e.url = e.form.prop("action") || location.href),
(e.type = (e.type || e.form.prop("method") || "").toUpperCase()),
"POST" !== e.type && "PUT" !== e.type && (e.type = "POST");
},
_getAJAXSettings: function (e) {
var t = p.extend({}, this.options, e);
return this._initFormSettings(t), this._initDataSettings(t), t;
},
_enhancePromise: function (e) {
return (e.success = e.done), (e.error = e.fail), (e.complete = e.always), e;
},
_getXHRPromise: function (e, t, n) {
var i = p.Deferred(),
r = i.promise();
return (t = t || this.options.context || r), !0 === e ? i.resolveWith(t, n) : !1 === e && i.rejectWith(t, n), (r.abort = i.promise), this._enhancePromise(r);
},
_chunkedUpload: function (n, e) {
var i,
t,
r,
o,
s = this,
a = n.files[0],
l = a.size,
c = (n.uploadedBytes = n.uploadedBytes || 0),
u = n.maxChunkSize || l,
d = a.webkitSlice || a.mozSlice || a.slice;
return (
!(!(this._isXHRUpload(n) && d && (c || u < l)) || n.data) &&
(!!e ||
(l <= c
? ((a.error = "uploadedBytes"), this._getXHRPromise(!1, n.context, [null, "error", a.error]))
: ((t = Math.ceil((l - c) / u)),
((o = (i = function (t) {
return t
? i((t -= 1)).pipe(function () {
var e = p.extend({}, n);
return (
(e.blob = d.call(a, c + t * u, c + (t + 1) * u)),
(e.chunkSize = e.blob.size),
s._initXHRData(e),
s._initProgressListener(e),
(r = (p.ajax(e) || s._getXHRPromise(!1, e.context)).done(function () {
e.loaded || s._onProgress(p.Event("progress", { lengthComputable: !0, loaded: e.chunkSize, total: e.chunkSize }), e), (n.uploadedBytes = e.uploadedBytes += e.chunkSize);
}))
);
})
: s._getXHRPromise(!0, n.context);
})(t)).abort = function () {
return r.abort();
}),
this._enhancePromise(o))))
);
},
_beforeSend: function (e, t) {
0 === this._active && (this._trigger("start"), (this._bitrateTimer = new this._BitrateTimer())), (this._active += 1), (this._loaded += t.uploadedBytes || 0), (this._total += this._getTotal(t.files));
},
_onDone: function (e, t, n, i) {
this._isXHRUpload(i) || this._onProgress(p.Event("progress", { lengthComputable: !0, loaded: 1, total: 1 }), i), (i.result = e), (i.textStatus = t), (i.jqXHR = n), this._trigger("done", null, i);
},
_onFail: function (e, t, n, i) {
(i.jqXHR = e), (i.textStatus = t), (i.errorThrown = n), this._trigger("fail", null, i), i.recalculateProgress && ((this._loaded -= i.loaded || i.uploadedBytes || 0), (this._total -= i.total || this._getTotal(i.files)));
},
_onAlways: function (e, t, n, i) {
(this._active -= 1),
(i.textStatus = t),
n && n.always ? ((i.jqXHR = n), (i.result = e)) : ((i.jqXHR = e), (i.errorThrown = n)),
this._trigger("always", null, i),
0 === this._active && (this._trigger("stop"), (this._loaded = this._total = 0), (this._bitrateTimer = null));
},
_onSend: function (n, e) {
var i,
t,
r,
o = this,
s = o._getAJAXSettings(e),
a = function (e, t) {
return (
(o._sending += 1),
(s._bitrateTimer = new o._BitrateTimer()),
(i =
i ||
((!1 !== e && !1 !== o._trigger("send", n, s) && (o._chunkedUpload(s) || p.ajax(s))) || o._getXHRPromise(!1, s.context, t))
.done(function (e, t, n) {
o._onDone(e, t, n, s);
})
.fail(function (e, t, n) {
o._onFail(e, t, n, s);
})
.always(function (e, t, n) {
if (((o._sending -= 1), o._onAlways(e, t, n, s), s.limitConcurrentUploads && s.limitConcurrentUploads > o._sending))
for (var i = o._slots.shift(); i; ) {
if (!i.isRejected()) {
i.resolve();
break;
}
i = o._slots.shift();
}
}))
);
};
return (
this._beforeSend(n, s),
this.options.sequentialUploads || (this.options.limitConcurrentUploads && this.options.limitConcurrentUploads <= this._sending)
? (((r = 1 < this.options.limitConcurrentUploads ? ((t = p.Deferred()), this._slots.push(t), t.pipe(a)) : (this._sequence = this._sequence.pipe(a, a))).abort = function () {
var e = [void 0, "abort", "abort"];
return i ? i.abort() : (t && t.rejectWith(e), a(!1, e));
}),
this._enhancePromise(r))
: a()
);
},
_onAdd: function (i, r) {
var o,
e,
s,
t,
a = this,
l = !0,
c = p.extend({}, this.options, r),
n = c.limitMultiFileUploads,
u = this._getParamName(c);
if ((c.singleFileUploads || n) && this._isXHRUpload(c))
if (!c.singleFileUploads && n) for (s = [], o = [], t = 0; t < r.files.length; t += n) s.push(r.files.slice(t, t + n)), (e = u.slice(t, t + n)).length || (e = u), o.push(e);
else o = u;
else (s = [r.files]), (o = [u]);
return (
(r.originalFiles = r.files),
p.each(s || r.files, function (e, t) {
var n = p.extend({}, r);
return (
(n.files = s ? t : [t]),
(n.paramName = o[e]),
(n.submit = function () {
return (n.jqXHR = this.jqXHR = !1 !== a._trigger("submit", i, this) && a._onSend(i, this)), this.jqXHR;
}),
(n.autoSubmit = c.autoSubmit),
(l = a._trigger("add", i, n))
);
}),
l
);
},
_normalizeFile: function (e, t) {
void 0 === t.name && void 0 === t.size && ((t.name = t.fileName), (t.size = t.fileSize));
},
_replaceFileInput: function (n) {
var i = n.clone(!0);
p("<form></form>").append(i)[0].reset(),
n.after(i).detach(),
p.cleanData(n.unbind("remove")),
(this.options.fileInput = this.options.fileInput.map(function (e, t) {
return t === n[0] ? i[0] : t;
})),
n[0] === this.element[0] && (this.element = i);
},
_onChange: function (e) {
var t = e.data.fileupload,
n = { files: p.each(p.makeArray(e.target.files), t._normalizeFile), fileInput: p(e.target), form: p(e.target.form) };
if ((n.files.length || (n.files = [{ name: e.target.value.replace(/^.*\\/, "") }]), t.options.replaceFileInput && t._replaceFileInput(n.fileInput), !1 === t._trigger("change", e, n) || !1 === t._onAdd(e, n))) return !1;
},
_onPaste: function (e) {
var t = e.data.fileupload,
n = e.originalEvent.clipboardData,
i = (n && n.items) || [],
r = { files: [] };
if (
(p.each(i, function (e, t) {
var n = t.getAsFile && t.getAsFile();
n && r.files.push(n);
}),
!1 === t._trigger("paste", e, r) || !1 === t._onAdd(e, r))
)
return !1;
},
_onDrop: function (e) {
var t = e.data.fileupload,
n = (e.dataTransfer = e.originalEvent.dataTransfer),
i = { files: p.each(p.makeArray(n && n.files), t._normalizeFile) };
if (!1 === t._trigger("drop", e, i) || !1 === t._onAdd(e, i)) return !1;
e.preventDefault();
},
_onDragOver: function (e) {
var t = e.data.fileupload,
n = (e.dataTransfer = e.originalEvent.dataTransfer);
if (!1 === t._trigger("dragover", e)) return !1;
n && (n.dropEffect = n.effectAllowed = "copy"), e.preventDefault();
},
_initEventHandlers: function () {
var e = this.options.namespace;
this._isXHRUpload(this.options) &&
this.options.dropZone
.bind("dragover." + e, { fileupload: this }, this._onDragOver)
.bind("drop." + e, { fileupload: this }, this._onDrop)
.bind("paste." + e, { fileupload: this }, this._onPaste),
this.options.fileInput.bind("change." + e, { fileupload: this }, this._onChange);
},
_destroyEventHandlers: function () {
var e = this.options.namespace;
this.options.dropZone
.unbind("dragover." + e, this._onDragOver)
.unbind("drop." + e, this._onDrop)
.unbind("paste." + e, this._onPaste),
this.options.fileInput.unbind("change." + e, this._onChange);
},
_setOption: function (e, t) {
var n = -1 !== p.inArray(e, this._refreshOptionsList);
n && this._destroyEventHandlers(), p.Widget.prototype._setOption.call(this, e, t), n && (this._initSpecialOptions(), this._initEventHandlers());
},
_initSpecialOptions: function () {
var e = this.options;
void 0 === e.fileInput ? (e.fileInput = this.element.is("input:file") ? this.element : this.element.find("input:file")) : e.fileInput instanceof p || (e.fileInput = p(e.fileInput)),
e.dropZone instanceof p || (e.dropZone = p(e.dropZone));
},
_create: function () {
var e = this.options;
p.extend(e, p(this.element[0].cloneNode(!1)).data()),
(e.namespace = e.namespace || this.widgetName),
this._initSpecialOptions(),
(this._slots = []),
(this._sequence = this._getXHRPromise(!0)),
(this._sending = this._active = this._loaded = this._total = 0),
this._initEventHandlers();
},
destroy: function () {
this._destroyEventHandlers(), p.Widget.prototype.destroy.call(this);
},
enable: function () {
p.Widget.prototype.enable.call(this), this._initEventHandlers();
},
disable: function () {
this._destroyEventHandlers(), p.Widget.prototype.disable.call(this);
},
add: function (e) {
e && !this.options.disabled && ((e.files = p.each(p.makeArray(e.files), this._normalizeFile)), this._onAdd(null, e));
},
send: function (e) {
return e && !this.options.disabled && ((e.files = p.each(p.makeArray(e.files), this._normalizeFile)), e.files.length) ? this._onSend(null, e) : this._getXHRPromise(!1, e && e.context);
},
});
}),
(function (e) {
if ("function" == typeof define && define.amd) define(e);
else if ("object" == typeof exports) module.exports = e();
else {
var t = window.Cookies,
n = (window.Cookies = e());
n.noConflict = function () {
return (window.Cookies = t), n;
};
}
})(function () {
function h() {
for (var e = 0, t = {}; e < arguments.length; e++) {
var n,
i = arguments[e];
for (n in i) i.hasOwnProperty(n) && (t[n] = i[n]);
}
return t;
}
return (function e(d) {
function p(e, t, n) {
var i;
if (1 < arguments.length) {
if ("number" == typeof (n = h({ path: "/" }, p.defaults, n)).expires) {
var r = new Date();
r.setMilliseconds(r.getMilliseconds() + 864e5 * n.expires), (n.expires = r);
}
try {
(i = JSON.stringify(t)), /^[\{\[]/.test(i) && (t = i);
} catch (e) {}
return (
(t = d.write ? d.write(t, e) : encodeURIComponent(String(t)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g, decodeURIComponent)),
(e = (e = (e = encodeURIComponent(String(e))).replace(/%(23|24|26|2B|5E|60|7C)/g, decodeURIComponent)).replace(/[\(\)]/g, escape)),
(document.cookie = [e, "=", t, n.expires && "; expires=" + n.expires.toUTCString(), n.path && "; path=" + n.path, n.domain && "; domain=" + n.domain, n.secure ? "; secure" : ""].join(""))
);
}
e || (i = {});
for (var o = document.cookie ? document.cookie.split("; ") : [], s = /(%[0-9A-Z]{2})+/g, a = 0; a < o.length; a++) {
var l = o[a].split("="),
c = l[0].replace(s, decodeURIComponent),
u = l.slice(1).join("=");
'"' === u.charAt(0) && (u = u.slice(1, -1));
try {
if (((u = d.read ? d.read(u, c) : d(u, c) || u.replace(s, decodeURIComponent)), this.json))
try {
u = JSON.parse(u);
} catch (e) {}
if (e === c) {
i = u;
break;
}
e || (i[c] = u);
} catch (e) {}
}
return i;
}
return (
(p.get = p.set = p),
(p.getJSON = function () {
return p.apply({ json: !0 }, [].slice.call(arguments));
}),
(p.defaults = {}),
(p.remove = function (e, t) {
p(e, "", h(t, { expires: -1 }));
}),
(p.withConverter = e),
p
);
})(function () {});
}),
(function (window, document) {
var components = scriptElement.src.toLowerCase().split("/"),
protocol = components[0].substr(0, components[0].length - 1),
domain = components[2],
baseUrl = protocol + "://" + domain,
baseUrlInitial = baseUrl,
parentBody,
parentHead,
main = this,
widgets = {},
xs = {},
previousChatHandle = [],
browser = (xs.Browser = (function () {
function hasCSP() {
try {
return eval("false");
} catch (e) {
return !0;
}
}
function getChromeVersion() {
var e = navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);
return !!e && parseInt(e[2], 10);
}
function detectIEVersion() {
var e = window.navigator.userAgent,
t = e.indexOf("MSIE ");
if (0 < t) return parseInt(e.substring(t + 5, e.indexOf(".", t)), 10);
if (0 < e.indexOf("Trident/")) {
var n = e.indexOf("rv:");
return parseInt(e.substring(n + 3, e.indexOf(".", n)), 10);
}
var i = e.indexOf("Edge/");
return 0 < i && parseInt(e.substring(i + 5, e.indexOf(".", i)), 10);
}
function isIE() {
return /Trident\//.test(window.navigator.userAgent);
}
return { isChrome: "Google Inc." == navigator.vendor, isSafari: "Apple Computer, Inc." == navigator.vendor, isIE: isIE(), IEVersion: detectIEVersion(), hasCSP: hasCSP(), chromeVersion: getChromeVersion() };
})()),
crossDomainAjax = function (e, t, n, i, r) {
if ("XDomainRequest" in window && null !== window.XDomainRequest) {
var o = new XDomainRequest();
o.open(e, n),
(o.onload = function () {
var e = new ActiveXObject("Microsoft.XMLDOM"),
t = $.parseJSON(o.responseText);
(e.async = !1), (null != t && void 0 !== t) || (t = $.parseJSON(data.firstChild.textContent)), i(t);
}),
(o.onerror = function () {
(_result = !1), null != r && r();
}),
o.send(t);
} else {
if (-1 != navigator.userAgent.indexOf("MSIE") && parseInt(navigator.userAgent.match(/MSIE ([\d.]+)/)[1], 10) < 8) return !1;
$.ajax({
url: n,
dataType: "json",
type: e,
data: t,
success: i,
error: function () {
null != r && r();
},
});
}
},
clonePrototype = (xs.clonePrototype = (function () {
function t() {}
return function (e) {
return (t.prototype = e), new t();
};
})());
(xs.__ui_HTMLElement = (function () {
function e() {}
return (
(e.prototype.resizeToFitContents = function () {
var e = this.contents.outerWidth(),
t = this.contents.outerHeight();
$(this.contents).prop("tagName") && "button" == $(this.contents).prop("tagName").toLowerCase() && (e += 20), this.element.width(e), this.element.height(t), this.element.css({ maxWidth: "100%" });
}),
(e.prototype.applyAttributes = function (e) {
this.element.attr(e);
}),
(e.prototype.applyStyle = function (e) {
this.element.css(e);
}),
(e.prototype.getParentContainer = function () {
for (var e = this; null != e.container; ) e = e.container;
return e;
}),
(e.prototype.destroy = function () {
this.element.remove();
}),
e
);
})()),
(xs.__ui_WidgetContainer = (function () {
var e = xs.__ui_HTMLElement;
function o(e, t, n, i, r) {
if (!(this instanceof o)) return new o(e, t, n, i, r);
this.setup(e, t, n, i, r);
}
return (
((o.prototype = clonePrototype(e.prototype)).setup = function (e, t, n, i, r) {
i || (i = {}), n || (n = {}), (this.placement = r.placement);
var o = "inline" == this.placement.position ? "span" : "div";
i.tagName && ((o = i.tagName), (i.tagName = void 0)),
(this.element = $("<" + o + "/>")),
"inline" == this.placement.position && this.element.attr("id", "xsellco-widget-inline-container"),
this.element.attr(i),
this.applyAttributes(i),
"inline" != this.placement.position &&
((n = $.extend({ display: "inline-block", position: "absolute", left: "-5000px", top: "-5000px", zIndex: 999998, background: "none", padding: "0", margin: "0" }, n)),
this.element.css("-webkit-transform", "translateY(10%)").css("-webkit-transition", "-webkit-transform .2s ease-in-out"),
this.element.css("-moz-transform", "translateY(10%)").css("-moz-transition", "-moz-transform .2s ease-in-out"),
this.element.css("-ms-transform", "translateY(10%)").css("-ms-transition", "-ms-transform .2s ease-in-out")),
r.cursor && t.css("cursor", r.cursor),
this.applyStyle(n),
this.element.append(t),
(this.contents = t),
null != r.insertAfter ? $(r.insertAfter).after(this.element) : e.append(this.element),
"modal" == this.placement.position &&
((this.backdropElement = $('<div style="position:fixed;background:rgba(0,0,0,0.3);left:0;right:0;top:0;bottom:0;z-index:999990;display:none"></div>')), $(GLOBAL.document.body).append(this.backdropElement));
}),
(o.prototype.show = function () {
if ("inline" != this.placement.position) {
"modal" == this.placement.position && this.backdropElement.fadeIn(200);
var e = this.element;
e.fadeTo(0, 0),
this.updatePlacement(),
e.show(),
e.fadeTo(0.1, 0.1, function () {
e.height(e.height()),
e
.fadeTo(100, 1, function () {
$(e).find("iframe").get(0);
})
.css("-webkit-transform", "translateY(0)")
.css("-moz-transform", "translateY(0)")
.css("-ms-transform", "translateY(0)");
});
}
}),
(o.prototype.hide = function (e) {
"inline" != this.placement.position
? ("modal" == this.placement.position && this.backdropElement.fadeOut(200),
(element = this.element),
element
.css("-webkit-transform", "translateY(10%)")
.css("-moz-transform", "translateY(10%)")
.css("-ms-transform", "translateY(10%)")
.fadeOut(100, function () {
element.hide(), e && e();
}))
: e && e();
}),
(o.prototype.destroy = function (e) {
this.hide(function () {
this.element.remove(), null != e && e();
});
}),
(o.prototype.updatePlacement = function () {
var e = this.placement;
if ("inline" != e.position) {
var t = "",
n = "",
i = "",
r = "",
o = "",
s = "";
if (
(-1 != ["t", "tl", "tr"].indexOf(e.position) && (t = e.offsetY + "px"),
-1 != ["b", "bl", "br"].indexOf(e.position) && (n = e.offsetY + "px"),
-1 != ["tl", "bl", "l"].indexOf(e.position) && (i = e.offsetX + "px"),
-1 != ["tr", "br", "r"].indexOf(e.position) && (r = e.offsetX + "px"),
-1 != ["t", "b", "modal"].indexOf(e.position))
) {
i = "50%";
var a = this.element.outerWidth();
o = "-" + Math.round(a / 2 - e.offsetX);
}
if (-1 != ["l", "r", "modal"].indexOf(e.position)) {
t = "50%";
var l = this.element.outerHeight();
s = "-" + Math.round(l / 2 - e.offsetY);
}
if (("modal" == e.position && ((o = "-" + Math.round(a / 2)), (s = "-" + Math.round(l / 2))), browser.isIE && browser.IEVersion < 11)) {
var c = this.element.get(0);
"" != r ? c.style.setExpression("left", "document.body.scrollLeft+document.body.clientWidth-this.clientWidth+" + -1 * e.offsetX) : (c.style.left = i),
"" != n ? (c.style.setExpression("top", "document.body.scrollTop+document.body.clientHeight-this.clientHeight+" + -1 * e.offsetY), (c.style.marginLeft = o)) : ((c.style.top = t), (c.style.marginTop = s));
} else this.applyStyle({ position: "fixed", left: i, top: t, bottom: n, right: r, marginLeft: "" != o ? o + "px" : "", marginTop: "" != s ? s + "px" : "" });
}
}),
o
);
})()),
(xs.__ui_IFrame = (function () {
var h = xs.__ui_WidgetContainer,
e = xs.__ui_HTMLElement;
function o(e, t, n, i, r) {
if (!(this instanceof o)) return new o(e, t, n, i, r);
this.setup(e, t, n, i, r);
}
return (
((o.prototype = clonePrototype(e.prototype)).setup = function (e, t, n, i, r) {
this.element = $("<iframe/>");
var o = this.element.get(0);
(o.allowTransparency = "true"), (o.frameBorder = "0");
var s = !(browser.isChrome && 73 <= browser.chromeVersion),
a =
"<!DOCTYPE html><html><head><style>html,body{height:100%;width:100%} *{border:0;padding:0;margin:0;box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box}</style></head><body></body></html>";
browser.hasCSP
? (o.src = "about:blank")
: browser.isSafari || (browser.isChrome && browser.chromeVersion < 73)
? (o.src = "javascript:void(document.write('" + a + "'), document.close())")
: s && (o.src = "javascript:false"),
(this.parent = this.container = new h(e, this.element, null, null, r)),
this.applyStyle($.extend({ position: "relative", width: "100%", height: "100%", border: "0", margin: "0", padding: "0", background: "transparent" }, n));
var l = o.contentWindow.document;
(!browser.hasCSP && browser.isChrome) || (l.write(a), l.close());
var c = l.body;
(c.style.position = "relative"), (c.parentNode.style.overflow = c.style.overflow = "hidden"), $(c).append(t), (this.contents = t), r.cursor && t.css("cursor", r.cursor);
var u = this,
d = function () {
$(c).css({ padding: 0, background: "transparent" }),
u.resizeToFitContents(),
"inline" != r.placement.position && (u.parent.element.hide(), u.parent.hide(), u.parent.updatePlacement()),
!0 !== r.hidden && u.parent.show();
};
if (r.css) {
var p = $('<link rel="stylesheet" type="text/css" href="' + r.css + '"/>');
$(l.body).prepend(p), p.bind("load", d);
} else d();
}),
o
);
})());
var baseWidget = (xs.__widget_Base = (function () {
function e() {}
return (
(e.prototype.setActionCallback = function (e) {
this.actionCallback = e;
}),
(e.prototype.setBackActionCallback = function (e) {
this.backActionCallback = e;
}),
(e.prototype.fireCallback = function (e) {
if (null != e)
try {
e();
} catch (e) {}
}),
(e.prototype.linkfy = function (e, t) {
var n, g, y, v, b, w;
return ((n = "[a-z\\d.-]+://"),
(g = "mailto:"),
(y = new RegExp(
"(?:\\b[a-z\\d.-]+://[^<>\\s]+|\\b(?:(?:(?:[^\\s!@#$%^&*()_=+[\\]{}\\\\|;:'\",.<>/?]+)\\.)+(?:ac|ad|aero|ae|af|ag|ai|al|am|an|ao|aq|arpa|ar|asia|as|at|au|aw|ax|az|ba|bb|bd|be|bf|bg|bh|biz|bi|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|cat|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|coop|com|co|cr|cu|cv|cx|cy|cz|de|dj|dk|dm|do|dz|ec|edu|ee|eg|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gov|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|info|int|in|io|iq|ir|is|it|je|jm|jobs|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mil|mk|ml|mm|mn|mobi|mo|mp|mq|mr|ms|mt|museum|mu|mv|mw|mx|my|mz|name|na|nc|net|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|org|pa|pe|pf|pg|ph|pk|pl|pm|pn|pro|pr|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|st|su|sv|sy|sz|tc|td|tel|tf|tg|th|tj|tk|tl|tm|tn|to|tp|travel|tr|tt|tv|tw|tz|ua|ug|uk|um|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|xn--0zwm56d|xn--11b5bs3a9aj6g|xn--80akhbyknj4f|xn--9t4b11yi5a|xn--deba0ad|xn--g6w251d|xn--hgbk6aj7f53bba|xn--hlcj6aya9esc7a|xn--jxalpdlp|xn--kgbechtv|xn--zckzah|ye|yt|yu|za|zm|zw)|(?:(?:[0-9]|[1-9]\\d|1\\d{2}|2[0-4]\\d|25[0-5])\\.){3}(?:[0-9]|[1-9]\\d|1\\d{2}|2[0-4]\\d|25[0-5]))(?:[;/][^#?<>\\s]*)?(?:\\?[^#<>\\s]*)?(?:#[^<>\\s]*)?(?!\\w)|(?:mailto:)?[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:(?:(?:[^\\s!@#$%^&*()_=+[\\]{}\\\\|;:'\",.<>/?]+)\\.)+(?:ac|ad|aero|ae|af|ag|ai|al|am|an|ao|aq|arpa|ar|asia|as|at|au|aw|ax|az|ba|bb|bd|be|bf|bg|bh|biz|bi|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|cat|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|coop|com|co|cr|cu|cv|cx|cy|cz|de|dj|dk|dm|do|dz|ec|edu|ee|eg|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gov|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|info|int|in|io|iq|ir|is|it|je|jm|jobs|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mil|mk|ml|mm|mn|mobi|mo|mp|mq|mr|ms|mt|museum|mu|mv|mw|mx|my|mz|name|na|nc|net|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|org|pa|pe|pf|pg|ph|pk|pl|pm|pn|pro|pr|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|st|su|sv|sy|sz|tc|td|tel|tf|tg|th|tj|tk|tl|tm|tn|to|tp|travel|tr|tt|tv|tw|tz|ua|ug|uk|um|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|xn--0zwm56d|xn--11b5bs3a9aj6g|xn--80akhbyknj4f|xn--9t4b11yi5a|xn--deba0ad|xn--g6w251d|xn--hgbk6aj7f53bba|xn--hlcj6aya9esc7a|xn--jxalpdlp|xn--kgbechtv|xn--zckzah|ye|yt|yu|za|zm|zw)|(?:(?:[0-9]|[1-9]\\d|1\\d{2}|2[0-4]\\d|25[0-5])\\.){3}(?:[0-9]|[1-9]\\d|1\\d{2}|2[0-4]\\d|25[0-5]))(?:\\?[^#<>\\s]*)?(?:#[^<>\\s]*)?(?!\\w))",
"ig"
)),
(v = new RegExp("^" + n, "i")),
(b = { "'": "`", ">": "<", ")": "(", "]": "[", "}": "{", "»": "«", "›": "‹" }),
(w = {
callback: function (e, t) {
return t ? '<a href="' + t + '" title="' + t + '" target="_blank">' + e + "</a>" : e;
},
punct_regexp: /(?:[!?.,:;'"]|(?:&|&amp;)(?:lt|gt|quot|apos|raquo|laquo|rsaquo|lsaquo);)$/,
}),
function (e, t) {
t = t || {};
var n,
i,
r,
o,
s,
a,
l,
c,
u,
d,
p,
h,
f = "",
m = [];
for (i in w) void 0 === t[i] && (t[i] = w[i]);
for (; (n = y.exec(e)); )
if (((r = n[0]), (l = (a = y.lastIndex) - r.length), !/[\/:]/.test(e.charAt(l - 1)))) {
for (
;
(h = (c = r).substr(-1)),
(p = b[h]) && ((u = r.match(new RegExp("\\" + p + "(?!$)", "g"))), (d = r.match(new RegExp("\\" + h, "g"))), (u ? u.length : 0) < (d ? d.length : 0) && ((r = r.substr(0, r.length - 1)), a--)),
t.punct_regexp &&
(r = r.replace(t.punct_regexp, function (e) {
return (a -= e.length), "";
})),
r.length && r !== c;

);
(o = r),
v.test(o) || (o = (-1 !== o.indexOf("@") ? (o.indexOf(g) ? g : "") : o.indexOf("irc.") ? (o.indexOf("ftp.") ? "http://" : "ftp://") : "irc://") + o),
s != l && (m.push([e.slice(s, l)]), (s = a)),
m.push([r, o]);
}
for (m.push([e.substr(s)]), i = 0; i < m.length; i++) f += t.callback.apply(window, m[i]);
return f || e;
})(e, t);
}),
(e.prototype.show = function (e) {
this.isVisible()
? e && e()
: (null != this.container.parent && this.container.parent.updatePlacement(),
(this.visible = !0),
this.container.getParentContainer().show(e),
this.shouldResizeToFit() && this.container.resizeToFitContents(),
null != this.container.parent && this.container.parent.resizeToFitContents());
}),
(e.prototype.shouldResizeToFit = function () {
return !this.container.placement || "inline" != this.container.placement.position;
}),
(e.prototype.getCookiePrefix = function (e) {
return "__xsch" + e;
}),
(e.prototype.hide = function (e) {
this.isVisible() ? ((this.visible = !1), this.container.getParentContainer().hide(e)) : e && e();
}),
(e.prototype.isVisible = function () {
return !0 === this.visible;
}),
(e.prototype.destroy = wrapErrors(function (e) {
var t = this.container;
this.hide(function () {
for (; t.destroy(), null != (t = t.container); );
null != e && e();
});
})),
(e.prototype.fireEventsCallback = function (e) {
if (null != this.eventsCallback)
try {
this.eventsCallback(e);
} catch (e) {
console.log(e);
}
}),
(e.prototype.ERROR_WIDGET_DISABLED = 2),
(e.prototype.ERROR_NOT_ALLOWED_START_CHAT = 1),
e
);
})());
function getAgentConfigData() {
var e = this.config.agentId,
t = this.config.agentAvatar,
n = this.config.agentName,
i = (this.config.otherAgentsIds || "").trim();
return { dataAgentId: e, dataAgentAvatar: t, dataAgentName: n, dataOtherAgentIds: (i = i ? i.split(",") : []) };
}
function getIsNewEdeskThemeSelected() {
return !(!this.config || !this.config.theme_selected) && this.config.theme_selected === EDESK_DEFAULT_THEME;
}
function setDialogHeaderAgent(e, t, n, i, r, o) {
(this.config.agentId = e), (this.config.agentName = t), (this.config.agentAvatar = n), (this.config.otherAgentsIds = i.join()), r.html(n);
var s = t;
s && 0 < i.length && ((s += " + " + i.length + " other"), (s += 1 < i.length ? "s" : "")), o.text(s);
}
function getDialogHeaderAgentElements() {
var e = this.element.find(".chat-dialog-header"),
t = e.find(".avatars"),
n = e.find(".title");
return { dialogHeaderElement: e, avatarsElement: t, dialogHeaderTitleElement: n };
}
(xs.__widget_Button = (function () {
var i = xs.__widget_Base,
r = xs.__ui_IFrame;
function t(e) {
if (!(this instanceof t)) return new t(e);
this.setup(e);
}
return (
((t.prototype = clonePrototype(i.prototype)).setup = function (t) {
t || (t = {}), (this.element = $(t.contents));
var n = this;
this.element.bind("click", function (e) {
if ((e.stopPropagation(), e.preventDefault(), widgets[t.widgetId].proActive && widgets[t.widgetId].proActive.visible))
return (
n.element.find("#close").attr("class", "hidden"),
widgets[t.widgetId].proActive.hide(),
n.element.find("#startChat").attr("class", "animated"),
setTimeout(function () {
n.element.find("#startChat").attr("class", "");
}, 1e3),
void Cookies.set(new i().getCookiePrefix(t.widgetId) + "_reactive_chat_showed", !0, { expires: 1 })
);
widgets[t.widgetId][t.next].show(), n.hide();
});
var e = { params: t.params, css: t.css, hidden: t.hidden, placement: t.placement, cursor: "pointer" };
"inline" == t.placement.position && (e.insertAfter = t.insertAfter), (this.container = new r(parentBody, this.element, null, null, e)), (this.visible = 1 != t.hidden);
}),
t
);
})()),
(xs.__widget_ProActive = (function () {
var i = xs.__widget_Base,
r = xs.__ui_IFrame;
function t(e) {
if (!(this instanceof t)) return new t(e);
this.setup(e);
}
return (
((t.prototype = clonePrototype(i.prototype)).setup = function (t) {
t || (t = {}), (this.element = $(t.contents));
var n = this;
this.element.find(".js-start-conversation").bind("click", function (e) {
e.stopPropagation(),
e.preventDefault(),
n.hide(),
widgets[t.widgetId].initiator.element.find("#close").attr("class", "hidden"),
widgets[t.widgetId].initiator.element.find("#startChat").attr("class", ""),
widgets[t.widgetId].initiator.hide(),
Cookies.set(new i().getCookiePrefix(t.widgetId) + "_reactive_chat_showed", !0, { expires: 1 }),
widgets[t.widgetId][t.next].show();
});
var e = { params: t.params, css: t.css, hidden: t.hidden, placement: t.placement };
"inline" == t.placement.position && (e.insertAfter = t.insertAfter), (this.container = new r(parentBody, this.element, null, null, e)), (this.visible = 1 != t.hidden);
}),
t
);
})()),
(xs.__widget_HtmlSnippet = (function () {
var e = xs.__widget_Base,
i = xs.__ui_IFrame,
r = xs.__ui_WidgetContainer;
function t(e) {
if (!(this instanceof t)) return new t(e);
this.setup(e);
}
return (
((t.prototype = clonePrototype(e.prototype)).setup = function (t) {
t || (t = {}), (this.element = $(t.contents));
var n = this;
this.element.bind("click", function (e) {
e.stopPropagation(), e.preventDefault(), widgets[t.widgetId][t.next].show(), n.hide();
}),
"inline" == t.placement.position
? (this.container = new r(parentBody, this.element, null, null, { params: t.params, css: t.css, hidden: t.hidden, placement: t.placement, cursor: "pointer", insertAfter: t.insertAfter }))
: (this.container = new i(parentBody, this.element, null, null, { params: t.params, css: t.css, hidden: t.hidden, placement: t.placement, cursor: "pointer" })),
(this.visible = 1 != t.hidden);
}),
t
);
})()),
(xs.__widget_JSTrigger = (function () {
var e = xs.__widget_Base,
t = xs.__ui_WidgetContainer;
function n(e) {
if (!(this instanceof n)) return new n(e);
this.setup(e);
}
return (
((n.prototype = clonePrototype(e.prototype)).setup = function (e) {
(this.element = $('<input type="hidden"/>')), (this.container = new t(parentBody, this.element, null, null, { placement: { position: "inline" } }));
}),
n
);
})()),
(xs.__widget_Knowledgebase = (function () {
var e = xs.__widget_Base,
t = xs.__ui_IFrame,
n = xs.__ui_WidgetContainer;
function i(e) {
if (!(this instanceof i)) return new i(e);
this.setup(e);
}
return (
((i.prototype = clonePrototype(e.prototype)).setFormStyle = function (e) {
this.container instanceof xs.__ui_IFrame && (this.container.resizeToFitContents(), this.container.parent.resizeToFitContents(), this.container.parent.updatePlacement());
}),
(i.prototype.setup = function (e) {
return (
e || (e = {}),
(this.config = e),
(this.element = $(e.contents)),
"inline" == e.placement.position
? (this.container = new n(parentBody, this.element, null, null, { params: e.params, css: e.css, placement: e.placement, insertAfter: e.insertAfter }))
: (this.container = new t(parentBody, this.element, null, null, { params: e.params, css: e.css, hidden: e.hidden, placement: e.placement })),
(this.visible = 1 != e.hidden),
this.setupForm(),
i
);
}),
(i.prototype.setupForm = function () {
var n = this;
(this.headerElement = this.element.find(".panel-heading > h3")),
this.element.find(".js-close").bind("click", function (e) {
e.stopPropagation(), e.preventDefault();
var t = n.config;
widgets[t.widgetId][t.previous].show(), n.hide();
}),
this.element.find(".js-open-chat").bind("click", function (e) {
e.stopPropagation(), e.preventDefault();
var t = widgets[n.config.widgetId][n.config.next];
t.show(), n.hide(), t.element.find("form").first().trigger("submit");
}),
this.element.find("#kb-search-input").keypress(function (e) {
13 == e.keyCode && n.apiCall(n.element.find("#kb-search-input").val());
});
}),
(i.prototype.parentHide = i.prototype.hide),
(i.prototype.hide = function (e) {
this.fireEventsCallback({ event: "hide" }), this.parentHide();
}),
(i.prototype.apiCall = function (e) {
var t = this;
this.element.find(".js-loading").show(), this.container.resizeToFitContents(), this.container.parent.resizeToFitContents();
var n = widgets[this.config.widgetId][this.config.next],
i = { widget_id: this.config.widgetId, message: e, locale: getFirstBrowserLanguage() },
r = JSON.stringify(i);
(url = baseUrl + "/knowledgebase/search/" + this.config.widgetId),
crossDomainAjax(
"post",
r,
url,
function (e) {
!0 === e.skip ? (t.hide(), n.show(), n.element.find("form").first().trigger("submit")) : t.updateUI(e, e.ok);
},
function () {
t.hide(), n.show(), n.element.find("form").first().trigger("submit");
}
);
}),
(i.prototype.init = function (e, t) {
var n = widgets[this.config.widgetId][this.config.next],
i = {};
e.serializeArray().map(function (e) {
i[e.name] = e.value;
}),
n.setFormValues(i),
this.show(),
this.element.find("#kb-search-input").val(t),
this.apiCall(t);
}),
(i.prototype.parentShow = i.prototype.show),
(i.prototype.show = function (e) {
this.parentShow();
}),
(i.prototype.updateUI = wrapErrors(function (e, t) {
this.element.find(".js-loading").hide();
var n = "";
t
? ((articles = jQuery.parseJSON(e.articles)),
articles.forEach(function (e) {
(n += '<a href="' + e.link + '" target="_blank" class="kb-result">'),
(n += '<i class="fa fa-file-text-o"></i>'),
(n += "<div>"),
(n += "<b>" + e.title + "</b>"),
(n += "<p>" + e.content + "</p>"),
(n += "</div>"),
(n += "</a>");
}))
: (n += '<br/><div style="text-align: center;">' + e.errorMessage + "</div>"),
this.element.find("#kb-results").html(n),
this.container.resizeToFitContents(),
this.container.parent.resizeToFitContents();
})),
i
);
})()),
(xs.__widget_Minimize = (function () {
var e = xs.__widget_Base,
r = xs.__ui_IFrame;
function t(e) {
if (!(this instanceof t)) return new t(e);
this.setup(e);
}
return (
((t.prototype = clonePrototype(e.prototype)).setup = function (n) {
n || (n = {}), (this.element = $(n.contents)), (this.config = n);
var e = Cookies.get(this.getCookiePrefix(n.widgetId) + "_min");
e && "true" == e && this.notifyNewMessage();
var i = this;
this.element.bind("click", function (e) {
e.stopPropagation(), e.preventDefault();
var t = widgets[n.widgetId][n.next];
i.element.removeClass("blink"), Cookies.set(i.getCookiePrefix(n.widgetId) + "_min", !1, { expires: 1 }), i.element.removeClass("new-messages"), i.hide(), t.show();
}),
this.element.find(".js-close").bind("click", function (e) {
e.stopPropagation(), e.preventDefault();
var t = widgets[n.widgetId][n.next];
i.hide(), t.show(), t.close();
});
var t = { params: n.params, css: n.css, hidden: n.hidden, placement: n.placement, cursor: "pointer" };
"inline" == n.placement.position && (t.insertAfter = n.insertAfter), (this.container = new r(parentBody, this.element, null, null, t)), (this.visible = 1 != n.hidden);
}),
(t.prototype.parentShow = t.prototype.show),
(t.prototype.show = function () {
this.parentShow(), Cookies.set(this.getCookiePrefix(this.config.widgetId) + "_min", !0, { expires: 1 });
}),
(t.prototype.notifyNewMessage = function () {
this.element.addClass("animate-new-message");
var e = this;
setTimeout(function () {
e.element.removeClass("animate-new-message"), e.element.addClass("new-messages");
}, 1e3);
}),
t
);
})()),
(xs.__widget_Chat = (function () {
var n = xs.__ui_IFrame,
i = xs.__ui_WidgetContainer;
function r(e) {
if (!(this instanceof r)) return new r(e);
this.setup(e);
}
return (
((r.prototype = clonePrototype(baseWidget.prototype)).setFormStyle = function (e) {
this.container instanceof xs.__ui_IFrame && (this.container.resizeToFitContents(), this.container.parent.resizeToFitContents(), this.container.parent.updatePlacement());
}),
(r.prototype.setup = function (e) {
var t = this;
return (
e || (e = {}),
(this.config = e),
(this.sendingMessage = !1),
(this.element = $(e.contents)),
(this.messageHasAttachments = !1),
"inline" == e.placement.position
? (this.container = new i(parentBody, this.element, null, null, { params: e.params, css: e.css, placement: e.placement, insertAfter: e.insertAfter }))
: (this.container = new n(parentBody, this.element, null, null, { params: e.params, css: e.css, hidden: e.hidden, placement: e.placement })),
(this.visible = 1 != e.hidden),
this.setupForm(),
this.setupAttachment(),
this.initWebsocket(),
void 0 === previousChatHandle[e.widgetId] && (previousChatHandle[e.widgetId] = Cookies.get(t.getCookiePrefix(t.config.widgetId))),
this.chatTimer && clearInterval(this.chatTimer),
(this.chatTimer = setInterval(function () {
void 0 !== previousChatHandle[t.config.widgetId] &&
previousChatHandle[t.config.widgetId] != Cookies.get(t.getCookiePrefix(t.config.widgetId)) &&
((previousChatHandle[t.config.widgetId] = Cookies.get(t.getCookiePrefix(t.config.widgetId))), main.reloadWidget(t.config.widgetId));
}, 1e3)),
this.initScrolling(),
$(this.container.element).css({ "box-shadow": "-20px -10px 70px 0px #00000050", "border-radius": "8px" }),
r
);
}),
(r.prototype.initScrolling = function () {
var t = this,
n = this.element.find(".js-messages"),
i = this.element.find("#new_message_notification");
(this.scrollEnd = !0),
n.scroll(function (e) {
$(window).scrollTop() + $("").height() == $(document).height() && ($(this).scrollTop() + $(this).innerHeight() >= $(this)[0].scrollHeight ? ((t.scrollEnd = !0), i.hide()) : (t.scrollEnd = !1));
}),
this.element.find("#new_message_notification a").click(function (e) {
e.preventDefault(), n.scrollTo("max", 0, 500), i.hide();
});
}),
(r.prototype.getProgressDivWithFileId = function (e) {
var t = this.attachmentsArea.find('li[data-file-id="' + e + '"]');
if (t.size()) return t;
var n = this.attachmentsArea.find("li.hidden"),
i = n.clone(!0);
return n.after(i), i.removeClass("hidden"), i.attr("data-file-id", e), i;
}),
(r.prototype.setupAttachment = function () {
var i = this,
e = getIsNewEdeskThemeSelected.call(i);
(this.fileUploadElement = e ? this.element.find("form.js-attachment-form") : this.element.find("span.js-attach")),
(this.attachments = this.element.find(".reply-attachments")),
(this.attachmentsArea = this.element.find(".reply-attachments ul.unstyled")),
(this.filePreviewArea = this.element.find(".file-preview")),
this.element.find("form.js-attachment-form").attr("action", baseUrl + "/chat-add-attachment/" + this.config.widgetId),
this.element.find('form input[name="handle"]').val(this.config.handle),
this.element.find(".js-remove").click(function () {
i.removeAttachmentMessage(this, $(this).data("id"));
}),
0 < ((e = getIsNewEdeskThemeSelected.call(this)) ? this.filePreviewArea.children() : this.element.find(".js-remove").filter(":not(.hidden)")).length && this.element.find(".js-send").removeAttr("disabled"),
this.updateAttachmentBadgeCount(),
(this.filesCount = 0);
var t = this.element.find("#chat-dialog-reply");
e &&
this.element.closest(".chat-dialog").on("dragover", function (e) {
var t = i.element.find(".dropzone-overlay"),
n = window.dropZoneTimeout;
n ? clearTimeout(n) : t.removeClass("hidden"),
(window.dropZoneTimeout = setTimeout(function () {
(window.dropZoneTimeout = null), t.addClass("hidden");
}, 100));
});
var n = { singleFileUploads: !0, sequentialUploads: !0, limitMultiFileUploads: 3, limitConcurrentUploads: 1, dataType: "json", dropZone: e ? t : $("body"), crossDomain: !0 };
this.fileUploadElement
.fileupload(n, { xhrFields: { withCredentials: !1 } })
.bind("fileuploadadd", function (e, t) {
i.uploadAdd(t);
})
.bind("fileuploadprogress", function (e, t) {
i.uploadInProgress(t);
})
.bind("fileuploaddone", function (e, t) {
if (getIsNewEdeskThemeSelected.call(i)) return i.uploadDoneNewTheme(t);
i.uploadDone(t);
})
.bind("fileuploadfail", function (e, t) {
i.uploadFail(t);
})
.bind("fileuploadsubmit", function (e, t) {
return i.uploadSubmit(t);
});
}),
(r.prototype.uploadSubmit = function (e) {
return !getIsNewEdeskThemeSelected.call(this) || !(4 < this.filePreviewArea.children().length + e.originalFiles.length) || (this.showReplyAttachmentsAlert(!0), !1);
}),
(r.prototype.uploadAdd = function (e) {
getIsNewEdeskThemeSelected.call(this) ||
(this.attachments && this.attachments.removeClass("hidden"),
this.attachmentsArea.removeClass("hidden"),
(e.fileId = this.filesCount++),
(e.fileName = e.files[0].fileName ? e.files[0].fileName : e.files[0].name),
this.getProgressDivWithFileId(e.fileId).children("span").text(e.fileName),
this.container.resizeToFitContents(),
this.container.parent.resizeToFitContents(),
this.container.parent.updatePlacement());
}),
(r.prototype.uploadInProgress = function (e) {
if (!getIsNewEdeskThemeSelected.call(this)) {
var t = this.getProgressDivWithFileId(e.fileId),
n = parseInt((e.loaded / e.total) * 100, 10);
t.find(".bar").width(n + "%");
}
}),
(r.prototype.uploadDoneNewTheme = function (e) {
var t = this;
if (1 != e.result.ok) return !1;
var n = e.files[0],
i = this.element.find("template.tmpl_img-preview").html(),
r = this.element.find("template.tmpl_other-preview").html();
if (n.type.includes("image")) {
var o = URL.createObjectURL(n),
s = $(i);
s.find("img").attr("src", o),
s
.find(".js-remove")
.attr("data-id", e.result.tempAttachmentId)
.click(function () {
t.removeAttachmentMessage(this, $(this).data("id"));
}),
this.filePreviewArea.append(s);
} else {
var a = $(r);
a.find(".name").text(n.name),
a
.find(".js-remove")
.attr("data-id", e.result.tempAttachmentId)
.click(function () {
t.removeAttachmentMessage(this, $(this).data("id"));
}),
this.filePreviewArea.append(a);
}
return (this.messageHasAttachments = !0), this.element.find(".js-send").removeAttr("disabled"), this.updateAttachmentBadgeCount(), !0;
}),
(r.prototype.uploadDone = function (e) {
if (((t = this.getProgressDivWithFileId(e.fileId)).find(".progress").hide(), 1 == e.result.ok))
return (this.messageHasAttachments = !0), this.element.find(".js-send").removeAttr("disabled"), t.find(".js-remove").attr("data-id", e.result.tempAttachmentId).show().removeClass("hidden"), !0;
var t,
n = "Error uploading " + e.fileName;
return (
void 0 !== e.result.errorCode && 1 == e.result.errorCode && (n = "Invalid file extension " + e.fileName),
(t = this.getProgressDivWithFileId(e.fileId)).find(".js-remove").hide(),
t.find(".progress").hide(),
t.children("span").addClass("text-error").text(n),
!1
);
}),
(r.prototype.uploadFail = function (e) {
if (!getIsNewEdeskThemeSelected.call(this)) {
var t = this.getProgressDivWithFileId(e.fileId);
t.find(".progress").hide(),
t
.children("span")
.addClass("text-error")
.text("Error uploading " + e.fileName);
}
}),
(r.prototype.updateAttachmentBadgeCount = wrapErrors(function () {
var e = this.element.find(".js-remove").filter(":not(.hidden)");
!e || e.length < 1
? (this.element.find(".attach-file-badge").addClass("hidden").html(), this.element.find("#attach-file-icon").removeClass("active"), (this.messageHasAttachments = !1))
: (this.element.find(".attach-file-badge").removeClass("hidden").html(e.length), this.element.find("#attach-file-icon").addClass("active"), (this.messageHasAttachments = !0));
})),
(r.prototype.removeAttachmentMessage = wrapErrors(function (e, t) {
getIsNewEdeskThemeSelected.call(this) ? $(e).closest("div").remove() : $(e).closest("li").remove(),
0 == this.element.find(".js-remove").filter(":not(.hidden)").length &&
(this.attachments && !this.attachments.hasClass("hidden") && this.attachments.addClass("hidden"), this.element.find(".js-send").attr("disabled", "disabled"), (this.messageHasAttachments = !1)),
this.updateAttachmentBadgeCount(),
this.resizeToFitContent();
var n = "handle=" + encodeURIComponent(this.config.handle) + "&attachmentId=" + +encodeURIComponent(t);
(url = baseUrl + "/chat-remove-attachment-message/" + this.config.widgetId),
crossDomainAjax(
"post",
n,
url,
function (e) {
e.ok;
},
function () {
alert("Attachment not removed");
}
);
})),
(r.prototype.close = function () {
var t = this,
n = this.config;
t.formConfirm(this.getCloseContent(), function () {
if (n.chatRatingEnabled) {
var e = widgets[n.widgetId][n.next];
(e.config.previousHandle = n.handle),
(e.config.agentId = n.agentId),
(e.config.agentName = n.agentName),
(e.config.agentAvatar = n.agentAvatar),
(e.config.otherAgentsIds = n.otherAgentsIds),
t.closeChat(),
e.show();
} else "closed" == t.details.status && t.closeChat();
t.hide();
});
}),
(r.prototype.getCloseContent = function () {
if (!getIsNewEdeskThemeSelected.call(this)) return translations.promptClose;
var e = this.element.find(".close-content.hide");
if (e.length) {
var t = getAgentConfigData.call(this).dataAgentAvatar,
n = e.clone(!0),
i = this.element.find(".js-messages"),
r = i.data("confirmation-close-header").replace("{{agentName}}", this.getShortAgentName(null));
return n.find(".close-agent-avatar").html(t), n.find(".close-header").html(r), n.find(".close-text").html(i.data("confirmation-close-text")), n.removeClass("hide"), n;
}
return translations.promptClose;
}),
(r.prototype.formConfirm = function (e, t, n) {
var i = this,
r = this.element.find(".dialog"),
o = r.find("#dialog-content"),
s = this.element.find(".panel-heading");
o.html(e),
i.showFormConfirm(r, s),
r.find("button.js-btn-close").on("click", function () {
i.hideFormConfirm(r, s), "function" == typeof t && t();
}),
r.find("button.js-btn-cancel").on("click", function () {
i.hideFormConfirm(r, s), "function" == typeof n && n();
});
}),
(r.prototype.showFormConfirm = function (e, t) {
this.hideChatContent(), e.removeClass("hide"), t.css("visibility", "hidden");
}),
(r.prototype.hideFormConfirm = function (e, t) {
e.addClass("hide"), this.showChatContent(), t.css("visibility", "visible");
}),
(r.prototype.hideChatContent = function () {
getIsNewEdeskThemeSelected.call(this) && (this.element.find(".js-messages").addClass("hide"), this.element.find(".js-compose").addClass("hide"));
}),
(r.prototype.showChatContent = function () {
getIsNewEdeskThemeSelected.call(this) && (this.element.find(".js-messages").removeClass("hide"), this.element.find(".js-compose").removeClass("hide"));
}),
(r.prototype.setupForm = function () {
var n = this;
(this.headerElement = this.element.find(".panel-heading > h3")),
this.element.find(".js-close").bind("click", function (e) {
e.stopPropagation(), e.preventDefault(), n.close();
}),
this.element.find(".js-minimize").bind("click", function (e) {
e.stopPropagation(), e.preventDefault();
var t = widgets[n.config.widgetId][n.config.minimize];
n.parentHide(), t.show();
}),
this.element.find("#close-reply-attachments-alert").bind("click", function (e) {
e.stopPropagation(), e.preventDefault(), n.showReplyAttachmentsAlert(!1);
});
}),
(r.prototype.showReplyAttachmentsAlert = wrapErrors(function (e) {
e ? (this.attachments.removeClass("hidden"), this.element.find(".reply-attachments-alert").removeClass("hidden")) : this.element.find(".reply-attachments-alert").addClass("hidden");
})),
(r.prototype.parentHide = r.prototype.hide),
(r.prototype.hide = function (t) {
var n = this,
i = this.isVisible();
this.chatTimer && clearInterval(this.chatTimer),
this.parentHide(function () {
if (i) {
for (var e in (delete this.socket,
Cookies.remove(n.getCookiePrefix(n.config.widgetId)),
(previousChatHandle[n.config.widgetId] = Cookies.get(n.getCookiePrefix(n.config.widgetId))),
(n.messages = []),
n.messageElements))
n.messageElements.hasOwnProperty(e) && n.messageElements[e].remove();
(n.messageElements = {}), $(".js-loading").show(), null != n.socket && (n.socket.disconnect(), delete n.socket), (this.visible = !1), n.config.chatRatingEnabled || main.reloadWidget(n.config.widgetId);
}
t && t();
});
}),
(r.prototype.parentShow = r.prototype.show),
(r.prototype.show = function () {
this.parentShow(), this.initWebsocket();
}),
(r.prototype.initWebsocket = wrapErrors(function () {
if (
null != this.config.handle &&
(Cookies.set(this.getCookiePrefix(this.config.widgetId) + "", this.config.handle, { expires: 1 }),
(previousChatHandle[this.config.widgetId] = Cookies.get(this.getCookiePrefix(this.config.widgetId))),
null == this.socket)
) {
(this.messages = []), (this.messageElements = {});
var n = this,
e = this.config.url + "?handle=" + encodeURIComponent(this.config.handle) + "&widgetId=" + encodeURIComponent(this.config.widgetId);
(this.socket = io(e)),
this.socket
.on("error", function (e) {
switch (parseInt(e)) {
case 1:
console.log("Out of time");
break;
default:
console.log(e);
}
n.socket.disconnect();
})
.on("messages", function (e) {
var t;
for (t in e) e.hasOwnProperty(t) && n.storeMessage(e[t]);
n.initUI(), getIsNewEdeskThemeSelected.call(n) ? n.updateUINewTheme(!0, "messages") : n.updateUI(!0, "messages"), n.updateInfo();
})
.on("message", function (e) {
"agent" != e.source || n.isVisible() || widgets[n.config.widgetId][n.config.minimize].notifyNewMessage();
n.storeMessage(e), getIsNewEdeskThemeSelected.call(n) ? n.updateUINewTheme(!1, "message") : n.updateUI(!1, "message");
})
.on("details", function (e) {
n.updateDetails(e);
})
.on("agentTyping", function (e) {
n.updateTypingAgent(e);
}),
this.fireEventsCallback({ event: "show" });
}
})),
(r.prototype.resizeToFitContent = function () {
this.container.resizeToFitContents(), this.container.parent.resizeToFitContents(), this.container.parent.updatePlacement();
}),
(r.prototype.updateTypingAgent = wrapErrors(function (e) {
var t = e.agent_typing,
n = e.agent_name,
i = this.element.find("#agent_typing");
i.hide().removeClass("hidden");
var r = this.element.find("#agent_typing_text");
!0 === t ? (r.text(n), i.show()) : (r.text(""), i.hide()), $("body").stop().scrollTo("max", 200);
})),
(r.prototype.showNewMessageNotificationText = wrapErrors(function () {
this.element.find("#new_message_notification").show();
})),
(r.prototype.updateNotificationNewMessage = wrapErrors(function () {
this.element.find("#new_message").show();
})),
(r.prototype.updateDetails = wrapErrors(function (e) {
if ("closed" == (this.details = e).status) {
this.element.find(".js-compose").hide(), this.element.find(".js-closed").removeClass("hide");
this.resizeToFitContent(), this.headerElement.text(translations.closed);
e.agents;
}
})),
(r.prototype.closeChat = wrapErrors(function () {
this.socket.emit("end"), this.socket.disconnect();
})),
(r.prototype.storeMessage = wrapErrors(function (e) {
var t,
n = -1;
if ("message" == e.type || "joined" == e.type || "attachment" == e.type) {
for (t in this.messages)
if (this.messages.hasOwnProperty(t) && this.messages[t].id == e.id) {
n = t;
break;
}
-1 == n ? this.messages.push(e) : (this.messages[n] = e), this.sortMessages();
}
})),
(r.prototype.sortMessages = wrapErrors(function () {
this.messages.sort(function (e, t) {
return e.timestamp < t.timestamp ? -1 : e.timestamp > t.timestamp ? 1 : 0;
});
})),
(r.prototype.sendMessage = wrapErrors(function () {
if (!this.sendingMessage) {
this.sendingMessage = !0;
var e = this.element.find("input.input-message,textarea.input-message"),
t = e.val();
return e.css("height", "auto"), this.messageHasAttachments ? this.sendAttachmentMessage(t, e) : this.sendSimpleMessage(t, e);
}
})),
(r.prototype.sendAttachmentMessage = wrapErrors(function (e, t) {
var n = this,
i = "message=" + encodeURIComponent(e) + "&handle=" + encodeURIComponent(n.config.handle);
(url = baseUrl + "/chat-new-attachment-message/" + this.config.widgetId),
crossDomainAjax(
"post",
i,
url,
function (e) {
1 == e.ok && n.attachmentSuccessfullySent(t, e);
},
function () {
alert("Attachment not send"), (this.sendingMessage = !1);
}
);
})),
(r.prototype.attachmentSuccessfullySent = wrapErrors(function (e, t) {
(this.messageHasAttachments = !1),
e.val("").trigger("change"),
this.attachmentsArea.find("li[data-file-id]").remove(),
getIsNewEdeskThemeSelected.call(this) && this.filePreviewArea.children().remove(),
this.resizeToFitContent();
var n = { chatHandle: this.config.handle, widgetId: this.config.widgetId, messageId: t.message.id };
this.socket.emit("attachmentMessage", n),
this.attachments && !this.attachments.hasClass("hidden") && this.attachments.addClass("hidden"),
(this.sendingMessage = !1),
this.resizeToFitContent(),
this.updateAttachmentBadgeCount();
})),
(r.prototype.sendSimpleMessage = wrapErrors(function (e, t) {
return this.socket.emit("reply", { text: e }), t.val("").trigger("change"), (this.sendingMessage = !1), 1;
})),
(r.prototype.updateTyping = wrapErrors(function () {
void 0 === this.typingTimer ? this.updateTypingSchedule() : (this.typingTimerRestart = !0);
})),
(r.prototype.updateTypingSchedule = wrapErrors(function () {
var t = this;
this.typingTimer = setTimeout(function () {
delete t.typingTimer;
var e = t.element.find(".input-message").val();
t.updateTypingPreviousValue != e && (t.socket.emit("typing", e), (t.updateTypingPreviousValue = e)), !0 === t.typingTimerRestart && (delete t.typingTimerRestart, t.updateTypingSchedule());
}, 500);
})),
(r.prototype.updateInfo = wrapErrors(function () {
var e = GLOBAL.document.location.toString(),
t = -60 * new Date(2015, 1, 1).getTimezoneOffset(),
n = -60 * new Date(2015, 6, 1).getTimezoneOffset(),
i = new Date().getTimezoneOffset();
this.socket.emit("info", { url: e, agent: navigator.userAgent, offsetWinter: t, offsetSummer: n, currentOffset: i, locale: getFirstBrowserLanguage(), ip: this.config.ip });
})),
(r.prototype.initUI = wrapErrors(function () {
var t = this,
n = this.element.find("input,textarea"),
i = this.element.find(".js-send"),
r = this.element.find(".input-message");
n.removeAttr("disabled"),
n.bind("change paste keyup", function (e) {
0 != n.val().trim().length || t.messageHasAttachments ? (i.removeAttr("disabled"), 13 == e.keyCode && (e.preventDefault(), e.stopPropagation(), t.sendMessage())) : (i.attr("disabled", "disabled"), r.val("")),
t.updateTyping();
}),
$(this.element.find("textarea.input-message")).bind("input propertychange", function () {
var e = $(this);
e.css("height", "auto"), e.css("height", e.prop("scrollHeight"));
});
var e = this.element.find("textarea.input-message");
if (e) {
e.on(
"change",
function () {
(this.style.height = "auto"), (this.style.height = this.scrollHeight + "px");
},
!1
);
}
i.bind("click", function (e) {
e.stopPropagation(), e.preventDefault(), "disabled" != i.attr("disabled") && t.sendMessage();
});
})),
(r.prototype.introductionMessage = wrapErrors(function () {
var e = this.element.find(".chat-item.hidden"),
t = this.element.find(".js-messages");
if (null == (n = this.messageElements[0]) && 0 < this.messages.length) {
var n,
i = t.data("text-introduction");
(n = e.clone().toggleClass("hidden")).addClass("first"), this.createStatusMessage(n, t, i, 0);
}
})),
(r.prototype.introductionMessageNewTheme = wrapErrors(function () {
var e = this.element.find(".chat-item.hidden"),
t = this.element.find(".js-messages");
if (null == (n = this.messageElements[0])) {
var n,
i = t.data("text-introduction").replace("{{visitorName}}", this.getVisitorName());
(n = e.clone().toggleClass("hidden")).addClass("first"), this.createStatusMessageNewTheme(n, t, i, 0);
}
})),
(r.prototype.createInitialAgentMessageObject = wrapErrors(function (e) {
return { id: 0, source: "agent", text: e, timestamp: Date.now(), attachments: [], agentAvatar: '<i class="uicon icon-system" title="eDesk"></i>' };
})),
(r.prototype.renderIntroductionMessageAsChatItem = wrapErrors(function () {
var e,
t = this.element.find(".chat-item.hidden"),
n = this.element.find(".js-messages");
if (null == e) {
var i = n.data("text-introduction").replace("{{visitorName}}", this.getVisitorName()),
r = this.createInitialAgentMessageObject(i);
(e = t.clone().toggleClass("hidden")).toggleClass("chat-item-show"), e.find(".chat-footer").hide(), this.createMessageItemNewTheme(r, e, n);
}
})),
(r.prototype.proceedInititalMessage = wrapErrors(function () {
var e = this;
e.messages.length
? e.renderIntroductionMessageAsChatItem()
: (e.updateTypingAgent({ agent_typing: !0, agent_name: "Support" }),
setTimeout(function () {
e.renderIntroductionMessageAsChatItem(), e.updateTypingAgent({ agent_typing: !1 });
}, 2e3));
})),
(r.prototype.waitMessage = wrapErrors(function (e, t) {
var n = t.data("text-waiting"),
i = e.clone().toggleClass("hidden");
i.addClass("welcome"), i.find(".js-content").text(n), i.find(".chat-icon").html(""), i.find(".chat-group").addClass("chat-group-in"), t.append(i), (this.messageElements[2] = i);
})),
(r.prototype.waitMessageNewTheme = wrapErrors(function (e, t) {
var n = t.data("text-waiting"),
i = e.clone().toggleClass("hidden");
i.addClass("welcome"),
i.find(".js-content").text(n),
i.find(".chat-icon").html('<i class="uicon icon-system" title="eDesk"></i>'),
i.find(".chat-group").addClass("chat-group-in"),
t.append(i),
(this.messageElements[2] = i);
})),
(r.prototype.setAgentConfigNewMessage = wrapErrors(function (t, e, n) {
var i = getAgentConfigData.call(this),
r = i.dataAgentId,
o = i.dataAgentAvatar,
s = i.dataAgentName,
a = i.dataOtherAgentIds,
l = a.findIndex(function (e) {
return e == t.agentUserId;
});
r && r != t.agentUserId ? -1 == l && a.push(t.agentUserId) : ((r = t.agentUserId), (s = t.agentName), (o = t.agentAvatar), -1 < l && a.splice(l, 1)), setDialogHeaderAgent.call(this, r, s, o, a, e, n);
})),
(r.prototype.createJoinedItem = wrapErrors(function (e, t, n) {
var i = this.getFormatedTime(e),
r = n.data("text-joined").replace("{{agentName}}", e.agentName.trim().split(" ")[0]).replace("{{time}}", i);
this.createStatusMessage(t, n, r, e.id);
})),
(r.prototype.createJoinedItemNewTheme = wrapErrors(function (e, t, n) {
var i = this.getFormatedTime(e),
r = n.data("text-joined").replace("{{agentName}}", this.getShortAgentName(e)).replace("{{time}}", i);
this.createStatusMessageNewTheme(t, n, r, e.id);
var o = getDialogHeaderAgentElements.call(this).avatarsElement,
s = getDialogHeaderAgentElements.call(this).dialogHeaderTitleElement;
if ((this.setAgentConfigNewMessage(e, o, s), $(t).closest(".no-agent-joined").length)) {
var a = getDialogHeaderAgentElements.call(this).dialogHeaderElement;
setTimeout(function () {
a.css({ height: "56px" }),
setTimeout(function () {
$(t).closest(".no-agent-joined").removeClass("no-agent-joined").find(".title, .avatars").show();
}, 700);
}, 300);
}
})),
(r.prototype.createStatusMessage = wrapErrors(function (e, t, n, i) {
e.addClass("status"),
e.find(".js-content").text(""),
e.find(".chat-icon").html(""),
e.find(".chat-group").addClass("chat-group-in"),
e.find(".chat-footer").append($('<span class="status"></span>').html(n)),
t.append(e),
(this.messageElements[i] = e);
})),
(r.prototype.createStatusMessageNewTheme = wrapErrors(function (e, t, n, i) {
e.addClass("status"),
e.find(".js-content").text(""),
e.find(".chat-icon").html(""),
e.find(".chat-group").addClass("chat-group-in"),
e.find(".chat-body").append($('<span class="status"></span>').html(n)),
t.append(e),
(this.messageElements[i] = e);
})),
(r.prototype.createMessageItem = wrapErrors(function (e, t, n) {
var i = $("<div>").text(e.text).html();
t.find(".js-content").html(this.linkfy(i));
var r = t.find(".chat-icon");
r.html(this.config.visitorAvatar), e.agentAvatar ? r.html(e.agentAvatar) : e.agentAvatar || "visitor" == e.source || r.html("");
var o = t.find(".chat-footer .name"),
s = void 0 !== e.agentName ? e.agentName.trim().split(" ")[0] : "";
if ((o.html(s), "visitor" == e.source)) {
var a = this.config.visitorName.trim().split(" ")[0];
o.html(a);
}
t.find(".chat-group").addClass("chat-group-" + ("visitor" == e.source ? "out" : "in"));
var l = this.getFormatedTime(e);
t.find(".chat-footer .time").html(l), this.renderAttachments(t, e.attachments), n.append(t), (this.messageElements[e.id] = t);
})),
(r.prototype.createMessageItemNewTheme = wrapErrors(function (e, t, n) {
if (e.text) {
var i = $("<div>").text(e.text).html();
t.find(".js-content").html(this.linkfy(i));
} else t.find(".js-content").addClass("hidden");
var r = t.find(".chat-icon");
r.html(this.config.visitorAvatar), e.agentAvatar ? r.html(e.agentAvatar) : e.agentAvatar || "visitor" == e.source || r.html("");
var o = t.find(".chat-footer .name");
o.html(this.getShortAgentName(e)), "visitor" == e.source && o.html(this.getVisitorName()), t.find(".chat-group").addClass("chat-group-" + ("visitor" == e.source ? "out" : "in"));
var s = this.getFormatedTime(e);
t.find(".chat-footer .time").html(s), this.renderAttachmentsNewTheme(t, e.attachments), n.append(t), (this.messageElements[e.id] = t);
})),
(r.prototype.renderAttachments = wrapErrors(function (e, t) {
if (void 0 !== t && 0 < t.length) {
for (var n = e.find(".chat-attachments ul li"), i = 0; i < t.length; i++)
n.find("a").attr("href", t[i].link), n.find("a .file-name").html(t[i].file_name), 0 < i && e.find(".chat-attachments ul").append(n), (n = n.clone());
e.find(".chat-attachments .unstyled").removeClass("hidden");
}
})),
(r.prototype.renderAttachmentsNewTheme = wrapErrors(function (e, t) {
if (void 0 !== t && 0 < t.length) for (var n = 0; n < t.length; n++) this.canRenderAttachmentImg(t[n], t.length) && this.renderAttachmentImg(e, t[n]), this.renderAttachmentOther(e, t[n]);
})),
(r.prototype.canRenderAttachmentImg = wrapErrors(function (e) {
if (!e) return !1;
var t = e.file_name && e.file_name.split(".").pop();
return (
!!this.config.img_attachment_file_allow &&
-1 <
this.config.img_attachment_file_allow.findIndex(function (e) {
return e === t;
})
);
})),
(r.prototype.renderAttachmentImg = wrapErrors(function (e, t) {
if (t) {
var n = this.element.find("#tmpl_chat-attachment-img").html();
if (n) {
var i = $(n);
i.attr("src", t.link).attr("alt", t.file_name), e.find(".chat-attachments").removeClass("hidden").find(".chat-attachment-img").removeClass("hidden").append(i);
}
}
})),
(r.prototype.renderAttachmentOther = wrapErrors(function (e, t) {
if (t) {
var n = this.element.find("#tmpl_chat-attachment-other").html();
if (n) {
var i = $(n);
i.attr("href", t.link).find("span.text").html(t.file_name),
e.find(".js-content.hidden").length && e.find(".chat-attachment-other").css("padding", "8px"),
e.find(".chat-attachments").removeClass("hidden").find(".chat-attachment-other").removeClass("hidden").append(i);
}
}
})),
(r.prototype.getFormatedTime = wrapErrors(function (e) {
var t = new Date(1e3 * e.timestamp);
return t.getHours() + ":" + ("0" + t.getMinutes()).substr(-2);
})),
(r.prototype.updateUI = wrapErrors(function (e, t) {
var n,
i,
r,
o = this.element.find(".chat-item.hidden"),
s = this.element.find(".js-messages");
e && $(".js-loading").hide();
var a = this.scrollEnd;
for (n in this.messages)
if (this.messages.hasOwnProperty(n) && (0 == n && this.introductionMessage(), (i = this.messages[n]), null == (r = this.messageElements[i.id]))) {
if (((r = o.clone().toggleClass("hidden")), e || r.toggleClass("chat-item-show"), "joined" == i.type)) {
this.createJoinedItem(i, r, s);
continue;
}
this.createMessageItem(i, r, s), 0 == n && this.waitMessage(o, s);
}
if (e) return s.scrollTo("max", 0), 0;
a ? s.scrollTo("max", 0, 500) : this.showNewMessageNotificationText();
})),
(r.prototype.updateUINewTheme = wrapErrors(function (e, t) {
var n,
i,
r,
o = this.element.find(".chat-item.hidden"),
s = this.element.find(".js-messages");
e && $(".js-loading").hide();
var a = this.scrollEnd;
for (n in (e && this.proceedInititalMessage(), this.messages))
if (this.messages.hasOwnProperty(n) && ((i = this.messages[n]), null == (r = this.messageElements[i.id]))) {
if (((r = o.clone().toggleClass("hidden")), e || r.toggleClass("chat-item-show"), "joined" == i.type)) {
this.createJoinedItemNewTheme(i, r, s);
continue;
}
if (
(this.createMessageItemNewTheme(i, r, s),
0 == n &&
-1 ===
this.messages.findIndex(function (e) {
return "joined" === e.type;
}))
) {
var l = this;
l.updateTypingAgent({ agent_typing: !0, agent_name: "Support" }),
setTimeout(function () {
l.updateTypingAgent({ agent_typing: !1 }), l.waitMessageNewTheme(o, s);
}, 2e3);
}
}
if (e) return s.scrollTo("max", 0), 0;
a ? s.scrollTo("max", 0, 500) : this.showNewMessageNotificationText();
})),
(r.prototype.getVisitorName = wrapErrors(function () {
return this.config.visitorName.trim().split(" ")[0];
})),
(r.prototype.getShortAgentName = wrapErrors(function (e) {
var t = "Support";
if (void 0 === e) {
var n = getAgentConfigData.call(this).dataAgentName;
n && (t = n);
} else e && void 0 !== e.agentName && (t = e.agentName);
return t.trim().split(" ")[0];
})),
r
);
})()),
(xs.__widget_Form = (function () {
var t = xs.__ui_IFrame;
xs.__ui_WidgetContainer;
function n(e) {
if (!(this instanceof n)) return new n(e);
this.setup(e);
}
return (
((n.prototype = clonePrototype(baseWidget.prototype)).setup = function (e) {
e || (e = {}),
(this.config = e),
(this.element = $(e.contents)),
e.placement.position,
(this.container = new t(parentBody, this.element, null, null, { params: e.params, css: e.css, hidden: e.hidden, placement: e.placement })),
$(this.container.element).css({ "box-shadow": "-20px -10px 70px 0px #00000050", "border-radius": "8px" }),
(this.visible = 1 != e.hidden),
this.setupForm();
}),
(n.prototype.initEngageChat = function (e) {
var t,
n = "email=" + encodeURIComponent(e.engageChatParams.email) + "&name=" + encodeURIComponent(e.engageChatParams.name);
n += "&engage=" + encodeURIComponent("true") + "&agentUserId=" + encodeURIComponent(e[0]) + "&engageMessage=" + encodeURIComponent(e[2]) + "&attemptId=" + encodeURIComponent(e[3].attemptId);
var i = this;
try {
t = { url: GLOBAL.document.location.toString() };
var r,
o = ["title", "image", "url", "description"];
for (r in o)
if (o.hasOwnProperty(r)) {
var s = o[r],
a = $(GLOBAL.document).find('meta[property="og:' + s + '"]');
if (a && a.size()) {
var l = a.attr("content");
l && 0 < l.length && (t["og" + s] = l);
}
}
var c = $(GLOBAL.document).find("title");
c && 0 < c.size() && (t.title = c.text());
var u = $(GLOBAL.document).find('meta[name="description"]');
u && 0 < u.size() && (t.description = u.attr("content")), (t = JSON.stringify(t));
} catch (e) {
t = '{"url":"' + GLOBAL.document.location.toString() + '"}';
}
(n = n + "&meta=" + encodeURIComponent(t)),
(url = baseUrl + "/start-chat/" + i.config.token),
crossDomainAjax(
"post",
n,
url,
function (e) {
1 == e.ok &&
(Cookies.set(i.getCookiePrefix(i.config.widgetId), e.handle, { expires: 1 }),
(previousChatHandle[i.config.widgetId] = Cookies.get(i.getCookiePrefix(i.config.widgetId))),
setTimeout(function () {
main.reloadWidget(i.config.widgetId);
}, 500));
},
function () {
alert("error1");
}
);
}),
(n.prototype.setupForm = function () {
var n = this;
this.element.find(".js-close").bind("click", function (e) {
e.stopPropagation(), e.preventDefault();
var t = widgets[n.config.widgetId][n.config.previous];
void 0 !== t && t.show(), "inline" == n.config.placement.position ? n.element.hide("slow") : n.hide();
});
var e = (this.form = this.element.find("form"));
(this.formRequiredElements = e.find("[data-required]")),
(this.formValidatedElements = e.find("[data-validate]")),
e.bind("submit", function (e) {
e.preventDefault(), e.stopPropagation(), n.validateForm() && n.postForm($(this));
}),
e.find("input,textarea").bind("keyup change paste", function () {
n.validateForm();
}),
n.resetForm();
}),
(n.prototype.parentHide = n.prototype.hide),
(n.prototype.hide = function (e) {
var t = this;
this.fireEventsCallback({ event: "hide" }),
this.parentHide(function () {
t.resetForm(), null != e && e();
});
}),
(n.prototype.parentShow = n.prototype.show),
(n.prototype.show = function () {
this.parentShow(), this.fireEventsCallback({ event: "show" });
}),
(n.prototype.resetForm = function () {
1 == this.config.resetMessage && this.form[0].reset(), this.form.show().fadeTo(1, 1), this.element.find(".js-sending,.js-success,.js-error").hide(), this.form.find("button").removeAttr("disabled");
try {
var t = Cookies.get("__xsf");
null != (t = jQuery.parseJSON(t)) &&
this.form.find(".js-persist").each(function () {
var e = $(this).attr("name");
null != t[e] && $(this).val(t[e]);
});
} catch (e) {
alert("oty");
}
}),
(n.prototype.postForm = function (r) {
r.find("button").attr("disabled", "disabled");
var t,
o = this,
s = r.serialize();
try {
t = { url: GLOBAL.document.location.toString() };
var e,
n = ["title", "image", "url", "description"];
for (e in n)
if (n.hasOwnProperty(e)) {
var i = n[e],
a = $(GLOBAL.document).find('meta[property="og:' + i + '"]');
if (a && a.size()) {
var l = a.attr("content");
l && 0 < l.length && (t["og" + i] = l);
}
}
var c = $(GLOBAL.document).find("title");
c && 0 < c.size() && (t.title = c.text());
var u = $(GLOBAL.document).find('meta[name="description"]');
u && 0 < u.size() && (t.description = u.attr("content")), (t = JSON.stringify(t));
} catch (e) {
t = '{"url":"' + GLOBAL.document.location.toString() + '"}';
}
(s = s + "&meta=" + encodeURIComponent(t)),
this.container.placement && "inline" == this.container.placement.position && this.form.hide(),
this.element.find(".js-sending").fadeIn(100, function () {
var e;
if ("chat" == o.config.next)
(e = baseUrl + "/start-chat/" + o.config.token),
crossDomainAjax(
"post",
s,
e,
function (e) {
1 == e.ok && e.error == o.ERROR_WIDGET_DISABLED
? (o.element.find(".js-sending").hide(), o.element.find(".js-widget-disabled").fadeIn(100))
: 1 == e.ok && e.error == o.ERROR_NOT_ALLOWED_START_CHAT
? o.openTicket(s, r)
: 1 == e.ok
? (Cookies.set(o.getCookiePrefix(o.config.widgetId), e.handle, { expires: 1 }),
(previousChatHandle[o.config.widgetId] = Cookies.get(o.getCookiePrefix(o.config.widgetId))),
setTimeout(function () {
main.reloadWidget(o.config.widgetId);
}, 500))
: (r.find(".js-sending").hide(), o.fireEventsCallback({ event: "submit", result: !1 }), alert(translations.messageFailedToSend));
},
function () {
r.find(".js-sending").hide(), alert("error1");
}
);
else if ("knowledgebase" === o.config.next) {
var t = widgets[o.config.widgetId][o.config.next],
n = r[0][2].value;
t.init(r, n), o.hide();
} else o.openTicket(s, r);
var i = {};
r.find(".js-persist").each(function () {
var e = $(this).attr("name");
i[e] = $(this).val();
}),
Cookies.set("__xsf", i, { expires: 60 });
});
}),
(n.prototype.openTicket = function (e, t) {
var n = this;
(url = baseUrl + "/post/" + n.config.token),
crossDomainAjax(
"post",
e,
url,
function (e) {
n.element.find(".js-sending").hide(),
1 == e.ok
? (n.element.find(".hide-on-success").hide(),
t.is(":visible") && t.fadeTo(0, 0),
e.error == n.ERROR_WIDGET_DISABLED
? n.element.find(".js-widget-disabled").fadeIn(100)
: (n.element.removeClass("dynamic-height"),
n.element.find(".js-success").show(200, function () {
$(this).css("display", "block");
}),
n.fireEventsCallback({ event: "submit", result: !0 }),
"inline" == n.config.placement.position && (n.element.find(".js-btn-close").hide(), n.element.delay(5e3).hide("slow"))))
: (n.fireEventsCallback({ event: "submit", result: !1 }), alert(translations.messageFailedToSend));
},
function () {
t.find(".js-sending").hide(), alert("error3");
}
);
}),
(n.prototype.validateForm = function () {
var t = !0;
return (
this.formRequiredElements.each(function () {
var e = $(this).val();
null != e && e && 0 != e.length
? ($(this).closest(".form-group").removeClass("has-error"), $(this).closest(".field-wrapper").addClass("is-valid"))
: ($(this).closest(".form-group").addClass("has-error"), $(this).closest(".field-wrapper").removeClass("is-valid"), (t = !1));
}),
this.formValidatedElements.each(function () {
var e = $(this).val();
if ("email" == $(this).attr("type")) {
/^(([^<>()[\]\.,;:\s@\"]+(\.[^<>()[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i.test(e)
? ($(this).closest(".form-group").removeClass("has-error"), $(this).closest(".field-wrapper").addClass("is-valid"))
: ((t = !1), $(this).closest(".form-group").addClass("has-error"), $(this).closest(".field-wrapper").removeClass("is-valid"));
}
}),
t ? this.form.find('[type="submit"]').removeAttr("disabled") : this.form.find('[type="submit"]').attr("disabled", "disabled"),
t
);
}),
(n.prototype.setFormValues = function (e) {
var t, n;
for (t in e) e.hasOwnProperty(t) && (0 == (n = this.element.find("#" + t)).size() ? console.log("Can't find " + t) : n.val(e[t]));
}),
(n.prototype.setFormStyle = function (e) {
if (this.container instanceof xs.__ui_IFrame) {
var t = this.form.closest("body").find("style"),
n = t.html();
(n += "\n" + e), t.html(n), this.container.resizeToFitContents();
}
}),
(n.prototype.setFormHeader = function (e) {
null != e.find ? this.element.find("#formHeader").html("").append(e).removeClass("hide") : this.element.find("#formHeader").html(e).removeClass("hide");
}),
(n.prototype.setFormHiddenInputs = function (e) {
var t, n;
for (t in e) e.hasOwnProperty(t) && (0 == (n = this.element.find("#" + t)).size() ? console.log("Can't find " + t) : e[t] ? n.closest(".form-group").addClass("hide") : n.closest(".form-group").removeClass("hide"));
}),
n
);
})()),
(xs.__widget_RatingForm = (function () {
var t = xs.__ui_IFrame,
n = xs.__ui_WidgetContainer;
function i(e) {
if (!(this instanceof i)) return new i(e);
this.setup(e);
}
return (
((i.prototype = clonePrototype(baseWidget.prototype)).setup = function (e) {
e || (e = {}),
(this.config = e),
(this.element = $(e.contents)),
"inline" == e.placement.position
? (this.container = new n(parentBody, this.element, null, null, { params: e.params, css: e.css, placement: e.placement, insertAfter: e.insertAfter }))
: (this.container = new t(parentBody, this.element, null, null, { params: e.params, css: e.css, hidden: e.hidden, placement: e.placement })),
(this.visible = 1 != e.hidden),
$(this.container.element).css({ "box-shadow": "-20px -10px 70px 0px #00000050", "border-radius": "8px" }),
this.setupRatingForm();
}),
(i.prototype.setupRatingForm = function () {
var t = this;
this.element.find(".js-close").bind("click", function (e) {
e.stopPropagation(), e.preventDefault(), widgets[t.config.widgetId][t.config.previous].show(), t.hide();
});
var e = (this.form = this.element.find("form"));
(this.formRequiredElements = e.find("[data-required]")),
(this.formValidatedElements = e.find("[data-validate]")),
e.bind("submit", function (e) {
e.preventDefault(), e.stopPropagation(), t.validateForm() && t.postForm($(this));
}),
e.find("input,textarea").bind("keyup change paste", function () {
t.validateForm();
}),
t.resetRatingForm();
}),
(i.prototype.parentHide = i.prototype.hide),
(i.prototype.hide = function (e) {
var t = this;
this.fireEventsCallback({ event: "hide" }),
this.parentHide(function () {
Cookies.remove("__xspch"), t.resetRatingForm(), null != e && e();
});
}),
(i.prototype.parentShow = i.prototype.show),
(i.prototype.show = function () {
var e = this.config.previousHandle;
if ((e && Cookies.set("__xspch", e, { expires: 1 }), getIsNewEdeskThemeSelected.call(this))) {
var t = getDialogHeaderAgentElements.call(this).avatarsElement,
n = getDialogHeaderAgentElements.call(this).dialogHeaderTitleElement,
i = getAgentConfigData.call(this).dataAgentId,
r = getAgentConfigData.call(this).dataAgentAvatar,
o = getAgentConfigData.call(this).dataAgentName,
s = getAgentConfigData.call(this).dataOtherAgentIds;
setDialogHeaderAgent.call(this, i, o, r, s, t, n);
}
this.parentShow(), this.fireEventsCallback({ event: "show" });
}),
(i.prototype.resetRatingForm = function () {
1 == this.config.resetMessage && this.form[0].reset(), this.form.show().fadeTo(1, 1), this.element.find(".js-sending,.js-success,.js-error").hide(), this.form.find("button").removeAttr("disabled");
}),
(i.prototype.postForm = function (t) {
t.attr("action");
t.find("button").attr("disabled", "disabled");
var n = this,
i = t.serialize();
(i = i + "&handle=" + encodeURIComponent(n.config.previousHandle)),
this.container.placement && "inline" == this.container.placement.position && this.form.hide(),
this.element.find(".js-sending").fadeIn(100, function () {
var e;
(e = baseUrl + "/chat-rating/" + n.config.widgetId),
crossDomainAjax(
"post",
i,
e,
function (e) {
1 == e.ok
? (Cookies.remove("__xspch"),
t.is(":visible") && (getIsNewEdeskThemeSelected.call(n) ? t.hide() : t.fadeTo(0, 0)),
n.element.find(".js-sending").hide(),
n.element.find(".js-success").show(),
n.fireEventsCallback({ event: "submit", result: !0 }))
: (t.find(".js-sending").hide(), n.fireEventsCallback({ event: "submit", result: !1 }), alert(translations.messageFailedToSend));
},
function () {
t.find(".js-sending").hide(), alert("error3");
}
);
});
}),
(i.prototype.validateForm = function () {
var t = !0;
return (
this.formRequiredElements.each(function () {
var e = $(this).val();
null != e && e && 0 != e.length ? $(this).closest(".form-group").removeClass("has-error") : ($(this).closest(".form-group").addClass("has-error"), (t = !1));
}),
this.formValidatedElements.each(function () {
var e = $(this).val();
if ("email" == $(this).attr("type")) {
/^(([^<>()[\]\.,;:\s@\"]+(\.[^<>()[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i.test(e)
? $(this).closest(".form-group").removeClass("has-error")
: ((t = !1), $(this).closest(".form-group").addClass("has-error"));
}
}),
t ? this.form.find('[type="submit"]').removeAttr("disabled") : this.form.find('[type="submit"]').attr("disabled", "disabled"),
t
);
}),
(i.prototype.setFormValues = function (e) {
var t, n;
for (t in e) e.hasOwnProperty(t) && (0 == (n = this.element.find("#" + t)).size() ? console.log("Can't find " + t) : n.val(e[t]));
}),
(i.prototype.setFormStyle = function (e) {
if (this.container instanceof xs.__ui_IFrame) {
var t = this.form.closest("body").find("style"),
n = t.html();
(n += "\n" + e), t.html(n), this.container.resizeToFitContents();
}
}),
(i.prototype.setFormHeader = function (e) {
null != e.find ? this.element.find("#formHeader").html("").append(e).removeClass("hide") : this.element.find("#formHeader").html(e).removeClass("hide");
}),
(i.prototype.setFormHiddenInputs = function (e) {
var t, n;
for (t in e) e.hasOwnProperty(t) && (0 == (n = this.element.find("#" + t)).size() ? console.log("Can't find " + t) : e[t] ? n.closest(".form-group").addClass("hide") : n.closest(".form-group").removeClass("hide"));
}),
i
);
})()),
(this.run = function (e, t, n) {
switch (e) {
case "load":
main.loadWidget(t, n);
break;
case "setEventsCallback":
main.setEventsCallback(t, n);
break;
case "setFormValues":
main.setFormValues(t, n);
break;
case "setFormHeader":
main.setFormHeader(t, n);
break;
case "setFormHiddenInputs":
main.setFormHiddenInputs(t, n);
break;
case "setFormStyle":
main.setFormStyle(t, n);
break;
case "show":
main.showWidget(t, n);
break;
case "initEngageChat":
main.initEngageChat(t, n);
break;
default:
console.log("XSellco: unknown command " + e), n();
}
}),
(this.widgetAliases = {}),
(this.getRootWidgetId = function (e) {
return void 0 !== widgetAliases[e] ? widgetAliases[e] : e;
}),
(this.showWidget = function (e, t) {
var n = e[0];
n = main.getRootWidgetId(n);
var i,
r = widgets[n];
if (r) for (i in r) r.hasOwnProperty(i) && i == e[1] ? r[i].show() : r[i].hide();
else console.log("XSellco.showWidget(): can't find widget " + e[0] + " (root widgetId: " + n + ")");
t();
}),
(this.initEngageChat = function (e, t) {
var n = e[0];
n = main.getRootWidgetId(n);
var i,
r = widgets[n];
if (r) for (i in r) r.hasOwnProperty(i) && i == e[1] && r[i].initEngageChat(e[2]);
else console.log("XSellco.showWidget(): can't find widget " + e[0] + " (root widgetId: " + n + ")");
t();
}),
(this.setFormHiddenInputs = function (e, t) {
var n = e[0];
n = main.getRootWidgetId(n);
var i = widgets[n][e[1]];
i
? null == i.setFormValues
? console.log("XSellco.setFormHiddenInputs(): unsupported command for widget " + e[0] + "(root widgetId: " + n + ")")
: i.setFormHiddenInputs(e[2])
: console.log("XSellco.setFormHiddenInputs(): can't find widget " + e[0] + "(root widgetId: " + n + ")"),
t();
}),
(this.setFormStyle = function (e, t) {
var n = e[0];
n = main.getRootWidgetId(n);
var i = widgets[n][e[1]];
i
? null == i.setFormStyle
? console.log("XSellco.setFormStyle(): unsupported command for widget " + e[0] + "(root widgetId: " + n + ")")
: i.setFormStyle(e[2])
: console.log("XSellco.setFormStyle(): can't find widget " + e[0] + "(root widgetId: " + n + ")"),
t();
}),
(this.setFormValues = function (e, t) {
var n = e[0];
n = main.getRootWidgetId(n);
var i = widgets[n][e[1]];
i
? null == i.setFormValues
? console.log("XSellco.setFormValues(): unsupported command for widget " + e[0] + "(root widgetId: " + n + ")")
: i.setFormValues(e[2])
: console.log("XSellco.setFormValues(): can't find widget " + e[0] + "(root widgetId: " + n + ")"),
t();
}),
(this.setFormHeader = function (e, t) {
var n = e[0];
n = main.getRootWidgetId(n);
var i = widgets[n][e[1]];
i
? null == i.setFormHeader
? console.log("XSellco.setFormHeader(): unsupported command for widget " + e[0] + "(root widgetId: " + n + ")")
: i.setFormHeader(e[2])
: console.log("XSellco.setFormHeader(): can't find widget " + e[0] + "(root widgetId: " + n + ")"),
t();
}),
(this.setEventsCallback = function (e, t) {
var n = e[0];
n = main.getRootWidgetId(n);
var i,
r = widgets[n];
if (r) for (i in r) r.hasOwnProperty(i) && ((r[i].eventsCallback = e[1]), r[i].fireEventsCallback({ event: "init" }));
else console.log("XSellco.setEventsCallback(): can't find widget " + e[0] + "(root widgetId: " + n + ")");
t();
}),
(this.handleProactiveChat = wrapErrors(function (t, n) {
var e = n.proActivePrompts;
if (!e || !e.prompts || !e.prompts.length) return !1;
if (!(widgets[t] && widgets[t].form && widgets[t].form.config && widgets[t].form.config.canCreateNewChat)) return !1;
var i = window.parent.location.href;
new MutationObserver(function (e) {
parent.location.href !== i && ((i = parent.location.href), main.checkProactiveChatConditions(t, n));
}).observe(parent.document, { subtree: !0, childList: !0 }),
window.parent.addEventListener(
"hashchange",
function () {
main.checkProactiveChatConditions(t, n);
},
!1
),
main.checkProactiveChatConditions(t, n);
})),
(this.checkProactiveChatConditions = wrapErrors(function (n, e) {
if (Cookies.get(new xs.__widget_Base().getCookiePrefix(n) + "_reactive_chat_showed") || Cookies.get("__xsch" + n)) return !1;
var o = !1,
s = !1,
a = 0,
t = e.proActivePrompts,
l = t.userInfo,
i = t.prompts;
Object.keys(i).some(function (e) {
var t = i[e],
r = t.conditions;
if (
(Object.keys(r).some(function (e) {
var t = r[e],
n = t.urls,
i = t.countries;
return (
(o = n.some(function (e) {
return -1 !== window.parent.location.href.search(e);
})),
(s = i.some(function (e) {
return -1 !== e.search(l.countryCode);
})),
(a = t.time_to_trigger ? 1e3 * parseInt(t.time_to_trigger) : 0),
n.length || (o = !0),
i.length || (s = !0),
o && s
);
}),
!o || !s)
)
return !1;
if (widgets[n] && widgets[n].proActive.visible) return !1;
return (
setTimeout(
function (e) {
return (
e == window.parent.location.href &&
!!widgets[n].initiator.visible &&
void (main.updateProactivePromptHtml(t, n) && (widgets[n].proActive.show(), main.updateProactivePosition(widgets[n].initiator, widgets[n].proActive)))
);
}.bind(null, window.parent.location.href),
a || 2e3
),
!0
);
});
})),
(this.updateProactivePosition = wrapErrors(function (e, t) {
var n = e.container.container.element,
i = t.container.container.element,
r = parseInt(n.css("bottom")),
o = parseInt(n.css("top")),
s = parseInt(n.css("left")),
a = parseInt(n.css("right"));
r < o ? i.css({ bottom: r + 100 }) : i.css({ top: o - 200 }),
s < a ? i.css({ left: s + 40 }) : i.css({ right: a + 60 }),
e.element.find("#startChat").attr("class", "hidden"),
e.element.find("#close").attr("class", "animated");
})),
(this.updateProactivePromptHtml = wrapErrors(function (e, t) {
var n = widgets[t].proActive;
if (!n || !n.element) return !1;
var i = n.element;
return $(i).find("#from").html(e.from), $(i).find("#message").html(e.message), e.avatar && e.avatar.url ? ($(i).find("#avatar").attr("src", e.avatar.url), $(i).find("#avatar").show()) : $(i).find("#avatar").hide(), !0;
})),
(this.loadWidget = wrapErrors(function (s, a) {
var l = s.shift();
if (((l = main.getRootWidgetId(l)), null == widgets[l])) {
var c = this;
widgets[l] = {};
var e = void 0;
2 === s.length && (e = s[1]),
main.loadWidget_do(
l,
baseUrlInitial,
e,
function (e) {
if (e.preload && e.preload.length)
for (var t = 0; t < e.preload.length; t++) {
var n = document.createElement("link");
(n.rel = "preload"), (n.as = e.preload[t].as), (n.href = e.preload[t].url), parentHead.get(0).appendChild(n);
}
var i = e.masterSettings.actualWidgetId;
l != i && ((widgets[i] = widgets[l]), delete widgets[l]),
(c.widgetAliases[l] = i),
(baseUrl = e.masterSettings.actualBaseUrl),
0 < s.length && (e.insertAfter = s[0]),
e.translation && (translations = $.extend(defaultLabels, e.translation));
var r = 0;
if ("initiator" === e.default) {
var o = e.widgets.initiator;
o && o.active && "button" == o.type && (r = o.showDelay ? o.showDelay : 0) && (r = 100 + 1e3 * r);
}
setTimeout(function () {
main.widgetFactory(i, e), handleProactiveChat(l, e), a();
}, r);
},
function () {
console.log("Error loading XSellco widget: " + l);
}
);
}
})),
(this.reloadWidget = wrapErrors(function (t) {
for (var e in ((t = main.getRootWidgetId(t)), widgets[t])) widgets[t].hasOwnProperty(e) && widgets[t][e].destroy();
(widgets[t] = {}),
main.loadWidget_do(
t,
baseUrl,
void 0,
function (e) {
main.widgetFactory(t, e);
},
function () {
console.log("Error reloading XSellco widget: " + t);
}
);
})),
(this.loadWidget_do = wrapErrors(function (e, t, n, i, r) {
$.support.cors = !0;
var o = "",
s = [],
a = [],
l = [];
(s[e] = Cookies.get("__xsch" + e)), (a[e] = Cookies.get("__xsch" + e)), (l[e] = Cookies.get("__xsch" + e + "_min"));
var c = "get";
null != s[e] && s[e] && ((o += "chatHandle=" + encodeURIComponent(s[e])), (c = "post"), null != l[e] && "false" != l[e] && (o += "&chatMinimize=true")),
null != a[e] && a[e] && ((o += "&previousChatHandle=" + encodeURIComponent(a[e])), (c = "post"));
var u = [];
(u[e] = t + "/config/2/" + encodeURIComponent(e)), void 0 !== n && (u[e] += "/" + encodeURIComponent(n)), crossDomainAjax(c, o, u[e], i, r);
})),
(this.widgetFactory = wrapErrors(function (e, t) {
(e = main.getRootWidgetId(e)), (widgets[e] = {});
var n,
i,
r,
o = t.widgets,
s = t.default,
a = xs.__widget_Button,
l = xs.__widget_HtmlSnippet,
c = xs.__widget_JSTrigger,
u = xs.__widget_Form,
d = xs.__widget_Chat,
p = xs.__widget_RatingForm,
h = xs.__widget_Knowledgebase,
f = xs.__widget_Minimize,
m = xs.__widget_ProActive;
for (n in o)
if (o.hasOwnProperty(n)) {
switch ((((i = o[n]).insertAfter = t.insertAfter), (i.hidden = n != s), (i.widgetId = e), i.type)) {
case "button":
r = new a(i);
break;
case "proActive":
r = new m(i);
break;
case "htmlSnippet":
r = new l(i);
break;
case "form":
r = new u(i);
break;
case "knowledgebase":
r = new h(i);
break;
case "chat":
r = new d(i);
break;
case "ratingForm":
r = new p(i);
break;
case "minimize":
r = new f(i);
break;
case "js":
r = new c(i);
}
n == s && r, (widgets[e][n] = r);
}
})),
(this.processing = !1),
(this.processNextCommand = function () {
if (_queue.length && !this.processing) {
this.processing = !0;
var e = _queue.shift(),
t = e.shift(),
n = this;
main.run(t, e, function () {
(n.processing = !1), n.processNextCommand();
});
}
}),
(this.init = function () {
this.processNextCommand();
var t = this;
_queue.push = function (e) {
(_queue[_queue.length] = e), t.processNextCommand();
};
}),
(parentBody = $(GLOBAL.document.body)),
(parentHead = $(GLOBAL.document.head)),
main.init();
})(window, document);

Back to list