/*! jquery migrate v1.4.1 | (c) jquery foundation and other contributors | jquery.org/license */
"undefined" == typeof jquery.migratemute && (jquery.migratemute = !0),
function(a, b, c) {
function d(c) {
var d = b.console;
f[c] || (f[c] = !0, a.migratewarnings.push(c), d && d.warn && !a.migratemute && (d.warn("jqmigrate: " + c), a.migratetrace && d.trace && d.trace()))
}
function e(b, c, e, f) {
if (object.defineproperty) try {
return void object.defineproperty(b, c, {
configurable: !0,
enumerable: !0,
get: function() {
return d(f), e
},
set: function(a) {
d(f), e = a
}
})
} catch (g) {}
a._definepropertybroken = !0, b[c] = e
}
a.migrateversion = "1.4.1";
var f = {};
a.migratewarnings = [], b.console && b.console.log && b.console.log("jqmigrate: migrate is installed" + (a.migratemute ? "" : " with logging active") + ", version " + a.migrateversion), a.migratetrace === c && (a.migratetrace = !0), a.migratereset = function() {
f = {}, a.migratewarnings.length = 0
}, "backcompat" === document.compatmode && d("jquery is not compatible with quirks mode");
var g = a("", {
size: 1
}).attr("size") && a.attrfn,
h = a.attr,
i = a.attrhooks.value && a.attrhooks.value.get || function() {
return null
},
j = a.attrhooks.value && a.attrhooks.value.set || function() {
return c
},
k = /^(?:input|button)$/i,
l = /^[238]$/,
m = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,
n = /^(?:checked|selected)$/i;
e(a, "attrfn", g || {}, "jquery.attrfn is deprecated"), a.attr = function(b, e, f, i) {
var j = e.tolowercase(),
o = b && b.nodetype;
return i && (h.length < 4 && d("jquery.fn.attr( props, pass ) is deprecated"), b && !l.test(o) && (g ? e in g : a.isfunction(a.fn[e]))) ? a(b)[e](f) : ("type" === e && f !== c && k.test(b.nodename) && b.parentnode && d("can't change the 'type' of an input or button in ie 6/7/8"), !a.attrhooks[j] && m.test(j) && (a.attrhooks[j] = {
get: function(b, d) {
var e, f = a.prop(b, d);
return f === !0 || "boolean" != typeof f && (e = b.getattributenode(d)) && e.nodevalue !== !1 ? d.tolowercase() : c
},
set: function(b, c, d) {
var e;
return c === !1 ? a.removeattr(b, d) : (e = a.propfix[d] || d, e in b && (b[e] = !0), b.setattribute(d, d.tolowercase())), d
}
}, n.test(j) && d("jquery.fn.attr('" + j + "') might use property instead of attribute")), h.call(a, b, e, f))
}, a.attrhooks.value = {
get: function(a, b) {
var c = (a.nodename || "").tolowercase();
return "button" === c ? i.apply(this, arguments) : ("input" !== c && "option" !== c && d("jquery.fn.attr('value') no longer gets properties"), b in a ? a.value : null)
},
set: function(a, b) {
var c = (a.nodename || "").tolowercase();
return "button" === c ? j.apply(this, arguments) : ("input" !== c && "option" !== c && d("jquery.fn.attr('value', val) no longer sets properties"), void(a.value = b))
}
};
var o, p, q = a.fn.init,
r = a.find,
s = a.parsejson,
t = /^\s*,
u = /\[(\s*[-\w]+\s*)([~|^$*]?=)\s*([-\w#]*?#[-\w#]*)\s*\]/,
v = /\[(\s*[-\w]+\s*)([~|^$*]?=)\s*([-\w#]*?#[-\w#]*)\s*\]/g,
w = /^([^<]*)(<[\w\w]+>)([^>]*)$/;
a.fn.init = function(b, e, f) {
var g, h;
return b && "string" == typeof b && !a.isplainobject(e) && (g = w.exec(a.trim(b))) && g[0] && (t.test(b) || d("$(html) html strings must start with '<' character"), g[3] && d("$(html) html text after last tag is ignored"), "#" === g[0].charat(0) && (d("html string cannot start with a '#' character"), a.error("jqmigrate: invalid selector string (xss)")), e && e.context && e.context.nodetype && (e = e.context), a.parsehtml) ? q.call(this, a.parsehtml(g[2], e && e.ownerdocument || e || document, !0), e, f) : (h = q.apply(this, arguments), b && b.selector !== c ? (h.selector = b.selector, h.context = b.context) : (h.selector = "string" == typeof b ? b : "", b && (h.context = b.nodetype ? b : e || document)), h)
}, a.fn.init.prototype = a.fn, a.find = function(a) {
var b = array.prototype.slice.call(arguments);
if ("string" == typeof a && u.test(a)) try {
document.queryselector(a)
} catch (c) {
a = a.replace(v, function(a, b, c, d) {
return "[" + b + c + '"' + d + '"]'
});
try {
document.queryselector(a), d("attribute selector with '#' must be quoted: " + b[0]), b[0] = a
} catch (e) {
d("attribute selector with '#' was not fixed: " + b[0])
}
}
return r.apply(this, b)
};
var x;
for (x in r) object.prototype.hasownproperty.call(r, x) && (a.find[x] = r[x]);
a.parsejson = function(a) {
return a ? s.apply(this, arguments) : (d("jquery.parsejson requires a valid json string"), null)
}, a.uamatch = function(a) {
a = a.tolowercase();
var b = /(chrome)[ \/]([\w.]+)/.exec(a) || /(webkit)[ \/]([\w.]+)/.exec(a) || /(opera)(?:.*version|)[ \/]([\w.]+)/.exec(a) || /(msie) ([\w.]+)/.exec(a) || a.indexof("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(a) || [];
return {
browser: b[1] || "",
version: b[2] || "0"
}
}, a.browser || (o = a.uamatch(navigator.useragent), p = {}, o.browser && (p[o.browser] = !0, p.version = o.version), p.chrome ? p.webkit = !0 : p.webkit && (p.safari = !0), a.browser = p), e(a, "browser", a.browser, "jquery.browser is deprecated"), a.boxmodel = a.support.boxmodel = "css1compat" === document.compatmode, e(a, "boxmodel", a.boxmodel, "jquery.boxmodel is deprecated"), e(a.support, "boxmodel", a.support.boxmodel, "jquery.support.boxmodel is deprecated"), a.sub = function() {
function b(a, c) {
return new b.fn.init(a, c)
}
a.extend(!0, b, this), b.superclass = this, b.fn = b.prototype = this(), b.fn.constructor = b, b.sub = this.sub, b.fn.init = function(d, e) {
var f = a.fn.init.call(this, d, e, c);
return f instanceof b ? f : b(f)
}, b.fn.init.prototype = b.fn;
var c = b(document);
return d("jquery.sub() is deprecated"), b
}, a.fn.size = function() {
return d("jquery.fn.size() is deprecated; use the .length property"), this.length
};
var y = !1;
a.swap && a.each(["height", "width", "reliablemarginright"], function(b, c) {
var d = a.csshooks[c] && a.csshooks[c].get;
d && (a.csshooks[c].get = function() {
var a;
return y = !0, a = d.apply(this, arguments), y = !1, a
})
}), a.swap = function(a, b, c, e) {
var f, g, h = {};
y || d("jquery.swap() is undocumented and deprecated");
for (g in b) h[g] = a.style[g], a.style[g] = b[g];
f = c.apply(a, e || []);
for (g in b) a.style[g] = h[g];
return f
}, a.ajaxsetup({
converters: {
"text json": a.parsejson
}
});
var z = a.fn.data;
a.fn.data = function(b) {
var e, f, g = this[0];
return !g || "events" !== b || 1 !== arguments.length || (e = a.data(g, b), f = a._data(g, b), e !== c && e !== f || f === c) ? z.apply(this, arguments) : (d("use of jquery.fn.data('events') is deprecated"), f)
};
var a = /\/(java|ecma)script/i;
a.clean || (a.clean = function(b, c, e, f) {
c = c || document, c = !c.nodetype && c[0] || c, c = c.ownerdocument || c, d("jquery.clean() is deprecated");
var g, h, i, j, k = [];
if (a.merge(k, a.buildfragment(b, c).childnodes), e)
for (i = function(a) {
return !a.type || a.test(a.type) ? f ? f.push(a.parentnode ? a.parentnode.removechild(a) : a) : e.appendchild(a) : void 0
}, g = 0; null != (h = k[g]); g++) a.nodename(h, "script") && i(h) || (e.appendchild(h), "undefined" != typeof h.getelementsbytagname && (j = a.grep(a.merge([], h.getelementsbytagname("script")), i), k.splice.apply(k, [g + 1, 0].concat(j)), g += j.length));
return k
});
var b = a.event.add,
c = a.event.remove,
d = a.event.trigger,
e = a.fn.toggle,
f = a.fn.live,
g = a.fn.die,
h = a.fn.load,
i = "ajaxstart|ajaxstop|ajaxsend|ajaxcomplete|ajaxerror|ajaxsuccess",
j = new regexp("\\b(?:" + i + ")\\b"),
k = /(?:^|\s)hover(\.\s+|)\b/,
l = function(b) {
return "string" != typeof b || a.event.special.hover ? b : (k.test(b) && d("'hover' pseudo-event is deprecated, use 'mouseenter mouseleave'"), b && b.replace(k, "mouseenter$1 mouseleave$1"))
};
a.event.props && "attrchange" !== a.event.props[0] && a.event.props.unshift("attrchange", "attrname", "relatednode", "srcelement"), a.event.dispatch && e(a.event, "handle", a.event.dispatch, "jquery.event.handle is undocumented and deprecated"), a.event.add = function(a, b, c, e, f) {
a !== document && j.test(b) && d("ajax events should be attached to document: " + b), b.call(this, a, l(b || ""), c, e, f)
}, a.event.remove = function(a, b, c, d, e) {
c.call(this, a, l(b) || "", c, d, e)
}, a.each(["load", "unload", "error"], function(b, c) {
a.fn[c] = function() {
var a = array.prototype.slice.call(arguments, 0);
return "load" === c && "string" == typeof a[0] ? h.apply(this, a) : (d("jquery.fn." + c + "() is deprecated"), a.splice(0, 0, c), arguments.length ? this.bind.apply(this, a) : (this.triggerhandler.apply(this, a), this))
}
}), a.fn.toggle = function(b, c) {
if (!a.isfunction(b) || !a.isfunction(c)) return e.apply(this, arguments);
d("jquery.fn.toggle(handler, handler...) is deprecated");
var e = arguments,
f = b.guid || a.guid++,
g = 0,
h = function(c) {
var d = (a._data(this, "lasttoggle" + b.guid) || 0) % g;
return a._data(this, "lasttoggle" + b.guid, d + 1), c.preventdefault(), e[d].apply(this, arguments) || !1
};
for (h.guid = f; g < e.length;) e[g++].guid = f;
return this.click(h)
}, a.fn.live = function(b, c, e) {
return d("jquery.fn.live() is deprecated"), f ? f.apply(this, arguments) : (a(this.context).on(b, this.selector, c, e), this)
}, a.fn.die = function(b, c) {
return d("jquery.fn.die() is deprecated"), g ? g.apply(this, arguments) : (a(this.context).off(b, this.selector || "**", c), this)
}, a.event.trigger = function(a, b, c, e) {
return c || j.test(a) || d("global events are undocumented and deprecated"), d.call(this, a, b, c || document, e)
}, a.each(i.split("|"), function(b, c) {
a.event.special[c] = {
setup: function() {
var b = this;
return b !== document && (a.event.add(document, c + "." + a.guid, function() {
a.event.trigger(c, array.prototype.slice.call(arguments, 1), b, !0)
}), a._data(this, c, a.guid++)), !1
},
teardown: function() {
return this !== document && a.event.remove(document, c + "." + a._data(this, c)), !1
}
}
}), a.event.special.ready = {
setup: function() {
this === document && d("'ready' event is deprecated")
}
};
var m = a.fn.andself || a.fn.addback,
n = a.fn.find;
if (a.fn.andself = function() {
return d("jquery.fn.andself() replaced by jquery.fn.addback()"), m.apply(this, arguments)
}, a.fn.find = function(a) {
var b = n.apply(this, arguments);
return b.context = this.context, b.selector = this.selector ? this.selector + " " + a : a, b
}, a.callbacks) {
var o = a.deferred,
p = [
["resolve", "done", a.callbacks("once memory"), a.callbacks("once memory"), "resolved"],
["reject", "fail", a.callbacks("once memory"), a.callbacks("once memory"), "rejected"],
["notify", "progress", a.callbacks("memory"), a.callbacks("memory")]
];
a.deferred = function(b) {
var c = o(),
e = c.promise();
return c.pipe = e.pipe = function() {
var b = arguments;
return d("deferred.pipe() is deprecated"), a.deferred(function(d) {
a.each(p, function(f, g) {
var h = a.isfunction(b[f]) && b[f];
c[g[1]](function() {
var b = h && h.apply(this, arguments);
b && a.isfunction(b.promise) ? b.promise().done(d.resolve).fail(d.reject).progress(d.notify) : d[g[0] + "with"](this === e ? d.promise() : this, h ? [b] : arguments)
})
}), b = null
}).promise()
}, c.isresolved = function() {
return d("deferred.isresolved is deprecated"), "resolved" === c.state()
}, c.isrejected = function() {
return d("deferred.isrejected is deprecated"), "rejected" === c.state()
}, b && b.call(c, c), c
}
}
}(jquery, window);
/*!
* bootstrap v4.4.1 (https://getbootstrap.com/)
* copyright 2011-2019 the bootstrap authors (https://github.com/twbs/bootstrap/graphs/contributors)
* licensed under mit (https://github.com/twbs/bootstrap/blob/master/license)
*/
(function(global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('jquery'), require('popper.js')) : typeof define === 'function' && define.amd ? define(['exports', 'jquery', 'popper.js'], factory) : (global = global || self, factory(global.bootstrap = {}, global.jquery, global.popper))
}(this, (function(exports, $, popper) {
'use strict';
$ = $ && $.hasownproperty('default') ? $['default'] : $;
popper = popper && popper.hasownproperty('default') ? popper['default'] : popper;
function _defineproperties(target, props) {
for (var i = 0; i < props.length; i++) {
var descriptor = props[i];
descriptor.enumerable = descriptor.enumerable || !1;
descriptor.configurable = !0;
if ("value" in descriptor) descriptor.writable = !0;
object.defineproperty(target, descriptor.key, descriptor)
}
}
function _createclass(constructor, protoprops, staticprops) {
if (protoprops) _defineproperties(constructor.prototype, protoprops);
if (staticprops) _defineproperties(constructor, staticprops);
return constructor
}
function _defineproperty(obj, key, value) {
if (key in obj) {
object.defineproperty(obj, key, {
value: value,
enumerable: !0,
configurable: !0,
writable: !0
})
} else {
obj[key] = value
}
return obj
}
function ownkeys(object, enumerableonly) {
var keys = object.keys(object);
if (object.getownpropertysymbols) {
var symbols = object.getownpropertysymbols(object);
if (enumerableonly) symbols = symbols.filter(function(sym) {
return object.getownpropertydescriptor(object, sym).enumerable
});
keys.push.apply(keys, symbols)
}
return keys
}
function _objectspread2(target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i] != null ? arguments[i] : {};
if (i % 2) {
ownkeys(object(source), !0).foreach(function(key) {
_defineproperty(target, key, source[key])
})
} else if (object.getownpropertydescriptors) {
object.defineproperties(target, object.getownpropertydescriptors(source))
} else {
ownkeys(object(source)).foreach(function(key) {
object.defineproperty(target, key, object.getownpropertydescriptor(source, key))
})
}
}
return target
}
function _inheritsloose(subclass, superclass) {
subclass.prototype = object.create(superclass.prototype);
subclass.prototype.constructor = subclass;
subclass.__proto__ = superclass
}
var transition_end = 'transitionend';
var max_uid = 1000000;
var milliseconds_multiplier = 1000;
function totype(obj) {
return {}.tostring.call(obj).match(/\s([a-z]+)/i)[1].tolowercase()
}
function getspecialtransitionendevent() {
return {
bindtype: transition_end,
delegatetype: transition_end,
handle: function handle(event) {
if ($(event.target).is(this)) {
return event.handleobj.handler.apply(this, arguments)
}
return undefined
}
}
}
function transitionendemulator(duration) {
var _this = this;
var called = !1;
$(this).one(util.transition_end, function() {
called = !0
});
settimeout(function() {
if (!called) {
util.triggertransitionend(_this)
}
}, duration);
return this
}
function settransitionendsupport() {
$.fn.emulatetransitionend = transitionendemulator;
$.event.special[util.transition_end] = getspecialtransitionendevent()
}
var util = {
transition_end: 'bstransitionend',
getuid: function getuid(prefix) {
do {
prefix += ~~(math.random() * max_uid)
} while (document.getelementbyid(prefix));
return prefix
},
getselectorfromelement: function getselectorfromelement(element) {
var selector = element.getattribute('data-target');
if (!selector || selector === '#') {
var hrefattr = element.getattribute('href');
selector = hrefattr && hrefattr !== '#' ? hrefattr.trim() : ''
}
try {
return document.queryselector(selector) ? selector : null
} catch (err) {
return null
}
},
gettransitiondurationfromelement: function gettransitiondurationfromelement(element) {
if (!element) {
return 0
}
var transitionduration = $(element).css('transition-duration');
var transitiondelay = $(element).css('transition-delay');
var floattransitionduration = parsefloat(transitionduration);
var floattransitiondelay = parsefloat(transitiondelay);
if (!floattransitionduration && !floattransitiondelay) {
return 0
}
transitionduration = transitionduration.split(',')[0];
transitiondelay = transitiondelay.split(',')[0];
return (parsefloat(transitionduration) + parsefloat(transitiondelay)) * milliseconds_multiplier
},
reflow: function reflow(element) {
return element.offsetheight
},
triggertransitionend: function triggertransitionend(element) {
$(element).trigger(transition_end)
},
supportstransitionend: function supportstransitionend() {
return boolean(transition_end)
},
iselement: function iselement(obj) {
return (obj[0] || obj).nodetype
},
typecheckconfig: function typecheckconfig(componentname, config, configtypes) {
for (var property in configtypes) {
if (object.prototype.hasownproperty.call(configtypes, property)) {
var expectedtypes = configtypes[property];
var value = config[property];
var valuetype = value && util.iselement(value) ? 'element' : totype(value);
if (!new regexp(expectedtypes).test(valuetype)) {
throw new error(componentname.touppercase() + ": " + ("option \"" + property + "\" provided type \"" + valuetype + "\" ") + ("but expected type \"" + expectedtypes + "\"."))
}
}
}
},
findshadowroot: function findshadowroot(element) {
if (!document.documentelement.attachshadow) {
return null
}
if (typeof element.getrootnode === 'function') {
var root = element.getrootnode();
return root instanceof shadowroot ? root : null
}
if (element instanceof shadowroot) {
return element
}
if (!element.parentnode) {
return null
}
return util.findshadowroot(element.parentnode)
},
jquerydetection: function jquerydetection() {
if (typeof $ === 'undefined') {
throw new typeerror('bootstrap\'s javascript requires jquery. jquery must be included before bootstrap\'s javascript.')
}
var version = $.fn.jquery.split(' ')[0].split('.');
var minmajor = 1;
var ltmajor = 2;
var minminor = 9;
var minpatch = 1;
var maxmajor = 4;
if (version[0] < ltmajor && version[1] < minminor || version[0] === minmajor && version[1] === minminor && version[2] < minpatch || version[0] >= maxmajor) {
throw new error('bootstrap\'s javascript requires at least jquery v1.9.1 but less than v4.0.0')
}
}
};
util.jquerydetection();
settransitionendsupport();
var name = 'alert';
var version = '4.4.1';
var data_key = 'bs.alert';
var event_key = "." + data_key;
var data_api_key = '.data-api';
var jquery_no_conflict = $.fn[name];
var selector = {
dismiss: '[data-dismiss="alert"]'
};
var event = {
close: "close" + event_key,
closed: "closed" + event_key,
click_data_api: "click" + event_key + data_api_key
};
var classname = {
alert: 'alert',
fade: 'fade',
show: 'show'
};
var alert = function() {
function alert(element) {
this._element = element
}
var _proto = alert.prototype;
_proto.close = function close(element) {
var rootelement = this._element;
if (element) {
rootelement = this._getrootelement(element)
}
var customevent = this._triggercloseevent(rootelement);
if (customevent.isdefaultprevented()) {
return
}
this._removeelement(rootelement)
};
_proto.dispose = function dispose() {
$.removedata(this._element, data_key);
this._element = null
};
_proto._getrootelement = function _getrootelement(element) {
var selector = util.getselectorfromelement(element);
var parent = !1;
if (selector) {
parent = document.queryselector(selector)
}
if (!parent) {
parent = $(element).closest("." + classname.alert)[0]
}
return parent
};
_proto._triggercloseevent = function _triggercloseevent(element) {
var closeevent = $.event(event.close);
$(element).trigger(closeevent);
return closeevent
};
_proto._removeelement = function _removeelement(element) {
var _this = this;
$(element).removeclass(classname.show);
if (!$(element).hasclass(classname.fade)) {
this._destroyelement(element);
return
}
var transitionduration = util.gettransitiondurationfromelement(element);
$(element).one(util.transition_end, function(event) {
return _this._destroyelement(element, event)
}).emulatetransitionend(transitionduration)
};
_proto._destroyelement = function _destroyelement(element) {
$(element).detach().trigger(event.closed).remove()
};
alert._jqueryinterface = function _jqueryinterface(config) {
return this.each(function() {
var $element = $(this);
var data = $element.data(data_key);
if (!data) {
data = new alert(this);
$element.data(data_key, data)
}
if (config === 'close') {
data[config](this)
}
})
};
alert._handledismiss = function _handledismiss(alertinstance) {
return function(event) {
if (event) {
event.preventdefault()
}
alertinstance.close(this)
}
};
_createclass(alert, null, [{
key: "version",
get: function get() {
return version
}
}]);
return alert
}();
$(document).on(event.click_data_api, selector.dismiss, alert._handledismiss(new alert()));
$.fn[name] = alert._jqueryinterface;
$.fn[name].constructor = alert;
$.fn[name].noconflict = function() {
$.fn[name] = jquery_no_conflict;
return alert._jqueryinterface
};
var name$1 = 'button';
var version$1 = '4.4.1';
var data_key$1 = 'bs.button';
var event_key$1 = "." + data_key$1;
var data_api_key$1 = '.data-api';
var jquery_no_conflict$1 = $.fn[name$1];
var classname$1 = {
active: 'active',
button: 'btn',
focus: 'focus'
};
var selector$1 = {
data_toggle_carrot: '[data-toggle^="button"]',
data_toggles: '[data-toggle="buttons"]',
data_toggle: '[data-toggle="button"]',
data_toggles_buttons: '[data-toggle="buttons"] .btn',
input: 'input:not([type="hidden"])',
active: '.active',
button: '.btn'
};
var event$1 = {
click_data_api: "click" + event_key$1 + data_api_key$1,
focus_blur_data_api: "focus" + event_key$1 + data_api_key$1 + " " + ("blur" + event_key$1 + data_api_key$1),
load_data_api: "load" + event_key$1 + data_api_key$1
};
var button = function() {
function button(element) {
this._element = element
}
var _proto = button.prototype;
_proto.toggle = function toggle() {
var triggerchangeevent = !0;
var addariapressed = !0;
var rootelement = $(this._element).closest(selector$1.data_toggles)[0];
if (rootelement) {
var input = this._element.queryselector(selector$1.input);
if (input) {
if (input.type === 'radio') {
if (input.checked && this._element.classlist.contains(classname$1.active)) {
triggerchangeevent = !1
} else {
var activeelement = rootelement.queryselector(selector$1.active);
if (activeelement) {
$(activeelement).removeclass(classname$1.active)
}
}
} else if (input.type === 'checkbox') {
if (this._element.tagname === 'label' && input.checked === this._element.classlist.contains(classname$1.active)) {
triggerchangeevent = !1
}
} else {
triggerchangeevent = !1
}
if (triggerchangeevent) {
input.checked = !this._element.classlist.contains(classname$1.active);
$(input).trigger('change')
}
input.focus();
addariapressed = !1
}
}
if (!(this._element.hasattribute('disabled') || this._element.classlist.contains('disabled'))) {
if (addariapressed) {
this._element.setattribute('aria-pressed', !this._element.classlist.contains(classname$1.active))
}
if (triggerchangeevent) {
$(this._element).toggleclass(classname$1.active)
}
}
};
_proto.dispose = function dispose() {
$.removedata(this._element, data_key$1);
this._element = null
};
button._jqueryinterface = function _jqueryinterface(config) {
return this.each(function() {
var data = $(this).data(data_key$1);
if (!data) {
data = new button(this);
$(this).data(data_key$1, data)
}
if (config === 'toggle') {
data[config]()
}
})
};
_createclass(button, null, [{
key: "version",
get: function get() {
return version$1
}
}]);
return button
}();
$(document).on(event$1.click_data_api, selector$1.data_toggle_carrot, function(event) {
var button = event.target;
if (!$(button).hasclass(classname$1.button)) {
button = $(button).closest(selector$1.button)[0]
}
if (!button || button.hasattribute('disabled') || button.classlist.contains('disabled')) {
event.preventdefault()
} else {
var inputbtn = button.queryselector(selector$1.input);
if (inputbtn && (inputbtn.hasattribute('disabled') || inputbtn.classlist.contains('disabled'))) {
event.preventdefault();
return
}
button._jqueryinterface.call($(button), 'toggle')
}
}).on(event$1.focus_blur_data_api, selector$1.data_toggle_carrot, function(event) {
var button = $(event.target).closest(selector$1.button)[0];
$(button).toggleclass(classname$1.focus, /^focus(in)?$/.test(event.type))
});
$(window).on(event$1.load_data_api, function() {
var buttons = [].slice.call(document.queryselectorall(selector$1.data_toggles_buttons));
for (var i = 0, len = buttons.length; i < len; i++) {
var button = buttons[i];
var input = button.queryselector(selector$1.input);
if (input.checked || input.hasattribute('checked')) {
button.classlist.add(classname$1.active)
} else {
button.classlist.remove(classname$1.active)
}
}
buttons = [].slice.call(document.queryselectorall(selector$1.data_toggle));
for (var _i = 0, _len = buttons.length; _i < _len; _i++) {
var _button = buttons[_i];
if (_button.getattribute('aria-pressed') === 'true') {
_button.classlist.add(classname$1.active)
} else {
_button.classlist.remove(classname$1.active)
}
}
});
$.fn[name$1] = button._jqueryinterface;
$.fn[name$1].constructor = button;
$.fn[name$1].noconflict = function() {
$.fn[name$1] = jquery_no_conflict$1;
return button._jqueryinterface
};
var name$2 = 'carousel';
var version$2 = '4.4.1';
var data_key$2 = 'bs.carousel';
var event_key$2 = "." + data_key$2;
var data_api_key$2 = '.data-api';
var jquery_no_conflict$2 = $.fn[name$2];
var arrow_left_keycode = 37;
var arrow_right_keycode = 39;
var touchevent_compat_wait = 500;
var swipe_threshold = 40;
var default = {
interval: 5000,
keyboard: !0,
slide: !1,
pause: 'hover',
wrap: !0,
touch: !0
};
var defaulttype = {
interval: '(number|boolean)',
keyboard: 'boolean',
slide: '(boolean|string)',
pause: '(string|boolean)',
wrap: 'boolean',
touch: 'boolean'
};
var direction = {
next: 'next',
prev: 'prev',
left: 'left',
right: 'right'
};
var event$2 = {
slide: "slide" + event_key$2,
slid: "slid" + event_key$2,
keydown: "keydown" + event_key$2,
mouseenter: "mouseenter" + event_key$2,
mouseleave: "mouseleave" + event_key$2,
touchstart: "touchstart" + event_key$2,
touchmove: "touchmove" + event_key$2,
touchend: "touchend" + event_key$2,
pointerdown: "pointerdown" + event_key$2,
pointerup: "pointerup" + event_key$2,
drag_start: "dragstart" + event_key$2,
load_data_api: "load" + event_key$2 + data_api_key$2,
click_data_api: "click" + event_key$2 + data_api_key$2
};
var classname$2 = {
carousel: 'carousel',
active: 'active',
slide: 'slide',
right: 'carousel-item-right',
left: 'carousel-item-left',
next: 'carousel-item-next',
prev: 'carousel-item-prev',
item: 'carousel-item',
pointer_event: 'pointer-event'
};
var selector$2 = {
active: '.active',
active_item: '.active.carousel-item',
item: '.carousel-item',
item_img: '.carousel-item img',
next_prev: '.carousel-item-next, .carousel-item-prev',
indicators: '.carousel-indicators',
data_slide: '[data-slide], [data-slide-to]',
data_ride: '[data-ride="carousel"]'
};
var pointertype = {
touch: 'touch',
pen: 'pen'
};
var carousel = function() {
function carousel(element, config) {
this._items = null;
this._interval = null;
this._activeelement = null;
this._ispaused = !1;
this._issliding = !1;
this.touchtimeout = null;
this.touchstartx = 0;
this.touchdeltax = 0;
this._config = this._getconfig(config);
this._element = element;
this._indicatorselement = this._element.queryselector(selector$2.indicators);
this._touchsupported = 'ontouchstart' in document.documentelement || navigator.maxtouchpoints > 0;
this._pointerevent = boolean(window.pointerevent || window.mspointerevent);
this._addeventlisteners()
}
var _proto = carousel.prototype;
_proto.next = function next() {
if (!this._issliding) {
this._slide(direction.next)
}
};
_proto.nextwhenvisible = function nextwhenvisible() {
if (!document.hidden && $(this._element).is(':visible') && $(this._element).css('visibility') !== 'hidden') {
this.next()
}
};
_proto.prev = function prev() {
if (!this._issliding) {
this._slide(direction.prev)
}
};
_proto.pause = function pause(event) {
if (!event) {
this._ispaused = !0
}
if (this._element.queryselector(selector$2.next_prev)) {
util.triggertransitionend(this._element);
this.cycle(!0)
}
clearinterval(this._interval);
this._interval = null
};
_proto.cycle = function cycle(event) {
if (!event) {
this._ispaused = !1
}
if (this._interval) {
clearinterval(this._interval);
this._interval = null
}
if (this._config.interval && !this._ispaused) {
this._interval = setinterval((document.visibilitystate ? this.nextwhenvisible : this.next).bind(this), this._config.interval)
}
};
_proto.to = function to(index) {
var _this = this;
this._activeelement = this._element.queryselector(selector$2.active_item);
var activeindex = this._getitemindex(this._activeelement);
if (index > this._items.length - 1 || index < 0) {
return
}
if (this._issliding) {
$(this._element).one(event$2.slid, function() {
return _this.to(index)
});
return
}
if (activeindex === index) {
this.pause();
this.cycle();
return
}
var direction = index > activeindex ? direction.next : direction.prev;
this._slide(direction, this._items[index])
};
_proto.dispose = function dispose() {
$(this._element).off(event_key$2);
$.removedata(this._element, data_key$2);
this._items = null;
this._config = null;
this._element = null;
this._interval = null;
this._ispaused = null;
this._issliding = null;
this._activeelement = null;
this._indicatorselement = null
};
_proto._getconfig = function _getconfig(config) {
config = _objectspread2({}, default, {}, config);
util.typecheckconfig(name$2, config, defaulttype);
return config
};
_proto._handleswipe = function _handleswipe() {
var absdeltax = math.abs(this.touchdeltax);
if (absdeltax <= swipe_threshold) {
return
}
var direction = absdeltax / this.touchdeltax;
this.touchdeltax = 0;
if (direction > 0) {
this.prev()
}
if (direction < 0) {
this.next()
}
};
_proto._addeventlisteners = function _addeventlisteners() {
var _this2 = this;
if (this._config.keyboard) {
$(this._element).on(event$2.keydown, function(event) {
return _this2._keydown(event)
})
}
if (this._config.pause === 'hover') {
$(this._element).on(event$2.mouseenter, function(event) {
return _this2.pause(event)
}).on(event$2.mouseleave, function(event) {
return _this2.cycle(event)
})
}
if (this._config.touch) {
this._addtoucheventlisteners()
}
};
_proto._addtoucheventlisteners = function _addtoucheventlisteners() {
var _this3 = this;
if (!this._touchsupported) {
return
}
var start = function start(event) {
if (_this3._pointerevent && pointertype[event.originalevent.pointertype.touppercase()]) {
_this3.touchstartx = event.originalevent.clientx
} else if (!_this3._pointerevent) {
_this3.touchstartx = event.originalevent.touches[0].clientx
}
};
var move = function move(event) {
if (event.originalevent.touches && event.originalevent.touches.length > 1) {
_this3.touchdeltax = 0
} else {
_this3.touchdeltax = event.originalevent.touches[0].clientx - _this3.touchstartx
}
};
var end = function end(event) {
if (_this3._pointerevent && pointertype[event.originalevent.pointertype.touppercase()]) {
_this3.touchdeltax = event.originalevent.clientx - _this3.touchstartx
}
_this3._handleswipe();
if (_this3._config.pause === 'hover') {
_this3.pause();
if (_this3.touchtimeout) {
cleartimeout(_this3.touchtimeout)
}
_this3.touchtimeout = settimeout(function(event) {
return _this3.cycle(event)
}, touchevent_compat_wait + _this3._config.interval)
}
};
$(this._element.queryselectorall(selector$2.item_img)).on(event$2.drag_start, function(e) {
return e.preventdefault()
});
if (this._pointerevent) {
$(this._element).on(event$2.pointerdown, function(event) {
return start(event)
});
$(this._element).on(event$2.pointerup, function(event) {
return end(event)
});
this._element.classlist.add(classname$2.pointer_event)
} else {
$(this._element).on(event$2.touchstart, function(event) {
return start(event)
});
$(this._element).on(event$2.touchmove, function(event) {
return move(event)
});
$(this._element).on(event$2.touchend, function(event) {
return end(event)
})
}
};
_proto._keydown = function _keydown(event) {
if (/input|textarea/i.test(event.target.tagname)) {
return
}
switch (event.which) {
case arrow_left_keycode:
event.preventdefault();
this.prev();
break;
case arrow_right_keycode:
event.preventdefault();
this.next();
break
}
};
_proto._getitemindex = function _getitemindex(element) {
this._items = element && element.parentnode ? [].slice.call(element.parentnode.queryselectorall(selector$2.item)) : [];
return this._items.indexof(element)
};
_proto._getitembydirection = function _getitembydirection(direction, activeelement) {
var isnextdirection = direction === direction.next;
var isprevdirection = direction === direction.prev;
var activeindex = this._getitemindex(activeelement);
var lastitemindex = this._items.length - 1;
var isgoingtowrap = isprevdirection && activeindex === 0 || isnextdirection && activeindex === lastitemindex;
if (isgoingtowrap && !this._config.wrap) {
return activeelement
}
var delta = direction === direction.prev ? -1 : 1;
var itemindex = (activeindex + delta) % this._items.length;
return itemindex === -1 ? this._items[this._items.length - 1] : this._items[itemindex]
};
_proto._triggerslideevent = function _triggerslideevent(relatedtarget, eventdirectionname) {
var targetindex = this._getitemindex(relatedtarget);
var fromindex = this._getitemindex(this._element.queryselector(selector$2.active_item));
var slideevent = $.event(event$2.slide, {
relatedtarget: relatedtarget,
direction: eventdirectionname,
from: fromindex,
to: targetindex
});
$(this._element).trigger(slideevent);
return slideevent
};
_proto._setactiveindicatorelement = function _setactiveindicatorelement(element) {
if (this._indicatorselement) {
var indicators = [].slice.call(this._indicatorselement.queryselectorall(selector$2.active));
$(indicators).removeclass(classname$2.active);
var nextindicator = this._indicatorselement.children[this._getitemindex(element)];
if (nextindicator) {
$(nextindicator).addclass(classname$2.active)
}
}
};
_proto._slide = function _slide(direction, element) {
var _this4 = this;
var activeelement = this._element.queryselector(selector$2.active_item);
var activeelementindex = this._getitemindex(activeelement);
var nextelement = element || activeelement && this._getitembydirection(direction, activeelement);
var nextelementindex = this._getitemindex(nextelement);
var iscycling = boolean(this._interval);
var directionalclassname;
var orderclassname;
var eventdirectionname;
if (direction === direction.next) {
directionalclassname = classname$2.left;
orderclassname = classname$2.next;
eventdirectionname = direction.left
} else {
directionalclassname = classname$2.right;
orderclassname = classname$2.prev;
eventdirectionname = direction.right
}
if (nextelement && $(nextelement).hasclass(classname$2.active)) {
this._issliding = !1;
return
}
var slideevent = this._triggerslideevent(nextelement, eventdirectionname);
if (slideevent.isdefaultprevented()) {
return
}
if (!activeelement || !nextelement) {
return
}
this._issliding = !0;
if (iscycling) {
this.pause()
}
this._setactiveindicatorelement(nextelement);
var slidevent = $.event(event$2.slid, {
relatedtarget: nextelement,
direction: eventdirectionname,
from: activeelementindex,
to: nextelementindex
});
if ($(this._element).hasclass(classname$2.slide)) {
$(nextelement).addclass(orderclassname);
util.reflow(nextelement);
$(activeelement).addclass(directionalclassname);
$(nextelement).addclass(directionalclassname);
var nextelementinterval = parseint(nextelement.getattribute('data-interval'), 10);
if (nextelementinterval) {
this._config.defaultinterval = this._config.defaultinterval || this._config.interval;
this._config.interval = nextelementinterval
} else {
this._config.interval = this._config.defaultinterval || this._config.interval
}
var transitionduration = util.gettransitiondurationfromelement(activeelement);
$(activeelement).one(util.transition_end, function() {
$(nextelement).removeclass(directionalclassname + " " + orderclassname).addclass(classname$2.active);
$(activeelement).removeclass(classname$2.active + " " + orderclassname + " " + directionalclassname);
_this4._issliding = !1;
settimeout(function() {
return $(_this4._element).trigger(slidevent)
}, 0)
}).emulatetransitionend(transitionduration)
} else {
$(activeelement).removeclass(classname$2.active);
$(nextelement).addclass(classname$2.active);
this._issliding = !1;
$(this._element).trigger(slidevent)
}
if (iscycling) {
this.cycle()
}
};
carousel._jqueryinterface = function _jqueryinterface(config) {
return this.each(function() {
var data = $(this).data(data_key$2);
var _config = _objectspread2({}, default, {}, $(this).data());
if (typeof config === 'object') {
_config = _objectspread2({}, _config, {}, config)
}
var action = typeof config === 'string' ? config : _config.slide;
if (!data) {
data = new carousel(this, _config);
$(this).data(data_key$2, data)
}
if (typeof config === 'number') {
data.to(config)
} else if (typeof action === 'string') {
if (typeof data[action] === 'undefined') {
throw new typeerror("no method named \"" + action + "\"")
}
data[action]()
} else if (_config.interval && _config.ride) {
data.pause();
data.cycle()
}
})
};
carousel._dataapiclickhandler = function _dataapiclickhandler(event) {
var selector = util.getselectorfromelement(this);
if (!selector) {
return
}
var target = $(selector)[0];
if (!target || !$(target).hasclass(classname$2.carousel)) {
return
}
var config = _objectspread2({}, $(target).data(), {}, $(this).data());
var slideindex = this.getattribute('data-slide-to');
if (slideindex) {
config.interval = !1
}
carousel._jqueryinterface.call($(target), config);
if (slideindex) {
$(target).data(data_key$2).to(slideindex)
}
event.preventdefault()
};
_createclass(carousel, null, [{
key: "version",
get: function get() {
return version$2
}
}, {
key: "default",
get: function get() {
return default
}
}]);
return carousel
}();
$(document).on(event$2.click_data_api, selector$2.data_slide, carousel._dataapiclickhandler);
$(window).on(event$2.load_data_api, function() {
var carousels = [].slice.call(document.queryselectorall(selector$2.data_ride));
for (var i = 0, len = carousels.length; i < len; i++) {
var $carousel = $(carousels[i]);
carousel._jqueryinterface.call($carousel, $carousel.data())
}
});
$.fn[name$2] = carousel._jqueryinterface;
$.fn[name$2].constructor = carousel;
$.fn[name$2].noconflict = function() {
$.fn[name$2] = jquery_no_conflict$2;
return carousel._jqueryinterface
};
var name$3 = 'collapse';
var version$3 = '4.4.1';
var data_key$3 = 'bs.collapse';
var event_key$3 = "." + data_key$3;
var data_api_key$3 = '.data-api';
var jquery_no_conflict$3 = $.fn[name$3];
var default$1 = {
toggle: !0,
parent: ''
};
var defaulttype$1 = {
toggle: 'boolean',
parent: '(string|element)'
};
var event$3 = {
show: "show" + event_key$3,
shown: "shown" + event_key$3,
hide: "hide" + event_key$3,
hidden: "hidden" + event_key$3,
click_data_api: "click" + event_key$3 + data_api_key$3
};
var classname$3 = {
show: 'show',
collapse: 'collapse',
collapsing: 'collapsing',
collapsed: 'collapsed'
};
var dimension = {
width: 'width',
height: 'height'
};
var selector$3 = {
actives: '.show, .collapsing',
data_toggle: '[data-toggle="collapse"]'
};
var collapse = function() {
function collapse(element, config) {
this._istransitioning = !1;
this._element = element;
this._config = this._getconfig(config);
this._triggerarray = [].slice.call(document.queryselectorall("[data-toggle=\"collapse\"][href=\"#" + element.id + "\"]," + ("[data-toggle=\"collapse\"][data-target=\"#" + element.id + "\"]")));
var togglelist = [].slice.call(document.queryselectorall(selector$3.data_toggle));
for (var i = 0, len = togglelist.length; i < len; i++) {
var elem = togglelist[i];
var selector = util.getselectorfromelement(elem);
var filterelement = [].slice.call(document.queryselectorall(selector)).filter(function(foundelem) {
return foundelem === element
});
if (selector !== null && filterelement.length > 0) {
this._selector = selector;
this._triggerarray.push(elem)
}
}
this._parent = this._config.parent ? this._getparent() : null;
if (!this._config.parent) {
this._addariaandcollapsedclass(this._element, this._triggerarray)
}
if (this._config.toggle) {
this.toggle()
}
}
var _proto = collapse.prototype;
_proto.toggle = function toggle() {
if ($(this._element).hasclass(classname$3.show)) {
this.hide()
} else {
this.show()
}
};
_proto.show = function show() {
var _this = this;
if (this._istransitioning || $(this._element).hasclass(classname$3.show)) {
return
}
var actives;
var activesdata;
if (this._parent) {
actives = [].slice.call(this._parent.queryselectorall(selector$3.actives)).filter(function(elem) {
if (typeof _this._config.parent === 'string') {
return elem.getattribute('data-parent') === _this._config.parent
}
return elem.classlist.contains(classname$3.collapse)
});
if (actives.length === 0) {
actives = null
}
}
if (actives) {
activesdata = $(actives).not(this._selector).data(data_key$3);
if (activesdata && activesdata._istransitioning) {
return
}
}
var startevent = $.event(event$3.show);
$(this._element).trigger(startevent);
if (startevent.isdefaultprevented()) {
return
}
if (actives) {
collapse._jqueryinterface.call($(actives).not(this._selector), 'hide');
if (!activesdata) {
$(actives).data(data_key$3, null)
}
}
var dimension = this._getdimension();
$(this._element).removeclass(classname$3.collapse).addclass(classname$3.collapsing);
this._element.style[dimension] = 0;
if (this._triggerarray.length) {
$(this._triggerarray).removeclass(classname$3.collapsed).attr('aria-expanded', !0)
}
this.settransitioning(!0);
var complete = function complete() {
$(_this._element).removeclass(classname$3.collapsing).addclass(classname$3.collapse).addclass(classname$3.show);
_this._element.style[dimension] = '';
_this.settransitioning(!1);
$(_this._element).trigger(event$3.shown)
};
var capitalizeddimension = dimension[0].touppercase() + dimension.slice(1);
var scrollsize = "scroll" + capitalizeddimension;
var transitionduration = util.gettransitiondurationfromelement(this._element);
$(this._element).one(util.transition_end, complete).emulatetransitionend(transitionduration);
this._element.style[dimension] = this._element[scrollsize] + "px"
};
_proto.hide = function hide() {
var _this2 = this;
if (this._istransitioning || !$(this._element).hasclass(classname$3.show)) {
return
}
var startevent = $.event(event$3.hide);
$(this._element).trigger(startevent);
if (startevent.isdefaultprevented()) {
return
}
var dimension = this._getdimension();
this._element.style[dimension] = this._element.getboundingclientrect()[dimension] + "px";
util.reflow(this._element);
$(this._element).addclass(classname$3.collapsing).removeclass(classname$3.collapse).removeclass(classname$3.show);
var triggerarraylength = this._triggerarray.length;
if (triggerarraylength > 0) {
for (var i = 0; i < triggerarraylength; i++) {
var trigger = this._triggerarray[i];
var selector = util.getselectorfromelement(trigger);
if (selector !== null) {
var $elem = $([].slice.call(document.queryselectorall(selector)));
if (!$elem.hasclass(classname$3.show)) {
$(trigger).addclass(classname$3.collapsed).attr('aria-expanded', !1)
}
}
}
}
this.settransitioning(!0);
var complete = function complete() {
_this2.settransitioning(!1);
$(_this2._element).removeclass(classname$3.collapsing).addclass(classname$3.collapse).trigger(event$3.hidden)
};
this._element.style[dimension] = '';
var transitionduration = util.gettransitiondurationfromelement(this._element);
$(this._element).one(util.transition_end, complete).emulatetransitionend(transitionduration)
};
_proto.settransitioning = function settransitioning(istransitioning) {
this._istransitioning = istransitioning
};
_proto.dispose = function dispose() {
$.removedata(this._element, data_key$3);
this._config = null;
this._parent = null;
this._element = null;
this._triggerarray = null;
this._istransitioning = null
};
_proto._getconfig = function _getconfig(config) {
config = _objectspread2({}, default$1, {}, config);
config.toggle = boolean(config.toggle);
util.typecheckconfig(name$3, config, defaulttype$1);
return config
};
_proto._getdimension = function _getdimension() {
var haswidth = $(this._element).hasclass(dimension.width);
return haswidth ? dimension.width : dimension.height
};
_proto._getparent = function _getparent() {
var _this3 = this;
var parent;
if (util.iselement(this._config.parent)) {
parent = this._config.parent;
if (typeof this._config.parent.jquery !== 'undefined') {
parent = this._config.parent[0]
}
} else {
parent = document.queryselector(this._config.parent)
}
var selector = "[data-toggle=\"collapse\"][data-parent=\"" + this._config.parent + "\"]";
var children = [].slice.call(parent.queryselectorall(selector));
$(children).each(function(i, element) {
_this3._addariaandcollapsedclass(collapse._gettargetfromelement(element), [element])
});
return parent
};
_proto._addariaandcollapsedclass = function _addariaandcollapsedclass(element, triggerarray) {
var isopen = $(element).hasclass(classname$3.show);
if (triggerarray.length) {
$(triggerarray).toggleclass(classname$3.collapsed, !isopen).attr('aria-expanded', isopen)
}
};
collapse._gettargetfromelement = function _gettargetfromelement(element) {
var selector = util.getselectorfromelement(element);
return selector ? document.queryselector(selector) : null
};
collapse._jqueryinterface = function _jqueryinterface(config) {
return this.each(function() {
var $this = $(this);
var data = $this.data(data_key$3);
var _config = _objectspread2({}, default$1, {}, $this.data(), {}, typeof config === 'object' && config ? config : {});
if (!data && _config.toggle && /show|hide/.test(config)) {
_config.toggle = !1
}
if (!data) {
data = new collapse(this, _config);
$this.data(data_key$3, data)
}
if (typeof config === 'string') {
if (typeof data[config] === 'undefined') {
throw new typeerror("no method named \"" + config + "\"")
}
data[config]()
}
})
};
_createclass(collapse, null, [{
key: "version",
get: function get() {
return version$3
}
}, {
key: "default",
get: function get() {
return default$1
}
}]);
return collapse
}();
$(document).on(event$3.click_data_api, selector$3.data_toggle, function(event) {
if (event.currenttarget.tagname === 'a') {
event.preventdefault()
}
var $trigger = $(this);
var selector = util.getselectorfromelement(this);
var selectors = [].slice.call(document.queryselectorall(selector));
$(selectors).each(function() {
var $target = $(this);
var data = $target.data(data_key$3);
var config = data ? 'toggle' : $trigger.data();
collapse._jqueryinterface.call($target, config)
})
});
$.fn[name$3] = collapse._jqueryinterface;
$.fn[name$3].constructor = collapse;
$.fn[name$3].noconflict = function() {
$.fn[name$3] = jquery_no_conflict$3;
return collapse._jqueryinterface
};
var name$4 = 'dropdown';
var version$4 = '4.4.1';
var data_key$4 = 'bs.dropdown';
var event_key$4 = "." + data_key$4;
var data_api_key$4 = '.data-api';
var jquery_no_conflict$4 = $.fn[name$4];
var escape_keycode = 27;
var space_keycode = 32;
var tab_keycode = 9;
var arrow_up_keycode = 38;
var arrow_down_keycode = 40;
var right_mouse_button_which = 3;
var regexp_keydown = new regexp(arrow_up_keycode + "|" + arrow_down_keycode + "|" + escape_keycode);
var event$4 = {
hide: "hide" + event_key$4,
hidden: "hidden" + event_key$4,
show: "show" + event_key$4,
shown: "shown" + event_key$4,
click: "click" + event_key$4,
click_data_api: "click" + event_key$4 + data_api_key$4,
keydown_data_api: "keydown" + event_key$4 + data_api_key$4,
keyup_data_api: "keyup" + event_key$4 + data_api_key$4
};
var classname$4 = {
disabled: 'disabled',
show: 'show',
dropup: 'dropup',
dropright: 'dropright',
dropleft: 'dropleft',
menuright: 'dropdown-menu-right',
menuleft: 'dropdown-menu-left',
position_static: 'position-static'
};
var selector$4 = {
data_toggle: '[data-toggle="dropdown"]',
form_child: '.dropdown form',
menu: '.dropdown-menu',
navbar_nav: '.navbar-nav',
visible_items: '.dropdown-menu .dropdown-item:not(.disabled):not(:disabled)'
};
var attachmentmap = {
top: 'top-start',
topend: 'top-end',
bottom: 'bottom-start',
bottomend: 'bottom-end',
right: 'right-start',
rightend: 'right-end',
left: 'left-start',
leftend: 'left-end'
};
var default$2 = {
offset: 0,
flip: !0,
boundary: 'scrollparent',
reference: 'toggle',
display: 'dynamic',
popperconfig: null
};
var defaulttype$2 = {
offset: '(number|string|function)',
flip: 'boolean',
boundary: '(string|element)',
reference: '(string|element)',
display: 'string',
popperconfig: '(null|object)'
};
var dropdown = function() {
function dropdown(element, config) {
this._element = element;
this._popper = null;
this._config = this._getconfig(config);
this._menu = this._getmenuelement();
this._innavbar = this._detectnavbar();
this._addeventlisteners()
}
var _proto = dropdown.prototype;
_proto.toggle = function toggle() {
if (this._element.disabled || $(this._element).hasclass(classname$4.disabled)) {
return
}
var isactive = $(this._menu).hasclass(classname$4.show);
dropdown._clearmenus();
if (isactive) {
return
}
this.show(!0)
};
_proto.show = function show(usepopper) {
if (usepopper === void 0) {
usepopper = !1
}
if (this._element.disabled || $(this._element).hasclass(classname$4.disabled) || $(this._menu).hasclass(classname$4.show)) {
return
}
var relatedtarget = {
relatedtarget: this._element
};
var showevent = $.event(event$4.show, relatedtarget);
var parent = dropdown._getparentfromelement(this._element);
$(parent).trigger(showevent);
if (showevent.isdefaultprevented()) {
return
}
if (!this._innavbar && usepopper) {
if (typeof popper === 'undefined') {
throw new typeerror('bootstrap\'s dropdowns require popper.js (https://popper.js.org/)')
}
var referenceelement = this._element;
if (this._config.reference === 'parent') {
referenceelement = parent
} else if (util.iselement(this._config.reference)) {
referenceelement = this._config.reference;
if (typeof this._config.reference.jquery !== 'undefined') {
referenceelement = this._config.reference[0]
}
}
if (this._config.boundary !== 'scrollparent') {
$(parent).addclass(classname$4.position_static)
}
this._popper = new popper(referenceelement, this._menu, this._getpopperconfig())
}
if ('ontouchstart' in document.documentelement && $(parent).closest(selector$4.navbar_nav).length === 0) {
$(document.body).children().on('mouseover', null, $.noop)
}
this._element.focus();
this._element.setattribute('aria-expanded', !0);
$(this._menu).toggleclass(classname$4.show);
$(parent).toggleclass(classname$4.show).trigger($.event(event$4.shown, relatedtarget))
};
_proto.hide = function hide() {
if (this._element.disabled || $(this._element).hasclass(classname$4.disabled) || !$(this._menu).hasclass(classname$4.show)) {
return
}
var relatedtarget = {
relatedtarget: this._element
};
var hideevent = $.event(event$4.hide, relatedtarget);
var parent = dropdown._getparentfromelement(this._element);
$(parent).trigger(hideevent);
if (hideevent.isdefaultprevented()) {
return
}
if (this._popper) {
this._popper.destroy()
}
$(this._menu).toggleclass(classname$4.show);
$(parent).toggleclass(classname$4.show).trigger($.event(event$4.hidden, relatedtarget))
};
_proto.dispose = function dispose() {
$.removedata(this._element, data_key$4);
$(this._element).off(event_key$4);
this._element = null;
this._menu = null;
if (this._popper !== null) {
this._popper.destroy();
this._popper = null
}
};
_proto.update = function update() {
this._innavbar = this._detectnavbar();
if (this._popper !== null) {
this._popper.scheduleupdate()
}
};
_proto._addeventlisteners = function _addeventlisteners() {
var _this = this;
$(this._element).on(event$4.click, function(event) {
event.preventdefault();
event.stoppropagation();
_this.toggle()
})
};
_proto._getconfig = function _getconfig(config) {
config = _objectspread2({}, this.constructor.default, {}, $(this._element).data(), {}, config);
util.typecheckconfig(name$4, config, this.constructor.defaulttype);
return config
};
_proto._getmenuelement = function _getmenuelement() {
if (!this._menu) {
var parent = dropdown._getparentfromelement(this._element);
if (parent) {
this._menu = parent.queryselector(selector$4.menu)
}
}
return this._menu
};
_proto._getplacement = function _getplacement() {
var $parentdropdown = $(this._element.parentnode);
var placement = attachmentmap.bottom;
if ($parentdropdown.hasclass(classname$4.dropup)) {
placement = attachmentmap.top;
if ($(this._menu).hasclass(classname$4.menuright)) {
placement = attachmentmap.topend
}
} else if ($parentdropdown.hasclass(classname$4.dropright)) {
placement = attachmentmap.right
} else if ($parentdropdown.hasclass(classname$4.dropleft)) {
placement = attachmentmap.left
} else if ($(this._menu).hasclass(classname$4.menuright)) {
placement = attachmentmap.bottomend
}
return placement
};
_proto._detectnavbar = function _detectnavbar() {
return $(this._element).closest('.navbar').length > 0
};
_proto._getoffset = function _getoffset() {
var _this2 = this;
var offset = {};
if (typeof this._config.offset === 'function') {
offset.fn = function(data) {
data.offsets = _objectspread2({}, data.offsets, {}, _this2._config.offset(data.offsets, _this2._element) || {});
return data
}
} else {
offset.offset = this._config.offset
}
return offset
};
_proto._getpopperconfig = function _getpopperconfig() {
var popperconfig = {
placement: this._getplacement(),
modifiers: {
offset: this._getoffset(),
flip: {
enabled: this._config.flip
},
preventoverflow: {
boundarieselement: this._config.boundary
}
}
};
if (this._config.display === 'static') {
popperconfig.modifiers.applystyle = {
enabled: !1
}
}
return _objectspread2({}, popperconfig, {}, this._config.popperconfig)
};
dropdown._jqueryinterface = function _jqueryinterface(config) {
return this.each(function() {
var data = $(this).data(data_key$4);
var _config = typeof config === 'object' ? config : null;
if (!data) {
data = new dropdown(this, _config);
$(this).data(data_key$4, data)
}
if (typeof config === 'string') {
if (typeof data[config] === 'undefined') {
throw new typeerror("no method named \"" + config + "\"")
}
data[config]()
}
})
};
dropdown._clearmenus = function _clearmenus(event) {
if (event && (event.which === right_mouse_button_which || event.type === 'keyup' && event.which !== tab_keycode)) {
return
}
var toggles = [].slice.call(document.queryselectorall(selector$4.data_toggle));
for (var i = 0, len = toggles.length; i < len; i++) {
var parent = dropdown._getparentfromelement(toggles[i]);
var context = $(toggles[i]).data(data_key$4);
var relatedtarget = {
relatedtarget: toggles[i]
};
if (event && event.type === 'click') {
relatedtarget.clickevent = event
}
if (!context) {
continue
}
var dropdownmenu = context._menu;
if (!$(parent).hasclass(classname$4.show)) {
continue
}
if (event && (event.type === 'click' && /input|textarea/i.test(event.target.tagname) || event.type === 'keyup' && event.which === tab_keycode) && $.contains(parent, event.target)) {
continue
}
var hideevent = $.event(event$4.hide, relatedtarget);
$(parent).trigger(hideevent);
if (hideevent.isdefaultprevented()) {
continue
}
if ('ontouchstart' in document.documentelement) {
$(document.body).children().off('mouseover', null, $.noop)
}
toggles[i].setattribute('aria-expanded', 'false');
if (context._popper) {
context._popper.destroy()
}
$(dropdownmenu).removeclass(classname$4.show);
$(parent).removeclass(classname$4.show).trigger($.event(event$4.hidden, relatedtarget))
}
};
dropdown._getparentfromelement = function _getparentfromelement(element) {
var parent;
var selector = util.getselectorfromelement(element);
if (selector) {
parent = document.queryselector(selector)
}
return parent || element.parentnode
};
dropdown._dataapikeydownhandler = function _dataapikeydownhandler(event) {
if (/input|textarea/i.test(event.target.tagname) ? event.which === space_keycode || event.which !== escape_keycode && (event.which !== arrow_down_keycode && event.which !== arrow_up_keycode || $(event.target).closest(selector$4.menu).length) : !regexp_keydown.test(event.which)) {
return
}
event.preventdefault();
event.stoppropagation();
if (this.disabled || $(this).hasclass(classname$4.disabled)) {
return
}
var parent = dropdown._getparentfromelement(this);
var isactive = $(parent).hasclass(classname$4.show);
if (!isactive && event.which === escape_keycode) {
return
}
if (!isactive || isactive && (event.which === escape_keycode || event.which === space_keycode)) {
if (event.which === escape_keycode) {
var toggle = parent.queryselector(selector$4.data_toggle);
$(toggle).trigger('focus')
}
$(this).trigger('click');
return
}
var items = [].slice.call(parent.queryselectorall(selector$4.visible_items)).filter(function(item) {
return $(item).is(':visible')
});
if (items.length === 0) {
return
}
var index = items.indexof(event.target);
if (event.which === arrow_up_keycode && index > 0) {
index--
}
if (event.which === arrow_down_keycode && index < items.length - 1) {
index++
}
if (index < 0) {
index = 0
}
items[index].focus()
};
_createclass(dropdown, null, [{
key: "version",
get: function get() {
return version$4
}
}, {
key: "default",
get: function get() {
return default$2
}
}, {
key: "defaulttype",
get: function get() {
return defaulttype$2
}
}]);
return dropdown
}();
$(document).on(event$4.keydown_data_api, selector$4.data_toggle, dropdown._dataapikeydownhandler).on(event$4.keydown_data_api, selector$4.menu, dropdown._dataapikeydownhandler).on(event$4.click_data_api + " " + event$4.keyup_data_api, dropdown._clearmenus).on(event$4.click_data_api, selector$4.data_toggle, function(event) {
event.preventdefault();
event.stoppropagation();
dropdown._jqueryinterface.call($(this), 'toggle')
}).on(event$4.click_data_api, selector$4.form_child, function(e) {
e.stoppropagation()
});
$.fn[name$4] = dropdown._jqueryinterface;
$.fn[name$4].constructor = dropdown;
$.fn[name$4].noconflict = function() {
$.fn[name$4] = jquery_no_conflict$4;
return dropdown._jqueryinterface
};
var name$5 = 'modal';
var version$5 = '4.4.1';
var data_key$5 = 'bs.modal';
var event_key$5 = "." + data_key$5;
var data_api_key$5 = '.data-api';
var jquery_no_conflict$5 = $.fn[name$5];
var escape_keycode$1 = 27;
var default$3 = {
backdrop: !0,
keyboard: !0,
focus: !0,
show: !0
};
var defaulttype$3 = {
backdrop: '(boolean|string)',
keyboard: 'boolean',
focus: 'boolean',
show: 'boolean'
};
var event$5 = {
hide: "hide" + event_key$5,
hide_prevented: "hideprevented" + event_key$5,
hidden: "hidden" + event_key$5,
show: "show" + event_key$5,
shown: "shown" + event_key$5,
focusin: "focusin" + event_key$5,
resize: "resize" + event_key$5,
click_dismiss: "click.dismiss" + event_key$5,
keydown_dismiss: "keydown.dismiss" + event_key$5,
mouseup_dismiss: "mouseup.dismiss" + event_key$5,
mousedown_dismiss: "mousedown.dismiss" + event_key$5,
click_data_api: "click" + event_key$5 + data_api_key$5
};
var classname$5 = {
scrollable: 'modal-dialog-scrollable',
scrollbar_measurer: 'modal-scrollbar-measure',
backdrop: 'modal-backdrop',
open: 'modal-open',
fade: 'fade',
show: 'show',
static: 'modal-static'
};
var selector$5 = {
dialog: '.modal-dialog',
modal_body: '.modal-body',
data_toggle: '[data-toggle="modal"]',
data_dismiss: '[data-dismiss="modal"]',
fixed_content: '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top',
sticky_content: '.sticky-top'
};
var modal = function() {
function modal(element, config) {
this._config = this._getconfig(config);
this._element = element;
this._dialog = element.queryselector(selector$5.dialog);
this._backdrop = null;
this._isshown = !1;
this._isbodyoverflowing = !1;
this._ignorebackdropclick = !1;
this._istransitioning = !1;
this._scrollbarwidth = 0
}
var _proto = modal.prototype;
_proto.toggle = function toggle(relatedtarget) {
return this._isshown ? this.hide() : this.show(relatedtarget)
};
_proto.show = function show(relatedtarget) {
var _this = this;
if (this._isshown || this._istransitioning) {
return
}
if ($(this._element).hasclass(classname$5.fade)) {
this._istransitioning = !0
}
var showevent = $.event(event$5.show, {
relatedtarget: relatedtarget
});
$(this._element).trigger(showevent);
if (this._isshown || showevent.isdefaultprevented()) {
return
}
this._isshown = !0;
this._checkscrollbar();
this._setscrollbar();
this._adjustdialog();
this._setescapeevent();
this._setresizeevent();
$(this._element).on(event$5.click_dismiss, selector$5.data_dismiss, function(event) {
return _this.hide(event)
});
$(this._dialog).on(event$5.mousedown_dismiss, function() {
$(_this._element).one(event$5.mouseup_dismiss, function(event) {
if ($(event.target).is(_this._element)) {
_this._ignorebackdropclick = !0
}
})
});
this._showbackdrop(function() {
return _this._showelement(relatedtarget)
})
};
_proto.hide = function hide(event) {
var _this2 = this;
if (event) {
event.preventdefault()
}
if (!this._isshown || this._istransitioning) {
return
}
var hideevent = $.event(event$5.hide);
$(this._element).trigger(hideevent);
if (!this._isshown || hideevent.isdefaultprevented()) {
return
}
this._isshown = !1;
var transition = $(this._element).hasclass(classname$5.fade);
if (transition) {
this._istransitioning = !0
}
this._setescapeevent();
this._setresizeevent();
$(document).off(event$5.focusin);
$(this._element).removeclass(classname$5.show);
$(this._element).off(event$5.click_dismiss);
$(this._dialog).off(event$5.mousedown_dismiss);
if (transition) {
var transitionduration = util.gettransitiondurationfromelement(this._element);
$(this._element).one(util.transition_end, function(event) {
return _this2._hidemodal(event)
}).emulatetransitionend(transitionduration)
} else {
this._hidemodal()
}
};
_proto.dispose = function dispose() {
[window, this._element, this._dialog].foreach(function(htmlelement) {
return $(htmlelement).off(event_key$5)
});
$(document).off(event$5.focusin);
$.removedata(this._element, data_key$5);
this._config = null;
this._element = null;
this._dialog = null;
this._backdrop = null;
this._isshown = null;
this._isbodyoverflowing = null;
this._ignorebackdropclick = null;
this._istransitioning = null;
this._scrollbarwidth = null
};
_proto.handleupdate = function handleupdate() {
this._adjustdialog()
};
_proto._getconfig = function _getconfig(config) {
config = _objectspread2({}, default$3, {}, config);
util.typecheckconfig(name$5, config, defaulttype$3);
return config
};
_proto._triggerbackdroptransition = function _triggerbackdroptransition() {
var _this3 = this;
if (this._config.backdrop === 'static') {
var hideeventprevented = $.event(event$5.hide_prevented);
$(this._element).trigger(hideeventprevented);
if (hideeventprevented.defaultprevented) {
return
}
this._element.classlist.add(classname$5.static);
var modaltransitionduration = util.gettransitiondurationfromelement(this._element);
$(this._element).one(util.transition_end, function() {
_this3._element.classlist.remove(classname$5.static)
}).emulatetransitionend(modaltransitionduration);
this._element.focus()
} else {
this.hide()
}
};
_proto._showelement = function _showelement(relatedtarget) {
var _this4 = this;
var transition = $(this._element).hasclass(classname$5.fade);
var modalbody = this._dialog ? this._dialog.queryselector(selector$5.modal_body) : null;
if (!this._element.parentnode || this._element.parentnode.nodetype !== node.element_node) {
document.body.appendchild(this._element)
}
this._element.style.display = 'block';
this._element.removeattribute('aria-hidden');
this._element.setattribute('aria-modal', !0);
if ($(this._dialog).hasclass(classname$5.scrollable) && modalbody) {
modalbody.scrolltop = 0
} else {
this._element.scrolltop = 0
}
if (transition) {
util.reflow(this._element)
}
$(this._element).addclass(classname$5.show);
if (this._config.focus) {
this._enforcefocus()
}
var shownevent = $.event(event$5.shown, {
relatedtarget: relatedtarget
});
var transitioncomplete = function transitioncomplete() {
if (_this4._config.focus) {
_this4._element.focus()
}
_this4._istransitioning = !1;
$(_this4._element).trigger(shownevent)
};
if (transition) {
var transitionduration = util.gettransitiondurationfromelement(this._dialog);
$(this._dialog).one(util.transition_end, transitioncomplete).emulatetransitionend(transitionduration)
} else {
transitioncomplete()
}
};
_proto._enforcefocus = function _enforcefocus() {
var _this5 = this;
$(document).off(event$5.focusin).on(event$5.focusin, function(event) {
if (document !== event.target && _this5._element !== event.target && $(_this5._element).has(event.target).length === 0) {
_this5._element.focus()
}
})
};
_proto._setescapeevent = function _setescapeevent() {
var _this6 = this;
if (this._isshown && this._config.keyboard) {
$(this._element).on(event$5.keydown_dismiss, function(event) {
if (event.which === escape_keycode$1) {
_this6._triggerbackdroptransition()
}
})
} else if (!this._isshown) {
$(this._element).off(event$5.keydown_dismiss)
}
};
_proto._setresizeevent = function _setresizeevent() {
var _this7 = this;
if (this._isshown) {
$(window).on(event$5.resize, function(event) {
return _this7.handleupdate(event)
})
} else {
$(window).off(event$5.resize)
}
};
_proto._hidemodal = function _hidemodal() {
var _this8 = this;
this._element.style.display = 'none';
this._element.setattribute('aria-hidden', !0);
this._element.removeattribute('aria-modal');
this._istransitioning = !1;
this._showbackdrop(function() {
$(document.body).removeclass(classname$5.open);
_this8._resetadjustments();
_this8._resetscrollbar();
$(_this8._element).trigger(event$5.hidden)
})
};
_proto._removebackdrop = function _removebackdrop() {
if (this._backdrop) {
$(this._backdrop).remove();
this._backdrop = null
}
};
_proto._showbackdrop = function _showbackdrop(callback) {
var _this9 = this;
var animate = $(this._element).hasclass(classname$5.fade) ? classname$5.fade : '';
if (this._isshown && this._config.backdrop) {
this._backdrop = document.createelement('div');
this._backdrop.classname = classname$5.backdrop;
if (animate) {
this._backdrop.classlist.add(animate)
}
$(this._backdrop).appendto(document.body);
$(this._element).on(event$5.click_dismiss, function(event) {
if (_this9._ignorebackdropclick) {
_this9._ignorebackdropclick = !1;
return
}
if (event.target !== event.currenttarget) {
return
}
_this9._triggerbackdroptransition()
});
if (animate) {
util.reflow(this._backdrop)
}
$(this._backdrop).addclass(classname$5.show);
if (!callback) {
return
}
if (!animate) {
callback();
return
}
var backdroptransitionduration = util.gettransitiondurationfromelement(this._backdrop);
$(this._backdrop).one(util.transition_end, callback).emulatetransitionend(backdroptransitionduration)
} else if (!this._isshown && this._backdrop) {
$(this._backdrop).removeclass(classname$5.show);
var callbackremove = function callbackremove() {
_this9._removebackdrop();
if (callback) {
callback()
}
};
if ($(this._element).hasclass(classname$5.fade)) {
var _backdroptransitionduration = util.gettransitiondurationfromelement(this._backdrop);
$(this._backdrop).one(util.transition_end, callbackremove).emulatetransitionend(_backdroptransitionduration)
} else {
callbackremove()
}
} else if (callback) {
callback()
}
};
_proto._adjustdialog = function _adjustdialog() {
var ismodaloverflowing = this._element.scrollheight > document.documentelement.clientheight;
if (!this._isbodyoverflowing && ismodaloverflowing) {
this._element.style.paddingleft = this._scrollbarwidth + "px"
}
if (this._isbodyoverflowing && !ismodaloverflowing) {
this._element.style.paddingright = this._scrollbarwidth + "px"
}
};
_proto._resetadjustments = function _resetadjustments() {
this._element.style.paddingleft = '';
this._element.style.paddingright = ''
};
_proto._checkscrollbar = function _checkscrollbar() {
var rect = document.body.getboundingclientrect();
this._isbodyoverflowing = rect.left + rect.right < window.innerwidth;
this._scrollbarwidth = this._getscrollbarwidth()
};
_proto._setscrollbar = function _setscrollbar() {
var _this10 = this;
if (this._isbodyoverflowing) {
var fixedcontent = [].slice.call(document.queryselectorall(selector$5.fixed_content));
var stickycontent = [].slice.call(document.queryselectorall(selector$5.sticky_content));
$(fixedcontent).each(function(index, element) {
var actualpadding = element.style.paddingright;
var calculatedpadding = $(element).css('padding-right');
$(element).data('padding-right', actualpadding).css('padding-right', parsefloat(calculatedpadding) + _this10._scrollbarwidth + "px")
});
$(stickycontent).each(function(index, element) {
var actualmargin = element.style.marginright;
var calculatedmargin = $(element).css('margin-right');
$(element).data('margin-right', actualmargin).css('margin-right', parsefloat(calculatedmargin) - _this10._scrollbarwidth + "px")
});
var actualpadding = document.body.style.paddingright;
var calculatedpadding = $(document.body).css('padding-right');
$(document.body).data('padding-right', actualpadding).css('padding-right', parsefloat(calculatedpadding) + this._scrollbarwidth + "px")
}
$(document.body).addclass(classname$5.open)
};
_proto._resetscrollbar = function _resetscrollbar() {
var fixedcontent = [].slice.call(document.queryselectorall(selector$5.fixed_content));
$(fixedcontent).each(function(index, element) {
var padding = $(element).data('padding-right');
$(element).removedata('padding-right');
element.style.paddingright = padding ? padding : ''
});
var elements = [].slice.call(document.queryselectorall("" + selector$5.sticky_content));
$(elements).each(function(index, element) {
var margin = $(element).data('margin-right');
if (typeof margin !== 'undefined') {
$(element).css('margin-right', margin).removedata('margin-right')
}
});
var padding = $(document.body).data('padding-right');
$(document.body).removedata('padding-right');
document.body.style.paddingright = padding ? padding : ''
};
_proto._getscrollbarwidth = function _getscrollbarwidth() {
var scrolldiv = document.createelement('div');
scrolldiv.classname = classname$5.scrollbar_measurer;
document.body.appendchild(scrolldiv);
var scrollbarwidth = scrolldiv.getboundingclientrect().width - scrolldiv.clientwidth;
document.body.removechild(scrolldiv);
return scrollbarwidth
};
modal._jqueryinterface = function _jqueryinterface(config, relatedtarget) {
return this.each(function() {
var data = $(this).data(data_key$5);
var _config = _objectspread2({}, default$3, {}, $(this).data(), {}, typeof config === 'object' && config ? config : {});
if (!data) {
data = new modal(this, _config);
$(this).data(data_key$5, data)
}
if (typeof config === 'string') {
if (typeof data[config] === 'undefined') {
throw new typeerror("no method named \"" + config + "\"")
}
data[config](relatedtarget)
} else if (_config.show) {
data.show(relatedtarget)
}
})
};
_createclass(modal, null, [{
key: "version",
get: function get() {
return version$5
}
}, {
key: "default",
get: function get() {
return default$3
}
}]);
return modal
}();
$(document).on(event$5.click_data_api, selector$5.data_toggle, function(event) {
var _this11 = this;
var target;
var selector = util.getselectorfromelement(this);
if (selector) {
target = document.queryselector(selector)
}
var config = $(target).data(data_key$5) ? 'toggle' : _objectspread2({}, $(target).data(), {}, $(this).data());
if (this.tagname === 'a' || this.tagname === 'area') {
event.preventdefault()
}
var $target = $(target).one(event$5.show, function(showevent) {
if (showevent.isdefaultprevented()) {
return
}
$target.one(event$5.hidden, function() {
if ($(_this11).is(':visible')) {
_this11.focus()
}
})
});
modal._jqueryinterface.call($(target), config, this)
});
$.fn[name$5] = modal._jqueryinterface;
$.fn[name$5].constructor = modal;
$.fn[name$5].noconflict = function() {
$.fn[name$5] = jquery_no_conflict$5;
return modal._jqueryinterface
};
var uriattrs = ['background', 'cite', 'href', 'itemtype', 'longdesc', 'poster', 'src', 'xlink:href'];
var aria_attribute_pattern = /^aria-[\w-]*$/i;
var defaultwhitelist = {
'*': ['class', 'dir', 'id', 'lang', 'role', aria_attribute_pattern],
a: ['target', 'href', 'title', 'rel'],
area: [],
b: [],
br: [],
col: [],
code: [],
div: [],
em: [],
hr: [],
h1: [],
h2: [],
h3: [],
h4: [],
h5: [],
h6: [],
i: [],
img: ['src', 'alt', 'title', 'width', 'height'],
li: [],
ol: [],
p: [],
pre: [],
s: [],
small: [],
span: [],
sub: [],
sup: [],
strong: [],
u: [],
ul: []
};
var safe_url_pattern = /^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi;
var data_url_pattern = /^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+/]+=*$/i;
function allowedattribute(attr, allowedattributelist) {
var attrname = attr.nodename.tolowercase();
if (allowedattributelist.indexof(attrname) !== -1) {
if (uriattrs.indexof(attrname) !== -1) {
return boolean(attr.nodevalue.match(safe_url_pattern) || attr.nodevalue.match(data_url_pattern))
}
return !0
}
var regexp = allowedattributelist.filter(function(attrregex) {
return attrregex instanceof regexp
});
for (var i = 0, l = regexp.length; i < l; i++) {
if (attrname.match(regexp[i])) {
return !0
}
}
return !1
}
function sanitizehtml(unsafehtml, whitelist, sanitizefn) {
if (unsafehtml.length === 0) {
return unsafehtml
}
if (sanitizefn && typeof sanitizefn === 'function') {
return sanitizefn(unsafehtml)
}
var domparser = new window.domparser();
var createddocument = domparser.parsefromstring(unsafehtml, 'text/html');
var whitelistkeys = object.keys(whitelist);
var elements = [].slice.call(createddocument.body.queryselectorall('*'));
var _loop = function _loop(i, len) {
var el = elements[i];
var elname = el.nodename.tolowercase();
if (whitelistkeys.indexof(el.nodename.tolowercase()) === -1) {
el.parentnode.removechild(el);
return "continue"
}
var attributelist = [].slice.call(el.attributes);
var whitelistedattributes = [].concat(whitelist['*'] || [], whitelist[elname] || []);
attributelist.foreach(function(attr) {
if (!allowedattribute(attr, whitelistedattributes)) {
el.removeattribute(attr.nodename)
}
})
};
for (var i = 0, len = elements.length; i < len; i++) {
var _ret = _loop(i);
if (_ret === "continue") continue
}
return createddocument.body.innerhtml
}
var name$6 = 'tooltip';
var version$6 = '4.4.1';
var data_key$6 = 'bs.tooltip';
var event_key$6 = "." + data_key$6;
var jquery_no_conflict$6 = $.fn[name$6];
var class_prefix = 'bs-tooltip';
var bscls_prefix_regex = new regexp("(^|\\s)" + class_prefix + "\\s+", 'g');
var disallowed_attributes = ['sanitize', 'whitelist', 'sanitizefn'];
var defaulttype$4 = {
animation: 'boolean',
template: 'string',
title: '(string|element|function)',
trigger: 'string',
delay: '(number|object)',
html: 'boolean',
selector: '(string|boolean)',
placement: '(string|function)',
offset: '(number|string|function)',
container: '(string|element|boolean)',
fallbackplacement: '(string|array)',
boundary: '(string|element)',
sanitize: 'boolean',
sanitizefn: '(null|function)',
whitelist: 'object',
popperconfig: '(null|object)'
};
var attachmentmap$1 = {
auto: 'auto',
top: 'top',
right: 'right',
bottom: 'bottom',
left: 'left'
};
var default$4 = {
animation: !0,
template: '
',
trigger: 'hover focus',
title: '',
delay: 0,
html: !1,
selector: !1,
placement: 'top',
offset: 0,
container: !1,
fallbackplacement: 'flip',
boundary: 'scrollparent',
sanitize: !0,
sanitizefn: null,
whitelist: defaultwhitelist,
popperconfig: null
};
var hoverstate = {
show: 'show',
out: 'out'
};
var event$6 = {
hide: "hide" + event_key$6,
hidden: "hidden" + event_key$6,
show: "show" + event_key$6,
shown: "shown" + event_key$6,
inserted: "inserted" + event_key$6,
click: "click" + event_key$6,
focusin: "focusin" + event_key$6,
focusout: "focusout" + event_key$6,
mouseenter: "mouseenter" + event_key$6,
mouseleave: "mouseleave" + event_key$6
};
var classname$6 = {
fade: 'fade',
show: 'show'
};
var selector$6 = {
tooltip: '.tooltip',
tooltip_inner: '.tooltip-inner',
arrow: '.arrow'
};
var trigger = {
hover: 'hover',
focus: 'focus',
click: 'click',
manual: 'manual'
};
var tooltip = function() {
function tooltip(element, config) {
if (typeof popper === 'undefined') {
throw new typeerror('bootstrap\'s tooltips require popper.js (https://popper.js.org/)')
}
this._isenabled = !0;
this._timeout = 0;
this._hoverstate = '';
this._activetrigger = {};
this._popper = null;
this.element = element;
this.config = this._getconfig(config);
this.tip = null;
this._setlisteners()
}
var _proto = tooltip.prototype;
_proto.enable = function enable() {
this._isenabled = !0
};
_proto.disable = function disable() {
this._isenabled = !1
};
_proto.toggleenabled = function toggleenabled() {
this._isenabled = !this._isenabled
};
_proto.toggle = function toggle(event) {
if (!this._isenabled) {
return
}
if (event) {
var datakey = this.constructor.data_key;
var context = $(event.currenttarget).data(datakey);
if (!context) {
context = new this.constructor(event.currenttarget, this._getdelegateconfig());
$(event.currenttarget).data(datakey, context)
}
context._activetrigger.click = !context._activetrigger.click;
if (context._iswithactivetrigger()) {
context._enter(null, context)
} else {
context._leave(null, context)
}
} else {
if ($(this.gettipelement()).hasclass(classname$6.show)) {
this._leave(null, this);
return
}
this._enter(null, this)
}
};
_proto.dispose = function dispose() {
cleartimeout(this._timeout);
$.removedata(this.element, this.constructor.data_key);
$(this.element).off(this.constructor.event_key);
$(this.element).closest('.modal').off('hide.bs.modal', this._hidemodalhandler);
if (this.tip) {
$(this.tip).remove()
}
this._isenabled = null;
this._timeout = null;
this._hoverstate = null;
this._activetrigger = null;
if (this._popper) {
this._popper.destroy()
}
this._popper = null;
this.element = null;
this.config = null;
this.tip = null
};
_proto.show = function show() {
var _this = this;
if ($(this.element).css('display') === 'none') {
throw new error('please use show on visible elements')
}
var showevent = $.event(this.constructor.event.show);
if (this.iswithcontent() && this._isenabled) {
$(this.element).trigger(showevent);
var shadowroot = util.findshadowroot(this.element);
var isinthedom = $.contains(shadowroot !== null ? shadowroot : this.element.ownerdocument.documentelement, this.element);
if (showevent.isdefaultprevented() || !isinthedom) {
return
}
var tip = this.gettipelement();
var tipid = util.getuid(this.constructor.name);
tip.setattribute('id', tipid);
this.element.setattribute('aria-describedby', tipid);
this.setcontent();
if (this.config.animation) {
$(tip).addclass(classname$6.fade)
}
var placement = typeof this.config.placement === 'function' ? this.config.placement.call(this, tip, this.element) : this.config.placement;
var attachment = this._getattachment(placement);
this.addattachmentclass(attachment);
var container = this._getcontainer();
$(tip).data(this.constructor.data_key, this);
if (!$.contains(this.element.ownerdocument.documentelement, this.tip)) {
$(tip).appendto(container)
}
$(this.element).trigger(this.constructor.event.inserted);
this._popper = new popper(this.element, tip, this._getpopperconfig(attachment));
$(tip).addclass(classname$6.show);
if ('ontouchstart' in document.documentelement) {
$(document.body).children().on('mouseover', null, $.noop)
}
var complete = function complete() {
if (_this.config.animation) {
_this._fixtransition()
}
var prevhoverstate = _this._hoverstate;
_this._hoverstate = null;
$(_this.element).trigger(_this.constructor.event.shown);
if (prevhoverstate === hoverstate.out) {
_this._leave(null, _this)
}
};
if ($(this.tip).hasclass(classname$6.fade)) {
var transitionduration = util.gettransitiondurationfromelement(this.tip);
$(this.tip).one(util.transition_end, complete).emulatetransitionend(transitionduration)
} else {
complete()
}
}
};
_proto.hide = function hide(callback) {
var _this2 = this;
var tip = this.gettipelement();
var hideevent = $.event(this.constructor.event.hide);
var complete = function complete() {
if (_this2._hoverstate !== hoverstate.show && tip.parentnode) {
tip.parentnode.removechild(tip)
}
_this2._cleantipclass();
_this2.element.removeattribute('aria-describedby');
$(_this2.element).trigger(_this2.constructor.event.hidden);
if (_this2._popper !== null) {
_this2._popper.destroy()
}
if (callback) {
callback()
}
};
$(this.element).trigger(hideevent);
if (hideevent.isdefaultprevented()) {
return
}
$(tip).removeclass(classname$6.show);
if ('ontouchstart' in document.documentelement) {
$(document.body).children().off('mouseover', null, $.noop)
}
this._activetrigger[trigger.click] = !1;
this._activetrigger[trigger.focus] = !1;
this._activetrigger[trigger.hover] = !1;
if ($(this.tip).hasclass(classname$6.fade)) {
var transitionduration = util.gettransitiondurationfromelement(tip);
$(tip).one(util.transition_end, complete).emulatetransitionend(transitionduration)
} else {
complete()
}
this._hoverstate = ''
};
_proto.update = function update() {
if (this._popper !== null) {
this._popper.scheduleupdate()
}
};
_proto.iswithcontent = function iswithcontent() {
return boolean(this.gettitle())
};
_proto.addattachmentclass = function addattachmentclass(attachment) {
$(this.gettipelement()).addclass(class_prefix + "-" + attachment)
};
_proto.gettipelement = function gettipelement() {
this.tip = this.tip || $(this.config.template)[0];
return this.tip
};
_proto.setcontent = function setcontent() {
var tip = this.gettipelement();
this.setelementcontent($(tip.queryselectorall(selector$6.tooltip_inner)), this.gettitle());
$(tip).removeclass(classname$6.fade + " " + classname$6.show)
};
_proto.setelementcontent = function setelementcontent($element, content) {
if (typeof content === 'object' && (content.nodetype || content.jquery)) {
if (this.config.html) {
if (!$(content).parent().is($element)) {
$element.empty().append(content)
}
} else {
$element.text($(content).text())
}
return
}
if (this.config.html) {
if (this.config.sanitize) {
content = sanitizehtml(content, this.config.whitelist, this.config.sanitizefn)
}
$element.html(content)
} else {
$element.text(content)
}
};
_proto.gettitle = function gettitle() {
var title = this.element.getattribute('data-original-title');
if (!title) {
title = typeof this.config.title === 'function' ? this.config.title.call(this.element) : this.config.title
}
return title
};
_proto._getpopperconfig = function _getpopperconfig(attachment) {
var _this3 = this;
var defaultbsconfig = {
placement: attachment,
modifiers: {
offset: this._getoffset(),
flip: {
behavior: this.config.fallbackplacement
},
arrow: {
element: selector$6.arrow
},
preventoverflow: {
boundarieselement: this.config.boundary
}
},
oncreate: function oncreate(data) {
if (data.originalplacement !== data.placement) {
_this3._handlepopperplacementchange(data)
}
},
onupdate: function onupdate(data) {
return _this3._handlepopperplacementchange(data)
}
};
return _objectspread2({}, defaultbsconfig, {}, this.config.popperconfig)
};
_proto._getoffset = function _getoffset() {
var _this4 = this;
var offset = {};
if (typeof this.config.offset === 'function') {
offset.fn = function(data) {
data.offsets = _objectspread2({}, data.offsets, {}, _this4.config.offset(data.offsets, _this4.element) || {});
return data
}
} else {
offset.offset = this.config.offset
}
return offset
};
_proto._getcontainer = function _getcontainer() {
if (this.config.container === !1) {
return document.body
}
if (util.iselement(this.config.container)) {
return $(this.config.container)
}
return $(document).find(this.config.container)
};
_proto._getattachment = function _getattachment(placement) {
return attachmentmap$1[placement.touppercase()]
};
_proto._setlisteners = function _setlisteners() {
var _this5 = this;
var triggers = this.config.trigger.split(' ');
triggers.foreach(function(trigger) {
if (trigger === 'click') {
$(_this5.element).on(_this5.constructor.event.click, _this5.config.selector, function(event) {
return _this5.toggle(event)
})
} else if (trigger !== trigger.manual) {
var eventin = trigger === trigger.hover ? _this5.constructor.event.mouseenter : _this5.constructor.event.focusin;
var eventout = trigger === trigger.hover ? _this5.constructor.event.mouseleave : _this5.constructor.event.focusout;
$(_this5.element).on(eventin, _this5.config.selector, function(event) {
return _this5._enter(event)
}).on(eventout, _this5.config.selector, function(event) {
return _this5._leave(event)
})
}
});
this._hidemodalhandler = function() {
if (_this5.element) {
_this5.hide()
}
};
$(this.element).closest('.modal').on('hide.bs.modal', this._hidemodalhandler);
if (this.config.selector) {
this.config = _objectspread2({}, this.config, {
trigger: 'manual',
selector: ''
})
} else {
this._fixtitle()
}
};
_proto._fixtitle = function _fixtitle() {
var titletype = typeof this.element.getattribute('data-original-title');
if (this.element.getattribute('title') || titletype !== 'string') {
this.element.setattribute('data-original-title', this.element.getattribute('title') || '');
this.element.setattribute('title', '')
}
};
_proto._enter = function _enter(event, context) {
var datakey = this.constructor.data_key;
context = context || $(event.currenttarget).data(datakey);
if (!context) {
context = new this.constructor(event.currenttarget, this._getdelegateconfig());
$(event.currenttarget).data(datakey, context)
}
if (event) {
context._activetrigger[event.type === 'focusin' ? trigger.focus : trigger.hover] = !0
}
if ($(context.gettipelement()).hasclass(classname$6.show) || context._hoverstate === hoverstate.show) {
context._hoverstate = hoverstate.show;
return
}
cleartimeout(context._timeout);
context._hoverstate = hoverstate.show;
if (!context.config.delay || !context.config.delay.show) {
context.show();
return
}
context._timeout = settimeout(function() {
if (context._hoverstate === hoverstate.show) {
context.show()
}
}, context.config.delay.show)
};
_proto._leave = function _leave(event, context) {
var datakey = this.constructor.data_key;
context = context || $(event.currenttarget).data(datakey);
if (!context) {
context = new this.constructor(event.currenttarget, this._getdelegateconfig());
$(event.currenttarget).data(datakey, context)
}
if (event) {
context._activetrigger[event.type === 'focusout' ? trigger.focus : trigger.hover] = !1
}
if (context._iswithactivetrigger()) {
return
}
cleartimeout(context._timeout);
context._hoverstate = hoverstate.out;
if (!context.config.delay || !context.config.delay.hide) {
context.hide();
return
}
context._timeout = settimeout(function() {
if (context._hoverstate === hoverstate.out) {
context.hide()
}
}, context.config.delay.hide)
};
_proto._iswithactivetrigger = function _iswithactivetrigger() {
for (var trigger in this._activetrigger) {
if (this._activetrigger[trigger]) {
return !0
}
}
return !1
};
_proto._getconfig = function _getconfig(config) {
var dataattributes = $(this.element).data();
object.keys(dataattributes).foreach(function(dataattr) {
if (disallowed_attributes.indexof(dataattr) !== -1) {
delete dataattributes[dataattr]
}
});
config = _objectspread2({}, this.constructor.default, {}, dataattributes, {}, typeof config === 'object' && config ? config : {});
if (typeof config.delay === 'number') {
config.delay = {
show: config.delay,
hide: config.delay
}
}
if (typeof config.title === 'number') {
config.title = config.title.tostring()
}
if (typeof config.content === 'number') {
config.content = config.content.tostring()
}
util.typecheckconfig(name$6, config, this.constructor.defaulttype);
if (config.sanitize) {
config.template = sanitizehtml(config.template, config.whitelist, config.sanitizefn)
}
return config
};
_proto._getdelegateconfig = function _getdelegateconfig() {
var config = {};
if (this.config) {
for (var key in this.config) {
if (this.constructor.default[key] !== this.config[key]) {
config[key] = this.config[key]
}
}
}
return config
};
_proto._cleantipclass = function _cleantipclass() {
var $tip = $(this.gettipelement());
var tabclass = $tip.attr('class').match(bscls_prefix_regex);
if (tabclass !== null && tabclass.length) {
$tip.removeclass(tabclass.join(''))
}
};
_proto._handlepopperplacementchange = function _handlepopperplacementchange(popperdata) {
var popperinstance = popperdata.instance;
this.tip = popperinstance.popper;
this._cleantipclass();
this.addattachmentclass(this._getattachment(popperdata.placement))
};
_proto._fixtransition = function _fixtransition() {
var tip = this.gettipelement();
var initconfiganimation = this.config.animation;
if (tip.getattribute('x-placement') !== null) {
return
}
$(tip).removeclass(classname$6.fade);
this.config.animation = !1;
this.hide();
this.show();
this.config.animation = initconfiganimation
};
tooltip._jqueryinterface = function _jqueryinterface(config) {
return this.each(function() {
var data = $(this).data(data_key$6);
var _config = typeof config === 'object' && config;
if (!data && /dispose|hide/.test(config)) {
return
}
if (!data) {
data = new tooltip(this, _config);
$(this).data(data_key$6, data)
}
if (typeof config === 'string') {
if (typeof data[config] === 'undefined') {
throw new typeerror("no method named \"" + config + "\"")
}
data[config]()
}
})
};
_createclass(tooltip, null, [{
key: "version",
get: function get() {
return version$6
}
}, {
key: "default",
get: function get() {
return default$4
}
}, {
key: "name",
get: function get() {
return name$6
}
}, {
key: "data_key",
get: function get() {
return data_key$6
}
}, {
key: "event",
get: function get() {
return event$6
}
}, {
key: "event_key",
get: function get() {
return event_key$6
}
}, {
key: "defaulttype",
get: function get() {
return defaulttype$4
}
}]);
return tooltip
}();
$.fn[name$6] = tooltip._jqueryinterface;
$.fn[name$6].constructor = tooltip;
$.fn[name$6].noconflict = function() {
$.fn[name$6] = jquery_no_conflict$6;
return tooltip._jqueryinterface
};
var name$7 = 'popover';
var version$7 = '4.4.1';
var data_key$7 = 'bs.popover';
var event_key$7 = "." + data_key$7;
var jquery_no_conflict$7 = $.fn[name$7];
var class_prefix$1 = 'bs-popover';
var bscls_prefix_regex$1 = new regexp("(^|\\s)" + class_prefix$1 + "\\s+", 'g');
var default$5 = _objectspread2({}, tooltip.default, {
placement: 'right',
trigger: 'click',
content: '',
template: ''
});
var defaulttype$5 = _objectspread2({}, tooltip.defaulttype, {
content: '(string|element|function)'
});
var classname$7 = {
fade: 'fade',
show: 'show'
};
var selector$7 = {
title: '.popover-header',
content: '.popover-body'
};
var event$7 = {
hide: "hide" + event_key$7,
hidden: "hidden" + event_key$7,
show: "show" + event_key$7,
shown: "shown" + event_key$7,
inserted: "inserted" + event_key$7,
click: "click" + event_key$7,
focusin: "focusin" + event_key$7,
focusout: "focusout" + event_key$7,
mouseenter: "mouseenter" + event_key$7,
mouseleave: "mouseleave" + event_key$7
};
var popover = function(_tooltip) {
_inheritsloose(popover, _tooltip);
function popover() {
return _tooltip.apply(this, arguments) || this
}
var _proto = popover.prototype;
_proto.iswithcontent = function iswithcontent() {
return this.gettitle() || this._getcontent()
};
_proto.addattachmentclass = function addattachmentclass(attachment) {
$(this.gettipelement()).addclass(class_prefix$1 + "-" + attachment)
};
_proto.gettipelement = function gettipelement() {
this.tip = this.tip || $(this.config.template)[0];
return this.tip
};
_proto.setcontent = function setcontent() {
var $tip = $(this.gettipelement());
this.setelementcontent($tip.find(selector$7.title), this.gettitle());
var content = this._getcontent();
if (typeof content === 'function') {
content = content.call(this.element)
}
this.setelementcontent($tip.find(selector$7.content), content);
$tip.removeclass(classname$7.fade + " " + classname$7.show)
};
_proto._getcontent = function _getcontent() {
return this.element.getattribute('data-content') || this.config.content
};
_proto._cleantipclass = function _cleantipclass() {
var $tip = $(this.gettipelement());
var tabclass = $tip.attr('class').match(bscls_prefix_regex$1);
if (tabclass !== null && tabclass.length > 0) {
$tip.removeclass(tabclass.join(''))
}
};
popover._jqueryinterface = function _jqueryinterface(config) {
return this.each(function() {
var data = $(this).data(data_key$7);
var _config = typeof config === 'object' ? config : null;
if (!data && /dispose|hide/.test(config)) {
return
}
if (!data) {
data = new popover(this, _config);
$(this).data(data_key$7, data)
}
if (typeof config === 'string') {
if (typeof data[config] === 'undefined') {
throw new typeerror("no method named \"" + config + "\"")
}
data[config]()
}
})
};
_createclass(popover, null, [{
key: "version",
get: function get() {
return version$7
}
}, {
key: "default",
get: function get() {
return default$5
}
}, {
key: "name",
get: function get() {
return name$7
}
}, {
key: "data_key",
get: function get() {
return data_key$7
}
}, {
key: "event",
get: function get() {
return event$7
}
}, {
key: "event_key",
get: function get() {
return event_key$7
}
}, {
key: "defaulttype",
get: function get() {
return defaulttype$5
}
}]);
return popover
}(tooltip);
$.fn[name$7] = popover._jqueryinterface;
$.fn[name$7].constructor = popover;
$.fn[name$7].noconflict = function() {
$.fn[name$7] = jquery_no_conflict$7;
return popover._jqueryinterface
};
var name$8 = 'scrollspy';
var version$8 = '4.4.1';
var data_key$8 = 'bs.scrollspy';
var event_key$8 = "." + data_key$8;
var data_api_key$6 = '.data-api';
var jquery_no_conflict$8 = $.fn[name$8];
var default$6 = {
offset: 10,
method: 'auto',
target: ''
};
var defaulttype$6 = {
offset: 'number',
method: 'string',
target: '(string|element)'
};
var event$8 = {
activate: "activate" + event_key$8,
scroll: "scroll" + event_key$8,
load_data_api: "load" + event_key$8 + data_api_key$6
};
var classname$8 = {
dropdown_item: 'dropdown-item',
dropdown_menu: 'dropdown-menu',
active: 'active'
};
var selector$8 = {
data_spy: '[data-spy="scroll"]',
active: '.active',
nav_list_group: '.nav, .list-group',
nav_links: '.nav-link',
nav_items: '.nav-item',
list_items: '.list-group-item',
dropdown: '.dropdown',
dropdown_items: '.dropdown-item',
dropdown_toggle: '.dropdown-toggle'
};
var offsetmethod = {
offset: 'offset',
position: 'position'
};
var scrollspy = function() {
function scrollspy(element, config) {
var _this = this;
this._element = element;
this._scrollelement = element.tagname === 'body' ? window : element;
this._config = this._getconfig(config);
this._selector = this._config.target + " " + selector$8.nav_links + "," + (this._config.target + " " + selector$8.list_items + ",") + (this._config.target + " " + selector$8.dropdown_items);
this._offsets = [];
this._targets = [];
this._activetarget = null;
this._scrollheight = 0;
$(this._scrollelement).on(event$8.scroll, function(event) {
return _this._process(event)
});
this.refresh();
this._process()
}
var _proto = scrollspy.prototype;
_proto.refresh = function refresh() {
var _this2 = this;
var automethod = this._scrollelement === this._scrollelement.window ? offsetmethod.offset : offsetmethod.position;
var offsetmethod = this._config.method === 'auto' ? automethod : this._config.method;
var offsetbase = offsetmethod === offsetmethod.position ? this._getscrolltop() : 0;
this._offsets = [];
this._targets = [];
this._scrollheight = this._getscrollheight();
var targets = [].slice.call(document.queryselectorall(this._selector));
targets.map(function(element) {
var target;
var targetselector = util.getselectorfromelement(element);
if (targetselector) {
target = document.queryselector(targetselector)
}
if (target) {
var targetbcr = target.getboundingclientrect();
if (targetbcr.width || targetbcr.height) {
return [$(target)[offsetmethod]().top + offsetbase, targetselector]
}
}
return null
}).filter(function(item) {
return item
}).sort(function(a, b) {
return a[0] - b[0]
}).foreach(function(item) {
_this2._offsets.push(item[0]);
_this2._targets.push(item[1])
})
};
_proto.dispose = function dispose() {
$.removedata(this._element, data_key$8);
$(this._scrollelement).off(event_key$8);
this._element = null;
this._scrollelement = null;
this._config = null;
this._selector = null;
this._offsets = null;
this._targets = null;
this._activetarget = null;
this._scrollheight = null
};
_proto._getconfig = function _getconfig(config) {
config = _objectspread2({}, default$6, {}, typeof config === 'object' && config ? config : {});
if (typeof config.target !== 'string') {
var id = $(config.target).attr('id');
if (!id) {
id = util.getuid(name$8);
$(config.target).attr('id', id)
}
config.target = "#" + id
}
util.typecheckconfig(name$8, config, defaulttype$6);
return config
};
_proto._getscrolltop = function _getscrolltop() {
return this._scrollelement === window ? this._scrollelement.pageyoffset : this._scrollelement.scrolltop
};
_proto._getscrollheight = function _getscrollheight() {
return this._scrollelement.scrollheight || math.max(document.body.scrollheight, document.documentelement.scrollheight)
};
_proto._getoffsetheight = function _getoffsetheight() {
return this._scrollelement === window ? window.innerheight : this._scrollelement.getboundingclientrect().height
};
_proto._process = function _process() {
var scrolltop = this._getscrolltop() + this._config.offset;
var scrollheight = this._getscrollheight();
var maxscroll = this._config.offset + scrollheight - this._getoffsetheight();
if (this._scrollheight !== scrollheight) {
this.refresh()
}
if (scrolltop >= maxscroll) {
var target = this._targets[this._targets.length - 1];
if (this._activetarget !== target) {
this._activate(target)
}
return
}
if (this._activetarget && scrolltop < this._offsets[0] && this._offsets[0] > 0) {
this._activetarget = null;
this._clear();
return
}
var offsetlength = this._offsets.length;
for (var i = offsetlength; i--;) {
var isactivetarget = this._activetarget !== this._targets[i] && scrolltop >= this._offsets[i] && (typeof this._offsets[i + 1] === 'undefined' || scrolltop < this._offsets[i + 1]);
if (isactivetarget) {
this._activate(this._targets[i])
}
}
};
_proto._activate = function _activate(target) {
this._activetarget = target;
this._clear();
var queries = this._selector.split(',').map(function(selector) {
return selector + "[data-target=\"" + target + "\"]," + selector + "[href=\"" + target + "\"]"
});
var $link = $([].slice.call(document.queryselectorall(queries.join(','))));
if ($link.hasclass(classname$8.dropdown_item)) {
$link.closest(selector$8.dropdown).find(selector$8.dropdown_toggle).addclass(classname$8.active);
$link.addclass(classname$8.active)
} else {
$link.addclass(classname$8.active);
$link.parents(selector$8.nav_list_group).prev(selector$8.nav_links + ", " + selector$8.list_items).addclass(classname$8.active);
$link.parents(selector$8.nav_list_group).prev(selector$8.nav_items).children(selector$8.nav_links).addclass(classname$8.active)
}
$(this._scrollelement).trigger(event$8.activate, {
relatedtarget: target
})
};
_proto._clear = function _clear() {
[].slice.call(document.queryselectorall(this._selector)).filter(function(node) {
return node.classlist.contains(classname$8.active)
}).foreach(function(node) {
return node.classlist.remove(classname$8.active)
})
};
scrollspy._jqueryinterface = function _jqueryinterface(config) {
return this.each(function() {
var data = $(this).data(data_key$8);
var _config = typeof config === 'object' && config;
if (!data) {
data = new scrollspy(this, _config);
$(this).data(data_key$8, data)
}
if (typeof config === 'string') {
if (typeof data[config] === 'undefined') {
throw new typeerror("no method named \"" + config + "\"")
}
data[config]()
}
})
};
_createclass(scrollspy, null, [{
key: "version",
get: function get() {
return version$8
}
}, {
key: "default",
get: function get() {
return default$6
}
}]);
return scrollspy
}();
$(window).on(event$8.load_data_api, function() {
var scrollspys = [].slice.call(document.queryselectorall(selector$8.data_spy));
var scrollspyslength = scrollspys.length;
for (var i = scrollspyslength; i--;) {
var $spy = $(scrollspys[i]);
scrollspy._jqueryinterface.call($spy, $spy.data())
}
});
$.fn[name$8] = scrollspy._jqueryinterface;
$.fn[name$8].constructor = scrollspy;
$.fn[name$8].noconflict = function() {
$.fn[name$8] = jquery_no_conflict$8;
return scrollspy._jqueryinterface
};
var name$9 = 'tab';
var version$9 = '4.4.1';
var data_key$9 = 'bs.tab';
var event_key$9 = "." + data_key$9;
var data_api_key$7 = '.data-api';
var jquery_no_conflict$9 = $.fn[name$9];
var event$9 = {
hide: "hide" + event_key$9,
hidden: "hidden" + event_key$9,
show: "show" + event_key$9,
shown: "shown" + event_key$9,
click_data_api: "click" + event_key$9 + data_api_key$7
};
var classname$9 = {
dropdown_menu: 'dropdown-menu',
active: 'active',
disabled: 'disabled',
fade: 'fade',
show: 'show'
};
var selector$9 = {
dropdown: '.dropdown',
nav_list_group: '.nav, .list-group',
active: '.active',
active_ul: '> li > .active',
data_toggle: '[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]',
dropdown_toggle: '.dropdown-toggle',
dropdown_active_child: '> .dropdown-menu .active'
};
var tab = function() {
function tab(element) {
this._element = element
}
var _proto = tab.prototype;
_proto.show = function show() {
var _this = this;
if (this._element.parentnode && this._element.parentnode.nodetype === node.element_node && $(this._element).hasclass(classname$9.active) || $(this._element).hasclass(classname$9.disabled)) {
return
}
var target;
var previous;
var listelement = $(this._element).closest(selector$9.nav_list_group)[0];
var selector = util.getselectorfromelement(this._element);
if (listelement) {
var itemselector = listelement.nodename === 'ul' || listelement.nodename === 'ol' ? selector$9.active_ul : selector$9.active;
previous = $.makearray($(listelement).find(itemselector));
previous = previous[previous.length - 1]
}
var hideevent = $.event(event$9.hide, {
relatedtarget: this._element
});
var showevent = $.event(event$9.show, {
relatedtarget: previous
});
if (previous) {
$(previous).trigger(hideevent)
}
$(this._element).trigger(showevent);
if (showevent.isdefaultprevented() || hideevent.isdefaultprevented()) {
return
}
if (selector) {
target = document.queryselector(selector)
}
this._activate(this._element, listelement);
var complete = function complete() {
var hiddenevent = $.event(event$9.hidden, {
relatedtarget: _this._element
});
var shownevent = $.event(event$9.shown, {
relatedtarget: previous
});
$(previous).trigger(hiddenevent);
$(_this._element).trigger(shownevent)
};
if (target) {
this._activate(target, target.parentnode, complete)
} else {
complete()
}
};
_proto.dispose = function dispose() {
$.removedata(this._element, data_key$9);
this._element = null
};
_proto._activate = function _activate(element, container, callback) {
var _this2 = this;
var activeelements = container && (container.nodename === 'ul' || container.nodename === 'ol') ? $(container).find(selector$9.active_ul) : $(container).children(selector$9.active);
var active = activeelements[0];
var istransitioning = callback && active && $(active).hasclass(classname$9.fade);
var complete = function complete() {
return _this2._transitioncomplete(element, active, callback)
};
if (active && istransitioning) {
var transitionduration = util.gettransitiondurationfromelement(active);
$(active).removeclass(classname$9.show).one(util.transition_end, complete).emulatetransitionend(transitionduration)
} else {
complete()
}
};
_proto._transitioncomplete = function _transitioncomplete(element, active, callback) {
if (active) {
$(active).removeclass(classname$9.active);
var dropdownchild = $(active.parentnode).find(selector$9.dropdown_active_child)[0];
if (dropdownchild) {
$(dropdownchild).removeclass(classname$9.active)
}
if (active.getattribute('role') === 'tab') {
active.setattribute('aria-selected', !1)
}
}
$(element).addclass(classname$9.active);
if (element.getattribute('role') === 'tab') {
element.setattribute('aria-selected', !0)
}
util.reflow(element);
if (element.classlist.contains(classname$9.fade)) {
element.classlist.add(classname$9.show)
}
if (element.parentnode && $(element.parentnode).hasclass(classname$9.dropdown_menu)) {
var dropdownelement = $(element).closest(selector$9.dropdown)[0];
if (dropdownelement) {
var dropdowntogglelist = [].slice.call(dropdownelement.queryselectorall(selector$9.dropdown_toggle));
$(dropdowntogglelist).addclass(classname$9.active)
}
element.setattribute('aria-expanded', !0)
}
if (callback) {
callback()
}
};
tab._jqueryinterface = function _jqueryinterface(config) {
return this.each(function() {
var $this = $(this);
var data = $this.data(data_key$9);
if (!data) {
data = new tab(this);
$this.data(data_key$9, data)
}
if (typeof config === 'string') {
if (typeof data[config] === 'undefined') {
throw new typeerror("no method named \"" + config + "\"")
}
data[config]()
}
})
};
_createclass(tab, null, [{
key: "version",
get: function get() {
return version$9
}
}]);
return tab
}();
$(document).on(event$9.click_data_api, selector$9.data_toggle, function(event) {
event.preventdefault();
tab._jqueryinterface.call($(this), 'show')
});
$.fn[name$9] = tab._jqueryinterface;
$.fn[name$9].constructor = tab;
$.fn[name$9].noconflict = function() {
$.fn[name$9] = jquery_no_conflict$9;
return tab._jqueryinterface
};
var name$a = 'toast';
var version$a = '4.4.1';
var data_key$a = 'bs.toast';
var event_key$a = "." + data_key$a;
var jquery_no_conflict$a = $.fn[name$a];
var event$a = {
click_dismiss: "click.dismiss" + event_key$a,
hide: "hide" + event_key$a,
hidden: "hidden" + event_key$a,
show: "show" + event_key$a,
shown: "shown" + event_key$a
};
var classname$a = {
fade: 'fade',
hide: 'hide',
show: 'show',
showing: 'showing'
};
var defaulttype$7 = {
animation: 'boolean',
autohide: 'boolean',
delay: 'number'
};
var default$7 = {
animation: !0,
autohide: !0,
delay: 500
};
var selector$a = {
data_dismiss: '[data-dismiss="toast"]'
};
var toast = function() {
function toast(element, config) {
this._element = element;
this._config = this._getconfig(config);
this._timeout = null;
this._setlisteners()
}
var _proto = toast.prototype;
_proto.show = function show() {
var _this = this;
var showevent = $.event(event$a.show);
$(this._element).trigger(showevent);
if (showevent.isdefaultprevented()) {
return
}
if (this._config.animation) {
this._element.classlist.add(classname$a.fade)
}
var complete = function complete() {
_this._element.classlist.remove(classname$a.showing);
_this._element.classlist.add(classname$a.show);
$(_this._element).trigger(event$a.shown);
if (_this._config.autohide) {
_this._timeout = settimeout(function() {
_this.hide()
}, _this._config.delay)
}
};
this._element.classlist.remove(classname$a.hide);
util.reflow(this._element);
this._element.classlist.add(classname$a.showing);
if (this._config.animation) {
var transitionduration = util.gettransitiondurationfromelement(this._element);
$(this._element).one(util.transition_end, complete).emulatetransitionend(transitionduration)
} else {
complete()
}
};
_proto.hide = function hide() {
if (!this._element.classlist.contains(classname$a.show)) {
return
}
var hideevent = $.event(event$a.hide);
$(this._element).trigger(hideevent);
if (hideevent.isdefaultprevented()) {
return
}
this._close()
};
_proto.dispose = function dispose() {
cleartimeout(this._timeout);
this._timeout = null;
if (this._element.classlist.contains(classname$a.show)) {
this._element.classlist.remove(classname$a.show)
}
$(this._element).off(event$a.click_dismiss);
$.removedata(this._element, data_key$a);
this._element = null;
this._config = null
};
_proto._getconfig = function _getconfig(config) {
config = _objectspread2({}, default$7, {}, $(this._element).data(), {}, typeof config === 'object' && config ? config : {});
util.typecheckconfig(name$a, config, this.constructor.defaulttype);
return config
};
_proto._setlisteners = function _setlisteners() {
var _this2 = this;
$(this._element).on(event$a.click_dismiss, selector$a.data_dismiss, function() {
return _this2.hide()
})
};
_proto._close = function _close() {
var _this3 = this;
var complete = function complete() {
_this3._element.classlist.add(classname$a.hide);
$(_this3._element).trigger(event$a.hidden)
};
this._element.classlist.remove(classname$a.show);
if (this._config.animation) {
var transitionduration = util.gettransitiondurationfromelement(this._element);
$(this._element).one(util.transition_end, complete).emulatetransitionend(transitionduration)
} else {
complete()
}
};
toast._jqueryinterface = function _jqueryinterface(config) {
return this.each(function() {
var $element = $(this);
var data = $element.data(data_key$a);
var _config = typeof config === 'object' && config;
if (!data) {
data = new toast(this, _config);
$element.data(data_key$a, data)
}
if (typeof config === 'string') {
if (typeof data[config] === 'undefined') {
throw new typeerror("no method named \"" + config + "\"")
}
data[config](this)
}
})
};
_createclass(toast, null, [{
key: "version",
get: function get() {
return version$a
}
}, {
key: "defaulttype",
get: function get() {
return defaulttype$7
}
}, {
key: "default",
get: function get() {
return default$7
}
}]);
return toast
}();
$.fn[name$a] = toast._jqueryinterface;
$.fn[name$a].constructor = toast;
$.fn[name$a].noconflict = function() {
$.fn[name$a] = jquery_no_conflict$a;
return toast._jqueryinterface
};
exports.alert = alert;
exports.button = button;
exports.carousel = carousel;
exports.collapse = collapse;
exports.dropdown = dropdown;
exports.modal = modal;
exports.popover = popover;
exports.scrollspy = scrollspy;
exports.tab = tab;
exports.toast = toast;
exports.tooltip = tooltip;
exports.util = util;
object.defineproperty(exports, '__esmodule', {
value: !0
})
})));
(function($, w) {
"use strict";
var methods = (function() {
var c = {
bcclass: 'sf-breadcrumb',
menuclass: 'sf-js-enabled',
anchorclass: 'sf-with-ul',
menuarrowclass: 'sf-arrows'
},
ios = (function() {
var ios = /^(?![\w\w]*windows phone)[\w\w]*(iphone|ipad|ipod)/i.test(navigator.useragent);
if (ios) {
$('html').css('cursor', 'pointer').on('click', $.noop)
}
return ios
})(),
wp7 = (function() {
var style = document.documentelement.style;
return ('behavior' in style && 'fill' in style && /iemobile/i.test(navigator.useragent))
})(),
unprefixedpointerevents = (function() {
return (!!w.pointerevent)
})(),
togglemenuclasses = function($menu, o, add) {
var classes = c.menuclass,
method;
if (o.cssarrows) {
classes += ' ' + c.menuarrowclass
}
method = (add) ? 'addclass' : 'removeclass';
$menu[method](classes)
},
setpathtocurrent = function($menu, o) {
return $menu.find('li.' + o.pathclass).slice(0, o.pathlevels).addclass(o.hoverclass + ' ' + c.bcclass).filter(function() {
return ($(this).children(o.popupselector).hide().show().length)
}).removeclass(o.pathclass)
},
toggleanchorclass = function($li, add) {
var method = (add) ? 'addclass' : 'removeclass';
$li.children('a')[method](c.anchorclass)
},
toggletouchaction = function($menu) {
var mstouchaction = $menu.css('ms-touch-action');
var touchaction = $menu.css('touch-action');
touchaction = touchaction || mstouchaction;
touchaction = (touchaction === 'pan-y') ? 'auto' : 'pan-y';
$menu.css({
'ms-touch-action': touchaction,
'touch-action': touchaction
})
},
getmenu = function($el) {
return $el.closest('.' + c.menuclass)
},
getoptions = function($el) {
return getmenu($el).data('sfoptions')
},
over = function() {
var $this = $(this),
o = getoptions($this);
cleartimeout(o.sftimer);
$this.siblings().superfish('hide').end().superfish('show')
},
close = function(o) {
o.retainpath = ($.inarray(this[0], o.$path) > -1);
this.superfish('hide');
if (!this.parents('.' + o.hoverclass).length) {
o.onidle.call(getmenu(this));
if (o.$path.length) {
$.proxy(over, o.$path)()
}
}
},
out = function() {
var $this = $(this),
o = getoptions($this);
if (ios) {
$.proxy(close, $this, o)()
} else {
cleartimeout(o.sftimer);
o.sftimer = settimeout($.proxy(close, $this, o), o.delay)
}
},
touchhandler = function(e) {
var $this = $(this),
o = getoptions($this),
$ul = $this.siblings(e.data.popupselector);
if (o.onhandletouch.call($ul) === !1) {
return this
}
if ($ul.length > 0 && $ul.is(':hidden')) {
$this.one('click.superfish', !1);
if (e.type === 'mspointerdown' || e.type === 'pointerdown') {
$this.trigger('focus')
} else {
$.proxy(over, $this.parent('li'))()
}
}
},
applyhandlers = function($menu, o) {
var targets = 'li:has(' + o.popupselector + ')';
if ($.fn.hoverintent && !o.disablehi) {
$menu.hoverintent(over, out, targets)
} else {
$menu.on('mouseenter.superfish', targets, over).on('mouseleave.superfish', targets, out)
}
var touchevent = 'mspointerdown.superfish';
if (unprefixedpointerevents) {
touchevent = 'pointerdown.superfish'
}
if (!ios) {
touchevent += ' touchend.superfish'
}
if (wp7) {
touchevent += ' mousedown.superfish'
}
$menu.on('focusin.superfish', 'li', over).on('focusout.superfish', 'li', out).on(touchevent, 'a', o, touchhandler)
};
return {
hide: function(instant) {
if (this.length) {
var $this = this,
o = getoptions($this);
if (!o) {
return this
}
var not = (o.retainpath === !0) ? o.$path : '',
$ul = $this.find('li.' + o.hoverclass).add(this).not(not).removeclass(o.hoverclass).children(o.popupselector),
speed = o.speedout;
if (instant) {
$ul.show();
speed = 0
}
o.retainpath = !1;
if (o.onbeforehide.call($ul) === !1) {
return this
}
$ul.stop(!0, !0).animate(o.animationout, speed, function() {
var $this = $(this);
o.onhide.call($this)
})
}
return this
},
show: function() {
var o = getoptions(this);
if (!o) {
return this
}
var $this = this.addclass(o.hoverclass),
$ul = $this.children(o.popupselector);
if (o.onbeforeshow.call($ul) === !1) {
return this
}
$ul.stop(!0, !0).animate(o.animation, o.speed, function() {
o.onshow.call($ul)
});
return this
},
destroy: function() {
return this.each(function() {
var $this = $(this),
o = $this.data('sfoptions'),
$haspopup;
if (!o) {
return !1
}
$haspopup = $this.find(o.popupselector).parent('li');
cleartimeout(o.sftimer);
togglemenuclasses($this, o);
toggleanchorclass($haspopup);
toggletouchaction($this);
$this.off('.superfish').off('.hoverintent');
$haspopup.children(o.popupselector).attr('style', function(i, style) {
return style.replace(/display[^;]+;?/g, '')
});
o.$path.removeclass(o.hoverclass + ' ' + c.bcclass).addclass(o.pathclass);
$this.find('.' + o.hoverclass).removeclass(o.hoverclass);
o.ondestroy.call($this);
$this.removedata('sfoptions')
})
},
init: function(op) {
return this.each(function() {
var $this = $(this);
if ($this.data('sfoptions')) {
return !1
}
var o = $.extend({}, $.fn.superfish.defaults, op),
$haspopup = $this.find(o.popupselector).parent('li');
o.$path = setpathtocurrent($this, o);
$this.data('sfoptions', o);
togglemenuclasses($this, o, !0);
toggleanchorclass($haspopup, !0);
toggletouchaction($this);
applyhandlers($this, o);
$haspopup.not('.' + c.bcclass).superfish('hide', !0);
o.oninit.call(this)
})
}
}
})();
$.fn.superfish = function(method, args) {
if (methods[method]) {
return methods[method].apply(this, array.prototype.slice.call(arguments, 1))
} else if (typeof method === 'object' || !method) {
return methods.init.apply(this, arguments)
} else {
return $.error('method ' + method + ' does not exist on jquery.fn.superfish')
}
};
$.fn.superfish.defaults = {
popupselector: 'ul,.sf-mega',
hoverclass: 'sfhover',
pathclass: 'overridethistouse',
pathlevels: 1,
delay: 800,
animation: {
opacity: 'show'
},
animationout: {
opacity: 'hide'
},
speed: 'normal',
speedout: 'fast',
cssarrows: !0,
disablehi: !1,
oninit: $.noop,
onbeforeshow: $.noop,
onshow: $.noop,
onbeforehide: $.noop,
onhide: $.noop,
onidle: $.noop,
ondestroy: $.noop,
onhandletouch: $.noop
}
})(jquery, window);
/*!
* slicknav responsive mobile menu v1.0.10
* (c) 2016 josh cope
* licensed under mit
*/
! function(e, t, n) {
function a(t, n) {
this.element = t, this.settings = e.extend({}, i, n), this.settings.duplicate || n.hasownproperty("removeids") || (this.settings.removeids = !1), this._defaults = i, this._name = s, this.init()
}
var i = {
label: "menu",
duplicate: !0,
duration: 200,
easingopen: "swing",
easingclose: "swing",
closedsymbol: "►",
openedsymbol: "▼",
prependto: "body",
appendto: "",
parenttag: "a",
closeonclick: !1,
allowparentlinks: !1,
nestedparentlinks: !0,
showchildren: !1,
removeids: !0,
removeclasses: !1,
removestyles: !1,
brand: "",
animations: "jquery",
init: function() {},
beforeopen: function() {},
beforeclose: function() {},
afteropen: function() {},
afterclose: function() {}
},
s = "slicknav",
o = "slicknav",
l = {
down: 40,
enter: 13,
escape: 27,
left: 37,
right: 39,
space: 32,
tab: 9,
up: 38
};
a.prototype.init = function() {
var n, a, i = this,
s = e(this.element),
r = this.settings;
if (r.duplicate ? i.mobilenav = s.clone() : i.mobilenav = s, r.removeids && (i.mobilenav.removeattr("id"), i.mobilenav.find("*").each(function(t, n) {
e(n).removeattr("id")
})), r.removeclasses && (i.mobilenav.removeattr("class"), i.mobilenav.find("*").each(function(t, n) {
e(n).removeattr("class")
})), r.removestyles && (i.mobilenav.removeattr("style"), i.mobilenav.find("*").each(function(t, n) {
e(n).removeattr("style")
})), n = o + "_icon", "" === r.label && (n += " " + o + "_no-text"), "a" == r.parenttag && (r.parenttag = 'a href="#"'), i.mobilenav.attr("class", o + "_nav"), a = e(''), "" !== r.brand) {
var c = e('' + r.brand + "
");
e(a).append(c)
}
i.btn = e(["<" + r.parenttag + ' aria-haspopup="true" role="button" tabindex="0" class="' + o + "_btn " + o + '_collapsed">', '", '', '', '', '', "", "" + r.parenttag + ">"].join("")), e(a).append(i.btn), "" !== r.appendto ? e(r.appendto).append(a) : e(r.prependto).prepend(a), a.append(i.mobilenav);
var p = i.mobilenav.find("li");
e(p).each(function() {
var t = e(this),
n = {};
if (n.children = t.children("ul").attr("role", "menu"), t.data("menu", n), n.children.length > 0) {
var a = t.contents(),
s = !1,
l = [];
e(a).each(function() {
return e(this).is("ul") ? !1 : (l.push(this), void(e(this).is("a") && (s = !0)))
});
var c = e("<" + r.parenttag + ' role="menuitem" aria-haspopup="true" tabindex="-1" class="' + o + '_item"/>');
if (r.allowparentlinks && !r.nestedparentlinks && s) e(l).wrapall('').parent();
else {
var p = e(l).wrapall(c).parent();
p.addclass(o + "_row")
}
r.showchildren ? t.addclass(o + "_open") : t.addclass(o + "_collapsed"), t.addclass(o + "_parent");
var d = e('' + (r.showchildren ? r.openedsymbol : r.closedsymbol) + "");
r.allowparentlinks && !r.nestedparentlinks && s && (d = d.wrap(c).parent()), e(l).last().after(d)
} else 0 === t.children().length && t.addclass(o + "_txtnode");
t.children("a").attr("role", "menuitem").click(function(t) {
r.closeonclick && !e(t.target).parent().closest("li").hasclass(o + "_parent") && e(i.btn).click()
}), r.closeonclick && r.allowparentlinks && (t.children("a").children("a").click(function(t) {
e(i.btn).click()
}), t.find("." + o + "_parent-link a:not(." + o + "_item)").click(function(t) {
e(i.btn).click()
}))
}), e(p).each(function() {
var t = e(this).data("menu");
r.showchildren || i._visibilitytoggle(t.children, null, !1, null, !0)
}), i._visibilitytoggle(i.mobilenav, null, !1, "init", !0), i.mobilenav.attr("role", "menu"), e(t).mousedown(function() {
i._outlines(!1)
}), e(t).keyup(function() {
i._outlines(!0)
}), e(i.btn).click(function(e) {
e.preventdefault(), i._menutoggle()
}), i.mobilenav.on("click", "." + o + "_item", function(t) {
t.preventdefault(), i._itemclick(e(this))
}), e(i.btn).keydown(function(t) {
var n = t || event;
switch (n.keycode) {
case l.enter:
case l.space:
case l.down:
t.preventdefault(), n.keycode === l.down && e(i.btn).hasclass(o + "_open") || i._menutoggle(), e(i.btn).next().find('[role="menuitem"]').first().focus()
}
}), i.mobilenav.on("keydown", "." + o + "_item", function(t) {
var n = t || event;
switch (n.keycode) {
case l.enter:
t.preventdefault(), i._itemclick(e(t.target));
break;
case l.right:
t.preventdefault(), e(t.target).parent().hasclass(o + "_collapsed") && i._itemclick(e(t.target)), e(t.target).next().find('[role="menuitem"]').first().focus()
}
}), i.mobilenav.on("keydown", '[role="menuitem"]', function(t) {
var n = t || event;
switch (n.keycode) {
case l.down:
t.preventdefault();
var a = e(t.target).parent().parent().children().children('[role="menuitem"]:visible'),
s = a.index(t.target),
r = s + 1;
a.length <= r && (r = 0);
var c = a.eq(r);
c.focus();
break;
case l.up:
t.preventdefault();
var a = e(t.target).parent().parent().children().children('[role="menuitem"]:visible'),
s = a.index(t.target),
c = a.eq(s - 1);
c.focus();
break;
case l.left:
if (t.preventdefault(), e(t.target).parent().parent().parent().hasclass(o + "_open")) {
var p = e(t.target).parent().parent().prev();
p.focus(), i._itemclick(p)
} else e(t.target).parent().parent().hasclass(o + "_nav") && (i._menutoggle(), e(i.btn).focus());
break;
case l.escape:
t.preventdefault(), i._menutoggle(), e(i.btn).focus()
}
}), r.allowparentlinks && r.nestedparentlinks && e("." + o + "_item a").click(function(e) {
e.stopimmediatepropagation()
})
}, a.prototype._menutoggle = function(e) {
var t = this,
n = t.btn,
a = t.mobilenav;
n.hasclass(o + "_collapsed") ? (n.removeclass(o + "_collapsed"), n.addclass(o + "_open")) : (n.removeclass(o + "_open"), n.addclass(o + "_collapsed")), n.addclass(o + "_animating"), t._visibilitytoggle(a, n.parent(), !0, n)
}, a.prototype._itemclick = function(e) {
var t = this,
n = t.settings,
a = e.data("menu");
a || (a = {}, a.arrow = e.children("." + o + "_arrow"), a.ul = e.next("ul"), a.parent = e.parent(), a.parent.hasclass(o + "_parent-link") && (a.parent = e.parent().parent(), a.ul = e.parent().next("ul")), e.data("menu", a)), a.parent.hasclass(o + "_collapsed") ? (a.arrow.html(n.openedsymbol), a.parent.removeclass(o + "_collapsed"), a.parent.addclass(o + "_open"), a.parent.addclass(o + "_animating"), t._visibilitytoggle(a.ul, a.parent, !0, e)) : (a.arrow.html(n.closedsymbol), a.parent.addclass(o + "_collapsed"), a.parent.removeclass(o + "_open"), a.parent.addclass(o + "_animating"), t._visibilitytoggle(a.ul, a.parent, !0, e))
}, a.prototype._visibilitytoggle = function(t, n, a, i, s) {
function l(t, n) {
e(t).removeclass(o + "_animating"), e(n).removeclass(o + "_animating"), s || p.afteropen(t)
}
function r(n, a) {
t.attr("aria-hidden", "true"), d.attr("tabindex", "-1"), c._setvisattr(t, !0), t.hide(), e(n).removeclass(o + "_animating"), e(a).removeclass(o + "_animating"), s ? "init" == n && p.init() : p.afterclose(n)
}
var c = this,
p = c.settings,
d = c._getactionitems(t),
u = 0;
a && (u = p.duration), t.hasclass(o + "_hidden") ? (t.removeclass(o + "_hidden"), s || p.beforeopen(i), "jquery" === p.animations ? t.stop(!0, !0).slidedown(u, p.easingopen, function() {
l(i, n)
}) : "velocity" === p.animations && t.velocity("finish").velocity("slidedown", {
duration: u,
easing: p.easingopen,
complete: function() {
l(i, n)
}
}), t.attr("aria-hidden", "false"), d.attr("tabindex", "0"), c._setvisattr(t, !1)) : (t.addclass(o + "_hidden"), s || p.beforeclose(i), "jquery" === p.animations ? t.stop(!0, !0).slideup(u, this.settings.easingclose, function() {
r(i, n)
}) : "velocity" === p.animations && t.velocity("finish").velocity("slideup", {
duration: u,
easing: p.easingclose,
complete: function() {
r(i, n)
}
}))
}, a.prototype._setvisattr = function(t, n) {
var a = this,
i = t.children("li").children("ul").not("." + o + "_hidden");
n ? i.each(function() {
var t = e(this);
t.attr("aria-hidden", "true");
var i = a._getactionitems(t);
i.attr("tabindex", "-1"), a._setvisattr(t, n)
}) : i.each(function() {
var t = e(this);
t.attr("aria-hidden", "false");
var i = a._getactionitems(t);
i.attr("tabindex", "0"), a._setvisattr(t, n)
})
}, a.prototype._getactionitems = function(e) {
var t = e.data("menu");
if (!t) {
t = {};
var n = e.children("li"),
a = n.find("a");
t.links = a.add(n.find("." + o + "_item")), e.data("menu", t)
}
return t.links
}, a.prototype._outlines = function(t) {
t ? e("." + o + "_item, ." + o + "_btn").css("outline", "") : e("." + o + "_item, ." + o + "_btn").css("outline", "none")
}, a.prototype.toggle = function() {
var e = this;
e._menutoggle()
}, a.prototype.open = function() {
var e = this;
e.btn.hasclass(o + "_collapsed") && e._menutoggle()
}, a.prototype.close = function() {
var e = this;
e.btn.hasclass(o + "_open") && e._menutoggle()
}, e.fn[s] = function(t) {
var n = arguments;
if (void 0 === t || "object" == typeof t) return this.each(function() {
e.data(this, "plugin_" + s) || e.data(this, "plugin_" + s, new a(this, t))
});
if ("string" == typeof t && "_" !== t[0] && "init" !== t) {
var i;
return this.each(function() {
var o = e.data(this, "plugin_" + s);
o instanceof a && "function" == typeof o[t] && (i = o[t].apply(o, array.prototype.slice.call(n, 1)))
}), void 0 !== i ? i : this
}
}
}(jquery, document, window);
window.modernizr = function(e, t, n) {
function r(e) {
m.csstext = e
}
function o(e, t) {
return typeof e === t
}
function i(e, t) {
return !!~("" + e).indexof(t)
}
function a(e, t) {
for (var r in e) {
var o = e[r];
if (!i(o, "-") && m[o] !== n) return "pfx" != t || o
}
return !1
}
function c(e, t, r) {
var i = e.charat(0).touppercase() + e.slice(1),
c = (e + " " + e.join(i + " ") + i).split(" ");
return o(t, "string") || o(t, "undefined") ? a(c, t) : function(e, t, r) {
for (var i in e) {
var a = t[e[i]];
if (a !== n) return !1 === r ? e[i] : o(a, "function") ? a.bind(r || t) : a
}
return !1
}(c = (e + " " + w.join(i + " ") + i).split(" "), t, r)
}
var s, l, u = {},
f = t.documentelement,
d = "modernizr",
p = t.createelement(d),
m = p.style,
h = t.createelement("input"),
g = ":)",
v = {}.tostring,
y = " -webkit- -moz- -o- -ms- ".split(" "),
b = "webkit moz o ms",
e = b.split(" "),
w = b.tolowercase().split(" "),
x = "http://www.w3.org/2000/svg",
s = {},
c = {},
k = {},
t = [],
j = t.slice,
n = function(e, n, r, o) {
var i, a, c, s, l = t.createelement("div"),
u = t.body,
p = u || t.createelement("body");
if (parseint(r, 10))
for (; r--;) c = t.createelement("div"), c.id = o ? o[r] : d + (r + 1), l.appendchild(c);
return i = ["", '"].join(""), l.id = d, (u ? l : p).innerhtml += i, p.appendchild(l), u || (p.style.background = "", p.style.overflow = "hidden", s = f.style.overflow, f.style.overflow = "hidden", f.appendchild(p)), a = n(l, e), u ? l.parentnode.removechild(l) : (p.parentnode.removechild(p), f.style.overflow = s), !!a
},
m = function() {
var e = {
select: "input",
change: "input",
submit: "form",
reset: "form",
error: "img",
load: "img",
abort: "img"
};
return function(r, i) {
i = i || t.createelement(e[r] || "div");
var a = (r = "on" + r) in i;
return a || (i.setattribute || (i = t.createelement("div")), i.setattribute && i.removeattribute && (i.setattribute(r, ""), a = o(i[r], "function"), o(i[r], "undefined") || (i[r] = n), i.removeattribute(r))), i = null, a
}
}(),
p = {}.hasownproperty;
l = o(p, "undefined") || o(p.call, "undefined") ? function(e, t) {
return t in e && o(e.constructor.prototype[t], "undefined")
} : function(e, t) {
return p.call(e, t)
}, function.prototype.bind || (function.prototype.bind = function(e) {
var t = this;
if ("function" != typeof t) throw new typeerror;
var n = j.call(arguments, 1),
r = function() {
if (this instanceof r) {
var o = function() {};
o.prototype = t.prototype;
var i = new o,
a = t.apply(i, n.concat(j.call(arguments)));
return object(a) === a ? a : i
}
return t.apply(e, n.concat(j.call(arguments)))
};
return r
}), s.flexbox = function() {
return c("flexwrap")
}, s.canvas = function() {
var e = t.createelement("canvas");
return !!e.getcontext && !!e.getcontext("2d")
}, s.canvastext = function() {
return !!u.canvas && !!o(t.createelement("canvas").getcontext("2d").filltext, "function")
}, s.webgl = function() {
return !!e.webglrenderingcontext
}, s.touch = function() {
var n;
return "ontouchstart" in e || e.documenttouch && t instanceof documenttouch ? n = !0 : n(["@media (", y.join("touch-enabled),("), d, ")", "{#modernizr{top:9px;position:absolute}}"].join(""), function(e) {
n = 9 === e.offsettop
}), n
}, s.geolocation = function() {
return "geolocation" in navigator
}, s.postmessage = function() {
return !!e.postmessage
}, s.websqldatabase = function() {
return !!e.opendatabase
}, s.indexeddb = function() {
return !!c("indexeddb", e)
}, s.hashchange = function() {
return m("hashchange", e) && (t.documentmode === n || t.documentmode > 7)
}, s.history = function() {
return !!e.history && !!history.pushstate
}, s.draganddrop = function() {
var e = t.createelement("div");
return "draggable" in e || "ondragstart" in e && "ondrop" in e
}, s.websockets = function() {
return "websocket" in e || "mozwebsocket" in e
}, s.rgba = function() {
return r("background-color:rgba(150,255,150,.5)"), i(m.backgroundcolor, "rgba")
}, s.hsla = function() {
return r("background-color:hsla(120,40%,100%,.5)"), i(m.backgroundcolor, "rgba") || i(m.backgroundcolor, "hsla")
}, s.multiplebgs = function() {
return r("background:url(https://),url(https://),red url(https://)"), /(url\s*\(.*?){3}/.test(m.background)
}, s.backgroundsize = function() {
return c("backgroundsize")
}, s.borderimage = function() {
return c("borderimage")
}, s.borderradius = function() {
return c("borderradius")
}, s.boxshadow = function() {
return c("boxshadow")
}, s.textshadow = function() {
return "" === t.createelement("div").style.textshadow
}, s.opacity = function() {
return e = "opacity:.55", r(y.join(e + ";") + (t || "")), /^0.55$/.test(m.opacity);
var e, t
}, s.cssanimations = function() {
return c("animationname")
}, s.csscolumns = function() {
return c("columncount")
}, s.cssgradients = function() {
var e = "background-image:";
return r((e + "-webkit- ".split(" ").join("gradient(linear,left top,right bottom,from(#9f9),to(white));" + e) + y.join("linear-gradient(left top,#9f9, white);" + e)).slice(0, -e.length)), i(m.backgroundimage, "gradient")
}, s.cssreflections = function() {
return c("boxreflect")
}, s.csstransforms = function() {
return !!c("transform")
}, s.csstransforms3d = function() {
var e = !!c("perspective");
return e && "webkitperspective" in f.style && n("@media (transform-3d),(-webkit-transform-3d){#modernizr{left:9px;position:absolute;height:3px;}}", function(t, n) {
e = 9 === t.offsetleft && 3 === t.offsetheight
}), e
}, s.csstransitions = function() {
return c("transition")
}, s.fontface = function() {
var e;
return n('@font-face {font-family:"font";src:url("https://")}', function(n, r) {
var o = t.getelementbyid("smodernizr"),
i = o.sheet || o.stylesheet,
a = i ? i.cssrules && i.cssrules[0] ? i.cssrules[0].csstext : i.csstext || "" : "";
e = /src/i.test(a) && 0 === a.indexof(r.split(" ")[0])
}), e
}, s.generatedcontent = function() {
var e;
return n(["#", d, "{font:0/0 a}#", d, ':after{content:"', g, '";visibility:hidden;font:3px/1 a}'].join(""), function(t) {
e = t.offsetheight >= 3
}), e
}, s.video = function() {
var e = t.createelement("video"),
n = !1;
try {
(n = !!e.canplaytype) && ((n = new boolean(n)).ogg = e.canplaytype('video/ogg; codecs="theora"').replace(/^no$/, ""), n.h264 = e.canplaytype('video/mp4; codecs="avc1.42e01e"').replace(/^no$/, ""), n.webm = e.canplaytype('video/webm; codecs="vp8, vorbis"').replace(/^no$/, ""))
} catch (e) {}
return n
}, s.audio = function() {
var e = t.createelement("audio"),
n = !1;
try {
(n = !!e.canplaytype) && ((n = new boolean(n)).ogg = e.canplaytype('audio/ogg; codecs="vorbis"').replace(/^no$/, ""), n.mp3 = e.canplaytype("audio/mpeg;").replace(/^no$/, ""), n.wav = e.canplaytype('audio/wav; codecs="1"').replace(/^no$/, ""), n.m4a = (e.canplaytype("audio/x-m4a;") || e.canplaytype("audio/aac;")).replace(/^no$/, ""))
} catch (e) {}
return n
}, s.localstorage = function() {
try {
return localstorage.setitem(d, d), localstorage.removeitem(d), !0
} catch (e) {
return !1
}
}, s.sessionstorage = function() {
try {
return sessionstorage.setitem(d, d), sessionstorage.removeitem(d), !0
} catch (e) {
return !1
}
}, s.webworkers = function() {
return !!e.worker
}, s.applicationcache = function() {
return !!e.applicationcache
}, s.svg = function() {
return !!t.createelementns && !!t.createelementns(x, "svg").createsvgrect
}, s.inlinesvg = function() {
var e = t.createelement("div");
return e.innerhtml = "", (e.firstchild && e.firstchild.namespaceuri) == x
}, s.smil = function() {
return !!t.createelementns && /svganimate/.test(v.call(t.createelementns(x, "animate")))
}, s.svgclippaths = function() {
return !!t.createelementns && /svgclippath/.test(v.call(t.createelementns(x, "clippath")))
};
for (var a in s) l(s, a) && (s = a.tolowercase(), u[s] = s[a](), t.push((u[s] ? "" : "no-") + s));
return u.input || (u.input = function(n) {
for (var r = 0, o = n.length; r < o; r++) k[n[r]] = n[r] in h;
return k.list && (k.list = !!t.createelement("datalist") && !!e.htmldatalistelement), k
}("autocomplete autofocus list placeholder max min multiple pattern required step".split(" ")), u.inputtypes = function(e) {
for (var r, o, i, a = 0, c = e.length; a < c; a++) h.setattribute("type", o = e[a]), r = "text" !== h.type, r && (h.value = g, h.style.csstext = "position:absolute;visibility:hidden;", /^range$/.test(o) && h.style.webkitappearance !== n ? (f.appendchild(h), i = t.defaultview, r = i.getcomputedstyle && "textfield" !== i.getcomputedstyle(h, null).webkitappearance && 0 !== h.offsetheight, f.removechild(h)) : /^(search|tel)$/.test(o) || (r = /^(url|email)$/.test(o) ? h.checkvalidity && !1 === h.checkvalidity() : h.value != g)), c[e[a]] = !!r;
return c
}("search tel url email datetime date month week time datetime-local number range color".split(" "))), u.addtest = function(e, t) {
if ("object" == typeof e)
for (var r in e) l(e, r) && u.addtest(r, e[r]);
else {
if (e = e.tolowercase(), u[e] !== n) return u;
t = "function" == typeof t ? t() : t, f.classname += " " + (t ? "" : "no-") + e, u[e] = t
}
return u
}, r(""), p = h = null,
function(e, t) {
function n() {
var e = m.elements;
return "string" == typeof e ? e.split(" ") : e
}
function r(e) {
var t = p[e[f]];
return t || (t = {}, d++, e[f] = d, p[d] = t), t
}
function o(e, n, o) {
return n || (n = t), c ? n.createelement(e) : (o || (o = r(n)), (i = o.cache[e] ? o.cache[e].clonenode() : u.test(e) ? (o.cache[e] = o.createelem(e)).clonenode() : o.createelem(e)).canhavechildren && !l.test(e) ? o.frag.appendchild(i) : i);
var i
}
function i(e) {
e || (e = t);
var i, s, l, u, f, d, p = r(e);
return m.shivcss && !a && !p.hascss && (p.hascss = (u = "article,aside,figcaption,figure,footer,header,hgroup,nav,section{display:block}mark{background:#ff0;color:#000}", f = (l = e).createelement("p"), d = l.getelementsbytagname("head")[0] || l.documentelement, f.innerhtml = "x", !!d.insertbefore(f.lastchild, d.firstchild))), c || (i = e, (s = p).cache || (s.cache = {}, s.createelem = i.createelement, s.createfrag = i.createdocumentfragment, s.frag = s.createfrag()), i.createelement = function(e) {
return m.shivmethods ? o(e, i, s) : s.createelem(e)
}, i.createdocumentfragment = function("h,f", "return function(){var n=f.clonenode(),c=n.createelement;h.shivmethods&&(" + n().join().replace(/\w+/g, function(e) {
return s.createelem(e), s.frag.createelement(e), 'c("' + e + '")'
}) + ");return n}")(m, s.frag)), e
}
var a, c, s = e.html5 || {},
l = /^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,
u = /^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,
f = "_html5shiv",
d = 0,
p = {};
! function() {
try {
var e = t.createelement("a");
e.innerhtml = "", a = "hidden" in e, c = 1 == e.childnodes.length || function() {
t.createelement("a");
var e = t.createdocumentfragment();
return void 0 === e.clonenode || void 0 === e.createdocumentfragment || void 0 === e.createelement
}()
} catch (e) {
a = !0, c = !0
}
}();
var m = {
elements: s.elements || "abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video",
shivcss: !1 !== s.shivcss,
supportsunknownelements: c,
shivmethods: !1 !== s.shivmethods,
type: "default",
shivdocument: i,
createelement: o,
createdocumentfragment: function(e, o) {
if (e || (e = t), c) return e.createdocumentfragment();
for (var i = (o = o || r(e)).frag.clonenode(), a = 0, s = n(), l = s.length; a < l; a++) i.createelement(s[a]);
return i
}
};
e.html5 = m, i(t)
}(this, t), u._version = "2.6.2", u._prefixes = y, u._domprefixes = w, u._cssomprefixes = e, u.mq = function(t) {
var n, r = e.matchmedia || e.msmatchmedia;
return r ? r(t).matches : (n("@media " + t + " { #" + d + " { position: absolute; } }", function(t) {
n = "absolute" == (e.getcomputedstyle ? getcomputedstyle(t, null) : t.currentstyle).position
}), n)
}, u.hasevent = m, u.testprop = function(e) {
return a([e])
}, u.testallprops = c, u.teststyles = n, u.prefixed = function(e, t, n) {
return t ? c(e, t, n) : c(e, "pfx")
}, f.classname = f.classname.replace(/(^|\s)no-js(\s|$)/, "$1$2") + " js " + t.join(" "), u
}(this, this.document),
function(e, t, n) {
function r(e) {
return "[object function]" == h.call(e)
}
function o(e) {
return "string" == typeof e
}
function i() {}
function a(e) {
return !e || "loaded" == e || "complete" == e || "uninitialized" == e
}
function c() {
var e = g.shift();
v = 1, e ? e.t ? p(function() {
("c" == e.t ? f.injectcss : f.injectjs)(e.s, 0, e.a, e.x, e.e, 1)
}, 0) : (e(), c()) : v = 0
}
function s(e, n, r, i, s) {
return v = 0, n = n || "j", o(e) ? function(e, n, r, o, i, s, l) {
function u(t) {
if (!h && a(d.readystate) && (w.r = h = 1, !v && c(), d.onload = d.onreadystatechange = null, t)) {
"img" != e && p(function() {
e.removechild(d)
}, 50);
for (var r in k[n]) k[n].hasownproperty(r) && k[n][r].onload()
}
}
l = l || f.errortimeout;
var d = t.createelement(e),
h = 0,
y = 0,
w = {
t: r,
s: n,
e: i,
a: s,
x: l
};
1 === k[n] && (y = 1, k[n] = []), "object" == e ? d.data = n : (d.src = n, d.type = e), d.width = d.height = "0", d.onerror = d.onload = d.onreadystatechange = function() {
u.call(this, y)
}, g.splice(o, 0, w), "img" != e && (y || 2 === k[n] ? (e.insertbefore(d, b ? null : m), p(u, l)) : k[n].push(d))
}("c" == n ? x : w, e, n, this.i++, r, i, s) : (g.splice(this.i++, 0, e), 1 == g.length && c()), this
}
function l() {
var e = f;
return e.loader = {
load: s,
i: 0
}, e
}
var u, f, d = t.documentelement,
p = e.settimeout,
m = t.getelementsbytagname("script")[0],
h = {}.tostring,
g = [],
v = 0,
y = "mozappearance" in d.style,
b = y && !!t.createrange().comparenode,
e = b ? d : m.parentnode,
w = (d = e.opera && "[object opera]" == h.call(e.opera), d = !!t.attachevent && !d, y ? "object" : d ? "script" : "img"),
x = d ? "script" : w,
s = array.isarray || function(e) {
return "[object array]" == h.call(e)
},
c = [],
k = {},
t = {
timeout: function(e, t) {
return t.length && (e.timeout = t[0]), e
}
};
(f = function(e) {
function t(e, t, o, i, a) {
var c = function(e) {
e = e.split("!");
var t, n, r, o = c.length,
i = e.pop(),
a = e.length;
for (i = {
url: i,
origurl: i,
prefixes: e
}, n = 0; n < a; n++) r = e[n].split("="), (t = t[r.shift()]) && (i = t(i, r));
for (n = 0; n < o; n++) i = c[n](i);
return i
}(e),
s = c.autocallback;
c.url.split(".").pop().split("?").shift(), c.bypass || (t && (t = r(t) ? t : t[e] || t[i] || t[e.split("/").pop().split("?")[0]]), c.instead ? c.instead(e, t, o, i, a) : (k[c.url] ? c.noexec = !0 : k[c.url] = 1, o.load(c.url, c.forcecss || !c.forcejs && "css" == c.url.split(".").pop().split("?").shift() ? "c" : n, c.noexec, c.attrs, c.timeout), (r(t) || r(s)) && o.load(function() {
l(), t && t(c.origurl, a, i), s && s(c.origurl, a, i), k[c.url] = 2
})))
}
function a(e, n) {
function a(e, i) {
if (e) {
if (o(e)) i || (f = function() {
var e = [].slice.call(arguments);
d.apply(this, e), p()
}), t(e, f, n, 0, l);
else if (object(e) === e)
for (s in c = function() {
var t, n = 0;
for (t in e) e.hasownproperty(t) && n++;
return n
}(), e) e.hasownproperty(s) && (!i && !--c && (r(f) ? f = function() {
var e = [].slice.call(arguments);
d.apply(this, e), p()
} : f[s] = function(e) {
return function() {
var t = [].slice.call(arguments);
e && e.apply(this, t), p()
}
}(d[s])), t(e[s], f, n, s, l))
} else !i && p()
}
var c, s, l = !!e.test,
u = e.load || e.both,
f = e.callback || i,
d = f,
p = e.complete || i;
a(l ? e.yep : e.nope, !!u), u && a(u)
}
var c, s, u = this.yepnope.loader;
if (o(e)) t(e, 0, u, 0);
else if (s(e))
for (c = 0; c < e.length; c++) s = e[c], o(s) ? t(s, 0, u, 0) : s(s) ? f(s) : object(s) === s && a(s, u);
else object(e) === e && a(e, u)
}).addprefix = function(e, t) {
t[e] = t
}, f.addfilter = function(e) {
c.push(e)
}, f.errortimeout = 1e4, null == t.readystate && t.addeventlistener && (t.readystate = "loading", t.addeventlistener("domcontentloaded", u = function() {
t.removeeventlistener("domcontentloaded", u, 0), t.readystate = "complete"
}, 0)), e.yepnope = l(), e.yepnope.executestack = c, e.yepnope.injectjs = function(e, n, r, o, s, l) {
var u, d, h = t.createelement("script");
o = o || f.errortimeout;
h.src = e;
for (d in r) h.setattribute(d, r[d]);
n = l ? c : n || i, h.onreadystatechange = h.onload = function() {
!u && a(h.readystate) && (u = 1, n(), h.onload = h.onreadystatechange = null)
}, p(function() {
u || (u = 1, n(1))
}, o), s ? h.onload() : m.parentnode.insertbefore(h, m)
}, e.yepnope.injectcss = function(e, n, r, o, a, s) {
var l;
o = t.createelement("link"), n = s ? c : n || i;
o.href = e, o.rel = "stylesheet", o.type = "text/css";
for (l in r) o.setattribute(l, r[l]);
a || (m.parentnode.insertbefore(o, m), p(n, 0))
}
}(this, document), modernizr.load = function() {
yepnope.apply(window, [].slice.call(arguments, 0))
};
/**
* @preserve html5 shiv 3.7.3 | @afarkas @jdalton @jon_neal @rem | mit/gpl2 licensed
*/
;
(function(window, document) {
var version = '3.7.3';
var options = window.html5 || {};
var reskip = /^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i;
var saveclones = /^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i;
var supportshtml5styles;
var expando = '_html5shiv';
var expanid = 0;
var expandodata = {};
var supportsunknownelements;
(function() {
try {
var a = document.createelement('a');
a.innerhtml = '';
supportshtml5styles = ('hidden' in a);
supportsunknownelements = a.childnodes.length == 1 || (function() {
(document.createelement)('a');
var frag = document.createdocumentfragment();
return (typeof frag.clonenode == 'undefined' || typeof frag.createdocumentfragment == 'undefined' || typeof frag.createelement == 'undefined')
}())
} catch (e) {
supportshtml5styles = !0;
supportsunknownelements = !0
}
}());
function addstylesheet(ownerdocument, csstext) {
var p = ownerdocument.createelement('p'),
parent = ownerdocument.getelementsbytagname('head')[0] || ownerdocument.documentelement;
p.innerhtml = 'x';
return parent.insertbefore(p.lastchild, parent.firstchild)
}
function getelements() {
var elements = html5.elements;
return typeof elements == 'string' ? elements.split(' ') : elements
}
function addelements(newelements, ownerdocument) {
var elements = html5.elements;
if (typeof elements != 'string') {
elements = elements.join(' ')
}
if (typeof newelements != 'string') {
newelements = newelements.join(' ')
}
html5.elements = elements + ' ' + newelements;
shivdocument(ownerdocument)
}
function getexpandodata(ownerdocument) {
var data = expandodata[ownerdocument[expando]];
if (!data) {
data = {};
expanid++;
ownerdocument[expando] = expanid;
expandodata[expanid] = data
}
return data
}
function createelement(nodename, ownerdocument, data) {
if (!ownerdocument) {
ownerdocument = document
}
if (supportsunknownelements) {
return ownerdocument.createelement(nodename)
}
if (!data) {
data = getexpandodata(ownerdocument)
}
var node;
if (data.cache[nodename]) {
node = data.cache[nodename].clonenode()
} else if (saveclones.test(nodename)) {
node = (data.cache[nodename] = data.createelem(nodename)).clonenode()
} else {
node = data.createelem(nodename)
}
return node.canhavechildren && !reskip.test(nodename) && !node.tagurn ? data.frag.appendchild(node) : node
}
function createdocumentfragment(ownerdocument, data) {
if (!ownerdocument) {
ownerdocument = document
}
if (supportsunknownelements) {
return ownerdocument.createdocumentfragment()
}
data = data || getexpandodata(ownerdocument);
var clone = data.frag.clonenode(),
i = 0,
elems = getelements(),
l = elems.length;
for (; i < l; i++) {
clone.createelement(elems[i])
}
return clone
}
function shivmethods(ownerdocument, data) {
if (!data.cache) {
data.cache = {};
data.createelem = ownerdocument.createelement;
data.createfrag = ownerdocument.createdocumentfragment;
data.frag = data.createfrag()
}
ownerdocument.createelement = function(nodename) {
if (!html5.shivmethods) {
return data.createelem(nodename)
}
return createelement(nodename, ownerdocument, data)
};
ownerdocument.createdocumentfragment = function('h,f', 'return function(){' + 'var n=f.clonenode(),c=n.createelement;' + 'h.shivmethods&&(' + getelements().join().replace(/[\w\-:]+/g, function(nodename) {
data.createelem(nodename);
data.frag.createelement(nodename);
return 'c("' + nodename + '")'
}) + ');return n}')(html5, data.frag)
}
function shivdocument(ownerdocument) {
if (!ownerdocument) {
ownerdocument = document
}
var data = getexpandodata(ownerdocument);
if (html5.shivcss && !supportshtml5styles && !data.hascss) {
data.hascss = !!addstylesheet(ownerdocument, 'article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}' + 'mark{background:#ff0;color:#000}' + 'template{display:none}')
}
if (!supportsunknownelements) {
shivmethods(ownerdocument, data)
}
return ownerdocument
}
var html5 = {
'elements': options.elements || 'abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video',
'version': version,
'shivcss': (options.shivcss !== !1),
'supportsunknownelements': supportsunknownelements,
'shivmethods': (options.shivmethods !== !1),
'type': 'default',
'shivdocument': shivdocument,
createelement: createelement,
createdocumentfragment: createdocumentfragment,
addelements: addelements
};
window.html5 = html5;
shivdocument(document);
if (typeof module == 'object' && module.exports) {
module.exports = html5
}
}(typeof window !== "undefined" ? window : this, document));
/**
* owl carousel v2.2.1
* copyright 2013-2017 david deutsch
* licensed under ()
*/
/**
* owl carousel
* @version 2.1.6
* @author bartosz wojciechowski
* @author david deutsch
* @license the mit license (mit)
* @todo lazy load icon
* @todo prevent animationend bubling
* @todo itemsscaleup
* @todo test zepto
* @todo stagepadding calculate wrong active classes
*/
;
(function($, window, document, undefined) {
/**
* creates a carousel.
* @class the owl carousel.
* @public
* @param {htmlelement|jquery} element - the element to create the carousel for.
* @param {object} [options] - the options
*/
function owl(element, options) {
/**
* current settings for the carousel.
* @public
*/
this.settings = null;
/**
* current options set by the caller including defaults.
* @public
*/
this.options = $.extend({}, owl.defaults, options);
/**
* plugin element.
* @public
*/
this.$element = $(element);
/**
* proxied event handlers.
* @protected
*/
this._handlers = {};
/**
* references to the running plugins of this carousel.
* @protected
*/
this._plugins = {};
/**
* currently suppressed events to prevent them from beeing retriggered.
* @protected
*/
this._supress = {};
/**
* absolute current position.
* @protected
*/
this._current = null;
/**
* animation speed in milliseconds.
* @protected
*/
this._speed = null;
/**
* coordinates of all items in pixel.
* @todo the name of this member is missleading.
* @protected
*/
this._coordinates = [];
/**
* current breakpoint.
* @todo real media queries would be nice.
* @protected
*/
this._breakpoint = null;
/**
* current width of the plugin element.
*/
this._width = null;
/**
* all real items.
* @protected
*/
this._items = [];
/**
* all cloned items.
* @protected
*/
this._clones = [];
/**
* merge values of all items.
* @todo maybe this could be part of a plugin.
* @protected
*/
this._mergers = [];
/**
* widths of all items.
*/
this._widths = [];
/**
* invalidated parts within the update process.
* @protected
*/
this._invalidated = {};
/**
* ordered list of workers for the update process.
* @protected
*/
this._pipe = [];
/**
* current state information for the drag operation.
* @todo #261
* @protected
*/
this._drag = {
time: null,
target: null,
pointer: null,
stage: {
start: null,
current: null
},
direction: null
};
/**
* current state information and their tags.
* @type {object}
* @protected
*/
this._states = {
current: {},
tags: {
'initializing': ['busy'],
'animating': ['busy'],
'dragging': ['interacting']
}
};
$.each(['onresize', 'onthrottledresize'], $.proxy(function(i, handler) {
this._handlers[handler] = $.proxy(this[handler], this);
}, this));
$.each(owl.plugins, $.proxy(function(key, plugin) {
this._plugins[key.charat(0).tolowercase() + key.slice(1)] = new plugin(this);
}, this));
$.each(owl.workers, $.proxy(function(priority, worker) {
this._pipe.push({
'filter': worker.filter,
'run': $.proxy(worker.run, this)
});
}, this));
this.setup();
this.initialize();
}
/**
* default options for the carousel.
* @public
*/
owl.defaults = {
items: 3,
loop: false,
center: false,
rewind: false,
mousedrag: true,
touchdrag: true,
pulldrag: true,
freedrag: false,
margin: 0,
stagepadding: 0,
merge: false,
mergefit: true,
autowidth: false,
startposition: 0,
rtl: false,
smartspeed: 250,
fluidspeed: false,
dragendspeed: false,
responsive: {},
responsiverefreshrate: 200,
responsivebaseelement: window,
fallbackeasing: 'swing',
info: false,
nesteditemselector: false,
itemelement: 'div',
stageelement: 'div',
refreshclass: 'owl-refresh',
loadedclass: 'owl-loaded',
loadingclass: 'owl-loading',
rtlclass: 'owl-rtl',
responsiveclass: 'owl-responsive',
dragclass: 'owl-drag',
itemclass: 'owl-item',
stageclass: 'owl-stage',
stageouterclass: 'owl-stage-outer',
grabclass: 'owl-grab'
};
/**
* enumeration for width.
* @public
* @readonly
* @enum {string}
*/
owl.width = {
default: 'default',
inner: 'inner',
outer: 'outer'
};
/**
* enumeration for types.
* @public
* @readonly
* @enum {string}
*/
owl.type = {
event: 'event',
state: 'state'
};
/**
* contains all registered plugins.
* @public
*/
owl.plugins = {};
/**
* list of workers involved in the update process.
*/
owl.workers = [{
filter: ['width', 'settings'],
run: function() {
this._width = this.$element.width();
}
}, {
filter: ['width', 'items', 'settings'],
run: function(cache) {
cache.current = this._items && this._items[this.relative(this._current)];
}
}, {
filter: ['items', 'settings'],
run: function() {
this.$stage.children('.cloned').remove();
}
}, {
filter: ['width', 'items', 'settings'],
run: function(cache) {
var margin = this.settings.margin || '',
grid = !this.settings.autowidth,
rtl = this.settings.rtl,
css = {
'width': 'auto',
'margin-left': rtl ? margin : '',
'margin-right': rtl ? '' : margin
};
!grid && this.$stage.children().css(css);
cache.css = css;
}
}, {
filter: ['width', 'items', 'settings'],
run: function(cache) {
var width = (this.width() / this.settings.items).tofixed(3) - this.settings.margin,
merge = null,
iterator = this._items.length,
grid = !this.settings.autowidth,
widths = [];
cache.items = {
merge: false,
width: width
};
while (iterator--) {
merge = this._mergers[iterator];
merge = this.settings.mergefit && math.min(merge, this.settings.items) || merge;
cache.items.merge = merge > 1 || cache.items.merge;
widths[iterator] = !grid ? this._items[iterator].width() : width * merge;
}
this._widths = widths;
}
}, {
filter: ['items', 'settings'],
run: function() {
var clones = [],
items = this._items,
settings = this.settings,
// todo: should be computed from number of min width items in stage
view = math.max(settings.items * 2, 4),
size = math.ceil(items.length / 2) * 2,
repeat = settings.loop && items.length ? settings.rewind ? view : math.max(view, size) : 0,
append = '',
prepend = '';
repeat /= 2;
while (repeat--) {
// switch to only using appended clones
clones.push(this.normalize(clones.length / 2, true));
append = append + items[clones[clones.length - 1]][0].outerhtml;
clones.push(this.normalize(items.length - 1 - (clones.length - 1) / 2, true));
prepend = items[clones[clones.length - 1]][0].outerhtml + prepend;
}
this._clones = clones;
$(append).addclass('cloned').appendto(this.$stage);
$(prepend).addclass('cloned').prependto(this.$stage);
}
}, {
filter: ['width', 'items', 'settings'],
run: function() {
var rtl = this.settings.rtl ? 1 : -1,
size = this._clones.length + this._items.length,
iterator = -1,
previous = 0,
current = 0,
coordinates = [];
while (++iterator < size) {
previous = coordinates[iterator - 1] || 0;
current = this._widths[this.relative(iterator)] + this.settings.margin;
coordinates.push(previous + current * rtl);
}
this._coordinates = coordinates;
}
}, {
filter: ['width', 'items', 'settings'],
run: function() {
var padding = this.settings.stagepadding,
coordinates = this._coordinates,
css = {
'width': math.ceil(math.abs(coordinates[coordinates.length - 1])) + padding * 2,
'padding-left': padding || '',
'padding-right': padding || ''
};
this.$stage.css(css);
}
}, {
filter: ['width', 'items', 'settings'],
run: function(cache) {
var iterator = this._coordinates.length,
grid = !this.settings.autowidth,
items = this.$stage.children();
if (grid && cache.items.merge) {
while (iterator--) {
cache.css.width = this._widths[this.relative(iterator)];
items.eq(iterator).css(cache.css);
}
} else if (grid) {
cache.css.width = cache.items.width;
items.css(cache.css);
}
}
}, {
filter: ['items'],
run: function() {
this._coordinates.length < 1 && this.$stage.removeattr('style');
}
}, {
filter: ['width', 'items', 'settings'],
run: function(cache) {
cache.current = cache.current ? this.$stage.children().index(cache.current) : 0;
cache.current = math.max(this.minimum(), math.min(this.maximum(), cache.current));
this.reset(cache.current);
}
}, {
filter: ['position'],
run: function() {
this.animate(this.coordinates(this._current));
}
}, {
filter: ['width', 'position', 'items', 'settings'],
run: function() {
var rtl = this.settings.rtl ? 1 : -1,
padding = this.settings.stagepadding * 2,
begin = this.coordinates(this.current()) + padding,
end = begin + this.width() * rtl,
inner, outer, matches = [],
i, n;
for (i = 0, n = this._coordinates.length; i < n; i++) {
inner = this._coordinates[i - 1] || 0;
outer = math.abs(this._coordinates[i]) + padding * rtl;
if ((this.op(inner, '<=', begin) && (this.op(inner, '>', end))) ||
(this.op(outer, '<', begin) && this.op(outer, '>', end))) {
matches.push(i);
}
}
this.$stage.children('.active').removeclass('active');
this.$stage.children(':eq(' + matches.join('), :eq(') + ')').addclass('active');
if (this.settings.center) {
this.$stage.children('.center').removeclass('center');
this.$stage.children().eq(this.current()).addclass('center');
}
}
}];
/**
* initializes the carousel.
* @protected
*/
owl.prototype.initialize = function() {
this.enter('initializing');
this.trigger('initialize');
this.$element.toggleclass(this.settings.rtlclass, this.settings.rtl);
if (this.settings.autowidth && !this.is('pre-loading')) {
var imgs, nestedselector, width;
imgs = this.$element.find('img');
nestedselector = this.settings.nesteditemselector ? '.' + this.settings.nesteditemselector : undefined;
width = this.$element.children(nestedselector).width();
if (imgs.length && width <= 0) {
this.preloadautowidthimages(imgs);
}
}
this.$element.addclass(this.options.loadingclass);
// create stage
this.$stage = $('<' + this.settings.stageelement + ' class="' + this.settings.stageclass + '"/>')
.wrap('');
// append stage
this.$element.append(this.$stage.parent());
// append content
this.replace(this.$element.children().not(this.$stage.parent()));
// check visibility
if (this.$element.is(':visible')) {
// update view
this.refresh();
} else {
// invalidate width
this.invalidate('width');
}
this.$element
.removeclass(this.options.loadingclass)
.addclass(this.options.loadedclass);
// register event handlers
this.registereventhandlers();
this.leave('initializing');
this.trigger('initialized');
};
/**
* setups the current settings.
* @todo remove responsive classes. why should adaptive designs be brought into ie8?
* @todo support for media queries by using `matchmedia` would be nice.
* @public
*/
owl.prototype.setup = function() {
var viewport = this.viewport(),
overwrites = this.options.responsive,
match = -1,
settings = null;
if (!overwrites) {
settings = $.extend({}, this.options);
} else {
$.each(overwrites, function(breakpoint) {
if (breakpoint <= viewport && breakpoint > match) {
match = number(breakpoint);
}
});
settings = $.extend({}, this.options, overwrites[match]);
if (typeof settings.stagepadding === 'function') {
settings.stagepadding = settings.stagepadding();
}
delete settings.responsive;
// responsive class
if (settings.responsiveclass) {
this.$element.attr('class',
this.$element.attr('class').replace(new regexp('(' + this.options.responsiveclass + '-)\\s+\\s', 'g'), '$1' + match)
);
}
}
this.trigger('change', {
property: {
name: 'settings',
value: settings
}
});
this._breakpoint = match;
this.settings = settings;
this.invalidate('settings');
this.trigger('changed', {
property: {
name: 'settings',
value: this.settings
}
});
};
/**
* updates option logic if necessery.
* @protected
*/
owl.prototype.optionslogic = function() {
if (this.settings.autowidth) {
this.settings.stagepadding = false;
this.settings.merge = false;
}
};
/**
* prepares an item before add.
* @todo rename event parameter `content` to `item`.
* @protected
* @returns {jquery|htmlelement} - the item container.
*/
owl.prototype.prepare = function(item) {
var event = this.trigger('prepare', {
content: item
});
if (!event.data) {
event.data = $('<' + this.settings.itemelement + '/>')
.addclass(this.options.itemclass).append(item)
}
this.trigger('prepared', {
content: event.data
});
return event.data;
};
/**
* updates the view.
* @public
*/
owl.prototype.update = function() {
var i = 0,
n = this._pipe.length,
filter = $.proxy(function(p) {
return this[p]
}, this._invalidated),
cache = {};
while (i < n) {
if (this._invalidated.all || $.grep(this._pipe[i].filter, filter).length > 0) {
this._pipe[i].run(cache);
}
i++;
}
this._invalidated = {};
!this.is('valid') && this.enter('valid');
};
/**
* gets the width of the view.
* @public
* @param {owl.width} [dimension=owl.width.default] - the dimension to return.
* @returns {number} - the width of the view in pixel.
*/
owl.prototype.width = function(dimension) {
dimension = dimension || owl.width.default;
switch (dimension) {
case owl.width.inner:
case owl.width.outer:
return this._width;
default:
return this._width - this.settings.stagepadding * 2 + this.settings.margin;
}
};
/**
* refreshes the carousel primarily for adaptive purposes.
* @public
*/
owl.prototype.refresh = function() {
this.enter('refreshing');
this.trigger('refresh');
this.setup();
this.optionslogic();
this.$element.addclass(this.options.refreshclass);
this.update();
this.$element.removeclass(this.options.refreshclass);
this.leave('refreshing');
this.trigger('refreshed');
};
/**
* checks window `resize` event.
* @protected
*/
owl.prototype.onthrottledresize = function() {
window.cleartimeout(this.resizetimer);
this.resizetimer = window.settimeout(this._handlers.onresize, this.settings.responsiverefreshrate);
};
/**
* checks window `resize` event.
* @protected
*/
owl.prototype.onresize = function() {
if (!this._items.length) {
return false;
}
if (this._width === this.$element.width()) {
return false;
}
if (!this.$element.is(':visible')) {
return false;
}
this.enter('resizing');
if (this.trigger('resize').isdefaultprevented()) {
this.leave('resizing');
return false;
}
this.invalidate('width');
this.refresh();
this.leave('resizing');
this.trigger('resized');
};
/**
* registers event handlers.
* @todo check `mspointerenabled`
* @todo #261
* @protected
*/
owl.prototype.registereventhandlers = function() {
if ($.support.transition) {
this.$stage.on($.support.transition.end + '.owl.core', $.proxy(this.ontransitionend, this));
}
if (this.settings.responsive !== false) {
this.on(window, 'resize', this._handlers.onthrottledresize);
}
if (this.settings.mousedrag) {
this.$element.addclass(this.options.dragclass);
this.$stage.on('mousedown.owl.core', $.proxy(this.ondragstart, this));
this.$stage.on('dragstart.owl.core selectstart.owl.core', function() {
return false
});
}
if (this.settings.touchdrag) {
this.$stage.on('touchstart.owl.core', $.proxy(this.ondragstart, this));
this.$stage.on('touchcancel.owl.core', $.proxy(this.ondragend, this));
}
};
/**
* handles `touchstart` and `mousedown` events.
* @todo horizontal swipe threshold as option
* @todo #261
* @protected
* @param {event} event - the event arguments.
*/
owl.prototype.ondragstart = function(event) {
var stage = null;
if (event.which === 3) {
return;
}
if ($.support.transform) {
stage = this.$stage.css('transform').replace(/.*\(|\)| /g, '').split(',');
stage = {
x: stage[stage.length === 16 ? 12 : 4],
y: stage[stage.length === 16 ? 13 : 5]
};
} else {
stage = this.$stage.position();
stage = {
x: this.settings.rtl ?
stage.left + this.$stage.width() - this.width() + this.settings.margin : stage.left,
y: stage.top
};
}
if (this.is('animating')) {
$.support.transform ? this.animate(stage.x) : this.$stage.stop()
this.invalidate('position');
}
this.$element.toggleclass(this.options.grabclass, event.type === 'mousedown');
this.speed(0);
this._drag.time = new date().gettime();
this._drag.target = $(event.target);
this._drag.stage.start = stage;
this._drag.stage.current = stage;
this._drag.pointer = this.pointer(event);
$(document).on('mouseup.owl.core touchend.owl.core', $.proxy(this.ondragend, this));
$(document).one('mousemove.owl.core touchmove.owl.core', $.proxy(function(event) {
var delta = this.difference(this._drag.pointer, this.pointer(event));
$(document).on('mousemove.owl.core touchmove.owl.core', $.proxy(this.ondragmove, this));
if (math.abs(delta.x) < math.abs(delta.y) && this.is('valid')) {
return;
}
event.preventdefault();
this.enter('dragging');
this.trigger('drag');
}, this));
};
/**
* handles the `touchmove` and `mousemove` events.
* @todo #261
* @protected
* @param {event} event - the event arguments.
*/
owl.prototype.ondragmove = function(event) {
var minimum = null,
maximum = null,
pull = null,
delta = this.difference(this._drag.pointer, this.pointer(event)),
stage = this.difference(this._drag.stage.start, delta);
if (!this.is('dragging')) {
return;
}
event.preventdefault();
if (this.settings.loop) {
minimum = this.coordinates(this.minimum());
maximum = this.coordinates(this.maximum() + 1) - minimum;
stage.x = (((stage.x - minimum) % maximum + maximum) % maximum) + minimum;
} else {
minimum = this.settings.rtl ? this.coordinates(this.maximum()) : this.coordinates(this.minimum());
maximum = this.settings.rtl ? this.coordinates(this.minimum()) : this.coordinates(this.maximum());
pull = this.settings.pulldrag ? -1 * delta.x / 5 : 0;
stage.x = math.max(math.min(stage.x, minimum + pull), maximum + pull);
}
this._drag.stage.current = stage;
this.animate(stage.x);
};
/**
* handles the `touchend` and `mouseup` events.
* @todo #261
* @todo threshold for click event
* @protected
* @param {event} event - the event arguments.
*/
owl.prototype.ondragend = function(event) {
var delta = this.difference(this._drag.pointer, this.pointer(event)),
stage = this._drag.stage.current,
direction = delta.x > 0 ^ this.settings.rtl ? 'left' : 'right';
$(document).off('.owl.core');
this.$element.removeclass(this.options.grabclass);
if (delta.x !== 0 && this.is('dragging') || !this.is('valid')) {
this.speed(this.settings.dragendspeed || this.settings.smartspeed);
this.current(this.closest(stage.x, delta.x !== 0 ? direction : this._drag.direction));
this.invalidate('position');
this.update();
this._drag.direction = direction;
if (math.abs(delta.x) > 3 || new date().gettime() - this._drag.time > 300) {
this._drag.target.one('click.owl.core', function() {
return false;
});
}
}
if (!this.is('dragging')) {
return;
}
this.leave('dragging');
this.trigger('dragged');
};
/**
* gets absolute position of the closest item for a coordinate.
* @todo setting `freedrag` makes `closest` not reusable. see #165.
* @protected
* @param {number} coordinate - the coordinate in pixel.
* @param {string} direction - the direction to check for the closest item. ether `left` or `right`.
* @return {number} - the absolute position of the closest item.
*/
owl.prototype.closest = function(coordinate, direction) {
var position = -1,
pull = 30,
width = this.width(),
coordinates = this.coordinates();
if (!this.settings.freedrag) {
// check closest item
$.each(coordinates, $.proxy(function(index, value) {
// on a left pull, check on current index
if (direction === 'left' && coordinate > value - pull && coordinate < value + pull) {
position = index;
// on a right pull, check on previous index
// to do so, subtract width from value and set position = index + 1
} else if (direction === 'right' && coordinate > value - width - pull && coordinate < value - width + pull) {
position = index + 1;
} else if (this.op(coordinate, '<', value) &&
this.op(coordinate, '>', coordinates[index + 1] || value - width)) {
position = direction === 'left' ? index + 1 : index;
}
return position === -1;
}, this));
}
if (!this.settings.loop) {
// non loop boundries
if (this.op(coordinate, '>', coordinates[this.minimum()])) {
position = coordinate = this.minimum();
} else if (this.op(coordinate, '<', coordinates[this.maximum()])) {
position = coordinate = this.maximum();
}
}
return position;
};
/**
* animates the stage.
* @todo #270
* @public
* @param {number} coordinate - the coordinate in pixels.
*/
owl.prototype.animate = function(coordinate) {
var animate = this.speed() > 0;
this.is('animating') && this.ontransitionend();
if (animate) {
this.enter('animating');
this.trigger('translate');
}
if ($.support.transform3d && $.support.transition) {
this.$stage.css({
transform: 'translate3d(' + coordinate + 'px,0px,0px)',
transition: (this.speed() / 1000) + 's'
});
} else if (animate) {
this.$stage.animate({
left: coordinate + 'px'
}, this.speed(), this.settings.fallbackeasing, $.proxy(this.ontransitionend, this));
} else {
this.$stage.css({
left: coordinate + 'px'
});
}
};
/**
* checks whether the carousel is in a specific state or not.
* @param {string} state - the state to check.
* @returns {boolean} - the flag which indicates if the carousel is busy.
*/
owl.prototype.is = function(state) {
return this._states.current[state] && this._states.current[state] > 0;
};
/**
* sets the absolute position of the current item.
* @public
* @param {number} [position] - the new absolute position or nothing to leave it unchanged.
* @returns {number} - the absolute position of the current item.
*/
owl.prototype.current = function(position) {
if (position === undefined) {
return this._current;
}
if (this._items.length === 0) {
return undefined;
}
position = this.normalize(position);
if (this._current !== position) {
var event = this.trigger('change', {
property: {
name: 'position',
value: position
}
});
if (event.data !== undefined) {
position = this.normalize(event.data);
}
this._current = position;
this.invalidate('position');
this.trigger('changed', {
property: {
name: 'position',
value: this._current
}
});
}
return this._current;
};
/**
* invalidates the given part of the update routine.
* @param {string} [part] - the part to invalidate.
* @returns {array.} - the invalidated parts.
*/
owl.prototype.invalidate = function(part) {
if ($.type(part) === 'string') {
this._invalidated[part] = true;
this.is('valid') && this.leave('valid');
}
return $.map(this._invalidated, function(v, i) {
return i
});
};
/**
* resets the absolute position of the current item.
* @public
* @param {number} position - the absolute position of the new item.
*/
owl.prototype.reset = function(position) {
position = this.normalize(position);
if (position === undefined) {
return;
}
this._speed = 0;
this._current = position;
this.suppress(['translate', 'translated']);
this.animate(this.coordinates(position));
this.release(['translate', 'translated']);
};
/**
* normalizes an absolute or a relative position of an item.
* @public
* @param {number} position - the absolute or relative position to normalize.
* @param {boolean} [relative=false] - whether the given position is relative or not.
* @returns {number} - the normalized position.
*/
owl.prototype.normalize = function(position, relative) {
var n = this._items.length,
m = relative ? 0 : this._clones.length;
if (!this.isnumeric(position) || n < 1) {
position = undefined;
} else if (position < 0 || position >= n + m) {
position = ((position - m / 2) % n + n) % n + m / 2;
}
return position;
};
/**
* converts an absolute position of an item into a relative one.
* @public
* @param {number} position - the absolute position to convert.
* @returns {number} - the converted position.
*/
owl.prototype.relative = function(position) {
position -= this._clones.length / 2;
return this.normalize(position, true);
};
/**
* gets the maximum position for the current item.
* @public
* @param {boolean} [relative=false] - whether to return an absolute position or a relative position.
* @returns {number}
*/
owl.prototype.maximum = function(relative) {
var settings = this.settings,
maximum = this._coordinates.length,
iterator,
reciprocalitemswidth,
elementwidth;
if (settings.loop) {
maximum = this._clones.length / 2 + this._items.length - 1;
} else if (settings.autowidth || settings.merge) {
iterator = this._items.length;
reciprocalitemswidth = this._items[--iterator].width();
elementwidth = this.$element.width();
while (iterator--) {
reciprocalitemswidth += this._items[iterator].width() + this.settings.margin;
if (reciprocalitemswidth > elementwidth) {
break;
}
}
maximum = iterator + 1;
} else if (settings.center) {
maximum = this._items.length - 1;
} else {
maximum = this._items.length - settings.items;
}
if (relative) {
maximum -= this._clones.length / 2;
}
return math.max(maximum, 0);
};
/**
* gets the minimum position for the current item.
* @public
* @param {boolean} [relative=false] - whether to return an absolute position or a relative position.
* @returns {number}
*/
owl.prototype.minimum = function(relative) {
return relative ? 0 : this._clones.length / 2;
};
/**
* gets an item at the specified relative position.
* @public
* @param {number} [position] - the relative position of the item.
* @return {jquery|array.} - the item at the given position or all items if no position was given.
*/
owl.prototype.items = function(position) {
if (position === undefined) {
return this._items.slice();
}
position = this.normalize(position, true);
return this._items[position];
};
/**
* gets an item at the specified relative position.
* @public
* @param {number} [position] - the relative position of the item.
* @return {jquery|array.} - the item at the given position or all items if no position was given.
*/
owl.prototype.mergers = function(position) {
if (position === undefined) {
return this._mergers.slice();
}
position = this.normalize(position, true);
return this._mergers[position];
};
/**
* gets the absolute positions of clones for an item.
* @public
* @param {number} [position] - the relative position of the item.
* @returns {array.} - the absolute positions of clones for the item or all if no position was given.
*/
owl.prototype.clones = function(position) {
var odd = this._clones.length / 2,
even = odd + this._items.length,
map = function(index) {
return index % 2 === 0 ? even + index / 2 : odd - (index + 1) / 2
};
if (position === undefined) {
return $.map(this._clones, function(v, i) {
return map(i)
});
}
return $.map(this._clones, function(v, i) {
return v === position ? map(i) : null
});
};
/**
* sets the current animation speed.
* @public
* @param {number} [speed] - the animation speed in milliseconds or nothing to leave it unchanged.
* @returns {number} - the current animation speed in milliseconds.
*/
owl.prototype.speed = function(speed) {
if (speed !== undefined) {
this._speed = speed;
}
return this._speed;
};
/**
* gets the coordinate of an item.
* @todo the name of this method is missleanding.
* @public
* @param {number} position - the absolute position of the item within `minimum()` and `maximum()`.
* @returns {number|array.} - the coordinate of the item in pixel or all coordinates.
*/
owl.prototype.coordinates = function(position) {
var multiplier = 1,
newposition = position - 1,
coordinate;
if (position === undefined) {
return $.map(this._coordinates, $.proxy(function(coordinate, index) {
return this.coordinates(index);
}, this));
}
if (this.settings.center) {
if (this.settings.rtl) {
multiplier = -1;
newposition = position + 1;
}
coordinate = this._coordinates[position];
coordinate += (this.width() - coordinate + (this._coordinates[newposition] || 0)) / 2 * multiplier;
} else {
coordinate = this._coordinates[newposition] || 0;
}
coordinate = math.ceil(coordinate);
return coordinate;
};
/**
* calculates the speed for a translation.
* @protected
* @param {number} from - the absolute position of the start item.
* @param {number} to - the absolute position of the target item.
* @param {number} [factor=undefined] - the time factor in milliseconds.
* @returns {number} - the time in milliseconds for the translation.
*/
owl.prototype.duration = function(from, to, factor) {
if (factor === 0) {
return 0;
}
return math.min(math.max(math.abs(to - from), 1), 6) * math.abs((factor || this.settings.smartspeed));
};
/**
* slides to the specified item.
* @public
* @param {number} position - the position of the item.
* @param {number} [speed] - the time in milliseconds for the transition.
*/
owl.prototype.to = function(position, speed) {
var current = this.current(),
revert = null,
distance = position - this.relative(current),
direction = (distance > 0) - (distance < 0),
items = this._items.length,
minimum = this.minimum(),
maximum = this.maximum();
if (this.settings.loop) {
if (!this.settings.rewind && math.abs(distance) > items / 2) {
distance += direction * -1 * items;
}
position = current + distance;
revert = ((position - minimum) % items + items) % items + minimum;
if (revert !== position && revert - distance <= maximum && revert - distance > 0) {
current = revert - distance;
position = revert;
this.reset(current);
}
} else if (this.settings.rewind) {
maximum += 1;
position = (position % maximum + maximum) % maximum;
} else {
position = math.max(minimum, math.min(maximum, position));
}
this.speed(this.duration(current, position, speed));
this.current(position);
if (this.$element.is(':visible')) {
this.update();
}
};
/**
* slides to the next item.
* @public
* @param {number} [speed] - the time in milliseconds for the transition.
*/
owl.prototype.next = function(speed) {
speed = speed || false;
this.to(this.relative(this.current()) + 1, speed);
};
/**
* slides to the previous item.
* @public
* @param {number} [speed] - the time in milliseconds for the transition.
*/
owl.prototype.prev = function(speed) {
speed = speed || false;
this.to(this.relative(this.current()) - 1, speed);
};
/**
* handles the end of an animation.
* @protected
* @param {event} event - the event arguments.
*/
owl.prototype.ontransitionend = function(event) {
// if css2 animation then event object is undefined
if (event !== undefined) {
event.stoppropagation();
// catch only owl-stage transitionend event
if ((event.target || event.srcelement || event.originaltarget) !== this.$stage.get(0)) {
return false;
}
}
this.leave('animating');
this.trigger('translated');
};
/**
* gets viewport width.
* @protected
* @return {number} - the width in pixel.
*/
owl.prototype.viewport = function() {
var width;
if (this.options.responsivebaseelement !== window) {
width = $(this.options.responsivebaseelement).width();
} else if (window.innerwidth) {
width = window.innerwidth;
} else if (document.documentelement && document.documentelement.clientwidth) {
width = document.documentelement.clientwidth;
} else {
console.warn('can not detect viewport width.');
}
return width;
};
/**
* replaces the current content.
* @public
* @param {htmlelement|jquery|string} content - the new content.
*/
owl.prototype.replace = function(content) {
this.$stage.empty();
this._items = [];
if (content) {
content = (content instanceof jquery) ? content : $(content);
}
if (this.settings.nesteditemselector) {
content = content.find('.' + this.settings.nesteditemselector);
}
content.filter(function() {
return this.nodetype === 1;
}).each($.proxy(function(index, item) {
item = this.prepare(item);
this.$stage.append(item);
this._items.push(item);
this._mergers.push(item.find('[data-merge]').addback('[data-merge]').attr('data-merge') * 1 || 1);
}, this));
this.reset(this.isnumeric(this.settings.startposition) ? this.settings.startposition : 0);
this.invalidate('items');
};
/**
* adds an item.
* @todo use `item` instead of `content` for the event arguments.
* @public
* @param {htmlelement|jquery|string} content - the item content to add.
* @param {number} [position] - the relative position at which to insert the item otherwise the item will be added to the end.
*/
owl.prototype.add = function(content, position) {
var current = this.relative(this._current);
position = position === undefined ? this._items.length : this.normalize(position, true);
content = content instanceof jquery ? content : $(content);
this.trigger('add', {
content: content,
position: position
});
content = this.prepare(content);
if (this._items.length === 0 || position === this._items.length) {
this._items.length === 0 && this.$stage.append(content);
this._items.length !== 0 && this._items[position - 1].after(content);
this._items.push(content);
this._mergers.push(content.find('[data-merge]').addback('[data-merge]').attr('data-merge') * 1 || 1);
} else {
this._items[position].before(content);
this._items.splice(position, 0, content);
this._mergers.splice(position, 0, content.find('[data-merge]').addback('[data-merge]').attr('data-merge') * 1 || 1);
}
this._items[current] && this.reset(this._items[current].index());
this.invalidate('items');
this.trigger('added', {
content: content,
position: position
});
};
/**
* removes an item by its position.
* @todo use `item` instead of `content` for the event arguments.
* @public
* @param {number} position - the relative position of the item to remove.
*/
owl.prototype.remove = function(position) {
position = this.normalize(position, true);
if (position === undefined) {
return;
}
this.trigger('remove', {
content: this._items[position],
position: position
});
this._items[position].remove();
this._items.splice(position, 1);
this._mergers.splice(position, 1);
this.invalidate('items');
this.trigger('removed', {
content: null,
position: position
});
};
/**
* preloads images with auto width.
* @todo replace by a more generic approach
* @protected
*/
owl.prototype.preloadautowidthimages = function(images) {
images.each($.proxy(function(i, element) {
this.enter('pre-loading');
element = $(element);
$(new image()).one('load', $.proxy(function(e) {
element.attr('src', e.target.src);
element.css('opacity', 1);
this.leave('pre-loading');
!this.is('pre-loading') && !this.is('initializing') && this.refresh();
}, this)).attr('src', element.attr('src') || element.attr('data-src') || element.attr('data-src-retina'));
}, this));
};
/**
* destroys the carousel.
* @public
*/
owl.prototype.destroy = function() {
this.$element.off('.owl.core');
this.$stage.off('.owl.core');
$(document).off('.owl.core');
if (this.settings.responsive !== false) {
window.cleartimeout(this.resizetimer);
this.off(window, 'resize', this._handlers.onthrottledresize);
}
for (var i in this._plugins) {
this._plugins[i].destroy();
}
this.$stage.children('.cloned').remove();
this.$stage.unwrap();
this.$stage.children().contents().unwrap();
this.$stage.children().unwrap();
this.$element
.removeclass(this.options.refreshclass)
.removeclass(this.options.loadingclass)
.removeclass(this.options.loadedclass)
.removeclass(this.options.rtlclass)
.removeclass(this.options.dragclass)
.removeclass(this.options.grabclass)
.attr('class', this.$element.attr('class').replace(new regexp(this.options.responsiveclass + '-\\s+\\s', 'g'), ''))
.removedata('owl.carousel');
};
/**
* operators to calculate right-to-left and left-to-right.
* @protected
* @param {number} [a] - the left side operand.
* @param {string} [o] - the operator.
* @param {number} [b] - the right side operand.
*/
owl.prototype.op = function(a, o, b) {
var rtl = this.settings.rtl;
switch (o) {
case '<':
return rtl ? a > b : a < b;
case '>':
return rtl ? a < b : a > b;
case '>=':
return rtl ? a <= b : a >= b;
case '<=':
return rtl ? a >= b : a <= b;
default:
break;
}
};
/**
* attaches to an internal event.
* @protected
* @param {htmlelement} element - the event source.
* @param {string} event - the event name.
* @param {function} listener - the event handler to attach.
* @param {boolean} capture - wether the event should be handled at the capturing phase or not.
*/
owl.prototype.on = function(element, event, listener, capture) {
if (element.addeventlistener) {
element.addeventlistener(event, listener, capture);
} else if (element.attachevent) {
element.attachevent('on' + event, listener);
}
};
/**
* detaches from an internal event.
* @protected
* @param {htmlelement} element - the event source.
* @param {string} event - the event name.
* @param {function} listener - the attached event handler to detach.
* @param {boolean} capture - wether the attached event handler was registered as a capturing listener or not.
*/
owl.prototype.off = function(element, event, listener, capture) {
if (element.removeeventlistener) {
element.removeeventlistener(event, listener, capture);
} else if (element.detachevent) {
element.detachevent('on' + event, listener);
}
};
/**
* triggers a public event.
* @todo remove `status`, `relatedtarget` should be used instead.
* @protected
* @param {string} name - the event name.
* @param {*} [data=null] - the event data.
* @param {string} [namespace=carousel] - the event namespace.
* @param {string} [state] - the state which is associated with the event.
* @param {boolean} [enter=false] - indicates if the call enters the specified state or not.
* @returns {event} - the event arguments.
*/
owl.prototype.trigger = function(name, data, namespace, state, enter) {
var status = {
item: {
count: this._items.length,
index: this.current()
}
},
handler = $.camelcase(
$.grep(['on', name, namespace], function(v) {
return v
})
.join('-').tolowercase()
),
event = $.event(
[name, 'owl', namespace || 'carousel'].join('.').tolowercase(),
$.extend({
relatedtarget: this
}, status, data)
);
if (!this._supress[name]) {
$.each(this._plugins, function(name, plugin) {
if (plugin.ontrigger) {
plugin.ontrigger(event);
}
});
this.register({
type: owl.type.event,
name: name
});
this.$element.trigger(event);
if (this.settings && typeof this.settings[handler] === 'function') {
this.settings[handler].call(this, event);
}
}
return event;
};
/**
* enters a state.
* @param name - the state name.
*/
owl.prototype.enter = function(name) {
$.each([name].concat(this._states.tags[name] || []), $.proxy(function(i, name) {
if (this._states.current[name] === undefined) {
this._states.current[name] = 0;
}
this._states.current[name]++;
}, this));
};
/**
* leaves a state.
* @param name - the state name.
*/
owl.prototype.leave = function(name) {
$.each([name].concat(this._states.tags[name] || []), $.proxy(function(i, name) {
this._states.current[name]--;
}, this));
};
/**
* registers an event or state.
* @public
* @param {object} object - the event or state to register.
*/
owl.prototype.register = function(object) {
if (object.type === owl.type.event) {
if (!$.event.special[object.name]) {
$.event.special[object.name] = {};
}
if (!$.event.special[object.name].owl) {
var _default = $.event.special[object.name]._default;
$.event.special[object.name]._default = function(e) {
if (_default && _default.apply && (!e.namespace || e.namespace.indexof('owl') === -1)) {
return _default.apply(this, arguments);
}
return e.namespace && e.namespace.indexof('owl') > -1;
};
$.event.special[object.name].owl = true;
}
} else if (object.type === owl.type.state) {
if (!this._states.tags[object.name]) {
this._states.tags[object.name] = object.tags;
} else {
this._states.tags[object.name] = this._states.tags[object.name].concat(object.tags);
}
this._states.tags[object.name] = $.grep(this._states.tags[object.name], $.proxy(function(tag, i) {
return $.inarray(tag, this._states.tags[object.name]) === i;
}, this));
}
};
/**
* suppresses events.
* @protected
* @param {array.} events - the events to suppress.
*/
owl.prototype.suppress = function(events) {
$.each(events, $.proxy(function(index, event) {
this._supress[event] = true;
}, this));
};
/**
* releases suppressed events.
* @protected
* @param {array.} events - the events to release.
*/
owl.prototype.release = function(events) {
$.each(events, $.proxy(function(index, event) {
delete this._supress[event];
}, this));
};
/**
* gets unified pointer coordinates from event.
* @todo #261
* @protected
* @param {event} - the `mousedown` or `touchstart` event.
* @returns {object} - contains `x` and `y` coordinates of current pointer position.
*/
owl.prototype.pointer = function(event) {
var result = {
x: null,
y: null
};
event = event.originalevent || event || window.event;
event = event.touches && event.touches.length ?
event.touches[0] : event.changedtouches && event.changedtouches.length ?
event.changedtouches[0] : event;
if (event.pagex) {
result.x = event.pagex;
result.y = event.pagey;
} else {
result.x = event.clientx;
result.y = event.clienty;
}
return result;
};
/**
* determines if the input is a number or something that can be coerced to a number
* @protected
* @param {number|string|object|array|boolean|regexp|function|symbol} - the input to be tested
* @returns {boolean} - an indication if the input is a number or can be coerced to a number
*/
owl.prototype.isnumeric = function(number) {
return !isnan(parsefloat(number));
};
/**
* gets the difference of two vectors.
* @todo #261
* @protected
* @param {object} - the first vector.
* @param {object} - the second vector.
* @returns {object} - the difference.
*/
owl.prototype.difference = function(first, second) {
return {
x: first.x - second.x,
y: first.y - second.y
};
};
/**
* the jquery plugin for the owl carousel
* @todo navigation plugin `next` and `prev`
* @public
*/
$.fn.owlcarousel = function(option) {
var args = array.prototype.slice.call(arguments, 1);
return this.each(function() {
var $this = $(this),
data = $this.data('owl.carousel');
if (!data) {
data = new owl(this, typeof option == 'object' && option);
$this.data('owl.carousel', data);
$.each([
'next', 'prev', 'to', 'destroy', 'refresh', 'replace', 'add', 'remove'
], function(i, event) {
data.register({
type: owl.type.event,
name: event
});
data.$element.on(event + '.owl.carousel.core', $.proxy(function(e) {
if (e.namespace && e.relatedtarget !== this) {
this.suppress([event]);
data[event].apply(this, [].slice.call(arguments, 1));
this.release([event]);
}
}, data));
});
}
if (typeof option == 'string' && option.charat(0) !== '_') {
data[option].apply(data, args);
}
});
};
/**
* the constructor for the jquery plugin
* @public
*/
$.fn.owlcarousel.constructor = owl;
})(window.zepto || window.jquery, window, document);
/**
* autorefresh plugin
* @version 2.1.0
* @author artus kolanowski
* @author david deutsch
* @license the mit license (mit)
*/
;
(function($, window, document, undefined) {
/**
* creates the auto refresh plugin.
* @class the auto refresh plugin
* @param {owl} carousel - the owl carousel
*/
var autorefresh = function(carousel) {
/**
* reference to the core.
* @protected
* @type {owl}
*/
this._core = carousel;
/**
* refresh interval.
* @protected
* @type {number}
*/
this._interval = null;
/**
* whether the element is currently visible or not.
* @protected
* @type {boolean}
*/
this._visible = null;
/**
* all event handlers.
* @protected
* @type {object}
*/
this._handlers = {
'initialized.owl.carousel': $.proxy(function(e) {
if (e.namespace && this._core.settings.autorefresh) {
this.watch();
}
}, this)
};
// set default options
this._core.options = $.extend({}, autorefresh.defaults, this._core.options);
// register event handlers
this._core.$element.on(this._handlers);
};
/**
* default options.
* @public
*/
autorefresh.defaults = {
autorefresh: true,
autorefreshinterval: 500
};
/**
* watches the element.
*/
autorefresh.prototype.watch = function() {
if (this._interval) {
return;
}
this._visible = this._core.$element.is(':visible');
this._interval = window.setinterval($.proxy(this.refresh, this), this._core.settings.autorefreshinterval);
};
/**
* refreshes the element.
*/
autorefresh.prototype.refresh = function() {
if (this._core.$element.is(':visible') === this._visible) {
return;
}
this._visible = !this._visible;
this._core.$element.toggleclass('owl-hidden', !this._visible);
this._visible && (this._core.invalidate('width') && this._core.refresh());
};
/**
* destroys the plugin.
*/
autorefresh.prototype.destroy = function() {
var handler, property;
window.clearinterval(this._interval);
for (handler in this._handlers) {
this._core.$element.off(handler, this._handlers[handler]);
}
for (property in object.getownpropertynames(this)) {
typeof this[property] != 'function' && (this[property] = null);
}
};
$.fn.owlcarousel.constructor.plugins.autorefresh = autorefresh;
})(window.zepto || window.jquery, window, document);
/**
* lazy plugin
* @version 2.1.0
* @author bartosz wojciechowski
* @author david deutsch
* @license the mit license (mit)
*/
;
(function($, window, document, undefined) {
/**
* creates the lazy plugin.
* @class the lazy plugin
* @param {owl} carousel - the owl carousel
*/
var lazy = function(carousel) {
/**
* reference to the core.
* @protected
* @type {owl}
*/
this._core = carousel;
/**
* already loaded items.
* @protected
* @type {array.}
*/
this._loaded = [];
/**
* event handlers.
* @protected
* @type {object}
*/
this._handlers = {
'initialized.owl.carousel change.owl.carousel resized.owl.carousel': $.proxy(function(e) {
if (!e.namespace) {
return;
}
if (!this._core.settings || !this._core.settings.lazyload) {
return;
}
if ((e.property && e.property.name == 'position') || e.type == 'initialized') {
var settings = this._core.settings,
n = (settings.center && math.ceil(settings.items / 2) || settings.items),
i = ((settings.center && n * -1) || 0),
position = (e.property && e.property.value !== undefined ? e.property.value : this._core.current()) + i,
clones = this._core.clones().length,
load = $.proxy(function(i, v) {
this.load(v)
}, this);
while (i++ < n) {
this.load(clones / 2 + this._core.relative(position));
clones && $.each(this._core.clones(this._core.relative(position)), load);
position++;
}
}
}, this)
};
// set the default options
this._core.options = $.extend({}, lazy.defaults, this._core.options);
// register event handler
this._core.$element.on(this._handlers);
};
/**
* default options.
* @public
*/
lazy.defaults = {
lazyload: false
};
/**
* loads all resources of an item at the specified position.
* @param {number} position - the absolute position of the item.
* @protected
*/
lazy.prototype.load = function(position) {
var $item = this._core.$stage.children().eq(position),
$elements = $item && $item.find('.owl-lazy');
if (!$elements || $.inarray($item.get(0), this._loaded) > -1) {
return;
}
$elements.each($.proxy(function(index, element) {
var $element = $(element),
image,
url = (window.devicepixelratio > 1 && $element.attr('data-src-retina')) || $element.attr('data-src');
this._core.trigger('load', {
element: $element,
url: url
}, 'lazy');
if ($element.is('img')) {
$element.one('load.owl.lazy', $.proxy(function() {
$element.css('opacity', 1);
this._core.trigger('loaded', {
element: $element,
url: url
}, 'lazy');
}, this)).attr('src', url);
} else {
image = new image();
image.onload = $.proxy(function() {
$element.css({
'background-image': 'url("' + url + '")',
'opacity': '1'
});
this._core.trigger('loaded', {
element: $element,
url: url
}, 'lazy');
}, this);
image.src = url;
}
}, this));
this._loaded.push($item.get(0));
};
/**
* destroys the plugin.
* @public
*/
lazy.prototype.destroy = function() {
var handler, property;
for (handler in this.handlers) {
this._core.$element.off(handler, this.handlers[handler]);
}
for (property in object.getownpropertynames(this)) {
typeof this[property] != 'function' && (this[property] = null);
}
};
$.fn.owlcarousel.constructor.plugins.lazy = lazy;
})(window.zepto || window.jquery, window, document);
/**
* autoheight plugin
* @version 2.1.0
* @author bartosz wojciechowski
* @author david deutsch
* @license the mit license (mit)
*/
;
(function($, window, document, undefined) {
/**
* creates the auto height plugin.
* @class the auto height plugin
* @param {owl} carousel - the owl carousel
*/
var autoheight = function(carousel) {
/**
* reference to the core.
* @protected
* @type {owl}
*/
this._core = carousel;
/**
* all event handlers.
* @protected
* @type {object}
*/
this._handlers = {
'initialized.owl.carousel refreshed.owl.carousel': $.proxy(function(e) {
if (e.namespace && this._core.settings.autoheight) {
this.update();
}
}, this),
'changed.owl.carousel': $.proxy(function(e) {
if (e.namespace && this._core.settings.autoheight && e.property.name == 'position') {
this.update();
}
}, this),
'loaded.owl.lazy': $.proxy(function(e) {
if (e.namespace && this._core.settings.autoheight &&
e.element.closest('.' + this._core.settings.itemclass).index() === this._core.current()) {
this.update();
}
}, this)
};
// set default options
this._core.options = $.extend({}, autoheight.defaults, this._core.options);
// register event handlers
this._core.$element.on(this._handlers);
};
/**
* default options.
* @public
*/
autoheight.defaults = {
autoheight: false,
autoheightclass: 'owl-height'
};
/**
* updates the view.
*/
autoheight.prototype.update = function() {
var start = this._core._current,
end = start + this._core.settings.items,
visible = this._core.$stage.children().toarray().slice(start, end),
heights = [],
maxheight = 0;
$.each(visible, function(index, item) {
heights.push($(item).height());
});
maxheight = math.max.apply(null, heights);
this._core.$stage.parent()
.height(maxheight)
.addclass(this._core.settings.autoheightclass);
};
autoheight.prototype.destroy = function() {
var handler, property;
for (handler in this._handlers) {
this._core.$element.off(handler, this._handlers[handler]);
}
for (property in object.getownpropertynames(this)) {
typeof this[property] != 'function' && (this[property] = null);
}
};
$.fn.owlcarousel.constructor.plugins.autoheight = autoheight;
})(window.zepto || window.jquery, window, document);
/**
* video plugin
* @version 2.1.0
* @author bartosz wojciechowski
* @author david deutsch
* @license the mit license (mit)
*/
;
(function($, window, document, undefined) {
/**
* creates the video plugin.
* @class the video plugin
* @param {owl} carousel - the owl carousel
*/
var video = function(carousel) {
/**
* reference to the core.
* @protected
* @type {owl}
*/
this._core = carousel;
/**
* cache all video urls.
* @protected
* @type {object}
*/
this._videos = {};
/**
* current playing item.
* @protected
* @type {jquery}
*/
this._playing = null;
/**
* all event handlers.
* @todo the cloned content removale is too late
* @protected
* @type {object}
*/
this._handlers = {
'initialized.owl.carousel': $.proxy(function(e) {
if (e.namespace) {
this._core.register({
type: 'state',
name: 'playing',
tags: ['interacting']
});
}
}, this),
'resize.owl.carousel': $.proxy(function(e) {
if (e.namespace && this._core.settings.video && this.isinfullscreen()) {
e.preventdefault();
}
}, this),
'refreshed.owl.carousel': $.proxy(function(e) {
if (e.namespace && this._core.is('resizing')) {
this._core.$stage.find('.cloned .owl-video-frame').remove();
}
}, this),
'changed.owl.carousel': $.proxy(function(e) {
if (e.namespace && e.property.name === 'position' && this._playing) {
this.stop();
}
}, this),
'prepared.owl.carousel': $.proxy(function(e) {
if (!e.namespace) {
return;
}
var $element = $(e.content).find('.owl-video');
if ($element.length) {
$element.css('display', 'none');
this.fetch($element, $(e.content));
}
}, this)
};
// set default options
this._core.options = $.extend({}, video.defaults, this._core.options);
// register event handlers
this._core.$element.on(this._handlers);
this._core.$element.on('click.owl.video', '.owl-video-play-icon', $.proxy(function(e) {
this.play(e);
}, this));
};
/**
* default options.
* @public
*/
video.defaults = {
video: false,
videoheight: false,
videowidth: false
};
/**
* gets the video id and the type (youtube/vimeo/vzaar only).
* @protected
* @param {jquery} target - the target containing the video data.
* @param {jquery} item - the item containing the video.
*/
video.prototype.fetch = function(target, item) {
var type = (function() {
if (target.attr('data-vimeo-id')) {
return 'vimeo';
} else if (target.attr('data-vzaar-id')) {
return 'vzaar'
} else {
return 'youtube';
}
})(),
id = target.attr('data-vimeo-id') || target.attr('data-youtube-id') || target.attr('data-vzaar-id'),
width = target.attr('data-width') || this._core.settings.videowidth,
height = target.attr('data-height') || this._core.settings.videoheight,
url = target.attr('href');
if (url) {
/*
parses the id's out of the following urls (and probably more):
https://www.youtube.com/watch?v=:id
https://youtu.be/:id
https://vimeo.com/:id
https://vimeo.com/channels/:channel/:id
https://vimeo.com/groups/:group/videos/:id
https://app.vzaar.com/videos/:id
visual example: https://regexper.com/#(http%3a%7chttps%3a%7c)%5c%2f%5c%2f(player.%7cwww.%7capp.)%3f(vimeo%5c.com%7cyoutu(be%5c.com%7c%5c.be%7cbe%5c.googleapis%5c.com)%7cvzaar%5c.com)%5c%2f(video%5c%2f%7cvideos%5c%2f%7cembed%5c%2f%7cchannels%5c%2f.%2b%5c%2f%7cgroups%5c%2f.%2b%5c%2f%7cwatch%5c%3fv%3d%7cv%5c%2f)%3f(%5ba-za-z0-9._%25-%5d*)(%5c%26%5cs%2b)%3f
*/
id = url.match(/(http:|https:|)\/\/(player.|www.|app.)?(vimeo\.com|youtu(be\.com|\.be|be\.googleapis\.com)|vzaar\.com)\/(video\/|videos\/|embed\/|channels\/.+\/|groups\/.+\/|watch\?v=|v\/)?([a-za-z0-9._%-]*)(\&\s+)?/);
if (id[3].indexof('youtu') > -1) {
type = 'youtube';
} else if (id[3].indexof('vimeo') > -1) {
type = 'vimeo';
} else if (id[3].indexof('vzaar') > -1) {
type = 'vzaar';
} else {
throw new error('video url not supported.');
}
id = id[6];
} else {
throw new error('missing video url.');
}
this._videos[url] = {
type: type,
id: id,
width: width,
height: height
};
item.attr('data-video', url);
this.thumbnail(target, this._videos[url]);
};
/**
* creates video thumbnail.
* @protected
* @param {jquery} target - the target containing the video data.
* @param {object} info - the video info object.
* @see `fetch`
*/
video.prototype.thumbnail = function(target, video) {
var tnlink,
icon,
path,
dimensions = video.width && video.height ? 'style="width:' + video.width + 'px;height:' + video.height + 'px;"' : '',
customtn = target.find('img'),
srctype = 'src',
lazyclass = '',
settings = this._core.settings,
create = function(path) {
icon = '';
if (settings.lazyload) {
tnlink = '';
} else {
tnlink = '';
}
target.after(tnlink);
target.after(icon);
};
// wrap video content into owl-video-wrapper div
target.wrap('');
if (this._core.settings.lazyload) {
srctype = 'data-src';
lazyclass = 'owl-lazy';
}
// custom thumbnail
if (customtn.length) {
create(customtn.attr(srctype));
customtn.remove();
return false;
}
if (video.type === 'youtube') {
path = "//img.youtube.com/vi/" + video.id + "/hqdefault.jpg";
create(path);
} else if (video.type === 'vimeo') {
$.ajax({
type: 'get',
url: '//vimeo.com/api/v2/video/' + video.id + '.json',
jsonp: 'callback',
datatype: 'jsonp',
success: function(data) {
path = data[0].thumbnail_large;
create(path);
}
});
} else if (video.type === 'vzaar') {
$.ajax({
type: 'get',
url: '//vzaar.com/api/videos/' + video.id + '.json',
jsonp: 'callback',
datatype: 'jsonp',
success: function(data) {
path = data.framegrab_url;
create(path);
}
});
}
};
/**
* stops the current video.
* @public
*/
video.prototype.stop = function() {
this._core.trigger('stop', null, 'video');
this._playing.find('.owl-video-frame').remove();
this._playing.removeclass('owl-video-playing');
this._playing = null;
this._core.leave('playing');
this._core.trigger('stopped', null, 'video');
};
/**
* starts the current video.
* @public
* @param {event} event - the event arguments.
*/
video.prototype.play = function(event) {
var target = $(event.target),
item = target.closest('.' + this._core.settings.itemclass),
video = this._videos[item.attr('data-video')],
width = video.width || '100%',
height = video.height || this._core.$stage.height(),
html;
if (this._playing) {
return;
}
this._core.enter('playing');
this._core.trigger('play', null, 'video');
item = this._core.items(this._core.relative(item.index()));
this._core.reset(item.index());
if (video.type === 'youtube') {
html = '';
} else if (video.type === 'vimeo') {
html = '';
} else if (video.type === 'vzaar') {
html = '';
}
$('' + html + '
').insertafter(item.find('.owl-video'));
this._playing = item.addclass('owl-video-playing');
};
/**
* checks whether an video is currently in full screen mode or not.
* @todo bad style because looks like a readonly method but changes members.
* @protected
* @returns {boolean}
*/
video.prototype.isinfullscreen = function() {
var element = document.fullscreenelement || document.mozfullscreenelement ||
document.webkitfullscreenelement;
return element && $(element).parent().hasclass('owl-video-frame');
};
/**
* destroys the plugin.
*/
video.prototype.destroy = function() {
var handler, property;
this._core.$element.off('click.owl.video');
for (handler in this._handlers) {
this._core.$element.off(handler, this._handlers[handler]);
}
for (property in object.getownpropertynames(this)) {
typeof this[property] != 'function' && (this[property] = null);
}
};
$.fn.owlcarousel.constructor.plugins.video = video;
})(window.zepto || window.jquery, window, document);
/**
* animate plugin
* @version 2.1.0
* @author bartosz wojciechowski
* @author david deutsch
* @license the mit license (mit)
*/
;
(function($, window, document, undefined) {
/**
* creates the animate plugin.
* @class the navigation plugin
* @param {owl} scope - the owl carousel
*/
var animate = function(scope) {
this.core = scope;
this.core.options = $.extend({}, animate.defaults, this.core.options);
this.swapping = true;
this.previous = undefined;
this.next = undefined;
this.handlers = {
'change.owl.carousel': $.proxy(function(e) {
if (e.namespace && e.property.name == 'position') {
this.previous = this.core.current();
this.next = e.property.value;
}
}, this),
'drag.owl.carousel dragged.owl.carousel translated.owl.carousel': $.proxy(function(e) {
if (e.namespace) {
this.swapping = e.type == 'translated';
}
}, this),
'translate.owl.carousel': $.proxy(function(e) {
if (e.namespace && this.swapping && (this.core.options.animateout || this.core.options.animatein)) {
this.swap();
}
}, this)
};
this.core.$element.on(this.handlers);
};
/**
* default options.
* @public
*/
animate.defaults = {
animateout: false,
animatein: false
};
/**
* toggles the animation classes whenever an translations starts.
* @protected
* @returns {boolean|undefined}
*/
animate.prototype.swap = function() {
if (this.core.settings.items !== 1) {
return;
}
if (!$.support.animation || !$.support.transition) {
return;
}
this.core.speed(0);
var left,
clear = $.proxy(this.clear, this),
previous = this.core.$stage.children().eq(this.previous),
next = this.core.$stage.children().eq(this.next),
incoming = this.core.settings.animatein,
outgoing = this.core.settings.animateout;
if (this.core.current() === this.previous) {
return;
}
if (outgoing) {
left = this.core.coordinates(this.previous) - this.core.coordinates(this.next);
previous.one($.support.animation.end, clear)
.css({
'left': left + 'px'
})
.addclass('animated owl-animated-out')
.addclass(outgoing);
}
if (incoming) {
next.one($.support.animation.end, clear)
.addclass('animated owl-animated-in')
.addclass(incoming);
}
};
animate.prototype.clear = function(e) {
$(e.target).css({
'left': ''
})
.removeclass('animated owl-animated-out owl-animated-in')
.removeclass(this.core.settings.animatein)
.removeclass(this.core.settings.animateout);
this.core.ontransitionend();
};
/**
* destroys the plugin.
* @public
*/
animate.prototype.destroy = function() {
var handler, property;
for (handler in this.handlers) {
this.core.$element.off(handler, this.handlers[handler]);
}
for (property in object.getownpropertynames(this)) {
typeof this[property] != 'function' && (this[property] = null);
}
};
$.fn.owlcarousel.constructor.plugins.animate = animate;
})(window.zepto || window.jquery, window, document);
/**
* autoplay plugin
* @version 2.1.0
* @author bartosz wojciechowski
* @author artus kolanowski
* @author david deutsch
* @license the mit license (mit)
*/
;
(function($, window, document, undefined) {
/**
* creates the autoplay plugin.
* @class the autoplay plugin
* @param {owl} scope - the owl carousel
*/
var autoplay = function(carousel) {
/**
* reference to the core.
* @protected
* @type {owl}
*/
this._core = carousel;
/**
* the autoplay timeout.
* @type {timeout}
*/
this._timeout = null;
/**
* indicates whenever the autoplay is paused.
* @type {boolean}
*/
this._paused = false;
/**
* all event handlers.
* @protected
* @type {object}
*/
this._handlers = {
'changed.owl.carousel': $.proxy(function(e) {
if (e.namespace && e.property.name === 'settings') {
if (this._core.settings.autoplay) {
this.play();
} else {
this.stop();
}
} else if (e.namespace && e.property.name === 'position') {
//console.log('play?', e);
if (this._core.settings.autoplay) {
this._setautoplayinterval();
}
}
}, this),
'initialized.owl.carousel': $.proxy(function(e) {
if (e.namespace && this._core.settings.autoplay) {
this.play();
}
}, this),
'play.owl.autoplay': $.proxy(function(e, t, s) {
if (e.namespace) {
this.play(t, s);
}
}, this),
'stop.owl.autoplay': $.proxy(function(e) {
if (e.namespace) {
this.stop();
}
}, this),
'mouseover.owl.autoplay': $.proxy(function() {
if (this._core.settings.autoplayhoverpause && this._core.is('rotating')) {
this.pause();
}
}, this),
'mouseleave.owl.autoplay': $.proxy(function() {
if (this._core.settings.autoplayhoverpause && this._core.is('rotating')) {
this.play();
}
}, this),
'touchstart.owl.core': $.proxy(function() {
if (this._core.settings.autoplayhoverpause && this._core.is('rotating')) {
this.pause();
}
}, this),
'touchend.owl.core': $.proxy(function() {
if (this._core.settings.autoplayhoverpause) {
this.play();
}
}, this)
};
// register event handlers
this._core.$element.on(this._handlers);
// set default options
this._core.options = $.extend({}, autoplay.defaults, this._core.options);
};
/**
* default options.
* @public
*/
autoplay.defaults = {
autoplay: false,
autoplaytimeout: 5000,
autoplayhoverpause: false,
autoplayspeed: false
};
/**
* starts the autoplay.
* @public
* @param {number} [timeout] - the interval before the next animation starts.
* @param {number} [speed] - the animation speed for the animations.
*/
autoplay.prototype.play = function(timeout, speed) {
this._paused = false;
if (this._core.is('rotating')) {
return;
}
this._core.enter('rotating');
this._setautoplayinterval();
};
/**
* gets a new timeout
* @private
* @param {number} [timeout] - the interval before the next animation starts.
* @param {number} [speed] - the animation speed for the animations.
* @return {timeout}
*/
autoplay.prototype._getnexttimeout = function(timeout, speed) {
if (this._timeout) {
window.cleartimeout(this._timeout);
}
return window.settimeout($.proxy(function() {
if (this._paused || this._core.is('busy') || this._core.is('interacting') || document.hidden) {
return;
}
this._core.next(speed || this._core.settings.autoplayspeed);
}, this), timeout || this._core.settings.autoplaytimeout);
};
/**
* sets autoplay in motion.
* @private
*/
autoplay.prototype._setautoplayinterval = function() {
this._timeout = this._getnexttimeout();
};
/**
* stops the autoplay.
* @public
*/
autoplay.prototype.stop = function() {
if (!this._core.is('rotating')) {
return;
}
window.cleartimeout(this._timeout);
this._core.leave('rotating');
};
/**
* stops the autoplay.
* @public
*/
autoplay.prototype.pause = function() {
if (!this._core.is('rotating')) {
return;
}
this._paused = true;
};
/**
* destroys the plugin.
*/
autoplay.prototype.destroy = function() {
var handler, property;
this.stop();
for (handler in this._handlers) {
this._core.$element.off(handler, this._handlers[handler]);
}
for (property in object.getownpropertynames(this)) {
typeof this[property] != 'function' && (this[property] = null);
}
};
$.fn.owlcarousel.constructor.plugins.autoplay = autoplay;
})(window.zepto || window.jquery, window, document);
/**
* navigation plugin
* @version 2.1.0
* @author artus kolanowski
* @author david deutsch
* @license the mit license (mit)
*/
;
(function($, window, document, undefined) {
'use strict';
/**
* creates the navigation plugin.
* @class the navigation plugin
* @param {owl} carousel - the owl carousel.
*/
var navigation = function(carousel) {
/**
* reference to the core.
* @protected
* @type {owl}
*/
this._core = carousel;
/**
* indicates whether the plugin is initialized or not.
* @protected
* @type {boolean}
*/
this._initialized = false;
/**
* the current paging indexes.
* @protected
* @type {array}
*/
this._pages = [];
/**
* all dom elements of the user interface.
* @protected
* @type {object}
*/
this._controls = {};
/**
* markup for an indicator.
* @protected
* @type {array.}
*/
this._templates = [];
/**
* the carousel element.
* @type {jquery}
*/
this.$element = this._core.$element;
/**
* overridden methods of the carousel.
* @protected
* @type {object}
*/
this._overrides = {
next: this._core.next,
prev: this._core.prev,
to: this._core.to
};
/**
* all event handlers.
* @protected
* @type {object}
*/
this._handlers = {
'prepared.owl.carousel': $.proxy(function(e) {
if (e.namespace && this._core.settings.dotsdata) {
this._templates.push('' +
$(e.content).find('[data-dot]').addback('[data-dot]').attr('data-dot') + '
');
}
}, this),
'added.owl.carousel': $.proxy(function(e) {
if (e.namespace && this._core.settings.dotsdata) {
this._templates.splice(e.position, 0, this._templates.pop());
}
}, this),
'remove.owl.carousel': $.proxy(function(e) {
if (e.namespace && this._core.settings.dotsdata) {
this._templates.splice(e.position, 1);
}
}, this),
'changed.owl.carousel': $.proxy(function(e) {
if (e.namespace && e.property.name == 'position') {
this.draw();
}
}, this),
'initialized.owl.carousel': $.proxy(function(e) {
if (e.namespace && !this._initialized) {
this._core.trigger('initialize', null, 'navigation');
this.initialize();
this.update();
this.draw();
this._initialized = true;
this._core.trigger('initialized', null, 'navigation');
}
}, this),
'refreshed.owl.carousel': $.proxy(function(e) {
if (e.namespace && this._initialized) {
this._core.trigger('refresh', null, 'navigation');
this.update();
this.draw();
this._core.trigger('refreshed', null, 'navigation');
}
}, this)
};
// set default options
this._core.options = $.extend({}, navigation.defaults, this._core.options);
// register event handlers
this.$element.on(this._handlers);
};
/**
* default options.
* @public
* @todo rename `slideby` to `navby`
*/
navigation.defaults = {
nav: false,
navtext: ['prev', 'next'],
navspeed: false,
navelement: 'div',
navcontainer: false,
navcontainerclass: 'owl-nav',
navclass: ['owl-prev', 'owl-next'],
slideby: 1,
dotclass: 'owl-dot',
dotsclass: 'owl-dots',
dots: true,
dotseach: false,
dotsdata: false,
dotsspeed: false,
dotscontainer: false
};
/**
* initializes the layout of the plugin and extends the carousel.
* @protected
*/
navigation.prototype.initialize = function() {
var override,
settings = this._core.settings;
// create dom structure for relative navigation
this._controls.$relative = (settings.navcontainer ? $(settings.navcontainer) :
$('').addclass(settings.navcontainerclass).appendto(this.$element)).addclass('disabled');
this._controls.$previous = $('<' + settings.navelement + '>')
.addclass(settings.navclass[0])
.html(settings.navtext[0])
.prependto(this._controls.$relative)
.on('click', $.proxy(function(e) {
this.prev(settings.navspeed);
}, this));
this._controls.$next = $('<' + settings.navelement + '>')
.addclass(settings.navclass[1])
.html(settings.navtext[1])
.appendto(this._controls.$relative)
.on('click', $.proxy(function(e) {
this.next(settings.navspeed);
}, this));
// create dom structure for absolute navigation
if (!settings.dotsdata) {
this._templates = [$('
')
.addclass(settings.dotclass)
.append($('
'))
.prop('outerhtml')
];
}
this._controls.$absolute = (settings.dotscontainer ? $(settings.dotscontainer) :
$('').addclass(settings.dotsclass).appendto(this.$element)).addclass('disabled');
this._controls.$absolute.on('click', 'div', $.proxy(function(e) {
var index = $(e.target).parent().is(this._controls.$absolute) ?
$(e.target).index() : $(e.target).parent().index();
e.preventdefault();
this.to(index, settings.dotsspeed);
}, this));
// override public methods of the carousel
for (override in this._overrides) {
this._core[override] = $.proxy(this[override], this);
}
};
/**
* destroys the plugin.
* @protected
*/
navigation.prototype.destroy = function() {
var handler, control, property, override;
for (handler in this._handlers) {
this.$element.off(handler, this._handlers[handler]);
}
for (control in this._controls) {
this._controls[control].remove();
}
for (override in this.overides) {
this._core[override] = this._overrides[override];
}
for (property in object.getownpropertynames(this)) {
typeof this[property] != 'function' && (this[property] = null);
}
};
/**
* updates the internal state.
* @protected
*/
navigation.prototype.update = function() {
var i, j, k,
lower = this._core.clones().length / 2,
upper = lower + this._core.items().length,
maximum = this._core.maximum(true),
settings = this._core.settings,
size = settings.center || settings.autowidth || settings.dotsdata ?
1 : settings.dotseach || settings.items;
if (settings.slideby !== 'page') {
settings.slideby = math.min(settings.slideby, settings.items);
}
if (settings.dots || settings.slideby == 'page') {
this._pages = [];
for (i = lower, j = 0, k = 0; i < upper; i++) {
if (j >= size || j === 0) {
this._pages.push({
start: math.min(maximum, i - lower),
end: i - lower + size - 1
});
if (math.min(maximum, i - lower) === maximum) {
break;
}
j = 0, ++k;
}
j += this._core.mergers(this._core.relative(i));
}
}
};
/**
* draws the user interface.
* @todo the option `dotsdata` wont work.
* @protected
*/
navigation.prototype.draw = function() {
var difference,
settings = this._core.settings,
disabled = this._core.items().length <= settings.items,
index = this._core.relative(this._core.current()),
loop = settings.loop || settings.rewind;
this._controls.$relative.toggleclass('disabled', !settings.nav || disabled);
if (settings.nav) {
this._controls.$previous.toggleclass('disabled', !loop && index <= this._core.minimum(true));
this._controls.$next.toggleclass('disabled', !loop && index >= this._core.maximum(true));
}
this._controls.$absolute.toggleclass('disabled', !settings.dots || disabled);
if (settings.dots) {
difference = this._pages.length - this._controls.$absolute.children().length;
if (settings.dotsdata && difference !== 0) {
this._controls.$absolute.html(this._templates.join(''));
} else if (difference > 0) {
this._controls.$absolute.append(new array(difference + 1).join(this._templates[0]));
} else if (difference < 0) {
this._controls.$absolute.children().slice(difference).remove();
}
this._controls.$absolute.find('.active').removeclass('active');
this._controls.$absolute.children().eq($.inarray(this.current(), this._pages)).addclass('active');
}
};
/**
* extends event data.
* @protected
* @param {event} event - the event object which gets thrown.
*/
navigation.prototype.ontrigger = function(event) {
var settings = this._core.settings;
event.page = {
index: $.inarray(this.current(), this._pages),
count: this._pages.length,
size: settings && (settings.center || settings.autowidth || settings.dotsdata ?
1 : settings.dotseach || settings.items)
};
};
/**
* gets the current page position of the carousel.
* @protected
* @returns {number}
*/
navigation.prototype.current = function() {
var current = this._core.relative(this._core.current());
return $.grep(this._pages, $.proxy(function(page, index) {
return page.start <= current && page.end >= current;
}, this)).pop();
};
/**
* gets the current succesor/predecessor position.
* @protected
* @returns {number}
*/
navigation.prototype.getposition = function(successor) {
var position, length,
settings = this._core.settings;
if (settings.slideby == 'page') {
position = $.inarray(this.current(), this._pages);
length = this._pages.length;
successor ? ++position : --position;
position = this._pages[((position % length) + length) % length].start;
} else {
position = this._core.relative(this._core.current());
length = this._core.items().length;
successor ? position += settings.slideby : position -= settings.slideby;
}
return position;
};
/**
* slides to the next item or page.
* @public
* @param {number} [speed=false] - the time in milliseconds for the transition.
*/
navigation.prototype.next = function(speed) {
$.proxy(this._overrides.to, this._core)(this.getposition(true), speed);
};
/**
* slides to the previous item or page.
* @public
* @param {number} [speed=false] - the time in milliseconds for the transition.
*/
navigation.prototype.prev = function(speed) {
$.proxy(this._overrides.to, this._core)(this.getposition(false), speed);
};
/**
* slides to the specified item or page.
* @public
* @param {number} position - the position of the item or page.
* @param {number} [speed] - the time in milliseconds for the transition.
* @param {boolean} [standard=false] - whether to use the standard behaviour or not.
*/
navigation.prototype.to = function(position, speed, standard) {
var length;
if (!standard && this._pages.length) {
length = this._pages.length;
$.proxy(this._overrides.to, this._core)(this._pages[((position % length) + length) % length].start, speed);
} else {
$.proxy(this._overrides.to, this._core)(position, speed);
}
};
$.fn.owlcarousel.constructor.plugins.navigation = navigation;
})(window.zepto || window.jquery, window, document);
/**
* hash plugin
* @version 2.1.0
* @author artus kolanowski
* @author david deutsch
* @license the mit license (mit)
*/
;
(function($, window, document, undefined) {
'use strict';
/**
* creates the hash plugin.
* @class the hash plugin
* @param {owl} carousel - the owl carousel
*/
var hash = function(carousel) {
/**
* reference to the core.
* @protected
* @type {owl}
*/
this._core = carousel;
/**
* hash index for the items.
* @protected
* @type {object}
*/
this._hashes = {};
/**
* the carousel element.
* @type {jquery}
*/
this.$element = this._core.$element;
/**
* all event handlers.
* @protected
* @type {object}
*/
this._handlers = {
'initialized.owl.carousel': $.proxy(function(e) {
if (e.namespace && this._core.settings.startposition === 'urlhash') {
$(window).trigger('hashchange.owl.navigation');
}
}, this),
'prepared.owl.carousel': $.proxy(function(e) {
if (e.namespace) {
var hash = $(e.content).find('[data-hash]').addback('[data-hash]').attr('data-hash');
if (!hash) {
return;
}
this._hashes[hash] = e.content;
}
}, this),
'changed.owl.carousel': $.proxy(function(e) {
if (e.namespace && e.property.name === 'position') {
var current = this._core.items(this._core.relative(this._core.current())),
hash = $.map(this._hashes, function(item, hash) {
return item === current ? hash : null;
}).join();
if (!hash || window.location.hash.slice(1) === hash) {
return;
}
window.location.hash = hash;
}
}, this)
};
// set default options
this._core.options = $.extend({}, hash.defaults, this._core.options);
// register the event handlers
this.$element.on(this._handlers);
// register event listener for hash navigation
$(window).on('hashchange.owl.navigation', $.proxy(function(e) {
var hash = window.location.hash.substring(1),
items = this._core.$stage.children(),
position = this._hashes[hash] && items.index(this._hashes[hash]);
if (position === undefined || position === this._core.current()) {
return;
}
this._core.to(this._core.relative(position), false, true);
}, this));
};
/**
* default options.
* @public
*/
hash.defaults = {
urlhashlistener: false
};
/**
* destroys the plugin.
* @public
*/
hash.prototype.destroy = function() {
var handler, property;
$(window).off('hashchange.owl.navigation');
for (handler in this._handlers) {
this._core.$element.off(handler, this._handlers[handler]);
}
for (property in object.getownpropertynames(this)) {
typeof this[property] != 'function' && (this[property] = null);
}
};
$.fn.owlcarousel.constructor.plugins.hash = hash;
})(window.zepto || window.jquery, window, document);
/**
* support plugin
*
* @version 2.1.0
* @author vivid planet software gmbh
* @author artus kolanowski
* @author david deutsch
* @license the mit license (mit)
*/
;
(function($, window, document, undefined) {
var style = $('
').get(0).style,
prefixes = 'webkit moz o ms'.split(' '),
events = {
transition: {
end: {
webkittransition: 'webkittransitionend',
moztransition: 'transitionend',
otransition: 'otransitionend',
transition: 'transitionend'
}
},
animation: {
end: {
webkitanimation: 'webkitanimationend',
mozanimation: 'animationend',
oanimation: 'oanimationend',
animation: 'animationend'
}
}
},
tests = {
csstransforms: function() {
return !!test('transform')
},
csstransforms3d: function() {
return !!test('perspective')
},
csstransitions: function() {
return !!test('transition')
},
cssanimations: function() {
return !!test('animation')
}
};
function test(property, prefixed) {
var result = !1,
upper = property.charat(0).touppercase() + property.slice(1);
$.each((property + ' ' + prefixes.join(upper + ' ') + upper).split(' '), function(i, property) {
if (style[property] !== undefined) {
result = prefixed ? property : !0;
return !1
}
});
return result
}
function prefixed(property) {
return test(property, !0)
}
if (tests.csstransitions()) {
$.support.transition = new string(prefixed('transition'))
$.support.transition.end = events.transition.end[$.support.transition]
}
if (tests.cssanimations()) {
$.support.animation = new string(prefixed('animation'))
$.support.animation.end = events.animation.end[$.support.animation]
}
if (tests.csstransforms()) {
$.support.transform = new string(prefixed('transform'));
$.support.transform3d = tests.csstransforms3d()
}
})(window.zepto || window.jquery, window, document);
/*!
* fancybox - jquery plugin
* version: 2.1.7 (tue, 28 feb 2017)
* requires jquery v1.6 or later
*
* examples at http://fancyapps.com/fancybox/
* license: www.fancyapps.com/fancybox/#license
*
* copyright 2017 fancyapps.com
*
*/
;
(function(window, document, $, undefined) {
"use strict";
var h = $("html"),
w = $(window),
d = $(document),
f = $.fancybox = function() {
f.open.apply(this, arguments)
},
ie = navigator.useragent.match(/msie/i),
didupdate = null,
istouch = document.createtouch !== undefined,
isquery = function(obj) {
return obj && obj.hasownproperty && obj instanceof $
},
isstring = function(str) {
return str && $.type(str) === "string"
},
ispercentage = function(str) {
return isstring(str) && str.indexof('%') > 0
},
isscrollable = function(el) {
return (el && !(el.style.overflow && el.style.overflow === 'hidden') && ((el.clientwidth && el.scrollwidth > el.clientwidth) || (el.clientheight && el.scrollheight > el.clientheight)))
},
getscalar = function(orig, dim) {
var value = parseint(orig, 10) || 0;
if (dim && ispercentage(orig)) {
value = f.getviewport()[dim] / 100 * value
}
return math.ceil(value)
},
getvalue = function(value, dim) {
return getscalar(value, dim) + 'px'
};
$.extend(f, {
version: '2.1.7',
defaults: {
padding: 15,
margin: 20,
width: 800,
height: 600,
minwidth: 100,
minheight: 100,
maxwidth: 9999,
maxheight: 9999,
pixelratio: 1,
autosize: !0,
autoheight: !1,
autowidth: !1,
autoresize: !0,
autocenter: !istouch,
fittoview: !0,
aspectratio: !1,
topratio: 0.5,
leftratio: 0.5,
scrolling: 'auto',
wrapcss: '',
arrows: !0,
closebtn: !0,
closeclick: !1,
nextclick: !1,
mousewheel: !0,
autoplay: !1,
playspeed: 3000,
preload: 3,
modal: !1,
loop: !0,
ajax: {
datatype: 'html',
headers: {
'x-fancybox': !0
}
},
iframe: {
scrolling: 'auto',
preload: !0
},
swf: {
wmode: 'transparent',
allowfullscreen: 'true',
allowscriptaccess: 'always'
},
keys: {
next: {
13: 'left',
34: 'up',
39: 'left',
40: 'up'
},
prev: {
8: 'right',
33: 'down',
37: 'right',
38: 'down'
},
close: [27],
play: [32],
toggle: [70]
},
direction: {
next: 'left',
prev: 'right'
},
scrolloutside: !0,
index: 0,
type: null,
href: null,
content: null,
title: null,
tpl: {
wrap: '',
image: '',
iframe: '',
error: 'the requested content cannot be loaded.
please try again later.
',
closebtn: '',
next: '',
prev: '',
loading: ''
},
openeffect: 'fade',
openspeed: 250,
openeasing: 'swing',
openopacity: !0,
openmethod: 'zoomin',
closeeffect: 'fade',
closespeed: 250,
closeeasing: 'swing',
closeopacity: !0,
closemethod: 'zoomout',
nexteffect: 'elastic',
nextspeed: 250,
nexteasing: 'swing',
nextmethod: 'changein',
preveffect: 'elastic',
prevspeed: 250,
preveasing: 'swing',
prevmethod: 'changeout',
helpers: {
overlay: !0,
title: !0
},
oncancel: $.noop,
beforeload: $.noop,
afterload: $.noop,
beforeshow: $.noop,
aftershow: $.noop,
beforechange: $.noop,
beforeclose: $.noop,
afterclose: $.noop
},
group: {},
opts: {},
previous: null,
coming: null,
current: null,
isactive: !1,
isopen: !1,
isopened: !1,
wrap: null,
skin: null,
outer: null,
inner: null,
player: {
timer: null,
isactive: !1
},
ajaxload: null,
imgpreload: null,
transitions: {},
helpers: {},
open: function(group, opts) {
if (!group) {
return
}
if (!$.isplainobject(opts)) {
opts = {}
}
if (!1 === f.close(!0)) {
return
}
if (!$.isarray(group)) {
group = isquery(group) ? $(group).get() : [group]
}
$.each(group, function(i, element) {
var obj = {},
href, title, content, type, rez, hrefparts, selector;
if ($.type(element) === "object") {
if (element.nodetype) {
element = $(element)
}
if (isquery(element)) {
obj = {
href: element.data('fancybox-href') || element.attr('href'),
title: $('').text(element.data('fancybox-title') || element.attr('title') || '').html(),
isdom: !0,
element: element
};
if ($.metadata) {
$.extend(!0, obj, element.metadata())
}
} else {
obj = element
}
}
href = opts.href || obj.href || (isstring(element) ? element : null);
title = opts.title !== undefined ? opts.title : obj.title || '';
content = opts.content || obj.content;
type = content ? 'html' : (opts.type || obj.type);
if (!type && obj.isdom) {
type = element.data('fancybox-type');
if (!type) {
rez = element.prop('class').match(/fancybox\.(\w+)/);
type = rez ? rez[1] : null
}
}
if (isstring(href)) {
if (!type) {
if (f.isimage(href)) {
type = 'image'
} else if (f.isswf(href)) {
type = 'swf'
} else if (href.charat(0) === '#') {
type = 'inline'
} else if (isstring(element)) {
type = 'html';
content = element
}
}
if (type === 'ajax') {
hrefparts = href.split(/\s+/, 2);
href = hrefparts.shift();
selector = hrefparts.shift()
}
}
if (!content) {
if (type === 'inline') {
if (href) {
content = $(isstring(href) ? href.replace(/.*(?=#[^\s]+$)/, '') : href)
} else if (obj.isdom) {
content = element
}
} else if (type === 'html') {
content = href
} else if (!type && !href && obj.isdom) {
type = 'inline';
content = element
}
}
$.extend(obj, {
href: href,
type: type,
content: content,
title: title,
selector: selector
});
group[i] = obj
});
f.opts = $.extend(!0, {}, f.defaults, opts);
if (opts.keys !== undefined) {
f.opts.keys = opts.keys ? $.extend({}, f.defaults.keys, opts.keys) : !1
}
f.group = group;
return f._start(f.opts.index)
},
cancel: function() {
var coming = f.coming;
if (coming && !1 === f.trigger('oncancel')) {
return
}
f.hideloading();
if (!coming) {
return
}
if (f.ajaxload) {
f.ajaxload.abort()
}
f.ajaxload = null;
if (f.imgpreload) {
f.imgpreload.onload = f.imgpreload.onerror = null
}
if (coming.wrap) {
coming.wrap.stop(!0, !0).trigger('onreset').remove()
}
f.coming = null;
if (!f.current) {
f._afterzoomout(coming)
}
},
close: function(event) {
f.cancel();
if (!1 === f.trigger('beforeclose')) {
return
}
f.unbindevents();
if (!f.isactive) {
return
}
if (!f.isopen || event === !0) {
$('.fancybox-wrap').stop(!0).trigger('onreset').remove();
f._afterzoomout()
} else {
f.isopen = f.isopened = !1;
f.isclosing = !0;
$('.fancybox-item, .fancybox-nav').remove();
f.wrap.stop(!0, !0).removeclass('fancybox-opened');
f.transitions[f.current.closemethod]()
}
},
play: function(action) {
var clear = function() {
cleartimeout(f.player.timer)
},
set = function() {
clear();
if (f.current && f.player.isactive) {
f.player.timer = settimeout(f.next, f.current.playspeed)
}
},
stop = function() {
clear();
d.unbind('.player');
f.player.isactive = !1;
f.trigger('onplayend')
},
start = function() {
if (f.current && (f.current.loop || f.current.index < f.group.length - 1)) {
f.player.isactive = !0;
d.bind({
'oncancel.player beforeclose.player': stop,
'onupdate.player': set,
'beforeload.player': clear
});
set();
f.trigger('onplaystart')
}
};
if (action === !0 || (!f.player.isactive && action !== !1)) {
start()
} else {
stop()
}
},
next: function(direction) {
var current = f.current;
if (current) {
if (!isstring(direction)) {
direction = current.direction.next
}
f.jumpto(current.index + 1, direction, 'next')
}
},
prev: function(direction) {
var current = f.current;
if (current) {
if (!isstring(direction)) {
direction = current.direction.prev
}
f.jumpto(current.index - 1, direction, 'prev')
}
},
jumpto: function(index, direction, router) {
var current = f.current;
if (!current) {
return
}
index = getscalar(index);
f.direction = direction || current.direction[(index >= current.index ? 'next' : 'prev')];
f.router = router || 'jumpto';
if (current.loop) {
if (index < 0) {
index = current.group.length + (index % current.group.length)
}
index = index % current.group.length
}
if (current.group[index] !== undefined) {
f.cancel();
f._start(index)
}
},
reposition: function(e, onlyabsolute) {
var current = f.current,
wrap = current ? current.wrap : null,
pos;
if (wrap) {
pos = f._getposition(onlyabsolute);
if (e && e.type === 'scroll') {
delete pos.position;
wrap.stop(!0, !0).animate(pos, 200)
} else {
wrap.css(pos);
current.pos = $.extend({}, current.dim, pos)
}
}
},
update: function(e) {
var type = (e && e.originalevent && e.originalevent.type),
anyway = !type || type === 'orientationchange';
if (anyway) {
cleartimeout(didupdate);
didupdate = null
}
if (!f.isopen || didupdate) {
return
}
didupdate = settimeout(function() {
var current = f.current;
if (!current || f.isclosing) {
return
}
f.wrap.removeclass('fancybox-tmp');
if (anyway || type === 'load' || (type === 'resize' && current.autoresize)) {
f._setdimension()
}
if (!(type === 'scroll' && current.canshrink)) {
f.reposition(e)
}
f.trigger('onupdate');
didupdate = null
}, (anyway && !istouch ? 0 : 300))
},
toggle: function(action) {
if (f.isopen) {
f.current.fittoview = $.type(action) === "boolean" ? action : !f.current.fittoview;
if (istouch) {
f.wrap.removeattr('style').addclass('fancybox-tmp');
f.trigger('onupdate')
}
f.update()
}
},
hideloading: function() {
d.unbind('.loading');
$('#fancybox-loading').remove()
},
showloading: function() {
var el, viewport;
f.hideloading();
el = $(f.opts.tpl.loading).click(f.cancel).appendto('body');
d.bind('keydown.loading', function(e) {
if ((e.which || e.keycode) === 27) {
e.preventdefault();
f.cancel()
}
});
if (!f.defaults.fixed) {
viewport = f.getviewport();
el.css({
position: 'absolute',
top: (viewport.h * 0.5) + viewport.y,
left: (viewport.w * 0.5) + viewport.x
})
}
f.trigger('onloading')
},
getviewport: function() {
var locked = (f.current && f.current.locked) || !1,
rez = {
x: w.scrollleft(),
y: w.scrolltop()
};
if (locked && locked.length) {
rez.w = locked[0].clientwidth;
rez.h = locked[0].clientheight
} else {
rez.w = istouch && window.innerwidth ? window.innerwidth : w.width();
rez.h = istouch && window.innerheight ? window.innerheight : w.height()
}
return rez
},
unbindevents: function() {
if (f.wrap && isquery(f.wrap)) {
f.wrap.unbind('.fb')
}
d.unbind('.fb');
w.unbind('.fb')
},
bindevents: function() {
var current = f.current,
keys;
if (!current) {
return
}
w.bind('orientationchange.fb' + (istouch ? '' : ' resize.fb') + (current.autocenter && !current.locked ? ' scroll.fb' : ''), f.update);
keys = current.keys;
if (keys) {
d.bind('keydown.fb', function(e) {
var code = e.which || e.keycode,
target = e.target || e.srcelement;
if (code === 27 && f.coming) {
return !1
}
if (!e.ctrlkey && !e.altkey && !e.shiftkey && !e.metakey && !(target && (target.type || $(target).is('[contenteditable]')))) {
$.each(keys, function(i, val) {
if (current.group.length > 1 && val[code] !== undefined) {
f[i](val[code]);
e.preventdefault();
return !1
}
if ($.inarray(code, val) > -1) {
f[i]();
e.preventdefault();
return !1
}
})
}
})
}
if ($.fn.mousewheel && current.mousewheel) {
f.wrap.bind('mousewheel.fb', function(e, delta, deltax, deltay) {
var target = e.target || null,
parent = $(target),
canscroll = !1;
while (parent.length) {
if (canscroll || parent.is('.fancybox-skin') || parent.is('.fancybox-wrap')) {
break
}
canscroll = isscrollable(parent[0]);
parent = $(parent).parent()
}
if (delta !== 0 && !canscroll) {
if (f.group.length > 1 && !current.canshrink) {
if (deltay > 0 || deltax > 0) {
f.prev(deltay > 0 ? 'down' : 'left')
} else if (deltay < 0 || deltax < 0) {
f.next(deltay < 0 ? 'up' : 'right')
}
e.preventdefault()
}
}
})
}
},
trigger: function(event, o) {
var ret, obj = o || f.coming || f.current;
if (obj) {
if ($.isfunction(obj[event])) {
ret = obj[event].apply(obj, array.prototype.slice.call(arguments, 1))
}
if (ret === !1) {
return !1
}
if (obj.helpers) {
$.each(obj.helpers, function(helper, opts) {
if (opts && f.helpers[helper] && $.isfunction(f.helpers[helper][event])) {
f.helpers[helper][event]($.extend(!0, {}, f.helpers[helper].defaults, opts), obj)
}
})
}
}
d.trigger(event)
},
isimage: function(str) {
return isstring(str) && str.match(/(^data:image\/.*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg)((\?|#).*)?$)/i)
},
isswf: function(str) {
return isstring(str) && str.match(/\.(swf)((\?|#).*)?$/i)
},
_start: function(index) {
var coming = {},
obj, href, type, margin, padding;
index = getscalar(index);
obj = f.group[index] || null;
if (!obj) {
return !1
}
coming = $.extend(!0, {}, f.opts, obj);
margin = coming.margin;
padding = coming.padding;
if ($.type(margin) === 'number') {
coming.margin = [margin, margin, margin, margin]
}
if ($.type(padding) === 'number') {
coming.padding = [padding, padding, padding, padding]
}
if (coming.modal) {
$.extend(!0, coming, {
closebtn: !1,
closeclick: !1,
nextclick: !1,
arrows: !1,
mousewheel: !1,
keys: null,
helpers: {
overlay: {
closeclick: !1
}
}
})
}
if (coming.autosize) {
coming.autowidth = coming.autoheight = !0
}
if (coming.width === 'auto') {
coming.autowidth = !0
}
if (coming.height === 'auto') {
coming.autoheight = !0
}
coming.group = f.group;
coming.index = index;
f.coming = coming;
if (!1 === f.trigger('beforeload')) {
f.coming = null;
return
}
type = coming.type;
href = coming.href;
if (!type) {
f.coming = null;
if (f.current && f.router && f.router !== 'jumpto') {
f.current.index = index;
return f[f.router](f.direction)
}
return !1
}
f.isactive = !0;
if (type === 'image' || type === 'swf') {
coming.autoheight = coming.autowidth = !1;
coming.scrolling = 'visible'
}
if (type === 'image') {
coming.aspectratio = !0
}
if (type === 'iframe' && istouch) {
coming.scrolling = 'scroll'
}
coming.wrap = $(coming.tpl.wrap).addclass('fancybox-' + (istouch ? 'mobile' : 'desktop') + ' fancybox-type-' + type + ' fancybox-tmp ' + coming.wrapcss).appendto(coming.parent || 'body');
$.extend(coming, {
skin: $('.fancybox-skin', coming.wrap),
outer: $('.fancybox-outer', coming.wrap),
inner: $('.fancybox-inner', coming.wrap)
});
$.each(["top", "right", "bottom", "left"], function(i, v) {
coming.skin.css('padding' + v, getvalue(coming.padding[i]))
});
f.trigger('onready');
if (type === 'inline' || type === 'html') {
if (!coming.content || !coming.content.length) {
return f._error('content')
}
} else if (!href) {
return f._error('href')
}
if (type === 'image') {
f._loadimage()
} else if (type === 'ajax') {
f._loadajax()
} else if (type === 'iframe') {
f._loadiframe()
} else {
f._afterload()
}
},
_error: function(type) {
$.extend(f.coming, {
type: 'html',
autowidth: !0,
autoheight: !0,
minwidth: 0,
minheight: 0,
scrolling: 'no',
haserror: type,
content: f.coming.tpl.error
});
f._afterload()
},
_loadimage: function() {
var img = f.imgpreload = new image();
img.onload = function() {
this.onload = this.onerror = null;
f.coming.width = this.width / f.opts.pixelratio;
f.coming.height = this.height / f.opts.pixelratio;
f._afterload()
};
img.onerror = function() {
this.onload = this.onerror = null;
f._error('image')
};
img.src = f.coming.href;
if (img.complete !== !0) {
f.showloading()
}
},
_loadajax: function() {
var coming = f.coming;
f.showloading();
f.ajaxload = $.ajax($.extend({}, coming.ajax, {
url: coming.href,
error: function(jqxhr, textstatus) {
if (f.coming && textstatus !== 'abort') {
f._error('ajax', jqxhr)
} else {
f.hideloading()
}
},
success: function(data, textstatus) {
if (textstatus === 'success') {
coming.content = data;
f._afterload()
}
}
}))
},
_loadiframe: function() {
var coming = f.coming,
iframe = $(coming.tpl.iframe.replace(/\{rnd\}/g, new date().gettime())).attr('scrolling', istouch ? 'auto' : coming.iframe.scrolling).attr('src', coming.href);
$(coming.wrap).bind('onreset', function() {
try {
$(this).find('iframe').hide().attr('src', '//about:blank').end().empty()
} catch (e) {}
});
if (coming.iframe.preload) {
f.showloading();
iframe.one('load', function() {
$(this).data('ready', 1);
if (!istouch) {
$(this).bind('load.fb', f.update)
}
$(this).parents('.fancybox-wrap').width('100%').removeclass('fancybox-tmp').show();
f._afterload()
})
}
coming.content = iframe.appendto(coming.inner);
if (!coming.iframe.preload) {
f._afterload()
}
},
_preloadimages: function() {
var group = f.group,
current = f.current,
len = group.length,
cnt = current.preload ? math.min(current.preload, len - 1) : 0,
item, i;
for (i = 1; i <= cnt; i += 1) {
item = group[(current.index + i) % len];
if (item.type === 'image' && item.href) {
new image().src = item.href
}
}
},
_afterload: function() {
var coming = f.coming,
previous = f.current,
placeholder = 'fancybox-placeholder',
current, content, type, scrolling, href, embed;
f.hideloading();
if (!coming || f.isactive === !1) {
return
}
if (!1 === f.trigger('afterload', coming, previous)) {
coming.wrap.stop(!0).trigger('onreset').remove();
f.coming = null;
return
}
if (previous) {
f.trigger('beforechange', previous);
previous.wrap.stop(!0).removeclass('fancybox-opened').find('.fancybox-item, .fancybox-nav').remove()
}
f.unbindevents();
current = coming;
content = coming.content;
type = coming.type;
scrolling = coming.scrolling;
$.extend(f, {
wrap: current.wrap,
skin: current.skin,
outer: current.outer,
inner: current.inner,
current: current,
previous: previous
});
href = current.href;
switch (type) {
case 'inline':
case 'ajax':
case 'html':
if (current.selector) {
content = $('').html(content).find(current.selector)
} else if (isquery(content)) {
if (!content.data(placeholder)) {
content.data(placeholder, $('
').insertafter(content).hide())
}
content = content.show().detach();
current.wrap.bind('onreset', function() {
if ($(this).find(content).length) {
content.hide().replaceall(content.data(placeholder)).data(placeholder, !1)
}
})
}
break;
case 'image':
content = current.tpl.image.replace(/\{href\}/g, href);
break;
case 'swf':
content = '
';
break
}
if (!(isquery(content) && content.parent().is(current.inner))) {
current.inner.append(content)
}
f.trigger('beforeshow');
current.inner.css('overflow', scrolling === 'yes' ? 'scroll' : (scrolling === 'no' ? 'hidden' : scrolling));
f._setdimension();
f.reposition();
f.isopen = !1;
f.coming = null;
f.bindevents();
if (!f.isopened) {
$('.fancybox-wrap').not(current.wrap).stop(!0).trigger('onreset').remove()
} else if (previous.prevmethod) {
f.transitions[previous.prevmethod]()
}
f.transitions[f.isopened ? current.nextmethod : current.openmethod]();
f._preloadimages()
},
_setdimension: function() {
var viewport = f.getviewport(),
steps = 0,
canshrink = !1,
canexpand = !1,
wrap = f.wrap,
skin = f.skin,
inner = f.inner,
current = f.current,
width = current.width,
height = current.height,
minwidth = current.minwidth,
minheight = current.minheight,
maxwidth = current.maxwidth,
maxheight = current.maxheight,
scrolling = current.scrolling,
scrollout = current.scrolloutside ? current.scrollbarwidth : 0,
margin = current.margin,
wmargin = getscalar(margin[1] + margin[3]),
hmargin = getscalar(margin[0] + margin[2]),
wpadding, hpadding, wspace, hspace, origwidth, origheight, origmaxwidth, origmaxheight, ratio, width_, height_, maxwidth_, maxheight_, iframe, body;
wrap.add(skin).add(inner).width('auto').height('auto').removeclass('fancybox-tmp');
wpadding = getscalar(skin.outerwidth(!0) - skin.width());
hpadding = getscalar(skin.outerheight(!0) - skin.height());
wspace = wmargin + wpadding;
hspace = hmargin + hpadding;
origwidth = ispercentage(width) ? (viewport.w - wspace) * getscalar(width) / 100 : width;
origheight = ispercentage(height) ? (viewport.h - hspace) * getscalar(height) / 100 : height;
if (current.type === 'iframe') {
iframe = current.content;
if (current.autoheight && iframe && iframe.data('ready') === 1) {
try {
if (iframe[0].contentwindow.document.location) {
inner.width(origwidth).height(9999);
body = iframe.contents().find('body');
if (scrollout) {
body.css('overflow-x', 'hidden')
}
origheight = body.outerheight(!0)
}
} catch (e) {}
}
} else if (current.autowidth || current.autoheight) {
inner.addclass('fancybox-tmp');
if (!current.autowidth) {
inner.width(origwidth)
}
if (!current.autoheight) {
inner.height(origheight)
}
if (current.autowidth) {
origwidth = inner.width()
}
if (current.autoheight) {
origheight = inner.height()
}
inner.removeclass('fancybox-tmp')
}
width = getscalar(origwidth);
height = getscalar(origheight);
ratio = origwidth / origheight;
minwidth = getscalar(ispercentage(minwidth) ? getscalar(minwidth, 'w') - wspace : minwidth);
maxwidth = getscalar(ispercentage(maxwidth) ? getscalar(maxwidth, 'w') - wspace : maxwidth);
minheight = getscalar(ispercentage(minheight) ? getscalar(minheight, 'h') - hspace : minheight);
maxheight = getscalar(ispercentage(maxheight) ? getscalar(maxheight, 'h') - hspace : maxheight);
origmaxwidth = maxwidth;
origmaxheight = maxheight;
if (current.fittoview) {
maxwidth = math.min(viewport.w - wspace, maxwidth);
maxheight = math.min(viewport.h - hspace, maxheight)
}
maxwidth_ = viewport.w - wmargin;
maxheight_ = viewport.h - hmargin;
if (current.aspectratio) {
if (width > maxwidth) {
width = maxwidth;
height = getscalar(width / ratio)
}
if (height > maxheight) {
height = maxheight;
width = getscalar(height * ratio)
}
if (width < minwidth) {
width = minwidth;
height = getscalar(width / ratio)
}
if (height < minheight) {
height = minheight;
width = getscalar(height * ratio)
}
} else {
width = math.max(minwidth, math.min(width, maxwidth));
if (current.autoheight && current.type !== 'iframe') {
inner.width(width);
height = inner.height()
}
height = math.max(minheight, math.min(height, maxheight))
}
if (current.fittoview) {
inner.width(width).height(height);
wrap.width(width + wpadding);
width_ = wrap.width();
height_ = wrap.height();
if (current.aspectratio) {
while ((width_ > maxwidth_ || height_ > maxheight_) && width > minwidth && height > minheight) {
if (steps++ > 19) {
break
}
height = math.max(minheight, math.min(maxheight, height - 10));
width = getscalar(height * ratio);
if (width < minwidth) {
width = minwidth;
height = getscalar(width / ratio)
}
if (width > maxwidth) {
width = maxwidth;
height = getscalar(width / ratio)
}
inner.width(width).height(height);
wrap.width(width + wpadding);
width_ = wrap.width();
height_ = wrap.height()
}
} else {
width = math.max(minwidth, math.min(width, width - (width_ - maxwidth_)));
height = math.max(minheight, math.min(height, height - (height_ - maxheight_)))
}
}
if (scrollout && scrolling === 'auto' && height < origheight && (width + wpadding + scrollout) < maxwidth_) {
width += scrollout
}
inner.width(width).height(height);
wrap.width(width + wpadding);
width_ = wrap.width();
height_ = wrap.height();
canshrink = (width_ > maxwidth_ || height_ > maxheight_) && width > minwidth && height > minheight;
canexpand = current.aspectratio ? (width < origmaxwidth && height < origmaxheight && width < origwidth && height < origheight) : ((width < origmaxwidth || height < origmaxheight) && (width < origwidth || height < origheight));
$.extend(current, {
dim: {
width: getvalue(width_),
height: getvalue(height_)
},
origwidth: origwidth,
origheight: origheight,
canshrink: canshrink,
canexpand: canexpand,
wpadding: wpadding,
hpadding: hpadding,
wrapspace: height_ - skin.outerheight(!0),
skinspace: skin.height() - height
});
if (!iframe && current.autoheight && height > minheight && height < maxheight && !canexpand) {
inner.height('auto')
}
},
_getposition: function(onlyabsolute) {
var current = f.current,
viewport = f.getviewport(),
margin = current.margin,
width = f.wrap.width() + margin[1] + margin[3],
height = f.wrap.height() + margin[0] + margin[2],
rez = {
position: 'absolute',
top: margin[0],
left: margin[3]
};
if (current.autocenter && current.fixed && !onlyabsolute && height <= viewport.h && width <= viewport.w) {
rez.position = 'fixed'
} else if (!current.locked) {
rez.top += viewport.y;
rez.left += viewport.x
}
rez.top = getvalue(math.max(rez.top, rez.top + ((viewport.h - height) * current.topratio)));
rez.left = getvalue(math.max(rez.left, rez.left + ((viewport.w - width) * current.leftratio)));
return rez
},
_afterzoomin: function() {
var current = f.current;
if (!current) {
return
}
f.isopen = f.isopened = !0;
f.wrap.css('overflow', 'visible').addclass('fancybox-opened').hide().show(0);
f.update();
if (current.closeclick || (current.nextclick && f.group.length > 1)) {
f.inner.css('cursor', 'pointer').bind('click.fb', function(e) {
if (!$(e.target).is('a') && !$(e.target).parent().is('a')) {
e.preventdefault();
f[current.closeclick ? 'close' : 'next']()
}
})
}
if (current.closebtn) {
$(current.tpl.closebtn).appendto(f.skin).bind('click.fb', function(e) {
e.preventdefault();
f.close()
})
}
if (current.arrows && f.group.length > 1) {
if (current.loop || current.index > 0) {
$(current.tpl.prev).appendto(f.outer).bind('click.fb', f.prev)
}
if (current.loop || current.index < f.group.length - 1) {
$(current.tpl.next).appendto(f.outer).bind('click.fb', f.next)
}
}
f.trigger('aftershow');
if (!current.loop && current.index === current.group.length - 1) {
f.play(!1)
} else if (f.opts.autoplay && !f.player.isactive) {
f.opts.autoplay = !1;
f.play(!0)
}
},
_afterzoomout: function(obj) {
obj = obj || f.current;
$('.fancybox-wrap').trigger('onreset').remove();
$.extend(f, {
group: {},
opts: {},
router: !1,
current: null,
isactive: !1,
isopened: !1,
isopen: !1,
isclosing: !1,
wrap: null,
skin: null,
outer: null,
inner: null
});
f.trigger('afterclose', obj)
}
});
f.transitions = {
getorigposition: function() {
var current = f.current,
element = current.element,
orig = current.orig,
pos = {},
width = 50,
height = 50,
hpadding = current.hpadding,
wpadding = current.wpadding,
viewport = f.getviewport();
if (!orig && current.isdom && element.is(':visible')) {
orig = element.find('img:first');
if (!orig.length) {
orig = element
}
}
if (isquery(orig)) {
pos = orig.offset();
if (orig.is('img')) {
width = orig.outerwidth();
height = orig.outerheight()
}
} else {
pos.top = viewport.y + (viewport.h - height) * current.topratio;
pos.left = viewport.x + (viewport.w - width) * current.leftratio
}
if (f.wrap.css('position') === 'fixed' || current.locked) {
pos.top -= viewport.y;
pos.left -= viewport.x
}
pos = {
top: getvalue(pos.top - hpadding * current.topratio),
left: getvalue(pos.left - wpadding * current.leftratio),
width: getvalue(width + wpadding),
height: getvalue(height + hpadding)
};
return pos
},
step: function(now, fx) {
var ratio, padding, value, prop = fx.prop,
current = f.current,
wrapspace = current.wrapspace,
skinspace = current.skinspace;
if (prop === 'width' || prop === 'height') {
ratio = fx.end === fx.start ? 1 : (now - fx.start) / (fx.end - fx.start);
if (f.isclosing) {
ratio = 1 - ratio
}
padding = prop === 'width' ? current.wpadding : current.hpadding;
value = now - padding;
f.skin[prop](getscalar(prop === 'width' ? value : value - (wrapspace * ratio)));
f.inner[prop](getscalar(prop === 'width' ? value : value - (wrapspace * ratio) - (skinspace * ratio)))
}
},
zoomin: function() {
var current = f.current,
startpos = current.pos,
effect = current.openeffect,
elastic = effect === 'elastic',
endpos = $.extend({
opacity: 1
}, startpos);
delete endpos.position;
if (elastic) {
startpos = this.getorigposition();
if (current.openopacity) {
startpos.opacity = 0.1
}
} else if (effect === 'fade') {
startpos.opacity = 0.1
}
f.wrap.css(startpos).animate(endpos, {
duration: effect === 'none' ? 0 : current.openspeed,
easing: current.openeasing,
step: elastic ? this.step : null,
complete: f._afterzoomin
})
},
zoomout: function() {
var current = f.current,
effect = current.closeeffect,
elastic = effect === 'elastic',
endpos = {
opacity: 0.1
};
if (elastic) {
endpos = this.getorigposition();
if (current.closeopacity) {
endpos.opacity = 0.1
}
}
f.wrap.animate(endpos, {
duration: effect === 'none' ? 0 : current.closespeed,
easing: current.closeeasing,
step: elastic ? this.step : null,
complete: f._afterzoomout
})
},
changein: function() {
var current = f.current,
effect = current.nexteffect,
startpos = current.pos,
endpos = {
opacity: 1
},
direction = f.direction,
distance = 200,
field;
startpos.opacity = 0.1;
if (effect === 'elastic') {
field = direction === 'down' || direction === 'up' ? 'top' : 'left';
if (direction === 'down' || direction === 'right') {
startpos[field] = getvalue(getscalar(startpos[field]) - distance);
endpos[field] = '+=' + distance + 'px'
} else {
startpos[field] = getvalue(getscalar(startpos[field]) + distance);
endpos[field] = '-=' + distance + 'px'
}
}
if (effect === 'none') {
f._afterzoomin()
} else {
f.wrap.css(startpos).animate(endpos, {
duration: current.nextspeed,
easing: current.nexteasing,
complete: f._afterzoomin
})
}
},
changeout: function() {
var previous = f.previous,
effect = previous.preveffect,
endpos = {
opacity: 0.1
},
direction = f.direction,
distance = 200;
if (effect === 'elastic') {
endpos[direction === 'down' || direction === 'up' ? 'top' : 'left'] = (direction === 'up' || direction === 'left' ? '-' : '+') + '=' + distance + 'px'
}
previous.wrap.animate(endpos, {
duration: effect === 'none' ? 0 : previous.prevspeed,
easing: previous.preveasing,
complete: function() {
$(this).trigger('onreset').remove()
}
})
}
};
f.helpers.overlay = {
defaults: {
closeclick: !0,
speedout: 200,
showearly: !0,
css: {},
locked: !istouch,
fixed: !0
},
overlay: null,
fixed: !1,
el: $('html'),
create: function(opts) {
var parent;
opts = $.extend({}, this.defaults, opts);
if (this.overlay) {
this.close()
}
parent = f.coming ? f.coming.parent : opts.parent;
this.overlay = $('
').appendto(parent && parent.length ? parent : 'body');
this.fixed = !1;
if (opts.fixed && f.defaults.fixed) {
this.overlay.addclass('fancybox-overlay-fixed');
this.fixed = !0
}
},
open: function(opts) {
var that = this;
opts = $.extend({}, this.defaults, opts);
if (this.overlay) {
this.overlay.unbind('.overlay').width('auto').height('auto')
} else {
this.create(opts)
}
if (!this.fixed) {
w.bind('resize.overlay', $.proxy(this.update, this));
this.update()
}
if (opts.closeclick) {
this.overlay.bind('click.overlay', function(e) {
if ($(e.target).hasclass('fancybox-overlay')) {
if (f.isactive) {
f.close()
} else {
that.close()
}
return !1
}
})
}
this.overlay.css(opts.css).show()
},
close: function() {
w.unbind('resize.overlay');
if (this.el.hasclass('fancybox-lock')) {
$('.fancybox-margin').removeclass('fancybox-margin');
this.el.removeclass('fancybox-lock');
w.scrolltop(this.scrollv).scrollleft(this.scrollh)
}
$('.fancybox-overlay').remove().hide();
$.extend(this, {
overlay: null,
fixed: !1
})
},
update: function() {
var width = '100%',
offsetwidth;
this.overlay.width(width).height('100%');
if (ie) {
offsetwidth = math.max(document.documentelement.offsetwidth, document.body.offsetwidth);
if (d.width() > offsetwidth) {
width = d.width()
}
} else if (d.width() > w.width()) {
width = d.width()
}
this.overlay.width(width).height(d.height())
},
onready: function(opts, obj) {
var overlay = this.overlay;
$('.fancybox-overlay').stop(!0, !0);
if (!overlay) {
this.create(opts)
}
if (opts.locked && this.fixed && obj.fixed) {
obj.locked = this.overlay.append(obj.wrap);
obj.fixed = !1
}
if (opts.showearly === !0) {
this.beforeshow.apply(this, arguments)
}
},
beforeshow: function(opts, obj) {
if (obj.locked && !this.el.hasclass('fancybox-lock')) {
if (this.fixposition !== !1) {
$('*:not(object)').filter(function() {
return ($(this).css('position') === 'fixed' && !$(this).hasclass("fancybox-overlay") && !$(this).hasclass("fancybox-wrap"))
}).addclass('fancybox-margin')
}
this.el.addclass('fancybox-margin');
this.scrollv = w.scrolltop();
this.scrollh = w.scrollleft();
this.el.addclass('fancybox-lock');
w.scrolltop(this.scrollv).scrollleft(this.scrollh)
}
this.open(opts)
},
onupdate: function() {
if (!this.fixed) {
this.update()
}
},
afterclose: function(opts) {
if (this.overlay && !f.coming) {
this.overlay.fadeout(opts.speedout, $.proxy(this.close, this))
}
}
};
f.helpers.title = {
defaults: {
type: 'float',
position: 'bottom'
},
beforeshow: function(opts) {
var current = f.current,
text = current.title,
type = opts.type,
title, target;
if ($.isfunction(text)) {
text = text.call(current.element, current)
}
if (!isstring(text) || $.trim(text) === '') {
return
}
title = $('
' + text + '
');
switch (type) {
case 'inside':
target = f.skin;
break;
case 'outside':
target = f.wrap;
break;
case 'over':
target = f.inner;
break;
default:
target = f.skin;
title.appendto('body');
if (ie) {
title.width(title.width())
}
title.wrapinner('
');
f.current.margin[2] += math.abs(getscalar(title.css('margin-bottom')));
break
}
title[(opts.position === 'top' ? 'prependto' : 'appendto')](target)
}
};
$.fn.fancybox = function(options) {
var index, that = $(this),
selector = this.selector || '',
run = function(e) {
var what = $(this).blur(),
idx = index,
reltype, relval;
if (!(e.ctrlkey || e.altkey || e.shiftkey || e.metakey) && !what.is('.fancybox-wrap')) {
reltype = options.groupattr || 'data-fancybox-group';
relval = what.attr(reltype);
if (!relval) {
reltype = 'rel';
relval = what.get(0)[reltype]
}
if (relval && relval !== '' && relval !== 'nofollow') {
what = selector.length ? $(selector) : that;
what = what.filter('[' + reltype + '="' + relval + '"]');
idx = what.index(this)
}
options.index = idx;
if (f.open(what, options) !== !1) {
e.preventdefault()
}
}
};
options = options || {};
index = options.index || 0;
if (!selector || options.live === !1) {
that.unbind('click.fb-start').bind('click.fb-start', run)
} else {
d.undelegate(selector, 'click.fb-start').delegate(selector + ":not('.fancybox-item, .fancybox-nav')", 'click.fb-start', run)
}
this.filter('[data-fancybox-start=1]').trigger('click');
return this
};
d.ready(function() {
var w1, w2;
if ($.scrollbarwidth === undefined) {
$.scrollbarwidth = function() {
var parent = $('
').appendto('body'),
child = parent.children(),
width = child.innerwidth() - child.height(99).innerwidth();
parent.remove();
return width
}
}
if ($.support.fixedposition === undefined) {
$.support.fixedposition = (function() {
var elem = $('
').appendto('body'),
fixed = (elem[0].offsettop === 20 || elem[0].offsettop === 15);
elem.remove();
return fixed
}())
}
$.extend(f.defaults, {
scrollbarwidth: $.scrollbarwidth(),
fixed: $.support.fixedposition,
parent: $('body')
});
w1 = $(window).width();
h.addclass('fancybox-lock-test');
w2 = $(window).width();
h.removeclass('fancybox-lock-test');
$("").appendto("head")
})
}(window, document, jquery));
jquery(document).ready(function($) {
var example = $('.sf-menu').superfish({
delay: 100,
speed: 'fast',
autoarrows: !1
});
$('.header-menu-con').slicknav({
prependto: '#slick-mobile-menu',
allowparentlinks: !0,
label: ''
});
$('#slider .owl-carousel').owlcarousel({
loop: !0,
items: 1,
autoplay: !0,
autoplaytimeout: 5000,
autoplayhoverpause: !0,
})
$('.case-con .owl-carousel').owlcarousel({
loop: !0,
items: 4,
autoplay: !0,
autoplaytimeout: 8000,
autoplayhoverpause: !0,
margin: 20,
responsiveclass: !0,
responsive: {
0: {
items: 1,
},
600: {
items: 2,
},
1000: {
items: 4,
loop: !1
}
}
})
$('.single-pro-list li:first').addclass('on');
$('.single-pro-list li').mouseover(function() {
var liindex = $('.single-pro-list li').index(this);
$(this).addclass('on').siblings().removeclass('on');
$('.pro-wrap div.pro-item').eq(liindex).fadein(150).siblings('div.pro-item').hide()
});
$(".sidebar aside ul.menu>li.menu-item-has-children>a").removeattr('href');
$(".sidebar aside ul.menu>li>a").click(function() {
$(this).next('ul').toggle()
});
$('.entry-content img').parent("a").addclass("fancybox").attr("data-fancybox-group", "gallery");
$('.fancybox').fancybox();
$(window).scroll(function() {
if ($(window).scrolltop() > 200) {
$('.side-top').show()
} else {
$('.side-top').hide()
}
})
$('body').on('click', '.gotop', function() {
$('html,body').stop(1).animate({
scrolltop: '0'
}, 300);
return !1
});
$(window).scroll(function() {
var scroh = $(this).scrolltop();
if (scroh >= 50) {
$(".btm-header").addclass('sticky')
} else if (scroh < 50) {
$(".btm-header").removeclass('sticky')
}
})
$("#contact").click(function() {
var contop = $("#contactform").offset().top - 60;
$("body,html").animate({
scrolltop: contop
}, 0)
})
});
! function(a) {
a.fn.extend({
smoothproducts: function() {
function b() {
a(".sp-selected").removeclass("sp-selected"), a(".sp-lightbox").fadeout(function() {
a(this).remove()
})
}
function c(a) {
return a.match(/url\([\"\']{0,1}(.+)[\"\']{0,1}\)+/i)[1]
}
a(".sp-loading").hide(), a(".sp-wrap").each(function() {
a(this).addclass("sp-touch");
var b = a("a", this).length;
if (b > 1) {
var c, d, e = a("a.sp-default", this)[0] ? !0 : !1;
a(this).append('
'), a("a", this).each(function(b) {
var f = a("img", this).attr("src"),
g = a(this).attr("href"),
h = "";
(0 === b && !e || a(this).hasclass("sp-default")) && (h = ' class="sp-current"', c = g, d = a("img", this)[0].src), a(this).parents(".sp-wrap").find(".sp-thumbs").append('
"), a(this).remove()
}), a(".sp-large", this).append('
'), a(".sp-wrap").css("display", "inline-block")
} else a(this).append('
'), a("a", this).appendto(a(".sp-large", this)).addclass(".sp-current-big"), a(".sp-wrap").css("display", "inline-block")
}), a(document.body).on("click", ".sp-thumbs", function(a) {
a.preventdefault()
}), a(document.body).on("mouseover", function(b) {
a(".sp-wrap").removeclass("sp-touch").addclass("sp-non-touch"), b.preventdefault()
}), a(document.body).on("touchstart", function() {
a(".sp-wrap").removeclass("sp-non-touch").addclass("sp-touch")
}), a(document.body).on("click", ".sp-tb-active a", function(b) {
b.preventdefault(), a(this).parent().find(".sp-current").removeclass(), a(this).addclass("sp-current"), a(this).parents(".sp-wrap").find(".sp-thumbs").removeclass("sp-tb-active"), a(this).parents(".sp-wrap").find(".sp-zoom").remove();
var d = a(this).parents(".sp-wrap").find(".sp-large").height(),
e = a(this).parents(".sp-wrap").find(".sp-large").width();
a(this).parents(".sp-wrap").find(".sp-large").css({
overflow: "hidden",
height: d + "px",
width: e + "px"
}), a(this).addclass("sp-current").parents(".sp-wrap").find(".sp-large a").remove();
var f = a(this).parent().find(".sp-current").attr("href"),
g = c(a(this).parent().find(".sp-current").css("backgroundimage"));
a(this).parents(".sp-wrap").find(".sp-large").html('
'), a(this).parents(".sp-wrap").find(".sp-large").hide().fadein(250, function() {
var b = a(this).parents(".sp-wrap").find(".sp-large img").height();
a(this).parents(".sp-wrap").find(".sp-large").animate({
height: b
}, "fast", function() {
a(".sp-large").css({
height: "auto",
width: "auto"
})
}), a(this).parents(".sp-wrap").find(".sp-thumbs").addclass("sp-tb-active")
})
}), a(document.body).on("mouseenter", ".sp-non-touch .sp-large", function(b) {
var c = a("a", this).attr("href");
a(this).append('
'), a(this).find(".sp-zoom").fadein(250), b.preventdefault()
}), a(document.body).on("mouseleave", ".sp-non-touch .sp-large", function(b) {
a(this).find(".sp-zoom").fadeout(250, function() {
a(this).remove()
}), b.preventdefault()
}), a(document.body).on("click", ".sp-non-touch .sp-zoom", function(b) {
var c = a(this).html(),
d = a(this).parents(".sp-wrap").find(".sp-thumbs a").length,
e = a(this).parents(".sp-wrap").find(".sp-thumbs .sp-current").index() + 1;
a(this).parents(".sp-wrap").addclass("sp-selected"), a("body").append("
" + c + "
"), d > 1 && (a(".sp-lightbox").append("
"), 1 == e ? a("#sp-prev").css("opacity", ".1") : e == d && a("#sp-next").css("opacity", ".1")), a(".sp-lightbox").fadein(), b.preventdefault()
}), a(document.body).on("click", ".sp-large a", function(b) {
var c = a(this).attr("href"),
d = a(this).parents(".sp-wrap").find(".sp-thumbs a").length,
e = a(this).parents(".sp-wrap").find(".sp-thumbs .sp-current").index() + 1;
a(this).parents(".sp-wrap").addclass("sp-selected"), a("body").append('
'), d > 1 && (a(".sp-lightbox").append("
"), 1 == e ? a("#sp-prev").css("opacity", ".1") : e == d && a("#sp-next").css("opacity", ".1")), a(".sp-lightbox").fadein(), b.preventdefault()
}), a(document.body).on("click", "#sp-next", function(b) {
b.stoppropagation();
var d = a(".sp-lightbox").data("currenteq"),
e = a(".sp-selected .sp-thumbs a").length;
if (d >= e);
else {
var f = d + 1,
g = a(".sp-selected .sp-thumbs").find("a:eq(" + d + ")").attr("href"),
h = c(a(".sp-selected .sp-thumbs").find("a:eq(" + d + ")").css("backgroundimage"));
d == e - 1 && a("#sp-next").css("opacity", ".1"), a("#sp-prev").css("opacity", "1"), a(".sp-selected .sp-current").removeclass(), a(".sp-selected .sp-thumbs a:eq(" + d + ")").addclass("sp-current"), a(".sp-selected .sp-large").empty().append("
'), a(".sp-lightbox img").fadeout(250, function() {
a(this).remove(), a(".sp-lightbox").data("currenteq", f).append('
'), a(".sp-lightbox img").hide().fadein(250)
})
}
b.preventdefault()
}), a(document.body).on("click", "#sp-prev", function(b) {
b.stoppropagation();
var d = a(".sp-lightbox").data("currenteq"),
d = d - 1;
if (0 >= d);
else {
1 == d && a("#sp-prev").css("opacity", ".1");
var e = d - 1,
f = a(".sp-selected .sp-thumbs").find("a:eq(" + e + ")").attr("href"),
g = c(a(".sp-selected .sp-thumbs").find("a:eq(" + e + ")").css("backgroundimage"));
a("#sp-next").css("opacity", "1"), a(".sp-selected .sp-current").removeclass(), a(".sp-selected .sp-thumbs a:eq(" + e + ")").addclass("sp-current"), a(".sp-selected .sp-large").empty().append("
'), a(".sp-lightbox img").fadeout(250, function() {
a(this).remove(), a(".sp-lightbox").data("currenteq", d).append('
'), a(".sp-lightbox img").hide().fadein(250)
})
}
b.preventdefault()
}), a(document.body).on("click", ".sp-lightbox", function() {
b()
}), a(document).keydown(function(a) {
return 27 == a.keycode ? (b(), !1) : void 0
}), a(".sp-large").mousemove(function(b) {
var c = a(this).width(),
d = a(this).height(),
e = a(this).find(".sp-zoom").width(),
f = a(this).find(".sp-zoom").height(),
g = a(this).parent().offset(),
h = b.pagex - g.left,
i = b.pagey - g.top,
j = math.floor(h * (c - e) / c),
k = math.floor(i * (d - f) / d);
a(this).find(".sp-zoom").css({
left: j,
top: k
})
})
}
})
}(jquery);