Skip to content

Instantly share code, notes, and snippets.

@michelluther
Created January 7, 2015 14:34
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
Asynchronously loadable sap-ui-core.js
This file has been truncated, but you can view the full file.
window["sap-ui-optimized"] = true;
try {
/*!
* jQuery JavaScript Library v1.11.1
* http://jquery.com/
*
* Includes Sizzle.js
* http://sizzlejs.com/
*
* Copyright 2005, 2014 jQuery Foundation, Inc. and other contributors
* Released under the MIT license
* http://jquery.org/license
*
* Date: 2014-05-01T17:42Z
*/
(function(g, f) {
if (typeof module === "object" && typeof module.exports === "object") {
module.exports = g.document ? f(g, true) : function(w) {
if (!w.document) {
throw new Error("jQuery requires a window with a document")
}
return f(w)
}
} else {
f(g)
}
}(typeof window !== "undefined" ? window : this, function(w, c) {
var d = [];
var f = d.slice;
var g = d.concat;
var h = d.push;
var k = d.indexOf;
var o = {};
var q = o.toString;
var u = o.hasOwnProperty;
var x = {};
var y = "1.11.1",
Q = function(s, a) {
return new Q.fn.init(s, a)
},
z = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,
A = /^-ms-/,
B = /-([\da-z])/gi,
C = function(a, l) {
return l.toUpperCase()
};
Q.fn = Q.prototype = {
jquery: y,
constructor: Q,
selector: "",
length: 0,
toArray: function() {
return f.call(this)
},
get: function(n) {
return n != null ? (n < 0 ? this[n + this.length] : this[n]) : f.call(this)
},
pushStack: function(a) {
var r = Q.merge(this.constructor(), a);
r.prevObject = this;
r.context = this.context;
return r
},
each: function(a, b) {
return Q.each(this, a, b)
},
map: function(a) {
return this.pushStack(Q.map(this, function(b, i) {
return a.call(b, i, b)
}))
},
slice: function() {
return this.pushStack(f.apply(this, arguments))
},
first: function() {
return this.eq(0)
},
last: function() {
return this.eq(-1)
},
eq: function(i) {
var l = this.length,
j = +i + (i < 0 ? l : 0);
return this.pushStack(j >= 0 && j < l ? [this[j]] : [])
},
end: function() {
return this.prevObject || this.constructor(null)
},
push: h,
sort: d.sort,
splice: d.splice
};
Q.extend = Q.fn.extend = function() {
var s, a, b, n, j, l, t = arguments[0] || {},
i = 1,
m = arguments.length,
p = false;
if (typeof t === "boolean") {
p = t;
t = arguments[i] || {};
i++
}
if (typeof t !== "object" && !Q.isFunction(t)) {
t = {}
}
if (i === m) {
t = this;
i--
}
for (; i < m; i++) {
if ((j = arguments[i]) != null) {
for (n in j) {
s = t[n];
b = j[n];
if (t === b) {
continue
}
if (p && b && (Q.isPlainObject(b) || (a = Q.isArray(b)))) {
if (a) {
a = false;
l = s && Q.isArray(s) ? s : []
} else {
l = s && Q.isPlainObject(s) ? s : {}
}
t[n] = Q.extend(p, l, b)
} else if (b !== undefined) {
t[n] = b
}
}
}
}
return t
};
Q.extend({
expando: "jQuery" + (y + Math.random()).replace(/\D/g, ""),
isReady: true,
error: function(m) {
throw new Error(m)
},
noop: function() {},
isFunction: function(a) {
return Q.type(a) === "function"
},
isArray: Array.isArray || function(a) {
return Q.type(a) === "array"
},
isWindow: function(a) {
return a != null && a == a.window
},
isNumeric: function(a) {
return !Q.isArray(a) && a - parseFloat(a) >= 0
},
isEmptyObject: function(a) {
var n;
for (n in a) {
return false
}
return true
},
isPlainObject: function(a) {
var b;
if (!a || Q.type(a) !== "object" || a.nodeType || Q.isWindow(a)) {
return false
}
try {
if (a.constructor && !u.call(a, "constructor") && !u.call(a.constructor.prototype, "isPrototypeOf")) {
return false
}
} catch (e) {
return false
}
if (x.ownLast) {
for (b in a) {
return u.call(a, b)
}
}
for (b in a) {}
return b === undefined || u.call(a, b)
},
type: function(a) {
if (a == null) {
return a + ""
}
return typeof a === "object" || typeof a === "function" ? o[q.call(a)] || "object" : typeof a
},
globalEval: function(a) {
if (a && Q.trim(a)) {
(w.execScript || function(a) {
w["eval"].call(w, a)
})(a)
}
},
camelCase: function(s) {
return s.replace(A, "ms-").replace(B, C)
},
nodeName: function(a, n) {
return a.nodeName && a.nodeName.toLowerCase() === n.toLowerCase()
},
each: function(a, b, j) {
var v, i = 0,
l = a.length,
m = D(a);
if (j) {
if (m) {
for (; i < l; i++) {
v = b.apply(a[i], j);
if (v === false) {
break
}
}
} else {
for (i in a) {
v = b.apply(a[i], j);
if (v === false) {
break
}
}
}
} else {
if (m) {
for (; i < l; i++) {
v = b.call(a[i], i, a[i]);
if (v === false) {
break
}
}
} else {
for (i in a) {
v = b.call(a[i], i, a[i]);
if (v === false) {
break
}
}
}
}
return a
},
trim: function(t) {
return t == null ? "" : (t + "").replace(z, "")
},
makeArray: function(a, r) {
var b = r || [];
if (a != null) {
if (D(Object(a))) {
Q.merge(b, typeof a === "string" ? [a] : a)
} else {
h.call(b, a)
}
}
return b
},
inArray: function(a, b, i) {
var l;
if (b) {
if (k) {
return k.call(b, a, i)
}
l = b.length;
i = i ? i < 0 ? Math.max(0, l + i) : i : 0;
for (; i < l; i++) {
if (i in b && b[i] === a) {
return i
}
}
}
return -1
},
merge: function(a, s) {
var l = +s.length,
j = 0,
i = a.length;
while (j < l) {
a[i++] = s[j++]
}
if (l !== l) {
while (s[j] !== undefined) {
a[i++] = s[j++]
}
}
a.length = i;
return a
},
grep: function(a, b, j) {
var l, m = [],
i = 0,
n = a.length,
p = !j;
for (; i < n; i++) {
l = !b(a[i], i);
if (l !== p) {
m.push(a[i])
}
}
return m
},
map: function(a, b, j) {
var v, i = 0,
l = a.length,
m = D(a),
r = [];
if (m) {
for (; i < l; i++) {
v = b(a[i], i, j);
if (v != null) {
r.push(v)
}
}
} else {
for (i in a) {
v = b(a[i], i, j);
if (v != null) {
r.push(v)
}
}
}
return g.apply([], r)
},
guid: 1,
proxy: function(a, b) {
var j, p, t;
if (typeof b === "string") {
t = a[b];
b = a;
a = t
}
if (!Q.isFunction(a)) {
return undefined
}
j = f.call(arguments, 2);
p = function() {
return a.apply(b || this, j.concat(f.call(arguments)))
};
p.guid = a.guid = a.guid || Q.guid++;
return p
},
now: function() {
return +(new Date())
},
support: x
});
Q.each("Boolean Number String Function Array Date RegExp Object Error".split(" "), function(i, n) {
o["[object " + n + "]"] = n.toLowerCase()
});
function D(a) {
var l = a.length,
t = Q.type(a);
if (t === "function" || Q.isWindow(a)) {
return false
}
if (a.nodeType === 1 && l) {
return true
}
return t === "array" || l === 0 || typeof l === "number" && l > 0 && (l - 1) in a
}
var S =
/*!
* Sizzle CSS Selector Engine v1.10.19
* http://sizzlejs.com/
*
* Copyright 2013 jQuery Foundation, Inc. and other contributors
* Released under the MIT license
* http://jquery.org/license
*
* Date: 2014-04-18
*/
(function(w) {
var i, x, l, n, p, t, r, s, v, r3, s3, t3, J, o3, u3, v3, w3, x3, y3, z3 = "sizzle" + -(new Date()),
A3 = w.document,
B3 = 0,
C3 = 0,
D3 = c4(),
E3 = c4(),
F3 = c4(),
G3 = function(a, b) {
if (a === b) {
s3 = true
}
return 0
},
X = typeof undefined,
H3 = 1 << 31,
u = ({}).hasOwnProperty,
I3 = [],
J3 = I3.pop,
K3 = I3.push,
h = I3.push,
f = I3.slice,
k = I3.indexOf || function(a) {
var i = 0,
b = this.length;
for (; i < b; i++) {
if (this[i] === a) {
return i
}
}
return -1
},
L3 = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",
M3 = "[\\x20\\t\\r\\n\\f]",
N3 = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",
O3 = N3.replace("w", "w#"),
P3 = "\\[" + M3 + "*(" + N3 + ")(?:" + M3 + "*([*^$|!~]?=)" + M3 + "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + O3 + "))|)" + M3 + "*\\]",
Q3 = ":(" + N3 + ")(?:\\((" + "('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" + "((?:\\\\.|[^\\\\()[\\]]|" + P3 + ")*)|" + ".*" + ")\\)|)",
z = new RegExp("^" + M3 + "+|((?:^|[^\\\\])(?:\\\\.)*)" + M3 + "+$", "g"),
R3 = new RegExp("^" + M3 + "*," + M3 + "*"),
S3 = new RegExp("^" + M3 + "*([>+~]|" + M3 + ")" + M3 + "*"),
T3 = new RegExp("=" + M3 + "*([^\\]'\"]*?)" + M3 + "*\\]", "g"),
U3 = new RegExp(Q3),
V3 = new RegExp("^" + O3 + "$"),
W3 = {
"ID": new RegExp("^#(" + N3 + ")"),
"CLASS": new RegExp("^\\.(" + N3 + ")"),
"TAG": new RegExp("^(" + N3.replace("w", "w*") + ")"),
"ATTR": new RegExp("^" + P3),
"PSEUDO": new RegExp("^" + Q3),
"CHILD": new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + M3 + "*(even|odd|(([+-]|)(\\d*)n|)" + M3 + "*(?:([+-]|)" + M3 + "*(\\d+)|))" + M3 + "*\\)|)", "i"),
"bool": new RegExp("^(?:" + L3 + ")$", "i"),
"needsContext": new RegExp("^" + M3 + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + M3 + "*((?:-\\d)?\\d*)" + M3 + "*\\)|)(?=[^-]|$)", "i")
},
X3 = /^(?:input|select|textarea|button)$/i,
Y3 = /^h\d$/i,
Z3 = /^[^{]+\{\s*\[native \w/,
K = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,
$3 = /[+~]/,
_3 = /'|\\/g,
a4 = new RegExp("\\\\([\\da-f]{1,6}" + M3 + "?|(" + M3 + ")|.)", "ig"),
b4 = function(_, a, b) {
var j = "0x" + a - 0x10000;
return j !== j || b ? a : j < 0 ? String.fromCharCode(j + 0x10000) : String.fromCharCode(j >> 10 | 0xD800, j & 0x3FF | 0xDC00)
};
try {
h.apply((I3 = f.call(A3.childNodes)), A3.childNodes);
I3[A3.childNodes.length].nodeType
} catch (e) {
h = {
apply: I3.length ? function(a, b) {
K3.apply(a, f.call(b))
} : function(a, b) {
var j = a.length,
i = 0;
while ((a[j++] = b[i++])) {}
a.length = j - 1
}
}
}
function S(a, b, j, _) {
var u4, v4, m, w4, i, x4, y4, z4, A4, B4;
if ((b ? b.ownerDocument || b : A3) !== J) {
t3(b)
}
b = b || J;
j = j || [];
if (!a || typeof a !== "string") {
return j
}
if ((w4 = b.nodeType) !== 1 && w4 !== 9) {
return []
}
if (u3 && !_) {
if ((u4 = K.exec(a))) {
if ((m = u4[1])) {
if (w4 === 9) {
v4 = b.getElementById(m);
if (v4 && v4.parentNode) {
if (v4.id === m) {
j.push(v4);
return j
}
} else {
return j
}
} else {
if (b.ownerDocument && (v4 = b.ownerDocument.getElementById(m)) && y3(b, v4) && v4.id === m) {
j.push(v4);
return j
}
}
} else if (u4[2]) {
h.apply(j, b.getElementsByTagName(a));
return j
} else if ((m = u4[3]) && x.getElementsByClassName && b.getElementsByClassName) {
h.apply(j, b.getElementsByClassName(m));
return j
}
}
if (x.qsa && (!v3 || !v3.test(a))) {
z4 = y4 = z3;
A4 = b;
B4 = w4 === 9 && a;
if (w4 === 1 && b.nodeName.toLowerCase() !== "object") {
x4 = t(a);
if ((y4 = b.getAttribute("id"))) {
z4 = y4.replace(_3, "\\$&")
} else {
b.setAttribute("id", z4)
}
z4 = "[id='" + z4 + "'] ";
i = x4.length;
while (i--) {
x4[i] = z4 + m4(x4[i])
}
A4 = $3.test(a) && k4(b.parentNode) || b;
B4 = x4.join(",")
}
if (B4) {
try {
h.apply(j, A4.querySelectorAll(B4));
return j
} catch (C4) {} finally {
if (!y4) {
b.removeAttribute("id")
}
}
}
}
}
return s(a.replace(z, "$1"), b, j, _)
}
function c4() {
var a = [];
function b(j, m) {
if (a.push(j + " ") > l.cacheLength) {
delete b[a.shift()]
}
return (b[j + " "] = m)
}
return b
}
function d4(a) {
a[z3] = true;
return a
}
function e4(a) {
var b = J.createElement("div");
try {
return !!a(b)
} catch (e) {
return false
} finally {
if (b.parentNode) {
b.parentNode.removeChild(b)
}
b = null
}
}
function f4(a, b) {
var I3 = a.split("|"),
i = a.length;
while (i--) {
l.attrHandle[I3[i]] = b
}
}
function g4(a, b) {
var j = b && a,
m = j && a.nodeType === 1 && b.nodeType === 1 && (~b.sourceIndex || H3) - (~a.sourceIndex || H3);
if (m) {
return m
}
if (j) {
while ((j = j.nextSibling)) {
if (j === b) {
return -1
}
}
}
return a ? 1 : -1
}
function h4(a) {
return function(b) {
var j = b.nodeName.toLowerCase();
return j === "input" && b.type === a
}
}
function i4(a) {
return function(b) {
var j = b.nodeName.toLowerCase();
return (j === "input" || j === "button") && b.type === a
}
}
function j4(a) {
return d4(function(b) {
b = +b;
return d4(function(m, x3) {
var j, _ = a([], m.length, b),
i = _.length;
while (i--) {
if (m[(j = _[i])]) {
m[j] = !(x3[j] = m[j])
}
}
})
})
}
function k4(a) {
return a && typeof a.getElementsByTagName !== X && a
}
x = S.support = {};
p = S.isXML = function(a) {
var b = a && (a.ownerDocument || a).documentElement;
return b ? b.nodeName !== "HTML" : false
};
t3 = S.setDocument = function(j) {
var _, u4 = j ? j.ownerDocument || j : A3,
v4 = u4.defaultView;
if (u4 === J || u4.nodeType !== 9 || !u4.documentElement) {
return J
}
J = u4;
o3 = u4.documentElement;
u3 = !p(u4);
if (v4 && v4 !== v4.top) {
if (v4.addEventListener) {
v4.addEventListener("unload", function() {
t3()
}, false)
} else if (v4.attachEvent) {
v4.attachEvent("onunload", function() {
t3()
})
}
}
x.attributes = e4(function(a) {
a.className = "i";
return !a.getAttribute("className")
});
x.getElementsByTagName = e4(function(a) {
a.appendChild(u4.createComment(""));
return !a.getElementsByTagName("*").length
});
x.getElementsByClassName = Z3.test(u4.getElementsByClassName) && e4(function(a) {
a.innerHTML = "<div class='a'></div><div class='a i'></div>";
a.firstChild.className = "i";
return a.getElementsByClassName("i").length === 2
});
x.getById = e4(function(a) {
o3.appendChild(a).id = z3;
return !u4.getElementsByName || !u4.getElementsByName(z3).length
});
if (x.getById) {
l.find["ID"] = function(a, b) {
if (typeof b.getElementById !== X && u3) {
var m = b.getElementById(a);
return m && m.parentNode ? [m] : []
}
};
l.filter["ID"] = function(a) {
var b = a.replace(a4, b4);
return function(m) {
return m.getAttribute("id") === b
}
}
} else {
delete l.find["ID"];
l.filter["ID"] = function(a) {
var b = a.replace(a4, b4);
return function(m) {
var j = typeof m.getAttributeNode !== X && m.getAttributeNode("id");
return j && j.value === b
}
}
}
l.find["TAG"] = x.getElementsByTagName ? function(a, b) {
if (typeof b.getElementsByTagName !== X) {
return b.getElementsByTagName(a)
}
} : function(a, b) {
var m, w4 = [],
i = 0,
x4 = b.getElementsByTagName(a);
if (a === "*") {
while ((m = x4[i++])) {
if (m.nodeType === 1) {
w4.push(m)
}
}
return w4
}
return x4
};
l.find["CLASS"] = x.getElementsByClassName && function(a, b) {
if (typeof b.getElementsByClassName !== X && u3) {
return b.getElementsByClassName(a)
}
};
w3 = [];
v3 = [];
if ((x.qsa = Z3.test(u4.querySelectorAll))) {
e4(function(a) {
a.innerHTML = "<select msallowclip=''><option selected=''></option></select>";
if (a.querySelectorAll("[msallowclip^='']").length) {
v3.push("[*^$]=" + M3 + "*(?:''|\"\")")
}
if (!a.querySelectorAll("[selected]").length) {
v3.push("\\[" + M3 + "*(?:value|" + L3 + ")")
}
if (!a.querySelectorAll(":checked").length) {
v3.push(":checked")
}
});
e4(function(a) {
var b = u4.createElement("input");
b.setAttribute("type", "hidden");
a.appendChild(b).setAttribute("name", "D");
if (a.querySelectorAll("[name=d]").length) {
v3.push("name" + M3 + "*[*^$|!~]?=")
}
if (!a.querySelectorAll(":enabled").length) {
v3.push(":enabled", ":disabled")
}
a.querySelectorAll("*,:x");
v3.push(",.*:")
})
}
if ((x.matchesSelector = Z3.test((x3 = o3.matches || o3.webkitMatchesSelector || o3.mozMatchesSelector || o3.oMatchesSelector || o3.msMatchesSelector)))) {
e4(function(a) {
x.disconnectedMatch = x3.call(a, "div");
x3.call(a, "[s!='']:x");
w3.push("!=", Q3)
})
}
v3 = v3.length && new RegExp(v3.join("|"));
w3 = w3.length && new RegExp(w3.join("|"));
_ = Z3.test(o3.compareDocumentPosition);
y3 = _ || Z3.test(o3.contains) ? function(a, b) {
var m = a.nodeType === 9 ? a.documentElement : a,
w4 = b && b.parentNode;
return a === w4 || !!(w4 && w4.nodeType === 1 && (m.contains ? m.contains(w4) : a.compareDocumentPosition && a.compareDocumentPosition(w4) & 16))
} : function(a, b) {
if (b) {
while ((b = b.parentNode)) {
if (b === a) {
return true
}
}
}
return false
};
G3 = _ ? function(a, b) {
if (a === b) {
s3 = true;
return 0
}
var m = !a.compareDocumentPosition - !b.compareDocumentPosition;
if (m) {
return m
}
m = (a.ownerDocument || a) === (b.ownerDocument || b) ? a.compareDocumentPosition(b) : 1;
if (m & 1 || (!x.sortDetached && b.compareDocumentPosition(a) === m)) {
if (a === u4 || a.ownerDocument === A3 && y3(A3, a)) {
return -1
}
if (b === u4 || b.ownerDocument === A3 && y3(A3, b)) {
return 1
}
return r3 ? (k.call(r3, a) - k.call(r3, b)) : 0
}
return m & 4 ? -1 : 1
} : function(a, b) {
if (a === b) {
s3 = true;
return 0
}
var m, i = 0,
w4 = a.parentNode,
x4 = b.parentNode,
ap = [a],
bp = [b];
if (!w4 || !x4) {
return a === u4 ? -1 : b === u4 ? 1 : w4 ? -1 : x4 ? 1 : r3 ? (k.call(r3, a) - k.call(r3, b)) : 0
} else if (w4 === x4) {
return g4(a, b)
}
m = a;
while ((m = m.parentNode)) {
ap.unshift(m)
}
m = b;
while ((m = m.parentNode)) {
bp.unshift(m)
}
while (ap[i] === bp[i]) {
i++
}
return i ? g4(ap[i], bp[i]) : ap[i] === A3 ? -1 : bp[i] === A3 ? 1 : 0
};
return u4
};
S.matches = function(a, b) {
return S(a, null, null, b)
};
S.matchesSelector = function(a, b) {
if ((a.ownerDocument || a) !== J) {
t3(a)
}
b = b.replace(T3, "='$1']");
if (x.matchesSelector && u3 && (!w3 || !w3.test(b)) && (!v3 || !v3.test(b))) {
try {
var j = x3.call(a, b);
if (j || x.disconnectedMatch || a.document && a.document.nodeType !== 11) {
return j
}
} catch (e) {}
}
return S(b, J, null, [a]).length > 0
};
S.contains = function(a, b) {
if ((a.ownerDocument || a) !== J) {
t3(a)
}
return y3(a, b)
};
S.attr = function(a, b) {
if ((a.ownerDocument || a) !== J) {
t3(a)
}
var j = l.attrHandle[b.toLowerCase()],
m = j && u.call(l.attrHandle, b.toLowerCase()) ? j(a, b, !u3) : undefined;
return m !== undefined ? m : x.attributes || !u3 ? a.getAttribute(b) : (m = a.getAttributeNode(b)) && m.specified ? m.value : null
};
S.error = function(m) {
throw new Error("Syntax error, unrecognized expression: " + m)
};
S.uniqueSort = function(a) {
var b, m = [],
j = 0,
i = 0;
s3 = !x.detectDuplicates;
r3 = !x.sortStable && a.slice(0);
a.sort(G3);
if (s3) {
while ((b = a[i++])) {
if (b === a[i]) {
j = m.push(i)
}
}
while (j--) {
a.splice(m[j], 1)
}
}
r3 = null;
return a
};
n = S.getText = function(a) {
var b, j = "",
i = 0,
m = a.nodeType;
if (!m) {
while ((b = a[i++])) {
j += n(b)
}
} else if (m === 1 || m === 9 || m === 11) {
if (typeof a.textContent === "string") {
return a.textContent
} else {
for (a = a.firstChild; a; a = a.nextSibling) {
j += n(a)
}
}
} else if (m === 3 || m === 4) {
return a.nodeValue
}
return j
};
l = S.selectors = {
cacheLength: 50,
createPseudo: d4,
match: W3,
attrHandle: {},
find: {},
relative: {
">": {
dir: "parentNode",
first: true
},
" ": {
dir: "parentNode"
},
"+": {
dir: "previousSibling",
first: true
},
"~": {
dir: "previousSibling"
}
},
preFilter: {
"ATTR": function(m) {
m[1] = m[1].replace(a4, b4);
m[3] = (m[3] || m[4] || m[5] || "").replace(a4, b4);
if (m[2] === "~=") {
m[3] = " " + m[3] + " "
}
return m.slice(0, 4)
},
"CHILD": function(m) {
m[1] = m[1].toLowerCase();
if (m[1].slice(0, 3) === "nth") {
if (!m[3]) {
S.error(m[0])
}
m[4] = +(m[4] ? m[5] + (m[6] || 1) : 2 * (m[3] === "even" || m[3] === "odd"));
m[5] = +((m[7] + m[8]) || m[3] === "odd")
} else if (m[3]) {
S.error(m[0])
}
return m
},
"PSEUDO": function(m) {
var a, b = !m[6] && m[2];
if (W3["CHILD"].test(m[0])) {
return null
}
if (m[3]) {
m[2] = m[4] || m[5] || ""
} else if (b && U3.test(b) && (a = t(b, true)) && (a = b.indexOf(")", b.length - a) - b.length)) {
m[0] = m[0].slice(0, a);
m[2] = b.slice(0, a)
}
return m.slice(0, 3)
}
},
filter: {
"TAG": function(a) {
var b = a.replace(a4, b4).toLowerCase();
return a === "*" ? function() {
return true
} : function(j) {
return j.nodeName && j.nodeName.toLowerCase() === b
}
},
"CLASS": function(a) {
var b = D3[a + " "];
return b || (b = new RegExp("(^|" + M3 + ")" + a + "(" + M3 + "|$)")) && D3(a, function(j) {
return b.test(typeof j.className === "string" && j.className || typeof j.getAttribute !== X && j.getAttribute("class") || "")
})
},
"ATTR": function(a, b, j) {
return function(m) {
var _ = S.attr(m, a);
if (_ == null) {
return b === "!="
}
if (!b) {
return true
}
_ += "";
return b === "=" ? _ === j : b === "!=" ? _ !== j : b === "^=" ? j && _.indexOf(j) === 0 : b === "*=" ? j && _.indexOf(j) > -1 : b === "$=" ? j && _.slice(-j.length) === j : b === "~=" ? (" " + _ + " ").indexOf(j) > -1 : b === "|=" ? _ === j || _.slice(0, j.length + 1) === j + "-" : false
}
},
"CHILD": function(a, b, j, m, _) {
var u4 = a.slice(0, 3) !== "nth",
v4 = a.slice(-4) !== "last",
w4 = b === "of-type";
return m === 1 && _ === 0 ? function(x4) {
return !!x4.parentNode
} : function(x4, y4, z4) {
var A4, B4, C4, D4, E4, F4, G4 = u4 !== v4 ? "nextSibling" : "previousSibling",
H4 = x4.parentNode,
I4 = w4 && x4.nodeName.toLowerCase(),
J4 = !z4 && !w4;
if (H4) {
if (u4) {
while (G4) {
C4 = x4;
while ((C4 = C4[G4])) {
if (w4 ? C4.nodeName.toLowerCase() === I4 : C4.nodeType === 1) {
return false
}
}
F4 = G4 = a === "only" && !F4 && "nextSibling"
}
return true
}
F4 = [v4 ? H4.firstChild : H4.lastChild];
if (v4 && J4) {
B4 = H4[z3] || (H4[z3] = {});
A4 = B4[a] || [];
E4 = A4[0] === B3 && A4[1];
D4 = A4[0] === B3 && A4[2];
C4 = E4 && H4.childNodes[E4];
while ((C4 = ++E4 && C4 && C4[G4] || (D4 = E4 = 0) || F4.pop())) {
if (C4.nodeType === 1 && ++D4 && C4 === x4) {
B4[a] = [B3, E4, D4];
break
}
}
} else if (J4 && (A4 = (x4[z3] || (x4[z3] = {}))[a]) && A4[0] === B3) {
D4 = A4[1]
} else {
while ((C4 = ++E4 && C4 && C4[G4] || (D4 = E4 = 0) || F4.pop())) {
if ((w4 ? C4.nodeName.toLowerCase() === I4 : C4.nodeType === 1) && ++D4) {
if (J4) {
(C4[z3] || (C4[z3] = {}))[a] = [B3, D4]
}
if (C4 === x4) {
break
}
}
}
}
D4 -= _;
return D4 === m || (D4 % m === 0 && D4 / m >= 0)
}
}
},
"PSEUDO": function(a, b) {
var j, m = l.pseudos[a] || l.setFilters[a.toLowerCase()] || S.error("unsupported pseudo: " + a);
if (m[z3]) {
return m(b)
}
if (m.length > 1) {
j = [a, a, "", b];
return l.setFilters.hasOwnProperty(a.toLowerCase()) ? d4(function(_, x3) {
var u4, v4 = m(_, b),
i = v4.length;
while (i--) {
u4 = k.call(_, v4[i]);
_[u4] = !(x3[u4] = v4[i])
}
}) : function(_) {
return m(_, 0, j)
}
}
return m
}
},
pseudos: {
"not": d4(function(a) {
var b = [],
j = [],
m = r(a.replace(z, "$1"));
return m[z3] ? d4(function(_, x3, u4, v4) {
var w4, x4 = m(_, null, v4, []),
i = _.length;
while (i--) {
if ((w4 = x4[i])) {
_[i] = !(x3[i] = w4)
}
}
}) : function(_, u4, v4) {
b[0] = _;
m(b, null, v4, j);
return !j.pop()
}
}),
"has": d4(function(a) {
return function(b) {
return S(a, b).length > 0
}
}),
"contains": d4(function(a) {
return function(b) {
return (b.textContent || b.innerText || n(b)).indexOf(a) > -1
}
}),
"lang": d4(function(a) {
if (!V3.test(a || "")) {
S.error("unsupported lang: " + a)
}
a = a.replace(a4, b4).toLowerCase();
return function(b) {
var j;
do {
if ((j = u3 ? b.lang : b.getAttribute("xml:lang") || b.getAttribute("lang"))) {
j = j.toLowerCase();
return j === a || j.indexOf(a + "-") === 0
}
} while ((b = b.parentNode) && b.nodeType === 1);
return false
}
}),
"target": function(a) {
var b = w.location && w.location.hash;
return b && b.slice(1) === a.id
},
"root": function(a) {
return a === o3
},
"focus": function(a) {
return a === J.activeElement && (!J.hasFocus || J.hasFocus()) && !!(a.type || a.href || ~a.tabIndex)
},
"enabled": function(a) {
return a.disabled === false
},
"disabled": function(a) {
return a.disabled === true
},
"checked": function(a) {
var b = a.nodeName.toLowerCase();
return (b === "input" && !!a.checked) || (b === "option" && !!a.selected)
},
"selected": function(a) {
if (a.parentNode) {
a.parentNode.selectedIndex
}
return a.selected === true
},
"empty": function(a) {
for (a = a.firstChild; a; a = a.nextSibling) {
if (a.nodeType < 6) {
return false
}
}
return true
},
"parent": function(a) {
return !l.pseudos["empty"](a)
},
"header": function(a) {
return Y3.test(a.nodeName)
},
"input": function(a) {
return X3.test(a.nodeName)
},
"button": function(a) {
var b = a.nodeName.toLowerCase();
return b === "input" && a.type === "button" || b === "button"
},
"text": function(a) {
var b;
return a.nodeName.toLowerCase() === "input" && a.type === "text" && ((b = a.getAttribute("type")) == null || b.toLowerCase() === "text")
},
"first": j4(function() {
return [0]
}),
"last": j4(function(m, a) {
return [a - 1]
}),
"eq": j4(function(m, a, b) {
return [b < 0 ? b + a : b]
}),
"even": j4(function(m, a) {
var i = 0;
for (; i < a; i += 2) {
m.push(i)
}
return m
}),
"odd": j4(function(m, a) {
var i = 1;
for (; i < a; i += 2) {
m.push(i)
}
return m
}),
"lt": j4(function(m, a, b) {
var i = b < 0 ? b + a : b;
for (; --i >= 0;) {
m.push(i)
}
return m
}),
"gt": j4(function(m, a, b) {
var i = b < 0 ? b + a : b;
for (; ++i < a;) {
m.push(i)
}
return m
})
}
};
l.pseudos["nth"] = l.pseudos["eq"];
for (i in {
radio: true,
checkbox: true,
file: true,
password: true,
image: true
}) {
l.pseudos[i] = h4(i)
}
for (i in {
submit: true,
reset: true
}) {
l.pseudos[i] = i4(i)
}
function l4() {}
l4.prototype = l.filters = l.pseudos;
l.setFilters = new l4();
t = S.tokenize = function(a, b) {
var m, j, _, u4, v4, w4, x4, y4 = E3[a + " "];
if (y4) {
return b ? 0 : y4.slice(0)
}
v4 = a;
w4 = [];
x4 = l.preFilter;
while (v4) {
if (!m || (j = R3.exec(v4))) {
if (j) {
v4 = v4.slice(j[0].length) || v4
}
w4.push((_ = []))
}
m = false;
if ((j = S3.exec(v4))) {
m = j.shift();
_.push({
value: m,
type: j[0].replace(z, " ")
});
v4 = v4.slice(m.length)
}
for (u4 in l.filter) {
if ((j = W3[u4].exec(v4)) && (!x4[u4] || (j = x4[u4](j)))) {
m = j.shift();
_.push({
value: m,
type: u4,
matches: j
});
v4 = v4.slice(m.length)
}
}
if (!m) {
break
}
}
return b ? v4.length : v4 ? S.error(a) : E3(a, w4).slice(0)
};
function m4(a) {
var i = 0,
b = a.length,
j = "";
for (; i < b; i++) {
j += a[i].value
}
return j
}
function n4(m, a, b) {
var j = a.dir,
_ = b && j === "parentNode",
u4 = C3++;
return a.first ? function(v4, w4, x4) {
while ((v4 = v4[j])) {
if (v4.nodeType === 1 || _) {
return m(v4, w4, x4)
}
}
} : function(v4, w4, x4) {
var y4, z4, A4 = [B3, u4];
if (x4) {
while ((v4 = v4[j])) {
if (v4.nodeType === 1 || _) {
if (m(v4, w4, x4)) {
return true
}
}
}
} else {
while ((v4 = v4[j])) {
if (v4.nodeType === 1 || _) {
z4 = v4[z3] || (v4[z3] = {});
if ((y4 = z4[j]) && y4[0] === B3 && y4[1] === u4) {
return (A4[2] = y4[2])
} else {
z4[j] = A4;
if ((A4[2] = m(v4, w4, x4))) {
return true
}
}
}
}
}
}
}
function o4(m) {
return m.length > 1 ? function(a, b, j) {
var i = m.length;
while (i--) {
if (!m[i](a, b, j)) {
return false
}
}
return true
} : m[0]
}
function p4(a, b, j) {
var i = 0,
m = b.length;
for (; i < m; i++) {
S(a, b[i], j)
}
return j
}
function q4(a, m, b, j, _) {
var u4, v4 = [],
i = 0,
w4 = a.length,
x4 = m != null;
for (; i < w4; i++) {
if ((u4 = a[i])) {
if (!b || b(u4, j, _)) {
v4.push(u4);
if (x4) {
m.push(i)
}
}
}
}
return v4
}
function r4(a, b, m, j, _, u4) {
if (j && !j[z3]) {
j = r4(j)
}
if (_ && !_[z3]) {
_ = r4(_, u4)
}
return d4(function(v4, w4, x4, y4) {
var z4, i, A4, B4 = [],
C4 = [],
D4 = w4.length,
E4 = v4 || p4(b || "*", x4.nodeType ? [x4] : x4, []),
F4 = a && (v4 || !b) ? q4(E4, B4, a, x4, y4) : E4,
G4 = m ? _ || (v4 ? a : D4 || j) ? [] : w4 : F4;
if (m) {
m(F4, G4, x4, y4)
}
if (j) {
z4 = q4(G4, C4);
j(z4, [], x4, y4);
i = z4.length;
while (i--) {
if ((A4 = z4[i])) {
G4[C4[i]] = !(F4[C4[i]] = A4)
}
}
}
if (v4) {
if (_ || a) {
if (_) {
z4 = [];
i = G4.length;
while (i--) {
if ((A4 = G4[i])) {
z4.push((F4[i] = A4))
}
}
_(null, (G4 = []), z4, y4)
}
i = G4.length;
while (i--) {
if ((A4 = G4[i]) && (z4 = _ ? k.call(v4, A4) : B4[i]) > -1) {
v4[z4] = !(w4[z4] = A4)
}
}
}
} else {
G4 = q4(G4 === w4 ? G4.splice(D4, G4.length) : G4);
if (_) {
_(null, w4, G4, y4)
} else {
h.apply(w4, G4)
}
}
})
}
function s4(a) {
var b, m, j, _ = a.length,
u4 = l.relative[a[0].type],
v4 = u4 || l.relative[" "],
i = u4 ? 1 : 0,
w4 = n4(function(z4) {
return z4 === b
}, v4, true),
x4 = n4(function(z4) {
return k.call(b, z4) > -1
}, v4, true),
y4 = [function(z4, A4, B4) {
return (!u4 && (B4 || A4 !== v)) || ((b = A4).nodeType ? w4(z4, A4, B4) : x4(z4, A4, B4))
}];
for (; i < _; i++) {
if ((m = l.relative[a[i].type])) {
y4 = [n4(o4(y4), m)]
} else {
m = l.filter[a[i].type].apply(null, a[i].matches);
if (m[z3]) {
j = ++i;
for (; j < _; j++) {
if (l.relative[a[j].type]) {
break
}
}
return r4(i > 1 && o4(y4), i > 1 && m4(a.slice(0, i - 1).concat({
value: a[i - 2].type === " " ? "*" : ""
})).replace(z, "$1"), m, i < j && s4(a.slice(i, j)), j < _ && s4((a = a.slice(j))), j < _ && m4(a))
}
y4.push(m)
}
}
return o4(y4)
}
function t4(a, b) {
var m = b.length > 0,
_ = a.length > 0,
u4 = function(v4, w4, x4, y4, z4) {
var A4, j, B4, C4 = 0,
i = "0",
D4 = v4 && [],
E4 = [],
F4 = v,
G4 = v4 || _ && l.find["TAG"]("*", z4),
H4 = (B3 += F4 == null ? 1 : Math.random() || 0.1),
I4 = G4.length;
if (z4) {
v = w4 !== J && w4
}
for (; i !== I4 && (A4 = G4[i]) != null; i++) {
if (_ && A4) {
j = 0;
while ((B4 = a[j++])) {
if (B4(A4, w4, x4)) {
y4.push(A4);
break
}
}
if (z4) {
B3 = H4
}
}
if (m) {
if ((A4 = !B4 && A4)) {
C4--
}
if (v4) {
D4.push(A4)
}
}
}
C4 += i;
if (m && i !== C4) {
j = 0;
while ((B4 = b[j++])) {
B4(D4, E4, w4, x4)
}
if (v4) {
if (C4 > 0) {
while (i--) {
if (!(D4[i] || E4[i])) {
E4[i] = J3.call(y4)
}
}
}
E4 = q4(E4)
}
h.apply(y4, E4);
if (z4 && !v4 && E4.length > 0 && (C4 + b.length) > 1) {
S.uniqueSort(y4)
}
}
if (z4) {
B3 = H4;
v = F4
}
return D4
};
return m ? d4(u4) : u4
}
r = S.compile = function(a, m) {
var i, b = [],
j = [],
_ = F3[a + " "];
if (!_) {
if (!m) {
m = t(a)
}
i = m.length;
while (i--) {
_ = s4(m[i]);
if (_[z3]) {
b.push(_)
} else {
j.push(_)
}
}
_ = F3(a, t4(j, b));
_.selector = a
}
return _
};
s = S.select = function(a, b, j, m) {
var i, _, u4, v4, w4, x4 = typeof a === "function" && a,
y4 = !m && t((a = x4.selector || a));
j = j || [];
if (y4.length === 1) {
_ = y4[0] = y4[0].slice(0);
if (_.length > 2 && (u4 = _[0]).type === "ID" && x.getById && b.nodeType === 9 && u3 && l.relative[_[1].type]) {
b = (l.find["ID"](u4.matches[0].replace(a4, b4), b) || [])[0];
if (!b) {
return j
} else if (x4) {
b = b.parentNode
}
a = a.slice(_.shift().value.length)
}
i = W3["needsContext"].test(a) ? 0 : _.length;
while (i--) {
u4 = _[i];
if (l.relative[(v4 = u4.type)]) {
break
}
if ((w4 = l.find[v4])) {
if ((m = w4(u4.matches[0].replace(a4, b4), $3.test(_[0].type) && k4(b.parentNode) || b))) {
_.splice(i, 1);
a = m.length && m4(_);
if (!a) {
h.apply(j, m);
return j
}
break
}
}
}
}(x4 || r(a, y4))(m, b, !u3, j, $3.test(a) && k4(b.parentNode) || b);
return j
};
x.sortStable = z3.split("").sort(G3).join("") === z3;
x.detectDuplicates = !!s3;
t3();
x.sortDetached = e4(function(a) {
return a.compareDocumentPosition(J.createElement("div")) & 1
});
if (!e4(function(a) {
a.innerHTML = "<a href='#'></a>";
return a.firstChild.getAttribute("href") === "#"
})) {
f4("type|href|height|width", function(a, b, p) {
if (!p) {
return a.getAttribute(b, b.toLowerCase() === "type" ? 1 : 2)
}
})
}
if (!x.attributes || !e4(function(a) {
a.innerHTML = "<input/>";
a.firstChild.setAttribute("value", "");
return a.firstChild.getAttribute("value") === ""
})) {
f4("value", function(a, b, p) {
if (!p && a.nodeName.toLowerCase() === "input") {
return a.defaultValue
}
})
}
if (!e4(function(a) {
return a.getAttribute("disabled") == null
})) {
f4(L3, function(a, b, p) {
var j;
if (!p) {
return a[b] === true ? b.toLowerCase() : (j = a.getAttributeNode(b)) && j.specified ? j.value : null
}
})
}
return S
})(w);
Q.find = S;
Q.expr = S.selectors;
Q.expr[":"] = Q.expr.pseudos;
Q.unique = S.uniqueSort;
Q.text = S.getText;
Q.isXMLDoc = S.isXML;
Q.contains = S.contains;
var E = Q.expr.match.needsContext;
var F = (/^<(\w+)\s*\/?>(?:<\/\1>|)$/);
var G = /^.[^:#\[\.,]*$/;
function H(a, b, n) {
if (Q.isFunction(b)) {
return Q.grep(a, function(j, i) {
return !!b.call(j, i, j) !== n
})
}
if (b.nodeType) {
return Q.grep(a, function(j) {
return (j === b) !== n
})
}
if (typeof b === "string") {
if (G.test(b)) {
return Q.filter(b, a, n)
}
b = Q.filter(b, a)
}
return Q.grep(a, function(j) {
return (Q.inArray(j, b) >= 0) !== n
})
}
Q.filter = function(a, b, n) {
var j = b[0];
if (n) {
a = ":not(" + a + ")"
}
return b.length === 1 && j.nodeType === 1 ? Q.find.matchesSelector(j, a) ? [j] : [] : Q.find.matches(a, Q.grep(b, function(j) {
return j.nodeType === 1
}))
};
Q.fn.extend({
find: function(s) {
var i, r = [],
a = this,
l = a.length;
if (typeof s !== "string") {
return this.pushStack(Q(s).filter(function() {
for (i = 0; i < l; i++) {
if (Q.contains(a[i], this)) {
return true
}
}
}))
}
for (i = 0; i < l; i++) {
Q.find(s, a[i], r)
}
r = this.pushStack(l > 1 ? Q.unique(r) : r);
r.selector = this.selector ? this.selector + " " + s : s;
return r
},
filter: function(s) {
return this.pushStack(H(this, s || [], false))
},
not: function(s) {
return this.pushStack(H(this, s || [], true))
},
is: function(s) {
return !!H(this, typeof s === "string" && E.test(s) ? Q(s) : s || [], false).length
}
});
var I, J = w.document,
K = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,
L = Q.fn.init = function(s, a) {
var m, b;
if (!s) {
return this
}
if (typeof s === "string") {
if (s.charAt(0) === "<" && s.charAt(s.length - 1) === ">" && s.length >= 3) {
m = [null, s, null]
} else {
m = K.exec(s)
}
if (m && (m[1] || !a)) {
if (m[1]) {
a = a instanceof Q ? a[0] : a;
Q.merge(this, Q.parseHTML(m[1], a && a.nodeType ? a.ownerDocument || a : J, true));
if (F.test(m[1]) && Q.isPlainObject(a)) {
for (m in a) {
if (Q.isFunction(this[m])) {
this[m](a[m])
} else {
this.attr(m, a[m])
}
}
}
return this
} else {
b = J.getElementById(m[2]);
if (b && b.parentNode) {
if (b.id !== m[2]) {
return I.find(s)
}
this.length = 1;
this[0] = b
}
this.context = J;
this.selector = s;
return this
}
} else if (!a || a.jquery) {
return (a || I).find(s)
} else {
return this.constructor(a).find(s)
}
} else if (s.nodeType) {
this.context = this[0] = s;
this.length = 1;
return this
} else if (Q.isFunction(s)) {
return typeof I.ready !== "undefined" ? I.ready(s) : s(Q)
}
if (s.selector !== undefined) {
this.selector = s.selector;
this.context = s.context
}
return Q.makeArray(s, this)
};
L.prototype = Q.fn;
I = Q(J);
var M = /^(?:parents|prev(?:Until|All))/,
N = {
children: true,
contents: true,
next: true,
prev: true
};
Q.extend({
dir: function(a, b, j) {
var m = [],
l = a[b];
while (l && l.nodeType !== 9 && (j === undefined || l.nodeType !== 1 || !Q(l).is(j))) {
if (l.nodeType === 1) {
m.push(l)
}
l = l[b]
}
return m
},
sibling: function(n, a) {
var r = [];
for (; n; n = n.nextSibling) {
if (n.nodeType === 1 && n !== a) {
r.push(n)
}
}
return r
}
});
Q.fn.extend({
has: function(t) {
var i, a = Q(t, this),
l = a.length;
return this.filter(function() {
for (i = 0; i < l; i++) {
if (Q.contains(this, a[i])) {
return true
}
}
})
},
closest: function(s, a) {
var b, i = 0,
l = this.length,
m = [],
p = E.test(s) || typeof s !== "string" ? Q(s, a || this.context) : 0;
for (; i < l; i++) {
for (b = this[i]; b && b !== a; b = b.parentNode) {
if (b.nodeType < 11 && (p ? p.index(b) > -1 : b.nodeType === 1 && Q.find.matchesSelector(b, s))) {
m.push(b);
break
}
}
}
return this.pushStack(m.length > 1 ? Q.unique(m) : m)
},
index: function(a) {
if (!a) {
return (this[0] && this[0].parentNode) ? this.first().prevAll().length : -1
}
if (typeof a === "string") {
return Q.inArray(this[0], Q(a))
}
return Q.inArray(a.jquery ? a[0] : a, this)
},
add: function(s, a) {
return this.pushStack(Q.unique(Q.merge(this.get(), Q(s, a))))
},
addBack: function(s) {
return this.add(s == null ? this.prevObject : this.prevObject.filter(s))
}
});
function O(a, b) {
do {
a = a[b]
} while (a && a.nodeType !== 1);
return a
}
Q.each({
parent: function(a) {
var p = a.parentNode;
return p && p.nodeType !== 11 ? p : null
},
parents: function(a) {
return Q.dir(a, "parentNode")
},
parentsUntil: function(a, i, b) {
return Q.dir(a, "parentNode", b)
},
next: function(a) {
return O(a, "nextSibling")
},
prev: function(a) {
return O(a, "previousSibling")
},
nextAll: function(a) {
return Q.dir(a, "nextSibling")
},
prevAll: function(a) {
return Q.dir(a, "previousSibling")
},
nextUntil: function(a, i, b) {
return Q.dir(a, "nextSibling", b)
},
prevUntil: function(a, i, b) {
return Q.dir(a, "previousSibling", b)
},
siblings: function(a) {
return Q.sibling((a.parentNode || {}).firstChild, a)
},
children: function(a) {
return Q.sibling(a.firstChild)
},
contents: function(a) {
return Q.nodeName(a, "iframe") ? a.contentDocument || a.contentWindow.document : Q.merge([], a.childNodes)
}
}, function(n, a) {
Q.fn[n] = function(b, s) {
var r = Q.map(this, a, b);
if (n.slice(-5) !== "Until") {
s = b
}
if (s && typeof s === "string") {
r = Q.filter(s, r)
}
if (this.length > 1) {
if (!N[n]) {
r = Q.unique(r)
}
if (M.test(n)) {
r = r.reverse()
}
}
return this.pushStack(r)
}
});
var P = (/\S+/g);
var R = {};
function T(a) {
var b = R[a] = {};
Q.each(a.match(P) || [], function(_, j) {
b[j] = true
});
return b
}
Q.Callbacks = function(a) {
a = typeof a === "string" ? (R[a] || T(a)) : Q.extend({}, a);
var b, m, j, l, n, p, r = [],
s = !a.once && [],
t = function(_) {
m = a.memory && _;
j = true;
n = p || 0;
p = 0;
l = r.length;
b = true;
for (; r && n < l; n++) {
if (r[n].apply(_[0], _[1]) === false && a.stopOnFalse) {
m = false;
break
}
}
b = false;
if (r) {
if (s) {
if (s.length) {
t(s.shift())
}
} else if (m) {
r = []
} else {
v.disable()
}
}
},
v = {
add: function() {
if (r) {
var r3 = r.length;
(function add(s3) {
Q.each(s3, function(_, t3) {
var u3 = Q.type(t3);
if (u3 === "function") {
if (!a.unique || !v.has(t3)) {
r.push(t3)
}
} else if (t3 && t3.length && u3 !== "string") {
add(t3)
}
})
})(arguments);
if (b) {
l = r.length
} else if (m) {
p = r3;
t(m)
}
}
return this
},
remove: function() {
if (r) {
Q.each(arguments, function(_, r3) {
var s3;
while ((s3 = Q.inArray(r3, r, s3)) > -1) {
r.splice(s3, 1);
if (b) {
if (s3 <= l) {
l--
}
if (s3 <= n) {
n--
}
}
}
})
}
return this
},
has: function(_) {
return _ ? Q.inArray(_, r) > -1 : !!(r && r.length)
},
empty: function() {
r = [];
l = 0;
return this
},
disable: function() {
r = s = m = undefined;
return this
},
disabled: function() {
return !r
},
lock: function() {
s = undefined;
if (!m) {
v.disable()
}
return this
},
locked: function() {
return !s
},
fireWith: function(_, r3) {
if (r && (!j || s)) {
r3 = r3 || [];
r3 = [_, r3.slice ? r3.slice() : r3];
if (b) {
s.push(r3)
} else {
t(r3)
}
}
return this
},
fire: function() {
v.fireWith(this, arguments);
return this
},
fired: function() {
return !!j
}
};
return v
};
Q.extend({
Deferred: function(a) {
var t = [
["resolve", "done", Q.Callbacks("once memory"), "resolved"],
["reject", "fail", Q.Callbacks("once memory"), "rejected"],
["notify", "progress", Q.Callbacks("memory")]
],
s = "pending",
p = {
state: function() {
return s
},
always: function() {
b.done(arguments).fail(arguments);
return this
},
then: function() {
var j = arguments;
return Q.Deferred(function(n) {
Q.each(t, function(i, l) {
var m = Q.isFunction(j[i]) && j[i];
b[l[1]](function() {
var r = m && m.apply(this, arguments);
if (r && Q.isFunction(r.promise)) {
r.promise().done(n.resolve).fail(n.reject).progress(n.notify)
} else {
n[l[0] + "With"](this === p ? n.promise() : this, m ? [r] : arguments)
}
})
});
j = null
}).promise()
},
promise: function(j) {
return j != null ? Q.extend(j, p) : p
}
},
b = {};
p.pipe = p.then;
Q.each(t, function(i, j) {
var l = j[2],
m = j[3];
p[j[1]] = l.add;
if (m) {
l.add(function() {
s = m
}, t[i ^ 1][2].disable, t[2][2].lock)
}
b[j[0]] = function() {
b[j[0] + "With"](this === b ? p : this, arguments);
return this
};
b[j[0] + "With"] = l.fireWith
});
p.promise(b);
if (a) {
a.call(b, b)
}
return b
},
when: function(s) {
var i = 0,
r = f.call(arguments),
l = r.length,
a = l !== 1 || (s && Q.isFunction(s.promise)) ? l : 0,
b = a === 1 ? s : Q.Deferred(),
j = function(i, t, v) {
return function(_) {
t[i] = this;
v[i] = arguments.length > 1 ? f.call(arguments) : _;
if (v === p) {
b.notifyWith(t, v)
} else if (!(--a)) {
b.resolveWith(t, v)
}
}
},
p, m, n;
if (l > 1) {
p = new Array(l);
m = new Array(l);
n = new Array(l);
for (; i < l; i++) {
if (r[i] && Q.isFunction(r[i].promise)) {
r[i].promise().done(j(i, n, r)).fail(b.reject).progress(j(i, m, p))
} else {
--a
}
}
}
if (!a) {
b.resolveWith(n, r)
}
return b.promise()
}
});
var U;
Q.fn.ready = function(a) {
Q.ready.promise().done(a);
return this
};
Q.extend({
isReady: false,
readyWait: 1,
holdReady: function(a) {
if (a) {
Q.readyWait++
} else {
Q.ready(true)
}
},
ready: function(a) {
if (a === true ? --Q.readyWait : Q.isReady) {
return
}
if (!J.body) {
return setTimeout(Q.ready)
}
Q.isReady = true;
if (a !== true && --Q.readyWait > 0) {
return
}
U.resolveWith(J, [Q]);
if (Q.fn.triggerHandler) {
Q(J).triggerHandler("ready");
Q(J).off("ready")
}
}
});
function V() {
if (J.addEventListener) {
J.removeEventListener("DOMContentLoaded", W, false);
w.removeEventListener("load", W, false)
} else {
J.detachEvent("onreadystatechange", W);
w.detachEvent("onload", W)
}
}
function W() {
if (J.addEventListener || event.type === "load" || J.readyState === "complete") {
V();
Q.ready()
}
}
Q.ready.promise = function(a) {
if (!U) {
U = Q.Deferred();
if (J.readyState === "complete") {
setTimeout(Q.ready)
} else if (J.addEventListener) {
J.addEventListener("DOMContentLoaded", W, false);
w.addEventListener("load", W, false)
} else {
J.attachEvent("onreadystatechange", W);
w.attachEvent("onload", W);
var t = false;
try {
t = w.frameElement == null && J.documentElement
} catch (e) {}
if (t && t.doScroll) {
(function doScrollCheck() {
if (!Q.isReady) {
try {
t.doScroll("left")
} catch (e) {
return setTimeout(doScrollCheck, 50)
}
V();
Q.ready()
}
})()
}
}
}
return U.promise(a)
};
var X = typeof undefined;
var i;
for (i in Q(x)) {
break
}
x.ownLast = i !== "0";
x.inlineBlockNeedsLayout = false;
Q(function() {
var v, a, b, j;
b = J.getElementsByTagName("body")[0];
if (!b || !b.style) {
return
}
a = J.createElement("div");
j = J.createElement("div");
j.style.cssText = "position:absolute;border:0;width:0;height:0;top:0;left:-9999px";
b.appendChild(j).appendChild(a);
if (typeof a.style.zoom !== X) {
a.style.cssText = "display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1";
x.inlineBlockNeedsLayout = v = a.offsetWidth === 3;
if (v) {
b.style.zoom = 1
}
}
b.removeChild(j)
});
(function() {
var a = J.createElement("div");
if (x.deleteExpando == null) {
x.deleteExpando = true;
try {
delete a.test
} catch (e) {
x.deleteExpando = false
}
}
a = null
})();
Q.acceptData = function(a) {
var n = Q.noData[(a.nodeName + " ").toLowerCase()],
b = +a.nodeType || 1;
return b !== 1 && b !== 9 ? false : !n || n !== true && a.getAttribute("classid") === n
};
var Y = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,
Z = /([A-Z])/g;
function $(a, b, j) {
if (j === undefined && a.nodeType === 1) {
var n = "data-" + b.replace(Z, "-$1").toLowerCase();
j = a.getAttribute(n);
if (typeof j === "string") {
try {
j = j === "true" ? true : j === "false" ? false : j === "null" ? null : +j + "" === j ? +j : Y.test(j) ? Q.parseJSON(j) : j
} catch (e) {}
Q.data(a, b, j)
} else {
j = undefined
}
}
return j
}
function a1(a) {
var n;
for (n in a) {
if (n === "data" && Q.isEmptyObject(a[n])) {
continue
}
if (n !== "toJSON") {
return false
}
}
return true
}
function b1(a, n, b, p) {
if (!Q.acceptData(a)) {
return
}
var r, t, j = Q.expando,
l = a.nodeType,
m = l ? Q.cache : a,
s = l ? a[j] : a[j] && j;
if ((!s || !m[s] || (!p && !m[s].data)) && b === undefined && typeof n === "string") {
return
}
if (!s) {
if (l) {
s = a[j] = d.pop() || Q.guid++
} else {
s = j
}
}
if (!m[s]) {
m[s] = l ? {} : {
toJSON: Q.noop
}
}
if (typeof n === "object" || typeof n === "function") {
if (p) {
m[s] = Q.extend(m[s], n)
} else {
m[s].data = Q.extend(m[s].data, n)
}
}
t = m[s];
if (!p) {
if (!t.data) {
t.data = {}
}
t = t.data
}
if (b !== undefined) {
t[Q.camelCase(n)] = b
}
if (typeof n === "string") {
r = t[n];
if (r == null) {
r = t[Q.camelCase(n)]
}
} else {
r = t
}
return r
}
function c1(a, n, p) {
if (!Q.acceptData(a)) {
return
}
var t, i, b = a.nodeType,
j = b ? Q.cache : a,
l = b ? a[Q.expando] : Q.expando;
if (!j[l]) {
return
}
if (n) {
t = p ? j[l] : j[l].data;
if (t) {
if (!Q.isArray(n)) {
if (n in t) {
n = [n]
} else {
n = Q.camelCase(n);
if (n in t) {
n = [n]
} else {
n = n.split(" ")
}
}
} else {
n = n.concat(Q.map(n, Q.camelCase))
}
i = n.length;
while (i--) {
delete t[n[i]]
}
if (p ? !a1(t) : !Q.isEmptyObject(t)) {
return
}
}
}
if (!p) {
delete j[l].data;
if (!a1(j[l])) {
return
}
}
if (b) {
Q.cleanData([a], true)
} else if (x.deleteExpando || j != j.window) {
delete j[l]
} else {
j[l] = null
}
}
Q.extend({
cache: {},
noData: {
"applet ": true,
"embed ": true,
"object ": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
},
hasData: function(a) {
a = a.nodeType ? Q.cache[a[Q.expando]] : a[Q.expando];
return !!a && !a1(a)
},
data: function(a, n, b) {
return b1(a, n, b)
},
removeData: function(a, n) {
return c1(a, n)
},
_data: function(a, n, b) {
return b1(a, n, b, true)
},
_removeData: function(a, n) {
return c1(a, n, true)
}
});
Q.fn.extend({
data: function(a, v) {
var i, n, b, j = this[0],
l = j && j.attributes;
if (a === undefined) {
if (this.length) {
b = Q.data(j);
if (j.nodeType === 1 && !Q._data(j, "parsedAttrs")) {
i = l.length;
while (i--) {
if (l[i]) {
n = l[i].name;
if (n.indexOf("data-") === 0) {
n = Q.camelCase(n.slice(5));
$(j, n, b[n])
}
}
}
Q._data(j, "parsedAttrs", true)
}
}
return b
}
if (typeof a === "object") {
return this.each(function() {
Q.data(this, a)
})
}
return arguments.length > 1 ? this.each(function() {
Q.data(this, a, v)
}) : j ? $(j, a, Q.data(j, a)) : undefined
},
removeData: function(a) {
return this.each(function() {
Q.removeData(this, a)
})
}
});
Q.extend({
queue: function(a, t, b) {
var j;
if (a) {
t = (t || "fx") + "queue";
j = Q._data(a, t);
if (b) {
if (!j || Q.isArray(b)) {
j = Q._data(a, t, Q.makeArray(b))
} else {
j.push(b)
}
}
return j || []
}
},
dequeue: function(a, t) {
t = t || "fx";
var b = Q.queue(a, t),
s = b.length,
j = b.shift(),
l = Q._queueHooks(a, t),
n = function() {
Q.dequeue(a, t)
};
if (j === "inprogress") {
j = b.shift();
s--
}
if (j) {
if (t === "fx") {
b.unshift("inprogress")
}
delete l.stop;
j.call(a, n, l)
}
if (!s && l) {
l.empty.fire()
}
},
_queueHooks: function(a, t) {
var b = t + "queueHooks";
return Q._data(a, b) || Q._data(a, b, {
empty: Q.Callbacks("once memory").add(function() {
Q._removeData(a, t + "queue");
Q._removeData(a, b)
})
})
}
});
Q.fn.extend({
queue: function(t, a) {
var s = 2;
if (typeof t !== "string") {
a = t;
t = "fx";
s--
}
if (arguments.length < s) {
return Q.queue(this[0], t)
}
return a === undefined ? this : this.each(function() {
var b = Q.queue(this, t, a);
Q._queueHooks(this, t);
if (t === "fx" && b[0] !== "inprogress") {
Q.dequeue(this, t)
}
})
},
dequeue: function(t) {
return this.each(function() {
Q.dequeue(this, t)
})
},
clearQueue: function(t) {
return this.queue(t || "fx", [])
},
promise: function(t, a) {
var b, j = 1,
l = Q.Deferred(),
m = this,
i = this.length,
r = function() {
if (!(--j)) {
l.resolveWith(m, [m])
}
};
if (typeof t !== "string") {
a = t;
t = undefined
}
t = t || "fx";
while (i--) {
b = Q._data(m[i], t + "queueHooks");
if (b && b.empty) {
j++;
b.empty.add(r)
}
}
r();
return l.promise(a)
}
});
var d1 = (/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/).source;
var e1 = ["Top", "Right", "Bottom", "Left"];
var f1 = function(a, b) {
a = b || a;
return Q.css(a, "display") === "none" || !Q.contains(a.ownerDocument, a)
};
var g1 = Q.access = function(a, b, j, v, l, m, r) {
var i = 0,
n = a.length,
p = j == null;
if (Q.type(j) === "object") {
l = true;
for (i in j) {
Q.access(a, b, i, j[i], true, m, r)
}
} else if (v !== undefined) {
l = true;
if (!Q.isFunction(v)) {
r = true
}
if (p) {
if (r) {
b.call(a, v);
b = null
} else {
p = b;
b = function(s, j, v) {
return p.call(Q(s), v)
}
}
}
if (b) {
for (; i < n; i++) {
b(a[i], j, r ? v : v.call(a[i], i, b(a[i], j)))
}
}
}
return l ? a : p ? b.call(a) : n ? b(a[0], j) : m
};
var h1 = (/^(?:checkbox|radio)$/i);
(function() {
var a = J.createElement("input"),
b = J.createElement("div"),
j = J.createDocumentFragment();
b.innerHTML = " <link/><table></table><a href='/a'>a</a><input type='checkbox'/>";
x.leadingWhitespace = b.firstChild.nodeType === 3;
x.tbody = !b.getElementsByTagName("tbody").length;
x.htmlSerialize = !!b.getElementsByTagName("link").length;
x.html5Clone = J.createElement("nav").cloneNode(true).outerHTML !== "<:nav></:nav>";
a.type = "checkbox";
a.checked = true;
j.appendChild(a);
x.appendChecked = a.checked;
b.innerHTML = "<textarea>x</textarea>";
x.noCloneChecked = !!b.cloneNode(true).lastChild.defaultValue;
j.appendChild(b);
b.innerHTML = "<input type='radio' checked='checked' name='t'/>";
x.checkClone = b.cloneNode(true).cloneNode(true).lastChild.checked;
x.noCloneEvent = true;
if (b.attachEvent) {
b.attachEvent("onclick", function() {
x.noCloneEvent = false
});
b.cloneNode(true).click()
}
if (x.deleteExpando == null) {
x.deleteExpando = true;
try {
delete b.test
} catch (e) {
x.deleteExpando = false
}
}
})();
(function() {
var i, a, b = J.createElement("div");
for (i in {
submit: true,
change: true,
focusin: true
}) {
a = "on" + i;
if (!(x[i + "Bubbles"] = a in w)) {
b.setAttribute(a, "t");
x[i + "Bubbles"] = b.attributes[a].expando === false
}
}
b = null
})();
var i1 = /^(?:input|select|textarea)$/i,
j1 = /^key/,
k1 = /^(?:mouse|pointer|contextmenu)|click/,
l1 = /^(?:focusinfocus|focusoutblur)$/,
m1 = /^([^.]*)(?:\.(.+)|)$/;
function n1() {
return true
}
function o1() {
return false
}
function p1() {
try {
return J.activeElement
} catch (a) {}
}
Q.event = {
global: {},
add: function(a, b, j, l, s) {
var m, n, t, p, r, v, _, r3, s3, t3, u3, v3 = Q._data(a);
if (!v3) {
return
}
if (j.handler) {
p = j;
j = p.handler;
s = p.selector
}
if (!j.guid) {
j.guid = Q.guid++
}
if (!(n = v3.events)) {
n = v3.events = {}
}
if (!(v = v3.handle)) {
v = v3.handle = function(e) {
return typeof Q !== X && (!e || Q.event.triggered !== e.type) ? Q.event.dispatch.apply(v.elem, arguments) : undefined
};
v.elem = a
}
b = (b || "").match(P) || [""];
t = b.length;
while (t--) {
m = m1.exec(b[t]) || [];
s3 = u3 = m[1];
t3 = (m[2] || "").split(".").sort();
if (!s3) {
continue
}
r = Q.event.special[s3] || {};
s3 = (s ? r.delegateType : r.bindType) || s3;
r = Q.event.special[s3] || {};
_ = Q.extend({
type: s3,
origType: u3,
data: l,
handler: j,
guid: j.guid,
selector: s,
needsContext: s && Q.expr.match.needsContext.test(s),
namespace: t3.join(".")
}, p);
if (!(r3 = n[s3])) {
r3 = n[s3] = [];
r3.delegateCount = 0;
if (!r.setup || r.setup.call(a, l, t3, v) === false) {
if (a.addEventListener) {
a.addEventListener(s3, v, false)
} else if (a.attachEvent) {
a.attachEvent("on" + s3, v)
}
}
}
if (r.add) {
r.add.call(a, _);
if (!_.handler.guid) {
_.handler.guid = j.guid
}
}
if (s) {
r3.splice(r3.delegateCount++, 0, _)
} else {
r3.push(_)
}
Q.event.global[s3] = true
}
a = null
},
remove: function(a, b, l, s, m) {
var j, n, p, r, t, v, _, r3, s3, t3, u3, v3 = Q.hasData(a) && Q._data(a);
if (!v3 || !(v = v3.events)) {
return
}
b = (b || "").match(P) || [""];
t = b.length;
while (t--) {
p = m1.exec(b[t]) || [];
s3 = u3 = p[1];
t3 = (p[2] || "").split(".").sort();
if (!s3) {
for (s3 in v) {
Q.event.remove(a, s3 + b[t], l, s, true)
}
continue
}
_ = Q.event.special[s3] || {};
s3 = (s ? _.delegateType : _.bindType) || s3;
r3 = v[s3] || [];
p = p[2] && new RegExp("(^|\\.)" + t3.join("\\.(?:.*\\.|)") + "(\\.|$)");
r = j = r3.length;
while (j--) {
n = r3[j];
if ((m || u3 === n.origType) && (!l || l.guid === n.guid) && (!p || p.test(n.namespace)) && (!s || s === n.selector || s === "**" && n.selector)) {
r3.splice(j, 1);
if (n.selector) {
r3.delegateCount--
}
if (_.remove) {
_.remove.call(a, n)
}
}
}
if (r && !r3.length) {
if (!_.teardown || _.teardown.call(a, t3, v3.handle) === false) {
Q.removeEvent(a, s3, v3.handle)
}
delete v[s3]
}
}
if (Q.isEmptyObject(v)) {
delete v3.handle;
Q._removeData(a, "events")
}
},
trigger: function(a, b, j, l) {
var m, n, p, r, s, t, i, v = [j || J],
_ = u.call(a, "type") ? a.type : a,
r3 = u.call(a, "namespace") ? a.namespace.split(".") : [];
p = t = j = j || J;
if (j.nodeType === 3 || j.nodeType === 8) {
return
}
if (l1.test(_ + Q.event.triggered)) {
return
}
if (_.indexOf(".") >= 0) {
r3 = _.split(".");
_ = r3.shift();
r3.sort()
}
n = _.indexOf(":") < 0 && "on" + _;
a = a[Q.expando] ? a : new Q.Event(_, typeof a === "object" && a);
a.isTrigger = l ? 2 : 3;
a.namespace = r3.join(".");
a.namespace_re = a.namespace ? new RegExp("(^|\\.)" + r3.join("\\.(?:.*\\.|)") + "(\\.|$)") : null;
a.result = undefined;
if (!a.target) {
a.target = j
}
b = b == null ? [a] : Q.makeArray(b, [a]);
s = Q.event.special[_] || {};
if (!l && s.trigger && s.trigger.apply(j, b) === false) {
return
}
if (!l && !s.noBubble && !Q.isWindow(j)) {
r = s.delegateType || _;
if (!l1.test(r + _)) {
p = p.parentNode
}
for (; p; p = p.parentNode) {
v.push(p);
t = p
}
if (t === (j.ownerDocument || J)) {
v.push(t.defaultView || t.parentWindow || w)
}
}
i = 0;
while ((p = v[i++]) && !a.isPropagationStopped()) {
a.type = i > 1 ? r : s.bindType || _;
m = (Q._data(p, "events") || {})[a.type] && Q._data(p, "handle");
if (m) {
m.apply(p, b)
}
m = n && p[n];
if (m && m.apply && Q.acceptData(p)) {
a.result = m.apply(p, b);
if (a.result === false) {
a.preventDefault()
}
}
}
a.type = _;
if (!l && !a.isDefaultPrevented()) {
if ((!s._default || s._default.apply(v.pop(), b) === false) && Q.acceptData(j)) {
if (n && j[_] && !Q.isWindow(j)) {
t = j[n];
if (t) {
j[n] = null
}
Q.event.triggered = _;
try {
j[_]()
} catch (e) {}
Q.event.triggered = undefined;
if (t) {
j[n] = t
}
}
}
}
return a.result
},
dispatch: function(a) {
a = Q.event.fix(a);
var i, r, b, m, j, l = [],
n = f.call(arguments),
p = (Q._data(this, "events") || {})[a.type] || [],
s = Q.event.special[a.type] || {};
n[0] = a;
a.delegateTarget = this;
if (s.preDispatch && s.preDispatch.call(this, a) === false) {
return
}
l = Q.event.handlers.call(this, a, p);
i = 0;
while ((m = l[i++]) && !a.isPropagationStopped()) {
a.currentTarget = m.elem;
j = 0;
while ((b = m.handlers[j++]) && !a.isImmediatePropagationStopped()) {
if (!a.namespace_re || a.namespace_re.test(b.namespace)) {
a.handleObj = b;
a.data = b.data;
r = ((Q.event.special[b.origType] || {}).handle || b.handler).apply(m.elem, n);
if (r !== undefined) {
if ((a.result = r) === false) {
a.preventDefault();
a.stopPropagation()
}
}
}
}
}
if (s.postDispatch) {
s.postDispatch.call(this, a)
}
return a.result
},
handlers: function(a, b) {
var s, j, m, i, l = [],
n = b.delegateCount,
p = a.target;
if (n && p.nodeType && (!a.button || a.type !== "click")) {
for (; p != this; p = p.parentNode || this) {
if (p.nodeType === 1 && (p.disabled !== true || a.type !== "click")) {
m = [];
for (i = 0; i < n; i++) {
j = b[i];
s = j.selector + " ";
if (m[s] === undefined) {
m[s] = j.needsContext ? Q(s, this).index(p) >= 0 : Q.find(s, this, null, [p]).length
}
if (m[s]) {
m.push(j)
}
}
if (m.length) {
l.push({
elem: p,
handlers: m
})
}
}
}
}
if (n < b.length) {
l.push({
elem: this,
handlers: b.slice(n)
})
}
return l
},
fix: function(a) {
if (a[Q.expando]) {
return a
}
var i, p, b, t = a.type,
j = a,
l = this.fixHooks[t];
if (!l) {
this.fixHooks[t] = l = k1.test(t) ? this.mouseHooks : j1.test(t) ? this.keyHooks : {}
}
b = l.props ? this.props.concat(l.props) : this.props;
a = new Q.Event(j);
i = b.length;
while (i--) {
p = b[i];
a[p] = j[p]
}
if (!a.target) {
a.target = j.srcElement || J
}
if (a.target.nodeType === 3) {
a.target = a.target.parentNode
}
a.metaKey = !!a.metaKey;
return l.filter ? l.filter(a, j) : a
},
props: "altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),
fixHooks: {},
keyHooks: {
props: "char charCode key keyCode".split(" "),
filter: function(a, b) {
if (a.which == null) {
a.which = b.charCode != null ? b.charCode : b.keyCode
}
return a
}
},
mouseHooks: {
props: "button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),
filter: function(a, b) {
var j, l, m, n = b.button,
p = b.fromElement;
if (a.pageX == null && b.clientX != null) {
l = a.target.ownerDocument || J;
m = l.documentElement;
j = l.body;
a.pageX = b.clientX + (m && m.scrollLeft || j && j.scrollLeft || 0) - (m && m.clientLeft || j && j.clientLeft || 0);
a.pageY = b.clientY + (m && m.scrollTop || j && j.scrollTop || 0) - (m && m.clientTop || j && j.clientTop || 0)
}
if (!a.relatedTarget && p) {
a.relatedTarget = p === a.target ? b.toElement : p
}
if (!a.which && n !== undefined) {
a.which = (n & 1 ? 1 : (n & 2 ? 3 : (n & 4 ? 2 : 0)))
}
return a
}
},
special: {
load: {
noBubble: true
},
focus: {
trigger: function() {
if (this !== p1() && this.focus) {
try {
this.focus();
return false
} catch (e) {}
}
},
delegateType: "focusin"
},
blur: {
trigger: function() {
if (this === p1() && this.blur) {
this.blur();
return false
}
},
delegateType: "focusout"
},
click: {
trigger: function() {
if (Q.nodeName(this, "input") && this.type === "checkbox" && this.click) {
this.click();
return false
}
},
_default: function(a) {
return Q.nodeName(a.target, "a")
}
},
beforeunload: {
postDispatch: function(a) {
if (a.result !== undefined && a.originalEvent) {
a.originalEvent.returnValue = a.result
}
}
}
},
simulate: function(t, a, b, j) {
var e = Q.extend(new Q.Event(), b, {
type: t,
isSimulated: true,
originalEvent: {}
});
if (j) {
Q.event.trigger(e, null, a)
} else {
Q.event.dispatch.call(a, e)
}
if (e.isDefaultPrevented()) {
b.preventDefault()
}
}
};
Q.removeEvent = J.removeEventListener ? function(a, t, b) {
if (a.removeEventListener) {
a.removeEventListener(t, b, false)
}
} : function(a, t, b) {
var n = "on" + t;
if (a.detachEvent) {
if (typeof a[n] === X) {
a[n] = null
}
a.detachEvent(n, b)
}
};
Q.Event = function(s, p) {
if (!(this instanceof Q.Event)) {
return new Q.Event(s, p)
}
if (s && s.type) {
this.originalEvent = s;
this.type = s.type;
this.isDefaultPrevented = s.defaultPrevented || s.defaultPrevented === undefined && s.returnValue === false ? n1 : o1
} else {
this.type = s
}
if (p) {
Q.extend(this, p)
}
this.timeStamp = s && s.timeStamp || Q.now();
this[Q.expando] = true
};
Q.Event.prototype = {
isDefaultPrevented: o1,
isPropagationStopped: o1,
isImmediatePropagationStopped: o1,
preventDefault: function() {
var e = this.originalEvent;
this.isDefaultPrevented = n1;
if (!e) {
return
}
if (e.preventDefault) {
e.preventDefault()
} else {
e.returnValue = false
}
},
stopPropagation: function() {
var e = this.originalEvent;
this.isPropagationStopped = n1;
if (!e) {
return
}
if (e.stopPropagation) {
e.stopPropagation()
}
e.cancelBubble = true
},
stopImmediatePropagation: function() {
var e = this.originalEvent;
this.isImmediatePropagationStopped = n1;
if (e && e.stopImmediatePropagation) {
e.stopImmediatePropagation()
}
this.stopPropagation()
}
};
Q.each({
mouseenter: "mouseover",
mouseleave: "mouseout",
pointerenter: "pointerover",
pointerleave: "pointerout"
}, function(a, b) {
Q.event.special[a] = {
delegateType: b,
bindType: b,
handle: function(j) {
var r, t = this,
l = j.relatedTarget,
m = j.handleObj;
if (!l || (l !== t && !Q.contains(t, l))) {
j.type = m.origType;
r = m.handler.apply(this, arguments);
j.type = b
}
return r
}
}
});
if (!x.submitBubbles) {
Q.event.special.submit = {
setup: function() {
if (Q.nodeName(this, "form")) {
return false
}
Q.event.add(this, "click._submit keypress._submit", function(e) {
var a = e.target,
b = Q.nodeName(a, "input") || Q.nodeName(a, "button") ? a.form : undefined;
if (b && !Q._data(b, "submitBubbles")) {
Q.event.add(b, "submit._submit", function(j) {
j._submit_bubble = true
});
Q._data(b, "submitBubbles", true)
}
})
},
postDispatch: function(a) {
if (a._submit_bubble) {
delete a._submit_bubble;
if (this.parentNode && !a.isTrigger) {
Q.event.simulate("submit", this.parentNode, a, true)
}
}
},
teardown: function() {
if (Q.nodeName(this, "form")) {
return false
}
Q.event.remove(this, "._submit")
}
}
}
if (!x.changeBubbles) {
Q.event.special.change = {
setup: function() {
if (i1.test(this.nodeName)) {
if (this.type === "checkbox" || this.type === "radio") {
Q.event.add(this, "propertychange._change", function(a) {
if (a.originalEvent.propertyName === "checked") {
this._just_changed = true
}
});
Q.event.add(this, "click._change", function(a) {
if (this._just_changed && !a.isTrigger) {
this._just_changed = false
}
Q.event.simulate("change", this, a, true)
})
}
return false
}
Q.event.add(this, "beforeactivate._change", function(e) {
var a = e.target;
if (i1.test(a.nodeName) && !Q._data(a, "changeBubbles")) {
Q.event.add(a, "change._change", function(b) {
if (this.parentNode && !b.isSimulated && !b.isTrigger) {
Q.event.simulate("change", this.parentNode, b, true)
}
});
Q._data(a, "changeBubbles", true)
}
})
},
handle: function(a) {
var b = a.target;
if (this !== b || a.isSimulated || a.isTrigger || (b.type !== "radio" && b.type !== "checkbox")) {
return a.handleObj.handler.apply(this, arguments)
}
},
teardown: function() {
Q.event.remove(this, "._change");
return !i1.test(this.nodeName)
}
}
}
if (!x.focusinBubbles) {
Q.each({
focus: "focusin",
blur: "focusout"
}, function(a, b) {
var j = function(l) {
Q.event.simulate(b, l.target, Q.event.fix(l), true)
};
Q.event.special[b] = {
setup: function() {
var l = this.ownerDocument || this,
m = Q._data(l, b);
if (!m) {
l.addEventListener(a, j, true)
}
Q._data(l, b, (m || 0) + 1)
},
teardown: function() {
var l = this.ownerDocument || this,
m = Q._data(l, b) - 1;
if (!m) {
l.removeEventListener(a, j, true);
Q._removeData(l, b)
} else {
Q._data(l, b, m)
}
}
}
})
}
Q.fn.extend({
on: function(t, s, a, b, j) {
var l, m;
if (typeof t === "object") {
if (typeof s !== "string") {
a = a || s;
s = undefined
}
for (l in t) {
this.on(l, s, a, t[l], j)
}
return this
}
if (a == null && b == null) {
b = s;
a = s = undefined
} else if (b == null) {
if (typeof s === "string") {
b = a;
a = undefined
} else {
b = a;
a = s;
s = undefined
}
}
if (b === false) {
b = o1
} else if (!b) {
return this
}
if (j === 1) {
m = b;
b = function(n) {
Q().off(n);
return m.apply(this, arguments)
};
b.guid = m.guid || (m.guid = Q.guid++)
}
return this.each(function() {
Q.event.add(this, t, b, a, s)
})
},
one: function(t, s, a, b) {
return this.on(t, s, a, b, 1)
},
off: function(t, s, a) {
var b, j;
if (t && t.preventDefault && t.handleObj) {
b = t.handleObj;
Q(t.delegateTarget).off(b.namespace ? b.origType + "." + b.namespace : b.origType, b.selector, b.handler);
return this
}
if (typeof t === "object") {
for (j in t) {
this.off(j, s, t[j])
}
return this
}
if (s === false || typeof s === "function") {
a = s;
s = undefined
}
if (a === false) {
a = o1
}
return this.each(function() {
Q.event.remove(this, t, a, s)
})
},
trigger: function(t, a) {
return this.each(function() {
Q.event.trigger(t, a, this)
})
},
triggerHandler: function(t, a) {
var b = this[0];
if (b) {
return Q.event.trigger(t, a, b, true)
}
}
});
function q1(J) {
var l = r1.split("|"),
s = J.createDocumentFragment();
if (s.createElement) {
while (l.length) {
s.createElement(l.pop())
}
}
return s
}
var r1 = "abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|" + "header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",
s1 = / jQuery\d+="(?:null|\d+)"/g,
t1 = new RegExp("<(?:" + r1 + ")[\\s/>]", "i"),
u1 = /^\s+/,
v1 = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,
w1 = /<([\w:]+)/,
x1 = /<tbody/i,
y1 = /<|&#?\w+;/,
z1 = /<(?:script|style|link)/i,
A1 = /checked\s*(?:[^=]|=\s*.checked.)/i,
B1 = /^$|\/(?:java|ecma)script/i,
C1 = /^true\/(.*)/,
D1 = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,
E1 = {
option: [1, "<select multiple='multiple'>", "</select>"],
legend: [1, "<fieldset>", "</fieldset>"],
area: [1, "<map>", "</map>"],
param: [1, "<object>", "</object>"],
thead: [1, "<table>", "</table>"],
tr: [2, "<table><tbody>", "</tbody></table>"],
col: [2, "<table><tbody></tbody><colgroup>", "</colgroup></table>"],
td: [3, "<table><tbody><tr>", "</tr></tbody></table>"],
_default: x.htmlSerialize ? [0, "", ""] : [1, "X<div>", "</div>"]
},
F1 = q1(J),
G1 = F1.appendChild(J.createElement("div"));
E1.optgroup = E1.option;
E1.tbody = E1.tfoot = E1.colgroup = E1.caption = E1.thead;
E1.th = E1.td;
function H1(a, t) {
var b, j, i = 0,
l = typeof a.getElementsByTagName !== X ? a.getElementsByTagName(t || "*") : typeof a.querySelectorAll !== X ? a.querySelectorAll(t || "*") : undefined;
if (!l) {
for (l = [], b = a.childNodes || a;
(j = b[i]) != null; i++) {
if (!t || Q.nodeName(j, t)) {
l.push(j)
} else {
Q.merge(l, H1(j, t))
}
}
}
return t === undefined || t && Q.nodeName(a, t) ? Q.merge([a], l) : l
}
function I1(a) {
if (h1.test(a.type)) {
a.defaultChecked = a.checked
}
}
function J1(a, b) {
return Q.nodeName(a, "table") && Q.nodeName(b.nodeType !== 11 ? b : b.firstChild, "tr") ? a.getElementsByTagName("tbody")[0] || a.appendChild(a.ownerDocument.createElement("tbody")) : a
}
function K1(a) {
a.type = (Q.find.attr(a, "type") !== null) + "/" + a.type;
return a
}
function L1(a) {
var m = C1.exec(a.type);
if (m) {
a.type = m[1]
} else {
a.removeAttribute("type")
}
return a
}
function M1(a, r) {
var b, i = 0;
for (;
(b = a[i]) != null; i++) {
Q._data(b, "globalEval", !r || Q._data(r[i], "globalEval"))
}
}
function N1(s, a) {
if (a.nodeType !== 1 || !Q.hasData(s)) {
return
}
var t, i, l, b = Q._data(s),
j = Q._data(a, b),
m = b.events;
if (m) {
delete j.handle;
j.events = {};
for (t in m) {
for (i = 0, l = m[t].length; i < l; i++) {
Q.event.add(a, t, m[t][i])
}
}
}
if (j.data) {
j.data = Q.extend({}, j.data)
}
}
function O1(s, a) {
var n, e, b;
if (a.nodeType !== 1) {
return
}
n = a.nodeName.toLowerCase();
if (!x.noCloneEvent && a[Q.expando]) {
b = Q._data(a);
for (e in b.events) {
Q.removeEvent(a, e, b.handle)
}
a.removeAttribute(Q.expando)
}
if (n === "script" && a.text !== s.text) {
K1(a).text = s.text;
L1(a)
} else if (n === "object") {
if (a.parentNode) {
a.outerHTML = s.outerHTML
}
if (x.html5Clone && (s.innerHTML && !Q.trim(a.innerHTML))) {
a.innerHTML = s.innerHTML
}
} else if (n === "input" && h1.test(s.type)) {
a.defaultChecked = a.checked = s.checked;
if (a.value !== s.value) {
a.value = s.value
}
} else if (n === "option") {
a.defaultSelected = a.selected = s.defaultSelected
} else if (n === "input" || n === "textarea") {
a.defaultValue = s.defaultValue
}
}
Q.extend({
clone: function(a, b, j) {
var l, n, m, i, s, p = Q.contains(a.ownerDocument, a);
if (x.html5Clone || Q.isXMLDoc(a) || !t1.test("<" + a.nodeName + ">")) {
m = a.cloneNode(true)
} else {
G1.innerHTML = a.outerHTML;
G1.removeChild(m = G1.firstChild)
}
if ((!x.noCloneEvent || !x.noCloneChecked) && (a.nodeType === 1 || a.nodeType === 11) && !Q.isXMLDoc(a)) {
l = H1(m);
s = H1(a);
for (i = 0;
(n = s[i]) != null; ++i) {
if (l[i]) {
O1(n, l[i])
}
}
}
if (b) {
if (j) {
s = s || H1(a);
l = l || H1(m);
for (i = 0;
(n = s[i]) != null; i++) {
N1(n, l[i])
}
} else {
N1(a, m)
}
}
l = H1(m, "script");
if (l.length > 0) {
M1(l, !p && H1(a, "script"))
}
l = s = n = null;
return m
},
buildFragment: function(a, b, s, m) {
var j, n, p, t, r, v, _, l = a.length,
r3 = q1(b),
s3 = [],
i = 0;
for (; i < l; i++) {
n = a[i];
if (n || n === 0) {
if (Q.type(n) === "object") {
Q.merge(s3, n.nodeType ? [n] : n)
} else if (!y1.test(n)) {
s3.push(b.createTextNode(n))
} else {
t = t || r3.appendChild(b.createElement("div"));
r = (w1.exec(n) || ["", ""])[1].toLowerCase();
_ = E1[r] || E1._default;
t.innerHTML = _[1] + n.replace(v1, "<$1></$2>") + _[2];
j = _[0];
while (j--) {
t = t.lastChild
}
if (!x.leadingWhitespace && u1.test(n)) {
s3.push(b.createTextNode(u1.exec(n)[0]))
}
if (!x.tbody) {
n = r === "table" && !x1.test(n) ? t.firstChild : _[1] === "<table>" && !x1.test(n) ? t : 0;
j = n && n.childNodes.length;
while (j--) {
if (Q.nodeName((v = n.childNodes[j]), "tbody") && !v.childNodes.length) {
n.removeChild(v)
}
}
}
Q.merge(s3, t.childNodes);
t.textContent = "";
while (t.firstChild) {
t.removeChild(t.firstChild)
}
t = r3.lastChild
}
}
}
if (t) {
r3.removeChild(t)
}
if (!x.appendChecked) {
Q.grep(H1(s3, "input"), I1)
}
i = 0;
while ((n = s3[i++])) {
if (m && Q.inArray(n, m) !== -1) {
continue
}
p = Q.contains(n.ownerDocument, n);
t = H1(r3.appendChild(n), "script");
if (p) {
M1(t)
}
if (s) {
j = 0;
while ((n = t[j++])) {
if (B1.test(n.type || "")) {
s.push(n)
}
}
}
}
t = null;
return r3
},
cleanData: function(a, b) {
var j, t, l, m, i = 0,
n = Q.expando,
p = Q.cache,
r = x.deleteExpando,
s = Q.event.special;
for (;
(j = a[i]) != null; i++) {
if (b || Q.acceptData(j)) {
l = j[n];
m = l && p[l];
if (m) {
if (m.events) {
for (t in m.events) {
if (s[t]) {
Q.event.remove(j, t)
} else {
Q.removeEvent(j, t, m.handle)
}
}
}
if (p[l]) {
delete p[l];
if (r) {
delete j[n]
} else if (typeof j.removeAttribute !== X) {
j.removeAttribute(n)
} else {
j[n] = null
}
d.push(l)
}
}
}
}
}
});
Q.fn.extend({
text: function(v) {
return g1(this, function(v) {
return v === undefined ? Q.text(this) : this.empty().append((this[0] && this[0].ownerDocument || J).createTextNode(v))
}, null, v, arguments.length)
},
append: function() {
return this.domManip(arguments, function(a) {
if (this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9) {
var t = J1(this, a);
t.appendChild(a)
}
})
},
prepend: function() {
return this.domManip(arguments, function(a) {
if (this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9) {
var t = J1(this, a);
t.insertBefore(a, t.firstChild)
}
})
},
before: function() {
return this.domManip(arguments, function(a) {
if (this.parentNode) {
this.parentNode.insertBefore(a, this)
}
})
},
after: function() {
return this.domManip(arguments, function(a) {
if (this.parentNode) {
this.parentNode.insertBefore(a, this.nextSibling)
}
})
},
remove: function(s, a) {
var b, j = s ? Q.filter(s, this) : this,
i = 0;
for (;
(b = j[i]) != null; i++) {
if (!a && b.nodeType === 1) {
Q.cleanData(H1(b))
}
if (b.parentNode) {
if (a && Q.contains(b.ownerDocument, b)) {
M1(H1(b, "script"))
}
b.parentNode.removeChild(b)
}
}
return this
},
empty: function() {
var a, i = 0;
for (;
(a = this[i]) != null; i++) {
if (a.nodeType === 1) {
Q.cleanData(H1(a, false))
}
while (a.firstChild) {
a.removeChild(a.firstChild)
}
if (a.options && Q.nodeName(a, "select")) {
a.options.length = 0
}
}
return this
},
clone: function(a, b) {
a = a == null ? false : a;
b = b == null ? a : b;
return this.map(function() {
return Q.clone(this, a, b)
})
},
html: function(v) {
return g1(this, function(v) {
var a = this[0] || {},
i = 0,
l = this.length;
if (v === undefined) {
return a.nodeType === 1 ? a.innerHTML.replace(s1, "") : undefined
}
if (typeof v === "string" && !z1.test(v) && (x.htmlSerialize || !t1.test(v)) && (x.leadingWhitespace || !u1.test(v)) && !E1[(w1.exec(v) || ["", ""])[1].toLowerCase()]) {
v = v.replace(v1, "<$1></$2>");
try {
for (; i < l; i++) {
a = this[i] || {};
if (a.nodeType === 1) {
Q.cleanData(H1(a, false));
a.innerHTML = v
}
}
a = 0
} catch (e) {}
}
if (a) {
this.empty().append(v)
}
}, null, v, arguments.length)
},
replaceWith: function() {
var a = arguments[0];
this.domManip(arguments, function(b) {
a = this.parentNode;
Q.cleanData(H1(this));
if (a) {
a.replaceChild(b, this)
}
});
return a && (a.length || a.nodeType) ? this : this.remove()
},
detach: function(s) {
return this.remove(s, true)
},
domManip: function(a, b) {
a = g.apply([], a);
var j, n, m, s, p, r, i = 0,
l = this.length,
t = this,
v = l - 1,
_ = a[0],
r3 = Q.isFunction(_);
if (r3 || (l > 1 && typeof _ === "string" && !x.checkClone && A1.test(_))) {
return this.each(function(s3) {
var t3 = t.eq(s3);
if (r3) {
a[0] = _.call(this, s3, t3.html())
}
t3.domManip(a, b)
})
}
if (l) {
r = Q.buildFragment(a, this[0].ownerDocument, false, this);
j = r.firstChild;
if (r.childNodes.length === 1) {
r = j
}
if (j) {
s = Q.map(H1(r, "script"), K1);
m = s.length;
for (; i < l; i++) {
n = r;
if (i !== v) {
n = Q.clone(n, true, true);
if (m) {
Q.merge(s, H1(n, "script"))
}
}
b.call(this[i], n, i)
}
if (m) {
p = s[s.length - 1].ownerDocument;
Q.map(s, L1);
for (i = 0; i < m; i++) {
n = s[i];
if (B1.test(n.type || "") && !Q._data(n, "globalEval") && Q.contains(p, n)) {
if (n.src) {
if (Q._evalUrl) {
Q._evalUrl(n.src)
}
} else {
Q.globalEval((n.text || n.textContent || n.innerHTML || "").replace(D1, ""))
}
}
}
}
r = j = null
}
}
return this
}
});
Q.each({
appendTo: "append",
prependTo: "prepend",
insertBefore: "before",
insertAfter: "after",
replaceAll: "replaceWith"
}, function(n, a) {
Q.fn[n] = function(s) {
var b, i = 0,
r = [],
j = Q(s),
l = j.length - 1;
for (; i <= l; i++) {
b = i === l ? this : this.clone(true);
Q(j[i])[a](b);
h.apply(r, b.get())
}
return this.pushStack(r)
}
});
var P1, Q1 = {};
function R1(n, a) {
var s, b = Q(a.createElement(n)).appendTo(a.body),
j = w.getDefaultComputedStyle && (s = w.getDefaultComputedStyle(b[0])) ? s.display : Q.css(b[0], "display");
b.detach();
return j
}
function S1(n) {
var a = J,
b = Q1[n];
if (!b) {
b = R1(n, a);
if (b === "none" || !b) {
P1 = (P1 || Q("<iframe frameborder='0' width='0' height='0'/>")).appendTo(a.documentElement);
a = (P1[0].contentWindow || P1[0].contentDocument).document;
a.write();
a.close();
b = R1(n, a);
P1.detach()
}
Q1[n] = b
}
return b
}(function() {
var s;
x.shrinkWrapBlocks = function() {
if (s != null) {
return s
}
s = false;
var a, b, j;
b = J.getElementsByTagName("body")[0];
if (!b || !b.style) {
return
}
a = J.createElement("div");
j = J.createElement("div");
j.style.cssText = "position:absolute;border:0;width:0;height:0;top:0;left:-9999px";
b.appendChild(j).appendChild(a);
if (typeof a.style.zoom !== X) {
a.style.cssText = "-webkit-box-sizing:content-box;-moz-box-sizing:content-box;" + "box-sizing:content-box;display:block;margin:0;border:0;" + "padding:1px;width:1px;zoom:1";
a.appendChild(J.createElement("div")).style.width = "5px";
s = a.offsetWidth !== 3
}
b.removeChild(j);
return s
}
})();
var T1 = (/^margin/);
var U1 = new RegExp("^(" + d1 + ")(?!px)[a-z%]+$", "i");
var V1, W1, X1 = /^(top|right|bottom|left)$/;
if (w.getComputedStyle) {
V1 = function(a) {
return a.ownerDocument.defaultView.getComputedStyle(a, null)
};
W1 = function(a, n, b) {
var j, m, l, r, s = a.style;
b = b || V1(a);
r = b ? b.getPropertyValue(n) || b[n] : undefined;
if (b) {
if (r === "" && !Q.contains(a.ownerDocument, a)) {
r = Q.style(a, n)
}
if (U1.test(r) && T1.test(n)) {
j = s.width;
m = s.minWidth;
l = s.maxWidth;
s.minWidth = s.maxWidth = s.width = r;
r = b.width;
s.width = j;
s.minWidth = m;
s.maxWidth = l
}
}
return r === undefined ? r : r + ""
}
} else if (J.documentElement.currentStyle) {
V1 = function(a) {
return a.currentStyle
};
W1 = function(a, n, b) {
var l, r, j, m, s = a.style;
b = b || V1(a);
m = b ? b[n] : undefined;
if (m == null && s && s[n]) {
m = s[n]
}
if (U1.test(m) && !X1.test(n)) {
l = s.left;
r = a.runtimeStyle;
j = r && r.left;
if (j) {
r.left = a.currentStyle.left
}
s.left = n === "fontSize" ? "1em" : m;
m = s.pixelLeft + "px";
s.left = l;
if (j) {
r.left = j
}
}
return m === undefined ? m : m + "" || "auto"
}
}
function Y1(a, b) {
return {
get: function() {
var j = a();
if (j == null) {
return
}
if (j) {
delete this.get;
return
}
return (this.get = b).apply(this, arguments)
}
}
}(function() {
var b, s, a, p, j, r, l;
b = J.createElement("div");
b.innerHTML = " <link/><table></table><a href='/a'>a</a><input type='checkbox'/>";
a = b.getElementsByTagName("a")[0];
s = a && a.style;
if (!s) {
return
}
s.cssText = "float:left;opacity:.5";
x.opacity = s.opacity === "0.5";
x.cssFloat = !!s.cssFloat;
b.style.backgroundClip = "content-box";
b.cloneNode(true).style.backgroundClip = "";
x.clearCloneStyle = b.style.backgroundClip === "content-box";
x.boxSizing = s.boxSizing === "" || s.MozBoxSizing === "" || s.WebkitBoxSizing === "";
Q.extend(x, {
reliableHiddenOffsets: function() {
if (r == null) {
m()
}
return r
},
boxSizingReliable: function() {
if (j == null) {
m()
}
return j
},
pixelPosition: function() {
if (p == null) {
m()
}
return p
},
reliableMarginRight: function() {
if (l == null) {
m()
}
return l
}
});
function m() {
var b, n, t, v;
n = J.getElementsByTagName("body")[0];
if (!n || !n.style) {
return
}
b = J.createElement("div");
t = J.createElement("div");
t.style.cssText = "position:absolute;border:0;width:0;height:0;top:0;left:-9999px";
n.appendChild(t).appendChild(b);
b.style.cssText = "-webkit-box-sizing:border-box;-moz-box-sizing:border-box;" + "box-sizing:border-box;display:block;margin-top:1%;top:1%;" + "border:1px;padding:1px;width:4px;position:absolute";
p = j = false;
l = true;
if (w.getComputedStyle) {
p = (w.getComputedStyle(b, null) || {}).top !== "1%";
j = (w.getComputedStyle(b, null) || {
width: "4px"
}).width === "4px";
v = b.appendChild(J.createElement("div"));
v.style.cssText = b.style.cssText = "-webkit-box-sizing:content-box;-moz-box-sizing:content-box;" + "box-sizing:content-box;display:block;margin:0;border:0;padding:0";
v.style.marginRight = v.style.width = "0";
b.style.width = "1px";
l = !parseFloat((w.getComputedStyle(v, null) || {}).marginRight)
}
b.innerHTML = "<table><tr><td></td><td>t</td></tr></table>";
v = b.getElementsByTagName("td");
v[0].style.cssText = "margin:0;border:0;padding:0;display:none";
r = v[0].offsetHeight === 0;
if (r) {
v[0].style.display = "";
v[1].style.display = "none";
r = v[0].offsetHeight === 0
}
n.removeChild(t)
}
})();
Q.swap = function(a, b, j, l) {
var r, n, m = {};
for (n in b) {
m[n] = a.style[n];
a.style[n] = b[n]
}
r = j.apply(a, l || []);
for (n in b) {
a.style[n] = m[n]
}
return r
};
var Z1 = /alpha\([^)]*\)/i,
$1 = /opacity\s*=\s*([^)]*)/,
_1 = /^(none|table(?!-c[ea]).+)/,
a2 = new RegExp("^(" + d1 + ")(.*)$", "i"),
b2 = new RegExp("^([+-])=(" + d1 + ")", "i"),
c2 = {
position: "absolute",
visibility: "hidden",
display: "block"
},
d2 = {
letterSpacing: "0",
fontWeight: "400"
},
e2 = ["Webkit", "O", "Moz", "ms"];
function f2(s, n) {
if (n in s) {
return n
}
var a = n.charAt(0).toUpperCase() + n.slice(1),
b = n,
i = e2.length;
while (i--) {
n = e2[i] + a;
if (n in s) {
return n
}
}
return b
}
function g2(a, s) {
var b, j, l, v = [],
m = 0,
n = a.length;
for (; m < n; m++) {
j = a[m];
if (!j.style) {
continue
}
v[m] = Q._data(j, "olddisplay");
b = j.style.display;
if (s) {
if (!v[m] && b === "none") {
j.style.display = ""
}
if (j.style.display === "" && f1(j)) {
v[m] = Q._data(j, "olddisplay", S1(j.nodeName))
}
} else {
l = f1(j);
if (b && b !== "none" || !l) {
Q._data(j, "olddisplay", l ? b : Q.css(j, "display"))
}
}
}
for (m = 0; m < n; m++) {
j = a[m];
if (!j.style) {
continue
}
if (!s || j.style.display === "none" || j.style.display === "") {
j.style.display = s ? v[m] || "" : "none"
}
}
return a
}
function h2(a, v, s) {
var m = a2.exec(v);
return m ? Math.max(0, m[1] - (s || 0)) + (m[2] || "px") : v
}
function i2(a, n, b, j, s) {
var i = b === (j ? "border" : "content") ? 4 : n === "width" ? 1 : 0,
v = 0;
for (; i < 4; i += 2) {
if (b === "margin") {
v += Q.css(a, b + e1[i], true, s)
}
if (j) {
if (b === "content") {
v -= Q.css(a, "padding" + e1[i], true, s)
}
if (b !== "margin") {
v -= Q.css(a, "border" + e1[i] + "Width", true, s)
}
} else {
v += Q.css(a, "padding" + e1[i], true, s);
if (b !== "padding") {
v += Q.css(a, "border" + e1[i] + "Width", true, s)
}
}
}
return v
}
function j2(a, n, b) {
var v = true,
j = n === "width" ? a.offsetWidth : a.offsetHeight,
s = V1(a),
l = x.boxSizing && Q.css(a, "boxSizing", false, s) === "border-box";
if (j <= 0 || j == null) {
j = W1(a, n, s);
if (j < 0 || j == null) {
j = a.style[n]
}
if (U1.test(j)) {
return j
}
v = l && (x.boxSizingReliable() || j === a.style[n]);
j = parseFloat(j) || 0
}
return (j + i2(a, n, b || (l ? "border" : "content"), v, s)) + "px"
}
Q.extend({
cssHooks: {
opacity: {
get: function(a, b) {
if (b) {
var r = W1(a, "opacity");
return r === "" ? "1" : r
}
}
}
},
cssNumber: {
"columnCount": true,
"fillOpacity": true,
"flexGrow": true,
"flexShrink": true,
"fontWeight": true,
"lineHeight": true,
"opacity": true,
"order": true,
"orphans": true,
"widows": true,
"zIndex": true,
"zoom": true
},
cssProps: {
"float": x.cssFloat ? "cssFloat" : "styleFloat"
},
style: function(a, n, v, b) {
if (!a || a.nodeType === 3 || a.nodeType === 8 || !a.style) {
return
}
var r, t, j, l = Q.camelCase(n),
s = a.style;
n = Q.cssProps[l] || (Q.cssProps[l] = f2(s, l));
j = Q.cssHooks[n] || Q.cssHooks[l];
if (v !== undefined) {
t = typeof v;
if (t === "string" && (r = b2.exec(v))) {
v = (r[1] + 1) * r[2] + parseFloat(Q.css(a, n));
t = "number"
}
if (v == null || v !== v) {
return
}
if (t === "number" && !Q.cssNumber[l]) {
v += "px"
}
if (!x.clearCloneStyle && v === "" && n.indexOf("background") === 0) {
s[n] = "inherit"
}
if (!j || !("set" in j) || (v = j.set(a, v, b)) !== undefined) {
try {
s[n] = v
} catch (e) {}
}
} else {
if (j && "get" in j && (r = j.get(a, false, b)) !== undefined) {
return r
}
return s[n]
}
},
css: function(a, n, b, s) {
var j, v, l, m = Q.camelCase(n);
n = Q.cssProps[m] || (Q.cssProps[m] = f2(a.style, m));
l = Q.cssHooks[n] || Q.cssHooks[m];
if (l && "get" in l) {
v = l.get(a, true, b)
}
if (v === undefined) {
v = W1(a, n, s)
}
if (v === "normal" && n in d2) {
v = d2[n]
}
if (b === "" || b) {
j = parseFloat(v);
return b === true || Q.isNumeric(j) ? j || 0 : v
}
return v
}
});
Q.each(["height", "width"], function(i, n) {
Q.cssHooks[n] = {
get: function(a, b, j) {
if (b) {
return _1.test(Q.css(a, "display")) && a.offsetWidth === 0 ? Q.swap(a, c2, function() {
return j2(a, n, j)
}) : j2(a, n, j)
}
},
set: function(a, v, b) {
var s = b && V1(a);
return h2(a, v, b ? i2(a, n, b, x.boxSizing && Q.css(a, "boxSizing", false, s) === "border-box", s) : 0)
}
}
});
if (!x.opacity) {
Q.cssHooks.opacity = {
get: function(a, b) {
return $1.test((b && a.currentStyle ? a.currentStyle.filter : a.style.filter) || "") ? (0.01 * parseFloat(RegExp.$1)) + "" : b ? "1" : ""
},
set: function(a, v) {
var s = a.style,
b = a.currentStyle,
j = Q.isNumeric(v) ? "alpha(opacity=" + v * 100 + ")" : "",
l = b && b.filter || s.filter || "";
s.zoom = 1;
if ((v >= 1 || v === "") && Q.trim(l.replace(Z1, "")) === "" && s.removeAttribute) {
s.removeAttribute("filter");
if (v === "" || b && !b.filter) {
return
}
}
s.filter = Z1.test(l) ? l.replace(Z1, j) : l + " " + j
}
}
}
Q.cssHooks.marginRight = Y1(x.reliableMarginRight, function(a, b) {
if (b) {
return Q.swap(a, {
"display": "inline-block"
}, W1, [a, "marginRight"])
}
});
Q.each({
margin: "",
padding: "",
border: "Width"
}, function(p, s) {
Q.cssHooks[p + s] = {
expand: function(v) {
var i = 0,
a = {},
b = typeof v === "string" ? v.split(" ") : [v];
for (; i < 4; i++) {
a[p + e1[i] + s] = b[i] || b[i - 2] || b[0]
}
return a
}
};
if (!T1.test(p)) {
Q.cssHooks[p + s].set = h2
}
});
Q.fn.extend({
css: function(n, v) {
return g1(this, function(a, n, v) {
var s, l, m = {},
i = 0;
if (Q.isArray(n)) {
s = V1(a);
l = n.length;
for (; i < l; i++) {
m[n[i]] = Q.css(a, n[i], false, s)
}
return m
}
return v !== undefined ? Q.style(a, n, v) : Q.css(a, n)
}, n, v, arguments.length > 1)
},
show: function() {
return g2(this, true)
},
hide: function() {
return g2(this)
},
toggle: function(s) {
if (typeof s === "boolean") {
return s ? this.show() : this.hide()
}
return this.each(function() {
if (f1(this)) {
Q(this).show()
} else {
Q(this).hide()
}
})
}
});
function k2(a, b, p, j, l) {
return new k2.prototype.init(a, b, p, j, l)
}
Q.Tween = k2;
k2.prototype = {
constructor: k2,
init: function(a, b, p, j, l, m) {
this.elem = a;
this.prop = p;
this.easing = l || "swing";
this.options = b;
this.start = this.now = this.cur();
this.end = j;
this.unit = m || (Q.cssNumber[p] ? "" : "px")
},
cur: function() {
var a = k2.propHooks[this.prop];
return a && a.get ? a.get(this) : k2.propHooks._default.get(this)
},
run: function(p) {
var a, b = k2.propHooks[this.prop];
if (this.options.duration) {
this.pos = a = Q.easing[this.easing](p, this.options.duration * p, 0, 1, this.options.duration)
} else {
this.pos = a = p
}
this.now = (this.end - this.start) * a + this.start;
if (this.options.step) {
this.options.step.call(this.elem, this.now, this)
}
if (b && b.set) {
b.set(this)
} else {
k2.propHooks._default.set(this)
}
return this
}
};
k2.prototype.init.prototype = k2.prototype;
k2.propHooks = {
_default: {
get: function(t) {
var r;
if (t.elem[t.prop] != null && (!t.elem.style || t.elem.style[t.prop] == null)) {
return t.elem[t.prop]
}
r = Q.css(t.elem, t.prop, "");
return !r || r === "auto" ? 0 : r
},
set: function(t) {
if (Q.fx.step[t.prop]) {
Q.fx.step[t.prop](t)
} else if (t.elem.style && (t.elem.style[Q.cssProps[t.prop]] != null || Q.cssHooks[t.prop])) {
Q.style(t.elem, t.prop, t.now + t.unit)
} else {
t.elem[t.prop] = t.now
}
}
}
};
k2.propHooks.scrollTop = k2.propHooks.scrollLeft = {
set: function(t) {
if (t.elem.nodeType && t.elem.parentNode) {
t.elem[t.prop] = t.now
}
}
};
Q.easing = {
linear: function(p) {
return p
},
swing: function(p) {
return 0.5 - Math.cos(p * Math.PI) / 2
}
};
Q.fx = k2.prototype.init;
Q.fx.step = {};
var l2, m2, n2 = /^(?:toggle|show|hide)$/,
o2 = new RegExp("^(?:([+-])=|)(" + d1 + ")([a-z%]*)$", "i"),
p2 = /queueHooks$/,
q2 = [v2],
r2 = {
"*": [function(p, v) {
var t = this.createTween(p, v),
a = t.cur(),
b = o2.exec(v),
j = b && b[3] || (Q.cssNumber[p] ? "" : "px"),
s = (Q.cssNumber[p] || j !== "px" && +a) && o2.exec(Q.css(t.elem, p)),
l = 1,
m = 20;
if (s && s[3] !== j) {
j = j || s[3];
b = b || [];
s = +a || 1;
do {
l = l || ".5";
s = s / l;
Q.style(t.elem, p, s + j)
} while (l !== (l = t.cur() / a) && l !== 1 && --m)
}
if (b) {
s = t.start = +s || +a || 0;
t.unit = j;
t.end = b[1] ? s + (b[1] + 1) * b[2] : +b[2]
}
return t
}]
};
function s2() {
setTimeout(function() {
l2 = undefined
});
return (l2 = Q.now())
}
function t2(t, a) {
var b, j = {
height: t
},
i = 0;
a = a ? 1 : 0;
for (; i < 4; i += 2 - a) {
b = e1[i];
j["margin" + b] = j["padding" + b] = t
}
if (a) {
j.opacity = j.width = t
}
return j
}
function u2(v, p, a) {
var t, b = (r2[p] || []).concat(r2["*"]),
j = 0,
l = b.length;
for (; j < l; j++) {
if ((t = b[j].call(a, p, v))) {
return t
}
}
}
function v2(a, p, b) {
var j, v, t, l, m, n, r, s, _ = this,
r3 = {},
s3 = a.style,
t3 = a.nodeType && f1(a),
u3 = Q._data(a, "fxshow");
if (!b.queue) {
m = Q._queueHooks(a, "fx");
if (m.unqueued == null) {
m.unqueued = 0;
n = m.empty.fire;
m.empty.fire = function() {
if (!m.unqueued) {
n()
}
}
}
m.unqueued++;
_.always(function() {
_.always(function() {
m.unqueued--;
if (!Q.queue(a, "fx").length) {
m.empty.fire()
}
})
})
}
if (a.nodeType === 1 && ("height" in p || "width" in p)) {
b.overflow = [s3.overflow, s3.overflowX, s3.overflowY];
r = Q.css(a, "display");
s = r === "none" ? Q._data(a, "olddisplay") || S1(a.nodeName) : r;
if (s === "inline" && Q.css(a, "float") === "none") {
if (!x.inlineBlockNeedsLayout || S1(a.nodeName) === "inline") {
s3.display = "inline-block"
} else {
s3.zoom = 1
}
}
}
if (b.overflow) {
s3.overflow = "hidden";
if (!x.shrinkWrapBlocks()) {
_.always(function() {
s3.overflow = b.overflow[0];
s3.overflowX = b.overflow[1];
s3.overflowY = b.overflow[2]
})
}
}
for (j in p) {
v = p[j];
if (n2.exec(v)) {
delete p[j];
t = t || v === "toggle";
if (v === (t3 ? "hide" : "show")) {
if (v === "show" && u3 && u3[j] !== undefined) {
t3 = true
} else {
continue
}
}
r3[j] = u3 && u3[j] || Q.style(a, j)
} else {
r = undefined
}
}
if (!Q.isEmptyObject(r3)) {
if (u3) {
if ("hidden" in u3) {
t3 = u3.hidden
}
} else {
u3 = Q._data(a, "fxshow", {})
}
if (t) {
u3.hidden = !t3
}
if (t3) {
Q(a).show()
} else {
_.done(function() {
Q(a).hide()
})
}
_.done(function() {
var j;
Q._removeData(a, "fxshow");
for (j in r3) {
Q.style(a, j, r3[j])
}
});
for (j in r3) {
l = u2(t3 ? u3[j] : 0, j, _);
if (!(j in u3)) {
u3[j] = l.start;
if (t3) {
l.end = l.start;
l.start = j === "width" || j === "height" ? 1 : 0
}
}
}
} else if ((r === "none" ? S1(a.nodeName) : r) === "inline") {
s3.display = r
}
}
function w2(p, s) {
var a, n, b, v, j;
for (a in p) {
n = Q.camelCase(a);
b = s[n];
v = p[a];
if (Q.isArray(v)) {
b = v[1];
v = p[a] = v[0]
}
if (a !== n) {
p[n] = v;
delete p[a]
}
j = Q.cssHooks[n];
if (j && "expand" in j) {
v = j.expand(v);
delete p[n];
for (a in v) {
if (!(a in p)) {
p[a] = v[a];
s[a] = b
}
}
} else {
s[n] = b
}
}
}
function x2(a, p, b) {
var r, s, j = 0,
l = q2.length,
m = Q.Deferred().always(function() {
delete t.elem
}),
t = function() {
if (s) {
return false
}
var _ = l2 || s2(),
r3 = Math.max(0, n.startTime + n.duration - _),
s3 = r3 / n.duration || 0,
t3 = 1 - s3,
j = 0,
l = n.tweens.length;
for (; j < l; j++) {
n.tweens[j].run(t3)
}
m.notifyWith(a, [n, t3, r3]);
if (t3 < 1 && l) {
return r3
} else {
m.resolveWith(a, [n]);
return false
}
},
n = m.promise({
elem: a,
props: Q.extend({}, p),
opts: Q.extend(true, {
specialEasing: {}
}, b),
originalProperties: p,
originalOptions: b,
startTime: l2 || s2(),
duration: b.duration,
tweens: [],
createTween: function(_, r3) {
var s3 = Q.Tween(a, n.opts, _, r3, n.opts.specialEasing[_] || n.opts.easing);
n.tweens.push(s3);
return s3
},
stop: function(_) {
var j = 0,
l = _ ? n.tweens.length : 0;
if (s) {
return this
}
s = true;
for (; j < l; j++) {
n.tweens[j].run(1)
}
if (_) {
m.resolveWith(a, [n, _])
} else {
m.rejectWith(a, [n, _])
}
return this
}
}),
v = n.props;
w2(v, n.opts.specialEasing);
for (; j < l; j++) {
r = q2[j].call(n, a, v, n.opts);
if (r) {
return r
}
}
Q.map(v, u2, n);
if (Q.isFunction(n.opts.start)) {
n.opts.start.call(a, n)
}
Q.fx.timer(Q.extend(t, {
elem: a,
anim: n,
queue: n.opts.queue
}));
return n.progress(n.opts.progress).done(n.opts.done, n.opts.complete).fail(n.opts.fail).always(n.opts.always)
}
Q.Animation = Q.extend(x2, {
tweener: function(p, a) {
if (Q.isFunction(p)) {
a = p;
p = ["*"]
} else {
p = p.split(" ")
}
var b, j = 0,
l = p.length;
for (; j < l; j++) {
b = p[j];
r2[b] = r2[b] || [];
r2[b].unshift(a)
}
},
prefilter: function(a, p) {
if (p) {
q2.unshift(a)
} else {
q2.push(a)
}
}
});
Q.speed = function(s, a, b) {
var j = s && typeof s === "object" ? Q.extend({}, s) : {
complete: b || !b && a || Q.isFunction(s) && s,
duration: s,
easing: b && a || a && !Q.isFunction(a) && a
};
j.duration = Q.fx.off ? 0 : typeof j.duration === "number" ? j.duration : j.duration in Q.fx.speeds ? Q.fx.speeds[j.duration] : Q.fx.speeds._default;
if (j.queue == null || j.queue === true) {
j.queue = "fx"
}
j.old = j.complete;
j.complete = function() {
if (Q.isFunction(j.old)) {
j.old.call(this)
}
if (j.queue) {
Q.dequeue(this, j.queue)
}
};
return j
};
Q.fn.extend({
fadeTo: function(s, t, a, b) {
return this.filter(f1).css("opacity", 0).show().end().animate({
opacity: t
}, s, a, b)
},
animate: function(p, s, a, b) {
var j = Q.isEmptyObject(p),
l = Q.speed(s, a, b),
m = function() {
var n = x2(this, Q.extend({}, p), l);
if (j || Q._data(this, "finish")) {
n.stop(true)
}
};
m.finish = m;
return j || l.queue === false ? this.each(m) : this.queue(l.queue, m)
},
stop: function(t, a, b) {
var s = function(j) {
var l = j.stop;
delete j.stop;
l(b)
};
if (typeof t !== "string") {
b = a;
a = t;
t = undefined
}
if (a && t !== false) {
this.queue(t || "fx", [])
}
return this.each(function() {
var j = true,
l = t != null && t + "queueHooks",
m = Q.timers,
n = Q._data(this);
if (l) {
if (n[l] && n[l].stop) {
s(n[l])
}
} else {
for (l in n) {
if (n[l] && n[l].stop && p2.test(l)) {
s(n[l])
}
}
}
for (l = m.length; l--;) {
if (m[l].elem === this && (t == null || m[l].queue === t)) {
m[l].anim.stop(b);
j = false;
m.splice(l, 1)
}
}
if (j || !b) {
Q.dequeue(this, t)
}
})
},
finish: function(t) {
if (t !== false) {
t = t || "fx"
}
return this.each(function() {
var a, b = Q._data(this),
j = b[t + "queue"],
l = b[t + "queueHooks"],
m = Q.timers,
n = j ? j.length : 0;
b.finish = true;
Q.queue(this, t, []);
if (l && l.stop) {
l.stop.call(this, true)
}
for (a = m.length; a--;) {
if (m[a].elem === this && m[a].queue === t) {
m[a].anim.stop(true);
m.splice(a, 1)
}
}
for (a = 0; a < n; a++) {
if (j[a] && j[a].finish) {
j[a].finish.call(this)
}
}
delete b.finish
})
}
});
Q.each(["toggle", "show", "hide"], function(i, n) {
var a = Q.fn[n];
Q.fn[n] = function(s, b, j) {
return s == null || typeof s === "boolean" ? a.apply(this, arguments) : this.animate(t2(n, true), s, b, j)
}
});
Q.each({
slideDown: t2("show"),
slideUp: t2("hide"),
slideToggle: t2("toggle"),
fadeIn: {
opacity: "show"
},
fadeOut: {
opacity: "hide"
},
fadeToggle: {
opacity: "toggle"
}
}, function(n, p) {
Q.fn[n] = function(s, a, b) {
return this.animate(p, s, a, b)
}
});
Q.timers = [];
Q.fx.tick = function() {
var t, a = Q.timers,
i = 0;
l2 = Q.now();
for (; i < a.length; i++) {
t = a[i];
if (!t() && a[i] === t) {
a.splice(i--, 1)
}
}
if (!a.length) {
Q.fx.stop()
}
l2 = undefined
};
Q.fx.timer = function(t) {
Q.timers.push(t);
if (t()) {
Q.fx.start()
} else {
Q.timers.pop()
}
};
Q.fx.interval = 13;
Q.fx.start = function() {
if (!m2) {
m2 = setInterval(Q.fx.tick, Q.fx.interval)
}
};
Q.fx.stop = function() {
clearInterval(m2);
m2 = null
};
Q.fx.speeds = {
slow: 600,
fast: 200,
_default: 400
};
Q.fn.delay = function(t, a) {
t = Q.fx ? Q.fx.speeds[t] || t : t;
a = a || "fx";
return this.queue(a, function(n, b) {
var j = setTimeout(n, t);
b.stop = function() {
clearTimeout(j)
}
})
};
(function() {
var b, j, s, a, l;
j = J.createElement("div");
j.setAttribute("className", "t");
j.innerHTML = " <link/><table></table><a href='/a'>a</a><input type='checkbox'/>";
a = j.getElementsByTagName("a")[0];
s = J.createElement("select");
l = s.appendChild(J.createElement("option"));
b = j.getElementsByTagName("input")[0];
a.style.cssText = "top:1px";
x.getSetAttribute = j.className !== "t";
x.style = /top/.test(a.getAttribute("style"));
x.hrefNormalized = a.getAttribute("href") === "/a";
x.checkOn = !!b.value;
x.optSelected = l.selected;
x.enctype = !!J.createElement("form").enctype;
s.disabled = true;
x.optDisabled = !l.disabled;
b = J.createElement("input");
b.setAttribute("value", "");
x.input = b.getAttribute("value") === "";
b.value = "t";
b.setAttribute("type", "radio");
x.radioValue = b.value === "t"
})();
var y2 = /\r/g;
Q.fn.extend({
val: function(v) {
var a, r, b, j = this[0];
if (!arguments.length) {
if (j) {
a = Q.valHooks[j.type] || Q.valHooks[j.nodeName.toLowerCase()];
if (a && "get" in a && (r = a.get(j, "value")) !== undefined) {
return r
}
r = j.value;
return typeof r === "string" ? r.replace(y2, "") : r == null ? "" : r
}
return
}
b = Q.isFunction(v);
return this.each(function(i) {
var l;
if (this.nodeType !== 1) {
return
}
if (b) {
l = v.call(this, i, Q(this).val())
} else {
l = v
}
if (l == null) {
l = ""
} else if (typeof l === "number") {
l += ""
} else if (Q.isArray(l)) {
l = Q.map(l, function(v) {
return v == null ? "" : v + ""
})
}
a = Q.valHooks[this.type] || Q.valHooks[this.nodeName.toLowerCase()];
if (!a || !("set" in a) || a.set(this, l, "value") === undefined) {
this.value = l
}
})
}
});
Q.extend({
valHooks: {
option: {
get: function(a) {
var v = Q.find.attr(a, "value");
return v != null ? v : Q.trim(Q.text(a))
}
},
select: {
get: function(a) {
var v, b, j = a.options,
l = a.selectedIndex,
m = a.type === "select-one" || l < 0,
n = m ? null : [],
p = m ? l + 1 : j.length,
i = l < 0 ? p : m ? l : 0;
for (; i < p; i++) {
b = j[i];
if ((b.selected || i === l) && (x.optDisabled ? !b.disabled : b.getAttribute("disabled") === null) && (!b.parentNode.disabled || !Q.nodeName(b.parentNode, "optgroup"))) {
v = Q(b).val();
if (m) {
return v
}
n.push(v)
}
}
return n
},
set: function(a, v) {
var b, j, l = a.options,
m = Q.makeArray(v),
i = l.length;
while (i--) {
j = l[i];
if (Q.inArray(Q.valHooks.option.get(j), m) >= 0) {
try {
j.selected = b = true
} catch (_) {
j.scrollHeight
}
} else {
j.selected = false
}
}
if (!b) {
a.selectedIndex = -1
}
return l
}
}
}
});
Q.each(["radio", "checkbox"], function() {
Q.valHooks[this] = {
set: function(a, v) {
if (Q.isArray(v)) {
return (a.checked = Q.inArray(Q(a).val(), v) >= 0)
}
}
};
if (!x.checkOn) {
Q.valHooks[this].get = function(a) {
return a.getAttribute("value") === null ? "on" : a.value
}
}
});
var z2, A2, B2 = Q.expr.attrHandle,
C2 = /^(?:checked|selected)$/i,
D2 = x.getSetAttribute,
E2 = x.input;
Q.fn.extend({
attr: function(n, v) {
return g1(this, Q.attr, n, v, arguments.length > 1)
},
removeAttr: function(n) {
return this.each(function() {
Q.removeAttr(this, n)
})
}
});
Q.extend({
attr: function(a, n, v) {
var b, r, j = a.nodeType;
if (!a || j === 3 || j === 8 || j === 2) {
return
}
if (typeof a.getAttribute === X) {
return Q.prop(a, n, v)
}
if (j !== 1 || !Q.isXMLDoc(a)) {
n = n.toLowerCase();
b = Q.attrHooks[n] || (Q.expr.match.bool.test(n) ? A2 : z2)
}
if (v !== undefined) {
if (v === null) {
Q.removeAttr(a, n)
} else if (b && "set" in b && (r = b.set(a, v, n)) !== undefined) {
return r
} else {
a.setAttribute(n, v + "");
return v
}
} else if (b && "get" in b && (r = b.get(a, n)) !== null) {
return r
} else {
r = Q.find.attr(a, n);
return r == null ? undefined : r
}
},
removeAttr: function(a, v) {
var n, p, i = 0,
b = v && v.match(P);
if (b && a.nodeType === 1) {
while ((n = b[i++])) {
p = Q.propFix[n] || n;
if (Q.expr.match.bool.test(n)) {
if (E2 && D2 || !C2.test(n)) {
a[p] = false
} else {
a[Q.camelCase("default-" + n)] = a[p] = false
}
} else {
Q.attr(a, n, "")
}
a.removeAttribute(D2 ? n : p)
}
}
},
attrHooks: {
type: {
set: function(a, v) {
if (!x.radioValue && v === "radio" && Q.nodeName(a, "input")) {
var b = a.value;
a.setAttribute("type", v);
if (b) {
a.value = b
}
return v
}
}
}
}
});
A2 = {
set: function(a, v, n) {
if (v === false) {
Q.removeAttr(a, n)
} else if (E2 && D2 || !C2.test(n)) {
a.setAttribute(!D2 && Q.propFix[n] || n, n)
} else {
a[Q.camelCase("default-" + n)] = a[n] = true
}
return n
}
};
Q.each(Q.expr.match.bool.source.match(/\w+/g), function(i, n) {
var a = B2[n] || Q.find.attr;
B2[n] = E2 && D2 || !C2.test(n) ? function(b, n, j) {
var r, l;
if (!j) {
l = B2[n];
B2[n] = r;
r = a(b, n, j) != null ? n.toLowerCase() : null;
B2[n] = l
}
return r
} : function(b, n, j) {
if (!j) {
return b[Q.camelCase("default-" + n)] ? n.toLowerCase() : null
}
}
});
if (!E2 || !D2) {
Q.attrHooks.value = {
set: function(a, v, n) {
if (Q.nodeName(a, "input")) {
a.defaultValue = v
} else {
return z2 && z2.set(a, v, n)
}
}
}
}
if (!D2) {
z2 = {
set: function(a, v, n) {
var r = a.getAttributeNode(n);
if (!r) {
a.setAttributeNode((r = a.ownerDocument.createAttribute(n)))
}
r.value = v += "";
if (n === "value" || v === a.getAttribute(n)) {
return v
}
}
};
B2.id = B2.name = B2.coords = function(a, n, b) {
var r;
if (!b) {
return (r = a.getAttributeNode(n)) && r.value !== "" ? r.value : null
}
};
Q.valHooks.button = {
get: function(a, n) {
var r = a.getAttributeNode(n);
if (r && r.specified) {
return r.value
}
},
set: z2.set
};
Q.attrHooks.contenteditable = {
set: function(a, v, n) {
z2.set(a, v === "" ? false : v, n)
}
};
Q.each(["width", "height"], function(i, n) {
Q.attrHooks[n] = {
set: function(a, v) {
if (v === "") {
a.setAttribute(n, "auto");
return v
}
}
}
})
}
if (!x.style) {
Q.attrHooks.style = {
get: function(a) {
return a.style.cssText || undefined
},
set: function(a, v) {
return (a.style.cssText = v + "")
}
}
}
var F2 = /^(?:input|select|textarea|button|object)$/i,
G2 = /^(?:a|area)$/i;
Q.fn.extend({
prop: function(n, v) {
return g1(this, Q.prop, n, v, arguments.length > 1)
},
removeProp: function(n) {
n = Q.propFix[n] || n;
return this.each(function() {
try {
this[n] = undefined;
delete this[n]
} catch (e) {}
})
}
});
Q.extend({
propFix: {
"for": "htmlFor",
"class": "className"
},
prop: function(a, n, v) {
var r, b, j, l = a.nodeType;
if (!a || l === 3 || l === 8 || l === 2) {
return
}
j = l !== 1 || !Q.isXMLDoc(a);
if (j) {
n = Q.propFix[n] || n;
b = Q.propHooks[n]
}
if (v !== undefined) {
return b && "set" in b && (r = b.set(a, v, n)) !== undefined ? r : (a[n] = v)
} else {
return b && "get" in b && (r = b.get(a, n)) !== null ? r : a[n]
}
},
propHooks: {
tabIndex: {
get: function(a) {
var t = Q.find.attr(a, "tabindex");
return t ? parseInt(t, 10) : F2.test(a.nodeName) || G2.test(a.nodeName) && a.href ? 0 : -1
}
}
}
});
if (!x.hrefNormalized) {
Q.each(["href", "src"], function(i, n) {
Q.propHooks[n] = {
get: function(a) {
return a.getAttribute(n, 4)
}
}
})
}
if (!x.optSelected) {
Q.propHooks.selected = {
get: function(a) {
var p = a.parentNode;
if (p) {
p.selectedIndex;
if (p.parentNode) {
p.parentNode.selectedIndex
}
}
return null
}
}
}
Q.each(["tabIndex", "readOnly", "maxLength", "cellSpacing", "cellPadding", "rowSpan", "colSpan", "useMap", "frameBorder", "contentEditable"], function() {
Q.propFix[this.toLowerCase()] = this
});
if (!x.enctype) {
Q.propFix.enctype = "encoding"
}
var H2 = /[\t\r\n\f]/g;
Q.fn.extend({
addClass: function(v) {
var a, b, l, m, j, n, i = 0,
p = this.length,
r = typeof v === "string" && v;
if (Q.isFunction(v)) {
return this.each(function(j) {
Q(this).addClass(v.call(this, j, this.className))
})
}
if (r) {
a = (v || "").match(P) || [];
for (; i < p; i++) {
b = this[i];
l = b.nodeType === 1 && (b.className ? (" " + b.className + " ").replace(H2, " ") : " ");
if (l) {
j = 0;
while ((m = a[j++])) {
if (l.indexOf(" " + m + " ") < 0) {
l += m + " "
}
}
n = Q.trim(l);
if (b.className !== n) {
b.className = n
}
}
}
}
return this
},
removeClass: function(v) {
var a, b, l, m, j, n, i = 0,
p = this.length,
r = arguments.length === 0 || typeof v === "string" && v;
if (Q.isFunction(v)) {
return this.each(function(j) {
Q(this).removeClass(v.call(this, j, this.className))
})
}
if (r) {
a = (v || "").match(P) || [];
for (; i < p; i++) {
b = this[i];
l = b.nodeType === 1 && (b.className ? (" " + b.className + " ").replace(H2, " ") : "");
if (l) {
j = 0;
while ((m = a[j++])) {
while (l.indexOf(" " + m + " ") >= 0) {
l = l.replace(" " + m + " ", " ")
}
}
n = v ? Q.trim(l) : "";
if (b.className !== n) {
b.className = n
}
}
}
}
return this
},
toggleClass: function(v, s) {
var t = typeof v;
if (typeof s === "boolean" && t === "string") {
return s ? this.addClass(v) : this.removeClass(v)
}
if (Q.isFunction(v)) {
return this.each(function(i) {
Q(this).toggleClass(v.call(this, i, this.className, s), s)
})
}
return this.each(function() {
if (t === "string") {
var a, i = 0,
b = Q(this),
j = v.match(P) || [];
while ((a = j[i++])) {
if (b.hasClass(a)) {
b.removeClass(a)
} else {
b.addClass(a)
}
}
} else if (t === X || t === "boolean") {
if (this.className) {
Q._data(this, "__className__", this.className)
}
this.className = this.className || v === false ? "" : Q._data(this, "__className__") || ""
}
})
},
hasClass: function(s) {
var a = " " + s + " ",
i = 0,
l = this.length;
for (; i < l; i++) {
if (this[i].nodeType === 1 && (" " + this[i].className + " ").replace(H2, " ").indexOf(a) >= 0) {
return true
}
}
return false
}
});
Q.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(i, n) {
Q.fn[n] = function(a, b) {
return arguments.length > 0 ? this.on(n, null, a, b) : this.trigger(n)
}
});
Q.fn.extend({
hover: function(a, b) {
return this.mouseenter(a).mouseleave(b || a)
},
bind: function(t, a, b) {
return this.on(t, null, a, b)
},
unbind: function(t, a) {
return this.off(t, null, a)
},
delegate: function(s, t, a, b) {
return this.on(t, s, a, b)
},
undelegate: function(s, t, a) {
return arguments.length === 1 ? this.off(s, "**") : this.off(t, s || "**", a)
}
});
var I2 = Q.now();
var J2 = (/\?/);
var K2 = /(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;
Q.parseJSON = function(a) {
if (w.JSON && w.JSON.parse) {
return w.JSON.parse(a + "")
}
var r, b = null,
s = Q.trim(a + "");
return s && !Q.trim(s.replace(K2, function(t, j, l, m) {
if (r && j) {
b = 0
}
if (b === 0) {
return t
}
r = l || j;
b += !m - !l;
return ""
})) ? (Function("return " + s))() : Q.error("Invalid JSON: " + a)
};
Q.parseXML = function(a) {
var b, t;
if (!a || typeof a !== "string") {
return null
}
try {
if (w.DOMParser) {
t = new DOMParser();
b = t.parseFromString(a, "text/xml")
} else {
b = new ActiveXObject("Microsoft.XMLDOM");
b.async = "false";
b.loadXML(a)
}
} catch (e) {
b = undefined
}
if (!b || !b.documentElement || b.getElementsByTagName("parsererror").length) {
Q.error("Invalid XML: " + a)
}
return b
};
var L2, M2, N2 = /#.*$/,
O2 = /([?&])_=[^&]*/,
P2 = /^(.*?):[ \t]*([^\r\n]*)\r?$/mg,
Q2 = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/,
R2 = /^(?:GET|HEAD)$/,
S2 = /^\/\//,
T2 = /^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,
U2 = {},
V2 = {},
W2 = "*/".concat("*");
try {
M2 = location.href
} catch (e) {
M2 = J.createElement("a");
M2.href = "";
M2 = M2.href
}
L2 = T2.exec(M2.toLowerCase()) || [];
function X2(s) {
return function(a, b) {
if (typeof a !== "string") {
b = a;
a = "*"
}
var j, i = 0,
l = a.toLowerCase().match(P) || [];
if (Q.isFunction(b)) {
while ((j = l[i++])) {
if (j.charAt(0) === "+") {
j = j.slice(1) || "*";
(s[j] = s[j] || []).unshift(b)
} else {
(s[j] = s[j] || []).push(b)
}
}
}
}
}
function Y2(s, a, b, j) {
var l = {},
m = (s === V2);
function n(p) {
var r;
l[p] = true;
Q.each(s[p] || [], function(_, t) {
var v = t(a, b, j);
if (typeof v === "string" && !m && !l[v]) {
a.dataTypes.unshift(v);
n(v);
return false
} else if (m) {
return !(r = v)
}
});
return r
}
return n(a.dataTypes[0]) || !l["*"] && n("*")
}
function Z2(t, s) {
var a, b, j = Q.ajaxSettings.flatOptions || {};
for (b in s) {
if (s[b] !== undefined) {
(j[b] ? t : (a || (a = {})))[b] = s[b]
}
}
if (a) {
Q.extend(true, t, a)
}
return t
}
function $2(s, j, r) {
var a, b, l, t, m = s.contents,
n = s.dataTypes;
while (n[0] === "*") {
n.shift();
if (b === undefined) {
b = s.mimeType || j.getResponseHeader("Content-Type")
}
}
if (b) {
for (t in m) {
if (m[t] && m[t].test(b)) {
n.unshift(t);
break
}
}
}
if (n[0] in r) {
l = n[0]
} else {
for (t in r) {
if (!n[0] || s.converters[t + " " + n[0]]) {
l = t;
break
}
if (!a) {
a = t
}
}
l = l || a
}
if (l) {
if (l !== n[0]) {
n.unshift(l)
}
return r[l]
}
}
function _2(s, r, j, a) {
var b, l, m, t, p, n = {},
v = s.dataTypes.slice();
if (v[1]) {
for (m in s.converters) {
n[m.toLowerCase()] = s.converters[m]
}
}
l = v.shift();
while (l) {
if (s.responseFields[l]) {
j[s.responseFields[l]] = r
}
if (!p && a && s.dataFilter) {
r = s.dataFilter(r, s.dataType)
}
p = l;
l = v.shift();
if (l) {
if (l === "*") {
l = p
} else if (p !== "*" && p !== l) {
m = n[p + " " + l] || n["* " + l];
if (!m) {
for (b in n) {
t = b.split(" ");
if (t[1] === l) {
m = n[p + " " + t[0]] || n["* " + t[0]];
if (m) {
if (m === true) {
m = n[b]
} else if (n[b] !== true) {
l = t[0];
v.unshift(t[1])
}
break
}
}
}
}
if (m !== true) {
if (m && s["throws"]) {
r = m(r)
} else {
try {
r = m(r)
} catch (e) {
return {
state: "parsererror",
error: m ? e : "No conversion from " + p + " to " + l
}
}
}
}
}
}
}
return {
state: "success",
data: r
}
}
Q.extend({
active: 0,
lastModified: {},
etag: {},
ajaxSettings: {
url: M2,
type: "GET",
isLocal: Q2.test(L2[1]),
global: true,
processData: true,
async: true,
contentType: "application/x-www-form-urlencoded; charset=UTF-8",
accepts: {
"*": W2,
text: "text/plain",
html: "text/html",
xml: "application/xml, text/xml",
json: "application/json, text/javascript"
},
contents: {
xml: /xml/,
html: /html/,
json: /json/
},
responseFields: {
xml: "responseXML",
text: "responseText",
json: "responseJSON"
},
converters: {
"* text": String,
"text html": true,
"text json": Q.parseJSON,
"text xml": Q.parseXML
},
flatOptions: {
url: true,
context: true
}
},
ajaxSetup: function(t, s) {
return s ? Z2(Z2(t, Q.ajaxSettings), s) : Z2(Q.ajaxSettings, t)
},
ajaxPrefilter: X2(U2),
ajaxTransport: X2(V2),
ajax: function(a, b) {
if (typeof a === "object") {
b = a;
a = undefined
}
b = b || {};
var p, i, j, r, t, l, m, n, s = Q.ajaxSetup({}, b),
v = s.context || s,
_ = s.context && (v.nodeType || v.jquery) ? Q(v) : Q.event,
r3 = Q.Deferred(),
s3 = Q.Callbacks("once memory"),
t3 = s.statusCode || {},
u3 = {},
v3 = {},
w3 = 0,
x3 = "canceled",
y3 = {
readyState: 0,
getResponseHeader: function(A3) {
var B3;
if (w3 === 2) {
if (!n) {
n = {};
while ((B3 = P2.exec(r))) {
n[B3[1].toLowerCase()] = B3[2]
}
}
B3 = n[A3.toLowerCase()]
}
return B3 == null ? null : B3
},
getAllResponseHeaders: function() {
return w3 === 2 ? r : null
},
setRequestHeader: function(A3, B3) {
var C3 = A3.toLowerCase();
if (!w3) {
A3 = v3[C3] = v3[C3] || A3;
u3[A3] = B3
}
return this
},
overrideMimeType: function(A3) {
if (!w3) {
s.mimeType = A3
}
return this
},
statusCode: function(A3) {
var B3;
if (A3) {
if (w3 < 2) {
for (B3 in A3) {
t3[B3] = [t3[B3], A3[B3]]
}
} else {
y3.always(A3[y3.status])
}
}
return this
},
abort: function(A3) {
var B3 = A3 || x3;
if (m) {
m.abort(B3)
}
z3(0, B3);
return this
}
};
r3.promise(y3).complete = s3.add;
y3.success = y3.done;
y3.error = y3.fail;
s.url = ((a || s.url || M2) + "").replace(N2, "").replace(S2, L2[1] + "//");
s.type = b.method || b.type || s.method || s.type;
s.dataTypes = Q.trim(s.dataType || "*").toLowerCase().match(P) || [""];
if (s.crossDomain == null) {
p = T2.exec(s.url.toLowerCase());
s.crossDomain = !!(p && (p[1] !== L2[1] || p[2] !== L2[2] || (p[3] || (p[1] === "http:" ? "80" : "443")) !== (L2[3] || (L2[1] === "http:" ? "80" : "443"))))
}
if (s.data && s.processData && typeof s.data !== "string") {
s.data = Q.param(s.data, s.traditional)
}
Y2(U2, s, b, y3);
if (w3 === 2) {
return y3
}
l = s.global;
if (l && Q.active++ === 0) {
Q.event.trigger("ajaxStart")
}
s.type = s.type.toUpperCase();
s.hasContent = !R2.test(s.type);
j = s.url;
if (!s.hasContent) {
if (s.data) {
j = (s.url += (J2.test(j) ? "&" : "?") + s.data);
delete s.data
}
if (s.cache === false) {
s.url = O2.test(j) ? j.replace(O2, "$1_=" + I2++) : j + (J2.test(j) ? "&" : "?") + "_=" + I2++
}
}
if (s.ifModified) {
if (Q.lastModified[j]) {
y3.setRequestHeader("If-Modified-Since", Q.lastModified[j])
}
if (Q.etag[j]) {
y3.setRequestHeader("If-None-Match", Q.etag[j])
}
}
if (s.data && s.hasContent && s.contentType !== false || b.contentType) {
y3.setRequestHeader("Content-Type", s.contentType)
}
y3.setRequestHeader("Accept", s.dataTypes[0] && s.accepts[s.dataTypes[0]] ? s.accepts[s.dataTypes[0]] + (s.dataTypes[0] !== "*" ? ", " + W2 + "; q=0.01" : "") : s.accepts["*"]);
for (i in s.headers) {
y3.setRequestHeader(i, s.headers[i])
}
if (s.beforeSend && (s.beforeSend.call(v, y3, s) === false || w3 === 2)) {
return y3.abort()
}
x3 = "abort";
for (i in {
success: 1,
error: 1,
complete: 1
}) {
y3[i](s[i])
}
m = Y2(V2, s, b, y3);
if (!m) {
z3(-1, "No Transport")
} else {
y3.readyState = 1;
if (l) {
_.trigger("ajaxSend", [y3, s])
}
if (s.async && s.timeout > 0) {
t = setTimeout(function() {
y3.abort("timeout")
}, s.timeout)
}
try {
w3 = 1;
m.send(u3, z3)
} catch (e) {
if (w3 < 2) {
z3(-1, e)
} else {
throw e
}
}
}
function z3(A3, B3, C3, D3) {
var E3, F3, G3, H3, I3, J3 = B3;
if (w3 === 2) {
return
}
w3 = 2;
if (t) {
clearTimeout(t)
}
m = undefined;
r = D3 || "";
y3.readyState = A3 > 0 ? 4 : 0;
E3 = A3 >= 200 && A3 < 300 || A3 === 304;
if (C3) {
H3 = $2(s, y3, C3)
}
H3 = _2(s, H3, y3, E3);
if (E3) {
if (s.ifModified) {
I3 = y3.getResponseHeader("Last-Modified");
if (I3) {
Q.lastModified[j] = I3
}
I3 = y3.getResponseHeader("etag");
if (I3) {
Q.etag[j] = I3
}
}
if (A3 === 204 || s.type === "HEAD") {
J3 = "nocontent"
} else if (A3 === 304) {
J3 = "notmodified"
} else {
J3 = H3.state;
F3 = H3.data;
G3 = H3.error;
E3 = !G3
}
} else {
G3 = J3;
if (A3 || !J3) {
J3 = "error";
if (A3 < 0) {
A3 = 0
}
}
}
y3.status = A3;
y3.statusText = (B3 || J3) + "";
if (E3) {
r3.resolveWith(v, [F3, J3, y3])
} else {
r3.rejectWith(v, [y3, J3, G3])
}
y3.statusCode(t3);
t3 = undefined;
if (l) {
_.trigger(E3 ? "ajaxSuccess" : "ajaxError", [y3, s, E3 ? F3 : G3])
}
s3.fireWith(v, [y3, J3]);
if (l) {
_.trigger("ajaxComplete", [y3, s]);
if (!(--Q.active)) {
Q.event.trigger("ajaxStop")
}
}
}
return y3
},
getJSON: function(a, b, j) {
return Q.get(a, b, j, "json")
},
getScript: function(a, b) {
return Q.get(a, undefined, b, "script")
}
});
Q.each(["get", "post"], function(i, m) {
Q[m] = function(a, b, j, t) {
if (Q.isFunction(b)) {
t = t || j;
j = b;
b = undefined
}
return Q.ajax({
url: a,
type: m,
dataType: t,
data: b,
success: j
})
}
});
Q.each(["ajaxStart", "ajaxStop", "ajaxComplete", "ajaxError", "ajaxSuccess", "ajaxSend"], function(i, t) {
Q.fn[t] = function(a) {
return this.on(t, a)
}
});
Q._evalUrl = function(a) {
return Q.ajax({
url: a,
type: "GET",
dataType: "script",
async: false,
global: false,
"throws": true
})
};
Q.fn.extend({
wrapAll: function(a) {
if (Q.isFunction(a)) {
return this.each(function(i) {
Q(this).wrapAll(a.call(this, i))
})
}
if (this[0]) {
var b = Q(a, this[0].ownerDocument).eq(0).clone(true);
if (this[0].parentNode) {
b.insertBefore(this[0])
}
b.map(function() {
var j = this;
while (j.firstChild && j.firstChild.nodeType === 1) {
j = j.firstChild
}
return j
}).append(this)
}
return this
},
wrapInner: function(a) {
if (Q.isFunction(a)) {
return this.each(function(i) {
Q(this).wrapInner(a.call(this, i))
})
}
return this.each(function() {
var s = Q(this),
b = s.contents();
if (b.length) {
b.wrapAll(a)
} else {
s.append(a)
}
})
},
wrap: function(a) {
var b = Q.isFunction(a);
return this.each(function(i) {
Q(this).wrapAll(b ? a.call(this, i) : a)
})
},
unwrap: function() {
return this.parent().each(function() {
if (!Q.nodeName(this, "body")) {
Q(this).replaceWith(this.childNodes)
}
}).end()
}
});
Q.expr.filters.hidden = function(a) {
return a.offsetWidth <= 0 && a.offsetHeight <= 0 || (!x.reliableHiddenOffsets() && ((a.style && a.style.display) || Q.css(a, "display")) === "none")
};
Q.expr.filters.visible = function(a) {
return !Q.expr.filters.hidden(a)
};
var a3 = /%20/g,
b3 = /\[\]$/,
c3 = /\r?\n/g,
d3 = /^(?:submit|button|image|reset|file)$/i,
e3 = /^(?:input|select|textarea|keygen)/i;
function f3(p, a, t, b) {
var n;
if (Q.isArray(a)) {
Q.each(a, function(i, v) {
if (t || b3.test(p)) {
b(p, v)
} else {
f3(p + "[" + (typeof v === "object" ? i : "") + "]", v, t, b)
}
})
} else if (!t && Q.type(a) === "object") {
for (n in a) {
f3(p + "[" + n + "]", a[n], t, b)
}
} else {
b(p, a)
}
}
Q.param = function(a, t) {
var p, s = [],
b = function(j, v) {
v = Q.isFunction(v) ? v() : (v == null ? "" : v);
s[s.length] = encodeURIComponent(j) + "=" + encodeURIComponent(v)
};
if (t === undefined) {
t = Q.ajaxSettings && Q.ajaxSettings.traditional
}
if (Q.isArray(a) || (a.jquery && !Q.isPlainObject(a))) {
Q.each(a, function() {
b(this.name, this.value)
})
} else {
for (p in a) {
f3(p, a[p], t, b)
}
}
return s.join("&").replace(a3, "+")
};
Q.fn.extend({
serialize: function() {
return Q.param(this.serializeArray())
},
serializeArray: function() {
return this.map(function() {
var a = Q.prop(this, "elements");
return a ? Q.makeArray(a) : this
}).filter(function() {
var t = this.type;
return this.name && !Q(this).is(":disabled") && e3.test(this.nodeName) && !d3.test(t) && (this.checked || !h1.test(t))
}).map(function(i, a) {
var v = Q(this).val();
return v == null ? null : Q.isArray(v) ? Q.map(v, function(v) {
return {
name: a.name,
value: v.replace(c3, "\r\n")
}
}) : {
name: a.name,
value: v.replace(c3, "\r\n")
}
}).get()
}
});
Q.ajaxSettings.xhr = w.ActiveXObject !== undefined ? function() {
return !this.isLocal && /^(get|post|head|put|delete|options)$/i.test(this.type) && j3() || k3()
} : j3;
var g3 = 0,
h3 = {},
i3 = Q.ajaxSettings.xhr();
if (w.ActiveXObject) {
Q(w).on("unload", function() {
for (var a in h3) {
h3[a](undefined, true)
}
})
}
x.cors = !!i3 && ("withCredentials" in i3);
i3 = x.ajax = !!i3;
if (i3) {
Q.ajaxTransport(function(a) {
if (!a.crossDomain || x.cors) {
var b;
return {
send: function(j, l) {
var i, m = a.xhr(),
n = ++g3;
m.open(a.type, a.url, a.async, a.username, a.password);
if (a.xhrFields) {
for (i in a.xhrFields) {
m[i] = a.xhrFields[i]
}
}
if (a.mimeType && m.overrideMimeType) {
m.overrideMimeType(a.mimeType)
}
if (!a.crossDomain && !j["X-Requested-With"]) {
j["X-Requested-With"] = "XMLHttpRequest"
}
for (i in j) {
if (j[i] !== undefined) {
m.setRequestHeader(i, j[i] + "")
}
}
m.send((a.hasContent && a.data) || null);
b = function(_, p) {
var s, r, t;
if (b && (p || m.readyState === 4)) {
delete h3[n];
b = undefined;
m.onreadystatechange = Q.noop;
if (p) {
if (m.readyState !== 4) {
m.abort()
}
} else {
t = {};
s = m.status;
if (typeof m.responseText === "string") {
t.text = m.responseText
}
try {
r = m.statusText
} catch (e) {
r = ""
}
if (!s && a.isLocal && !a.crossDomain) {
s = t.text ? 200 : 404
} else if (s === 1223) {
s = 204
}
}
}
if (t) {
l(s, r, t, m.getAllResponseHeaders())
}
};
if (!a.async) {
b()
} else if (m.readyState === 4) {
setTimeout(b)
} else {
m.onreadystatechange = h3[n] = b
}
},
abort: function() {
if (b) {
b(undefined, true)
}
}
}
}
})
}
function j3() {
try {
return new w.XMLHttpRequest()
} catch (e) {}
}
function k3() {
try {
return new w.ActiveXObject("Microsoft.XMLHTTP")
} catch (e) {}
}
Q.ajaxSetup({
accepts: {
script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"
},
contents: {
script: /(?:java|ecma)script/
},
converters: {
"text script": function(t) {
Q.globalEval(t);
return t
}
}
});
Q.ajaxPrefilter("script", function(s) {
if (s.cache === undefined) {
s.cache = false
}
if (s.crossDomain) {
s.type = "GET";
s.global = false
}
});
Q.ajaxTransport("script", function(s) {
if (s.crossDomain) {
var a, b = J.head || Q("head")[0] || J.documentElement;
return {
send: function(_, j) {
a = J.createElement("script");
a.async = true;
if (s.scriptCharset) {
a.charset = s.scriptCharset
}
a.src = s.url;
a.onload = a.onreadystatechange = function(_, l) {
if (l || !a.readyState || /loaded|complete/.test(a.readyState)) {
a.onload = a.onreadystatechange = null;
if (a.parentNode) {
a.parentNode.removeChild(a)
}
a = null;
if (!l) {
j(200, "success")
}
}
};
b.insertBefore(a, b.firstChild)
},
abort: function() {
if (a) {
a.onload(undefined, true)
}
}
}
}
});
var l3 = [],
m3 = /(=)\?(?=&|$)|\?\?/;
Q.ajaxSetup({
jsonp: "callback",
jsonpCallback: function() {
var a = l3.pop() || (Q.expando + "_" + (I2++));
this[a] = true;
return a
}
});
Q.ajaxPrefilter("json jsonp", function(s, a, j) {
var b, l, r, m = s.jsonp !== false && (m3.test(s.url) ? "url" : typeof s.data === "string" && !(s.contentType || "").indexOf("application/x-www-form-urlencoded") && m3.test(s.data) && "data");
if (m || s.dataTypes[0] === "jsonp") {
b = s.jsonpCallback = Q.isFunction(s.jsonpCallback) ? s.jsonpCallback() : s.jsonpCallback;
if (m) {
s[m] = s[m].replace(m3, "$1" + b)
} else if (s.jsonp !== false) {
s.url += (J2.test(s.url) ? "&" : "?") + s.jsonp + "=" + b
}
s.converters["script json"] = function() {
if (!r) {
Q.error(b + " was not called")
}
return r[0]
};
s.dataTypes[0] = "json";
l = w[b];
w[b] = function() {
r = arguments
};
j.always(function() {
w[b] = l;
if (s[b]) {
s.jsonpCallback = a.jsonpCallback;
l3.push(b)
}
if (r && Q.isFunction(l)) {
l(r[0])
}
r = l = undefined
});
return "script"
}
});
Q.parseHTML = function(a, b, j) {
if (!a || typeof a !== "string") {
return null
}
if (typeof b === "boolean") {
j = b;
b = false
}
b = b || J;
var p = F.exec(a),
s = !j && [];
if (p) {
return [b.createElement(p[1])]
}
p = Q.buildFragment([a], b, s);
if (s && s.length) {
Q(s).remove()
}
return Q.merge([], p.childNodes)
};
var n3 = Q.fn.load;
Q.fn.load = function(a, p, b) {
if (typeof a !== "string" && n3) {
return n3.apply(this, arguments)
}
var s, r, t, j = this,
l = a.indexOf(" ");
if (l >= 0) {
s = Q.trim(a.slice(l, a.length));
a = a.slice(0, l)
}
if (Q.isFunction(p)) {
b = p;
p = undefined
} else if (p && typeof p === "object") {
t = "POST"
}
if (j.length > 0) {
Q.ajax({
url: a,
type: t,
dataType: "html",
data: p
}).done(function(m) {
r = arguments;
j.html(s ? Q("<div>").append(Q.parseHTML(m)).find(s) : m)
}).complete(b && function(m, n) {
j.each(b, r || [m.responseText, n, m])
})
}
return this
};
Q.expr.filters.animated = function(a) {
return Q.grep(Q.timers, function(b) {
return a === b.elem
}).length
};
var o3 = w.document.documentElement;
function p3(a) {
return Q.isWindow(a) ? a : a.nodeType === 9 ? a.defaultView || a.parentWindow : false
}
Q.offset = {
setOffset: function(a, b, i) {
var j, l, m, n, p, r, s, t = Q.css(a, "position"),
v = Q(a),
_ = {};
if (t === "static") {
a.style.position = "relative"
}
p = v.offset();
m = Q.css(a, "top");
r = Q.css(a, "left");
s = (t === "absolute" || t === "fixed") && Q.inArray("auto", [m, r]) > -1;
if (s) {
j = v.position();
n = j.top;
l = j.left
} else {
n = parseFloat(m) || 0;
l = parseFloat(r) || 0
}
if (Q.isFunction(b)) {
b = b.call(a, i, p)
}
if (b.top != null) {
_.top = (b.top - p.top) + n
}
if (b.left != null) {
_.left = (b.left - p.left) + l
}
if ("using" in b) {
b.using.call(a, _)
} else {
v.css(_)
}
}
};
Q.fn.extend({
offset: function(a) {
if (arguments.length) {
return a === undefined ? this : this.each(function(i) {
Q.offset.setOffset(this, a, i)
})
}
var o3, b, j = {
top: 0,
left: 0
},
l = this[0],
m = l && l.ownerDocument;
if (!m) {
return
}
o3 = m.documentElement;
if (!Q.contains(o3, l)) {
return j
}
if (typeof l.getBoundingClientRect !== X) {
j = l.getBoundingClientRect()
}
b = p3(m);
return {
top: j.top + (b.pageYOffset || o3.scrollTop) - (o3.clientTop || 0),
left: j.left + (b.pageXOffset || o3.scrollLeft) - (o3.clientLeft || 0)
}
},
position: function() {
if (!this[0]) {
return
}
var a, b, p = {
top: 0,
left: 0
},
j = this[0];
if (Q.css(j, "position") === "fixed") {
b = j.getBoundingClientRect()
} else {
a = this.offsetParent();
b = this.offset();
if (!Q.nodeName(a[0], "html")) {
p = a.offset()
}
p.top += Q.css(a[0], "borderTopWidth", true);
p.left += Q.css(a[0], "borderLeftWidth", true)
}
return {
top: b.top - p.top - Q.css(j, "marginTop", true),
left: b.left - p.left - Q.css(j, "marginLeft", true)
}
},
offsetParent: function() {
return this.map(function() {
var a = this.offsetParent || o3;
while (a && (!Q.nodeName(a, "html") && Q.css(a, "position") === "static")) {
a = a.offsetParent
}
return a || o3
})
}
});
Q.each({
scrollLeft: "pageXOffset",
scrollTop: "pageYOffset"
}, function(m, p) {
var t = /Y/.test(p);
Q.fn[m] = function(v) {
return g1(this, function(a, m, v) {
var b = p3(a);
if (v === undefined) {
return b ? (p in b) ? b[p] : b.document.documentElement[m] : a[m]
}
if (b) {
b.scrollTo(!t ? v : Q(b).scrollLeft(), t ? v : Q(b).scrollTop())
} else {
a[m] = v
}
}, m, v, arguments.length, null)
}
});
Q.each(["top", "left"], function(i, p) {
Q.cssHooks[p] = Y1(x.pixelPosition, function(a, b) {
if (b) {
b = W1(a, p);
return U1.test(b) ? Q(a).position()[p] + "px" : b
}
})
});
Q.each({
Height: "height",
Width: "width"
}, function(n, t) {
Q.each({
padding: "inner" + n,
content: t,
"": "outer" + n
}, function(a, b) {
Q.fn[b] = function(m, v) {
var j = arguments.length && (a || typeof m !== "boolean"),
l = a || (m === true || v === true ? "margin" : "border");
return g1(this, function(p, t, v) {
var r;
if (Q.isWindow(p)) {
return p.document.documentElement["client" + n]
}
if (p.nodeType === 9) {
r = p.documentElement;
return Math.max(p.body["scroll" + n], r["scroll" + n], p.body["offset" + n], r["offset" + n], r["client" + n])
}
return v === undefined ? Q.css(p, t, l) : Q.style(p, t, v, l)
}, t, j ? m : undefined, j, null)
}
})
});
Q.fn.size = function() {
return this.length
};
Q.fn.andSelf = Q.fn.addBack;
if (typeof define === "function" && define.amd) {
define("jquery", [], function() {
return Q
})
}
var q3 = w.jQuery,
_$ = w.$;
Q.noConflict = function(a) {
if (w.$ === Q) {
w.$ = _$
}
if (a && w.jQuery === Q) {
w.jQuery = q3
}
return Q
};
if (typeof c === X) {
w.jQuery = w.$ = Q
}
return Q
}));
/*!
* jQuery UI Position 1.10.4
* http://jqueryui.com
*
* Copyright 2014 jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
* http://api.jqueryui.com/position/
*/
(function($, u) {
$.ui = $.ui || {};
var c, m = Math.max,
a = Math.abs,
r = Math.round,
b = /left|center|right/,
d = /top|center|bottom/,
e = /[\+\-]\d+(\.[\d]+)?%?/,
f = /^\w+/,
g = /%$/,
_ = $.fn.position;
function h(o, w, i) {
return [parseFloat(o[0]) * (g.test(o[0]) ? w / 100 : 1), parseFloat(o[1]) * (g.test(o[1]) ? i / 100 : 1)]
}
function p(i, k) {
return parseInt($.css(i, k), 10) || 0
}
function j(i) {
var k = i[0];
if (k.nodeType === 9) {
return {
width: i.width(),
height: i.height(),
offset: {
top: 0,
left: 0
}
}
}
if ($.isWindow(k)) {
return {
width: i.width(),
height: i.height(),
offset: {
top: i.scrollTop(),
left: i.scrollLeft()
}
}
}
if (k.preventDefault) {
return {
width: 0,
height: 0,
offset: {
top: k.pageY,
left: k.pageX
}
}
}
return {
width: i.outerWidth(),
height: i.outerHeight(),
offset: i.offset()
}
}
$.position = {
scrollbarWidth: function() {
if (c !== u) {
return c
}
var w, i, k = $("<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),
l = k.children()[0];
$("body").append(k);
w = l.offsetWidth;
k.css("overflow", "scroll");
i = l.offsetWidth;
if (w === i) {
i = k[0].clientWidth
}
k.remove();
return (c = w - i)
},
getScrollInfo: function(w) {
var o = w.isWindow || w.isDocument ? "" : w.element.css("overflow-x"),
i = w.isWindow || w.isDocument ? "" : w.element.css("overflow-y"),
k = o === "scroll" || (o === "auto" && w.width < w.element[0].scrollWidth),
l = i === "scroll" || (i === "auto" && w.height < w.element[0].scrollHeight);
return {
width: l ? $.position.scrollbarWidth() : 0,
height: k ? $.position.scrollbarWidth() : 0
}
},
getWithinInfo: function(i) {
var w = $(i || window),
k = $.isWindow(w[0]),
l = !!w[0] && w[0].nodeType === 9;
return {
element: w,
isWindow: k,
isDocument: l,
offset: w.offset() || {
left: 0,
top: 0
},
scrollLeft: w.scrollLeft(),
scrollTop: w.scrollTop(),
width: k ? w.width() : w.outerWidth(),
height: k ? w.height() : w.outerHeight()
}
}
};
$.fn.position = function(o) {
if (!o || !o.of) {
return _.apply(this, arguments)
}
o = $.extend({}, o);
var k, t, l, n, q, s, v = $(o.of),
w = $.position.getWithinInfo(o.within),
x = $.position.getScrollInfo(w),
y = (o.collision || "flip").split(" "),
z = {};
s = j(v);
if (v[0].preventDefault) {
o.at = "left top"
}
t = s.width;
l = s.height;
n = s.offset;
q = $.extend({}, n);
$.each(["my", "at"], function() {
var i = (o[this] || "").split(" "),
A, B;
if (i.length === 1) {
i = b.test(i[0]) ? i.concat(["center"]) : d.test(i[0]) ? ["center"].concat(i) : ["center", "center"]
}
i[0] = b.test(i[0]) ? i[0] : "center";
i[1] = d.test(i[1]) ? i[1] : "center";
A = e.exec(i[0]);
B = e.exec(i[1]);
z[this] = [A ? A[0] : 0, B ? B[0] : 0];
o[this] = [f.exec(i[0])[0], f.exec(i[1])[0]]
});
if (y.length === 1) {
y[1] = y[0]
}
if (o.at[0] === "right") {
q.left += t
} else if (o.at[0] === "center") {
q.left += t / 2
}
if (o.at[1] === "bottom") {
q.top += l
} else if (o.at[1] === "center") {
q.top += l / 2
}
k = h(z.at, t, l);
q.left += k[0];
q.top += k[1];
return this.each(function() {
var A, B, C = $(this),
D = C.outerWidth(),
E = C.outerHeight(),
F = p(this, "marginLeft"),
G = p(this, "marginTop"),
H = D + F + p(this, "marginRight") + x.width,
I = E + G + p(this, "marginBottom") + x.height,
J = $.extend({}, q),
K = h(z.my, C.outerWidth(), C.outerHeight());
if (o.my[0] === "right") {
J.left -= D
} else if (o.my[0] === "center") {
J.left -= D / 2
}
if (o.my[1] === "bottom") {
J.top -= E
} else if (o.my[1] === "center") {
J.top -= E / 2
}
J.left += K[0];
J.top += K[1];
if (!$.support.offsetFractions) {
J.left = r(J.left);
J.top = r(J.top)
}
A = {
marginLeft: F,
marginTop: G
};
$.each(["left", "top"], function(i, L) {
if ($.ui.position[y[i]]) {
$.ui.position[y[i]][L](J, {
targetWidth: t,
targetHeight: l,
elemWidth: D,
elemHeight: E,
collisionPosition: A,
collisionWidth: H,
collisionHeight: I,
offset: [k[0] + K[0], k[1] + K[1]],
my: o.my,
at: o.at,
within: w,
elem: C
})
}
});
if (o.using) {
B = function(i) {
var L = n.left - J.left,
M = L + t - D,
N = n.top - J.top,
O = N + l - E,
P = {
target: {
element: v,
left: n.left,
top: n.top,
width: t,
height: l
},
element: {
element: C,
left: J.left,
top: J.top,
width: D,
height: E
},
horizontal: M < 0 ? "left" : L > 0 ? "right" : "center",
vertical: O < 0 ? "top" : N > 0 ? "bottom" : "middle"
};
if (t < D && a(L + M) < t) {
P.horizontal = "center"
}
if (l < E && a(N + O) < l) {
P.vertical = "middle"
}
if (m(a(L), a(M)) > m(a(N), a(O))) {
P.important = "horizontal"
} else {
P.important = "vertical"
}
o.using.call(this, i, P)
}
}
C.offset($.extend(J, {
using: B
}))
})
};
$.ui.position = {
fit: {
left: function(i, k) {
var w = k.within,
l = w.isWindow ? w.scrollLeft : w.offset.left,
o = w.width,
n = i.left - k.collisionPosition.marginLeft,
q = l - n,
s = n + k.collisionWidth - o - l,
t;
if (k.collisionWidth > o) {
if (q > 0 && s <= 0) {
t = i.left + q + k.collisionWidth - o - l;
i.left += q - t
} else if (s > 0 && q <= 0) {
i.left = l
} else {
if (q > s) {
i.left = l + o - k.collisionWidth
} else {
i.left = l
}
}
} else if (q > 0) {
i.left += q
} else if (s > 0) {
i.left -= s
} else {
i.left = m(i.left - n, i.left)
}
},
top: function(i, k) {
var w = k.within,
l = w.isWindow ? w.scrollTop : w.offset.top,
o = k.within.height,
n = i.top - k.collisionPosition.marginTop,
q = l - n,
s = n + k.collisionHeight - o - l,
t;
if (k.collisionHeight > o) {
if (q > 0 && s <= 0) {
t = i.top + q + k.collisionHeight - o - l;
i.top += q - t
} else if (s > 0 && q <= 0) {
i.top = l
} else {
if (q > s) {
i.top = l + o - k.collisionHeight
} else {
i.top = l
}
}
} else if (q > 0) {
i.top += q
} else if (s > 0) {
i.top -= s
} else {
i.top = m(i.top - n, i.top)
}
}
},
flip: {
left: function(i, k) {
var w = k.within,
l = w.offset.left + w.scrollLeft,
o = w.width,
n = w.isWindow ? w.scrollLeft : w.offset.left,
q = i.left - k.collisionPosition.marginLeft,
s = q - n,
t = q + k.collisionWidth - o - n,
v = k.my[0] === "left" ? -k.elemWidth : k.my[0] === "right" ? k.elemWidth : 0,
x = k.at[0] === "left" ? k.targetWidth : k.at[0] === "right" ? -k.targetWidth : 0,
y = -2 * k.offset[0],
z, A;
if (s < 0) {
z = i.left + v + x + y + k.collisionWidth - o - l;
if (z < 0 || z < a(s)) {
i.left += v + x + y
}
} else if (t > 0) {
A = i.left - k.collisionPosition.marginLeft + v + x + y - n;
if (A > 0 || a(A) < t) {
i.left += v + x + y
}
}
},
top: function(i, k) {
var w = k.within,
l = w.offset.top + w.scrollTop,
o = w.height,
n = w.isWindow ? w.scrollTop : w.offset.top,
q = i.top - k.collisionPosition.marginTop,
s = q - n,
t = q + k.collisionHeight - o - n,
v = k.my[1] === "top",
x = v ? -k.elemHeight : k.my[1] === "bottom" ? k.elemHeight : 0,
y = k.at[1] === "top" ? k.targetHeight : k.at[1] === "bottom" ? -k.targetHeight : 0,
z = -2 * k.offset[1],
A, B;
if (s < 0) {
B = i.top + x + y + z + k.collisionHeight - o - l;
if ((i.top + x + y + z) > s && (B < 0 || B < a(s))) {
i.top += x + y + z
}
} else if (t > 0) {
A = i.top - k.collisionPosition.marginTop + x + y + z - n;
if ((i.top + x + y + z) > t && (A > 0 || a(A) < t)) {
i.top += x + y + z
}
}
}
},
flipfit: {
left: function() {
$.ui.position.flip.left.apply(this, arguments);
$.ui.position.fit.left.apply(this, arguments)
},
top: function() {
$.ui.position.flip.top.apply(this, arguments);
$.ui.position.fit.top.apply(this, arguments)
}
}
};
(function() {
var t, k, l, o, i, n = document.getElementsByTagName("body")[0],
q = document.createElement("div");
t = document.createElement(n ? "div" : "body");
l = {
visibility: "hidden",
width: 0,
height: 0,
border: 0,
margin: 0,
background: "none"
};
if (n) {
$.extend(l, {
position: "absolute",
left: "-1000px",
top: "-1000px"
})
}
for (i in l) {
t.style[i] = l[i]
}
t.appendChild(q);
k = n || document.documentElement;
k.insertBefore(t, k.firstChild);
q.style.cssText = "position: absolute; left: 10.7432222px;";
o = $(q).offset().left;
$.support.offsetFractions = o > 10 && o < 11;
t.innerHTML = "";
k.removeChild(t)
})()
}(jQuery));
/*!
* SAP UI development toolkit for HTML5 (SAPUI5/OpenUI5)
* (c) Copyright 2009-2014 SAP SE or an SAP affiliate company.
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
*/
if (window.jQuery && window.jQuery.sap && window.jQuery.sap.declare) {
window.jQuery.sap.declare("sap.ui.Device", false)
}
if (typeof window.sap !== "object" && typeof window.sap !== "function") {
window.sap = {}
}
if (typeof window.sap.ui !== "object") {
window.sap.ui = {}
}(function() {
if (typeof window.sap.ui.Device === "object" || typeof window.sap.ui.Device === "function") {
var c = "1.24.4";
window.sap.ui.Device._checkAPIVersion(c);
return
}
var d = {};
function p(i, w) {
return ("000" + String(i)).slice(-w)
}
var F = 0,
E = 1,
W = 2,
I = 3,
D = 4,
T = 5;
var g = function() {
this.defaultComponent = 'DEVICE';
this.sWindowName = (window.top == window) ? "" : "[" + window.location.pathname.split('/').slice(-1)[0] + "] ";
this.log = function(i, s, a) {
a = a || this.defaultComponent || '';
var b = new Date(),
e = {
time: p(b.getHours(), 2) + ":" + p(b.getMinutes(), 2) + ":" + p(b.getSeconds(), 2),
date: p(b.getFullYear(), 4) + "-" + p(b.getMonth() + 1, 2) + "-" + p(b.getDate(), 2),
timestamp: b.getTime(),
level: i,
message: s || "",
component: a || ""
};
if (window.console) {
var f = e.date + " " + e.time + " " + this.sWindowName + e.message + " - " + e.component;
switch (i) {
case F:
case E:
console.error(f);
break;
case W:
console.warn(f);
break;
case I:
console.info ? console.info(f) : console.log(f);
break;
case D:
console.debug ? console.debug(f) : console.log(f);
break;
case T:
console.trace ? console.trace(f) : console.log(f);
break
}
}
return e
}
};
var l = new g();
l.log(I, "Device API logging initialized");
d._checkAPIVersion = function(s) {
var v = "1.24.4";
if (v != s) {
l.log(W, "Device API version differs: " + v + " <-> " + s)
}
};
var h = {};
function j(e, f, a) {
if (!h[e]) {
h[e] = []
}
h[e].push({
oListener: a,
fFunction: f
})
};
function k(e, f, a) {
var b = h[e];
if (!b) {
return this
}
for (var i = 0, q = b.length; i < q; i++) {
if (b[i].fFunction === f && b[i].oListener === a) {
b.splice(i, 1);
break
}
}
if (b.length == 0) {
delete h[e]
}
};
function n(e, a) {
var b = h[e],
f;
if (b) {
b = b.slice();
for (var i = 0, q = b.length; i < q; i++) {
f = b[i];
f.fFunction.call(f.oListener || window, a)
}
}
};
var O = {
"WINDOWS": "win",
"MACINTOSH": "mac",
"LINUX": "linux",
"IOS": "iOS",
"ANDROID": "Android",
"BLACKBERRY": "bb",
"WINDOWS_PHONE": "winphone"
};
function o(a) {
function b() {
var s = navigator.platform;
if (s.indexOf("Win") != -1) {
var t = /windows NT 6.(\d)/i;
var f = a.match(t);
var v = "";
if (f) {
if (f[1] == 1) {
v = "7"
} else if (f[1] > 1) {
v = "8"
}
}
return {
"name": O.WINDOWS,
"versionStr": v
}
} else if (s.indexOf("Mac") != -1) {
return {
"name": O.MACINTOSH,
"versionStr": ""
}
} else if (s.indexOf("Linux") != -1) {
return {
"name": O.LINUX,
"versionStr": ""
}
}
l.log(I, "OS detection returned no result");
return null
}
a = a || navigator.userAgent;
var e = /\(([a-zA-Z ]+);\s(?:[U]?[;]?)([\D]+)((?:[\d._]*))(?:.*[\)][^\d]*)([\d.]*)\s/;
var f = a.match(e);
if (f) {
var i = /iPhone|iPad|iPod/;
var q = /PlayBook|BlackBerry/;
if (f[0].match(i)) {
f[3] = f[3].replace(/_/g, ".");
return ({
"name": O.IOS,
"versionStr": f[3]
})
} else if (f[2].match(/Android/)) {
f[2] = f[2].replace(/\s/g, "");
return ({
"name": O.ANDROID,
"versionStr": f[3]
})
} else if (f[0].match(q)) {
return ({
"name": O.BLACKBERRY,
"versionStr": f[4]
})
} else {
return b()
}
} else if (a.indexOf("(BB10;") > 0) {
e = /\sVersion\/([\d.]+)\s/;
f = a.match(e);
if (f) {
return {
"name": O.BLACKBERRY,
"versionStr": f[1]
}
} else {
return {
"name": O.BLACKBERRY,
"versionStr": '10'
}
}
} else {
e = /Windows Phone (?:OS )?([\d.]*)/;
f = a.match(e);
if (f) {
return ({
"name": O.WINDOWS_PHONE,
"versionStr": f[1]
})
} else {
return b()
}
}
};
function r() {
d.os = o() || {};
d.os.OS = O;
d.os.version = d.os.versionStr ? parseFloat(d.os.versionStr) : -1;
if (d.os.name) {
for (var b in O) {
if (O[b] === d.os.name) {
d.os[b.toLowerCase()] = true
}
}
}
}
r();
var B = {
"INTERNET_EXPLORER": "ie",
"FIREFOX": "ff",
"CHROME": "cr",
"SAFARI": "sf",
"ANDROID": "an"
};
var u = navigator.userAgent;
/*!
* Taken from jQuery JavaScript Library v1.7.1
* http://jquery.com/
*
* Copyright 2011, John Resig
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* Includes Sizzle.js
* http://sizzlejs.com/
* Copyright 2011, The Dojo Foundation
* Released under the MIT, BSD, and GPL Licenses.
*
* Date: Mon Nov 21 21:11:03 2011 -0500
*/
function y(a) {
var b = (a || u).toLowerCase();
var e = /(webkit)[ \/]([\w.]+)/;
var f = /(opera)(?:.*version)?[ \/]([\w.]+)/;
var i = /(msie) ([\w.]+)/;
var q = /(trident)\/[\w.]+;.*rv:([\w.]+)/;
var s = /(mozilla)(?:.*? rv:([\w.]+))?/;
var V = e.exec(b) || f.exec(b) || i.exec(b) || q.exec(b) || b.indexOf("compatible") < 0 && s.exec(b) || [];
var t = {
browser: V[1] || "",
version: V[2] || "0"
};
t[t.browser] = true;
return t
};
function z(a) {
var b = y(a);
var e = a || u;
var f;
if (b.mozilla) {
f = /Mobile/;
if (e.match(/Firefox\/(\d+\.\d+)/)) {
var v = parseFloat(RegExp.$1);
return {
name: B.FIREFOX,
versionStr: "" + v,
version: v,
mozilla: true,
mobile: f.test(e)
}
} else {
return {
mobile: f.test(e),
mozilla: true
}
}
} else if (b.webkit) {
var i = e.toLowerCase().match(/webkit[\/]([\d.]+)/);
if (i) {
var w = i[1]
}
f = /Mobile/;
if (e.match(/(Chrome|CriOS)\/(\d+\.\d+).\d+/)) {
var v = parseFloat(RegExp.$2);
return {
name: B.CHROME,
versionStr: "" + v,
version: v,
mobile: f.test(e),
webkit: true,
webkitVersion: w
}
} else if (e.match(/Android .+ Version\/(\d+\.\d+)/)) {
var v = parseFloat(RegExp.$1);
return {
name: B.ANDROID,
versionStr: "" + v,
version: v,
mobile: f.test(e),
webkit: true,
webkitVersion: w
}
} else {
var q = /Version\/(\d+\.\d+).*Safari/;
if (q.test(e)) {
var v = parseFloat(q.exec(e)[1]);
return {
name: B.SAFARI,
versionStr: "" + v,
version: v,
mobile: f.test(e),
webkit: true,
webkitVersion: w
}
} else {
return {
mobile: f.test(e),
webkit: true,
webkitVersion: w
}
}
}
} else if (b.msie || b.trident) {
var v;
if (document.documentMode && !a) {
if (document.documentMode === 7) {
v = 8.0
} else {
v = parseFloat(document.documentMode)
}
} else {
v = parseFloat(b.version)
}
return {
name: B.INTERNET_EXPLORER,
versionStr: "" + v,
version: v,
msie: true,
mobile: false
}
}
return {
name: "",
versionStr: "",
version: -1,
mobile: false
}
};
d._testUserAgent = z;
function A() {
d.browser = z();
d.browser.BROWSER = B;
if (d.browser.name) {
for (var b in B) {
if (B[b] === d.browser.name) {
d.browser[b.toLowerCase()] = true
}
}
}
}
A();
d.support = {};
d.support.touch = !!(('ontouchstart' in window) || window.DocumentTouch && document instanceof window.DocumentTouch);
d.support.matchmedia = !!window.matchMedia;
var m = d.support.matchmedia ? window.matchMedia("screen and (max-width:0px)") : null;
d.support.matchmedialistener = !!(m && m.addListener);
if (d.browser.safari && d.browser.version < 6) {
d.support.matchmedialistener = false
}
d.support.orientation = !!("orientation" in window && "onorientationchange" in window);
d.support.retina = (window.retina || window.devicePixelRatio >= 2);
d.support.websocket = ('WebSocket' in window);
d.support.input = {};
d.support.input.placeholder = ('placeholder' in document.createElement("input"));
d.media = {};
var R = {
"SAP_3STEPS": "3Step",
"SAP_4STEPS": "4Step",
"SAP_6STEPS": "6Step",
"SAP_STANDARD": "Std"
};
d.media.RANGESETS = R;
d.media._predefinedRangeSets = {};
d.media._predefinedRangeSets[R.SAP_3STEPS] = {
points: [520, 960],
unit: "px",
name: R.SAP_3STEPS,
names: ["S", "M", "L"]
};
d.media._predefinedRangeSets[R.SAP_4STEPS] = {
points: [520, 760, 960],
unit: "px",
name: R.SAP_4STEPS,
names: ["S", "M", "L", "XL"]
};
d.media._predefinedRangeSets[R.SAP_6STEPS] = {
points: [241, 400, 541, 768, 960],
unit: "px",
name: R.SAP_6STEPS,
names: ["XS", "S", "M", "L", "XL", "XXL"]
};
d.media._predefinedRangeSets[R.SAP_STANDARD] = {
points: [600, 1024],
unit: "px",
name: R.SAP_STANDARD,
names: ["Phone", "Tablet", "Desktop"]
};
var _ = R.SAP_STANDARD;
var C = d.support.matchmedialistener ? 0 : 100;
var G = {};
var H = null;
function J(f, t, a) {
a = a || "px";
var q = "screen";
if (f > 0) {
q = q + " and (min-width:" + f + a + ")"
}
if (t > 0) {
q = q + " and (max-width:" + t + a + ")"
}
return q
};
function K(a) {
if (!d.support.matchmedialistener && H == Q()[0]) {
return
}
if (G[a].timer) {
clearTimeout(G[a].timer);
G[a].timer = null
}
G[a].timer = setTimeout(function() {
var b = M(a, false);
if (b) {
n("media_" + a, b)
}
}, C)
};
function L(s, i) {
var q = G[s].queries[i];
var a = {
from: q.from,
unit: G[s].unit
};
if (q.to >= 0) {
a.to = q.to
}
if (G[s].names) {
a.name = G[s].names[i]
}
return a
};
function M(a, b) {
if (G[a]) {
var e = G[a].queries;
var f = null;
for (var i = 0, s = e.length; i < s; i++) {
var q = e[i];
if ((q != G[a].currentquery || b) && d.media.matches(q.from, q.to, G[a].unit)) {
if (!b) {
G[a].currentquery = q
}
if (!G[a].noClasses && G[a].names && !b) {
N(a, G[a].names[i])
}
f = L(a, i)
}
}
return f
}
l.log(W, "No queryset with name " + a + " found", 'DEVICE.MEDIA');
return null
};
function N(s, a, b) {
var e = "sapUiMedia-" + s + "-";
P(e + a, b, e)
};
function P(s, b, a) {
var e = document.documentElement;
if (e.className.length == 0) {
if (!b) {
e.className = s
}
} else {
var f = e.className.split(" ");
var q = "";
for (var i = 0; i < f.length; i++) {
if ((a && f[i].indexOf(a) != 0) || (!a && f[i] != s)) {
q = q + f[i] + " "
}
}
if (!b) {
q = q + s
}
e.className = q
}
};
function Q() {
return [document.documentElement.clientWidth, document.documentElement.clientHeight]
};
function S(v, a) {
if (a === "em" || a === "rem") {
var s = window.getComputedStyle || function(e) {
return e.currentStyle
};
var x = s(document.documentElement).fontSize;
var f = (x && x.indexOf("px") >= 0) ? parseFloat(x, 10) : 16;
return v * f
}
return v
};
function U(f, t, e) {
f = S(f, e);
t = S(t, e);
var w = Q()[0];
var a = f < 0 || f <= w;
var b = t < 0 || w <= t;
return a && b
};
function V(f, t, a) {
var q = J(f, t, a);
var m = window.matchMedia(q);
return m && m.matches
};
d.media.matches = d.support.matchmedia ? V : U;
d.media.attachHandler = function(f, a, s) {
var b = s || _;
j("media_" + b, f, a)
};
d.media.detachHandler = function(f, a, s) {
var b = s || _;
k("media_" + b, f, a)
};
d.media.initRangeSet = function(s, a, b, e, f) {
var t;
if (!s) {
t = d.media._predefinedRangeSets[_]
} else if (s && d.media._predefinedRangeSets[s]) {
t = d.media._predefinedRangeSets[s]
} else {
t = {
name: s,
unit: (b || "px").toLowerCase(),
points: a || [],
names: e,
noClasses: !!f
}
}
if (d.media.hasRangeSet(t.name)) {
return;
l.log(I, "Range set " + t.name + " hase already been initialized", 'DEVICE.MEDIA')
}
s = t.name;
t.queries = [];
t.timer = null;
t.currentquery = null;
t.listener = function() {
return K(s)
};
var v, w, x;
var x1 = t.points;
for (var i = 0, y1 = x1.length; i <= y1; i++) {
v = (i == 0) ? 0 : x1[i - 1];
w = (i == x1.length) ? -1 : x1[i];
x = J(v, w, t.unit);
t.queries.push({
query: x,
from: v,
to: w
})
};
if (t.names && t.names.length != t.queries.length) {
t.names = null
}
G[t.name] = t;
if (d.support.matchmedialistener) {
var z1 = t.queries;
for (var i = 0; i < z1.length; i++) {
var q = z1[i];
q.media = window.matchMedia(q.query);
q.media.addListener(t.listener)
}
} else {
if (window.addEventListener) {
window.addEventListener("resize", t.listener, false);
window.addEventListener("orientationchange", t.listener, false)
} else {
window.attachEvent("onresize", t.listener)
}
}
t.listener()
};
d.media.getCurrentRange = function(s) {
if (!d.media.hasRangeSet(s)) {
return null
}
return M(s, true)
};
d.media.hasRangeSet = function(s) {
return s && !!G[s]
};
d.media.removeRangeSet = function(s) {
if (!d.media.hasRangeSet(s)) {
l.log(I, "RangeSet " + s + " not found, thus could not be removed.", 'DEVICE.MEDIA');
return
}
for (var x in R) {
if (s === R[x]) {
l.log(W, "Cannot remove default rangeset - no action taken.", 'DEVICE.MEDIA');
return
}
}
var a = G[s];
if (d.support.matchmedialistener) {
var q = a.queries;
for (var i = 0; i < q.length; i++) {
q[i].media.removeListener(a.listener)
}
} else {
if (window.removeEventListener) {
window.removeEventListener("resize", a.listener, false);
window.removeEventListener("orientationchange", a.listener, false)
} else {
window.detachEvent("onresize", a.listener)
}
}
N(s, "", true);
delete h["media_" + s];
delete G[s]
};
var X = {
"TABLET": "tablet",
"PHONE": "phone",
"DESKTOP": "desktop",
"COMBI": "combi"
};
var Y = d.os.windows && d.os.version === 8;
var Z = d.os.windows && d.os.version === 7;
d.system = {};
function $(a) {
var t = a1();
var s = {};
s.tablet = ((d.support.touch && !Z) || !!a) && t;
s.phone = ((d.support.touch && !Z) || !!a) && !t;
s.desktop = (!s.tablet && !s.phone) || Y || Z;
s.combi = (s.desktop && s.tablet);
s.SYSTEMTYPE = X;
for (var b in X) {
P("sap-" + X[b], !s[X[b]])
}
return s
};
function a1() {
var a = (/(?=android)(?=.*mobile)/i.test(navigator.userAgent));
var b = d.os.android && (d.os.version >= 4.4) && /Version\/\d.\d/.test(navigator.userAgent);
if (d.os.name === d.os.OS.IOS) {
return /ipad/i.test(navigator.userAgent)
} else {
if (d.support.touch) {
var e = window.devicePixelRatio ? window.devicePixelRatio : 1;
if (!b && (d.os.name === d.os.OS.ANDROID) && d.browser.webkit && (d.browser.webkitVersion > 537.10)) {
e = 1
}
var t = (Math.min(window.screen.width / e, window.screen.height / e) >= 600);
if (t1() && (window.screen.height === 552 || window.screen.height === 553) && (/Nexus 7/i.test(navigator.userAgent))) {
t = true
}
return t
} else {
var f = (d.os.name === d.os.OS.ANDROID) && !a;
return f
}
}
};
function b1(a) {
d.system = $(a);
if (d.system.tablet || d.system.phone) {
d.browser.mobile = true
}
}
b1();
d.orientation = {};
d.resize = {};
d.orientation.attachHandler = function(f, a) {
j("orientation", f, a)
};
d.resize.attachHandler = function(f, a) {
j("resize", f, a)
};
d.orientation.detachHandler = function(f, a) {
k("orientation", f, a)
};
d.resize.detachHandler = function(f, a) {
k("resize", f, a)
};
function c1(i) {
i.landscape = t1(true);
i.portrait = !i.landscape
};
function d1() {
c1(d.orientation);
n("orientation", {
landscape: d.orientation.landscape
})
};
function e1() {
f1(d.resize);
n("resize", {
height: d.resize.height,
width: d.resize.width
})
};
function f1(i) {
i.width = Q()[0];
i.height = Q()[1]
};
function g1() {
var w = d.orientation.landscape;
var i = t1();
if (w != i) {
d1()
}
if (!l1) {
l1 = window.setTimeout(h1, 150)
}
};
function h1() {
e1();
l1 = null
};
var i1 = false;
var j1 = false;
var k1;
var l1;
var m1;
var n1 = Q()[1];
var o1 = Q()[0];
var p1 = false;
var q1;
var r1 = /INPUT|TEXTAREA|SELECT/;
var s1 = d.os.ios && d.browser.name === "sf" && ((d.system.phone && d.os.version >= 7 && d.os.version < 7.1) || (d.system.tablet && d.os.version >= 7));
function t1(f) {
if (d.support.touch && d.support.orientation) {
if (p1 && f) {
return !d.orientation.landscape
}
if (p1) {
return d.orientation.landscape
}
} else {
if (d.support.matchmedia && d.support.orientation) {
return !!window.matchMedia("(orientation: landscape)").matches
}
}
var s = Q();
return s[0] > s[1]
};
function u1(e) {
if (e.type == "resize") {
if (s1 && r1.test(document.activeElement.tagName) && !i1) {
return
}
var w = Q()[1];
var i = Q()[0];
var t = new Date().getTime();
if (w === n1 && i === o1) {
return
}
j1 = true;
if ((n1 != w) && (o1 == i)) {
if (!q1 || (t - q1 > 300)) {
p1 = (w < n1)
}
e1()
} else {
o1 = i
}
q1 = t;
n1 = w;
if (m1) {
window.clearTimeout(m1);
m1 = null
}
m1 = window.setTimeout(w1, 1200)
} else if (e.type == "orientationchange") {
i1 = true
}
if (k1) {
clearTimeout(k1);
k1 = null
}
k1 = window.setTimeout(v1, 50)
};
function v1() {
if (i1 && j1) {
d1();
e1();
i1 = false;
j1 = false;
if (m1) {
window.clearTimeout(m1);
m1 = null
}
}
k1 = null
};
function w1() {
i1 = false;
j1 = false;
m1 = null
};
d._update = function(a) {
u = navigator.userAgent;
l.log(W, "Device API values manipulated: NOT PRODUCTIVE FEATURE!!! This should be only used for test purposes. Only use if you know what you are doing.");
A();
r();
b1(a)
};
f1(d.resize);
c1(d.orientation);
window.sap.ui.Device = d;
if (d.support.touch && d.support.orientation) {
window.addEventListener("resize", u1, false);
window.addEventListener("orientationchange", u1, false)
} else {
if (window.addEventListener) {
window.addEventListener("resize", g1, false)
} else {
window.attachEvent("onresize", g1)
}
}
d.media.initRangeSet();
if (sap.ui.define) {
sap.ui.define("sap/ui/Device", [], function() {
return d
})
}
}());
/*!
* URI.js - Mutating URLs
*
* Version: 1.11.2
*
* Author: Rodney Rehm
* Web: http://medialize.github.com/URI.js/
*
* Licensed under
* MIT License http://www.opensource.org/licenses/mit-license
* GPL v3 http://opensource.org/licenses/GPL-3.0
*
*/
(function(r, f) {
if (typeof exports === 'object') {
module.exports = f(require('./punycode'), require('./IPv6'), require('./SecondLevelDomains'))
} else if (typeof define === 'function' && define.amd) {
r.URI = f(r.punycode, r.IPv6, r.SecondLevelDomains, r);
define([], function() {
return r.URI
})
} else {
r.URI = f(r.punycode, r.IPv6, r.SecondLevelDomains, r)
}
}(this, function(a, I, S, r) {
"use strict";
var _ = r && r.URI;
function U(c, d) {
if (!(this instanceof U)) {
return new U(c, d)
}
if (c === undefined) {
if (typeof location !== 'undefined') {
c = location.href + ""
} else {
c = ""
}
}
this.href(c);
if (d !== undefined) {
return this.absoluteTo(d)
}
return this
};
var p = U.prototype;
var h = Object.prototype.hasOwnProperty;
function b(s) {
return s.replace(/([.*+?^=!:${}()|[\]\/\\])/g, '\\$1')
}
function g(v) {
if (v === undefined) {
return 'Undefined'
}
return String(Object.prototype.toString.call(v)).slice(8, -1)
}
function f(c) {
return g(c) === "Array"
}
function j(d, v) {
var l = {};
var i, c;
if (f(v)) {
for (i = 0, c = v.length; i < c; i++) {
l[v[i]] = true
}
} else {
l[v] = true
}
for (i = 0, c = d.length; i < c; i++) {
if (l[d[i]] !== undefined) {
d.splice(i, 1);
c--;
i--
}
}
return d
}
function k(l, v) {
var i, c;
if (f(v)) {
for (i = 0, c = v.length; i < c; i++) {
if (!k(l, v[i])) {
return false
}
}
return true
}
var d = g(v);
for (i = 0, c = l.length; i < c; i++) {
if (d === 'RegExp') {
if (typeof l[i] === 'string' && l[i].match(v)) {
return true
}
} else if (l[i] === v) {
return true
}
}
return false
}
function m(c, t) {
if (!f(c) || !f(t)) {
return false
}
if (c.length !== t.length) {
return false
}
c.sort();
t.sort();
for (var i = 0, l = c.length; i < l; i++) {
if (c[i] !== t[i]) {
return false
}
}
return true
}
U._parts = function() {
return {
protocol: null,
username: null,
password: null,
hostname: null,
urn: null,
port: null,
path: null,
query: null,
fragment: null,
duplicateQueryParameters: U.duplicateQueryParameters,
escapeQuerySpace: U.escapeQuerySpace
}
};
U.duplicateQueryParameters = false;
U.escapeQuerySpace = true;
U.protocol_expression = /^[a-z][a-z0-9-+-]*$/i;
U.idn_expression = /[^a-z0-9\.-]/i;
U.punycode_expression = /(xn--)/i;
U.ip4_expression = /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/;
U.ip6_expression = /^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/;
U.find_uri_expression = /\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))/ig;
U.defaultPorts = {
http: "80",
https: "443",
ftp: "21",
gopher: "70",
ws: "80",
wss: "443"
};
U.invalid_hostname_characters = /[^a-zA-Z0-9\.-]/;
U.domAttributes = {
'a': 'href',
'blockquote': 'cite',
'link': 'href',
'base': 'href',
'script': 'src',
'form': 'action',
'img': 'src',
'area': 'href',
'iframe': 'src',
'embed': 'src',
'source': 'src',
'track': 'src',
'input': 'src'
};
U.getDomAttribute = function(c) {
if (!c || !c.nodeName) {
return undefined
}
var d = c.nodeName.toLowerCase();
if (d === 'input' && c.type !== 'image') {
return undefined
}
return U.domAttributes[d]
};
function n(v) {
return escape(v)
}
function o(s) {
return encodeURIComponent(s).replace(/[!'()*]/g, n).replace(/\*/g, "%2A")
}
U.encode = o;
U.decode = decodeURIComponent;
U.iso8859 = function() {
U.encode = escape;
U.decode = unescape
};
U.unicode = function() {
U.encode = o;
U.decode = decodeURIComponent
};
U.characters = {
pathname: {
encode: {
expression: /%(24|26|2B|2C|3B|3D|3A|40)/ig,
map: {
"%24": "$",
"%26": "&",
"%2B": "+",
"%2C": ",",
"%3B": ";",
"%3D": "=",
"%3A": ":",
"%40": "@"
}
},
decode: {
expression: /[\/\?#]/g,
map: {
"/": "%2F",
"?": "%3F",
"#": "%23"
}
}
},
reserved: {
encode: {
expression: /%(21|23|24|26|27|28|29|2A|2B|2C|2F|3A|3B|3D|3F|40|5B|5D)/ig,
map: {
"%3A": ":",
"%2F": "/",
"%3F": "?",
"%23": "#",
"%5B": "[",
"%5D": "]",
"%40": "@",
"%21": "!",
"%24": "$",
"%26": "&",
"%27": "'",
"%28": "(",
"%29": ")",
"%2A": "*",
"%2B": "+",
"%2C": ",",
"%3B": ";",
"%3D": "="
}
}
}
};
U.encodeQuery = function(s, e) {
var c = U.encode(s + "");
return e ? c.replace(/%20/g, '+') : c
};
U.decodeQuery = function(s, c) {
s += "";
try {
return U.decode(c ? s.replace(/\+/g, '%20') : s)
} catch (e) {
return s
}
};
U.recodePath = function(s) {
var c = (s + "").split('/');
for (var i = 0, l = c.length; i < l; i++) {
c[i] = U.encodePathSegment(U.decode(c[i]))
}
return c.join('/')
};
U.decodePath = function(s) {
var c = (s + "").split('/');
for (var i = 0, l = c.length; i < l; i++) {
c[i] = U.decodePathSegment(c[i])
}
return c.join('/')
};
var u = {
'encode': 'encode',
'decode': 'decode'
};
var w;
var y = function(d, w) {
return function(s) {
return U[w](s + "").replace(U.characters[d][w].expression, function(c) {
return U.characters[d][w].map[c]
})
}
};
for (w in u) {
U[w + "PathSegment"] = y("pathname", u[w])
}
U.encodeReserved = y("reserved", "encode");
U.parse = function(s, c) {
var d;
if (!c) {
c = {}
}
d = s.indexOf('#');
if (d > -1) {
c.fragment = s.substring(d + 1) || null;
s = s.substring(0, d)
}
d = s.indexOf('?');
if (d > -1) {
c.query = s.substring(d + 1) || null;
s = s.substring(0, d)
}
if (s.substring(0, 2) === '//') {
c.protocol = null;
s = s.substring(2);
s = U.parseAuthority(s, c)
} else {
d = s.indexOf(':');
if (d > -1) {
c.protocol = s.substring(0, d) || null;
if (c.protocol && !c.protocol.match(U.protocol_expression)) {
c.protocol = undefined
} else if (c.protocol === 'file') {
s = s.substring(d + 3)
} else if (s.substring(d + 1, d + 3) === '//') {
s = s.substring(d + 3);
s = U.parseAuthority(s, c)
} else {
s = s.substring(d + 1);
c.urn = true
}
}
}
c.path = s;
return c
};
U.parseHost = function(s, c) {
var d = s.indexOf('/');
var e;
var t;
if (d === -1) {
d = s.length
}
if (s.charAt(0) === "[") {
e = s.indexOf(']');
c.hostname = s.substring(1, e) || null;
c.port = s.substring(e + 2, d) || null
} else if (s.indexOf(':') !== s.lastIndexOf(':')) {
c.hostname = s.substring(0, d) || null;
c.port = null
} else {
t = s.substring(0, d).split(':');
c.hostname = t[0] || null;
c.port = t[1] || null
}
if (c.hostname && s.substring(d).charAt(0) !== '/') {
d++;
s = "/" + s
}
return s.substring(d) || '/'
};
U.parseAuthority = function(s, c) {
s = U.parseUserinfo(s, c);
return U.parseHost(s, c)
};
U.parseUserinfo = function(s, c) {
var d = s.indexOf('/');
var e = d > -1 ? s.lastIndexOf('@', d) : s.indexOf('@');
var t;
if (e > -1 && (d === -1 || e < d)) {
t = s.substring(0, e).split(':');
c.username = t[0] ? U.decode(t[0]) : null;
t.shift();
c.password = t[0] ? U.decode(t.join(':')) : null;
s = s.substring(e + 1)
} else {
c.username = null;
c.password = null
}
return s
};
U.parseQuery = function(s, e) {
if (!s) {
return {}
}
s = s.replace(/&+/g, '&').replace(/^\?*&*|&+$/g, '');
if (!s) {
return {}
}
var c = {};
var d = s.split('&');
var l = d.length;
var v, t, x;
for (var i = 0; i < l; i++) {
v = d[i].split('=');
t = U.decodeQuery(v.shift(), e);
x = v.length ? U.decodeQuery(v.join('='), e) : null;
if (c[t]) {
if (typeof c[t] === "string") {
c[t] = [c[t]]
}
c[t].push(x)
} else {
c[t] = x
}
}
return c
};
U.build = function(c) {
var t = "";
if (c.protocol) {
t += c.protocol + ":"
}
if (!c.urn && (t || c.hostname)) {
t += '//'
}
t += (U.buildAuthority(c) || '');
if (typeof c.path === "string") {
if (c.path.charAt(0) !== '/' && typeof c.hostname === "string") {
t += '/'
}
t += c.path
}
if (typeof c.query === "string" && c.query) {
t += '?' + c.query
}
if (typeof c.fragment === "string" && c.fragment) {
t += '#' + c.fragment
}
return t
};
U.buildHost = function(c) {
var t = "";
if (!c.hostname) {
return ""
} else if (U.ip6_expression.test(c.hostname)) {
if (c.port) {
t += "[" + c.hostname + "]:" + c.port
} else {
t += c.hostname
}
} else {
t += c.hostname;
if (c.port) {
t += ':' + c.port
}
}
return t
};
U.buildAuthority = function(c) {
return U.buildUserinfo(c) + U.buildHost(c)
};
U.buildUserinfo = function(c) {
var t = "";
if (c.username) {
t += U.encode(c.username);
if (c.password) {
t += ':' + U.encode(c.password)
}
t += "@"
}
return t
};
U.buildQuery = function(d, c, e) {
var t = "";
var l, s, i, v;
for (s in d) {
if (h.call(d, s) && s) {
if (f(d[s])) {
l = {};
for (i = 0, v = d[s].length; i < v; i++) {
if (d[s][i] !== undefined && l[d[s][i] + ""] === undefined) {
t += "&" + U.buildQueryParameter(s, d[s][i], e);
if (c !== true) {
l[d[s][i] + ""] = true
}
}
}
} else if (d[s] !== undefined) {
t += '&' + U.buildQueryParameter(s, d[s], e)
}
}
}
return t.substring(1)
};
U.buildQueryParameter = function(c, v, e) {
return U.encodeQuery(c, e) + (v !== null ? "=" + U.encodeQuery(v, e) : "")
};
U.addQuery = function(d, c, v) {
if (typeof c === "object") {
for (var e in c) {
if (h.call(c, e)) {
U.addQuery(d, e, c[e])
}
}
} else if (typeof c === "string") {
if (d[c] === undefined) {
d[c] = v;
return
} else if (typeof d[c] === "string") {
d[c] = [d[c]]
}
if (!f(v)) {
v = [v]
}
d[c] = d[c].concat(v)
} else {
throw new TypeError("URI.addQuery() accepts an object, string as the name parameter")
}
};
U.removeQuery = function(d, c, v) {
var i, l, e;
if (f(c)) {
for (i = 0, l = c.length; i < l; i++) {
d[c[i]] = undefined
}
} else if (typeof c === "object") {
for (e in c) {
if (h.call(c, e)) {
U.removeQuery(d, e, c[e])
}
}
} else if (typeof c === "string") {
if (v !== undefined) {
if (d[c] === v) {
d[c] = undefined
} else if (f(d[c])) {
d[c] = j(d[c], v)
}
} else {
d[c] = undefined
}
} else {
throw new TypeError("URI.addQuery() accepts an object, string as the first parameter")
}
};
U.hasQuery = function(d, c, v, e) {
if (typeof c === "object") {
for (var i in c) {
if (h.call(c, i)) {
if (!U.hasQuery(d, i, c[i])) {
return false
}
}
}
return true
} else if (typeof c !== "string") {
throw new TypeError("URI.hasQuery() accepts an object, string as the name parameter")
}
switch (g(v)) {
case 'Undefined':
return c in d;
case 'Boolean':
var l = Boolean(f(d[c]) ? d[c].length : d[c]);
return v === l;
case 'Function':
return !!v(d[c], c, d);
case 'Array':
if (!f(d[c])) {
return false
}
var s = e ? k : m;
return s(d[c], v);
case 'RegExp':
if (!f(d[c])) {
return Boolean(d[c] && d[c].match(v))
}
if (!e) {
return false
}
return k(d[c], v);
case 'Number':
v = String(v);
case 'String':
if (!f(d[c])) {
return d[c] === v
}
if (!e) {
return false
}
return k(d[c], v);
default:
throw new TypeError("URI.hasQuery() accepts undefined, boolean, string, number, RegExp, Function as the value parameter")
}
};
U.commonPath = function(c, t) {
var l = Math.min(c.length, t.length);
var d;
for (d = 0; d < l; d++) {
if (c.charAt(d) !== t.charAt(d)) {
d--;
break
}
}
if (d < 1) {
return c.charAt(0) === t.charAt(0) && c.charAt(0) === '/' ? '/' : ''
}
if (c.charAt(d) !== '/' || t.charAt(d) !== '/') {
d = c.substring(0, d).lastIndexOf('/')
}
return c.substring(0, d + 1)
};
U.withinString = function(s, c) {
return s.replace(U.find_uri_expression, c)
};
U.ensureValidHostname = function(v) {
if (v.match(U.invalid_hostname_characters)) {
if (!a) {
throw new TypeError("Hostname '" + v + "' contains characters other than [A-Z0-9.-] and Punycode.js is not available")
}
if (a.toASCII(v).match(U.invalid_hostname_characters)) {
throw new TypeError("Hostname '" + v + "' contains characters other than [A-Z0-9.-]")
}
}
};
U.noConflict = function(c) {
if (c) {
var d = {
URI: this.noConflict()
};
if (URITemplate && typeof URITemplate.noConflict == "function") {
d.URITemplate = URITemplate.noConflict()
}
if (I && typeof I.noConflict == "function") {
d.IPv6 = I.noConflict()
}
if (SecondLevelDomains && typeof SecondLevelDomains.noConflict == "function") {
d.SecondLevelDomains = SecondLevelDomains.noConflict()
}
return d
} else if (r.URI === this) {
r.URI = _
}
return this
};
p.build = function(d) {
if (d === true) {
this._deferred_build = true
} else if (d === undefined || this._deferred_build) {
this._string = U.build(this._parts);
this._deferred_build = false
}
return this
};
p.clone = function() {
return new U(this)
};
p.valueOf = p.toString = function() {
return this.build(false)._string
};
u = {
protocol: 'protocol',
username: 'username',
password: 'password',
hostname: 'hostname',
port: 'port'
};
y = function(w) {
return function(v, c) {
if (v === undefined) {
return this._parts[w] || ""
} else {
this._parts[w] = v || null;
this.build(!c);
return this
}
}
};
for (w in u) {
p[w] = y(u[w])
}
u = {
query: '?',
fragment: '#'
};
y = function(w, c) {
return function(v, d) {
if (v === undefined) {
return this._parts[w] || ""
} else {
if (v !== null) {
v = v + "";
if (v.charAt(0) === c) {
v = v.substring(1)
}
}
this._parts[w] = v;
this.build(!d);
return this
}
}
};
for (w in u) {
p[w] = y(w, u[w])
}
u = {
search: ['?', 'query'],
hash: ['#', 'fragment']
};
y = function(w, c) {
return function(v, d) {
var t = this[w](v, d);
return typeof t === "string" && t.length ? (c + t) : t
}
};
for (w in u) {
p[w] = y(u[w][1], u[w][0])
}
p.pathname = function(v, c) {
if (v === undefined || v === true) {
var d = this._parts.path || (this._parts.hostname ? '/' : '');
return v ? U.decodePath(d) : d
} else {
this._parts.path = v ? U.recodePath(v) : "/";
this.build(!c);
return this
}
};
p.path = p.pathname;
p.href = function(c, d) {
var e;
if (c === undefined) {
return this.toString()
}
this._string = "";
this._parts = U._parts();
var _ = c instanceof U;
var i = typeof c === "object" && (c.hostname || c.path || c.pathname);
if (c.nodeName) {
var l = U.getDomAttribute(c);
c = c[l] || "";
i = false
}
if (!_ && i && c.pathname !== undefined) {
c = c.toString()
}
if (typeof c === "string") {
this._parts = U.parse(c, this._parts)
} else if (_ || i) {
var s = _ ? c._parts : c;
for (e in s) {
if (h.call(this._parts, e)) {
this._parts[e] = s[e]
}
}
} else {
throw new TypeError("invalid input")
}
this.build(!d);
return this
};
p.is = function(c) {
var i = false;
var d = false;
var e = false;
var l = false;
var s = false;
var t = false;
var a = false;
var v = !this._parts.urn;
if (this._parts.hostname) {
v = false;
d = U.ip4_expression.test(this._parts.hostname);
e = U.ip6_expression.test(this._parts.hostname);
i = d || e;
l = !i;
s = l && S && S.has(this._parts.hostname);
t = l && U.idn_expression.test(this._parts.hostname);
a = l && U.punycode_expression.test(this._parts.hostname)
}
switch (c.toLowerCase()) {
case 'relative':
return v;
case 'absolute':
return !v;
case 'domain':
case 'name':
return l;
case 'sld':
return s;
case 'ip':
return i;
case 'ip4':
case 'ipv4':
case 'inet4':
return d;
case 'ip6':
case 'ipv6':
case 'inet6':
return e;
case 'idn':
return t;
case 'url':
return !this._parts.urn;
case 'urn':
return !!this._parts.urn;
case 'punycode':
return a
}
return null
};
var z = p.protocol;
var A = p.port;
var B = p.hostname;
p.protocol = function(v, c) {
if (v !== undefined) {
if (v) {
v = v.replace(/:(\/\/)?$/, '');
if (v.match(/[^a-zA-z0-9\.+-]/)) {
throw new TypeError("Protocol '" + v + "' contains characters other than [A-Z0-9.+-]")
}
}
}
return z.call(this, v, c)
};
p.scheme = p.protocol;
p.port = function(v, c) {
if (this._parts.urn) {
return v === undefined ? '' : this
}
if (v !== undefined) {
if (v === 0) {
v = null
}
if (v) {
v += "";
if (v.charAt(0) === ":") {
v = v.substring(1)
}
if (v.match(/[^0-9]/)) {
throw new TypeError("Port '" + v + "' contains characters other than [0-9]")
}
}
}
return A.call(this, v, c)
};
p.hostname = function(v, c) {
if (this._parts.urn) {
return v === undefined ? '' : this
}
if (v !== undefined) {
var x = {};
U.parseHost(v, x);
v = x.hostname
}
return B.call(this, v, c)
};
p.host = function(v, c) {
if (this._parts.urn) {
return v === undefined ? '' : this
}
if (v === undefined) {
return this._parts.hostname ? U.buildHost(this._parts) : ""
} else {
U.parseHost(v, this._parts);
this.build(!c);
return this
}
};
p.authority = function(v, c) {
if (this._parts.urn) {
return v === undefined ? '' : this
}
if (v === undefined) {
return this._parts.hostname ? U.buildAuthority(this._parts) : ""
} else {
U.parseAuthority(v, this._parts);
this.build(!c);
return this
}
};
p.userinfo = function(v, c) {
if (this._parts.urn) {
return v === undefined ? '' : this
}
if (v === undefined) {
if (!this._parts.username) {
return ""
}
var t = U.buildUserinfo(this._parts);
return t.substring(0, t.length - 1)
} else {
if (v[v.length - 1] !== '@') {
v += '@'
}
U.parseUserinfo(v, this._parts);
this.build(!c);
return this
}
};
p.resource = function(v, c) {
var d;
if (v === undefined) {
return this.path() + this.search() + this.hash()
}
d = U.parse(v);
this._parts.path = d.path;
this._parts.query = d.query;
this._parts.fragment = d.fragment;
this.build(!c);
return this
};
p.subdomain = function(v, c) {
if (this._parts.urn) {
return v === undefined ? '' : this
}
if (v === undefined) {
if (!this._parts.hostname || this.is('IP')) {
return ""
}
var d = this._parts.hostname.length - this.domain().length - 1;
return this._parts.hostname.substring(0, d) || ""
} else {
var e = this._parts.hostname.length - this.domain().length;
var s = this._parts.hostname.substring(0, e);
var i = new RegExp('^' + b(s));
if (v && v.charAt(v.length - 1) !== '.') {
v += "."
}
if (v) {
U.ensureValidHostname(v)
}
this._parts.hostname = this._parts.hostname.replace(i, v);
this.build(!c);
return this
}
};
p.domain = function(v, c) {
if (this._parts.urn) {
return v === undefined ? '' : this
}
if (typeof v === 'boolean') {
c = v;
v = undefined
}
if (v === undefined) {
if (!this._parts.hostname || this.is('IP')) {
return ""
}
var t = this._parts.hostname.match(/\./g);
if (t && t.length < 2) {
return this._parts.hostname
}
var e = this._parts.hostname.length - this.tld(c).length - 1;
e = this._parts.hostname.lastIndexOf('.', e - 1) + 1;
return this._parts.hostname.substring(e) || ""
} else {
if (!v) {
throw new TypeError("cannot set domain empty")
}
U.ensureValidHostname(v);
if (!this._parts.hostname || this.is('IP')) {
this._parts.hostname = v
} else {
var d = new RegExp(b(this.domain()) + "$");
this._parts.hostname = this._parts.hostname.replace(d, v)
}
this.build(!c);
return this
}
};
p.tld = function(v, c) {
if (this._parts.urn) {
return v === undefined ? '' : this
}
if (typeof v === 'boolean') {
c = v;
v = undefined
}
if (v === undefined) {
if (!this._parts.hostname || this.is('IP')) {
return ""
}
var d = this._parts.hostname.lastIndexOf('.');
var t = this._parts.hostname.substring(d + 1);
if (c !== true && S && S.list[t.toLowerCase()]) {
return S.get(this._parts.hostname) || t
}
return t
} else {
var e;
if (!v) {
throw new TypeError("cannot set TLD empty")
} else if (v.match(/[^a-zA-Z0-9-]/)) {
if (S && S.is(v)) {
e = new RegExp(b(this.tld()) + "$");
this._parts.hostname = this._parts.hostname.replace(e, v)
} else {
throw new TypeError("TLD '" + v + "' contains characters other than [A-Z0-9]")
}
} else if (!this._parts.hostname || this.is('IP')) {
throw new ReferenceError("cannot set TLD on non-domain host")
} else {
e = new RegExp(b(this.tld()) + "$");
this._parts.hostname = this._parts.hostname.replace(e, v)
}
this.build(!c);
return this
}
};
p.directory = function(v, c) {
if (this._parts.urn) {
return v === undefined ? '' : this
}
if (v === undefined || v === true) {
if (!this._parts.path && !this._parts.hostname) {
return ''
}
if (this._parts.path === '/') {
return '/'
}
var d = this._parts.path.length - this.filename().length - 1;
var i = this._parts.path.substring(0, d) || (this._parts.hostname ? "/" : "");
return v ? U.decodePath(i) : i
} else {
var e = this._parts.path.length - this.filename().length;
var l = this._parts.path.substring(0, e);
var s = new RegExp('^' + b(l));
if (!this.is('relative')) {
if (!v) {
v = '/'
}
if (v.charAt(0) !== '/') {
v = "/" + v
}
}
if (v && v.charAt(v.length - 1) !== '/') {
v += '/'
}
v = U.recodePath(v);
this._parts.path = this._parts.path.replace(s, v);
this.build(!c);
return this
}
};
p.filename = function(v, c) {
if (this._parts.urn) {
return v === undefined ? '' : this
}
if (v === undefined || v === true) {
if (!this._parts.path || this._parts.path === '/') {
return ""
}
var d = this._parts.path.lastIndexOf('/');
var e = this._parts.path.substring(d + 1);
return v ? U.decodePathSegment(e) : e
} else {
var i = false;
if (v.charAt(0) === '/') {
v = v.substring(1)
}
if (v.match(/\.?\//)) {
i = true
}
var l = new RegExp(b(this.filename()) + "$");
v = U.recodePath(v);
this._parts.path = this._parts.path.replace(l, v);
if (i) {
this.normalizePath(c)
} else {
this.build(!c)
}
return this
}
};
p.suffix = function(v, c) {
if (this._parts.urn) {
return v === undefined ? '' : this
}
if (v === undefined || v === true) {
if (!this._parts.path || this._parts.path === '/') {
return ""
}
var d = this.filename();
var e = d.lastIndexOf('.');
var s, i;
if (e === -1) {
return ""
}
s = d.substring(e + 1);
i = (/^[a-z0-9%]+$/i).test(s) ? s : "";
return v ? U.decodePathSegment(i) : i
} else {
if (v.charAt(0) === '.') {
v = v.substring(1)
}
var l = this.suffix();
var t;
if (!l) {
if (!v) {
return this
}
this._parts.path += '.' + U.recodePath(v)
} else if (!v) {
t = new RegExp(b("." + l) + "$")
} else {
t = new RegExp(b(l) + "$")
}
if (t) {
v = U.recodePath(v);
this._parts.path = this._parts.path.replace(t, v)
}
this.build(!c);
return this
}
};
p.segment = function(s, v, c) {
var d = this._parts.urn ? ':' : '/';
var e = this.path();
var t = e.substring(0, 1) === '/';
var x = e.split(d);
if (s !== undefined && typeof s !== 'number') {
c = v;
v = s;
s = undefined
}
if (s !== undefined && typeof s !== 'number') {
throw new Error("Bad segment '" + s + "', must be 0-based integer")
}
if (t) {
x.shift()
}
if (s < 0) {
s = Math.max(x.length + s, 0)
}
if (v === undefined) {
return s === undefined ? x : x[s]
} else if (s === null || x[s] === undefined) {
if (f(v)) {
x = [];
for (var i = 0, l = v.length; i < l; i++) {
if (!v[i].length && (!x.length || !x[x.length - 1].length)) {
continue
}
if (x.length && !x[x.length - 1].length) {
x.pop()
}
x.push(v[i])
}
} else if (v || (typeof v === "string")) {
if (x[x.length - 1] === "") {
x[x.length - 1] = v
} else {
x.push(v)
}
}
} else {
if (v || (typeof v === "string" && v.length)) {
x[s] = v
} else {
x.splice(s, 1)
}
}
if (t) {
x.unshift("")
}
return this.path(x.join(d), c)
};
p.segmentCoded = function(s, v, c) {
var d, i, l;
if (typeof s !== 'number') {
c = v;
v = s;
s = undefined
}
if (v === undefined) {
d = this.segment(s, v, c);
if (!f(d)) {
d = d !== undefined ? U.decode(d) : undefined
} else {
for (i = 0, l = d.length; i < l; i++) {
d[i] = U.decode(d[i])
}
}
return d
}
if (!f(v)) {
v = typeof v === 'string' ? U.encode(v) : v
} else {
for (i = 0, l = v.length; i < l; i++) {
v[i] = U.decode(v[i])
}
}
return this.segment(s, v, c)
};
var q = p.query;
p.query = function(v, c) {
if (v === true) {
return U.parseQuery(this._parts.query, this._parts.escapeQuerySpace)
} else if (typeof v === "function") {
var d = U.parseQuery(this._parts.query, this._parts.escapeQuerySpace);
var e = v.call(this, d);
this._parts.query = U.buildQuery(e || d, this._parts.duplicateQueryParameters, this._parts.escapeQuerySpace);
this.build(!c);
return this
} else if (v !== undefined && typeof v !== "string") {
this._parts.query = U.buildQuery(v, this._parts.duplicateQueryParameters, this._parts.escapeQuerySpace);
this.build(!c);
return this
} else {
return q.call(this, v, c)
}
};
p.setQuery = function(c, v, d) {
var e = U.parseQuery(this._parts.query, this._parts.escapeQuerySpace);
if (typeof c === "object") {
for (var i in c) {
if (h.call(c, i)) {
e[i] = c[i]
}
}
} else if (typeof c === "string") {
e[c] = v !== undefined ? v : null
} else {
throw new TypeError("URI.addQuery() accepts an object, string as the name parameter")
}
this._parts.query = U.buildQuery(e, this._parts.duplicateQueryParameters, this._parts.escapeQuerySpace);
if (typeof c !== "string") {
d = v
}
this.build(!d);
return this
};
p.addQuery = function(c, v, d) {
var e = U.parseQuery(this._parts.query, this._parts.escapeQuerySpace);
U.addQuery(e, c, v === undefined ? null : v);
this._parts.query = U.buildQuery(e, this._parts.duplicateQueryParameters, this._parts.escapeQuerySpace);
if (typeof c !== "string") {
d = v
}
this.build(!d);
return this
};
p.removeQuery = function(c, v, d) {
var e = U.parseQuery(this._parts.query, this._parts.escapeQuerySpace);
U.removeQuery(e, c, v);
this._parts.query = U.buildQuery(e, this._parts.duplicateQueryParameters, this._parts.escapeQuerySpace);
if (typeof c !== "string") {
d = v
}
this.build(!d);
return this
};
p.hasQuery = function(c, v, d) {
var e = U.parseQuery(this._parts.query, this._parts.escapeQuerySpace);
return U.hasQuery(e, c, v, d)
};
p.setSearch = p.setQuery;
p.addSearch = p.addQuery;
p.removeSearch = p.removeQuery;
p.hasSearch = p.hasQuery;
p.normalize = function() {
if (this._parts.urn) {
return this.normalizeProtocol(false).normalizeQuery(false).normalizeFragment(false).build()
}
return this.normalizeProtocol(false).normalizeHostname(false).normalizePort(false).normalizePath(false).normalizeQuery(false).normalizeFragment(false).build()
};
p.normalizeProtocol = function(c) {
if (typeof this._parts.protocol === "string") {
this._parts.protocol = this._parts.protocol.toLowerCase();
this.build(!c)
}
return this
};
p.normalizeHostname = function(c) {
if (this._parts.hostname) {
if (this.is('IDN') && a) {
this._parts.hostname = a.toASCII(this._parts.hostname)
} else if (this.is('IPv6') && I) {
this._parts.hostname = I.best(this._parts.hostname)
}
this._parts.hostname = this._parts.hostname.toLowerCase();
this.build(!c)
}
return this
};
p.normalizePort = function(c) {
if (typeof this._parts.protocol === "string" && this._parts.port === U.defaultPorts[this._parts.protocol]) {
this._parts.port = null;
this.build(!c)
}
return this
};
p.normalizePath = function(c) {
if (this._parts.urn) {
return this
}
if (!this._parts.path || this._parts.path === '/') {
return this
}
var d;
var e = this._parts.path;
var i, l;
if (e.charAt(0) !== '/') {
d = true;
e = '/' + e
}
e = e.replace(/(\/(\.\/)+)|(\/\.$)/g, '/').replace(/\/{2,}/g, '/');
while (true) {
i = e.indexOf('/../');
if (i === -1) {
break
} else if (i === 0) {
e = e.substring(3);
break
}
l = e.substring(0, i).lastIndexOf('/');
if (l === -1) {
l = i
}
e = e.substring(0, l) + e.substring(i + 3)
}
if (d && this.is('relative')) {
e = e.substring(1)
}
e = U.recodePath(e);
this._parts.path = e;
this.build(!c);
return this
};
p.normalizePathname = p.normalizePath;
p.normalizeQuery = function(c) {
if (typeof this._parts.query === "string") {
if (!this._parts.query.length) {
this._parts.query = null
} else {
this.query(U.parseQuery(this._parts.query, this._parts.escapeQuerySpace))
}
this.build(!c)
}
return this
};
p.normalizeFragment = function(c) {
if (!this._parts.fragment) {
this._parts.fragment = null;
this.build(!c)
}
return this
};
p.normalizeSearch = p.normalizeQuery;
p.normalizeHash = p.normalizeFragment;
p.iso8859 = function() {
var e = U.encode;
var d = U.decode;
U.encode = escape;
U.decode = decodeURIComponent;
this.normalize();
U.encode = e;
U.decode = d;
return this
};
p.unicode = function() {
var e = U.encode;
var d = U.decode;
U.encode = o;
U.decode = unescape;
this.normalize();
U.encode = e;
U.decode = d;
return this
};
p.readable = function() {
var c = this.clone();
c.username("").password("").normalize();
var t = '';
if (c._parts.protocol) {
t += c._parts.protocol + '://'
}
if (c._parts.hostname) {
if (c.is('punycode') && a) {
t += a.toUnicode(c._parts.hostname);
if (c._parts.port) {
t += ":" + c._parts.port
}
} else {
t += c.host()
}
}
if (c._parts.hostname && c._parts.path && c._parts.path.charAt(0) !== '/') {
t += '/'
}
t += c.path(true);
if (c._parts.query) {
var q = '';
for (var i = 0, d = c._parts.query.split('&'), l = d.length; i < l; i++) {
var e = (d[i] || "").split('=');
q += '&' + U.decodeQuery(e[0], this._parts.escapeQuerySpace).replace(/&/g, '%26');
if (e[1] !== undefined) {
q += "=" + U.decodeQuery(e[1], this._parts.escapeQuerySpace).replace(/&/g, '%26')
}
}
t += '?' + q.substring(1)
}
t += U.decodeQuery(c.hash(), true);
return t
};
p.absoluteTo = function(c) {
var d = this.clone();
var e = ['protocol', 'username', 'password', 'hostname', 'port'];
var l, i, p;
if (this._parts.urn) {
throw new Error('URNs do not have any generally defined hierarchical components')
}
if (!(c instanceof U)) {
c = new U(c)
}
if (!d._parts.protocol) {
d._parts.protocol = c._parts.protocol
}
if (this._parts.hostname) {
return d
}
for (i = 0; p = e[i]; i++) {
d._parts[p] = c._parts[p]
}
e = ['query', 'path'];
for (i = 0; p = e[i]; i++) {
if (!d._parts[p] && c._parts[p]) {
d._parts[p] = c._parts[p]
}
}
if (d.path().charAt(0) !== '/') {
l = c.directory();
d._parts.path = (l ? (l + '/') : '') + d._parts.path;
d.normalizePath()
}
d.build();
return d
};
p.relativeTo = function(c) {
var d = this.clone().normalize();
var e, i, l, s, t;
if (d._parts.urn) {
throw new Error('URNs do not have any generally defined hierarchical components')
}
c = new U(c).normalize();
e = d._parts;
i = c._parts;
s = d.path();
t = c.path();
if (s.charAt(0) !== '/') {
throw new Error('URI is already relative')
}
if (t.charAt(0) !== '/') {
throw new Error('Cannot calculate a URI relative to another relative URI')
}
if (e.protocol === i.protocol) {
e.protocol = null
}
if (e.username !== i.username || e.password !== i.password) {
return d.build()
}
if (e.protocol !== null || e.username !== null || e.password !== null) {
return d.build()
}
if (e.hostname === i.hostname && e.port === i.port) {
e.hostname = null;
e.port = null
} else {
return d.build()
}
if (s === t) {
e.path = '';
return d.build()
}
l = U.commonPath(d.path(), c.path());
if (!l) {
return d.build()
}
var v = i.path.substring(l.length).replace(/[^\/]*$/, '').replace(/.*?\//g, '../');
e.path = v + e.path.substring(l.length);
return d.build()
};
p.equals = function(c) {
var d = this.clone();
var t = new U(c);
var e = {};
var i = {};
var l = {};
var s, v, x;
d.normalize();
t.normalize();
if (d.toString() === t.toString()) {
return true
}
s = d.query();
v = t.query();
d.query("");
t.query("");
if (d.toString() !== t.toString()) {
return false
}
if (s.length !== v.length) {
return false
}
e = U.parseQuery(s, this._parts.escapeQuerySpace);
i = U.parseQuery(v, this._parts.escapeQuerySpace);
for (x in e) {
if (h.call(e, x)) {
if (!f(e[x])) {
if (e[x] !== i[x]) {
return false
}
} else if (!m(e[x], i[x])) {
return false
}
l[x] = true
}
}
for (x in i) {
if (h.call(i, x)) {
if (!l[x]) {
return false
}
}
}
return true
};
p.duplicateQueryParameters = function(v) {
this._parts.duplicateQueryParameters = !!v;
return this
};
p.escapeQuerySpace = function(v) {
this._parts.escapeQuerySpace = !!v;
return this
};
return U
}));
/*!
* SAP UI development toolkit for HTML5 (SAPUI5/OpenUI5)
* (c) Copyright 2009-2014 SAP SE or an SAP affiliate company.
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
*/
(function(q) {
"use strict";
var P = function(A) {
if (typeof(A) != "function") {
throw new TypeError("Argument is not a function")
}
this._deferred = new q.Deferred();
try {
var t = this;
A(function(v) {
b(t, v, true)
}, function(v) {
b(t, v, false)
})
} catch (e) {
b(this, e, false)
}
};
P.prototype.then = function(o, O) {
var f = new P(_);
this._deferred.then(d(o, f, true), d(O, f, false));
return f
};
P.prototype["catch"] = function(o) {
return this.then(undefined, o)
};
P.all = function(p) {
return new P(function(r, R) {
if (!q.isArray(p)) {
R({});
return
}
if (p.length == 0) {
r([]);
return
}
var f = false,
v = new Array(p.length),
C = 0;
function e(I) {
P.resolve(p[I]).then(function(o) {
if (!f) {
C++;
v[I] = o;
if (C == p.length) {
r(v)
}
}
}, function(o) {
if (!f) {
f = true;
R(o)
}
})
};
for (var i = 0; i < p.length; i++) {
e(i)
}
})
};
P.race = function(p) {
return new P(function(r, R) {
if (!q.isArray(p)) {
R({})
}
var f = false;
for (var i = 0; i < p.length; i++) {
P.resolve(p[i]).then(function(o) {
if (!f) {
f = true;
r(o)
}
}, function(o) {
if (!f) {
f = true;
R(o)
}
})
}
})
};
P.resolve = function(o) {
return o instanceof P ? o : c(new P(_), o)
};
P.reject = function(o) {
return b(new P(_), o, false)
};
function _() {};
function a(o) {
return o && o.then && typeof(o.then) == "function"
};
function b(p, o, r) {
setTimeout(function() {
if (a(o) && r) {
c(p, o)
} else {
p._deferred[r ? "resolve" : "reject"](o)
}
}, 0);
return p
};
function c(p, o) {
if (a(o)) {
var f = false;
try {
o.then(function(v) {
b(p, v, true);
f = true
}, function(v) {
b(p, v, false);
f = true
})
} catch (e) {
if (!f) {
b(p, e, false)
} else {
q.sap.log.debug("Promise: Error in then: " + e)
}
}
} else {
b(p, o, true)
}
return p
};
function d(A, p, r) {
return function(o) {
if (!A) {
b(p, o, r)
} else {
try {
c(p, A(o))
} catch (e) {
b(p, e, false)
}
}
}
};
if (!window.Promise) {
window.Promise = P
}
if (window.sap && window.sap.__ui5PublishPromisePolyfill) {
window._UI5Promise = P
}
})(jQuery);
(function() {
if (!window.jQuery) {
throw new Error("SAPUI5 requires jQuery as a prerequisite (>= version 1.7)")
}
if (jQuery.sap) {
return
}
var _ = window;
var a = [];
function b(l, m) {
a.push({
level: l,
message: m
})
}
var c = undefined;
var r = /^[0-9]+(?:\.([0-9]+)(?:\.([0-9]+))?)?(.*)$/;
function V(M, i, d, s) {
if (M instanceof V) {
return M
}
if (!(this instanceof V)) {
return new V(M, i, d, s)
}
var m = (typeof M === "string" ? r.exec(M) : (jQuery.isArray(M) ? M : arguments)) || [];
function n(v) {
v = parseInt(v, 10);
return isNaN(v) ? 0 : v
}
M = n(m[0]);
i = n(m[1]);
d = n(m[2]);
s = String(m[3] || "");
this.toString = function() {
return M + "." + i + "." + d + s
};
this.getMajor = function() {
return M
};
this.getMinor = function() {
return i
};
this.getPatch = function() {
return d
};
this.getSuffix = function() {
return s
};
this.compareTo = function() {
var o = V.apply(window, arguments);
return M - o.getMajor() || i - o.getMinor() || d - o.getPatch() || ((s < o.getSuffix()) ? -1 : (s === o.getSuffix()) ? 0 : 1)
}
}
V.prototype.inRange = function(m, M) {
return this.compareTo(m) >= 0 && this.compareTo(M) < 0
};
var j = V(jQuery.fn.jquery);
if (!j.inRange("1.7.0", "2.0.0")) {
b("error", "SAPUI5 requires a jQuery version of 1.7 or higher, but lower than 2.0; current version is " + jQuery.fn.jquery)
}
if (!jQuery.browser) {
jQuery.browser = (function(u) {
var d = /(webkit)[ \/]([\w.]+)/,
i = /(opera)(?:.*version)?[ \/]([\w.]+)/,
l = /(msie) ([\w.]+)/,
m = /(mozilla)(?:.*? rv:([\w.]+))?/,
u = u.toLowerCase(),
n = d.exec(u) || i.exec(u) || l.exec(u) || u.indexOf("compatible") < 0 && m.exec(u) || [],
o = {};
if (n[1]) {
o[n[1]] = true;
o.version = n[2] || "0";
if (o.webkit) {
o.safari = true
}
}
return o
}(window.navigator.userAgent))
}
if (!!sap.ui.Device.browser.internet_explorer) {
jQuery.support.cors = true
}
var f = (function() {
var t, u, R, d = /^(.*\/)?download\/configurator[\/\?]/,
i = /^(.*\/)?(sap-ui-(core|custom|boot|merged)(-.*)?)\.js([?#]|$)/,
l = /^(.*\/)?resources\//;
jQuery("script[src]").each(function() {
var s = this.getAttribute("src"),
m;
if (m = s.match(d)) {
t = this;
u = s;
R = (m[1] || "") + "resources/";
return false
} else if (m = s.match(i)) {
t = this;
u = s;
R = m[1] || "";
return false
} else if (this.id == 'sap-ui-bootstrap' && (m = s.match(l))) {
t = this;
u = s;
R = m[0];
return false
}
});
return {
tag: t,
url: u,
resourceRoot: R
}
})();
(function() {
if (/sap-bootstrap-debug=(true|x|X)/.test(location.search)) {
window["sap-ui-bRestart"] = false;
window["sap-ui-sRestartUrl"] = "http://localhost:8080/sapui5/resources/sap-ui-core.js";
var d = function() {
var s = f.tag,
l = "<script src=\"" + window["sap-ui-sRestartUrl"] + "\"";
jQuery.each(s.attributes, function(i, A) {
if (A.nodeName.indexOf("data-sap-ui-") == 0) {
l += " " + A.nodeName + "=\"" + A.nodeValue + "\""
}
});
l += "></script>";
s.parentNode.removeChild(s);
jQuery("#sap-ui-bootstrap-cachebusted").remove();
window["sap-ui-config"] && window["sap-ui-config"].resourceRoots && (window["sap-ui-config"].resourceRoots[""] = undefined);
document.write(l);
var R = new Error("Aborting UI5 bootstrap and restarting from: " + window["sap-ui-sRestartUrl"]);
R.name = "Restart";
delete window["sap-ui-bRestart"];
delete window["sap-ui-sRestartUrl"];
throw R
};
debugger;
if (window["sap-ui-bRestart"]) {
d()
}
}
})();
(function() {
var d = /sap-ui-debug=(true|x|X)/.test(location.search),
i = window["sap-ui-optimized"];
try {
d = d || (window.localStorage.getItem("sap-ui-debug") == "X")
} catch (e) {}
window["sap-ui-debug"] = d;
if (/-dbg\.js([?#]|$)/.test(f.url)) {
window["sap-ui-loaddbg"] = true;
window["sap-ui-debug"] = true
}
if (i && d) {
var D = f.url.replace(/\/(?:sap-ui-cachebuster\/)?([^\/]+)\.js/, "/$1-dbg.js");
window["sap-ui-optimized"] = false;
window["sap-ui-loaddbg"] = true;
//document.write("<script type=\"text/javascript\" src=\"" + D + "\"></script>");
var scriptTag = document.createElement("script");
scriptTag.type = "text/javascript";
scriptTag.src = D;
document.body.appendChild(scriptTag);
var R = new Error("Aborting UI5 bootstrap and restarting from: " + D);
R.name = "Restart";
throw R
}
})();
var C = _["sap-ui-config"] = (function() {
function n(o) {
jQuery.each(o, function(i, v) {
var m = i.toLowerCase();
if (!o.hasOwnProperty(m)) {
o[m] = v;
delete o[i]
}
});
return o
}
var s = f.tag,
d = _["sap-ui-config"],
l = "sap-ui-config.json";
if (typeof d === "string") {
b("warning", "Loading external bootstrap configuration from \"" + d + "\". This is a design time feature and not for productive usage!");
if (d !== l) {
b("warning", "The external bootstrap configuration file should be named \"" + l + "\"!")
}
jQuery.ajax({
url: d,
dataType: 'json',
async: false,
success: function(D, T, i) {
d = D
},
error: function(i, T, o) {
b("error", "Loading externalized bootstrap configuration from \"" + d + "\" failed! Reason: " + o + "!");
d = undefined
}
})
}
d = n(d || {});
d.resourceroots = d.resourceroots || {};
d.themeroots = d.themeroots || {};
d.resourceroots[''] = d.resourceroots[''] || f.resourceRoot;
d['xx-loadallmode'] = /(^|\/)(sap-?ui5|[^\/]+-all).js([?#]|$)/.test(f.url);
if (s) {
var t = s.getAttribute("data-sap-ui-config");
if (t) {
try {
jQuery.extend(d, n((new Function("return {" + t + "};"))()))
} catch (e) {
b("error", "failed to parse data-sap-ui-config attribute: " + (e.message || e))
}
}
jQuery.each(s.attributes, function(i, o) {
var m = o.name.match(/^data-sap-ui-(.*)$/);
if (m) {
m = m[1].toLowerCase();
if (m === 'resourceroots') {
jQuery.extend(d[m], jQuery.parseJSON(o.value))
} else if (m === 'theme-roots') {
jQuery.extend(d.themeroots, jQuery.parseJSON(o.value))
} else if (m !== 'config') {
d[m] = o.value
}
}
})
}
return d
}());
if (C.noconflict === true || C.noconflict === "true" || C.noconflict === "x") {
jQuery.noConflict()
}
jQuery.sap = {};
jQuery.sap.Version = V;
jQuery.sap.debug = function(d) {
if (!window.localStorage) {
return null
}
function i(u) {
alert("Usage of debug sources is " + (u ? "on" : "off") + " now.\nFor the change to take effect, you need to reload the page.")
};
if (d === true) {
window.localStorage.setItem("sap-ui-debug", "X");
i(true)
} else if (d === false) {
window.localStorage.removeItem("sap-ui-debug");
i(false)
}
return window.localStorage.getItem("sap-ui-debug") == "X"
};
jQuery.sap.statistics = function(d) {
if (!window.localStorage) {
return null
}
function i(u) {
alert("Usage of Gateway statistics " + (u ? "on" : "off") + " now.\nFor the change to take effect, you need to reload the page.")
};
if (d === true) {
window.localStorage.setItem("sap-ui-statistics", "X");
i(true)
} else if (d === false) {
window.localStorage.removeItem("sap-ui-statistics");
i(false)
}
return window.localStorage.getItem("sap-ui-statistics") == "X"
};
(function() {
var F = 0,
d = 1,
W = 2,
I = 3,
D = 4,
T = 5,
s = (window.top == window) ? "" : "[" + window.location.pathname.split('/').slice(-1)[0] + "] ",
l = [],
M = {
'': d
},
L = null;
function n(i, w) {
return ("000" + String(i)).slice(-w)
}
function o(i) {
return (!i || isNaN(M[i])) ? M[''] : M[i]
}
function t() {
if (!L) {
L = {
listeners: [],
onLogEntry: function(m) {
for (var i = 0; i < L.listeners.length; i++) {
if (L.listeners[i].onLogEntry) {
L.listeners[i].onLogEntry(m)
}
}
},
attach: function(i, m) {
if (m) {
L.listeners.push(m);
if (m.onAttachToLog) {
m.onAttachToLog(i)
}
}
},
detach: function(m, v) {
for (var i = 0; i < L.listeners.length; i++) {
if (L.listeners[i] === v) {
if (v.onDetachFromLog) {
v.onDetachFromLog(m)
}
L.listeners.splice(i, 1);
return
}
}
}
}
}
return L
}
function u(i, m, v, w) {
if (i <= o(w)) {
var N = new Date(),
y = {
time: n(N.getHours(), 2) + ":" + n(N.getMinutes(), 2) + ":" + n(N.getSeconds(), 2),
date: n(N.getFullYear(), 4) + "-" + n(N.getMonth() + 1, 2) + "-" + n(N.getDate(), 2),
timestamp: N.getTime(),
level: i,
message: String(m || ""),
details: String(v || ""),
component: String(w || "")
};
l.push(y);
if (L) {
L.onLogEntry(y)
}
if (window.console) {
var z = y.date + " " + y.time + " " + s + y.message + " - " + y.details + " " + y.component;
switch (i) {
case F:
case d:
console.error(z);
break;
case W:
console.warn(z);
break;
case I:
console.info ? console.info(z) : console.log(z);
break;
case D:
console.debug ? console.debug(z) : console.log(z);
break;
case T:
console.trace ? console.trace(z) : console.log(z);
break
}
}
return y
}
}
function x(i) {
this.fatal = function(m, v, w) {
u(F, m, v, w || i);
return this
};
this.error = function error(m, v, w) {
u(d, m, v, w || i);
return this
};
this.warning = function warning(m, v, w) {
u(W, m, v, w || i);
return this
};
this.info = function info(m, v, w) {
u(I, m, v, w || i);
return this
};
this.debug = function debug(m, v, w) {
u(D, m, v, w || i);
return this
};
this.trace = function trace(m, v, w) {
u(T, m, v, w || i);
return this
};
this.setLevel = function setLevel(m, w) {
w = w || i || '';
M[w] = m;
var B = [];
jQuery.each(jQuery.sap.log.LogLevel, function(y, v) {
B[v] = y
});
u(I, "Changing log level " + (w ? "for '" + w + "' " : "") + "to " + B[m], "", "jQuery.sap.log");
return this
};
this.getLevel = function getLevel(m) {
return o(m || i)
};
this.isLoggable = function(m, v) {
return (m == null ? D : m) <= o(v || i)
}
}
jQuery.sap.log = jQuery.extend(new x(), {
Level: {
NONE: F - 1,
FATAL: F,
ERROR: d,
WARNING: W,
INFO: I,
DEBUG: D,
TRACE: T,
ALL: (T + 1)
},
getLogger: function(i, m) {
if (!isNaN(m) && M[i] == null) {
M[i] = m
}
return new x(i)
},
getLogEntries: function() {
return l.slice()
},
addLogListener: function(L) {
t().attach(this, L);
return this
},
removeLogListener: function(L) {
t().detach(this, L);
return this
}
});
jQuery.sap.log.LogLevel = jQuery.sap.log.Level;
jQuery.sap.log.getLog = jQuery.sap.log.getLogEntries;
jQuery.sap.assert = function(R, m) {
if (!R) {
if (window.console && console.assert) {
console.assert(R, s + m)
} else {
jQuery.sap.log.debug("[Assertions] " + m)
}
}
};
C.loglevel = (function() {
var m = /(?:\?|&)sap-ui-log(?:L|-l)evel=([^&]*)/.exec(window.location.search);
return m && m[1]
}()) || C.loglevel;
if (C.loglevel) {
jQuery.sap.log.setLevel(jQuery.sap.log.Level[C.loglevel.toUpperCase()] || parseInt(C.loglevel, 10))
}
jQuery.sap.log.info("SAP Logger started.");
jQuery.each(a, function(i, e) {
jQuery.sap.log[e.level](e.message)
});
a = null
}());
jQuery.sap.factory = function factory(o) {
function F() {}
F.prototype = o;
return F
};
jQuery.sap.newObject = function newObject(o) {
return new(jQuery.sap.factory(o))()
};
jQuery.sap.getter = function getter(v) {
return function() {
return v
}
};
jQuery.sap.getObject = function getObject(n, N, o) {
var O = o || _,
d = (n || "").split("."),
l = d.length,
m = isNaN(N) ? 0 : l - N,
i;
for (i = 0; O && i < l; i++) {
if (!O[d[i]] && i < m) {
O[d[i]] = {}
}
O = O[d[i]]
}
return O
};
jQuery.sap.setObject = function(n, v, o) {
var O = o || _,
N = (n || "").split("."),
l = N.length,
i;
if (l > 0) {
for (i = 0; O && i < l - 1; i++) {
if (!O[N[i]]) {
O[N[i]] = {}
}
O = O[N[i]]
}
O[N[l - 1]] = v
}
};
function S(n, d, t) {
var T = [],
o = 0,
F = 0,
s;
this.startTask = function(l) {
var I = T.length;
T[I] = {
name: l,
finished: false
};
o++;
return I
};
this.finishTask = function(I, l) {
if (!T[I] || T[I].finished) {
throw new Error("trying to finish non existing or already finished task")
}
T[I].finished = true;
o--;
if (l === false) {
F++
}
if (o === 0) {
jQuery.sap.log.info("Sync point '" + n + "' finished (tasks:" + T.length + ", open:" + o + ", failures:" + F + ")");
if (s) {
clearTimeout(s);
s = null
};
i()
}
};
function i() {
d && d(o, F);
d = null
}
if (!isNaN(t)) {
s = setTimeout(function() {
jQuery.sap.log.info("Sync point '" + n + "' timed out (tasks:" + T.length + ", open:" + o + ", failures:" + F + ")");
i()
}, t)
};
jQuery.sap.log.info("Sync point '" + n + "' created" + (t ? "(timeout after " + t + " ms)" : ""))
}
jQuery.sap.syncPoint = function(n, d, t) {
return new S(n, d, t)
};
var g = (function() {
var o = jQuery.sap.log.getLogger("sap.ui.ModuleSystem", (/sap-ui-xx-debug(M|-m)odule(L|-l)oading=(true|x|X)/.test(location.search) || C["xx-debugModuleLoading"]) ? jQuery.sap.log.Level.DEBUG : jQuery.sap.log.Level.INFO),
u = {
'': 'resources/'
},
I = 0,
t = -1,
L = 1,
v = 2,
w = 3,
R = 4,
F = 5,
M = {
"sap/ui/thirdparty/URI.js": {
state: R,
url: c,
content: URI
},
"sap/ui/Device.js": {
state: R,
url: c,
content: sap.ui.Device
},
"jquery.sap.global.js": {
state: R,
url: c,
content: jQuery
}
},
x = {},
A = {
'sap/ui/thirdparty/crossroads.js': true,
'sap/ui/thirdparty/datajs.js': true,
'sap/ui/thirdparty/hasher.js': true,
'sap/ui/thirdparty/IPv6.js': true,
'sap/ui/thirdparty/jquery/jquery-1.11.1.js': true,
'sap/ui/thirdparty/jquery/jquery-1.10.2.js': true,
'sap/ui/thirdparty/jquery/jquery-1.10.1.js': true,
'sap/ui/thirdparty/jquery/jquery.1.7.1.js': true,
'sap/ui/thirdparty/jquery/jquery.1.8.1.js': true,
'sap/ui/thirdparty/jquery-mobile-custom.js': true,
'sap/ui/thirdparty/less.js': true,
'sap/ui/thirdparty/punycode.js': true,
'sap/ui/thirdparty/require.js': true,
'sap/ui/thirdparty/SecondLevelDomains.js': true,
'sap/ui/thirdparty/signals.js': true,
'sap/ui/thirdparty/URI.js': true
},
y = [],
z = "",
B = 512 * 1024,
D = document.location.href.replace(/\?.*|#.*/g, ""),
G = "fragment",
H = "view",
K = {
js: [H, G, "controller"],
xml: [H, G],
json: [H, G],
html: [H, G]
},
J = new RegExp("(\\.(?:" + K.js.join("|") + "))?\\.js$"),
N, O;
(function() {
var s = "",
d = "";
jQuery.each(K, function(i, l) {
s = (s ? s + "|" : "") + i;
d = (d ? d + "|" : "") + "(?:(?:" + l.join("\\.|") + "\\.)?" + i + ")"
});
s = "\\.(" + s + ")$";
d = "\\.(?:" + d + "|[^./]+)$";
o.debug("constructed regexp for file types :" + s);
o.debug("constructed regexp for file sub-types :" + d);
N = new RegExp(s);
O = new RegExp(d)
}());
function Q(s) {
if (/^sap\.ui\.thirdparty\.jquery\.jquery-/.test(s)) {
return "sap/ui/thirdparty/jquery/jquery-" + s.slice("sap.ui.thirdparty.jquery.jquery-".length)
} else if (/^jquery\.sap\./.test(s)) {
return s
}
return s.replace(/\./g, "/")
}
function T(s) {
var d;
if (!/\.js$/.test(s)) {
return
}
s = s.slice(0, -3);
if (/^sap\/ui\/thirdparty\/jquery\/jquery-/.test(s)) {
return "sap.ui.thirdparty.jquery.jquery-" + s.slice("sap/ui/thirdparty/jquery/jquery-".length)
} else if (/^jquery\.sap\./.test(s)) {
return s
}
return s.replace(/\//g, ".")
}
function U(s, d) {
var i = s.split(/\//),
l, a1, b1, m;
if (arguments.length === 1 && i.length > 0) {
m = O.exec(i[i.length - 1]);
if (m) {
d = m[0];
i[i.length - 1] = i[i.length - 1].slice(0, m.index)
} else {
d = ""
}
}
for (l = i.length; l >= 0; l--) {
a1 = i.slice(0, l).join('/');
if (u[a1]) {
b1 = u[a1];
if (l < i.length) {
b1 += i.slice(l).join('/')
}
if (b1.slice(-1) === '/') {
b1 = b1.slice(0, -1)
}
return b1 + (d || '')
}
}
}
function W(s) {
var d, i, l;
for (d in u) {
if (u.hasOwnProperty(d)) {
i = u[d].slice(0, -1);
if (s.indexOf(i) === 0) {
l = d + s.slice(i.length);
if (l.charAt(0) === '/') {
l = l.slice(1)
}
if (M[l] && M[l].data) {
return l
}
}
}
}
}
function X(m) {
var d;
d = M[m] || (M[m] = {
state: I
});
if (d.state > I) {
return d
}
if (o.isLoggable()) {
o.debug(z + "declare module '" + m + "'")
}
d.state = R;
if (y.length === 0) {
y.push(m);
d.url = d.url || c
}
return d
}
function Y(s) {
var m = J.exec(s),
d, l, a1, b1, i;
if (!m) {
o.error("can only require Javascript module, not " + s);
a1.state = F;
return
}
d = s.slice(0, m.index);
l = m[0];
a1 = M[s] || (M[s] = {
state: I
});
if (o.isLoggable()) {
o.debug(z + "require '" + s + "' of type '" + l + "'")
}
if (a1.state !== I) {
if (a1.state === t) {
a1.state = v;
if (A[s] && typeof window.define === "function" && window.define.amd) {
var c1 = window.define.amd;
try {
delete window.define.amd;
Z(s)
} finally {
window.define.amd = c1
}
} else {
Z(s)
}
}
if (a1.state === R) {
if (o.isLoggable()) {
o.debug(z + "module '" + s + "' has already been loaded (skipped).")
}
return this
} else if (a1.state === F) {
throw new Error("found in negative cache: '" + s + "' from " + a1.url + ": " + a1.error)
} else {
return this
}
}
a1.state = L;
b1 = window["sap-ui-loaddbg"] ? ["-dbg", ""] : [""];
for (i = 0; i < b1.length && a1.state !== v; i++) {
a1.url = U(d, b1[i] + l);
if (o.isLoggable()) {
o.debug(z + "loading " + (b1[i] ? b1[i] + " version of " : "") + "'" + s + "' from '" + a1.url + "'")
}
jQuery.ajax({
url: a1.url,
dataType: 'text',
async: false,
success: function(d1, e1, f1) {
a1.state = v;
a1.data = d1
},
error: function(d1, e1, f1) {
a1.state = F;
a1.error = d1 ? d1.status + " - " + d1.statusText : e1
}
})
}
if (a1.state === v) {
if (A[s] && typeof window.define === "function" && window.define.amd) {
var c1 = window.define.amd;
try {
delete window.define.amd;
Z(s)
} finally {
window.define.amd = c1
}
} else {
Z(s)
}
}
if (a1.state !== R) {
throw new Error("failed to load '" + s + "' from " + a1.url + ": " + a1.error)
}
}
function Z(m) {
var d = M[m],
s, i;
if (d && d.state === v && typeof d.data !== "undefined") {
try {
if (o.isLoggable()) {
o.debug(z + "executing '" + m + "'");
s = z;
z = z + ": "
}
d.state = w;
y.push(m);
if (typeof d.data === "function") {
d.data.apply(window)
} else {
i = d.data;
if (i && !i.match(/\/\/[#@] source(Mapping)?URL=.*$/)) {
i += "\n//# sourceURL=" + URI(d.url).absoluteTo(D)
}
if (_.execScript && (!d.data || d.data.length < B)) {
try {
d.data && _.execScript(i)
} catch (e) {
y.pop();
jQuery.sap.globalEval(d.data);
throw e
}
} else {
_.eval(i)
}
}
y.pop();
d.state = R;
d.data = undefined;
d.content = d.content || jQuery.sap.getObject(T(m));
if (o.isLoggable()) {
z = s;
o.debug(z + "finished executing '" + m + "'")
}
} catch (l) {
d.state = F;
d.error = ((l.toString && l.toString()) || l.message) + (l.line ? "(line " + l.line + ")" : "");
d.data = undefined;
if (window["sap-ui-debug"] && (/sap-ui-xx-show(L|-l)oad(E|-e)rrors=(true|x|X)/.test(location.search) || C["xx-showloaderrors"])) {
o.error("error while evaluating " + m + ", embedding again via script tag to enforce a stack trace (see below)");
jQuery.sap.includeScript(d.url);
return
}
}
}
}
function $(d, l) {
var s = [],
i, a1, b1, m;
for (i = 0; i < d.length; i++) {
a1 = d[i];
o.debug(z + "require '" + a1 + "'");
Y(a1 + ".js");
s[i] = M[a1 + ".js"].content || jQuery.sap.getObject(T(a1 + ".js"));
o.debug(z + "require '" + a1 + "': done.")
}
l.apply(this, s)
}
jQuery.sap.getModulePath = function(m, s) {
return U(Q(m), s)
};
jQuery.sap.getResourcePath = U;
jQuery.sap.registerModulePath = function registerModulePath(m, s) {
m = m.replace(/\./g, "/");
s = s || '.';
jQuery.sap.registerResourcePath(m, s)
};
jQuery.sap.registerResourcePath = function(s, d) {
s = String(s || "");
if (d == null) {
delete u[s]
} else {
d = String(d);
if (d.slice(-1) != '/') {
d += '/'
}
u[s] = d
}
o.info("registerResourcePath ('" + s + "', '" + d + "')")
};
jQuery.sap.isDeclared = function isDeclared(m, i) {
m = Q(m) + ".js";
return M[m] && (i || M[m].state !== t)
};
jQuery.sap.getAllDeclaredModules = function() {
var m = [];
jQuery.each(M, function(s, d) {
if (d && d.state !== t) {
var i = T(s);
if (i) {
m.push(i)
}
}
});
return m
};
if (C.resourceroots) {
jQuery.each(C.resourceroots, jQuery.sap.registerModulePath)
}
o.info("URL prefixes set to:");
for (var n in u) {
o.info(" " + (n ? "'" + n + "'" : "(default)") + " : " + u[n])
}
jQuery.sap.declare = function(m, d) {
var s = m;
if (typeof(m) === "object") {
s = m.modName;
m = Q(m.modName) + (m.type ? "." + m.type : "") + ".js"
} else {
m = Q(m) + ".js"
}
X(m);
if (d !== false) {
jQuery.sap.getObject(s, 1)
}
return this
};
jQuery.sap.require = function(m, d) {
if (jQuery.isArray(m) && typeof d === "function") {
$(m, d)
} else if (arguments.length > 1) {
for (var i = 0; i < arguments.length; i++) {
jQuery.sap.require(arguments[i])
}
return this
}
if (typeof(m) === "object") {
m = Q(m.modName) + (m.type ? "." + m.type : "") + ".js"
} else {
m = Q(m) + ".js"
}
Y(m);
return this
};
jQuery.sap._requirePath = function(m) {
Y(m + ".js")
};
window.sap = window.sap || {};
sap.ui = sap.ui || {};
sap.ui.define = function(s, d, l, m) {
var a1 = [],
b1, c1, i;
if (typeof s === "string") {
b1 = s + ".js"
} else {
m = l;
l = d;
d = s;
b1 = y[y.length - 1]
}
s = T(b1);
if (!jQuery.isArray(d)) {
m = l;
l = d;
d = []
} else {
var d1 = b1.slice(0, 1 + b1.lastIndexOf('/'));
for (i = 0; i < d.length; i++) {
if (/^\.\//.test(d[i])) {
d[i] = d1 + d[i].slice(2)
}
}
}
if (o.isLoggable()) {
o.debug("define(" + b1 + ", " + "['" + d.join("','") + "']" + ")")
}
var e1 = X(b1);
$(d, function() {
if (o.isLoggable()) {
o.debug("define(" + b1 + "): calling factory " + typeof l)
}
if (m) {
jQuery.sap.getObject(s, 1)
}
if (typeof l === "function") {
e1.content = l.apply(window, arguments)
} else {
e1.content = l
}
if (m) {
if (e1.content == null) {
o.error("module '" + b1 + "' returned no content, but should be exported")
} else {
if (o.isLoggable()) {
o.debug("exporting content of '" + b1 + "': as global object")
}
jQuery.sap.setObject(s, e1.content)
}
}
})
};
jQuery.sap.preloadModules = function(s, d, i) {
var l, m;
if (x[s]) return;
x[s] = true;
l = jQuery.sap.getModulePath(s, ".json");
o.debug("preload file " + s);
m = i && i.startTask("load " + s);
jQuery.ajax({
dataType: "json",
async: d,
url: l,
success: function(a1) {
if (a1) {
a1.url = l
}
jQuery.sap.registerPreloadedModules(a1, d, i);
i && i.finishTask(m)
},
error: function(a1, b1, c1) {
o.error("failed to preload '" + s + "': " + (c1 || b1));
i && i.finishTask(m, false)
}
})
};
jQuery.sap.registerPreloadedModules = function(d, i, s) {
var l = V(d.version || "1.0").compareTo("2.0") < 0;
if (o.isLoggable()) {
o.debug(z + "adding preloaded modules from '" + d.url + "'")
}
if (d.name) {
x[d.name] = true
}
jQuery.each(d.modules, function(m, a1) {
m = l ? Q(m) + ".js" : m;
if (!M[m]) {
M[m] = {
state: t,
url: d.url + "/" + m,
data: a1,
group: d.name
}
}
if (m.match(/\/library\.js$/)) {
x[T(m) + "-preload"] = true
}
});
if (d.dependencies) {
jQuery.each(d.dependencies, function(m, a1) {
jQuery.sap.preloadModules(a1, i, s)
})
}
};
jQuery.sap.unloadResources = function(s, d, l, m) {
var a1 = [];
if (d == null) {
d = true
}
if (d) {
jQuery.each(M, function(i, b1) {
if (b1 && b1.group === s) {
a1.push(i)
}
});
delete x[s]
} else {
if (M[s]) {
a1.push(s)
}
}
jQuery.each(a1, function(i, b1) {
var c1 = M[b1];
if (c1 && m && b1.match(/\.js$/)) {
jQuery.sap.setObject(T(b1), undefined)
}
if (c1 && (l || c1.state === t)) {
delete M[b1]
}
})
};
jQuery.sap.getResourceName = function(m, s) {
return Q(m) + (s || ".js")
};
jQuery.sap.loadResource = function(s, m) {
var i, l, a1, b1, c1;
if (typeof s === "string") {
m = m || {}
} else {
m = s || {};
s = m.name;
if (!s && m.url) {
s = W(m.url)
}
}
m = jQuery.extend({
failOnError: true,
async: false
}, m);
i = m.dataType;
if (i == null && s) {
i = (i = N.exec(s)) && i[1]
}
c1 = m.async ? new jQuery.Deferred() : null;
function d1(d, e) {
if (d == null && m.failOnError) {
e = e || new Error("no data returned for " + s);
if (m.async) {
c1.reject(e);
jQuery.sap.log.error(e);
return d
}
throw e
}
if (m.async) {
c1.resolve(d)
}
return d
}
function e1(d) {
var f1 = jQuery.ajaxSettings.converters["text " + i];
if (typeof f1 === "function") {
d = f1(d)
}
return d1(d)
}
l = s && M[s] && M[s].data;
if (l != null) {
if (m.async) {
setTimeout(function() {
e1(l)
}, 0)
} else {
l = e1(l)
}
} else {
jQuery.ajax({
url: a1 = m.url || U(s),
async: m.async,
dataType: i,
headers: m.headers,
success: function(d, f1, g1) {
l = d1(d)
},
error: function(d, f1, g1) {
b1 = new Error("resource " + s + " could not be loaded from " + a1 + ". Check for 'file not found' or parse errors.");
b1.status = f1;
b1.error = g1;
b1.statusCode = d.status;
l = d1(null, b1)
}
})
}
return m.async ? window.Promise.resolve(c1) : l
};
return function() {
return {
modules: M,
prefixes: u
}
}
}());
function h(o) {
var d = window.document.getElementsByTagName("head")[0];
if (d) {
d.appendChild(o)
}
}
jQuery.sap.includeScript = function includeScript(u, i, l, d) {
var s = window.document.createElement("script");
s.src = u;
s.type = "text/javascript";
if (i) {
s.id = i
}
if (!!sap.ui.Device.browser.internet_explorer && sap.ui.Device.browser.version < 9) {
if (l) {
s.onreadystatechange = function() {
if (s.readyState === "loaded" || s.readyState === "complete") {
l();
s.onreadystatechange = null
}
}
}
} else {
if (l) {
jQuery(s).load(l)
}
if (d) {
jQuery(s).error(d)
}
}
var o;
if ((i && (o = jQuery.sap.domById(i)) && o.tagName === "SCRIPT")) {
jQuery(o).remove()
}
h(s)
};
jQuery.sap.includeStyleSheet = function includeStyleSheet(u, I, l, d) {
var m = function(u, I, l, d) {
var L = document.createElement("link");
L.type = "text/css";
L.rel = "stylesheet";
L.href = u;
if (I) {
L.id = I
}
jQuery(L).load(function() {
jQuery(L).attr("sap-ui-ready", "true");
if (l) {
l()
}
});
jQuery(L).error(function() {
jQuery(L).attr("sap-ui-ready", "false");
if (d) {
d()
}
});
return L
};
var n = function(u, I, l, d) {
if (sap.ui.Device.browser.internet_explorer && sap.ui.Device.browser.version <= 9 && document.styleSheets.length >= 28) {
var s = URI.parse(document.URL).path;
jQuery.sap.log.warning("StlyeSheet " + I + " not added as LINK because of IE limits", u, "jQuery.sap.includeStyleSheet");
if (!this._oIEStyleSheet) {
this._oIEStyleSheet = document.createStyleSheet();
this._oIEStyleSheet.addImport(URI(u).absoluteTo(s))
} else {
var A = false;
for (var i = 0; i < this._oIEStyleSheet.imports.length; i++) {
var t = this._oIEStyleSheet.imports[i];
if (t.imports.length < 30) {
t.addImport(URI(u).absoluteTo(s));
A = true;
break
}
}
if (!A) {
this._oIEStyleSheet.addImport(URI(u).absoluteTo(s))
}
}
var v = document.getElementById('sap-ui-core-customcss');
if (!jQuery.isEmptyObject(v)) {
h(v)
}
} else {
var L = m(u, I, l, d);
if (jQuery('#sap-ui-core-customcss').length > 0) {
jQuery('#sap-ui-core-customcss').first().before(jQuery(L))
} else {
h(L)
}
}
};
var o, R;
if ((I && (o = jQuery.sap.domById(I)) && (R = o.tagName === "LINK" && o.rel === "stylesheet")) || window.document.body) {
if (R) {
if (o.getAttribute("href") !== u || l || d) {
jQuery(o).replaceWith(m(u, I, l, d))
}
} else {
n(u, I, l, d)
}
} else {
n(u, I, l, d)
}
};
if (!(C.productive === true || C.productive === "true" || C.productive === "x")) {
jQuery(function() {
jQuery(document.body).keydown(function(e) {
if (e.keyCode == 80 && e.shiftKey && e.altKey && e.ctrlKey) {
try {
jQuery.sap.require("sap.ui.debug.TechnicalInfo")
} catch (e) {
return
}
sap.ui.debug.TechnicalInfo.open(function() {
var i = g();
return {
modules: i.modules,
prefixes: i.urlPrefixes,
config: C
}
})
}
})
});
jQuery(function() {
jQuery(document.body).keydown(function(e) {
if (e.keyCode == 83 && e.shiftKey && e.altKey && e.ctrlKey) {
try {
jQuery.sap.require("sap.ui.core.support.Support");
var s = sap.ui.core.support.Support.getStub();
if (s.getType() != sap.ui.core.support.Support.StubType.APPLICATION) {
return
}
s.openSupportTool()
} catch (e) {}
}
})
})
}
if (/sap-ui-xx-e2e-trace=(true|x|X)/.test(location.search)) {
jQuery.sap.require("sap.ui.core.support.trace.E2eTraceLib" + "")
}
if (!jQuery.support) {
jQuery.support = {}
}
jQuery.extend(jQuery.support, {
touch: "ontouchend" in document
});
var p = ["Webkit", "ms", "Moz"];
var k = document.documentElement.style;
var q = function(d, l) {
if (jQuery.support[d] === undefined) {
if (k[l] !== undefined) {
jQuery.support[d] = true;
if (l === "boxFlex" || l === "flexOrder" || l === "flexGrow") {
if (!sap.ui.Device.browser.chrome || sap.ui.Device.browser.version > 28) {
jQuery.support.flexBoxPrefixed = false
}
}
return
} else {
l = l.charAt(0).toUpperCase() + l.slice(1);
for (var i in p) {
if (k[p[i] + l] !== undefined) {
jQuery.support[d] = true;
return
}
}
}
jQuery.support[d] = false
}
};
q("cssTransforms", "transform");
q("cssTransforms3d", "perspective");
q("cssTransitions", "transition");
q("cssAnimations", "animationName");
if (jQuery.support.cssGradients === undefined) {
var E = document.createElement('div'),
k = E.style;
try {
k.backgroundImage = "linear-gradient(left top, red, white)";
k.backgroundImage = "-moz-linear-gradient(left top, red, white)";
k.backgroundImage = "-webkit-linear-gradient(left top, red, white)";
k.backgroundImage = "-ms-linear-gradient(left top, red, white)";
k.backgroundImage = "-webkit-gradient(linear, left top, right bottom, from(red), to(white))"
} catch (e) {}
jQuery.support.cssGradients = (k.backgroundImage && k.backgroundImage.indexOf("gradient") > -1);
E = null
}
jQuery.support.flexBoxPrefixed = true;
q("flexBoxLayout", "boxFlex");
if (k.msFlexOrder !== undefined) {
jQuery.support.ie10FlexBoxLayout = true
}
q("newFlexBoxLayout", "flexGrow");
if (jQuery.support.flexBoxLayout || jQuery.support.newFlexBoxLayout || jQuery.support.ie10FlexBoxLayout) {
jQuery.support.hasFlexBoxSupport = true
} else {
jQuery.support.hasFlexBoxSupport = false
}
if (!jQuery.support.opacity) {
(function() {
var o = jQuery.cssHooks.opacity.set;
jQuery.cssHooks.opacity.set = function(d, v) {
o.apply(this, arguments);
if (!jQuery.trim(d.style.filter)) {
d.style.removeAttribute("filter")
}
}
}())
}
function P() {
function M(i, I, s, l) {
this.id = i;
this.info = I;
this.start = s;
this.end = l;
this.pause = 0;
this.resume = 0;
this.duration = 0;
this.time = 0
}
var A = false;
var d = jQuery.ajax;
this.getActive = function() {
return A
};
this.setActive = function(o) {
if (A == o) {
return A
}
A = o;
if (A) {
jQuery.ajax = function(u, i) {
jQuery.sap.measure.start(u.url, "Request for " + u.url);
d.apply(this, arguments);
jQuery.sap.measure.end(u.url)
}
} else if (d) {
jQuery.ajax = d
}
return A
};
this.setActive(/sap-ui-measure=(true|x|X)/.test(location.search));
this.mMeasurements = {};
this.start = function(i, I) {
if (!A) {
return
}
var t = new Date().getTime();
var m = new M(i, I, t, 0);
if (m) {
this.mMeasurements[i] = m;
return ({
id: m.id,
info: m.info,
start: m.start
})
} else {
return false
}
};
this.pause = function(i) {
if (!A) {
return
}
var t = new Date().getTime();
var m = this.mMeasurements[i];
if (m && m.end > 0) {
return false
}
if (m && m.pause == 0) {
m.pause = t;
if (m.pause >= m.resume && m.resume > 0) {
m.duration = m.duration + m.pause - m.resume;
m.resume = 0
} else if (m.pause >= m.start) {
m.duration = m.pause - m.start
}
}
if (m) {
return ({
id: m.id,
info: m.info,
start: m.start,
pause: m.pause
})
} else {
return false
}
};
this.resume = function(i) {
if (!A) {
return
}
var t = new Date().getTime();
var m = this.mMeasurements[i];
if (m && m.pause > 0) {
m.pause = 0;
m.resume = t
}
if (m) {
return ({
id: m.id,
info: m.info,
start: m.start,
resume: m.resume
})
} else {
return false
}
};
this.end = function(i) {
if (!A) {
return
}
var t = new Date().getTime();
var m = this.mMeasurements[i];
if (m && !m.end) {
m.end = t;
if (m.end >= m.resume && m.resume > 0) {
m.duration = m.duration + m.end - m.resume;
m.resume = 0
} else if (m.pause > 0) {
m.pause = 0
} else if (m.end >= m.start) {
m.duration = m.end - m.start
}
if (m.end >= m.start) {
m.time = m.end - m.start
}
}
if (m) {
return ({
id: m.id,
info: m.info,
start: m.start,
end: m.end,
time: m.time,
duration: m.duration
})
} else {
return false
}
};
this.getMeasurement = function(i) {
if (!A) {
return
}
var m = this.mMeasurements[i];
if (m) {
return ({
id: m.id,
info: m.info,
start: m.start,
end: m.end,
time: m.time,
duration: m.duration
})
} else {
return false
}
};
this.clear = function() {
if (!A) {
return
}
this.mMeasurements = {}
};
this.remove = function(i) {
if (!A) {
return
}
delete this.mMeasurements[i]
};
this.getAllMeasurements = function() {
if (!A) {
return
}
var m = new Array();
jQuery.each(this.mMeasurements, function(i, o) {
m.push({
id: o.id,
info: o.info,
start: o.start,
end: o.end,
duration: o.duration,
time: o.time
})
});
return m
};
this.add = function(i, I, s, l, t, D) {
if (!A) {
return
}
var m = new M(i, I, s, l);
m.time = t;
m.duration = D;
if (m) {
this.mMeasurements[i] = m;
return ({
id: m.id,
info: m.info,
start: m.start,
end: m.end,
time: m.time,
duration: m.duration
})
} else {
return false
}
}
}
jQuery.sap.measure = new P()
}());
jQuery.sap.globalEval = function() {
eval(arguments[0])
};
jQuery.sap.declare('sap-ui-core');
jQuery.sap.declare('sap.ui.thirdparty.jquery.jquery-1.11.1');
jQuery.sap.declare('sap.ui.thirdparty.jqueryui.jquery-ui-position');
jQuery.sap.declare('sap.ui.Device');
jQuery.sap.declare('sap.ui.thirdparty.URI');
jQuery.sap.declare('jquery.sap.promise');
jQuery.sap.declare('jquery.sap.global');
if (!jQuery.sap.isDeclared('sap.ui.core.Core')) {
jQuery.sap.declare('sap.ui.core.Core');
if (!jQuery.sap.isDeclared('sap.ui.Global')) {
if (window.OpenAjax && window.OpenAjax.hub) {
OpenAjax.hub.registerLibrary("sap", "http://www.sap.com/", "0.1", {})
}
jQuery.sap.declare('sap.ui.Global');
if (!jQuery.sap.isDeclared('jquery.sap.dom')) {
jQuery.sap.declare('jquery.sap.dom');
sap.ui.define("jquery.sap.dom", ['jquery.sap.global', 'sap/ui/Device'], function(q, D) {
"use strict";
var d = function(I, w) {
if (!w) {
w = window
}
if (!I || I == "") {
return null
}
var o = w.document.getElementById(I);
if (o && o.id == I) {
return o
}
var r = w.document.getElementsByName(I);
for (var i = 0; i < r.length; i++) {
o = r[i];
if (o && o.id == I) {
return o
}
}
return null
};
q.sap.domById = !!D.browser.internet_explorer && D.browser.version < 8 ? d : function domById(i, w) {
return i ? (w || window).document.getElementById(i) : null
};
q.sap.byId = function byId(i, c) {
var e = "";
if (i) {
e = "#" + i.replace(/(:|\.)/g, '\\$1')
}
return q(e, c)
};
q.sap.focus = function focus(o) {
if (!o) {
return
}
try {
o.focus()
} catch (e) {
var i = (o && o.id) ? " (ID: '" + o.id + "')" : "";
q.sap.log.warning("Error when trying to focus a DOM element" + i + ": " + e.message);
return false
}
return true
};
q.fn.cursorPos = function cursorPos(p) {
var l = arguments.length,
t, L, T, s;
T = this.prop("tagName");
s = this.prop("type");
if (this.length === 1 && ((T == "INPUT" && (s == "text" || s == "password" || s == "search")) || T == "TEXTAREA")) {
var o = this.get(0);
if (l > 0) {
if (typeof(o.selectionStart) == "number") {
o.focus();
o.selectionStart = p;
o.selectionEnd = p
} else if (o.createTextRange) {
t = o.createTextRange();
var m = o.value.length;
if (p < 0 || p > m) {
p = m
}
if (t) {
t.collapse();
t.moveEnd("character", p);
t.moveStart("character", p);
t.select()
}
}
return this
} else {
if (typeof(o.selectionStart) == "number") {
return o.selectionStart
} else if (o.createTextRange) {
t = window.document.selection.createRange();
var c = t.duplicate();
if (o.tagName == "TEXTAREA") {
c.moveToElementText(o);
var C = c.duplicate();
L = c.text.length;
C.moveStart("character", L);
if (C.inRange(t)) {
S = L
} else {
var i = L;
var S = 0;
while (L > 1) {
i = Math.round(L / 2);
S = S + i;
C = c.duplicate();
C.moveStart("character", S);
if (C.inRange(t)) {
L = L - i
} else {
S = S - i;
L = i
}
}
}
return S
} else if (c.parentElement() === o) {
c.collapse();
var L = o.value.length;
c.moveStart('character', -L);
return c.text.length
}
}
return -1
}
} else {
return this
}
};
q.fn.selectText = function selectText(s, E) {
var o = this.get(0);
if (!o) {
return this
}
try {
if (typeof(o.selectionStart) === "number") {
if (s < 0) {
s = 0
}
if (E > o.value.length) {
E = o.value.length
}
if (!E || s > E) {
s = 0;
E = 0
}
o.selectionStart = s;
o.selectionEnd = E
} else if (o.createTextRange) {
var t = o.createTextRange();
t.collapse();
t.moveStart('character', s);
t.moveEnd('character', E - s);
t.select()
}
} catch (e) {}
return this
};
q.fn.outerHTML = function outerHTML() {
var o = this.get(0);
if (o && o.outerHTML) {
return q.trim(o.outerHTML)
} else {
var a = this[0] ? this[0].ownerDocument : document;
var b = a.createElement("div");
b.appendChild(o.cloneNode(true));
return b.innerHTML
}
};
q.sap.containsOrEquals = function containsOrEquals(o, a) {
if (a && o && a != document && a != window) {
return (o === a) || q.contains(o, a)
}
return false
};
q.fn.rect = function rect() {
var o = this.get(0);
if (o) {
if (o.getBoundingClientRect) {
var c = o.getBoundingClientRect();
var r = {
top: c.top,
left: c.left,
width: c.right - c.left,
height: c.bottom - c.top
};
var w = q.sap.ownerWindow(o);
r.left += q(w).scrollLeft();
r.top += q(w).scrollTop();
return r
} else {
return {
top: 10,
left: 10,
width: o.offsetWidth,
height: o.offsetWidth
}
}
}
return null
};
q.fn.rectContains = function rectContains(p, P) {
var r = this.rect();
if (r) {
return p >= r.left && p <= r.left + r.width && P >= r.top && P <= r.top + r.height
}
return false
};
q.fn.hasTabIndex = function hasTabIndex() {
var t = this.prop("tabIndex");
if (this.attr("disabled") && !this.attr("tabindex")) {
t = -1
}
return !isNaN(t) && t >= 0
};
q.fn.firstFocusableDomRef = function firstFocusableDomRef() {
var c = this.get(0);
var a = function(i) {
return q(this).css("visibility") == "hidden"
};
if (!c || q(c).is(':hidden') || q(c).filter(a).length == 1) {
return null
}
var C = c.firstChild,
o = null;
while (C) {
if (C.nodeType == 1 && q(C).is(':visible')) {
if (q(C).hasTabIndex()) {
return C
}
if (C.childNodes) {
o = q(C).firstFocusableDomRef();
if (o) {
return o
}
}
}
C = C.nextSibling
}
return null
};
q.fn.lastFocusableDomRef = function lastFocusableDomRef() {
var c = this.get(0);
var a = function(i) {
return q(this).css("visibility") == "hidden"
};
if (!c || q(c).is(':hidden') || q(c).filter(a).length == 1) {
return null
}
var C = c.lastChild,
o = null;
while (C) {
if (C.nodeType == 1 && q(C).is(':visible')) {
if (C.childNodes) {
o = q(C).lastFocusableDomRef();
if (o) {
return o
}
}
if (q(C).hasTabIndex()) {
return C
}
}
C = C.previousSibling
}
return null
};
q.fn.scrollLeftRTL = function scrollLeftRTL(p) {
var o = this.get(0);
if (o) {
if (p === undefined) {
if (!!D.browser.internet_explorer) {
return o.scrollWidth - o.scrollLeft - o.clientWidth
} else if (!!D.browser.webkit) {
return o.scrollLeft
} else if (!!D.browser.firefox) {
return o.scrollWidth + o.scrollLeft - o.clientWidth
} else {
return o.scrollLeft
}
} else {
o.scrollLeft = q.sap.denormalizeScrollLeftRTL(p, o);
return this
}
}
};
/*
* The following methods are taken from jQuery UI core but modified.
*
* jQuery UI Core
* http://jqueryui.com
*
* Copyright 2014 jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
* http://api.jqueryui.com/category/ui-core/
*/
q.support.selectstart = "onselectstart" in document.createElement("div");
q.fn.extend({
disableSelection: function() {
return this.on((q.support.selectstart ? "selectstart" : "mousedown") + ".sapui5-disableSelection", function(e) {
e.preventDefault()
})
},
enableSelection: function() {
return this.off(".sapui5-disableSelection")
}
});
q.fn.scrollRightRTL = function scrollRightRTL() {
var o = this.get(0);
if (o) {
if (!!D.browser.internet_explorer) {
return o.scrollLeft
} else if (!!D.browser.webkit) {
return o.scrollWidth - o.scrollLeft - o.clientWidth
} else if (!!D.browser.firefox) {
return (-o.scrollLeft)
} else {
return o.scrollLeft
}
}
};
q.sap.denormalizeScrollLeftRTL = function(n, o) {
if (o) {
if (!!D.browser.internet_explorer) {
return o.scrollWidth - o.clientWidth - n
} else if (!!D.browser.webkit) {
return n
} else if (!!D.browser.firefox) {
return o.clientWidth + n - o.scrollWidth
} else {
return n
}
}
};
/*!
* The following functions are taken from jQuery UI 1.8.17 but modified
*
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI
*/
function v(e) {
var o = q(e).offsetParent();
var O = false;
var $ = q(e).parents().filter(function() {
if (this === o) {
O = true
}
return O
});
return !q(e).add($).filter(function() {
return q.css(this, "visibility") === "hidden" || q.expr.filters.hidden(this)
}).length
}
function f(e, i) {
var n = e.nodeName.toLowerCase();
if ("area" === n) {
var m = e.parentNode,
a = m.name,
b;
if (!e.href || !a || m.nodeName.toLowerCase() !== "map") {
return false
}
b = q("img[usemap=#" + a + "]")[0];
return !!b && v(b)
}
return (/input|select|textarea|button|object/.test(n) ? !e.disabled : "a" == n ? e.href || i : i) && v(e)
}
if (!q.expr[":"].focusable) {
/*!
* The following function is taken from jQuery UI 1.8.17
*
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI
*
* But since visible is modified, focusable is different too the jQuery UI version too.
*/
q.extend(q.expr[":"], {
focusable: function(e) {
return f(e, !isNaN(q.attr(e, "tabindex")))
}
})
}
if (!q.expr[":"].sapTabbable) {
/*!
* The following function is taken from
* jQuery UI Core 1.10.4
* http://jqueryui.com
*
* Copyright 2014 jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
* http://api.jqueryui.com/category/ui-core/
*/
q.extend(q.expr[":"], {
sapTabbable: function(e) {
var t = q.attr(e, "tabindex"),
i = isNaN(t);
return (i || t >= 0) && f(e, !i)
}
})
}
if (!q.expr[":"].sapFocusable) {
q.extend(q.expr[":"], {
sapFocusable: function(e) {
return f(e, !isNaN(q.attr(e, "tabindex")))
}
})
}
if (!q.fn.zIndex) {
q.fn.zIndex = function(z) {
if (z !== undefined) {
return this.css("zIndex", z)
}
if (this.length) {
var e = q(this[0]),
p, a;
while (e.length && e[0] !== document) {
p = e.css("position");
if (p === "absolute" || p === "relative" || p === "fixed") {
a = parseInt(e.css("zIndex"), 10);
if (!isNaN(a) && a !== 0) {
return a
}
}
e = e.parent()
}
}
return 0
}
}
q.fn.parentByAttribute = function parentByAttribute(a, V) {
if (this.length > 0) {
if (V) {
return this.first().parents("[" + a + "='" + V + "']").get(0)
} else {
return this.first().parents("[" + a + "]").get(0)
}
}
};
q.sap.ownerWindow = function ownerWindow(o) {
if (o.ownerDocument.parentWindow) {
return o.ownerDocument.parentWindow
}
return o.ownerDocument.defaultView
};
var _ = {};
q.sap.scrollbarSize = function(c, F) {
if (typeof c === "boolean") {
F = c;
c = null
}
var k = c || "#DEFAULT";
if (F) {
if (c) {
delete _[c]
} else {
_ = {}
}
}
if (_[k]) {
return _[k]
}
if (!document.body) {
return {
width: 0,
height: 0
}
}
var a = q("<DIV/>").css("visibility", "hidden").css("height", "0").css("width", "0").css("overflow", "hidden");
if (c) {
a.addClass(c)
}
a.prependTo(document.body);
var $ = q("<div style=\"visibility:visible;position:absolute;height:100px;width:100px;overflow:scroll;opacity:0;\"></div>");
a.append($);
var o = $.get(0);
var w = o.offsetWidth - o.scrollWidth;
var h = o.offsetHeight - o.scrollHeight;
a.remove();
if (w === 0 || h === 0) {
return {
width: w,
height: h
}
}
_[k] = {
width: w,
height: h
};
return _[k]
};
q.sap.syncStyleClass = function(s, S, a) {
if (!s) return a;
if (S instanceof sap.ui.core.Control) {
S = S.$()
} else if (typeof S === "string") {
S = q.sap.byId(S)
} else if (!(S instanceof q)) {
return a
}
var c = !!S.closest("." + s).length;
if (a instanceof q) {
a.toggleClass(s, c)
} else if (a instanceof sap.ui.core.Control) {
a.toggleStyleClass(s, c)
} else {}
return a
};
return q
}, false)
};
sap.ui.define("sap/ui/Global", ['jquery.sap.global', 'jquery.sap.dom'], function(q) {
"use strict";
if (typeof window.sap !== "object" && typeof window.sap !== "function") {
window.sap = {}
}
if (typeof window.sap.ui !== "object") {
window.sap.ui = {}
}
sap.ui = q.extend(sap.ui, {
version: "1.24.4",
buildinfo: {
lastchange: "ee95372b7d3ffae5ec3c0da5a8a154b3a3b7cfd0",
buildtime: "201411250954"
}
});
sap.ui.getVersionInfo = function(L) {
if (!sap.ui.versioninfo) {
sap.ui.versioninfo = q.sap.loadResource("sap-ui-version.json")
}
if (L !== undefined) {
var a = sap.ui.versioninfo.libraries;
for (var i = 0, l = a.length; i < l; i++) {
if (a[i].name === L) {
return a[i]
}
}
} else {
return sap.ui.versioninfo
}
};
sap.ui.namespace = function(n) {
return q.sap.getObject(n, 0)
};
sap.ui.lazyRequire = function(c, m, M) {
var f = c.replace(/\//gi, "\."),
l = f.lastIndexOf("."),
p = f.substr(0, l),
C = f.substr(l + 1),
P = q.sap.getObject(p, 0),
o = P[C],
a = (m || "new").split(" "),
b = q.inArray("new", a);
M = M || f;
if (!o) {
if (b >= 0) {
o = function() {
q.sap.log.debug("lazy stub for '" + f + "' (constructor) called.");
q.sap.require(M);
var r = P[C];
if (r._sapUiLazyLoader) {
throw new Error("lazyRequire: stub '" + f + "'has not been replaced by module '" + M + "'")
}
var i = q.sap.newObject(r.prototype);
var R = r.apply(i, arguments);
if (R && (typeof R === "function" || typeof R === "object")) {
i = R
}
return i
};
o._sapUiLazyLoader = true;
a.splice(b, 1)
} else {
o = {}
}
P[C] = o
}
q.each(a, function(i, s) {
if (!o[s]) {
o[s] = function() {
q.sap.log.debug("lazy stub for '" + f + "." + s + "' called.");
q.sap.require(M);
var r = P[C];
if (r[s]._sapUiLazyLoader) {
throw new Error("lazyRequire: stub '" + f + "." + s + "' has not been replaced by loaded module '" + M + "'")
}
return r[s].apply(r, arguments)
};
o[s]._sapUiLazyLoader = true
}
})
};
sap.ui.resource = function(l, r) {
var m = r.match(/^themes\/([^\/]+)\//);
if (m) {
l += ".themes." + m[1];
r = r.substr(m[0].length)
}
return q.sap.getModulePath(l, '/') + r
};
sap.ui.localResources = function(n) {
q.sap.registerModulePath(n, "./" + n.replace(/\./g, "/"))
};
return sap.ui
}, true)
};
if (!jQuery.sap.isDeclared('sap.ui.base.DataType')) {
/*!
* SAP UI development toolkit for HTML5 (SAPUI5/OpenUI5)
* (c) Copyright 2009-2014 SAP SE or an SAP affiliate company.
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
*/
jQuery.sap.declare('sap.ui.base.DataType');
sap.ui.define("sap/ui/base/DataType", ['jquery.sap.global'], function(q) {
"use strict";
var D = function() {
throw new Error()
};
D.prototype.getName = function() {
return undefined
};
D.prototype.getBaseType = function() {
return undefined
};
D.prototype.getComponentType = function() {
return undefined
};
D.prototype.getDefaultValue = function() {
return undefined
};
D.prototype.isArrayType = function() {
return undefined
};
D.prototype.parseValue = function(v) {
var t = this.getName();
if (t == "string") {
return v
} else if (t == "boolean") {
return v == "true"
} else if (t == "int") {
return parseInt(v, 10)
} else if (t == "float") {
return parseFloat(v)
} else if (t == "object") {
return v ? q.parseJSON(v) : null
} else {
return v
}
};
D.prototype.isValid = undefined;
D.prototype.setNormalizer = function(n) {
this._fnNormalizer = n
};
D.prototype.normalize = function(v) {
if (typeof this._fnNormalizer === "function") {
return this._fnNormalizer(v)
} else {
return v
}
};
(function() {
function c(n, s, b) {
s = s || {};
b = b || D.prototype;
var t = q.sap.newObject(b);
t.getName = function() {
return n
};
if (s.hasOwnProperty("defaultValue")) {
var d = s.defaultValue;
t.getDefaultValue = function() {
return d
}
}
if (s.hasOwnProperty("isValid")) {
var i = s.isValid;
t.isValid = b.isValid ? function(v) {
if (!b.isValid(v)) {
return false
}
return i(v)
} : i
};
t.isArrayType = function() {
return false
};
return t
}
function a(b) {
var t = q.sap.newObject(D.prototype);
t.getName = function() {
return b.getName() + "[]"
};
t.getComponentType = function() {
return b
};
t.isValid = function(v) {
if (v === null) {
return true
}
if (q.isArray(v)) {
for (var i = 0; i < v.length; i++) {
if (!b.isValid(v[i])) {
return false
}
}
return true
}
return false
};
t.parseValue = function(v) {
var V = v.split(",");
for (var i = 0; i < V.length; i++) {
V[i] = b.parseValue(V[i])
}
return V
};
t.isArrayType = function() {
return true
};
return t
}
var P = {
"any": c("any", {
defaultValue: null,
isValid: function(v) {
return true
}
}),
"boolean": c("boolean", {
defaultValue: false,
isValid: function(v) {
return typeof v === "boolean"
}
}),
"int": c("int", {
defaultValue: 0,
isValid: function(v) {
return typeof v === "number" && Math.floor(v) == v
}
}),
"float": c("float", {
defaultValue: 0.0,
isValid: function(v) {
return typeof v === "number"
}
}),
"string": c("string", {
defaultValue: "",
isValid: function(v) {
return typeof v === "string" || v instanceof String
}
}),
"object": c("object", {
defaultValue: null,
isValid: function(v) {
return typeof v === "object" || typeof v === "function"
}
})
};
D.getType = function(t) {
if (t.indexOf("[]") > 0) {
var C = t.substr(0, t.length - 2),
o = this.getType(C);
return o && a(o)
} else {
return P[t] || q.sap.getObject(t)
}
};
D.createType = c;
var I = {};
D.registerInterfaceTypes = function(t) {
for (var i = 0; i < t.length; i++) {
q.sap.setObject(t[i], I[t[i]] = new String(t[i]))
}
};
D.isInterfaceType = function(t) {
return I.hasOwnProperty(t) && q.sap.getObject(t) === I[t]
}
}());
return D
}, true)
};
if (!jQuery.sap.isDeclared('sap.ui.base.EventProvider')) {
jQuery.sap.declare('sap.ui.base.EventProvider');
if (!jQuery.sap.isDeclared('sap.ui.base.Event')) {
jQuery.sap.declare('sap.ui.base.Event');
if (!jQuery.sap.isDeclared('sap.ui.base.Object')) {
jQuery.sap.declare('sap.ui.base.Object');
if (!jQuery.sap.isDeclared('sap.ui.base.Interface')) {
jQuery.sap.declare('sap.ui.base.Interface');
sap.ui.define("sap/ui/base/Interface", ['jquery.sap.global'], function(q) {
"use strict";
var I = function(o, m) {
if (!o) {
return o
}
function c(o, M) {
return function() {
var t = o[M].apply(o, arguments);
return (t instanceof sap.ui.base.Object) ? t.getInterface() : t
}
}
if (!m) {
return {}
}
var M;
for (var i = 0, a = m.length; i < a; i++) {
M = m[i];
this[M] = c(o, M)
}
};
return I
}, true)
};
if (!jQuery.sap.isDeclared('sap.ui.base.Metadata')) {
jQuery.sap.declare('sap.ui.base.Metadata');
if (!jQuery.sap.isDeclared('jquery.sap.script')) {
jQuery.sap.declare('jquery.sap.script');
sap.ui.define("jquery.sap.script", ['jquery.sap.global'], function(q) {
"use strict";
var I = 0;
q.sap.uid = function uid() {
return "id-" + new Date().valueOf() + "-" + I++
};
q.sap.delayedCall = function delayedCall(d, o, m, p) {
return setTimeout(function() {
if (q.type(m) == "string") {
m = o[m]
}
m.apply(o, p || [])
}, d)
};
q.sap.clearDelayedCall = function clearDelayedCall(d) {
clearTimeout(d);
return this
};
q.sap.intervalCall = function intervalCall(i, o, m, p) {
return setInterval(function() {
if (q.type(m) == "string") {
m = o[m]
}
m.apply(o, p || [])
}, i)
};
q.sap.clearIntervalCall = function clearIntervalCall(i) {
clearInterval(i);
return this
};
var U = function(u) {
this.mParams = {};
var Q = u || window.location.href;
if (Q.indexOf('#') >= 0) {
Q = Q.slice(0, Q.indexOf('#'))
}
if (Q.indexOf("?") >= 0) {
Q = Q.slice(Q.indexOf("?") + 1);
var p = Q.split("&"),
P = {},
a, n, v;
for (var i = 0; i < p.length; i++) {
a = p[i].split("=");
n = decodeURIComponent(a[0]);
v = a.length > 1 ? decodeURIComponent(a[1].replace(/\+/g, ' ')) : "";
if (n) {
if (!Object.prototype.hasOwnProperty.call(P, n)) {
P[n] = []
}
P[n].push(v)
}
}
this.mParams = P
}
};
U.prototype = {};
U.prototype.get = function(n, a) {
var v = Object.prototype.hasOwnProperty.call(this.mParams, n) ? this.mParams[n] : [];
return a === true ? v : (v[0] || null)
};
q.sap.getUriParameters = function getUriParameters(u) {
return new U(u)
};
q.sap.unique = function(a) {
var l = a.length;
if (l > 1) {
a.sort();
for (var i = 1, j = 0; i < l; i++) {
if (a[i] !== a[j]) {
a[++j] = a[i]
}
}
if (++j < l) {
a.splice(j, l - j)
}
}
return a
};
q.sap.equal = function(a, b, m, c, d) {
if (typeof m == "boolean") {
c = m;
m = undefined
}
if (!d) d = 0;
if (!m) m = 10;
if (d > m) return false;
if (a === b) return true;
if (q.isArray(a) && q.isArray(b)) {
if (!c) {
if (a.length != b.length) {
return false
}
} else {
if (a.length > b.length) {
return false
}
}
for (var i = 0; i < a.length; i++) {
if (!q.sap.equal(a[i], b[i], m, c, d + 1)) {
return false
}
}
return true
}
if (typeof a == "object" && typeof b == "object") {
if (!a || !b) {
return false
}
if (a.constructor != b.constructor) {
return false
}
if (a.nodeName && b.nodeName && a.namespaceURI && b.namespaceURI) {
return q.sap.isEqualNode(a, b)
}
if (a instanceof Date) {
return a.valueOf() == b.valueOf()
}
for (var i in a) {
if (!q.sap.equal(a[i], b[i], m, c, d + 1)) {
return false
}
}
if (!c) {
for (var i in b) {
if (a[i] === undefined) {
return false
}
}
}
return true
}
return false
};
q.sap.each = function(o, c) {
var a = q.isArray(o),
l, i;
if (a) {
for (i = 0, l = o.length; i < l; i++) {
if (c.call(o[i], i, o[i]) === false) {
break
}
}
} else {
for (i in o) {
if (c.call(o[i], i, o[i]) === false) {
break
}
}
}
return o
};
q.sap.forIn = {
toString: null
}.propertyIsEnumerable("toString") ? function(o, c) {
for (var n in o) {
if (c(n, o[n]) === false) {
return
}
}
} : (function() {
var D = ["toString", "valueOf", "toLocaleString", "hasOwnProperty", "isPrototypeOf", "propertyIsEnumerable", "constructor"],
a = D.length,
o = Object.prototype,
h = o.hasOwnProperty;
return function(O, c) {
var n, i;
for (n in O) {
if (c(n, O[n]) === false) {
return
}
}
for (var i = 0; i < a; i++) {
n = D[i];
if (h.call(O, n) || O[n] !== o[n]) {
if (c(n, O[n]) === false) {
return
}
}
}
}
}());
q.sap.arrayDiff = function(o, n, c, u) {
c = c || function(v, V) {
return q.sap.equal(v, V)
};
var O = [];
var N = [];
var m = [];
for (var i = 0; i < n.length; i++) {
var a = n[i];
var f = 0;
var t;
if (u && c(o[i], a)) {
f = 1;
t = i
} else {
for (var j = 0; j < o.length; j++) {
if (c(o[j], a)) {
f++;
t = j;
if (u || f > 1) {
break
}
}
}
}
if (f == 1) {
var M = {
oldIndex: t,
newIndex: i
};
if (m[t]) {
delete O[t];
delete N[m[t].newIndex]
} else {
N[i] = {
data: n[i],
row: t
};
O[t] = {
data: o[t],
row: i
};
m[t] = M
}
}
}
for (var i = 0; i < n.length - 1; i++) {
if (N[i] && !N[i + 1] && N[i].row + 1 < o.length && !O[N[i].row + 1] && c(o[N[i].row + 1], n[i + 1])) {
N[i + 1] = {
data: n[i + 1],
row: N[i].row + 1
};
O[N[i].row + 1] = {
data: O[N[i].row + 1],
row: i + 1
}
}
}
for (var i = n.length - 1; i > 0; i--) {
if (N[i] && !N[i - 1] && N[i].row > 0 && !O[N[i].row - 1] && c(o[N[i].row - 1], n[i - 1])) {
N[i - 1] = {
data: n[i - 1],
row: N[i].row - 1
};
O[N[i].row - 1] = {
data: O[N[i].row - 1],
row: i - 1
}
}
}
var d = [];
if (n.length == 0) {
for (var i = 0; i < o.length; i++) {
d.push({
index: 0,
type: 'delete'
})
}
} else {
var b = 0;
if (!O[0]) {
for (var i = 0; i < o.length && !O[i]; i++) {
d.push({
index: 0,
type: 'delete'
});
b = i + 1
}
}
for (var i = 0; i < n.length; i++) {
if (!N[i] || N[i].row > b) {
d.push({
index: i,
type: 'insert'
})
} else {
b = N[i].row + 1;
for (var j = N[i].row + 1; j < o.length && (!O[j] || O[j].row < i); j++) {
d.push({
index: i + 1,
type: 'delete'
});
b = j + 1
}
}
}
}
return d
};
q.sap.parseJS = (function() {
var a, b, e = {
'"': '"',
'\'': '\'',
'\\': '\\',
'/': '/',
b: '\b',
f: '\f',
n: '\n',
r: '\r',
t: '\t'
},
t, d = function(m) {
throw {
name: 'SyntaxError',
message: m,
at: a,
text: t
}
},
n = function(c) {
if (c && c !== b) {
d("Expected '" + c + "' instead of '" + b + "'")
}
b = t.charAt(a);
a += 1;
return b
},
f = function() {
var f, s = '';
if (b === '-') {
s = '-';
n('-')
}
while (b >= '0' && b <= '9') {
s += b;
n()
}
if (b === '.') {
s += '.';
while (n() && b >= '0' && b <= '9') {
s += b
}
}
if (b === 'e' || b === 'E') {
s += b;
n();
if (b === '-' || b === '+') {
s += b;
n()
}
while (b >= '0' && b <= '9') {
s += b;
n()
}
}
f = +s;
if (!isFinite(f)) {
d("Bad number")
} else {
return f
}
},
s = function() {
var c, i, s = '',
k, u;
if (b === '"' || b === '\'') {
k = b;
while (n()) {
if (b === k) {
n();
return s
}
if (b === '\\') {
n();
if (b === 'u') {
u = 0;
for (i = 0; i < 4; i += 1) {
c = parseInt(n(), 16);
if (!isFinite(c)) {
break
}
u = u * 16 + c
}
s += String.fromCharCode(u)
} else if (typeof e[b] === 'string') {
s += e[b]
} else {
break
}
} else {
s += b
}
}
}
d("Bad string")
},
g = function() {
var g = '',
c, i = function(b) {
return b === "_" || (b >= "0" && b <= "9") || (b >= "a" && b <= "z") || (b >= "A" && b <= "Z")
};
if (i(b)) {
g += b
} else {
d("Bad name")
}
while (n()) {
if (b === ' ') {
n();
return g
}
if (b === ':') {
return g
}
if (i(b)) {
g += b
} else {
d("Bad name")
}
}
d("Bad name")
},
w = function() {
while (b && b <= ' ') {
n()
}
},
h = function() {
switch (b) {
case 't':
n('t');
n('r');
n('u');
n('e');
return true;
case 'f':
n('f');
n('a');
n('l');
n('s');
n('e');
return false;
case 'n':
n('n');
n('u');
n('l');
n('l');
return null
}
d("Unexpected '" + b + "'")
},
v, j = function() {
var j = [];
if (b === '[') {
n('[');
w();
if (b === ']') {
n(']');
return j
}
while (b) {
j.push(v());
w();
if (b === ']') {
n(']');
return j
}
n(',');
w()
}
}
d("Bad array")
},
o = function() {
var k, o = {};
if (b === '{') {
n('{');
w();
if (b === '}') {
n('}');
return o
}
while (b) {
if (b >= "0" && b <= "9") {
k = f()
} else if (b === '"' || b === '\'') {
k = s()
} else {
k = g()
}
w();
n(':');
if (Object.hasOwnProperty.call(o, k)) {
d('Duplicate key "' + k + '"')
}
o[k] = v();
w();
if (b === '}') {
n('}');
return o
}
n(',');
w()
}
}
d("Bad object")
};
v = function() {
w();
switch (b) {
case '{':
return o();
case '[':
return j();
case '"':
case '\'':
return s();
case '-':
return f();
default:
return b >= '0' && b <= '9' ? f() : h()
}
};
return function(c, i) {
var r;
t = c;
a = i || 0;
b = ' ';
r = v();
if (isNaN(i)) {
w();
if (b) {
d("Syntax error")
}
return r
} else {
return {
result: r,
at: a - 1
}
}
}
}());
return q
}, false)
};
sap.ui.define("sap/ui/base/Metadata", ['jquery.sap.global', 'jquery.sap.script'], function(q) {
"use strict";
var M = function(c, C) {
if (!C || typeof C.metadata !== "object") {
C = {
metadata: C || {},
constructor: q.sap.getObject(c)
};
C.metadata.__version = 1.0
}
C.metadata.__version = C.metadata.__version || 2.0;
if (typeof C.constructor !== "function") {
throw Error("constructor for class " + c + " must have been declared before creating metadata for it")
}
this._sClassName = c;
this._oClass = C.constructor;
this.extend(C)
};
M.prototype.extend = function(c) {
this.applySettings(c);
this.afterApplySettings()
};
M.prototype.applySettings = function(c) {
var t = this,
s = c.metadata,
p, n;
if (s.baseType) {
var P = q.sap.getObject(s.baseType);
if (typeof P !== "function") {
q.sap.log.fatal("base class '" + s.baseType + "' does not exist")
}
if (P.getMetadata) {
this._oParent = P.getMetadata();
} else {
this._oParent = new M(s.baseType, {})
}
} else {
this._oParent = undefined
}
this._bAbstract = !!s["abstract"];
this._bFinal = !!s["final"];
this._sStereotype = s.stereotype || (this._oParent ? this._oParent._sStereotype : "object");
this._aInterfaces = q.sap.unique(s.interfaces || []);
this._aPublicMethods = q.sap.unique(s.publicMethods || []);
p = this._oClass.prototype;
q.sap.forIn(c, function(n, v) {
if (n !== "metadata" && n !== "constructor") {
p[n] = v;
if (!n.match(/^_|^on|^init$|^exit$/)) {
t._aPublicMethods.push(n)
}
}
})
};
M.prototype.afterApplySettings = function() {
if (this._oParent) {
this._aAllPublicMethods = q.sap.unique(this._oParent._aAllPublicMethods.concat(this._aPublicMethods))
} else {
this._aAllPublicMethods = this._aPublicMethods
}
};
M.prototype.getStereotype = function() {
return this._sStereotype
};
M.prototype.getName = function() {
return this._sClassName
};
M.prototype.getClass = function() {
return this._oClass
};
M.prototype.getParent = function() {
return this._oParent
};
M.prototype.getPublicMethods = function() {
return this._aPublicMethods
};
M.prototype.getAllPublicMethods = function() {
return this._aAllPublicMethods
};
M.prototype.getInterfaces = function() {
return this._aInterfaces
};
M.prototype.isInstanceOf = function(I) {
if (this._oParent) {
if (this._oParent.isInstanceOf(I)) {
return true
}
};
var a = this._aInterfaces;
for (var i = 0, l = a.length; i < l; i++) {
if (a[i] === I) {
return true
}
}
return false
};
M.prototype.isAbstract = function() {
return this._bAbstract
};
M.prototype.isFinal = function() {
return this._bFinal
};
M.prototype.addPublicMethods = function(m) {
var n = (m instanceof Array) ? m : arguments;
function u(a, v) {
Array.prototype.push.apply(a, v);
q.sap.unique(a)
}
u(this._aPublicMethods, n);
u(this._aAllPublicMethods, n)
};
M.createClass = function(b, c, C, F) {
if (typeof b === "string") {
F = C;
C = c;
c = b;
b = null
}
F = F || M;
if (typeof F.preprocessClassInfo === "function") {
C = F.preprocessClassInfo(C)
}
C = C || {};
C.metadata = C.metadata || {};
if (!C.hasOwnProperty('constructor')) {
C.constructor = undefined
}
var f = C.constructor;
if (b) {
if (!f) {
if (C.metadata.deprecated) {
f = function() {
q.sap.log.warning("Usage of deprecated class: " + c);
b.apply(this, arguments)
}
} else {
f = function() {
b.apply(this, arguments)
}
}
}
f.prototype = q.sap.newObject(b.prototype);
f.prototype.constructor = f;
C.metadata.baseType = b.getMetadata().getName()
} else {
f = f || function() {};
delete C.metadata.baseType
}
C.constructor = f;
q.sap.setObject(c, f);
var m = new F(c, C);
f.getMetadata = f.prototype.getMetadata = q.sap.getter(m);
if (!f.getMetadata().isFinal()) {
f.extend = function(s, S, a) {
return M.createClass(f, s, S, a || F)
}
}
return f
};
return M
}, true)
};
sap.ui.define("sap/ui/base/Object", ['jquery.sap.global', './Interface', './Metadata'], function(q, I, M) {
"use strict";
var B = M.createClass("sap.ui.base.Object", {
constructor: function() {
if (!(this instanceof B)) {
throw Error("Cannot instantiate object: \"new\" is missing!")
}
}
});
B.prototype.destroy = function() {};
B.prototype.getInterface = function() {
var i = new I(this, this.getMetadata().getAllPublicMethods());
this.getInterface = q.sap.getter(i);
return i
};
B.defineClass = function(c, s, F) {
var m = new(F || M)(c, s);
var C = m.getClass();
C.getMetadata = C.prototype.getMetadata = q.sap.getter(m);
if (!m.isFinal()) {
C.extend = function(S, o, f) {
return M.createClass(C, S, o, f || F)
}
}
q.sap.log.debug("defined class '" + c + "'" + (m.getParent() ? " as subclass of " + m.getParent().getName() : ""));
return m
};
return B
}, true)
};
sap.ui.define("sap/ui/base/Event", ['jquery.sap.global', './Object'], function(q, B) {
"use strict";
var E = B.extend("sap.ui.base.Event", {
constructor: function(i, s, p) {
B.apply(this);
if (arguments.length > 0) {
this.init(i, s, p)
}
}
});
E.prototype.init = function(i, s, p) {
this.sId = i;
this.oSource = s;
this.mParameters = p || {};
this.bCancelBubble = false;
this.bPreventDefault = false
};
E.prototype.reset = function() {
this.sId = "";
this.oSource = null;
this.mParameters = null;
this.bCancelBubble = false;
this.bPreventDefault = false
};
E.prototype.getId = function() {
return this.sId
};
E.prototype.getSource = function() {
return this.oSource
};
E.prototype.getParameters = function() {
return this.mParameters
};
E.prototype.getParameter = function(n) {
return this.mParameters[n]
};
E.prototype.cancelBubble = function() {
this.bCancelBubble = true
};
E.prototype.preventDefault = function() {
this.bPreventDefault = true
};
return E
}, true)
};
if (!jQuery.sap.isDeclared('sap.ui.base.ObjectPool')) {
jQuery.sap.declare('sap.ui.base.ObjectPool');
sap.ui.define("sap/ui/base/ObjectPool", ['jquery.sap.global', './Object'], function(q, B) {
"use strict";
var O = B.extend("sap.ui.base.ObjectPool", {
constructor: function(o) {
B.apply(this);
this.oObjectClass = o;
this.aFreeObjects = []
}
});
O.prototype.borrowObject = function() {
var o = this.aFreeObjects.length == 0 ? new this.oObjectClass() : this.aFreeObjects.pop();
o.init.apply(o, arguments);
return o
};
O.prototype.returnObject = function(o) {
o.reset();
this.aFreeObjects.push(o)
};
return O
}, true)
};
sap.ui.define("sap/ui/base/EventProvider", ['jquery.sap.global', './Event', './Object', './ObjectPool'], function(q, E, B, O) {
"use strict";
var a = B.extend("sap.ui.base.EventProvider", {
constructor: function() {
B.apply(this);
this.mEventRegistry = {}
}
});
a.M_EVENTS = {
EventHandlerChange: "EventHandlerChange"
};
a.prototype.oEventPool = new O(E);
a.prototype.attachEvent = function(e, d, f, l) {
if (typeof(d) === "function") {
l = f;
f = d;
d = undefined
}
if (!this.mEventRegistry[e]) {
this.mEventRegistry[e] = []
}
this.mEventRegistry[e].push({
oListener: l,
fFunction: f,
oData: d
});
this.fireEvent(a.M_EVENTS.EventHandlerChange, {
EventId: e,
type: 'listenerAttached'
});
return this
};
a.prototype.attachEventOnce = function(e, d, f, l) {
if (typeof(d) === "function") {
l = f;
f = d;
d = undefined
}
function o() {
this.detachEvent(e, o);
f.apply(l || this, arguments)
}
this.attachEvent(e, d, o, undefined);
return this
};
a.prototype.detachEvent = function(e, f, l) {
var b = this.mEventRegistry[e];
if (!b) {
return this
}
var L = false;
for (var i = 0, c = b.length; i < c; i++) {
if (b[i].fFunction === f && b[i].oListener === l) {
b.splice(i, 1);
L = true;
break
}
}
if (b.length == 0) {
delete this.mEventRegistry[e]
}
if (L) {
this.fireEvent(a.M_EVENTS.EventHandlerChange, {
EventId: e,
type: 'listenerDetached'
})
}
return this
};
a.prototype.fireEvent = function(e, p, A, b) {
if (typeof p == "boolean") {
b = A;
A = p
}
var c = this.mEventRegistry[e],
P = false,
o, d, I;
if (b || (c && q.isArray(c))) {
c = c ? c.slice() : [];
o = this.oEventPool.borrowObject(e, this, p);
for (var i = 0, l = c.length; i < l; i++) {
I = c[i];
I.fFunction.call(I.oListener || this, o, I.oData)
}
if (b) {
d = this.getEventingParent();
while (d && !o.bCancelBubble) {
c = d.mEventRegistry[e];
if (c && c instanceof Array) {
c = c.slice();
for (var i = 0, l = c.length; i < l; i++) {
I = c[i];
I.fFunction.call(I.oListener || d, o, I.oData)
}
}
d = d.getEventingParent()
}
}
P = o.bPreventDefault;
this.oEventPool.returnObject(o)
}
if (A) {
return !P
} else {
return this
}
};
a.prototype.hasListeners = function(e) {
return !!this.mEventRegistry[e]
};
a.getEventList = function(e) {
return e.mEventRegistry
};
a.prototype.getEventingParent = function() {
return null
};
a.prototype.toString = function() {
if (this.getMetadata) {
return "EventProvider " + this.getMetadata().getName()
} else {
return "EventProvider"
}
};
a.prototype.destroy = function() {
this.mEventRegistry = {};
B.prototype.destroy.apply(this, arguments)
};
return a
}, true)
};
if (!jQuery.sap.isDeclared('sap.ui.core.Component')) {
/*
* SAP UI development toolkit for HTML5 (SAPUI5/OpenUI5)
* (c) Copyright 2009-2014 SAP SE or an SAP affiliate company.
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
*/
jQuery.sap.declare('sap.ui.core.Component');
if (!jQuery.sap.isDeclared('sap.ui.base.ManagedObject')) {
/*!
* SAP UI development toolkit for HTML5 (SAPUI5/OpenUI5)
* (c) Copyright 2009-2014 SAP SE or an SAP affiliate company.
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
*/
jQuery.sap.declare('sap.ui.base.ManagedObject');
if (!jQuery.sap.isDeclared('sap.ui.base.BindingParser')) {
jQuery.sap.declare('sap.ui.base.BindingParser');
sap.ui.define("sap/ui/base/BindingParser", ['jquery.sap.global', 'jquery.sap.script'], function(q) {
"use strict";
var r = /^\{\s*[a-zA-Z_][a-zA-Z0-9_]*\s*:/;
var a = /(\\[\\\{\}])|(\{)/g;
var b = /([\\\{\}])/g;
function c(f) {
var F = function(v) {
var R = [],
l = f.length,
i;
for (i = 0; i < l; i++) {
if (typeof f[i] === "number") {
R.push(arguments[f[i]])
} else {
R.push(f[i])
}
}
return R.join('')
};
F.textFragments = f;
return F
}
function d(p) {
var P = p.indexOf(">"),
o = {
path: p
};
if (P > 0) {
o.model = p.slice(0, P);
o.path = p.slice(P + 1)
}
return o
}
var B = {};
B._keepBindingStrings = false;
B.simpleParser = function(s, C) {
if (q.sap.startsWith(s, "{") && q.sap.endsWith(s, "}")) {
return d(s.slice(1, -1))
}
};
B.simpleParser.escape = function(v) {
return v
};
B.complexParser = function(s, C, u) {
var e = q.sap.parseJS,
f = {
parts: []
},
F = [],
U, P, p = 0,
m, g;
function h(o, k) {
if (typeof o[k] === "string") {
var n = o[k];
if (q.sap.startsWith(o[k], ".")) {
o[k] = q.proxy(q.sap.getObject(o[k].slice(1), undefined, C), C)
} else {
o[k] = q.sap.getObject(o[k])
}
if (typeof(o[k]) !== "function") {
q.sap.log.error(k + " function " + n + " not found!")
}
}
}
function i(o, k) {
var l;
if (typeof o[k] === "string") {
if (q.sap.startsWith(o[k], ".")) {
l = q.sap.getObject(o[k].slice(1), undefined, C)
} else {
l = q.sap.getObject(o[k])
}
if (typeof l === "function") {
o[k] = new l(o.formatOptions, o.constraints)
} else {
o[k] = l
}
delete o.formatOptions;
delete o.constraints
}
}
function j(o, k, l) {
var n;
if (!(typeof o[k] === "object" || q.isArray(o[k]))) {
return
}
if (q.isArray(o[k])) {
q.each(o[k], function(I, O) {
j(o[k], I, k)
})
} else {
if (k === "filters" || l === "filters") {
n = q.sap.getObject("sap.ui.model.Filter")
} else if (k === "sorter" || l === "sorter") {
n = q.sap.getObject("sap.ui.model.Sorter");
h(o[k], "group")
}
if (n) {
o[k] = new n(o[k])
}
}
}
while (m = a.exec(s)) {
if (p < m.index) {
F.push(s.slice(p, m.index))
}
if (m[1]) {
F.push(m[1].slice(1));
U = true
} else {
if (r.test(s.slice(m.index))) {
P = e(s, m.index);
i(P.result, 'type');
j(P.result, 'filters');
j(P.result, 'sorter');
h(P.result, 'formatter');
h(P.result, 'factory');
h(P.result, 'groupHeaderFactory');
F.push(f.parts.length);
f.parts.push(P.result);
a.lastIndex = P.at
} else {
g = s.indexOf('}', m.index);
if (g < m.index) {
throw new SyntaxError("no closing braces found in '" + s + "' after pos:" + m.index)
}
F.push(f.parts.length);
f.parts.push(d(s.slice(m.index + 1, g)));
a.lastIndex = g + 1
}
}
p = a.lastIndex
}
if (p < s.length) {
F.push(s.slice(p))
}
if (f.parts.length > 0) {
if (F.length === 1) {
f = f.parts[0]
} else {
f.formatter = c(F)
}
if (B._keepBindingStrings) {
f.bindingString = s
}
return f
} else if (u && U) {
return F.join('')
}
};
B.complexParser.escape = function(v) {
return v.replace(b, "\\$1")
};
return B
}, true)
};
if (!jQuery.sap.isDeclared('sap.ui.base.ManagedObjectMetadata')) {
jQuery.sap.declare('sap.ui.base.ManagedObjectMetadata');
sap.ui.define("sap/ui/base/ManagedObjectMetadata", ['jquery.sap.global', './DataType', './Metadata'], function(q, D, M) {
"use strict";
var b = function(c, C) {
M.apply(this, arguments)
};
b.prototype = q.sap.newObject(M.prototype);
b.prototype.applySettings = function(c) {
var s = c.metadata;
M.prototype.applySettings.call(this, c);
var r = /(children|ies|ves|oes|ses|ches|shes|xes|s)$/i;
var S = {
'children': -3,
'ies': 'y',
'ves': 'f',
'oes': -2,
'ses': -2,
'ches': -2,
'shes': -2,
'xes': -2,
's': -1
};
function n(i, e, o) {
var N, I;
i = i || {};
for (N in i) {
I = i[N];
if (e && typeof I !== "object") {
I = {};
I[e] = i[N]
}
I = q.extend({}, o, I);
I.name = N;
if (I.multiple === true && !I.singularName) {
I.singularName = N.replace(r, function($, p) {
var R = S[p.toLowerCase()];
return typeof R === "string" ? R : p.slice(0, R)
})
}
i[N] = I
}
return i
}
function f(i, p) {
var R = {},
N;
for (N in i) {
if (p === (i[N].visibility === 'public')) {
R[N] = i[N]
}
}
return R
}
var a = /([a-z][^.]*(?:\.[a-z][^.]*)*)\./;
function d(N) {
var m = a.exec(N);
return (m && m[1]) || ""
}
this._sLibraryName = s.library || d(this.getName());
this._mProperties = n(s.properties, "type", {
type: "string",
group: "Misc"
});
var A = n(s.aggregations, "type", {
type: "sap.ui.core.Control",
multiple: true,
visibility: 'public'
});
this._mAggregations = f(A, true);
this._mPrivateAggregations = f(A, false);
this._sDefaultAggregation = s.defaultAggregation || null;
this._mAssociations = n(s.associations, "type", {
type: "sap.ui.core.Control",
multiple: false
});
this._mEvents = n(s.events, null, {
allowPreventDefault: false
});
this._bEnriched = false;
if (c.metadata.__version > 1.0) {
this.generateAccessors()
}
};
b.prototype.afterApplySettings = function() {
M.prototype.afterApplySettings.call(this);
var p = this.getParent();
if (p && p instanceof b) {
this._mAllEvents = q.extend({}, p._mAllEvents, this._mEvents);
this._mAllProperties = q.extend({}, p._mAllProperties, this._mProperties);
this._mAllPrivateAggregations = q.extend({}, p._mAllPrivateAggregations, this._mPrivateAggregations);
this._mAllAggregations = q.extend({}, p._mAllAggregations, this._mAggregations);
this._mAllAssociations = q.extend({}, p._mAllAssociations, this._mAssociations);
this._sDefaultAggregation = this._sDefaultAggregation || p._sDefaultAggregation;
if (p._mHiddenAggregations) {
this._mHiddenAggregations = q.extend({}, p._mHiddenAggregations)
}
} else {
this._mAllEvents = this._mEvents;
this._mAllProperties = this._mProperties;
this._mAllPrivateAggregations = this._mPrivateAggregations;
this._mAllAggregations = this._mAggregations;
this._mAllAssociations = this._mAssociations
}
};
b.Kind = {
PROPERTY: 0,
SINGLE_AGGREGATION: 1,
MULTIPLE_AGGREGATION: 2,
SINGLE_ASSOCIATION: 3,
MULTIPLE_ASSOCIATION: 4,
EVENT: 5
};
b.prototype.getLibraryName = function() {
return this._sLibraryName
};
b.prototype.isAbstract = function() {
return this._bAbstract
};
b.prototype.addProperty = function(n, i) {
i.name = n;
this._mProperties[n] = i;
if (!this._mAllProperties[n]) {
this._mAllProperties[n] = i
}
if (this._bEnriched) {
this._enrichChildInfos()
}
};
b.prototype.hasProperty = function(n) {
return !!this._mAllProperties[n]
};
b.prototype.getProperties = function() {
return this._mProperties
};
b.prototype.getAllProperties = function() {
return this._mAllProperties
};
b.prototype.getAggregations = function() {
return this._mAggregations
};
b.prototype.hasAggregation = function(n) {
return !!this._mAllAggregations[n]
};
b.prototype.getAllAggregations = function() {
return this._mAllAggregations
};
b.prototype.getAllPrivateAggregations = function() {
return this._mAllPrivateAggregations
};
b.prototype.getManagedAggregation = function(a) {
return this._mAllAggregations[a] || this._mAllPrivateAggregations[a]
};
b.prototype.getDefaultAggregationName = function() {
return this._sDefaultAggregation
};
b.prototype.getDefaultAggregation = function() {
return this._sDefaultAggregation && this.getAllAggregations()[this._sDefaultAggregation]
};
b.prototype.getAssociations = function() {
return this._mAssociations
};
b.prototype.hasAssociation = function(n) {
return !!this._mAllAssociations[n]
};
b.prototype.getAllAssociations = function() {
return this._mAllAssociations
};
b.prototype.getEvents = function() {
return this._mEvents
};
b.prototype.hasEvent = function(n) {
return !!this._mAllEvents[n]
};
b.prototype.getAllEvents = function() {
return this._mAllEvents
};
b.prototype.getPropertyDefaults = function() {
var d = this._mDefaults,
t;
if (d) {
return d
}
if (this.getParent() instanceof b) {
d = q.sap.newObject(this.getParent().getPropertyDefaults())
} else {
d = {}
}
for (var s in this._mProperties) {
if (this._mProperties[s].defaultValue !== null) {
d[s] = this._mProperties[s].defaultValue
} else {
t = D.getType(this._mProperties[s].type);
if (t instanceof D) {
d[s] = t.getDefaultValue()
} else {
for (var i in t) {
d[s] = t[i];
break
}
}
}
}
return (this._mDefaults = d)
};
b.prototype.createPropertyBag = function() {
if (!this._fnPropertyBagFactory) {
this._fnPropertyBagFactory = q.sap.factory(this.getPropertyDefaults())
}
return new(this._fnPropertyBagFactory)()
};
b.prototype._enrichChildInfos = function() {
if (this._bEnriched) {
return
}
if (this.getParent() instanceof b) {
this.getParent()._enrichChildInfos()
}
var m, n, i;
function a(p, n) {
return p + n.substring(0, 1).toUpperCase() + n.substring(1)
}
m = this._mProperties;
for (n in m) {
i = m[n];
i._sName = n;
i._sUID = n;
i._oParent = this;
i._iKind = b.Kind.PROPERTY;
i._sMutator = a("set", n);
i._sGetter = a("get", n)
}
m = this._mAggregations;
for (n in m) {
i = m[n];
i._sName = n;
i._sUID = "aggregation:" + n;
i._oParent = this;
i._sDestructor = a("destroy", n);
i._sGetter = a("get", n);
if (i.multiple) {
i._iKind = b.Kind.MULTIPLE_AGGREGATION;
i._sMutator = a("add", i.singularName);
i._sRemoveMutator = a("remove", i.singularName);
i._sRemoveAllMutator = a("removeAll", n)
} else {
i._iKind = b.Kind.SINGLE_AGGREGATION;
i._sMutator = a("set", n)
}
}
m = this._mAssociations;
for (n in m) {
i = m[n];
i._sName = n;
i._sUID = "association:" + n;
i._oParent = this;
i._sGetter = a("get", n);
if (i.multiple) {
i._iKind = b.Kind.MULTIPLE_ASSOCIATION;
i._sMutator = a("add", i.singularName)
} else {
i._iKind = b.Kind.SINGLE_ASSOCIATION;
i._sMutator = a("set", n)
}
}
m = this._mEvents;
for (n in m) {
i = m[n];
i._sName = n;
i._sUID = "event:" + n;
i._oParent = this;
i._iKind = b.Kind.EVENT;
i._sMutator = a("attach", n)
}
this._bEnriched = true
};
b.prototype.getJSONKeys = function() {
if (this._mJSONKeys) {
return this._mJSONKeys
}
this._enrichChildInfos();
var j = {};
function a(m) {
var n, i;
for (n in m) {
i = m[n];
if (!j[n] || i._iKind < j[n]._iKind) {
j[n] = i
};
j[i._sUID] = i
}
}
a(this.getAllProperties());
a(this.getAllAggregations());
a(this.getAllAssociations());
a(this.getAllEvents());
return (this._mJSONKeys = j)
};
b.prototype.generateAccessors = function() {
var c = this;
var e = this.getClass().prototype;
function g(p, n, f, d) {
var n = p + n.substring(0, 1).toUpperCase() + n.substring(1);
if (!e[n]) {
e[n] = d ? function() {
q.sap.log.warning("Usage of deprecated feature: " + c.getName() + "." + n);
return f.apply(this, arguments)
} : f;
c._aPublicMethods.push(n)
}
}
q.each(this._mProperties, function(n, i) {
g("get", n, function() {
return this.getProperty(n)
});
g("set", n, function(v) {
this.setProperty(n, v);
return this
}, i.deprecated);
if (i.bindable) {
g("bind", n, function(p, f, m) {
this.bindProperty(n, p, f, m);
return this
}, i.deprecated);
g("unbind", n, function(p) {
this.unbindProperty(n, p);
return this
})
}
});
q.each(this._mAggregations, function(n, d) {
if (!d.multiple) {
g("get", n, function() {
return this.getAggregation(n)
});
g("set", n, function(v) {
this.setAggregation(n, v);
return this
}, d.deprecated)
} else {
var h = d.singularName;
g("get", n, function() {
return this.getAggregation(n, [])
});
g("add", h, function(a) {
this.addAggregation(n, a);
return this
}, d.deprecated);
g("insert", h, function(i, a) {
this.insertAggregation(n, i, a);
return this
}, d.deprecated);
g("remove", h, function(a) {
return this.removeAggregation(n, a)
});
g("removeAll", n, function() {
return this.removeAllAggregation(n)
});
g("indexOf", h, function(a) {
return this.indexOfAggregation(n, a)
})
}
g("destroy", n, function() {
this.destroyAggregation(n);
return this
});
if (d.bindable) {
g("bind", n, function(p, t, s, f) {
this.bindAggregation(n, p, t, s, f);
return this
}, d.deprecated);
g("unbind", n, function(p) {
this.unbindAggregation(n, p);
return this
})
}
});
q.each(this._mAssociations, function(n, i) {
if (!i.multiple) {
g("get", n, function() {
return this.getAssociation(n)
});
g("set", n, function(v) {
this.setAssociation(n, v);
return this
}, i.deprecated)
} else {
var d = i.singularName;
g("get", n, function() {
return this.getAssociation(n, [])
});
g("add", d, function(a) {
this.addAssociation(n, a);
return this
}, i.deprecated);
g("remove", d, function(a) {
return this.removeAssociation(n, a)
});
g("removeAll", n, function() {
return this.removeAllAssociation(n)
})
}
});
q.each(this._mEvents, function(n, i) {
g("attach", n, function(d, f, o) {
this.attachEvent(n, d, f, o);
return this
}, i.deprecated);
g("detach", n, function(f, o) {
this.detachEvent(n, f, o);
return this
});
var a = !!i.allowPreventDefault;
var h = !!i.enableEventBubbling;
g("fire", n, function(p) {
return this.fireEvent(n, p, a, h)
})
})
};
(function() {
var u = {};
function a(i) {
i = sap.ui.getCore().getConfiguration().getUIDPrefix() + i;
u[i] = u[i] || 0;
return (i + u[i] ++)
}
b.uid = a;
b.prototype.uid = function() {
var i = this._sUIDToken;
if (typeof i !== "string") {
i = this.getName();
i = i.slice(i.lastIndexOf('.') + 1);
i = i.replace(/([a-z])([A-Z])/g, "$1 $2").split(" ").slice(-1)[0];
i = this._sUIDToken = i.replace(/([^A-Za-z0-9-_.:])|([0-9]+$)/g, "").toLowerCase()
}
return a(i)
}
}());
return b
}, true)
};
if (!jQuery.sap.isDeclared('sap.ui.model.CompositeBinding')) {
jQuery.sap.declare('sap.ui.model.CompositeBinding');
if (!jQuery.sap.isDeclared('sap.ui.model.PropertyBinding')) {
jQuery.sap.declare('sap.ui.model.PropertyBinding');
if (!jQuery.sap.isDeclared('sap.ui.model.Binding')) {
jQuery.sap.declare('sap.ui.model.Binding');
if (!jQuery.sap.isDeclared('sap.ui.model.ChangeReason')) {
jQuery.sap.declare('sap.ui.model.ChangeReason');
sap.ui.define("sap/ui/model/ChangeReason", ['jquery.sap.global'], function(q) {
"use strict";
var C = {
Sort: "sort",
Filter: "filter",
Change: "change",
Context: "context",
Refresh: "refresh"
};
return C
}, true)
};
sap.ui.define("sap/ui/model/Binding", ['jquery.sap.global', 'sap/ui/base/EventProvider', './ChangeReason'], function(q, E, C) {
"use strict";
var B = E.extend("sap.ui.model.Binding", {
constructor: function(m, p, c, P) {
E.apply(this);
this.oModel = m;
this.bRelative = !q.sap.startsWith(p, '/');
this.sPath = p;
this.oContext = c;
this.mParameters = P;
this.bInitial = false;
this.bSuspended = false
},
metadata: {
"abstract": true,
publicMethods: ["getPath", "getContext", "getModel", "attachChange", "detachChange", "refresh", "isInitial", "attachDataRequested", "detachDataRequested", "attachDataReceived", "detachDataReceived", "suspend", "resume"]
}
});
B.prototype.getPath = function() {
return this.sPath
};
B.prototype.getContext = function() {
return this.oContext
};
B.prototype.setContext = function(c) {
if (this.oContext != c) {
this.oContext = c;
this._fireChange()
}
};
B.prototype.getModel = function() {
return this.oModel
};
B.prototype.attachChange = function(f, l) {
if (!this.hasListeners("change")) {
this.oModel.addBinding(this)
}
this.attachEvent("change", f, l)
};
B.prototype.detachChange = function(f, l) {
this.detachEvent("change", f, l);
if (!this.hasListeners("change")) {
this.oModel.removeBinding(this)
}
};
B.prototype._fireChange = function(a) {
this.fireEvent("change", a)
};
B.prototype.attachDataRequested = function(f, l) {
this.attachEvent("dataRequested", f, l)
};
B.prototype.detachDataRequested = function(f, l) {
this.detachEvent("dataRequested", f, l)
};
B.prototype.fireDataRequested = function(a) {
this.fireEvent("dataRequested", a)
};
B.prototype.attachDataReceived = function(f, l) {
this.attachEvent("dataReceived", f, l)
};
B.prototype.detachDataReceived = function(f, l) {
this.detachEvent("dataReceived", f, l)
};
B.prototype.fireDataReceived = function(a) {
this.fireEvent("dataReceived", a)
};
B.prototype.updateRequired = function(m) {
return m && this.getModel() === m
};
B.prototype.checkUpdate = function(f) {
if (!this.bSuspended) {
this._fireChange({
reason: C.Change
})
}
};
B.prototype.refresh = function(f) {
this.checkUpdate(f)
};
B.prototype.initialize = function() {
this.checkUpdate(true);
return this
};
B.prototype._refresh = function() {
this.refresh()
};
B.prototype.isInitial = function() {
return this.bInitial
};
B.prototype.isRelative = function() {
return this.bRelative
};
B.prototype.attachEvents = function(e) {
if (!e) {
return this
}
var t = this;
q.each(e, function(s, h) {
var m = "attach" + s.substring(0, 1).toUpperCase() + s.substring(1);
if (t[m]) {
t[m](h)
} else {
q.sap.log.warning(t.toString() + " has no handler for event '" + s + "'")
}
});
return this
};
B.prototype.detachEvents = function(e) {
if (!e) {
return this
}
var t = this;
q.each(e, function(s, h) {
var m = "detach" + s.substring(0, 1).toUpperCase() + s.substring(1);
if (t[m]) {
t[m](h)
} else {
q.sap.log.warning(t.toString() + " has no handler for event '" + s + "'")
}
});
return this
};
B.prototype.attachRefresh = function(f, l) {
this.attachEvent("refresh", f, l)
};
B.prototype.detachRefresh = function(f, l) {
this.detachEvent("refresh", f, l)
};
B.prototype._fireRefresh = function(a) {
this.fireEvent("refresh", a)
};
B.prototype.suspend = function() {
this.bSuspended = true
};
B.prototype.resume = function() {
this.bSuspended = false;
this.checkUpdate()
};
return B
}, true)
};
if (!jQuery.sap.isDeclared('sap.ui.model.SimpleType')) {
jQuery.sap.declare('sap.ui.model.SimpleType');
if (!jQuery.sap.isDeclared('sap.ui.model.FormatException')) {
jQuery.sap.declare('sap.ui.model.FormatException');
if (!jQuery.sap.isDeclared('sap.ui.base.Exception')) {
jQuery.sap.declare('sap.ui.base.Exception');
sap.ui.define("sap/ui/base/Exception", ['jquery.sap.global'], function(q) {
"use strict";
var E = function(m) {
this.name = "Exception";
this.message = m
};
return E
}, true)
};
sap.ui.define("sap/ui/model/FormatException", ['jquery.sap.global', 'sap/ui/base/Exception'], function(q, E) {
"use strict";
var F = function(m) {
this.name = "FormatException";
this.message = m
};
F.prototype = q.sap.newObject(E.prototype);
return F
}, true)
};
if (!jQuery.sap.isDeclared('sap.ui.model.ParseException')) {
jQuery.sap.declare('sap.ui.model.ParseException');
sap.ui.define("sap/ui/model/ParseException", ['jquery.sap.global', 'sap/ui/base/Exception'], function(q, E) {
"use strict";
var P = function(m) {
this.name = "ParseException";
this.message = m
};
P.prototype = q.sap.newObject(E.prototype);
return P
}, true)
};
if (!jQuery.sap.isDeclared('sap.ui.model.Type')) {
jQuery.sap.declare('sap.ui.model.Type');
sap.ui.define("sap/ui/model/Type", ['jquery.sap.global', 'sap/ui/base/Object'], function(q, B) {
"use strict";
var T = B.extend("sap.ui.model.Type", {
constructor: function() {
B.apply(this, arguments);
this.sName = "Type"
},
metadata: {
"abstract": true,
publicMethods: ["getName"]
}
});
T.prototype.getName = function() {
return this.sName
};
return T
}, true)
};
if (!jQuery.sap.isDeclared('sap.ui.model.ValidateException')) {
jQuery.sap.declare('sap.ui.model.ValidateException');
sap.ui.define("sap/ui/model/ValidateException", ['jquery.sap.global', 'sap/ui/base/Exception'], function(q, E) {
"use strict";
var V = function(m, v) {
this.name = "ValidateException";
this.message = m;
this.violatedConstraints = v
};
V.prototype = q.sap.newObject(E.prototype);
return V
}, true)
};
sap.ui.define("sap/ui/model/SimpleType", ['jquery.sap.global', './FormatException', './ParseException', './Type', './ValidateException'], function(q, F, P, T, V) {
"use strict";
var S = T.extend("sap.ui.model.SimpleType", {
constructor: function(f, c) {
T.apply(this, arguments);
this.setFormatOptions(f || {});
this.setConstraints(c || {});
this.sName = "SimpleType"
},
metadata: {
"abstract": true,
publicMethods: ["setConstraints", "setFormatOptions", "formatValue", "parseValue", "validateValue"]
}
});
S.prototype.setConstraints = function(c) {
this.oConstraints = c
};
S.prototype.setFormatOptions = function(f) {
this.oFormatOptions = f
};
return S
}, true)
};
sap.ui.define("sap/ui/model/PropertyBinding", ['jquery.sap.global', './Binding', './SimpleType'], function(q, B, S) {
"use strict";
var P = B.extend("sap.ui.model.PropertyBinding", {
constructor: function(m, p, c, a) {
B.apply(this, arguments)
},
metadata: {
"abstract": true,
publicMethods: ["getValue", "setValue", "setType", "getType", "setFormatter", "getFormatter", "getExternalValue", "setExternalValue", "getBindingMode"]
}
});
P.prototype.getExternalValue = function() {
var v = this.getValue();
if (this.oType) {
v = this.oType.formatValue(v, this.sInternalType)
}
if (this.fnFormatter) {
v = this.fnFormatter(v)
}
return v
};
P.prototype.setExternalValue = function(v) {
if (this.fnFormatter) {
return
}
if (this.oType) {
v = this.oType.parseValue(v, this.sInternalType);
this.oType.validateValue(v)
}
this.setValue(v)
};
P.prototype.setType = function(t, i) {
this.oType = t;
this.sInternalType = i
};
P.prototype.getType = function() {
return this.oType
};
P.prototype.setFormatter = function(f) {
this.fnFormatter = f
};
P.prototype.getFormatter = function() {
return this.fnFormatter
};
P.prototype.getBindingMode = function() {
return this.sMode
};
P.prototype.setBindingMode = function(b) {
this.sMode = b
};
return P
}, true)
};
sap.ui.define("sap/ui/model/CompositeBinding", ['jquery.sap.global', './PropertyBinding', './SimpleType'], function(q, P, S) {
"use strict";
var C = P.extend("sap.ui.model.CompositeBinding", {
constructor: function(b, r) {
P.apply(this, [null, ""]);
var t = this;
this.aBindings = b;
this.bRawValues = r
},
metadata: {
publicMethods: ["getBindings", "attachChange", "detachChange"]
}
});
C.prototype.getPath = function() {
return null
};
C.prototype.getModel = function() {
return null
};
C.prototype.getContext = function() {
return null
};
C.prototype.getType = function() {
return null
};
C.prototype.setContext = function(c) {
q.each(this.aBindings, function(i, b) {
if (!c || b.updateRequired(c.getModel())) {
b.setContext(c)
}
})
};
C.prototype.setValue = function(v) {
throw new sap.ui.base.Exception("Composite Binding does not support setValue because it contains multiple property bindings!")
};
C.prototype.getValue = function() {
var v = [],
V;
q.each(this.aBindings, function(i, b) {
V = b.getValue();
v.push(V)
});
return v
};
C.prototype.getExternalValue = function() {
var v = [],
V;
if (this.bRawValues) {
v = this.getValue()
} else {
q.each(this.aBindings, function(i, b) {
V = b.getExternalValue();
v.push(V)
})
}
if (this.fnFormatter) {
V = this.fnFormatter.apply(this, v)
} else {
if (v.length > 1) {
V = v.join(" ")
} else {
V = v[0]
}
}
return V
};
C.prototype.setExternalValue = function(v) {
throw new sap.ui.base.Exception("Composite Binding does not support setExternalValue because it contains multiple property bindings!")
};
C.prototype.getBindings = function() {
return this.aBindings
};
C.prototype.attachChange = function(f, l) {
this.attachEvent("change", f, l);
if (this.aBindings) {
var t = this;
q.each(this.aBindings, function(i, b) {
b.attachChange(t.checkUpdate, t)
})
}
};
C.prototype.detachChange = function(f, l) {
this.detachEvent("change", f, l);
if (this.aBindings) {
var t = this;
q.each(this.aBindings, function(i, b) {
b.detachChange(t.checkUpdate, t)
})
}
};
C.prototype.updateRequired = function(m) {
var u = false;
q.each(this.aBindings, function(i, b) {
u = u || b.updateRequired(m)
});
return u
};
C.prototype.checkUpdate = function(f) {
var v = this.getExternalValue();
if (!q.sap.equal(v, this.oValue) || f) {
this.oValue = v;
this._fireChange({
reason: sap.ui.model.ChangeReason.Change
})
}
};
return C
}, true)
};
if (!jQuery.sap.isDeclared('sap.ui.model.ContextBinding')) {
jQuery.sap.declare('sap.ui.model.ContextBinding');
sap.ui.define("sap/ui/model/ContextBinding", ['jquery.sap.global', './Binding'], function(q, B) {
"use strict";
var C = B.extend("sap.ui.model.ContextBinding", {
constructor: function(m, p, c, P, e) {
B.call(this, m, p, c, P, e);
this.oElementContext = null;
this.bInitial = true
},
metadata: {
publicMethods: ["getElementContext"]
}
});
C.prototype.checkUpdate = function(f) {};
C.prototype.getBoundContext = function(c) {
return this.oElementContext
};
return C
}, true)
};
if (!jQuery.sap.isDeclared('sap.ui.model.Model')) {
jQuery.sap.declare('sap.ui.model.Model');
if (!jQuery.sap.isDeclared('sap.ui.model.BindingMode')) {
jQuery.sap.declare('sap.ui.model.BindingMode');
sap.ui.define("sap/ui/model/BindingMode", ['jquery.sap.global'], function(q) {
"use strict";
var B = {
Default: "Default",
OneTime: "OneTime",
OneWay: "OneWay",
TwoWay: "TwoWay"
};
return B
}, true)
};
if (!jQuery.sap.isDeclared('sap.ui.model.Context')) {
jQuery.sap.declare('sap.ui.model.Context');
sap.ui.define("sap/ui/model/Context", ['jquery.sap.global', 'sap/ui/base/EventProvider'], function(q, E) {
"use strict";
var C = sap.ui.base.Object.extend("sap.ui.model.Context", {
constructor: function(m, p) {
sap.ui.base.Object.apply(this);
this.oModel = m;
this.sPath = p
},
metadata: {
"abstract": true,
publicMethods: ["getModel", "getPath", "getProperty", "getObject"]
}
});
C.prototype.getModel = function() {
return this.oModel
};
C.prototype.getPath = function(p) {
return this.sPath + (p ? "/" + p : "")
};
C.prototype.getProperty = function(p) {
return this.oModel.getProperty(p, this)
};
C.prototype.getObject = function(p) {
return this.oModel.getObject(p, this)
};
C.prototype.toString = function() {
return this.sPath
};
return C
}, true)
};
sap.ui.define("sap/ui/model/Model", ['jquery.sap.global', 'sap/ui/base/EventProvider', './BindingMode', './Context'], function(q, E, B, C) {
"use strict";
var M = E.extend("sap.ui.model.Model", {
constructor: function() {
E.apply(this, arguments);
this.oData = {};
this.bDestroyed = false;
this.aBindings = [];
this.mContexts = {};
this.iSizeLimit = 100;
this.sDefaultBindingMode = B.TwoWay;
this.mSupportedBindingModes = {
"OneWay": true,
"TwoWay": true,
"OneTime": true
};
this.bLegacySyntax = false
},
metadata: {
"abstract": true,
publicMethods: ["bindProperty", "bindList", "bindTree", "bindContext", "createBindingContext", "destroyBindingContext", "getProperty", "getDefaultBindingMode", "setDefaultBindingMode", "isBindingModeSupported", "attachParseError", "detachParseError", "attachRequestCompleted", "detachRequestCompleted", "attachRequestFailed", "detachRequestFailed", "attachRequestSent", "detachRequestSent", "setSizeLimit", "refresh", "isList", "getObject"]
}
});
M.M_EVENTS = {
ParseError: "parseError",
RequestFailed: "requestFailed",
RequestSent: "requestSent",
RequestCompleted: "requestCompleted"
};
M.prototype.attachRequestFailed = function(d, f, l) {
this.attachEvent("requestFailed", d, f, l);
return this
};
M.prototype.detachRequestFailed = function(f, l) {
this.detachEvent("requestFailed", f, l);
return this
};
M.prototype.fireRequestFailed = function(a) {
this.fireEvent("requestFailed", a);
return this
};
M.prototype.attachParseError = function(d, f, l) {
this.attachEvent("parseError", d, f, l);
return this
};
M.prototype.detachParseError = function(f, l) {
this.detachEvent("parseError", f, l);
return this
};
M.prototype.fireParseError = function(a) {
this.fireEvent("parseError", a);
return this
};
M.prototype.attachRequestSent = function(d, f, l) {
this.attachEvent("requestSent", d, f, l);
return this
};
M.prototype.detachRequestSent = function(f, l) {
this.detachEvent("requestSent", f, l);
return this
};
M.prototype.fireRequestSent = function(a) {
this.fireEvent("requestSent", a);
return this
};
M.prototype.attachRequestCompleted = function(d, f, l) {
this.attachEvent("requestCompleted", d, f, l);
return this
};
M.prototype.detachRequestCompleted = function(f, l) {
this.detachEvent("requestCompleted", f, l);
return this
};
M.prototype.fireRequestCompleted = function(a) {
this.fireEvent("requestCompleted", a);
return this
};
M.prototype.getObject = function(p, c) {
return this.getProperty(p, c)
};
M.prototype.getContext = function(p) {
if (!q.sap.startsWith(p, "/")) {
throw new Error("Path " + p + " must start with a / ")
}
var c = this.mContexts[p];
if (!c) {
c = new C(this, p);
this.mContexts[p] = c
}
return c
};
M.prototype.resolve = function(p, c) {
var i = !q.sap.startsWith(p, "/"),
r = p,
s;
if (i) {
if (c) {
s = c.getPath();
r = s + (q.sap.endsWith(s, "/") ? "" : "/") + p
} else {
r = this.isLegacySyntax() ? "/" + p : undefined
}
}
if (r && r !== "/" && q.sap.endsWith(r, "/")) {
r = r.substr(0, r.length - 1)
}
return r
};
M.prototype.addBinding = function(b) {
this.aBindings.push(b)
};
M.prototype.removeBinding = function(b) {
for (var i = 0; i < this.aBindings.length; i++) {
if (this.aBindings[i] == b) {
this.aBindings.splice(i, 1);
break
}
}
};
M.prototype.getDefaultBindingMode = function() {
return this.sDefaultBindingMode
};
M.prototype.setDefaultBindingMode = function(m) {
if (this.isBindingModeSupported(m)) {
this.sDefaultBindingMode = m
} else {
throw new Error("Binding mode " + m + " is not supported by this model.")
}
};
M.prototype.isBindingModeSupported = function(m) {
return (m in this.mSupportedBindingModes)
};
M.prototype.setLegacySyntax = function(l) {
this.bLegacySyntax = l
};
M.prototype.isLegacySyntax = function() {
return this.bLegacySyntax
};
M.prototype.setSizeLimit = function(s) {
this.iSizeLimit = s
};
M.prototype.getInterface = function() {
return this
};
M.prototype.refresh = function(f) {
this.checkUpdate(f)
};
M.prototype.checkUpdate = function(f) {
var b = this.aBindings.slice(0);
q.each(b, function(i, o) {
o.checkUpdate(f)
})
};
M.prototype.destroy = function() {
this.oData = {};
this.aBindings = [];
this.mContexts = {};
this.bDestroyed = true;
E.prototype.destroy.apply(this, arguments)
};
return M
}, true)
};
if (!jQuery.sap.isDeclared('jquery.sap.act')) {
jQuery.sap.declare('jquery.sap.act');
sap.ui.define("jquery.sap.act", ['jquery.sap.global'], function(q) {
"use strict";
if (typeof window.jQuery.sap.act === "object" || typeof window.jQuery.sap.act === "function") {
return
}
var _ = {},
a = true,
b = null,
c = 10000,
d = !!window.addEventListener,
e = [],
f = [],
g = false,
h = null;
function j() {
b = null;
if (g) {
k();
return
}
a = false;
h.observe(document.documentElement, {
childList: true,
attributes: true,
subtree: true,
characterData: true
})
};
function k() {
if (!a) {
a = true;
l(e);
h.disconnect()
}
if (b) {
g = true
} else {
b = setTimeout(j, c);
g = false
}
};
function l(L) {
if (L.length == 0) {
return
}
var m = L.slice();
setTimeout(function() {
var I;
for (var i = 0, n = m.length; i < n; i++) {
I = m[i];
I.fFunction.call(I.oListener || window)
}
}, 0)
};
_.attachActivate = function(F, L) {
e.push({
oListener: L,
fFunction: F
})
};
_.detachActivate = function(F, L) {
for (var i = 0, m = e.length; i < m; i++) {
if (e[i].fFunction === F && e[i].oListener === L) {
e.splice(i, 1);
break
}
}
};
_.isActive = !d ? function() {
return true
} : function() {
return a
};
_.refresh = !d ? function() {} : k;
if (d) {
var E = ["resize", "orientationchange", "mousemove", "mousedown", "mouseup", "touchstart", "touchmove", "touchend", "touchcancel", "paste", "cut", "keydown", "keyup", "DOMMouseScroll", "mousewheel"];
for (var i = 0; i < E.length; i++) {
window.addEventListener(E[i], _.refresh, true)
}
if (window.MutationObserver) {
h = new window.MutationObserver(_.refresh)
} else if (window.WebKitMutationObserver) {
h = new window.WebKitMutationObserver(_.refresh)
} else {
h = {
observe: function() {
document.documentElement.addEventListener("DOMSubtreeModified", _.refresh)
},
disconnect: function() {
document.documentElement.removeEventListener("DOMSubtreeModified", _.refresh)
}
}
}
k()
}
q.sap.act = _;
return q
}, false)
};
if (!jQuery.sap.isDeclared('jquery.sap.strings')) {
jQuery.sap.declare('jquery.sap.strings');
sap.ui.define("jquery.sap.strings", ['jquery.sap.global'], function(q) {
"use strict";
q.sap.endsWith = function endsWith(s, e) {
if (typeof(e) != "string" || e == "") {
return false
}
var p = s.lastIndexOf(e);
return p >= 0 && p == s.length - e.length
};
q.sap.endsWithIgnoreCase = function endsWithIgnoreCase(s, e) {
if (typeof(e) != "string" || e == "") {
return false
}
s = s.toUpperCase();
e = e.toUpperCase();
return q.sap.endsWith(s, e)
};
q.sap.startsWith = function startsWith(s, S) {
if (typeof(S) != "string" || S == "") {
return false
}
if (s == S) {
return true
}
return s.indexOf(S) == 0
};
q.sap.startsWithIgnoreCase = function startsWithIgnoreCase(s, S) {
if (typeof(S) != "string" || S == "") {
return false
}
s = s.toUpperCase();
S = S.toUpperCase();
return q.sap.startsWith(s, S)
};
q.sap.charToUpperCase = function charToUpperCase(s, p) {
if (!s) {
return s
}
if (!p || isNaN(p) || p <= 0 || p >= s.length) {
p = 0
}
var C = s.charAt(p).toUpperCase();
if (p > 0) {
return s.substring(0, p) + C + s.substring(p + 1)
}
return C + s.substring(p + 1)
};
q.sap.padLeft = function padLeft(s, p, l) {
if (!s) {
s = ""
}
while (s.length < l) {
s = p + s
}
return s
};
q.sap.padRight = function padRight(s, p, l) {
if (!s) {
s = ""
}
while (s.length < l) {
s = s + p
}
return s
};
var r = /-(.)/ig;
q.sap.camelCase = function camelCase(s) {
return s.replace(r, function(m, C) {
return C.toUpperCase()
})
};
var a = /([A-Z])/g;
q.sap.hyphen = function hyphen(s) {
return s.replace(a, function(m, C) {
return "-" + C.toLowerCase()
})
};
var b = /[-[\]{}()*+?.,\\^$|#\s]/g;
q.sap.escapeRegExp = function escapeRegExp(s) {
return s.replace(b, "\\$&")
};
q.sap.formatMessage = function formatMessage(p, v) {
if (arguments.length > 2 || (v != null && !q.isArray(v))) {
v = Array.prototype.slice.call(arguments, 1)
}
v = v || [];
return p.replace(c, function($, d, e, f, o) {
if (d) {
return "'"
} else if (e) {
return e.replace(/''/g, "'")
} else if (f) {
return String(v[parseInt(f, 10)])
}
throw new Error("formatMessage: pattern syntax error at pos. " + o)
})
};
var c = /('')|'([^']+(?:''[^']*)*)(?:'|$)|\{([0-9]+(?:\s*,[^{}]*)?)\}|[{}]/g;
return q
}, false)
};
sap.ui.define("sap/ui/base/ManagedObject", ['jquery.sap.global', './BindingParser', './DataType', './EventProvider', './ManagedObjectMetadata', 'sap/ui/model/CompositeBinding', 'sap/ui/model/ContextBinding', 'sap/ui/model/Model', 'sap/ui/model/Type', 'jquery.sap.act', 'jquery.sap.script', 'jquery.sap.strings'], function(q, B, D, E, M, C, b, c, T) {
"use strict";
var d = E.extend("sap.ui.base.ManagedObject", {
metadata: {
"abstract": true,
publicMethods: ["getId", "getMetadata", "getModel", "setModel", "hasModel", "bindProperty", "unbindProperty", "bindAggregation", "unbindAggregation", "bindObject", "unbindObject", "getObjectBinding"],
library: "sap.ui.core",
properties: {},
aggregations: {},
associations: {},
events: {
"validationSuccess": {
enableEventBubbling: true
},
"validationError": {
enableEventBubbling: true
},
"parseError": {
enableEventBubbling: true
},
"formatError": {
enableEventBubbling: true
}
}
},
constructor: function(i, s, S) {
E.apply(this);
if (typeof(i) != "string" && arguments.length > 0) {
S = s;
s = i;
if (s && s.id) {
i = s["id"]
} else {
i = null
}
}
if (!i) {
i = this.getMetadata().uid() || q.sap.uid()
} else {
var p = d._fnIdPreprocessor;
i = (p ? p.call(this, i) : i);
var t = D.getType("sap.ui.core.ID");
if (!t.isValid(i)) {
throw new Error("\"" + i + "\" is not a valid ID.")
}
}
this.sId = i;
this.mProperties = this.getMetadata().createPropertyBag();
this.mAggregations = {};
this.mAssociations = {};
this.mMethods = {};
this.oParent = null;
this.aDelegates = [];
this.aBeforeDelegates = [];
this.iSuppressInvalidate = 0;
this.oPropagatedProperties = {
oModels: {},
oBindingContexts: {}
};
this.oModels = {};
this.oBindingContexts = {};
this.mBindingInfos = {};
this.sBindingPath = null;
this.mBindingParameters = null;
this.mBoundObjects = {};
this._sOwnerId = d._sOwnerId;
try {
if (this.register) this.register();
if (this._initCompositeSupport) {
this._initCompositeSupport(s)
}
if (this.init) {
this.init()
}
this.applySettings(s, S)
} catch (e) {
if (this.deregister) this.deregister();
throw e
}
}
}, M);
d.create = function(v, k) {
if (!v || v instanceof d || typeof v !== "object" || v instanceof String) {
return v
}
function g(t) {
if (typeof t === "function") {
return t
}
if (typeof t === "string") {
return q.sap.getObject(t)
}
}
var f = g(v.Type) || g(k && k.type);
if (typeof f === "function") {
return new f(v)
}
var m = "Don't know how to create a ManagedObject from " + v + " (" + (typeof v) + ")";
q.sap.log.fatal(m);
throw new Error(m)
};
d._fnIdPreprocessor = null;
d._fnSettingsPreprocessor = null;
d.runWithPreprocessors = function(f, p) {
var o = {
id: this._fnIdPreprocessor,
settings: this._fnSettingsPreprocessor
};
p = p || {};
this._fnIdPreprocessor = p.id;
this._fnSettingsPreprocessor = p.settings;
try {
var r = f.call();
this._fnIdPreprocessor = o.id;
this._fnSettingsPreprocessor = o.settings;
return r
} catch (e) {
this._fnIdPreprocessor = o.id;
this._fnSettingsPreprocessor = o.settings;
throw e
}
};
d.getOwnerIdFor = function(o) {
return o && o._sOwnerId
};
d.runWithOwner = function(f, o) {
var a = d._sOwnerId;
try {
d._sOwnerId = o.getId();
var r = f.call();
d._sOwnerId = a;
return r
} catch (e) {
d._sOwnerId = a;
throw e
}
};
d.prototype.applySettings = function(s, S) {
if (!s || q.isEmptyObject(s)) {
return this
}
var m = this.getMetadata(),
v = m.getJSONKeys(),
a = d.create,
p = d._fnSettingsPreprocessor,
k, V, K;
p && p.call(this, s);
if (s.models) {
if (typeof s.models !== "object") {
throw new Error("models must be a simple object")
}
if (s.models instanceof c) {
this.setModel(s.models)
} else {
for (k in s.models) {
this.setModel(s.models[k], k === "undefined" ? undefined : k)
}
}
delete s.models
}
if (s.bindingContexts) {
if (typeof s.bindingContexts !== "object") {
throw new Error("bindingContexts must be a simple object")
}
if (s.bindingContexts instanceof sap.ui.model.Context) {
this.setBindingContext(s.bindingContexts)
} else {
for (k in s.bindingContexts) {
this.setBindingContext(s.bindingContexts[k], k === "undefined" ? undefined : k)
}
}
delete s.bindingContexts
}
if (s.objectBindings) {
if (typeof s.objectBindings !== "string" && typeof s.objectBindings !== "object") {
throw new Error("binding must be a string or simple object")
}
if (typeof s.objectBindings === "string" || s.objectBindings.path) {
this.bindObject(s.objectBindings)
} else {
for (var k in s.objectBindings) {
s.objectBindings.model = k;
this.bindObject(s.objectBindings[k])
}
}
delete s.objectBindings
}
for (k in s) {
if (K = v[k]) {
V = s[k];
switch (K._iKind) {
case 0:
var o = this.extractBindingInfo(V, S);
if (o && typeof o === "object") {
this.bindProperty(k, o)
} else {
this[K._sMutator](o || V)
}
break;
case 1:
var o = K.altTypes && this.extractBindingInfo(V, S);
if (o && typeof o === "object") {
this.bindProperty(k, o)
} else {
this[K._sMutator](a(o || V, K))
}
break;
case 2:
var o = this.extractBindingInfo(V, S);
if (o && typeof o === "object") {
this.bindAggregation(k, o)
} else {
V = o || V;
if (V && !q.isArray(V)) {
V = [V]
}
if (V) {
for (var i = 0, l = V.length; i < l; i++) {
this[K._sMutator](a(V[i], K))
}
}
}
break;
case 3:
this[K._sMutator](V);
break;
case 4:
if (V && !q.isArray(V)) {
V = [V]
}
if (V) {
for (var i = 0, l = V.length; i < l; i++) {
this[K._sMutator](V[i])
}
}
break;
case 5:
if (typeof V == "function") {
this[K._sMutator](V)
} else {
this[K._sMutator](V[0], V[1], V[2])
}
break;
default:
break
}
}
}
return this
};
d.prototype.toString = function() {
return "ManagedObject " + this.getMetadata().getName() + "#" + this.getId()
};
d.prototype.getId = function() {
return this.sId
};
d.prototype.setProperty = function(p, v, s) {
var o = this.mProperties[p];
v = this.validateProperty(p, v);
if (q.sap.equal(o, v)) {
return this
}
if (s) {
q.sap.act.refresh();
this.iSuppressInvalidate++
}
this.mProperties[p] = v;
if (!this.isInvalidateSuppressed()) {
this.invalidate()
}
this.updateModelProperty(p, v, o);
E.prototype.fireEvent.apply(this, ["_change", {
"id": this.getId(),
"name": p,
"oldValue": o,
"newValue": v
}]);
if (s) {
this.iSuppressInvalidate--
}
return this
};
d.prototype.getProperty = function(p) {
var v = this.mProperties[p],
m = this.getMetadata(),
P = m.getAllProperties()[p],
t;
if (!P) {
throw new Error("Property \"" + p + "\" does not exist in " + this)
}
t = D.getType(P.type);
if (t instanceof D && t.isArrayType() && q.isArray(v)) {
v = v.slice(0)
}
if (v instanceof String) {
v = v.valueOf()
}
return v
};
d.prototype.validateProperty = function(p, v) {
var m = this.getMetadata(),
P = m.getAllProperties()[p],
t;
if (!P) {
throw new Error("Property \"" + p + "\" does not exist in " + this)
}
t = D.getType(P.type);
if (t instanceof D && t.isArrayType() && q.isArray(v)) {
v = v.slice(0)
}
if (v === null || v === undefined) {
if (P.defaultValue !== null) {
v = P.defaultValue
} else {
v = t.getDefaultValue()
}
} else if (t instanceof D) {
if (t.getName() == "string") {
if (!(typeof v == "string" || v instanceof String)) {
v = "" + v
}
} else if (t.getName() == "string[]") {
if (typeof v == "string") {
v = [v]
}
if (!q.isArray(v)) {
throw new Error("\"" + v + "\" is of type " + typeof v + ", expected string[]" + " for property \"" + p + "\" of " + this)
}
for (var i = 0; i < v.length; i++) {
if (!typeof v[i] == "string") {
v[i] = "" + v[i]
}
}
} else if (!t.isValid(v)) {
throw new Error("\"" + v + "\" is of type " + typeof v + ", expected " + t.getName() + " for property \"" + p + "\" of " + this)
}
} else if (!(v in t)) {
throw new Error("\"" + v + "\" is not a valid entry of the enumeration for property \"" + p + "\" of " + this)
}
if (t && t.normalize && typeof t.normalize === "function") {
v = t.normalize(v)
}
return v
};
d.prototype.getOriginInfo = function(p) {
var v = this.mProperties[p];
if (!(v instanceof String && v.originInfo)) {
return null
}
return v.originInfo
};
d.prototype.setAssociation = function(a, i, s) {
if (i instanceof d) {
i = i.getId()
} else if (i != null && typeof i !== "string") {
return this
}
if (this.mAssociations[a] === i) {
return this
}
if (s) {
this.iSuppressInvalidate++
}
this.mAssociations[a] = i;
if (!this.isInvalidateSuppressed()) {
this.invalidate()
}
if (s) {
this.iSuppressInvalidate--
}
return this
};
d.prototype.getAssociation = function(a, o) {
var r = this.mAssociations[a];
if (!r) {
r = this.mAssociations[a] = o || null
} else {
if (typeof r.length === 'number' && !(r.propertyIsEnumerable('length'))) {
return r.slice()
}
return r
}
return r
};
d.prototype.addAssociation = function(a, i, s) {
if (i instanceof d) {
i = i.getId()
} else if (typeof i !== "string") {
return this
}
if (s) {
this.iSuppressInvalidate++
}
var I = this.mAssociations[a];
if (!I) {
I = this.mAssociations[a] = [i]
} else {
I.push(i)
}
if (!this.isInvalidateSuppressed()) {
this.invalidate()
}
if (s) {
this.iSuppressInvalidate--
}
return this
};
d.prototype.removeAssociation = function(a, o, s) {
var I = this.mAssociations[a];
var e = null;
if (s) {
this.iSuppressInvalidate++
}
if (typeof(o) == "object" && o.getId) {
o = o.getId()
}
if (typeof(o) == "string") {
for (var i = 0; i < I.length; i++) {
if (I[i] == o) {
o = i;
break
}
}
}
if (typeof(o) == "number") {
if (o < 0 || o >= I.length) {
q.sap.log.warning("ManagedObject.removeAssociation called with invalid index: " + a + ", " + o)
} else {
e = I[o];
I.splice(o, 1);
if (!this.isInvalidateSuppressed()) {
this.invalidate()
}
}
}
if (s) {
this.iSuppressInvalidate--
}
return e
};
d.prototype.removeAllAssociation = function(a, s) {
var i = this.mAssociations[a];
if (!i) {
return []
}
if (s) {
this.iSuppressInvalidate++
}
delete this.mAssociations[a];
if (!this.isInvalidateSuppressed()) {
this.invalidate()
}
if (s) {
this.iSuppressInvalidate--
}
return i
};
d.prototype.validateAggregation = function(a, o, m) {
var e = this.getMetadata(),
A = e.getManagedAggregation(a),
f, t, i, g;
if (!A) {
if (a && e._mHiddenAggregations && e._mHiddenAggregations[a]) {
A = e._mHiddenAggregations[a];
q.sap.log.error("Support for '_mHiddenAggregations' is about to be removed (with 1.12 latest). Hidden aggregations like '" + e.getName() + "." + a + "' instead can be declared like normal aggregations but with visibility:'hidden'.")
} else {
g = "Aggregation \"" + a + "\" does not exist in " + this;
if (/^sap\.(ui\.core|ui\.commons|ui\.table|ui\.ux3|m|makit|viz|uiext\.inbox)$/.test(e.getLibraryName() || "")) {
throw new Error(g)
} else {
q.sap.log.error("Support for undeclared aggregations is about to be removed (with 1.12 latest). Hidden aggregations like '" + e.getName() + "." + a + "' can be declared like normal aggregations but with visibility:'hidden'.");
return o
}
}
}
if (A.multiple !== m) {
throw new Error("Aggregation '" + a + "' of " + this + " used with wrong cardinality (declared as " + (A.multiple ? "0..n" : "0..1") + ")")
}
if (!A.multiple && !o) {
return o
}
t = q.sap.getObject(A.type);
if (typeof t === "function" && o instanceof t) {
return o
}
if (o && o.getMetadata && o.getMetadata().isInstanceOf(A.type)) {
return o
}
f = A.altTypes;
if (f && f.length) {
if (o == null) {
return o
}
for (i = 0; i < f.length; i++) {
t = D.getType(f[i]);
if (t instanceof D) {
if (t.isValid(o)) {
return o
}
} else if (o in t) {
return o
}
}
}
g = "\"" + o + "\" is not valid for aggregation \"" + a + "\" of " + this;
if (D.isInterfaceType(A.type)) {
return o
} else {
throw new Error(g)
}
};
d.prototype.setAggregation = function(a, o, s) {
var O = this.mAggregations[a];
if (O === o) {
return this
}
o = this.validateAggregation(a, o, false);
if (s) {
this.iSuppressInvalidate++
}
if (O instanceof d) {
O.setParent(null)
}
this.mAggregations[a] = o;
if (o instanceof d) {
o.setParent(this, a, s)
} else {
if (!this.isInvalidateSuppressed()) {
this.invalidate()
}
}
if (s) {
this.iSuppressInvalidate--
}
return this
};
d.prototype.getAggregation = function(a, o) {
var e = this.mAggregations[a];
if (!e) {
e = this.mAggregations[a] = o || null
}
if (e) {
if (typeof e.length === 'number' && !(e.propertyIsEnumerable('length'))) {
return e.slice()
}
return e
} else {
return null
}
};
d.prototype.indexOfAggregation = function(a, o) {
var e = this.mAggregations[a];
if (e) {
if (e.length == undefined) {
return -2
}
for (var i = 0; i < e.length; i++) {
if (e[i] == o) {
return i
}
}
}
return -1
};
d.prototype.insertAggregation = function(a, o, I, s) {
if (!o) {
return this
}
o = this.validateAggregation(a, o, true);
var e = this.mAggregations[a] || (this.mAggregations[a] = []);
var i = I < 0 ? 0 : (I > e.length ? e.length : I);
if (i !== I) {
q.sap.log.warning("ManagedObject.insertAggregation: index '" + I + "' out of range [0," + e.length + "], forced to " + i)
}
e.splice(i, 0, o);
o.setParent(this, a, s);
return this
};
d.prototype.addAggregation = function(a, o, s) {
if (!o) {
return this
}
o = this.validateAggregation(a, o, true);
var e = this.mAggregations[a];
if (!e) {
e = this.mAggregations[a] = [o]
} else {
e.push(o)
}
o.setParent(this, a, s);
return this
};
d.prototype.removeAggregation = function(a, o, s) {
var e = this.mAggregations[a],
f = null,
i;
if (!e) {
return null
}
if (s) {
this.iSuppressInvalidate++
}
if (typeof(o) == "string") {
for (i = 0; i < e.length; i++) {
if (e[i] && e[i].getId() === o) {
o = i;
break
}
}
}
if (typeof(o) == "object") {
for (i = 0; i < e.length; i++) {
if (e[i] == o) {
o = i;
break
}
}
}
if (typeof(o) == "number") {
if (o < 0 || o >= e.length) {
q.sap.log.warning("ManagedObject.removeAggregation called with invalid index: " + a + ", " + o)
} else {
f = e[o];
e.splice(o, 1);
f.setParent(null);
if (!this.isInvalidateSuppressed()) {
this.invalidate()
}
}
}
if (s) {
this.iSuppressInvalidate--
}
return f
};
d.prototype.removeAllAggregation = function(a, s) {
var e = this.mAggregations[a];
if (!e) {
return []
}
if (s) {
this.iSuppressInvalidate++
}
delete this.mAggregations[a];
for (var i = 0; i < e.length; i++) {
e[i].setParent(null)
}
if (!this.isInvalidateSuppressed()) {
this.invalidate()
}
if (s) {
this.iSuppressInvalidate--
}
return e
};
d.prototype.destroyAggregation = function(a, s) {
var e = this.mAggregations[a],
i, f;
if (!e) {
return this
}
if (s) {
this.iSuppressInvalidate++
}
delete this.mAggregations[a];
if (e instanceof d) {
e.destroy(s)
} else if (q.isArray(e)) {
for (i = e.length - 1; i >= 0; i--) {
f = e[i];
if (f) {
f.destroy(s)
}
}
}
if (!this.isInvalidateSuppressed()) {
this.invalidate()
}
if (s) {
this.iSuppressInvalidate--
}
return this
};
d.prototype.invalidate = function() {
if (this.oParent) {
this.oParent.invalidate(this)
}
};
d.prototype.isInvalidateSuppressed = function() {
var i = this.iSuppressInvalidate > 0;
if (this.oParent && this.oParent instanceof d) {
i = i || this.oParent.isInvalidateSuppressed()
}
return i
};
d.prototype._removeChild = function(o, a, s) {
if (!a) {
q.sap.log.error("Cannot remove aggregated child without aggregation name.", null, this)
} else {
if (s) {
this.iSuppressInvalidate++
}
var i = this.indexOfAggregation(a, o);
var A = this.getMetadata().getJSONKeys()[a];
if (i == -2) {
if (A && this[A._sMutator]) {
this[A._sMutator](null)
} else {
this.setAggregation(a, null, s)
}
} else if (i > -1) {
if (A && this[A._sRemoveMutator]) {
this[A._sRemoveMutator](i)
} else {
this.removeAggregation(a, i, s)
}
} else {}
if (!this.isInvalidateSuppressed()) {
this.invalidate()
}
if (s) {
this.iSuppressInvalidate--
}
}
};
d.prototype.setParent = function(p, a, s) {
var t = this;
if (!p) {
this.oParent = null;
this.sParentAggregationName = null;
this.oPropagatedProperties = {
oModels: {},
oBindingContexts: {}
};
q.sap.act.refresh();
return
}
if (s) {
q.sap.act.refresh();
this.iSuppressInvalidate++
}
var o = this.getParent();
if (o) {
o._removeChild(this, this.sParentAggregationName)
}
this.oParent = p;
this.sParentAggregationName = a;
this.oPropagatedProperties = p._getPropertiesToPropagate();
if (this.hasModel()) {
this.updateBindingContext(false, true, undefined, true);
this.updateBindings(true, null);
this.propagateProperties(true)
}
if (p && !this.isInvalidateSuppressed()) {
p.invalidate(this)
}
if (s) {
this.iSuppressInvalidate--
}
return this
};
d.prototype.getParent = function() {
return this.oParent
};
d.prototype.destroy = function(s) {
var t = this;
if (s) {
this.iSuppressInvalidate++
}
if (this.exit) {
this.exit()
}
if (this._exitCompositeSupport) {
this._exitCompositeSupport()
}
for (var a in this.mAggregations) {
this.destroyAggregation(a, s)
}
if (this.deregister) this.deregister();
if (this.oParent && this.sParentAggregationName) {
this.oParent._removeChild(this, this.sParentAggregationName, s)
}
delete this.oParent;
q.each(this.mBindingInfos, function(n, o) {
if (o.factory) {
t.unbindAggregation(n, true)
} else {
t.unbindProperty(n, true)
}
});
if (s) {
this.iSuppressInvalidate--
}
E.prototype.destroy.apply(this, arguments);
this.setParent = function() {
throw Error("The object with ID " + t.getId() + " was destroyed and cannot be used anymore.")
};
this.bIsDestroyed = true
};
d.bindingParser = B.simpleParser;
d.prototype.isBinding = function(v, k) {
return "object" === typeof this.extractBindingInfo(v)
};
d.prototype.extractBindingInfo = function(v, s) {
if (v && typeof v === "object") {
if (v.ui5object) {
delete v.ui5object
} else if (v.path || v.parts) {
if (v.template) {
v.template = d.create(v.template)
}
return v
}
}
if (typeof v === "string") {
return d.bindingParser(v, s, true)
}
};
d.prototype.getBindingInfo = function(n) {
return this.mBindingInfos[n]
};
d.prototype.bindObject = function(p, P) {
var a = {},
o, m, s;
if (typeof p == "object") {
var e = p;
p = e.path;
P = e.parameters;
m = e.model;
a.events = e.events
}
s = p.indexOf(">");
a.sBindingPath = p;
a.mBindingParameters = P;
if (s > 0) {
m = p.substr(0, s);
a.sBindingPath = p.substr(s + 1)
}
o = this.mBoundObjects[m];
if (o && o.binding) {
o.binding.detachChange(o.fChangeHandler);
o.binding.detachEvents(o.events)
}
this.mBoundObjects[m] = a;
if (this.getModel(m)) {
this._bindObject(m, a)
}
return this
};
d.prototype._bindObject = function(m, o) {
var a, p, e, t = this;
var f = function(g) {
t.setBindingContext(a.getBoundContext(), m)
};
e = this.getModel(m);
if (this.oParent && e == this.oParent.getModel(m)) {
p = this.oParent.getBindingContext(m)
}
a = e.bindContext(o.sBindingPath, p, o.mBindingParameters);
a.attachChange(f);
o.binding = a;
o.fChangeHandler = f;
a.attachEvents(o.events);
a.initialize()
};
d.prototype.bindContext = function(p) {
return this.bindElement(p)
};
d.prototype.unbindContext = function(m) {
return this.unbindElement(m)
};
d.prototype.unbindObject = function(m) {
var o = this.mBoundObjects[m];
if (o) {
if (o.binding) {
o.binding.detachChange(o.fChangeHandler);
o.binding.detachEvents(o.events)
}
delete this.mBoundObjects[m];
delete this.oBindingContexts[m];
this.updateBindingContext(false, false, m)
}
return this
};
d.prototype.bindProperty = function(n, o) {
var p, f, m, s, F, t, S, a = true,
e = this,
g = this.getMetadata(),
P = g.getAllProperties()[n],
k = g.getJSONKeys()[n];
if (!P && !(k && k.altTypes)) {
throw new Error("Property \"" + n + "\" does not exist in " + this)
}
if (typeof o == "string") {
p = arguments[1];
f = arguments[2];
m = arguments[3];
if (typeof f == "function") {
F = f
} else if (f instanceof T) {
t = f
}
o = {
formatter: F,
parts: [{
path: p,
type: t,
mode: m
}]
}
}
if (!o.parts) {
o.parts = [];
o.parts[0] = {
path: o.path,
type: o.type,
formatOptions: o.formatOptions,
constraints: o.constraints,
model: o.model,
mode: o.mode
};
delete o.path;
delete o.mode;
delete o.model
}
q.each(o.parts, function(i, h) {
if (typeof h == "string") {
h = {
path: h
};
o.parts[i] = h
}
S = h.path.indexOf(">");
if (S > 0) {
h.model = h.path.substr(0, S);
h.path = h.path.substr(S + 1)
}
if (o.formatter || o.parts.length > 1) {
h.mode = sap.ui.model.BindingMode.OneWay
}
if (!e.getModel(h.model)) {
a = false
}
});
if (this.isBound(n)) {
this.unbindProperty(n, true)
}
this.mBindingInfos[n] = o;
if (a) {
this._bindProperty(n, o)
}
return this
};
d.prototype._bindProperty = function(n, o) {
var m, s, a, e, t, f, p = this.getMetadata().getJSONKeys()[n],
g = this,
h = [],
j = function(i) {
g.updateProperty(n)
};
a = this.getBindingContext(o.model);
q.each(o.parts, function(i, P) {
a = g.getBindingContext(P.model);
m = g.getModel(P.model);
t = P.type;
if (typeof t == "string") {
f = q.sap.getObject(t);
t = new f(P.formatOptions, P.constraints)
}
e = m.bindProperty(P.path, a, o.parameters);
e.setType(t, p.type);
e.setFormatter(P.formatter);
s = !P.mode ? m.getDefaultBindingMode() : P.mode;
e.setBindingMode(s);
h.push(e)
});
if (h.length > 1 || (o.formatter && o.formatter.textFragments)) {
t = o.type;
if (typeof t == "string") {
f = q.sap.getObject(t);
t = new f(o.formatOptions, o.constraints)
}
e = new C(h, o.useRawValues);
e.setType(t, p.type);
e.setBindingMode(o.mode)
} else {
e = h[0]
}
e.attachChange(j);
e.setFormatter(q.proxy(o.formatter, this));
o.binding = e;
o.modelChangeHandler = j;
e.attachEvents(o.events);
e.initialize();
if (e.getBindingMode() === sap.ui.model.BindingMode.OneTime) {
e.detachChange(j);
e.detachEvents(o.events)
}
};
d.prototype.unbindProperty = function(n, s) {
var o = this.mBindingInfos[n],
p = this.getMetadata().getJSONKeys()[n];
if (o) {
if (o.binding) {
o.binding.detachChange(o.modelChangeHandler);
o.binding.detachEvents(o.events)
}
delete this.mBindingInfos[n];
if (!s) {
this[p._sMutator](null)
}
}
return this
};
d.prototype.updateProperty = function(n) {
var o = this.mBindingInfos[n],
a = o.binding,
p = this.getMetadata().getJSONKeys()[n];
if (o.skipPropertyUpdate) return;
try {
var v = a.getExternalValue();
o.skipModelUpdate = true;
this[p._sMutator](v);
o.skipModelUpdate = false
} catch (e) {
o.skipModelUpdate = false;
if (e instanceof sap.ui.model.FormatException) {
this.fireFormatError({
element: this,
property: n,
type: a.getType(),
newValue: a.getValue(),
oldValue: this.getProperty(n),
exception: e
}, false, true)
} else {
throw e
}
}
};
d.prototype.updateModelProperty = function(n, v, o) {
if (this.isBound(n)) {
var a = this.mBindingInfos[n],
e = a.binding;
if (a.skipModelUpdate) return;
if (e && e.getBindingMode() == sap.ui.model.BindingMode.TwoWay) {
try {
a.skipPropertyUpdate = true;
e.setExternalValue(v);
a.skipPropertyUpdate = false;
var f = e.getExternalValue();
if (v != f) {
this.updateProperty(n)
}
if (e.getType()) {
this.fireValidationSuccess({
element: this,
property: n,
type: e.getType(),
newValue: v,
oldValue: o
}, false, true)
}
} catch (g) {
a.skipPropertyUpdate = false;
if (g instanceof sap.ui.model.ParseException) {
this.fireParseError({
element: this,
property: n,
type: e.getType(),
newValue: v,
oldValue: o,
exception: g
}, false, true)
} else if (g instanceof sap.ui.model.ValidateException) {
this.fireValidationError({
element: this,
property: n,
type: e.getType(),
newValue: v,
oldValue: o,
exception: g
}, false, true)
} else {
throw g
}
}
}
}
};
d.prototype.bindAggregation = function(n, o) {
var p, t, s, f, m = this.getMetadata(),
a = m.getAllAggregations()[n];
if (!a) {
throw new Error("Aggregation \"" + n + "\" does not exist in " + this)
}
if (typeof o == "string") {
p = arguments[1];
t = arguments[2];
s = arguments[3];
f = arguments[4];
o = {
path: p,
sorter: s,
filters: f
};
if (t instanceof d) {
o.template = t
} else if (typeof t === "function") {
o.factory = t
}
}
if (this.isBound(n)) {
this.unbindAggregation(n, true)
}
if (!(o.template || o.factory)) {
if (a._doesNotRequireFactory) {
o.factory = function() {
throw new Error("dummy factory called unexpectedly ")
}
} else {
throw new Error("Missing template or factory function for aggregation " + n + " of " + this + " !")
}
}
if (o.template) {
if (o.templateShareable === undefined) {
o.templateShareable = true
}
o.factory = function(i) {
return o.template.clone(i)
}
}
var S = o.path.indexOf(">");
if (S > 0) {
o.model = o.path.substr(0, S);
o.path = o.path.substr(S + 1)
}
this.mBindingInfos[n] = o;
if (this.getModel(o.model)) {
this._bindAggregation(n, o)
}
return this
};
d.prototype._bindAggregation = function(n, o) {
var t = this,
a, m = function(g) {
var u = "update" + n.substr(0, 1).toUpperCase() + n.substr(1);
if (t[u]) {
var s = g && g.getParameter("reason");
if (s) {
t[u](s)
} else {
t[u]()
}
} else {
t.updateAggregation(n)
}
},
f = function(g) {
var r = "refresh" + n.substr(0, 1).toUpperCase() + n.substr(1);
if (t[r]) {
t[r](g.getParameter("reason"))
} else {
m(g)
}
};
var e = this.getModel(o.model);
if (this.isTreeBinding(n)) {
a = e.bindTree(o.path, this.getBindingContext(o.model), o.filters, o.parameters)
} else {
a = e.bindList(o.path, this.getBindingContext(o.model), o.sorter, o.filters, o.parameters)
}
if (this.bUseExtendedChangeDetection === true) {
a.enableExtendedChangeDetection()
}
o.binding = a;
o.modelChangeHandler = m;
o.modelRefreshHandler = f;
a.attachChange(m);
a.attachRefresh(f);
a.attachEvents(o.events);
a.initialize()
};
d.prototype.unbindAggregation = function(n, s) {
var o = this.mBindingInfos[n],
a = this.getMetadata().getJSONKeys()[n];
if (o) {
if (o.binding) {
o.binding.detachChange(o.modelChangeHandler);
o.binding.detachRefresh(o.modelRefreshHandler);
o.binding.detachEvents(o.events)
}
if (!o.templateShareable && o.template && o.template.destroy) {
o.template.destroy()
}
delete this.mBindingInfos[n];
if (!s) {
this[a._sDestructor]()
}
}
return this
};
d.prototype.updateAggregation = function(n) {
var o = this.mBindingInfos[n],
a = o.binding,
f = o.factory,
A = this.getMetadata().getJSONKeys()[n],
e, N = null,
g = null,
G = null,
s = null,
t = this;
this[A._sDestructor]();
if (this.isTreeBinding(n)) {
var i = 0,
u = function(h, f, a, p) {
q.each(h, function(I, j) {
var k = t.getId() + "-" + i++;
e = f(k, j);
e.setBindingContext(j, o.model);
p[A._sMutator](e);
u(a.getNodeContexts(j), f, a, e)
})
};
u(a.getRootContexts(), f, a, this)
} else {
g = A._sMutator + "Group";
G = a.isGrouped() && this[g];
q.each(a.getContexts(o.startIndex, o.length), function(I, h) {
if (G && a.aSorters.length > 0) {
N = a.aSorters[0].fnGroup(h);
if (typeof N == "string") {
N = {
key: N
}
}
if (N.key !== s) {
var j;
if (o.groupHeaderFactory) {
j = o.groupHeaderFactory(N)
}
t[g](N, j);
s = N.key
}
}
var k = t.getId() + "-" + I;
e = f(k, h);
e.setBindingContext(h, o.model);
t[A._sMutator](e)
})
}
};
d.prototype.refreshAggregation = function(n) {
var o = this.mBindingInfos[n],
a = o.binding;
a.getContexts(o.startIndex, o.length)
};
d.prototype.isTreeBinding = function(n) {
return false
};
d.prototype.updateBindings = function(u, m) {
var t = this;
function a(o) {
var p = o.parts,
i;
if (p && p.length > 1) {
for (i = 0; i < p.length; i++) {
if ((u || p[i].model == m) && !o.binding.aBindings[i].updateRequired(t.getModel(p[i].model))) {
return true
}
}
} else if (o.factory) {
return (u || o.model == m) && !o.binding.updateRequired(t.getModel(o.model))
} else {
return (u || p[0].model == m) && !o.binding.updateRequired(t.getModel(p[0].model))
}
return false
}
function e(o) {
var p = o.parts,
i;
if (p) {
for (i = 0; i < p.length; i++) {
if (!t.getModel(p[i].model)) {
return false
}
}
return true
} else if (o.factory) {
return !!t.getModel(o.model)
}
return false
}
q.each(this.mBindingInfos, function(n, o) {
if (o.binding && a(o)) {
o.binding.detachChange(o.modelChangeHandler);
if (o.modelRefreshHandler) {
o.binding.detachRefresh(o.modelRefreshHandler)
}
o.binding.detachEvents(o.events);
delete o.binding
}
if (!o.binding && e(o)) {
if (o.factory) {
t._bindAggregation(n, o)
} else {
t._bindProperty(n, o)
}
}
})
};
d.prototype.isBound = function(n) {
return (n in this.mBindingInfos)
};
d.prototype.getObjectBinding = function(m) {
return this.mBoundObjects[m] && this.mBoundObjects[m].binding
};
d.prototype.getEventingParent = function() {
return this.oParent
};
d.prototype.getBinding = function(n) {
return this.mBindingInfos[n] && this.mBindingInfos[n].binding
};
d.prototype.getBindingPath = function(n) {
var i = this.mBindingInfos[n];
return i && (i.path || (i.parts && i.parts[0] && i.parts[0].path))
};
d.prototype.setBindingContext = function(o, m) {
var O = this.oBindingContexts[m];
if (O !== o) {
this.oBindingContexts[m] = o;
this.updateBindingContext(true, true, m);
this.propagateProperties(m)
}
return this
};
d.prototype.updateBindingContext = function(s, S, m, u) {
var o, a = {},
p, e, t = this;
if (u) {
for (m in this.oModels) {
if (this.oModels.hasOwnProperty(m)) {
a[m] = m
}
}
for (m in this.oPropagatedProperties.oModels) {
if (this.oPropagatedProperties.oModels.hasOwnProperty(m)) {
a[m] = m
}
}
} else {
a[m] = m
}
for (m in a) {
if (a.hasOwnProperty(m)) {
m = m === "undefined" ? undefined : m;
o = this.getModel(m);
e = this.mBoundObjects[m];
if (o && e && e.sBindingPath && !s) {
if (!e.binding) {
this._bindObject(m, e)
} else {
p = null;
if (this.oParent && o == this.oParent.getModel(m)) {
p = this.oParent.getBindingContext(m)
}
if (p !== e.binding.getContext()) {
e.binding.setContext(p)
}
}
continue
}
q.each(this.mBindingInfos, function(n, g) {
var h = g.binding;
var P = g.parts,
i;
if (!h) {
return
}
if (P && P.length > 1) {
for (i = 0; i < P.length; i++) {
if (P[i].model == m) {
h.aBindings[i].setContext(t.getBindingContext(P[i].model))
}
}
} else if (g.factory) {
if (g.model == m) {
h.setContext(t.getBindingContext(g.model))
}
} else {
if (P[0].model == m) {
h.setContext(t.getBindingContext(P[0].model))
}
}
});
if (!S) {
var f = this.getBindingContext(m);
q.each(this.mAggregations, function(n, A) {
if (A instanceof d) {
A.oPropagatedProperties.oBindingContexts[m] = f;
A.updateBindingContext(false, false, m)
} else if (A instanceof Array) {
for (var i = 0; i < A.length; i++) {
A[i].oPropagatedProperties.oBindingContexts[m] = f;
A[i].updateBindingContext(false, false, m)
}
}
})
}
}
}
};
d.prototype.getBindingContext = function(m) {
var o = this.getModel(m);
if (this.oBindingContexts[m]) {
return this.oBindingContexts[m]
} else if (o && this.oParent && this.oParent.getModel(m) && o != this.oParent.getModel(m)) {
return undefined
} else {
return this.oPropagatedProperties.oBindingContexts[m]
}
};
d.prototype.setModel = function(m, n) {
if (!m && this.oModels[n]) {
delete this.oModels[n];
this.propagateProperties(n);
this.updateBindings(false, n)
} else if (m && m !== this.oModels[n]) {
this.oModels[n] = m;
this.propagateProperties(n);
this.updateBindingContext(false, true, n);
this.updateBindings(false, n)
} else {}
return this
};
d.prototype.propagateProperties = function(n) {
var p = this._getPropertiesToPropagate(),
u = n === true,
N = u ? undefined : n,
t = this;
q.each(this.mAggregations, function(a, A) {
if (A instanceof d) {
t._propagateProperties(n, A, p, u, N)
} else if (A instanceof Array) {
for (var i = 0; i < A.length; i++) {
if (A[i] instanceof d) {
t._propagateProperties(n, A[i], p, u, N)
}
}
}
})
};
d.prototype._propagateProperties = function(n, o, p, u, N) {
if (!p) {
p = this._getPropertiesToPropagate(), u = n === true, N = u ? undefined : n
}
o.oPropagatedProperties = p;
o.updateBindings(u, N);
o.updateBindingContext(false, true, N, u);
o.propagateProperties(n)
};
d.prototype._getPropertiesToPropagate = function() {
var n = q.isEmptyObject(this.oModels),
N = q.isEmptyObject(this.oBindingContexts);
function m(e, o, a) {
return e ? o : q.extend({}, o, a)
}
if (N && n) {
return this.oPropagatedProperties
} else {
return {
oModels: m(n, this.oPropagatedProperties.oModels, this.oModels),
oBindingContexts: m(N, this.oPropagatedProperties.oBindingContexts, this.oBindingContexts)
}
}
};
d.prototype.getModel = function(n) {
return this.oModels[n] || this.oPropagatedProperties.oModels[n]
};
d.prototype.hasModel = function() {
return !(q.isEmptyObject(this.oModels) && q.isEmptyObject(this.oPropagatedProperties.oModels))
};
d.prototype.clone = function(I, l, o) {
var t = this,
a = true,
e = true;
if (o) {
a = !!o.cloneChildren;
e = !!o.cloneBindings
}
if (!I) {
I = M.uid("clone") || q.sap.uid()
}
if (!l && a) {
l = q.map(this.findAggregatedObjects(true), function(O) {
return O.getId()
})
}
var m = this.getMetadata(),
f = m._oClass,
s = this.getId() + "-" + I,
S = {},
p = this.mProperties,
k, g, h = d.bindingParser.escape;
for (k in p) {
if (p.hasOwnProperty(k) && !(this.isBound(k) && e)) {
if (typeof p[k] === "string") {
S[k] = h(p[k])
} else {
S[k] = p[k]
}
}
}
S["models"] = this.oModels;
S["bindingContexts"] = this.oBindingContexts;
if (a) {
q.each(this.mAggregations, function(n, A) {
if (m.hasAggregation(n) && !(t.isBound(n) && e)) {
if (A instanceof d) {
S[n] = A.clone(I, l)
} else if (q.isArray(A)) {
S[n] = [];
for (var i = 0; i < A.length; i++) {
S[n].push(A[i].clone(I, l))
}
} else {
S[n] = A
}
}
});
q.each(this.mAssociations, function(n, A) {
if (q.isArray(A)) {
A = A.slice(0);
for (var i = 0; i < A.length; i++) {
if (q.inArray(A[i], l) >= 0) {
A[i] += "-" + I
}
}
} else if (q.inArray(A, l) >= 0) {
A += "-" + I
}
S[n] = A
})
}
g = new f(s, S);
q.each(this.mBoundObjects, function(n, i) {
g.mBoundObjects[n] = q.extend({}, i)
});
q.each(this.mEventRegistry, function(n, L) {
g.mEventRegistry[n] = L.slice()
});
if (e) {
q.each(this.mBindingInfos, function(n, i) {
var j = q.extend({}, i);
if (!i.templateShareable && i.template && i.template.clone) {
j.template = i.template.clone(I, l);
delete j.factory
}
delete j.binding;
if (i.factory || i.template) {
g.bindAggregation(n, j)
} else {
g.bindProperty(n, j)
}
})
}
return g
};
d._handleLocalizationChange = function(p) {
var i;
if (p === 1) {
q.each(this.oModels, function(n, m) {
if (m && m._handleLocalizationChange) {
m._handleLocalizationChange()
}
})
} else if (p === 2) {
q.each(this.mBindingInfos, function(n, o) {
var P = o.parts;
if (P) {
for (i = 0; i < P.length; i++) {
if (o.type && o.type._handleLocalizationChange) {
o.type._handleLocalizationChange()
}
}
if (o.modelChangeHandler) {
o.modelChangeHandler()
}
}
})
}
};
d._mapAggregation = function(p, o, n) {
var k = p.getMetadata().getJSONKeys();
var O = k[o];
var N = k[n];
if (!O || !N || O._iKind != 2 || N._iKind != 2) {
return
}
var f = {
"insert": true,
"add": true,
"remove": true,
"removeAll": false,
"indexOf": true,
"destroy": false,
"get": false
};
function m(P, g) {
return P + g.substring(0, 1).toUpperCase() + g.substring(1)
}
function a(F) {
return function() {
return this[F].apply(this, arguments)
}
}
for (var P in f) {
var s = m(P, f[P] ? O.singularName : O._sName);
var e = m(P, f[P] ? N.singularName : N._sName);
p[s] = a(e)
}
};
d.prototype.findAggregatedObjects = function(r) {
var A = [];
function f(o) {
for (var n in o.mAggregations) {
var a = o.mAggregations[n];
if (q.isArray(a)) {
for (var i = 0; i < a.length; i++) {
A.push(a[i]);
if (r) {
f(a[i])
}
}
} else if (a instanceof d) {
A.push(a);
if (r) {
f(a)
}
}
}
}
f(this);
return A
};
return d
}, true)
};
if (!jQuery.sap.isDeclared('sap.ui.core.ComponentMetadata')) {
jQuery.sap.declare('sap.ui.core.ComponentMetadata');
sap.ui.define("sap/ui/core/ComponentMetadata", ['jquery.sap.global', 'sap/ui/base/ManagedObjectMetadata'], function(q, M) {
"use strict";
var C = function(c, o) {
M.apply(this, arguments)
};
C.prototype = q.sap.newObject(M.prototype);
C.preprocessClassInfo = function(c) {
if (c && typeof c.metadata === "string") {
c.metadata = {
_src: c.metadata
}
}
return c
};
C.prototype.applySettings = function(c) {
var s = c.metadata;
var n = this.getName(),
p = n.replace(/\.\w+?$/, "");
if (s._src) {
if (s._src == "component.json") {
q.sap.log.warning("Usage of declacation \"metadata: 'component.json'\" is deprecated (component " + n + "). Use \"metadata: 'json'\" instead.")
} else if (s._src != "json") {
throw new Error("Invalid metadata declaration for component " + n + ": \"" + s._src + "\"! Use \"metadata: 'json'\" to load metadata from component.json.")
}
var r = p.replace(/\./g, "/") + "/component.json";
q.sap.log.info("The metadata of the component " + n + " is loaded from file " + r + ".");
try {
var R = q.sap.loadResource(r, {
dataType: "json",
failOnError: false
});
q.extend(s, R)
} catch (e) {
q.sap.log.error("Failed to load component metadata from \"" + r + "\" (component " + n + ")! Reason: " + e)
}
}
M.prototype.applySettings.call(this, c);
this._sComponentName = p;
this._bInitialized = false;
this._iInstanceCount = 0;
this._sVersion = s.version;
this._mDependencies = s.dependencies;
this._aIncludes = s.includes;
this._mConfig = s.config;
this._mCustomizing = s.customizing;
this._mModels = s.models || {};
this._mServices = s.services || {};
var P = this.getParent();
if (P instanceof C) {
this._mConfig = q.extend(true, {}, P._mConfig, this._mConfig);
this._mCustomizing = q.extend(true, {}, P._mCustomizing, this._mCustomizing);
this._mModels = q.extend(true, {}, P._mModels, this._mModels);
this._mServices = q.extend(true, {}, P._mServices, this._mServices)
}
this._oStaticInfo = s
};
C.prototype.init = function() {
if (!this._bInitialized) {
var p = this.getParent();
if (p instanceof C) {
p.init()
}
this._loadDependencies();
this._loadIncludes();
this._bInitialized = true
}
};
C.prototype.exit = function() {
if (this._bInitialized) {
var p = this.getParent();
if (p instanceof C) {
p.exit()
}
this._bInitialized = false
}
};
C.prototype.onInitComponent = function() {
if (this._iInstanceCount === 0 && !q.isEmptyObject(this._mCustomizing)) {
q.sap.require("sap.ui.core.CustomizingConfiguration");
sap.ui.core.CustomizingConfiguration.activateForComponent(this._sComponentName)
}
this._iInstanceCount++
};
C.prototype.onExitComponent = function() {
this._iInstanceCount--;
if (this._iInstanceCount === 0 && !q.isEmptyObject(this._mCustomizing)) {
if (sap.ui.core.CustomizingConfiguration) {
sap.ui.core.CustomizingConfiguration.deactivateForComponent(this._sComponentName)
}
}
};
C.prototype.getCustomEntry = function(k, m) {
if (!k || k.indexOf(".") <= 0) {
q.sap.log.warning("Component Metadata entries with keys without namespace prefix can not be read via getCustomEntry. Key: " + k + ", Component: " + this.getName());
return null
}
var d = this._oStaticInfo[k] || {};
if (!q.isPlainObject(d)) {
q.sap.log.warning("Custom Component Metadata entry with key '" + k + "' must be an object. Component: " + this.getName());
return null
}
var p = this.getParent();
if (m && p instanceof C) {
return q.extend(true, {}, p.getCustomEntry(k, m), d)
}
return q.extend(true, {}, d)
};
C.prototype.getDependencies = function() {
return this._mDependencies
};
C.prototype.getIncludes = function() {
return (this._aIncludes && this._aIncludes.length > 0) ? this._aIncludes : null
};
C.prototype.getUI5Version = function() {
return this._mDependencies ? this._mDependencies.ui5version : null
};
C.prototype.getComponents = function() {
var c = null;
if (this._mDependencies) {
if (this._mDependencies.components && (this._mDependencies.components.length > 0)) {
c = this._mDependencies.components
}
}
return c
};
C.prototype.getLibs = function() {
var l = null;
if (this._mDependencies) {
if (this._mDependencies.libs && (this._mDependencies.libs.length > 0)) {
l = this._mDependencies.libs
}
}
return l
};
C.prototype.getVersion = function() {
return this._sVersion
};
C.prototype.getConfig = function(k) {
return this._mConfig ? q.extend({}, k ? this._mConfig[k] : this._mConfig) : undefined
};
C.prototype.getCustomizing = function() {
return this._mCustomizing ? q.extend({}, this._mCustomizing) : undefined
};
C.prototype.getModels = function() {
return this._mModels
};
C.prototype.getServices = function() {
return this._mServices
};
C.prototype._loadIncludes = function() {
var I = this.getIncludes();
if (I && I.length > 0) {
var t = this;
var l = this.getLibraryName();
q.each(I, function(i, f) {
if (f.match(/\.css$/i)) {
var c = sap.ui.resource(l, f);
q.sap.log.info("Component \"" + t.getName() + "\" is loading CSS: \"" + c + "\"");
q.sap.includeStyleSheet(c)
} else {
var m = f.match(/\.js$/i);
if (m) {
var p = l.replace(/\./g, '/') + (f.slice(0, 1) === '/' ? '' : '/') + f.slice(0, m.index);
q.sap.log.info("Component \"" + t.getName() + "\" is loading JS: \"" + p + "\"");
q.sap._requirePath(p)
}
}
})
}
};
C.prototype._loadDependencies = function() {
var t = this,
d = this.getDependencies();
if (d) {
var l = d.libs;
if (l) {
q.each(l, function(i, L) {
q.sap.log.info("Component \"" + t.getName() + "\" is loading library: \"" + L + "\"");
sap.ui.getCore().loadLibrary(L)
})
}
var c = d.components;
if (c) {
q.each(c, function(i, n) {
q.sap.log.info("Component \"" + t.getName() + "\" is loading component: \"" + n + ".Component\"");
sap.ui.component.load({
name: n
})
})
}
}
};
return C
}, true)
};
sap.ui.define("sap/ui/core/Component", ['jquery.sap.global', 'sap/ui/base/ManagedObject', './ComponentMetadata', './Core'], function(q, M, C, a) {
"use strict";
var b = M.extend("sap.ui.core.Component", {
constructor: function(i, s) {
M.apply(this, arguments)
},
metadata: {
stereotype: "component",
"abstract": true,
version: "0.0",
includes: [],
dependencies: {
libs: [],
components: [],
ui5version: ""
},
config: {},
customizing: {},
library: "sap.ui.core"
}
}, C);
b.activateCustomizing = function(c) {};
b.deactivateCustomizing = function(c) {};
b.getOwnerIdFor = function(o) {
if (o && (o instanceof b || o instanceof sap.ui.core.mvc.View)) {
return M.getOwnerIdFor(o)
}
};
b.prototype.getInterface = function() {
return this
};
b.prototype._initCompositeSupport = function(s) {
this._mMockServers = {};
this.getMetadata().onInitComponent();
this.oComponentData = s && s.componentData;
this.getMetadata().init();
this.initComponentModels();
if (this.onWindowError) {
this._fnWindowErrorHandler = q.proxy(function(e) {
var E = e.originalEvent;
this.onWindowError(E.message, E.filename, E.lineno)
}, this);
q(window).bind("error", this._fnWindowErrorHandler)
}
if (this.onWindowBeforeUnload) {
this._fnWindowBeforeUnloadHandler = q.proxy(this.onWindowBeforeUnload, this);
q(window).bind("beforeunload", this._fnWindowBeforeUnloadHandler)
}
if (this.onWindowUnload) {
this._fnWindowUnloadHandler = q.proxy(this.onWindowUnload, this);
q(window).bind("unload", this._fnWindowUnloadHandler)
}
};
b.prototype.destroy = function() {
if (this._mMockServers) {
q.each(this._mMockServers, function(n, m) {
m.stop()
});
delete this._mMockServers
}
if (this._fnWindowErrorHandler) {
q(window).unbind("error", this._fnWindowErrorHandler);
delete this._fnWindowErrorHandler
}
if (this._fnWindowBeforeUnloadHandler) {
q(window).unbind("beforeunload", this._fnWindowBeforeUnloadHandler);
delete this._fnWindowBeforeUnloadHandler
}
if (this._fnWindowUnloadHandler) {
q(window).unbind("unload", this._fnWindowUnloadHandler);
delete this._fnWindowUnloadHandler
}
if (this._oEventBus) {
this._oEventBus.destroy();
delete this._oEventBus
}
M.prototype.destroy.apply(this, arguments);
this.getMetadata().onExitComponent()
};
b.prototype.getComponentData = function() {
return this.oComponentData
};
b.prototype.getEventBus = function() {
if (!this._oEventBus) {
q.sap.require("sap.ui.core.EventBus");
this._oEventBus = new sap.ui.core.EventBus()
}
return this._oEventBus
};
b.prototype.initComponentModels = function(m, s) {
var o = this.getMetadata();
var c = m || o.getModels(),
S = s || o.getServices();
if (c) {
var f = function(n, u, e, g) {
if (this._mMockServers[n]) {
this._mMockServers[n].stop()
}
q.sap.require("sap.ui.core.util.MockServer");
this._mMockServers[n] = new sap.ui.core.util.MockServer({
rootUri: u
});
this._mMockServers[n].simulate(e, g);
this._mMockServers[n].start()
};
var d = function(n, e) {
var u = e.uri,
T = e.type;
q.sap.require(T);
var g = q.sap.getObject(T);
var h;
if (T === "sap.ui.model.resource.ResourceModel") {
h = new g({
bundleUrl: u
})
} else if (T === "sap.ui.model.odata.ODataModel") {
if (e.mockserver) {
f.call(this, n, u, e.mockserver.model, e.mockserver.data)
}
h = new g(u, e.settings)
} else if (T === "sap.ui.model.json.JSONModel" || T === "sap.ui.model.xml.XMLModel") {
h = new g();
if (u) {
h.loadData(u)
}
}
return h
};
var t = this;
q.each(c, function(k, e) {
var g = e.service,
h;
if (g) {
var i = S[g];
h = d.call(t, k, i)
} else if (e.type) {
h = d.call(t, k, e)
}
if (h) {
t.setModel(h, k || undefined)
}
})
}
};
sap.ui.component = function(c) {
if (!c) {
throw new Error("sap.ui.component cannot be called without parameter!")
}
if (typeof c === "string") {
return sap.ui.getCore().getComponent(c)
} else {
var n = c.name,
i = c.id,
o = c.componentData,
s = n + ".Component",
S = c.settings;
var d = sap.ui.component.load(c, true);
var I = new d(q.extend({}, S, {
id: i,
componentData: o
}));
q.sap.log.info("Component instance Id = " + I.getId());
return I
}
};
sap.ui.component.load = function(c, f) {
var n = c.name,
u = c.url,
s = n + ".Component",
p = s + "-preload",
P = sap.ui.getCore().getConfiguration().getComponentPreload();
if (!n) {
throw new Error("The name of the component is undefined.")
}
if (u) {
q.sap.registerModulePath(n, u)
}
if (P === "sync" || P === "async") {
try {
if (!q.sap.isDeclared(s, true)) {
q.sap.require(p)
}
} catch (e) {
q.sap.log.warning("couldn't preload component from " + p + ": " + ((e && e.message) || e))
}
}
q.sap.require(s);
var o = q.sap.getObject(s);
if (!o) {
if (f) {
throw new Error("The specified component controller\"" + s + "\" could not be found!")
} else {
q.sap.log.warning("The specified component controller \"" + s + "\" could not be found!")
}
}
return o
};
return b
}, true)
};
if (!jQuery.sap.isDeclared('sap.ui.core.Configuration')) {
jQuery.sap.declare('sap.ui.core.Configuration');
if (!jQuery.sap.isDeclared('sap.ui.core.Locale')) {
jQuery.sap.declare('sap.ui.core.Locale');
sap.ui.define("sap/ui/core/Locale", ['jquery.sap.global', 'sap/ui/base/Object'], function(q, B) {
"use strict";
var a = /^((?:[A-Z]{2,3}(?:-[A-Z]{3}){0,3})|[A-Z]{4}|[A-Z]{5,8})(?:-([A-Z]{4}))?(?:-([A-Z]{2}|[0-9]{3}))?(-[0-9A-Z]{5,8}|(?:[0-9][0-9A-Z]{3}))*(?:-([0-9A-WYZ](?:-[0-9A-Z]{2,8})+))*(?:-(X(?:-[0-9A-Z]{1,8})+))?$/i;
var L = B.extend("sap.ui.core.Locale", {
constructor: function(l) {
B.apply(this);
var r = a.exec(l.replace(/_/g, "-"));
if (r === null) {
throw "The given language does not adhere to BCP-47."
}
this.sLocaleId = l;
this.sLanguage = r[1] || null;
this.sScript = r[2] || null;
this.sRegion = r[3] || null;
this.sVariant = (r[4] && r[4].slice(1)) || null;
this.sExtension = r[5] || null;
this.sPrivateUse = r[6] || null;
if (this.sLanguage) {
this.sLanguage = this.sLanguage.toLowerCase()
}
if (this.sScript) {
this.sScript = this.sScript.toLowerCase().replace(/^[a-z]/, function($) {
return $.toUpperCase()
})
}
if (this.sRegion) {
this.sRegion = this.sRegion.toUpperCase()
}
},
getLanguage: function() {
return this.sLanguage
},
getScript: function() {
return this.sScript
},
getRegion: function() {
return this.sRegion
},
getVariant: function() {
return this.sVariant
},
getVariantSubtags: function() {
return this.sVariant ? this.sVariant.split('-') : []
},
getExtension: function() {
return this.sExtension
},
getExtensionSubtags: function() {
return this.sExtension ? this.sExtension.slice(2).split('-') : []
},
getPrivateUse: function() {
return this.sPrivateUse
},
getPrivateUseSubtags: function() {
return this.sPrivateUse ? this.sPrivateUse.slice(2).split('-') : []
},
hasPrivateUseSubtag: function(s) {
return q.inArray(s, this.getPrivateUseSubtags()) >= 0
},
toString: function() {
var r = [this.sLanguage];
if (this.sScript) {
r.push(this.sScript)
}
if (this.sRegion) {
r.push(this.sRegion)
}
if (this.sVariant) {
r.push(this.sVariant)
}
if (this.sExtension) {
r.push(this.sExtension)
}
if (this.sPrivateUse) {
r.push(this.sPrivateUse)
}
return r.join("-")
},
getSAPLogonLanguage: function() {
var l = this.sLanguage || "",
m;
if (l.indexOf("-") >= 0) {
l = l.slice(0, l.indexOf("-"))
}
l = M[l] || l;
if (l === "zh") {
if (this.sScript === "Hant" || (!this.sScript && this.sRegion === "TW")) {
l = "zf"
}
}
if (this.sPrivateUse && (m = /-(saptrc|sappsd)(?:-|$)/i.exec(this.sPrivateUse))) {
l = (m[1].toLowerCase() === "saptrc") ? "1Q" : "2Q"
}
return l.toUpperCase()
}
});
var M = {
"iw": "he",
"ji": "yi",
"in": "id",
"sh": "sr"
};
function g(v) {
var m = /\$([-a-z0-9A-Z._]+)(?::([^$]*))?\$/.exec(v);
return (m && m[2]) ? m[2].split(/,/) : null
}
var A = g("$cldr-rtl-locales:ar,fa,he$") || [];
L._cldrLocales = g("$cldr-locales:ar,ar_EG,ar_SA,bg,br,ca,cs,da,de,de_AT,de_CH,el,el_CY,en,en_AU,en_GB,en_HK,en_IE,en_IN,en_NZ,en_PG,en_SG,en_ZA,es,es_AR,es_BO,es_CL,es_CO,es_MX,es_PE,es_UY,es_VE,et,fa,fi,fr,fr_BE,fr_CA,fr_CH,fr_LU,he,hi,hr,hu,id,it,it_CH,ja,ko,lt,lv,nb,nl,nl_BE,nn,pl,pt,pt_PT,ro,ru,ru_UA,sk,sl,sr,sv,th,tr,uk,vi,zh_CN,zh_HK,zh_SG,zh_TW$");
L._coreI18nLocales = g("$core-i18n-locales:,ar,bg,ca,cs,da,de,el,en,es,et,fi,fr,hi,hr,hu,it,iw,ja,ko,lt,lv,nl,no,pl,pt,ro,ru,sh,sk,sl,sv,th,tr,uk,vi,zh_CN,zh_TW$");
L._impliesRTL = function(l) {
var o = new L(l);
l = o.getLanguage() || "";
l = (l && M[l]) || l;
var r = o.getRegion() || "";
if (r && q.inArray(l + "_" + r, A) >= 0) {
return true
}
return q.inArray(l, A) >= 0
};
return L
}, true)
};
sap.ui.define("sap/ui/core/Configuration", ['jquery.sap.global', 'sap/ui/base/Object', './Locale', 'sap/ui/thirdparty/URI'], function(q, B, L, U) {
"use strict";
var C = B.extend("sap.ui.core.Configuration", {
constructor: function(o) {
this._oCore = o;
function f() {
var e;
if (!!sap.ui.Device.os.android) {
e = navigator.userAgent.match(/\s([a-z]{2}-[a-z]{2})[;)]/i);
if (e) {
return e[1]
}
}
return navigator.language || navigator.userLanguage || navigator.browserLanguage
}
var g = {
"theme": {
type: "string",
defaultValue: "base"
},
"language": {
type: "string",
defaultValue: f()
},
"formatLocale": {
type: "string",
defaultValue: null
},
"accessibility": {
type: "boolean",
defaultValue: true
},
"animation": {
type: "boolean",
defaultValue: true
},
"rtl": {
type: "boolean",
defaultValue: null
},
"debug": {
type: "boolean",
defaultValue: false
},
"inspect": {
type: "boolean",
defaultValue: false
},
"originInfo": {
type: "boolean",
defaultValue: false
},
"noConflict": {
type: "boolean",
defaultValue: false,
noUrl: true
},
"noDuplicateIds": {
type: "boolean",
defaultValue: true
},
"trace": {
type: "boolean",
defaultValue: false,
noUrl: true
},
"modules": {
type: "string[]",
defaultValue: [],
noUrl: true
},
"areas": {
type: "string[]",
defaultValue: null,
noUrl: true
},
"onInit": {
type: "code",
defaultValue: undefined,
noUrl: true
},
"uidPrefix": {
type: "string",
defaultValue: "__",
noUrl: true
},
"ignoreUrlParams": {
type: "boolean",
defaultValue: false,
noUrl: true
},
"weinreServer": {
type: "string",
defaultValue: "",
noUrl: true
},
"weinreId": {
type: "string",
defaultValue: ""
},
"preload": {
type: "string",
defaultValue: "auto"
},
"rootComponent": {
type: "string",
defaultValue: "",
noUrl: true
},
"xx-rootComponentNode": {
type: "string",
defaultValue: "",
noUrl: true
},
"application": {
type: "string",
defaultValue: ""
},
"appCacheBuster": {
type: "string[]",
defaultValue: []
},
"xx-appCacheBusterMode": {
type: "string",
defaultValue: "sync"
},
"xx-disableCustomizing": {
type: "boolean",
defaultValue: false,
noUrl: true
},
"xx-loadAllMode": {
type: "boolean",
defaultValue: false,
noUrl: true
},
"xx-test-mobile": {
type: "boolean",
defaultValue: false
},
"xx-preloadLibCss": {
type: "string[]",
defaultValue: []
},
"xx-componentPreload": {
type: "string",
defaultValue: ""
},
"xx-bindingSyntax": {
type: "string",
defaultValue: "simple",
noUrl: true
},
"xx-designMode": {
type: "boolean",
defaultValue: false
},
"xx-accessibilityMode": {
type: "boolean",
defaultValue: false
},
"xx-supportedLanguages": {
type: "string[]",
defaultValue: []
},
"xx-bootTask": {
type: "function",
defaultValue: undefined,
noUrl: true
},
"xx-suppressDeactivationOfControllerCode": {
type: "boolean",
defaultValue: false
},
"xx-noNativeScroll": {
type: "boolean",
defaultValue: false
},
"statistics": {
type: "boolean",
defaultValue: false
}
};
var h = {
"xx-test": "1.15",
"flexBoxPolyfill": "1.14",
"sapMeTabContainer": "1.14",
"sapMeProgessIndicator": "1.14",
"sapMGrowingList": "1.14",
"sapMListAsTable": "1.14",
"sapMDialogWithPadding": "1.14"
};
this.oFormatSettings = new C.FormatSettings(this);
var i = this;
function s(N, V) {
if (typeof V === "undefined" || V === null) {
return
}
switch (g[N].type) {
case "boolean":
if (typeof V === "string") {
if (g[N].defaultValue) {
i[N] = V.toLowerCase() != "false"
} else {
i[N] = V.toLowerCase() === "true" || V.toLowerCase() === "x"
}
} else {
i[N] = !!V
}
break;
case "string":
i[N] = "" + V;
break;
case "code":
i[N] = typeof V === "function" ? V : String(V);
break;
case "function":
if (typeof V !== "function") {
throw new Error("unsupported value")
}
i[N] = V;
break;
case "string[]":
if (q.isArray(V)) {
i[N] = V
} else if (typeof V === "string") {
i[N] = q.map(V.split(/[ ,;]/), function($) {
return q.trim($)
})
} else {
throw new Error("unsupported value")
}
break;
default:
throw new Error("illegal state")
}
}
function j(T) {
var v, w;
try {
v = new URI(T, window.location.href).normalize();
w = v.path();
return w + (w.slice(-1) === '/' ? '' : '/') + "UI5/"
} catch (e) {}
}
for (var n in g) {
i[n] = g[n].defaultValue
}
var k = window["sap-ui-config"] || {};
k.oninit = k.oninit || k["evt-oninit"];
for (var n in g) {
s(n, k[n.toLowerCase()])
}
if (k.libs) {
i.modules = q.map(k.libs.split(","), function($) {
return q.trim($) + ".library"
}).concat(i.modules)
}
var P = "compatversion";
var D = k[P];
var l = q.sap.Version("1.14");
this._compatversion = {};
function _(e) {
var v = !e ? D || l.toString() : k[P + "-" + e.toLowerCase()] || D || h[e] || l.toString();
v = q.sap.Version(v.toLowerCase() === "edge" ? sap.ui.version : v);
return q.sap.Version(v.getMajor(), v.getMinor())
}
this._compatversion._default = _();
for (var n in h) {
this._compatversion[n] = _(n)
}
if (!i.ignoreUrlParams) {
var u = "sap-ui-";
var m = q.sap.getUriParameters();
if (m.mParams['sap-locale'] || m.mParams['sap-language']) {
var V = m.get('sap-locale') || M[m.get('sap-language').toUpperCase()] || m.get('sap-language');
if (V === "") {
i['language'] = g['language'].defaultValue
} else {
s('language', V)
}
}
if (m.mParams['sap-accessibility']) {
var V = m.get('sap-accessibility');
if (V === "X" || V === "x") {
s('xx-accessibilityMode', true)
} else {
s('xx-accessibilityMode', false)
}
}
if (m.mParams['sap-rtl']) {
var V = m.get('sap-rtl');
if (V === "X" || V === "x") {
s('rtl', true)
} else {
s('rtl', false)
}
}
if (m.mParams['sap-theme']) {
var V = m.get('sap-theme');
if (V === "") {
i['theme'] = g['theme'].defaultValue
} else {
s('theme', V)
}
}
if (m.mParams['sap-statistics']) {
var V = m.get('sap-statistics');
s('statistics', V)
}
for (var n in g) {
if (g[n].noUrl) {
continue
}
var V = m.get(u + n);
if (V === "") {
i[n] = g[n].defaultValue
} else {
s(n, V)
}
}
}
this.derivedRTL = L._impliesRTL(i.language);
var t = i.theme;
var T;
var I = t.indexOf("@");
if (I >= 0) {
T = j(t.slice(I + 1));
if (T) {
i.theme = t.slice(0, I);
i.themeRoot = T
} else {
i.theme = (k.theme && k.theme !== t) ? k.theme : "base";
I = -1
}
}
i.theme = this._normalizeTheme(i.theme, T);
var p = i['languagesDeliveredWithCore'] = L._coreI18nLocales;
var r = i['xx-supportedLanguages'];
if (r.length === 0 || (r.length === 1 && r[0] === '*')) {
r = []
} else if (r.length === 1 && r[0] === 'default') {
r = p || []
}
i['xx-supportedLanguages'] = r;
for (var n in g) {
if (i[n] !== g[n].defaultValue) {
q.sap.log.info(" " + n + " = " + i[n])
}
}
},
getVersion: function() {
if (this._version) {
return this._version
}
this._version = new q.sap.Version(sap.ui.version);
return this._version
},
getCompatibilityVersion: function(f) {
if (typeof(f) === "string" && this._compatversion[f]) {
return this._compatversion[f]
}
return this._compatversion._default
},
getTheme: function() {
return this.theme
},
_setTheme: function(t) {
this.theme = t;
return this
},
_normalizeTheme: function(t, T) {
if (t && T == null && t.match(/^sap_corbu$/i)) return "sap_goldreflection";
return t
},
getLanguage: function() {
return this.language
},
setLanguage: function(l) {
d(typeof l === "string" && l, "sLanguage must be a BCP47 language tag or Java Locale id or null");
var o = this.getRTL(),
m;
if (l != this.language) {
m = this._collect();
this.language = m.language = l;
this.derivedRTL = L._impliesRTL(l);
if (o != this.getRTL()) {
m.rtl = this.getRTL()
}
this._endCollect()
}
return this
},
getLocale: function() {
return new L(this.language)
},
getFormatLocale: function() {
return this.formatLocale || this.language
},
setFormatLocale: function(f) {
d(f === null || typeof f === "string" && f, "sFormatLocale must be a BCP47 language tag or Java Locale id or null");
var m;
if (f != this.formatLocale) {
m = this._collect();
this.formatLocale = m.formatLocale = f;
this._endCollect()
}
return this
},
getLanguagesDeliveredWithCore: function() {
return this["languagesDeliveredWithCore"]
},
getSupportedLanguages: function() {
return this["xx-supportedLanguages"]
},
getAccessibility: function() {
return this.accessibility
},
getAnimation: function() {
return this.animation
},
getRTL: function() {
return this.rtl === null ? this.derivedRTL : this.rtl
},
setRTL: function(r) {
d(r === null || typeof r === "boolean", "bRTL must be null or a boolean");
var m;
if (r != this.rtl) {
m = this._collect();
this.rtl = m.rtl = this.getRTL();
this._endCollect()
}
return this
},
getDebug: function() {
return this.debug
},
getInspect: function() {
return this.inspect
},
getOriginInfo: function() {
return this.originInfo
},
getNoDuplicateIds: function() {
return this.noDuplicateIds
},
getTrace: function() {
return this.trace
},
getUIDPrefix: function() {
return this.uidPrefix
},
getDesignMode: function() {
return this["xx-designMode"]
},
getSuppressDeactivationOfControllerCode: function() {
return this["xx-suppressDeactivationOfControllerCode"]
},
getWeinreServer: function() {
var w = this.weinreServer;
if (!w) {
w = window.location.protocol + "//" + window.location.hostname + ":";
w += (parseInt(window.location.port, 10) || 8080) + 1
}
return w
},
getWeinreId: function() {
return this.weinreId
},
getApplication: function() {
return this.application
},
getRootComponent: function() {
return this.rootComponent
},
getAppCacheBuster: function() {
return this.appCacheBuster
},
getAppCacheBusterMode: function() {
return this["xx-appCacheBusterMode"]
},
getDisableCustomizing: function() {
return this["xx-disableCustomizing"]
},
getPreload: function() {
return this.preload
},
getComponentPreload: function() {
return this['xx-componentPreload'] || this.preload
},
getFormatSettings: function() {
return this.oFormatSettings
},
_collect: function() {
var m = this.mChanges || (this.mChanges = {
__count: 0
});
m.__count++;
return m
},
_endCollect: function() {
var m = this.mChanges;
if (m && (--m.__count) === 0) {
delete m.__count;
this._oCore && this._oCore.fireLocalizationChanged(m);
delete this.mChanges
}
},
getStatistics: function() {
return this.statistics || window.localStorage.getItem("sap-ui-statistics") == "X"
},
getNoNativeScroll: function() {
return this["xx-noNativeScroll"]
}
});
var M = {
"ZH": "zh-Hans",
"ZF": "zh-Hant",
"1Q": "en-US-x-saptrc",
"2Q": "en-US-x-sappsd"
};
var a = {
"": {
pattern: null
},
"1": {
pattern: "dd.MM.yyyy"
},
"2": {
pattern: "MM/dd/yyyy"
},
"3": {
pattern: "MM-dd-yyyy"
},
"4": {
pattern: "yyyy.MM.dd"
},
"5": {
pattern: "yyyy/MM/dd"
},
"6": {
pattern: "yyyy-MM-dd"
},
"7": {
pattern: "Gyy.MM.dd",
ignore: true
},
"8": {
pattern: "Gyy/MM/dd",
ignore: true
},
"9": {
pattern: "Gyy-MM-dd",
ignore: true
},
"A": {
pattern: "yyyy/MM/dd",
ignore: true
},
"B": {
pattern: "yyyy/MM/dd",
ignore: true
},
"C": {
pattern: "yyyy/MM/dd",
ignore: true
}
};
var b = {
"": {
"short": null,
medium: null,
dayPeriods: null
},
"0": {
"short": "HH:mm",
medium: "HH:mm:ss",
dayPeriods: null
},
"1": {
"short": "hh:mm a",
medium: "hh:mm:ss a",
dayPeriods: ["AM", "PM"]
},
"2": {
"short": "hh:mm a",
medium: "hh:mm:ss a",
dayPeriods: ["am", "pm"]
},
"3": {
"short": "KK:mm a",
medium: "KK:mm:ss a",
dayPeriods: ["AM", "PM"]
},
"4": {
"short": "KK:mm a",
medium: "KK:mm:ss a",
dayPeriods: ["am", "pm"]
}
};
var c = {
"": {
groupingSeparator: null,
decimalSeparator: null
},
" ": {
groupingSeparator: ".",
decimalSeparator: ","
},
"X": {
groupingSeparator: ",",
decimalSeparator: "."
},
"Y": {
groupingSeparator: " ",
decimalSeparator: ","
}
};
function d(e, m) {
if (!e) {
throw new Error(m)
}
}
B.extend("sap.ui.core.Configuration.FormatSettings", {
constructor: function(o) {
this.oConfiguration = o;
this.mSettings = {};
this.sLegacyDateFormat = undefined;
this.sLegacyTimeFormat = undefined;
this.sLegacyNumberFormatSymbolSet = undefined
},
getFormatLocale: function() {
function f(t) {
var l = t.oConfiguration.language;
if (!q.isEmptyObject(t.mSettings)) {
if (l.indexOf("-x-") < 0) {
l = l + "-x-sapufmt"
} else if (l.indexOf("-sapufmt") <= l.indexOf("-x-")) {
l = l + "-sapufmt"
}
}
return l
}
return new L(this.oConfiguration.formatLocale || f(this))
},
_set: function(k, v) {
var o = this.mSettings[k];
if (v != null) {
this.mSettings[k] = v
} else {
delete this.mSettings[k]
}
if ((o == null != v == null) || !q.sap.equal(o, v)) {
var m = this.oConfiguration._collect();
m[k] = v;
this.oConfiguration._endCollect()
}
},
getDatePattern: function(s) {
return this.mSettings["dateFormat-" + s]
},
setDatePattern: function(s, p) {
d(s == "short" || s == "medium" || s == "long" || s == "full", "sStyle must be short, medium, long or full");
this._set("dateFormat-" + s, p);
return this
},
getTimePattern: function(s) {
return this.mSettings["timeFormat-" + s]
},
setTimePattern: function(s, p) {
d(s == "short" || s == "medium" || s == "long" || s == "full", "sStyle must be short, medium, long or full");
this._set("timeFormat-" + s, p);
return this
},
getNumberSymbol: function(t) {
return this.mSettings["symbols-latn-" + t]
},
setNumberSymbol: function(t, s) {
d(t == "decimal" || t == "group" || t == "plusSign" || t == "minusSign", "sType must be decimal, group, plusSign or minusSign");
this._set("symbols-latn-" + t, s);
return this
},
_setDayPeriods: function(w, t) {
this._set("dayPeriods-format-" + w, t);
return this
},
getLegacyDateFormat: function() {
return this.sLegacyDateFormat || undefined
},
setLegacyDateFormat: function(f) {
f = f ? String(f).toUpperCase() : "";
d(!f || a.hasOwnProperty(f), "sFormatId must be one of ['1','2','3','4','5','6','7','8','9','A','B','C'] or empty");
if (a[f].ignore) {
q.sap.log.warning("The ABAP date format '" + f + "' (" + a[f].pattern + ") is not supported yet. Falling back to locale specific date formats.");
f = ""
}
var m = this.oConfiguration._collect();
this.sLegacyDateFormat = m.legacyDateFormat = f;
this.setDatePattern("short", a[f].pattern);
this.setDatePattern("medium", a[f].pattern);
this.oConfiguration._endCollect();
return this
},
getLegacyTimeFormat: function() {
return this.sLegacyTimeFormat || undefined
},
setLegacyTimeFormat: function(f) {
d(!f || b.hasOwnProperty(f), "sFormatId must be one of ['0','1','2','3','4'] or empty");
var m = this.oConfiguration._collect();
this.sLegacyTimeFormat = m.legacyTimeFormat = f = f || "";
this.setTimePattern("short", b[f]["short"]);
this.setTimePattern("medium", b[f]["medium"]);
this._setDayPeriods("abbreviated", b[f].dayPeriods);
this.oConfiguration._endCollect();
return this
},
getLegacyNumberFormat: function() {
return this.sLegacyNumberFormat || undefined
},
setLegacyNumberFormat: function(f) {
f = f ? f.toUpperCase() : "";
d(!f || c.hasOwnProperty(f), "sFormatId must be one of [' ','X','Y'] or empty");
var m = this.oConfiguration._collect();
this.sLegacyNumberFormat = m.legacyNumberFormat = f;
this.setNumberSymbol("group", c[f].groupingSeparator);
this.setNumberSymbol("decimal", c[f].decimalSeparator);
this.oConfiguration._endCollect()
},
getCustomLocaleData: function() {
return this.mSettings
}
});
return C
}, true)
};
if (!jQuery.sap.isDeclared('sap.ui.core.Control')) {
jQuery.sap.declare('sap.ui.core.Control');
if (!jQuery.sap.isDeclared('sap.ui.core.CustomStyleClassSupport')) {
jQuery.sap.declare('sap.ui.core.CustomStyleClassSupport');
if (!jQuery.sap.isDeclared('sap.ui.core.Element')) {
jQuery.sap.declare('sap.ui.core.Element');
if (!jQuery.sap.isDeclared('sap.ui.core.ElementMetadata')) {
jQuery.sap.declare('sap.ui.core.ElementMetadata');
sap.ui.define("sap/ui/core/ElementMetadata", ['jquery.sap.global', 'sap/ui/base/ManagedObjectMetadata'], function(q, M) {
"use strict";
var E = function(c, C) {
M.apply(this, arguments)
};
E.prototype = q.sap.newObject(M.prototype);
E.uid = M.uid;
E.prototype.getElementName = function() {
return this._sClassName
};
E.prototype.getRendererName = function() {
return this._sRendererName
};
E.prototype.getRenderer = function() {
var r = this.getRendererName();
if (!r) {
return
}
var R = q.sap.getObject(r);
if (R) {
return R
}
q.sap.require(r);
return q.sap.getObject(r)
};
E.prototype.applySettings = function(c) {
var s = c.metadata;
this._sVisibility = s["visibility"] || "public";
var r = c.hasOwnProperty("renderer") ? (c.renderer || "") : undefined;
delete c.renderer;
M.prototype.applySettings.call(this, c);
this._sRendererName = this.getName() + "Renderer";
if (typeof r !== "undefined") {
if (typeof r === "string") {
this._sRendererName = r || undefined;
return
}
if (typeof r === "function") {
r = {
render: r
}
}
var p = this.getParent();
var b;
if (p && p instanceof E) {
b = p.getRenderer()
}
if (!b) {
q.sap.require("sap.ui.core.Renderer");
b = sap.ui.core.Renderer
}
var R = q.sap.newObject(b);
q.extend(R, r);
q.sap.setObject(this.getRendererName(), R)
}
};
E.prototype.afterApplySettings = function() {
M.prototype.afterApplySettings.apply(this, arguments);
this.register && this.register(this)
};
E.prototype.isHidden = function() {
return this._sVisibility === "hidden"
};
return E
}, true)
};
sap.ui.define("sap/ui/core/Element", ['jquery.sap.global', 'sap/ui/base/ManagedObject', './Core', './ElementMetadata', 'sap/ui/model/SimpleType', 'jquery.sap.strings'], function(q, M, C, E, S) {
"use strict";
var a = M.extend("sap.ui.core.Element", {
metadata: {
stereotype: "element",
"abstract": true,
publicMethods: ["getId", "getMetadata", "getTooltip_AsString", "getTooltip_Text", "getModel", "setModel", "hasModel", "bindElement", "unbindElement", "getElementBinding", "prop", "getLayoutData", "setLayoutData"],
library: "sap.ui.core",
properties: {},
aggregations: {
tooltip: {
name: "tooltip",
type: "sap.ui.core.TooltipBase",
altTypes: ["string"],
multiple: false
},
customData: {
name: "customData",
type: "sap.ui.core.CustomData",
multiple: true,
singularName: "customData"
},
layoutData: {
name: "layoutData",
type: "sap.ui.core.LayoutData",
multiple: false,
singularName: "layoutData"
},
dependents: {
name: "dependents",
type: "sap.ui.core.Control",
multiple: true
}
},
associations: {},
events: {}
},
constructor: function(i, s) {
M.apply(this, arguments)
},
renderer: null
}, E);
a.defineClass = function(c, s, m) {
return sap.ui.base.Object.defineClass(c, s, m || E)
};
a.prototype.getInterface = function() {
return this
};
a.prototype._handleEvent = function(e) {
var h = "on" + e.type;
this._callEventHandles(this.aBeforeDelegates.slice(0), h, e, true);
this._callEventHandles([this], h, e);
this._callEventHandles(this.aDelegates.slice(0), h, e, true)
};
a.prototype._callEventHandles = function(h, H, e, d) {
if (h.length > 0) {
for (var i = 0; i < h.length; i++) {
if (e.isImmediateHandlerPropagationStopped()) {
break
}
var o = d ? h[i].oDelegate : h[i];
var t = (d && h[i].vThis) ? h[i].vThis : o;
if (t === true) {
t = this
}
if (o[H]) {
o[H].call(t, e)
}
}
}
};
a.create = function(d, k) {
if (!d || d instanceof a || typeof d !== "object" || d instanceof String) {
return d
}
function g(t) {
if (typeof t === "function") {
return t
}
if (typeof t === "string") {
return q.sap.getObject(t)
}
}
var c = g(d.Type) || g(k && k.type);
if (typeof c === "function") {
return new c(d)
}
var m = "Don't know how to create an Element from " + d + " (" + (typeof d) + ")";
q.sap.log.fatal(m);
throw new Error(m)
};
a.prototype.toString = function() {
if (this.getMetadata) {
return "Element " + this.getMetadata().getName() + "#" + this.sId
} else {
return "Element {unknown class}#" + this.sId
}
};
a.prototype.getDomRef = function(s) {
return q.sap.domById(s ? this.getId() + "-" + s : this.getId())
};
a.prototype.$ = function(s) {
return q(this.getDomRef(s))
};
a.prototype.isActive = function() {
return this.oParent && this.oParent.isActive()
};
a.prototype.prop = function(p, v) {
var P = this.getMetadata().getJSONKeys()[p];
if (P) {
if (arguments.length == 1) {
return this[P._sGetter]()
} else {
this[P._sMutator](v);
return this
}
}
};
a.prototype.insertDependent = function(c, i) {
return this.insertAggregation("dependents", c, i, true)
};
a.prototype.addDependent = function(c) {
return this.addAggregation("dependents", c, true)
};
a.prototype.removeDependent = function(c) {
return this.removeAggregation("dependents", c, true)
};
a.prototype.removeAllDependents = function() {
return this.removeAllAggregation("dependents", true)
};
a.prototype.destroyDependents = function() {
return this.destroyAggregation("dependents", true)
};
a.prototype.rerender = function() {
if (this.oParent) {
this.oParent.rerender()
}
};
a.prototype.getUIArea = function() {
return this.oParent ? this.oParent.getUIArea() : null
};
a.prototype.destroy = function(s) {
M.prototype.destroy.call(this, s);
this.$().remove()
};
a.prototype.fireEvent = function(e, p) {
var A = Array.prototype.slice.apply(arguments);
A[1] = p = p || {};
p.id = p.id || this.getId();
return sap.ui.base.EventProvider.prototype.fireEvent.apply(this, A)
};
a.prototype.addDelegate = function(d, c, t, b) {
this.removeDelegate(d);
if (typeof c === "object") {
b = t;
t = c;
c = false
}
if (typeof t === "boolean") {
b = t;
t = undefined
}(c ? this.aBeforeDelegates : this.aDelegates).push({
oDelegate: d,
bClone: !!b,
vThis: ((t === this) ? true : t)
});
return this
};
a.prototype.removeDelegate = function(d) {
for (var i = 0; i < this.aDelegates.length; i++) {
if (this.aDelegates[i].oDelegate == d) {
this.aDelegates.splice(i, 1)
}
}
for (var i = 0; i < this.aBeforeDelegates.length; i++) {
if (this.aBeforeDelegates[i].oDelegate == d) {
this.aBeforeDelegates.splice(i, 1)
}
}
return this
};
a.prototype.addEventDelegate = function(d, t) {
return this.addDelegate(d, false, t, true)
};
a.prototype.removeEventDelegate = function(d) {
return this.removeDelegate(d)
};
a.prototype.getFocusDomRef = function() {
return this.getDomRef() || null
};
a.prototype.focus = function() {
var f = this.getFocusDomRef();
if (f) {
try {
f.focus()
} catch (e) {
var i = f.id ? " (id: " + f.id + ")" : " ";
q.sap.log.warning("DOM element" + i + " in " + this.toString() + " which should be focused cannot be focused: " + e.message)
}
}
};
a.prototype.getFocusInfo = function() {
return {
id: this.getId()
}
};
a.prototype.applyFocusInfo = function(f) {
this.focus();
return this
};
a.prototype._refreshTooltipBaseDelegate = function(t) {
var o = this.getTooltip();
if (o instanceof sap.ui.core.TooltipBase) {
this.removeDelegate(o)
}
if (t instanceof sap.ui.core.TooltipBase) {
t._currentControl = this;
this.addDelegate(t)
}
};
a.prototype.setTooltip = function(t) {
this._refreshTooltipBaseDelegate(t);
this.setAggregation("tooltip", t);
return this
};
a.prototype.getTooltip = function() {
return this.getAggregation("tooltip")
};
a.runWithPreprocessors = M.runWithPreprocessors;
a.prototype.getTooltip_AsString = function() {
var t = this.getTooltip();
if (typeof t === "string" || t instanceof String) {
return t
}
return undefined
};
a.prototype.getTooltip_Text = function() {
var t = this.getTooltip();
if (t && typeof t.getText === "function") {
return t.getText()
}
return t
};
(function() {
var g = function(e, k) {
var d = e.getAggregation("customData");
if (d) {
for (var i = 0; i < d.length; i++) {
if (d[i].getKey() == k) {
return d[i]
}
}
}
return null
};
var s = function(e, k, v, w) {
if (v === null) {
var d = g(e, k);
if (!d) {
return
}
var b = e.getAggregation("customData").length;
if (b == 1) {
e.destroyAggregation("customData", true)
} else {
e.removeAggregation("customData", d, true);
d.destroy()
}
} else {
var d = g(e, k);
if (d) {
d.setValue(v);
d.setWriteToDom(w)
} else {
var d = new sap.ui.core.CustomData({
key: k,
value: v,
writeToDom: w
});
e.addAggregation("customData", d, true)
}
}
};
a.prototype.data = function() {
var b = arguments.length;
if (b == 0) {
var d = this.getAggregation("customData"),
r = {};
if (d) {
for (var i = 0; i < d.length; i++) {
r[d[i].getKey()] = d[i].getValue()
}
}
return r
} else if (b == 1) {
var c = arguments[0];
if (c === null) {
this.destroyAggregation("customData", true);
return this
} else if (typeof c == "string") {
var e = g(this, c);
return e ? e.getValue() : null
} else if (typeof c == "object") {
for (var k in c) {
s(this, k, c[k])
}
return this
} else {
throw new Error("When data() is called with one argument, this argument must be a string, an object or null, but is " + (typeof c) + ":" + c + " (on UI Element with ID '" + this.getId() + "')")
}
} else if (b == 2) {
s(this, arguments[0], arguments[1]);
return this
} else if (b == 3) {
s(this, arguments[0], arguments[1], arguments[2]);
return this
} else {
throw new Error("data() may only be called with 0-3 arguments (on UI Element with ID '" + this.getId() + "')")
}
}
})();
a.prototype.clone = function(I, l) {
var c = M.prototype.clone.apply(this, arguments);
for (var i = 0; i < this.aDelegates.length; i++) {
if (this.aDelegates[i].bClone) {
c.aDelegates.push(this.aDelegates[i])
}
}
for (var i = 0; i < this.aBeforeDelegates.length; i++) {
if (this.aBeforeDelegates[i].bClone) {
c.aBeforeDelegates.push(this.aBeforeDelegates[i])
}
}
return c
};
a.prototype.findElements = function(r) {
var c = M.prototype.findAggregatedObjects.call(this, r);
return c
};
a.prototype.setLayoutData = function(l) {
this.setAggregation("layoutData", l, true);
var L = this.getParent();
if (L) {
var e = q.Event("LayoutDataChange");
e.srcControl = this;
L._handleEvent(e)
}
return this
};
a.prototype.bindElement = function(p, P) {
return this.bindObject(p, P)
};
a.prototype.unbindElement = function(m) {
return this.unbindObject(m)
};
a.prototype.getElementBinding = function(m) {
return this.getObjectBinding(m)
};
return a
}, true)
};
sap.ui.define("sap/ui/core/CustomStyleClassSupport", ['jquery.sap.global', './Element'], function(q, E) {
"use strict";
var C = function() {
if (!(this instanceof E)) {
return
}
var o = this.clone;
this.clone = function() {
var c = o.apply(this, arguments);
if (this.aCustomStyleClasses) {
c.aCustomStyleClasses = this.aCustomStyleClasses.slice()
}
return c
};
this.addStyleClass = function(s, S) {
if (!this.aCustomStyleClasses) {
this.aCustomStyleClasses = []
}
if (s) {
if (s.indexOf("\"") > -1) {
return this
}
if (s.indexOf("'") > -1) {
return this
}
for (var i = this.aCustomStyleClasses.length - 1; i >= 0; i--) {
if (this.aCustomStyleClasses[i] == s) {
return this
}
}
this.aCustomStyleClasses.push(s);
var r = this.getDomRef();
if (r) {
q(r).addClass(s)
} else if (S === false) {
this.invalidate()
}
}
return this
};
this.removeStyleClass = function(s, S) {
if (s && this.aCustomStyleClasses) {
for (var i = this.aCustomStyleClasses.length - 1; i >= 0; i--) {
if (this.aCustomStyleClasses[i] == s) {
this.aCustomStyleClasses.splice(i, 1);
var r = this.getDomRef();
if (r) {
q(r).removeClass(s)
} else if (S === false) {
this.invalidate()
}
}
}
}
return this
};
this.toggleStyleClass = function(s, a) {
if (s && typeof s === "string") {
if (a === true) {
this.addStyleClass(s)
} else if (a === false) {
this.removeStyleClass(s)
} else if (a === undefined) {
this.hasStyleClass(s) ? this.removeStyleClass(s) : this.addStyleClass(s)
} else {
q.sap.log.warning(this.toString() + "- toggleStyleClass(): bAdd should be a boolean or undefined, but is '" + a + "'")
}
}
return this
};
this.hasStyleClass = function(s) {
if (s && this.aCustomStyleClasses) {
for (var i = this.aCustomStyleClasses.length - 1; i >= 0; i--) {
if (this.aCustomStyleClasses[i] == s) {
return true
}
}
}
return false
};
this.getMetadata().addPublicMethods(["addStyleClass", "removeStyleClass", "toggleStyleClass", "hasStyleClass"])
};
return C
}, true)
};
sap.ui.define("sap/ui/core/Control", ['jquery.sap.global', './CustomStyleClassSupport', './Element'], function(q, C, E) {
"use strict";
var a = E.extend("sap.ui.core.Control", {
metadata: {
stereotype: "control",
"abstract": true,
publicMethods: ["placeAt", "attachBrowserEvent", "detachBrowserEvent"],
library: "sap.ui.core",
properties: {
"busy": {
type: "boolean",
defaultValue: false
},
"busyIndicatorDelay": {
type: "int",
defaultValue: 1000
}
},
aggregations: {},
associations: {},
events: {}
},
constructor: function(i, s) {
this.bAllowTextSelection = true;
E.apply(this, arguments);
this.bOutput = this.getDomRef() != null;
if (this._sapUiCoreLocalBusy_initBusyIndicator) {
this._sapUiCoreLocalBusy_initBusyIndicator()
}
},
renderer: null
});
a.prototype.clone = function() {
var c = E.prototype.clone.apply(this, arguments);
if (this.aBindParameters) {
for (var i = 0, l = this.aBindParameters.length; i < l; i++) {
var p = this.aBindParameters[i];
c.attachBrowserEvent(p.sEventType, p.fnHandler, p.oListener !== this ? p.oListener : undefined)
}
}
c.bAllowTextSelection = this.bAllowTextSelection;
return c
};
C.apply(a.prototype);
a.prototype.isActive = function() {
return q.sap.domById(this.sId) != null
};
a.prototype.invalidate = function(o) {
var u;
if (this.bOutput && (u = this.getUIArea())) {
if (!this._bIsBeingDestroyed) {
u.addInvalidatedControl(this)
}
} else {
var p = this.getParent();
if (p && (this.bOutput || !(this.getVisible && this.getVisible() === false))) {
p.invalidate(this)
}
}
};
a.prototype.rerender = function() {
sap.ui.core.UIArea.rerenderControl(this)
};
a.prototype.allowTextSelection = function(A) {
this.bAllowTextSelection = A;
return this
};
a.prototype.attachBrowserEvent = function(e, h, l) {
if (e && (typeof(e) === "string")) {
if (h && typeof(h) === "function") {
if (!this.aBindParameters) {
this.aBindParameters = []
}
l = l || this;
var p = function() {
h.apply(l, arguments)
};
this.aBindParameters.push({
sEventType: e,
fnHandler: h,
oListener: l,
fnProxy: p
});
this.$().bind(e, p)
}
}
return this
};
a.prototype.detachBrowserEvent = function(e, h, l) {
if (e && (typeof(e) === "string")) {
if (h && typeof(h) === "function") {
var $ = this.$(),
i, p;
l = l || this;
if (this.aBindParameters) {
for (i = this.aBindParameters.length - 1; i >= 0; i--) {
p = this.aBindParameters[i];
if (p.sEventType === e && p.fnHandler === h && p.oListener === l) {
this.aBindParameters.splice(i, 1);
$.unbind(e, p.fnProxy)
}
}
}
}
}
return this
};
a.prototype.getRenderer = function() {
return sap.ui.core.RenderManager.getRenderer(this)
};
a.prototype.placeAt = function(r, p) {
var c = sap.ui.getCore();
if (c.isInitialized()) {
var o = r;
if (typeof o === "string") {
o = c.byId(r)
}
var i = false;
if (!(o instanceof E)) {
o = c.createUIArea(r);
i = true
}
if (!o) {
return
}
if (!i) {
var b = o.getMetadata().getAllAggregations()["content"];
var d = true;
if (b) {
if (!b.multiple || b.type != "sap.ui.core.Control") {
d = false
}
} else {
if (!o.addContent || !o.insertContent || !o.removeAllContent) {
d = false
}
}
if (!d) {
q.sap.log.warning("placeAt cannot be processed because container " + o + " does not have an aggregation 'content'.");
return
}
}
if (typeof p === "number") {
o.insertContent(this, p)
} else {
p = p || "last";
switch (p) {
case "last":
o.addContent(this);
break;
case "first":
o.insertContent(this, 0);
break;
case "only":
o.removeAllContent();
o.addContent(this);
break;
default:
q.sap.log.warning("Position " + p + " is not supported for function placeAt.")
}
}
} else {
var t = this;
c.attachInitEvent(function() {
t.placeAt(r, p)
})
}
return this
};
a.prototype.onselectstart = function(b) {
if (!this.bAllowTextSelection) {
b.preventDefault();
b.stopPropagation()
}
};
a.prototype.getIdForLabel = function() {
return this.getId()
};
a.prototype.destroy = function(s) {
this._bIsBeingDestroyed = true;
this._cleanupBusyIndicator();
sap.ui.core.ResizeHandler.deregisterAllForControl(this.getId());
E.prototype.destroy.call(this, s)
};
(function() {
var p = "focusin focusout keydown keypress keyup",
b = {
onAfterRendering: function() {
if (this.getProperty("busy") === true && this.$()) {
A.apply(this)
}
}
},
A = function() {
var $ = this.$(this._sBusySection),
F = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "menuitem", "meta", "param", "source", "track", "wbr"];
if (this._busyIndicatorDelayedCallId) {
q.sap.clearDelayedCall(this._busyIndicatorDelayedCallId);
delete this._busyIndicatorDelayedCallId
}
var t = $.get(0) && $.get(0).tagName;
if (t && q.inArray(t.toLowerCase(), F) >= 0) {
q.sap.log.warning("Busy Indicator cannot be placed in elements with tag " + t);
return
}
if ($.css('position') == 'static') {
this._busyStoredPosition = 'static';
$.css('position', 'relative')
}
var B = q('<div class="sapUiLocalBusyIndicator"><div class="sapUiLocalBusyIndicatorAnimation"><div class="sapUiLocalBusyIndicatorBox"></div><div class="sapUiLocalBusyIndicatorBox"></div><div class="sapUiLocalBusyIndicatorBox"></div></div></div>');
B.attr("id", this.getId() + "-busyIndicator");
$.append(B);
$.addClass('sapUiLocalBusy');
if (this._busyDelayedCallId) {
q.sap.clearDelayedCall(this._busyDelayedCallId)
}
this._busyDelayedCallId = q.sap.delayedCall(1200, this, f);
h.apply(this, [true])
},
h = function(B) {
if (B) {
var $ = this.$(this._sBusySection),
t = $.find('[tabindex]'),
c = this;
this._busyTabIndices = [];
t.each(function(i, o) {
var r = q(o),
T = r.attr('tabindex');
if (T < 0) return true;
c._busyTabIndices.push({
ref: r,
tabindex: T
});
r.attr('tabindex', -1);
r.bind(p, P)
})
} else {
if (this._busyTabIndices) {
q.each(this._busyTabIndices, function(i, o) {
o.ref.attr('tabindex', o.tabindex);
o.ref.unbind(p, P)
})
}
this._busyTabIndices = []
}
},
P = function(e) {
e.preventDefault();
e.stopImmediatePropagation()
},
f = function() {
var $ = this.$(this._sBusySection).children('.sapUiLocalBusyIndicator').children('.sapUiLocalBusyIndicatorAnimation');
var t = this;
t._busyAnimationTimer1 = setTimeout(function() {
$.children(":eq(0)").addClass('active');
$.children(":not(:eq(0))").removeClass('active');
t._busyAnimationTimer2 = setTimeout(function() {
$.children(":eq(1)").addClass('active');
$.children(":not(:eq(1))").removeClass('active');
t._busyAnimationTimer3 = setTimeout(function() {
$.children(":eq(2)").addClass('active');
$.children(":not(:eq(2))").removeClass('active');
t._busyAnimationTimer4 = setTimeout(function() {
$.children().removeClass('active')
}, 150)
}, 150)
}, 150)
}, 150);
this._busyDelayedCallId = q.sap.delayedCall(1200, this, f)
};
a.prototype.setBusy = function(B, s) {
this._sBusySection = s;
var $ = this.$(this._sBusySection);
if (B == this.getProperty("busy")) {
return
}
this.setProperty("busy", B, true);
if (B) {
this.addDelegate(b, false, this)
} else {
this.removeDelegate(b);
if (this._busyIndicatorDelayedCallId) {
q.sap.clearDelayedCall(this._busyIndicatorDelayedCallId);
delete this._busyIndicatorDelayedCallId
}
}
if (!this.getDomRef()) {
return
}
if (B) {
if (this.getBusyIndicatorDelay() <= 0) {
A.apply(this)
} else {
this._busyIndicatorDelayedCallId = q.sap.delayedCall(this.getBusyIndicatorDelay(), this, A)
}
} else {
this.$("busyIndicator").remove();
this.$().removeClass('sapUiLocalBusy');
if (this._busyStoredPosition) {
$.css('position', this._busyStoredPosition);
delete this._busyStoredPosition
}
h.apply(this, [false]);
if (this._busyDelayedCallId) {
q.sap.clearDelayedCall(this._busyDelayedCallId);
delete this._busyDelayedCallId
}
}
};
a.prototype.isBusy = function() {
return this.getProperty("busy")
};
a.prototype.setBusyIndicatorDelay = function(d) {
this.setProperty("busyIndicatorDelay", d, true);
return this
};
a.prototype._cleanupBusyIndicator = function() {
if (this._busyIndicatorDelayedCallId) {
q.sap.clearDelayedCall(this._busyIndicatorDelayedCallId);
delete this._busyIndicatorDelayedCallId
}
if (this._busyDelayedCallId) {
q.sap.clearDelayedCall(this._busyDelayedCallId);
delete this._busyDelayedCallId
}
if (this._busyAnimationTimer1) {
clearTimeout(this._busyAnimationTimer1);
delete this._busyAnimationTimer1
}
if (this._busyAnimationTimer2) {
clearTimeout(this._busyAnimationTimer2);
delete this._busyAnimationTimer2
}
if (this._busyAnimationTimer3) {
clearTimeout(this._busyAnimationTimer3);
delete this._busyAnimationTimer3
}
if (this._busyAnimationTimer4) {
clearTimeout(this._busyAnimationTimer4);
delete this._busyAnimationTimer4
}
}
})();
return a
}, true)
};
if (!jQuery.sap.isDeclared('sap.ui.core.FocusHandler')) {
jQuery.sap.declare('sap.ui.core.FocusHandler');
sap.ui.define("sap/ui/core/FocusHandler", ['jquery.sap.global', 'sap/ui/Device', 'sap/ui/Global', 'sap/ui/base/Object', 'jquery.sap.script'], function(q, D, G, B) {
"use strict";
var F = B.extend("sap.ui.core.FocusHandler", {
constructor: function(r, c) {
B.apply(this);
this.oCore = c;
this.oCurrent = null;
this.oLast = null;
this.aEventQueue = [];
this.fEventHandler = q.proxy(this.onEvent, this);
this.fDestroyHandler = q.proxy(this.destroy, this);
if (r.addEventListener && !!!D.browser.internet_explorer) {
r.addEventListener("focus", this.fEventHandler, true);
r.addEventListener("blur", this.fEventHandler, true)
} else {
q(r).bind("activate", this.fEventHandler);
q(r).bind("deactivate", this.fEventHandler)
}
q.sap.log.debug("FocusHandler setup on Root " + r.type + (r.id ? ": " + r.id : ""), null, "sap.ui.core.FocusHandler");
q(window).bind("unload", {
"oRootRef": r
}, this.fDestroyHandler)
}
});
F.prototype.getCurrentFocusedControlId = function() {
var c = null;
try {
var a = q(document.activeElement);
if (a.is(":focus") || (D.browser.internet_explorer && D.browser.version == 8 && document.hasFocus())) {
c = a.control()
}
} catch (e) {}
return c && c.length > 0 ? c[0].getId() : null
};
F.prototype.destroy = function(e) {
var r = e.data.oRootRef;
if (r) {
if (r.removeEventListener && !!!D.browser.internet_explorer) {
r.removeEventListener("focus", this.fEventHandler, true);
r.removeEventListener("blur", this.fEventHandler, true)
} else {
q(r).unbind("activate", this.fEventHandler);
q(r).unbind("deactivate", this.fEventHandler)
}
}
q(window).unbind("unload", this.fDestroyHandler);
this.oCore = null
};
F.prototype.onEvent = function(b) {
var e = q.event.fix(b);
q.sap.log.debug("Event " + e.type + " reached Focus Handler (target: " + e.target + (e.target ? e.target.id : "") + ")", null, "sap.ui.core.FocusHandler");
var a = (e.type == "focus" || e.type == "focusin" || e.type == "activate") ? "focus" : "blur";
this.aEventQueue.push({
type: a,
controlId: g(e.target)
});
if (this.aEventQueue.length == 1) {
this.processEvent()
}
};
F.prototype.processEvent = function() {
var e = this.aEventQueue[0];
if (!e) {
return
}
try {
if (e.type == "focus") {
this.onfocusEvent(e.controlId)
} else if (e.type == "blur") {
this.onblurEvent(e.controlId)
}
} finally {
this.aEventQueue.shift();
if (this.aEventQueue.length > 0) {
this.processEvent()
}
}
};
F.prototype.onfocusEvent = function(c) {
this.oCurrent = c;
if (!this.oLast) {
return
}
t(this.oLast, c, this.oCore);
this.oLast = null
};
F.prototype.onblurEvent = function(c) {
if (!this.oCurrent) {
return
}
this.oLast = c;
this.oCurrent = null;
q.sap.delayedCall(0, this, "checkForLostFocus")
};
F.prototype.checkForLostFocus = function() {
if (this.oCurrent == null && this.oLast != null) {
t(this.oLast, null, this.oCore)
}
this.oLast = null
};
var g = function(d) {
var i = q(d).closest("[data-sap-ui]").attr("id");
if (i) {
return i
}
return null
};
var t = function(c, r, C) {
var o = c ? sap.ui.getCore().byId(c) : null;
if (o) {
var R = r ? sap.ui.getCore().byId(r) : null;
var e = q.Event("sapfocusleave");
e.target = o.getDomRef();
e.relatedControlId = R ? R.getId() : null;
e.relatedControlFocusInfo = R ? R.getFocusInfo() : null;
var a = o.getUIArea();
var u = null;
if (a) {
u = C.getUIArea(a.getId())
} else {
var p = sap.ui.getCore().getStaticAreaRef();
if (q.sap.containsOrEquals(p, e.target)) {
u = C.getUIArea(p.id)
}
}
if (u) {
u._handleEvent(e)
}
}
};
return F
}, true)
};
if (!jQuery.sap.isDeclared('sap.ui.core.RenderManager')) {
jQuery.sap.declare('sap.ui.core.RenderManager');
if (!jQuery.sap.isDeclared('jquery.sap.encoder')) {
jQuery.sap.declare('jquery.sap.encoder');
sap.ui.define("jquery.sap.encoder", ['jquery.sap.global'], function(q) {
"use strict";
function h(i, l) {
var g = i.toString(16);
if (l) {
while (l > g.length) {
g = "0" + g
}
}
return g
}
var r = /[\x00-\x2b\x2f\x3a-\x40\x5b-\x5e\x60\x7b-\xff\u2028\u2029]/g,
a = /[\x00-\x08\x0b\x0c\x0e-\x1f\x7f-\x9f]/,
H = {
"<": "&lt;",
">": "&gt;",
"&": "&amp;",
"\"": "&quot;"
};
var f = function(g) {
var E = H[g];
if (!E) {
if (a.test(g)) {
E = "&#xfffd;"
} else {
E = "&#x" + h(g.charCodeAt(0)) + ";"
}
H[g] = E
}
return E
};
q.sap.encodeHTML = function(S) {
return S.replace(r, f)
};
q.sap.encodeXML = function(S) {
return S.replace(r, f)
};
q.sap.escapeHTML = function(S) {
return S.replace(r, f)
};
var b = /[\x00-\x2b\x2d\x2f\x3a-\x40\x5b-\x5e\x60\x7b-\xff\u2028\u2029]/g,
j = {};
var J = function(g) {
var E = j[g];
if (!E) {
var i = g.charCodeAt(0);
if (i < 256) {
E = "\\x" + h(i, 2)
} else {
E = "\\u" + h(i, 4)
}
j[g] = E
}
return E
};
q.sap.encodeJS = function(S) {
return S.replace(b, J)
};
q.sap.escapeJS = function(S) {
return S.replace(b, J)
};
var c = /[\x00-\x2c\x2f\x3a-\x40\x5b-\x5e\x60\x7b-\uffff]/g,
u = {};
var U = function(g) {
var E = u[g];
if (!E) {
var i = g.charCodeAt(0);
if (i < 128) {
E = "%" + h(i, 2)
} else if (i < 2048) {
E = "%" + h((i >> 6) | 192, 2) + "%" + h((i & 63) | 128, 2)
} else {
E = "%" + h((i >> 12) | 224, 2) + "%" + h(((i >> 6) & 63) | 128, 2) + "%" + h((i & 63) | 128, 2)
}
u[g] = E
}
return E
};
q.sap.encodeURL = function(S) {
return S.replace(c, U)
};
q.sap.encodeURLParameters = function(p) {
if (!p) {
return ""
}
var g = [];
q.each(p, function(n, v) {
if (q.type(v) === "string") {
v = q.sap.encodeURL(v)
}
g.push(q.sap.encodeURL(n) + "=" + v)
});
return g.join("&")
};
var d = /[\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xff\u2028\u2029][0-9A-Fa-f]?/g;
var C = function(g) {
var i = g.charCodeAt(0);
if (g.length == 1) {
return "\\" + h(i)
} else {
return "\\" + h(i) + " " + g.substr(1)
}
};
q.sap.encodeCSS = function(S) {
return S.replace(d, C)
};
function W(p, g, i, k) {
if (p) {
this.protocol = p.toUpperCase()
}
if (g) {
this.host = g.toUpperCase()
}
this.port = i;
this.path = k
}
var w = new Array();
q.sap.clearUrlWhitelist = function() {
w.splice(0, w.length)
};
q.sap.addUrlWhitelist = function(p, g, i, k) {
var E = new W(p, g, i, k);
var I = w.length;
w[I] = E
};
q.sap.removeUrlWhitelist = function(i) {
w.splice(i, 1)
};
q.sap.getUrlWhitelist = function() {
return w.slice()
};
q.sap.validateUrl = function(g) {
var k = /(?:([^:\/?#]+):)?(?:\/\/([^\/?#:]*)(?::([0-9]+))?)?([^?#]*)(?:\?([^#]*))?(?:#(.*))?/.exec(g);
if (!k) {
return k
}
var p = k[1],
l = k[2],
P = k[3],
m = k[4],
Q = k[5],
n = k[6];
var o = /[\x00-\x24\x26-\x29\x2b\x2c\x2f\x3a-\x40\x5b-\x5e\x60\x7b-\x7d\x7f-\uffff]/;
var t = /[a-z0-9!#$%&'*+\/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+\/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?/;
if (p) {
p = p.toUpperCase();
if (w.length <= 0) {
if (!/^(https?|ftp)/i.test(p)) {
return false
}
}
}
if (l) {
l = l.toUpperCase()
}
if (m) {
if (p === "MAILTO") {
var v = t.test(m);
if (!v) {
return false
}
} else {
var x = m.split("/");
for (var i = 0; i < x.length; i++) {
var v = o.test(x[i]);
if (v) {
return false
}
}
}
}
if (Q) {
var x = Q.split("&");
for (var i = 0; i < x.length; i++) {
var y = x[i].search("=");
if (y != -1) {
var z = x[i].substring(0, y);
var A = x[i].substring(y + 1);
var B = o.test(z);
var D = o.test(A);
if (B || D) {
return false
}
}
}
}
if (n) {
if (o.test(n)) {
return false
}
}
if (w.length > 0) {
var F = false;
for (var i = 0; i < w.length; i++) {
if (!p || !w[i].protocol || p == w[i].protocol) {
var O = false;
if (l && w[i].host && /^\*/.test(w[i].host)) {
var E = w[i].host.slice(1).replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
var G = RegExp(E + "$");
if (G.test(l)) {
O = true
}
} else if (!l || !w[i].host || l == w[i].host) {
O = true
}
if (O) {
if ((!l && !P) || !w[i].port || P == w[i].port) {
if (w[i].path && /\*$/.test(w[i].path)) {
var I = w[i].path.slice(0, -1).replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
var G = RegExp("^" + I);
if (G.test(m)) {
F = true
}
} else if (!w[i].path || m == w[i].path) {
F = true
}
}
}
}
if (F) {
break
}
}
if (!F) {
return false
}
}
return true
};
q.sap._sanitizeHTML = function(g, o) {
return s(g, o || {
uriRewriter: function(i) {
if (q.sap.validateUrl(i)) {
return i
}
}
})
};
q.sap._setHTMLSanitizer = function(s) {
s = s || e
};
function e(g, o) {
if (!window.html || !window.html.sanitize) {
q.sap.require("sap.ui.thirdparty.caja-html-sanitizer");
}
var t = o.tagPolicy || window.html.makeTagPolicy(o.uriRewriter, o.tokenPolicy);
return window.html.sanitizeWithPolicy(g, t)
}
var s = e;
return q
}, false)
};
sap.ui.define("sap/ui/core/RenderManager", ['jquery.sap.global', 'sap/ui/base/Interface', 'sap/ui/base/Object', 'jquery.sap.act', 'jquery.sap.encoder'], function(q, I, B) {
"use strict";
var c = ["renderControl", "write", "writeEscaped", "translate", "writeAcceleratorKey", "writeControlData", "writeElementData", "writeAttribute", "writeAttributeEscaped", "addClass", "writeClasses", "addStyle", "writeStyles", "writeAccessibilityState", "writeIcon", "getConfiguration", "getHTML", "cleanupControlWithoutRendering"];
var N = ["render", "flush", "destroy"];
var R = B.extend("sap.ui.core.RenderManager", {
constructor: function() {
B.apply(this, arguments);
this.aBuffer = [];
this.aRenderedControls = [];
this.aStyleStack = [{}]
},
metadata: {
publicMethods: c.concat(N)
}
});
R.prototype.getRendererInterface = function() {
var i = new I(this, c);
this.getRendererInterface = q.sap.getter(i);
return i
};
R.prototype.destroy = function() {
this.aBuffer = [];
this.aRenderedControls = [];
this.aStyleStack = [{}]
};
R.prototype.getConfiguration = function() {
return sap.ui.getCore().getConfiguration()
};
R.prototype.getRenderer = function(C) {
return R.getRenderer(C)
};
var t = function(r, C) {
r._bLocked = true;
try {
var e = q.Event("BeforeRendering");
e.srcControl = C;
C._handleEvent(e)
} finally {
r._bLocked = false
}
};
R.prototype.cleanupControlWithoutRendering = function(C) {
if (!C || !C.getDomRef()) {
return
}
t(this, C);
C.bOutput = false
};
R.prototype.renderControl = function(C) {
if (!C) {
return
}
if (!this.aRenderStack) {
this.aRenderStack = new Array()
}
if (this.aRenderStack && this.aRenderStack.length > 0) {
q.sap.measure.pause(this.aRenderStack[0] + "---renderControl")
} else if (C.getParent() && C.getParent().getMetadata().getName() == "sap.ui.core.UIArea") {
q.sap.measure.pause(C.getParent().getId() + "---rerender")
}
this.aRenderStack.unshift(C.getId());
q.sap.measure.start(C.getId() + "---renderControl", "Rendering of " + C.getMetadata().getName());
var b = this.aBuffer.length;
var o = {};
if (C.aCustomStyleClasses && C.aCustomStyleClasses.length > 0) {
o.aCustomStyleClasses = C.aCustomStyleClasses
}
this.aStyleStack.push(o);
q.sap.measure.pause(C.getId() + "---renderControl");
var r = this.getRenderer(C);
q.sap.measure.resume(C.getId() + "---renderControl");
t(this, C);
var a = C.aBindParameters;
if (a && a.length > 0) {
var d = q(C.getDomRef());
if (d && d[0]) {
for (var i = 0; i < a.length; i++) {
var p = a[i];
d.unbind(p.sEventType, p.fnProxy)
}
}
}
r.render(this.getRendererInterface(), C);
this.aStyleStack.pop();
this.aRenderedControls.push(C);
if (C.getUIArea && C.getUIArea()) {
C.getUIArea()._onControlRendered(C)
}
C.bOutput = this.aBuffer.length != b;
q.sap.measure.end(C.getId() + "---renderControl");
this.aRenderStack.shift();
if (this.aRenderStack && this.aRenderStack.length > 0) {
q.sap.measure.resume(this.aRenderStack[0] + "---renderControl")
} else if (C.getParent() && C.getParent().getMetadata().getName() == "sap.ui.core.UIArea") {
q.sap.measure.resume(C.getParent().getId() + "---rerender")
}
};
R.prototype.getHTML = function(C) {
var a = this.aBuffer;
var r = this.aBuffer = [];
this.renderControl(C);
this.aBuffer = a;
return r.join("")
};
(function() {
var s = function() {
var C = sap.ui.getCore();
var F = C.getCurrentFocusedControlId(),
o = null,
a = null;
if (F) {
var b = C.getElementById(F);
if (b) {
o = b.getFocusInfo();
a = b.getFocusDomRef()
}
}
return {
focusedControlId: F,
focusInfo: o,
focusDomRef: a
}
};
var f = function(r, a, S) {
for (var i = 0, b = a.length; i < b; i++) {
var C = a[i];
if (C.bOutput) {
r._bLocked = true;
try {
var E = q.Event("AfterRendering");
E.srcControl = C;
q.sap.measure.start(C.getId() + "---AfterRendering", "AfterRendering of " + C.getMetadata().getName());
C._handleEvent(E);
q.sap.measure.end(C.getId() + "---AfterRendering")
} finally {
r._bLocked = false
}
}
}
try {
if (S && S.focusedControlId) {
var F = sap.ui.getCore().getElementById(S.focusedControlId);
if (F && F.getFocusDomRef() != S.focusDomRef) {
F.applyFocusInfo(S.focusInfo)
}
}
} catch (e) {
q.sap.log.warning("Problems while restore focus after rendering: " + e, null, r)
}
for (var i = 0, b = a.length; i < b; i++) {
var C = a[i],
d = C.aBindParameters;
if (d && d.length > 0) {
var D = q(C.getDomRef());
if (D && D[0]) {
for (var j = 0; j < d.length; j++) {
var p = d[j];
D.bind(p.sEventType, p.fnProxy)
}
}
}
}
};
R.prototype.flush = function(T, d, v) {
if (this.bRendererMode) {
q.sap.log.info("Flush must not be called from control renderers. Call ignored.", null, this);
return
}
if (!d && (typeof v !== "number") && !v) {
R.preserveContent(T)
}
var S = s();
var h = R.prepareHTML5(this.aBuffer.join(""));
if (this._fPutIntoDom) {
this._fPutIntoDom(T, h)
} else {
for (var i = 0; i < this.aRenderedControls.length; i++) {
var o = this.aRenderedControls[i].getDomRef();
if (o && !R.isPreservedContent(o)) {
if (R.isInlineTemplate(o)) {
q(o).empty()
} else {
q(o).remove()
}
}
}
if (typeof v === "number") {
if (v <= 0) {
q(T).prepend(h)
} else {
var $ = q(T).children().eq(v - 1);
if ($.length === 1) {
$.after(h)
} else {
q(T).append(h)
}
}
} else if (!v) {
q(T).html(h)
} else {
q(T).append(h)
}
}
f(this, this.aRenderedControls, S);
this.aRenderedControls = [];
this.aBuffer = [];
this.aStyleStack = [{}];
q.sap.act.refresh()
};
R.prototype.render = function(C, T) {
if (this.bRendererMode) {
q.sap.log.info("Render must not be called from control renderers. Call ignored.", null, this);
return
}
if (this._bLocked) {
q.sap.log.error("Render must not be called within Before or After Rendering Phase. Call ignored.", null, this);
return
}
this.aBuffer = [];
this.renderControl(C);
this._fPutIntoDom = function(o, h) {
if (C && T) {
var a = C.getDomRef();
if (R.isPreservedContent(a)) {
a = q.sap.byId("sap-ui-dummy-" + C.getId())[0] || a
}
var n = a && a.parentNode != T;
var A = function() {
var j = q(T);
if (T.innerHTML == "") {
j.html(h)
} else {
j.append(h)
}
};
if (n) {
if (!R.isPreservedContent(a)) {
if (R.isInlineTemplate(a)) {
q(a).empty()
} else {
q(a).remove()
}
}
if (h) {
A()
}
} else {
if (h) {
if (a) {
if (R.isInlineTemplate(a)) {
q(a).html(h)
} else {
q(a).replaceWith(h)
}
} else {
A()
}
} else {
if (R.isInlineTemplate(a)) {
q(a).empty()
} else {
if (!C.getParent() || !C.getParent()._onChildRerenderedEmpty || !C.getParent()._onChildRerenderedEmpty(C, a)) {
q(a).remove()
}
}
}
}
}
};
this.flush(T, true);
this._fPutIntoDom = null
}
}());
R.getRenderer = function(C) {
return C.getMetadata().getRenderer()
};
R.initHTML5Support = function() {
if (!!sap.ui.Device.browser.internet_explorer && (sap.ui.Device.browser.version === 8 || sap.ui.Device.browser.version === 7)) {
var T = ["article", "aside", "audio", "canvas", "command", "datalist", "details", "figcaption", "figure", "footer", "header", "hgroup", "keygen", "mark", "meter", "nav", "output", "progress", "rp", "rt", "ruby", "section", "source", "summary", "template", "time", "video", "wbr"];
for (var i = 0; i < T.length; i++) {
document.createElement(T[i])
}
var r = new RegExp("<(" + T.join("|") + ")(\\s|>)", "i");
var d = null;
R.prepareHTML5 = function(h) {
if (h && h.match(r)) {
if (!d) {
d = document.createElement('div');
d.style.display = 'none'
}
var e = d.cloneNode(true);
var f = document.body || document.createDocumentFragment();
f.appendChild(e);
e.innerHTML = h.replace(/^\s\s*/, '').replace(/\s\s*$/, '');
f.removeChild(e);
return e.childNodes
}
return h
};
q.sap.log.info("IE8 HTML5 support activated")
} else {
q.sap.log.info("no IE8 HTML5 support required");
R.prepareHTML5 = function(h) {
return h
}
}
};
R.forceRepaint = function(d) {
var D = typeof d == "string" ? q.sap.domById(d) : d;
if (D) {
q.sap.log.debug("forcing a repaint for " + (D.id || String(D)));
var o = D.style.display;
var a = document.activeElement;
D.style.display = "none";
D.offsetHeight;
D.style.display = o;
if (document.activeElement !== a) {
q.sap.focus(a)
}
}
};
(function() {
var a = "sap-ui-preserve",
b = "sap-ui-static",
A = "data-sap-ui-preserve",
d = "data-sap-ui-area";
function g() {
var $ = q("#" + a);
if ($.length === 0) {
$ = q("<DIV/>", {
role: "application",
id: a
}).addClass("sapUiHidden").css("width", "0").css("height", "0").css("overflow", "hidden").appendTo(document.body)
}
return $
}
function m(n) {
q("<DIV/>", {
id: "sap-ui-dummy-" + n.id
}).addClass("sapUiHidden").insertBefore(n)
}
R.preserveContent = function(r, p, P) {
sap.ui.getCore().getEventBus().publish("sap.ui", "__preserveContent", {
domNode: r
});
var $ = g();
function f(h) {
if (h.id === a || h.id === b) {
return
}
if (h.hasAttribute(A)) {
if (h === r) {
m(h)
}
$.append(h)
} else if (P && h.id) {
R.markPreservableContent(q(h), h.id);
$.append(h);
return
}
if (!h.hasAttribute(d)) {
var n = h.firstChild;
while (n) {
h = n;
n = n.nextSibling;
if (h.nodeType === 1) {
f(h)
}
}
}
}
q.sap.measure.start(r.id + "---preserveContent", "preserveContent for " + r.id);
if (p) {
f(r)
} else {
q(r).children().each(function(i, n) {
f(n)
})
}
q.sap.measure.end(r.id + "---preserveContent")
};
R.findPreservedContent = function(i) {
var $ = g(),
f = $.children("[" + A + "='" + i.replace(/(:|\.)/g, '\\$1') + "']");
return f
};
R.markPreservableContent = function($, i) {
$.attr(A, i)
};
R.isPreservedContent = function(D) {
return (D && D.getAttribute(A) && D.parentNode && D.parentNode.id == a)
};
R.getPreserveAreaRef = function() {
return g()[0]
};
var e = "data-sap-ui-template";
R.markInlineTemplate = function($) {
$.attr(e, "")
};
R.isInlineTemplate = function(D) {
return (D && D.hasAttribute(e))
}
}());
R.prototype.write = function(T) {
this.aBuffer.push.apply(this.aBuffer, arguments);
return this
};
R.prototype.writeEscaped = function(T, l) {
if (l) {
var L = T.split("\n");
for (var i = 0; i < L.length; i++) {
L[i] = q.sap.encodeHTML(L[i])
}
T = L.join("<br>")
} else {
T = q.sap.encodeHTML(T)
}
this.aBuffer.push(T);
return this
};
R.prototype.translate = function(k) {};
R.prototype.writeAcceleratorKey = function() {
return this
};
R.prototype.addStyle = function(n, v) {
if (v !== undefined && v !== null) {
var s = this.aStyleStack[this.aStyleStack.length - 1];
if (!s.aStyle) {
s.aStyle = []
}
s.aStyle.push(n + ":" + v)
}
return this
};
R.prototype.writeStyles = function() {
var s = this.aStyleStack[this.aStyleStack.length - 1];
if (s.aStyle) {
this.write(" style=\"" + s.aStyle.join(";") + "\" ")
}
s.aStyle = null;
return this
};
R.prototype.addClass = function(n) {
if (n) {
var s = this.aStyleStack[this.aStyleStack.length - 1];
if (!s.aClasses) {
s.aClasses = []
}
s.aClasses.push(n)
}
return this
};
R.prototype.writeClasses = function(e) {
var s = this.aStyleStack[this.aStyleStack.length - 1];
var C = e ? e.aCustomStyleClasses : ((e === false) ? [] : s.aCustomStyleClasses);
if (s.aClasses || C) {
var a = [].concat(s.aClasses || [], C || []);
a.sort();
a = q.map(a, function(n, i) {
return (i == 0 || n != a[i - 1]) ? n : null
});
this.write(" class=\"", a.join(" "), "\" ")
}
if (!e) {
s.aCustomStyleClasses = null
}
s.aClasses = null;
return this
};
R.prototype.writeControlData = function(C) {
this.writeElementData(C);
return this
};
R.prototype.writeElementData = function(e) {
var s = e.getId();
if (s) {
this.writeAttribute("id", s).writeAttribute("data-sap-ui", s)
}
var d = e.getCustomData();
var l = d.length;
for (var i = 0; i < l; i++) {
var D = d[i];
if (D.getWriteToDom()) {
var k = D.getKey();
if (typeof D.getValue() === "string") {
if ((sap.ui.core.ID.isValid(k)) && (k.indexOf(":") == -1) && (k.indexOf("sap-ui") !== 0)) {
this.writeAttributeEscaped("data-" + k, D.getValue())
} else {
q.sap.log.error("CustomData with key " + k + " should be written to HTML of " + this + " but the key is not valid (must be a valid sap.ui.core.ID without any colon and may not start with 'sap-ui').")
}
} else {
q.sap.log.error("CustomData with key " + k + " should be written to HTML of " + this + " but the value is not a string.")
}
}
}
return this
};
R.prototype.writeAttribute = function(n, v) {
this.write(" ", n, "=\"", v, "\"");
return this
};
R.prototype.writeAttributeEscaped = function(n, v) {
this.writeAttribute(n, q.sap.escapeHTML(String(v)));
return this
};
R.prototype.writeAccessibilityState = function(e, P) {
if (!sap.ui.getCore().getConfiguration().getAccessibility()) {
return this
}
if (arguments.length == 1 && !(e instanceof sap.ui.core.Element)) {
P = e;
e = null
}
var a = {};
if (e != null) {
var m = e.getMetadata();
m._enrichChildInfos();
var b = function(E, A, v) {
var o = m.getAllProperties()[E];
if (o && e[o._sGetter]() === v) {
a[A] = "true"
}
};
var d = function(E, A) {
var o = m.getAllAssociations()[E];
if (o && o.multiple) {
var k = e[o._sGetter]();
if (k.length > 0) {
a[A] = k.join(" ")
}
}
};
b("editable", "readonly", false);
b("enabled", "disabled", false);
b("visible", "hidden", false);
b("required", "required", true);
b("selected", "selected", true);
b("checked", "checked", true);
d("ariaDescribedBy", "describedby");
d("ariaLabelledBy", "labelledby")
}
if (P) {
var f = function(v) {
var i = typeof(v);
return v === null || v === "" || i === "number" || i === "string" || i === "boolean"
};
var g = {};
var x, h, i, j;
for (x in P) {
h = P[x];
if (f(h)) {
g[x] = h
} else if (typeof(h) === "object" && f(h.value)) {
j = "";
if (h.append && (x === "describedby" || x === "labelledby")) {
j = a[x] ? a[x] + " " : ""
}
g[x] = j + h.value
}
}
q.extend(a, g)
}
if (e instanceof sap.ui.core.Element && e.getParent() && e.getParent().enhanceAccessibilityState) {
e.getParent().enhanceAccessibilityState(e, a)
}
for (var p in a) {
if (a[p] != null && a[p] !== "") {
this.writeAttributeEscaped(p === "role" ? p : "aria-" + p, a[p])
}
}
return this
};
R.prototype.writeIcon = function(u, C, a) {
q.sap.require("sap.ui.core.IconPool");
var i = sap.ui.core.IconPool.isIconURI(u),
s = i ? "<span " : "<img ",
T = (sap.ui.Device.browser.internet_explorer && sap.ui.Device.browser.version < 9),
b, p, o;
if (typeof C === "string") {
C = [C]
}
if (i) {
o = sap.ui.core.IconPool.getIconInfo(u);
if (!o) {
q.sap.log.error("An unregistered icon: " + u + " is used in sap.ui.core.RenderManager's writeIcon method.");
return
}
if (!C) {
C = []
}
C.push("sapUiIcon");
if (!o.suppressMirroring) {
C.push("sapUiIconMirrorInRTL")
}
}
this.write(s);
if (q.isArray(C) && C.length) {
b = C.join(" ");
this.write("class=\"" + b + "\" ")
}
if (i) {
if (!a) {
a = {}
}
if (!T) {
a["data-sap-ui-icon-content"] = o.content
}
this.write("style=\"font-family: " + o.fontFamily + ";\" ")
} else {
a = q.extend({
role: "presentation",
alt: "",
src: u
}, a)
}
if (typeof a === "object") {
for (p in a) {
if (a.hasOwnProperty(p)) {
this.writeAttributeEscaped(p, a[p])
}
}
}
this.write(i ? ">" : "/>");
if (i) {
T && this.write(o.content);
this.write("</span>")
}
};
return R
}, true)
};
if (!jQuery.sap.isDeclared('sap.ui.core.ResizeHandler')) {
jQuery.sap.declare('sap.ui.core.ResizeHandler');
sap.ui.define("sap/ui/core/ResizeHandler", ['jquery.sap.global', 'sap/ui/Global', 'sap/ui/base/Object', 'jquery.sap.act', 'jquery.sap.script'], function(q, G, B) {
"use strict";
var l = q.sap.log.getLogger("sap.ui.core.ResizeHandler", q.sap.log.Level.ERROR);
var c = null;
var R = B.extend("sap.ui.core.ResizeHandler", {
constructor: function(C) {
B.apply(this);
c = C;
this.aResizeListeners = [];
this.bRegistered = false;
this.iIdCounter = 0;
this.fDestroyHandler = q.proxy(this.destroy, this);
q(window).bind("unload", this.fDestroyHandler);
q.sap.act.attachActivate(i, this)
}
});
function a() {
if (this.bRegistered) {
this.bRegistered = false;
sap.ui.getCore().detachIntervalTimer(this.checkSizes, this)
}
};
function i() {
if (!this.bRegistered && this.aResizeListeners.length > 0) {
this.bRegistered = true;
sap.ui.getCore().attachIntervalTimer(this.checkSizes, this)
}
};
R.prototype.destroy = function(e) {
q.sap.act.detachActivate(i, this);
q(window).unbind("unload", this.fDestroyHandler);
c = null;
this.aResizeListeners = [];
a.apply(this)
};
R.prototype.attachListener = function(r, h) {
var I = r instanceof sap.ui.core.Control,
d = I ? r.getDomRef() : r,
w = d ? d.offsetWidth : 0,
H = d ? d.offsetHeight : 0,
s = "rs-" + new Date().valueOf() + "-" + this.iIdCounter++,
b = (I ? ("Control " + r.getId()) : (r.id ? r.id : String(r)));
this.aResizeListeners.push({
sId: s,
oDomRef: I ? null : r,
oControl: I ? r : null,
fHandler: h,
iWidth: w,
iHeight: H,
dbg: b
});
l.debug("registered " + b);
i.apply(this);
return s
};
R.prototype.detachListener = function(I) {
var t = this;
q.each(this.aResizeListeners, function(b, r) {
if (r.sId == I) {
t.aResizeListeners.splice(b, 1);
l.debug("deregistered " + I);
return false
}
});
if (this.aResizeListeners.length == 0) {
a.apply(this)
}
};
R.prototype.checkSizes = function() {
var d = l.isLoggable();
if (d) {
l.debug("checkSizes:")
}
q.each(this.aResizeListeners, function(b, r) {
if (r) {
var C = !!r.oControl,
D = C ? r.oControl.getDomRef() : r.oDomRef;
if (D && q.contains(document.documentElement, D)) {
var o = r.iWidth,
O = r.iHeight,
n = D.offsetWidth,
N = D.offsetHeight;
if (o != n || O != N) {
r.iWidth = n;
r.iHeight = N;
var e = q.Event("resize");
e.target = D;
e.currentTarget = D;
e.size = {
width: n,
height: N
};
e.oldSize = {
width: o,
height: O
};
e.control = C ? r.oControl : null;
if (d) {
l.debug("resize detected for '" + r.dbg + "': " + e.oldSize.width + "x" + e.oldSize.height + " -> " + e.size.width + "x" + e.size.height)
}
r.fHandler(e)
}
}
}
});
if (R._keepActive != true && R._keepActive != false) {
R._keepActive = false
}
if (!q.sap.act.isActive() && !R._keepActive) {
a.apply(this)
}
};
R.register = function(r, h) {
if (!c || !c.oResizeHandler) {
return null
}
return c.oResizeHandler.attachListener(r, h)
};
R.deregister = function(I) {
if (!c || !c.oResizeHandler) {
return
}
c.oResizeHandler.detachListener(I)
};
R.deregisterAllForControl = function(C) {
if (!c || !c.oResizeHandler) {
return
}
var I = [];
q.each(c.oResizeHandler.aResizeListeners, function(b, r) {
if (r && r.oControl && r.oControl.getId() === C) {
I.push(r.sId)
}
});
q.each(I, function(b, s) {
R.deregister(s)
})
};
return R
}, true)
};
if (!jQuery.sap.isDeclared('sap.ui.core.ThemeCheck')) {
jQuery.sap.declare('sap.ui.core.ThemeCheck');
sap.ui.define("sap/ui/core/ThemeCheck", ['jquery.sap.global', 'sap/ui/Device', 'sap/ui/base/Object', 'jquery.sap.script'], function(q, D, B) {
"use strict";
sap.ui._maxThemeCheckCycles = 100;
var T = B.extend("sap.ui.core.ThemeCheck", {
constructor: function(C) {
this._oCore = C;
this._iCount = 0;
this._CUSTOMCSSCHECK = /\.sapUiThemeDesignerCustomCss/i;
this._CUSTOMID = "sap-ui-core-customcss";
this._customCSSAdded = false;
this._themeCheckedForCustom = null;
this._mAdditionalLibCss = {}
},
getInterface: function() {
return this
},
fireThemeChangedEvent: function(o, f) {
c(this);
var u = sap.ui._maxThemeCheckCycles > 0;
if (u || f) {
d.apply(this, [true])
} else {
T.themeLoaded = true
}
if (!o && !this._sThemeCheckId) {
this._oCore.fireThemeChanged({
theme: this._oCore.getConfiguration().getTheme()
})
}
}
});
T.themeLoaded = false;
T.checkStyle = function(s, l) {
if (typeof(s) === "string") {
s = q.sap.domById(s)
}
var S = q(s);
try {
var r = !s || !!((s.sheet && s.sheet.cssRules.length > 0) || !!(s.styleSheet && s.styleSheet.cssText.length > 0) || !!(s.innerHTML && s.innerHTML.length > 0));
var f = S.attr("sap-ui-ready");
f = !!(f === "true" || f === "false");
if (l) {
q.sap.log.debug("ThemeCheck: Check styles '" + S.attr("id") + "': " + r + "/" + f + "/" + !!s)
}
return r || f
} catch (e) {}
if (l) {
q.sap.log.debug("ThemeCheck: Error during check styles '" + S.attr("id") + "': false/false/" + !!s)
}
return false
};
function c(t) {
T.themeLoaded = false;
if (t._sThemeCheckId) {
q.sap.clearDelayedCall(t._sThemeCheckId);
t._sThemeCheckId = null;
t._iCount = 0;
t._mAdditionalLibCss = {}
}
}
function a(t) {
var l = t._oCore.getLoadedLibraries();
var s = t._oCore.getConfiguration().getTheme();
var p = t._oCore._getThemePath("sap.ui.core", s) + "custom.css";
var r = true;
if (!!t._customCSSAdded && t._themeCheckedForCustom === s) {
l[t._CUSTOMID] = {}
}
function e(f) {
r = r && T.checkStyle("sap-ui-theme-" + f, true);
if (!!r) {
if (D.browser.msie && D.browser.version <= 9) {
var S = q.sap.domById("sap-ui-theme-" + f);
var R = S && S.sheet && S.sheet.rules && S.sheet.rules.length ? S.sheet.rules.length : 0;
if (R === 4095) {
var n = parseInt(q(S).attr("sap-ui-css-count"), 10);
if (isNaN(n)) {
n = 1
} else {
n += 1
}
var A = "ie9_" + n;
var g = this.name + "-" + A;
var L = "sap-ui-theme-" + g;
if (!t._mAdditionalLibCss[g] && !q.sap.domById(L)) {
t._mAdditionalLibCss[g] = {
name: this.name
};
var o;
if (f !== this.name) {
o = q.sap.domById("sap-ui-theme-" + this.name)
} else {
o = S
}
var h = new URI(o.getAttribute("href"));
var i = h.suffix();
var F = h.filename();
if (i.length > 0) {
i = "." + i;
F = F.slice(0, -i.length)
}
h.filename(F + "_" + A + i);
var H = h.toString();
var j = document.createElement("link");
j.type = "text/css";
j.rel = "stylesheet";
j.href = H;
j.id = L;
q(j).attr("sap-ui-css-count", n).load(function() {
q(j).attr("sap-ui-ready", "true")
}).error(function() {
q(j).attr("sap-ui-ready", "false")
});
S.parentNode.insertBefore(j, S.nextSibling)
}
}
}
if (t._themeCheckedForCustom != s) {
if (b(t, f)) {
q.sap.includeStyleSheet(p, t._CUSTOMID);
t._customCSSAdded = true;
q.sap.log.warning("ThemeCheck delivered custom CSS needs to be loaded, Theme not yet applied");
t._themeCheckedForCustom = s;
r = false;
return false
} else {
var k = q("LINK[id='" + t._CUSTOMID + "']");
if (k.length > 0) {
k.remove();
q.sap.log.debug("Custom CSS removed")
}
t._customCSSAdded = false
}
}
}
}
q.each(l, e);
q.each(t._mAdditionalLibCss, e);
if (!r) {
q.sap.log.warning("ThemeCheck: Theme not yet applied.")
} else {
t._themeCheckedForCustom = s
}
return r
}
function b(t, l) {
var r = 2,
s = false,
R = Array();
if (q.sap.domById("sap-ui-theme-" + l)) {
var e = q.sap.domById("sap-ui-theme-" + l);
if (e.sheet) {
R = e.sheet.cssRules
} else if (e.styleSheet) {
R = e.styleSheet.rules
}
}
if (R.length == 0) {
q.sap.log.warning("Custom check: Failed retrieving a CSS rule from stylesheet " + l);
return false
}
for (var i = 0;
(i < r && i < R.length); i++) {
if (t._CUSTOMCSSCHECK.test(R[i].selectorText)) {
s = true
}
}
return s
}
function d(f) {
this._iCount++;
var e = this._iCount > sap.ui._maxThemeCheckCycles;
if (!a(this) && !e) {
this._sThemeCheckId = q.sap.delayedCall(2, this, d)
} else if (!f) {
c(this);
T.themeLoaded = true;
this._oCore.fireThemeChanged({
theme: this._oCore.getConfiguration().getTheme()
});
if (e) {
q.sap.log.warning("ThemeCheck: max. check cycles reached.")
}
} else {
T.themeLoaded = true
}
}
return T
}, true)
};
if (!jQuery.sap.isDeclared('sap.ui.core.UIArea')) {
jQuery.sap.declare('sap.ui.core.UIArea');
if (!jQuery.sap.isDeclared('jquery.sap.ui')) {
jQuery.sap.declare('jquery.sap.ui');
sap.ui.define("jquery.sap.ui", ['jquery.sap.global', 'sap/ui/Global'], function(q, G) {
"use strict";
if (!q.sap) {
throw "Initialisation of jQuery.sap.ui failed. jQuery.sap plugin required!"
}
if (!window.sap || !window.sap.ui) {
q.sap.fatal("Initialisation of jQuery.sap.ui failed. Global SAP UI namespace required!")
}
if (q.sap.ui) {
return
}
function u(i) {
return sap.ui.getCore().getUIArea(this.id) != null
}
function f(i, o) {
return sap.ui.getCore().getUIArea(this.id)
}
function a(c, i) {
return c.getUIArea().getInterface()
}
q.fn.root = function(r) {
var t;
if (r) {
sap.ui.getCore().setRoot(this.get(0), r);
return this
}
var c = this.control();
if (c.length > 0) {
return q.map(c, a)
}
var U = this.uiarea();
if (U.length > 0) {
return U
}
this.each(function(i) {
sap.ui.getCore().createUIArea(this)
});
return this
};
q.fn.uiarea = function(i) {
var U = this.slice("[id]").filter(u).map(f).get();
return typeof(i) === "number" ? U[i] : U
};
function b() {
if (!this || !this.nodeType || this.nodeType === 9) {
return null
}
try {
var i = q(this).closest("[data-sap-ui]").attr("id");
return i ? sap.ui.getCore().byId(i) : null
} catch (e) {
return null
}
}
q.fn.control = function(i) {
var c = this.map(b);
if (i === undefined || isNaN(i)) {
return c.get()
} else {
return c.get(i)
}
};
q.fn.sapui = function(c, i, C) {
return this.each(function() {
var o = null;
if (this) {
if (c.indexOf(".") == -1) {
c = "sap.ui.commons." + c
}
var d = q.sap.getObject(c);
if (d) {
if (typeof C == 'object' && typeof C.press == 'function') {
C.press = q.proxy(C.press, this)
}
o = new(d)(i, C);
o.placeAt(this)
}
}
})
};
return q
}, false)
};
sap.ui.define("sap/ui/core/UIArea", ['jquery.sap.global', 'sap/ui/base/ManagedObject', './Element', 'jquery.sap.act', 'jquery.sap.ui'], function(q, M, E) {
"use strict";
var r = q.sap.log.getLogger("sap.ui.Rendering", ((window["sap-ui-config"] && window["sap-ui-config"]["xx-debugRendering"]) || /sap-ui-xx-debug(R|-r)endering=(true|x|X)/.test(document.location.search)) ? q.sap.log.Level.DEBUG : Math.min(q.sap.log.Level.INFO, q.sap.log.getLevel())),
d = function(c) {
return c
},
D = q.noop,
f = q.noop;
if (r.isLoggable()) {
d = function(c) {
var l;
try {
throw new Error()
} catch (e) {
l = e.stack || e.stacktrace || (e.sourceURL ? e.sourceURL + ":" + e.line : null);
l = l ? l.split(/\n\s*/g).slice(2) : undefined
}
return {
obj: c,
location: l
}
};
D = function(t, c) {
var C = sap.ui.getCore(),
R = {},
n, o;
for (n in c) {
o = C.byId(n);
R[n] = {
type: o ? o.getMetadata().getName() : (c[n].obj === t ? "UIArea" : "(no such control)"),
location: c[n].location,
reason: c[n].reason
}
}
r.debug(" UIArea '" + t.getId() + "', pending updates: " + JSON.stringify(R, null, "\t"))
};
f = function(b, a) {
var n;
for (n in a) {
if (b[n] != null) {
if (b[n].obj !== a[n].obj) {
a[n].reason = "replaced during rendering"
} else {
a[n].reason = "invalidated again during rendering"
}
} else {
a[n].reason = "invalidated during rendering"
}
}
}
}
var U = M.extend("sap.ui.core.UIArea", {
constructor: function(c, R) {
if (arguments.length === 0) {
return
}
M.apply(this);
this.oCore = c;
this.bLocked = false;
this.bInitial = true;
this.aContentToRemove = [];
this.bNeedsRerendering = false;
if (R != null) {
this.setRootNode(R);
this.bNeedsRerendering = this.bNeedsRerendering && !q.sap.domById(R.id + "-Init")
}
this.mInvalidatedControls = {};
if (!this.bNeedsRerendering) {
this.bRenderSelf = false
} else {
this.oCore.addInvalidatedUIArea(this)
}
},
metadata: {
publicMethods: ["setRootNode", "getRootNode", "setRootControl", "getRootControl", "lock", "unlock", "isLocked"],
aggregations: {
content: {
name: "content",
type: "sap.ui.core.Control",
multiple: true,
singularName: "content"
},
dependents: {
name: "dependents",
type: "sap.ui.core.Control",
multiple: true
}
}
}
});
U.prototype.isInvalidateSuppressed = function() {
return this.iSuppressInvalidate > 0
};
U.prototype.getId = function() {
return this.oRootNode ? this.oRootNode.id : null
};
U.prototype.getUIArea = function() {
return this
};
U.prototype.setRootNode = function(R) {
if (this.oRootNode === R) {
return
}
if (this.oRootNode) {
this._ondetach()
}
this.oRootNode = R;
if (this.getContent().length > 0) {
this.invalidate()
}
if (this.oRootNode) {
this._onattach()
}
};
U.prototype.getRootNode = function() {
return this.oRootNode
};
U.prototype.setRootControl = function(R) {
this.removeAllContent();
this.addContent(R)
};
U.prototype.getRootControl = function(i) {
var c = this.getContent();
if (c.length > 0) {
if (i >= 0 && i < c.length) {
return c[i]
}
return c[0]
}
return null
};
U.prototype._addRemovedContent = function(o) {
if (this.oRootNode && o) {
this.aContentToRemove.push(o)
}
};
U.prototype.addContent = function(c, _) {
this.addAggregation("content", c, _);
if (_ !== true) {
this.invalidate()
}
return this
};
U.prototype.removeContent = function(c, _) {
var C = this.removeAggregation("content", c, _);
if (!_) {
var o;
if (C && C.getDomRef) {
o = C.getDomRef()
}
this._addRemovedContent(o)
}
return C
};
U.prototype.removeAllContent = function() {
var c = this.removeAllAggregation("content");
for (var i = 0; i < c.length; i++) {
var o;
var C = c[i];
if (C && C.getDomRef) {
o = C.getDomRef()
}
this._addRemovedContent(o)
}
return c
};
U.prototype.destroyContent = function() {
var c = this.getContent();
for (var i = 0; i < c.length; i++) {
var o;
var C = c[i];
if (C && C.getDomRef) {
o = C.getDomRef()
}
this._addRemovedContent(o)
}
this.destroyAggregation("content");
return this
};
U.prototype.lock = function() {
this.bLocked = true
};
U.prototype.unlock = function() {
if (this.bLocked && this.bNeedsRerendering) {
this.oCore.addInvalidatedUIArea(this)
}
this.bLocked = false
};
U.prototype.isLocked = function() {
return this.bLocked
};
U.prototype.getBindingContext = function() {
return null
};
U.prototype.getEventingParent = function() {
return this.oCore
};
U.prototype.isActive = function() {
return q.sap.domById(this.getId()) != null
};
U.prototype.invalidate = function() {
this.addInvalidatedControl(this)
};
U.prototype.addInvalidatedControl = function(c) {
if (this.bRenderSelf) {
return
}
if (!this.bNeedsRerendering) {
this.oCore.addInvalidatedUIArea(this)
}
var i = c.getId();
if (c === this) {
this.bRenderSelf = true;
this.bNeedsRerendering = true;
this.mInvalidatedControls = {};
this.mInvalidatedControls[i] = d(this);
return
}
if (this.mInvalidatedControls[i]) {
return
}
if (!this.bRenderSelf) {
this.mInvalidatedControls[i] = d(c);
this.bNeedsRerendering = true
}
};
U.prototype.rerender = function(a) {
var t = this;
function c() {
t.bRenderSelf = false;
t.aContentToRemove = [];
t.mInvalidatedControls = {};
t.bNeedsRerendering = false
}
if (a) {
this.bNeedsRerendering = true
}
if (this.bLocked || !this.bNeedsRerendering) {
return false
}
var R = this.bRenderSelf,
C = this.aContentToRemove,
I = this.mInvalidatedControls,
u = false;
c();
q.sap.measure.pause("renderPendingUIUpdates");
q.sap.measure.start(this.getId() + "---rerender", "Rerendering of " + this.getMetadata().getName());
D(this, I);
if (R) {
if (this.oRootNode) {
r.debug("Full Rendering of UIArea '" + this.getId() + "'");
sap.ui.core.RenderManager.preserveContent(this.oRootNode, false, this.bInitial);
this.bInitial = false;
var b = function(h, j) {
var l = h.length;
var k;
for (var i = 0; i < l; i++) {
k = j ? h[i].getDomRef() : h[i];
if (k && !sap.ui.core.RenderManager.isPreservedContent(k) && t.oRootNode === k.parentNode) {
q(k).remove()
}
}
return l
};
b(C);
var e = this.getContent();
var l = b(e, true);
for (var i = 0; i < l; i++) {
this.oCore.oRenderManager.render(e[i], this.oRootNode, true)
}
u = true
} else {
r.debug("Full Rendering of UIArea '" + this.getId() + "' postponed, no root node")
}
} else {
var g = function(A) {
while (A && A !== t) {
if (I.hasOwnProperty(A.getId())) {
return true
}
if (A && A.getMetadata && A.getMetadata().isInstanceOf("sap.ui.core.PopupInterface")) {
break
}
A = A.getParent()
}
return false
};
for (var n in I) {
var o = this.oCore.byId(n);
if (o && !g(o.getParent())) {
o.rerender();
u = true
}
}
}
f(I, this.mInvalidatedControls);
q.sap.measure.end(this.getId() + "---rerender");
q.sap.measure.resume("renderPendingUIUpdates");
return u
};
U.prototype._onControlRendered = function(c) {
var i = c.getId();
if (this.mInvalidatedControls[i]) {
delete this.mInvalidatedControls[i]
}
};
U.rerenderControl = function(c) {
var o = c ? c.getDomRef() : null;
var p = o && o.parentNode;
if (p) {
var u = c.getUIArea();
var a = u ? u.oCore.oRenderManager : sap.ui.getCore().createRenderManager();
r.debug("Rerender Control '" + c.getId() + "'" + (u ? "" : " (using a temp. RenderManager)"));
sap.ui.core.RenderManager.preserveContent(o, true, false);
a.render(c, p)
} else {
var u = c.getUIArea();
u && u._onControlRendered(c);
r.warning("Couldn't rerender '" + c.getId() + "', as its DOM location couldn't be determined")
}
};
U.prototype._handleEvent = function(e) {
var o = null;
o = q(e.target).control(0);
q.sap.act.refresh();
if (o === null) {
return
}
if (e.isMarked("delayedMouseEvent")) {
return
}
if (e.isMarked("handledByUIArea")) {
e.setMark("firstUIArea", false);
return
}
e.setMarked("firstUIArea");
e.srcControl = o;
if (e.type === "contextmenu" && e.shiftKey && e.altKey && !!(e.metaKey || e.ctrlKey)) {
q.sap.log.info("Suppressed forwarding the contextmenu event as control event because CTRL+SHIFT+ALT is pressed!");
return
}
this.oCore._handleControlEvent(e, this.getId());
if (this.bLocked || this.oCore.isLocked()) {
return
}
var a = [];
if (e.getPseudoTypes) {
a = e.getPseudoTypes()
}
a.push(e.type);
while (o && o instanceof E && o.isActive() && !e.isPropagationStopped()) {
for (var i = 0, b = a.length; i < b; i++) {
var t = a[i];
e.type = t;
e.currentTarget = o.getDomRef();
o._handleEvent(e);
if (e.isImmediatePropagationStopped()) {
break
}
}
if (e.isPropagationStopped()) {
break
}
if (o.bStopEventBubbling) {
break
}
var c = o.getDomRef();
if (!c) {
break
}
c = c.parentNode;
o = null;
if (e.isMarked("fromMouseout") && q.sap.containsOrEquals(c, e.relatedTarget)) {
break
}
while (c && c !== this.getRootNode()) {
if (c.id) {
o = q(c).control(0);
if (o) {
break
}
}
c = c.parentNode
}
}
e.currentTarget = this.getRootNode();
(e.originalEvent || e)._sapui_handledByUIArea = true;
if (e.isPropagationStopped()) {
q.sap.log.debug("'" + e.type + "' propagation has been stopped")
}
var n = e.type;
if (n != "mousemove" && n != "mouseover" && n != "scroll" && n != "mouseout") {
var g = q(e.target).control(0);
if (g) {
q.sap.log.debug("Event fired: '" + e.type + "' on " + g, "", "sap.ui.core.UIArea")
} else {
q.sap.log.debug("Event fired: '" + e.type + "'", "", "sap.ui.core.UIArea")
}
}
};
U.prototype._onattach = function() {
var o = this.getRootNode();
if (o == null) {
return
}
q(o).attr("data-sap-ui-area", o.id).bind(q.sap.ControlEvents.join(" "), q.proxy(this._handleEvent, this))
};
U.prototype._ondetach = function() {
var o = this.getRootNode();
if (o == null) {
return
}
q(o).removeAttr("data-sap-ui-area").unbind()
};
U.prototype.clone = function() {
throw new Error("UIArea can't be cloned")
};
U._oRenderLog = r;
return U
}, true)
};
if (!jQuery.sap.isDeclared('sap.ui.core.tmpl.Template')) {
jQuery.sap.declare('sap.ui.core.tmpl.Template');
sap.ui.define("sap/ui/core/tmpl/Template", ['jquery.sap.global', 'sap/ui/base/ManagedObject'], function(q, M) {
"use strict";
var T = M.extend("sap.ui.core.tmpl.Template", {
constructor: function(i, s) {
M.apply(this, arguments)
},
metadata: {
stereotype: "template",
"abstract": true,
properties: {
"content": {
type: "string",
group: "Data",
defaultValue: null
}
},
publicMethods: ["declareControl", "createControl", "placeAt", "createMetadata", "createRenderer"],
library: "sap.ui.core"
}
});
T.prototype.getInterface = function() {
return this
};
T._mSupportedTypes = {};
T.registerType = function(t, c) {
T._mSupportedTypes[t] = c
};
T.unregisterType = function(t) {
delete T._mSupportedTypes[t]
};
T.parsePath = function(p) {
var m = undefined,
s = p.indexOf(">");
if (s > 0) {
m = p.substr(0, s);
p = p.substr(s + 1)
}
return {
path: p,
model: m
}
};
T.prototype.init = function(s, S) {
if (this.getMetadata().getName() === "sap.ui.core.tmpl.Template") {
throw new Error("The class 'sap.ui.core.tmpl.Template' is abstract and must not be instantiated!")
}
if (M.bindingParser === sap.ui.base.BindingParser.complexParser) {
T.prototype.extractBindingInfo = function(v, i, S) {
M.bindingParser = sap.ui.base.BindingParser.simpleParser;
var r = sap.ui.core.Control.prototype.extractBindingInfo.apply(this, arguments);
M.bindingParser = sap.ui.base.BindingParser.complexParser;
return r
}
}
};
T.prototype.declareControl = function(c) {
if (c) {
var m = this.createMetadata(),
r = this.createRenderer(),
t = this;
q.sap.require("sap.ui.core.tmpl.TemplateControl");
sap.ui.core.tmpl.TemplateControl.extend(c, {
metadata: m,
init: function() {
sap.ui.core.tmpl.TemplateControl.prototype.init.apply(this, arguments);
this.setTemplate(t)
},
renderer: {
renderTemplate: r,
hasControlData: m._hasControlData
}
});
return q.sap.getObject(c)
}
};
T.prototype.createControl = function(i, c, v) {
q.sap.require("sap.ui.core.tmpl.TemplateControl");
var C = new sap.ui.core.tmpl.TemplateControl({
id: i,
template: this,
context: c
});
C.setTemplateRenderer(this.createRenderer(v));
return C
};
T.prototype.placeAt = function(r, c, p, i) {
if (typeof c === "string" || typeof c === "number") {
p = c;
c = undefined
}
var I;
if (!(r instanceof sap.ui.core.Control) && i) {
var $ = typeof r === "string" ? q.sap.byId(r) : q(r);
if ($.length > 0) {
I = $.attr("id");
r = $.get(0);
var C = $.attr("data-context");
c = c || C && q.parseJSON(C);
sap.ui.core.RenderManager.markInlineTemplate($)
}
}
var o = this.createControl(I, c);
o.placeAt(r, p);
return o
};
T.prototype.createMetadata = function() {
q.sap.log.error("The function createMetadata is an abstract function which needs to be implemented by subclasses.")
};
T.prototype.createRenderer = function() {
q.sap.log.error("The function createRenderer is an abstract function which needs to be implemented by subclasses.")
};
sap.ui.template = function(t) {
if (!t) {
var a = [];
q.each(T._mSupportedTypes, function(s, j) {
q("script[type='" + s + "'], [data-type='" + s + "']").each(function(m, E) {
a.push(sap.ui.template({
id: E.id,
domref: E,
type: s,
_class: j
}))
})
});
return a
} else {
if (typeof t === "string") {
return sap.ui.template({
id: t
})
} else if (t && t.tagName && t.nodeName && t.ownerDocument && t.nodeType === 1) {
return sap.ui.template({
id: t.id,
domref: t
})
}
t = q.extend({
type: T.DEFAULT_TEMPLATE
}, t);
var i, s, c, C, r, b = false,
l = typeof t.src === "string";
if (l) {
var R = q.sap.sjax({
url: t.src,
dataType: "text"
});
if (R.success) {
i = t.id, s = t.type, c = t.control, C = R.data;
var d = /^<!--\sUI5:Template\stype=([a-z\/\-]*)\s(?:controller=([A-Za-z.]*)\s)?-->/,
e = C.match(d);
if (e) {
s = e[1];
if (e.length == 3) {
b = e[2]
}
C = C.substr(e[0].length)
}
} else {
throw new Error("The template could not be loaded from " + t.src + "!")
}
} else {
var E = t.domref || q.sap.domById(t.id),
$ = q(E),
I = false;
i = t.id || E && E.id;
s = $.attr("type") || t.type, c = $.attr("data-control") || t.control;
if (i) {
var f = sap.ui.getCore().getTemplate(i);
if (!f instanceof T) {
throw new Error("Object for id \"" + i + "\" is no sap.ui.core.tmpl.Template!")
} else {
if (f) {
return f
}
}
}
if ($.length === 0) {
throw new Error("DOM element for the Template with the id \"" + i + "\" not found!")
}
C = $.html();
var g = /path="(\w|\/|&gt;)+"/i;
if (g.test(C)) {
C = C.replace("&gt;", ">")
}
var h = E.tagName.toLowerCase();
if (h !== "script") {
I = $.parents("body").length === 1
}
}
var j = t._class;
if (!j) {
j = T._mSupportedTypes[s];
if (!j) {
throw new Error("The type \"" + s + "\" is not supported.")
}
}
q.sap.require(j);
var o = q.sap.getObject(j);
var k = new o({
id: i,
content: C
});
if (c) {
k.declareControl(c)
}
if (b) {
k._sControllerName = b
}
if (I) {
k.placeAt(i, t.context, undefined, true)
}
return k
}
};
T.DEFAULT_TEMPLATE = "text/x-handlebars-template";
T.registerType(T.DEFAULT_TEMPLATE, "sap.ui.core.tmpl.HandlebarsTemplate");
return T
}, true)
};
if (!jQuery.sap.isDeclared('jquery.sap.events')) {
jQuery.sap.declare('jquery.sap.events');
if (!jQuery.sap.isDeclared('jquery.sap.keycodes')) {
jQuery.sap.declare('jquery.sap.keycodes');
sap.ui.define("jquery.sap.keycodes", ['jquery.sap.global'], function(q) {
"use strict";
q.sap.KeyCodes = {
BACKSPACE: 8,
TAB: 9,
ENTER: 13,
SHIFT: 16,
CONTROL: 17,
ALT: 18,
BREAK: 19,
CAPS_LOCK: 20,
ESCAPE: 27,
SPACE: 32,
PAGE_UP: 33,
PAGE_DOWN: 34,
END: 35,
HOME: 36,
ARROW_LEFT: 37,
ARROW_UP: 38,
ARROW_RIGHT: 39,
ARROW_DOWN: 40,
PRINT: 44,
INSERT: 45,
DELETE: 46,
DIGIT_0: 48,
DIGIT_1: 49,
DIGIT_2: 50,
DIGIT_3: 51,
DIGIT_4: 52,
DIGIT_5: 53,
DIGIT_6: 54,
DIGIT_7: 55,
DIGIT_8: 56,
DIGIT_9: 57,
A: 65,
B: 66,
C: 67,
D: 68,
E: 69,
F: 70,
G: 71,
H: 72,
I: 73,
J: 74,
K: 75,
L: 76,
M: 77,
N: 78,
O: 79,
P: 80,
Q: 81,
R: 82,
S: 83,
T: 84,
U: 85,
V: 86,
W: 87,
X: 88,
Y: 89,
Z: 90,
WINDOWS: 91,
CONTEXT_MENU: 93,
TURN_OFF: 94,
SLEEP: 95,
NUMPAD_0: 96,
NUMPAD_1: 97,
NUMPAD_2: 98,
NUMPAD_3: 99,
NUMPAD_4: 100,
NUMPAD_5: 101,
NUMPAD_6: 102,
NUMPAD_7: 103,
NUMPAD_8: 104,
NUMPAD_9: 105,
NUMPAD_ASTERISK: 106,
NUMPAD_PLUS: 107,
NUMPAD_MINUS: 109,
NUMPAD_COMMA: 110,
NUMPAD_SLASH: 111,
F1: 112,
F2: 113,
F3: 114,
F4: 115,
F5: 116,
F6: 117,
F7: 118,
F8: 119,
F9: 120,
F10: 121,
F11: 122,
F12: 123,
NUM_LOCK: 144,
SCROLL_LOCK: 145,
OPEN_BRACKET: 186,
PLUS: 187,
COMMA: 188,
SLASH: 189,
DOT: 190,
PIPE: 191,
SEMICOLON: 192,
MINUS: 219,
GREAT_ACCENT: 220,
EQUALS: 221,
SINGLE_QUOTE: 222,
BACKSLASH: 226
};
return q
}, false)
};
sap.ui.define("jquery.sap.events", ['jquery.sap.global', 'jquery.sap.keycodes'], function(q) {
"use strict";
q.sap._touchToMouseEvent = true;
var o, a, b, c, d, m, I = false;
if (sap.ui.Device.browser.webkit && /Mobile/.test(navigator.userAgent) && sap.ui.Device.support.touch) {
I = true;
var s = (function() {
var e = window.document,
H = false,
t = null,
j = false,
r, u, i = 0;
m = ["mousedown", "mouseover", "mouseup", "mouseout", "click"];
var v = function(T, E) {
if (!H) {
return
}
var M = E.type == "touchend" ? E.changedTouches[0] : E.touches[0];
var x = e.createEvent('MouseEvent');
x.initMouseEvent(T, true, true, window, E.detail, M.screenX, M.screenY, M.clientX, M.clientY, E.ctrlKey, E.shiftKey, E.altKey, E.metaKey, E.button, E.relatedTarget);
x.isSynthetic = true;
window.setTimeout(function() {
t.dispatchEvent(x)
}, 0)
};
var w = function(E) {
return E.target.tagName.match(/input|textarea|select/i)
};
d = function(E) {
if (!E.isSynthetic && !w(E)) {
E.stopPropagation();
E.preventDefault()
}
};
o = function(E) {
var T = E.touches,
x;
H = (T.length == 1 && !w(E));
j = false;
if (H) {
x = T[0];
t = x.target;
if (t.nodeType === 3) {
t = t.parentNode
}
r = x.clientX;
u = x.clientY;
v("mousedown", E)
}
};
a = function(E) {
var T;
if (H) {
T = E.touches[0];
if (Math.abs(T.clientX - r) > 10 || Math.abs(T.clientY - u) > 10) {
j = true
}
if (j) {
v("mousemove", E)
}
}
};
b = function(E) {
v("mouseup", E);
if (!j) {
v("click", E)
}
};
c = function(E) {
v("mouseup", E)
};
for (; i < m.length; i++) {
e.addEventListener(m[i], d, true)
}
e.addEventListener('touchstart', o, true);
e.addEventListener('touchmove', a, true);
e.addEventListener('touchend', b, true);
e.addEventListener('touchcancel', c, true)
}())
}
q.sap.disableTouchToMouseHandling = function() {
var i = 0;
if (!I) {
return
}
document.removeEventListener('touchstart', o, true);
document.removeEventListener('touchmove', a, true);
document.removeEventListener('touchend', b, true);
document.removeEventListener('touchcancel', c, true);
for (; i < m.length; i++) {
document.removeEventListener(m[i], d, true)
}
};
q.sap.ControlEvents = ["click", "dblclick", "contextmenu", "focusin", "focusout", "keydown", "keypress", "keyup", "mousedown", "mouseout", "mouseover", "mouseup", "select", "selectstart", "dragstart", "dragenter", "dragover", "dragleave", "dragend", "drop", "paste", "cut", "input"];
if (sap.ui.Device.support.touch) {
q.sap.ControlEvents.push("touchstart", "touchend", "touchmove", "touchcancel")
}
q.sap.PseudoEvents = {
sapdown: {
sName: "sapdown",
aTypes: ["keydown"],
fnCheck: function(e) {
return e.keyCode == q.sap.KeyCodes.ARROW_DOWN && !k(e)
}
},
sapdownmodifiers: {
sName: "sapdownmodifiers",
aTypes: ["keydown"],
fnCheck: function(e) {
return e.keyCode == q.sap.KeyCodes.ARROW_DOWN && k(e)
}
},
sapshow: {
sName: "sapshow",
aTypes: ["keydown"],
fnCheck: function(e) {
return (e.keyCode == q.sap.KeyCodes.F4 && !k(e)) || (e.keyCode == q.sap.KeyCodes.ARROW_DOWN && h(e, false, true, false))
}
},
sapup: {
sName: "sapup",
aTypes: ["keydown"],
fnCheck: function(e) {
return e.keyCode == q.sap.KeyCodes.ARROW_UP && !k(e)
}
},
sapupmodifiers: {
sName: "sapupmodifiers",
aTypes: ["keydown"],
fnCheck: function(e) {
return e.keyCode == q.sap.KeyCodes.ARROW_UP && k(e)
}
},
saphide: {
sName: "saphide",
aTypes: ["keydown"],
fnCheck: function(e) {
return e.keyCode == q.sap.KeyCodes.ARROW_UP && h(e, false, true, false)
}
},
sapleft: {
sName: "sapleft",
aTypes: ["keydown"],
fnCheck: function(e) {
return e.keyCode == q.sap.KeyCodes.ARROW_LEFT && !k(e)
}
},
sapleftmodifiers: {
sName: "sapleftmodifiers",
aTypes: ["keydown"],
fnCheck: function(e) {
return e.keyCode == q.sap.KeyCodes.ARROW_LEFT && k(e)
}
},
sapright: {
sName: "sapright",
aTypes: ["keydown"],
fnCheck: function(e) {
return e.keyCode == q.sap.KeyCodes.ARROW_RIGHT && !k(e)
}
},
saprightmodifiers: {
sName: "saprightmodifiers",
aTypes: ["keydown"],
fnCheck: function(e) {
return e.keyCode == q.sap.KeyCodes.ARROW_RIGHT && k(e)
}
},
saphome: {
sName: "saphome",
aTypes: ["keydown"],
fnCheck: function(e) {
return e.keyCode == q.sap.KeyCodes.HOME && !k(e)
}
},
saphomemodifiers: {
sName: "saphomemodifiers",
aTypes: ["keydown"],
fnCheck: function(e) {
return e.keyCode == q.sap.KeyCodes.HOME && k(e)
}
},
saptop: {
sName: "saptop",
aTypes: ["keydown"],
fnCheck: function(e) {
return e.keyCode == q.sap.KeyCodes.HOME && h(e, true, false, false)
}
},
sapend: {
sName: "sapend",
aTypes: ["keydown"],
fnCheck: function(e) {
return e.keyCode == q.sap.KeyCodes.END && !k(e)
}
},
sapendmodifiers: {
sName: "sapendmodifiers",
aTypes: ["keydown"],
fnCheck: function(e) {
return e.keyCode == q.sap.KeyCodes.END && k(e)
}
},
sapbottom: {
sName: "sapbottom",
aTypes: ["keydown"],
fnCheck: function(e) {
return e.keyCode == q.sap.KeyCodes.END && h(e, true, false, false)
}
},
sappageup: {
sName: "sappageup",
aTypes: ["keydown"],
fnCheck: function(e) {
return e.keyCode == q.sap.KeyCodes.PAGE_UP && !k(e)
}
},
sappageupmodifiers: {
sName: "sappageupmodifiers",
aTypes: ["keydown"],
fnCheck: function(e) {
return e.keyCode == q.sap.KeyCodes.PAGE_UP && k(e)
}
},
sappagedown: {
sName: "sappagedown",
aTypes: ["keydown"],
fnCheck: function(e) {
return e.keyCode == q.sap.KeyCodes.PAGE_DOWN && !k(e)
}
},
sappagedownmodifiers: {
sName: "sappagedownmodifiers",
aTypes: ["keydown"],
fnCheck: function(e) {
return e.keyCode == q.sap.KeyCodes.PAGE_DOWN && k(e)
}
},
sapselect: {
sName: "sapselect",
aTypes: ["keydown"],
fnCheck: function(e) {
return (e.keyCode == q.sap.KeyCodes.ENTER || e.keyCode == q.sap.KeyCodes.SPACE) && !k(e)
}
},
sapselectmodifiers: {
sName: "sapselectmodifiers",
aTypes: ["keydown"],
fnCheck: function(e) {
return (e.keyCode == q.sap.KeyCodes.ENTER || e.keyCode == q.sap.KeyCodes.SPACE) && k(e)
}
},
sapspace: {
sName: "sapspace",
aTypes: ["keydown"],
fnCheck: function(e) {
return e.keyCode == q.sap.KeyCodes.SPACE && !k(e)
}
},
sapspacemodifiers: {
sName: "sapspacemodifiers",
aTypes: ["keydown"],
fnCheck: function(e) {
return e.keyCode == q.sap.KeyCodes.SPACE && k(e)
}
},
sapenter: {
sName: "sapenter",
aTypes: ["keydown"],
fnCheck: function(e) {
return e.keyCode == q.sap.KeyCodes.ENTER && !k(e)
}
},
sapentermodifiers: {
sName: "sapentermodifiers",
aTypes: ["keydown"],
fnCheck: function(e) {
return e.keyCode == q.sap.KeyCodes.ENTER && k(e)
}
},
sapbackspace: {
sName: "sapbackspace",
aTypes: ["keydown"],
fnCheck: function(e) {
return e.keyCode == q.sap.KeyCodes.BACKSPACE && !k(e)
}
},
sapbackspacemodifiers: {
sName: "sapbackspacemodifiers",
aTypes: ["keydown"],
fnCheck: function(e) {
return e.keyCode == q.sap.KeyCodes.BACKSPACE && k(e)
}
},
sapdelete: {
sName: "sapdelete",
aTypes: ["keydown"],
fnCheck: function(e) {
return e.keyCode == q.sap.KeyCodes.DELETE && !k(e)
}
},
sapdeletemodifiers: {
sName: "sapdeletemodifiers",
aTypes: ["keydown"],
fnCheck: function(e) {
return e.keyCode == q.sap.KeyCodes.DELETE && k(e)
}
},
sapexpand: {
sName: "sapexpand",
aTypes: ["keydown"],
fnCheck: function(e) {
return e.keyCode == q.sap.KeyCodes.NUMPAD_PLUS && !k(e)
}
},
sapexpandmodifiers: {
sName: "sapexpandmodifiers",
aTypes: ["keydown"],
fnCheck: function(e) {
return e.keyCode == q.sap.KeyCodes.NUMPAD_PLUS && k(e)
}
},
sapcollapse: {
sName: "sapcollapse",
aTypes: ["keydown"],
fnCheck: function(e) {
return e.keyCode == q.sap.KeyCodes.NUMPAD_MINUS && !k(e)
}
},
sapcollapsemodifiers: {
sName: "sapcollapsemodifiers",
aTypes: ["keydown"],
fnCheck: function(e) {
return e.keyCode == q.sap.KeyCodes.NUMPAD_MINUS && k(e)
}
},
sapcollapseall: {
sName: "sapcollapseall",
aTypes: ["keydown"],
fnCheck: function(e) {
return e.keyCode == q.sap.KeyCodes.NUMPAD_ASTERISK && !k(e)
}
},
sapescape: {
sName: "sapescape",
aTypes: ["keydown"],
fnCheck: function(e) {
return e.keyCode == q.sap.KeyCodes.ESCAPE && !k(e)
}
},
saptabnext: {
sName: "saptabnext",
aTypes: ["keydown"],
fnCheck: function(e) {
return e.keyCode == q.sap.KeyCodes.TAB && !k(e)
}
},
saptabprevious: {
sName: "saptabprevious",
aTypes: ["keydown"],
fnCheck: function(e) {
return e.keyCode == q.sap.KeyCodes.TAB && h(e, false, false, true)
}
},
sapskipforward: {
sName: "sapskipforward",
aTypes: ["keydown"],
fnCheck: function(e) {
return e.keyCode == q.sap.KeyCodes.F6 && !k(e)
}
},
sapskipback: {
sName: "sapskipback",
aTypes: ["keydown"],
fnCheck: function(e) {
return e.keyCode == q.sap.KeyCodes.F6 && h(e, false, false, true)
}
},
sapdecrease: {
sName: "sapdecrease",
aTypes: ["keydown"],
fnCheck: function(e) {
var r = sap.ui.getCore().getConfiguration().getRTL();
var i = r ? q.sap.KeyCodes.ARROW_RIGHT : q.sap.KeyCodes.ARROW_LEFT;
return (e.keyCode == i || e.keyCode == q.sap.KeyCodes.ARROW_DOWN) && !k(e)
}
},
sapdecreasemodifiers: {
sName: "sapdecreasemodifiers",
aTypes: ["keydown"],
fnCheck: function(e) {
var r = sap.ui.getCore().getConfiguration().getRTL();
var i = r ? q.sap.KeyCodes.ARROW_RIGHT : q.sap.KeyCodes.ARROW_LEFT;
return (e.keyCode == i || e.keyCode == q.sap.KeyCodes.ARROW_DOWN) && k(e)
}
},
sapincrease: {
sName: "sapincrease",
aTypes: ["keydown"],
fnCheck: function(e) {
var r = sap.ui.getCore().getConfiguration().getRTL();
var N = r ? q.sap.KeyCodes.ARROW_LEFT : q.sap.KeyCodes.ARROW_RIGHT;
return (e.keyCode == N || e.keyCode == q.sap.KeyCodes.ARROW_UP) && !k(e)
}
},
sapincreasemodifiers: {
sName: "sapincreasemodifiers",
aTypes: ["keydown"],
fnCheck: function(e) {
var r = sap.ui.getCore().getConfiguration().getRTL();
var N = r ? q.sap.KeyCodes.ARROW_LEFT : q.sap.KeyCodes.ARROW_RIGHT;
return (e.keyCode == N || e.keyCode == q.sap.KeyCodes.ARROW_UP) && k(e)
}
},
sapprevious: {
sName: "sapprevious",
aTypes: ["keydown"],
fnCheck: function(e) {
var r = sap.ui.getCore().getConfiguration().getRTL();
var i = r ? q.sap.KeyCodes.ARROW_RIGHT : q.sap.KeyCodes.ARROW_LEFT;
return (e.keyCode == i || e.keyCode == q.sap.KeyCodes.ARROW_UP) && !k(e)
}
},
sappreviousmodifiers: {
sName: "sappreviousmodifiers",
aTypes: ["keydown"],
fnCheck: function(e) {
var r = sap.ui.getCore().getConfiguration().getRTL();
var i = r ? q.sap.KeyCodes.ARROW_RIGHT : q.sap.KeyCodes.ARROW_LEFT;
return (e.keyCode == i || e.keyCode == q.sap.KeyCodes.ARROW_UP) && k(e)
}
},
sapnext: {
sName: "sapnext",
aTypes: ["keydown"],
fnCheck: function(e) {
var r = sap.ui.getCore().getConfiguration().getRTL();
var N = r ? q.sap.KeyCodes.ARROW_LEFT : q.sap.KeyCodes.ARROW_RIGHT;
return (e.keyCode == N || e.keyCode == q.sap.KeyCodes.ARROW_DOWN) && !k(e)
}
},
sapnextmodifiers: {
sName: "sapnextmodifiers",
aTypes: ["keydown"],
fnCheck: function(e) {
var r = sap.ui.getCore().getConfiguration().getRTL();
var N = r ? q.sap.KeyCodes.ARROW_LEFT : q.sap.KeyCodes.ARROW_RIGHT;
return (e.keyCode == N || e.keyCode == q.sap.KeyCodes.ARROW_DOWN) && k(e)
}
},
sapdelayeddoubleclick: {
sName: "sapdelayeddoubleclick",
aTypes: ["click"],
fnCheck: function(e) {
var i = q(e.target);
var j = e.timeStamp;
var r = i.data("sapdelayeddoubleclick_lastClickTimestamp");
var t = r || 0;
i.data("sapdelayeddoubleclick_lastClickTimestamp", j);
var u = j - t;
return (u >= 300 && u <= 1300)
}
}
};
var P = ["sapdown", "sapdownmodifiers", "sapshow", "sapup", "sapupmodifiers", "saphide", "sapleft", "sapleftmodifiers", "sapright", "saprightmodifiers", "saphome", "saphomemodifiers", "saptop", "sapend", "sapendmodifiers", "sapbottom", "sappageup", "sappageupmodifiers", "sappagedown", "sappagedownmodifiers", "sapselect", "sapselectmodifiers", "sapspace", "sapspacemodifiers", "sapenter", "sapentermodifiers", "sapexpand", "sapbackspace", "sapbackspacemodifiers", "sapdelete", "sapdeletemodifiers", "sapexpandmodifiers", "sapcollapse", "sapcollapsemodifiers", "sapcollapseall", "sapescape", "saptabnext", "saptabprevious", "sapskipforward", "sapskipback", "sapprevious", "sappreviousmodifiers", "sapnext", "sapnextmodifiers", "sapdecrease", "sapdecreasemodifiers", "sapincrease", "sapincreasemodifiers", "sapdelayeddoubleclick"];
(function initTouchEventSupport() {
q.sap.touchEventMode = "SIM";
var A = [];
var e = [];
if (sap.ui.Device.support.touch) {
q.sap.touchEventMode = "ON";
q.event.props.push("touches", "targetTouches", "changedTouches")
}
var j = function(x, y, H) {
var z = "__" + x + "Handler";
var B = "sap" + x;
A.push(B);
e.push({
sName: x,
aTypes: [B],
fnCheck: function(E) {
return true
}
});
q.event.special[B] = {
add: function(C) {
var D = this,
$ = q(this),
E = {
domRef: D,
eventName: x,
sapEventName: B,
eventHandle: C
};
var G = function(J) {
H(J, E)
};
C.__sapSimulatedEventHandler = G;
for (var i = 0; i < y.length; i++) {
$.on(y[i], G)
}
},
remove: function(C) {
var $ = q(this);
var H = C.__sapSimulatedEventHandler;
$.removeData(z + C.guid);
for (var i = 0; i < y.length; i++) {
q.event.remove(this, y[i], H)
}
}
}
};
var M = function(E, C) {
var D = q(C.domRef);
if (E.isMarked("delayedMouseEvent")) {
return
}
if (!(E.type != "mouseout" || (E.type === "mouseout" && q.sap.checkMouseEnterOrLeave(E, C.domRef)))) {
var x = true;
var y = D.data("__touchstart_control");
if (y) {
var z = q.sap.domById(y);
if (z && q.sap.checkMouseEnterOrLeave(E, z)) {
x = false
}
}
if (x) {
return
}
}
var N = q.event.fix(E.originalEvent || E);
N.type = C.sapEventName;
if (N.isMarked("firstUIArea")) {
N.setMark("handledByUIArea", false)
}
var B = [{
identifier: 1,
pageX: N.pageX,
pageY: N.pageY,
clientX: N.clientX,
clientY: N.clientY,
screenX: N.screenX,
screenY: N.screenY,
target: N.target,
radiusX: 1,
radiusY: 1,
rotationAngle: 0
}];
switch (C.eventName) {
case "touchstart":
case "touchmove":
N.touches = N.changedTouches = N.targetTouches = B;
break;
case "touchend":
N.changedTouches = B;
N.touches = N.targetTouches = [];
break
}
if (C.eventName === "touchstart" || D.data("__touch_in_progress")) {
D.data("__touch_in_progress", "X");
var G = q.fn.control ? q(E.target).control(0) : null;
if (G) {
D.data("__touchstart_control", G.getId())
}
if (E.type === "mouseout") {
N.setMarked("fromMouseout")
}
C.eventHandle.handler.call(C.domRef, N);
if (C.eventName === "touchend" && !N.isMarked("fromMouseout")) {
D.removeData("__touch_in_progress");
D.removeData("__touchstart_control")
}
}
};
j("touchstart", ["mousedown"], M);
j("touchend", ["mouseup", "mouseout"], M);
j("touchmove", ["mousemove"], M);
function r() {
var C = window["sap-ui-config"] || {},
L = C.libs || "";
function x(K) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment