gallery/static/js/main.js

10855 lines
548 KiB
JavaScript
Raw Normal View History

2024-10-24 09:56:51 +00:00
var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
function getDefaultExportFromCjs(x) {
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
}
var jquery = { exports: {} };
/*!
* jQuery JavaScript Library v3.7.1
* https://jquery.com/
*
* Copyright OpenJS Foundation and other contributors
* Released under the MIT license
* https://jquery.org/license
*
* Date: 2023-08-28T13:37Z
*/
(function(module) {
(function(global2, factory) {
{
module.exports = global2.document ? factory(global2, true) : function(w) {
if (!w.document) {
throw new Error("jQuery requires a window with a document");
}
return factory(w);
};
}
})(typeof window !== "undefined" ? window : commonjsGlobal, function(window2, noGlobal) {
var arr = [];
var getProto = Object.getPrototypeOf;
var slice = arr.slice;
var flat = arr.flat ? function(array) {
return arr.flat.call(array);
} : function(array) {
return arr.concat.apply([], array);
};
var push = arr.push;
var indexOf = arr.indexOf;
var class2type = {};
var toString = class2type.toString;
var hasOwn = class2type.hasOwnProperty;
var fnToString = hasOwn.toString;
var ObjectFunctionString = fnToString.call(Object);
var support = {};
var isFunction = function isFunction2(obj) {
return typeof obj === "function" && typeof obj.nodeType !== "number" && typeof obj.item !== "function";
};
var isWindow = function isWindow2(obj) {
return obj != null && obj === obj.window;
};
var document2 = window2.document;
var preservedScriptAttributes = {
type: true,
src: true,
nonce: true,
noModule: true
};
function DOMEval(code, node, doc) {
doc = doc || document2;
var i, val, script = doc.createElement("script");
script.text = code;
if (node) {
for (i in preservedScriptAttributes) {
val = node[i] || node.getAttribute && node.getAttribute(i);
if (val) {
script.setAttribute(i, val);
}
}
}
doc.head.appendChild(script).parentNode.removeChild(script);
}
function toType(obj) {
if (obj == null) {
return obj + "";
}
return typeof obj === "object" || typeof obj === "function" ? class2type[toString.call(obj)] || "object" : typeof obj;
}
var version = "3.7.1", rhtmlSuffix = /HTML$/i, jQuery2 = function(selector, context) {
return new jQuery2.fn.init(selector, context);
};
jQuery2.fn = jQuery2.prototype = {
// The current version of jQuery being used
jquery: version,
constructor: jQuery2,
// The default length of a jQuery object is 0
length: 0,
toArray: function() {
return slice.call(this);
},
// Get the Nth element in the matched element set OR
// Get the whole matched element set as a clean array
get: function(num) {
if (num == null) {
return slice.call(this);
}
return num < 0 ? this[num + this.length] : this[num];
},
// Take an array of elements and push it onto the stack
// (returning the new matched element set)
pushStack: function(elems) {
var ret = jQuery2.merge(this.constructor(), elems);
ret.prevObject = this;
return ret;
},
// Execute a callback for every element in the matched set.
each: function(callback) {
return jQuery2.each(this, callback);
},
map: function(callback) {
return this.pushStack(jQuery2.map(this, function(elem, i) {
return callback.call(elem, i, elem);
}));
},
slice: function() {
return this.pushStack(slice.apply(this, arguments));
},
first: function() {
return this.eq(0);
},
last: function() {
return this.eq(-1);
},
even: function() {
return this.pushStack(jQuery2.grep(this, function(_elem, i) {
return (i + 1) % 2;
}));
},
odd: function() {
return this.pushStack(jQuery2.grep(this, function(_elem, i) {
return i % 2;
}));
},
eq: function(i) {
var len = this.length, j = +i + (i < 0 ? len : 0);
return this.pushStack(j >= 0 && j < len ? [this[j]] : []);
},
end: function() {
return this.prevObject || this.constructor();
},
// For internal use only.
// Behaves like an Array's method, not like a jQuery method.
push,
sort: arr.sort,
splice: arr.splice
};
jQuery2.extend = jQuery2.fn.extend = function() {
var options, name, src, copy, copyIsArray, clone, target = arguments[0] || {}, i = 1, length = arguments.length, deep = false;
if (typeof target === "boolean") {
deep = target;
target = arguments[i] || {};
i++;
}
if (typeof target !== "object" && !isFunction(target)) {
target = {};
}
if (i === length) {
target = this;
i--;
}
for (; i < length; i++) {
if ((options = arguments[i]) != null) {
for (name in options) {
copy = options[name];
if (name === "__proto__" || target === copy) {
continue;
}
if (deep && copy && (jQuery2.isPlainObject(copy) || (copyIsArray = Array.isArray(copy)))) {
src = target[name];
if (copyIsArray && !Array.isArray(src)) {
clone = [];
} else if (!copyIsArray && !jQuery2.isPlainObject(src)) {
clone = {};
} else {
clone = src;
}
copyIsArray = false;
target[name] = jQuery2.extend(deep, clone, copy);
} else if (copy !== void 0) {
target[name] = copy;
}
}
}
}
return target;
};
jQuery2.extend({
// Unique for each copy of jQuery on the page
expando: "jQuery" + (version + Math.random()).replace(/\D/g, ""),
// Assume jQuery is ready without the ready module
isReady: true,
error: function(msg) {
throw new Error(msg);
},
noop: function() {
},
isPlainObject: function(obj) {
var proto, Ctor;
if (!obj || toString.call(obj) !== "[object Object]") {
return false;
}
proto = getProto(obj);
if (!proto) {
return true;
}
Ctor = hasOwn.call(proto, "constructor") && proto.constructor;
return typeof Ctor === "function" && fnToString.call(Ctor) === ObjectFunctionString;
},
isEmptyObject: function(obj) {
var name;
for (name in obj) {
return false;
}
return true;
},
// Evaluates a script in a provided context; falls back to the global one
// if not specified.
globalEval: function(code, options, doc) {
DOMEval(code, { nonce: options && options.nonce }, doc);
},
each: function(obj, callback) {
var length, i = 0;
if (isArrayLike(obj)) {
length = obj.length;
for (; i < length; i++) {
if (callback.call(obj[i], i, obj[i]) === false) {
break;
}
}
} else {
for (i in obj) {
if (callback.call(obj[i], i, obj[i]) === false) {
break;
}
}
}
return obj;
},
// Retrieve the text value of an array of DOM nodes
text: function(elem) {
var node, ret = "", i = 0, nodeType = elem.nodeType;
if (!nodeType) {
while (node = elem[i++]) {
ret += jQuery2.text(node);
}
}
if (nodeType === 1 || nodeType === 11) {
return elem.textContent;
}
if (nodeType === 9) {
return elem.documentElement.textContent;
}
if (nodeType === 3 || nodeType === 4) {
return elem.nodeValue;
}
return ret;
},
// results is for internal usage only
makeArray: function(arr2, results) {
var ret = results || [];
if (arr2 != null) {
if (isArrayLike(Object(arr2))) {
jQuery2.merge(
ret,
typeof arr2 === "string" ? [arr2] : arr2
);
} else {
push.call(ret, arr2);
}
}
return ret;
},
inArray: function(elem, arr2, i) {
return arr2 == null ? -1 : indexOf.call(arr2, elem, i);
},
isXMLDoc: function(elem) {
var namespace = elem && elem.namespaceURI, docElem = elem && (elem.ownerDocument || elem).documentElement;
return !rhtmlSuffix.test(namespace || docElem && docElem.nodeName || "HTML");
},
// Support: Android <=4.0 only, PhantomJS 1 only
// push.apply(_, arraylike) throws on ancient WebKit
merge: function(first, second) {
var len = +second.length, j = 0, i = first.length;
for (; j < len; j++) {
first[i++] = second[j];
}
first.length = i;
return first;
},
grep: function(elems, callback, invert) {
var callbackInverse, matches = [], i = 0, length = elems.length, callbackExpect = !invert;
for (; i < length; i++) {
callbackInverse = !callback(elems[i], i);
if (callbackInverse !== callbackExpect) {
matches.push(elems[i]);
}
}
return matches;
},
// arg is for internal usage only
map: function(elems, callback, arg) {
var length, value, i = 0, ret = [];
if (isArrayLike(elems)) {
length = elems.length;
for (; i < length; i++) {
value = callback(elems[i], i, arg);
if (value != null) {
ret.push(value);
}
}
} else {
for (i in elems) {
value = callback(elems[i], i, arg);
if (value != null) {
ret.push(value);
}
}
}
return flat(ret);
},
// A global GUID counter for objects
guid: 1,
// jQuery.support is not used in Core but other projects attach their
// properties to it so it needs to exist.
support
});
if (typeof Symbol === "function") {
jQuery2.fn[Symbol.iterator] = arr[Symbol.iterator];
}
jQuery2.each(
"Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),
function(_i, name) {
class2type["[object " + name + "]"] = name.toLowerCase();
}
);
function isArrayLike(obj) {
var length = !!obj && "length" in obj && obj.length, type = toType(obj);
if (isFunction(obj) || isWindow(obj)) {
return false;
}
return type === "array" || length === 0 || typeof length === "number" && length > 0 && length - 1 in obj;
}
function nodeName(elem, name) {
return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();
}
var pop = arr.pop;
var sort = arr.sort;
var splice = arr.splice;
var whitespace = "[\\x20\\t\\r\\n\\f]";
var rtrimCSS = new RegExp(
"^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$",
"g"
);
jQuery2.contains = function(a, b) {
var bup = b && b.parentNode;
return a === bup || !!(bup && bup.nodeType === 1 && // Support: IE 9 - 11+
// IE doesn't have `contains` on SVG.
(a.contains ? a.contains(bup) : a.compareDocumentPosition && a.compareDocumentPosition(bup) & 16));
};
var rcssescape = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g;
function fcssescape(ch, asCodePoint) {
if (asCodePoint) {
if (ch === "\0") {
return "<22>";
}
return ch.slice(0, -1) + "\\" + ch.charCodeAt(ch.length - 1).toString(16) + " ";
}
return "\\" + ch;
}
jQuery2.escapeSelector = function(sel) {
return (sel + "").replace(rcssescape, fcssescape);
};
var preferredDoc = document2, pushNative = push;
(function() {
var i, Expr, outermostContext, sortInput, hasDuplicate, push2 = pushNative, document3, documentElement2, documentIsHTML, rbuggyQSA, matches, expando = jQuery2.expando, dirruns = 0, done = 0, classCache = createCache(), tokenCache = createCache(), compilerCache = createCache(), nonnativeSelectorCache = createCache(), sortOrder = function(a, b) {
if (a === b) {
hasDuplicate = true;
}
return 0;
}, booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped", identifier = "(?:\\\\[\\da-fA-F]{1,6}" + whitespace + "?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+", attributes = "\\[" + whitespace + "*(" + identifier + ")(?:" + whitespace + // Operator (capture 2)
"*([*^$|!~]?=)" + whitespace + // "Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]"
`*(?:'((?:\\\\.|[^\\\\'])*)'|"((?:\\\\.|[^\\\\"])*)"|(` + identifier + "))|)" + whitespace + "*\\]", pseudos = ":(" + identifier + `)(?:\\((('((?:\\\\.|[^\\\\'])*)'|"((?:\\\\.|[^\\\\"])*)")|((?:\\\\.|[^\\\\()[\\]]|` + attributes + ")*)|.*)\\)|)", rwhitespace = new RegExp(whitespace + "+", "g"), rcomma = new RegExp("^" + whitespace + "*," + whitespace + "*"), rleadingCombinator = new RegExp("^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*"), rdescend = new RegExp(whitespace + "|>"), rpseudo = new RegExp(pseudos), ridentifier = new RegExp("^" + identifier + "$"), matchExpr = {
ID: new RegExp("^#(" + identifier + ")"),
CLASS: new RegExp("^\\.(" + identifier + ")"),
TAG: new RegExp("^(" + identifier + "|[*])"),
ATTR: new RegExp("^" + attributes),
PSEUDO: new RegExp("^" + pseudos),
CHILD: new RegExp(
"^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace + "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace + "*(\\d+)|))" + whitespace + "*\\)|)",
"i"
),
bool: new RegExp("^(?:" + booleans + ")$", "i"),
// For use in libraries implementing .is()
// We use this for POS matching in `select`
needsContext: new RegExp("^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i")
}, rinputs = /^(?:input|select|textarea|button)$/i, rheader = /^h\d$/i, rquickExpr2 = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, rsibling = /[+~]/, runescape = new RegExp("\\\\[\\da-fA-F]{1,6}" + whitespace + "?|\\\\([^\\r\\n\\f])", "g"), funescape = function(escape, nonHex) {
var high = "0x" + escape.slice(1) - 65536;
if (nonHex) {
return nonHex;
}
return high < 0 ? String.fromCharCode(high + 65536) : String.fromCharCode(high >> 10 | 55296, high & 1023 | 56320);
}, unloadHandler = function() {
setDocument();
}, inDisabledFieldset = addCombinator(
function(elem) {
return elem.disabled === true && nodeName(elem, "fieldset");
},
{ dir: "parentNode", next: "legend" }
);
function safeActiveElement() {
try {
return document3.activeElement;
} catch (err) {
}
}
try {
push2.apply(
arr = slice.call(preferredDoc.childNodes),
preferredDoc.childNodes
);
arr[preferredDoc.childNodes.length].nodeType;
} catch (e) {
push2 = {
apply: function(target, els) {
pushNative.apply(target, slice.call(els));
},
call: function(target) {
pushNative.apply(target, slice.call(arguments, 1));
}
};
}
function find(selector, context, results, seed) {
var m, i2, elem, nid, match, groups, newSelector, newContext = context && context.ownerDocument, nodeType = context ? context.nodeType : 9;
results = results || [];
if (typeof selector !== "string" || !selector || nodeType !== 1 && nodeType !== 9 && nodeType !== 11) {
return results;
}
if (!seed) {
setDocument(context);
context = context || document3;
if (documentIsHTML) {
if (nodeType !== 11 && (match = rquickExpr2.exec(selector))) {
if (m = match[1]) {
if (nodeType === 9) {
if (elem = context.getElementById(m)) {
if (elem.id === m) {
push2.call(results, elem);
return results;
}
} else {
return results;
}
} else {
if (newContext && (elem = newContext.getElementById(m)) && find.contains(context, elem) && elem.id === m) {
push2.call(results, elem);
return results;
}
}
} else if (match[2]) {
push2.apply(results, context.getElementsByTagName(selector));
return results;
} else if ((m = match[3]) && context.getElementsByClassName) {
push2.apply(results, context.getElementsByClassName(m));
return results;
}
}
if (!nonnativeSelectorCache[selector + " "] && (!rbuggyQSA || !rbuggyQSA.test(selector))) {
newSelector = selector;
newContext = context;
if (nodeType === 1 && (rdescend.test(selector) || rleadingCombinator.test(selector))) {
newContext = rsibling.test(selector) && testContext(context.parentNode) || context;
if (newContext != context || !support.scope) {
if (nid = context.getAttribute("id")) {
nid = jQuery2.escapeSelector(nid);
} else {
context.setAttribute("id", nid = expando);
}
}
groups = tokenize(selector);
i2 = groups.length;
while (i2--) {
groups[i2] = (nid ? "#" + nid : ":scope") + " " + toSelector(groups[i2]);
}
newSelector = groups.join(",");
}
try {
push2.apply(
results,
newContext.querySelectorAll(newSelector)
);
return results;
} catch (qsaError) {
nonnativeSelectorCache(selector, true);
} finally {
if (nid === expando) {
context.removeAttribute("id");
}
}
}
}
}
return select(selector.replace(rtrimCSS, "$1"), context, results, seed);
}
function createCache() {
var keys = [];
function cache(key, value) {
if (keys.push(key + " ") > Expr.cacheLength) {
delete cache[keys.shift()];
}
return cache[key + " "] = value;
}
return cache;
}
function markFunction(fn) {
fn[expando] = true;
return fn;
}
function assert(fn) {
var el = document3.createElement("fieldset");
try {
return !!fn(el);
} catch (e) {
return false;
} finally {
if (el.parentNode) {
el.parentNode.removeChild(el);
}
el = null;
}
}
function createInputPseudo(type) {
return function(elem) {
return nodeName(elem, "input") && elem.type === type;
};
}
function createButtonPseudo(type) {
return function(elem) {
return (nodeName(elem, "input") || nodeName(elem, "button")) && elem.type === type;
};
}
function createDisabledPseudo(disabled) {
return function(elem) {
if ("form" in elem) {
if (elem.parentNode && elem.disabled === false) {
if ("label" in elem) {
if ("label" in elem.parentNode) {
return elem.parentNode.disabled === disabled;
} else {
return elem.disabled === disabled;
}
}
return elem.isDisabled === disabled || // Where there is no isDisabled, check manually
elem.isDisabled !== !disabled && inDisabledFieldset(elem) === disabled;
}
return elem.disabled === disabled;
} else if ("label" in elem) {
return elem.disabled === disabled;
}
return false;
};
}
function createPositionalPseudo(fn) {
return markFunction(function(argument) {
argument = +argument;
return markFunction(function(seed, matches2) {
var j, matchIndexes = fn([], seed.length, argument), i2 = matchIndexes.length;
while (i2--) {
if (seed[j = matchIndexes[i2]]) {
seed[j] = !(matches2[j] = seed[j]);
}
}
});
});
}
function testContext(context) {
return context && typeof context.getElementsByTagName !== "undefined" && context;
}
function setDocument(node) {
var subWindow, doc = node ? node.ownerDocument || node : preferredDoc;
if (doc == document3 || doc.nodeType !== 9 || !doc.documentElement) {
return document3;
}
document3 = doc;
documentElement2 = document3.documentElement;
documentIsHTML = !jQuery2.isXMLDoc(document3);
matches = documentElement2.matches || documentElement2.webkitMatchesSelector || documentElement2.msMatchesSelector;
if (documentElement2.msMatchesSelector && // Support: IE 11+, Edge 17 - 18+
// IE/Edge sometimes throw a "Permission denied" error when strict-comparing
// two documents; shallow comparisons work.
// eslint-disable-next-line eqeqeq
preferredDoc != document3 && (subWindow = document3.defaultView) && subWindow.top !== subWindow) {
subWindow.addEventListener("unload", unloadHandler);
}
support.getById = assert(function(el) {
documentElement2.appendChild(el).id = jQuery2.expando;
return !document3.getElementsByName || !document3.getElementsByName(jQuery2.expando).length;
});
support.disconnectedMatch = assert(function(el) {
return matches.call(el, "*");
});
support.scope = assert(function() {
return document3.querySelectorAll(":scope");
});
support.cssHas = assert(function() {
try {
document3.querySelector(":has(*,:jqfake)");
return false;
} catch (e) {
return true;
}
});
if (support.getById) {
Expr.filter.ID = function(id) {
var attrId = id.replace(runescape, funescape);
return function(elem) {
return elem.getAttribute("id") === attrId;
};
};
Expr.find.ID = function(id, context) {
if (typeof context.getElementById !== "undefined" && documentIsHTML) {
var elem = context.getElementById(id);
return elem ? [elem] : [];
}
};
} else {
Expr.filter.ID = function(id) {
var attrId = id.replace(runescape, funescape);
return function(elem) {
var node2 = typeof elem.getAttributeNode !== "undefined" && elem.getAttributeNode("id");
return node2 && node2.value === attrId;
};
};
Expr.find.ID = function(id, context) {
if (typeof context.getElementById !== "undefined" && documentIsHTML) {
var node2, i2, elems, elem = context.getElementById(id);
if (elem) {
node2 = elem.getAttributeNode("id");
if (node2 && node2.value === id) {
return [elem];
}
elems = context.getElementsByName(id);
i2 = 0;
while (elem = elems[i2++]) {
node2 = elem.getAttributeNode("id");
if (node2 && node2.value === id) {
return [elem];
}
}
}
return [];
}
};
}
Expr.find.TAG = function(tag, context) {
if (typeof context.getElementsByTagName !== "undefined") {
return context.getElementsByTagName(tag);
} else {
return context.querySelectorAll(tag);
}
};
Expr.find.CLASS = function(className, context) {
if (typeof context.getElementsByClassName !== "undefined" && documentIsHTML) {
return context.getElementsByClassName(className);
}
};
rbuggyQSA = [];
assert(function(el) {
var input;
documentElement2.appendChild(el).innerHTML = "<a id='" + expando + "' href='' disabled='disabled'></a><select id='" + expando + "-\r\\' disabled='disabled'><option selected=''></option></select>";
if (!el.querySelectorAll("[selected]").length) {
rbuggyQSA.push("\\[" + whitespace + "*(?:value|" + booleans + ")");
}
if (!el.querySelectorAll("[id~=" + expando + "-]").length) {
rbuggyQSA.push("~=");
}
if (!el.querySelectorAll("a#" + expando + "+*").length) {
rbuggyQSA.push(".#.+[+~]");
}
if (!el.querySelectorAll(":checked").length) {
rbuggyQSA.push(":checked");
}
input = document3.createElement("input");
input.setAttribute("type", "hidden");
el.appendChild(input).setAttribute("name", "D");
documentElement2.appendChild(el).disabled = true;
if (el.querySelectorAll(":disabled").length !== 2) {
rbuggyQSA.push(":enabled", ":disabled");
}
input = document3.createElement("input");
input.setAttribute("name", "");
el.appendChild(input);
if (!el.querySelectorAll("[name='']").length) {
rbuggyQSA.push("\\[" + whitespace + "*name" + whitespace + "*=" + whitespace + `*(?:''|"")`);
}
});
if (!support.cssHas) {
rbuggyQSA.push(":has");
}
rbuggyQSA = rbuggyQSA.length && new RegExp(rbuggyQSA.join("|"));
sortOrder = function(a, b) {
if (a === b) {
hasDuplicate = true;
return 0;
}
var compare = !a.compareDocumentPosition - !b.compareDocumentPosition;
if (compare) {
return compare;
}
compare = (a.ownerDocument || a) == (b.ownerDocument || b) ? a.compareDocumentPosition(b) : (
// Otherwise we know they are disconnected
1
);
if (compare & 1 || !support.sortDetached && b.compareDocumentPosition(a) === compare) {
if (a === document3 || a.ownerDocument == preferredDoc && find.contains(preferredDoc, a)) {
return -1;
}
if (b === document3 || b.ownerDocument == preferredDoc && find.contains(preferredDoc, b)) {
return 1;
}
return sortInput ? indexOf.call(sortInput, a) - indexOf.call(sortInput, b) : 0;
}
return compare & 4 ? -1 : 1;
};
return document3;
}
find.matches = function(expr, elements) {
return find(expr, null, null, elements);
};
find.matchesSelector = function(elem, expr) {
setDocument(elem);
if (documentIsHTML && !nonnativeSelectorCache[expr + " "] && (!rbuggyQSA || !rbuggyQSA.test(expr))) {
try {
var ret = matches.call(elem, expr);
if (ret || support.disconnectedMatch || // As well, disconnected nodes are said to be in a document
// fragment in IE 9
elem.document && elem.document.nodeType !== 11) {
return ret;
}
} catch (e) {
nonnativeSelectorCache(expr, true);
}
}
return find(expr, document3, null, [elem]).length > 0;
};
find.contains = function(context, elem) {
if ((context.ownerDocument || context) != document3) {
setDocument(context);
}
return jQuery2.contains(context, elem);
};
find.attr = function(elem, name) {
if ((elem.ownerDocument || elem) != document3) {
setDocument(elem);
}
var fn = Expr.attrHandle[name.toLowerCase()], val = fn && hasOwn.call(Expr.attrHandle, name.toLowerCase()) ? fn(elem, name, !documentIsHTML) : void 0;
if (val !== void 0) {
return val;
}
return elem.getAttribute(name);
};
find.error = function(msg) {
throw new Error("Syntax error, unrecognized expression: " + msg);
};
jQuery2.uniqueSort = function(results) {
var elem, duplicates = [], j = 0, i2 = 0;
hasDuplicate = !support.sortStable;
sortInput = !support.sortStable && slice.call(results, 0);
sort.call(results, sortOrder);
if (hasDuplicate) {
while (elem = results[i2++]) {
if (elem === results[i2]) {
j = duplicates.push(i2);
}
}
while (j--) {
splice.call(results, duplicates[j], 1);
}
}
sortInput = null;
return results;
};
jQuery2.fn.uniqueSort = function() {
return this.pushStack(jQuery2.uniqueSort(slice.apply(this)));
};
Expr = jQuery2.expr = {
// Can be adjusted by the user
cacheLength: 50,
createPseudo: markFunction,
match: matchExpr,
attrHandle: {},
find: {},
relative: {
">": { dir: "parentNode", first: true },
" ": { dir: "parentNode" },
"+": { dir: "previousSibling", first: true },
"~": { dir: "previousSibling" }
},
preFilter: {
ATTR: function(match) {
match[1] = match[1].replace(runescape, funescape);
match[3] = (match[3] || match[4] || match[5] || "").replace(runescape, funescape);
if (match[2] === "~=") {
match[3] = " " + match[3] + " ";
}
return match.slice(0, 4);
},
CHILD: function(match) {
match[1] = match[1].toLowerCase();
if (match[1].slice(0, 3) === "nth") {
if (!match[3]) {
find.error(match[0]);
}
match[4] = +(match[4] ? match[5] + (match[6] || 1) : 2 * (match[3] === "even" || match[3] === "odd"));
match[5] = +(match[7] + match[8] || match[3] === "odd");
} else if (match[3]) {
find.error(match[0]);
}
return match;
},
PSEUDO: function(match) {
var excess, unquoted = !match[6] && match[2];
if (matchExpr.CHILD.test(match[0])) {
return null;
}
if (match[3]) {
match[2] = match[4] || match[5] || "";
} else if (unquoted && rpseudo.test(unquoted) && // Get excess from tokenize (recursively)
(excess = tokenize(unquoted, true)) && // advance to the next closing parenthesis
(excess = unquoted.indexOf(")", unquoted.length - excess) - unquoted.length)) {
match[0] = match[0].slice(0, excess);
match[2] = unquoted.slice(0, excess);
}
return match.slice(0, 3);
}
},
filter: {
TAG: function(nodeNameSelector) {
var expectedNodeName = nodeNameSelector.replace(runescape, funescape).toLowerCase();
return nodeNameSelector === "*" ? function() {
return true;
} : function(elem) {
return nodeName(elem, expectedNodeName);
};
},
CLASS: function(className) {
var pattern = classCache[className + " "];
return pattern || (pattern = new RegExp("(^|" + whitespace + ")" + className + "(" + whitespace + "|$)")) && classCache(className, function(elem) {
return pattern.test(
typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== "undefined" && elem.getAttribute("class") || ""
);
});
},
ATTR: function(name, operator, check) {
return function(elem) {
var result = find.attr(elem, name);
if (result == null) {
return operator === "!=";
}
if (!operator) {
return true;
}
result += "";
if (operator === "=") {
return result === check;
}
if (operator === "!=") {
return result !== check;
}
if (operator === "^=") {
return check && result.indexOf(check) === 0;
}
if (operator === "*=") {
return check && result.indexOf(check) > -1;
}
if (operator === "$=") {
return check && result.slice(-check.length) === check;
}
if (operator === "~=") {
return (" " + result.replace(rwhitespace, " ") + " ").indexOf(check) > -1;
}
if (operator === "|=") {
return result === check || result.slice(0, check.length + 1) === check + "-";
}
return false;
};
},
CHILD: function(type, what, _argument, first, last) {
var simple = type.slice(0, 3) !== "nth", forward = type.slice(-4) !== "last", ofType = what === "of-type";
return first === 1 && last === 0 ? (
// Shortcut for :nth-*(n)
function(elem) {
return !!elem.parentNode;
}
) : function(elem, _context, xml) {
var cache, outerCache, node, nodeIndex, start, dir2 = simple !== forward ? "nextSibling" : "previousSibling", parent = elem.parentNode, name = ofType && elem.nodeName.toLowerCase(), useCache = !xml && !ofType, diff = false;
if (parent) {
if (simple) {
while (dir2) {
node = elem;
while (node = node[dir2]) {
if (ofType ? nodeName(node, name) : node.nodeType === 1) {
return false;
}
}
start = dir2 = type === "only" && !start && "nextSibling";
}
return true;
}
start = [forward ? parent.firstChild : parent.lastChild];
if (forward && useCache) {
outerCache = parent[expando] || (parent[expando] = {});
cache = outerCache[type] || [];
nodeIndex = cache[0] === dirruns && cache[1];
diff = nodeIndex && cache[2];
node = nodeIndex && parent.childNodes[nodeIndex];
while (node = ++nodeIndex && node && node[dir2] || // Fallback to seeking `elem` from the start
(diff = nodeIndex = 0) || start.pop()) {
if (node.nodeType === 1 && ++diff && node === elem) {
outerCache[type] = [dirruns, nodeIndex, diff];
break;
}
}
} else {
if (useCache) {
outerCache = elem[expando] || (elem[expando] = {});
cache = outerCache[type] || [];
nodeIndex = cache[0] === dirruns && cache[1];
diff = nodeIndex;
}
if (diff === false) {
while (node = ++nodeIndex && node && node[dir2] || (diff = nodeIndex = 0) || start.pop()) {
if ((ofType ? nodeName(node, name) : node.nodeType === 1) && ++diff) {
if (useCache) {
outerCache = node[expando] || (node[expando] = {});
outerCache[type] = [dirruns, diff];
}
if (node === elem) {
break;
}
}
}
}
}
diff -= last;
return diff === first || diff % first === 0 && diff / first >= 0;
}
};
},
PSEUDO: function(pseudo, argument) {
var args, fn = Expr.pseudos[pseudo] || Expr.setFilters[pseudo.toLowerCase()] || find.error("unsupported pseudo: " + pseudo);
if (fn[expando]) {
return fn(argument);
}
if (fn.length > 1) {
args = [pseudo, pseudo, "", argument];
return Expr.setFilters.hasOwnProperty(pseudo.toLowerCase()) ? markFunction(function(seed, matches2) {
var idx, matched = fn(seed, argument), i2 = matched.length;
while (i2--) {
idx = indexOf.call(seed, matched[i2]);
seed[idx] = !(matches2[idx] = matched[i2]);
}
}) : function(elem) {
return fn(elem, 0, args);
};
}
return fn;
}
},
pseudos: {
// Potentially complex pseudos
not: markFunction(function(selector) {
var input = [], results = [], matcher = compile(selector.replace(rtrimCSS, "$1"));
return matcher[expando] ? markFunction(function(seed, matches2, _context, xml) {
var elem, unmatched = matcher(seed, null, xml, []), i2 = seed.length;
while (i2--) {
if (elem = unmatched[i2]) {
seed[i2] = !(matches2[i2] = elem);
}
}
}) : function(elem, _context, xml) {
input[0] = elem;
matcher(input, null, xml, results);
input[0] = null;
return !results.pop();
};
}),
has: markFunction(function(selector) {
return function(elem) {
return find(selector, elem).length > 0;
};
}),
contains: markFunction(function(text) {
text = text.replace(runescape, funescape);
return function(elem) {
return (elem.textContent || jQuery2.text(elem)).indexOf(text) > -1;
};
}),
// "Whether an element is represented by a :lang() selector
// is based solely on the element's language value
// being equal to the identifier C,
// or beginning with the identifier C immediately followed by "-".
// The matching of C against the element's language value is performed case-insensitively.
// The identifier C does not have to be a valid language name."
// https://www.w3.org/TR/selectors/#lang-pseudo
lang: markFunction(function(lang) {
if (!ridentifier.test(lang || "")) {
find.error("unsupported lang: " + lang);
}
lang = lang.replace(runescape, funescape).toLowerCase();
return function(elem) {
var elemLang;
do {
if (elemLang = documentIsHTML ? elem.lang : elem.getAttribute("xml:lang") || elem.getAttribute("lang")) {
elemLang = elemLang.toLowerCase();
return elemLang === lang || elemLang.indexOf(lang + "-") === 0;
}
} while ((elem = elem.parentNode) && elem.nodeType === 1);
return false;
};
}),
// Miscellaneous
target: function(elem) {
var hash = window2.location && window2.location.hash;
return hash && hash.slice(1) === elem.id;
},
root: function(elem) {
return elem === documentElement2;
},
focus: function(elem) {
return elem === safeActiveElement() && document3.hasFocus() && !!(elem.type || elem.href || ~elem.tabIndex);
},
// Boolean properties
enabled: createDisabledPseudo(false),
disabled: createDisabledPseudo(true),
checked: function(elem) {
return nodeName(elem, "input") && !!elem.checked || nodeName(elem, "option") && !!elem.selected;
},
selected: function(elem) {
if (elem.parentNode) {
elem.parentNode.selectedIndex;
}
return elem.selected === true;
},
// Contents
empty: function(elem) {
for (elem = elem.firstChild; elem; elem = elem.nextSibling) {
if (elem.nodeType < 6) {
return false;
}
}
return true;
},
parent: function(elem) {
return !Expr.pseudos.empty(elem);
},
// Element/input types
header: function(elem) {
return rheader.test(elem.nodeName);
},
input: function(elem) {
return rinputs.test(elem.nodeName);
},
button: function(elem) {
return nodeName(elem, "input") && elem.type === "button" || nodeName(elem, "button");
},
text: function(elem) {
var attr;
return nodeName(elem, "input") && elem.type === "text" && // Support: IE <10 only
// New HTML5 attribute values (e.g., "search") appear
// with elem.type === "text"
((attr = elem.getAttribute("type")) == null || attr.toLowerCase() === "text");
},
// Position-in-collection
first: createPositionalPseudo(function() {
return [0];
}),
last: createPositionalPseudo(function(_matchIndexes, length) {
return [length - 1];
}),
eq: createPositionalPseudo(function(_matchIndexes, length, argument) {
return [argument < 0 ? argument + length : argument];
}),
even: createPositionalPseudo(function(matchIndexes, length) {
var i2 = 0;
for (; i2 < length; i2 += 2) {
matchIndexes.push(i2);
}
return matchIndexes;
}),
odd: createPositionalPseudo(function(matchIndexes, length) {
var i2 = 1;
for (; i2 < length; i2 += 2) {
matchIndexes.push(i2);
}
return matchIndexes;
}),
lt: createPositionalPseudo(function(matchIndexes, length, argument) {
var i2;
if (argument < 0) {
i2 = argument + length;
} else if (argument > length) {
i2 = length;
} else {
i2 = argument;
}
for (; --i2 >= 0; ) {
matchIndexes.push(i2);
}
return matchIndexes;
}),
gt: createPositionalPseudo(function(matchIndexes, length, argument) {
var i2 = argument < 0 ? argument + length : argument;
for (; ++i2 < length; ) {
matchIndexes.push(i2);
}
return matchIndexes;
})
}
};
Expr.pseudos.nth = Expr.pseudos.eq;
for (i in { radio: true, checkbox: true, file: true, password: true, image: true }) {
Expr.pseudos[i] = createInputPseudo(i);
}
for (i in { submit: true, reset: true }) {
Expr.pseudos[i] = createButtonPseudo(i);
}
function setFilters() {
}
setFilters.prototype = Expr.filters = Expr.pseudos;
Expr.setFilters = new setFilters();
function tokenize(selector, parseOnly) {
var matched, match, tokens, type, soFar, groups, preFilters, cached = tokenCache[selector + " "];
if (cached) {
return parseOnly ? 0 : cached.slice(0);
}
soFar = selector;
groups = [];
preFilters = Expr.preFilter;
while (soFar) {
if (!matched || (match = rcomma.exec(soFar))) {
if (match) {
soFar = soFar.slice(match[0].length) || soFar;
}
groups.push(tokens = []);
}
matched = false;
if (match = rleadingCombinator.exec(soFar)) {
matched = match.shift();
tokens.push({
value: matched,
// Cast descendant combinators to space
type: match[0].replace(rtrimCSS, " ")
});
soFar = soFar.slice(matched.length);
}
for (type in Expr.filter) {
if ((match = matchExpr[type].exec(soFar)) && (!preFilters[type] || (match = preFilters[type](match)))) {
matched = match.shift();
tokens.push({
value: matched,
type,
matches: match
});
soFar = soFar.slice(matched.length);
}
}
if (!matched) {
break;
}
}
if (parseOnly) {
return soFar.length;
}
return soFar ? find.error(selector) : (
// Cache the tokens
tokenCache(selector, groups).slice(0)
);
}
function toSelector(tokens) {
var i2 = 0, len = tokens.length, selector = "";
for (; i2 < len; i2++) {
selector += tokens[i2].value;
}
return selector;
}
function addCombinator(matcher, combinator, base) {
var dir2 = combinator.dir, skip = combinator.next, key = skip || dir2, checkNonElements = base && key === "parentNode", doneName = done++;
return combinator.first ? (
// Check against closest ancestor/preceding element
function(elem, context, xml) {
while (elem = elem[dir2]) {
if (elem.nodeType === 1 || checkNonElements) {
return matcher(elem, context, xml);
}
}
return false;
}
) : (
// Check against all ancestor/preceding elements
function(elem, context, xml) {
var oldCache, outerCache, newCache = [dirruns, doneName];
if (xml) {
while (elem = elem[dir2]) {
if (elem.nodeType === 1 || checkNonElements) {
if (matcher(elem, context, xml)) {
return true;
}
}
}
} else {
while (elem = elem[dir2]) {
if (elem.nodeType === 1 || checkNonElements) {
outerCache = elem[expando] || (elem[expando] = {});
if (skip && nodeName(elem, skip)) {
elem = elem[dir2] || elem;
} else if ((oldCache = outerCache[key]) && oldCache[0] === dirruns && oldCache[1] === doneName) {
return newCache[2] = oldCache[2];
} else {
outerCache[key] = newCache;
if (newCache[2] = matcher(elem, context, xml)) {
return true;
}
}
}
}
}
return false;
}
);
}
function elementMatcher(matchers) {
return matchers.length > 1 ? function(elem, context, xml) {
var i2 = matchers.length;
while (i2--) {
if (!matchers[i2](elem, context, xml)) {
return false;
}
}
return true;
} : matchers[0];
}
function multipleContexts(selector, contexts, results) {
var i2 = 0, len = contexts.length;
for (; i2 < len; i2++) {
find(selector, contexts[i2], results);
}
return results;
}
function condense(unmatched, map, filter, context, xml) {
var elem, newUnmatched = [], i2 = 0, len = unmatched.length, mapped = map != null;
for (; i2 < len; i2++) {
if (elem = unmatched[i2]) {
if (!filter || filter(elem, context, xml)) {
newUnmatched.push(elem);
if (mapped) {
map.push(i2);
}
}
}
}
return newUnmatched;
}
function setMatcher(preFilter, selector, matcher, postFilter, postFinder, postSelector) {
if (postFilter && !postFilter[expando]) {
postFilter = setMatcher(postFilter);
}
if (postFinder && !postFinder[expando]) {
postFinder = setMatcher(postFinder, postSelector);
}
return markFunction(function(seed, results, context, xml) {
var temp, i2, elem, matcherOut, preMap = [], postMap = [], preexisting = results.length, elems = seed || multipleContexts(
selector || "*",
context.nodeType ? [context] : context,
[]
), matcherIn = preFilter && (seed || !selector) ? condense(elems, preMap, preFilter, context, xml) : elems;
if (matcher) {
matcherOut = postFinder || (seed ? preFilter : preexisting || postFilter) ? (
// ...intermediate processing is necessary
[]
) : (
// ...otherwise use results directly
results
);
matcher(matcherIn, matcherOut, context, xml);
} else {
matcherOut = matcherIn;
}
if (postFilter) {
temp = condense(matcherOut, postMap);
postFilter(temp, [], context, xml);
i2 = temp.length;
while (i2--) {
if (elem = temp[i2]) {
matcherOut[postMap[i2]] = !(matcherIn[postMap[i2]] = elem);
}
}
}
if (seed) {
if (postFinder || preFilter) {
if (postFinder) {
temp = [];
i2 = matcherOut.length;
while (i2--) {
if (elem = matcherOut[i2]) {
temp.push(matcherIn[i2] = elem);
}
}
postFinder(null, matcherOut = [], temp, xml);
}
i2 = matcherOut.length;
while (i2--) {
if ((elem = matcherOut[i2]) && (temp = postFinder ? indexOf.call(seed, elem) : preMap[i2]) > -1) {
seed[temp] = !(results[temp] = elem);
}
}
}
} else {
matcherOut = condense(
matcherOut === results ? matcherOut.splice(preexisting, matcherOut.length) : matcherOut
);
if (postFinder) {
postFinder(null, results, matcherOut, xml);
} else {
push2.apply(results, matcherOut);
}
}
});
}
function matcherFromTokens(tokens) {
var checkContext, matcher, j, len = tokens.length, leadingRelative = Expr.relative[tokens[0].type], implicitRelative = leadingRelative || Expr.relative[" "], i2 = leadingRelative ? 1 : 0, matchContext = addCombinator(function(elem) {
return elem === checkContext;
}, implicitRelative, true), matchAnyContext = addCombinator(function(elem) {
return indexOf.call(checkContext, elem) > -1;
}, implicitRelative, true), matchers = [function(elem, context, xml) {
var ret = !leadingRelative && (xml || context != outermostContext) || ((checkContext = context).nodeType ? matchContext(elem, context, xml) : matchAnyContext(elem, context, xml));
checkContext = null;
return ret;
}];
for (; i2 < len; i2++) {
if (matcher = Expr.relative[tokens[i2].type]) {
matchers = [addCombinator(elementMatcher(matchers), matcher)];
} else {
matcher = Expr.filter[tokens[i2].type].apply(null, tokens[i2].matches);
if (matcher[expando]) {
j = ++i2;
for (; j < len; j++) {
if (Expr.relative[tokens[j].type]) {
break;
}
}
return setMatcher(
i2 > 1 && elementMatcher(matchers),
i2 > 1 && toSelector(
// If the preceding token was a descendant combinator, insert an implicit any-element `*`
tokens.slice(0, i2 - 1).concat({ value: tokens[i2 - 2].type === " " ? "*" : "" })
).replace(rtrimCSS, "$1"),
matcher,
i2 < j && matcherFromTokens(tokens.slice(i2, j)),
j < len && matcherFromTokens(tokens = tokens.slice(j)),
j < len && toSelector(tokens)
);
}
matchers.push(matcher);
}
}
return elementMatcher(matchers);
}
function matcherFromGroupMatchers(elementMatchers, setMatchers) {
var bySet = setMatchers.length > 0, byElement = elementMatchers.length > 0, superMatcher = function(seed, context, xml, results, outermost) {
var elem, j, matcher, matchedCount = 0, i2 = "0", unmatched = seed && [], setMatched = [], contextBackup = outermostContext, elems = seed || byElement && Expr.find.TAG("*", outermost), dirrunsUnique = dirruns += contextBackup == null ? 1 : Math.random() || 0.1, len = elems.length;
if (outermost) {
outermostContext = context == document3 || context || outermost;
}
for (; i2 !== len && (elem = elems[i2]) != null; i2++) {
if (byElement && elem) {
j = 0;
if (!context && elem.ownerDocument != document3) {
setDocument(elem);
xml = !documentIsHTML;
}
while (matcher = elementMatchers[j++]) {
if (matcher(elem, context || document3, xml)) {
push2.call(results, elem);
break;
}
}
if (outermost) {
dirruns = dirrunsUnique;
}
}
if (bySet) {
if (elem = !matcher && elem) {
matchedCount--;
}
if (seed) {
unmatched.push(elem);
}
}
}
matchedCount += i2;
if (bySet && i2 !== matchedCount) {
j = 0;
while (matcher = setMatchers[j++]) {
matcher(unmatched, setMatched, context, xml);
}
if (seed) {
if (matchedCount > 0) {
while (i2--) {
if (!(unmatched[i2] || setMatched[i2])) {
setMatched[i2] = pop.call(results);
}
}
}
setMatched = condense(setMatched);
}
push2.apply(results, setMatched);
if (outermost && !seed && setMatched.length > 0 && matchedCount + setMatchers.length > 1) {
jQuery2.uniqueSort(results);
}
}
if (outermost) {
dirruns = dirrunsUnique;
outermostContext = contextBackup;
}
return unmatched;
};
return bySet ? markFunction(superMatcher) : superMatcher;
}
function compile(selector, match) {
var i2, setMatchers = [], elementMatchers = [], cached = compilerCache[selector + " "];
if (!cached) {
if (!match) {
match = tokenize(selector);
}
i2 = match.length;
while (i2--) {
cached = matcherFromTokens(match[i2]);
if (cached[expando]) {
setMatchers.push(cached);
} else {
elementMatchers.push(cached);
}
}
cached = compilerCache(
selector,
matcherFromGroupMatchers(elementMatchers, setMatchers)
);
cached.selector = selector;
}
return cached;
}
function select(selector, context, results, seed) {
var i2, tokens, token, type, find2, compiled = typeof selector === "function" && selector, match = !seed && tokenize(selector = compiled.selector || selector);
results = results || [];
if (match.length === 1) {
tokens = match[0] = match[0].slice(0);
if (tokens.length > 2 && (token = tokens[0]).type === "ID" && context.nodeType === 9 && documentIsHTML && Expr.relative[tokens[1].type]) {
context = (Expr.find.ID(
token.matches[0].replace(runescape, funescape),
context
) || [])[0];
if (!context) {
return results;
} else if (compiled) {
context = context.parentNode;
}
selector = selector.slice(tokens.shift().value.length);
}
i2 = matchExpr.needsContext.test(selector) ? 0 : tokens.length;
while (i2--) {
token = tokens[i2];
if (Expr.relative[type = token.type]) {
break;
}
if (find2 = Expr.find[type]) {
if (seed = find2(
token.matches[0].replace(runescape, funescape),
rsibling.test(tokens[0].type) && testContext(context.parentNode) || context
)) {
tokens.splice(i2, 1);
selector = seed.length && toSelector(tokens);
if (!selector) {
push2.apply(results, seed);
return results;
}
break;
}
}
}
}
(compiled || compile(selector, match))(
seed,
context,
!documentIsHTML,
results,
!context || rsibling.test(selector) && testContext(context.parentNode) || context
);
return results;
}
support.sortStable = expando.split("").sort(sortOrder).join("") === expando;
setDocument();
support.sortDetached = assert(function(el) {
return el.compareDocumentPosition(document3.createElement("fieldset")) & 1;
});
jQuery2.find = find;
jQuery2.expr[":"] = jQuery2.expr.pseudos;
jQuery2.unique = jQuery2.uniqueSort;
find.compile = compile;
find.select = select;
find.setDocument = setDocument;
find.tokenize = tokenize;
find.escape = jQuery2.escapeSelector;
find.getText = jQuery2.text;
find.isXML = jQuery2.isXMLDoc;
find.selectors = jQuery2.expr;
find.support = jQuery2.support;
find.uniqueSort = jQuery2.uniqueSort;
})();
var dir = function(elem, dir2, until) {
var matched = [], truncate = until !== void 0;
while ((elem = elem[dir2]) && elem.nodeType !== 9) {
if (elem.nodeType === 1) {
if (truncate && jQuery2(elem).is(until)) {
break;
}
matched.push(elem);
}
}
return matched;
};
var siblings = function(n, elem) {
var matched = [];
for (; n; n = n.nextSibling) {
if (n.nodeType === 1 && n !== elem) {
matched.push(n);
}
}
return matched;
};
var rneedsContext = jQuery2.expr.match.needsContext;
var rsingleTag = /^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;
function winnow(elements, qualifier, not) {
if (isFunction(qualifier)) {
return jQuery2.grep(elements, function(elem, i) {
return !!qualifier.call(elem, i, elem) !== not;
});
}
if (qualifier.nodeType) {
return jQuery2.grep(elements, function(elem) {
return elem === qualifier !== not;
});
}
if (typeof qualifier !== "string") {
return jQuery2.grep(elements, function(elem) {
return indexOf.call(qualifier, elem) > -1 !== not;
});
}
return jQuery2.filter(qualifier, elements, not);
}
jQuery2.filter = function(expr, elems, not) {
var elem = elems[0];
if (not) {
expr = ":not(" + expr + ")";
}
if (elems.length === 1 && elem.nodeType === 1) {
return jQuery2.find.matchesSelector(elem, expr) ? [elem] : [];
}
return jQuery2.find.matches(expr, jQuery2.grep(elems, function(elem2) {
return elem2.nodeType === 1;
}));
};
jQuery2.fn.extend({
find: function(selector) {
var i, ret, len = this.length, self2 = this;
if (typeof selector !== "string") {
return this.pushStack(jQuery2(selector).filter(function() {
for (i = 0; i < len; i++) {
if (jQuery2.contains(self2[i], this)) {
return true;
}
}
}));
}
ret = this.pushStack([]);
for (i = 0; i < len; i++) {
jQuery2.find(selector, self2[i], ret);
}
return len > 1 ? jQuery2.uniqueSort(ret) : ret;
},
filter: function(selector) {
return this.pushStack(winnow(this, selector || [], false));
},
not: function(selector) {
return this.pushStack(winnow(this, selector || [], true));
},
is: function(selector) {
return !!winnow(
this,
// If this is a positional/relative selector, check membership in the returned set
// so $("p:first").is("p:last") won't return true for a doc with two "p".
typeof selector === "string" && rneedsContext.test(selector) ? jQuery2(selector) : selector || [],
false
).length;
}
});
var rootjQuery, rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/, init = jQuery2.fn.init = function(selector, context, root) {
var match, elem;
if (!selector) {
return this;
}
root = root || rootjQuery;
if (typeof selector === "string") {
if (selector[0] === "<" && selector[selector.length - 1] === ">" && selector.length >= 3) {
match = [null, selector, null];
} else {
match = rquickExpr.exec(selector);
}
if (match && (match[1] || !context)) {
if (match[1]) {
context = context instanceof jQuery2 ? context[0] : context;
jQuery2.merge(this, jQuery2.parseHTML(
match[1],
context && context.nodeType ? context.ownerDocument || context : document2,
true
));
if (rsingleTag.test(match[1]) && jQuery2.isPlainObject(context)) {
for (match in context) {
if (isFunction(this[match])) {
this[match](context[match]);
} else {
this.attr(match, context[match]);
}
}
}
return this;
} else {
elem = document2.getElementById(match[2]);
if (elem) {
this[0] = elem;
this.length = 1;
}
return this;
}
} else if (!context || context.jquery) {
return (context || root).find(selector);
} else {
return this.constructor(context).find(selector);
}
} else if (selector.nodeType) {
this[0] = selector;
this.length = 1;
return this;
} else if (isFunction(selector)) {
return root.ready !== void 0 ? root.ready(selector) : (
// Execute immediately if ready is not present
selector(jQuery2)
);
}
return jQuery2.makeArray(selector, this);
};
init.prototype = jQuery2.fn;
rootjQuery = jQuery2(document2);
var rparentsprev = /^(?:parents|prev(?:Until|All))/, guaranteedUnique = {
children: true,
contents: true,
next: true,
prev: true
};
jQuery2.fn.extend({
has: function(target) {
var targets = jQuery2(target, this), l = targets.length;
return this.filter(function() {
var i = 0;
for (; i < l; i++) {
if (jQuery2.contains(this, targets[i])) {
return true;
}
}
});
},
closest: function(selectors, context) {
var cur, i = 0, l = this.length, matched = [], targets = typeof selectors !== "string" && jQuery2(selectors);
if (!rneedsContext.test(selectors)) {
for (; i < l; i++) {
for (cur = this[i]; cur && cur !== context; cur = cur.parentNode) {
if (cur.nodeType < 11 && (targets ? targets.index(cur) > -1 : (
// Don't pass non-elements to jQuery#find
cur.nodeType === 1 && jQuery2.find.matchesSelector(cur, selectors)
))) {
matched.push(cur);
break;
}
}
}
}
return this.pushStack(matched.length > 1 ? jQuery2.uniqueSort(matched) : matched);
},
// Determine the position of an element within the set
index: function(elem) {
if (!elem) {
return this[0] && this[0].parentNode ? this.first().prevAll().length : -1;
}
if (typeof elem === "string") {
return indexOf.call(jQuery2(elem), this[0]);
}
return indexOf.call(
this,
// If it receives a jQuery object, the first element is used
elem.jquery ? elem[0] : elem
);
},
add: function(selector, context) {
return this.pushStack(
jQuery2.uniqueSort(
jQuery2.merge(this.get(), jQuery2(selector, context))
)
);
},
addBack: function(selector) {
return this.add(
selector == null ? this.prevObject : this.prevObject.filter(selector)
);
}
});
function sibling(cur, dir2) {
while ((cur = cur[dir2]) && cur.nodeType !== 1) {
}
return cur;
}
jQuery2.each({
parent: function(elem) {
var parent = elem.parentNode;
return parent && parent.nodeType !== 11 ? parent : null;
},
parents: function(elem) {
return dir(elem, "parentNode");
},
parentsUntil: function(elem, _i, until) {
return dir(elem, "parentNode", until);
},
next: function(elem) {
return sibling(elem, "nextSibling");
},
prev: function(elem) {
return sibling(elem, "previousSibling");
},
nextAll: function(elem) {
return dir(elem, "nextSibling");
},
prevAll: function(elem) {
return dir(elem, "previousSibling");
},
nextUntil: function(elem, _i, until) {
return dir(elem, "nextSibling", until);
},
prevUntil: function(elem, _i, until) {
return dir(elem, "previousSibling", until);
},
siblings: function(elem) {
return siblings((elem.parentNode || {}).firstChild, elem);
},
children: function(elem) {
return siblings(elem.firstChild);
},
contents: function(elem) {
if (elem.contentDocument != null && // Support: IE 11+
// <object> elements with no `data` attribute has an object
// `contentDocument` with a `null` prototype.
getProto(elem.contentDocument)) {
return elem.contentDocument;
}
if (nodeName(elem, "template")) {
elem = elem.content || elem;
}
return jQuery2.merge([], elem.childNodes);
}
}, function(name, fn) {
jQuery2.fn[name] = function(until, selector) {
var matched = jQuery2.map(this, fn, until);
if (name.slice(-5) !== "Until") {
selector = until;
}
if (selector && typeof selector === "string") {
matched = jQuery2.filter(selector, matched);
}
if (this.length > 1) {
if (!guaranteedUnique[name]) {
jQuery2.uniqueSort(matched);
}
if (rparentsprev.test(name)) {
matched.reverse();
}
}
return this.pushStack(matched);
};
});
var rnothtmlwhite = /[^\x20\t\r\n\f]+/g;
function createOptions(options) {
var object = {};
jQuery2.each(options.match(rnothtmlwhite) || [], function(_, flag) {
object[flag] = true;
});
return object;
}
jQuery2.Callbacks = function(options) {
options = typeof options === "string" ? createOptions(options) : jQuery2.extend({}, options);
var firing, memory, fired, locked, list = [], queue = [], firingIndex = -1, fire = function() {
locked = locked || options.once;
fired = firing = true;
for (; queue.length; firingIndex = -1) {
memory = queue.shift();
while (++firingIndex < list.length) {
if (list[firingIndex].apply(memory[0], memory[1]) === false && options.stopOnFalse) {
firingIndex = list.length;
memory = false;
}
}
}
if (!options.memory) {
memory = false;
}
firing = false;
if (locked) {
if (memory) {
list = [];
} else {
list = "";
}
}
}, self2 = {
// Add a callback or a collection of callbacks to the list
add: function() {
if (list) {
if (memory && !firing) {
firingIndex = list.length - 1;
queue.push(memory);
}
(function add(args) {
jQuery2.each(args, function(_, arg) {
if (isFunction(arg)) {
if (!options.unique || !self2.has(arg)) {
list.push(arg);
}
} else if (arg && arg.length && toType(arg) !== "string") {
add(arg);
}
});
})(arguments);
if (memory && !firing) {
fire();
}
}
return this;
},
// Remove a callback from the list
remove: function() {
jQuery2.each(arguments, function(_, arg) {
var index;
while ((index = jQuery2.inArray(arg, list, index)) > -1) {
list.splice(index, 1);
if (index <= firingIndex) {
firingIndex--;
}
}
});
return this;
},
// Check if a given callback is in the list.
// If no argument is given, return whether or not list has callbacks attached.
has: function(fn) {
return fn ? jQuery2.inArray(fn, list) > -1 : list.length > 0;
},
// Remove all callbacks from the list
empty: function() {
if (list) {
list = [];
}
return this;
},
// Disable .fire and .add
// Abort any current/pending executions
// Clear all callbacks and values
disable: function() {
locked = queue = [];
list = memory = "";
return this;
},
disabled: function() {
return !list;
},
// Disable .fire
// Also disable .add unless we have memory (since it would have no effect)
// Abort any pending executions
lock: function() {
locked = queue = [];
if (!memory && !firing) {
list = memory = "";
}
return this;
},
locked: function() {
return !!locked;
},
// Call all callbacks with the given context and arguments
fireWith: function(context, args) {
if (!locked) {
args = args || [];
args = [context, args.slice ? args.slice() : args];
queue.push(args);
if (!firing) {
fire();
}
}
return this;
},
// Call all the callbacks with the given arguments
fire: function() {
self2.fireWith(this, arguments);
return this;
},
// To know if the callbacks have already been called at least once
fired: function() {
return !!fired;
}
};
return self2;
};
function Identity(v) {
return v;
}
function Thrower(ex) {
throw ex;
}
function adoptValue(value, resolve, reject, noValue) {
var method;
try {
if (value && isFunction(method = value.promise)) {
method.call(value).done(resolve).fail(reject);
} else if (value && isFunction(method = value.then)) {
method.call(value, resolve, reject);
} else {
resolve.apply(void 0, [value].slice(noValue));
}
} catch (value2) {
reject.apply(void 0, [value2]);
}
}
jQuery2.extend({
Deferred: function(func) {
var tuples = [
// action, add listener, callbacks,
// ... .then handlers, argument index, [final state]
[
"notify",
"progress",
jQuery2.Callbacks("memory"),
jQuery2.Callbacks("memory"),
2
],
[
"resolve",
"done",
jQuery2.Callbacks("once memory"),
jQuery2.Callbacks("once memory"),
0,
"resolved"
],
[
"reject",
"fail",
jQuery2.Callbacks("once memory"),
jQuery2.Callbacks("once memory"),
1,
"rejected"
]
], state = "pending", promise = {
state: function() {
return state;
},
always: function() {
deferred.done(arguments).fail(arguments);
return this;
},
"catch": function(fn) {
return promise.then(null, fn);
},
// Keep pipe for back-compat
pipe: function() {
var fns = arguments;
return jQuery2.Deferred(function(newDefer) {
jQuery2.each(tuples, function(_i, tuple) {
var fn = isFunction(fns[tuple[4]]) && fns[tuple[4]];
deferred[tuple[1]](function() {
var returned = fn && fn.apply(this, arguments);
if (returned && isFunction(returned.promise)) {
returned.promise().progress(newDefer.notify).done(newDefer.resolve).fail(newDefer.reject);
} else {
newDefer[tuple[0] + "With"](
this,
fn ? [returned] : arguments
);
}
});
});
fns = null;
}).promise();
},
then: function(onFulfilled, onRejected, onProgress) {
var maxDepth = 0;
function resolve(depth, deferred2, handler, special) {
return function() {
var that = this, args = arguments, mightThrow = function() {
var returned, then;
if (depth < maxDepth) {
return;
}
returned = handler.apply(that, args);
if (returned === deferred2.promise()) {
throw new TypeError("Thenable self-resolution");
}
then = returned && // Support: Promises/A+ section 2.3.4
// https://promisesaplus.com/#point-64
// Only check objects and functions for thenability
(typeof returned === "object" || typeof returned === "function") && returned.then;
if (isFunction(then)) {
if (special) {
then.call(
returned,
resolve(maxDepth, deferred2, Identity, special),
resolve(maxDepth, deferred2, Thrower, special)
);
} else {
maxDepth++;
then.call(
returned,
resolve(maxDepth, deferred2, Identity, special),
resolve(maxDepth, deferred2, Thrower, special),
resolve(
maxDepth,
deferred2,
Identity,
deferred2.notifyWith
)
);
}
} else {
if (handler !== Identity) {
that = void 0;
args = [returned];
}
(special || deferred2.resolveWith)(that, args);
}
}, process = special ? mightThrow : function() {
try {
mightThrow();
} catch (e) {
if (jQuery2.Deferred.exceptionHook) {
jQuery2.Deferred.exceptionHook(
e,
process.error
);
}
if (depth + 1 >= maxDepth) {
if (handler !== Thrower) {
that = void 0;
args = [e];
}
deferred2.rejectWith(that, args);
}
}
};
if (depth) {
process();
} else {
if (jQuery2.Deferred.getErrorHook) {
process.error = jQuery2.Deferred.getErrorHook();
} else if (jQuery2.Deferred.getStackHook) {
process.error = jQuery2.Deferred.getStackHook();
}
window2.setTimeout(process);
}
};
}
return jQuery2.Deferred(function(newDefer) {
tuples[0][3].add(
resolve(
0,
newDefer,
isFunction(onProgress) ? onProgress : Identity,
newDefer.notifyWith
)
);
tuples[1][3].add(
resolve(
0,
newDefer,
isFunction(onFulfilled) ? onFulfilled : Identity
)
);
tuples[2][3].add(
resolve(
0,
newDefer,
isFunction(onRejected) ? onRejected : Thrower
)
);
}).promise();
},
// Get a promise for this deferred
// If obj is provided, the promise aspect is added to the object
promise: function(obj) {
return obj != null ? jQuery2.extend(obj, promise) : promise;
}
}, deferred = {};
jQuery2.each(tuples, function(i, tuple) {
var list = tuple[2], stateString = tuple[5];
promise[tuple[1]] = list.add;
if (stateString) {
list.add(
function() {
state = stateString;
},
// rejected_callbacks.disable
// fulfilled_callbacks.disable
tuples[3 - i][2].disable,
// rejected_handlers.disable
// fulfilled_handlers.disable
tuples[3 - i][3].disable,
// progress_callbacks.lock
tuples[0][2].lock,
// progress_handlers.lock
tuples[0][3].lock
);
}
list.add(tuple[3].fire);
deferred[tuple[0]] = function() {
deferred[tuple[0] + "With"](this === deferred ? void 0 : this, arguments);
return this;
};
deferred[tuple[0] + "With"] = list.fireWith;
});
promise.promise(deferred);
if (func) {
func.call(deferred, deferred);
}
return deferred;
},
// Deferred helper
when: function(singleValue) {
var remaining = arguments.length, i = remaining, resolveContexts = Array(i), resolveValues = slice.call(arguments), primary = jQuery2.Deferred(), updateFunc = function(i2) {
return function(value) {
resolveContexts[i2] = this;
resolveValues[i2] = arguments.length > 1 ? slice.call(arguments) : value;
if (!--remaining) {
primary.resolveWith(resolveContexts, resolveValues);
}
};
};
if (remaining <= 1) {
adoptValue(
singleValue,
primary.done(updateFunc(i)).resolve,
primary.reject,
!remaining
);
if (primary.state() === "pending" || isFunction(resolveValues[i] && resolveValues[i].then)) {
return primary.then();
}
}
while (i--) {
adoptValue(resolveValues[i], updateFunc(i), primary.reject);
}
return primary.promise();
}
});
var rerrorNames = /^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;
jQuery2.Deferred.exceptionHook = function(error, asyncError) {
if (window2.console && window2.console.warn && error && rerrorNames.test(error.name)) {
window2.console.warn(
"jQuery.Deferred exception: " + error.message,
error.stack,
asyncError
);
}
};
jQuery2.readyException = function(error) {
window2.setTimeout(function() {
throw error;
});
};
var readyList = jQuery2.Deferred();
jQuery2.fn.ready = function(fn) {
readyList.then(fn).catch(function(error) {
jQuery2.readyException(error);
});
return this;
};
jQuery2.extend({
// Is the DOM ready to be used? Set to true once it occurs.
isReady: false,
// A counter to track how many items to wait for before
// the ready event fires. See trac-6781
readyWait: 1,
// Handle when the DOM is ready
ready: function(wait) {
if (wait === true ? --jQuery2.readyWait : jQuery2.isReady) {
return;
}
jQuery2.isReady = true;
if (wait !== true && --jQuery2.readyWait > 0) {
return;
}
readyList.resolveWith(document2, [jQuery2]);
}
});
jQuery2.ready.then = readyList.then;
function completed() {
document2.removeEventListener("DOMContentLoaded", completed);
window2.removeEventListener("load", completed);
jQuery2.ready();
}
if (document2.readyState === "complete" || document2.readyState !== "loading" && !document2.documentElement.doScroll) {
window2.setTimeout(jQuery2.ready);
} else {
document2.addEventListener("DOMContentLoaded", completed);
window2.addEventListener("load", completed);
}
var access = function(elems, fn, key, value, chainable, emptyGet, raw) {
var i = 0, len = elems.length, bulk = key == null;
if (toType(key) === "object") {
chainable = true;
for (i in key) {
access(elems, fn, i, key[i], true, emptyGet, raw);
}
} else if (value !== void 0) {
chainable = true;
if (!isFunction(value)) {
raw = true;
}
if (bulk) {
if (raw) {
fn.call(elems, value);
fn = null;
} else {
bulk = fn;
fn = function(elem, _key, value2) {
return bulk.call(jQuery2(elem), value2);
};
}
}
if (fn) {
for (; i < len; i++) {
fn(
elems[i],
key,
raw ? value : value.call(elems[i], i, fn(elems[i], key))
);
}
}
}
if (chainable) {
return elems;
}
if (bulk) {
return fn.call(elems);
}
return len ? fn(elems[0], key) : emptyGet;
};
var rmsPrefix = /^-ms-/, rdashAlpha = /-([a-z])/g;
function fcamelCase(_all, letter) {
return letter.toUpperCase();
}
function camelCase(string) {
return string.replace(rmsPrefix, "ms-").replace(rdashAlpha, fcamelCase);
}
var acceptData = function(owner) {
return owner.nodeType === 1 || owner.nodeType === 9 || !+owner.nodeType;
};
function Data() {
this.expando = jQuery2.expando + Data.uid++;
}
Data.uid = 1;
Data.prototype = {
cache: function(owner) {
var value = owner[this.expando];
if (!value) {
value = {};
if (acceptData(owner)) {
if (owner.nodeType) {
owner[this.expando] = value;
} else {
Object.defineProperty(owner, this.expando, {
value,
configurable: true
});
}
}
}
return value;
},
set: function(owner, data, value) {
var prop, cache = this.cache(owner);
if (typeof data === "string") {
cache[camelCase(data)] = value;
} else {
for (prop in data) {
cache[camelCase(prop)] = data[prop];
}
}
return cache;
},
get: function(owner, key) {
return key === void 0 ? this.cache(owner) : (
// Always use camelCase key (gh-2257)
owner[this.expando] && owner[this.expando][camelCase(key)]
);
},
access: function(owner, key, value) {
if (key === void 0 || key && typeof key === "string" && value === void 0) {
return this.get(owner, key);
}
this.set(owner, key, value);
return value !== void 0 ? value : key;
},
remove: function(owner, key) {
var i, cache = owner[this.expando];
if (cache === void 0) {
return;
}
if (key !== void 0) {
if (Array.isArray(key)) {
key = key.map(camelCase);
} else {
key = camelCase(key);
key = key in cache ? [key] : key.match(rnothtmlwhite) || [];
}
i = key.length;
while (i--) {
delete cache[key[i]];
}
}
if (key === void 0 || jQuery2.isEmptyObject(cache)) {
if (owner.nodeType) {
owner[this.expando] = void 0;
} else {
delete owner[this.expando];
}
}
},
hasData: function(owner) {
var cache = owner[this.expando];
return cache !== void 0 && !jQuery2.isEmptyObject(cache);
}
};
var dataPriv = new Data();
var dataUser = new Data();
var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/, rmultiDash = /[A-Z]/g;
function getData(data) {
if (data === "true") {
return true;
}
if (data === "false") {
return false;
}
if (data === "null") {
return null;
}
if (data === +data + "") {
return +data;
}
if (rbrace.test(data)) {
return JSON.parse(data);
}
return data;
}
function dataAttr(elem, key, data) {
var name;
if (data === void 0 && elem.nodeType === 1) {
name = "data-" + key.replace(rmultiDash, "-$&").toLowerCase();
data = elem.getAttribute(name);
if (typeof data === "string") {
try {
data = getData(data);
} catch (e) {
}
dataUser.set(elem, key, data);
} else {
data = void 0;
}
}
return data;
}
jQuery2.extend({
hasData: function(elem) {
return dataUser.hasData(elem) || dataPriv.hasData(elem);
},
data: function(elem, name, data) {
return dataUser.access(elem, name, data);
},
removeData: function(elem, name) {
dataUser.remove(elem, name);
},
// TODO: Now that all calls to _data and _removeData have been replaced
// with direct calls to dataPriv methods, these can be deprecated.
_data: function(elem, name, data) {
return dataPriv.access(elem, name, data);
},
_removeData: function(elem, name) {
dataPriv.remove(elem, name);
}
});
jQuery2.fn.extend({
data: function(key, value) {
var i, name, data, elem = this[0], attrs = elem && elem.attributes;
if (key === void 0) {
if (this.length) {
data = dataUser.get(elem);
if (elem.nodeType === 1 && !dataPriv.get(elem, "hasDataAttrs")) {
i = attrs.length;
while (i--) {
if (attrs[i]) {
name = attrs[i].name;
if (name.indexOf("data-") === 0) {
name = camelCase(name.slice(5));
dataAttr(elem, name, data[name]);
}
}
}
dataPriv.set(elem, "hasDataAttrs", true);
}
}
return data;
}
if (typeof key === "object") {
return this.each(function() {
dataUser.set(this, key);
});
}
return access(this, function(value2) {
var data2;
if (elem && value2 === void 0) {
data2 = dataUser.get(elem, key);
if (data2 !== void 0) {
return data2;
}
data2 = dataAttr(elem, key);
if (data2 !== void 0) {
return data2;
}
return;
}
this.each(function() {
dataUser.set(this, key, value2);
});
}, null, value, arguments.length > 1, null, true);
},
removeData: function(key) {
return this.each(function() {
dataUser.remove(this, key);
});
}
});
jQuery2.extend({
queue: function(elem, type, data) {
var queue;
if (elem) {
type = (type || "fx") + "queue";
queue = dataPriv.get(elem, type);
if (data) {
if (!queue || Array.isArray(data)) {
queue = dataPriv.access(elem, type, jQuery2.makeArray(data));
} else {
queue.push(data);
}
}
return queue || [];
}
},
dequeue: function(elem, type) {
type = type || "fx";
var queue = jQuery2.queue(elem, type), startLength = queue.length, fn = queue.shift(), hooks = jQuery2._queueHooks(elem, type), next = function() {
jQuery2.dequeue(elem, type);
};
if (fn === "inprogress") {
fn = queue.shift();
startLength--;
}
if (fn) {
if (type === "fx") {
queue.unshift("inprogress");
}
delete hooks.stop;
fn.call(elem, next, hooks);
}
if (!startLength && hooks) {
hooks.empty.fire();
}
},
// Not public - generate a queueHooks object, or return the current one
_queueHooks: function(elem, type) {
var key = type + "queueHooks";
return dataPriv.get(elem, key) || dataPriv.access(elem, key, {
empty: jQuery2.Callbacks("once memory").add(function() {
dataPriv.remove(elem, [type + "queue", key]);
})
});
}
});
jQuery2.fn.extend({
queue: function(type, data) {
var setter = 2;
if (typeof type !== "string") {
data = type;
type = "fx";
setter--;
}
if (arguments.length < setter) {
return jQuery2.queue(this[0], type);
}
return data === void 0 ? this : this.each(function() {
var queue = jQuery2.queue(this, type, data);
jQuery2._queueHooks(this, type);
if (type === "fx" && queue[0] !== "inprogress") {
jQuery2.dequeue(this, type);
}
});
},
dequeue: function(type) {
return this.each(function() {
jQuery2.dequeue(this, type);
});
},
clearQueue: function(type) {
return this.queue(type || "fx", []);
},
// Get a promise resolved when queues of a certain type
// are emptied (fx is the type by default)
promise: function(type, obj) {
var tmp, count = 1, defer = jQuery2.Deferred(), elements = this, i = this.length, resolve = function() {
if (!--count) {
defer.resolveWith(elements, [elements]);
}
};
if (typeof type !== "string") {
obj = type;
type = void 0;
}
type = type || "fx";
while (i--) {
tmp = dataPriv.get(elements[i], type + "queueHooks");
if (tmp && tmp.empty) {
count++;
tmp.empty.add(resolve);
}
}
resolve();
return defer.promise(obj);
}
});
var pnum = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source;
var rcssNum = new RegExp("^(?:([+-])=|)(" + pnum + ")([a-z%]*)$", "i");
var cssExpand = ["Top", "Right", "Bottom", "Left"];
var documentElement = document2.documentElement;
var isAttached = function(elem) {
return jQuery2.contains(elem.ownerDocument, elem);
}, composed = { composed: true };
if (documentElement.getRootNode) {
isAttached = function(elem) {
return jQuery2.contains(elem.ownerDocument, elem) || elem.getRootNode(composed) === elem.ownerDocument;
};
}
var isHiddenWithinTree = function(elem, el) {
elem = el || elem;
return elem.style.display === "none" || elem.style.display === "" && // Otherwise, check computed style
// Support: Firefox <=43 - 45
// Disconnected elements can have computed display: none, so first confirm that elem is
// in the document.
isAttached(elem) && jQuery2.css(elem, "display") === "none";
};
function adjustCSS(elem, prop, valueParts, tween) {
var adjusted, scale, maxIterations = 20, currentValue = tween ? function() {
return tween.cur();
} : function() {
return jQuery2.css(elem, prop, "");
}, initial = currentValue(), unit = valueParts && valueParts[3] || (jQuery2.cssNumber[prop] ? "" : "px"), initialInUnit = elem.nodeType && (jQuery2.cssNumber[prop] || unit !== "px" && +initial) && rcssNum.exec(jQuery2.css(elem, prop));
if (initialInUnit && initialInUnit[3] !== unit) {
initial = initial / 2;
unit = unit || initialInUnit[3];
initialInUnit = +initial || 1;
while (maxIterations--) {
jQuery2.style(elem, prop, initialInUnit + unit);
if ((1 - scale) * (1 - (scale = currentValue() / initial || 0.5)) <= 0) {
maxIterations = 0;
}
initialInUnit = initialInUnit / scale;
}
initialInUnit = initialInUnit * 2;
jQuery2.style(elem, prop, initialInUnit + unit);
valueParts = valueParts || [];
}
if (valueParts) {
initialInUnit = +initialInUnit || +initial || 0;
adjusted = valueParts[1] ? initialInUnit + (valueParts[1] + 1) * valueParts[2] : +valueParts[2];
if (tween) {
tween.unit = unit;
tween.start = initialInUnit;
tween.end = adjusted;
}
}
return adjusted;
}
var defaultDisplayMap = {};
function getDefaultDisplay(elem) {
var temp, doc = elem.ownerDocument, nodeName2 = elem.nodeName, display = defaultDisplayMap[nodeName2];
if (display) {
return display;
}
temp = doc.body.appendChild(doc.createElement(nodeName2));
display = jQuery2.css(temp, "display");
temp.parentNode.removeChild(temp);
if (display === "none") {
display = "block";
}
defaultDisplayMap[nodeName2] = display;
return display;
}
function showHide(elements, show) {
var display, elem, values = [], index = 0, length = elements.length;
for (; index < length; index++) {
elem = elements[index];
if (!elem.style) {
continue;
}
display = elem.style.display;
if (show) {
if (display === "none") {
values[index] = dataPriv.get(elem, "display") || null;
if (!values[index]) {
elem.style.display = "";
}
}
if (elem.style.display === "" && isHiddenWithinTree(elem)) {
values[index] = getDefaultDisplay(elem);
}
} else {
if (display !== "none") {
values[index] = "none";
dataPriv.set(elem, "display", display);
}
}
}
for (index = 0; index < length; index++) {
if (values[index] != null) {
elements[index].style.display = values[index];
}
}
return elements;
}
jQuery2.fn.extend({
show: function() {
return showHide(this, true);
},
hide: function() {
return showHide(this);
},
toggle: function(state) {
if (typeof state === "boolean") {
return state ? this.show() : this.hide();
}
return this.each(function() {
if (isHiddenWithinTree(this)) {
jQuery2(this).show();
} else {
jQuery2(this).hide();
}
});
}
});
var rcheckableType = /^(?:checkbox|radio)$/i;
var rtagName = /<([a-z][^\/\0>\x20\t\r\n\f]*)/i;
var rscriptType = /^$|^module$|\/(?:java|ecma)script/i;
(function() {
var fragment = document2.createDocumentFragment(), div = fragment.appendChild(document2.createElement("div")), input = document2.createElement("input");
input.setAttribute("type", "radio");
input.setAttribute("checked", "checked");
input.setAttribute("name", "t");
div.appendChild(input);
support.checkClone = div.cloneNode(true).cloneNode(true).lastChild.checked;
div.innerHTML = "<textarea>x</textarea>";
support.noCloneChecked = !!div.cloneNode(true).lastChild.defaultValue;
div.innerHTML = "<option></option>";
support.option = !!div.lastChild;
})();
var wrapMap = {
// XHTML parsers do not magically insert elements in the
// same way that tag soup parsers do. So we cannot shorten
// this by omitting <tbody> or other required elements.
thead: [1, "<table>", "</table>"],
col: [2, "<table><colgroup>", "</colgroup></table>"],
tr: [2, "<table><tbody>", "</tbody></table>"],
td: [3, "<table><tbody><tr>", "</tr></tbody></table>"],
_default: [0, "", ""]
};
wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
wrapMap.th = wrapMap.td;
if (!support.option) {
wrapMap.optgroup = wrapMap.option = [1, "<select multiple='multiple'>", "</select>"];
}
function getAll(context, tag) {
var ret;
if (typeof context.getElementsByTagName !== "undefined") {
ret = context.getElementsByTagName(tag || "*");
} else if (typeof context.querySelectorAll !== "undefined") {
ret = context.querySelectorAll(tag || "*");
} else {
ret = [];
}
if (tag === void 0 || tag && nodeName(context, tag)) {
return jQuery2.merge([context], ret);
}
return ret;
}
function setGlobalEval(elems, refElements) {
var i = 0, l = elems.length;
for (; i < l; i++) {
dataPriv.set(
elems[i],
"globalEval",
!refElements || dataPriv.get(refElements[i], "globalEval")
);
}
}
var rhtml = /<|&#?\w+;/;
function buildFragment(elems, context, scripts, selection, ignored) {
var elem, tmp, tag, wrap, attached, j, fragment = context.createDocumentFragment(), nodes = [], i = 0, l = elems.length;
for (; i < l; i++) {
elem = elems[i];
if (elem || elem === 0) {
if (toType(elem) === "object") {
jQuery2.merge(nodes, elem.nodeType ? [elem] : elem);
} else if (!rhtml.test(elem)) {
nodes.push(context.createTextNode(elem));
} else {
tmp = tmp || fragment.appendChild(context.createElement("div"));
tag = (rtagName.exec(elem) || ["", ""])[1].toLowerCase();
wrap = wrapMap[tag] || wrapMap._default;
tmp.innerHTML = wrap[1] + jQuery2.htmlPrefilter(elem) + wrap[2];
j = wrap[0];
while (j--) {
tmp = tmp.lastChild;
}
jQuery2.merge(nodes, tmp.childNodes);
tmp = fragment.firstChild;
tmp.textContent = "";
}
}
}
fragment.textContent = "";
i = 0;
while (elem = nodes[i++]) {
if (selection && jQuery2.inArray(elem, selection) > -1) {
if (ignored) {
ignored.push(elem);
}
continue;
}
attached = isAttached(elem);
tmp = getAll(fragment.appendChild(elem), "script");
if (attached) {
setGlobalEval(tmp);
}
if (scripts) {
j = 0;
while (elem = tmp[j++]) {
if (rscriptType.test(elem.type || "")) {
scripts.push(elem);
}
}
}
}
return fragment;
}
var rtypenamespace = /^([^.]*)(?:\.(.+)|)/;
function returnTrue() {
return true;
}
function returnFalse() {
return false;
}
function on(elem, types, selector, data, fn, one) {
var origFn, type;
if (typeof types === "object") {
if (typeof selector !== "string") {
data = data || selector;
selector = void 0;
}
for (type in types) {
on(elem, type, selector, data, types[type], one);
}
return elem;
}
if (data == null && fn == null) {
fn = selector;
data = selector = void 0;
} else if (fn == null) {
if (typeof selector === "string") {
fn = data;
data = void 0;
} else {
fn = data;
data = selector;
selector = void 0;
}
}
if (fn === false) {
fn = returnFalse;
} else if (!fn) {
return elem;
}
if (one === 1) {
origFn = fn;
fn = function(event) {
jQuery2().off(event);
return origFn.apply(this, arguments);
};
fn.guid = origFn.guid || (origFn.guid = jQuery2.guid++);
}
return elem.each(function() {
jQuery2.event.add(this, types, fn, data, selector);
});
}
jQuery2.event = {
global: {},
add: function(elem, types, handler, data, selector) {
var handleObjIn, eventHandle, tmp, events, t, handleObj, special, handlers, type, namespaces, origType, elemData = dataPriv.get(elem);
if (!acceptData(elem)) {
return;
}
if (handler.handler) {
handleObjIn = handler;
handler = handleObjIn.handler;
selector = handleObjIn.selector;
}
if (selector) {
jQuery2.find.matchesSelector(documentElement, selector);
}
if (!handler.guid) {
handler.guid = jQuery2.guid++;
}
if (!(events = elemData.events)) {
events = elemData.events = /* @__PURE__ */ Object.create(null);
}
if (!(eventHandle = elemData.handle)) {
eventHandle = elemData.handle = function(e) {
return typeof jQuery2 !== "undefined" && jQuery2.event.triggered !== e.type ? jQuery2.event.dispatch.apply(elem, arguments) : void 0;
};
}
types = (types || "").match(rnothtmlwhite) || [""];
t = types.length;
while (t--) {
tmp = rtypenamespace.exec(types[t]) || [];
type = origType = tmp[1];
namespaces = (tmp[2] || "").split(".").sort();
if (!type) {
continue;
}
special = jQuery2.event.special[type] || {};
type = (selector ? special.delegateType : special.bindType) || type;
special = jQuery2.event.special[type] || {};
handleObj = jQuery2.extend({
type,
origType,
data,
handler,
guid: handler.guid,
selector,
needsContext: selector && jQuery2.expr.match.needsContext.test(selector),
namespace: namespaces.join(".")
}, handleObjIn);
if (!(handlers = events[type])) {
handlers = events[type] = [];
handlers.delegateCount = 0;
if (!special.setup || special.setup.call(elem, data, namespaces, eventHandle) === false) {
if (elem.addEventListener) {
elem.addEventListener(type, eventHandle);
}
}
}
if (special.add) {
special.add.call(elem, handleObj);
if (!handleObj.handler.guid) {
handleObj.handler.guid = handler.guid;
}
}
if (selector) {
handlers.splice(handlers.delegateCount++, 0, handleObj);
} else {
handlers.push(handleObj);
}
jQuery2.event.global[type] = true;
}
},
// Detach an event or set of events from an element
remove: function(elem, types, handler, selector, mappedTypes) {
var j, origCount, tmp, events, t, handleObj, special, handlers, type, namespaces, origType, elemData = dataPriv.hasData(elem) && dataPriv.get(elem);
if (!elemData || !(events = elemData.events)) {
return;
}
types = (types || "").match(rnothtmlwhite) || [""];
t = types.length;
while (t--) {
tmp = rtypenamespace.exec(types[t]) || [];
type = origType = tmp[1];
namespaces = (tmp[2] || "").split(".").sort();
if (!type) {
for (type in events) {
jQuery2.event.remove(elem, type + types[t], handler, selector, true);
}
continue;
}
special = jQuery2.event.special[type] || {};
type = (selector ? special.delegateType : special.bindType) || type;
handlers = events[type] || [];
tmp = tmp[2] && new RegExp("(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)");
origCount = j = handlers.length;
while (j--) {
handleObj = handlers[j];
if ((mappedTypes || origType === handleObj.origType) && (!handler || handler.guid === handleObj.guid) && (!tmp || tmp.test(handleObj.namespace)) && (!selector || selector === handleObj.selector || selector === "**" && handleObj.selector)) {
handlers.splice(j, 1);
if (handleObj.selector) {
handlers.delegateCount--;
}
if (special.remove) {
special.remove.call(elem, handleObj);
}
}
}
if (origCount && !handlers.length) {
if (!special.teardown || special.teardown.call(elem, namespaces, elemData.handle) === false) {
jQuery2.removeEvent(elem, type, elemData.handle);
}
delete events[type];
}
}
if (jQuery2.isEmptyObject(events)) {
dataPriv.remove(elem, "handle events");
}
},
dispatch: function(nativeEvent) {
var i, j, ret, matched, handleObj, handlerQueue, args = new Array(arguments.length), event = jQuery2.event.fix(nativeEvent), handlers = (dataPriv.get(this, "events") || /* @__PURE__ */ Object.create(null))[event.type] || [], special = jQuery2.event.special[event.type] || {};
args[0] = event;
for (i = 1; i < arguments.length; i++) {
args[i] = arguments[i];
}
event.delegateTarget = this;
if (special.preDispatch && special.preDispatch.call(this, event) === false) {
return;
}
handlerQueue = jQuery2.event.handlers.call(this, event, handlers);
i = 0;
while ((matched = handlerQueue[i++]) && !event.isPropagationStopped()) {
event.currentTarget = matched.elem;
j = 0;
while ((handleObj = matched.handlers[j++]) && !event.isImmediatePropagationStopped()) {
if (!event.rnamespace || handleObj.namespace === false || event.rnamespace.test(handleObj.namespace)) {
event.handleObj = handleObj;
event.data = handleObj.data;
ret = ((jQuery2.event.special[handleObj.origType] || {}).handle || handleObj.handler).apply(matched.elem, args);
if (ret !== void 0) {
if ((event.result = ret) === false) {
event.preventDefault();
event.stopPropagation();
}
}
}
}
}
if (special.postDispatch) {
special.postDispatch.call(this, event);
}
return event.result;
},
handlers: function(event, handlers) {
var i, handleObj, sel, matchedHandlers, matchedSelectors, handlerQueue = [], delegateCount = handlers.delegateCount, cur = event.target;
if (delegateCount && // Support: IE <=9
// Black-hole SVG <use> instance trees (trac-13180)
cur.nodeType && // Support: Firefox <=42
// Suppress spec-violating clicks indicating a non-primary pointer button (trac-3861)
// https://www.w3.org/TR/DOM-Level-3-Events/#event-type-click
// Support: IE 11 only
// ...but not arrow key "clicks" of radio inputs, which can have `button` -1 (gh-2343)
!(event.type === "click" && event.button >= 1)) {
for (; cur !== this; cur = cur.parentNode || this) {
if (cur.nodeType === 1 && !(event.type === "click" && cur.disabled === true)) {
matchedHandlers = [];
matchedSelectors = {};
for (i = 0; i < delegateCount; i++) {
handleObj = handlers[i];
sel = handleObj.selector + " ";
if (matchedSelectors[sel] === void 0) {
matchedSelectors[sel] = handleObj.needsContext ? jQuery2(sel, this).index(cur) > -1 : jQuery2.find(sel, this, null, [cur]).length;
}
if (matchedSelectors[sel]) {
matchedHandlers.push(handleObj);
}
}
if (matchedHandlers.length) {
handlerQueue.push({ elem: cur, handlers: matchedHandlers });
}
}
}
}
cur = this;
if (delegateCount < handlers.length) {
handlerQueue.push({ elem: cur, handlers: handlers.slice(delegateCount) });
}
return handlerQueue;
},
addProp: function(name, hook) {
Object.defineProperty(jQuery2.Event.prototype, name, {
enumerable: true,
configurable: true,
get: isFunction(hook) ? function() {
if (this.originalEvent) {
return hook(this.originalEvent);
}
} : function() {
if (this.originalEvent) {
return this.originalEvent[name];
}
},
set: function(value) {
Object.defineProperty(this, name, {
enumerable: true,
configurable: true,
writable: true,
value
});
}
});
},
fix: function(originalEvent) {
return originalEvent[jQuery2.expando] ? originalEvent : new jQuery2.Event(originalEvent);
},
special: {
load: {
// Prevent triggered image.load events from bubbling to window.load
noBubble: true
},
click: {
// Utilize native event to ensure correct state for checkable inputs
setup: function(data) {
var el = this || data;
if (rcheckableType.test(el.type) && el.click && nodeName(el, "input")) {
leverageNative(el, "click", true);
}
return false;
},
trigger: function(data) {
var el = this || data;
if (rcheckableType.test(el.type) && el.click && nodeName(el, "input")) {
leverageNative(el, "click");
}
return true;
},
// For cross-browser consistency, suppress native .click() on links
// Also prevent it if we're currently inside a leveraged native-event stack
_default: function(event) {
var target = event.target;
return rcheckableType.test(target.type) && target.click && nodeName(target, "input") && dataPriv.get(target, "click") || nodeName(target, "a");
}
},
beforeunload: {
postDispatch: function(event) {
if (event.result !== void 0 && event.originalEvent) {
event.originalEvent.returnValue = event.result;
}
}
}
}
};
function leverageNative(el, type, isSetup) {
if (!isSetup) {
if (dataPriv.get(el, type) === void 0) {
jQuery2.event.add(el, type, returnTrue);
}
return;
}
dataPriv.set(el, type, false);
jQuery2.event.add(el, type, {
namespace: false,
handler: function(event) {
var result, saved = dataPriv.get(this, type);
if (event.isTrigger & 1 && this[type]) {
if (!saved) {
saved = slice.call(arguments);
dataPriv.set(this, type, saved);
this[type]();
result = dataPriv.get(this, type);
dataPriv.set(this, type, false);
if (saved !== result) {
event.stopImmediatePropagation();
event.preventDefault();
return result;
}
} else if ((jQuery2.event.special[type] || {}).delegateType) {
event.stopPropagation();
}
} else if (saved) {
dataPriv.set(this, type, jQuery2.event.trigger(
saved[0],
saved.slice(1),
this
));
event.stopPropagation();
event.isImmediatePropagationStopped = returnTrue;
}
}
});
}
jQuery2.removeEvent = function(elem, type, handle) {
if (elem.removeEventListener) {
elem.removeEventListener(type, handle);
}
};
jQuery2.Event = function(src, props) {
if (!(this instanceof jQuery2.Event)) {
return new jQuery2.Event(src, props);
}
if (src && src.type) {
this.originalEvent = src;
this.type = src.type;
this.isDefaultPrevented = src.defaultPrevented || src.defaultPrevented === void 0 && // Support: Android <=2.3 only
src.returnValue === false ? returnTrue : returnFalse;
this.target = src.target && src.target.nodeType === 3 ? src.target.parentNode : src.target;
this.currentTarget = src.currentTarget;
this.relatedTarget = src.relatedTarget;
} else {
this.type = src;
}
if (props) {
jQuery2.extend(this, props);
}
this.timeStamp = src && src.timeStamp || Date.now();
this[jQuery2.expando] = true;
};
jQuery2.Event.prototype = {
constructor: jQuery2.Event,
isDefaultPrevented: returnFalse,
isPropagationStopped: returnFalse,
isImmediatePropagationStopped: returnFalse,
isSimulated: false,
preventDefault: function() {
var e = this.originalEvent;
this.isDefaultPrevented = returnTrue;
if (e && !this.isSimulated) {
e.preventDefault();
}
},
stopPropagation: function() {
var e = this.originalEvent;
this.isPropagationStopped = returnTrue;
if (e && !this.isSimulated) {
e.stopPropagation();
}
},
stopImmediatePropagation: function() {
var e = this.originalEvent;
this.isImmediatePropagationStopped = returnTrue;
if (e && !this.isSimulated) {
e.stopImmediatePropagation();
}
this.stopPropagation();
}
};
jQuery2.each({
altKey: true,
bubbles: true,
cancelable: true,
changedTouches: true,
ctrlKey: true,
detail: true,
eventPhase: true,
metaKey: true,
pageX: true,
pageY: true,
shiftKey: true,
view: true,
"char": true,
code: true,
charCode: true,
key: true,
keyCode: true,
button: true,
buttons: true,
clientX: true,
clientY: true,
offsetX: true,
offsetY: true,
pointerId: true,
pointerType: true,
screenX: true,
screenY: true,
targetTouches: true,
toElement: true,
touches: true,
which: true
}, jQuery2.event.addProp);
jQuery2.each({ focus: "focusin", blur: "focusout" }, function(type, delegateType) {
function focusMappedHandler(nativeEvent) {
if (document2.documentMode) {
var handle = dataPriv.get(this, "handle"), event = jQuery2.event.fix(nativeEvent);
event.type = nativeEvent.type === "focusin" ? "focus" : "blur";
event.isSimulated = true;
handle(nativeEvent);
if (event.target === event.currentTarget) {
handle(event);
}
} else {
jQuery2.event.simulate(
delegateType,
nativeEvent.target,
jQuery2.event.fix(nativeEvent)
);
}
}
jQuery2.event.special[type] = {
// Utilize native event if possible so blur/focus sequence is correct
setup: function() {
var attaches;
leverageNative(this, type, true);
if (document2.documentMode) {
attaches = dataPriv.get(this, delegateType);
if (!attaches) {
this.addEventListener(delegateType, focusMappedHandler);
}
dataPriv.set(this, delegateType, (attaches || 0) + 1);
} else {
return false;
}
},
trigger: function() {
leverageNative(this, type);
return true;
},
teardown: function() {
var attaches;
if (document2.documentMode) {
attaches = dataPriv.get(this, delegateType) - 1;
if (!attaches) {
this.removeEventListener(delegateType, focusMappedHandler);
dataPriv.remove(this, delegateType);
} else {
dataPriv.set(this, delegateType, attaches);
}
} else {
return false;
}
},
// Suppress native focus or blur if we're currently inside
// a leveraged native-event stack
_default: function(event) {
return dataPriv.get(event.target, type);
},
delegateType
};
jQuery2.event.special[delegateType] = {
setup: function() {
var doc = this.ownerDocument || this.document || this, dataHolder = document2.documentMode ? this : doc, attaches = dataPriv.get(dataHolder, delegateType);
if (!attaches) {
if (document2.documentMode) {
this.addEventListener(delegateType, focusMappedHandler);
} else {
doc.addEventListener(type, focusMappedHandler, true);
}
}
dataPriv.set(dataHolder, delegateType, (attaches || 0) + 1);
},
teardown: function() {
var doc = this.ownerDocument || this.document || this, dataHolder = document2.documentMode ? this : doc, attaches = dataPriv.get(dataHolder, delegateType) - 1;
if (!attaches) {
if (document2.documentMode) {
this.removeEventListener(delegateType, focusMappedHandler);
} else {
doc.removeEventListener(type, focusMappedHandler, true);
}
dataPriv.remove(dataHolder, delegateType);
} else {
dataPriv.set(dataHolder, delegateType, attaches);
}
}
};
});
jQuery2.each({
mouseenter: "mouseover",
mouseleave: "mouseout",
pointerenter: "pointerover",
pointerleave: "pointerout"
}, function(orig, fix) {
jQuery2.event.special[orig] = {
delegateType: fix,
bindType: fix,
handle: function(event) {
var ret, target = this, related = event.relatedTarget, handleObj = event.handleObj;
if (!related || related !== target && !jQuery2.contains(target, related)) {
event.type = handleObj.origType;
ret = handleObj.handler.apply(this, arguments);
event.type = fix;
}
return ret;
}
};
});
jQuery2.fn.extend({
on: function(types, selector, data, fn) {
return on(this, types, selector, data, fn);
},
one: function(types, selector, data, fn) {
return on(this, types, selector, data, fn, 1);
},
off: function(types, selector, fn) {
var handleObj, type;
if (types && types.preventDefault && types.handleObj) {
handleObj = types.handleObj;
jQuery2(types.delegateTarget).off(
handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType,
handleObj.selector,
handleObj.handler
);
return this;
}
if (typeof types === "object") {
for (type in types) {
this.off(type, selector, types[type]);
}
return this;
}
if (selector === false || typeof selector === "function") {
fn = selector;
selector = void 0;
}
if (fn === false) {
fn = returnFalse;
}
return this.each(function() {
jQuery2.event.remove(this, types, fn, selector);
});
}
});
var rnoInnerhtml = /<script|<style|<link/i, rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i, rcleanScript = /^\s*<!\[CDATA\[|\]\]>\s*$/g;
function manipulationTarget(elem, content) {
if (nodeName(elem, "table") && nodeName(content.nodeType !== 11 ? content : content.firstChild, "tr")) {
return jQuery2(elem).children("tbody")[0] || elem;
}
return elem;
}
function disableScript(elem) {
elem.type = (elem.getAttribute("type") !== null) + "/" + elem.type;
return elem;
}
function restoreScript(elem) {
if ((elem.type || "").slice(0, 5) === "true/") {
elem.type = elem.type.slice(5);
} else {
elem.removeAttribute("type");
}
return elem;
}
function cloneCopyEvent(src, dest) {
var i, l, type, pdataOld, udataOld, udataCur, events;
if (dest.nodeType !== 1) {
return;
}
if (dataPriv.hasData(src)) {
pdataOld = dataPriv.get(src);
events = pdataOld.events;
if (events) {
dataPriv.remove(dest, "handle events");
for (type in events) {
for (i = 0, l = events[type].length; i < l; i++) {
jQuery2.event.add(dest, type, events[type][i]);
}
}
}
}
if (dataUser.hasData(src)) {
udataOld = dataUser.access(src);
udataCur = jQuery2.extend({}, udataOld);
dataUser.set(dest, udataCur);
}
}
function fixInput(src, dest) {
var nodeName2 = dest.nodeName.toLowerCase();
if (nodeName2 === "input" && rcheckableType.test(src.type)) {
dest.checked = src.checked;
} else if (nodeName2 === "input" || nodeName2 === "textarea") {
dest.defaultValue = src.defaultValue;
}
}
function domManip(collection, args, callback, ignored) {
args = flat(args);
var fragment, first, scripts, hasScripts, node, doc, i = 0, l = collection.length, iNoClone = l - 1, value = args[0], valueIsFunction = isFunction(value);
if (valueIsFunction || l > 1 && typeof value === "string" && !support.checkClone && rchecked.test(value)) {
return collection.each(function(index) {
var self2 = collection.eq(index);
if (valueIsFunction) {
args[0] = value.call(this, index, self2.html());
}
domManip(self2, args, callback, ignored);
});
}
if (l) {
fragment = buildFragment(args, collection[0].ownerDocument, false, collection, ignored);
first = fragment.firstChild;
if (fragment.childNodes.length === 1) {
fragment = first;
}
if (first || ignored) {
scripts = jQuery2.map(getAll(fragment, "script"), disableScript);
hasScripts = scripts.length;
for (; i < l; i++) {
node = fragment;
if (i !== iNoClone) {
node = jQuery2.clone(node, true, true);
if (hasScripts) {
jQuery2.merge(scripts, getAll(node, "script"));
}
}
callback.call(collection[i], node, i);
}
if (hasScripts) {
doc = scripts[scripts.length - 1].ownerDocument;
jQuery2.map(scripts, restoreScript);
for (i = 0; i < hasScripts; i++) {
node = scripts[i];
if (rscriptType.test(node.type || "") && !dataPriv.access(node, "globalEval") && jQuery2.contains(doc, node)) {
if (node.src && (node.type || "").toLowerCase() !== "module") {
if (jQuery2._evalUrl && !node.noModule) {
jQuery2._evalUrl(node.src, {
nonce: node.nonce || node.getAttribute("nonce")
}, doc);
}
} else {
DOMEval(node.textContent.replace(rcleanScript, ""), node, doc);
}
}
}
}
}
}
return collection;
}
function remove(elem, selector, keepData) {
var node, nodes = selector ? jQuery2.filter(selector, elem) : elem, i = 0;
for (; (node = nodes[i]) != null; i++) {
if (!keepData && node.nodeType === 1) {
jQuery2.cleanData(getAll(node));
}
if (node.parentNode) {
if (keepData && isAttached(node)) {
setGlobalEval(getAll(node, "script"));
}
node.parentNode.removeChild(node);
}
}
return elem;
}
jQuery2.extend({
htmlPrefilter: function(html) {
return html;
},
clone: function(elem, dataAndEvents, deepDataAndEvents) {
var i, l, srcElements, destElements, clone = elem.cloneNode(true), inPage = isAttached(elem);
if (!support.noCloneChecked && (elem.nodeType === 1 || elem.nodeType === 11) && !jQuery2.isXMLDoc(elem)) {
destElements = getAll(clone);
srcElements = getAll(elem);
for (i = 0, l = srcElements.length; i < l; i++) {
fixInput(srcElements[i], destElements[i]);
}
}
if (dataAndEvents) {
if (deepDataAndEvents) {
srcElements = srcElements || getAll(elem);
destElements = destElements || getAll(clone);
for (i = 0, l = srcElements.length; i < l; i++) {
cloneCopyEvent(srcElements[i], destElements[i]);
}
} else {
cloneCopyEvent(elem, clone);
}
}
destElements = getAll(clone, "script");
if (destElements.length > 0) {
setGlobalEval(destElements, !inPage && getAll(elem, "script"));
}
return clone;
},
cleanData: function(elems) {
var data, elem, type, special = jQuery2.event.special, i = 0;
for (; (elem = elems[i]) !== void 0; i++) {
if (acceptData(elem)) {
if (data = elem[dataPriv.expando]) {
if (data.events) {
for (type in data.events) {
if (special[type]) {
jQuery2.event.remove(elem, type);
} else {
jQuery2.removeEvent(elem, type, data.handle);
}
}
}
elem[dataPriv.expando] = void 0;
}
if (elem[dataUser.expando]) {
elem[dataUser.expando] = void 0;
}
}
}
}
});
jQuery2.fn.extend({
detach: function(selector) {
return remove(this, selector, true);
},
remove: function(selector) {
return remove(this, selector);
},
text: function(value) {
return access(this, function(value2) {
return value2 === void 0 ? jQuery2.text(this) : this.empty().each(function() {
if (this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9) {
this.textContent = value2;
}
});
}, null, value, arguments.length);
},
append: function() {
return domManip(this, arguments, function(elem) {
if (this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9) {
var target = manipulationTarget(this, elem);
target.appendChild(elem);
}
});
},
prepend: function() {
return domManip(this, arguments, function(elem) {
if (this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9) {
var target = manipulationTarget(this, elem);
target.insertBefore(elem, target.firstChild);
}
});
},
before: function() {
return domManip(this, arguments, function(elem) {
if (this.parentNode) {
this.parentNode.insertBefore(elem, this);
}
});
},
after: function() {
return domManip(this, arguments, function(elem) {
if (this.parentNode) {
this.parentNode.insertBefore(elem, this.nextSibling);
}
});
},
empty: function() {
var elem, i = 0;
for (; (elem = this[i]) != null; i++) {
if (elem.nodeType === 1) {
jQuery2.cleanData(getAll(elem, false));
elem.textContent = "";
}
}
return this;
},
clone: function(dataAndEvents, deepDataAndEvents) {
dataAndEvents = dataAndEvents == null ? false : dataAndEvents;
deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;
return this.map(function() {
return jQuery2.clone(this, dataAndEvents, deepDataAndEvents);
});
},
html: function(value) {
return access(this, function(value2) {
var elem = this[0] || {}, i = 0, l = this.length;
if (value2 === void 0 && elem.nodeType === 1) {
return elem.innerHTML;
}
if (typeof value2 === "string" && !rnoInnerhtml.test(value2) && !wrapMap[(rtagName.exec(value2) || ["", ""])[1].toLowerCase()]) {
value2 = jQuery2.htmlPrefilter(value2);
try {
for (; i < l; i++) {
elem = this[i] || {};
if (elem.nodeType === 1) {
jQuery2.cleanData(getAll(elem, false));
elem.innerHTML = value2;
}
}
elem = 0;
} catch (e) {
}
}
if (elem) {
this.empty().append(value2);
}
}, null, value, arguments.length);
},
replaceWith: function() {
var ignored = [];
return domManip(this, arguments, function(elem) {
var parent = this.parentNode;
if (jQuery2.inArray(this, ignored) < 0) {
jQuery2.cleanData(getAll(this));
if (parent) {
parent.replaceChild(elem, this);
}
}
}, ignored);
}
});
jQuery2.each({
appendTo: "append",
prependTo: "prepend",
insertBefore: "before",
insertAfter: "after",
replaceAll: "replaceWith"
}, function(name, original) {
jQuery2.fn[name] = function(selector) {
var elems, ret = [], insert = jQuery2(selector), last = insert.length - 1, i = 0;
for (; i <= last; i++) {
elems = i === last ? this : this.clone(true);
jQuery2(insert[i])[original](elems);
push.apply(ret, elems.get());
}
return this.pushStack(ret);
};
});
var rnumnonpx = new RegExp("^(" + pnum + ")(?!px)[a-z%]+$", "i");
var rcustomProp = /^--/;
var getStyles = function(elem) {
var view = elem.ownerDocument.defaultView;
if (!view || !view.opener) {
view = window2;
}
return view.getComputedStyle(elem);
};
var swap = function(elem, options, callback) {
var ret, name, old = {};
for (name in options) {
old[name] = elem.style[name];
elem.style[name] = options[name];
}
ret = callback.call(elem);
for (name in options) {
elem.style[name] = old[name];
}
return ret;
};
var rboxStyle = new RegExp(cssExpand.join("|"), "i");
(function() {
function computeStyleTests() {
if (!div) {
return;
}
container.style.cssText = "position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0";
div.style.cssText = "position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%";
documentElement.appendChild(container).appendChild(div);
var divStyle = window2.getComputedStyle(div);
pixelPositionVal = divStyle.top !== "1%";
reliableMarginLeftVal = roundPixelMeasures(divStyle.marginLeft) === 12;
div.style.right = "60%";
pixelBoxStylesVal = roundPixelMeasures(divStyle.right) === 36;
boxSizingReliableVal = roundPixelMeasures(divStyle.width) === 36;
div.style.position = "absolute";
scrollboxSizeVal = roundPixelMeasures(div.offsetWidth / 3) === 12;
documentElement.removeChild(container);
div = null;
}
function roundPixelMeasures(measure) {
return Math.round(parseFloat(measure));
}
var pixelPositionVal, boxSizingReliableVal, scrollboxSizeVal, pixelBoxStylesVal, reliableTrDimensionsVal, reliableMarginLeftVal, container = document2.createElement("div"), div = document2.createElement("div");
if (!div.style) {
return;
}
div.style.backgroundClip = "content-box";
div.cloneNode(true).style.backgroundClip = "";
support.clearCloneStyle = div.style.backgroundClip === "content-box";
jQuery2.extend(support, {
boxSizingReliable: function() {
computeStyleTests();
return boxSizingReliableVal;
},
pixelBoxStyles: function() {
computeStyleTests();
return pixelBoxStylesVal;
},
pixelPosition: function() {
computeStyleTests();
return pixelPositionVal;
},
reliableMarginLeft: function() {
computeStyleTests();
return reliableMarginLeftVal;
},
scrollboxSize: function() {
computeStyleTests();
return scrollboxSizeVal;
},
// Support: IE 9 - 11+, Edge 15 - 18+
// IE/Edge misreport `getComputedStyle` of table rows with width/height
// set in CSS while `offset*` properties report correct values.
// Behavior in IE 9 is more subtle than in newer versions & it passes
// some versions of this test; make sure not to make it pass there!
//
// Support: Firefox 70+
// Only Firefox includes border widths
// in computed dimensions. (gh-4529)
reliableTrDimensions: function() {
var table, tr, trChild, trStyle;
if (reliableTrDimensionsVal == null) {
table = document2.createElement("table");
tr = document2.createElement("tr");
trChild = document2.createElement("div");
table.style.cssText = "position:absolute;left:-11111px;border-collapse:separate";
tr.style.cssText = "box-sizing:content-box;border:1px solid";
tr.style.height = "1px";
trChild.style.height = "9px";
trChild.style.display = "block";
documentElement.appendChild(table).appendChild(tr).appendChild(trChild);
trStyle = window2.getComputedStyle(tr);
reliableTrDimensionsVal = parseInt(trStyle.height, 10) + parseInt(trStyle.borderTopWidth, 10) + parseInt(trStyle.borderBottomWidth, 10) === tr.offsetHeight;
documentElement.removeChild(table);
}
return reliableTrDimensionsVal;
}
});
})();
function curCSS(elem, name, computed) {
var width, minWidth, maxWidth, ret, isCustomProp = rcustomProp.test(name), style = elem.style;
computed = computed || getStyles(elem);
if (computed) {
ret = computed.getPropertyValue(name) || computed[name];
if (isCustomProp && ret) {
ret = ret.replace(rtrimCSS, "$1") || void 0;
}
if (ret === "" && !isAttached(elem)) {
ret = jQuery2.style(elem, name);
}
if (!support.pixelBoxStyles() && rnumnonpx.test(ret) && rboxStyle.test(name)) {
width = style.width;
minWidth = style.minWidth;
maxWidth = style.maxWidth;
style.minWidth = style.maxWidth = style.width = ret;
ret = computed.width;
style.width = width;
style.minWidth = minWidth;
style.maxWidth = maxWidth;
}
}
return ret !== void 0 ? (
// Support: IE <=9 - 11 only
// IE returns zIndex value as an integer.
ret + ""
) : ret;
}
function addGetHookIf(conditionFn, hookFn) {
return {
get: function() {
if (conditionFn()) {
delete this.get;
return;
}
return (this.get = hookFn).apply(this, arguments);
}
};
}
var cssPrefixes = ["Webkit", "Moz", "ms"], emptyStyle = document2.createElement("div").style, vendorProps = {};
function vendorPropName(name) {
var capName = name[0].toUpperCase() + name.slice(1), i = cssPrefixes.length;
while (i--) {
name = cssPrefixes[i] + capName;
if (name in emptyStyle) {
return name;
}
}
}
function finalPropName(name) {
var final = jQuery2.cssProps[name] || vendorProps[name];
if (final) {
return final;
}
if (name in emptyStyle) {
return name;
}
return vendorProps[name] = vendorPropName(name) || name;
}
var rdisplayswap = /^(none|table(?!-c[ea]).+)/, cssShow = { position: "absolute", visibility: "hidden", display: "block" }, cssNormalTransform = {
letterSpacing: "0",
fontWeight: "400"
};
function setPositiveNumber(_elem, value, subtract) {
var matches = rcssNum.exec(value);
return matches ? (
// Guard against undefined "subtract", e.g., when used as in cssHooks
Math.max(0, matches[2] - (subtract || 0)) + (matches[3] || "px")
) : value;
}
function boxModelAdjustment(elem, dimension, box, isBorderBox, styles, computedVal) {
var i = dimension === "width" ? 1 : 0, extra = 0, delta = 0, marginDelta = 0;
if (box === (isBorderBox ? "border" : "content")) {
return 0;
}
for (; i < 4; i += 2) {
if (box === "margin") {
marginDelta += jQuery2.css(elem, box + cssExpand[i], true, styles);
}
if (!isBorderBox) {
delta += jQuery2.css(elem, "padding" + cssExpand[i], true, styles);
if (box !== "padding") {
delta += jQuery2.css(elem, "border" + cssExpand[i] + "Width", true, styles);
} else {
extra += jQuery2.css(elem, "border" + cssExpand[i] + "Width", true, styles);
}
} else {
if (box === "content") {
delta -= jQuery2.css(elem, "padding" + cssExpand[i], true, styles);
}
if (box !== "margin") {
delta -= jQuery2.css(elem, "border" + cssExpand[i] + "Width", true, styles);
}
}
}
if (!isBorderBox && computedVal >= 0) {
delta += Math.max(0, Math.ceil(
elem["offset" + dimension[0].toUpperCase() + dimension.slice(1)] - computedVal - delta - extra - 0.5
// If offsetWidth/offsetHeight is unknown, then we can't determine content-box scroll gutter
// Use an explicit zero to avoid NaN (gh-3964)
)) || 0;
}
return delta + marginDelta;
}
function getWidthOrHeight(elem, dimension, extra) {
var styles = getStyles(elem), boxSizingNeeded = !support.boxSizingReliable() || extra, isBorderBox = boxSizingNeeded && jQuery2.css(elem, "boxSizing", false, styles) === "border-box", valueIsBorderBox = isBorderBox, val = curCSS(elem, dimension, styles), offsetProp = "offset" + dimension[0].toUpperCase() + dimension.slice(1);
if (rnumnonpx.test(val)) {
if (!extra) {
return val;
}
val = "auto";
}
if ((!support.boxSizingReliable() && isBorderBox || // Support: IE 10 - 11+, Edge 15 - 18+
// IE/Edge misreport `getComputedStyle` of table rows with width/height
// set in CSS while `offset*` properties report correct values.
// Interestingly, in some cases IE 9 doesn't suffer from this issue.
!support.reliableTrDimensions() && nodeName(elem, "tr") || // Fall back to offsetWidth/offsetHeight when value is "auto"
// This happens for inline elements with no explicit setting (gh-3571)
val === "auto" || // Support: Android <=4.1 - 4.3 only
// Also use offsetWidth/offsetHeight for misreported inline dimensions (gh-3602)
!parseFloat(val) && jQuery2.css(elem, "display", false, styles) === "inline") && // Make sure the element is visible & connected
elem.getClientRects().length) {
isBorderBox = jQuery2.css(elem, "boxSizing", false, styles) === "border-box";
valueIsBorderBox = offsetProp in elem;
if (valueIsBorderBox) {
val = elem[offsetProp];
}
}
val = parseFloat(val) || 0;
return val + boxModelAdjustment(
elem,
dimension,
extra || (isBorderBox ? "border" : "content"),
valueIsBorderBox,
styles,
// Provide the current computed size to request scroll gutter calculation (gh-3589)
val
) + "px";
}
jQuery2.extend({
// Add in style property hooks for overriding the default
// behavior of getting and setting a style property
cssHooks: {
opacity: {
get: function(elem, computed) {
if (computed) {
var ret = curCSS(elem, "opacity");
return ret === "" ? "1" : ret;
}
}
}
},
// Don't automatically add "px" to these possibly-unitless properties
cssNumber: {
animationIterationCount: true,
aspectRatio: true,
borderImageSlice: true,
columnCount: true,
flexGrow: true,
flexShrink: true,
fontWeight: true,
gridArea: true,
gridColumn: true,
gridColumnEnd: true,
gridColumnStart: true,
gridRow: true,
gridRowEnd: true,
gridRowStart: true,
lineHeight: true,
opacity: true,
order: true,
orphans: true,
scale: true,
widows: true,
zIndex: true,
zoom: true,
// SVG-related
fillOpacity: true,
floodOpacity: true,
stopOpacity: true,
strokeMiterlimit: true,
strokeOpacity: true
},
// Add in properties whose names you wish to fix before
// setting or getting the value
cssProps: {},
// Get and set the style property on a DOM Node
style: function(elem, name, value, extra) {
if (!elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style) {
return;
}
var ret, type, hooks, origName = camelCase(name), isCustomProp = rcustomProp.test(name), style = elem.style;
if (!isCustomProp) {
name = finalPropName(origName);
}
hooks = jQuery2.cssHooks[name] || jQuery2.cssHooks[origName];
if (value !== void 0) {
type = typeof value;
if (type === "string" && (ret = rcssNum.exec(value)) && ret[1]) {
value = adjustCSS(elem, name, ret);
type = "number";
}
if (value == null || value !== value) {
return;
}
if (type === "number" && !isCustomProp) {
value += ret && ret[3] || (jQuery2.cssNumber[origName] ? "" : "px");
}
if (!support.clearCloneStyle && value === "" && name.indexOf("background") === 0) {
style[name] = "inherit";
}
if (!hooks || !("set" in hooks) || (value = hooks.set(elem, value, extra)) !== void 0) {
if (isCustomProp) {
style.setProperty(name, value);
} else {
style[name] = value;
}
}
} else {
if (hooks && "get" in hooks && (ret = hooks.get(elem, false, extra)) !== void 0) {
return ret;
}
return style[name];
}
},
css: function(elem, name, extra, styles) {
var val, num, hooks, origName = camelCase(name), isCustomProp = rcustomProp.test(name);
if (!isCustomProp) {
name = finalPropName(origName);
}
hooks = jQuery2.cssHooks[name] || jQuery2.cssHooks[origName];
if (hooks && "get" in hooks) {
val = hooks.get(elem, true, extra);
}
if (val === void 0) {
val = curCSS(elem, name, styles);
}
if (val === "normal" && name in cssNormalTransform) {
val = cssNormalTransform[name];
}
if (extra === "" || extra) {
num = parseFloat(val);
return extra === true || isFinite(num) ? num || 0 : val;
}
return val;
}
});
jQuery2.each(["height", "width"], function(_i, dimension) {
jQuery2.cssHooks[dimension] = {
get: function(elem, computed, extra) {
if (computed) {
return rdisplayswap.test(jQuery2.css(elem, "display")) && // Support: Safari 8+
// Table columns in Safari have non-zero offsetWidth & zero
// getBoundingClientRect().width unless display is changed.
// Support: IE <=11 only
// Running getBoundingClientRect on a disconnected node
// in IE throws an error.
(!elem.getClientRects().length || !elem.getBoundingClientRect().width) ? swap(elem, cssShow, function() {
return getWidthOrHeight(elem, dimension, extra);
}) : getWidthOrHeight(elem, dimension, extra);
}
},
set: function(elem, value, extra) {
var matches, styles = getStyles(elem), scrollboxSizeBuggy = !support.scrollboxSize() && styles.position === "absolute", boxSizingNeeded = scrollboxSizeBuggy || extra, isBorderBox = boxSizingNeeded && jQuery2.css(elem, "boxSizing", false, styles) === "border-box", subtract = extra ? boxModelAdjustment(
elem,
dimension,
extra,
isBorderBox,
styles
) : 0;
if (isBorderBox && scrollboxSizeBuggy) {
subtract -= Math.ceil(
elem["offset" + dimension[0].toUpperCase() + dimension.slice(1)] - parseFloat(styles[dimension]) - boxModelAdjustment(elem, dimension, "border", false, styles) - 0.5
);
}
if (subtract && (matches = rcssNum.exec(value)) && (matches[3] || "px") !== "px") {
elem.style[dimension] = value;
value = jQuery2.css(elem, dimension);
}
return setPositiveNumber(elem, value, subtract);
}
};
});
jQuery2.cssHooks.marginLeft = addGetHookIf(
support.reliableMarginLeft,
function(elem, computed) {
if (computed) {
return (parseFloat(curCSS(elem, "marginLeft")) || elem.getBoundingClientRect().left - swap(elem, { marginLeft: 0 }, function() {
return elem.getBoundingClientRect().left;
})) + "px";
}
}
);
jQuery2.each({
margin: "",
padding: "",
border: "Width"
}, function(prefix, suffix) {
jQuery2.cssHooks[prefix + suffix] = {
expand: function(value) {
var i = 0, expanded = {}, parts = typeof value === "string" ? value.split(" ") : [value];
for (; i < 4; i++) {
expanded[prefix + cssExpand[i] + suffix] = parts[i] || parts[i - 2] || parts[0];
}
return expanded;
}
};
if (prefix !== "margin") {
jQuery2.cssHooks[prefix + suffix].set = setPositiveNumber;
}
});
jQuery2.fn.extend({
css: function(name, value) {
return access(this, function(elem, name2, value2) {
var styles, len, map = {}, i = 0;
if (Array.isArray(name2)) {
styles = getStyles(elem);
len = name2.length;
for (; i < len; i++) {
map[name2[i]] = jQuery2.css(elem, name2[i], false, styles);
}
return map;
}
return value2 !== void 0 ? jQuery2.style(elem, name2, value2) : jQuery2.css(elem, name2);
}, name, value, arguments.length > 1);
}
});
function Tween(elem, options, prop, end, easing) {
return new Tween.prototype.init(elem, options, prop, end, easing);
}
jQuery2.Tween = Tween;
Tween.prototype = {
constructor: Tween,
init: function(elem, options, prop, end, easing, unit) {
this.elem = elem;
this.prop = prop;
this.easing = easing || jQuery2.easing._default;
this.options = options;
this.start = this.now = this.cur();
this.end = end;
this.unit = unit || (jQuery2.cssNumber[prop] ? "" : "px");
},
cur: function() {
var hooks = Tween.propHooks[this.prop];
return hooks && hooks.get ? hooks.get(this) : Tween.propHooks._default.get(this);
},
run: function(percent) {
var eased, hooks = Tween.propHooks[this.prop];
if (this.options.duration) {
this.pos = eased = jQuery2.easing[this.easing](
percent,
this.options.duration * percent,
0,
1,
this.options.duration
);
} else {
this.pos = eased = percent;
}
this.now = (this.end - this.start) * eased + this.start;
if (this.options.step) {
this.options.step.call(this.elem, this.now, this);
}
if (hooks && hooks.set) {
hooks.set(this);
} else {
Tween.propHooks._default.set(this);
}
return this;
}
};
Tween.prototype.init.prototype = Tween.prototype;
Tween.propHooks = {
_default: {
get: function(tween) {
var result;
if (tween.elem.nodeType !== 1 || tween.elem[tween.prop] != null && tween.elem.style[tween.prop] == null) {
return tween.elem[tween.prop];
}
result = jQuery2.css(tween.elem, tween.prop, "");
return !result || result === "auto" ? 0 : result;
},
set: function(tween) {
if (jQuery2.fx.step[tween.prop]) {
jQuery2.fx.step[tween.prop](tween);
} else if (tween.elem.nodeType === 1 && (jQuery2.cssHooks[tween.prop] || tween.elem.style[finalPropName(tween.prop)] != null)) {
jQuery2.style(tween.elem, tween.prop, tween.now + tween.unit);
} else {
tween.elem[tween.prop] = tween.now;
}
}
}
};
Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = {
set: function(tween) {
if (tween.elem.nodeType && tween.elem.parentNode) {
tween.elem[tween.prop] = tween.now;
}
}
};
jQuery2.easing = {
linear: function(p) {
return p;
},
swing: function(p) {
return 0.5 - Math.cos(p * Math.PI) / 2;
},
_default: "swing"
};
jQuery2.fx = Tween.prototype.init;
jQuery2.fx.step = {};
var fxNow, inProgress, rfxtypes = /^(?:toggle|show|hide)$/, rrun = /queueHooks$/;
function schedule() {
if (inProgress) {
if (document2.hidden === false && window2.requestAnimationFrame) {
window2.requestAnimationFrame(schedule);
} else {
window2.setTimeout(schedule, jQuery2.fx.interval);
}
jQuery2.fx.tick();
}
}
function createFxNow() {
window2.setTimeout(function() {
fxNow = void 0;
});
return fxNow = Date.now();
}
function genFx(type, includeWidth) {
var which, i = 0, attrs = { height: type };
includeWidth = includeWidth ? 1 : 0;
for (; i < 4; i += 2 - includeWidth) {
which = cssExpand[i];
attrs["margin" + which] = attrs["padding" + which] = type;
}
if (includeWidth) {
attrs.opacity = attrs.width = type;
}
return attrs;
}
function createTween(value, prop, animation) {
var tween, collection = (Animation.tweeners[prop] || []).concat(Animation.tweeners["*"]), index = 0, length = collection.length;
for (; index < length; index++) {
if (tween = collection[index].call(animation, prop, value)) {
return tween;
}
}
}
function defaultPrefilter(elem, props, opts) {
var prop, value, toggle, hooks, oldfire, propTween, restoreDisplay, display, isBox = "width" in props || "height" in props, anim = this, orig = {}, style = elem.style, hidden = elem.nodeType && isHiddenWithinTree(elem), dataShow = dataPriv.get(elem, "fxshow");
if (!opts.queue) {
hooks = jQuery2._queueHooks(elem, "fx");
if (hooks.unqueued == null) {
hooks.unqueued = 0;
oldfire = hooks.empty.fire;
hooks.empty.fire = function() {
if (!hooks.unqueued) {
oldfire();
}
};
}
hooks.unqueued++;
anim.always(function() {
anim.always(function() {
hooks.unqueued--;
if (!jQuery2.queue(elem, "fx").length) {
hooks.empty.fire();
}
});
});
}
for (prop in props) {
value = props[prop];
if (rfxtypes.test(value)) {
delete props[prop];
toggle = toggle || value === "toggle";
if (value === (hidden ? "hide" : "show")) {
if (value === "show" && dataShow && dataShow[prop] !== void 0) {
hidden = true;
} else {
continue;
}
}
orig[prop] = dataShow && dataShow[prop] || jQuery2.style(elem, prop);
}
}
propTween = !jQuery2.isEmptyObject(props);
if (!propTween && jQuery2.isEmptyObject(orig)) {
return;
}
if (isBox && elem.nodeType === 1) {
opts.overflow = [style.overflow, style.overflowX, style.overflowY];
restoreDisplay = dataShow && dataShow.display;
if (restoreDisplay == null) {
restoreDisplay = dataPriv.get(elem, "display");
}
display = jQuery2.css(elem, "display");
if (display === "none") {
if (restoreDisplay) {
display = restoreDisplay;
} else {
showHide([elem], true);
restoreDisplay = elem.style.display || restoreDisplay;
display = jQuery2.css(elem, "display");
showHide([elem]);
}
}
if (display === "inline" || display === "inline-block" && restoreDisplay != null) {
if (jQuery2.css(elem, "float") === "none") {
if (!propTween) {
anim.done(function() {
style.display = restoreDisplay;
});
if (restoreDisplay == null) {
display = style.display;
restoreDisplay = display === "none" ? "" : display;
}
}
style.display = "inline-block";
}
}
}
if (opts.overflow) {
style.overflow = "hidden";
anim.always(function() {
style.overflow = opts.overflow[0];
style.overflowX = opts.overflow[1];
style.overflowY = opts.overflow[2];
});
}
propTween = false;
for (prop in orig) {
if (!propTween) {
if (dataShow) {
if ("hidden" in dataShow) {
hidden = dataShow.hidden;
}
} else {
dataShow = dataPriv.access(elem, "fxshow", { display: restoreDisplay });
}
if (toggle) {
dataShow.hidden = !hidden;
}
if (hidden) {
showHide([elem], true);
}
anim.done(function() {
if (!hidden) {
showHide([elem]);
}
dataPriv.remove(elem, "fxshow");
for (prop in orig) {
jQuery2.style(elem, prop, orig[prop]);
}
});
}
propTween = createTween(hidden ? dataShow[prop] : 0, prop, anim);
if (!(prop in dataShow)) {
dataShow[prop] = propTween.start;
if (hidden) {
propTween.end = propTween.start;
propTween.start = 0;
}
}
}
}
function propFilter(props, specialEasing) {
var index, name, easing, value, hooks;
for (index in props) {
name = camelCase(index);
easing = specialEasing[name];
value = props[index];
if (Array.isArray(value)) {
easing = value[1];
value = props[index] = value[0];
}
if (index !== name) {
props[name] = value;
delete props[index];
}
hooks = jQuery2.cssHooks[name];
if (hooks && "expand" in hooks) {
value = hooks.expand(value);
delete props[name];
for (index in value) {
if (!(index in props)) {
props[index] = value[index];
specialEasing[index] = easing;
}
}
} else {
specialEasing[name] = easing;
}
}
}
function Animation(elem, properties, options) {
var result, stopped, index = 0, length = Animation.prefilters.length, deferred = jQuery2.Deferred().always(function() {
delete tick.elem;
}), tick = function() {
if (stopped) {
return false;
}
var currentTime = fxNow || createFxNow(), remaining = Math.max(0, animation.startTime + animation.duration - currentTime), temp = remaining / animation.duration || 0, percent = 1 - temp, index2 = 0, length2 = animation.tweens.length;
for (; index2 < length2; index2++) {
animation.tweens[index2].run(percent);
}
deferred.notifyWith(elem, [animation, percent, remaining]);
if (percent < 1 && length2) {
return remaining;
}
if (!length2) {
deferred.notifyWith(elem, [animation, 1, 0]);
}
deferred.resolveWith(elem, [animation]);
return false;
}, animation = deferred.promise({
elem,
props: jQuery2.extend({}, properties),
opts: jQuery2.extend(true, {
specialEasing: {},
easing: jQuery2.easing._default
}, options),
originalProperties: properties,
originalOptions: options,
startTime: fxNow || createFxNow(),
duration: options.duration,
tweens: [],
createTween: function(prop, end) {
var tween = jQuery2.Tween(
elem,
animation.opts,
prop,
end,
animation.opts.specialEasing[prop] || animation.opts.easing
);
animation.tweens.push(tween);
return tween;
},
stop: function(gotoEnd) {
var index2 = 0, length2 = gotoEnd ? animation.tweens.length : 0;
if (stopped) {
return this;
}
stopped = true;
for (; index2 < length2; index2++) {
animation.tweens[index2].run(1);
}
if (gotoEnd) {
deferred.notifyWith(elem, [animation, 1, 0]);
deferred.resolveWith(elem, [animation, gotoEnd]);
} else {
deferred.rejectWith(elem, [animation, gotoEnd]);
}
return this;
}
}), props = animation.props;
propFilter(props, animation.opts.specialEasing);
for (; index < length; index++) {
result = Animation.prefilters[index].call(animation, elem, props, animation.opts);
if (result) {
if (isFunction(result.stop)) {
jQuery2._queueHooks(animation.elem, animation.opts.queue).stop = result.stop.bind(result);
}
return result;
}
}
jQuery2.map(props, createTween, animation);
if (isFunction(animation.opts.start)) {
animation.opts.start.call(elem, animation);
}
animation.progress(animation.opts.progress).done(animation.opts.done, animation.opts.complete).fail(animation.opts.fail).always(animation.opts.always);
jQuery2.fx.timer(
jQuery2.extend(tick, {
elem,
anim: animation,
queue: animation.opts.queue
})
);
return animation;
}
jQuery2.Animation = jQuery2.extend(Animation, {
tweeners: {
"*": [function(prop, value) {
var tween = this.createTween(prop, value);
adjustCSS(tween.elem, prop, rcssNum.exec(value), tween);
return tween;
}]
},
tweener: function(props, callback) {
if (isFunction(props)) {
callback = props;
props = ["*"];
} else {
props = props.match(rnothtmlwhite);
}
var prop, index = 0, length = props.length;
for (; index < length; index++) {
prop = props[index];
Animation.tweeners[prop] = Animation.tweeners[prop] || [];
Animation.tweeners[prop].unshift(callback);
}
},
prefilters: [defaultPrefilter],
prefilter: function(callback, prepend) {
if (prepend) {
Animation.prefilters.unshift(callback);
} else {
Animation.prefilters.push(callback);
}
}
});
jQuery2.speed = function(speed, easing, fn) {
var opt = speed && typeof speed === "object" ? jQuery2.extend({}, speed) : {
complete: fn || !fn && easing || isFunction(speed) && speed,
duration: speed,
easing: fn && easing || easing && !isFunction(easing) && easing
};
if (jQuery2.fx.off) {
opt.duration = 0;
} else {
if (typeof opt.duration !== "number") {
if (opt.duration in jQuery2.fx.speeds) {
opt.duration = jQuery2.fx.speeds[opt.duration];
} else {
opt.duration = jQuery2.fx.speeds._default;
}
}
}
if (opt.queue == null || opt.queue === true) {
opt.queue = "fx";
}
opt.old = opt.complete;
opt.complete = function() {
if (isFunction(opt.old)) {
opt.old.call(this);
}
if (opt.queue) {
jQuery2.dequeue(this, opt.queue);
}
};
return opt;
};
jQuery2.fn.extend({
fadeTo: function(speed, to, easing, callback) {
return this.filter(isHiddenWithinTree).css("opacity", 0).show().end().animate({ opacity: to }, speed, easing, callback);
},
animate: function(prop, speed, easing, callback) {
var empty = jQuery2.isEmptyObject(prop), optall = jQuery2.speed(speed, easing, callback), doAnimation = function() {
var anim = Animation(this, jQuery2.extend({}, prop), optall);
if (empty || dataPriv.get(this, "finish")) {
anim.stop(true);
}
};
doAnimation.finish = doAnimation;
return empty || optall.queue === false ? this.each(doAnimation) : this.queue(optall.queue, doAnimation);
},
stop: function(type, clearQueue, gotoEnd) {
var stopQueue = function(hooks) {
var stop = hooks.stop;
delete hooks.stop;
stop(gotoEnd);
};
if (typeof type !== "string") {
gotoEnd = clearQueue;
clearQueue = type;
type = void 0;
}
if (clearQueue) {
this.queue(type || "fx", []);
}
return this.each(function() {
var dequeue = true, index = type != null && type + "queueHooks", timers = jQuery2.timers, data = dataPriv.get(this);
if (index) {
if (data[index] && data[index].stop) {
stopQueue(data[index]);
}
} else {
for (index in data) {
if (data[index] && data[index].stop && rrun.test(index)) {
stopQueue(data[index]);
}
}
}
for (index = timers.length; index--; ) {
if (timers[index].elem === this && (type == null || timers[index].queue === type)) {
timers[index].anim.stop(gotoEnd);
dequeue = false;
timers.splice(index, 1);
}
}
if (dequeue || !gotoEnd) {
jQuery2.dequeue(this, type);
}
});
},
finish: function(type) {
if (type !== false) {
type = type || "fx";
}
return this.each(function() {
var index, data = dataPriv.get(this), queue = data[type + "queue"], hooks = data[type + "queueHooks"], timers = jQuery2.timers, length = queue ? queue.length : 0;
data.finish = true;
jQuery2.queue(this, type, []);
if (hooks && hooks.stop) {
hooks.stop.call(this, true);
}
for (index = timers.length; index--; ) {
if (timers[index].elem === this && timers[index].queue === type) {
timers[index].anim.stop(true);
timers.splice(index, 1);
}
}
for (index = 0; index < length; index++) {
if (queue[index] && queue[index].finish) {
queue[index].finish.call(this);
}
}
delete data.finish;
});
}
});
jQuery2.each(["toggle", "show", "hide"], function(_i, name) {
var cssFn = jQuery2.fn[name];
jQuery2.fn[name] = function(speed, easing, callback) {
return speed == null || typeof speed === "boolean" ? cssFn.apply(this, arguments) : this.animate(genFx(name, true), speed, easing, callback);
};
});
jQuery2.each({
slideDown: genFx("show"),
slideUp: genFx("hide"),
slideToggle: genFx("toggle"),
fadeIn: { opacity: "show" },
fadeOut: { opacity: "hide" },
fadeToggle: { opacity: "toggle" }
}, function(name, props) {
jQuery2.fn[name] = function(speed, easing, callback) {
return this.animate(props, speed, easing, callback);
};
});
jQuery2.timers = [];
jQuery2.fx.tick = function() {
var timer, i = 0, timers = jQuery2.timers;
fxNow = Date.now();
for (; i < timers.length; i++) {
timer = timers[i];
if (!timer() && timers[i] === timer) {
timers.splice(i--, 1);
}
}
if (!timers.length) {
jQuery2.fx.stop();
}
fxNow = void 0;
};
jQuery2.fx.timer = function(timer) {
jQuery2.timers.push(timer);
jQuery2.fx.start();
};
jQuery2.fx.interval = 13;
jQuery2.fx.start = function() {
if (inProgress) {
return;
}
inProgress = true;
schedule();
};
jQuery2.fx.stop = function() {
inProgress = null;
};
jQuery2.fx.speeds = {
slow: 600,
fast: 200,
// Default speed
_default: 400
};
jQuery2.fn.delay = function(time, type) {
time = jQuery2.fx ? jQuery2.fx.speeds[time] || time : time;
type = type || "fx";
return this.queue(type, function(next, hooks) {
var timeout = window2.setTimeout(next, time);
hooks.stop = function() {
window2.clearTimeout(timeout);
};
});
};
(function() {
var input = document2.createElement("input"), select = document2.createElement("select"), opt = select.appendChild(document2.createElement("option"));
input.type = "checkbox";
support.checkOn = input.value !== "";
support.optSelected = opt.selected;
input = document2.createElement("input");
input.value = "t";
input.type = "radio";
support.radioValue = input.value === "t";
})();
var boolHook, attrHandle = jQuery2.expr.attrHandle;
jQuery2.fn.extend({
attr: function(name, value) {
return access(this, jQuery2.attr, name, value, arguments.length > 1);
},
removeAttr: function(name) {
return this.each(function() {
jQuery2.removeAttr(this, name);
});
}
});
jQuery2.extend({
attr: function(elem, name, value) {
var ret, hooks, nType = elem.nodeType;
if (nType === 3 || nType === 8 || nType === 2) {
return;
}
if (typeof elem.getAttribute === "undefined") {
return jQuery2.prop(elem, name, value);
}
if (nType !== 1 || !jQuery2.isXMLDoc(elem)) {
hooks = jQuery2.attrHooks[name.toLowerCase()] || (jQuery2.expr.match.bool.test(name) ? boolHook : void 0);
}
if (value !== void 0) {
if (value === null) {
jQuery2.removeAttr(elem, name);
return;
}
if (hooks && "set" in hooks && (ret = hooks.set(elem, value, name)) !== void 0) {
return ret;
}
elem.setAttribute(name, value + "");
return value;
}
if (hooks && "get" in hooks && (ret = hooks.get(elem, name)) !== null) {
return ret;
}
ret = jQuery2.find.attr(elem, name);
return ret == null ? void 0 : ret;
},
attrHooks: {
type: {
set: function(elem, value) {
if (!support.radioValue && value === "radio" && nodeName(elem, "input")) {
var val = elem.value;
elem.setAttribute("type", value);
if (val) {
elem.value = val;
}
return value;
}
}
}
},
removeAttr: function(elem, value) {
var name, i = 0, attrNames = value && value.match(rnothtmlwhite);
if (attrNames && elem.nodeType === 1) {
while (name = attrNames[i++]) {
elem.removeAttribute(name);
}
}
}
});
boolHook = {
set: function(elem, value, name) {
if (value === false) {
jQuery2.removeAttr(elem, name);
} else {
elem.setAttribute(name, name);
}
return name;
}
};
jQuery2.each(jQuery2.expr.match.bool.source.match(/\w+/g), function(_i, name) {
var getter = attrHandle[name] || jQuery2.find.attr;
attrHandle[name] = function(elem, name2, isXML) {
var ret, handle, lowercaseName = name2.toLowerCase();
if (!isXML) {
handle = attrHandle[lowercaseName];
attrHandle[lowercaseName] = ret;
ret = getter(elem, name2, isXML) != null ? lowercaseName : null;
attrHandle[lowercaseName] = handle;
}
return ret;
};
});
var rfocusable = /^(?:input|select|textarea|button)$/i, rclickable = /^(?:a|area)$/i;
jQuery2.fn.extend({
prop: function(name, value) {
return access(this, jQuery2.prop, name, value, arguments.length > 1);
},
removeProp: function(name) {
return this.each(function() {
delete this[jQuery2.propFix[name] || name];
});
}
});
jQuery2.extend({
prop: function(elem, name, value) {
var ret, hooks, nType = elem.nodeType;
if (nType === 3 || nType === 8 || nType === 2) {
return;
}
if (nType !== 1 || !jQuery2.isXMLDoc(elem)) {
name = jQuery2.propFix[name] || name;
hooks = jQuery2.propHooks[name];
}
if (value !== void 0) {
if (hooks && "set" in hooks && (ret = hooks.set(elem, value, name)) !== void 0) {
return ret;
}
return elem[name] = value;
}
if (hooks && "get" in hooks && (ret = hooks.get(elem, name)) !== null) {
return ret;
}
return elem[name];
},
propHooks: {
tabIndex: {
get: function(elem) {
var tabindex = jQuery2.find.attr(elem, "tabindex");
if (tabindex) {
return parseInt(tabindex, 10);
}
if (rfocusable.test(elem.nodeName) || rclickable.test(elem.nodeName) && elem.href) {
return 0;
}
return -1;
}
}
},
propFix: {
"for": "htmlFor",
"class": "className"
}
});
if (!support.optSelected) {
jQuery2.propHooks.selected = {
get: function(elem) {
var parent = elem.parentNode;
if (parent && parent.parentNode) {
parent.parentNode.selectedIndex;
}
return null;
},
set: function(elem) {
var parent = elem.parentNode;
if (parent) {
parent.selectedIndex;
if (parent.parentNode) {
parent.parentNode.selectedIndex;
}
}
}
};
}
jQuery2.each([
"tabIndex",
"readOnly",
"maxLength",
"cellSpacing",
"cellPadding",
"rowSpan",
"colSpan",
"useMap",
"frameBorder",
"contentEditable"
], function() {
jQuery2.propFix[this.toLowerCase()] = this;
});
function stripAndCollapse(value) {
var tokens = value.match(rnothtmlwhite) || [];
return tokens.join(" ");
}
function getClass(elem) {
return elem.getAttribute && elem.getAttribute("class") || "";
}
function classesToArray(value) {
if (Array.isArray(value)) {
return value;
}
if (typeof value === "string") {
return value.match(rnothtmlwhite) || [];
}
return [];
}
jQuery2.fn.extend({
addClass: function(value) {
var classNames, cur, curValue, className, i, finalValue;
if (isFunction(value)) {
return this.each(function(j) {
jQuery2(this).addClass(value.call(this, j, getClass(this)));
});
}
classNames = classesToArray(value);
if (classNames.length) {
return this.each(function() {
curValue = getClass(this);
cur = this.nodeType === 1 && " " + stripAndCollapse(curValue) + " ";
if (cur) {
for (i = 0; i < classNames.length; i++) {
className = classNames[i];
if (cur.indexOf(" " + className + " ") < 0) {
cur += className + " ";
}
}
finalValue = stripAndCollapse(cur);
if (curValue !== finalValue) {
this.setAttribute("class", finalValue);
}
}
});
}
return this;
},
removeClass: function(value) {
var classNames, cur, curValue, className, i, finalValue;
if (isFunction(value)) {
return this.each(function(j) {
jQuery2(this).removeClass(value.call(this, j, getClass(this)));
});
}
if (!arguments.length) {
return this.attr("class", "");
}
classNames = classesToArray(value);
if (classNames.length) {
return this.each(function() {
curValue = getClass(this);
cur = this.nodeType === 1 && " " + stripAndCollapse(curValue) + " ";
if (cur) {
for (i = 0; i < classNames.length; i++) {
className = classNames[i];
while (cur.indexOf(" " + className + " ") > -1) {
cur = cur.replace(" " + className + " ", " ");
}
}
finalValue = stripAndCollapse(cur);
if (curValue !== finalValue) {
this.setAttribute("class", finalValue);
}
}
});
}
return this;
},
toggleClass: function(value, stateVal) {
var classNames, className, i, self2, type = typeof value, isValidValue = type === "string" || Array.isArray(value);
if (isFunction(value)) {
return this.each(function(i2) {
jQuery2(this).toggleClass(
value.call(this, i2, getClass(this), stateVal),
stateVal
);
});
}
if (typeof stateVal === "boolean" && isValidValue) {
return stateVal ? this.addClass(value) : this.removeClass(value);
}
classNames = classesToArray(value);
return this.each(function() {
if (isValidValue) {
self2 = jQuery2(this);
for (i = 0; i < classNames.length; i++) {
className = classNames[i];
if (self2.hasClass(className)) {
self2.removeClass(className);
} else {
self2.addClass(className);
}
}
} else if (value === void 0 || type === "boolean") {
className = getClass(this);
if (className) {
dataPriv.set(this, "__className__", className);
}
if (this.setAttribute) {
this.setAttribute(
"class",
className || value === false ? "" : dataPriv.get(this, "__className__") || ""
);
}
}
});
},
hasClass: function(selector) {
var className, elem, i = 0;
className = " " + selector + " ";
while (elem = this[i++]) {
if (elem.nodeType === 1 && (" " + stripAndCollapse(getClass(elem)) + " ").indexOf(className) > -1) {
return true;
}
}
return false;
}
});
var rreturn = /\r/g;
jQuery2.fn.extend({
val: function(value) {
var hooks, ret, valueIsFunction, elem = this[0];
if (!arguments.length) {
if (elem) {
hooks = jQuery2.valHooks[elem.type] || jQuery2.valHooks[elem.nodeName.toLowerCase()];
if (hooks && "get" in hooks && (ret = hooks.get(elem, "value")) !== void 0) {
return ret;
}
ret = elem.value;
if (typeof ret === "string") {
return ret.replace(rreturn, "");
}
return ret == null ? "" : ret;
}
return;
}
valueIsFunction = isFunction(value);
return this.each(function(i) {
var val;
if (this.nodeType !== 1) {
return;
}
if (valueIsFunction) {
val = value.call(this, i, jQuery2(this).val());
} else {
val = value;
}
if (val == null) {
val = "";
} else if (typeof val === "number") {
val += "";
} else if (Array.isArray(val)) {
val = jQuery2.map(val, function(value2) {
return value2 == null ? "" : value2 + "";
});
}
hooks = jQuery2.valHooks[this.type] || jQuery2.valHooks[this.nodeName.toLowerCase()];
if (!hooks || !("set" in hooks) || hooks.set(this, val, "value") === void 0) {
this.value = val;
}
});
}
});
jQuery2.extend({
valHooks: {
option: {
get: function(elem) {
var val = jQuery2.find.attr(elem, "value");
return val != null ? val : (
// Support: IE <=10 - 11 only
// option.text throws exceptions (trac-14686, trac-14858)
// Strip and collapse whitespace
// https://html.spec.whatwg.org/#strip-and-collapse-whitespace
stripAndCollapse(jQuery2.text(elem))
);
}
},
select: {
get: function(elem) {
var value, option, i, options = elem.options, index = elem.selectedIndex, one = elem.type === "select-one", values = one ? null : [], max = one ? index + 1 : options.length;
if (index < 0) {
i = max;
} else {
i = one ? index : 0;
}
for (; i < max; i++) {
option = options[i];
if ((option.selected || i === index) && // Don't return options that are disabled or in a disabled optgroup
!option.disabled && (!option.parentNode.disabled || !nodeName(option.parentNode, "optgroup"))) {
value = jQuery2(option).val();
if (one) {
return value;
}
values.push(value);
}
}
return values;
},
set: function(elem, value) {
var optionSet, option, options = elem.options, values = jQuery2.makeArray(value), i = options.length;
while (i--) {
option = options[i];
if (option.selected = jQuery2.inArray(jQuery2.valHooks.option.get(option), values) > -1) {
optionSet = true;
}
}
if (!optionSet) {
elem.selectedIndex = -1;
}
return values;
}
}
}
});
jQuery2.each(["radio", "checkbox"], function() {
jQuery2.valHooks[this] = {
set: function(elem, value) {
if (Array.isArray(value)) {
return elem.checked = jQuery2.inArray(jQuery2(elem).val(), value) > -1;
}
}
};
if (!support.checkOn) {
jQuery2.valHooks[this].get = function(elem) {
return elem.getAttribute("value") === null ? "on" : elem.value;
};
}
});
var location2 = window2.location;
var nonce = { guid: Date.now() };
var rquery = /\?/;
jQuery2.parseXML = function(data) {
var xml, parserErrorElem;
if (!data || typeof data !== "string") {
return null;
}
try {
xml = new window2.DOMParser().parseFromString(data, "text/xml");
} catch (e) {
}
parserErrorElem = xml && xml.getElementsByTagName("parsererror")[0];
if (!xml || parserErrorElem) {
jQuery2.error("Invalid XML: " + (parserErrorElem ? jQuery2.map(parserErrorElem.childNodes, function(el) {
return el.textContent;
}).join("\n") : data));
}
return xml;
};
var rfocusMorph = /^(?:focusinfocus|focusoutblur)$/, stopPropagationCallback = function(e) {
e.stopPropagation();
};
jQuery2.extend(jQuery2.event, {
trigger: function(event, data, elem, onlyHandlers) {
var i, cur, tmp, bubbleType, ontype, handle, special, lastElement, eventPath = [elem || document2], type = hasOwn.call(event, "type") ? event.type : event, namespaces = hasOwn.call(event, "namespace") ? event.namespace.split(".") : [];
cur = lastElement = tmp = elem = elem || document2;
if (elem.nodeType === 3 || elem.nodeType === 8) {
return;
}
if (rfocusMorph.test(type + jQuery2.event.triggered)) {
return;
}
if (type.indexOf(".") > -1) {
namespaces = type.split(".");
type = namespaces.shift();
namespaces.sort();
}
ontype = type.indexOf(":") < 0 && "on" + type;
event = event[jQuery2.expando] ? event : new jQuery2.Event(type, typeof event === "object" && event);
event.isTrigger = onlyHandlers ? 2 : 3;
event.namespace = namespaces.join(".");
event.rnamespace = event.namespace ? new RegExp("(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)") : null;
event.result = void 0;
if (!event.target) {
event.target = elem;
}
data = data == null ? [event] : jQuery2.makeArray(data, [event]);
special = jQuery2.event.special[type] || {};
if (!onlyHandlers && special.trigger && special.trigger.apply(elem, data) === false) {
return;
}
if (!onlyHandlers && !special.noBubble && !isWindow(elem)) {
bubbleType = special.delegateType || type;
if (!rfocusMorph.test(bubbleType + type)) {
cur = cur.parentNode;
}
for (; cur; cur = cur.parentNode) {
eventPath.push(cur);
tmp = cur;
}
if (tmp === (elem.ownerDocument || document2)) {
eventPath.push(tmp.defaultView || tmp.parentWindow || window2);
}
}
i = 0;
while ((cur = eventPath[i++]) && !event.isPropagationStopped()) {
lastElement = cur;
event.type = i > 1 ? bubbleType : special.bindType || type;
handle = (dataPriv.get(cur, "events") || /* @__PURE__ */ Object.create(null))[event.type] && dataPriv.get(cur, "handle");
if (handle) {
handle.apply(cur, data);
}
handle = ontype && cur[ontype];
if (handle && handle.apply && acceptData(cur)) {
event.result = handle.apply(cur, data);
if (event.result === false) {
event.preventDefault();
}
}
}
event.type = type;
if (!onlyHandlers && !event.isDefaultPrevented()) {
if ((!special._default || special._default.apply(eventPath.pop(), data) === false) && acceptData(elem)) {
if (ontype && isFunction(elem[type]) && !isWindow(elem)) {
tmp = elem[ontype];
if (tmp) {
elem[ontype] = null;
}
jQuery2.event.triggered = type;
if (event.isPropagationStopped()) {
lastElement.addEventListener(type, stopPropagationCallback);
}
elem[type]();
if (event.isPropagationStopped()) {
lastElement.removeEventListener(type, stopPropagationCallback);
}
jQuery2.event.triggered = void 0;
if (tmp) {
elem[ontype] = tmp;
}
}
}
}
return event.result;
},
// Piggyback on a donor event to simulate a different one
// Used only for `focus(in | out)` events
simulate: function(type, elem, event) {
var e = jQuery2.extend(
new jQuery2.Event(),
event,
{
type,
isSimulated: true
}
);
jQuery2.event.trigger(e, null, elem);
}
});
jQuery2.fn.extend({
trigger: function(type, data) {
return this.each(function() {
jQuery2.event.trigger(type, data, this);
});
},
triggerHandler: function(type, data) {
var elem = this[0];
if (elem) {
return jQuery2.event.trigger(type, data, elem, true);
}
}
});
var rbracket = /\[\]$/, rCRLF = /\r?\n/g, rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i, rsubmittable = /^(?:input|select|textarea|keygen)/i;
function buildParams(prefix, obj, traditional, add) {
var name;
if (Array.isArray(obj)) {
jQuery2.each(obj, function(i, v) {
if (traditional || rbracket.test(prefix)) {
add(prefix, v);
} else {
buildParams(
prefix + "[" + (typeof v === "object" && v != null ? i : "") + "]",
v,
traditional,
add
);
}
});
} else if (!traditional && toType(obj) === "object") {
for (name in obj) {
buildParams(prefix + "[" + name + "]", obj[name], traditional, add);
}
} else {
add(prefix, obj);
}
}
jQuery2.param = function(a, traditional) {
var prefix, s2 = [], add = function(key, valueOrFunction) {
var value = isFunction(valueOrFunction) ? valueOrFunction() : valueOrFunction;
s2[s2.length] = encodeURIComponent(key) + "=" + encodeURIComponent(value == null ? "" : value);
};
if (a == null) {
return "";
}
if (Array.isArray(a) || a.jquery && !jQuery2.isPlainObject(a)) {
jQuery2.each(a, function() {
add(this.name, this.value);
});
} else {
for (prefix in a) {
buildParams(prefix, a[prefix], traditional, add);
}
}
return s2.join("&");
};
jQuery2.fn.extend({
serialize: function() {
return jQuery2.param(this.serializeArray());
},
serializeArray: function() {
return this.map(function() {
var elements = jQuery2.prop(this, "elements");
return elements ? jQuery2.makeArray(elements) : this;
}).filter(function() {
var type = this.type;
return this.name && !jQuery2(this).is(":disabled") && rsubmittable.test(this.nodeName) && !rsubmitterTypes.test(type) && (this.checked || !rcheckableType.test(type));
}).map(function(_i, elem) {
var val = jQuery2(this).val();
if (val == null) {
return null;
}
if (Array.isArray(val)) {
return jQuery2.map(val, function(val2) {
return { name: elem.name, value: val2.replace(rCRLF, "\r\n") };
});
}
return { name: elem.name, value: val.replace(rCRLF, "\r\n") };
}).get();
}
});
var r20 = /%20/g, rhash = /#.*$/, rantiCache = /([?&])_=[^&]*/, rheaders = /^(.*?):[ \t]*([^\r\n]*)$/mg, rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/, rnoContent = /^(?:GET|HEAD)$/, rprotocol = /^\/\//, prefilters = {}, transports = {}, allTypes = "*/".concat("*"), originAnchor = document2.createElement("a");
originAnchor.href = location2.href;
function addToPrefiltersOrTransports(structure) {
return function(dataTypeExpression, func) {
if (typeof dataTypeExpression !== "string") {
func = dataTypeExpression;
dataTypeExpression = "*";
}
var dataType, i = 0, dataTypes = dataTypeExpression.toLowerCase().match(rnothtmlwhite) || [];
if (isFunction(func)) {
while (dataType = dataTypes[i++]) {
if (dataType[0] === "+") {
dataType = dataType.slice(1) || "*";
(structure[dataType] = structure[dataType] || []).unshift(func);
} else {
(structure[dataType] = structure[dataType] || []).push(func);
}
}
}
};
}
function inspectPrefiltersOrTransports(structure, options, originalOptions, jqXHR) {
var inspected = {}, seekingTransport = structure === transports;
function inspect(dataType) {
var selected;
inspected[dataType] = true;
jQuery2.each(structure[dataType] || [], function(_, prefilterOrFactory) {
var dataTypeOrTransport = prefilterOrFactory(options, originalOptions, jqXHR);
if (typeof dataTypeOrTransport === "string" && !seekingTransport && !inspected[dataTypeOrTransport]) {
options.dataTypes.unshift(dataTypeOrTransport);
inspect(dataTypeOrTransport);
return false;
} else if (seekingTransport) {
return !(selected = dataTypeOrTransport);
}
});
return selected;
}
return inspect(options.dataTypes[0]) || !inspected["*"] && inspect("*");
}
function ajaxExtend(target, src) {
var key, deep, flatOptions = jQuery2.ajaxSettings.flatOptions || {};
for (key in src) {
if (src[key] !== void 0) {
(flatOptions[key] ? target : deep || (deep = {}))[key] = src[key];
}
}
if (deep) {
jQuery2.extend(true, target, deep);
}
return target;
}
function ajaxHandleResponses(s2, jqXHR, responses) {
var ct, type, finalDataType, firstDataType, contents = s2.contents, dataTypes = s2.dataTypes;
while (dataTypes[0] === "*") {
dataTypes.shift();
if (ct === void 0) {
ct = s2.mimeType || jqXHR.getResponseHeader("Content-Type");
}
}
if (ct) {
for (type in contents) {
if (contents[type] && contents[type].test(ct)) {
dataTypes.unshift(type);
break;
}
}
}
if (dataTypes[0] in responses) {
finalDataType = dataTypes[0];
} else {
for (type in responses) {
if (!dataTypes[0] || s2.converters[type + " " + dataTypes[0]]) {
finalDataType = type;
break;
}
if (!firstDataType) {
firstDataType = type;
}
}
finalDataType = finalDataType || firstDataType;
}
if (finalDataType) {
if (finalDataType !== dataTypes[0]) {
dataTypes.unshift(finalDataType);
}
return responses[finalDataType];
}
}
function ajaxConvert(s2, response, jqXHR, isSuccess) {
var conv2, current, conv, tmp, prev, converters = {}, dataTypes = s2.dataTypes.slice();
if (dataTypes[1]) {
for (conv in s2.converters) {
converters[conv.toLowerCase()] = s2.converters[conv];
}
}
current = dataTypes.shift();
while (current) {
if (s2.responseFields[current]) {
jqXHR[s2.responseFields[current]] = response;
}
if (!prev && isSuccess && s2.dataFilter) {
response = s2.dataFilter(response, s2.dataType);
}
prev = current;
current = dataTypes.shift();
if (current) {
if (current === "*") {
current = prev;
} else if (prev !== "*" && prev !== current) {
conv = converters[prev + " " + current] || converters["* " + current];
if (!conv) {
for (conv2 in converters) {
tmp = conv2.split(" ");
if (tmp[1] === current) {
conv = converters[prev + " " + tmp[0]] || converters["* " + tmp[0]];
if (conv) {
if (conv === true) {
conv = converters[conv2];
} else if (converters[conv2] !== true) {
current = tmp[0];
dataTypes.unshift(tmp[1]);
}
break;
}
}
}
}
if (conv !== true) {
if (conv && s2.throws) {
response = conv(response);
} else {
try {
response = conv(response);
} catch (e) {
return {
state: "parsererror",
error: conv ? e : "No conversion from " + prev + " to " + current
};
}
}
}
}
}
}
return { state: "success", data: response };
}
jQuery2.extend({
// Counter for holding the number of active queries
active: 0,
// Last-Modified header cache for next request
lastModified: {},
etag: {},
ajaxSettings: {
url: location2.href,
type: "GET",
isLocal: rlocalProtocol.test(location2.protocol),
global: true,
processData: true,
async: true,
contentType: "application/x-www-form-urlencoded; charset=UTF-8",
/*
timeout: 0,
data: null,
dataType: null,
username: null,
password: null,
cache: null,
throws: false,
traditional: false,
headers: {},
*/
accepts: {
"*": allTypes,
text: "text/plain",
html: "text/html",
xml: "application/xml, text/xml",
json: "application/json, text/javascript"
},
contents: {
xml: /\bxml\b/,
html: /\bhtml/,
json: /\bjson\b/
},
responseFields: {
xml: "responseXML",
text: "responseText",
json: "responseJSON"
},
// Data converters
// Keys separate source (or catchall "*") and destination types with a single space
converters: {
// Convert anything to text
"* text": String,
// Text to html (true = no transformation)
"text html": true,
// Evaluate text as a json expression
"text json": JSON.parse,
// Parse text as xml
"text xml": jQuery2.parseXML
},
// For options that shouldn't be deep extended:
// you can add your own custom options here if
// and when you create one that shouldn't be
// deep extended (see ajaxExtend)
flatOptions: {
url: true,
context: true
}
},
// Creates a full fledged settings object into target
// with both ajaxSettings and settings fields.
// If target is omitted, writes into ajaxSettings.
ajaxSetup: function(target, settings) {
return settings ? (
// Building a settings object
ajaxExtend(ajaxExtend(target, jQuery2.ajaxSettings), settings)
) : (
// Extending ajaxSettings
ajaxExtend(jQuery2.ajaxSettings, target)
);
},
ajaxPrefilter: addToPrefiltersOrTransports(prefilters),
ajaxTransport: addToPrefiltersOrTransports(transports),
// Main method
ajax: function(url, options) {
if (typeof url === "object") {
options = url;
url = void 0;
}
options = options || {};
var transport, cacheURL, responseHeadersString, responseHeaders, timeoutTimer, urlAnchor, completed2, fireGlobals, i, uncached, s2 = jQuery2.ajaxSetup({}, options), callbackContext = s2.context || s2, globalEventContext = s2.context && (callbackContext.nodeType || callbackContext.jquery) ? jQuery2(callbackContext) : jQuery2.event, deferred = jQuery2.Deferred(), completeDeferred = jQuery2.Callbacks("once memory"), statusCode = s2.statusCode || {}, requestHeaders = {}, requestHeadersNames = {}, strAbort = "canceled", jqXHR = {
readyState: 0,
// Builds headers hashtable if needed
getResponseHeader: function(key) {
var match;
if (completed2) {
if (!responseHeaders) {
responseHeaders = {};
while (match = rheaders.exec(responseHeadersString)) {
responseHeaders[match[1].toLowerCase() + " "] = (responseHeaders[match[1].toLowerCase() + " "] || []).concat(match[2]);
}
}
match = responseHeaders[key.toLowerCase() + " "];
}
return match == null ? null : match.join(", ");
},
// Raw string
getAllResponseHeaders: function() {
return completed2 ? responseHeadersString : null;
},
// Caches the header
setRequestHeader: function(name, value) {
if (completed2 == null) {
name = requestHeadersNames[name.toLowerCase()] = requestHeadersNames[name.toLowerCase()] || name;
requestHeaders[name] = value;
}
return this;
},
// Overrides response content-type header
overrideMimeType: function(type) {
if (completed2 == null) {
s2.mimeType = type;
}
return this;
},
// Status-dependent callbacks
statusCode: function(map) {
var code;
if (map) {
if (completed2) {
jqXHR.always(map[jqXHR.status]);
} else {
for (code in map) {
statusCode[code] = [statusCode[code], map[code]];
}
}
}
return this;
},
// Cancel the request
abort: function(statusText) {
var finalText = statusText || strAbort;
if (transport) {
transport.abort(finalText);
}
done(0, finalText);
return this;
}
};
deferred.promise(jqXHR);
s2.url = ((url || s2.url || location2.href) + "").replace(rprotocol, location2.protocol + "//");
s2.type = options.method || options.type || s2.method || s2.type;
s2.dataTypes = (s2.dataType || "*").toLowerCase().match(rnothtmlwhite) || [""];
if (s2.crossDomain == null) {
urlAnchor = document2.createElement("a");
try {
urlAnchor.href = s2.url;
urlAnchor.href = urlAnchor.href;
s2.crossDomain = originAnchor.protocol + "//" + originAnchor.host !== urlAnchor.protocol + "//" + urlAnchor.host;
} catch (e) {
s2.crossDomain = true;
}
}
if (s2.data && s2.processData && typeof s2.data !== "string") {
s2.data = jQuery2.param(s2.data, s2.traditional);
}
inspectPrefiltersOrTransports(prefilters, s2, options, jqXHR);
if (completed2) {
return jqXHR;
}
fireGlobals = jQuery2.event && s2.global;
if (fireGlobals && jQuery2.active++ === 0) {
jQuery2.event.trigger("ajaxStart");
}
s2.type = s2.type.toUpperCase();
s2.hasContent = !rnoContent.test(s2.type);
cacheURL = s2.url.replace(rhash, "");
if (!s2.hasContent) {
uncached = s2.url.slice(cacheURL.length);
if (s2.data && (s2.processData || typeof s2.data === "string")) {
cacheURL += (rquery.test(cacheURL) ? "&" : "?") + s2.data;
delete s2.data;
}
if (s2.cache === false) {
cacheURL = cacheURL.replace(rantiCache, "$1");
uncached = (rquery.test(cacheURL) ? "&" : "?") + "_=" + nonce.guid++ + uncached;
}
s2.url = cacheURL + uncached;
} else if (s2.data && s2.processData && (s2.contentType || "").indexOf("application/x-www-form-urlencoded") === 0) {
s2.data = s2.data.replace(r20, "+");
}
if (s2.ifModified) {
if (jQuery2.lastModified[cacheURL]) {
jqXHR.setRequestHeader("If-Modified-Since", jQuery2.lastModified[cacheURL]);
}
if (jQuery2.etag[cacheURL]) {
jqXHR.setRequestHeader("If-None-Match", jQuery2.etag[cacheURL]);
}
}
if (s2.data && s2.hasContent && s2.contentType !== false || options.contentType) {
jqXHR.setRequestHeader("Content-Type", s2.contentType);
}
jqXHR.setRequestHeader(
"Accept",
s2.dataTypes[0] && s2.accepts[s2.dataTypes[0]] ? s2.accepts[s2.dataTypes[0]] + (s2.dataTypes[0] !== "*" ? ", " + allTypes + "; q=0.01" : "") : s2.accepts["*"]
);
for (i in s2.headers) {
jqXHR.setRequestHeader(i, s2.headers[i]);
}
if (s2.beforeSend && (s2.beforeSend.call(callbackContext, jqXHR, s2) === false || completed2)) {
return jqXHR.abort();
}
strAbort = "abort";
completeDeferred.add(s2.complete);
jqXHR.done(s2.success);
jqXHR.fail(s2.error);
transport = inspectPrefiltersOrTransports(transports, s2, options, jqXHR);
if (!transport) {
done(-1, "No Transport");
} else {
jqXHR.readyState = 1;
if (fireGlobals) {
globalEventContext.trigger("ajaxSend", [jqXHR, s2]);
}
if (completed2) {
return jqXHR;
}
if (s2.async && s2.timeout > 0) {
timeoutTimer = window2.setTimeout(function() {
jqXHR.abort("timeout");
}, s2.timeout);
}
try {
completed2 = false;
transport.send(requestHeaders, done);
} catch (e) {
if (completed2) {
throw e;
}
done(-1, e);
}
}
function done(status, nativeStatusText, responses, headers) {
var isSuccess, success, error, response, modified, statusText = nativeStatusText;
if (completed2) {
return;
}
completed2 = true;
if (timeoutTimer) {
window2.clearTimeout(timeoutTimer);
}
transport = void 0;
responseHeadersString = headers || "";
jqXHR.readyState = status > 0 ? 4 : 0;
isSuccess = status >= 200 && status < 300 || status === 304;
if (responses) {
response = ajaxHandleResponses(s2, jqXHR, responses);
}
if (!isSuccess && jQuery2.inArray("script", s2.dataTypes) > -1 && jQuery2.inArray("json", s2.dataTypes) < 0) {
s2.converters["text script"] = function() {
};
}
response = ajaxConvert(s2, response, jqXHR, isSuccess);
if (isSuccess) {
if (s2.ifModified) {
modified = jqXHR.getResponseHeader("Last-Modified");
if (modified) {
jQuery2.lastModified[cacheURL] = modified;
}
modified = jqXHR.getResponseHeader("etag");
if (modified) {
jQuery2.etag[cacheURL] = modified;
}
}
if (status === 204 || s2.type === "HEAD") {
statusText = "nocontent";
} else if (status === 304) {
statusText = "notmodified";
} else {
statusText = response.state;
success = response.data;
error = response.error;
isSuccess = !error;
}
} else {
error = statusText;
if (status || !statusText) {
statusText = "error";
if (status < 0) {
status = 0;
}
}
}
jqXHR.status = status;
jqXHR.statusText = (nativeStatusText || statusText) + "";
if (isSuccess) {
deferred.resolveWith(callbackContext, [success, statusText, jqXHR]);
} else {
deferred.rejectWith(callbackContext, [jqXHR, statusText, error]);
}
jqXHR.statusCode(statusCode);
statusCode = void 0;
if (fireGlobals) {
globalEventContext.trigger(
isSuccess ? "ajaxSuccess" : "ajaxError",
[jqXHR, s2, isSuccess ? success : error]
);
}
completeDeferred.fireWith(callbackContext, [jqXHR, statusText]);
if (fireGlobals) {
globalEventContext.trigger("ajaxComplete", [jqXHR, s2]);
if (!--jQuery2.active) {
jQuery2.event.trigger("ajaxStop");
}
}
}
return jqXHR;
},
getJSON: function(url, data, callback) {
return jQuery2.get(url, data, callback, "json");
},
getScript: function(url, callback) {
return jQuery2.get(url, void 0, callback, "script");
}
});
jQuery2.each(["get", "post"], function(_i, method) {
jQuery2[method] = function(url, data, callback, type) {
if (isFunction(data)) {
type = type || callback;
callback = data;
data = void 0;
}
return jQuery2.ajax(jQuery2.extend({
url,
type: method,
dataType: type,
data,
success: callback
}, jQuery2.isPlainObject(url) && url));
};
});
jQuery2.ajaxPrefilter(function(s2) {
var i;
for (i in s2.headers) {
if (i.toLowerCase() === "content-type") {
s2.contentType = s2.headers[i] || "";
}
}
});
jQuery2._evalUrl = function(url, options, doc) {
return jQuery2.ajax({
url,
// Make this explicit, since user can override this through ajaxSetup (trac-11264)
type: "GET",
dataType: "script",
cache: true,
async: false,
global: false,
// Only evaluate the response if it is successful (gh-4126)
// dataFilter is not invoked for failure responses, so using it instead
// of the default converter is kludgy but it works.
converters: {
"text script": function() {
}
},
dataFilter: function(response) {
jQuery2.globalEval(response, options, doc);
}
});
};
jQuery2.fn.extend({
wrapAll: function(html) {
var wrap;
if (this[0]) {
if (isFunction(html)) {
html = html.call(this[0]);
}
wrap = jQuery2(html, this[0].ownerDocument).eq(0).clone(true);
if (this[0].parentNode) {
wrap.insertBefore(this[0]);
}
wrap.map(function() {
var elem = this;
while (elem.firstElementChild) {
elem = elem.firstElementChild;
}
return elem;
}).append(this);
}
return this;
},
wrapInner: function(html) {
if (isFunction(html)) {
return this.each(function(i) {
jQuery2(this).wrapInner(html.call(this, i));
});
}
return this.each(function() {
var self2 = jQuery2(this), contents = self2.contents();
if (contents.length) {
contents.wrapAll(html);
} else {
self2.append(html);
}
});
},
wrap: function(html) {
var htmlIsFunction = isFunction(html);
return this.each(function(i) {
jQuery2(this).wrapAll(htmlIsFunction ? html.call(this, i) : html);
});
},
unwrap: function(selector) {
this.parent(selector).not("body").each(function() {
jQuery2(this).replaceWith(this.childNodes);
});
return this;
}
});
jQuery2.expr.pseudos.hidden = function(elem) {
return !jQuery2.expr.pseudos.visible(elem);
};
jQuery2.expr.pseudos.visible = function(elem) {
return !!(elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length);
};
jQuery2.ajaxSettings.xhr = function() {
try {
return new window2.XMLHttpRequest();
} catch (e) {
}
};
var xhrSuccessStatus = {
// File protocol always yields status code 0, assume 200
0: 200,
// Support: IE <=9 only
// trac-1450: sometimes IE returns 1223 when it should be 204
1223: 204
}, xhrSupported = jQuery2.ajaxSettings.xhr();
support.cors = !!xhrSupported && "withCredentials" in xhrSupported;
support.ajax = xhrSupported = !!xhrSupported;
jQuery2.ajaxTransport(function(options) {
var callback, errorCallback;
if (support.cors || xhrSupported && !options.crossDomain) {
return {
send: function(headers, complete) {
var i, xhr = options.xhr();
xhr.open(
options.type,
options.url,
options.async,
options.username,
options.password
);
if (options.xhrFields) {
for (i in options.xhrFields) {
xhr[i] = options.xhrFields[i];
}
}
if (options.mimeType && xhr.overrideMimeType) {
xhr.overrideMimeType(options.mimeType);
}
if (!options.crossDomain && !headers["X-Requested-With"]) {
headers["X-Requested-With"] = "XMLHttpRequest";
}
for (i in headers) {
xhr.setRequestHeader(i, headers[i]);
}
callback = function(type) {
return function() {
if (callback) {
callback = errorCallback = xhr.onload = xhr.onerror = xhr.onabort = xhr.ontimeout = xhr.onreadystatechange = null;
if (type === "abort") {
xhr.abort();
} else if (type === "error") {
if (typeof xhr.status !== "number") {
complete(0, "error");
} else {
complete(
// File: protocol always yields status 0; see trac-8605, trac-14207
xhr.status,
xhr.statusText
);
}
} else {
complete(
xhrSuccessStatus[xhr.status] || xhr.status,
xhr.statusText,
// Support: IE <=9 only
// IE9 has no XHR2 but throws on binary (trac-11426)
// For XHR2 non-text, let the caller handle it (gh-2498)
(xhr.responseType || "text") !== "text" || typeof xhr.responseText !== "string" ? { binary: xhr.response } : { text: xhr.responseText },
xhr.getAllResponseHeaders()
);
}
}
};
};
xhr.onload = callback();
errorCallback = xhr.onerror = xhr.ontimeout = callback("error");
if (xhr.onabort !== void 0) {
xhr.onabort = errorCallback;
} else {
xhr.onreadystatechange = function() {
if (xhr.readyState === 4) {
window2.setTimeout(function() {
if (callback) {
errorCallback();
}
});
}
};
}
callback = callback("abort");
try {
xhr.send(options.hasContent && options.data || null);
} catch (e) {
if (callback) {
throw e;
}
}
},
abort: function() {
if (callback) {
callback();
}
}
};
}
});
jQuery2.ajaxPrefilter(function(s2) {
if (s2.crossDomain) {
s2.contents.script = false;
}
});
jQuery2.ajaxSetup({
accepts: {
script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"
},
contents: {
script: /\b(?:java|ecma)script\b/
},
converters: {
"text script": function(text) {
jQuery2.globalEval(text);
return text;
}
}
});
jQuery2.ajaxPrefilter("script", function(s2) {
if (s2.cache === void 0) {
s2.cache = false;
}
if (s2.crossDomain) {
s2.type = "GET";
}
});
jQuery2.ajaxTransport("script", function(s2) {
if (s2.crossDomain || s2.scriptAttrs) {
var script, callback;
return {
send: function(_, complete) {
script = jQuery2("<script>").attr(s2.scriptAttrs || {}).prop({ charset: s2.scriptCharset, src: s2.url }).on("load error", callback = function(evt) {
script.remove();
callback = null;
if (evt) {
complete(evt.type === "error" ? 404 : 200, evt.type);
}
});
document2.head.appendChild(script[0]);
},
abort: function() {
if (callback) {
callback();
}
}
};
}
});
var oldCallbacks = [], rjsonp = /(=)\?(?=&|$)|\?\?/;
jQuery2.ajaxSetup({
jsonp: "callback",
jsonpCallback: function() {
var callback = oldCallbacks.pop() || jQuery2.expando + "_" + nonce.guid++;
this[callback] = true;
return callback;
}
});
jQuery2.ajaxPrefilter("json jsonp", function(s2, originalSettings, jqXHR) {
var callbackName, overwritten, responseContainer, jsonProp = s2.jsonp !== false && (rjsonp.test(s2.url) ? "url" : typeof s2.data === "string" && (s2.contentType || "").indexOf("application/x-www-form-urlencoded") === 0 && rjsonp.test(s2.data) && "data");
if (jsonProp || s2.dataTypes[0] === "jsonp") {
callbackName = s2.jsonpCallback = isFunction(s2.jsonpCallback) ? s2.jsonpCallback() : s2.jsonpCallback;
if (jsonProp) {
s2[jsonProp] = s2[jsonProp].replace(rjsonp, "$1" + callbackName);
} else if (s2.jsonp !== false) {
s2.url += (rquery.test(s2.url) ? "&" : "?") + s2.jsonp + "=" + callbackName;
}
s2.converters["script json"] = function() {
if (!responseContainer) {
jQuery2.error(callbackName + " was not called");
}
return responseContainer[0];
};
s2.dataTypes[0] = "json";
overwritten = window2[callbackName];
window2[callbackName] = function() {
responseContainer = arguments;
};
jqXHR.always(function() {
if (overwritten === void 0) {
jQuery2(window2).removeProp(callbackName);
} else {
window2[callbackName] = overwritten;
}
if (s2[callbackName]) {
s2.jsonpCallback = originalSettings.jsonpCallback;
oldCallbacks.push(callbackName);
}
if (responseContainer && isFunction(overwritten)) {
overwritten(responseContainer[0]);
}
responseContainer = overwritten = void 0;
});
return "script";
}
});
support.createHTMLDocument = function() {
var body = document2.implementation.createHTMLDocument("").body;
body.innerHTML = "<form></form><form></form>";
return body.childNodes.length === 2;
}();
jQuery2.parseHTML = function(data, context, keepScripts) {
if (typeof data !== "string") {
return [];
}
if (typeof context === "boolean") {
keepScripts = context;
context = false;
}
var base, parsed, scripts;
if (!context) {
if (support.createHTMLDocument) {
context = document2.implementation.createHTMLDocument("");
base = context.createElement("base");
base.href = document2.location.href;
context.head.appendChild(base);
} else {
context = document2;
}
}
parsed = rsingleTag.exec(data);
scripts = !keepScripts && [];
if (parsed) {
return [context.createElement(parsed[1])];
}
parsed = buildFragment([data], context, scripts);
if (scripts && scripts.length) {
jQuery2(scripts).remove();
}
return jQuery2.merge([], parsed.childNodes);
};
jQuery2.fn.load = function(url, params, callback) {
var selector, type, response, self2 = this, off = url.indexOf(" ");
if (off > -1) {
selector = stripAndCollapse(url.slice(off));
url = url.slice(0, off);
}
if (isFunction(params)) {
callback = params;
params = void 0;
} else if (params && typeof params === "object") {
type = "POST";
}
if (self2.length > 0) {
jQuery2.ajax({
url,
// If "type" variable is undefined, then "GET" method will be used.
// Make value of this field explicit since
// user can override it through ajaxSetup method
type: type || "GET",
dataType: "html",
data: params
}).done(function(responseText) {
response = arguments;
self2.html(selector ? (
// If a selector was specified, locate the right elements in a dummy div
// Exclude scripts to avoid IE 'Permission Denied' errors
jQuery2("<div>").append(jQuery2.parseHTML(responseText)).find(selector)
) : (
// Otherwise use the full result
responseText
));
}).always(callback && function(jqXHR, status) {
self2.each(function() {
callback.apply(this, response || [jqXHR.responseText, status, jqXHR]);
});
});
}
return this;
};
jQuery2.expr.pseudos.animated = function(elem) {
return jQuery2.grep(jQuery2.timers, function(fn) {
return elem === fn.elem;
}).length;
};
jQuery2.offset = {
setOffset: function(elem, options, i) {
var curPosition, curLeft, curCSSTop, curTop, curOffset, curCSSLeft, calculatePosition, position = jQuery2.css(elem, "position"), curElem = jQuery2(elem), props = {};
if (position === "static") {
elem.style.position = "relative";
}
curOffset = curElem.offset();
curCSSTop = jQuery2.css(elem, "top");
curCSSLeft = jQuery2.css(elem, "left");
calculatePosition = (position === "absolute" || position === "fixed") && (curCSSTop + curCSSLeft).indexOf("auto") > -1;
if (calculatePosition) {
curPosition = curElem.position();
curTop = curPosition.top;
curLeft = curPosition.left;
} else {
curTop = parseFloat(curCSSTop) || 0;
curLeft = parseFloat(curCSSLeft) || 0;
}
if (isFunction(options)) {
options = options.call(elem, i, jQuery2.extend({}, curOffset));
}
if (options.top != null) {
props.top = options.top - curOffset.top + curTop;
}
if (options.left != null) {
props.left = options.left - curOffset.left + curLeft;
}
if ("using" in options) {
options.using.call(elem, props);
} else {
curElem.css(props);
}
}
};
jQuery2.fn.extend({
// offset() relates an element's border box to the document origin
offset: function(options) {
if (arguments.length) {
return options === void 0 ? this : this.each(function(i) {
jQuery2.offset.setOffset(this, options, i);
});
}
var rect, win, elem = this[0];
if (!elem) {
return;
}
if (!elem.getClientRects().length) {
return { top: 0, left: 0 };
}
rect = elem.getBoundingClientRect();
win = elem.ownerDocument.defaultView;
return {
top: rect.top + win.pageYOffset,
left: rect.left + win.pageXOffset
};
},
// position() relates an element's margin box to its offset parent's padding box
// This corresponds to the behavior of CSS absolute positioning
position: function() {
if (!this[0]) {
return;
}
var offsetParent, offset, doc, elem = this[0], parentOffset = { top: 0, left: 0 };
if (jQuery2.css(elem, "position") === "fixed") {
offset = elem.getBoundingClientRect();
} else {
offset = this.offset();
doc = elem.ownerDocument;
offsetParent = elem.offsetParent || doc.documentElement;
while (offsetParent && (offsetParent === doc.body || offsetParent === doc.documentElement) && jQuery2.css(offsetParent, "position") === "static") {
offsetParent = offsetParent.parentNode;
}
if (offsetParent && offsetParent !== elem && offsetParent.nodeType === 1) {
parentOffset = jQuery2(offsetParent).offset();
parentOffset.top += jQuery2.css(offsetParent, "borderTopWidth", true);
parentOffset.left += jQuery2.css(offsetParent, "borderLeftWidth", true);
}
}
return {
top: offset.top - parentOffset.top - jQuery2.css(elem, "marginTop", true),
left: offset.left - parentOffset.left - jQuery2.css(elem, "marginLeft", true)
};
},
// This method will return documentElement in the following cases:
// 1) For the element inside the iframe without offsetParent, this method will return
// documentElement of the parent window
// 2) For the hidden or detached element
// 3) For body or html element, i.e. in case of the html node - it will return itself
//
// but those exceptions were never presented as a real life use-cases
// and might be considered as more preferable results.
//
// This logic, however, is not guaranteed and can change at any point in the future
offsetParent: function() {
return this.map(function() {
var offsetParent = this.offsetParent;
while (offsetParent && jQuery2.css(offsetParent, "position") === "static") {
offsetParent = offsetParent.offsetParent;
}
return offsetParent || documentElement;
});
}
});
jQuery2.each({ scrollLeft: "pageXOffset", scrollTop: "pageYOffset" }, function(method, prop) {
var top2 = "pageYOffset" === prop;
jQuery2.fn[method] = function(val) {
return access(this, function(elem, method2, val2) {
var win;
if (isWindow(elem)) {
win = elem;
} else if (elem.nodeType === 9) {
win = elem.defaultView;
}
if (val2 === void 0) {
return win ? win[prop] : elem[method2];
}
if (win) {
win.scrollTo(
!top2 ? val2 : win.pageXOffset,
top2 ? val2 : win.pageYOffset
);
} else {
elem[method2] = val2;
}
}, method, val, arguments.length);
};
});
jQuery2.each(["top", "left"], function(_i, prop) {
jQuery2.cssHooks[prop] = addGetHookIf(
support.pixelPosition,
function(elem, computed) {
if (computed) {
computed = curCSS(elem, prop);
return rnumnonpx.test(computed) ? jQuery2(elem).position()[prop] + "px" : computed;
}
}
);
});
jQuery2.each({ Height: "height", Width: "width" }, function(name, type) {
jQuery2.each({
padding: "inner" + name,
content: type,
"": "outer" + name
}, function(defaultExtra, funcName) {
jQuery2.fn[funcName] = function(margin, value) {
var chainable = arguments.length && (defaultExtra || typeof margin !== "boolean"), extra = defaultExtra || (margin === true || value === true ? "margin" : "border");
return access(this, function(elem, type2, value2) {
var doc;
if (isWindow(elem)) {
return funcName.indexOf("outer") === 0 ? elem["inner" + name] : elem.document.documentElement["client" + name];
}
if (elem.nodeType === 9) {
doc = elem.documentElement;
return Math.max(
elem.body["scroll" + name],
doc["scroll" + name],
elem.body["offset" + name],
doc["offset" + name],
doc["client" + name]
);
}
return value2 === void 0 ? (
// Get width or height on the element, requesting but not forcing parseFloat
jQuery2.css(elem, type2, extra)
) : (
// Set width or height on the element
jQuery2.style(elem, type2, value2, extra)
);
}, type, chainable ? margin : void 0, chainable);
};
});
});
jQuery2.each([
"ajaxStart",
"ajaxStop",
"ajaxComplete",
"ajaxError",
"ajaxSuccess",
"ajaxSend"
], function(_i, type) {
jQuery2.fn[type] = function(fn) {
return this.on(type, fn);
};
});
jQuery2.fn.extend({
bind: function(types, data, fn) {
return this.on(types, null, data, fn);
},
unbind: function(types, fn) {
return this.off(types, null, fn);
},
delegate: function(selector, types, data, fn) {
return this.on(types, selector, data, fn);
},
undelegate: function(selector, types, fn) {
return arguments.length === 1 ? this.off(selector, "**") : this.off(types, selector || "**", fn);
},
hover: function(fnOver, fnOut) {
return this.on("mouseenter", fnOver).on("mouseleave", fnOut || fnOver);
}
});
jQuery2.each(
"blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),
function(_i, name) {
jQuery2.fn[name] = function(data, fn) {
return arguments.length > 0 ? this.on(name, null, data, fn) : this.trigger(name);
};
}
);
var rtrim = /^[\s\uFEFF\xA0]+|([^\s\uFEFF\xA0])[\s\uFEFF\xA0]+$/g;
jQuery2.proxy = function(fn, context) {
var tmp, args, proxy;
if (typeof context === "string") {
tmp = fn[context];
context = fn;
fn = tmp;
}
if (!isFunction(fn)) {
return void 0;
}
args = slice.call(arguments, 2);
proxy = function() {
return fn.apply(context || this, args.concat(slice.call(arguments)));
};
proxy.guid = fn.guid = fn.guid || jQuery2.guid++;
return proxy;
};
jQuery2.holdReady = function(hold) {
if (hold) {
jQuery2.readyWait++;
} else {
jQuery2.ready(true);
}
};
jQuery2.isArray = Array.isArray;
jQuery2.parseJSON = JSON.parse;
jQuery2.nodeName = nodeName;
jQuery2.isFunction = isFunction;
jQuery2.isWindow = isWindow;
jQuery2.camelCase = camelCase;
jQuery2.type = toType;
jQuery2.now = Date.now;
jQuery2.isNumeric = function(obj) {
var type = jQuery2.type(obj);
return (type === "number" || type === "string") && // parseFloat NaNs numeric-cast false positives ("")
// ...but misinterprets leading-number strings, particularly hex literals ("0x...")
// subtraction forces infinities to NaN
!isNaN(obj - parseFloat(obj));
};
jQuery2.trim = function(text) {
return text == null ? "" : (text + "").replace(rtrim, "$1");
};
var _jQuery = window2.jQuery, _$ = window2.$;
jQuery2.noConflict = function(deep) {
if (window2.$ === jQuery2) {
window2.$ = _$;
}
if (deep && window2.jQuery === jQuery2) {
window2.jQuery = _jQuery;
}
return jQuery2;
};
if (typeof noGlobal === "undefined") {
window2.jQuery = window2.$ = jQuery2;
}
return jQuery2;
});
})(jquery);
var jqueryExports = jquery.exports;
const $ = /* @__PURE__ */ getDefaultExportFromCjs(jqueryExports);
function commonjsRequire(path) {
throw new Error('Could not dynamically require "' + path + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
}
var jquery_nanogallery2_min = { exports: {} };
(function(module, exports) {
/*!
* @preserve nanogallery2 - javascript photo / video gallery and lightbox
* Homepage: http://nanogallery2.nanostudio.org
* Sources: https://github.com/nanostudio-org/nanogallery2
*
* License: GPLv3 and commercial licence
*
* Requirements:
* - jQuery (http://www.jquery.com) - version >= 1.7.1
*
* Embeded components:
* - shifty (https://github.com/jeremyckahn/shifty)
* - imagesloaded (https://github.com/desandro/imagesloaded)
* - hammer.js (http://hammerjs.github.io/)
* - screenfull.js (https://github.com/sindresorhus/screenfull.js)
* Tools:
* - webfont generated with http://fontello.com - mainly based on Font Awesome Copyright (C) 2012 by Dave Gandy (http://fontawesome.io/)
* - ICO online converter: https://iconverticons.com/online/
*/
!function(e) {
"function" == typeof commonjsRequire ? e(jqueryExports) : e(jQuery);
}(function(e) {
function t(e2) {
var t2 = document.getElementById("ngyColorHelperToRGB");
return null === t2 && ((t2 = document.createElement("div")).id = "ngyColorHelperToRGB", t2.style.cssText = "display: none; color:" + e2 + ";", document.body.appendChild(t2)), getComputedStyle(t2).color;
}
function n(e2, t2, n2) {
var i2 = "";
if ("RGBA(" == t2.toUpperCase().substring(0, 5) && (i2 = "a", t2 = "rgb(" + t2.substring(5)), "number" != typeof e2 || e2 < -1 || e2 > 1 || "string" != typeof t2 || "r" != t2[0] && "#" != t2[0] || "string" != typeof n2 && void 0 !== n2) return null;
function a2(e3) {
var t3 = e3.length, n3 = new Object();
if (t3 > 9) {
if ((e3 = e3.split(",")).length < 3 || e3.length > 4) return null;
n3[0] = o2(e3[0].slice(4)), n3[1] = o2(e3[1]), n3[2] = o2(e3[2]), n3[3] = e3[3] ? parseFloat(e3[3]) : -1;
} else {
if (8 == t3 || 6 == t3 || t3 < 4) return null;
t3 < 6 && (e3 = "#" + e3[1] + e3[1] + e3[2] + e3[2] + e3[3] + e3[3] + (t3 > 4 ? e3[4] + "" + e3[4] : "")), e3 = o2(e3.slice(1), 16), n3[0] = e3 >> 16 & 255, n3[1] = e3 >> 8 & 255, n3[2] = 255 & e3, n3[3] = 9 == t3 || 5 == t3 ? r2((e3 >> 24 & 255) / 255 * 1e4) / 1e4 : -1;
}
return n3;
}
var o2 = parseInt, r2 = Math.round, l2 = t2.length > 9, s2 = (l2 = "string" == typeof n2 ? n2.length > 9 || "c" == n2 && !l2 : l2, e2 < 0), u = (e2 = s2 ? -1 * e2 : e2, n2 = n2 && "c" != n2 ? n2 : s2 ? "#000000" : "#FFFFFF", a2(t2)), c = a2(n2);
return u && c ? l2 ? "rgb" + i2 + "(" + r2((c[0] - u[0]) * e2 + u[0]) + "," + r2((c[1] - u[1]) * e2 + u[1]) + "," + r2((c[2] - u[2]) * e2 + u[2]) + (u[3] < 0 && c[3] < 0 ? ")" : "," + (u[3] > -1 && c[3] > -1 ? r2(1e4 * ((c[3] - u[3]) * e2 + u[3])) / 1e4 : c[3] < 0 ? u[3] : c[3]) + ")") : "#" + (4294967296 + 16777216 * (u[3] > -1 && c[3] > -1 ? r2(255 * ((c[3] - u[3]) * e2 + u[3])) : c[3] > -1 ? r2(255 * c[3]) : u[3] > -1 ? r2(255 * u[3]) : 255) + 65536 * r2((c[0] - u[0]) * e2 + u[0]) + 256 * r2((c[1] - u[1]) * e2 + u[1]) + r2((c[2] - u[2]) * e2 + u[2])).toString(16).slice(u[3] > -1 || c[3] > -1 ? 1 : 3) : null;
}
function i(e2) {
if (null === e2 || "object" != typeof e2) return e2;
var t2 = e2.constructor();
for (var n2 in e2) t2[n2] = i(e2[n2]);
return t2;
}
function a() {
var e2 = jQuery(window);
return { l: e2.scrollLeft(), t: e2.scrollTop(), w: e2.width(), h: e2.height() };
}
function o(e2, t2) {
var n2 = 0;
"" == e2 && (e2 = "*"), jQuery(e2).each(function() {
var e3 = parseInt(jQuery(this).css("z-index"));
n2 = e3 > n2 ? e3 : n2;
}), n2++, jQuery(t2).css("z-index", n2);
}
var r = function(e2) {
return {}.toString.call(e2).match(/\s([a-zA-Z]+)/)[1].toLowerCase();
};
function l() {
this.LightboxReOpen = function() {
m();
}, this.ReloadAlbum = function() {
if ("" === u.O.kind) throw "Not supported for this content source:" + u.O.kind;
var e2 = u.GOM.albumIdx;
if (-1 == e2) throw "Current album not found.";
for (var t2 = u.I[e2].GetID(), n2 = u.I.length, i2 = 0; i2 < n2; i2++) {
var a2 = u.I[i2];
a2.albumID == t2 && (a2.selected = false);
}
u.I[e2].contentIsLoaded = false, g("-1", t2);
}, this.ItemsSetSelectedValue = function(e2, t2) {
for (var n2 = e2.length, i2 = 0; i2 < n2; i2++) pe(e2[i2], t2);
}, this.ItemsSelectedGet = function() {
for (var e2 = [], t2 = u.I.length, n2 = 0; n2 < t2; n2++) 1 == u.I[n2].selected && e2.push(u.I[n2]);
return e2;
}, this.Get = function(e2) {
return u.O[e2];
}, this.Set = function(e2, t2) {
switch (u.O[e2] = t2, e2) {
case "thumbnailSelectable":
de(), w(u.GOM.albumIdx);
}
}, this.Refresh = function() {
w(u.GOM.albumIdx);
}, this.Resize = function() {
x();
}, this.DisplayItem = function(e2) {
var t2 = p(e2);
"0" != t2.imageID ? Q(t2.imageID, t2.albumID) : g("-1", t2.albumID);
}, this.ThumbnailToolbarOneCartUpdate = function(e2) {
R(e2);
};
var l2 = function(e2) {
if (null == u.I[e2]) return 0;
for (var t2 = u.I[e2].GetID(), n2 = u.I.length, i2 = 0, a2 = 0; a2 < n2; a2++) {
u.I[a2].isToDisplay(t2) && i2++;
}
return i2;
};
this.Search = function(e2) {
u.GOM.albumSearch = e2.toUpperCase();
var t2 = u.GOM.albumIdx;
return w(u.GOM.albumIdx), l2(t2);
}, this.Search2 = function(e2, t2) {
return u.GOM.albumSearch = null != e2 && null != e2 ? e2.toUpperCase().trim() : "", u.GOM.albumSearchTags = null != t2 && null != t2 ? t2.toUpperCase().trim() : "", l2(u.GOM.albumIdx);
}, this.Search2Execute = function() {
var e2 = u.GOM.albumIdx;
return w(u.GOM.albumIdx), l2(e2);
}, this.Destroy = function() {
null != u.GOM.hammertime && (u.GOM.hammertime.destroy(), u.GOM.hammertime = null), null != u.VOM.hammertime && (u.VOM.hammertime.destroy(), u.VOM.hammertime = null), e("#ngycs_" + u.baseEltID).remove(), u.GOM.items = [], NGY2Item.New(u, u.i18nTranslations.breadcrumbHome, "", "0", "-1", "album"), u.GOM.navigationBar.$newContent = null, u.$E.base.empty(), u.$E.base.removeData(), u.O.locationHash && jQuery(window).off("hashchange.nanogallery2." + u.baseEltID), jQuery(window).off("resize.nanogallery2." + u.baseEltID), jQuery(window).off("orientationChange.nanogallery2." + u.baseEltID), jQuery(window).off("scroll.nanogallery2." + u.baseEltID), null !== u.$E.scrollableParent && u.$E.scrollableParent.off("scroll.nanogallery2." + u.baseEltID), u.GOM.firstDisplay = true;
}, this.CloseViewer = function() {
return tt(null), false;
}, this.MinimizeToolbar = function() {
return We(), false;
}, this.MaximizeToolbar = function() {
return Ue(), false;
}, this.PaginationPreviousPage = function() {
return G(), false;
}, this.PaginationNextPage = function() {
return y(), false;
}, this.PaginationGotoPage = function(e2) {
return e2 > 1 && e2--, u.GOM.pagination.currentPage = e2, u.GOM.ScrollToTop(), L(), E(true), false;
}, this.PaginationCountPages = function() {
return 0 == u.GOM.items.length ? 0 : Math.ceil((u.GOM.items[u.GOM.items.length - 1].row + 1) / u.galleryMaxRows.Get());
};
var s2 = function(e2, t2, n2) {
var i2;
return function() {
var a2 = this, o2 = arguments;
function r2() {
e2.apply(a2, o2), i2 = null;
}
i2 ? clearTimeout(i2) : n2, i2 = setTimeout(r2, t2 || 100);
};
};
window.ng_draf = function(e2) {
return requestAnimationFrame(function() {
window.requestAnimationFrame(e2);
});
}, window.requestTimeout = function(e2, t2) {
if (!(window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame && window.mozCancelRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame)) return window.setTimeout(e2, t2);
var n2 = (/* @__PURE__ */ new Date()).getTime(), i2 = new Object();
return i2.value = requestAnimFrame(function a2() {
(/* @__PURE__ */ new Date()).getTime() - n2 >= t2 ? e2.call() : i2.value = requestAnimFrame(a2);
}), i2;
}, window.requestAnimFrame = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || function(e2, t2) {
window.setTimeout(e2, 1e3 / 60);
}, window.clearRequestTimeout = function(e2) {
window.cancelAnimationFrame ? window.cancelAnimationFrame(e2.value) : window.webkitCancelAnimationFrame ? window.webkitCancelAnimationFrame(e2.value) : window.webkitCancelRequestAnimationFrame ? window.webkitCancelRequestAnimationFrame(e2.value) : window.mozCancelRequestAnimationFrame ? window.mozCancelRequestAnimationFrame(e2.value) : window.oCancelRequestAnimationFrame ? window.oCancelRequestAnimationFrame(e2.value) : window.msCancelRequestAnimationFrame ? window.msCancelRequestAnimationFrame(e2.value) : clearTimeout(e2);
};
var u = this;
function c(e2) {
this.$e = null, this.ngy2ItemIdx = e2, this.mediaNumber = u.VOM.items.length + 1, this.posX = 0, this.posY = 0;
}
u.I = [], u.Id = [], u.O = null, u.baseEltID = null, u.$E = { base: null, conTnParent: null, conLoadingB: null, conConsole: null, conNavigationBar: null, conTnBottom: null, scrollableParent: null }, u.shoppingCart = [], u.layout = { internal: true, engine: "", support: { rows: false }, prerequisite: { imageSize: false }, SetEngine: function() {
if (u.layout.internal) {
if ("auto" == u.tn.settings.width[u.GOM.curNavLevel][u.GOM.curWidth] || "" == u.tn.settings.width[u.GOM.curNavLevel][u.GOM.curWidth]) return u.layout.engine = "JUSTIFIED", u.layout.support.rows = true, void (u.layout.prerequisite.imageSize = true);
if ("auto" == u.tn.settings.height[u.GOM.curNavLevel][u.GOM.curWidth] || "" == u.tn.settings.height[u.GOM.curNavLevel][u.GOM.curWidth]) return u.layout.engine = "CASCADING", u.layout.support.rows = false, void (u.layout.prerequisite.imageSize = true);
if (null != u.tn.settings.getMosaic()) return u.layout.engine = "MOSAIC", u.layout.support.rows = true, void (u.layout.prerequisite.imageSize = false);
u.layout.engine = "GRID", u.layout.support.rows = true, u.layout.prerequisite.imageSize = false;
}
} }, u.galleryResizeEventEnabled = false, u.galleryMaxRows = { l1: 0, lN: 0, Get: function() {
return u.galleryMaxRows[u.GOM.curNavLevel];
} }, u.galleryMaxItems = { l1: 0, lN: 0, Get: function() {
return u.galleryMaxItems[u.GOM.curNavLevel];
} }, u.galleryFilterTags = { l1: 0, lN: 0, Get: function() {
return u.galleryFilterTags[u.GOM.curNavLevel];
} }, u.galleryFilterTagsMode = { l1: 0, lN: 0, Get: function() {
return u.galleryFilterTagsMode[u.GOM.curNavLevel];
} }, u.galleryDisplayMode = { l1: "FULLCONTENT", lN: "FULLCONTENT", Get: function() {
return u.galleryDisplayMode[u.GOM.curNavLevel];
} }, u.galleryLastRowFull = { l1: false, lN: false, Get: function() {
return u.galleryLastRowFull[u.GOM.curNavLevel];
} }, u.gallerySorting = { l1: "", lN: "", Get: function() {
return u.gallerySorting[u.GOM.curNavLevel];
} }, u.galleryDisplayTransition = { l1: "none", lN: "none", Get: function() {
return u.galleryDisplayTransition[u.GOM.curNavLevel];
} }, u.galleryDisplayTransitionDuration = { l1: 500, lN: 500, Get: function() {
return u.galleryDisplayTransitionDuration[u.GOM.curNavLevel];
} }, u.$currentTouchedThumbnail = null, u.tn = { opt: { l1: { crop: true, stacks: 0, stacksTranslateX: 0, stacksTranslateY: 0, stacksTranslateZ: 0, stacksRotateX: 0, stacksRotateY: 0, stacksRotateZ: 0, stacksScale: 0, borderHorizontal: 0, borderVertical: 0, baseGridHeight: 0, displayTransition: "FADEIN", displayTransitionStartVal: 0, displayTransitionEasing: "easeOutQuart", displayTransitionDuration: 240, displayInterval: 15 }, lN: { crop: true, stacks: 0, stacksTranslateX: 0, stacksTranslateY: 0, stacksTranslateZ: 0, stacksRotateX: 0, stacksRotateY: 0, stacksRotateZ: 0, stacksScale: 0, borderHorizontal: 0, borderVertical: 0, baseGridHeight: 0, displayTransition: "FADEIN", displayTransitionStartVal: 0, displayTransitionEasing: "easeOutQuart", displayTransitionDuration: 240, displayInterval: 15 }, Get: function(e2) {
return u.tn.opt[u.GOM.curNavLevel][e2];
} }, scale: 1, labelHeight: { l1: 0, lN: 0, get: function() {
return u.tn.labelHeight[u.GOM.curNavLevel];
} }, defaultSize: { width: { l1: { xs: 0, sm: 0, me: 0, la: 0, xl: 0 }, lN: { xs: 0, sm: 0, me: 0, la: 0, xl: 0 } }, height: { l1: { xs: 0, sm: 0, me: 0, la: 0, xl: 0 }, lN: { xs: 0, sm: 0, me: 0, la: 0, xl: 0 } }, getWidth: function() {
return u.tn.defaultSize.width[u.GOM.curNavLevel][u.GOM.curWidth];
}, getOuterWidth: function() {
u.tn.borderWidth = u.tn.opt.Get("borderHorizontal"), u.tn.borderHeight = u.tn.opt.Get("borderVertical");
var e2 = u.tn.defaultSize.width[u.GOM.curNavLevel][u.GOM.curWidth] + 2 * u.tn.opt.Get("borderHorizontal");
return "right" != u.O.thumbnailLabel.get("position") && "left" != u.O.thumbnailLabel.get("position") || (e2 += u.tn.defaultSize.width[u.GOM.curNavLevel][u.GOM.curWidth]), e2;
}, getHeight: function() {
return u.tn.defaultSize.height[u.GOM.curNavLevel][u.GOM.curWidth];
}, getOuterHeight: function() {
return u.tn.defaultSize.height[u.GOM.curNavLevel][u.GOM.curWidth] + 2 * u.tn.opt.Get("borderVertical");
} }, settings: { width: { l1: { xs: 0, sm: 0, me: 0, la: 0, xl: 0, xsc: "u", smc: "u", mec: "u", lac: "u", xlc: "u" }, lN: { xs: 0, sm: 0, me: 0, la: 0, xl: 0, xsc: "u", smc: "u", mec: "u", lac: "u", xlc: "u" } }, height: { l1: { xs: 0, sm: 0, me: 0, la: 0, xl: 0, xsc: "u", smc: "u", mec: "u", lac: "u", xlc: "u" }, lN: { xs: 0, sm: 0, me: 0, la: 0, xl: 0, xsc: "u", smc: "u", mec: "u", lac: "u", xlc: "u" } }, getH: function(e2, t2) {
var n2 = null == e2 ? u.GOM.curNavLevel : e2, i2 = null == t2 ? u.GOM.curWidth : t2;
return "MOSAIC" == u.layout.engine ? this.height[n2][i2] * this.mosaic[n2 + "Factor"].h[i2] : this.height[n2][i2];
}, getW: function(e2, t2) {
var n2 = null == e2 ? u.GOM.curNavLevel : e2, i2 = null == t2 ? u.GOM.curWidth : t2;
return "MOSAIC" == u.layout.engine ? this.width[n2][i2] * this.mosaic[n2 + "Factor"].w[i2] : this.width[n2][i2];
}, mosaic: { l1: { xs: null, sm: null, me: null, la: null, xl: null }, lN: { xs: null, sm: null, me: null, la: null, xl: null }, l1Factor: { h: { xs: 1, sm: 1, me: 1, la: 1, xl: 1 }, w: { xs: 1, sm: 1, me: 1, la: 1, xl: 1 } }, lNFactor: { h: { xs: 1, sm: 1, me: 1, la: 1, xl: 1 }, w: { xs: 1, sm: 1, me: 1, la: 1, xl: 1 } } }, getMosaic: function() {
return this.mosaic[u.GOM.curNavLevel][u.GOM.curWidth];
}, mosaicCalcFactor: function(e2, t2) {
for (var n2 = 1, i2 = 1, a2 = 0; a2 < u.tn.settings.mosaic[e2][t2].length; a2++) n2 = Math.max(n2, this.mosaic[e2][t2][a2].w), i2 = Math.max(i2, this.mosaic[e2][t2][a2].h);
this.mosaic[e2 + "Factor"].h[t2] = i2, this.mosaic[e2 + "Factor"].w[t2] = n2;
}, gutterHeight: { l1: { xs: 0, sm: 0, me: 0, la: 0, xl: 0 }, lN: { xs: 0, sm: 0, me: 0, la: 0, xl: 0 } }, gutterWidth: { l1: { xs: 0, sm: 0, me: 0, la: 0, xl: 0 }, lN: { xs: 0, sm: 0, me: 0, la: 0, xl: 0 } }, GetResponsive: function(e2) {
return this[e2][u.GOM.curNavLevel][u.GOM.curWidth];
} }, hoverEffects: { std: [], level1: [], get: function() {
return "l1" == u.GOM.curNavLevel && 0 !== this.level1.length ? this.level1 : this.std;
} }, buildInit: { std: [], level1: [], get: function() {
return "l1" == u.GOM.curNavLevel && 0 !== this.level1.length ? this.level1 : this.std;
} }, toolbar: { album: { topLeft: "", topRight: "", bottomLeft: "", bottomRight: "" }, image: { topLeft: "", topRight: "", bottomLeft: "", bottomRight: "" }, albumUp: { topLeft: "", topRight: "", bottomLeft: "", bottomRight: "" }, get: function(e2) {
return this[e2.kind];
} }, style: { l1: { label: "", title: "", desc: "" }, lN: { label: "", title: "", desc: "" }, getTitle: function() {
return 'style="' + this[u.GOM.curNavLevel].title + '"';
}, getDesc: function() {
return 'style="' + this[u.GOM.curNavLevel].desc + '"';
}, getLabel: function() {
var e2 = 'style="' + this[u.GOM.curNavLevel].label;
return e2 += u.O.RTL ? '"direction:RTL;"' : "", e2 += '"';
} } }, u.scrollTimeOut = 0, u.i18nTranslations = { paginationPrevious: "Previous", paginationNext: "Next", breadcrumbHome: "List of Albums", thumbnailImageTitle: "", thumbnailAlbumTitle: "", thumbnailImageDescription: "", thumbnailAlbumDescription: "" }, u.emptyGif = "data:image/gif;base64,R0lGODlhEAAQAIAAAP///////yH5BAEKAAEALAAAAAAQABAAAAIOjI+py+0Po5y02ouzPgUAOw==", u.CSStransformName = dt(["transform", "msTransform", "MozTransform", "WebkitTransform", "OTransform"]), u.CSStransformStyle = dt(["transformStyle", "msTransformStyle", "MozTransformStyle", "WebkitTransformStyle", "OTransformStyle"]), u.CSSperspective = dt(["perspective", "msPerspective", "MozPerspective", "WebkitPerspective", "OPerspective"]), u.CSSbackfaceVisibilityName = dt(["backfaceVisibility", "msBackfaceVisibility", "MozBackfaceVisibility", "WebkitBackfaceVisibility", "OBackfaceVisibility"]), u.CSStransitionName = dt(["transition", "msTransition", "MozTransition", "WebkitTransition", "OTransition"]), u.CSSanimationName = dt(["animation", "msAnimation", "MozAnimation", "WebkitAnimation", "OAnimation"]), u.GalleryResizeThrottled = function(e2, t2, n2) {
var i2, a2, o2, r2 = null, l3 = 0;
n2 || (n2 = {});
var s3 = function() {
l3 = false === n2.leading ? 0 : (/* @__PURE__ */ new Date()).getTime(), r2 = null, o2 = e2.apply(i2, a2), r2 || (i2 = a2 = null);
};
return function() {
var u2 = (/* @__PURE__ */ new Date()).getTime();
l3 || false !== n2.leading || (l3 = u2);
var c2 = t2 - (u2 - l3);
return i2 = this, a2 = arguments, c2 <= 0 || c2 > t2 ? (r2 && (clearTimeout(r2), r2 = null), l3 = u2, o2 = e2.apply(i2, a2), r2 || (i2 = a2 = null)) : r2 || false === n2.trailing || (r2 = setTimeout(s3, c2)), o2;
};
}(x, 15, { leading: false }), u.blockList = null, u.allowList = null, u.albumList = [], u.locationHashLastUsed = "", u.custGlobals = {}, u.touchAutoOpenDelayTimerID = 0, u.i18nLang = "", u.timeLastTouchStart = 0, u.custGlobals = {}, u.markupOrApiProcessed = false, u.GOM = { albumIdx: -1, clipArea: { top: 0, height: 0 }, displayArea: { width: 0, height: 0 }, displayAreaLast: { width: 0, height: 0 }, displayedMoreSteps: 0, items: [], $imgPreloader: [], thumbnails2Display: [], itemsDisplayed: 0, firstDisplay: true, firstDisplayTime: 0, navigationBar: { displayed: false, $newContent: "" }, cache: { viewport: null, containerOffset: null, areaWidth: 100 }, nbSelected: 0, pagination: { currentPage: 0 }, panThreshold: 60, panYOnly: false, lastFullRow: -1, lastDisplayedIdx: -1, displayInterval: { from: 0, len: 0 }, hammertime: null, curNavLevel: "l1", curWidth: "me", albumSearch: "", albumSearchTags: "", lastZIndex: 0, lastRandomValue: 0, slider: { hostIdx: -1, hostItem: null, currentIdx: 0, nextIdx: 0, timerID: 0, tween: null }, NGY2Item: function(e2) {
if (null == u.GOM.items[e2] || null == u.GOM.items[e2]) return null;
var t2 = u.GOM.items[e2].thumbnailIdx;
return u.I[t2];
}, GTn: function(e2, t2, n2) {
this.thumbnailIdx = e2, this.width = 0, this.height = 0, this.top = 0, this.left = 0, this.row = 0, this.imageWidth = t2, this.imageHeight = n2, this.resizedContentWidth = 0, this.resizedContentHeight = 0, this.displayed = false, this.neverDisplayed = true, this.inDisplayArea = false;
}, ScrollToTop: function() {
var e2, t2, n2, i2;
if (!u.GOM.firstDisplay && (null !== u.$E.scrollableParent || (e2 = u.$E.base, t2 = 20, n2 = a(), (i2 = e2.offset()).top >= n2.t && i2.top <= n2.t + n2.h - t2) || u.$E.base.get(0).scrollIntoView(), null !== u.$E.scrollableParent)) {
var o2 = u.$E.scrollableParent.scrollTop(), r2 = Math.abs(u.$E.scrollableParent.offset().top - u.$E.base.offset().top - o2);
o2 > r2 && window.ng_draf(function() {
u.$E.scrollableParent.scrollTop(r2);
});
}
} }, u.VOM = { viewerDisplayed: false, viewerIsFullscreen: false, infoDisplayed: false, toolbarsDisplayed: true, toolsHide: null, zoom: { posX: 0, posY: 0, userFactor: 1, isZooming: false }, padding: { H: 0, V: 0 }, window: { lastWidth: 0, lastHeight: 0 }, $viewer: null, $toolbar: null, $toolbarTL: null, $toolbarTR: null, toolbarMode: "std", playSlideshow: false, playSlideshowTimerID: 0, slideshowDelay: 3e3, albumID: -1, viewerMediaIsChanged: false, items: [], panMode: "off", $baseCont: null, $content: null, content: { previous: { vIdx: -1, $media: null, NGY2Item: function() {
return u.I[u.VOM.items[u.VOM.content.previous.vIdx].ngy2ItemIdx];
} }, current: { vIdx: -1, $media: null, NGY2Item: function() {
return u.I[u.VOM.items[u.VOM.content.current.vIdx].ngy2ItemIdx];
} }, next: { vIdx: -1, $media: null, NGY2Item: function() {
return u.I[u.VOM.items[u.VOM.content.next.vIdx].ngy2ItemIdx];
} } }, IdxNext: function() {
var e2 = 0;
return u.VOM.content.current.vIdx < u.VOM.items.length - 1 && (e2 = u.VOM.content.current.vIdx + 1), e2;
}, IdxPrevious: function() {
var e2 = u.VOM.content.current.vIdx - 1;
return 0 == u.VOM.content.current.vIdx && (e2 = u.VOM.items.length - 1), e2;
}, gallery: { $elt: null, $tmbCont: null, gwidth: 0, vwidth: 0, oneTmbWidth: 0, firstDisplay: true, posX: 0, SetThumbnailActive() {
"none" != u.O.viewerGallery && (this.$tmbCont.children().removeClass("activeVThumbnail"), this.$tmbCont.children().eq(u.VOM.content.current.vIdx).addClass("activeVThumbnail"), this.firstDisplay = false);
}, Resize: function() {
if ("none" != u.O.viewerGallery) if (this.firstDisplay) new NGTweenable().tween({ from: { opacity: 0 }, to: { opacity: 1 }, easing: "easeInOutSine", duration: 1e3, step: function(e3) {
}, finish: function(e3) {
} });
else {
var e2 = u.VOM.$viewer.width(), t2 = Math.trunc(e2 / this.oneTmbWidth);
if (this.vwidth = t2 * this.oneTmbWidth, this.$elt.css({ width: this.vwidth, left: (e2 - this.vwidth) / 2 }), u.VOM.items.length >= t2) {
var n2 = this.oneTmbWidth * u.VOM.content.current.vIdx;
n2 + this.posX < this.vwidth ? n2 + this.posX < 0 && (this.posX = -n2) : n2 + this.posX >= this.vwidth && (this.posX = this.vwidth - (n2 + this.oneTmbWidth));
}
this.PanGallery(0);
}
}, PanGallery: function(e2) {
this.gwidth < u.VOM.$viewer.width() && (this.posX = (u.VOM.$viewer.width() - this.gwidth) / 2, e2 = 0), this.posX > this.vwidth - this.oneTmbWidth && (this.posX = this.vwidth - this.oneTmbWidth), this.posX + this.gwidth < this.oneTmbWidth && (this.posX = -this.gwidth + this.oneTmbWidth), this.$tmbCont.css(u.CSStransformName, "translateX(" + (this.posX + e2) + "px)");
}, PanGalleryEnd: function(e2) {
var t2 = 100 * e2;
new NGTweenable().tween({ from: { pan: u.VOM.gallery.posX }, to: { pan: u.VOM.gallery.posX + t2 }, easing: "easeOutQuad", duration: 500, step: function(e3) {
u.VOM.gallery.posX = e3.pan, u.VOM.gallery.PanGallery(0);
} });
} }, hammertime: null, swipePosX: 0, panPosX: 0, panPosY: 0, panThreshold: 60, panXOnly: false, singletapTime: 0, viewerTheme: "", timeImgChanged: 0, ImageLoader: { maxChecks: 1e3, list: [], intervalHandle: null, loadImage: function(e2, t2) {
if ("img" == t2.mediaKind) {
var n2 = new Image();
if (n2.src = t2.responsiveURL(), n2.width && n2.height) e2(n2.width, n2.height, t2, 0);
else {
var i2, a2 = { image: n2, url: t2.responsiveURL(), ngitem: t2, callback: e2, checks: 1 };
for (i2 = 0; i2 < this.list.length && null != this.list[i2]; i2++) ;
this.list[i2] = a2, this.intervalHandle || (this.intervalHandle = setInterval(this.interval, 50));
}
}
}, interval: function() {
for (var e2, t2 = 0, n2 = u.VOM.ImageLoader.list, i2 = 0; i2 < n2.length; i2++) null != (e2 = n2[i2]) && (e2.image.width && e2.image.height ? (u.VOM.ImageLoader.list[i2] = null, e2.callback(e2.image.width, e2.image.height, e2.ngitem, e2.checks)) : e2.checks > u.VOM.ImageLoader.maxChecks ? (u.VOM.ImageLoader.list[i2] = null, e2.callback(0, 0, e2.ngitem, e2.checks)) : (t2++, e2.checks++));
0 == t2 && (u.VOM.ImageLoader.list = [], clearInterval(u.VOM.ImageLoader.intervalHandle), delete u.VOM.ImageLoader.intervalHandle);
} } }, u.popup = { isDisplayed: false, $elt: null, close: function() {
null != this.$elt && new NGTweenable().tween({ from: { opacity: 1 }, to: { opacity: 0 }, attachment: { t: this }, easing: "easeInOutSine", duration: 100, step: function(e2, t2) {
null != t2.t.$elt && t2.t.$elt.css("opacity", e2.opacity);
}, finish: function(e2, t2) {
null != t2.t.$elt && (t2.t.$elt.remove(), t2.t.$elt = null), t2.t.isDisplayed = false;
} });
} }, u.galleryTheme_dark = { navigationBar: { background: "none", borderTop: "", borderBottom: "", borderRight: "", borderLeft: "" }, navigationBreadcrumb: { background: "#111", color: "#fff", colorHover: "#ccc", borderRadius: "4px" }, navigationFilter: { color: "#ddd", background: "#111", colorSelected: "#fff", backgroundSelected: "#111", borderRadius: "4px" }, navigationPagination: { background: "#111", color: "#fff", colorHover: "#ccc", borderRadius: "4px" }, thumbnail: { background: "#444", backgroundImage: "linear-gradient(315deg, #111 0%, #445 90%)", borderColor: "#000", borderRadius: "0px", labelOpacity: 1, labelBackground: "rgba(34, 34, 34, 0)", titleColor: "#fff", titleBgColor: "transparent", titleShadow: "", descriptionColor: "#ccc", descriptionBgColor: "transparent", descriptionShadow: "", stackBackground: "#aaa" }, thumbnailIcon: { padding: "5px", color: "#fff", shadow: "" }, pagination: { background: "#181818", backgroundSelected: "#666", color: "#fff", borderRadius: "2px", shapeBorder: "3px solid #666", shapeColor: "#444", shapeSelectedColor: "#aaa" } }, u.galleryTheme_light = { navigationBar: { background: "none", borderTop: "", borderBottom: "", borderRight: "", borderLeft: "" }, navigationBreadcrumb: { background: "#eee", color: "#000", colorHover: "#333", borderRadius: "4px" }, navigationFilter: { background: "#eee", color: "#222", colorSelected: "#000", backgroundSelected: "#eee", borderRadius: "4px" }, navigationPagination: { background: "#eee", color: "#000", colorHover: "#333", borderRadius: "4px" }, thumbnail: { background: "#444", backgroundImage: "linear-gradient(315deg, #111 0%, #445 90%)", borderColor: "#000", labelOpacity: 1, labelBackground: "rgba(34, 34, 34, 0)", titleColor: "#fff", titleBgColor: "transparent", titleShadow: "", descriptionColor: "#ccc", descriptionBgColor: "transparent", descriptionShadow: "", stackBackground: "#888" }, thumbnailIcon: { padding: "5px", color: "#fff" }, pagination: { background: "#eee", backgroundSelected: "#aaa", color: "#000", borderRadius: "2px", shapeBorder: "3px solid #666", shapeColor: "#444", shapeSelectedColor: "#aaa" } }, u.viewerTheme_dark = { background: "#000", barBackground: "rgba(4, 4, 4, 0.2)", barBorder: "0px solid #111", barColor: "#fff", barDescriptionColor: "#ccc" }, u.viewerTheme_light = { background: "#f8f8f8", barBackground: "rgba(4, 4, 4, 0.7)", barBorder: "0px solid #111", barColor: "#fff", barDescriptionColor: "#ccc" };
var h = NGY2Tools.NanoAlert, d = NGY2Tools.NanoConsoleLog;
function m() {
u.VOM.items = [], u.VOM.albumID = "0", u.GOM.curNavLevel = "l1";
var e2 = 0, t2 = u.$E.base[0].attributes, n2 = "";
t2.hasOwnProperty("src") && (n2 = t2.src.nodeValue), "" == n2 && t2.hasOwnProperty("data-ngthumb") && (n2 = t2["data-ngthumb"].nodeValue);
for (var i2 = void 0, a2 = 0; a2 < u.I.length; a2++) if ("image" == u.I[a2].kind) {
var o2 = new c(a2);
u.VOM.items.push(o2), u.I[a2].thumbImg().src == n2 && (i2 = e2), e2++;
}
u.VOM.items.length > 0 ? De(i2) : d(u, "No content for Lightbox standalone.");
}
function p(e2) {
var t2 = { albumID: "0", imageID: "0" }, n2 = e2.split("/");
return n2.length > 0 && (t2.albumID = n2[0], n2.length > 1 && (t2.imageID = n2[1])), t2;
}
function g(e2, t2) {
u.VOM.viewerDisplayed && tt(null);
var n2 = NGY2Item.GetIdx(u, t2);
u.GOM.curNavLevel = "lN", 0 == n2 && (u.GOM.curNavLevel = "l1"), u.layout.SetEngine(), u.galleryResizeEventEnabled = false, -1 == n2 && (NGY2Item.New(u, "", "", t2, "0", "album"), n2 = u.I.length - 1), u.I[n2].contentIsLoaded ? (de(), u.GOM.pagination.currentPage = 0, rt(t2, ""), w(n2)) : q(t2, g, e2, t2);
}
function f() {
switch (u.galleryDisplayMode.Get()) {
case "PAGINATION":
u.layout.support.rows && u.galleryMaxRows.Get() > 0 && function() {
if (u.$E.conTnBottom.css("opacity", 0), u.$E.conTnBottom.children().remove(), 0 == u.GOM.items.length) return;
var e3 = Math.ceil((u.GOM.items[u.GOM.items.length - 1].row + 1) / u.galleryMaxRows.Get());
if (1 == e3) return;
u.GOM.pagination.currentPage > e3 - 1 && (u.GOM.pagination.currentPage = e3 - 1);
if (M(), 0 == u.GOM.displayInterval.len) return;
if ("NUMBERS" == u.O.galleryPaginationMode && u.GOM.pagination.currentPage > 0) {
jQuery('<div class="nGY2PaginationPrev">' + u.O.icons.paginationPrevious + "</div>").appendTo(u.$E.conTnBottom).click(function(e4) {
G();
});
}
var t2 = 0, n2 = e3;
if ("NUMBERS" != u.O.galleryPaginationMode) t2 = 0;
else {
var i2 = u.O.paginationVisiblePages;
if (i2 >= e3) t2 = 0;
else {
var a2 = 0;
a2 = i2 % 2 == 1 ? (i2 + 1) / 2 : i2 / 2, u.GOM.pagination.currentPage < a2 ? (t2 = 0, (n2 = i2 - 1) > e3 && (n2 = e3 - 1)) : (t2 = u.GOM.pagination.currentPage - a2, (n2 = t2 + i2) > e3 && (n2 = e3 - 1)), n2 - t2 < i2 && (t2 = n2 - i2) < 0 && (t2 = 0);
}
}
for (var o2 = t2; o2 < n2; o2++) {
var r2 = "", l3 = "";
switch (u.O.galleryPaginationMode) {
case "NUMBERS":
r2 = "nGY2paginationItem", l3 = o2 + 1;
break;
case "DOTS":
r2 = "nGY2paginationDot";
break;
case "RECTANGLES":
r2 = "nGY2paginationRectangle";
}
o2 == u.GOM.pagination.currentPage && (r2 += "CurrentPage");
var s3 = jQuery('<div class="' + r2 + '">' + l3 + "</div>").appendTo(u.$E.conTnBottom);
s3.data("pageNumber", o2), s3.click(function(e4) {
u.GOM.pagination.currentPage = jQuery(this).data("pageNumber"), at("pageChanged"), u.GOM.ScrollToTop(), L(), E(true);
});
}
if ("NUMBERS" == u.O.galleryPaginationMode && u.GOM.pagination.currentPage + 1 < e3) {
jQuery('<div class="nGY2PaginationNext">' + u.O.icons.paginationNext + "</div>").appendTo(u.$E.conTnBottom).click(function(e4) {
y();
});
}
u.$E.conTnBottom.css("opacity", 1);
}();
break;
case "MOREBUTTON":
u.$E.conTnBottom.off("click");
var e2 = u.GOM.items.length - u.GOM.itemsDisplayed;
0 == e2 ? u.$E.conTnBottom.empty() : (u.$E.conTnBottom.html('<div class="nGY2GalleryMoreButton"><div class="nGY2GalleryMoreButtonAnnotation">+' + e2 + " " + u.O.icons.galleryMoreButton + "</div></div>"), u.$E.conTnBottom.on("click", function(e3) {
u.GOM.displayedMoreSteps++, x();
}));
}
}
function b(e2) {
var t2 = "";
u.O.breadcrumbHideIcons || (t2 = u.O.icons.breadcrumbAlbum, 0 == e2 && (t2 = u.O.icons.breadcrumbHome));
var n2 = jQuery('<div class="oneItem">' + t2 + u.I[e2].title + "</div>").appendTo(u.GOM.navigationBar.$newContent.find(".nGY2Breadcrumb"));
u.O.breadcrumbOnlyCurrentLevel ? 0 == e2 ? jQuery(n2).data("albumID", "0") : jQuery(n2).data("albumID", u.I[e2].albumID) : jQuery(n2).data("albumID", u.I[e2].GetID()), n2.click(function() {
g("-1", jQuery(this).data("albumID"));
});
}
function v(e2) {
var t2 = jQuery('<div class="oneItem">' + (u.O.RTL ? u.O.icons.breadcrumbSeparatorRtl : u.O.icons.breadcrumbSeparator) + "</div>").appendTo(u.GOM.navigationBar.$newContent.find(".nGY2Breadcrumb"));
jQuery(t2).data("albumIdx", e2), t2.click(function() {
var e3 = jQuery(this).data("albumIdx");
g("-1", u.I[e3].GetID());
});
}
function O(e2) {
if (u.GOM.navigationBar.$newContent = jQuery('<div class="nGY2Navigationbar"></div>'), 1 == u.O.displayBreadcrumb && !u.O.thumbnailAlbumDisplayImage) {
var t2 = 0, n2 = [];
if (0 != e2) {
var i2 = u.I.length;
n2.push(e2);
var a2 = e2;
for (t2++; 0 != u.I[a2].albumID && -1 != u.I[a2].albumID; ) for (var o2 = 1; o2 < i2; o2++) if (u.I[o2].GetID() == u.I[a2].albumID) {
a2 = o2, n2.push(a2), t2++;
break;
}
}
u.O.breadcrumbAutoHideTopLevel && 0 == t2 || function(e3) {
if (jQuery('<div class="nGY2NavigationbarItem nGY2Breadcrumb"></div>').appendTo(u.GOM.navigationBar.$newContent), u.O.breadcrumbOnlyCurrentLevel) 0 == e3.length ? b(0) : (1 == e3.length ? v(0) : v(e3[0]), b(e3[0]));
else if (b(0), e3.length > 0) {
v(0);
for (var t3 = e3.length - 1; t3 >= 0; t3--) b(e3[t3]), t3 > 0 && v(e3[t3 - 1]);
}
}(n2);
}
if (0 != u.galleryFilterTags.Get()) {
var r2 = u.I[e2].albumTagList.length;
if (r2 > 0) {
for (o2 = 0; o2 < r2; o2++) {
var l3 = u.I[e2].albumTagList[o2], s3 = u.O.icons.navigationFilterUnselected, c2 = "Unselected";
jQuery.inArray(l3, u.I[e2].albumTagListSel) >= 0 && (c2 = "Selected", s3 = u.O.icons.navigationFilterSelected), jQuery('<div class="nGY2NavigationbarItem nGY2NavFilter' + c2 + '">' + s3 + " " + l3 + "</div>").appendTo(u.GOM.navigationBar.$newContent).click(function() {
var t3 = jQuery(this), n3 = t3.text().replace(/^\s*|\s*$/, "");
if ("single" == u.galleryFilterTagsMode.Get()) u.I[e2].albumTagListSel = [], u.I[e2].albumTagListSel.push(n3);
else {
if (t3.hasClass("nGY2NavFilterUnselected")) u.I[e2].albumTagListSel.push(n3);
else {
var i3 = jQuery.inArray(n3, u.I[e2].albumTagListSel);
-1 != i3 && u.I[e2].albumTagListSel.splice(i3, 1);
}
t3.toggleClass("nGY2NavFilters-oneTagUnselected nGY2NavFilters-oneTagSelected");
}
g("-1", u.I[e2].GetID());
});
}
jQuery('<div class="nGY2NavigationbarItem nGY2NavFilterSelectAll">' + u.O.icons.navigationFilterSelectedAll + "</div>").appendTo(u.GOM.navigationBar.$newContent).click(function() {
u.I[e2].albumTagListSel = [], g("-1", u.I[e2].GetID());
});
}
}
"PAGINATION" == u.galleryDisplayMode.Get() && u.O.galleryPaginationTopButtons && (u.layout.support.rows && u.galleryMaxRows.Get() > 0 && (jQuery('<div class="nGY2NavigationbarItem nGY2NavPagination">' + u.O.icons.navigationPaginationPrevious + "</div>").appendTo(u.GOM.navigationBar.$newContent).click(function() {
G();
}), jQuery('<div class="nGY2NavigationbarItem nGY2NavPagination">' + u.O.icons.navigationPaginationNext + "</div>").appendTo(u.GOM.navigationBar.$newContent).click(function() {
y();
})));
}
function y() {
var e2 = 0;
j(), u.galleryMaxRows.Get() > 0 && (e2 = (u.GOM.items[u.GOM.items.length - 1].row + 1) / u.galleryMaxRows.Get());
var t2 = Math.ceil(e2), n2 = u.GOM.pagination.currentPage;
n2 < t2 - 1 ? n2++ : n2 = 0, u.GOM.pagination.currentPage = n2, at("pageChanged"), u.GOM.ScrollToTop(), L(), E(true);
}
function G() {
var e2 = 0;
j(), u.galleryMaxRows.Get() > 0 && (e2 = (u.GOM.items[u.GOM.items.length - 1].row + 1) / u.galleryMaxRows.Get());
var t2 = Math.ceil(e2), n2 = u.GOM.pagination.currentPage;
n2 > 0 ? n2-- : n2 = t2 - 1, u.GOM.pagination.currentPage = n2, at("pageChanged"), u.GOM.ScrollToTop(), L(), E(true);
}
function M() {
switch (u.GOM.displayInterval.from = 0, u.GOM.displayInterval.len = u.I.length, u.galleryDisplayMode.Get()) {
case "PAGINATION":
if (u.layout.support.rows) {
let a2 = u.GOM.items.length;
var e2 = u.GOM.pagination.currentPage * u.galleryMaxRows.Get(), t2 = e2 + u.galleryMaxRows.Get(), n2 = -1;
u.GOM.displayInterval.len = 0;
for (var i2 = 0; i2 < a2; i2++) {
let a3 = u.GOM.items[i2];
a3.row >= e2 && a3.row < t2 && (-1 == n2 && (u.GOM.displayInterval.from = i2, n2 = i2), u.GOM.displayInterval.len++);
}
}
break;
case "MOREBUTTON":
if (u.layout.support.rows) {
let e3 = u.GOM.items.length, t3 = u.O.galleryDisplayMoreStep * (u.GOM.displayedMoreSteps + 1);
u.GOM.displayInterval.len = 0;
for (i2 = 0; i2 < e3; i2++) {
u.GOM.items[i2].row < t3 && u.GOM.displayInterval.len++;
}
}
break;
case "ROWS":
if (u.layout.support.rows) {
let e3 = u.GOM.items.length, t3 = u.galleryMaxRows.Get();
u.galleryLastRowFull.Get() && -1 != u.GOM.lastFullRow && t3 > u.GOM.lastFullRow + 1 && (t3 = u.GOM.lastFullRow + 1), u.GOM.displayInterval.len = 0;
for (i2 = 0; i2 < e3; i2++) {
u.GOM.items[i2].row < t3 && u.GOM.displayInterval.len++;
}
}
break;
default:
case "FULLCONTENT":
if (u.layout.support.rows && u.galleryLastRowFull.Get() && -1 != u.GOM.lastFullRow) {
let e3 = u.GOM.items.length, t3 = u.GOM.lastFullRow + 1;
u.GOM.displayInterval.len = 0;
for (i2 = 0; i2 < e3; i2++) {
u.GOM.items[i2].row < t3 && u.GOM.displayInterval.len++;
}
}
}
}
function w(e2) {
at("galleryRenderStart"), clearTimeout(u.GOM.slider.timerID), u.GOM.slider.hostIdx = -1;
var t2 = u.O.fnGalleryRenderStart;
if (null !== t2 && ("function" == typeof t2 ? t2(u.I[u.GOM.albumIdx]) : window[t2](u.I[u.GOM.albumIdx])), u.layout.SetEngine(), u.galleryResizeEventEnabled = false, u.GOM.albumIdx = -1, u.GOM.lastDisplayedIdx = -1, void 0 !== u.$E.conTnBottom && u.$E.conTnBottom.empty(), O(e2), u.GOM.firstDisplay) {
u.GOM.firstDisplay = false;
var n2 = Date.now() - u.GOM.firstDisplayTime;
n2 < u.O.galleryRenderDelay ? requestTimeout(function() {
I(e2);
}, u.O.galleryRenderDelay - n2) : I(e2), u.O.galleryRenderDelay = 0;
} else {
var i2 = false;
0 == u.GOM.navigationBar.$newContent.children().length && (i2 = true), new NGTweenable().tween({ from: { opacity: 1 }, to: { opacity: 0 }, duration: 300, easing: "easeInQuart", attachment: { h: i2 }, step: function(e3, t3) {
u.$E.conTnParent.css({ opacity: e3.opacity }), t3.h && u.$E.conNavigationBar.css({ opacity: e3.opacity });
}, finish: function(t3, n3) {
n3.h && u.$E.conNavigationBar.css({ opacity: 0, display: "none" }), u.GOM.ScrollToTop(), I(e2);
} });
}
}
function I(e2) {
var t2 = u.$E.conNavigationBar.children().length;
(u.$E.conNavigationBar.empty(), u.GOM.navigationBar.$newContent.children().clone(true, true).appendTo(u.$E.conNavigationBar), u.$E.conNavigationBar.children().length > 0 && 0 == t2) ? (u.$E.conNavigationBar.css({ opacity: 0, display: "block" }), new NGTweenable().tween({ from: { opacity: 0 }, to: { opacity: 1 }, duration: 200, easing: "easeInQuart", step: function(e3) {
u.$E.conNavigationBar.css(e3);
}, finish: function(t3) {
u.$E.conNavigationBar.css({ opacity: 1 }), requestTimeout(function() {
T(e2);
}, 20);
} })) : requestTimeout(function() {
T(e2);
}, 20);
}
function T(e2) {
u.GOM.lastZIndex = parseInt(u.$E.base.css("z-index")), isNaN(u.GOM.lastZIndex) && (u.GOM.lastZIndex = 0), u.$E.conTnParent.css({ opacity: 0 }), u.$E.conTn.off().empty();
for (var t2 = u.I.length, n2 = 0; n2 < t2; n2++) {
var i2 = u.I[n2];
i2.hovered = false, i2.$elt = null, i2.$Elts = [], i2.eltTransform = [], i2.eltFilter = [], i2.width = 0, i2.height = 0, i2.left = 0, i2.top = 0, i2.resizedContentWidth = 0, i2.resizedContentHeight = 0, i2.thumbnailImgRevealed = false;
}
null == u.CSStransformName ? u.$E.conTn.css("left", "0px") : u.$E.conTn.css(u.CSStransformName, "none"), requestTimeout(function() {
!function(e3) {
var t3 = /* @__PURE__ */ new Date();
u.$E.conTnParent.css("opacity", 1), u.GOM.items = [], u.GOM.displayedMoreSteps = 0, "onBottom" == u.O.thumbnailLabel.get("position") ? u.tn.labelHeight[u.GOM.curNavLevel] = function() {
var e4 = [], t4 = 0;
if (0 == u.O.thumbnailLabel.get("display")) return 0;
e4[t4++] = '<div class="nGY2GThumbnail ' + u.O.theme + '" style="display:block;visibility:hidden;position:absolute;top:-9999px;left:-9999px;" ><div class="nGY2GThumbnailSub">', 1 == u.O.thumbnailLabel.get("display") && (e4[t4++] = ' <div class="nGY2GThumbnailLabel" ' + u.tn.style.getLabel() + ">", e4[t4++] = ' <div class="nGY2GThumbnailAlbumTitle" ' + u.tn.style.getTitle() + ">aAzZjJ</div>", 1 == u.O.thumbnailLabel.get("displayDescription") && (e4[t4++] = ' <div class="nGY2GThumbnailDescription" ' + u.tn.style.getDesc() + ">aAzZjJ</div>"), e4[t4++] = " </div>");
e4[t4++] = "</div></div>";
var n4 = jQuery(e4.join("")).appendTo(u.$E.conTn), i3 = n4.find(".nGY2GThumbnailLabel").outerHeight(true);
return n4.remove(), i3;
}() : u.tn.labelHeight[u.GOM.curNavLevel] = 0;
u.GOM.albumIdx = e3, at("galleryRenderEnd");
var n3 = u.O.fnGalleryRenderEnd;
null !== n3 && ("function" == typeof n3 ? n3(u.I[u.GOM.albumIdx]) : window[n3](u.I[u.GOM.albumIdx]));
!function() {
for (var e4 = "", t4 = u.I[u.GOM.albumIdx].GetID(), n4 = u.I.length, i3 = 0, a2 = 0; a2 < n4; a2++) {
var o2 = u.I[a2];
if (o2.isToDisplay(t4)) {
var r2 = o2.thumbImg().width, l3 = o2.thumbImg().height;
!u.layout.prerequisite.imageSize || 0 != r2 && 0 != l3 || (e4 += '<img src="' + o2.thumbImg().src + '" data-idx="' + i3 + '" data-albumidx="' + u.GOM.albumIdx + '">'), 0 == l3 && (l3 = u.tn.defaultSize.getHeight()), 0 == r2 && (r2 = u.tn.defaultSize.getWidth());
var s3 = new u.GOM.GTn(a2, r2, l3);
u.GOM.items.push(s3), i3++;
}
}
at("galleryObjectModelBuilt");
var c2 = u.O.fnGalleryObjectModelBuilt;
null !== c2 && ("function" == typeof c2 ? c2() : window[c2]());
if ("" != e4) {
var h2 = jQuery(e4), d2 = ngimagesLoaded(h2);
return h2 = null, d2.on("progress", function(e5, t5) {
if (t5.isLoaded) {
var n5 = t5.img.getAttribute("data-idx");
if (t5.img.getAttribute("data-albumidx") == u.GOM.albumIdx) {
var i4 = u.GOM.items[n5];
i4.imageWidth = t5.img.naturalWidth, i4.imageHeight = t5.img.naturalHeight;
var a3 = u.I[i4.thumbnailIdx];
a3.thumbs.width[u.GOM.curNavLevel][u.GOM.curWidth] = i4.imageWidth, a3.thumbs.height[u.GOM.curNavLevel][u.GOM.curWidth] = i4.imageHeight, u.GalleryResizeThrottled();
var o3 = a3.thumbs.width.l1;
for (let e6 in o3) o3.hasOwnProperty(e6) && e6 != u.GOM.curWidth && u.tn.settings.width.l1[e6] == u.tn.settings.getW() && u.tn.settings.height.l1[e6] == u.tn.settings.getH() && (a3.thumbs.width.l1[e6] = i4.imageWidth, a3.thumbs.height.l1[e6] = i4.imageHeight);
o3 = a3.thumbs.width.lN;
for (let e6 in o3) o3.hasOwnProperty(e6) && e6 != u.GOM.curWidth && u.tn.settings.width.lN[e6] == u.tn.settings.getW() && u.tn.settings.height.lN[e6] == u.tn.settings.getH() && (a3.thumbs.width.lN[e6] = i4.imageWidth, a3.thumbs.height.lN[e6] = i4.imageHeight);
}
}
}), u.galleryResizeEventEnabled = true, false;
}
return true;
}() ? u.galleryResizeEventEnabled = true : (S(), function() {
var e4 = u.galleryDisplayTransitionDuration.Get();
switch (u.galleryDisplayTransition.Get()) {
case "ROTATEX":
u.$E.base.css({ perspective: "1000px", "perspective-origin": "50% 0%" }), new NGTweenable().tween({ from: { r: 50 }, to: { r: 0 }, attachment: { orgIdx: u.GOM.albumIdx }, duration: e4, easing: "easeOutCirc", step: function(e5, t4) {
t4.orgIdx == u.GOM.albumIdx && u.$E.conTnParent.css(u.CSStransformName, "rotateX(" + e5.r + "deg)");
} });
break;
case "SLIDEUP":
u.$E.conTnParent.css({ opacity: 0 }), new NGTweenable().tween({ from: { y: 200, o: 0 }, to: { y: 0, o: 1 }, attachment: { orgIdx: u.GOM.albumIdx }, duration: e4, easing: "easeOutCirc", step: function(e5, t4) {
t4.orgIdx == u.GOM.albumIdx && u.$E.conTnParent.css(u.CSStransformName, "translate( 0px, " + e5.y + "px)").css("opacity", e5.o);
} });
}
}(), L(), requestTimeout(function() {
E(false);
}, 20));
u.O.debugMode && console.log("GalleryRenderPart3: " + (/* @__PURE__ */ new Date() - t3));
}(e2);
}, 20);
}
function x() {
var e2 = /* @__PURE__ */ new Date();
if (u.galleryResizeEventEnabled = false, 0 == S()) return u.galleryResizeEventEnabled = true, void (u.O.debugMode && console.log("GalleryResize1: " + (/* @__PURE__ */ new Date() - e2)));
u.O.debugMode && console.log("GalleryResizeSetLayout: " + (/* @__PURE__ */ new Date() - e2)), L(), E(false), u.O.debugMode && console.log("GalleryResizeFull: " + (/* @__PURE__ */ new Date() - e2));
}
function S() {
var e2 = true;
switch (u.GOM.cache.areaWidth = u.$E.conTnParent.width(), u.GOM.displayArea = { width: 0, height: 0 }, u.layout.engine) {
case "JUSTIFIED":
e2 = function() {
for (var e3 = 0, t3 = u.GOM.cache.areaWidth, n2 = 0, i2 = 0, a2 = [], o2 = 0, r2 = [], l3 = false, s3 = u.tn.settings.GetResponsive("gutterWidth"), c2 = u.tn.settings.GetResponsive("gutterHeight"), h2 = 0, d2 = 0, m2 = false, p2 = false, g2 = u.tn.defaultSize.getOuterHeight(), f2 = 2 * u.tn.opt.Get("borderHorizontal"), b2 = 2 * u.tn.opt.Get("borderVertical"), v2 = 1, O2 = u.GOM.items.length, y2 = 0; y2 < O2; y2++) {
let n3 = u.GOM.items[y2];
if (1 == n3.deleted) break;
if (n3.imageWidth > 0) {
let i3 = n3.imageWidth / n3.imageHeight, u2 = Math.floor(g2 * i3);
if (l3 && (l3 = false, o2++, e3 = 0, m2 = false, p2 = false, v2 = 1), n3.imageHeight > n3.imageWidth ? m2 = true : p2 = true, e3 + s3 + u2 < t3 - v2 * f2) {
e3 += u2 + s3, r2[o2] = g2;
var G2 = Math.max(m2 ? h2 : 0, p2 ? d2 : 0);
G2 > 0 && (r2[o2] = Math.min(r2[o2], G2)), a2[o2] = y2;
} else {
let n4 = (t3 - v2 * f2) / (e3 += s3 + u2), i4 = Math.floor(g2 * n4);
r2[o2] = i4, m2 && (h2 = Math.max(h2, i4)), p2 && (d2 = Math.max(d2, i4)), a2[o2] = y2, l3 = true;
}
v2++;
}
}
o2 = 0, i2 = 0, n2 = 0, u.GOM.lastFullRow = 0;
for (y2 = 0; y2 < O2; y2++) {
let e4 = u.GOM.items[y2];
if (!(e4.imageWidth > 0)) return false;
{
let l4 = e4.imageWidth / e4.imageHeight, h3 = Math.floor(l4 * r2[o2]);
y2 == a2[o2] && (a2.length != o2 + 1 || n2 + s3 + h3 + f2 > t3) && (h3 = t3 - n2 - f2);
let d3 = parseInt(r2[o2]);
h3 = parseInt(h3), e4.resizedContentWidth = h3, e4.resizedContentHeight = d3, e4.width = h3 + f2, e4.height = d3 + u.tn.labelHeight.get() + b2, e4.row = o2, e4.top = i2;
let m3 = n2;
u.O.RTL && (m3 = t3 - n2 - e4.width), e4.left = m3, n2 += e4.width + s3, y2 == a2[o2] && (i2 += e4.height + c2, u.GOM.lastFullRow = o2 - 1, o2++, n2 = 0);
}
}
return u.GOM.displayArea.width = t3, true;
}();
break;
case "CASCADING":
e2 = function() {
var e3 = 0, t3 = u.GOM.cache.areaWidth, n2 = 0, i2 = [], a2 = z(t3), o2 = 0, r2 = u.tn.settings.GetResponsive("gutterHeight"), l3 = 1, s3 = u.tn.defaultSize.getOuterWidth(), c2 = u.GOM.items.length, h2 = 0;
"justified" == u.O.thumbnailAlignment ? (a2 = Math.min(a2, c2), o2 = 1 == a2 ? 0 : (t3 - a2 * s3) / (a2 - 1)) : o2 = u.tn.settings.GetResponsive("gutterWidth");
var d2 = 2 * u.tn.opt.Get("borderHorizontal"), m2 = 2 * u.tn.opt.Get("borderVertical");
if (u.GOM.lastFullRow = -1, "fillWidth" == u.O.thumbnailAlignment) {
var p2 = (a2 - 1) * o2;
(l3 = (t3 - p2) / (a2 * s3)) > 1 && a2++, p2 = (a2 - 1) * o2, l3 = Math.min((t3 - p2) / (a2 * s3), 1);
}
for (var g2 = (s3 = Math.round(s3 * l3)) - d2, f2 = Math.round(u.tn.opt.Get("baseGridHeight") * l3), b2 = 0; b2 < c2; b2++) {
var v2 = u.GOM.items[b2];
if (1 == v2.deleted) break;
if (v2.imageHeight > 0 && v2.imageWidth > 0) {
var O2 = 0, y2 = (h2 = 0, v2.imageHeight / v2.imageWidth);
if (v2.resizedContentWidth = g2, v2.resizedContentHeight = v2.resizedContentWidth * y2, f2 > 0) {
var G2 = Math.max(Math.trunc(v2.resizedContentHeight / f2), 1);
v2.resizedContentHeight = f2 * G2 + (G2 - 1) * (m2 + r2);
}
if (v2.height = v2.resizedContentHeight + m2 + u.tn.labelHeight.get(), v2.width = s3, v2.row = 0, 0 == n2) O2 = e3 * (s3 + o2), i2[e3] = v2.height + r2, ++e3 >= a2 && (e3 = 0, n2++);
else {
for (var M2 = 0, w2 = i2[0], I2 = 1; I2 < a2; I2++) i2[I2] + 5 < w2 && (w2 = i2[I2], M2 = I2);
h2 = i2[M2], O2 = M2 * (s3 + o2), i2[M2] = h2 + v2.height + r2;
}
var T2 = O2;
u.O.RTL && (T2 = 0 - O2 - s3), v2.left = T2, v2.top = h2;
}
}
return u.GOM.displayArea.width = a2 * (s3 + o2) - o2, true;
}();
break;
case "MOSAIC":
e2 = function() {
var e3 = u.GOM.cache.areaWidth, t3 = u.tn.settings.GetResponsive("gutterHeight"), n2 = u.tn.settings.GetResponsive("gutterWidth"), i2 = 2 * u.tn.opt.Get("borderHorizontal"), a2 = 2 * u.tn.opt.Get("borderVertical"), o2 = u.GOM.items.length, r2 = 0, l3 = 0, s3 = 0, c2 = 0, h2 = 0;
let d2 = u.tn.settings.getMosaic();
for (var m2 = 0; m2 < o2; m2++) {
let e4 = d2[s3];
var p2 = (e4.c - 1) * u.tn.defaultSize.getOuterWidth() + (e4.c - 1) * n2, g2 = e4.w * u.tn.defaultSize.getOuterWidth() + (e4.w - 1) * n2;
if (h2 = Math.max(h2, p2 + g2), c2 = Math.max(c2, e4.c - 1 + e4.w), ++s3 >= d2.length) break;
}
var f2 = (c2 - 1) * n2, b2 = Math.min((e3 - f2) / (h2 - f2), 1);
r2 = 0, s3 = 0;
for (m2 = 0; m2 < o2; m2++) {
let e4 = u.GOM.items[m2], o3 = d2[s3];
e4.top = Math.round((o3.r - 1) * u.tn.defaultSize.getOuterHeight() * b2) + (o3.r - 1) * t3 + r2 * l3 + u.tn.labelHeight.get() * (o3.r - 1), r2 > 0 && (e4.top += t3), e4.left = (o3.c - 1) * Math.round(u.tn.defaultSize.getOuterWidth() * b2) + (o3.c - 1) * n2, e4.height = Math.round(o3.h * u.tn.defaultSize.getOuterHeight() * b2) + (o3.h - 1) * t3 + u.tn.labelHeight.get() * o3.h, e4.resizedContentHeight = e4.height - u.tn.labelHeight.get() - a2, e4.width = Math.round(o3.w * u.tn.defaultSize.getOuterWidth() * b2) + (o3.w - 1) * n2, e4.resizedContentWidth = e4.width - i2, e4.row = r2, 0 == r2 && (l3 = Math.max(l3, e4.top + e4.height)), ++s3 >= d2.length && (s3 = 0, r2++);
}
return u.GOM.displayArea.width = (h2 - f2) * b2 + f2, true;
}();
break;
case "GRID":
default:
e2 = function() {
var e3 = 0, t3 = 0, n2 = u.GOM.cache.areaWidth, i2 = 0, a2 = u.tn.settings.GetResponsive("gutterHeight"), o2 = z(n2), r2 = 0, l3 = [], s3 = 0, c2 = n2, h2 = u.tn.defaultSize.getOuterWidth(), d2 = 1, m2 = u.GOM.items.length, p2 = 2 * u.tn.opt.Get("borderHorizontal"), g2 = 2 * u.tn.opt.Get("borderVertical");
"justified" == u.O.thumbnailAlignment ? (o2 = Math.min(o2, m2), i2 = 1 == o2 ? 0 : (n2 - o2 * h2) / (o2 - 1)) : i2 = u.tn.settings.GetResponsive("gutterWidth");
if (u.O.RTL || "fillWidth" == u.O.thumbnailAlignment) {
var f2 = (o2 - 1) * i2;
(d2 = (n2 - f2) / (o2 * h2)) > 1 && o2++, f2 = (o2 - 1) * i2, d2 = Math.min((n2 - f2) / (o2 * h2), 1), c2 = o2 * h2 + f2;
}
u.GOM.lastFullRow = 0;
for (var b2 = 0, v2 = (h2 = Math.round(h2 * d2)) - p2, O2 = Math.round(u.tn.defaultSize.getOuterHeight() * d2) + u.tn.labelHeight.get(), y2 = Math.round(u.tn.defaultSize.getOuterHeight() * d2) - g2, G2 = 0; G2 < m2; G2++) {
0 == t3 ? (e3 = s3 * (h2 + i2), l3[s3] = e3, r2 = e3 + h2) : e3 = l3[s3];
var M2 = e3;
u.O.RTL && (M2 = parseInt(c2) - e3 - h2);
var w2 = u.GOM.items[G2];
w2.top = t3, w2.left = M2, w2.height = O2, w2.width = h2, "fillWidth" == u.O.thumbnailAlignment && (w2.resizedContentWidth = v2, w2.resizedContentHeight = y2), w2.row = b2, ++s3 >= o2 && (s3 = 0, t3 += O2 + a2, u.GOM.lastFullRow = b2, b2++);
}
return u.GOM.displayArea.width = r2, true;
}();
}
at("galleryLayoutApplied");
var t2 = u.O.fnGalleryLayoutApplied;
return null !== t2 && ("function" == typeof t2 ? t2() : window[t2]()), e2;
}
function L() {
null == u.CSStransformName ? u.$E.conTn.css("left", "0px") : u.$E.conTn.css(u.CSStransformName, "none");
}
function C() {
u.GOM.cache.viewport = a(), u.GOM.cache.areaWidth = u.$E.base.width(), u.O.lightboxStandalone || (u.GOM.cache.containerOffset = u.$E.conLoadingB.offset());
}
function E(e2) {
C();
var t2 = u.GOM.items.length;
u.GOM.itemsDisplayed = 0;
var n2 = 0;
M();
for (var i2 = 0; i2 < t2; i2++) {
let t3 = u.GOM.items[i2];
i2 >= u.GOM.displayInterval.from && n2 < u.GOM.displayInterval.len ? (t3.inDisplayArea = true, e2 && (t3.neverDisplayed = true), u.GOM.itemsDisplayed++, n2++) : t3.inDisplayArea = false;
}
f();
var a2 = [], o2 = [];
C(), u.GOM.clipArea.top = -1, n2 = 0;
var r2 = -1;
u.GOM.clipArea.height = 0;
for (i2 = 0; i2 < t2; i2++) {
let e3 = u.GOM.items[i2];
if (e3.inDisplayArea) {
if (-1 == u.GOM.clipArea.top && (u.GOM.clipArea.top = e3.top), e3.top - u.GOM.clipArea.top <= -1 && (u.GOM.clipArea.top = e3.top), u.GOM.clipArea.height = Math.max(u.GOM.clipArea.height, e3.top - u.GOM.clipArea.top + e3.height), e3.neverDisplayed) {
var l3 = u.GOM.cache.containerOffset.top + (e3.top - u.GOM.clipArea.top);
if (l3 + e3.height >= u.GOM.cache.viewport.t - 50 && l3 <= u.GOM.cache.viewport.t + u.GOM.cache.viewport.h + 50) {
let t3 = u.I[e3.thumbnailIdx];
null == t3.$elt && A(t3, e3.thumbnailIdx, i2), a2.push({ idx: i2, delay: n2, top: e3.top, left: e3.left }), n2++;
}
} else o2.push({ idx: i2, delay: 0, top: e3.top, left: e3.left });
r2 = i2;
} else {
e3.displayed = false;
let t3 = u.I[e3.thumbnailIdx];
null != t3.$elt && t3.$elt.css({ opacity: 0, display: "none" });
}
}
var s3 = u.$E.conTnParent.width();
if (u.GOM.displayArea.width == u.GOM.displayAreaLast.width && u.GOM.clipArea.height == u.GOM.displayAreaLast.height || (u.$E.conTn.width(u.GOM.displayArea.width).height(u.GOM.clipArea.height), u.GOM.displayAreaLast.width = u.GOM.displayArea.width, u.GOM.displayAreaLast.height = u.GOM.clipArea.height), s3 != u.$E.conTnParent.width()) return u.GOM.cache.areaWidth = u.$E.conTnParent.width(), S(), L(), void E(e2);
if (u.layout.support.rows && ("ROWS" == u.galleryDisplayMode.Get() || "FULLCONTENT" == u.galleryDisplayMode.Get() && u.galleryLastRowFull.Get() && -1 != u.GOM.lastFullRow) && (u.GOM.lastDisplayedIdxNew = r2 < t2 - 1 ? r2 : -1, -1 != u.GOM.lastDisplayedIdx)) {
u.I[u.GOM.items[u.GOM.lastDisplayedIdx].thumbnailIdx].$getElt(".nGY2GThumbnailIconsFullThumbnail").html("");
}
u.GOM.thumbnails2Display = [];
var c2 = k(a2);
k(o2), u.GOM.thumbnails2Display.forEach(function(e3) {
!function(e4, t3) {
function n3(e5, t4) {
return Math.floor(Math.random() * (t4 - e5 + 1) + e5);
}
var i3 = {}, a3 = {};
switch (u.tn.opt.Get("displayTransition")) {
case "RANDOMSCALE": {
for (var o3 = n3(0, 3); o3 == u.GOM.lastRandomValue; ) o3 = n3(0, 3);
u.GOM.lastRandomValue = o3;
let t4 = [0.95, 1, 1.05, 1.1][o3];
e4.$elt.css({ "z-index": u.GOM.lastZIndex + [1, 2, 3, 4][o3], "box-shadow": "0px 0px 5px 3px rgba(0,0,0,0.74)" }), i3 = { scale: 0.5, opacity: 0 }, a3 = { scale: t4, opacity: 1 };
break;
}
case "SCALEUP": {
let e5 = u.tn.opt.Get("displayTransitionStartVal");
0 == e5 && (e5 = 0.6), i3 = { scale: e5, opacity: 0 }, a3 = { scale: 1, opacity: 1 };
break;
}
case "SCALEDOWN": {
let e5 = u.tn.opt.Get("displayTransitionStartVal");
0 == e5 && (e5 = 1.3), i3 = { scale: e5, opacity: 0 }, a3 = { scale: 1, opacity: 1 };
break;
}
case "SLIDEUP": {
let e5 = u.tn.opt.Get("displayTransitionStartVal");
0 == e5 && (e5 = 50), i3 = { opacity: 0, translateY: e5 }, a3 = { opacity: 1, translateY: 0 };
break;
}
case "SLIDEDOWN": {
let e5 = u.tn.opt.Get("displayTransitionStartVal");
0 == e5 && (e5 = -50), i3 = { opacity: 0, translateY: e5 }, a3 = { opacity: 1, translateY: 0 };
break;
}
case "FLIPUP": {
let e5 = u.tn.opt.Get("displayTransitionStartVal");
0 == e5 && (e5 = 100), i3 = { opacity: 0, translateY: e5, rotateX: 45 }, a3 = { opacity: 1, translateY: 0, rotateX: 0 };
break;
}
case "FLIPDOWN": {
let e5 = u.tn.opt.Get("displayTransitionStartVal");
0 == e5 && (e5 = -100), i3 = { opacity: 0, translateY: e5, rotateX: -45 }, a3 = { opacity: 1, translateY: 0, rotateX: 0 };
break;
}
case "SLIDEUP2": {
let e5 = u.tn.opt.Get("displayTransitionStartVal");
0 == e5 && (e5 = 100), i3 = { opacity: 0, translateY: e5, rotateY: 40 }, a3 = { opacity: 1, translateY: 0, rotateY: 0 };
break;
}
case "IMAGESLIDEUP":
i3 = { opacity: 0, top: "100%" }, a3 = { opacity: 1, top: "0%" };
break;
case "SLIDEDOWN2": {
let e5 = u.tn.opt.Get("displayTransitionStartVal");
0 == e5 && (e5 = -100), i3 = { opacity: 0, translateY: e5, rotateY: 40 }, a3 = { opacity: 1, translateY: 0, rotateY: 0 };
break;
}
case "SLIDERIGHT": {
let e5 = u.tn.opt.Get("displayTransitionStartVal");
0 == e5 && (e5 = -150), i3 = { opacity: 0, translateX: e5 }, a3 = { opacity: 1, translateX: 0 };
break;
}
case "SLIDELEFT": {
let e5 = u.tn.opt.Get("displayTransitionStartVal");
0 == e5 && (e5 = 150), i3 = { opacity: 0, translateX: e5 }, a3 = { opacity: 1, translateX: 0 };
break;
}
case "FADEIN":
i3 = { opacity: 0 }, a3 = { opacity: 1 };
}
var r3 = new NGTweenable();
r3.tween({ from: i3, to: a3, attachment: { $e: e4.$elt, item: e4, tw: r3 }, delay: t3, duration: u.tn.opt.Get("displayTransitionDuration"), easing: u.tn.opt.Get("displayTransitionEasing"), step: function(e5, t4) {
window.requestAnimationFrame(function() {
if (null !== t4.item.$elt) switch (u.tn.opt.Get("displayTransition")) {
case "RANDOMSCALE":
case "SCALEUP":
t4.$e.css(u.CSStransformName, "scale(" + e5.scale + ")").css("opacity", e5.opacity);
break;
case "SCALEDOWN":
t4.item.$elt.last().css("opacity", e5.opacity), t4.item.CSSTransformSet(".nGY2GThumbnail", "scale", e5.scale), t4.item.CSSTransformApply(".nGY2GThumbnail");
break;
case "SLIDEUP":
t4.item.$elt.css("opacity", e5.opacity), t4.item.CSSTransformSet(".nGY2GThumbnail", "translate", "0px, " + e5.translateY + "px"), t4.item.CSSTransformApply(".nGY2GThumbnail");
break;
case "SLIDEDOWN":
t4.item.$elt.css("opacity", e5.opacity), t4.item.CSSTransformSet(".nGY2GThumbnail", "translate", "0px," + e5.translateY + "px"), t4.item.CSSTransformApply(".nGY2GThumbnail");
break;
case "FLIPUP":
t4.item.CSSTransformSet(".nGY2GThumbnail", "translate", "0px," + e5.translateY + "px"), t4.item.CSSTransformSet(".nGY2GThumbnail", "rotateX", e5.rotateX + "deg"), t4.item.$elt.css("opacity", e5.opacity), t4.item.CSSTransformApply(".nGY2GThumbnail");
break;
case "FLIPDOWN":
t4.item.$elt.css("opacity", e5.opacity), t4.item.CSSTransformSet(".nGY2GThumbnail", "translate", "0px," + e5.translateY + "px"), t4.item.CSSTransformSet(".nGY2GThumbnail", "rotateX", e5.rotateX + "deg"), t4.item.CSSTransformApply(".nGY2GThumbnail");
break;
case "SLIDEUP2":
t4.item.$elt.css("opacity", e5.opacity), t4.item.CSSTransformSet(".nGY2GThumbnail", "translate", "0px," + e5.translateY + "px"), t4.item.CSSTransformSet(".nGY2GThumbnail", "rotateY", e5.rotateY + "deg"), t4.item.CSSTransformApply(".nGY2GThumbnail");
break;
case "IMAGESLIDEUP":
t4.item.$elt.css("opacity", e5.opacity), t4.item.$Elts[".nGY2GThumbnailImage"].css("top", e5.top);
break;
case "SLIDEDOWN2":
t4.item.$elt.css("opacity", e5.opacity), t4.item.CSSTransformSet(".nGY2GThumbnail", "translate", "0px, " + e5.translateY + "px"), t4.item.CSSTransformSet(".nGY2GThumbnail", "rotateY", e5.rotateY + "deg"), t4.item.CSSTransformApply(".nGY2GThumbnail");
break;
case "SLIDERIGHT":
t4.item.$elt.css("opacity", e5.opacity), t4.item.CSSTransformSet(".nGY2GThumbnail", "translate", e5.translateX + "px, 0px"), t4.item.CSSTransformApply(".nGY2GThumbnail");
break;
case "SLIDELEFT":
t4.item.CSSTransformSet(".nGY2GThumbnail", "translate", e5.translateX + "px, 0px"), t4.item.$elt.css("opacity", e5.opacity), t4.item.CSSTransformApply(".nGY2GThumbnail");
break;
case "FADEIN":
t4.$e.css(e5);
}
else t4.tw.stop(false);
});
}, finish: function(e5, t4) {
window.requestAnimationFrame(function() {
if (null !== t4.item.$elt) {
switch (u.tn.opt.Get("displayTransition")) {
case "RANDOMSCALE":
t4.$e.css(u.CSStransformName, "scale(" + e5.scale + ")").css("opacity", "");
break;
case "SCALEUP":
t4.$e.css(u.CSStransformName, "").css("opacity", "");
break;
case "SCALEDOWN":
t4.item.$elt.last().css("opacity", ""), t4.item.CSSTransformSet(".nGY2GThumbnail", "scale", e5.scale), t4.item.CSSTransformApply(".nGY2GThumbnail");
break;
case "IMAGESLIDEUP":
t4.item.$elt.css("opacity", ""), t4.item.$Elts[".nGY2GThumbnailImage"].css("top", 0);
break;
case "SLIDEDOWN2":
t4.item.$elt.css("opacity", ""), t4.item.CSSTransformApply(".nGY2GThumbnail");
break;
default:
t4.item.$elt.css("opacity", "");
}
B(t4.item);
}
});
} });
}(e3.itm, e3.d);
}), u.GOM.thumbnails2Display = [], "NONE" == u.tn.opt.Get("displayTransition") ? (u.galleryResizeEventEnabled = true, at("galleryDisplayed")) : requestTimeout(function() {
u.galleryResizeEventEnabled = true, at("galleryDisplayed");
}, c2 * u.tn.opt.Get("displayInterval"));
}
function k(e2) {
var t2 = e2.length;
if (0 == t2) return 0;
var n2 = u.tn.opt.Get("displayOrder");
if ("random" == n2 ? NGY2Tools.AreaShuffle(e2) : ("rowByRow" == n2 && "JUSTIFIED" != u.layout.engine && "GRID" != u.layout.engine && (n2 = ""), "colFromRight" != n2 && "colFromLeft" != n2 || "CASCADING" == u.layout.engine || "GRID" == u.layout.engine || (n2 = "")), "colFromRight" == n2 || "colFromLeft" == n2) {
for (var i2 = [], a2 = [], o2 = 0; o2 < t2; o2++) null == i2[e2[o2].left] && (i2[e2[o2].left] = [], a2.push(e2[o2].left)), i2[e2[o2].left].push(e2[o2].idx);
"colFromRight" == n2 && (a2 = a2.reverse());
for (o2 = 0; o2 < a2.length; o2++) for (var r2 = a2[o2], l3 = 0; l3 < i2[r2].length; l3++) D(i2[r2][l3], o2);
return o2;
}
var s3 = 0, c2 = e2[0].top;
for (o2 = 0; o2 < t2; o2++) "rowByRow" == n2 ? e2[o2].top > c2 && (s3++, c2 = e2[o2].top) : s3++, D(e2[o2].idx, s3);
return s3;
}
function D(e2, t2) {
var n2 = 0, i2 = u.GOM.items[e2], a2 = u.GOM.items[e2].thumbnailIdx, o2 = u.I[a2];
if (i2.neverDisplayed) {
var r2 = i2.top - u.GOM.clipArea.top;
if (u.tn.opt.Get("stacks") > 0 ? (o2.$elt.last().css({ display: "block" }), o2.$elt.css({ top: r2, left: i2.left })) : o2.$elt.css({ display: "block", top: r2, left: i2.left }), n2 = r2, true === u.O.thumbnailWaitImageLoaded) ngimagesLoaded(o2.$getElt(".nGY2TnImg2")).on("progress", function(e3, t3) {
if (t3.isLoaded && t3.img.getAttribute("data-albumidx") == u.GOM.albumIdx) {
var n3 = t3.img.getAttribute("data-idx");
u.I[n3].ThumbnailImageReveal();
}
});
!function(e3, t3) {
var n3 = u.GOM.items[e3], i3 = u.I[n3.thumbnailIdx];
if ("NONE" == u.tn.opt.Get("displayTransition")) i3.$elt.css({ opacity: 1 }), B(i3);
else {
if (null == i3.$elt) return;
var a3 = u.GOM.cache.containerOffset.top + (n3.top - u.GOM.clipArea.top), o3 = u.GOM.cache.viewport;
if (a3 + (n3.top - u.GOM.clipArea.top) >= o3.t - 50 && a3 <= o3.t + o3.h + 50) {
var r3 = t3 * u.tn.opt.Get("displayInterval");
return void ("CUSTOM" == u.tn.opt.Get("displayTransition") ? "lN" == u.GOM.curNavLevel ? u.O.fnThumbnailDisplayEffect(i3.$elt, i3, e3, r3) : u.O.fnThumbnailL1DisplayEffect(i3.$elt, i3, e3, r3) : u.GOM.thumbnails2Display.push({ itm: i3, d: r3 }));
}
i3.$elt.css({ opacity: 1 }), B(i3);
}
}(e2, t2), i2.displayed = true, i2.neverDisplayed = false;
} else {
var l3 = u.GOM.cache.containerOffset.top + o2.top;
r2 = u.GOM.cache.containerOffset.top + (i2.top - u.GOM.clipArea.top);
n2 = i2.top - u.GOM.clipArea.top;
var s3 = u.GOM.cache.viewport;
if (u.O.thumbnailDisplayOutsideScreen || l3 + i2.height >= s3.t - s3.h && l3 <= s3.t + 4 * s3.h || r2 + i2.height >= s3.t - s3.h && r2 <= s3.t + 4 * s3.h) if (i2.displayed) {
if (o2.top != i2.top || o2.left != i2.left) if (1 == u.O.galleryResizeAnimation) new NGTweenable().tween({ from: { top: o2.top, left: o2.left, height: o2.height, width: o2.width }, to: { top: n2, left: i2.left, height: i2.height, width: i2.width }, attachment: { $e: o2.$elt }, duration: 100, delay: t2 * u.tn.opt.Get("displayInterval") / 5, easing: "easeOutQuart", step: function(e3, t3) {
t3.$e.css(e3);
}, finish: function(e3, t3) {
this.dispose();
} });
else o2.$elt.css({ top: n2, left: i2.left });
} else i2.displayed = true, o2.$elt.css({ display: "block", top: n2, left: i2.left, opacity: 1 }), B(o2);
else i2.displayed = false, o2.$elt.css({ display: "none" });
}
if (o2.left = i2.left, o2.top = n2, o2.width == i2.width && o2.height == i2.height || (o2.$elt.css({ width: i2.width, height: i2.height }), o2.width = i2.width, o2.height = i2.height, o2.resizedContentWidth == i2.resizedContentWidth && o2.resizedContentHeight == i2.resizedContentHeight || ("albumUp" == o2.kind || (o2.$getElt(".nGY2GThumbnailImage").css({ height: i2.resizedContentHeight, width: i2.resizedContentWidth }), "JUSTIFIED" == u.layout.engine && o2.$getElt(".nGY2GThumbnailImg").css({ height: i2.resizedContentHeight, width: i2.resizedContentWidth })), o2.resizedContentWidth = i2.resizedContentWidth, o2.resizedContentHeight = i2.resizedContentHeight)), u.GOM.lastDisplayedIdxNew == e2 && u.layout.support.rows && ("ROWS" == u.galleryDisplayMode.Get() && u.galleryMaxRows.Get() > 0 || "FULLCONTENT" == u.galleryDisplayMode.Get() && u.galleryLastRowFull.Get() && -1 != u.GOM.lastFullRow)) {
var c2 = u.GOM.items.length - e2 - 1;
"0" != o2.albumID && u.O.thumbnailLevelUp && c2--, c2 > 0 ? ((u.O.thumbnailOpenInLightox || u.O.thumbnailSliderDelay > 0) && o2.$getElt(".nGY2GThumbnailIconsFullThumbnail").html("+" + c2), "right" != u.O.thumbnailLabel.get("position") && "left" != u.O.thumbnailLabel.get("position") && u.GOM.slider.hostItem != u.GOM.NGY2Item(e2) && (V(u.GOM.slider.hostItem), u.GOM.slider.hostIdx = e2, u.GOM.slider.hostItem = u.GOM.NGY2Item(e2), u.GOM.slider.nextIdx = e2, u.GOM.slider.currentIdx = e2, function() {
if (0 == u.O.thumbnailSliderDelay || -1 == u.GOM.slider.hostIdx) return;
clearTimeout(u.GOM.slider.timerID);
var e3 = u.GOM.slider.hostItem;
0 == e3.$getElt(".nGY2TnImgNext").length && (e3.$getElt(".nGY2TnImg").clone().removeClass("nGY2TnImg").addClass("nGY2TnImgNext").insertAfter(e3.$getElt(".nGY2TnImg")), e3.$getElt(".nGY2TnImgBack").clone().removeClass("nGY2TnImgBack").addClass("nGY2TnImgBackNext").insertAfter(e3.$getElt(".nGY2TnImg", true)), e3.$getElt(".nGY2GThumbnailImage", true), e3.$getElt(".nGY2GThumbnailImg", true));
e3.CSSTransformSet(".nGY2TnImgNext", "translateX", "100%", true), e3.CSSTransformApply(".nGY2TnImgNext"), e3.CSSTransformSet(".nGY2TnImgBackNext", "translateX", "100%", true), e3.CSSTransformApply(".nGY2TnImgBackNext"), N(), u.GOM.slider.timerID = requestTimeout(function() {
!function e4() {
if (null != u.GOM.slider.hostItem.$getElt()) {
var t3 = new NGTweenable();
u.GOM.slider.tween = t3, t3.tween({ from: { left: 100 }, to: { left: 0 }, duration: 800, delay: 0, easing: "easeOutQuart", step: function(e5) {
null != u.GOM.slider.hostItem.$getElt() ? (u.GOM.slider.hostItem.CSSTransformSet(".nGY2TnImgBack", "translateX", -(100 - e5.left) + "%"), u.GOM.slider.hostItem.CSSTransformApply(".nGY2TnImgBack"), u.GOM.slider.hostItem.CSSTransformSet(".nGY2TnImg", "translateX", -(100 - e5.left) + "%"), u.GOM.slider.hostItem.CSSTransformApply(".nGY2TnImg"), u.GOM.slider.hostItem.CSSTransformSet(".nGY2TnImgBackNext", "translateX", e5.left + "%"), u.GOM.slider.hostItem.CSSTransformApply(".nGY2TnImgBackNext"), u.GOM.slider.hostItem.CSSTransformSet(".nGY2TnImgNext", "translateX", e5.left + "%"), u.GOM.slider.hostItem.CSSTransformApply(".nGY2TnImgNext")) : u.GOM.slider.tween.stop(false);
}, finish: function(t4) {
null != u.GOM.slider.hostItem.$getElt() && null != u.GOM.NGY2Item(u.GOM.slider.nextIdx) && (V(u.GOM.NGY2Item(u.GOM.slider.nextIdx)), u.GOM.slider.currentIdx = u.GOM.slider.nextIdx, N(), clearTimeout(u.GOM.slider.timerID), u.GOM.slider.timerID = requestTimeout(function() {
e4();
}, u.O.thumbnailSliderDelay));
} });
}
}();
}, u.O.thumbnailSliderDelay);
}())) : (V(u.GOM.slider.hostItem), u.GOM.slider.hostIdx = -1), u.GOM.lastDisplayedIdx = e2;
}
}
function N() {
u.GOM.slider.nextIdx++, u.GOM.slider.nextIdx >= u.GOM.items.length && (u.GOM.slider.nextIdx = u.GOM.slider.hostIdx);
var e2 = u.GOM.NGY2Item(u.GOM.slider.nextIdx), t2 = "url('" + u.emptyGif + "')";
null != e2.imageDominantColors && (t2 = "url('" + e2.imageDominantColors + "')"), u.GOM.slider.hostItem.$getElt(".nGY2TnImgBackNext", true).css({ "background-image": t2, opacity: 1 }), u.GOM.slider.hostItem.$getElt(".nGY2TnImgNext", true).css({ "background-image": "url('" + e2.thumbImg().src + "')", opacity: 1 }), u.GOM.slider.hostItem.$getElt(".nGY2TnImgNext .nGY2GThumbnailImg", true).attr("src", e2.thumbImg().src);
}
function V(e2) {
if (-1 != u.GOM.slider.hostIdx) {
null != u.GOM.slider.tween && 1 == u.GOM.slider.tween._isTweening && u.GOM.slider.tween.stop(false);
var t2 = "url('" + u.emptyGif + "')";
if (null != e2.imageDominantColors && (t2 = "url('" + e2.imageDominantColors + "')"), u.GOM.slider.hostItem.$getElt(".nGY2TnImgBack").css("background-image", t2), u.GOM.slider.hostItem.$getElt(".nGY2TnImg").css("background-image", "url('" + e2.thumbImg().src + "')"), u.GOM.slider.hostItem.$getElt(".nGY2TnImg .nGY2GThumbnailImg").attr("src", e2.thumbImg().src), u.GOM.slider.hostItem.CSSTransformSet(".nGY2TnImgBack", "translateX", "0"), u.GOM.slider.hostItem.CSSTransformApply(".nGY2TnImgBack"), u.GOM.slider.hostItem.CSSTransformSet(".nGY2TnImg", "translateX", "0"), u.GOM.slider.hostItem.CSSTransformApply(".nGY2TnImg"), u.GOM.slider.hostItem.CSSTransformSet(".nGY2TnImgBackNext", "translateX", "100%", true), u.GOM.slider.hostItem.CSSTransformApply(".nGY2TnImgBackNext"), u.GOM.slider.hostItem.CSSTransformSet(".nGY2TnImgNext", "translateX", "100%", true), u.GOM.slider.hostItem.CSSTransformApply(".nGY2TnImgNext"), 1 == u.O.thumbnailLabel.get("display")) {
var n2 = u.O.icons.thumbnailAlbum;
"album" != e2.kind && (n2 = u.O.icons.thumbnailImage), u.GOM.slider.hostItem.$getElt(".nGY2GThumbnailTitle").html(n2 + $2(e2)), u.GOM.slider.hostItem.$getElt(".nGY2GThumbnailDescription").html(n2 + F(e2));
}
}
}
function Y(e2) {
var t2 = u.tn.opt.Get("stacks");
if (0 == t2) return "";
for (var n2 = "", i2 = 0; i2 < t2; i2++) n2 = '<div class="nGY2GThumbnailStack " style="display:none;' + e2 + '"></div>' + n2;
return n2;
}
function A(e2, t2, n2) {
if (e2.eltTransform = [], e2.eltFilter = [], e2.hoverInitDone = false, e2.$Elts = [], "albumUp" != e2.kind) {
var i2 = [], a2 = 0, o2 = "";
false === u.O.thumbnailOpenInLightox && (o2 = "cursor:default;");
var r2 = e2.thumbImg().src.replace(/'/g, "%27"), l3 = $2(e2), s3 = "", c2 = "background-image: url('" + u.emptyGif + "');";
null != e2.imageDominantColors ? c2 = "background-image: url('" + e2.imageDominantColors + "');" : null != e2.imageDominantColor ? s3 = "background-color:" + e2.imageDominantColor + ";" : c2 = "";
var h2 = "opacity:1;";
1 == u.O.thumbnailWaitImageLoaded && (h2 = "opacity:0;"), i2[a2++] = Y(s3) + '<div class="nGY2GThumbnail nGY2GThumbnail_' + u.GOM.curNavLevel + '" style="display:none;opacity:0;' + o2 + '"><div class="nGY2GThumbnailSub ' + (u.O.thumbnailSelectable && e2.selected ? "nGY2GThumbnailSubSelected" : "") + '">';
var d2 = u.tn.settings.getW(), m2 = u.tn.settings.getH();
null !== u.tn.settings.getMosaic() && (d2 = u.GOM.items[n2].width, m2 = u.GOM.items[n2].height);
var p2 = "contain";
u.tn.opt.Get("crop") && (p2 = "cover");
var g2 = "position: absolute; top: 0px; left: 0px; width:" + d2 + "px; height:" + m2 + "px;" + s3 + c2 + " background-position: center center; background-repeat: no-repeat; background-size:" + p2 + "; overflow: hidden;";
i2[a2++] = '<div class="nGY2GThumbnailImage nGY2TnImgBack" style="' + g2 + '"></div>';
var f2 = h2 + "position: absolute; top: 0px; left: 0px; width:" + d2 + "px; height:" + m2 + "px; background-image: url('" + r2.replace(/\\/g, "\\\\") + "'); background-position: center center; background-repeat: no-repeat; background-size:" + p2 + "; overflow: hidden;";
i2[a2++] = '<div class="nGY2GThumbnailImage nGY2TnImg" style="' + f2 + '">', i2[a2++] = ' <img class="nGY2GThumbnailImg nGY2TnImg2" src="' + r2 + '" alt="' + l3 + '" style="opacity:0;" data-idx="' + t2 + '" data-albumidx="' + u.GOM.albumIdx + '" >', i2[a2++] = "</div>", i2[a2++] = '<div class="nGY2GThumbnailCustomLayer"></div>', 1 == u.O.thumbnailLabel.get("display") && (i2[a2++] = ' <div class="nGY2GThumbnailLabel" ' + u.tn.style.getLabel(e2) + ">", "album" == e2.kind ? i2[a2++] = ' <div class="nGY2GThumbnailTitle nGY2GThumbnailAlbumTitle" ' + u.tn.style.getTitle() + ">" + u.O.icons.thumbnailAlbum + l3 + "</div>" : i2[a2++] = ' <div class="nGY2GThumbnailTitle nGY2GThumbnailImageTitle" ' + u.tn.style.getTitle() + ">" + u.O.icons.thumbnailImage + l3 + "</div>", i2[a2++] = ' <div class="nGY2GThumbnailDescription" ' + u.tn.style.getDesc() + ">" + F(e2) + "</div>", i2[a2++] = " </div>"), i2[a2++] = function(e3) {
var t3 = _(e3, "topLeft") + _(e3, "topRight") + _(e3, "bottomLeft") + _(e3, "bottomRight");
return t3 += '<div class="nGY2GThumbnailIconsFullThumbnail"></div>';
}(e2), i2[a2++] = "</div></div>";
var b2 = jQuery(i2.join("")).appendTo(u.$E.conTn);
e2.$elt = b2, b2.data("index", n2), e2.$getElt(".nGY2GThumbnailImg").data("index", n2);
var v2 = u.O.fnThumbnailInit;
null !== v2 && ("function" == typeof v2 ? v2(b2, e2, n2) : window[v2](b2, e2, n2)), "image gallery by nanogallery2 [build]" != e2.title && H(n2);
} else !function(e3, t3) {
var n3 = [], i3 = 0, a3 = "";
false === u.O.thumbnailOpenInLightox && (a3 = "cursor:default;"), n3[i3++] = Y("") + '<div class="nGY2GThumbnail" style="display:none;opacity:0;' + a3 + '" >', n3[i3++] = ' <div class="nGY2GThumbnailSub">';
var o3 = u.tn.defaultSize.getHeight(), r3 = u.tn.defaultSize.getWidth();
n3[i3++] = ' <div class="nGY2GThumbnailImage" style="width:' + r3 + "px;height:" + o3 + 'px;"><img class="nGY2GThumbnailImg" src="' + u.emptyGif + '" alt="" style="max-width:' + r3 + "px;max-height:" + o3 + 'px;" ></div>', n3[i3++] = ' <div class="nGY2GThumbnailAlbumUp" >' + u.O.icons.thumbnailAlbumUp + "</div>", n3[i3++] = " </div>", n3[i3++] = "</div>";
var l4 = jQuery(n3.join("")).appendTo(u.$E.conTn);
e3.$elt = l4, l4.data("index", t3), e3.$getElt(".nGY2GThumbnailImg").data("index", t3);
}(e2, n2);
}
function _(e2, t2) {
var n2 = "", i2 = u.tn.toolbar.get(e2), a2 = { xs: 0, sm: 1, me: 2, la: 3, xl: 4 }, o2 = 0;
if ("" != i2[t2]) {
var r2 = "top: 0; right: 0; text-align: right;";
switch (t2) {
case "topLeft":
r2 = "top: 0; left: 0; text-align: left;";
break;
case "bottomRight":
r2 = "bottom: 0; right: 0; text-align: right;";
break;
case "bottomLeft":
r2 = "bottom: 0; left: 0; text-align: left;";
}
n2 += ' <ul class="nGY2GThumbnailIcons" style="' + r2 + '">';
for (var l3 = i2[t2].split(","), s3 = l3.length, c2 = 0; c2 < s3; c2++) {
var h2 = l3[c2].replace(/^\s*|\s*$/, ""), d2 = h2.substring(0, 2).toLowerCase(), m2 = h2, p2 = true;
if (/xs|sm|me|la|xl/i.test(d2) && (a2[d2] > a2[u.GOM.curWidth] && (p2 = false), m2 = h2.substring(2)), p2) {
var g2 = c2 + 1 < s3 ? "&nbsp;" : "";
switch (m2) {
case "COUNTER":
"album" == e2.kind && (n2 += ' <li class="nGY2GThumbnailIcon" data-ngy2action="">', n2 += ' <div class="nGY2GThumbnailIconImageCounter"></div>', n2 += ' <div class="nGY2GThumbnailIconText">' + u.O.icons.thumbnailCounter + Math.max(e2.getContentLength(false), e2.numberItems) + g2 + "</div>", n2 += " </li>", o2++);
break;
case "COUNTER2":
"album" == e2.kind && (n2 += ' <li class="nGY2GThumbnailIcon" data-ngy2action="">', n2 += ' <div class="nGY2GThumbnailIconTextBadge">' + u.O.icons.thumbnailCounter + Math.max(e2.getContentLength(false), e2.numberItems) + g2 + "</div>", n2 += " </li>", o2++);
break;
case "SHARE":
n2 += ' <li class="nGY2GThumbnailIcon" data-ngy2action="' + m2 + '">', n2 += " <div>" + u.O.icons.thumbnailShare + "</div>", n2 += " </li>", o2++;
break;
case "DOWNLOAD":
n2 += ' <li class="nGY2GThumbnailIcon" data-ngy2action="' + m2 + '">', n2 += " <div>" + u.O.icons.thumbnailDownload + "</div>", n2 += " </li>", o2++;
break;
case "INFO":
n2 += ' <li class="nGY2GThumbnailIcon" data-ngy2action="' + m2 + '">', n2 += " <div>" + u.O.icons.thumbnailInfo + "</div>", n2 += " </li>", o2++;
break;
case "SHOPPINGCART":
n2 += ' <li class="nGY2GThumbnailIcon" data-ngy2action="' + m2 + '">', n2 += P(e2), n2 += " </li>", o2++;
break;
case "DISPLAY":
n2 += ' <li class="nGY2GThumbnailIcon" data-ngy2action="DISPLAY">', n2 += ' <div class="nGY2GThumbnailIconImageShare">' + u.O.icons.thumbnailDisplay + "</div>", n2 += " </li>", o2++;
break;
case "CUSTOM1":
case "CUSTOM2":
case "CUSTOM3":
case "CUSTOM4":
case "CUSTOM5":
case "CUSTOM6":
case "CUSTOM7":
case "CUSTOM8":
case "CUSTOM9":
case "CUSTOM10":
var f2 = m2.replace("CUSTOM", "");
n2 += ' <li class="nGY2GThumbnailIcon" data-ngy2action="' + m2.toLowerCase() + '">', n2 += ' <div class="nGY2GThumbnailIconImageShare">' + u.O.icons["thumbnailCustomTool" + f2] + "</div>", n2 += " </li>", o2++;
break;
case "FEATURED":
true === e2.featured && (n2 += ' <li class="nGY2GThumbnailIcon" data-ngy2action="">', n2 += ' <div class="nGY2GThumbnailIconImageFeatured">' + u.O.icons.thumbnailFeatured + "</div>", n2 += " </li>", o2++);
break;
case "SELECT":
1 == u.O.thumbnailSelectable && (n2 += ' <li class="nGY2GThumbnailIcon" data-ngy2action="TOGGLESELECT">', true === e2.selected ? n2 += ' <div class="nGY2GThumbnailIconImageSelect nGY2ThumbnailSelected">' + u.O.icons.thumbnailSelected + "</div>" : n2 += ' <div class="nGY2GThumbnailIconImageSelect nGY2ThumbnailUnselected">' + u.O.icons.thumbnailUnselected + "</div>", n2 += " </li>", o2++);
}
}
}
n2 += " </ul>";
}
return o2 > 0 ? n2 : "";
}
function P(e2) {
for (var t2 = 0, n2 = e2.GetID(), i2 = 0; i2 < u.shoppingCart.length; i2++) u.I[u.shoppingCart[i2].idx].GetID() == n2 && (t2 = u.shoppingCart[i2].qty);
return 0 == t2 && (t2 = ""), " <div>" + u.O.icons.thumbnailShoppingcart + t2 + "</div>";
}
function R(e2) {
var t2 = e2.$elt;
if (null != t2) {
var n2 = t2.find('*[data-ngy2action="SHOPPINGCART"]');
void 0 !== n2 && n2.html(P(e2));
}
}
function $2(e2) {
var t2 = e2.title;
if (1 == u.O.thumbnailLabel.get("display")) {
void 0 !== t2 && 0 != t2.length || (t2 = "&nbsp;"), "" != u.i18nTranslations.thumbnailImageTitle && (t2 = u.i18nTranslations.thumbnailImageTitle);
var n2 = u.O.thumbnailLabel.get("titleMaxLength");
n2 > 3 && t2.length > n2 && (t2 = t2.substring(0, n2) + "...");
}
return t2;
}
function F(e2) {
var t2 = "";
if (1 == u.O.thumbnailLabel.get("displayDescription")) {
t2 = "album" == e2.kind ? "" != u.i18nTranslations.thumbnailImageDescription ? u.i18nTranslations.thumbnailAlbumDescription : e2.description : "" != u.i18nTranslations.thumbnailImageDescription ? u.i18nTranslations.thumbnailImageDescription : e2.description;
var n2 = u.O.thumbnailLabel.get("descriptionMaxLength");
n2 > 3 && t2.length > n2 && (t2 = t2.substring(0, n2) + "..."), 0 == t2.length && (t2 = "&nbsp;");
}
return t2;
}
function z(e2) {
var t2 = u.tn.defaultSize.getOuterWidth(), n2 = 0;
return n2 = "justified" == u.O.thumbnailAlignment ? Math.floor(e2 / t2) : Math.floor((e2 + u.tn.settings.GetResponsive("gutterWidth")) / (t2 + u.tn.settings.GetResponsive("gutterWidth"))), u.O.maxItemsPerLine > 0 && n2 > u.O.maxItemsPerLine && (n2 = u.O.maxItemsPerLine), n2 < 1 && (n2 = 1), n2;
}
function B(e2) {
var t2 = u.tn.opt.Get("stacks");
if (t2 > 0) {
e2.$elt.css({ display: "block" });
for (var n2 = 0.9, i2 = t2 - 1; i2 >= 0; i2--) e2.$elt.eq(i2).css("opacity", n2), n2 -= 0.2;
}
}
function H(e2) {
var t2 = u.GOM.items[e2], n2 = u.I[t2.thumbnailIdx];
if (null != n2.$elt) {
var i2 = u.O.fnThumbnailHoverInit;
null !== i2 && ("function" == typeof i2 ? i2($e, n2, e2) : window[i2]($e, n2, e2));
for (var a2 = u.tn.buildInit.get(), o2 = 0; o2 < a2.length; o2++) switch (a2[o2].property) {
case "scale":
case "rotateX":
case "rotateY":
case "rotateZ":
case "translateX":
case "translateY":
case "translateZ":
n2.CSSTransformSet(a2[o2].element, a2[o2].property, a2[o2].value), n2.CSSTransformApply(a2[o2].element);
break;
case "blur":
case "brightness":
case "grayscale":
case "sepia":
case "contrast":
case "opacity":
case "saturate":
n2.CSSFilterSet(a2[o2].element, a2[o2].property, a2[o2].value), n2.CSSFilterApply(a2[o2].element);
break;
default:
n2.$getElt(a2[o2].element).css(a2[o2].property, a2[o2].value);
}
var r2 = u.tn.hoverEffects.get();
for (o2 = 0; o2 < r2.length; o2++) if (true === r2[o2].firstKeyframe) switch (r2[o2].type) {
case "scale":
case "rotateX":
case "rotateY":
case "rotateZ":
case "translateX":
case "translateY":
case "translateZ":
n2.CSSTransformSet(r2[o2].element, r2[o2].type, r2[o2].from), n2.CSSTransformApply(r2[o2].element);
break;
case "blur":
case "brightness":
case "grayscale":
case "sepia":
case "contrast":
case "opacity":
case "saturate":
n2.CSSFilterSet(r2[o2].element, r2[o2].type, r2[o2].from), n2.CSSFilterApply(r2[o2].element);
break;
default:
n2.$getElt(r2[o2].element).css(r2[o2].type, r2[o2].from);
}
n2.hoverInitDone = true;
}
}
function U() {
if (-1 != u.GOM.albumIdx) for (var e2 = u.GOM.items.length, t2 = 0; t2 < e2; t2++) H(t2), u.I[u.GOM.items[t2].thumbnailIdx].hovered = false;
}
function W(e2) {
if (-1 != u.GOM.albumIdx && u.galleryResizeEventEnabled && u.GOM.slider.hostIdx != e2) {
var t2 = u.GOM.items[e2], n2 = u.I[t2.thumbnailIdx];
if ("albumUp" != n2.kind && null != n2.$elt) {
n2.hovered = true;
var i2 = u.O.fnThumbnailHover;
null !== i2 && ("function" == typeof i2 ? i2(n2.$elt, n2, e2) : window[i2](n2.$elt, n2, e2));
var a2 = u.tn.hoverEffects.get();
try {
for (var o2 = 0; o2 < a2.length; o2++) true === a2[o2].hoverin && n2.animate(a2[o2], 0, true);
} catch (e3) {
h(u, "error on hover: " + e3.message);
}
}
}
}
function j() {
if (-1 != u.GOM.albumIdx) for (var e2 = u.GOM.items.length, t2 = 0; t2 < e2; t2++) u.GOM.items[t2].inDisplayArea ? X(t2) : u.I[u.GOM.items[t2].thumbnailIdx].hovered = false;
}
function X(e2) {
if (-1 != u.GOM.albumIdx && u.galleryResizeEventEnabled && u.GOM.slider.hostIdx != e2) {
var t2 = u.GOM.items[e2], n2 = u.I[t2.thumbnailIdx];
if ("albumUp" != n2.kind && n2.hovered && (n2.hovered = false, null != n2.$elt)) {
var i2 = u.O.fnThumbnailHoverOut;
null !== i2 && ("function" == typeof i2 ? i2(n2.$elt, n2, e2) : window[i2](n2.$elt, n2, e2));
var a2 = u.tn.hoverEffects.get();
try {
for (var o2 = 0; o2 < a2.length; o2++) true === a2[o2].hoverout && n2.animate(a2[o2], 0, false);
} catch (e3) {
h(u, "error on hoverOut: " + e3.message);
}
}
}
}
function Q(e2, t2) {
u.O.debugMode && console.log("#DisplayPhoto : " + t2 + "-" + e2);
var n2 = NGY2Item.GetIdx(u, t2);
u.GOM.curNavLevel = 0 == n2 ? "l1" : "lN", -1 == n2 && "" != u.O.kind && NGY2Item.New(u, "", "", t2, "0", "album");
var i2 = NGY2Item.GetIdx(u, e2);
-1 != i2 ? (u.O.debugMode && console.log("#DisplayPhoto : " + i2), we(i2)) : q(t2, Q, e2, t2);
}
function q(e2, t2, n2, i2) {
switch (u.O.kind) {
case "":
!function(e3, t3, n3) {
if (true === u.markupOrApiProcessed) return void g("-1", 0);
if (void 0 !== u.O.items && null !== u.O.items) K();
else {
if (!(u.O.$markup.length > 0)) return void d(u, "error: no media to process.");
te(u.O.$markup), u.O.$markup = [];
}
u.markupOrApiProcessed = true, null != e3 && e3(t3, n3, null);
}(t2, n2, i2);
break;
default:
jQuery.nanogallery2["data_" + u.O.kind](u, "AlbumGetContent", e2, t2, n2, i2);
}
}
this.initiateGallery2 = function(e2, t2) {
if (u.O = t2, u.$E.base = jQuery(e2), u.baseEltID = u.$E.base.attr("id"), null == u.baseEltID) {
for (var n2 = "", i2 = true; i2; ) document.getElementById("my_nanogallery" + n2) ? "" == n2 ? n2 = 1 : n2++ : (i2 = false, u.baseEltID = "my_nanogallery" + n2);
u.$E.base.attr("id", u.baseEltID);
}
if (u.O.$markup = [], function() {
"PICASA" != u.O.kind.toUpperCase() && "GOOGLE" != u.O.kind.toUpperCase() || (u.O.kind = "google2");
u.GOM.cache.viewport = a(), u.GOM.curWidth = ht(), jQuery.extend(true, u.tn.toolbar.image, u.O.thumbnailToolbarImage), jQuery.extend(true, u.tn.toolbar.album, u.O.thumbnailToolbarAlbum);
for (var e3 = ["image", "album"], t3 = ["topLeft", "topRight", "bottomLeft", "bottomRight"], n3 = 0; n3 < e3.length; n3++) for (var i3 = 0; i3 < t3.length; i3++) u.tn.toolbar[e3[n3]][t3[i3]] = u.tn.toolbar[e3[n3]][t3[i3]].toUpperCase();
"overImageOnBottom" == u.O.thumbnailLabel.position && (u.O.thumbnailLabel.valign = "bottom", u.O.thumbnailLabel.position = "overImage");
"overImageOnMiddle" == u.O.thumbnailLabel.position && (u.O.thumbnailLabel.valign = "middle", u.O.thumbnailLabel.position = "overImage");
"overImageOnTop" == u.O.thumbnailLabel.position && (u.O.thumbnailLabel.valign = "top", u.O.thumbnailLabel.position = "overImage");
void 0 !== u.O.thumbnailL1Label && void 0 !== u.O.thumbnailL1Label.position && ("overImageOnBottom" == u.O.thumbnailL1Label.position && (u.O.thumbnailL1Label.valign = "bottom", u.O.thumbnailL1Label.position = "overImage"), "overImageOnMiddle" == u.O.thumbnailL1Label.position && (u.O.thumbnailL1Label.valign = "middle", u.O.thumbnailL1Label.position = "overImage"), "overImageOnTop" == u.O.thumbnailL1Label.position && (u.O.thumbnailL1Label.valign = "top", u.O.thumbnailL1Label.position = "overImage"));
u.O.thumbnailLabel.get = function(e4) {
return "l1" == u.GOM.curNavLevel && void 0 !== u.O.thumbnailL1Label && void 0 !== u.O.thumbnailL1Label[e4] ? u.O.thumbnailL1Label[e4] : u.O.thumbnailLabel[e4];
}, u.O.thumbnailLabel.set = function(e4, t4) {
"l1" == u.GOM.curNavLevel && void 0 !== u.O.thumbnailL1Label && void 0 !== u.O.thumbnailL1Label[e4] ? u.O.thumbnailL1Label[e4] = t4 : u.O.thumbnailLabel[e4] = t4;
}, "" != u.O.blockList && (u.blockList = u.O.blockList.toUpperCase().split("|"));
"" != u.O.allowList && (u.allowList = u.O.allowList.toUpperCase().split("|"));
if (void 0 !== u.O.albumList2 && null !== u.O.albumList2 && u.O.albumList2.constructor === Array) {
var o3 = u.O.albumList2.length;
for (n3 = 0; n3 < o3; n3++) u.albumList.push(u.O.albumList2[n3]);
}
void 0 !== u.O.albumList2 && "string" == typeof u.O.albumList2 && u.albumList.push(u.O.albumList2);
function l3(e4, t4, n4) {
u.tn.opt.lN[n4] = u.O[e4], u.tn.opt.l1[n4] = u.O[e4], "number" == r(u.O[t4]) && (u.tn.opt.l1[n4] = u.O[t4]);
}
function s3(e4, t4, n4) {
u.tn.settings[e4][t4].xs = n4, u.tn.settings[e4][t4].sm = n4, u.tn.settings[e4][t4].me = n4, u.tn.settings[e4][t4].la = n4, u.tn.settings[e4][t4].xl = n4;
}
function c2(e4, t4, n4) {
var i4 = u.O[e4];
if (null != i4) if ("number" == r(i4) || -1 == i4.indexOf(" ")) {
var a2 = "auto";
"auto" != i4 && (a2 = parseInt(i4)), s3(t4, n4, a2);
} else {
var o4 = i4.split(" ");
if (o4.length > 0 && +o4[0] == +o4[0]) {
a2 = "auto";
"auto" != o4[0] && (a2 = parseInt(o4[0])), s3(t4, n4, a2);
}
for (var l4 = 1; l4 < o4.length; l4++) if (/^xs|sm|me|la|xl/i.test(o4[l4])) {
var c3 = o4[l4].substring(0, 2).toLowerCase(), h2 = o4[l4].substring(2);
a2 = "auto";
"auto" != h2 && (a2 = parseInt(h2)), u.tn.settings[t4][n4][c3] = a2;
}
}
}
u.tn.opt.lN.crop = u.O.thumbnailCrop, u.tn.opt.l1.crop = null != u.O.thumbnailL1Crop ? u.O.thumbnailL1Crop : u.O.thumbnailCrop, l3("thumbnailStacks", "thumbnailL1Stacks", "stacks"), l3("thumbnailStacksTranslateX", "thumbnailL1StacksTranslateX", "stacksTranslateX"), l3("thumbnailStacksTranslateY", "thumbnailL1StacksTranslateY", "stacksTranslateY"), l3("thumbnailStacksTranslateZ", "thumbnailL1StacksTranslateZ", "stacksTranslateZ"), l3("thumbnailStacksRotateX", "thumbnailL1StacksRotateX", "stacksRotateX"), l3("thumbnailStacksRotateY", "thumbnailL1StacksRotateY", "stacksRotateY"), l3("thumbnailStacksRotateZ", "thumbnailL1StacksRotateZ", "stacksRotateZ"), l3("thumbnailStacksScale", "thumbnailL1StacksScale", "stacksScale"), l3("thumbnailBorderHorizontal", "thumbnailL1BorderHorizontal", "borderHorizontal"), l3("thumbnailBorderVertical", "thumbnailL1BorderVertical", "borderVertical"), l3("thumbnailBaseGridHeight", "thumbnailL1BaseGridHeight", "baseGridHeight"), c2("thumbnailGutterWidth", "gutterWidth", "lN"), c2("thumbnailGutterWidth", "gutterWidth", "l1"), c2("thumbnailL1GutterWidth", "gutterWidth", "l1"), c2("thumbnailGutterHeight", "gutterHeight", "lN"), c2("thumbnailGutterHeight", "gutterHeight", "l1"), c2("thumbnailL1GutterHeight", "gutterHeight", "l1"), u.galleryDisplayMode.lN = u.O.galleryDisplayMode.toUpperCase(), u.galleryDisplayMode.l1 = null != u.O.galleryL1DisplayMode ? u.O.galleryL1DisplayMode.toUpperCase() : u.O.galleryDisplayMode.toUpperCase(), u.galleryMaxRows.lN = u.O.galleryMaxRows, u.galleryMaxRows.l1 = "number" == r(u.O.galleryL1MaxRows) ? u.O.galleryL1MaxRows : u.O.galleryMaxRows, u.galleryLastRowFull.lN = u.O.galleryLastRowFull, u.galleryLastRowFull.l1 = null != u.O.galleryL1LastRowFull ? u.O.galleryL1LastRowFull : u.O.galleryLastRowFull, u.gallerySorting.lN = u.O.gallerySorting.toUpperCase(), u.gallerySorting.l1 = null != u.O.galleryL1Sorting ? u.O.galleryL1Sorting.toUpperCase() : u.gallerySorting.lN, u.galleryDisplayTransition.lN = u.O.galleryDisplayTransition.toUpperCase(), u.galleryDisplayTransition.l1 = null != u.O.galleryL1DisplayTransition ? u.O.galleryL1DisplayTransition.toUpperCase() : u.galleryDisplayTransition.lN, u.galleryDisplayTransitionDuration.lN = u.O.galleryDisplayTransitionDuration, u.galleryDisplayTransitionDuration.l1 = null != u.O.galleryL1DisplayTransitionDuration ? u.O.galleryL1DisplayTransitionDuration : u.galleryDisplayTransitionDuration.lN, u.galleryMaxItems.lN = u.O.galleryMaxItems, u.galleryMaxItems.l1 = "number" == r(u.O.galleryL1MaxItems) ? u.O.galleryL1MaxItems : u.O.galleryMaxItems, u.galleryFilterTags.lN = u.O.galleryFilterTags, u.galleryFilterTags.l1 = null != u.O.galleryL1FilterTags ? u.O.galleryL1FilterTags : u.O.galleryFilterTags, u.galleryFilterTagsMode.lN = u.O.galleryFilterTagsMode, u.galleryFilterTagsMode.l1 = null != u.O.galleryL1FilterTagsMode ? u.O.galleryL1FilterTagsMode : u.O.galleryFilterTagsMode, u.O.galleryPaginationMode = u.O.galleryPaginationMode.toUpperCase(), "number" == r(u.O.slideshowDelay) && u.O.slideshowDelay >= 2e3 ? u.VOM.slideshowDelay = u.O.slideshowDelay : d(u, 'Parameter "slideshowDelay" must be an integer >= 2000 ms.');
"boolean" == typeof u.O.thumbnailDisplayTransition && (true === u.O.thumbnailDisplayTransition ? (u.tn.opt.lN.displayTransition = "FADEIN", u.tn.opt.l1.displayTransition = "FADEIN") : (u.tn.opt.lN.displayTransition = "NONE", u.tn.opt.l1.displayTransition = "NONE"));
"" !== u.O.fnThumbnailDisplayEffect && (u.tn.opt.lN.displayTransition = "CUSTOM", u.tn.opt.l1.displayTransition = "CUSTOM");
"" !== u.O.fnThumbnailL1DisplayEffect && (u.tn.opt.l1.displayTransition = "CUSTOM");
function m2(e4, t4) {
if ("string" == typeof e4) {
var n4 = e4.split("_");
1 == n4.length && (u.tn.opt[t4].displayTransition = e4.toUpperCase()), 2 == n4.length && (u.tn.opt[t4].displayTransition = n4[0].toUpperCase(), u.tn.opt[t4].displayTransitionStartVal = Number(n4[1])), 3 == n4.length && (u.tn.opt[t4].displayTransition = n4[0].toUpperCase(), u.tn.opt[t4].displayTransitionStartVal = Number(n4[1]), u.tn.opt[t4].displayTransitionEasing = n4[2]);
}
}
l3("thumbnailDisplayTransitionEasing", "thumbnailL1DisplayTransitionEasing", "displayTransitionEasing"), m2(u.O.thumbnailDisplayTransition, "lN"), m2(u.O.thumbnailDisplayTransition, "l1"), m2(u.O.thumbnailL1DisplayTransition, "l1"), l3("thumbnailDisplayTransitionDuration", "thumbnailL1DisplayTransitionDuration", "displayTransitionDuration"), l3("thumbnailDisplayInterval", "thumbnailL1DisplayInterval", "displayInterval"), l3("thumbnailDisplayOrder", "thumbnailL1DisplayOrder", "displayOrder"), void 0 !== u.O.thumbnailSizeSM && (u.O.breakpointSizeSM = u.O.thumbnailSizeSM);
void 0 !== u.O.thumbnailSizeME && (u.O.breakpointSizeME = u.O.thumbnailSizeME);
void 0 !== u.O.thumbnailSizeLA && (u.O.breakpointSizeLA = u.O.thumbnailSizeLA);
void 0 !== u.O.thumbnailSizeXL && (u.O.breakpointSizeXL = u.O.thumbnailSizeXL);
if (void 0 !== u.O.thumbnailL1BuildInit2) {
var p2 = u.O.thumbnailL1BuildInit2.split("|");
for (n3 = 0; n3 < p2.length; n3++) {
if (3 == (g2 = p2[n3].trim().split("_")).length) (f2 = re()).element = ie(g2[0]), f2.property = g2[1], f2.value = g2[2], u.tn.buildInit.level1.push(f2);
}
}
if (void 0 !== u.O.thumbnailBuildInit2) for (p2 = u.O.thumbnailBuildInit2.split("|"), n3 = 0; n3 < p2.length; n3++) {
var g2, f2;
if (3 == (g2 = p2[n3].trim().split("_")).length) (f2 = re()).element = ie(g2[0]), f2.property = g2[1], f2.value = g2[2], u.tn.buildInit.std.push(f2);
}
var b2 = u.O.thumbnailL1HoverEffect2;
if (void 0 !== b2) switch (r(b2)) {
case "string": {
let e4 = b2.split("|");
for (n3 = 0; n3 < e4.length; n3++) {
let t4 = oe();
t4 = ne(e4[n3].trim(), t4), null != t4 && u.tn.hoverEffects.level1.push(t4);
}
break;
}
case "object": {
let e4 = oe();
e4 = jQuery.extend(e4, b2), e4 = ne(e4.name, e4), null != e4 && u.tn.hoverEffects.level1.push(e4);
break;
}
case "array":
for (n3 = 0; n3 < b2.length; n3++) {
let e4 = oe();
e4 = jQuery.extend(e4, b2[n3]), e4 = ne(e4.name, e4), null != e4 && u.tn.hoverEffects.level1.push(e4);
}
break;
case "null":
break;
default:
h(u, 'incorrect parameter for "thumbnailL1HoverEffect2".');
}
u.tn.hoverEffects.level1 = ae(u.tn.hoverEffects.level1);
var v2 = u.O.thumbnailHoverEffect2;
switch (r(v2)) {
case "string": {
let e4 = v2.split("|");
for (n3 = 0; n3 < e4.length; n3++) {
let t4 = oe();
t4 = ne(e4[n3].trim(), t4), null != t4 && u.tn.hoverEffects.std.push(t4);
}
break;
}
case "object": {
let e4 = oe();
e4 = jQuery.extend(e4, v2), e4 = ne(e4.name, e4), null != e4 && u.tn.hoverEffects.std.push(e4);
break;
}
case "array":
for (n3 = 0; n3 < v2.length; n3++) {
let e4 = oe();
e4 = jQuery.extend(e4, v2[n3]), e4 = ne(e4.name, e4), null != e4 && u.tn.hoverEffects.std.push(e4);
}
break;
case "null":
break;
default:
h(u, 'incorrect parameter for "thumbnailHoverEffect2".');
}
u.tn.hoverEffects.std = ae(u.tn.hoverEffects.std), null == u.O.touchAnimationL1 && (u.O.touchAnimationL1 = u.O.touchAnimation);
0 == u.tn.hoverEffects.std.length && (0 == u.tn.hoverEffects.level1.length && (u.O.touchAnimationL1 = false), u.O.touchAnimation = false);
0 != u.O.thumbnailHeight && "" != u.O.thumbnailHeight || (u.O.thumbnailHeight = "auto");
0 != u.O.thumbnailWidth && "" != u.O.thumbnailWidth || (u.O.thumbnailWidth = "auto");
0 != u.O.thumbnailL1Height && "" != u.O.thumbnailL1Height || (u.O.thumbnailL1Height = "auto");
0 != u.O.thumbnailL1Width && "" != u.O.thumbnailL1Width || (u.O.thumbnailL1Width = "auto");
c2("thumbnailWidth", "width", "lN"), c2("thumbnailWidth", "width", "l1"), c2("thumbnailL1Width", "width", "l1"), c2("thumbnailHeight", "height", "lN"), c2("thumbnailHeight", "height", "l1"), c2("thumbnailL1Height", "height", "l1"), u.O.thumbnailLabelHeight = parseInt(u.O.thumbnailLabelHeight), null != u.O.galleryMosaic && (u.tn.settings.mosaic.l1.xs = JSON.parse(JSON.stringify(u.O.galleryMosaic)), u.tn.settings.mosaic.l1.sm = JSON.parse(JSON.stringify(u.O.galleryMosaic)), u.tn.settings.mosaic.l1.me = JSON.parse(JSON.stringify(u.O.galleryMosaic)), u.tn.settings.mosaic.l1.la = JSON.parse(JSON.stringify(u.O.galleryMosaic)), u.tn.settings.mosaic.l1.xl = JSON.parse(JSON.stringify(u.O.galleryMosaic)), u.tn.settings.mosaic.lN.xs = JSON.parse(JSON.stringify(u.O.galleryMosaic)), u.tn.settings.mosaic.lN.sm = JSON.parse(JSON.stringify(u.O.galleryMosaic)), u.tn.settings.mosaic.lN.me = JSON.parse(JSON.stringify(u.O.galleryMosaic)), u.tn.settings.mosaic.lN.la = JSON.parse(JSON.stringify(u.O.galleryMosaic)), u.tn.settings.mosaic.lN.xl = JSON.parse(JSON.stringify(u.O.galleryMosaic)), u.tn.settings.mosaicCalcFactor("l1", "xs"), u.tn.settings.mosaicCalcFactor("l1", "sm"), u.tn.settings.mosaicCalcFactor("l1", "me"), u.tn.settings.mosaicCalcFactor("l1", "la"), u.tn.settings.mosaicCalcFactor("l1", "xl"), u.tn.settings.mosaicCalcFactor("lN", "xs"), u.tn.settings.mosaicCalcFactor("lN", "sm"), u.tn.settings.mosaicCalcFactor("lN", "me"), u.tn.settings.mosaicCalcFactor("lN", "la"), u.tn.settings.mosaicCalcFactor("lN", "xl"));
null != u.O.galleryL1Mosaic && (u.tn.settings.mosaic.l1.xs = JSON.parse(JSON.stringify(u.O.galleryL1Mosaic)), u.tn.settings.mosaic.l1.sm = JSON.parse(JSON.stringify(u.O.galleryL1Mosaic)), u.tn.settings.mosaic.l1.me = JSON.parse(JSON.stringify(u.O.galleryL1Mosaic)), u.tn.settings.mosaic.l1.la = JSON.parse(JSON.stringify(u.O.galleryL1Mosaic)), u.tn.settings.mosaic.l1.xl = JSON.parse(JSON.stringify(u.O.galleryL1Mosaic)), u.tn.settings.mosaicCalcFactor("l1", "xs"), u.tn.settings.mosaicCalcFactor("l1", "sm"), u.tn.settings.mosaicCalcFactor("l1", "me"), u.tn.settings.mosaicCalcFactor("l1", "la"), u.tn.settings.mosaicCalcFactor("l1", "xl"));
for (var O2 = ["xs", "sm", "me", "la", "xl"], y2 = 0; y2 < O2.length; y2++) null != u.O["galleryMosaic" + O2[y2].toUpperCase()] && (u.tn.settings.mosaic.lN[O2[y2]] = JSON.parse(JSON.stringify(u.O["galleryMosaic" + O2[y2].toUpperCase()])), u.tn.settings.mosaic.l1[O2[y2]] = JSON.parse(JSON.stringify(u.O["galleryMosaic" + O2[y2].toUpperCase()])), u.tn.settings.mosaicCalcFactor("lN", O2[y2]), u.tn.settings.mosaicCalcFactor("l1", O2[y2]));
for (y2 = 0; y2 < O2.length; y2++) null != u.O["galleryL1Mosaic" + O2[y2].toUpperCase()] && (u.tn.settings.mosaic.l1[O2[y2]] = JSON.parse(JSON.stringify(u.O["galleryL1Mosaic" + O2[y2].toUpperCase()])), u.tn.settings.mosaicCalcFactor("l1", O2[y2]));
switch (u.O.imageTransition = u.O.imageTransition.toUpperCase(), u.layout.SetEngine(), u.O.kind) {
case "":
break;
default:
jQuery.nanogallery2["data_" + u.O.kind](u, "Init");
}
}(), function() {
Function.prototype.bind || (Function.prototype.bind = function(e3) {
if ("function" != typeof this) throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable");
var t3 = Array.prototype.slice.call(arguments, 1), n3 = this, i3 = function() {
}, a2 = function() {
return n3.apply(this instanceof i3 && e3 ? this : e3, t3.concat(Array.prototype.slice.call(arguments)));
};
return i3.prototype = this.prototype, a2.prototype = new i3(), a2;
});
(function() {
for (var e3 = 0, t3 = ["ms", "moz", "webkit", "o"], n3 = 0; n3 < t3.length && !window.requestAnimationFrame; ++n3) window.requestAnimationFrame = window[t3[n3] + "RequestAnimationFrame"], window.cancelAnimationFrame = window[t3[n3] + "CancelAnimationFrame"] || window[t3[n3] + "CancelRequestAnimationFrame"];
window.requestAnimationFrame || (window.requestAnimationFrame = function(t4, n4) {
var i3 = (/* @__PURE__ */ new Date()).getTime(), a2 = Math.max(0, 16 - (i3 - e3)), o3 = window.setTimeout(function() {
t4(i3 + a2);
}, a2);
return e3 = i3 + a2, o3;
}), window.cancelAnimationFrame || (window.cancelAnimationFrame = function(e4) {
clearTimeout(e4);
});
})(), Array.prototype.ngy2removeIf = function(e3) {
for (var t3 = this.length; t3--; ) e3(this[t3], t3) && this.splice(t3, 1);
}, String.prototype.startsWith || (String.prototype.startsWith = function(e3, t3) {
return t3 = t3 || 0, this.indexOf(e3, t3) === t3;
});
}(), function() {
var e3 = u.$E.base.children();
e3.length > 0 && (u.O.$markup = e3);
if (!u.O.lightboxStandalone) {
u.$E.base.text(""), u.$E.base.addClass("ngy2_container"), u.$E.base.addClass(u.O.theme), function() {
void 0 !== u.O.colorScheme && (u.O.galleryTheme = u.O.colorScheme);
var e4 = null, t4 = "";
switch (r(u.O.galleryTheme)) {
case "object":
e4 = u.galleryTheme_dark, jQuery.extend(true, e4, u.O.galleryTheme), t4 = "nanogallery_gallerytheme_custom_" + u.baseEltID;
break;
case "string":
switch (u.O.galleryTheme) {
case "light":
e4 = u.galleryTheme_light, t4 = "nanogallery_gallerytheme_light_" + u.baseEltID;
break;
case "default":
case "dark":
case "none":
default:
e4 = u.galleryTheme_dark, t4 = "nanogallery_gallerytheme_dark_" + u.baseEltID;
}
break;
default:
return void h(u, "Error in galleryTheme parameter.");
}
var n4 = "." + t4 + " ", i4 = e4.navigationBar, a3 = n4 + ".nGY2Navigationbar { background:" + i4.background + "; }\n";
void 0 !== i4.border && "" !== i4.border && (a3 += n4 + ".nGY2Navigationbar { border:" + i4.border + "; }\n");
void 0 !== i4.borderTop && "" !== i4.borderTop && (a3 += n4 + ".nGY2Navigationbar { border-top:" + i4.borderTop + "; }\n");
void 0 !== i4.borderBottom && "" !== i4.borderBottom && (a3 += n4 + ".nGY2Navigationbar { border-bottom:" + i4.borderBottom + "; }\n");
void 0 !== i4.borderRight && "" !== i4.borderRight && (a3 += n4 + ".nGY2Navigationbar { border-right:" + i4.borderRight + "; }\n");
void 0 !== i4.borderLeft && "" !== i4.borderLeft && (a3 += n4 + ".nGY2Navigationbar { border-left:" + i4.borderLeft + "; }\n");
i4 = e4.navigationBreadcrumb;
a3 += n4 + ".nGY2Breadcrumb { background:" + i4.background + "; border-radius:" + i4.borderRadius + "; }\n", a3 += n4 + ".nGY2Breadcrumb .oneItem { color:" + i4.color + "; }\n", a3 += n4 + ".nGY2Breadcrumb .oneItem:hover { color:" + i4.colorHover + "; }\n";
i4 = e4.navigationFilter;
a3 += n4 + ".nGY2NavFilterUnselected { color:" + i4.color + "; background:" + i4.background + "; border-radius:" + i4.borderRadius + "; }\n", a3 += n4 + ".nGY2NavFilterSelected { color:" + i4.colorSelected + "; background:" + i4.backgroundSelected + "; border-radius:" + i4.borderRadius + "; }\n", a3 += n4 + ".nGY2NavFilterSelectAll { color:" + i4.colorSelected + "; background:" + i4.background + "; border-radius:" + i4.borderRadius + "; }\n";
i4 = e4.navigationPagination;
a3 += n4 + ".nGY2NavPagination { color:" + i4.color + "; background:" + i4.background + "; border-radius:" + i4.borderRadius + "; }\n", a3 += n4 + ".nGY2NavPagination:hover { color:" + i4.colorHover + "; }\n";
i4 = e4.thumbnail;
a3 += n4 + ".nGY2GThumbnail { border-radius: " + i4.borderRadius + "; background:" + i4.background + "; border-color:" + i4.borderColor + "; }\n", a3 += n4 + ".nGY2GThumbnail_l1 { border-top-width:" + u.tn.opt.l1.borderVertical + "px; border-right-width:" + u.tn.opt.l1.borderHorizontal + "px; border-bottom-width:" + u.tn.opt.l1.borderVertical + "px; border-left-width:" + u.tn.opt.l1.borderHorizontal + "px;}\n", a3 += n4 + ".nGY2GThumbnail_lN { border-top-width:" + u.tn.opt.lN.borderVertical + "px; border-right-width:" + u.tn.opt.lN.borderHorizontal + "px; border-bottom-width:" + u.tn.opt.lN.borderVertical + "px; border-left-width:" + u.tn.opt.lN.borderHorizontal + "px;}\n", a3 += n4 + ".nGY2GThumbnailStack { background:" + i4.stackBackground + "; }\n", a3 += n4 + ".nGY2TnImgBack { background:" + i4.background + "; background-image:" + i4.backgroundImage + "; }\n", a3 += n4 + ".nGY2GThumbnailAlbumUp { background:" + i4.background + "; background-image:" + i4.backgroundImage + "; color:" + e4.thumbnail.titleColor + "; }\n", a3 += n4 + ".nGY2GThumbnailIconsFullThumbnail { color:" + i4.titleColor + "; }\n", a3 += n4 + ".nGY2GThumbnailLabel { background:" + i4.labelBackground + "; opacity:" + i4.labelOpacity + "; }\n", a3 += n4 + ".nGY2GThumbnailImageTitle { color:" + i4.titleColor + "; background-color:" + i4.titleBgColor + "; " + ("" == i4.titleShadow ? "" : "Text-Shadow:" + i4.titleShadow + ";") + " }\n", a3 += n4 + ".nGY2GThumbnailAlbumTitle { color:" + i4.titleColor + "; background-color:" + i4.titleBgColor + "; " + ("" == i4.titleShadow ? "" : "Text-Shadow:" + i4.titleShadow + ";") + " }\n", a3 += n4 + ".nGY2GThumbnailDescription { color:" + i4.descriptionColor + "; background-color:" + i4.descriptionBgColor + "; " + ("" == i4.descriptionShadow ? "" : "Text-Shadow:" + i4.descriptionShadow + ";") + " }\n";
i4 = e4.thumbnailIcon;
a3 += n4 + ".nGY2GThumbnailIcons { padding:" + i4.padding + "; }\n", a3 += n4 + ".nGY2GThumbnailIcon { color:" + i4.color + "; " + ("" == i4.shadow ? "" : "Text-Shadow:" + i4.shadow + ";") + " }\n", a3 += n4 + ".nGY2GThumbnailIconTextBadge { background-color:" + i4.color + "; }\n";
i4 = e4.pagination;
"NUMBERS" != u.O.galleryPaginationMode ? (a3 += n4 + ".nGY2paginationDot { border:" + i4.shapeBorder + "; background:" + i4.shapeColor + ";}\n", a3 += n4 + ".nGY2paginationDotCurrentPage { border:" + i4.shapeBorder + "; background:" + i4.shapeSelectedColor + ";}\n", a3 += n4 + ".nGY2paginationRectangle { border:" + i4.shapeBorder + "; background:" + i4.shapeColor + ";}\n", a3 += n4 + ".nGY2paginationRectangleCurrentPage { border:" + i4.shapeBorder + "; background:" + i4.shapeSelectedColor + ";}\n") : (a3 += n4 + ".nGY2paginationItem { background:" + i4.background + "; color:" + i4.color + "; border-radius:" + i4.borderRadius + "; }\n", a3 += n4 + ".nGY2paginationItemCurrentPage { background:" + i4.background + "; color:" + i4.color + "; border-radius:" + i4.borderRadius + "; }\n", a3 += n4 + ".nGY2PaginationPrev { background:" + i4.background + "; color:" + i4.color + "; border-radius:" + i4.borderRadius + "; }\n", a3 += n4 + ".nGY2PaginationNext { background:" + i4.background + "; color:" + i4.color + "; border-radius:" + i4.borderRadius + "; }\n", a3 += n4 + ".nGY2paginationItemCurrentPage { background:" + i4.backgroundSelected + "; }\n");
i4 = e4.thumbnail;
a3 += n4 + ".nGY2GalleryMoreButtonAnnotation { background:" + i4.background + "; border-color:" + i4.borderColor + "; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px;}\n", a3 += n4 + ".nGY2GalleryMoreButtonAnnotation { color:" + i4.titleColor + "; " + ("" == i4.titleShadow ? "" : "Text-Shadow:" + i4.titleShadow) + "; }\n", jQuery("head").append('<style id="ngycs_' + u.baseEltID + '">' + a3 + "</style>"), u.$E.base.addClass(t4);
}(), u.O.thumbnailLabel.get("hideIcons") && (u.O.icons.thumbnailAlbum = "", u.O.icons.thumbnailImage = "");
var t3 = "";
switch (null != u.O.navigationFontSize && "" != u.O.navigationFontSize && (t3 = ' style="font-size:' + u.O.navigationFontSize + ';"'), u.$E.conNavigationBar = jQuery('<div class="nGY2Navigationbar" ' + t3 + "></div>").appendTo(u.$E.base), u.$E.conLoadingB = jQuery('<div class="nanoGalleryLBarOff"><div></div><div></div><div></div><div></div><div></div></div>').appendTo(u.$E.base), u.$E.conTnParent = jQuery('<div class="nGY2Gallery"></div>').appendTo(u.$E.base), u.$E.conTn = jQuery('<div class="nGY2GallerySub"></div>').appendTo(u.$E.conTnParent), u.O.thumbnailAlignment) {
case "left":
u.$E.conTnParent.css({ "text-align": "left" });
break;
case "right":
u.$E.conTnParent.css({ "text-align": "right" });
}
if (void 0 !== u.O.galleryBuildInit2) for (var n3 = u.O.galleryBuildInit2.split("|"), i3 = 0; i3 < n3.length; i3++) {
var a2 = n3[i3].split("_");
2 == a2.length && u.$E.conTn.css(a2[0], a2[1]);
}
for (var o3 = u.tn.hoverEffects.std.concat(u.tn.hoverEffects.level1), l3 = 0; l3 < o3.length; l3++) switch (o3[l3].type) {
case "scale":
case "rotateZ":
case "rotateX":
case "rotateY":
case "translateX":
case "translateY":
".nGY2GThumbnail" == o3[l3].element && (u.$E.base.css("overflow", "visible"), u.$E.base.find(".nGY2GallerySub").css("overflow", "visible"), u.$E.conTnParent.css("overflow", "visible"));
}
if (u.$E.conTnBottom = jQuery('<div class="nGY2GalleryBottom" ' + t3 + "></div>").appendTo(u.$E.conTnParent), u.O.portable) {
var s3 = "font-weight:bold !important;color: #FF0075 !important;font-size: 14px !important;text-transform: lowercase !important;cursor:pointer !important;text-align: center !important;Text-Shadow: #000000 1px 0px 0px, #000000 1px 1px 0px, #000000 1px -1px 0px, #000000 -1px 1px 0px, #000000 -1px 0px 0px, #000000 -1px -1px 0px, #000000 0px 1px 0px, #000000 0px -1px 0px !important;";
u.$E.ngy2i = jQuery('<div class="nGY2PortInfo"><a href="http://nano.gallery" target="_blank" title="nanogallery2 | easy photo gallery for your website" style="' + s3 + '"><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAYCAYAAACbU/80AAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0QA/wD/AP+gvaeTAAAAB3RJTUUH4QgDBCAWVVC/hwAABRxJREFUSMetll9oVFcexz/nnDvJRBmSzWTrmD9uNGZsHta0/qFIFQTxRcnCBgTFNlX0YR8W+1AK9lGwCBJYgn0KKr5136S4gpUQTR4caJRslcxYWV3iaphQapJJppO5957z60Mmk4mN1q75wg/OPefc+/v9vt/fueenKEFEqICqsNWAVNiCA7XwaS0iZeejo6OIiCltdIBdJXMLOYp5/PjxsoTVS5nr0mYDJIE/lObeBhaYAn4oJbboAwBvBedHJicnPx8YGGh/8eJF1dvKoJSShoYGf//+/Zl4PP4l8M2yIEoSLErx6c2bN6W1tXVRglWzLVu2SCqVEhE5LiI457SIoEREW2udMaZtcnLy+2QyWZ3L5XRHR4f+4MNdoBUahUJhcWilmZ/NE4ZhOQHn3LIi1lqjtS6vjY6O8uTJE9vc3MyDBw+mYrHYn0Uk63me8gCtlHLA7uHh4bW5XC7oePddPTQ8xHffDjM/PYe3thqMws35iAcHPj5ENBp9Yxmy2Sw7d+40z549C+7du9ewb9++D6y13wDaK+kE0DAzMyNKKbXtvfd5EfzM+Ef/4C+8x23+wzPm+IhtfMf3/Ksuyl+7u9FaY63l+vXrpFIpCoUCmzdvpquri9bWVoIgQClFIpFg48aNPH/+XE9NTQkQLTGmvEXKRERprZWIEIYhQRjQbN6hmUb+tCaPNnM055v40f3If7XBGMPT8af0fNLD0NDQsozPnDlDb28vx44dIwxDRARrLSKCKmUbiUQQkWWnoLJ20UpjFYAjVA6rBJTFV5ZIJIIfBBw4eICxsTHq6uo4dOgQ8XicgYEB7t69y/Hjx4nH43R1dVHB8q+w4hlXSmGd5edwmjCco5DLkZ+aJvTnyIdTrFmzhn9+/TVjY2M0NTVx+/Zt+vv7OXfuHKlUip6eHgBOnz6N7/vlYl0JKzIw78/T+sdGbn6yjf5ZS2HtJgIP+mcC5kySI1uSXPjqAlprTp06RWdnJ8ViEaUUVVVVnD9/nqtXr5LJZHj48CFbt279fQEEYUisZi2fXel9bWU750gmkwRBgNYaz/Ow1lJfX088Hmd2dpZcLvdaBl4pgQChH4B1iHU4a8E6Qj9ARGhpaUFrzeDgIJFIBGMM1lqMMWQyGSYmJohEIqxfv/7314CIoADtGTAaZTTaLI2VUhw+fBjnHBcvXuTy5cs45/A8j3Q6zcmTJ/F9n71799LW1rbgSOs3D+B1lBljcM7R3d3N0aNHKRQKnDhxgs7OTnbt2sX27dsZGRkhHo/T19e3+Kt/fQ1YawFwzolSCs/zUEqVtX1VcJcuXSKRSNDf3086nS6v79mzh76+Pjo6OigWi1RXV2OMWZC29PL8/PxSAL7vE41Gf4rFYkpEePToEb7vU1VVxW+ht7eXs2fPcv/+fQqFAps2baKlpaW8Xl1dTS6XY3x8HBFxtbW1BiiW4hAlInp8fNxt2LChPZvN/ru9vT2Sz+e93bt3qx07diwrzJWYcM5RU1NDNBots5bP53HOlS+kO3fuMDIy4hKJhKTT6ena2tqtxWJxoqamRr98HX9x7do1qaurExYaiXCVzK5bt04GBwdFRP728nVcWZAO+Hsmk/nsxo0bTTMzM5FXHZ83hYhQX1/vHzx48H9tbW1ngSsVvpYCmJ2dJRaLKRbapjpgOxB7K+9LmAbuAnOAnpiYcI2NjUsRLlo2myUMQ1M5t5rmnDO3bt1aNlfmd4W2XL/0/H8pUDF2rNCW/wLRuCkxx8V6wgAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAxNy0wOC0wM1QwNDozMjoyMi0wNDowMO7mdkwAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMTctMDgtMDNUMDQ6MzI6MjItMDQ6MDCfu87wAAAAAElFTkSuQmCC" style="height:32px !important;width:initial !important;box-shadow: none !important;vertical-align: middle !important;"/> &nbsp; nanogallery2</a></div>').appendTo(u.$E.base), u.$E.ngy2i.find("a").on({ mouseenter: function() {
jQuery(this).attr("style", s3);
}, mouseleave: function() {
jQuery(this).attr("style", s3);
} });
}
}
if (u.$E.conConsole = jQuery('<div class="nGY2ConsoleParent"></div>').appendTo(u.$E.base), function() {
u.i18nLang = (navigator.language || navigator.userLanguage).toUpperCase(), "UNDEFINED" === u.i18nLang && (u.i18nLang = "");
var e4 = -("_" + u.i18nLang).length;
if ("object" == r(u.O.i18n)) for (var t4 in u.O.i18n) {
var n4 = t4.substr(e4);
n4 == "_" + u.i18nLang ? u.i18nTranslations[t4.substr(0, t4.length - n4.length)] = u.O.i18n[t4] : u.i18nTranslations[t4] = u.O.i18n[t4];
}
}(), !u.O.lightboxStandalone) switch (function() {
le(u.O.thumbnailLabel, "lN"), void 0 !== u.O.thumbnailL1Label ? le(u.O.thumbnailL1Label, "l1") : le(u.O.thumbnailLabel, "l1");
u.O.thumbnailL1Label && u.O.thumbnailL1Label.display && le(u.O.thumbnailL1Label, "l1");
for (var e4 = ["xs", "sm", "me", "la", "xl"], t4 = 0; t4 < e4.length; t4++) {
if ("auto" != (i4 = u.tn.settings.width.lN[e4[t4]])) u.tn.defaultSize.width.lN[e4[t4]] = i4, u.tn.defaultSize.width.l1[e4[t4]] = i4;
else {
var n4 = u.tn.settings.height.lN[e4[t4]];
u.tn.defaultSize.width.lN[e4[t4]] = n4, u.tn.defaultSize.width.l1[e4[t4]] = n4;
}
}
for (t4 = 0; t4 < e4.length; t4++) {
if ("auto" != (n4 = u.tn.settings.height.lN[e4[t4]])) u.tn.defaultSize.height.lN[e4[t4]] = n4, u.tn.defaultSize.height.l1[e4[t4]] = n4;
else {
var i4 = u.tn.settings.width.lN[e4[t4]];
u.tn.defaultSize.height.lN[e4[t4]] = i4, u.tn.defaultSize.height.l1[e4[t4]] = i4;
}
}
for (t4 = 0; t4 < e4.length; t4++) {
if ("auto" != (i4 = u.tn.settings.width.l1[e4[t4]])) u.tn.defaultSize.width.l1[e4[t4]] = i4;
else {
n4 = u.tn.settings.height.l1[e4[t4]];
u.tn.defaultSize.width.l1[e4[t4]] = n4;
}
}
for (t4 = 0; t4 < e4.length; t4++) {
if ("auto" != (n4 = u.tn.settings.height.l1[e4[t4]])) u.tn.defaultSize.height.l1[e4[t4]] = n4;
else {
i4 = u.tn.settings.width.l1[e4[t4]];
u.tn.defaultSize.height.l1[e4[t4]] = i4;
}
}
}(), u.tn.opt.Get("displayTransition")) {
case "SCALEDOWN":
case "RANDOMSCALE":
default:
u.$E.base.css("overflow", "visible"), u.$E.conTnParent.css("overflow", "visible"), u.$E.conTn.css("overflow", "visible");
}
}(), u.GOM.firstDisplayTime = Date.now(), function() {
u.O.lightboxStandalone || (u.$E.conTnParent.on({ mouseenter: be, mouseleave: ve }, ".nGY2GThumbnail"), u.GOM.hammertime = new NGHammer(u.$E.conTn[0]), u.GOM.hammertime.on("pan", function(e4) {
u.VOM.viewerDisplayed || u.O.paginationSwipe && u.layout.support.rows && "PAGINATION" == u.galleryDisplayMode.Get() && (Math.abs(e4.deltaY) > u.GOM.panThreshold && (u.GOM.panYOnly = true), u.GOM.panYOnly || u.$E.conTn.css(u.CSStransformName, "translate(" + e4.deltaX + "px,0px)"));
}), u.GOM.hammertime.on("panend", function(e4) {
if (!u.VOM.viewerDisplayed && u.O.paginationSwipe && u.layout.support.rows && "PAGINATION" == u.galleryDisplayMode.Get()) {
if (!u.GOM.panYOnly) {
if (e4.deltaX > 50) return void G();
if (e4.deltaX < -50) return void y();
}
u.GOM.panYOnly = false, u.$E.conTn.css(u.CSStransformName, "translate(0px,0px)");
}
}), u.GOM.hammertime.on("tap", function(e4) {
if (!u.VOM.viewerDisplayed) if (e4.srcEvent.stopPropagation(), e4.srcEvent.preventDefault(), "mouse" == e4.pointerType) {
if ("exit" == ue(e4.srcEvent)) return;
} else {
var t3 = Oe(e4.srcEvent, false);
if (-1 == t3.GOMidx) return;
if ("NONE" != t3.action && "OPEN" != t3.action) return void ue(e4.srcEvent);
if (u.GOM.slider.hostIdx == t3.GOMidx) return j(), void ye(u.GOM.items[u.GOM.slider.currentIdx].thumbnailIdx, true);
if ("l1" == u.GOM.curNavLevel && 0 == u.O.touchAnimationL1 || "lN" == u.GOM.curNavLevel && 0 == u.O.touchAnimation) return void ye(u.GOM.items[t3.GOMidx].thumbnailIdx, true);
u.O.touchAutoOpenDelay > 0 ? (j(), W(t3.GOMidx), window.clearInterval(u.touchAutoOpenDelayTimerID), u.touchAutoOpenDelayTimerID = window.setInterval(function() {
window.clearInterval(u.touchAutoOpenDelayTimerID), ye(u.GOM.items[t3.GOMidx].thumbnailIdx, true);
}, u.O.touchAutoOpenDelay)) : u.I[u.GOM.items[t3.GOMidx].thumbnailIdx].hovered ? ye(u.GOM.items[t3.GOMidx].thumbnailIdx, true) : (j(), W(t3.GOMidx));
}
}), u.O.locationHash && jQuery(window).on("hashchange.nanogallery2." + u.baseEltID, function() {
ot();
}));
if (jQuery(window).on("resize.nanogallery2." + u.baseEltID + " orientationChange.nanogallery2." + u.baseEltID, s2(lt, u.O.eventsDebounceDelay, false)), jQuery(window).on("scroll.nanogallery2." + u.baseEltID, s2(st, u.O.eventsDebounceDelay, false)), !u.O.lightboxStandalone) {
u.$E.scrollableParent = it(u.$E.base[0]);
var e3 = it(u.$E.base[0]);
null !== e3 && (u.$E.scrollableParent = jQuery(e3), u.$E.scrollableParent.on("scroll.nanogallery2." + u.baseEltID, s2(st, u.O.eventsDebounceDelay, false)));
}
u.VOM.toolsHide = s2(Ye, u.O.viewerHideToolsDelay, false), jQuery(document).keyup(function(e4) {
if (u.popup.isDisplayed) switch (e4.keyCode) {
case 27:
u.popup.close();
}
else if (u.VOM.viewerDisplayed) switch (Ae(), e4.keyCode) {
case 27:
case 40:
case 38:
tt();
break;
case 32:
case 13:
He();
break;
case 39:
case 33:
Qe();
break;
case 37:
case 34:
qe();
}
}), jQuery(window).bind("mousewheel wheel", function(e4) {
if (u.VOM.viewerDisplayed && "img" == u.VOM.content.current.NGY2Item().mediaKind) {
var t3 = 0;
e4.preventDefault(), Ie() && (e4.originalEvent.deltaY ? t3 = e4.originalEvent.deltaY : e4.originalEvent.wheelDelta && (t3 = -e4.originalEvent.wheelDelta), Te(t3 <= 0));
}
}), jQuery(window).bind("mousemove", function(e4) {
u.VOM.viewerDisplayed && 0 == u.VOM.toolbarsDisplayed && (u.VOM.singletapTime = (/* @__PURE__ */ new Date()).getTime(), s2(Ae, 100, false)());
}), ngscreenfull.enabled && ngscreenfull.onchange(function() {
u.VOM.viewerDisplayed && (ngscreenfull.isFullscreen ? (u.VOM.viewerIsFullscreen = true, u.VOM.$viewer.find(".fullscreenButton").html(u.O.icons.viewerFullscreenOff)) : (u.VOM.viewerIsFullscreen = false, u.VOM.$viewer.find(".fullscreenButton").html(u.O.icons.viewerFullscreenOn)));
});
}(), !u.O.lightboxStandalone) {
var o2 = u.O.album;
if ("" == o2 && "" != u.O.photoset && (o2 = u.O.photoset, u.O.album = u.O.photoset), "" != o2 && (u.O.displayBreadcrumb = false, "NONE" != o2.toUpperCase())) return "nano_photos_provider2" == u.O.kind && o2 == decodeURIComponent(o2) && (o2 = encodeURIComponent(o2), u.O.album = o2), NGY2Item.New(u, "", "", o2, "-1", "album"), void (ot() || g("-1", o2));
}
NGY2Item.New(u, u.i18nTranslations.breadcrumbHome, "", "0", "-1", "album"), ot() || function() {
if (u.O.lightboxStandalone) !function() {
if (u.GOM.curNavLevel = "l1", null == u.O.items) {
var e4 = jQuery("[data-nanogallery2-Lightbox"), t3 = u.$E.base[0].dataset.nanogallery2Lgroup;
te(e4, t3);
} else K();
m();
}();
else if ("" != u.O.openOnStart) {
var e3 = p(u.O.openOnStart);
"0" != e3.imageID ? Q(e3.imageID, e3.albumID) : g("-1", e3.albumID);
} else g("-1", 0);
}();
};
var Z = { youtube: { getID: function(e2) {
var t2 = e2.match(/(?:https?:\/{2})?(?:w{3}\.)?youtu(?:be)?\.(?:com|be)(?:\/watch\?v=|\/)([^\s&]+)/);
return null != t2 ? t2[1] : null;
}, thumbUrl: function(e2) {
return "https://img.youtube.com/vi/" + e2 + "/hqdefault.jpg";
}, url: function(e2) {
return "https://www.youtube.com/embed/" + e2;
}, markup: function(e2) {
return '<iframe class="nGY2ViewerMedia" src="https://www.youtube.com/embed/' + e2 + '?rel=0" frameborder="0" allow="autoplay" allowfullscreen></iframe>';
}, kind: "iframe" }, vimeo: { getID: function(e2) {
var t2 = e2.match(/(http|https)?:\/\/(www\.)?vimeo.com\/(?:channels\/(?:\w+\/)?|groups\/([^\/]*)\/videos\/|)(\d+)(?:|\/\?)/);
return null != t2 ? t2[4] : null;
}, url: function(e2) {
return "https://player.vimeo.com/video/" + e2;
}, markup: function(e2) {
return '<iframe class="nGY2ViewerMedia" src="https://player.vimeo.com/video/' + e2 + '" frameborder="0" allow="autoplay; fullscreen" allowfullscreen></iframe>';
}, kind: "iframe" }, dailymotion: { getID: function(e2) {
var t2 = e2.match(/^.+dailymotion.com\/(video|hub)\/([^_]+)[^#]*(#video=([^_&]+))?/);
return null !== t2 ? void 0 !== t2[4] ? t2[4] : t2[2] : null;
}, thumbUrl: function(e2) {
return "https://www.dailymotion.com/thumbnail/video/" + e2;
}, url: function(e2) {
return "https://www.dailymotion.com/embed/video/" + e2;
}, markup: function(e2) {
return '<iframe class="nGY2ViewerMedia" src="https://www.dailymotion.com/embed/video/' + e2 + '?rel=0" frameborder="0" allow="autoplay" allowfullscreen></iframe>';
}, kind: "iframe" }, selfhosted: { getID: function(e2) {
var t2 = e2.split(".").pop().toLowerCase();
return "mp4" === t2 || "webm" === t2 || "ogv" === t2 || "3gp" === t2 ? t2 : null;
}, markup: function(e2) {
var t2 = e2.split(".").pop();
return '<video controls class="nGY2ViewerMedia"><source src="' + e2 + '" type="video/' + t2 + '" preload="auto">Your browser does not support the video tag (HTML 5).</video>';
}, kind: "video", selfhosted: true } };
function J(e2) {
if (null == e2) return false;
return !!/^((http|https|ftp|ftps|file):\/\/)/.test(e2);
}
function K() {
var e2 = 0, t2 = NGY2Tools.AlbumPostProcess.bind(u);
u.I[0].contentIsLoaded = true, jQuery.each(u.O.items, function(n2, a2) {
var o2 = "";
void 0 === (o2 = ct(a2, "title")) && (o2 = "");
var r2 = "";
J(r2 = void 0 !== a2["src" + ht().toUpperCase()] ? a2["src" + ht().toUpperCase()] : a2.src) || (r2 = u.O.itemsBaseURL + r2);
var l3 = "";
void 0 !== a2.srct && a2.srct.length > 0 ? J(l3 = a2.srct) || (l3 = u.O.itemsBaseURL + l3) : l3 = r2, "" != u.O.thumbnailLabel.get("title") && (o2 = GetImageTitle(r2));
var s3 = "";
void 0 === (s3 = ct(a2, "description")) && (s3 = "");
var c2 = ct(a2, "tags");
void 0 === c2 && (c2 = "");
var h2 = 0;
void 0 !== a2.albumID && (h2 = a2.albumID, true);
var d2 = null;
void 0 !== a2.ID && (d2 = a2.ID);
var m2 = "image";
void 0 !== a2.kind && a2.kind.length > 0 && (m2 = a2.kind);
var p2 = NGY2Item.New(u, o2, s3, d2, h2, m2, c2);
"" != o2 && e2++, p2.setMediaURL(r2, "img"), jQuery.each(Z, function(e3, t3) {
var n3 = t3.getID(r2);
if (null != n3) return l3 == r2 && "function" == typeof t3.thumbUrl && (l3 = t3.thumbUrl(n3)), "function" == typeof t3.url && (r2 = t3.url(n3)), p2.mediaKind = t3.kind, p2.mediaMarkup = t3.selfhosted ? t3.markup(r2) : t3.markup(n3), false;
}), void 0 !== a2.imageWidth && (p2.imageWidth = a2.width), void 0 !== a2.imageHeight && (p2.imageHeight = a2.height);
var g2 = void 0 !== a2.imgtWidth ? a2.imgtWidth : 0, f2 = void 0 !== a2.imgtHeight ? a2.imgtHeight : 0;
if (p2.thumbs = { url: { l1: { xs: l3, sm: l3, me: l3, la: l3, xl: l3 }, lN: { xs: l3, sm: l3, me: l3, la: l3, xl: l3 } }, width: { l1: { xs: g2, sm: g2, me: g2, la: g2, xl: g2 }, lN: { xs: g2, sm: g2, me: g2, la: g2, xl: g2 } }, height: { l1: { xs: f2, sm: f2, me: f2, la: f2, xl: f2 }, lN: { xs: f2, sm: f2, me: f2, la: f2, xl: f2 } } }, "img" == p2.mediaKind) {
var b2 = ["xs", "sm", "me", "la", "xl"];
for (n2 = 0; n2 < b2.length; n2++) {
var v2 = a2["srct" + b2[n2].toUpperCase()];
void 0 !== v2 && (J(v2) || (v2 = u.O.itemsBaseURL + v2), p2.url.l1[b2[n2]] = v2, p2.url.lN[b2[n2]] = v2), null != (g2 = a2["imgt" + b2[n2].toUpperCase() + "Width"]) && (p2.width.l1[b2[n2]] = parseInt(g2), p2.width.lN[b2[n2]] = parseInt(g2)), null != (f2 = a2["imgt" + b2[n2].toUpperCase() + "Height"]) && (p2.height.l1[b2[n2]] = parseInt(f2), p2.height.lN[b2[n2]] = parseInt(f2));
}
}
void 0 !== a2.imageDominantColors && (p2.imageDominantColors = a2.imageDominantColors), void 0 !== a2.imageDominantColor && (p2.imageDominantColor = a2.imageDominantColor), void 0 !== a2.destURL && a2.destURL.length > 0 && (p2.destinationURL = a2.destURL), void 0 !== a2.downloadURL && a2.downloadURL.length > 0 && (p2.downloadURL = a2.downloadURL), void 0 !== a2.exifModel && (p2.exif.model = a2.exifModel), void 0 !== a2.exifFlash && (p2.exif.flash = a2.exifFlash), void 0 !== a2.exifFocalLength && (p2.exif.focallength = a2.exifFocalLength), void 0 !== a2.exifFStop && (p2.exif.fstop = a2.exifFStop), void 0 !== a2.exifExposure && (p2.exif.exposure = a2.exifExposure), void 0 !== a2.exifIso && (p2.exif.iso = a2.exifIso), void 0 !== a2.exifTime && (p2.exif.time = a2.exifTime), void 0 !== a2.exifLocation && (p2.exif.location = a2.exifLocation), null !== a2.customData && (p2.customData = i(a2.customData)), p2.contentIsLoaded = true;
var O2 = u.O.fnProcessData;
null !== O2 && ("function" == typeof O2 ? O2(p2, "api", a2) : window[O2](p2, "api", a2)), t2(h2);
}), 0 == e2 && (u.O.thumbnailLabel.display = false);
}
function ee(e2) {
var t2 = "";
return void 0 !== e2.childNodes[0] && null !== e2.childNodes[0].nodeValue && void 0 !== e2.childNodes[0].nodeValue && (t2 = e2.childNodes[0].nodeValue.trim()), t2;
}
function te(t2, n2) {
var a2 = 0, o2 = NGY2Tools.AlbumPostProcess.bind(u), r2 = NGY2Tools.GetImageTitleFromURL.bind(u);
u.I[0].contentIsLoaded = true, jQuery.each(t2, function(t3, l3) {
if (l3.dataset.nanogallery2Lgroup == n2 && "SCRIPT" != l3.nodeName) {
var s3 = { "data-ngdesc": "", "data-ngid": null, "data-ngkind": "image", "data-ngtags": null, "data-ngdest": "", "data-ngthumbimgwidth": 0, "data-ngthumbimgheight": 0, "data-ngimagewidth": 0, "data-ngimageheight": 0, "data-ngimagedominantcolors": null, "data-ngimagedominantcolor": null, "data-ngexifmodel": "", "data-ngexifflash": "", "data-ngexiffocallength": "", "data-ngexiffstop": "", "data-ngexifexposure": "", "data-ngexifiso": "", "data-ngexiftime": "", "data-ngexiflocation": "", "data-ngsrc": "", alt: "" };
[].forEach.call(l3.attributes, function(e2) {
s3[e2.name.toLowerCase()] = e2.value.trim();
});
var c2 = ee(l3);
"" == c2 && "" != s3.alt && (c2 = s3.alt), jQuery.each(e(l3).children(), function(e2, t4) {
"" == c2 && (c2 = ee(t4)), [].forEach.call(t4.attributes, function(e3) {
s3[e3.name.toLowerCase()] = e3.value.trim();
}), "" == c2 && "" != s3.alt && (c2 = s3.alt);
});
var h2 = "", d2 = ht().toUpperCase();
s3.hasOwnProperty("data-ngsrc" + d2) && (h2 = s3["data-ngsrc" + d2]), void 0 === (h2 = h2 || s3["data-ngsrc"] || s3.href) || J(h2) || (h2 = u.O.itemsBaseURL + h2);
var m2 = "";
if (s3.hasOwnProperty("src") && (m2 = s3.src), "" == m2 && s3.hasOwnProperty("data-ngthumb") && (m2 = s3["data-ngthumb"]), "" == m2 && (m2 = h2), void 0 === m2 || J(m2) || (m2 = u.O.itemsBaseURL + m2), void 0 !== h2 || void 0 !== m2) {
var p2 = s3["data-ngdesc"], g2 = s3.id || s3["data-ngid"], f2 = s3["data-ngkind"], b2 = s3["data-ngtags"], v2 = "0";
s3.hasOwnProperty("data-ngalbumid") && (v2 = s3["data-ngalbumid"], true);
var O2 = r2(h2);
"" != O2 && (c2 = O2);
var y2 = NGY2Item.New(u, c2, p2, g2, v2, f2, b2);
"" != c2 && a2++, y2.setMediaURL(h2, "img"), jQuery.each(Z, function(e2, t4) {
var n3 = t4.getID(h2);
if (null != n3) return m2 == h2 && "function" == typeof t4.thumbUrl && (m2 = t4.thumbUrl(n3)), "function" == typeof t4.url && (h2 = t4.url(n3)), y2.mediaKind = t4.kind, y2.mediaMarkup = t4.selfhosted ? t4.markup(h2) : t4.markup(n3), false;
}), y2.imageWidth = parseInt(s3["data-ngimagewidth"]), y2.imageHeight = parseInt(s3["data-ngimageheight"]);
var G2 = parseInt(s3["data-ngthumbimgwidth"]), M2 = parseInt(s3["data-ngthumbimgheight"]);
if (y2.thumbs = { url: { l1: { xs: m2, sm: m2, me: m2, la: m2, xl: m2 }, lN: { xs: m2, sm: m2, me: m2, la: m2, xl: m2 } }, width: { l1: { xs: G2, sm: G2, me: G2, la: G2, xl: G2 }, lN: { xs: G2, sm: G2, me: G2, la: G2, xl: G2 } }, height: { l1: { xs: M2, sm: M2, me: M2, la: M2, xl: M2 }, lN: { xs: M2, sm: M2, me: M2, la: M2, xl: M2 } } }, "img" == y2.mediaKind) {
var w2 = ["xs", "sm", "me", "la", "xl"];
for (t3 = 0; t3 < w2.length; t3++) {
if (s3.hasOwnProperty("data-ngthumb" + w2[t3])) {
var I2 = s3["data-ngthumb" + w2[t3]];
J(I2) || (I2 = u.O.itemsBaseURL + I2), y2.url.l1[w2[t3]] = I2, y2.url.lN[w2[t3]] = I2;
}
if (s3.hasOwnProperty("data-ngthumb" + w2[t3] + "width")) {
G2 = parseInt(s3["data-ngthumb" + w2[t3] + "width"]);
y2.width.l1[w2[t3]] = G2, y2.width.lN[w2[t3]] = G2;
}
if (s3.hasOwnProperty("data-ngthumb" + w2[t3] + "height")) {
M2 = parseInt("data-ngthumb" + w2[t3] + "height");
y2.height.l1[w2[t3]] = M2, y2.height.lN[w2[t3]] = M2;
}
}
}
y2.imageDominantColors = s3["data-ngimagedominantcolors"], y2.imageDominantColor = s3["data-ngimagedominantcolors"], y2.destinationURL = s3["data-ngdest"], y2.downloadURL = s3["data-ngdownloadurl"], y2.exif.model = s3["data-ngexifmodel"], y2.exif.flash = s3["data-ngexifflash"], y2.exif.focallength = s3["data-ngexiffocallength"], y2.exif.fstop = s3["data-ngexiffstop"], y2.exif.exposure = s3["data-ngexifexposure"], y2.exif.iso = s3["data-ngexifiso"], y2.exif.time = s3["data-ngexiftime"], y2.exif.location = s3["data-ngexiflocation"], y2.contentIsLoaded = true, void 0 !== jQuery(l3).data("customdata") && (y2.customData = i(jQuery(l3).data("customdata"))), void 0 !== jQuery(l3).data("ngcustomdata") && (y2.customData = i(jQuery(l3).data("ngcustomdata")));
var T2 = u.O.fnProcessData;
null !== T2 && ("function" == typeof T2 ? T2(y2, "markup", l3) : window[T2](y2, "markup", l3)), o2(v2);
}
}
}), 0 == a2 && (u.O.thumbnailLabel.display = false);
}
function ne(e2, t2) {
var n2 = ["easeInQuad", "easeOutQuad", "easeInOutQuad", "easeInCubic", "easeOutCubic", "easeInOutCubic", "easeInQuart", "easeOutQuart", "easeInOutQuart", "easeInQuint", "easeOutQuint", "easeInOutQuint", "easeInSine", "easeOutSine", "easeInOutSine", "easeInExpo", "easeOutExpo", "easeInOutExpo", "easeInCirc", "easeOutCirc", "easeInOutCirc", "easeOutBounce", "easeInBack", "easeOutBack", "easeInOutBack", "elastic", "bounce"], i2 = e2.split("_");
if (i2.length >= 4) {
if (t2.name = "", t2.type = i2[1], t2.from = i2[2], t2.to = i2[3], i2.length >= 5) for (var a2 = 4; a2 < i2.length; a2++) {
for (var o2 = i2[a2], r2 = false, l3 = 0; l3 < n2.length; l3++) if (o2 == n2[l3]) {
r2 = true, t2.easing = o2;
break;
}
if (true !== r2) if ("HOVERIN" != (o2 = o2.toUpperCase())) if ("HOVEROUT" != o2) if ("KEYFRAME" != o2) {
var s3 = parseInt(o2.replace(/[^0-9\.]/g, ""), 10);
if (s3 > 0) {
if (o2.indexOf("DURATION") >= 0) {
t2.duration = s3;
continue;
}
if (o2.indexOf("DURATIONBACK") >= 0) {
t2.durationBack = s3;
continue;
}
if (o2.indexOf("DELAY") >= 0) {
t2.delay = s3;
continue;
}
if (o2.indexOf("DELAYBACK") >= 0) {
t2.delayBack = s3;
continue;
}
t2.duration = s3;
}
} else t2.firstKeyframe = false;
else t2.hoverin = false;
else t2.hoverout = false;
}
t2.element = ie(i2[0], t2.type);
} else t2.name = e2;
return t2;
}
function ie(e2, t2) {
var n2 = { image: ".nGY2GThumbnailImage", thumbnail: ".nGY2GThumbnail", label: ".nGY2GThumbnailLabel", title: ".nGY2GThumbnailTitle", description: ".nGY2GThumbnailDescription", tools: ".nGY2GThumbnailIcons", customlayer: ".nGY2GThumbnailCustomLayer", default: "nGY2GThumbnailImage" };
return n2[e2] || n2.default;
}
function ae(e2) {
for (var a2 = [], o2 = 0; o2 < e2.length; o2++) switch (e2[o2].name.toUpperCase()) {
case "BORDERLIGHTER": {
let i2 = t(se().thumbnail.borderColor), r3 = "thumbnail_borderColor_" + i2 + "_" + n(0.5, i2);
a2.push(ne(r3, e2[o2]));
break;
}
case "BORDERDARKER": {
let i2 = t(se().thumbnail.borderColor), r3 = "thumbnail_borderColor_" + i2 + "_" + n(-0.5, i2);
a2.push(ne(r3, e2[o2]));
break;
}
case "SCALE120":
a2.push(ne("thumbnail_scale_1.00_1.20", e2[o2]));
break;
case "LABELAPPEAR":
case "LABELAPPEAR75":
a2.push(ne("label_opacity_0.00_1.00", e2[o2]));
break;
case "TOOLSAPPEAR":
a2.push(ne("tools_opacity_0_1", e2[o2]));
break;
case "TOOLSSLIDEDOWN":
a2.push(ne("tools_translateY_-100%_0%", e2[o2]));
break;
case "TOOLSSLIDEUP":
a2.push(ne("tools_translateY_100%_0%", e2[o2]));
break;
case "LABELOPACITY50":
a2.push(ne("label_opacity_1.00_0.50", e2[o2]));
break;
case "LABELSLIDEUPTOP":
case "LABELSLIDEUP":
a2.push(ne("label_translateY_100%_0%", e2[o2])), a2.push(ne("label_translateY_100%_0%", e2[o2]));
break;
case "LABELSLIDEDOWN":
a2.push(ne("label_translateY_-100%_0%", e2[o2]));
break;
case "SCALELABELOVERIMAGE":
a2.push(ne("label_scale_0.00_1.00", e2[o2]));
var r2 = i(e2[o2]);
a2.push(ne("image_scale_1.00_0.00", r2));
break;
case "OVERSCALE":
case "OVERSCALEOUTSIDE":
a2.push(ne("label_scale_2.00_1.00", e2[o2]));
r2 = i(e2[o2]);
a2.push(ne("label_opacity_0.00_1.00", r2)), r2 = i(e2[o2]), a2.push(ne("image_scale_1.00_0.00", r2)), r2 = i(e2[o2]), a2.push(ne("image_opacity_1.00_0.00", r2));
break;
case "DESCRIPTIONAPPEAR":
a2.push(ne("description_opacity_0_1", e2[o2]));
break;
case "SLIDERIGHT":
a2.push(ne("image_translateX_0%_100%", e2[o2])), a2.push(ne("label_translateX_-100%_0%", i(e2[o2])));
break;
case "SLIDELEFT":
a2.push(ne("image_translateX_0%_-100%", e2[o2])), a2.push(ne("label_translateX_100%_0%", i(e2[o2])));
break;
case "SLIDEUP":
a2.push(ne("image_translateY_0%_-100%", e2[o2])), a2.push(ne("label_translateY_100%_0%", i(e2[o2])));
break;
case "SLIDEDOWN":
a2.push(ne("image_translateY_0%_100%", e2[o2])), a2.push(ne("label_translateY_-100%_0%", i(e2[o2])));
break;
case "IMAGESCALE150":
case "IMAGESCALE150OUTSIDE":
a2.push(ne("image_scale_1.00_1.50", e2[o2]));
break;
case "IMAGESCALEIN80":
a2.push(ne("image_scale_1.20_1.00", e2[o2]));
break;
case "IMAGESLIDERIGHT":
a2.push(ne("image_translateX_0%_100%", e2[o2]));
break;
case "IMAGESLIDELEFT":
a2.push(ne("image_translateX_0%_-100%", e2[o2]));
break;
case "IMAGESLIDEUP":
a2.push(ne("image_translateY_0%_-100%", e2[o2]));
break;
case "IMAGESLIDEDOWN":
a2.push(ne("image_translateY_0%_100%", e2[o2]));
break;
case "LABELSLIDEUPDOWN":
a2.push(ne("label_translateY_0%_100%", e2[o2]));
break;
case "DESCRIPTIONSLIDEUP":
a2.push(ne("description_translateY_110%_0%", e2[o2]));
break;
case "IMAGEBLURON":
a2.push(ne("image_blur_2.00px_0.00px", e2[o2]));
break;
case "IMAGEBLUROFF":
a2.push(ne("image_blur_0.00px_2.00px", e2[o2]));
break;
case "IMAGEGRAYON":
a2.push(ne("image_grayscale_0%_100%", e2[o2]));
break;
case "IMAGEGRAYOFF":
a2.push(ne("image_grayscale_100%_0%", e2[o2]));
break;
case "IMAGESEPIAON":
a2.push(ne("image_sepia_100%_1%", e2[o2]));
break;
case "IMAGESEPIAOFF":
a2.push(ne("image_sepia_1%_100%", e2[o2]));
break;
default:
a2.push(e2[o2]);
}
return a2;
}
function oe() {
return { name: "", element: "", type: "", from: "", to: "", hoverin: true, hoverout: true, firstKeyframe: true, delay: 0, delayBack: 0, duration: 400, durationBack: 300, easing: "easeOutQuart", easingBack: "easeOutQuart", animParam: null };
}
function re() {
return { element: "", property: "", value: "" };
}
function le(e2, t2) {
switch (e2.position) {
case "onBottom":
u.tn.style[t2].label = "bottom:0; ";
break;
case "right":
switch (e2.valign) {
case "top":
u.tn.style[t2].label = "top:0; position:absolute; left: 50%;";
break;
case "middle":
u.tn.style[t2].label = "top:0; bottom:0; left: 50%;", u.tn.style[t2].title = "position:absolute; bottom:50%;", u.tn.style[t2].desc = "position:absolute; top:50%;";
break;
case "bottom":
default:
u.tn.style[t2].label = "bottom:0; position:absolute; left: 50%;", u.tn.style[t2].title = "position:absolute;bottom:0;";
}
break;
case "custom":
break;
default:
case "overImage":
switch (e2.valign) {
case "top":
u.tn.style[t2].label = "top:0; position:absolute;";
break;
case "middle":
u.tn.style[t2].label = "top:0; bottom:0;", u.tn.style[t2].title = "position:absolute; bottom:50%;", u.tn.style[t2].desc = "position:absolute; top:50%;";
break;
case "bottom":
default:
u.tn.style[t2].label = "bottom:0; position:absolute;";
}
}
switch ("onBottom" != e2.position && (e2.titleMultiLine && (u.tn.style[t2].title += "white-space:normal;"), e2.descriptionMultiLine && (u.tn.style[t2].desc += "white-space:normal;")), e2.align) {
case "right":
u.tn.style[t2].label += "text-align:right;";
break;
case "left":
u.tn.style[t2].label += "text-align:left;";
break;
default:
u.tn.style[t2].label += "text-align:center;";
}
null != e2.titleFontSize && "" != e2.titleFontSize && (u.tn.style[t2].title += "font-size:" + e2.titleFontSize + ";"), null != e2.descriptionFontSize && "" != e2.descriptionFontSize && (u.tn.style[t2].desc += "font-size:" + e2.descriptionFontSize + ";"), 0 == e2.displayDescription && (u.tn.style[t2].desc += "display:none;");
}
function se() {
var e2 = null;
switch (r(u.O.galleryTheme)) {
case "object":
e2 = u.galleryTheme_dark, jQuery.extend(true, e2, u.O.galleryTheme);
break;
case "string":
switch (u.O.galleryTheme) {
case "light":
e2 = u.galleryTheme_light;
break;
case "default":
case "dark":
case "none":
default:
e2 = u.galleryTheme_dark;
}
break;
default:
e2 = u.galleryTheme_dark;
}
return e2;
}
function ue(e2) {
var t2 = Oe(e2, false);
if (-1 == t2.GOMidx) return "exit";
var n2 = u.GOM.items[t2.GOMidx].thumbnailIdx;
switch (u.GOM.slider.hostIdx == t2.GOMidx && (n2 = u.GOM.items[u.GOM.slider.currentIdx].thumbnailIdx), t2.action) {
case "OPEN":
return ye(n2, false), "exit";
case "DISPLAY":
return ye(n2, true), "exit";
case "TOGGLESELECT":
return me(n2), "exit";
case "SHARE":
return ge(n2), "exit";
case "DOWNLOAD":
return ce(n2), "exit";
case "INFO":
return ze(u.I[n2]), "exit";
case "SHOPPINGCART":
return he(n2, "gallery"), "exit";
default:
var i2 = u.O.fnThumbnailToolCustAction;
null !== i2 && ("function" == typeof i2 ? i2(t2.action, u.I[n2]) : window[i2](t2.action, u.I[n2]));
}
}
function ce(e2) {
if ("img" == u.I[e2].mediaKind) {
var t2 = u.I[e2].src;
null != u.I[e2].downloadURL && "" != u.I[e2].downloadURL && (t2 = u.I[e2].downloadURL);
var n2 = document.createElement("a");
n2.href = t2, n2.download = t2.split("/").pop(), n2.target = "_blank", n2.style.display = "none", document.body.appendChild(n2), n2.click(), document.body.removeChild(n2);
}
}
function he(e2, t2) {
for (var n2 = 0; n2 < u.shoppingCart.length; n2++) {
var i2;
if (u.shoppingCart[n2].idx == e2) return u.shoppingCart[n2].qty++, R(u.I[e2]), null !== (i2 = u.O.fnShoppingCartUpdated) && ("function" == typeof i2 ? i2(u.shoppingCart, u.I[e2], t2) : window[i2](u.shoppingCart, u.I[e2], t2)), void at("shoppingCartUpdated");
}
u.shoppingCart.push({ idx: e2, ID: u.I[e2].GetID(), qty: 1 }), R(u.I[e2]), null !== (i2 = u.O.fnShoppingCartUpdated) && ("function" == typeof i2 ? i2(u.shoppingCart, u.I[e2], t2) : window[i2](u.shoppingCart, u.I[e2], t2)), at("shoppingCartUpdated");
}
function de() {
u.GOM.nbSelected = 0;
for (var e2 = 0, t2 = u.GOM.items.length; e2 < t2; e2++) {
var n2 = u.I[u.GOM.items[e2].thumbnailIdx];
if (n2.selected) {
n2.selected = false;
var i2 = u.O.fnThumbnailSelection;
null !== i2 && ("function" == typeof i2 ? i2(n2.$elt, n2, u.I) : window[i2](n2.$elt, n2, u.I));
}
n2.selected = false;
}
}
function me(e2) {
var t2 = u.I[e2];
true === t2.selected ? (pe(t2, false), u.GOM.nbSelected--, at("itemUnSelected")) : (pe(t2, true), u.GOM.nbSelected++, at("itemSelected"));
}
function pe(e2, t2) {
e2.selected = t2, function(e3) {
if (null == e3.$elt) return;
var t3 = e3.$getElt(".nGY2GThumbnail"), n3 = e3.$getElt(".nGY2GThumbnailIconImageSelect");
true === e3.selected ? (t3.addClass("nGY2GThumbnailSubSelected"), n3.addClass("nGY2ThumbnailSelected"), n3.removeClass("nGY2ThumbnailUnselected"), n3.html(u.O.icons.thumbnailSelected)) : (t3.removeClass("nGY2GThumbnailSubSelected"), n3.removeClass("nGY2ThumbnailSelected"), n3.addClass("nGY2ThumbnailUnselected"), n3.html(u.O.icons.thumbnailUnselected));
}(e2);
var n2 = u.O.fnThumbnailSelection;
null !== n2 && ("function" == typeof n2 ? n2(e2.$elt, e2, u.I) : window[n2](e2.$elt, e2, u.I));
}
function ge(e2) {
var t2 = u.I[e2], n2 = document.location.protocol + "//" + document.location.hostname + document.location.pathname, i2 = "#nanogallery/" + u.baseEltID + "/";
"image" == t2.kind ? i2 += t2.albumID + "/" + t2.GetID() : i2 += t2.GetID();
var a2 = "<br><br>";
a2 += '<div class="nGY2PopupOneItem" style="text-align:center;" data-share="facebook">' + u.O.icons.shareFacebook + "</div>", a2 += '<div class="nGY2PopupOneItem" style="text-align:center;" data-share="pinterest">' + u.O.icons.sharePinterest + "</div>", a2 += '<div class="nGY2PopupOneItem" style="text-align:center;" data-share="tumblr">' + u.O.icons.shareTumblr + "</div>", a2 += '<div class="nGY2PopupOneItem" style="text-align:center;" data-share="twitter">' + u.O.icons.shareTwitter + "</div>", a2 += '<div class="nGY2PopupOneItem" style="text-align:center;" data-share="vk">' + u.O.icons.shareVK + "</div>", a2 += '<div class="nGY2PopupOneItem" style="text-align:center;" data-share="mail">' + u.O.icons.shareMail + "</div>", a2 += '<div class="nGY2PopupOneItem" style="text-align:center;"></div>', a2 += '<input class="nGY2PopupOneItemText" readonly type="text" value="' + n2 + i2 + '" style="width:100%;text-align:center;">', a2 += "<br>", n2 = encodeURIComponent(document.location.protocol + "//" + document.location.hostname + document.location.pathname + i2);
var o2 = t2.title, r2 = t2.thumbImg().src;
fe("nanogallery2 - share to:", a2, "Center"), u.popup.$elt.find(".nGY2PopupOneItem").on("click", function(e3) {
e3.stopPropagation();
var t3 = "", i3 = true;
switch (jQuery(this).attr("data-share").toUpperCase()) {
case "FACEBOOK":
t3 = "https://www.facebook.com/sharer.php?u=" + n2;
break;
case "VK":
t3 = "http://vk.com/share.php?url=" + n2;
break;
case "GOOGLEPLUS":
t3 = "https://plus.google.com/share?url=" + n2;
break;
case "TWITTER":
t3 = "https://twitter.com/intent/tweet?text=" + o2 + "url=" + n2;
break;
case "PINTEREST":
t3 = "https://pinterest.com/pin/create/button/?media=" + r2 + "&url=" + n2 + "&description=" + o2;
break;
case "TUMBLR":
t3 = "http://www.tumblr.com/share/link?url=" + n2 + "&name=" + o2;
break;
case "MAIL":
t3 = "mailto:?subject=" + o2 + "&body=" + n2;
break;
default:
i3 = false;
}
i3 && (window.open(t3, "", "height=550,width=500,left=100,top=100,menubar=0"), u.popup.close());
});
}
function fe(e2, t2, n2) {
var i2 = '<div class="nGY2Popup" style="opacity:0;"><div class="nGY2PopupContent' + n2 + '">';
i2 += '<div class="nGY2PopupCloseButton" style="font-size:0.9em;">' + u.O.icons.buttonClose + "</div>", i2 += '<div class="nGY2PopupTitle">' + e2 + "</div>", i2 += t2, i2 += "</div></div>", u.popup.$elt = jQuery(i2).appendTo("body"), o(u.VOM.$viewer, u.popup.$elt), u.popup.isDisplayed = true, new NGTweenable().tween({ from: { o: 0, y: 100 }, to: { o: 1, y: 0 }, easing: "easeInOutSine", duration: 250, step: function(e3, t3) {
u.popup.$elt[0].style.opacity = e3.o, u.popup.$elt[0].style[u.CSStransformName] = "translateY(" + e3.y + "px)";
} }), u.popup.$elt.find(".nGY2PopupCloseButton").on("click", function(e3) {
e3.stopPropagation(), u.popup.close();
});
}
function be(e2) {
if (!u.VOM.viewerDisplayed && -1 != u.GOM.albumIdx) {
var t2 = Oe(e2, true);
-1 != t2.GOMidx && W(t2.GOMidx);
}
}
function ve(e2) {
if (!u.VOM.viewerDisplayed && -1 != u.GOM.albumIdx) {
var t2 = Oe(e2, true);
-1 != t2.GOMidx && X(t2.GOMidx);
}
}
function Oe(e2, t2) {
var n2 = { action: "NONE", GOMidx: -1 };
if (null == e2) return n2;
for (var i2 = e2.target || e2.srcElement; i2 != u.$E.conTnParent[0]; ) {
if (jQuery(i2).hasClass("nGY2GThumbnail")) return "NONE" == n2.action && (n2.action = "OPEN"), n2.GOMidx = jQuery(i2).data("index"), n2;
if (!t2) {
var a2 = jQuery(i2).data("ngy2action");
"" != a2 && null != a2 && (n2.action = a2);
}
if (null == i2.parentNode) return n2;
i2 = i2.parentNode;
}
return n2;
}
function ye(e2, t2) {
var n2 = u.I[e2];
u.GOM.albumIdxLoading = e2;
var i2 = u.O.fnThumbnailClicked;
if (null !== i2 && ("function" == typeof i2 ? i2(n2.$elt, n2) : window[i2](n2.$elt, n2)), void 0 !== n2.destinationURL && n2.destinationURL.length > 0) window.location = n2.destinationURL;
else switch (n2.kind) {
case "image":
false === t2 && u.GOM.nbSelected > 0 ? me(e2) : we(e2);
break;
case "album":
if (false === t2 && u.GOM.nbSelected > 0) me(e2);
else {
if (u.O.thumbnailAlbumDisplayImage && 0 != e2) return void Ge(e2);
g("-1", n2.GetID());
}
break;
case "albumUp":
g("-1", NGY2Item.Get(u, n2.albumID).albumID);
}
}
function Ge(e2) {
u.O.debugMode && console.log("#DisplayFirstPhotoInAlbum : " + e2);
for (var t2 = u.I[e2], n2 = u.I.length, i2 = 0; i2 < n2; i2++) if (u.I[i2].albumID == t2.GetID()) return void we(i2);
q(t2.GetID(), Ge, e2, null);
}
function Me(e2) {
switch (u.O.kind) {
case "flickr":
var t2 = "https://www.flickr.com/photos/" + u.O.userID + "/" + e2.GetID();
"0" != e2.albumID && (t2 += "/in/album-" + e2.albumID + "/"), window.open(t2, "_blank");
break;
case "picasa":
case "google":
case "google2":
default:
t2 = e2.responsiveURL();
window.open(t2, "_blank");
}
}
function we(e2) {
if (u.O.thumbnailOpenInLightox) if (u.O.thumbnailOpenOriginal) Me(u.I[e2]);
else {
var t2 = [];
u.VOM.content.current.vIdx = 0, u.VOM.items = [], u.VOM.albumID = u.I[e2].albumID;
var n2 = new c(e2);
u.VOM.items.push(n2), t2.push(u.I[e2]);
var i2 = u.I.length;
for (let n3 = e2 + 1; n3 < i2; n3++) {
let e3 = u.I[n3];
if ("image" == e3.kind && e3.isToDisplay(u.VOM.albumID) && "" == e3.destinationURL) {
let i3 = new c(n3);
u.VOM.items.push(i3), t2.push(e3);
}
}
var a2 = u.VOM.items.length, o2 = 1;
for (let n3 = 0; n3 < e2; n3++) {
let e3 = u.I[n3];
if ("image" == e3.kind && e3.isToDisplay(u.VOM.albumID) && "" == e3.destinationURL) {
let i3 = new c(n3);
i3.mediaNumber = o2, u.VOM.items.push(i3), t2.push(e3), o2++;
}
}
for (let e3 = 0; e3 < a2; e3++) u.VOM.items[e3].mediaNumber = o2, o2++;
var r2 = u.O.fnThumbnailOpen;
if (null === r2) if (u.VOM.viewerDisplayed) {
u.VOM.content.current.$media.empty();
let e3 = u.VOM.content.current.NGY2Item();
var l3 = '<div class="nGY2ViewerMediaLoaderDisplayed"></div>';
"img" == e3.mediaKind && 0 != e3.imageWidth && 0 != e3.imageHeight && (l3 = '<div class="nGY2ViewerMediaLoaderHidden"></div>'), u.VOM.content.current.$media.append(l3 + e3.mediaMarkup), et(u.VOM.content.next, 0), et(u.VOM.content.previous, 0), "img" == e3.mediaKind && u.VOM.ImageLoader.loadImage(Ke, e3), Ze("");
} else De();
else "function" == typeof r2 ? r2(t2) : window[r2](t2);
}
}
function Ie() {
if (u.O.viewerZoom && !u.VOM.viewerMediaIsChanged) {
var e2 = u.VOM.content.current.NGY2Item();
if ("img" == e2.mediaKind && e2.imageHeight > 0 && e2.imageWidth > 0) return false === u.VOM.zoom.isZooming && (u.VOM.zoom.userFactor = 1, u.VOM.zoom.isZooming = true), true;
}
return false;
}
function Te(e2) {
e2 ? (u.VOM.zoom.userFactor += 0.1, xe()) : (u.VOM.zoom.userFactor -= 0.1, Se()), Le();
}
function xe() {
u.VOM.zoom.userFactor > 3 && (u.VOM.zoom.userFactor = 3);
}
function Se() {
u.VOM.zoom.userFactor < 0.2 && (u.VOM.zoom.userFactor = 0.2);
}
function Le() {
u.VOM.zoom.isZooming || (u.VOM.zoom.userFactor = 1), Ee(u.VOM.content.current, true), Ee(u.VOM.content.previous, false), Ee(u.VOM.content.next, false);
}
function Ce(e2) {
var t2 = e2.children().eq(1), n2 = 90;
"none" != u.O.viewerGallery && (n2 -= 10), "none" != u.O.viewerToolbar.display && (n2 -= 10), t2.css({ height: n2 + "%" }), t2.css({ width: "90%" }), t2[0].style[u.CSStransformName] = 'translate(0px, "50%") ';
}
function Ee(e2, t2) {
var n2 = e2.NGY2Item(), i2 = e2.$media;
if ("img" == n2.mediaKind) if (0 != n2.imageHeight && 0 != n2.imageWidth) {
var a2 = 1 == t2 ? u.VOM.zoom.userFactor : 1, o2 = 1;
"bestImageQuality" == u.O.viewerImageDisplay && (o2 = window.devicePixelRatio);
var r2 = (u.VOM.window.lastWidth - u.VOM.padding.V) / (n2.imageWidth / o2), l3 = (u.VOM.window.lastHeight - u.VOM.padding.H) / (n2.imageHeight / o2), s3 = Math.min(r2, l3);
s3 > 1 && "upscale" != u.O.viewerImageDisplay && (s3 = 1);
var c2 = n2.imageHeight / o2 * a2 * s3, h2 = n2.imageWidth / o2 * a2 * s3;
i2.children().eq(1).css({ height: c2 }), i2.children().eq(1).css({ width: h2 });
var d2 = 0;
h2 > u.VOM.window.lastWidth && (d2 = -(h2 - u.VOM.window.lastWidth) / 2);
t2 ? (u.VOM.zoom.isZooming || (u.VOM.panPosX = 0, u.VOM.panPosY = 0), u.VOM.zoom.posX = d2, u.VOM.zoom.posY = 0, ke(u.VOM.panPosX, u.VOM.panPosY, i2, false)) : (Xe(u.VOM.swipePosX), i2.children().eq(1)[0].style[u.CSStransformName] = "translate(0px, 0px) rotate(" + n2.rotationAngle + "deg)");
} else et(e2, 0);
else Ce(i2);
}
function ke(e2, t2, n2, i2) {
i2 && (u.VOM.panPosX = e2, u.VOM.panPosY = t2), e2 += u.VOM.zoom.posX, t2 += u.VOM.zoom.posY, n2.children().eq(1)[0].style[u.CSStransformName] = "translate(" + e2 + "px, " + t2 + "px) rotate(" + u.VOM.content.current.NGY2Item().rotationAngle + "deg)";
}
function De(e2) {
u.GOM.firstDisplay = false, jQuery("head").append('<style id="nGY2_body_scrollbar_style" type="text/css">.nGY2_body_scrollbar{margin-right: ' + (window.innerWidth - document.documentElement.clientWidth) + "px;}</style>"), jQuery("body").addClass("nGY2_body_scrollbar"), u.VOM.$baseCont = jQuery('<div class="nGY2 nGY2ViewerContainer" style="opacity:1"></div>').appendTo("body"), function() {
if ("" == u.VOM.viewerTheme) {
void 0 !== u.O.colorSchemeViewer && (u.O.viewerTheme = u.O.colorSchemeViewer);
var e3 = null;
switch (r(u.O.viewerTheme)) {
case "object":
e3 = u.viewerTheme_dark, jQuery.extend(true, e3, u.O.viewerTheme), u.VOM.viewerTheme = "nanogallery_viewertheme_custom_" + u.baseEltID;
break;
case "string":
switch (u.O.viewerTheme) {
case "none":
return;
case "light":
e3 = u.viewerTheme_light, u.VOM.viewerTheme = "nanogallery_viewertheme_light_" + u.baseEltID;
break;
case "dark":
case "default":
e3 = u.viewerTheme_dark, u.VOM.viewerTheme = "nanogallery_viewertheme_dark_" + u.baseEltID;
}
break;
default:
return void h(u, "Error in viewerTheme parameter.");
}
var t3 = "." + u.VOM.viewerTheme + " ", n3 = t3 + ".nGY2Viewer { background:" + e3.background + "; }\n";
n3 += t3 + ".nGY2Viewer .toolbarBackground { background:" + e3.barBackground + "; }\n", n3 += t3 + ".nGY2Viewer .toolbar { border:" + e3.barBorder + "; color:" + e3.barColor + "; }\n", n3 += t3 + ".nGY2Viewer .toolbar .previousButton:after { color:" + e3.barColor + "; }\n", n3 += t3 + ".nGY2Viewer .toolbar .nextButton:after { color:" + e3.barColor + "; }\n", n3 += t3 + ".nGY2Viewer .toolbar .closeButton:after { color:" + e3.barColor + "; }\n", n3 += t3 + ".nGY2Viewer .toolbar .label .title { color:" + e3.barColor + "; }\n", n3 += t3 + ".nGY2Viewer .toolbar .label .description { color:" + e3.barDescriptionColor + "; }\n", jQuery("head").append("<style>" + n3 + "</style>"), u.VOM.$baseCont.addClass(u.VOM.viewerTheme);
} else u.VOM.$baseCont.addClass(u.VOM.viewerTheme);
}(), u.VOM.$viewer = jQuery('<div class="nGY2Viewer" style="opacity:0" itemscope itemtype="http://schema.org/ImageObject"></div>').appendTo(u.VOM.$baseCont), u.VOM.$viewer.css({ msTouchAction: "none", touchAction: "none" }), u.VOM.content.current.vIdx = null == e2 ? 0 : e2, u.VOM.content.previous.vIdx = u.VOM.IdxNext(), u.VOM.content.next.vIdx = u.VOM.IdxPrevious();
var t2 = '<div class="nGY2ViewerMediaPan"><div class="nGY2ViewerMediaLoaderDisplayed"></div>' + u.VOM.content.previous.NGY2Item().mediaMarkup + "</div>";
t2 += '<div class="nGY2ViewerMediaPan"><div class="nGY2ViewerMediaLoaderDisplayed"></div>' + u.VOM.content.current.NGY2Item().mediaMarkup + "</div>", t2 += '<div class="nGY2ViewerMediaPan"><div class="nGY2ViewerMediaLoaderDisplayed"></div>' + u.VOM.content.next.NGY2Item().mediaMarkup + "</div>";
var n2 = "", i2 = u.O.icons.viewerImgPrevious;
null != i2 && "" != i2 && (n2 += '<div class="nGY2ViewerAreaPrevious ngy2viewerToolAction" data-ngy2action="previous">' + i2 + "</div>");
var a2 = u.O.icons.viewerImgNext;
null != a2 && "" != a2 && (n2 += '<div class="nGY2ViewerAreaNext ngy2viewerToolAction" data-ngy2action="next">' + a2 + "</div>"), u.VOM.$content = jQuery('<div class="nGY2ViewerContent">' + t2 + n2 + "</div>").appendTo(u.VOM.$viewer), u.VOM.$buttonLeft = u.VOM.$content.find(".nGY2ViewerAreaPrevious"), u.VOM.$buttonRight = u.VOM.$content.find(".nGY2ViewerAreaNext");
var l3 = u.VOM.$content.find(".nGY2ViewerMediaPan");
u.VOM.content.previous.$media = l3.eq(0), u.VOM.content.current.$media = l3.eq(1), u.VOM.content.next.$media = l3.eq(2);
var c2 = u.GOM.cache.viewport;
u.VOM.content.previous.$media[0].style[u.CSStransformName] = "translate(-" + c2.w + "px, 0px)", u.VOM.content.next.$media[0].style[u.CSStransformName] = "translate(" + c2.w + "px, 0px)", u.VOM.ImageLoader.loadImage(Ke, u.VOM.content.current.NGY2Item()), u.VOM.ImageLoader.loadImage(Ke, u.VOM.content.previous.NGY2Item()), u.VOM.ImageLoader.loadImage(Ke, u.VOM.content.next.NGY2Item()), u.VOM.padding.H = parseInt(u.VOM.$content.css("padding-left")) + parseInt(u.VOM.$content.css("padding-right")), u.VOM.padding.V = parseInt(u.VOM.$content.css("padding-top")) + parseInt(u.VOM.$content.css("padding-bottom"));
var d2 = "", m2 = " toolbarBackground";
u.O.viewerToolbar.fullWidth && (d2 = " toolbarBackground", m2 = "");
var p2 = "text-align:center;";
switch (u.O.viewerToolbar.align) {
case "left":
p2 = "text-align:left;";
break;
case "right":
p2 = "text-align:right;";
}
var g2 = '<div class="toolbarContainer nGEvent' + d2 + '" style="visibility:' + (u.O.viewerToolbar.display ? "visible" : "hidden") + ";" + p2 + '"><div class="toolbar nGEvent' + m2 + '"></div></div>';
u.VOM.$toolbar = jQuery(g2).appendTo(u.VOM.$viewer), "min" == u.VOM.toolbarMode || u.O.viewerToolbar.autoMinimize > 0 && u.O.viewerToolbar.autoMinimize >= u.GOM.cache.viewport.w ? We() : Ue();
for (var f2 = '<div class="nGY2ViewerToolsTopLeft nGEvent"><div class="toolbar nGEvent">', b2 = u.O.viewerTools.topLeft.split(","), v2 = 0, O2 = b2.length; v2 < O2; v2++) f2 += Be(b2[v2]);
f2 += "</div></div>", u.VOM.$toolbarTL = jQuery(f2).appendTo(u.VOM.$viewer);
for (var y2 = '<div class="nGY2ViewerToolsTopRight nGEvent"><div class="toolbar nGEvent">', G2 = u.O.viewerTools.topRight.split(","), M2 = (v2 = 0, G2.length); v2 < M2; v2++) y2 += Be(G2[v2]);
y2 += "</div></div>", u.VOM.$toolbarTR = jQuery(y2).appendTo(u.VOM.$viewer), Pe(), ngscreenfull.enabled && u.O.viewerFullscreen && (ngscreenfull.request(), u.VOM.viewerIsFullscreen = true), function() {
if (u.VOM.gallery.firstDisplay = true, "none" != u.O.viewerGallery) {
for (var e3 = u.O.viewerGalleryTWidth, t3 = u.O.viewerGalleryTHeight, n3 = "", i3 = 0; i3 < u.VOM.items.length; i3++) {
var a3 = u.VOM.items[i3].ngy2ItemIdx, o2 = u.I[a3].thumbImg().src.replace(/'/g, "%27");
o2 = o2.replace(/\\/g, "\\\\"), n3 += '<div class="nGY2VThumbnail" style="width:' + e3 + "px;height:" + t3 + "px;left:" + i3 * (e3 + 4) + "px;background-image: url(&apos;" + o2 + '&apos;);" data-ngy2_lightbox_thumbnail="true" data-ngy2_idx="' + a3 + '" data-ngy2_vidx="' + i3 + '" ></div>';
}
u.VOM.gallery.gwidth = (e3 + 4) * u.VOM.items.length, u.VOM.gallery.oneTmbWidth = e3 + 4;
var r2 = "<div class='nGY2VThumbnailContainer' style='height:" + (t3 + 4) + "px;left:0;width:" + u.VOM.gallery.gwidth + "px;' data-ngy2_lightbox_gallery='true'>" + n3 + "</div>";
u.VOM.gallery.$elt = jQuery('<div class="nGY2viewerGallery" style="display: inline-block;height:' + (t3 + 4) + 'px;left:0;right:0;">' + r2 + "</div>").appendTo(u.VOM.$viewer), u.VOM.gallery.$tmbCont = u.VOM.gallery.$elt.find(".nGY2VThumbnailContainer"), u.VOM.gallery.Resize(), u.VOM.gallery.SetThumbnailActive();
}
}(), o("", u.VOM.$viewer), nt(true), u.VOM.gallery.Resize(), u.VOM.timeImgChanged = (/* @__PURE__ */ new Date()).getTime(), u.VOM.$toolbarTL.css("opacity", 0), u.VOM.$toolbarTR.css("opacity", 0), u.VOM.$buttonLeft.css("opacity", 0), u.VOM.$buttonRight.css("opacity", 0), "none" != u.O.viewerGallery && u.VOM.gallery.$elt.css("opacity", 0), u.VOM.$content.css("opacity", 0), u.VOM.$toolbarTR[0].style[u.CSStransformName] = "translateY(-40px) ", u.VOM.$toolbarTL[0].style[u.CSStransformName] = "translateY(-40px) ", u.VOM.$buttonLeft[0].style[u.CSStransformName] = "translateX(-40px) ", u.VOM.$buttonRight[0].style[u.CSStransformName] = "translateX(40px) ", new NGTweenable().tween({ from: { opacity: 0, posY: 0.5 * u.VOM.window.lastHeight }, to: { opacity: 1, posY: 0 }, delay: 10, duration: 450, easing: "easeInOutQuint", step: function(e3) {
u.VOM.$viewer.css("opacity", e3.opacity), u.VOM.$viewer[0].style[u.CSStransformName] = "translateY(" + e3.posY + "px) ", u.VOM.$content.css("opacity", e3.opacity);
} }), new NGTweenable().tween({ from: { posY: -40, opacity: 0, scale: 3 }, to: { posY: 0, opacity: 1, scale: 1 }, delay: 300, duration: 400, easing: "easeInOutQuint", step: function(e3) {
u.VOM.$toolbarTR[0].style[u.CSStransformName] = "translateY(" + e3.posY + "px) ", u.VOM.$toolbarTL[0].style[u.CSStransformName] = "translateY(" + e3.posY + "px) ", u.VOM.$buttonLeft[0].style[u.CSStransformName] = "translateX(" + e3.posY + "px) ", u.VOM.$buttonRight[0].style[u.CSStransformName] = "translateX(" + -e3.posY + "px) ", "none" != u.O.viewerGallery && (u.VOM.gallery.$elt.css({ opacity: e3.opacity }), u.VOM.gallery.$elt[0].style[u.CSStransformName] = "scale(" + e3.scale + ")");
}, finish: function() {
u.VOM.viewerDisplayed = true, Xe(0), null == u.VOM.hammertime && (u.VOM.hammertime = new NGHammer.Manager(u.VOM.$baseCont[0], { recognizers: [[NGHammer.Pinch, { enable: true }], [NGHammer.Pan, { direction: NGHammer.DIRECTION_ALL }]] }), u.VOM.hammertime.on("pan", function(e3) {
if (Ne()) switch ("off" == u.VOM.panMode && (null != e3.target.dataset.ngy2_lightbox_thumbnail || null != e3.target.dataset.ngy2_lightbox_gallery ? u.VOM.panMode = "gallery" : u.VOM.zoom.isZooming ? u.VOM.panMode = "zoom" : u.VOM.panMode = "media"), u.VOM.panMode) {
case "zoom":
ke(u.VOM.panPosX + e3.deltaX, u.VOM.panPosY + e3.deltaY, u.VOM.content.current.$media, false), u.VOM.toolsHide();
break;
case "media":
if (Math.abs(e3.deltaY) > u.VOM.panThreshold && Math.abs(e3.deltaX) < u.VOM.panThreshold && !u.VOM.panXOnly) {
Xe(0);
var t3 = 0;
t3 = e3.deltaY < 0 ? Math.max(e3.deltaY, -200) : Math.min(e3.deltaY, 200), u.VOM.$viewer[0].style[u.CSStransformName] = "translateY(" + t3 + "px) ", u.VOM.$viewer.css("opacity", 1 - Math.abs(t3) / 200 / 2);
} else Math.abs(e3.deltaX) > u.VOM.panThreshold && (u.VOM.panXOnly = true), Xe(e3.deltaX), u.VOM.$viewer[0].style[u.CSStransformName] = "translateY(0px)", u.VOM.$viewer.css("opacity", 1);
break;
case "gallery":
u.VOM.gallery.PanGallery(e3.deltaX);
}
}), u.VOM.hammertime.on("panend", function(e3) {
if (Ne()) {
switch (u.VOM.panMode) {
case "zoom":
u.VOM.timeImgChanged = (/* @__PURE__ */ new Date()).getTime(), ke(u.VOM.panPosX + e3.deltaX, u.VOM.panPosY + e3.deltaY, u.VOM.content.current.$media, true);
break;
case "media":
var t3 = false;
u.VOM.panXOnly || Math.abs(e3.deltaY) > 50 && Math.abs(e3.deltaX) < 50 && (tt(), t3 = true), t3 || (Math.abs(e3.deltaX) < 50 ? Xe(0) : e3.deltaX > 50 ? qe(Math.abs(e3.velocityX)) : Qe(Math.abs(e3.velocityX))), u.VOM.panXOnly = false;
break;
case "gallery":
u.VOM.gallery.posX += e3.deltaX, u.VOM.gallery.PanGallery(0), u.VOM.gallery.PanGalleryEnd(e3.velocityX);
}
u.VOM.panMode = "off";
}
}), u.O.viewerZoom ? (u.VOM.hammertime.add(new NGHammer.Tap({ event: "doubletap", taps: 2, interval: 250 })), u.VOM.hammertime.add(new NGHammer.Tap({ event: "singletap" })), u.VOM.hammertime.get("doubletap").recognizeWith("singletap"), u.VOM.hammertime.get("singletap").requireFailure("doubletap"), u.VOM.hammertime.on("singletap", function(e3) {
if (Ne()) {
if (null != e3.target.dataset.ngy2_lightbox_thumbnail) {
var t3 = parseInt(e3.target.dataset.ngy2_idx), n3 = parseInt(e3.target.dataset.ngy2_vidx);
if (!isNaN(t3) && n3 != u.VOM.content.current.vIdx) {
if (n3 > u.VOM.content.current.vIdx) {
at("lightboxNextImage"), u.VOM.content.next.$media.empty();
var i3 = u.I[t3];
u.VOM.content.next.vIdx = n3;
let e4 = '<div class="nGY2ViewerMediaLoaderDisplayed"></div>';
"img" == i3.mediaKind && 0 != i3.imageWidth && 0 != i3.imageHeight && (e4 = '<div class="nGY2ViewerMediaLoaderHidden"></div>'), u.VOM.content.next.$media.append(e4 + i3.mediaMarkup), "img" == i3.mediaKind ? u.VOM.ImageLoader.loadImage(Ke, i3) : Ce(u.VOM.content.next.$media), Ze("nextImage");
} else {
at("lightboxPreviousImage"), u.VOM.content.previous.$media.empty();
var a3 = u.I[t3];
u.VOM.content.previous.vIdx = n3;
let e4 = '<div class="nGY2ViewerMediaLoaderDisplayed"></div>';
"img" == a3.mediaKind && 0 != a3.imageWidth && 0 != a3.imageHeight && (e4 = '<div class="nGY2ViewerMediaLoaderHidden"></div>'), u.VOM.content.previous.$media.append(e4 + a3.mediaMarkup), "img" == a3.mediaKind ? u.VOM.ImageLoader.loadImage(Ke, a3) : Ce(u.VOM.content.previous.$media), Ze("previousImage");
}
return;
}
}
if (Ve(e3.srcEvent), 0 == u.VOM.toolbarsDisplayed) s2(Ae, 100, false)(), u.VOM.singletapTime = (/* @__PURE__ */ new Date()).getTime();
else {
if ((/* @__PURE__ */ new Date()).getTime() - u.VOM.singletapTime < 400) return;
"img" == u.VOM.content.current.NGY2Item().mediaKind && -1 !== e3.target.className.indexOf("nGY2ViewerMedia") && ((e3.srcEvent instanceof MouseEvent ? e3.srcEvent.pageX : e3.srcEvent.changedTouches[0].pageX) < u.GOM.cache.viewport.w / 2 ? qe() : Qe());
}
}
}), u.VOM.hammertime.on("doubletap", function(e3) {
Ne() && (Ve(e3.srcEvent), -1 !== e3.target.className.indexOf("nGY2ViewerMedia") && (u.VOM.zoom.isZooming ? (u.VOM.zoom.isZooming = false, nt(true)) : Ie() && (u.VOM.zoom.userFactor = 1.5, Le())));
}), u.VOM.hammertime.on("pinchend", function(e3) {
e3.srcEvent.stopPropagation(), e3.srcEvent.preventDefault(), u.VOM.timeImgChanged = (/* @__PURE__ */ new Date()).getTime();
}), u.VOM.hammertime.on("pinch", function(e3) {
e3.srcEvent.stopPropagation(), e3.srcEvent.preventDefault(), Ie() && (u.VOM.zoom.userFactor = e3.scale, xe(), Se(), Le());
})) : (u.VOM.hammertime.add(new NGHammer.Tap({ event: "singletap" })), u.VOM.hammertime.on("singletap", function(e3) {
if (Ne()) if (Ve(e3.srcEvent), 0 == u.VOM.toolbarsDisplayed) s2(Ae, 100, false)(), u.VOM.singletapTime = (/* @__PURE__ */ new Date()).getTime();
else {
if ((/* @__PURE__ */ new Date()).getTime() - u.VOM.singletapTime < 400) return;
-1 !== e3.target.className.indexOf("nGY2ViewerMedia") && ((e3.srcEvent instanceof MouseEvent ? e3.srcEvent.pageX : e3.srcEvent.changedTouches[0].pageX) < u.GOM.cache.viewport.w / 2 ? qe() : Qe());
}
}))), Ze(""), u.O.slideshowAutoStart && (u.VOM.playSlideshow = false, He()), Ae(), Je("");
} });
}
function Ne() {
return !(!u.VOM.viewerDisplayed || u.VOM.viewerMediaIsChanged);
}
function Ve(e2) {
e2.stopPropagation(), e2.preventDefault();
}
function Ye() {
u.VOM.viewerDisplayed && (u.VOM.toolbarsDisplayed = false, _e(0));
}
function Ae() {
u.VOM.viewerDisplayed && (u.VOM.toolbarsDisplayed = true, _e(1), u.VOM.toolsHide());
}
function _e(e2) {
null != u.VOM.$toolbar && u.VOM.$toolbar.css("opacity", e2), null != u.VOM.$toolbarTL && u.VOM.$toolbarTL.css("opacity", e2), null != u.VOM.$toolbarTR && u.VOM.$toolbarTR.css("opacity", e2), u.VOM.$content.find(".nGY2ViewerAreaNext").css("opacity", e2), u.VOM.$content.find(".nGY2ViewerAreaPrevious").css("opacity", e2);
}
function Pe() {
u.VOM.$viewer.off("touchstart click", ".ngy2viewerToolAction", Re), u.VOM.$viewer.on("touchstart click", ".ngy2viewerToolAction", Re);
}
function Re(t2) {
if (!((/* @__PURE__ */ new Date()).getTime() - u.timeLastTouchStart < 300)) {
u.timeLastTouchStart = (/* @__PURE__ */ new Date()).getTime();
var n2 = e(this), i2 = n2.data("ngy2action");
if (null != i2) {
switch (i2) {
case "next":
Ve(t2), Qe();
break;
case "previous":
Ve(t2), qe();
break;
case "playPause":
t2.stopPropagation(), He();
break;
case "zoomIn":
Ve(t2), Ie() && Te(true);
break;
case "zoomOut":
Ve(t2), Ie() && Te(false);
break;
case "minimize":
Ve(t2), "std" == u.VOM.toolbarMode ? We() : Ue();
break;
case "fullScreen":
t2.stopPropagation(), ngscreenfull.enabled && ngscreenfull.toggle();
break;
case "info":
t2.stopPropagation(), ze(u.VOM.content.current.NGY2Item());
break;
case "close":
if (Ve(t2), (/* @__PURE__ */ new Date()).getTime() - u.VOM.timeImgChanged < 400) return;
tt();
break;
case "download":
Ve(t2), ce(u.VOM.items[u.VOM.content.current.vIdx].ngy2ItemIdx);
break;
case "share":
Ve(t2), ge(u.VOM.items[u.VOM.content.current.vIdx].ngy2ItemIdx);
break;
case "linkOriginal":
Ve(t2), Me(u.VOM.content.current.NGY2Item());
break;
case "rotateLeft":
Ve(t2), Fe(-90);
break;
case "rotateRight":
Ve(t2), Fe(90);
break;
case "shoppingcart":
Ve(t2), he(u.VOM.items[u.VOM.content.current.vIdx].ngy2ItemIdx, "lightbox");
}
var a2 = u.O.fnImgToolbarCustClick;
0 == i2.indexOf("custom") && null !== a2 && ("function" == typeof a2 ? a2(i2, n2, u.VOM.content.current.NGY2Item()) : window[a2](i2, n2, u.VOM.content.current.NGY2Item()));
}
}
}
function Fe(e2) {
var t2 = u.VOM.content.current.NGY2Item();
"img" == t2.mediaKind && (t2.rotationAngle += e2, t2.rotationAngle = t2.rotationAngle % 360, t2.rotationAngle < 0 && (t2.rotationAngle += 360), Xe(0), Ee(u.VOM.content.current, true));
}
function ze(e2) {
var t2 = '<div class="nGY2PopupOneItem">' + e2.title + "</div>";
t2 += '<div class="nGY2PopupOneItemText">' + e2.description + "</div>", "" != e2.author && (t2 += '<div class="nGY2PopupOneItemText">' + u.O.icons.user + " " + e2.author + "</div>"), "" != e2.exif.model && (t2 += '<div class="nGY2PopupOneItemText">' + u.O.icons.config + " " + e2.exif.model + "</div>");
var n2 = u.O.icons.picture + ":";
"" != e2.exif.flash || "" != e2.exif.focallength || "" != e2.exif.fstop || "" != e2.exif.exposure || "" != e2.exif.iso || "" != e2.exif.time ? (n2 += "<br>", n2 += "" == e2.exif.flash ? "" : " &nbsp; " + e2.exif.flash, n2 += "" == e2.exif.focallength ? "" : " &nbsp; " + e2.exif.focallength + "mm", n2 += "" == e2.exif.fstop ? "" : " &nbsp; f" + e2.exif.fstop, n2 += "" == e2.exif.exposure ? "" : " &nbsp; " + e2.exif.exposure + "s", n2 += "" == e2.exif.iso ? "" : " &nbsp; " + e2.exif.iso + " ISO", "" != e2.exif.time && (n2 += " &nbsp; " + e2.exif.time)) : n2 += " n/a", t2 += '<div class="nGY2PopupOneItemText">' + n2 + "</div>", "" != e2.exif.location ? (t2 += '<div class="nGY2PopupOneItemText">' + u.O.icons.location + ' <a href="http://maps.google.com/maps?z=12&t=m&q=' + encodeURIComponent(e2.exif.location) + '" target="_blank">' + e2.exif.location + "</a></div>", t2 += '<iframe width="300" height="150" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="https://maps.google.com/maps?&amp;t=m&amp;q=' + encodeURIComponent(e2.exif.location) + '&amp;output=embed"></iframe>') : t2 += '<div class="nGY2PopupOneItemText">' + u.O.icons.location + ": n/a</div>";
var i2 = { title: u.O.icons.viewerInfo, content: t2 }, a2 = u.O.fnPopupMediaInfo;
null !== a2 && (i2 = "function" == typeof a2 ? a2(e2, i2.title, i2.content) : window[a2](e2, i2.title, i2.content)), fe(i2.title, i2.content, "Left");
}
function Be(e2) {
var t2 = '<div class="ngbt ngy2viewerToolAction ', n2 = e2.replace(/^\s+|\s+$/g, "");
switch (n2) {
case "minimizeButton":
case "minimize":
var i2 = u.O.icons.viewerToolbarMin;
"min" == u.VOM.toolbarMode && (i2 = u.O.icons.viewerToolbarStd), t2 += 'minimizeButton nGEvent" data-ngy2action="minimize">' + i2 + "</div>";
break;
case "previousButton":
case "previous":
t2 += 'previousButton nGEvent" data-ngy2action="previous">' + u.O.icons.viewerPrevious + "</div>";
break;
case "pageCounter":
t2 += 'pageCounter nGEvent"></div>';
break;
case "nextButton":
case "next":
t2 += 'nextButton nGEvent" data-ngy2action="next">' + u.O.icons.viewerNext + "</div>";
break;
case "playPauseButton":
case "playPause":
t2 += 'playButton playPauseButton nGEvent" data-ngy2action="playPause">' + u.O.icons.viewerPlay + "</div>";
break;
case "rotateLeft":
t2 += 'rotateLeftButton nGEvent" data-ngy2action="rotateLeft">' + u.O.icons.viewerRotateLeft + "</div>";
break;
case "rotateRight":
t2 += 'rotateRightButton nGEvent" data-ngy2action="rotateRight">' + u.O.icons.viewerRotateRight + "</div>";
break;
case "downloadButton":
case "download":
t2 += 'downloadButton nGEvent" data-ngy2action="download">' + u.O.icons.viewerDownload + "</div>";
break;
case "zoomButton":
case "zoom":
t2 += 'nGEvent" data-ngy2action="zoomIn">' + u.O.icons.viewerZoomIn + '</div><div class="ngbt ngy2viewerToolAction nGEvent" data-ngy2action="zoomOut">' + u.O.icons.viewerZoomOut + "</div>";
break;
case "fullscreenButton":
case "fullscreen":
var a2 = u.O.icons.viewerFullscreenOn;
ngscreenfull.enabled && u.VOM.viewerIsFullscreen && (a2 = u.O.icons.viewerFullscreenOff), t2 += 'setFullscreenButton fullscreenButton nGEvent" data-ngy2action="fullScreen">' + a2 + "</div>";
break;
case "infoButton":
case "info":
t2 += 'infoButton nGEvent" data-ngy2action="info">' + u.O.icons.viewerInfo + "</div>";
break;
case "linkOriginalButton":
case "linkOriginal":
t2 += 'linkOriginalButton nGEvent" data-ngy2action="linkOriginal">' + u.O.icons.viewerLinkOriginal + "</div>";
break;
case "closeButton":
case "close":
t2 += 'closeButton nGEvent" data-ngy2action="close">' + u.O.icons.buttonClose + "</div>";
break;
case "shareButton":
case "share":
t2 += 'nGEvent" data-ngy2action="share">' + u.O.icons.viewerShare + "</div>";
break;
case "label":
t2 += '"><div class="label"><div class="title nGEvent" itemprop="name"></div><div class="description nGEvent" itemprop="description"></div></div></div>';
break;
case "shoppingcart":
t2 += 'closeButton nGEvent" data-ngy2action="shoppingcart">' + u.O.icons.viewerShoppingcart + "</div>";
break;
default:
if (0 == n2.indexOf("custom")) {
var o2 = "", r2 = u.O.fnImgToolbarCustInit;
if (null !== r2 && ("function" == typeof r2 ? r2(n2) : window[r2](n2)), null == o2 || "" == o2) {
var l3 = n2.substring(6);
o2 = u.O.icons["viewerCustomTool" + l3];
}
t2 += "ngy2CustomBtn " + n2 + ' nGEvent" data-ngy2action="' + n2 + '">' + o2 + "</div>";
} else t2 = "";
}
return t2;
}
function He() {
u.VOM.playSlideshow ? (window.clearTimeout(u.VOM.playSlideshowTimerID), u.VOM.playSlideshow = false, u.VOM.$viewer.find(".playPauseButton").html(u.O.icons.viewerPlay)) : (u.VOM.playSlideshow = true, Qe(), u.VOM.$viewer.find(".playPauseButton").html(u.O.icons.viewerPause));
}
function Ue() {
u.VOM.toolbarMode = "std";
for (var e2 = "", t2 = u.O.viewerToolbar.standard.split(","), n2 = 0, i2 = t2.length; n2 < i2; n2++) e2 += Be(t2[n2]);
u.VOM.$toolbar.find(".toolbar").html(e2), je();
}
function We() {
if (null == u.O.viewerToolbar.minimized || "" == u.O.viewerToolbar.minimized) Ue();
else {
u.VOM.toolbarMode = "min";
for (var e2 = "", t2 = u.O.viewerToolbar.minimized.split(","), n2 = 0, i2 = t2.length; n2 < i2; n2++) e2 += Be(t2[n2]);
u.VOM.$toolbar.find(".toolbar").html(e2), je();
}
}
function je() {
var e2 = u.VOM.content.current.vIdx;
if (null != e2) {
var t2 = u.VOM.content.current.NGY2Item(), n2 = false;
void 0 !== t2.title && "" != t2.title ? (u.VOM.$viewer.find(".ngy2viewerToolAction").find(".title").html(t2.title), n2 = true) : u.VOM.$viewer.find(".ngy2viewerToolAction").find(".title").html(""), void 0 !== t2.description && "" != t2.description ? (u.VOM.$viewer.find(".ngy2viewerToolAction").find(".description").html(t2.description), n2 = true) : u.VOM.$viewer.find(".ngy2viewerToolAction").find(".description").html(""), n2 ? u.VOM.$viewer.find(".ngy2viewerToolAction").find(".label").show() : u.VOM.$viewer.find(".ngy2viewerToolAction").find(".label").hide();
var i2 = u.VOM.items.length;
i2 > 0 && u.VOM.$viewer.find(".pageCounter").html(u.VOM.items[e2].mediaNumber + "/" + i2);
var a2 = u.VOM.$viewer.find(".ngy2CustomBtn"), o2 = u.O.fnImgToolbarCustDisplay;
a2.length > 0 && null !== o2 && ("function" == typeof o2 ? o2(a2, t2) : window[o2](a2, t2)), Pe();
}
}
function Xe(e2) {
if (u.VOM.swipePosX = e2, null == u.CSStransformName) ;
else {
u.VOM.content.current.$media[0].style[u.CSStransformName] = "translate(" + e2 + "px, 0px)";
var t2 = u.VOM.content.previous.NGY2Item(), n2 = u.VOM.content.next.NGY2Item();
if (u.O.imageTransition.startsWith("SWIPE")) {
t2.mediaTransition() && et(u.VOM.content.previous, 1), n2.mediaTransition() && et(u.VOM.content.next, 1);
var i2 = Math.min(Math.max(Math.abs(e2) / u.VOM.window.lastWidth, 0.8), 1);
if ("SWIPE" == u.O.imageTransition && (i2 = 1), e2 > 0) {
let a2 = u.VOM.window.lastWidth;
t2.mediaTransition() && (u.VOM.content.previous.$media[0].style[u.CSStransformName] = "translate(" + (-a2 + e2) + "px, 0px) scale(" + i2 + ")"), n2.mediaTransition() && (u.VOM.content.next.$media[0].style[u.CSStransformName] = "translate(" + a2 + "px, 0px) scale(" + i2 + ")");
} else {
let a2 = -u.VOM.window.lastWidth;
n2.mediaTransition() && (u.VOM.content.next.$media[0].style[u.CSStransformName] = "translate(" + (-a2 + e2) + "px, 0px) scale(" + i2 + ")"), t2.mediaTransition() && (u.VOM.content.previous.$media[0].style[u.CSStransformName] = "translate(" + a2 + "px, 0px) scale(" + i2 + ")");
}
}
if ("SLIDEAPPEAR" == u.O.imageTransition) if (u.VOM.content.previous.$media[0].style[u.CSStransformName] = "", u.VOM.content.next.$media[0].style[u.CSStransformName] = "", e2 < 0) {
let i3 = -e2 / u.VOM.window.lastWidth;
n2.mediaTransition() && et(u.VOM.content.next, i3), t2.mediaTransition() && et(u.VOM.content.previous, 0);
} else {
let i3 = e2 / u.VOM.window.lastWidth;
t2.mediaTransition() && et(u.VOM.content.previous, i3), n2.mediaTransition() && et(u.VOM.content.next, 0);
}
}
}
function Qe(e2) {
e2 = e2 || 0, u.VOM.viewerMediaIsChanged || (/* @__PURE__ */ new Date()).getTime() - u.VOM.timeImgChanged < 300 || (at("lightboxNextImage"), Ze("nextImage", e2));
}
function qe(e2) {
e2 = e2 || 0, u.VOM.viewerMediaIsChanged || (/* @__PURE__ */ new Date()).getTime() - u.VOM.timeImgChanged < 300 || (u.VOM.playSlideshow && He(), at("lightboxPreviousImage"), Ze("previousImage", e2));
}
function Ze(e2, t2) {
t2 = t2 || 0, u.O.debugMode && console.timeline && console.timeline("nanogallery2_viewer"), u.VOM.playSlideshow && window.clearTimeout(u.VOM.playSlideshowTimerID);
var n2 = null, i2 = null;
switch (u.VOM.timeImgChanged = (/* @__PURE__ */ new Date()).getTime(), u.VOM.viewerMediaIsChanged = true, u.VOM.zoom.isZooming = false, nt(true), e2) {
case "":
n2 = u.VOM.content.current, i2 = u.VOM.content.current;
break;
case "previousImage":
n2 = u.VOM.content.current, i2 = u.VOM.content.previous;
break;
default:
n2 = u.VOM.content.current, i2 = u.VOM.content.next;
}
if (rt(i2.NGY2Item().albumID, i2.NGY2Item().GetID()), "" != e2) {
var a2 = u.GOM.cache.viewport, o2 = "", r2 = 500 * (a2.w - Math.abs(u.VOM.swipePosX)) / a2.w;
if (t2 > 0 && (r2 = Math.min((a2.w - Math.abs(u.VOM.swipePosX)) / t2, r2), o2 = "linear"), null == u.CSStransformName) et(i2, 1), et(n2, 1), Je(e2);
else switch (u.O.imageTransition) {
case "SWIPE":
case "SWIPE2":
var l3 = "nextImage" == e2 ? -a2.w : a2.w;
i2.$media[0].style[u.CSStransformName] = "translate(" + -l3 + "px, 0px) ", 0 == t2 && (o2 = "swipe" == u.O.imageTransition ? "easeInOutSine" : "easeOutCubic"), et(u.VOM.content.current, 1), u.VOM.content.current.$media[0].style[u.CSStransformName] = "translate(0px, 0px)", et(i2, 1), new NGTweenable().tween({ from: { t: u.VOM.swipePosX }, to: { t: "nextImage" == e2 ? -a2.w : a2.w }, attachment: { dT: e2, new_content_item: i2, dir: l3, media_transition: i2.NGY2Item().mediaTransition() }, duration: r2, easing: o2, step: function(e3, t3) {
if (u.VOM.content.current.$media[0].style[u.CSStransformName] = "translate(" + e3.t + "px, 0px)", t3.media_transition) {
var n3 = Math.min(Math.max(Math.abs(e3.t) / u.VOM.window.lastWidth, 0.8), 1);
"SWIPE" == u.O.imageTransition && (n3 = 1), t3.new_content_item.$media[0].style[u.CSStransformName] = "translate(" + (-t3.dir + e3.t) + "px, 0px) scale(" + n3 + ")";
}
}, finish: function(e3, t3) {
u.VOM.content.current.$media[0].style[u.CSStransformName] = "", et(u.VOM.content.current, 0), t3.new_content_item.$media[0].style[u.CSStransformName] = "", Je(t3.dT);
} });
break;
case "SLIDEAPPEAR":
default:
var s3 = Math.abs(u.VOM.swipePosX) / u.VOM.window.lastWidth;
i2.$media[0].style[u.CSStransformName] = "", 0 == t2 && (o2 = "easeInOutSine"), new NGTweenable().tween({ from: { o: s3, t: u.VOM.swipePosX }, to: { o: 1, t: "nextImage" == e2 ? -a2.w : a2.w }, attachment: { dT: e2, new_content_item: i2, media_transition: i2.NGY2Item().mediaTransition() }, delay: 30, duration: r2, easing: o2, step: function(e3, t3) {
u.VOM.content.current.$media[0].style[u.CSStransformName] = "translate(" + e3.t + "px, 0px)", t3.media_transition && et(t3.new_content_item, e3.o);
}, finish: function(e3, t3) {
u.VOM.content.current.$media[0].style[u.CSStransformName] = "", Je(t3.dT);
} });
}
}
}
function Je(e2) {
var t2 = 0;
switch (e2) {
case "":
t2 = u.VOM.content.current.vIdx;
break;
case "previousImage":
t2 = u.VOM.content.previous.vIdx;
break;
default:
t2 = u.VOM.content.next.vIdx;
}
u.VOM.content.current.vIdx = t2, u.VOM.content.next.vIdx = u.VOM.IdxNext(), u.VOM.content.previous.vIdx = u.VOM.IdxPrevious(), u.VOM.gallery.Resize(), u.VOM.gallery.SetThumbnailActive();
var n2 = u.VOM.content.current.NGY2Item();
je(), u.O.debugMode && console.timeline && console.timelineEnd("nanogallery2_viewer");
var i2 = u.O.fnImgDisplayed;
if (null !== i2 && ("function" == typeof i2 ? i2(n2) : window[i2](n2)), u.VOM.swipePosX = 0, "" != e2) {
u.VOM.content.current.$media.removeClass("imgCurrent");
var a2 = u.VOM.content.current.$media;
switch (e2) {
case "nextImage":
u.VOM.content.current.$media = u.VOM.content.next.$media, u.VOM.content.next.$media = a2;
break;
case "previousImage":
u.VOM.content.current.$media = u.VOM.content.previous.$media, u.VOM.content.previous.$media = a2;
}
}
u.VOM.content.current.$media.addClass("imgCurrent");
var o2 = u.VOM.$content.find(".nGY2ViewerMediaPan");
u.VOM.content.current.$media.insertAfter(o2.last()), "img" == n2.mediaKind && 0 == n2.imageWidth ? et(u.VOM.content.current, 0) : (u.VOM.content.current.$media.children().eq(0).attr("class", "nGY2ViewerMediaLoaderHidden"), et(u.VOM.content.current, 1)), u.VOM.content.next.$media.empty();
var r2 = u.VOM.content.next.NGY2Item(), l3 = '<div class="nGY2ViewerMediaLoaderDisplayed"></div>';
"img" == r2.mediaKind && 0 != r2.imageWidth && 0 != r2.imageHeight && (l3 = '<div class="nGY2ViewerMediaLoaderHidden"></div>'), u.VOM.content.next.$media.append(l3 + r2.mediaMarkup), et(u.VOM.content.next, 0), et(u.VOM.content.previous, 0), "img" == r2.mediaKind ? u.VOM.ImageLoader.loadImage(Ke, r2) : Ce(u.VOM.content.next.$media), u.VOM.content.previous.$media.empty();
var s3 = u.VOM.content.previous.NGY2Item();
l3 = '<div class="nGY2ViewerMediaLoaderDisplayed"></div>', "img" == s3.mediaKind && 0 != s3.imageWidth && 0 != s3.imageHeight && (l3 = '<div class="nGY2ViewerMediaLoaderHidden"></div>'), u.VOM.content.previous.$media.append(l3 + s3.mediaMarkup), et(u.VOM.content.previous, 0), et(u.VOM.content.next, 0), "img" == s3.mediaKind ? u.VOM.ImageLoader.loadImage(Ke, s3) : Ce(u.VOM.content.previous.$media), u.VOM.playSlideshow && u.VOM.content.current.$media.children().eq(1).ngimagesLoaded().always(function(e3) {
u.VOM.playSlideshow && (u.VOM.playSlideshowTimerID = window.setTimeout(function() {
Qe();
}, u.VOM.slideshowDelay));
}), nt(), u.VOM.viewerMediaIsChanged = false, at("lightboxImageDisplayed");
}
function Ke(e2, t2, n2, i2) {
n2.imageWidth = e2, n2.imageHeight = t2, u.VOM.content.current.NGY2Item() == n2 && (u.VOM.content.current.$media.children().eq(0).attr("class", "nGY2ViewerMediaLoaderHidden"), et(u.VOM.content.current, 1), u.VOM.zoom.userFactor = 1), u.VOM.content.next.NGY2Item() == n2 && u.VOM.content.next.$media.children().eq(0).attr("class", "nGY2ViewerMediaLoaderHidden"), u.VOM.content.previous.NGY2Item() == n2 && u.VOM.content.previous.$media.children().eq(0).attr("class", "nGY2ViewerMediaLoaderHidden"), Le();
}
function et(e2, t2) {
var n2 = e2.NGY2Item(), i2 = e2.$media;
"img" != n2.mediaKind || 0 != n2.imageWidth ? 0 == t2 ? i2.children().css({ opacity: 0, visibility: "hidden" }) : i2.children().css({ opacity: t2, visibility: "visible" }) : i2.children().eq(1).css({ opacity: 0, visibility: "hidden" });
}
function tt(e2) {
if (null == e2 && (e2 = u.VOM.content.current.vIdx), u.VOM.viewerMediaIsChanged = false, u.VOM.viewerDisplayed) {
if (jQuery("body").removeClass("nGY2_body_scrollbar"), jQuery("#nGY2_body_scrollbar_style").remove(), u.VOM.playSlideshow && (window.clearTimeout(u.VOM.playSlideshowTimerID), u.VOM.playSlideshow = false), u.VOM.hammertime.destroy(), u.VOM.hammertime = null, ngscreenfull.enabled && u.VOM.viewerIsFullscreen && (u.VOM.viewerIsFullscreen = false, ngscreenfull.exit()), jQuery(".nGY2ViewerContainer").remove(), u.VOM.$baseCont = null, u.VOM.viewerDisplayed = false, u.O.lightboxStandalone) return;
if (u.O.thumbnailAlbumDisplayImage) if (null == e2) ;
else {
var t2 = u.I[u.VOM.items[e2].ngy2ItemIdx], n2 = NGY2Item.Get(u, t2.albumID);
u.GOM.albumIdx != n2.albumID ? g("-1", n2.albumID) : (x(), rt("", ""), U());
}
else null != e2 && (-1 == u.GOM.albumIdx ? g("", u.I[u.VOM.items[e2].ngy2ItemIdx].albumID) : (x(), rt(u.I[u.VOM.items[e2].ngy2ItemIdx].albumID, ""), U()));
u.VOM.timeImgChanged = (/* @__PURE__ */ new Date()).getTime();
}
}
function nt(e2) {
if (e2 = void 0 !== e2 && e2, null !== u.VOM.$toolbar) {
var t2 = u.VOM.$viewer.width(), n2 = u.VOM.$viewer.height();
if (null != u.VOM.content.current.$media.children().eq(1) && -1 != u.VOM.content.current.vIdx && (e2 || u.VOM.window.lastWidth != t2 || u.VOM.window.lastHeight != n2)) {
u.VOM.window.lastWidth = t2, u.VOM.window.lastHeight = n2;
var i2 = 0, a2 = 0;
switch ("none" != u.O.viewerGallery && (i2 = u.O.viewerGalleryTHeight + 10), "bottom" == u.O.viewerGallery && (a2 = i2), u.O.viewerToolbar.position) {
case "top":
case "topOverImage":
u.VOM.$content.css({ height: n2, width: t2, top: 0 }), u.VOM.$toolbar.css({ top: 0, bottom: "" });
break;
case "bottom":
case "bottomOverImage":
default:
n2 -= a2, u.VOM.$content.css({ height: n2, width: t2, bottom: -a2, top: 0 }), u.VOM.$toolbar.css({ bottom: i2 });
}
!u.VOM.viewerMediaIsChanged && u.VOM.zoom.isZooming ? Le() : u.VOM.zoom.isZooming || 0 == u.VOM.zoom.userFactor && 0 == u.VOM.panPosX && 0 == u.VOM.panPosY && 0 == u.VOM.zoom.posX && 0 == u.VOM.zoom.posY ? (u.VOM.zoom.userFactor = 1, u.VOM.zoom.isZooming = false, u.VOM.panPosX = 0, u.VOM.panPosY = 0, u.VOM.zoom.posX = 0, u.VOM.zoom.posY = 0, Le()) : (u.VOM.zoom.isZooming = true, new NGTweenable().tween({ from: { userFactor: u.VOM.zoom.userFactor, panPosX: u.VOM.panPosX, panPosY: u.VOM.panPosY, zoomPosX: u.VOM.zoom.posX, zoomPosY: u.VOM.zoom.posY }, to: { userFactor: 1, panPosX: 0, panPosY: 0, zoomPosX: 0, zoomPosY: 0 }, easing: "easeInOutSine", delay: 0, duration: 150, step: function(e3) {
u.VOM.zoom.userFactor = e3.userFactor, u.VOM.panPosX = e3.panPosX, u.VOM.panPosY = e3.panPosY, u.VOM.zoom.posX = e3.zoomPosX, u.VOM.zoom.posY = e3.zoomPosY, Le();
}, finish: function(e3) {
u.VOM.zoom.isZooming = false;
} }));
}
}
}
function it(e2) {
const t2 = /(auto|scroll)/, n2 = (e3, t3) => null === e3.parentNode ? t3 : n2(e3.parentNode, t3.concat([e3])), i2 = (e3, t3) => getComputedStyle(e3, null).getPropertyValue(t3), a2 = (e3) => t2.test(((e4) => i2(e4, "overflow") + i2(e4, "overflow-y") + i2(e4, "overflow-x"))(e3));
return ((e3) => {
if (!(e3 instanceof HTMLElement || e3 instanceof SVGElement)) return;
const t3 = n2(e3.parentNode, []);
for (let e4 = 0; e4 < t3.length; e4 += 1) {
if (t3[e4] === document.body) return null;
if (a2(t3[e4])) return t3[e4];
}
return document.scrollingElement || document.documentElement;
})(e2);
}
function at(e2) {
var t2 = e2 + ".nanogallery2", n2 = null;
try {
n2 = new Event(t2);
} catch (e3) {
(n2 = document.createEvent("Event")).initEvent(t2, false, false);
}
u.$E.base.trigger(t2, n2);
}
function ot() {
if (!u.O.locationHash) return false;
var e2 = "#nanogallery/" + u.baseEltID + "/", t2 = location.hash;
if (u.O.debugMode && (console.log("------------------------ PROCESS LOCATION HASH"), console.log("newLocationHash1: " + t2), console.log("G.locationHashLastUsed: " + u.locationHashLastUsed)), "" == t2 && "" !== u.locationHashLastUsed) return u.O.debugMode && console.log("display root album"), u.locationHashLastUsed = "", u.O.debugMode && console.log("new3 G.locationHashLastUsed: " + u.locationHashLastUsed), g("", "0"), true;
if (t2 != u.locationHashLastUsed) {
if (0 == t2.indexOf(e2)) {
var n2 = p(t2.substring(e2.length));
return "0" != n2.imageID ? (u.O.debugMode && console.log("display image: " + n2.albumID + "-" + n2.imageID), Q(n2.imageID, n2.albumID), true) : (u.O.debugMode && console.log("display album: " + n2.albumID), g("-1", n2.albumID), true);
}
return false;
}
}
function rt(e2, t2) {
if (!u.O.locationHash || u.O.lightboxStandalone) return false;
if (u.O.debugMode && console.log("------------------------ SET LOCATION HASH"), "" == t2 && ("-1" == e2 || "0" == e2 || u.O.album == e2)) return "" != location.hash && ("pushState" in history ? history.pushState("", document.title, window.location.pathname + window.location.search) : location.hash = ""), u.locationHashLastUsed = "", void (u.O.debugMode && console.log("new2 G.locationHashLastUsed: " + u.locationHashLastUsed));
var n2 = "#nanogallery/" + u.baseEltID + "/" + e2;
"" != t2 && (n2 += "/" + t2);
var i2 = location.hash;
if (u.O.debugMode && (console.log("newLocationHash2: " + n2), console.log("location.hash: " + i2)), u.locationHashLastUsed = n2, u.O.debugMode && console.log("new G.locationHashLastUsed: " + u.locationHashLastUsed), "" == i2 || i2 != n2) try {
top.location.hash = n2;
} catch (e3) {
u.O.locationHash = false;
}
}
function lt() {
C();
var e2 = u.GOM.curNavLevel, t2 = u.GOM.curWidth;
if (u.VOM.viewerDisplayed) nt(), u.VOM.gallery.Resize();
else if (u.galleryResizeEventEnabled) {
var n2 = ht();
if (-1 != u.GOM.albumIdx) {
var i2 = u.tn.settings;
if ("MOSAIC" == u.layout.engine) {
if (JSON.stringify(i2.mosaic[e2][t2]) !== JSON.stringify(i2.mosaic[e2][n2])) return u.GOM.curWidth = n2, u.GOM.pagination.currentPage = 0, void w(u.GOM.albumIdx);
} else if (i2.height[e2][t2] != i2.height[e2][n2] || i2.width[e2][t2] != i2.width[e2][n2] || i2.gutterHeight[e2][t2] != i2.gutterHeight[e2][n2] || i2.gutterWidth[e2][t2] != i2.gutterWidth[e2][n2]) return u.GOM.curWidth = n2, u.GOM.pagination.currentPage = 0, void w(u.GOM.albumIdx);
}
x();
}
}
function st() {
u.VOM.viewerDisplayed || ut();
}
function ut() {
0 == u.galleryResizeEventEnabled ? window.setTimeout(ut, 10) : x();
}
function ct(e2, t2) {
return "" != u.i18nLang && void 0 !== e2[t2 + "_" + u.i18nLang] && e2[t2 + "_" + u.i18nLang].length > 0 ? e2[t2 + "_" + u.i18nLang] : e2[t2];
}
function ht() {
var e2 = u.GOM.cache.viewport.w;
return u.O.breakpointSizeSM > 0 && e2 < u.O.breakpointSizeSM ? "xs" : u.O.breakpointSizeME > 0 && e2 < u.O.breakpointSizeME ? "sm" : u.O.breakpointSizeLA > 0 && e2 < u.O.breakpointSizeLA ? "me" : u.O.breakpointSizeXL > 0 && e2 < u.O.breakpointSizeXL ? "la" : "xl";
}
function dt(e2) {
for (var t2 = document.createElement("div"), n2 = 0; n2 < e2.length; ++n2) if (void 0 !== t2.style[e2[n2]]) return e2[n2];
return null;
}
}
/*!
* imagesLoaded PACKAGED v4.1.1
* JavaScript is all like "You images are done yet or what?"
* MIT License
*/
e.nanogallery2 = function(e2, t2) {
var i2 = this;
i2.$e = jQuery(e2), i2.e = e2, i2.$e.data("nanogallery2data", i2), i2.init = function() {
void 0 === window.NGY2Item && (window.NGY2Tools = function() {
function e3() {
}
return e3.FilterAlbumName = function(e4, t3) {
var n2 = e4.toUpperCase();
if (!(this.albumList.length > 0)) {
var i3 = false;
if (null !== this.allowList) {
for (a2 = 0; a2 < this.allowList.length; a2++) -1 !== n2.indexOf(this.allowList[a2]) && (i3 = true);
if (!i3) return false;
}
if (null !== this.blockList) {
for (a2 = 0; a2 < this.blockList.length; a2++) if (-1 !== n2.indexOf(this.blockList[a2])) return false;
}
return true;
}
for (var a2 = 0; a2 < this.albumList.length; a2++) if (n2 === this.albumList[a2].toUpperCase() || t3 === this.albumList[a2]) return true;
}, e3.NanoAlert = function(t3, n2, i3) {
e3.NanoConsoleLog.call(t3, n2), null != t3.$E.conConsole && (t3.$E.conConsole.css({ visibility: "visible", minHeight: "100px" }), 0 == i3 ? t3.$E.conConsole.append("<p>" + n2 + "</p>") : t3.$E.conConsole.append("<p>nanogallery2: " + n2 + " [" + t3.baseEltID + "]</p>"));
}, e3.NanoConsoleLog = function(e4, t3) {
window.console && console.log("nanogallery2: " + t3 + " [" + e4.baseEltID + "]");
}, e3.PreloaderDisplay = function(e4) {
if (true === e4) {
if (this.$E.conLoadingB.removeClass("nanoGalleryLBarOff").addClass("nanoGalleryLBar"), null != this.GOM.albumIdxLoading && -1 != this.GOM.albumIdxLoading) {
this.I[this.GOM.albumIdxLoading].$Elts[".nGY2TnImg"].addClass("nGY2GThumbnailLoaderDisplayed");
}
} else if (this.$E.conLoadingB.removeClass("nanoGalleryLBar").addClass("nanoGalleryLBarOff"), null != this.GOM.albumIdxLoading && -1 != this.GOM.albumIdxLoading) {
this.I[this.GOM.albumIdxLoading].$Elts[".nGY2TnImg"].removeClass("nGY2GThumbnailLoaderDisplayed");
}
}, e3.AreaShuffle = function(e4) {
for (var t3, n2, i3 = e4.length; i3; t3 = Math.floor(Math.random() * i3), n2 = e4[--i3], e4[i3] = e4[t3], e4[t3] = n2) ;
return e4;
}, e3.GetImageTitleFromURL = function(e4) {
return "%filename" == this.O.thumbnailLabel.get("title") ? e4.split("/").pop().replace("_", " ") : "%filenameNoExt" == this.O.thumbnailLabel.get("title") ? e4.split("/").pop().split(".").shift().replace("_", " ") : "";
}, e3.AlbumPostProcess = function(t3) {
var n2 = this.gallerySorting[this.GOM.curNavLevel], i3 = this.galleryMaxItems[this.GOM.curNavLevel];
if ("" != n2 || i3 > 0) {
var a2 = this.I.filter(function(e4) {
return e4.albumID == t3 && "albumUp" != e4.kind;
});
switch (n2) {
case "RANDOM":
a2 = e3.AreaShuffle(a2);
break;
case "REVERSED":
a2 = a2.reverse();
break;
case "TITLEASC":
a2.sort(function(e4, t4) {
return e4.title.toUpperCase() < t4.title.toUpperCase() ? -1 : e4.title.toUpperCase() > t4.title.toUpperCase() ? 1 : 0;
});
break;
case "TITLEDESC":
a2.sort(function(e4, t4) {
return e4.title.toUpperCase() > t4.title.toUpperCase() ? -1 : e4.title.toUpperCase() < t4.title.toUpperCase() ? 1 : 0;
});
}
i3 > 0 && a2.length > i3 && a2.splice(i3 - 1, a2.length - i3), this.I.ngy2removeIf(function(e4) {
return e4.albumID == t3 && "albumUp" != e4.kind;
}), this.I.push.apply(this.I, a2);
}
}, e3;
}(), window.NGY2Item = function() {
var e3 = 1;
function t3(t4) {
var n2 = 0;
n2 = null == t4 ? e3++ : t4, this.GetID = function() {
return n2;
}, this.kind = "", this.mediaKind = "img", this.mediaMarkup = "", this.G = null, this.title = "", this.description = "", this.albumID = 0, this.src = "", this.width = 0, this.height = 0, this.destinationURL = "", this.downloadURL = "", this.author = "", this.left = 0, this.top = 0, this.width = 0, this.height = 0, this.resizedContentWidth = 0, this.resizedContentHeight = 0, this.thumbs = { url: { l1: { xs: "", sm: "", me: "", la: "", xl: "" }, lN: { xs: "", sm: "", me: "", la: "", xl: "" } }, width: { l1: { xs: 0, sm: 0, me: 0, la: 0, xl: 0 }, lN: { xs: 0, sm: 0, me: 0, la: 0, xl: 0 } }, height: { l1: { xs: 0, sm: 0, me: 0, la: 0, xl: 0 }, lN: { xs: 0, sm: 0, me: 0, la: 0, xl: 0 } } }, this.thumbnailImgRevealed = false, this.imageDominantColors = null, this.imageDominantColor = null, this.featured = false, this.flickrThumbSizes = {}, this.picasaThumbs = null, this.hovered = false, this.hoverInitDone = false, this.contentIsLoaded = false, this.contentLength = 0, this.numberItems = 0, this.mediaNumber = 0, this.mediaCounter = 0, this.eltTransform = [], this.eltFilter = [], this.eltEffect = [], this.paginationLastPage = 0, this.paginationLastWidth = 0, this.customData = {}, this.selected = false, this.imageWidth = 0, this.imageHeight = 0, this.$elt = null, this.$Elts = [], this.tags = [], this.albumTagList = [], this.albumTagListSel = [], this.exif = { exposure: "", flash: "", focallength: "", fstop: "", iso: "", model: "", time: "", location: "" }, this.deleted = false, this.rotationAngle = 0;
}
t3.Get = function(e4, t4) {
for (var n2 = e4.I.length, i4 = 0; i4 < n2; i4++) if (e4.I[i4].GetID() == t4) return e4.I[i4];
return null;
}, t3.GetIdx = function(e4, t4) {
for (var n2 = e4.I.length, i4 = 0; i4 < n2; i4++) if (e4.I[i4].GetID() == t4) return i4;
return -1;
}, t3.New = function(e4, n2, i4, o3, r2, l2, s2) {
var u = t3.Get(e4, r2);
if (null !== e4.O.titleTranslationMap) {
let t4 = e4.O.titleTranslationMap.find((e5) => e5.title === n2);
void 0 !== t4 && (n2 = t4.replace);
}
if (-1 != r2 && 0 != r2 && "image gallery by nanogallery2 [build]" != n2 && e4.O.thumbnailLevelUp && 0 == u.getContentLength(false) && "" == e4.O.album) {
let n3 = new t3("0");
e4.I.push(n3), u.contentLength += 1, n3.title = "UP", n3.albumID = r2, n3.kind = "albumUp", n3.G = e4, jQuery.extend(true, n3.thumbs.width, e4.tn.defaultSize.width), jQuery.extend(true, n3.thumbs.height, e4.tn.defaultSize.height);
}
var c = t3.Get(e4, o3);
null === c && (c = new t3(o3), e4.I.push(c), -1 != r2 && "image gallery by nanogallery2 [build]" != n2 && (u.contentLength += 1)), c.G = e4, c.albumID = r2, c.kind = l2, "image" == l2 && (u.mediaCounter += 1, c.mediaNumber = u.mediaCounter);
var h = e4.O.thumbnailFeaturedKeyword;
if ("" != h) {
h = h.toUpperCase();
var d = n2.toUpperCase().indexOf(h);
d > -1 && (c.featured = true, n2 = n2.substring(0, d) + n2.substring(d + h.length, n2.length)), (d = i4.toUpperCase().indexOf(h)) > -1 && (c.featured = true, i4 = i4.substring(0, d) + i4.substring(d + h.length, i4.length));
}
if ("string" == typeof e4.galleryFilterTags.Get()) switch (e4.galleryFilterTags.Get().toUpperCase()) {
case "TITLE": {
let e5, t4 = /(?:^|\W)#(\w+)(?!\w)/g, i5 = [];
for (; e5 = t4.exec(n2); ) i5.push(e5[1].replace(/^\s*|\s*$/, ""));
c.setTags(i5), n2 = n2.split("#").join("");
break;
}
case "DESCRIPTION": {
let e5, t4 = /(?:^|\W)#(\w+)(?!\w)/g, n3 = [];
for (; e5 = t4.exec(i4); ) n3.push(e5[1].replace(/^\s*|\s*$/, ""));
c.setTags(n3), i4 = i4.split("#").join("");
break;
}
}
else "" != s2 && null != s2 && c.setTags(s2.split(" "));
return c.title = a2(e4, n2), c.description = a2(e4, i4), c;
}, t3.prototype.delete = function() {
this.deleted = true, this.G.I[t3.GetIdx(this.G, this.albumID)].contentLength--, this.G.I[t3.GetIdx(this.G, this.albumID)].numberItems--;
for (var e4 = this.G.GOM.items.length, n2 = this.GetID(), i4 = -1, a3 = -1, o3 = 0; o3 < e4; o3++) {
var r2 = this.G.GOM.items[o3], l2 = this.G.I[r2.thumbnailIdx];
l2.GetID() == n2 ? r2.neverDisplayed || (i4 = r2.thumbnailIdx, a3 = o3) : -1 != i4 && (r2.neverDisplayed || (l2.$getElt(".nGY2GThumbnail").data("index", o3 - 1), l2.$getElt(".nGY2GThumbnailImg").data("index", o3 - 1)));
}
if (-1 != i4) {
var s2 = this.G;
1 == this.selected && (this.selected = false, s2.GOM.nbSelected--), null !== s2.I[i4].$elt && s2.I[i4].$elt.remove(), s2.GOM.items.splice(a3, 1), -1 != s2.GOM.lastDisplayedIdx && (s2.GOM.lastDisplayedIdx -= 1);
}
}, t3.prototype.addToGOM = function() {
for (var e4 = this.GetID(), t4 = this.G.I.length, n2 = 0; n2 < t4; n2++) {
var i4 = this.G.I[n2];
if (i4.GetID() == e4) {
var a3 = i4.thumbImg().width, o3 = i4.thumbImg().height;
0 == o3 && (o3 = this.G.tn.defaultSize.getHeight()), 0 == a3 && (a3 = this.G.tn.defaultSize.getWidth());
var r2 = new this.G.GOM.GTn(n2, a3, o3);
this.G.GOM.items.push(r2);
break;
}
}
};
var i3 = { "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;", "/": "&#x2F;", "`": "&#x60;", "=": "&#x3D;" };
function a2(e4, t4) {
return 1 == e4.O.allowHTMLinData ? t4 : String(t4).replace(/[&<>"'`=\/]/g, function(e5) {
return i3[e5];
});
}
function o2(e4, t4) {
if ("0" === (e4 = String(e4)) || 1 == t4) return e4;
var n2 = Number(e4.replace(/[a-zA-Z]/g, "")), i4 = e4.match(/([^\-0-9\.]+)/g), a3 = "";
return null != i4 && i4.length > 0 && (a3 = i4.join()), isNaN(n2) || 0 == n2 ? e4 : (n2 *= t4) + a3;
}
return t3.get_nextId = function() {
return e3;
}, t3.prototype.$getElt = function(e4, t4) {
return null == this.$elt ? null : (void 0 !== this.$Elts[e4] && 1 == !t4 || (this.$Elts[e4] = ".nGY2GThumbnail" == e4 ? this.$elt : this.$elt.find(e4)), this.$Elts[e4]);
}, t3.prototype.removeElt = function(e4) {
if (null != this.$elt && null != this.$Elts[e4]) {
this.$Elts[e4].remove();
var t4 = this.$Elts.indexOf(e4);
this.$Elts.splice(t4, 1);
}
}, t3.prototype.album = function() {
return this.G.I[t3.GetIdx(this.G, this.albumID)];
}, t3.prototype.mediaTransition = function() {
return this.G.O.viewerTransitionMediaKind.indexOf(this.mediaKind) > -1;
}, t3.prototype.imageSet = function(e4, t4, n2) {
this.src = e4, this.width = t4, this.height = n2;
}, t3.prototype.thumbSet = function(e4, t4, n2, i4, a3) {
var o3 = ["xs", "sm", "me", "la", "xl"];
if (void 0 === i4 || "" == i4 || null == i4) for (var r2 = 0; r2 < o3.length; r2++) void 0 === a3 || "" == a3 ? (this.thumbs.url.l1[o3[r2]] = e4, this.thumbs.height.l1[o3[r2]] = n2, this.thumbs.width.l1[o3[r2]] = t4, this.thumbs.url.lN[o3[r2]] = e4, this.thumbs.height.lN[o3[r2]] = n2, this.thumbs.width.lN[o3[r2]] = t4) : (this.thumbs.url[a3][o3[r2]] = e4, this.thumbs.height[a3][o3[r2]] = n2, this.thumbs.width[a3][o3[r2]] = t4);
else void 0 === a3 || "" == a3 || null == a3 ? (this.thumbs.url.l1[i4] = e4, this.thumbs.height.l1[i4] = n2, this.thumbs.width.l1[i4] = t4, this.thumbs.url.lN[i4] = e4, this.thumbs.height.lN[i4] = n2, this.thumbs.width.lN[i4] = t4) : (this.thumbs.url[a3][i4] = e4, this.thumbs.height[a3][i4] = n2, this.thumbs.width[a3][i4] = t4);
for (r2 = 0; r2 < o3.length; r2++) this.thumbs.height.l1[o3[r2]] = n2;
for (r2 = 0; r2 < o3.length; r2++) this.G.tn.settings.height.lN[o3[r2]] == this.G.tn.settings.getH() && this.G.tn.settings.width.l1[o3[r2]] == this.G.tn.settings.getW() && (this.thumbs.height.lN[o3[r2]] = n2);
}, t3.prototype.thumbSetImgHeight = function(e4) {
for (var t4 = ["xs", "sm", "me", "la", "xl"], n2 = 0; n2 < t4.length; n2++) this.G.tn.settings.height.l1[t4[n2]] == this.G.tn.settings.getH() && this.G.tn.settings.width.l1[t4[n2]] == this.G.tn.settings.getW() && (this.thumbs.height.l1[t4[n2]] = e4);
for (n2 = 0; n2 < t4.length; n2++) this.G.tn.settings.height.lN[t4[n2]] == this.G.tn.settings.getH() && this.G.tn.settings.width.l1[t4[n2]] == this.G.tn.settings.getW() && (this.thumbs.height.lN[t4[n2]] = e4);
}, t3.prototype.thumbSetImgWidth = function(e4) {
for (var t4 = ["xs", "sm", "me", "la", "xl"], n2 = 0; n2 < t4.length; n2++) this.G.tn.settings.height.l1[t4[n2]] == this.G.tn.settings.getH() && this.G.tn.settings.width.l1[t4[n2]] == this.G.tn.settings.getW() && (this.thumbs.width.l1[t4[n2]] = e4);
for (n2 = 0; n2 < t4.length; n2++) this.G.tn.settings.height.lN[t4[n2]] == this.G.tn.settings.getH() && this.G.tn.settings.width.l1[t4[n2]] == this.G.tn.settings.getW() && (this.thumbs.width.lN[t4[n2]] = e4);
}, t3.prototype.thumbImg = function() {
var e4 = { src: "", width: 0, height: 0 };
return "image gallery by nanogallery2 [build]" == this.title ? (e4.src = this.G.emptyGif, e4.url = this.G.emptyGif, e4) : (e4.src = this.thumbs.url[this.G.GOM.curNavLevel][this.G.GOM.curWidth], e4.width = this.thumbs.width[this.G.GOM.curNavLevel][this.G.GOM.curWidth], e4.height = this.thumbs.height[this.G.GOM.curNavLevel][this.G.GOM.curWidth], e4);
}, t3.prototype.setTags = function(e4) {
if (e4.length > 0) {
this.tags = e4;
for (var t4 = this.album().albumTagList, n2 = 0; n2 < e4.length; n2++) {
for (var i4 = false, a3 = 0; a3 < t4.length; a3++) e4[n2].toUpperCase() == t4[a3].toUpperCase() && (i4 = true);
0 == i4 && this.album().albumTagList.push(e4[n2]);
}
}
}, t3.prototype.checkTagFilter = function() {
if (0 != this.G.galleryFilterTags.Get() && this.album().albumTagList.length > 0) {
if (this.G.O.thumbnailLevelUp && "albumUp" == this.kind) return true;
var e4 = false, t4 = this.album().albumTagListSel;
if (0 == t4.length) return true;
for (var n2 = 0; n2 < this.tags.length; n2++) for (var i4 = 0; i4 < t4.length; i4++) if (this.tags[n2].toUpperCase() == t4[i4].toUpperCase()) {
e4 = true;
break;
}
return e4;
}
return true;
}, t3.prototype.isSearchTagFound = function() {
if ("" == this.G.GOM.albumSearchTags) return true;
if (this.G.O.thumbnailLevelUp && "albumUp" == this.kind) return true;
for (var e4 = 0; e4 < this.tags.length; e4++) if (this.tags[e4].toUpperCase().indexOf(this.G.GOM.albumSearchTags) >= 0) return true;
return false;
}, t3.prototype.setMediaURL = function(e4, t4) {
this.src = e4, this.mediaKind = t4, "img" == t4 && (this.mediaMarkup = '<img class="nGY2ViewerMedia" src="' + e4 + '" alt=" " itemprop="contentURL" draggable="false">');
}, t3.prototype.isToDisplay = function(e4) {
return this.albumID == e4 && this.checkTagFilter() && this.isSearchFound() && this.isSearchTagFound() && 0 == this.deleted;
}, t3.prototype.getContentLength = function(e4) {
if (0 == e4 || 0 == this.albumTagList.length || 0 == this.G.galleryFilterTags.Get()) return this.contentLength;
for (var t4 = this.G.I.length, n2 = 0, i4 = this.GetID(), a3 = 0; a3 < t4; a3++) {
this.G.I[a3].isToDisplay(i4) && n2++;
}
return n2;
}, t3.prototype.isSearchFound = function() {
return "" == this.G.GOM.albumSearch || -1 != this.title.toUpperCase().indexOf(this.G.GOM.albumSearch);
}, t3.prototype.responsiveURL = function() {
var e4 = "";
switch (this.G.O.kind) {
case "":
case "flickr":
e4 = this.src;
break;
case "picasa":
case "google":
case "google2":
default:
e4 = this.src;
}
return e4;
}, t3.prototype.ThumbnailImageReveal = function() {
0 == this.thumbnailImgRevealed && (this.thumbnailImgRevealed = true, new NGTweenable().tween({ from: { opacity: 0 }, to: { opacity: 1 }, attachment: { item: this }, delay: 30, duration: 400, easing: "easeOutQuart", step: function(e4, t4) {
var n2 = t4.item.$getElt(".nGY2TnImg");
null != n2 && n2.css(e4);
} }));
}, t3.prototype.CSSTransformApply = function(e4) {
var t4 = this.eltTransform[e4];
if (".nGY2GThumbnail" == e4) for (var n2 = t4.$elt.length - 1, i4 = 1, a3 = 1, r2 = 1, l2 = 1, s2 = 1, u = 1, c = 1, h = n2; h >= 0; h--) {
var d = "translateX(" + o2(t4.translateX, i4) + ") translateY(" + o2(t4.translateY, a3) + ") translateZ(" + o2(t4.translateZ, r2) + ") scale(" + o2(t4.scale, c) + ") translate(" + o2(t4.translate, 1) + ")";
this.G.IE <= 9 || this.G.isGingerbread ? d += " rotate(" + o2(t4.rotateZ, u) + ")" : d += " rotateX(" + o2(t4.rotateX, l2) + ") rotateY(" + o2(t4.rotateY, s2) + ") rotateZ(" + o2(t4.rotateZ, u) + ") rotate(" + o2(t4.rotate, 1) + ")", t4.$elt[h].style[this.G.CSStransformName] = d, n2 > 0 && (i4 -= this.G.tn.opt.Get("stacksTranslateX"), a3 -= this.G.tn.opt.Get("stacksTranslateY"), r2 -= this.G.tn.opt.Get("stacksTranslateZ"), l2 -= this.G.tn.opt.Get("stacksRotateX"), s2 -= this.G.tn.opt.Get("stacksRotateY"), u -= this.G.tn.opt.Get("stacksRotateZ"), c -= this.G.tn.opt.Get("stacksScale"));
}
else if (null != t4.$elt) {
for (h = 0; h < t4.$elt.length; h++) if (null != t4.$elt[h]) {
d = "translateX(" + t4.translateX + ") translateY(" + t4.translateY + ") translateZ(" + t4.translateZ + ") scale(" + t4.scale + ") translate(" + t4.translate + ")";
this.G.IE <= 9 || this.G.isGingerbread ? d += " rotate(" + t4.rotateZ + ")" : d += " rotateX(" + t4.rotateX + ") rotateY(" + t4.rotateY + ") rotateZ(" + t4.rotateZ + ") rotate(" + t4.rotate + ")", t4.$elt[h].style[this.G.CSStransformName] = d;
}
}
}, t3.prototype.CSSTransformSet = function(e4, t4, n2, i4) {
null == this.eltTransform[e4] && (this.eltTransform[e4] = { translateX: 0, translateY: 0, translateZ: 0, rotateX: 0, rotateY: 0, rotateZ: 0, scale: 1, translate: "0px,0px", rotate: 0 }, this.eltTransform[e4].$elt = this.$getElt(e4)), this.eltTransform[e4][t4] = n2, true === i4 && (this.eltTransform[e4].$elt = this.$getElt(e4, true));
}, t3.prototype.CSSFilterApply = function(e4) {
var t4 = this.eltFilter[e4], n2 = "blur(" + t4.blur + ") brightness(" + t4.brightness + ") grayscale(" + t4.grayscale + ") sepia(" + t4.sepia + ") contrast(" + t4.contrast + ") opacity(" + t4.opacity + ") saturate(" + t4.saturate + ")";
if (null != t4.$elt) for (var i4 = 0; i4 < t4.$elt.length; i4++) null != t4.$elt[i4] && (t4.$elt[i4].style.WebkitFilter = n2, t4.$elt[i4].style.filter = n2);
}, t3.prototype.CSSFilterSet = function(e4, t4, n2, i4) {
null == this.eltFilter[e4] && (this.eltFilter[e4] = { blur: 0, brightness: "100%", grayscale: "0%", sepia: "0%", contrast: "100%", opacity: "100%", saturate: "100%" }, this.eltFilter[e4].$elt = this.$getElt(e4)), this.eltFilter[e4][t4] = n2, true === i4 && (this.eltTransform[e4].$elt = this.$getElt(e4, true));
}, t3.prototype.animate = function(e4, t4, i4) {
if (null != this.$getElt()) {
var a3 = {};
a3.G = this.G, a3.item = this, a3.effect = e4, a3.hoverIn = i4, a3.cssKind = "", i4 ? (null == this.eltEffect[e4.element] && (this.eltEffect[e4.element] = []), null == this.eltEffect[e4.element][e4.type] && (this.eltEffect[e4.element][e4.type] = { initialValue: 0, lastValue: 0 }), e4.firstKeyframe && (this.eltEffect[e4.element][e4.type] = { initialValue: e4.from, lastValue: e4.from }), a3.animeFrom = e4.from, a3.animeTo = e4.to, a3.animeDuration = parseInt(e4.duration), a3.animeDelay = 30 + parseInt(e4.delay + t4), a3.animeEasing = e4.easing) : (a3.animeFrom = this.eltEffect[e4.element][e4.type].lastValue, a3.animeTo = this.eltEffect[e4.element][e4.type].initialValue, a3.animeDuration = parseInt(e4.durationBack), a3.animeDelay = 30 + parseInt(e4.delayBack + t4), a3.animeEasing = e4.easingBack);
for (var o3 = ["translateX", "translateY", "translateZ", "scale", "rotateX", "rotateY", "rotateZ"], r2 = 0; r2 < o3.length; r2++) if (e4.type == o3[r2]) {
a3.cssKind = "transform";
break;
}
var l2 = ["blur", "brightness", "grayscale", "sepia", "contrast", "opacity", "saturate"];
for (r2 = 0; r2 < l2.length; r2++) if (e4.type == l2[r2]) {
a3.cssKind = "filter";
break;
}
!i4 || ".nGY2GThumbnail" != e4.element || "scale" != e4.type && "rotateX" != e4.type || (this.G.GOM.lastZIndex++, this.$getElt(e4.element).css("z-index", this.G.GOM.lastZIndex));
var s2 = new NGTweenable();
a3.tweenable = s2, s2.tween({ attachment: a3, from: { v: a3.animeFrom }, to: { v: a3.animeTo }, duration: a3.animeDuration, delay: a3.animeDelay, easing: a3.animeEasing, step: function(e5, t5) {
if (null != t5.item.$getElt()) if (!t5.hoverIn || t5.item.hovered) {
if (t5.G.VOM.viewerDisplayed) t5.tweenable.stop(false);
else if (e5.v != t5.animeFrom) {
switch (t5.cssKind) {
case "transform":
t5.item.CSSTransformSet(t5.effect.element, t5.effect.type, e5.v), t5.item.CSSTransformApply(t5.effect.element);
break;
case "filter":
t5.item.CSSFilterSet(t5.effect.element, t5.effect.type, e5.v), t5.item.CSSFilterApply(t5.effect.element);
break;
default:
var a4 = e5.v;
"rgb(" != e5.v.substring(0, 4) && "rgba(" != e5.v.substring(0, 5) || (a4 = n(0, a4)), t5.item.$getElt(t5.effect.element).css(t5.effect.type, a4);
}
i4 && (t5.item.eltEffect[t5.effect.element][t5.effect.type].lastValue = e5.v);
}
} else t5.tweenable.stop(false);
else t5.tweenable.stop(false);
}, finish: function(e5, t5) {
if (i4 && (t5.item.eltEffect[t5.effect.element][t5.effect.type].lastValue = e5.v), null != t5.item.$getElt() && (!t5.hoverIn || t5.item.hovered) && !t5.G.VOM.viewerDisplayed) switch (t5.cssKind) {
case "transform":
t5.item.CSSTransformSet(t5.effect.element, t5.effect.type, t5.animeTo), t5.item.CSSTransformApply(t5.effect.element);
break;
case "filter":
t5.item.CSSFilterSet(t5.effect.element, t5.effect.type, t5.animeTo), t5.item.CSSFilterApply(t5.effect.element);
break;
default:
t5.item.$getElt(t5.effect.element).css(t5.effect.type, t5.animeTo);
}
} });
}
}, t3;
}()), i2.options = jQuery.extend(true, {}, jQuery.nanogallery2.defaultOptions, t2), i2.nG2 = null, i2.nG2 = new l(), i2.nG2.initiateGallery2(i2.e, i2.options);
}, i2.test = function() {
}, i2.init();
}, jQuery.nanogallery2.defaultOptions = { kind: "", userID: "", photoset: "", album: "", blockList: "scrapbook|profil|auto backup", tagBlockList: "", allowList: "", albumList: "", albumList2: null, RTL: false, flickrSkipOriginal: true, flickrAPIKey: "", breadcrumbAutoHideTopLevel: true, displayBreadcrumb: true, breadcrumbOnlyCurrentLevel: true, breadcrumbHideIcons: true, theme: "nGY2", galleryTheme: "dark", viewerTheme: "dark", items: null, itemsBaseURL: "", thumbnailSelectable: false, dataProvider: "", allowHTMLinData: false, locationHash: true, slideshowDelay: 3e3, slideshowAutoStart: false, debugMode: false, titleTranslationMap: null, galleryDisplayMoreStep: 2, galleryDisplayMode: "fullContent", galleryL1DisplayMode: null, galleryPaginationMode: "rectangles", galleryPaginationTopButtons: true, galleryMaxRows: 2, galleryL1MaxRows: null, galleryLastRowFull: false, galleryL1LastRowFull: null, galleryLayoutEngine: "default", paginationSwipe: true, paginationVisiblePages: 10, galleryFilterTags: false, galleryL1FilterTags: null, galleryFilterTagsMode: "single", galleryL1FilterTagsMode: null, galleryMaxItems: 0, galleryL1MaxItems: null, gallerySorting: "", galleryL1Sorting: null, galleryDisplayTransition: "none", galleryL1DisplayTransition: null, galleryDisplayTransitionDuration: 1e3, galleryL1DisplayTransitionDuration: null, galleryResizeAnimation: false, galleryRenderDelay: 10, thumbnailCrop: true, thumbnailL1Crop: null, thumbnailCropScaleFactor: 1.5, thumbnailLevelUp: false, thumbnailAlignment: "fillWidth", thumbnailWidth: 300, thumbnailL1Width: null, thumbnailHeight: 200, thumbnailL1Height: null, thumbnailBaseGridHeight: 0, thumbnailL1BaseGridHeight: null, thumbnailGutterWidth: 2, thumbnailL1GutterWidth: null, thumbnailGutterHeight: 2, thumbnailL1GutterHeight: null, thumbnailBorderVertical: 2, thumbnailL1BorderVertical: null, thumbnailBorderHorizontal: 2, thumbnailL1BorderHorizontal: null, thumbnailFeaturedKeyword: "*featured", thumbnailAlbumDisplayImage: false, thumbnailHoverEffect2: "toolsAppear", thumbnailBuildInit2: "", thumbnailStacks: 0, thumbnailL1Stacks: null, thumbnailStacksTranslateX: 0, thumbnailL1StacksTranslateX: null, thumbnailStacksTranslateY: 0, thumbnailL1StacksTranslateY: null, thumbnailStacksTranslateZ: 0, thumbnailL1StacksTranslateZ: null, thumbnailStacksRotateX: 0, thumbnailL1StacksRotateX: null, thumbnailStacksRotateY: 0, thumbnailL1StacksRotateY: null, thumbnailStacksRotateZ: 0, thumbnailL1StacksRotateZ: null, thumbnailStacksScale: 0, thumbnailL1StacksScale: null, thumbnailDisplayOutsideScreen: true, thumbnailWaitImageLoaded: true, thumbnailSliderDelay: 2e3, galleryBuildInit2: "", portable: false, eventsDebounceDelay: 10, touchAnimation: false, touchAnimationL1: void 0, touchAutoOpenDelay: 0, thumbnailLabel: { position: "overImage", align: "center", valign: "bottom", display: true, displayDescription: false, titleMaxLength: 0, titleMultiLine: false, descriptionMaxLength: 0, descriptionMultiLine: false, hideIcons: true, title: "" }, thumbnailToolbarImage: { topLeft: "select", topRight: "featured" }, thumbnailToolbarAlbum: { topLeft: "select", topRight: "counter" }, thumbnailDisplayOrder: "", thumbnailL1DisplayOrder: null, thumbnailDisplayInterval: 15, thumbnailL1DisplayInterval: null, thumbnailDisplayTransition: "fadeIn", thumbnailL1DisplayTransition: null, thumbnailDisplayTransitionEasing: "easeOutQuart", thumbnailL1DisplayTransitionEasing: null, thumbnailDisplayTransitionDuration: 240, thumbnailL1DisplayTransitionDuration: null, thumbnailOpenInLightox: true, thumbnailOpenOriginal: false, lightboxStandalone: false, viewer: "internal", viewerFullscreen: false, imageTransition: "swipe2", viewerTransitionMediaKind: "img", viewerZoom: true, viewerImageDisplay: "", openOnStart: "", viewerHideToolsDelay: 4e3, viewerToolbar: { display: false, position: "bottom", fullWidth: false, align: "center", autoMinimize: 0, standard: "minimizeButton,label", minimized: "minimizeButton,label,infoButton,shareButton,fullscreenButton" }, viewerTools: { topLeft: "pageCounter,playPauseButton", topRight: "rotateLeft,ro
if (void 0 === jQuery(this).data("nanogallery2data")) {
if ("destroy" == t2) return;
return this.each(function() {
new jQuery.nanogallery2(this, t2);
});
}
var a2 = e(this).data("nanogallery2data").nG2;
if (void 0 === t2 || true !== t2.lightboxStandalone) {
switch (t2) {
case "displayItem":
a2.DisplayItem(n2);
break;
case "search":
return a2.Search(n2);
case "search2":
return a2.Search2(n2, i2);
case "search2Execute":
return a2.Search2Execute();
case "refresh":
a2.Refresh();
break;
case "resize":
a2.Resize();
break;
case "instance":
return a2;
case "data":
return a2.data = { items: a2.I, gallery: a2.GOM, lightbox: a2.VOM, shoppingcart: a2.shoppingCart }, a2.data;
case "reload":
return a2.ReloadAlbum(), e(this);
case "itemsSelectedGet":
return a2.ItemsSelectedGet();
case "itemsSetSelectedValue":
a2.ItemsSetSelectedValue(n2, i2);
break;
case "option":
if (void 0 === i2) return a2.Get(n2);
a2.Set(n2, i2), "demoViewportWidth" == n2 && e(window).trigger("resize");
break;
case "destroy":
a2.Destroy(), e(this).removeData("nanogallery2data");
break;
case "shoppingCartGet":
return a2.shoppingCart;
case "shoppingCartUpdate":
if (void 0 === i2 || void 0 === n2) return false;
for (var o2 = n2, r2 = i2, l2 = 0; l2 < a2.shoppingCart.length; l2++) if (a2.shoppingCart[l2].ID == o2) {
a2.shoppingCart[l2].qty = r2;
let e2 = a2.I[a2.shoppingCart[l2].idx];
a2.ThumbnailToolbarOneCartUpdate(e2), 0 == r2 && a2.shoppingCart.splice(l2, 1), null !== (u = a2.O.fnShoppingCartUpdated) && ("function" == typeof u ? u(a2.shoppingCart, e2, "api") : window[u](a2.shoppingCart, e2, "api"));
break;
}
return a2.shoppingCart;
case "shoppingCartRemove":
if (void 0 === n2) return false;
var s2 = n2;
for (l2 = 0; l2 < a2.shoppingCart.length; l2++) if (a2.shoppingCart[l2].ID == s2) {
var u, c = a2.I[a2.shoppingCart[l2].idx];
a2.shoppingCart[l2].qty = 0, a2.ThumbnailToolbarOneCartUpdate(c), a2.shoppingCart.splice(l2, 1), null !== (u = a2.O.fnShoppingCartUpdated) && ("function" == typeof u ? u(a2.shoppingCart, c, "api") : window[u](a2.shoppingCart, c, "api"));
break;
}
return a2.shoppingCart;
case "closeViewer":
a2.CloseViewer();
break;
case "minimizeToolbar":
a2.MinimizeToolbar();
break;
case "maximizeToolbar":
a2.MaximizeToolbar();
break;
case "paginationPreviousPage":
a2.PaginationPreviousPage();
break;
case "paginationNextPage":
a2.paginationNextPage();
break;
case "paginationGotoPage":
a2.PaginationGotoPage(n2);
break;
case "paginationCountPages":
a2.PaginationCountPages();
}
return e(this);
}
a2.LightboxReOpen();
}, function(e2, t2) {
e2.ngEvEmitter = function() {
function e3() {
}
var t3 = e3.prototype;
return t3.on = function(e4, t4) {
if (e4 && t4) {
var n2 = this._events = this._events || {}, i2 = n2[e4] = n2[e4] || [];
return -1 == i2.indexOf(t4) && i2.push(t4), this;
}
}, t3.once = function(e4, t4) {
if (e4 && t4) {
this.on(e4, t4);
var n2 = this._onceEvents = this._onceEvents || {};
return (n2[e4] = n2[e4] || {})[t4] = true, this;
}
}, t3.off = function(e4, t4) {
var n2 = this._events && this._events[e4];
if (n2 && n2.length) {
var i2 = n2.indexOf(t4);
return -1 != i2 && n2.splice(i2, 1), this;
}
}, t3.emitEvent = function(e4, t4) {
var n2 = this._events && this._events[e4];
if (n2 && n2.length) {
var i2 = 0, a2 = n2[i2];
t4 = t4 || [];
for (var o2 = this._onceEvents && this._onceEvents[e4]; a2; ) {
var r2 = o2 && o2[a2];
r2 && (this.off(e4, a2), delete o2[a2]), a2.apply(this, t4), a2 = n2[i2 += r2 ? 0 : 1];
}
return this;
}
}, e3;
}();
}("undefined" != typeof window ? window : this), /*!
* ngimagesLoaded v4.1.1
* JavaScript is all like "You images are done yet or what?"
* MIT License
*/
function(e2, t2) {
e2.ngimagesLoaded = function(e3, t3) {
var n2 = jQuery, i2 = e3.console;
function a2(e4, t4) {
for (var n3 in t4) e4[n3] = t4[n3];
return e4;
}
function o2(e4, t4, i3) {
if (!(this instanceof o2)) return new o2(e4, t4, i3);
"string" == typeof e4 && (e4 = document.querySelectorAll(e4)), this.elements = function(e5) {
var t5 = [];
if (Array.isArray(e5)) t5 = e5;
else if ("number" == typeof e5.length) for (var n3 = 0; n3 < e5.length; n3++) t5.push(e5[n3]);
else t5.push(e5);
return t5;
}(e4), this.options = a2({}, this.options), "function" == typeof t4 ? i3 = t4 : a2(this.options, t4), i3 && this.on("always", i3), this.getImages(), n2 && (this.jqDeferred = new n2.Deferred()), setTimeout((function() {
this.check();
}).bind(this));
}
o2.prototype = Object.create(t3.prototype), o2.prototype.options = {}, o2.prototype.getImages = function() {
this.images = [], this.elements.forEach(this.addElementImages, this);
}, o2.prototype.addElementImages = function(e4) {
"IMG" == e4.nodeName && this.addImage(e4), true === this.options.background && this.addElementBackgroundImages(e4);
var t4 = e4.nodeType;
if (t4 && r2[t4]) {
for (var n3 = e4.querySelectorAll("img"), i3 = 0; i3 < n3.length; i3++) {
var a3 = n3[i3];
this.addImage(a3);
}
if ("string" == typeof this.options.background) {
var o3 = e4.querySelectorAll(this.options.background);
for (i3 = 0; i3 < o3.length; i3++) {
var l3 = o3[i3];
this.addElementBackgroundImages(l3);
}
}
}
};
var r2 = { 1: true, 9: true, 11: true };
function l2(e4) {
this.img = e4;
}
function s2(e4, t4) {
this.url = e4, this.element = t4, this.img = new Image();
}
return o2.prototype.addElementBackgroundImages = function(e4) {
var t4 = getComputedStyle(e4);
if (t4) for (var n3 = /url\((['"])?(.*?)\1\)/gi, i3 = n3.exec(t4.backgroundImage); null !== i3; ) {
var a3 = i3 && i3[2];
a3 && this.addBackground(a3, e4), i3 = n3.exec(t4.backgroundImage);
}
}, o2.prototype.addImage = function(e4) {
var t4 = new l2(e4);
this.images.push(t4);
}, o2.prototype.addBackground = function(e4, t4) {
var n3 = new s2(e4, t4);
this.images.push(n3);
}, o2.prototype.check = function() {
var e4 = this;
function t4(t5, n3, i3) {
setTimeout(function() {
e4.progress(t5, n3, i3);
});
}
this.progressedCount = 0, this.hasAnyBroken = false, this.images.length ? this.images.forEach(function(e5) {
e5.once("progress", t4), e5.check();
}) : this.complete();
}, o2.prototype.progress = function(e4, t4, n3) {
this.progressedCount++, this.hasAnyBroken = this.hasAnyBroken || !e4.isLoaded, this.emitEvent("progress", [this, e4, t4]), this.jqDeferred && this.jqDeferred.notify && this.jqDeferred.notify(this, e4), this.progressedCount == this.images.length && this.complete(), this.options.debug && i2 && i2.log("progress: " + n3, e4, t4);
}, o2.prototype.complete = function() {
var e4 = this.hasAnyBroken ? "fail" : "done";
if (this.isComplete = true, this.emitEvent(e4, [this]), this.emitEvent("always", [this]), this.jqDeferred) {
var t4 = this.hasAnyBroken ? "reject" : "resolve";
this.jqDeferred[t4](this);
}
}, l2.prototype = Object.create(t3.prototype), l2.prototype.check = function() {
this.getIsImageComplete() ? this.confirm(0 !== this.img.naturalWidth, "naturalWidth") : (this.proxyImage = new Image(), this.proxyImage.addEventListener("load", this), this.proxyImage.addEventListener("error", this), this.img.addEventListener("load", this), this.img.addEventListener("error", this), this.proxyImage.src = this.img.src);
}, l2.prototype.getIsImageComplete = function() {
return this.img.complete && void 0 !== this.img.naturalWidth;
}, l2.prototype.confirm = function(e4, t4) {
this.isLoaded = e4, this.emitEvent("progress", [this, this.img, t4]);
}, l2.prototype.handleEvent = function(e4) {
var t4 = "on" + e4.type;
this[t4] && this[t4](e4);
}, l2.prototype.onload = function() {
this.confirm(true, "onload"), this.unbindEvents();
}, l2.prototype.onerror = function() {
this.confirm(false, "onerror"), this.unbindEvents();
}, l2.prototype.unbindEvents = function() {
this.proxyImage.removeEventListener("load", this), this.proxyImage.removeEventListener("error", this), this.img.removeEventListener("load", this), this.img.removeEventListener("error", this);
}, s2.prototype = Object.create(l2.prototype), s2.prototype.check = function() {
this.img.addEventListener("load", this), this.img.addEventListener("error", this), this.img.src = this.url, this.getIsImageComplete() && (this.confirm(0 !== this.img.naturalWidth, "naturalWidth"), this.unbindEvents());
}, s2.prototype.unbindEvents = function() {
this.img.removeEventListener("load", this), this.img.removeEventListener("error", this);
}, s2.prototype.confirm = function(e4, t4) {
this.isLoaded = e4, this.emitEvent("progress", [this, this.element, t4]);
}, o2.makeJQueryPlugin = function(t4) {
(t4 = t4 || e3.jQuery) && ((n2 = t4).fn.ngimagesLoaded = function(e4, t5) {
return new o2(this, e4, t5).jqDeferred.promise(n2(this));
});
}, o2.makeJQueryPlugin(), o2;
}(e2, e2.ngEvEmitter);
}(window), function() {
var e2 = "undefined" != typeof window && void 0 !== window.document ? window.document : {}, t2 = module.exports, n2 = "undefined" != typeof Element && "ALLOW_KEYBOARD_INPUT" in Element, i2 = function() {
for (var t3, n3 = [["requestFullscreen", "exitFullscreen", "fullscreenElement", "fullscreenEnabled", "fullscreenchange", "fullscreenerror"], ["webkitRequestFullscreen", "webkitExitFullscreen", "webkitFullscreenElement", "webkitFullscreenEnabled", "webkitfullscreenchange", "webkitfullscreenerror"], ["webkitRequestFullScreen", "webkitCancelFullScreen", "webkitCurrentFullScreenElement", "webkitCancelFullScreen", "webkitfullscreenchange", "webkitfullscreenerror"], ["mozRequestFullScreen", "mozCancelFullScreen", "mozFullScreenElement", "mozFullScreenEnabled", "mozfullscreenchange", "mozfullscreenerror"], ["msRequestFullscreen", "msExitFullscreen", "msFullscreenElement", "msFullscreenEnabled", "MSFullscreenChange", "MSFullscreenError"]], i3 = 0, a3 = n3.length, o3 = {}; i3 < a3; i3++) if ((t3 = n3[i3]) && t3[1] in e2) {
for (i3 = 0; i3 < t3.length; i3++) o3[n3[0][i3]] = t3[i3];
return o3;
}
return false;
}(), a2 = { change: i2.fullscreenchange, error: i2.fullscreenerror }, o2 = { request: function(t3) {
return new Promise((function(a3) {
var o3 = i2.requestFullscreen, r2 = (function() {
this.off("change", r2), a3();
}).bind(this);
t3 = t3 || e2.documentElement, / Version\/5\.1(?:\.\d+)? Safari\//.test(navigator.userAgent) ? t3[o3]() : t3[o3](n2 ? Element.ALLOW_KEYBOARD_INPUT : {}), this.on("change", r2);
}).bind(this));
}, exit: function() {
return new Promise((function(t3) {
if (this.isFullscreen) {
var n3 = (function() {
this.off("change", n3), t3();
}).bind(this);
e2[i2.exitFullscreen](), this.on("change", n3);
} else t3();
}).bind(this));
}, toggle: function(e3) {
return this.isFullscreen ? this.exit() : this.request(e3);
}, onchange: function(e3) {
this.on("change", e3);
}, onerror: function(e3) {
this.on("error", e3);
}, on: function(t3, n3) {
var i3 = a2[t3];
i3 && e2.addEventListener(i3, n3, false);
}, off: function(t3, n3) {
var i3 = a2[t3];
i3 && e2.removeEventListener(i3, n3, false);
}, raw: i2 };
i2 ? (Object.defineProperties(o2, { isFullscreen: { get: function() {
return Boolean(e2[i2.fullscreenElement]);
} }, element: { enumerable: true, get: function() {
return e2[i2.fullscreenElement];
} }, enabled: { enumerable: true, get: function() {
return Boolean(e2[i2.fullscreenEnabled]);
} } }), t2 ? module.exports = o2 : window.ngscreenfull = o2) : t2 ? module.exports = false : window.ngscreenfull = false;
}(), (function() {
const e2 = "undefined" != typeof window ? window : commonjsGlobal;
var t2, n2 = function() {
var t3, n3, i2, a2, o2, r2, l2 = Date.now ? Date.now : function() {
return +/* @__PURE__ */ new Date();
}, s2 = "undefined" != typeof SHIFTY_DEBUG_NOW ? SHIFTY_DEBUG_NOW : l2;
function u() {
}
function c(e3, t4) {
var n4;
for (n4 in e3) Object.hasOwnProperty.call(e3, n4) && t4(n4);
}
function h(e3, t4) {
return c(t4, function(n4) {
e3[n4] = t4[n4];
}), e3;
}
function d(e3, t4) {
c(t4, function(n4) {
void 0 === e3[n4] && (e3[n4] = t4[n4]);
});
}
function m(e3, n4, i3, a3, o3, r3, l3) {
var s3, u2, c2, h2 = e3 < r3 ? 0 : (e3 - r3) / o3;
for (s3 in n4) n4.hasOwnProperty(s3) && (c2 = "function" == typeof (u2 = l3[s3]) ? u2 : t3[u2], n4[s3] = p(i3[s3], a3[s3], c2, h2));
return n4;
}
function p(e3, t4, n4, i3) {
return e3 + (t4 - e3) * n4(i3);
}
function g(e3, t4) {
var n4 = v.prototype.filter, i3 = e3._filterArgs;
c(n4, function(a3) {
void 0 !== n4[a3][t4] && n4[a3][t4].apply(e3, i3);
});
}
function f(e3, t4, n4, l3, u2, c2, h2, d2, p2, f2, b2) {
i2 = t4 + n4 + l3, a2 = Math.min(b2 || s2(), i2), o2 = a2 >= i2, r2 = l3 - (i2 - a2), e3.isPlaying() && (o2 ? (p2(h2, e3._attachment, r2), e3.stop(true)) : (e3._scheduleId = f2(e3._timeoutHandler, 1e3 / 60), g(e3, "beforeTween"), a2 < t4 + n4 ? m(1, u2, c2, h2, 1, 1, d2) : m(a2, u2, c2, h2, l3, t4 + n4, d2), g(e3, "afterTween"), p2(u2, e3._attachment, r2)));
}
function b(e3, t4) {
var n4 = {}, i3 = typeof t4;
return c(e3, "string" === i3 || "function" === i3 ? function(e4) {
n4[e4] = t4;
} : function(e4) {
n4[e4] || (n4[e4] = t4[e4] || "linear");
}), n4;
}
function v(e3, t4) {
this._currentState = e3 || {}, this._configured = false, this._scheduleFunction = n3, void 0 !== t4 && this.setConfig(t4);
}
return n3 = "undefined" != typeof window && (window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || window.mozCancelRequestAnimationFrame && window.mozRequestAnimationFrame) || setTimeout, v.prototype.tween = function(e3) {
return this._isTweening ? this : (void 0 === e3 && this._configured || this.setConfig(e3), this._timestamp = s2(), this._start(this.get(), this._attachment), this.resume());
}, v.prototype.setConfig = function(e3) {
e3 = e3 || {}, this._configured = true, this._attachment = e3.attachment, this._pausedAtTime = null, this._scheduleId = null, this._delay = e3.delay || 0, this._start = e3.start || u, this._step = e3.step || u, this._finish = e3.finish || u, this._duration = e3.duration || 500, this._currentState = h({}, e3.from || this.get()), this._originalState = this.get(), this._targetState = h({}, e3.to || this.get());
var t4 = this;
this._timeoutHandler = function() {
f(t4, t4._timestamp, t4._delay, t4._duration, t4._currentState, t4._originalState, t4._targetState, t4._easing, t4._step, t4._scheduleFunction);
};
var n4 = this._currentState, i3 = this._targetState;
return d(i3, n4), this._easing = b(n4, e3.easing || "linear"), this._filterArgs = [n4, this._originalState, i3, this._easing], g(this, "tweenCreated"), this;
}, v.prototype.get = function() {
return h({}, this._currentState);
}, v.prototype.set = function(e3) {
this._currentState = e3;
}, v.prototype.pause = function() {
return this._pausedAtTime = s2(), this._isPaused = true, this;
}, v.prototype.resume = function() {
return this._isPaused && (this._timestamp += s2() - this._pausedAtTime), this._isPaused = false, this._isTweening = true, this._timeoutHandler(), this;
}, v.prototype.seek = function(e3) {
e3 = Math.max(e3, 0);
var t4 = s2();
return this._timestamp + e3 === 0 || (this._timestamp = t4 - e3, this.isPlaying() || (this._isTweening = true, this._isPaused = false, f(this, this._timestamp, this._delay, this._duration, this._currentState, this._originalState, this._targetState, this._easing, this._step, this._scheduleFunction, t4), this.pause())), this;
}, v.prototype.stop = function(t4) {
return this._isTweening = false, this._isPaused = false, this._timeoutHandler = u, (e2.cancelAnimationFrame || e2.webkitCancelAnimationFrame || e2.oCancelAnimationFrame || e2.msCancelAnimationFrame || e2.mozCancelRequestAnimationFrame || e2.clearTimeout)(this._scheduleId), t4 && (g(this, "beforeTween"), m(1, this._currentState, this._originalState, this._targetState, 1, 0, this._easing), g(this, "afterTween"), g(this, "afterTweenEnd"), this._finish.call(this, this._currentState, this._attachment)), this;
}, v.prototype.isPlaying = function() {
return this._isTweening && !this._isPaused;
}, v.prototype.setScheduleFunction = function(e3) {
this._scheduleFunction = e3;
}, v.prototype.dispose = function() {
var e3;
for (e3 in this) this.hasOwnProperty(e3) && delete this[e3];
}, v.prototype.filter = {}, v.prototype.formula = { linear: function(e3) {
return e3;
} }, t3 = v.prototype.formula, h(v, { now: s2, each: c, tweenProps: m, tweenProp: p, applyFilter: g, shallowCopy: h, defaults: d, composeEasingObject: b }), "function" == typeof SHIFTY_DEBUG_NOW && (e2.timeoutHandler = f), module.exports = v, v;
}();
/*!
* All equations are adapted from Thomas Fuchs'
* [Scripty2](https://github.com/madrobby/scripty2/blob/master/src/effects/transitions/penner.js).
*
* Based on Easing Equations (c) 2003 [Robert
* Penner](http://www.robertpenner.com/), all rights reserved. This work is
* [subject to terms](http://www.robertpenner.com/easing_terms_of_use.html).
*/
/*!
* TERMS OF USE - EASING EQUATIONS
* Open source under the BSD License.
* Easing Equations (c) 2003 Robert Penner, all rights reserved.
*/
n2.shallowCopy(n2.prototype.formula, { easeInQuad: function(e3) {
return Math.pow(e3, 2);
}, easeOutQuad: function(e3) {
return -(Math.pow(e3 - 1, 2) - 1);
}, easeInOutQuad: function(e3) {
return (e3 /= 0.5) < 1 ? 0.5 * Math.pow(e3, 2) : -0.5 * ((e3 -= 2) * e3 - 2);
}, easeInCubic: function(e3) {
return Math.pow(e3, 3);
}, easeOutCubic: function(e3) {
return Math.pow(e3 - 1, 3) + 1;
}, easeInOutCubic: function(e3) {
return (e3 /= 0.5) < 1 ? 0.5 * Math.pow(e3, 3) : 0.5 * (Math.pow(e3 - 2, 3) + 2);
}, easeInQuart: function(e3) {
return Math.pow(e3, 4);
}, easeOutQuart: function(e3) {
return -(Math.pow(e3 - 1, 4) - 1);
}, easeInOutQuart: function(e3) {
return (e3 /= 0.5) < 1 ? 0.5 * Math.pow(e3, 4) : -0.5 * ((e3 -= 2) * Math.pow(e3, 3) - 2);
}, easeInQuint: function(e3) {
return Math.pow(e3, 5);
}, easeOutQuint: function(e3) {
return Math.pow(e3 - 1, 5) + 1;
}, easeInOutQuint: function(e3) {
return (e3 /= 0.5) < 1 ? 0.5 * Math.pow(e3, 5) : 0.5 * (Math.pow(e3 - 2, 5) + 2);
}, easeInSine: function(e3) {
return 1 - Math.cos(e3 * (Math.PI / 2));
}, easeOutSine: function(e3) {
return Math.sin(e3 * (Math.PI / 2));
}, easeInOutSine: function(e3) {
return -0.5 * (Math.cos(Math.PI * e3) - 1);
}, easeInExpo: function(e3) {
return 0 === e3 ? 0 : Math.pow(2, 10 * (e3 - 1));
}, easeOutExpo: function(e3) {
return 1 === e3 ? 1 : 1 - Math.pow(2, -10 * e3);
}, easeInOutExpo: function(e3) {
return 0 === e3 ? 0 : 1 === e3 ? 1 : (e3 /= 0.5) < 1 ? 0.5 * Math.pow(2, 10 * (e3 - 1)) : 0.5 * (2 - Math.pow(2, -10 * --e3));
}, easeInCirc: function(e3) {
return -(Math.sqrt(1 - e3 * e3) - 1);
}, easeOutCirc: function(e3) {
return Math.sqrt(1 - Math.pow(e3 - 1, 2));
}, easeInOutCirc: function(e3) {
return (e3 /= 0.5) < 1 ? -0.5 * (Math.sqrt(1 - e3 * e3) - 1) : 0.5 * (Math.sqrt(1 - (e3 -= 2) * e3) + 1);
}, easeOutBounce: function(e3) {
return e3 < 1 / 2.75 ? 7.5625 * e3 * e3 : e3 < 2 / 2.75 ? 7.5625 * (e3 -= 1.5 / 2.75) * e3 + 0.75 : e3 < 2.5 / 2.75 ? 7.5625 * (e3 -= 2.25 / 2.75) * e3 + 0.9375 : 7.5625 * (e3 -= 2.625 / 2.75) * e3 + 0.984375;
}, easeInBack: function(e3) {
var t3 = 1.70158;
return e3 * e3 * ((t3 + 1) * e3 - t3);
}, easeOutBack: function(e3) {
var t3 = 1.70158;
return (e3 -= 1) * e3 * ((t3 + 1) * e3 + t3) + 1;
}, easeInOutBack: function(e3) {
var t3 = 1.70158;
return (e3 /= 0.5) < 1 ? e3 * e3 * ((1 + (t3 *= 1.525)) * e3 - t3) * 0.5 : 0.5 * ((e3 -= 2) * e3 * ((1 + (t3 *= 1.525)) * e3 + t3) + 2);
}, elastic: function(e3) {
return -1 * Math.pow(4, -8 * e3) * Math.sin((6 * e3 - 1) * (2 * Math.PI) / 2) + 1;
}, swingFromTo: function(e3) {
var t3 = 1.70158;
return (e3 /= 0.5) < 1 ? e3 * e3 * ((1 + (t3 *= 1.525)) * e3 - t3) * 0.5 : 0.5 * ((e3 -= 2) * e3 * ((1 + (t3 *= 1.525)) * e3 + t3) + 2);
}, swingFrom: function(e3) {
var t3 = 1.70158;
return e3 * e3 * ((t3 + 1) * e3 - t3);
}, swingTo: function(e3) {
var t3 = 1.70158;
return (e3 -= 1) * e3 * ((t3 + 1) * e3 + t3) + 1;
}, bounce: function(e3) {
return e3 < 1 / 2.75 ? 7.5625 * e3 * e3 : e3 < 2 / 2.75 ? 7.5625 * (e3 -= 1.5 / 2.75) * e3 + 0.75 : e3 < 2.5 / 2.75 ? 7.5625 * (e3 -= 2.25 / 2.75) * e3 + 0.9375 : 7.5625 * (e3 -= 2.625 / 2.75) * e3 + 0.984375;
}, bouncePast: function(e3) {
return e3 < 1 / 2.75 ? 7.5625 * e3 * e3 : e3 < 2 / 2.75 ? 2 - (7.5625 * (e3 -= 1.5 / 2.75) * e3 + 0.75) : e3 < 2.5 / 2.75 ? 2 - (7.5625 * (e3 -= 2.25 / 2.75) * e3 + 0.9375) : 2 - (7.5625 * (e3 -= 2.625 / 2.75) * e3 + 0.984375);
}, easeFromTo: function(e3) {
return (e3 /= 0.5) < 1 ? 0.5 * Math.pow(e3, 4) : -0.5 * ((e3 -= 2) * Math.pow(e3, 3) - 2);
}, easeFrom: function(e3) {
return Math.pow(e3, 4);
}, easeTo: function(e3) {
return Math.pow(e3, 0.25);
} }), function() {
function e3(e4, t3, n3, i2, a2, o2) {
var r2, l2, s2 = 0, u = 0, c = 0, h = 0, d = 0, m = 0;
function p(e5) {
return ((s2 * e5 + u) * e5 + c) * e5;
}
function g(e5) {
return (3 * s2 * e5 + 2 * u) * e5 + c;
}
function f(e5) {
return e5 >= 0 ? e5 : 0 - e5;
}
return s2 = 1 - (c = 3 * t3) - (u = 3 * (i2 - t3) - c), h = 1 - (m = 3 * n3) - (d = 3 * (a2 - n3) - m), r2 = e4, l2 = function(e5) {
return 1 / (200 * e5);
}(o2), function(e5) {
return ((h * e5 + d) * e5 + m) * e5;
}(function(e5, t4) {
var n4, i3, a3, o3, r3, l3;
for (a3 = e5, l3 = 0; l3 < 8; l3++) {
if (f(o3 = p(a3) - e5) < t4) return a3;
if (f(r3 = g(a3)) < 1e-6) break;
a3 -= o3 / r3;
}
if (i3 = 1, (a3 = e5) < (n4 = 0)) return n4;
if (a3 > i3) return i3;
for (; n4 < i3; ) {
if (f((o3 = p(a3)) - e5) < t4) return a3;
e5 > o3 ? n4 = a3 : i3 = a3, a3 = 0.5 * (i3 - n4) + n4;
}
return a3;
}(r2, l2));
}
n2.setBezierFunction = function(t3, i2, a2, o2, r2) {
var l2 = /* @__PURE__ */ function(t4, n3, i3, a3) {
return function(o3) {
return e3(o3, t4, n3, i3, a3, 1);
};
}(i2, a2, o2, r2);
return l2.displayName = t3, l2.x1 = i2, l2.y1 = a2, l2.x2 = o2, l2.y2 = r2, n2.prototype.formula[t3] = l2;
}, n2.unsetBezierFunction = function(e4) {
delete n2.prototype.formula[e4];
};
}(), (t2 = new n2())._filterArgs = [], n2.interpolate = function(e3, i2, a2, o2, r2) {
var l2 = n2.shallowCopy({}, e3), s2 = r2 || 0, u = n2.composeEasingObject(e3, o2 || "linear");
t2.set({});
var c = t2._filterArgs;
c.length = 0, c[0] = l2, c[1] = e3, c[2] = i2, c[3] = u, n2.applyFilter(t2, "tweenCreated"), n2.applyFilter(t2, "beforeTween");
var h = function(e4, t3, i3, a3, o3, r3) {
return n2.tweenProps(a3, t3, e4, i3, 1, r3, o3);
}(e3, l2, i2, a2, u, s2);
return n2.applyFilter(t2, "afterTween"), h;
}, function(e3) {
var t3 = /(\d|\-|\.)/, n3 = /([^\-0-9\.]+)/g, i2 = /[0-9.\-]+/g, a2 = new RegExp("rgb\\(" + i2.source + /,\s*/.source + i2.source + /,\s*/.source + i2.source + "\\)", "g"), o2 = /^.*\(/, r2 = /#([0-9]|[a-f]){3,6}/gi;
function l2(e4, t4) {
var n4, i3 = [], a3 = e4.length;
for (n4 = 0; n4 < a3; n4++) i3.push("_" + t4 + "_" + n4);
return i3;
}
function s2(t4) {
e3.each(t4, function(e4) {
var n4 = t4[e4];
"string" == typeof n4 && n4.match(r2) && (t4[e4] = d(r2, n4, u));
});
}
function u(e4) {
var t4 = function(e5) {
3 === (e5 = e5.replace(/#/, "")).length && (e5 = (e5 = e5.split(""))[0] + e5[0] + e5[1] + e5[1] + e5[2] + e5[2]);
return c[0] = h(e5.substr(0, 2)), c[1] = h(e5.substr(2, 2)), c[2] = h(e5.substr(4, 2)), c;
}(e4);
return "rgb(" + t4[0] + "," + t4[1] + "," + t4[2] + ")";
}
var c = [];
function h(e4) {
return parseInt(e4, 16);
}
function d(e4, t4, n4) {
var i3 = t4.match(e4), a3 = t4.replace(e4, "VAL");
if (i3) for (var o3, r3 = i3.length, l3 = 0; l3 < r3; l3++) o3 = i3.shift(), a3 = a3.replace("VAL", n4(o3));
return a3;
}
function m(e4) {
for (var t4 = e4.match(i2), n4 = t4.length, a3 = e4.match(o2)[0], r3 = 0; r3 < n4; r3++) a3 += parseInt(t4[r3], 10) + ",";
return a3 = a3.slice(0, -1) + ")";
}
function p(t4, n4) {
e3.each(n4, function(e4) {
for (var i3 = b(t4[e4]), a3 = i3.length, o3 = 0; o3 < a3; o3++) t4[n4[e4].chunkNames[o3]] = +i3[o3];
delete t4[e4];
});
}
function g(t4, n4) {
e3.each(n4, function(e4) {
var i3 = t4[e4], o3 = function(e5, t5) {
f.length = 0;
for (var n5 = t5.length, i4 = 0; i4 < n5; i4++) f.push(e5[t5[i4]]);
return f;
}(function(e5, t5) {
for (var n5, i4 = {}, a3 = t5.length, o4 = 0; o4 < a3; o4++) n5 = t5[o4], i4[n5] = e5[n5], delete e5[n5];
return i4;
}(t4, n4[e4].chunkNames), n4[e4].chunkNames);
i3 = function(e5, t5) {
for (var n5 = e5, i4 = t5.length, a3 = 0; a3 < i4; a3++) n5 = n5.replace("VAL", +t5[a3].toFixed(4));
return n5;
}(n4[e4].formatString, o3), t4[e4] = d(a2, i3, m);
});
}
var f = [];
function b(e4) {
return e4.match(i2);
}
e3.prototype.filter.token = { tweenCreated: function(i3, a3, o3, r3) {
var u2, c2;
s2(i3), s2(a3), s2(o3), this._tokenData = (u2 = i3, c2 = {}, e3.each(u2, function(e4) {
var i4, a4, o4 = u2[e4];
if ("string" == typeof o4) {
var r4 = b(o4);
c2[e4] = { formatString: (i4 = o4, a4 = i4.match(n3), a4 ? (1 === a4.length || i4.charAt(0).match(t3)) && a4.unshift("") : a4 = ["", ""], a4.join("VAL")), chunkNames: l2(r4, e4) };
}
}), c2);
}, beforeTween: function(t4, n4, i3, a3) {
!function(t5, n5) {
e3.each(n5, function(e4) {
var i4, a4 = n5[e4].chunkNames, o3 = a4.length, r3 = t5[e4];
if ("string" == typeof r3) {
var l3 = r3.split(" "), s3 = l3[l3.length - 1];
for (i4 = 0; i4 < o3; i4++) t5[a4[i4]] = l3[i4] || s3;
} else for (i4 = 0; i4 < o3; i4++) t5[a4[i4]] = r3;
delete t5[e4];
});
}(a3, this._tokenData), p(t4, this._tokenData), p(n4, this._tokenData), p(i3, this._tokenData);
}, afterTween: function(t4, n4, i3, a3) {
g(t4, this._tokenData), g(n4, this._tokenData), g(i3, this._tokenData), function(t5, n5) {
e3.each(n5, function(e4) {
var i4 = n5[e4].chunkNames, a4 = i4.length, o3 = t5[i4[0]];
if ("string" === typeof o3) {
for (var r3 = "", l3 = 0; l3 < a4; l3++) r3 += " " + t5[i4[l3]], delete t5[i4[l3]];
t5[e4] = r3.substr(1);
} else t5[e4] = o3;
});
}(a3, this._tokenData);
} };
}(n2);
}).call(null), /*! NGHammer.JS - v2.0.7 - 2016-04-22
* http://hammerjs.github.io/
*
* Copyright (c) 2016 Jorik Tangelder;
* Licensed under the MIT license */
function(e2, t2, n2, i2) {
var a2, o2 = ["", "webkit", "Moz", "MS", "ms", "o"], r2 = t2.createElement("div"), l2 = Math.round, s2 = Math.abs, u = Date.now;
function c(e3, t3, n3) {
return setTimeout(b(e3, n3), t3);
}
function h(e3, t3, n3) {
return !!Array.isArray(e3) && (d(e3, n3[t3], n3), true);
}
function d(e3, t3, n3) {
var i3;
if (e3) if (e3.forEach) e3.forEach(t3, n3);
else if (void 0 !== e3.length) for (i3 = 0; i3 < e3.length; ) t3.call(n3, e3[i3], i3, e3), i3++;
else for (i3 in e3) e3.hasOwnProperty(i3) && t3.call(n3, e3[i3], i3, e3);
}
function m(t3, n3, i3) {
var a3 = "DEPRECATED METHOD: " + n3 + "\n" + i3 + " AT \n";
return function() {
var n4 = new Error("get-stack-trace"), i4 = n4 && n4.stack ? n4.stack.replace(/^[^\(]+?[\n$]/gm, "").replace(/^\s+at\s+/gm, "").replace(/^Object.<anonymous>\s*\(/gm, "{anonymous}()@") : "Unknown Stack Trace", o3 = e2.console && (e2.console.warn || e2.console.log);
return o3 && o3.call(e2.console, a3, i4), t3.apply(this, arguments);
};
}
a2 = "function" != typeof Object.assign ? function(e3) {
if (null == e3) throw new TypeError("Cannot convert undefined or null to object");
for (var t3 = Object(e3), n3 = 1; n3 < arguments.length; n3++) {
var i3 = arguments[n3];
if (null != i3) for (var a3 in i3) i3.hasOwnProperty(a3) && (t3[a3] = i3[a3]);
}
return t3;
} : Object.assign;
var p = m(function(e3, t3, n3) {
for (var i3 = Object.keys(t3), a3 = 0; a3 < i3.length; ) (!n3 || n3 && void 0 === e3[i3[a3]]) && (e3[i3[a3]] = t3[i3[a3]]), a3++;
return e3;
}, "extend", "Use `assign`."), g = m(function(e3, t3) {
return p(e3, t3, true);
}, "merge", "Use `assign`.");
function f(e3, t3, n3) {
var i3, o3 = t3.prototype;
(i3 = e3.prototype = Object.create(o3)).constructor = e3, i3._super = o3, n3 && a2(i3, n3);
}
function b(e3, t3) {
return function() {
return e3.apply(t3, arguments);
};
}
function v(e3, t3) {
return "function" == typeof e3 ? e3.apply(t3 && t3[0] || void 0, t3) : e3;
}
function O(e3, t3) {
return void 0 === e3 ? t3 : e3;
}
function y(e3, t3, n3) {
d(I(t3), function(t4) {
e3.addEventListener(t4, n3, false);
});
}
function G(e3, t3, n3) {
d(I(t3), function(t4) {
e3.removeEventListener(t4, n3, false);
});
}
function M(e3, t3) {
for (; e3; ) {
if (e3 == t3) return true;
e3 = e3.parentNode;
}
return false;
}
function w(e3, t3) {
return e3.indexOf(t3) > -1;
}
function I(e3) {
return e3.trim().split(/\s+/g);
}
function T(e3, t3, n3) {
if (e3.indexOf && !n3) return e3.indexOf(t3);
for (var i3 = 0; i3 < e3.length; ) {
if (n3 && e3[i3][n3] == t3 || !n3 && e3[i3] === t3) return i3;
i3++;
}
return -1;
}
function x(e3) {
return Array.prototype.slice.call(e3, 0);
}
function S(e3, t3, n3) {
for (var i3 = [], a3 = [], o3 = 0; o3 < e3.length; ) {
var r3 = e3[o3][t3];
T(a3, r3) < 0 && i3.push(e3[o3]), a3[o3] = r3, o3++;
}
return i3 = i3.sort(function(e4, n4) {
return e4[t3] > n4[t3];
}), i3;
}
function L(e3, t3) {
for (var n3, i3, a3 = t3[0].toUpperCase() + t3.slice(1), r3 = 0; r3 < o2.length; ) {
if ((i3 = (n3 = o2[r3]) ? n3 + a3 : t3) in e3) return i3;
r3++;
}
}
var C = 1;
function E(t3) {
var n3 = t3.ownerDocument || t3;
return n3.defaultView || n3.parentWindow || e2;
}
var k = "ontouchstart" in e2, D = k && /mobile|tablet|ip(ad|hone|od)|android/i.test(navigator.userAgent), N = ["x", "y"], V = ["clientX", "clientY"];
function Y(e3, t3) {
var n3 = this;
this.manager = e3, this.callback = t3, this.element = e3.element, this.target = e3.options.inputTarget, this.domHandler = function(t4) {
v(e3.options.enable, [e3]) && n3.handler(t4);
}, this.init();
}
function A(e3, t3, n3) {
var i3 = n3.pointers.length, a3 = n3.changedPointers.length, o3 = 1 & t3 && i3 - a3 == 0, r3 = 12 & t3 && i3 - a3 == 0;
n3.isFirst = !!o3, n3.isFinal = !!r3, o3 && (e3.session = {}), n3.eventType = t3, function(e4, t4) {
var n4 = e4.session, i4 = t4.pointers, a4 = i4.length;
n4.firstInput || (n4.firstInput = _(t4));
a4 > 1 && !n4.firstMultiple ? n4.firstMultiple = _(t4) : 1 === a4 && (n4.firstMultiple = false);
var o4 = n4.firstInput, r4 = n4.firstMultiple, l3 = r4 ? r4.center : o4.center, c2 = t4.center = P(i4);
t4.timeStamp = u(), t4.deltaTime = t4.timeStamp - o4.timeStamp, t4.angle = z(l3, c2), t4.distance = F(l3, c2), function(e5, t5) {
var n5 = t5.center, i5 = e5.offsetDelta || {}, a5 = e5.prevDelta || {}, o5 = e5.prevInput || {};
1 !== t5.eventType && 4 !== o5.eventType || (a5 = e5.prevDelta = { x: o5.deltaX || 0, y: o5.deltaY || 0 }, i5 = e5.offsetDelta = { x: n5.x, y: n5.y });
t5.deltaX = a5.x + (n5.x - i5.x), t5.deltaY = a5.y + (n5.y - i5.y);
}(n4, t4), t4.offsetDirection = $2(t4.deltaX, t4.deltaY);
var h2 = R(t4.deltaTime, t4.deltaX, t4.deltaY);
t4.overallVelocityX = h2.x, t4.overallVelocityY = h2.y, t4.overallVelocity = s2(h2.x) > s2(h2.y) ? h2.x : h2.y, t4.scale = r4 ? (d2 = r4.pointers, m2 = i4, F(m2[0], m2[1], V) / F(d2[0], d2[1], V)) : 1, t4.rotation = r4 ? function(e5, t5) {
return z(t5[1], t5[0], V) + z(e5[1], e5[0], V);
}(r4.pointers, i4) : 0, t4.maxPointers = n4.prevInput ? t4.pointers.length > n4.prevInput.maxPointers ? t4.pointers.length : n4.prevInput.maxPointers : t4.pointers.length, function(e5, t5) {
var n5, i5, a5, o5, r5 = e5.lastInterval || t5, l4 = t5.timeStamp - r5.timeStamp;
if (8 != t5.eventType && (l4 > 25 || void 0 === r5.velocity)) {
var u2 = t5.deltaX - r5.deltaX, c3 = t5.deltaY - r5.deltaY, h3 = R(l4, u2, c3);
i5 = h3.x, a5 = h3.y, n5 = s2(h3.x) > s2(h3.y) ? h3.x : h3.y, o5 = $2(u2, c3), e5.lastInterval = t5;
} else n5 = r5.velocity, i5 = r5.velocityX, a5 = r5.velocityY, o5 = r5.direction;
t5.velocity = n5, t5.velocityX = i5, t5.velocityY = a5, t5.direction = o5;
}(n4, t4);
var d2, m2;
var p2 = e4.element;
M(t4.srcEvent.target, p2) && (p2 = t4.srcEvent.target);
t4.target = p2;
}(e3, n3), e3.emit("hammer.input", n3), e3.recognize(n3), e3.session.prevInput = n3;
}
function _(e3) {
for (var t3 = [], n3 = 0; n3 < e3.pointers.length; ) t3[n3] = { clientX: l2(e3.pointers[n3].clientX), clientY: l2(e3.pointers[n3].clientY) }, n3++;
return { timeStamp: u(), pointers: t3, center: P(t3), deltaX: e3.deltaX, deltaY: e3.deltaY };
}
function P(e3) {
var t3 = e3.length;
if (1 === t3) return { x: l2(e3[0].clientX), y: l2(e3[0].clientY) };
for (var n3 = 0, i3 = 0, a3 = 0; a3 < t3; ) n3 += e3[a3].clientX, i3 += e3[a3].clientY, a3++;
return { x: l2(n3 / t3), y: l2(i3 / t3) };
}
function R(e3, t3, n3) {
return { x: t3 / e3 || 0, y: n3 / e3 || 0 };
}
function $2(e3, t3) {
return e3 === t3 ? 1 : s2(e3) >= s2(t3) ? e3 < 0 ? 2 : 4 : t3 < 0 ? 8 : 16;
}
function F(e3, t3, n3) {
n3 || (n3 = N);
var i3 = t3[n3[0]] - e3[n3[0]], a3 = t3[n3[1]] - e3[n3[1]];
return Math.sqrt(i3 * i3 + a3 * a3);
}
function z(e3, t3, n3) {
n3 || (n3 = N);
var i3 = t3[n3[0]] - e3[n3[0]], a3 = t3[n3[1]] - e3[n3[1]];
return 180 * Math.atan2(a3, i3) / Math.PI;
}
Y.prototype = { handler: function() {
}, init: function() {
this.evEl && y(this.element, this.evEl, this.domHandler), this.evTarget && y(this.target, this.evTarget, this.domHandler), this.evWin && y(E(this.element), this.evWin, this.domHandler);
}, destroy: function() {
this.evEl && G(this.element, this.evEl, this.domHandler), this.evTarget && G(this.target, this.evTarget, this.domHandler), this.evWin && G(E(this.element), this.evWin, this.domHandler);
} };
var B = { mousedown: 1, mousemove: 2, mouseup: 4 };
function H() {
this.evEl = "mousedown", this.evWin = "mousemove mouseup", this.pressed = false, Y.apply(this, arguments);
}
f(H, Y, { handler: function(e3) {
var t3 = B[e3.type];
1 & t3 && 0 === e3.button && (this.pressed = true), 2 & t3 && 1 !== e3.which && (t3 = 4), this.pressed && (4 & t3 && (this.pressed = false), this.callback(this.manager, t3, { pointers: [e3], changedPointers: [e3], pointerType: "mouse", srcEvent: e3 }));
} });
var U = { pointerdown: 1, pointermove: 2, pointerup: 4, pointercancel: 8, pointerout: 8 }, W = { 2: "touch", 3: "pen", 4: "mouse", 5: "kinect" }, j = "pointerdown", X = "pointermove pointerup pointercancel";
function Q() {
this.evEl = j, this.evWin = X, Y.apply(this, arguments), this.store = this.manager.session.pointerEvents = [];
}
e2.MSPointerEvent && !e2.PointerEvent && (j = "MSPointerDown", X = "MSPointerMove MSPointerUp MSPointerCancel"), f(Q, Y, { handler: function(e3) {
var t3 = this.store, n3 = false, i3 = e3.type.toLowerCase().replace("ms", ""), a3 = U[i3], o3 = W[e3.pointerType] || e3.pointerType, r3 = "touch" == o3, l3 = T(t3, e3.pointerId, "pointerId");
1 & a3 && (0 === e3.button || r3) ? l3 < 0 && (t3.push(e3), l3 = t3.length - 1) : 12 & a3 && (n3 = true), l3 < 0 || (t3[l3] = e3, this.callback(this.manager, a3, { pointers: t3, changedPointers: [e3], pointerType: o3, srcEvent: e3 }), n3 && t3.splice(l3, 1));
} });
var q = { touchstart: 1, touchmove: 2, touchend: 4, touchcancel: 8 };
function Z() {
this.evTarget = "touchstart", this.evWin = "touchstart touchmove touchend touchcancel", this.started = false, Y.apply(this, arguments);
}
function J(e3, t3) {
var n3 = x(e3.touches), i3 = x(e3.changedTouches);
return 12 & t3 && (n3 = S(n3.concat(i3), "identifier")), [n3, i3];
}
f(Z, Y, { handler: function(e3) {
var t3 = q[e3.type];
if (1 === t3 && (this.started = true), this.started) {
var n3 = J.call(this, e3, t3);
12 & t3 && n3[0].length - n3[1].length == 0 && (this.started = false), this.callback(this.manager, t3, { pointers: n3[0], changedPointers: n3[1], pointerType: "touch", srcEvent: e3 });
}
} });
var K = { touchstart: 1, touchmove: 2, touchend: 4, touchcancel: 8 };
function ee() {
this.evTarget = "touchstart touchmove touchend touchcancel", this.targetIds = {}, Y.apply(this, arguments);
}
function te(e3, t3) {
var n3 = x(e3.touches), i3 = this.targetIds;
if (3 & t3 && 1 === n3.length) return i3[n3[0].identifier] = true, [n3, n3];
var a3, o3, r3 = x(e3.changedTouches), l3 = [], s3 = this.target;
if (o3 = n3.filter(function(e4) {
return M(e4.target, s3);
}), 1 === t3) for (a3 = 0; a3 < o3.length; ) i3[o3[a3].identifier] = true, a3++;
for (a3 = 0; a3 < r3.length; ) i3[r3[a3].identifier] && l3.push(r3[a3]), 12 & t3 && delete i3[r3[a3].identifier], a3++;
return l3.length ? [S(o3.concat(l3), "identifier"), l3] : void 0;
}
f(ee, Y, { handler: function(e3) {
var t3 = K[e3.type], n3 = te.call(this, e3, t3);
n3 && this.callback(this.manager, t3, { pointers: n3[0], changedPointers: n3[1], pointerType: "touch", srcEvent: e3 });
} });
function ne() {
Y.apply(this, arguments);
var e3 = b(this.handler, this);
this.touch = new ee(this.manager, e3), this.mouse = new H(this.manager, e3), this.primaryTouch = null, this.lastTouches = [];
}
function ie(e3, t3) {
1 & e3 ? (this.primaryTouch = t3.changedPointers[0].identifier, ae.call(this, t3)) : 12 & e3 && ae.call(this, t3);
}
function ae(e3) {
var t3 = e3.changedPointers[0];
if (t3.identifier === this.primaryTouch) {
var n3 = { x: t3.clientX, y: t3.clientY };
this.lastTouches.push(n3);
var i3 = this.lastTouches;
setTimeout(function() {
var e4 = i3.indexOf(n3);
e4 > -1 && i3.splice(e4, 1);
}, 2500);
}
}
function oe(e3) {
for (var t3 = e3.srcEvent.clientX, n3 = e3.srcEvent.clientY, i3 = 0; i3 < this.lastTouches.length; i3++) {
var a3 = this.lastTouches[i3], o3 = Math.abs(t3 - a3.x), r3 = Math.abs(n3 - a3.y);
if (o3 <= 25 && r3 <= 25) return true;
}
return false;
}
f(ne, Y, { handler: function(e3, t3, n3) {
var i3 = "touch" == n3.pointerType, a3 = "mouse" == n3.pointerType;
if (!(a3 && n3.sourceCapabilities && n3.sourceCapabilities.firesTouchEvents)) {
if (i3) ie.call(this, t3, n3);
else if (a3 && oe.call(this, n3)) return;
this.callback(e3, t3, n3);
}
}, destroy: function() {
this.touch.destroy(), this.mouse.destroy();
} });
var re = L(r2.style, "touchAction"), le = void 0 !== re, se = function() {
if (!le) return false;
var t3 = {}, n3 = e2.CSS && e2.CSS.supports;
return ["auto", "manipulation", "pan-y", "pan-x", "pan-x pan-y", "none"].forEach(function(i3) {
t3[i3] = !n3 || e2.CSS.supports("touch-action", i3);
}), t3;
}();
function ue(e3, t3) {
this.manager = e3, this.set(t3);
}
ue.prototype = { set: function(e3) {
"compute" == e3 && (e3 = this.compute()), le && this.manager.element.style && se[e3] && (this.manager.element.style[re] = e3), this.actions = e3.toLowerCase().trim();
}, update: function() {
this.set(this.manager.options.touchAction);
}, compute: function() {
var e3 = [];
return d(this.manager.recognizers, function(t3) {
v(t3.options.enable, [t3]) && (e3 = e3.concat(t3.getTouchAction()));
}), function(e4) {
if (w(e4, "none")) return "none";
var t3 = w(e4, "pan-x"), n3 = w(e4, "pan-y");
if (t3 && n3) return "none";
if (t3 || n3) return t3 ? "pan-x" : "pan-y";
if (w(e4, "manipulation")) return "manipulation";
return "auto";
}(e3.join(" "));
}, preventDefaults: function(e3) {
var t3 = e3.srcEvent, n3 = e3.offsetDirection;
if (this.manager.session.prevented) t3.preventDefault();
else {
var i3 = this.actions, a3 = w(i3, "none") && !se.none, o3 = w(i3, "pan-y") && !se["pan-y"], r3 = w(i3, "pan-x") && !se["pan-x"];
if (a3) {
var l3 = 1 === e3.pointers.length, s3 = e3.distance < 2, u2 = e3.deltaTime < 250;
if (l3 && s3 && u2) return;
}
if (!r3 || !o3) return a3 || o3 && 6 & n3 || r3 && 24 & n3 ? this.preventSrc(t3) : void 0;
}
}, preventSrc: function(e3) {
this.manager.session.prevented = true, e3.preventDefault();
} };
function ce(e3) {
this.options = a2({}, this.defaults, e3 || {}), this.id = C++, this.manager = null, this.options.enable = O(this.options.enable, true), this.state = 1, this.simultaneous = {}, this.requireFail = [];
}
function he(e3) {
return 16 & e3 ? "cancel" : 8 & e3 ? "end" : 4 & e3 ? "move" : 2 & e3 ? "start" : "";
}
function de(e3) {
return 16 == e3 ? "down" : 8 == e3 ? "up" : 2 == e3 ? "left" : 4 == e3 ? "right" : "";
}
function me(e3, t3) {
var n3 = t3.manager;
return n3 ? n3.get(e3) : e3;
}
function pe() {
ce.apply(this, arguments);
}
function ge() {
pe.apply(this, arguments), this.pX = null, this.pY = null;
}
function fe() {
pe.apply(this, arguments);
}
function be() {
ce.apply(this, arguments), this._timer = null, this._input = null;
}
function ve() {
pe.apply(this, arguments);
}
function Oe() {
pe.apply(this, arguments);
}
function ye() {
ce.apply(this, arguments), this.pTime = false, this.pCenter = false, this._timer = null, this._input = null, this.count = 0;
}
function Ge(e3, t3) {
return (t3 = t3 || {}).recognizers = O(t3.recognizers, Ge.defaults.preset), new Me(e3, t3);
}
ce.prototype = { defaults: {}, set: function(e3) {
return a2(this.options, e3), this.manager && this.manager.touchAction.update(), this;
}, recognizeWith: function(e3) {
if (h(e3, "recognizeWith", this)) return this;
var t3 = this.simultaneous;
return t3[(e3 = me(e3, this)).id] || (t3[e3.id] = e3, e3.recognizeWith(this)), this;
}, dropRecognizeWith: function(e3) {
return h(e3, "dropRecognizeWith", this) || (e3 = me(e3, this), delete this.simultaneous[e3.id]), this;
}, requireFailure: function(e3) {
if (h(e3, "requireFailure", this)) return this;
var t3 = this.requireFail;
return -1 === T(t3, e3 = me(e3, this)) && (t3.push(e3), e3.requireFailure(this)), this;
}, dropRequireFailure: function(e3) {
if (h(e3, "dropRequireFailure", this)) return this;
e3 = me(e3, this);
var t3 = T(this.requireFail, e3);
return t3 > -1 && this.requireFail.splice(t3, 1), this;
}, hasRequireFailures: function() {
return this.requireFail.length > 0;
}, canRecognizeWith: function(e3) {
return !!this.simultaneous[e3.id];
}, emit: function(e3) {
var t3 = this, n3 = this.state;
function i3(n4) {
t3.manager.emit(n4, e3);
}
n3 < 8 && i3(t3.options.event + he(n3)), i3(t3.options.event), e3.additionalEvent && i3(e3.additionalEvent), n3 >= 8 && i3(t3.options.event + he(n3));
}, tryEmit: function(e3) {
if (this.canEmit()) return this.emit(e3);
this.state = 32;
}, canEmit: function() {
for (var e3 = 0; e3 < this.requireFail.length; ) {
if (!(33 & this.requireFail[e3].state)) return false;
e3++;
}
return true;
}, recognize: function(e3) {
var t3 = a2({}, e3);
if (!v(this.options.enable, [this, t3])) return this.reset(), void (this.state = 32);
56 & this.state && (this.state = 1), this.state = this.process(t3), 30 & this.state && this.tryEmit(t3);
}, process: function(e3) {
}, getTouchAction: function() {
}, reset: function() {
} }, f(pe, ce, { defaults: { pointers: 1 }, attrTest: function(e3) {
var t3 = this.options.pointers;
return 0 === t3 || e3.pointers.length === t3;
}, process: function(e3) {
var t3 = this.state, n3 = e3.eventType, i3 = 6 & t3, a3 = this.attrTest(e3);
return i3 && (8 & n3 || !a3) ? 16 | t3 : i3 || a3 ? 4 & n3 ? 8 | t3 : 2 & t3 ? 4 | t3 : 2 : 32;
} }), f(ge, pe, { defaults: { event: "pan", threshold: 10, pointers: 1, direction: 30 }, getTouchAction: function() {
var e3 = this.options.direction, t3 = [];
return 6 & e3 && t3.push("pan-y"), 24 & e3 && t3.push("pan-x"), t3;
}, directionTest: function(e3) {
var t3 = this.options, n3 = true, i3 = e3.distance, a3 = e3.direction, o3 = e3.deltaX, r3 = e3.deltaY;
return a3 & t3.direction || (6 & t3.direction ? (a3 = 0 === o3 ? 1 : o3 < 0 ? 2 : 4, n3 = o3 != this.pX, i3 = Math.abs(e3.deltaX)) : (a3 = 0 === r3 ? 1 : r3 < 0 ? 8 : 16, n3 = r3 != this.pY, i3 = Math.abs(e3.deltaY))), e3.direction = a3, n3 && i3 > t3.threshold && a3 & t3.direction;
}, attrTest: function(e3) {
return pe.prototype.attrTest.call(this, e3) && (2 & this.state || !(2 & this.state) && this.directionTest(e3));
}, emit: function(e3) {
this.pX = e3.deltaX, this.pY = e3.deltaY;
var t3 = de(e3.direction);
t3 && (e3.additionalEvent = this.options.event + t3), this._super.emit.call(this, e3);
} }), f(fe, pe, { defaults: { event: "pinch", threshold: 0, pointers: 2 }, getTouchAction: function() {
return ["none"];
}, attrTest: function(e3) {
return this._super.attrTest.call(this, e3) && (Math.abs(e3.scale - 1) > this.options.threshold || 2 & this.state);
}, emit: function(e3) {
if (1 !== e3.scale) {
var t3 = e3.scale < 1 ? "in" : "out";
e3.additionalEvent = this.options.event + t3;
}
this._super.emit.call(this, e3);
} }), f(be, ce, { defaults: { event: "press", pointers: 1, time: 251, threshold: 9 }, getTouchAction: function() {
return ["auto"];
}, process: function(e3) {
var t3 = this.options, n3 = e3.pointers.length === t3.pointers, i3 = e3.distance < t3.threshold, a3 = e3.deltaTime > t3.time;
if (this._input = e3, !i3 || !n3 || 12 & e3.eventType && !a3) this.reset();
else if (1 & e3.eventType) this.reset(), this._timer = c(function() {
this.state = 8, this.tryEmit();
}, t3.time, this);
else if (4 & e3.eventType) return 8;
return 32;
}, reset: function() {
clearTimeout(this._timer);
}, emit: function(e3) {
8 === this.state && (e3 && 4 & e3.eventType ? this.manager.emit(this.options.event + "up", e3) : (this._input.timeStamp = u(), this.manager.emit(this.options.event, this._input)));
} }), f(ve, pe, { defaults: { event: "rotate", threshold: 0, pointers: 2 }, getTouchAction: function() {
return ["none"];
}, attrTest: function(e3) {
return this._super.attrTest.call(this, e3) && (Math.abs(e3.rotation) > this.options.threshold || 2 & this.state);
} }), f(Oe, pe, { defaults: { event: "swipe", threshold: 10, velocity: 0.3, direction: 30, pointers: 1 }, getTouchAction: function() {
return ge.prototype.getTouchAction.call(this);
}, attrTest: function(e3) {
var t3, n3 = this.options.direction;
return 30 & n3 ? t3 = e3.overallVelocity : 6 & n3 ? t3 = e3.overallVelocityX : 24 & n3 && (t3 = e3.overallVelocityY), this._super.attrTest.call(this, e3) && n3 & e3.offsetDirection && e3.distance > this.options.threshold && e3.maxPointers == this.options.pointers && s2(t3) > this.options.velocity && 4 & e3.eventType;
}, emit: function(e3) {
var t3 = de(e3.offsetDirection);
t3 && this.manager.emit(this.options.event + t3, e3), this.manager.emit(this.options.event, e3);
} }), f(ye, ce, { defaults: { event: "tap", pointers: 1, taps: 1, interval: 300, time: 250, threshold: 9, posThreshold: 10 }, getTouchAction: function() {
return ["manipulation"];
}, process: function(e3) {
var t3 = this.options, n3 = e3.pointers.length === t3.pointers, i3 = e3.distance < t3.threshold, a3 = e3.deltaTime < t3.time;
if (this.reset(), 1 & e3.eventType && 0 === this.count) return this.failTimeout();
if (i3 && a3 && n3) {
if (4 != e3.eventType) return this.failTimeout();
var o3 = !this.pTime || e3.timeStamp - this.pTime < t3.interval, r3 = !this.pCenter || F(this.pCenter, e3.center) < t3.posThreshold;
if (this.pTime = e3.timeStamp, this.pCenter = e3.center, r3 && o3 ? this.count += 1 : this.count = 1, this._input = e3, 0 === this.count % t3.taps) return this.hasRequireFailures() ? (this._timer = c(function() {
this.state = 8, this.tryEmit();
}, t3.interval, this), 2) : 8;
}
return 32;
}, failTimeout: function() {
return this._timer = c(function() {
this.state = 32;
}, this.options.interval, this), 32;
}, reset: function() {
clearTimeout(this._timer);
}, emit: function() {
8 == this.state && (this._input.tapCount = this.count, this.manager.emit(this.options.event, this._input));
} }), Ge.VERSION = "2.0.7", Ge.defaults = { domEvents: false, touchAction: "compute", enable: true, inputTarget: null, inputClass: null, preset: [[ve, { enable: false }], [fe, { enable: false }, ["rotate"]], [Oe, { direction: 6 }], [ge, { direction: 6 }, ["swipe"]], [ye], [ye, { event: "doubletap", taps: 2 }, ["tap"]], [be]], cssProps: { userSelect: "none", touchSelect: "none", touchCallout: "none", contentZooming: "none", userDrag: "none", tapHighlightColor: "rgba(0,0,0,0)" } };
function Me(e3, t3) {
var n3;
this.options = a2({}, Ge.defaults, t3 || {}), this.options.inputTarget = this.options.inputTarget || e3, this.handlers = {}, this.session = {}, this.recognizers = [], this.oldCssProps = {}, this.element = e3, this.input = new ((n3 = this).options.inputClass || (D ? ee : k ? ne : H))(n3, A), this.touchAction = new ue(this, this.options.touchAction), we(this, true), d(this.options.recognizers, function(e4) {
var t4 = this.add(new e4[0](e4[1]));
e4[2] && t4.recognizeWith(e4[2]), e4[3] && t4.requireFailure(e4[3]);
}, this);
}
function we(e3, t3) {
var n3, i3 = e3.element;
i3.style && (d(e3.options.cssProps, function(a3, o3) {
n3 = L(i3.style, o3), t3 ? (e3.oldCssProps[n3] = i3.style[n3], i3.style[n3] = a3) : i3.style[n3] = e3.oldCssProps[n3] || "";
}), t3 || (e3.oldCssProps = {}));
}
Me.prototype = { set: function(e3) {
return a2(this.options, e3), e3.touchAction && this.touchAction.update(), e3.inputTarget && (this.input.destroy(), this.input.target = e3.inputTarget, this.input.init()), this;
}, stop: function(e3) {
this.session.stopped = e3 ? 2 : 1;
}, recognize: function(e3) {
var t3 = this.session;
if (!t3.stopped) {
var n3;
this.touchAction.preventDefaults(e3);
var i3 = this.recognizers, a3 = t3.curRecognizer;
(!a3 || a3 && 8 & a3.state) && (a3 = t3.curRecognizer = null);
for (var o3 = 0; o3 < i3.length; ) n3 = i3[o3], 2 === t3.stopped || a3 && n3 != a3 && !n3.canRecognizeWith(a3) ? n3.reset() : n3.recognize(e3), !a3 && 14 & n3.state && (a3 = t3.curRecognizer = n3), o3++;
}
}, get: function(e3) {
if (e3 instanceof ce) return e3;
for (var t3 = this.recognizers, n3 = 0; n3 < t3.length; n3++) if (t3[n3].options.event == e3) return t3[n3];
return null;
}, add: function(e3) {
if (h(e3, "add", this)) return this;
var t3 = this.get(e3.options.event);
return t3 && this.remove(t3), this.recognizers.push(e3), e3.manager = this, this.touchAction.update(), e3;
}, remove: function(e3) {
if (h(e3, "remove", this)) return this;
if (e3 = this.get(e3)) {
var t3 = this.recognizers, n3 = T(t3, e3);
-1 !== n3 && (t3.splice(n3, 1), this.touchAction.update());
}
return this;
}, on: function(e3, t3) {
if (void 0 !== e3 && void 0 !== t3) {
var n3 = this.handlers;
return d(I(e3), function(e4) {
n3[e4] = n3[e4] || [], n3[e4].push(t3);
}), this;
}
}, off: function(e3, t3) {
if (void 0 !== e3) {
var n3 = this.handlers;
return d(I(e3), function(e4) {
t3 ? n3[e4] && n3[e4].splice(T(n3[e4], t3), 1) : delete n3[e4];
}), this;
}
}, emit: function(e3, n3) {
this.options.domEvents && function(e4, n4) {
var i4 = t2.createEvent("Event");
i4.initEvent(e4, true, true), i4.gesture = n4, n4.target.dispatchEvent(i4);
}(e3, n3);
var i3 = this.handlers[e3] && this.handlers[e3].slice();
if (i3 && i3.length) {
n3.type = e3, n3.preventDefault = function() {
n3.srcEvent.preventDefault();
};
for (var a3 = 0; a3 < i3.length; ) i3[a3](n3), a3++;
}
}, destroy: function() {
this.element && we(this, false), this.handlers = {}, this.session = {}, this.input.destroy(), this.element = null;
} }, a2(Ge, { INPUT_START: 1, INPUT_MOVE: 2, INPUT_END: 4, INPUT_CANCEL: 8, STATE_POSSIBLE: 1, STATE_BEGAN: 2, STATE_CHANGED: 4, STATE_ENDED: 8, STATE_RECOGNIZED: 8, STATE_CANCELLED: 16, STATE_FAILED: 32, DIRECTION_NONE: 1, DIRECTION_LEFT: 2, DIRECTION_RIGHT: 4, DIRECTION_UP: 8, DIRECTION_DOWN: 16, DIRECTION_HORIZONTAL: 6, DIRECTION_VERTICAL: 24, DIRECTION_ALL: 30, Manager: Me, Input: Y, TouchAction: ue, TouchInput: ee, MouseInput: H, PointerEventInput: Q, TouchMouseInput: ne, SingleTouchInput: Z, Recognizer: ce, AttrRecognizer: pe, Tap: ye, Pan: ge, Swipe: Oe, Pinch: fe, Rotate: ve, Press: be, on: y, off: G, each: d, merge: g, extend: p, assign: a2, inherit: f, bindFn: b, prefixed: L }), (void 0 !== e2 ? e2 : "undefined" != typeof self ? self : {}).NGHammer = Ge, module.exports ? module.exports = Ge : e2.NGHammer = Ge;
}(window, document);
}), (function() {
var e;
e = function() {
for (var e2 = document.querySelectorAll("[data-nanogallery2]"), t = 0; t < e2.length; t++) jQuery(e2[t]).nanogallery2(jQuery(e2[t]).data("nanogallery2"));
for (e2 = document.querySelectorAll("[data-nanogallery2-lightbox]"), t = 0; t < e2.length; t++) e2[t].classList.add("NGY2ThumbnailLightbox"), e2[t].addEventListener("click", function(e3) {
e3.preventDefault();
for (var t2 = { lightboxStandalone: true, viewerToolbar: { display: false } }, n = this.dataset.nanogallery2Lgroup, i = document.querySelectorAll("[data-nanogallery2-lightbox]"), a = 0; a < i.length; a++) if (i[a].dataset.nanogallery2Lgroup == n && "" !== i[a].dataset.nanogallery2Lightbox) {
t2 = jQuery.extend(true, {}, t2, jQuery(i[a]).data("nanogallery2Lightbox"));
break;
}
jQuery(this).nanogallery2(t2);
});
}, "loading" != document.readyState ? e() : document.addEventListener ? document.addEventListener("DOMContentLoaded", e) : document.attachEvent("onreadystatechange", function() {
"complete" == document.readyState && e();
});
}).call(null), /**!
* @preserve nanogallery2 - NANOPHOTOSPROVIDER2 data provider
* Homepage: http://nanogallery2.nanostudio.org
* Sources: https://github.com/nanostudio-org/nanogallery2
*
* License: GPLv3 and commercial licence
*
*/
function(e) {
"function" == typeof commonjsRequire ? e(commonjsRequire(["jquery", "nanogallery2"])) : e(jQuery);
}(function(e) {
jQuery.nanogallery2.data_nano_photos_provider2 = function(e2, t) {
var n = e2, i = function(t2, i2, s3, c2) {
var h2 = NGY2Item.GetIdx(n, t2);
"" == e2.I[h2].title && (e2.I[h2].title = a(t2));
var d2 = n.O.dataProvider + "?albumID=" + t2;
d2 += "&hxs=" + n.tn.settings.getH(n.GOM.curNavLevel, "xs"), d2 += "&wxs=" + n.tn.settings.getW(n.GOM.curNavLevel, "xs"), d2 += "&hsm=" + n.tn.settings.getH(n.GOM.curNavLevel, "sm"), d2 += "&wsm=" + n.tn.settings.getW(n.GOM.curNavLevel, "sm"), d2 += "&hme=" + n.tn.settings.getH(n.GOM.curNavLevel, "me"), d2 += "&wme=" + n.tn.settings.getW(n.GOM.curNavLevel, "me"), d2 += "&hla=" + n.tn.settings.getH(n.GOM.curNavLevel, "la"), d2 += "&wla=" + n.tn.settings.getW(n.GOM.curNavLevel, "la"), d2 += "&hxl=" + n.tn.settings.getH(n.GOM.curNavLevel, "xl"), d2 += "&wxl=" + n.tn.settings.getW(n.GOM.curNavLevel, "xl"), r(true), jQuery.ajaxSetup({ cache: false }), jQuery.support.cors = true;
try {
var m2 = setTimeout(function() {
r(false), l(n, "Could not retrieve nanoPhotosProvider2 data (timeout).");
}, 6e4);
n.O.debugMode && console.log("nanoPhotosProvider2 URL: " + d2), jQuery.getJSON(d2, function(e3, a2, d3) {
clearTimeout(m2), r(false), o(h2, e3), "ok" == e3.nano_status ? (u(t2), null != i2 && i2(s3, c2, null)) : l(n, "Could not retrieve nanoPhotosProvider2 data. Error: " + e3.nano_status + " - " + e3.nano_message);
}).fail(function(e3, t3, i3) {
clearTimeout(m2), r(false);
var a2 = "";
for (var o2 in e3) a2 += o2 + "=" + e3[o2] + "<br>";
l(n, "Could not retrieve nanoPhotosProvider2 data. Error: " + (t3 + ", " + i3 + " " + a2 + "<br><br>URL:" + d2));
});
} catch (e3) {
l(n, "Could not retrieve nanoPhotosProvider2 data. Error: " + e3);
}
};
function a(e3) {
return decodeURIComponent(e3);
}
function o(e3, t2) {
n.O.debugMode && (console.log("nanoPhotosProvider2 parse data:"), console.dir(t2));
jQuery.each(t2.album_content, function(e4, i2) {
var o2 = n.O.dataProvider.substring(0, n.O.dataProvider.indexOf("nano_photos_provider2.php")), r2 = o2 + a(i2.src), l2 = i2.title, u2 = i2.description.split("_").join(" "), c2 = "image";
void 0 !== i2.kind && i2.kind.length > 0 && (c2 = i2.kind);
var h2 = i2.ID, d2 = false;
if ("album" == c2 && (s2(l2, h2) || (d2 = true), "" == n.O.album && "" == n.O.photoset || (d2 = true)), "image" == c2 || !d2) {
var m2 = 0;
void 0 !== i2.albumID && (m2 = i2.albumID, true);
var p = void 0 === i2.tags ? "" : i2.tags, g = NGY2Item.New(n, l2.split("_").join(" "), u2, h2, m2, c2, p);
g.setMediaURL(r2, "img"), void 0 !== i2.dcGIF && (g.imageDominantColors = "data:image/gif;base64," + i2.dcGIF), void 0 !== i2.dc && "" !== i2.dc && (g.imageDominantColor = i2.dc), "album" == c2 ? g.numberItems = i2.cnt : (g.imageWidth = i2.imgWidth, g.imageHeight = i2.imgHeight), "" != i2.originalURL && (g.downloadURL = o2 + a(i2.originalURL));
for (var f = n.GOM.curNavLevel, b = ["xs", "sm", "me", "la", "xl"], v = 0; v < b.length; v++) g.thumbs.url[f][b[v]] = o2 + a(i2.t_url[v]), g.thumbs.width[f][b[v]] = parseInt(i2.t_width[v]), g.thumbs.height[f][b[v]] = parseInt(i2.t_height[v]);
var O = n.O.fnProcessData;
null !== O && ("function" == typeof O ? O(g, n.O.dataProvider, t2) : window[O](g, n.O.dataProvider, t2));
}
}), n.I[e3].contentIsLoaded = true;
}
var r = NGY2Tools.PreloaderDisplay.bind(n), l = NGY2Tools.NanoAlert, s2 = NGY2Tools.FilterAlbumName.bind(n), u = NGY2Tools.AlbumPostProcess.bind(n);
switch (t) {
case "GetHiddenAlbums":
break;
case "AlbumGetContent":
var c = arguments[2], h = arguments[3], d = arguments[4], m = arguments[5];
i(c, h, d, m);
}
};
}), /**!
* @preserve nanogallery2 - GOOGLE PHOTOS data provider
* Homepage: http://nanogallery2.nanostudio.org
* Sources: https://github.com/nanostudio-org/nanogallery2
*
* License: GPLv3 and commercial licence
*
*/
function(e) {
"function" == typeof commonjsRequire ? e(commonjsRequire(["jquery", "nanogallery2"])) : e(jQuery);
}(function(e) {
jQuery.nanogallery2.data_google2 = function(e2, t) {
var n = e2, i = function(e3, t2, i2, o2) {
var s2 = "", u2 = "image", c2 = NGY2Item.GetIdx(n, e3), d2 = "";
n.galleryMaxItems.Get() > 0 && (d2 = "&max-results=" + n.galleryMaxItems.Get());
var m2 = "";
"undefined" != typeof ngy2_pwa_at && (m2 = ngy2_pwa_at), 0 == e3 ? (s2 = "" != m2 ? "https://photoslibrary.googleapis.com/v1/albums" : n.O.google2URL + "?nguserid=" + n.O.userID + "&alt=json&v=3&kind=album" + d2 + "&rnd=" + (/* @__PURE__ */ new Date()).getTime(), u2 = "album") : s2 = "" != m2 ? "https://photoslibrary.googleapis.com/v1/mediaItems:search" : n.O.google2URL + "?nguserid=" + n.O.userID + "&ngalbumid=" + e3 + "&alt=json&v=3&kind=photo&" + d2, n.O.debugMode && console.log("Google Photos URL: " + s2), r(true), jQuery.ajaxSetup({ cache: false }), jQuery.support.cors = true;
try {
var p2 = setTimeout(function() {
r(false), l("Could not retrieve AJAX data...");
}, 6e4);
jQuery.getJSON(s2 + "&callback=?", function(s3) {
if ("error" == s3.nano_status) return clearTimeout(p2), r(false), void l(n, "Could not retrieve Google data. Error: " + s3.nano_message);
clearTimeout(p2), r(false), a(c2, u2, s3), h(e3), null != t2 && t2(i2, o2, null);
}).fail(function(e4, t3, i3) {
clearTimeout(p2), r(false);
var a2 = "";
for (var o3 in e4) a2 += o3 + "=" + e4[o3] + "<br>";
l(n, "Could not retrieve Google data. Error: " + (t3 + ", " + i3 + " " + a2 + "<br><br>URL:" + s2));
});
} catch (e4) {
l(n, "Could not retrieve Google data. Error: " + e4);
}
};
function a(e3, t2, i2) {
n.O.debugMode && (console.log("Google Photos data:"), console.dir(i2));
var a2 = n.I[e3].GetID();
jQuery.each(i2, function(e4, i3) {
if ("object" == typeof i3 && null !== i3) {
var r2 = "", l2 = "";
"image" == t2 ? (void 0 !== i3.description && (r2 = i3.description), "" != n.O.thumbnailLabel.get("title") && (l2 = u(i3.filename))) : l2 = i3.title, null == l2 && (l2 = "");
var h2 = i3.id;
if ("album" == t2 && (!c(l2, h2) || null == i3.coverPhotoBaseUrl)) return true;
var d2 = NGY2Item.New(n, l2, r2, h2, a2, t2, ""), m2 = 0, p2 = 0, g2 = "";
"image" == t2 ? (g2 = i3.baseUrl, n.O.viewerZoom || null == n.O.viewerZoom ? g2 += "=h" + i3.mediaMetadata.height + "-w" + i3.mediaMetadata.width : window.screen.width > window.screen.height ? g2 += "=w" + window.screen.width : g2 = s + "=h" + window.screen.height, d2.setMediaURL(g2, "img"), void 0 !== i3.mediaMetadata.width && (d2.imageWidth = parseInt(i3.mediaMetadata.width), m2 = d2.imageWidth), void 0 !== i3.mediaMetadata.height && (d2.imageHeight = parseInt(i3.mediaMetadata.height), p2 = d2.imageHeight), void 0 !== i3.mediaMetadata.photo && (null != i3.mediaMetadata.photo.exposureTime && (d2.exif.exposure = i3.mediaMetadata.photo.exposureTime), null != i3.mediaMetadata.photo.focalLength && (d2.exif.focallength = i3.mediaMetadata.photo.focalLength), null != i3.mediaMetadata.photo.apertureFNumber && (d2.exif.fstop = i3.mediaMetadata.photo.apertureFNumber), null != i3.mediaMetadata.photo.isoEquivalent && (d2.exif.iso = i3.mediaMetadata.photo.isoEquivalent), null != i3.mediaMetadata.photo.cameraModel && (d2.exif.model = i3.mediaMetadata.photo.cameraModel)), void 0 !== i3.mediaMetadata.video && (null != i3.mediaMetadata.video.cameraModel && (d2.exif.model = i3.mediaMetadata.video.cameraModel), d2.downloadURL = i3.baseUrl + "=dv")) : d2.numberItems = i3.mediaItemsCount, d2.thumbs = o("l1", d2.thumbs, i3, t2, p2, m2), d2.thumbs = o("lN", d2.thumbs, i3, t2, p2, m2);
var f = n.O.fnProcessData;
null !== f && ("function" == typeof f ? f(d2, "google2", i3) : window[f](d2, "google2", i3));
}
}), n.I[e3].contentIsLoaded = true;
}
function o(e3, t2, i2, a2, o2, r2) {
for (var l2 = ["xs", "sm", "me", "la", "xl"], s2 = 0; s2 < l2.length; s2++) {
if ("image" == a2) {
if ("auto" == n.tn.settings.width[e3][l2[s2]]) {
let a3 = r2 / o2;
t2.height[e3][l2[s2]] = n.tn.settings.getH(e3, l2[s2]), t2.width[e3][l2[s2]] = n.tn.settings.getH(e3, l2[s2]) * a3, t2.url[e3][l2[s2]] = i2.baseUrl + "=h" + n.tn.settings.getH(e3, l2[s2]);
continue;
}
if ("auto" == n.tn.settings.height[e3][l2[s2]]) {
let a3 = o2 / r2;
t2.width[e3][l2[s2]] = n.tn.settings.getW(e3, l2[s2]), t2.height[e3][l2[s2]] = n.tn.settings.getW(e3, l2[s2]) * a3, t2.url[e3][l2[s2]] = i2.baseUrl + "=w" + n.tn.settings.getW(e3, l2[s2]);
continue;
}
t2.height[e3][l2[s2]] = n.tn.settings.getH(e3, l2[s2]), t2.width[e3][l2[s2]] = n.tn.settings.getW(e3, l2[s2]), t2.url[e3][l2[s2]] = i2.baseUrl + "=w" + n.tn.settings.getW(e3, l2[s2]);
}
if ("album" == a2) {
if ("auto" == n.tn.settings.width[e3][l2[s2]]) {
t2.url[e3][l2[s2]] = i2.coverPhotoBaseUrl + "=h" + n.tn.settings.getH(e3, l2[s2]);
continue;
}
if ("auto" == n.tn.settings.height[e3][l2[s2]]) {
t2.url[e3][l2[s2]] = i2.coverPhotoBaseUrl + "=w" + n.tn.settings.getW(e3, l2[s2]);
continue;
}
t2.url[e3][l2[s2]] = i2.coverPhotoBaseUrl + "=h" + n.tn.settings.getH(e3, l2[s2]) + "-w" + n.tn.settings.getW(e3, l2[s2]);
}
}
return t2;
}
var r = NGY2Tools.PreloaderDisplay.bind(n), l = NGY2Tools.NanoAlert, u = NGY2Tools.GetImageTitleFromURL.bind(n), c = NGY2Tools.FilterAlbumName.bind(n), h = NGY2Tools.AlbumPostProcess.bind(n);
switch (t) {
case "AlbumGetContent":
var d = arguments[2], m = arguments[3], p = arguments[4], g = arguments[5];
i(d, m, p, g);
}
};
}), /**!
* @preserve nanogallery2 - FLICKR data provider
* Homepage: http://nanogallery2.nanostudio.org
* Sources: https://github.com/nanostudio-org/nanogallery2
*
* License: GPLv3 and commercial licence
*
*/
function(e) {
"function" == typeof commonjsRequire ? e(commonjsRequire(["jquery", "nanogallery2"])) : e(jQuery);
}(function(e) {
jQuery.nanogallery2.data_flickr = function(e2, t) {
var n = e2, i = { url: function() {
return "https://api.flickr.com/services/rest/";
}, thumbSize: " sq", thumbAvailableSizes: new Array(75, 100, 150, 240, 500, 640), thumbAvailableSizesStr: new Array("sq", "t", "q", "s", "m", "z"), photoSize: "0", photoAvailableSizes: new Array(75, 100, 150, 240, 500, 640, 1024, 1024, 1600, 2048, 1e4), photoAvailableSizesStr: new Array("sq", "t", "q", "s", "m", "z", "b", "l", "h", "k", "o") }, a = function(e3, t2, a2, l2) {
"" == n.O.flickrAPIKey && h(n, "Please set your Flickr API Key (option flickrAPIKey)");
var s3 = NGY2Item.GetIdx(n, e3), d2 = "", m2 = "image";
"NONE" == n.O.photoset.toUpperCase() || "NONE" == n.O.album.toUpperCase() ? d2 = i.url() + "?&method=flickr.people.getPublicPhotos&api_key=" + n.O.flickrAPIKey + "&user_id=" + n.O.userID + "&extras=description,views,tags,url_o,url_sq,url_t,url_q,url_s,url_m,url_z,url_b,url_h,url_k&per_page=500&format=json" : 0 == n.I[s3].GetID() ? (d2 = i.url() + "?&method=flickr.photosets.getList&api_key=" + n.O.flickrAPIKey + "&user_id=" + n.O.userID + "&per_page=500&primary_photo_extras=tags,url_o,url_sq,url_t,url_q,url_s,url_m,url_l,url_z,url_b,url_h,url_k&format=json", m2 = "album") : d2 = i.url() + "?&method=flickr.photosets.getPhotos&api_key=" + n.O.flickrAPIKey + "&photoset_id=" + n.I[s3].GetID() + "&extras=description,views,tags,url_o,url_sq,url_t,url_q,url_s,url_m,url_l,url_z,url_b,url_h,url_k&format=json", n.O.debugMode && console.log("Flickr URL: " + d2), c(true), jQuery.ajaxSetup({ cache: false }), jQuery.support.cors = true;
var g2 = setTimeout(function() {
c(false), h(n, "Could not retrieve AJAX data...");
}, 6e4), f2 = [], b2 = function(i2, d3) {
jQuery.getJSON(i2 + "&page=" + d3 + "&jsoncallback=?", function(v2, O, y) {
var G = 0;
if ("album" == m2) {
if (void 0 !== v2.stat && "fail" === v2.stat) return h(n, "Could not retrieve Flickr album list: " + v2.message + " (code: " + v2.code + ")."), false;
f2 = f2.concat(v2.photosets.photoset), G = v2.photosets.pages;
} else if ("NONE" == n.O.photoset.toUpperCase() || "NONE" == n.O.album.toUpperCase()) f2 = f2.concat(v2.photos.photo), G = v2.photos.pages;
else {
if (void 0 !== v2.stat && "fail" === v2.stat) return h(n, "Could not retrieve Flickr album: " + v2.message + " (code: " + v2.code + ")."), false;
"" == n.I[s3].title && (n.I[s3].title = v2.photoset.title), f2 = f2.concat(v2.photoset.photo), G = v2.photoset.pages;
}
G > d3 ? b2(i2, d3 + 1) : (clearTimeout(g2), c(false), f2 = u(f2, n.O.tagBlockList), "album" == m2 ? r(s3, e3, f2) : o(s3, e3, f2), p(e3), null != t2 && t2(a2, l2, null));
}).fail(function(e4, t3, i3) {
clearTimeout(g2), c(false), h(n, "Could not retrieve Flickr ajax data: " + t3 + ", " + i3);
});
};
b2(d2, 1);
};
function o(e3, t2, a2) {
n.O.debugMode && (console.log("Flickr parse photos:"), console.dir(a2)), jQuery.each(a2, function(e4, a3) {
var o2 = a3.id, r2 = a3.url_sq, s3 = a3.title;
"" != n.O.thumbnailLabel.get("title") && (s3 = d(r2));
var u2 = a3.description._content, c2 = 75, h2 = 75, m2 = i.photoAvailableSizesStr.length - 1;
n.O.flickrSkipOriginal && m2--;
for (e4 = m2; e4 >= 0; e4--) if (null != a3["url_" + i.photoAvailableSizesStr[e4]]) {
r2 = a3["url_" + i.photoAvailableSizesStr[e4]], c2 = parseInt(a3["width_" + i.photoAvailableSizesStr[e4]]), h2 = parseInt(a3["height_" + i.photoAvailableSizesStr[e4]]);
break;
}
for (var g2 in a3) 0 != g2.indexOf("height_") && 0 != g2.indexOf("width_") && 0 != g2.indexOf("url_") || a3[g2];
var f2 = void 0 !== a3.tags ? a3.tags : "", b2 = NGY2Item.New(n, s3, u2, o2, t2, "image", f2);
b2.setMediaURL(r2, "img"), b2.imageWidth = c2, b2.imageHeight = h2;
var v2 = { url: { l1: { xs: "", sm: "", me: "", la: "", xl: "" }, lN: { xs: "", sm: "", me: "", la: "", xl: "" } }, width: { l1: { xs: 0, sm: 0, me: 0, la: 0, xl: 0 }, lN: { xs: 0, sm: 0, me: 0, la: 0, xl: 0 } }, height: { l1: { xs: 0, sm: 0, me: 0, la: 0, xl: 0 }, lN: { xs: 0, sm: 0, me: 0, la: 0, xl: 0 } } };
v2 = l(v2, a3, "l1"), v2 = l(v2, a3, "lN"), b2.thumbs = v2;
var O = n.O.fnProcessData;
null !== O && ("function" == typeof O ? O(b2, "flickr", a3) : window[O](b2, "flickr", a3));
}), n.I[e3].contentIsLoaded = true;
}
function r(e3, t2, i2) {
n.O.debugMode && (console.log("Flickr parse list of albums:"), console.dir(i2)), jQuery.each(i2, function(e4, i3) {
var a2 = i3.title._content;
if (0 == i3.visibility_can_see_set) return true;
if (m(a2, i3.id)) {
var o2 = i3.id, r2 = null != i3.description._content ? i3.description._content : "", s3 = {};
for (var u2 in i3.primary_photo_extras) s3[u2] = i3.primary_photo_extras[u2];
var c2 = "";
void 0 !== i3.primary_photo_extras && void 0 !== i3.primary_photo_extras.tags && (c2 = i3.primary_photo_extras.tags);
var h2 = NGY2Item.New(n, a2, r2, o2, t2, "album", c2);
h2.numberItems = i3.photos, h2.thumbSizes = s3;
var d2 = { url: { l1: { xs: "", sm: "", me: "", la: "", xl: "" }, lN: { xs: "", sm: "", me: "", la: "", xl: "" } }, width: { l1: { xs: 0, sm: 0, me: 0, la: 0, xl: 0 }, lN: { xs: 0, sm: 0, me: 0, la: 0, xl: 0 } }, height: { l1: { xs: 0, sm: 0, me: 0, la: 0, xl: 0 }, lN: { xs: 0, sm: 0, me: 0, la: 0, xl: 0 } } };
d2 = l(d2, i3.primary_photo_extras, "l1"), d2 = l(d2, i3.primary_photo_extras, "lN"), h2.thumbs = d2;
var p2 = n.O.fnProcessData;
null !== p2 && ("function" == typeof p2 ? p2(h2, "flickr", i3) : window[p2](h2, "flickr", i3));
}
}), n.I[e3].contentIsLoaded = true;
}
function l(e3, t2, i2) {
var a2 = 1;
true === n.tn.opt[i2].crop && (a2 = n.O.thumbnailCropScaleFactor);
for (var o2 = ["xs", "sm", "me", "la", "xl"], r2 = 0; r2 < o2.length; r2++) if ("auto" == n.tn.settings.width[i2][o2[r2]] || "" == n.tn.settings.width[i2][o2[r2]]) {
let l2 = s2("height_", Math.ceil(n.tn.settings.height[i2][o2[r2]] * n.tn.scale * a2 * n.tn.settings.mosaic[i2 + "Factor"].h[o2[r2]]), t2);
e3.url[i2][o2[r2]] = l2.url, e3.width[i2][o2[r2]] = l2.width, e3.height[i2][o2[r2]] = l2.height;
} else if ("auto" == n.tn.settings.height[i2][o2[r2]] || "" == n.tn.settings.height[i2][o2[r2]]) {
let l2 = s2("width_", Math.ceil(n.tn.settings.width[i2][o2[r2]] * n.tn.scale * a2 * n.tn.settings.mosaic[i2 + "Factor"].w[o2[r2]]), t2);
e3.url[i2][o2[r2]] = l2.url, e3.width[i2][o2[r2]] = l2.width, e3.height[i2][o2[r2]] = l2.height;
} else {
let l2 = "height_", u2 = Math.ceil(n.tn.settings.height[i2][o2[r2]] * n.tn.scale * a2 * n.tn.settings.mosaic[i2 + "Factor"].h[o2[r2]]);
n.tn.settings.width[i2][o2[r2]] > n.tn.settings.height[i2][o2[r2]] && (l2 = "width_", u2 = Math.ceil(n.tn.settings.width[i2][o2[r2]] * n.tn.scale * a2 * n.tn.settings.mosaic[i2 + "Factor"].w[o2[r2]]));
let c2 = s2(l2, u2, t2);
e3.url[i2][o2[r2]] = c2.url, e3.width[i2][o2[r2]] = c2.width, e3.height[i2][o2[r2]] = c2.height;
}
return e3;
}
function s2(e3, t2, n2) {
for (var a2 = { url: "", width: 0, height: 0 }, o2 = 0, r2 = 0; r2 < i.thumbAvailableSizes.length; r2++) {
var l2 = n2[e3 + i.photoAvailableSizesStr[r2]];
if (null != l2 && (o2 = r2, l2 >= t2)) break;
}
var s3 = i.photoAvailableSizesStr[o2];
return a2.url = n2["url_" + s3], a2.width = parseInt(n2["width_" + s3]), a2.height = parseInt(n2["height_" + s3]), a2;
}
var u = function(e3, t2) {
return "" != t2 && null != e3 && (e3 = e3.filter(function(e4) {
var n2 = new RegExp(t2, "i"), i2 = [e4.tags];
return Array.isArray(e4.tags) && (i2 = e4.tags), !i2.some(function(e5) {
return n2.test(e5);
});
})), e3;
};
var c = NGY2Tools.PreloaderDisplay.bind(n), h = NGY2Tools.NanoAlert, d = NGY2Tools.GetImageTitleFromURL.bind(n), m = NGY2Tools.FilterAlbumName.bind(n), p = NGY2Tools.AlbumPostProcess.bind(n);
switch (t) {
case "AlbumGetContent":
var g = arguments[2], f = arguments[3], b = arguments[4], v = arguments[5];
a(g, f, b, v);
}
};
});
})(jquery_nanogallery2_min);
window.$ = window.jQuery = $;