", RVS.DOC.on("click", "#rbmas_active_plugin_now", function() {
return jQuery("#rbm_activate_slider").addClass("rbmas_show_activate"), !1
})), RVS.F.showInfo({
content: window.rbmContent,
type: "register",
showdelay: 0,
hidedelay: 0,
hideon: "",
event: ""
})
}, RVS.F.showWaitAMinute = function(e) {
var i = jQuery("#waitaminute");
if (t = void 0 === t ? 0 : t, null != e.delay && (t++, tpGS.gsap.to(i, .3, {
autoAlpha: 1,
ease: "power3.inOut"
}), tpGS.gsap.set(i, {
display: "block"
}), setTimeout(function() {
0 === --t && tpGS.gsap.to(i, .3, {
autoAlpha: 0,
ease: "power3.inOut",
onComplete: function() {
tpGS.gsap.set(i, {
display: "block"
})
}
})
}, e.delay)), null != e.fadeIn && (i && i.length > 0 && (tpGS.gsap.to(i, e.fadeIn / 1e3, {
autoAlpha: 1,
ease: "power3.inOut"
}), tpGS.gsap.set(i, {
display: "block"
})), t++), null != e.fadeOut && 0 === --t && i && i.length > 0 && tpGS.gsap.to(i, e.fadeOut / 1e3, {
autoAlpha: 0,
ease: "power3.inOut",
onComplete: function() {
tpGS.gsap.set(i, {
display: "block"
})
}
}), null != e.text) switch (e.text) {
case "progress1":
break;
default:
i.html('
' + e.text + "
")
} else i.html('
' + RVS_LANG.please_wait_a_moment + "
");
return !0
}, RVS.F.turnOnOff = function(e, t) {
var i = e.find("input");
i.is(":checked") ? t ? (i.removeAttr("checked"), i.trigger("change"), e.addClass("off")) : e.removeClass("off") : t ? (i.prop("checked", "checked"), i.trigger("change"), e.removeClass("off")) : e.addClass("off")
}, RVS.F.turnOnOffVisUpdate = function(e) {
e.btn = void 0 === e.btn ? e.input.closest(".tponoff_inner") : e.btn, e.wrap = e.btn.closest(".tponoffwrap"), e.input = void 0 === e.input ? btn.find("input") : e.input, e.input.is(":checked") ? (e.wrap.addClass("on"), e.wrap.removeClass("off")) : (e.wrap.removeClass("on"), e.wrap.addClass("off"))
}, RVS.F.initOnOff = function(t) {
void 0 === t ? jQuery('input[type="checkbox"]').each(function() {
var e = jQuery(this);
e.hasClass("simplechkbx") || e.hasClass("tponoff") || (e.wrap('
'), e.addClass("tponoff"))
}) : t.find('input[type="checkbox"]').each(function() {
var e = jQuery(this);
e.hasClass("simplechkbx") || e.hasClass("tponoff") || (e.wrap('
'), e.addClass("tponoff"))
}), void 0 === e && (e = !0, RVS.DOC.on("click", ".tponoffwrap", function() {
RVS.F.turnOnOff(jQuery(this), !0)
})), RVS.F.updateAllOnOff()
}, RVS.F.updateAllOnOff = function() {
jQuery(".tponoffwrap").each(function() {
RVS.F.turnOnOff(jQuery(this), !1)
})
}, RVS.F.getAllShortCodes = function() {
console.log(""), console.log("%c ------- INSERT SHORTCODE PARAMETERS INTO TEMPLATE LIBRARY --------", "background:#222;color:#bada55"), console.log(""), jQuery(".slider_slug").find("input").each(function() {
var e, t = "";
void 0 !== (e = RVS.SC.parseShortCode(this.value)) && void 0 !== e.attributes && (void 0 !== (e = e.attributes).usage && (t += ' usage="' + e.usage + '"'), void 0 !== e.modal && (t += ' modal="' + e.modal + '"'), void 0 !== e.offset && (t += ' offset="' + e.offset + '"'), void 0 !== e.layout && (t += ' layout="' + e.layout + '"'), void 0 !== e.zindex && (t += ' zindex="' + e.zindex + '"'), "" !== t && void 0 !== t && (console.log("%c==== " + e.alias + " ==== ", "background:#222;font-size:13px; line-height:15px;"), console.log("%c" + t, "background:#222;color:#c0392b;font-size:10px; line-height:15px;"), console.log("")))
}), console.log("%c -------------------------------------------------------------------", "background:#222;color:#bada55")
}, RVS.F.ajaxRequest = function(e, t, i, r, a, o, n) {
var s = {
action: RVS.ENV.plugin_dir + "_ajax_action",
client_action: e,
nonce: RVS.ENV.nonce,
data: t
};
b(), h(), f(), void 0 === r && (void 0 !== o ? RVS.F.showWaitAMinute({
fadeIn: 500,
text: o
}) : RVS.F.showWaitAMinute({
fadeIn: 500,
text: RVS_LANG.please_wait_a_moment
})), jQuery.ajax({
type: "post",
url: rev_ajaxurl,
dataType: "json",
data: s,
success: function(t) {
if (void 0 !== r || t.is_redirect || RVS.F.showWaitAMinute({
fadeOut: 500
}), g(), !t) return RVS.F.showErrorMessage("Empty ajax response!"), !1;
if (-1 == t) return RVS.F.showErrorMessage("ajax error!!!"), !1;
if (0 == t) return RVS.F.showErrorMessage("ajax error, action:
" + e + " not found"), !1;
if (null == t.success) return RVS.F.showErrorMessage("The 'success' param is a must!"), !1;
if (0 == t.success) {
if (void 0 === a) return RVS.F.showErrorMessage(t.message), !1;
"function" == typeof i && i(t)
} else "function" == typeof i && i(t), t.message && !0 !== n && S(t.message), t.is_redirect && (location.href = t.redirect_url)
},
error: function(t, i, a) {
switch (void 0 === r && RVS.F.showWaitAMinute({
fadeOut: 500
}), g(), e) {
case "preview_slider":
jQuery("#rbm_preview .rbm_close").click(), RVS.F.showInfo({
content: RVS_LANG.previewnotworking,
type: "info",
showdelay: 0,
hidedelay: 5,
hideon: "",
event: ""
});
break;
case "check_system":
RVS.F.showInfo({
content: RVS_LANG.checksystemnotworking,
type: "info",
showdelay: 0,
hidedelay: 5,
hideon: "",
event: ""
});
break;
default:
"parsererror" == i && RVS.F.debug(t.responseText), RVS.F.showErrorMessage("Ajax Error!!! " + i)
}
}
})
}, RVS.F.showErrorMessage = function(e) {
RVS.F.showInfo({
content: e,
type: "warning",
showdelay: 0,
hidedelay: 3,
hideon: "",
event: ""
}), m()
}, RVS.F.setErrorMessageID = function(e) {
i = e
}, RVS.F.setSuccessMessageID = function(e) {
r = e
}, RVS.F.hideSuccessMessage = function() {
r ? (jQuery("#" + r).hide(), r = null) : jQuery("#success_message").slideUp("slow").fadeOut("slow"), m()
};
var h = function() {
a && jQuery("#" + a).show()
},
g = function() {
a && (jQuery("#" + a).hide(), a = null)
},
f = function() {
if (o) {
var e = o.split(",");
if (e.length > 1)
for (var t = 0; t < e.length; t++) jQuery("#" + e[t]).hide();
else jQuery("#" + o).hide()
}
},
m = function() {
if (o) {
var e = o.split(",");
if (e.length > 1)
for (var t = 0; t < e.length; t++) jQuery("#" + e[t]).show();
else jQuery("#" + o).show();
o = null
}
},
b = function() {
null !== i ? (jQuery("#" + i).hide(), i = null) : jQuery("#error_message").hide()
},
S = function(e) {
RVS.F.showInfo({
content: e,
type: "success",
showdelay: 0,
hidedelay: 1,
hideon: "",
event: ""
}), m()
}
}(), window.UniteLayersRev = {
addon_callbacks: []
}, UniteLayersRev.addPreventLeave = UniteLayersRev.add_layer_actions = UniteLayersRev.add_layer_change = function() {
console.log("Function is depricated. Please Update Addons")
},
function(e) {
"function" == typeof define && define.amd ? define(["jquery"], e) : "object" == typeof module && module.exports ? module.exports = function(t, i) {
return void 0 === i && (i = "undefined" != typeof window ? require("jquery") : require("jquery")(t)), e(i), i
} : e(jQuery)
}(function(e) {
var t = function() {
if (e && e.fn && e.fn.select2RS && e.fn.select2RS.amd) var t = e.fn.select2RS.amd;
var i, r, a, o;
return t && t.requirejs || (t ? r = t : t = {}, function(e) {
var t, o, n, s, l = {},
c = {},
d = {},
p = {},
u = Object.prototype.hasOwnProperty,
v = [].slice,
h = /\.js$/;
function g(e, t) {
return u.call(e, t)
}
function f(e, t) {
var i, r, a, o, n, s, l, c, p, u, v, g = t && t.split("/"),
f = d.map,
m = f && f["*"] || {};
if (e) {
for (n = (e = e.split("/")).length - 1, d.nodeIdCompat && h.test(e[n]) && (e[n] = e[n].replace(h, "")), "." === e[0].charAt(0) && g && (e = g.slice(0, g.length - 1).concat(e)), p = 0; p < e.length; p++)
if ("." === (v = e[p])) e.splice(p, 1), p -= 1;
else if (".." === v) {
if (0 === p || 1 === p && ".." === e[2] || ".." === e[p - 1]) continue;
p > 0 && (e.splice(p - 1, 2), p -= 2)
}
e = e.join("/")
}
if ((g || m) && f) {
for (p = (i = e.split("/")).length; p > 0; p -= 1) {
if (r = i.slice(0, p).join("/"), g)
for (u = g.length; u > 0; u -= 1)
if ((a = f[g.slice(0, u).join("/")]) && (a = a[r])) {
o = a, s = p;
break
}
if (o) break;
!l && m && m[r] && (l = m[r], c = p)
}!o && l && (o = l, s = c), o && (i.splice(0, s, o), e = i.join("/"))
}
return e
}
function m(t, i) {
return function() {
var r = v.call(arguments, 0);
return "string" != typeof r[0] && 1 === r.length && r.push(null), o.apply(e, r.concat([t, i]))
}
}
function b(e) {
return function(t) {
l[e] = t
}
}
function S(i) {
if (g(c, i)) {
var r = c[i];
delete c[i], p[i] = !0, t.apply(e, r)
}
if (!g(l, i) && !g(p, i)) throw new Error("No " + i);
return l[i]
}
function y(e) {
var t, i = e ? e.indexOf("!") : -1;
return i > -1 && (t = e.substring(0, i), e = e.substring(i + 1, e.length)), [t, e]
}
function R(e) {
return e ? y(e) : []
}
function _(e) {
return function() {
return d && d.config && d.config[e] || {}
}
}
n = function(e, t) {
var i, r, a = y(e),
o = a[0],
n = t[1];
return e = a[1], o && (i = S(o = f(o, n))), o ? e = i && i.normalize ? i.normalize(e, (r = n, function(e) {
return f(e, r)
})) : f(e, n) : (o = (a = y(e = f(e, n)))[0], e = a[1], o && (i = S(o))), {
f: o ? o + "!" + e : e,
n: e,
pr: o,
p: i
}
}, s = {
require: function(e) {
return m(e)
},
exports: function(e) {
var t = l[e];
return void 0 !== t ? t : l[e] = {}
},
module: function(e) {
return {
id: e,
uri: "",
exports: l[e],
config: _(e)
}
}
}, t = function(t, i, r, a) {
var o, d, u, v, h, f, y, _ = [],
V = typeof r;
if (f = R(a = a || t), "undefined" === V || "function" === V) {
for (i = !i.length && r.length ? ["require", "exports", "module"] : i, h = 0; h < i.length; h += 1)
if ("require" === (d = (v = n(i[h], f)).f)) _[h] = s.require(t);
else if ("exports" === d) _[h] = s.exports(t), y = !0;
else if ("module" === d) o = _[h] = s.module(t);
else if (g(l, d) || g(c, d) || g(p, d)) _[h] = S(d);
else {
if (!v.p) throw new Error(t + " missing " + d);
v.p.load(v.n, m(a, !0), b(d), {}), _[h] = l[d]
}
u = r ? r.apply(l[t], _) : void 0, t && (o && o.exports !== e && o.exports !== l[t] ? l[t] = o.exports : u === e && y || (l[t] = u))
} else t && (l[t] = r)
}, i = r = o = function(i, r, a, l, c) {
if ("string" == typeof i) return s[i] ? s[i](r) : S(n(i, R(r)).f);
if (!i.splice) {
if ((d = i).deps && o(d.deps, d.callback), !r) return;
r.splice ? (i = r, r = a, a = null) : i = e
}
return r = r || function() {}, "function" == typeof a && (a = l, l = c), l ? t(e, i, r, a) : setTimeout(function() {
t(e, i, r, a)
}, 4), o
}, o.config = function(e) {
return o(e)
}, i._defined = l, (a = function(e, t, i) {
if ("string" != typeof e) throw new Error("See almond README: incorrect module build, no module name");
t.splice || (i = t, t = []), g(l, e) || g(c, e) || (c[e] = [e, t, i])
}).amd = {
jQuery: !0
}
}(), t.requirejs = i, t.require = r, t.define = a), t.define("almond", function() {}), t.define("jquery", [], function() {
var t = e || $;
return null == t && console && console.error && console.error("Select2: An instance of jQuery or a jQuery-compatible library was not found. Make sure that you are including jQuery before Select2 on your web page."), t
}), t.define("select2RS/utils", ["jquery"], function(e) {
var t = {};
function i(e) {
var t = e.prototype,
i = [];
for (var r in t) {
"function" == typeof t[r] && ("constructor" !== r && i.push(r))
}
return i
}
t.Extend = function(e, t) {
var i = {}.hasOwnProperty;
function r() {
this.constructor = e
}
for (var a in t) i.call(t, a) && (e[a] = t[a]);
return r.prototype = t.prototype, e.prototype = new r, e.__super__ = t.prototype, e
}, t.Decorate = function(e, t) {
var r = i(t),
a = i(e);
function o() {
var i = Array.prototype.unshift,
r = t.prototype.constructor.length,
a = e.prototype.constructor;
r > 0 && (i.call(arguments, e.prototype.constructor), a = t.prototype.constructor), a.apply(this, arguments)
}
t.displayName = e.displayName, o.prototype = new function() {
this.constructor = o
};
for (var n = 0; n < a.length; n++) {
var s = a[n];
o.prototype[s] = e.prototype[s]
}
for (var l = function(e) {
var i = function() {};
e in o.prototype && (i = o.prototype[e]);
var r = t.prototype[e];
return function() {
return Array.prototype.unshift.call(arguments, i), r.apply(this, arguments)
}
}, c = 0; c < r.length; c++) {
var d = r[c];
o.prototype[d] = l(d)
}
return o
};
var r = function() {
this.listeners = {}
};
r.prototype.on = function(e, t) {
this.listeners = this.listeners || {}, e in this.listeners ? this.listeners[e].push(t) : this.listeners[e] = [t]
}, r.prototype.trigger = function(e) {
var t = Array.prototype.slice,
i = t.call(arguments, 1);
this.listeners = this.listeners || {}, null == i && (i = []), 0 === i.length && i.push({}), i[0]._type = e, e in this.listeners && this.invoke(this.listeners[e], t.call(arguments, 1)), "*" in this.listeners && this.invoke(this.listeners["*"], arguments)
}, r.prototype.invoke = function(e, t) {
for (var i = 0, r = e.length; i < r; i++) e[i].apply(this, t)
}, t.Observable = r, t.generateChars = function(e) {
for (var t = "", i = 0; i < e; i++) {
t += Math.floor(36 * Math.random()).toString(36)
}
return t
}, t.bind = function(e, t) {
return function() {
e.apply(t, arguments)
}
}, t._convertData = function(e) {
for (var t in e) {
var i = t.split("-"),
r = e;
if (1 !== i.length) {
for (var a = 0; a < i.length; a++) {
var o = i[a];
(o = o.substring(0, 1).toLowerCase() + o.substring(1)) in r || (r[o] = {}), a == i.length - 1 && (r[o] = e[t]), r = r[o]
}
delete e[t]
}
}
return e
}, t.hasScroll = function(t, i) {
var r = e(i),
a = i.style.overflowX,
o = i.style.overflowY;
return (a !== o || "hidden" !== o && "visible" !== o) && ("scroll" === a || "scroll" === o || (r.innerHeight() < i.scrollHeight || r.innerWidth() < i.scrollWidth))
}, t.escapeMarkup = function(e) {
var t = {
"\\": "\",
"&": "&",
"<": "<",
">": ">",
'"': """,
"'": "'",
"/": "/"
};
return "string" != typeof e ? e : String(e).replace(/[&<>"'\/\\]/g, function(e) {
return t[e]
})
}, t.appendMany = function(t, i) {
if ("1.7" === e.fn.jquery.substr(0, 3)) {
var r = e();
e.map(i, function(e) {
r = r.add(e)
}), i = r
}
t.append(i)
}, t.__cache = {};
var a = 0;
return t.GetUniqueElementId = function(e) {
var t = e.getAttribute("data-select2RS-id");
return null == t && (e.id ? (t = e.id, e.setAttribute("data-select2RS-id", t)) : (e.setAttribute("data-select2RS-id", ++a), t = a.toString())), t
}, t.StoreData = function(e, i, r) {
var a = t.GetUniqueElementId(e);
t.__cache[a] || (t.__cache[a] = {}), t.__cache[a][i] = r
}, t.GetData = function(i, r) {
var a = t.GetUniqueElementId(i);
return r ? t.__cache[a] && null != t.__cache[a][r] ? t.__cache[a][r] : e(i).data(r) : t.__cache[a]
}, t.RemoveData = function(e) {
var i = t.GetUniqueElementId(e);
null != t.__cache[i] && delete t.__cache[i], e.removeAttribute("data-select2RS-id")
}, t
}), t.define("select2RS/results", ["jquery", "./utils"], function(e, t) {
function i(e, t, r) {
this.$element = e, this.data = r, this.options = t, i.__super__.constructor.call(this)
}
return t.Extend(i, t.Observable), i.prototype.render = function() {
var t = e('
');
return this.options.get("multiple") && t.attr("aria-multiselectable", "true"), this.$results = t, t
}, i.prototype.clear = function() {
this.$results.empty()
}, i.prototype.displayMessage = function(t) {
var i = this.options.get("escapeMarkup");
this.clear(), this.hideLoading();
var r = e('
'),
a = this.options.get("translations").get(t.message);
r.append(i(a(t.args))), r[0].className += " select2RS-results__message", this.$results.append(r)
}, i.prototype.hideMessages = function() {
this.$results.find(".select2RS-results__message").remove()
}, i.prototype.append = function(e) {
this.hideLoading();
var t = [];
if (null != e.results && 0 !== e.results.length) {
e.results = this.sort(e.results);
for (var i = 0; i < e.results.length; i++) {
var r = e.results[i],
a = this.option(r);
t.push(a)
}
this.$results.append(t)
} else 0 === this.$results.children().length && this.trigger("results:message", {
message: "noResults"
})
}, i.prototype.position = function(e, t) {
t.find(".select2RS-results").append(e)
}, i.prototype.sort = function(e) {
return this.options.get("sorter")(e)
}, i.prototype.highlightFirstItem = function() {
var e = this.$results.find(".select2RS-results__option[aria-selected]"),
t = e.filter("[aria-selected=true]");
t.length > 0 ? t.first().trigger("mouseenter") : e.first().trigger("mouseenter"), this.ensureHighlightVisible()
}, i.prototype.setClasses = function() {
var i = this;
this.data.current(function(r) {
var a = e.map(r, function(e) {
return e.id.toString()
});
i.$results.find(".select2RS-results__option[aria-selected]").each(function() {
var i = e(this),
r = t.GetData(this, "data"),
o = "" + r.id;
null != r.element && r.element.selected || null == r.element && e.inArray(o, a) > -1 ? i.attr("aria-selected", "true") : i.attr("aria-selected", "false")
})
})
}, i.prototype.showLoading = function(e) {
this.hideLoading();
var t = {
disabled: !0,
loading: !0,
text: this.options.get("translations").get("searching")(e)
},
i = this.option(t);
i.className += " loading-results", this.$results.prepend(i)
}, i.prototype.hideLoading = function() {
this.$results.find(".loading-results").remove()
}, i.prototype.option = function(i) {
var r = document.createElement("li");
r.className = "select2RS-results__option";
var a = {
role: "option",
"aria-selected": "false"
},
o = window.Element.prototype.matches || window.Element.prototype.msMatchesSelector || window.Element.prototype.webkitMatchesSelector;
for (var n in (null != i.element && o.call(i.element, ":disabled") || null == i.element && i.disabled) && (delete a["aria-selected"], a["aria-disabled"] = "true"), null == i.id && delete a["aria-selected"], null != i._resultId && (r.id = i._resultId), i.title && (r.title = i.title), i.children && (a.role = "group", a["aria-label"] = i.text, delete a["aria-selected"]), a) {
var s = a[n];
r.setAttribute(n, s)
}
if (i.children) {
var l = e(r),
c = document.createElement("strong");
c.className = "select2RS-results__group";
e(c);
this.template(i, c);
for (var d = [], p = 0; p < i.children.length; p++) {
var u = i.children[p],
v = this.option(u);
d.push(v)
}
var h = e("
", {
class: "select2RS-results__options select2RS-results__options--nested"
});
h.append(d), l.append(c), l.append(h)
} else this.template(i, r);
return t.StoreData(r, "data", i), r
}, i.prototype.bind = function(i, r) {
var a = this,
o = i.id + "-results";
this.$results.attr("id", o), i.on("results:all", function(e) {
a.clear(), a.append(e.data), i.isOpen() && (a.setClasses(), a.highlightFirstItem())
}), i.on("results:append", function(e) {
a.append(e.data), i.isOpen() && a.setClasses()
}), i.on("query", function(e) {
a.hideMessages(), a.showLoading(e)
}), i.on("select", function() {
i.isOpen() && (a.setClasses(), a.options.get("scrollAfterSelect") && a.highlightFirstItem())
}), i.on("unselect", function() {
i.isOpen() && (a.setClasses(), a.options.get("scrollAfterSelect") && a.highlightFirstItem())
}), i.on("open", function() {
a.$results.attr("aria-expanded", "true"), a.$results.attr("aria-hidden", "false"), a.setClasses(), a.ensureHighlightVisible()
}), i.on("close", function() {
a.$results.attr("aria-expanded", "false"), a.$results.attr("aria-hidden", "true"), a.$results.removeAttr("aria-activedescendant")
}), i.on("results:toggle", function() {
var e = a.getHighlightedResults();
0 !== e.length && e.trigger("mouseup")
}), i.on("results:select", function() {
var e = a.getHighlightedResults();
if (0 !== e.length) {
var i = t.GetData(e[0], "data");
"true" == e.attr("aria-selected") ? a.trigger("close", {}) : a.trigger("select", {
data: i
})
}
}), i.on("results:previous", function() {
var e = a.getHighlightedResults(),
t = a.$results.find("[aria-selected]"),
i = t.index(e);
if (!(i <= 0)) {
var r = i - 1;
0 === e.length && (r = 0);
var o = t.eq(r);
o.trigger("mouseenter");
var n = a.$results.offset().top,
s = o.offset().top,
l = a.$results.scrollTop() + (s - n);
0 === r ? a.$results.scrollTop(0) : s - n < 0 && a.$results.scrollTop(l)
}
}), i.on("results:next", function() {
var e = a.getHighlightedResults(),
t = a.$results.find("[aria-selected]"),
i = t.index(e) + 1;
if (!(i >= t.length)) {
var r = t.eq(i);
r.trigger("mouseenter");
var o = a.$results.offset().top + a.$results.outerHeight(!1),
n = r.offset().top + r.outerHeight(!1),
s = a.$results.scrollTop() + n - o;
0 === i ? a.$results.scrollTop(0) : n > o && a.$results.scrollTop(s)
}
}), i.on("results:focus", function(e) {
e.element.addClass("select2RS-results__option--highlighted")
}), i.on("results:message", function(e) {
a.displayMessage(e)
}), e.fn.mousewheel && this.$results.on("mousewheel", function(e) {
var t = a.$results.scrollTop(),
i = a.$results.get(0).scrollHeight - t + e.deltaY,
r = e.deltaY > 0 && t - e.deltaY <= 0,
o = e.deltaY < 0 && i <= a.$results.height();
r ? (a.$results.scrollTop(0), e.preventDefault(), e.stopPropagation()) : o && (a.$results.scrollTop(a.$results.get(0).scrollHeight - a.$results.height()), e.preventDefault(), e.stopPropagation())
}), this.$results.on("mouseup", ".select2RS-results__option[aria-selected]", function(i) {
var r = e(this),
o = t.GetData(this, "data");
"true" !== r.attr("aria-selected") ? a.trigger("select", {
originalEvent: i,
data: o
}) : a.options.get("multiple") ? a.trigger("unselect", {
originalEvent: i,
data: o
}) : a.trigger("close", {})
}), this.$results.on("mouseenter", ".select2RS-results__option[aria-selected]", function(i) {
var r = t.GetData(this, "data");
a.getHighlightedResults().removeClass("select2RS-results__option--highlighted"), a.trigger("results:focus", {
data: r,
element: e(this)
})
})
}, i.prototype.getHighlightedResults = function() {
return this.$results.find(".select2RS-results__option--highlighted")
}, i.prototype.destroy = function() {
this.$results.remove()
}, i.prototype.ensureHighlightVisible = function() {
var e = this.getHighlightedResults();
if (0 !== e.length) {
var t = this.$results.find("[aria-selected]").index(e),
i = this.$results.offset().top,
r = e.offset().top,
a = this.$results.scrollTop() + (r - i),
o = r - i;
a -= 2 * e.outerHeight(!1), t <= 2 ? this.$results.scrollTop(0) : (o > this.$results.outerHeight() || o < 0) && this.$results.scrollTop(a)
}
}, i.prototype.template = function(t, i) {
var r = this.options.get("templateResult"),
a = this.options.get("escapeMarkup"),
o = r(t, i);
null == o ? i.style.display = "none" : "string" == typeof o ? i.innerHTML = a(o) : e(i).append(o)
}, i
}), t.define("select2RS/keys", [], function() {
return {
BACKSPACE: 8,
TAB: 9,
ENTER: 13,
SHIFT: 16,
CTRL: 17,
ALT: 18,
ESC: 27,
SPACE: 32,
PAGE_UP: 33,
PAGE_DOWN: 34,
END: 35,
HOME: 36,
LEFT: 37,
UP: 38,
RIGHT: 39,
DOWN: 40,
DELETE: 46
}
}), t.define("select2RS/selection/base", ["jquery", "../utils", "../keys"], function(e, t, i) {
function r(e, t) {
this.$element = e, this.options = t, r.__super__.constructor.call(this)
}
return t.Extend(r, t.Observable), r.prototype.render = function() {
var i = e('
');
return this._tabindex = 0, null != t.GetData(this.$element[0], "old-tabindex") ? this._tabindex = t.GetData(this.$element[0], "old-tabindex") : null != this.$element.attr("tabindex") && (this._tabindex = this.$element.attr("tabindex")), i.attr("title", this.$element.attr("title")), i.attr("tabindex", this._tabindex), i.attr("aria-disabled", "false"), this.$selection = i, i
}, r.prototype.bind = function(e, t) {
var r = this,
a = e.id + "-results";
this.container = e, this.$selection.on("focus", function(e) {
r.trigger("focus", e)
}), this.$selection.on("blur", function(e) {
r._handleBlur(e)
}), this.$selection.on("keydown", function(e) {
r.trigger("keypress", e), e.which === i.SPACE && e.preventDefault()
}), e.on("results:focus", function(e) {
r.$selection.attr("aria-activedescendant", e.data._resultId)
}), e.on("selection:update", function(e) {
r.update(e.data)
}), e.on("open", function() {
r.$selection.attr("aria-expanded", "true"), r.$selection.attr("aria-owns", a), r._attachCloseHandler(e)
}), e.on("close", function() {
r.$selection.attr("aria-expanded", "false"), r.$selection.removeAttr("aria-activedescendant"), r.$selection.removeAttr("aria-owns"), r.$selection.trigger("focus"), r._detachCloseHandler(e)
}), e.on("enable", function() {
r.$selection.attr("tabindex", r._tabindex), r.$selection.attr("aria-disabled", "false")
}), e.on("disable", function() {
r.$selection.attr("tabindex", "-1"), r.$selection.attr("aria-disabled", "true")
})
}, r.prototype._handleBlur = function(t) {
var i = this;
window.setTimeout(function() {
document.activeElement == i.$selection[0] || e.contains(i.$selection[0], document.activeElement) || i.trigger("blur", t)
}, 1)
}, r.prototype._attachCloseHandler = function(i) {
e(document.body).on("mousedown.select2RS." + i.id, function(i) {
var r = e(i.target).closest(".select2RS");
e(".select2RS.select2RS-container--open").each(function() {
this != r[0] && t.GetData(this, "element").select2RS("close")
})
})
}, r.prototype._detachCloseHandler = function(t) {
e(document.body).off("mousedown.select2RS." + t.id)
}, r.prototype.position = function(e, t) {
t.find(".selection").append(e)
}, r.prototype.destroy = function() {
this._detachCloseHandler(this.container)
}, r.prototype.update = function(e) {
throw new Error("The `update` method must be defined in child classes.")
}, r
}), t.define("select2RS/selection/single", ["jquery", "./base", "../utils", "../keys"], function(e, t, i, r) {
function a() {
a.__super__.constructor.apply(this, arguments)
}
return i.Extend(a, t), a.prototype.render = function() {
var e = a.__super__.render.call(this);
return e.addClass("select2RS-selection--single"), e.html('
'), e
}, a.prototype.bind = function(e, t) {
var i = this;
a.__super__.bind.apply(this, arguments);
var r = e.id + "-container";
this.$selection.find(".select2RS-selection__rendered").attr("id", r).attr("role", "textbox").attr("aria-readonly", "true"), this.$selection.attr("aria-labelledby", r), this.$selection.on("mousedown", function(e) {
1 === e.which && i.trigger("toggle", {
originalEvent: e
})
}), this.$selection.on("focus", function(e) {}), this.$selection.on("blur", function(e) {}), e.on("focus", function(t) {
e.isOpen() || i.$selection.trigger("focus")
})
}, a.prototype.clear = function() {
var e = this.$selection.find(".select2RS-selection__rendered");
e.empty(), e.removeAttr("title")
}, a.prototype.display = function(e, t) {
var i = this.options.get("templateSelection");
return this.options.get("escapeMarkup")(i(e, t))
}, a.prototype.selectionContainer = function() {
return e("
")
}, a.prototype.update = function(e) {
if (0 !== e.length) {
var t = e[0],
i = this.$selection.find(".select2RS-selection__rendered"),
r = this.display(t, i);
i.empty().append(r);
var a = t.title || t.text;
a ? i.attr("title", a) : i.removeAttr("title")
} else this.clear()
}, a
}), t.define("select2RS/selection/multiple", ["jquery", "./base", "../utils"], function(e, t, i) {
function r(e, t) {
r.__super__.constructor.apply(this, arguments)
}
return i.Extend(r, t), r.prototype.render = function() {
var e = r.__super__.render.call(this);
return e.addClass("select2RS-selection--multiple"), e.html('
'), e
}, r.prototype.bind = function(t, a) {
var o = this;
r.__super__.bind.apply(this, arguments), this.$selection.on("click", function(e) {
o.trigger("toggle", {
originalEvent: e
})
}), this.$selection.on("click", ".select2RS-selection__choice__remove", function(t) {
if (!o.options.get("disabled")) {
var r = e(this).parent(),
a = i.GetData(r[0], "data");
o.trigger("unselect", {
originalEvent: t,
data: a
})
}
})
}, r.prototype.clear = function() {
var e = this.$selection.find(".select2RS-selection__rendered");
e.empty(), e.removeAttr("title")
}, r.prototype.display = function(e, t) {
var i = this.options.get("templateSelection");
return this.options.get("escapeMarkup")(i(e, t))
}, r.prototype.selectionContainer = function() {
return e('
×')
}, r.prototype.update = function(e) {
if (this.clear(), 0 !== e.length) {
for (var t = [], r = 0; r < e.length; r++) {
var a = e[r],
o = this.selectionContainer(),
n = this.display(a, o);
o.append(n);
var s = a.title || a.text;
s && o.attr("title", s), i.StoreData(o[0], "data", a), t.push(o)
}
var l = this.$selection.find(".select2RS-selection__rendered");
i.appendMany(l, t)
}
}, r
}), t.define("select2RS/selection/placeholder", ["../utils"], function(e) {
function t(e, t, i) {
this.placeholder = this.normalizePlaceholder(i.get("placeholder")), e.call(this, t, i)
}
return t.prototype.normalizePlaceholder = function(e, t) {
return "string" == typeof t && (t = {
id: "",
text: t
}), t
}, t.prototype.createPlaceholder = function(e, t) {
var i = this.selectionContainer();
return i.html(this.display(t)), i.addClass("select2RS-selection__placeholder").removeClass("select2RS-selection__choice"), i
}, t.prototype.update = function(e, t) {
var i = 1 == t.length && t[0].id != this.placeholder.id;
if (t.length > 1 || i) return e.call(this, t);
this.clear();
var r = this.createPlaceholder(this.placeholder);
this.$selection.find(".select2RS-selection__rendered").append(r)
}, t
}), t.define("select2RS/selection/allowClear", ["jquery", "../keys", "../utils"], function(e, t, i) {
function r() {}
return r.prototype.bind = function(e, t, i) {
var r = this;
e.call(this, t, i), null == this.placeholder && this.options.get("debug") && window.console && console.error && console.error("Select2: The `allowClear` option should be used in combination with the `placeholder` option."), this.$selection.on("mousedown", ".select2RS-selection__clear", function(e) {
r._handleClear(e)
}), t.on("keypress", function(e) {
r._handleKeyboardClear(e, t)
})
}, r.prototype._handleClear = function(e, t) {
if (!this.options.get("disabled")) {
var r = this.$selection.find(".select2RS-selection__clear");
if (0 !== r.length) {
t.stopPropagation();
var a = i.GetData(r[0], "data"),
o = this.$element.val();
this.$element.val(this.placeholder.id);
var n = {
data: a
};
if (this.trigger("clear", n), n.prevented) this.$element.val(o);
else {
for (var s = 0; s < a.length; s++)
if (n = {
data: a[s]
}, this.trigger("unselect", n), n.prevented) return void this.$element.val(o);
this.$element.trigger("change"), this.trigger("toggle", {})
}
}
}
}, r.prototype._handleKeyboardClear = function(e, i, r) {
r.isOpen() || i.which != t.DELETE && i.which != t.BACKSPACE || this._handleClear(i)
}, r.prototype.update = function(t, r) {
if (t.call(this, r), !(this.$selection.find(".select2RS-selection__placeholder").length > 0 || 0 === r.length)) {
var a = this.options.get("translations").get("removeAllItems"),
o = e('
×');
i.StoreData(o[0], "data", r), this.$selection.find(".select2RS-selection__rendered").prepend(o)
}
}, r
}), t.define("select2RS/selection/search", ["jquery", "../utils", "../keys"], function(e, t, i) {
function r(e, t, i) {
e.call(this, t, i)
}
return r.prototype.render = function(t) {
var i = e('
');
this.$searchContainer = i, this.$search = i.find("input");
var r = t.call(this);
return this._transferTabIndex(), r
}, r.prototype.bind = function(e, r, a) {
var o = this,
n = r.id + "-results";
e.call(this, r, a), r.on("open", function() {
o.$search.attr("aria-controls", n), o.$search.trigger("focus")
}), r.on("close", function() {
o.$search.val(""), o.$search.removeAttr("aria-controls"), o.$search.removeAttr("aria-activedescendant"), o.$search.trigger("focus")
}), r.on("enable", function() {
o.$search.prop("disabled", !1), o._transferTabIndex()
}), r.on("disable", function() {
o.$search.prop("disabled", !0)
}), r.on("focus", function(e) {
o.$search.trigger("focus")
}), r.on("results:focus", function(e) {
e.data._resultId ? o.$search.attr("aria-activedescendant", e.data._resultId) : o.$search.removeAttr("aria-activedescendant")
}), this.$selection.on("focusin", ".select2RS-search--inline", function(e) {
o.trigger("focus", e)
}), this.$selection.on("focusout", ".select2RS-search--inline", function(e) {
o._handleBlur(e)
}), this.$selection.on("keydown", ".select2RS-search--inline", function(e) {
if (e.stopPropagation(), o.trigger("keypress", e), o._keyUpPrevented = e.isDefaultPrevented(), e.which === i.BACKSPACE && "" === o.$search.val()) {
var r = o.$searchContainer.prev(".select2RS-selection__choice");
if (r.length > 0) {
var a = t.GetData(r[0], "data");
o.searchRemoveChoice(a), e.preventDefault()
}
}
}), this.$selection.on("click", ".select2RS-search--inline", function(e) {
o.$search.val() && e.stopPropagation()
});
var s = document.documentMode,
l = s && s <= 11;
this.$selection.on("input.searchcheck", ".select2RS-search--inline", function(e) {
l ? o.$selection.off("input.search input.searchcheck") : o.$selection.off("keyup.search")
}), this.$selection.on("keyup.search input.search", ".select2RS-search--inline", function(e) {
if (l && "input" === e.type) o.$selection.off("input.search input.searchcheck");
else {
var t = e.which;
t != i.SHIFT && t != i.CTRL && t != i.ALT && t != i.TAB && o.handleSearch(e)
}
})
}, r.prototype._transferTabIndex = function(e) {
this.$search.attr("tabindex", this.$selection.attr("tabindex")), this.$selection.attr("tabindex", "-1")
}, r.prototype.createPlaceholder = function(e, t) {
this.$search.attr("placeholder", t.text)
}, r.prototype.update = function(e, t) {
var i = this.$search[0] == document.activeElement;
this.$search.attr("placeholder", ""), e.call(this, t), this.$selection.find(".select2RS-selection__rendered").append(this.$searchContainer), this.resizeSearch(), i && this.$search.trigger("focus")
}, r.prototype.handleSearch = function() {
if (this.resizeSearch(), !this._keyUpPrevented) {
var e = this.$search.val();
this.trigger("query", {
term: e
})
}
this._keyUpPrevented = !1
}, r.prototype.searchRemoveChoice = function(e, t) {
this.trigger("unselect", {
data: t
}), this.$search.val(t.text), this.handleSearch()
}, r.prototype.resizeSearch = function() {
this.$search.css("width", "25px");
var e = "";
"" !== this.$search.attr("placeholder") ? e = this.$selection.find(".select2RS-selection__rendered").width() : e = .75 * (this.$search.val().length + 1) + "em";
this.$search.css("width", e)
}, r
}), t.define("select2RS/selection/eventRelay", ["jquery"], function(e) {
function t() {}
return t.prototype.bind = function(t, i, r) {
var a = this,
o = ["open", "opening", "close", "closing", "select", "selecting", "unselect", "unselecting", "clear", "clearing"],
n = ["opening", "closing", "selecting", "unselecting", "clearing"];
t.call(this, i, r), i.on("*", function(t, i) {
if (-1 !== e.inArray(t, o)) {
i = i || {};
var r = e.Event("select2RS:" + t, {
params: i
});
a.$element.trigger(r), -1 !== e.inArray(t, n) && (i.prevented = r.isDefaultPrevented())
}
})
}, t
}), t.define("select2RS/translation", ["jquery", "require"], function(e, t) {
function i(e) {
this.dict = e || {}
}
return i.prototype.all = function() {
return this.dict
}, i.prototype.get = function(e) {
return this.dict[e]
}, i.prototype.extend = function(t) {
this.dict = e.extend({}, t.all(), this.dict)
}, i._cache = {}, i.loadPath = function(e) {
if (!(e in i._cache)) {
var r = t(e);
i._cache[e] = r
}
return new i(i._cache[e])
}, i
}), t.define("select2RS/diacritics", [], function() {
return {
"Ⓐ": "A",
"A": "A",
"À": "A",
"Á": "A",
"Â": "A",
"Ầ": "A",
"Ấ": "A",
"Ẫ": "A",
"Ẩ": "A",
"Ã": "A",
"Ā": "A",
"Ă": "A",
"Ằ": "A",
"Ắ": "A",
"Ẵ": "A",
"Ẳ": "A",
"Ȧ": "A",
"Ǡ": "A",
"Ä": "A",
"Ǟ": "A",
"Ả": "A",
"Å": "A",
"Ǻ": "A",
"Ǎ": "A",
"Ȁ": "A",
"Ȃ": "A",
"Ạ": "A",
"Ậ": "A",
"Ặ": "A",
"Ḁ": "A",
"Ą": "A",
"Ⱥ": "A",
"Ɐ": "A",
"Ꜳ": "AA",
"Æ": "AE",
"Ǽ": "AE",
"Ǣ": "AE",
"Ꜵ": "AO",
"Ꜷ": "AU",
"Ꜹ": "AV",
"Ꜻ": "AV",
"Ꜽ": "AY",
"Ⓑ": "B",
"B": "B",
"Ḃ": "B",
"Ḅ": "B",
"Ḇ": "B",
"Ƀ": "B",
"Ƃ": "B",
"Ɓ": "B",
"Ⓒ": "C",
"C": "C",
"Ć": "C",
"Ĉ": "C",
"Ċ": "C",
"Č": "C",
"Ç": "C",
"Ḉ": "C",
"Ƈ": "C",
"Ȼ": "C",
"Ꜿ": "C",
"Ⓓ": "D",
"D": "D",
"Ḋ": "D",
"Ď": "D",
"Ḍ": "D",
"Ḑ": "D",
"Ḓ": "D",
"Ḏ": "D",
"Đ": "D",
"Ƌ": "D",
"Ɗ": "D",
"Ɖ": "D",
"Ꝺ": "D",
"DZ": "DZ",
"DŽ": "DZ",
"Dz": "Dz",
"Dž": "Dz",
"Ⓔ": "E",
"E": "E",
"È": "E",
"É": "E",
"Ê": "E",
"Ề": "E",
"Ế": "E",
"Ễ": "E",
"Ể": "E",
"Ẽ": "E",
"Ē": "E",
"Ḕ": "E",
"Ḗ": "E",
"Ĕ": "E",
"Ė": "E",
"Ë": "E",
"Ẻ": "E",
"Ě": "E",
"Ȅ": "E",
"Ȇ": "E",
"Ẹ": "E",
"Ệ": "E",
"Ȩ": "E",
"Ḝ": "E",
"Ę": "E",
"Ḙ": "E",
"Ḛ": "E",
"Ɛ": "E",
"Ǝ": "E",
"Ⓕ": "F",
"F": "F",
"Ḟ": "F",
"Ƒ": "F",
"Ꝼ": "F",
"Ⓖ": "G",
"G": "G",
"Ǵ": "G",
"Ĝ": "G",
"Ḡ": "G",
"Ğ": "G",
"Ġ": "G",
"Ǧ": "G",
"Ģ": "G",
"Ǥ": "G",
"Ɠ": "G",
"Ꞡ": "G",
"Ᵹ": "G",
"Ꝿ": "G",
"Ⓗ": "H",
"H": "H",
"Ĥ": "H",
"Ḣ": "H",
"Ḧ": "H",
"Ȟ": "H",
"Ḥ": "H",
"Ḩ": "H",
"Ḫ": "H",
"Ħ": "H",
"Ⱨ": "H",
"Ⱶ": "H",
"Ɥ": "H",
"Ⓘ": "I",
"I": "I",
"Ì": "I",
"Í": "I",
"Î": "I",
"Ĩ": "I",
"Ī": "I",
"Ĭ": "I",
"İ": "I",
"Ï": "I",
"Ḯ": "I",
"Ỉ": "I",
"Ǐ": "I",
"Ȉ": "I",
"Ȋ": "I",
"Ị": "I",
"Į": "I",
"Ḭ": "I",
"Ɨ": "I",
"Ⓙ": "J",
"J": "J",
"Ĵ": "J",
"Ɉ": "J",
"Ⓚ": "K",
"K": "K",
"Ḱ": "K",
"Ǩ": "K",
"Ḳ": "K",
"Ķ": "K",
"Ḵ": "K",
"Ƙ": "K",
"Ⱪ": "K",
"Ꝁ": "K",
"Ꝃ": "K",
"Ꝅ": "K",
"Ꞣ": "K",
"Ⓛ": "L",
"L": "L",
"Ŀ": "L",
"Ĺ": "L",
"Ľ": "L",
"Ḷ": "L",
"Ḹ": "L",
"Ļ": "L",
"Ḽ": "L",
"Ḻ": "L",
"Ł": "L",
"Ƚ": "L",
"Ɫ": "L",
"Ⱡ": "L",
"Ꝉ": "L",
"Ꝇ": "L",
"Ꞁ": "L",
"LJ": "LJ",
"Lj": "Lj",
"Ⓜ": "M",
"M": "M",
"Ḿ": "M",
"Ṁ": "M",
"Ṃ": "M",
"Ɱ": "M",
"Ɯ": "M",
"Ⓝ": "N",
"N": "N",
"Ǹ": "N",
"Ń": "N",
"Ñ": "N",
"Ṅ": "N",
"Ň": "N",
"Ṇ": "N",
"Ņ": "N",
"Ṋ": "N",
"Ṉ": "N",
"Ƞ": "N",
"Ɲ": "N",
"Ꞑ": "N",
"Ꞥ": "N",
"NJ": "NJ",
"Nj": "Nj",
"Ⓞ": "O",
"O": "O",
"Ò": "O",
"Ó": "O",
"Ô": "O",
"Ồ": "O",
"Ố": "O",
"Ỗ": "O",
"Ổ": "O",
"Õ": "O",
"Ṍ": "O",
"Ȭ": "O",
"Ṏ": "O",
"Ō": "O",
"Ṑ": "O",
"Ṓ": "O",
"Ŏ": "O",
"Ȯ": "O",
"Ȱ": "O",
"Ö": "O",
"Ȫ": "O",
"Ỏ": "O",
"Ő": "O",
"Ǒ": "O",
"Ȍ": "O",
"Ȏ": "O",
"Ơ": "O",
"Ờ": "O",
"Ớ": "O",
"Ỡ": "O",
"Ở": "O",
"Ợ": "O",
"Ọ": "O",
"Ộ": "O",
"Ǫ": "O",
"Ǭ": "O",
"Ø": "O",
"Ǿ": "O",
"Ɔ": "O",
"Ɵ": "O",
"Ꝋ": "O",
"Ꝍ": "O",
"Œ": "OE",
"Ƣ": "OI",
"Ꝏ": "OO",
"Ȣ": "OU",
"Ⓟ": "P",
"P": "P",
"Ṕ": "P",
"Ṗ": "P",
"Ƥ": "P",
"Ᵽ": "P",
"Ꝑ": "P",
"Ꝓ": "P",
"Ꝕ": "P",
"Ⓠ": "Q",
"Q": "Q",
"Ꝗ": "Q",
"Ꝙ": "Q",
"Ɋ": "Q",
"Ⓡ": "R",
"R": "R",
"Ŕ": "R",
"Ṙ": "R",
"Ř": "R",
"Ȑ": "R",
"Ȓ": "R",
"Ṛ": "R",
"Ṝ": "R",
"Ŗ": "R",
"Ṟ": "R",
"Ɍ": "R",
"Ɽ": "R",
"Ꝛ": "R",
"Ꞧ": "R",
"Ꞃ": "R",
"Ⓢ": "S",
"S": "S",
"ẞ": "S",
"Ś": "S",
"Ṥ": "S",
"Ŝ": "S",
"Ṡ": "S",
"Š": "S",
"Ṧ": "S",
"Ṣ": "S",
"Ṩ": "S",
"Ș": "S",
"Ş": "S",
"Ȿ": "S",
"Ꞩ": "S",
"Ꞅ": "S",
"Ⓣ": "T",
"T": "T",
"Ṫ": "T",
"Ť": "T",
"Ṭ": "T",
"Ț": "T",
"Ţ": "T",
"Ṱ": "T",
"Ṯ": "T",
"Ŧ": "T",
"Ƭ": "T",
"Ʈ": "T",
"Ⱦ": "T",
"Ꞇ": "T",
"Ꜩ": "TZ",
"Ⓤ": "U",
"U": "U",
"Ù": "U",
"Ú": "U",
"Û": "U",
"Ũ": "U",
"Ṹ": "U",
"Ū": "U",
"Ṻ": "U",
"Ŭ": "U",
"Ü": "U",
"Ǜ": "U",
"Ǘ": "U",
"Ǖ": "U",
"Ǚ": "U",
"Ủ": "U",
"Ů": "U",
"Ű": "U",
"Ǔ": "U",
"Ȕ": "U",
"Ȗ": "U",
"Ư": "U",
"Ừ": "U",
"Ứ": "U",
"Ữ": "U",
"Ử": "U",
"Ự": "U",
"Ụ": "U",
"Ṳ": "U",
"Ų": "U",
"Ṷ": "U",
"Ṵ": "U",
"Ʉ": "U",
"Ⓥ": "V",
"V": "V",
"Ṽ": "V",
"Ṿ": "V",
"Ʋ": "V",
"Ꝟ": "V",
"Ʌ": "V",
"Ꝡ": "VY",
"Ⓦ": "W",
"W": "W",
"Ẁ": "W",
"Ẃ": "W",
"Ŵ": "W",
"Ẇ": "W",
"Ẅ": "W",
"Ẉ": "W",
"Ⱳ": "W",
"Ⓧ": "X",
"X": "X",
"Ẋ": "X",
"Ẍ": "X",
"Ⓨ": "Y",
"Y": "Y",
"Ỳ": "Y",
"Ý": "Y",
"Ŷ": "Y",
"Ỹ": "Y",
"Ȳ": "Y",
"Ẏ": "Y",
"Ÿ": "Y",
"Ỷ": "Y",
"Ỵ": "Y",
"Ƴ": "Y",
"Ɏ": "Y",
"Ỿ": "Y",
"Ⓩ": "Z",
"Z": "Z",
"Ź": "Z",
"Ẑ": "Z",
"Ż": "Z",
"Ž": "Z",
"Ẓ": "Z",
"Ẕ": "Z",
"Ƶ": "Z",
"Ȥ": "Z",
"Ɀ": "Z",
"Ⱬ": "Z",
"Ꝣ": "Z",
"ⓐ": "a",
"a": "a",
"ẚ": "a",
"à": "a",
"á": "a",
"â": "a",
"ầ": "a",
"ấ": "a",
"ẫ": "a",
"ẩ": "a",
"ã": "a",
"ā": "a",
"ă": "a",
"ằ": "a",
"ắ": "a",
"ẵ": "a",
"ẳ": "a",
"ȧ": "a",
"ǡ": "a",
"ä": "a",
"ǟ": "a",
"ả": "a",
"å": "a",
"ǻ": "a",
"ǎ": "a",
"ȁ": "a",
"ȃ": "a",
"ạ": "a",
"ậ": "a",
"ặ": "a",
"ḁ": "a",
"ą": "a",
"ⱥ": "a",
"ɐ": "a",
"ꜳ": "aa",
"æ": "ae",
"ǽ": "ae",
"ǣ": "ae",
"ꜵ": "ao",
"ꜷ": "au",
"ꜹ": "av",
"ꜻ": "av",
"ꜽ": "ay",
"ⓑ": "b",
"b": "b",
"ḃ": "b",
"ḅ": "b",
"ḇ": "b",
"ƀ": "b",
"ƃ": "b",
"ɓ": "b",
"ⓒ": "c",
"c": "c",
"ć": "c",
"ĉ": "c",
"ċ": "c",
"č": "c",
"ç": "c",
"ḉ": "c",
"ƈ": "c",
"ȼ": "c",
"ꜿ": "c",
"ↄ": "c",
"ⓓ": "d",
"d": "d",
"ḋ": "d",
"ď": "d",
"ḍ": "d",
"ḑ": "d",
"ḓ": "d",
"ḏ": "d",
"đ": "d",
"ƌ": "d",
"ɖ": "d",
"ɗ": "d",
"ꝺ": "d",
"dz": "dz",
"dž": "dz",
"ⓔ": "e",
"e": "e",
"è": "e",
"é": "e",
"ê": "e",
"ề": "e",
"ế": "e",
"ễ": "e",
"ể": "e",
"ẽ": "e",
"ē": "e",
"ḕ": "e",
"ḗ": "e",
"ĕ": "e",
"ė": "e",
"ë": "e",
"ẻ": "e",
"ě": "e",
"ȅ": "e",
"ȇ": "e",
"ẹ": "e",
"ệ": "e",
"ȩ": "e",
"ḝ": "e",
"ę": "e",
"ḙ": "e",
"ḛ": "e",
"ɇ": "e",
"ɛ": "e",
"ǝ": "e",
"ⓕ": "f",
"f": "f",
"ḟ": "f",
"ƒ": "f",
"ꝼ": "f",
"ⓖ": "g",
"g": "g",
"ǵ": "g",
"ĝ": "g",
"ḡ": "g",
"ğ": "g",
"ġ": "g",
"ǧ": "g",
"ģ": "g",
"ǥ": "g",
"ɠ": "g",
"ꞡ": "g",
"ᵹ": "g",
"ꝿ": "g",
"ⓗ": "h",
"h": "h",
"ĥ": "h",
"ḣ": "h",
"ḧ": "h",
"ȟ": "h",
"ḥ": "h",
"ḩ": "h",
"ḫ": "h",
"ẖ": "h",
"ħ": "h",
"ⱨ": "h",
"ⱶ": "h",
"ɥ": "h",
"ƕ": "hv",
"ⓘ": "i",
"i": "i",
"ì": "i",
"í": "i",
"î": "i",
"ĩ": "i",
"ī": "i",
"ĭ": "i",
"ï": "i",
"ḯ": "i",
"ỉ": "i",
"ǐ": "i",
"ȉ": "i",
"ȋ": "i",
"ị": "i",
"į": "i",
"ḭ": "i",
"ɨ": "i",
"ı": "i",
"ⓙ": "j",
"j": "j",
"ĵ": "j",
"ǰ": "j",
"ɉ": "j",
"ⓚ": "k",
"k": "k",
"ḱ": "k",
"ǩ": "k",
"ḳ": "k",
"ķ": "k",
"ḵ": "k",
"ƙ": "k",
"ⱪ": "k",
"ꝁ": "k",
"ꝃ": "k",
"ꝅ": "k",
"ꞣ": "k",
"ⓛ": "l",
"l": "l",
"ŀ": "l",
"ĺ": "l",
"ľ": "l",
"ḷ": "l",
"ḹ": "l",
"ļ": "l",
"ḽ": "l",
"ḻ": "l",
"ſ": "l",
"ł": "l",
"ƚ": "l",
"ɫ": "l",
"ⱡ": "l",
"ꝉ": "l",
"ꞁ": "l",
"ꝇ": "l",
"lj": "lj",
"ⓜ": "m",
"m": "m",
"ḿ": "m",
"ṁ": "m",
"ṃ": "m",
"ɱ": "m",
"ɯ": "m",
"ⓝ": "n",
"n": "n",
"ǹ": "n",
"ń": "n",
"ñ": "n",
"ṅ": "n",
"ň": "n",
"ṇ": "n",
"ņ": "n",
"ṋ": "n",
"ṉ": "n",
"ƞ": "n",
"ɲ": "n",
"ʼn": "n",
"ꞑ": "n",
"ꞥ": "n",
"nj": "nj",
"ⓞ": "o",
"o": "o",
"ò": "o",
"ó": "o",
"ô": "o",
"ồ": "o",
"ố": "o",
"ỗ": "o",
"ổ": "o",
"õ": "o",
"ṍ": "o",
"ȭ": "o",
"ṏ": "o",
"ō": "o",
"ṑ": "o",
"ṓ": "o",
"ŏ": "o",
"ȯ": "o",
"ȱ": "o",
"ö": "o",
"ȫ": "o",
"ỏ": "o",
"ő": "o",
"ǒ": "o",
"ȍ": "o",
"ȏ": "o",
"ơ": "o",
"ờ": "o",
"ớ": "o",
"ỡ": "o",
"ở": "o",
"ợ": "o",
"ọ": "o",
"ộ": "o",
"ǫ": "o",
"ǭ": "o",
"ø": "o",
"ǿ": "o",
"ɔ": "o",
"ꝋ": "o",
"ꝍ": "o",
"ɵ": "o",
"œ": "oe",
"ƣ": "oi",
"ȣ": "ou",
"ꝏ": "oo",
"ⓟ": "p",
"p": "p",
"ṕ": "p",
"ṗ": "p",
"ƥ": "p",
"ᵽ": "p",
"ꝑ": "p",
"ꝓ": "p",
"ꝕ": "p",
"ⓠ": "q",
"q": "q",
"ɋ": "q",
"ꝗ": "q",
"ꝙ": "q",
"ⓡ": "r",
"r": "r",
"ŕ": "r",
"ṙ": "r",
"ř": "r",
"ȑ": "r",
"ȓ": "r",
"ṛ": "r",
"ṝ": "r",
"ŗ": "r",
"ṟ": "r",
"ɍ": "r",
"ɽ": "r",
"ꝛ": "r",
"ꞧ": "r",
"ꞃ": "r",
"ⓢ": "s",
"s": "s",
"ß": "s",
"ś": "s",
"ṥ": "s",
"ŝ": "s",
"ṡ": "s",
"š": "s",
"ṧ": "s",
"ṣ": "s",
"ṩ": "s",
"ș": "s",
"ş": "s",
"ȿ": "s",
"ꞩ": "s",
"ꞅ": "s",
"ẛ": "s",
"ⓣ": "t",
"t": "t",
"ṫ": "t",
"ẗ": "t",
"ť": "t",
"ṭ": "t",
"ț": "t",
"ţ": "t",
"ṱ": "t",
"ṯ": "t",
"ŧ": "t",
"ƭ": "t",
"ʈ": "t",
"ⱦ": "t",
"ꞇ": "t",
"ꜩ": "tz",
"ⓤ": "u",
"u": "u",
"ù": "u",
"ú": "u",
"û": "u",
"ũ": "u",
"ṹ": "u",
"ū": "u",
"ṻ": "u",
"ŭ": "u",
"ü": "u",
"ǜ": "u",
"ǘ": "u",
"ǖ": "u",
"ǚ": "u",
"ủ": "u",
"ů": "u",
"ű": "u",
"ǔ": "u",
"ȕ": "u",
"ȗ": "u",
"ư": "u",
"ừ": "u",
"ứ": "u",
"ữ": "u",
"ử": "u",
"ự": "u",
"ụ": "u",
"ṳ": "u",
"ų": "u",
"ṷ": "u",
"ṵ": "u",
"ʉ": "u",
"ⓥ": "v",
"v": "v",
"ṽ": "v",
"ṿ": "v",
"ʋ": "v",
"ꝟ": "v",
"ʌ": "v",
"ꝡ": "vy",
"ⓦ": "w",
"w": "w",
"ẁ": "w",
"ẃ": "w",
"ŵ": "w",
"ẇ": "w",
"ẅ": "w",
"ẘ": "w",
"ẉ": "w",
"ⱳ": "w",
"ⓧ": "x",
"x": "x",
"ẋ": "x",
"ẍ": "x",
"ⓨ": "y",
"y": "y",
"ỳ": "y",
"ý": "y",
"ŷ": "y",
"ỹ": "y",
"ȳ": "y",
"ẏ": "y",
"ÿ": "y",
"ỷ": "y",
"ẙ": "y",
"ỵ": "y",
"ƴ": "y",
"ɏ": "y",
"ỿ": "y",
"ⓩ": "z",
"z": "z",
"ź": "z",
"ẑ": "z",
"ż": "z",
"ž": "z",
"ẓ": "z",
"ẕ": "z",
"ƶ": "z",
"ȥ": "z",
"ɀ": "z",
"ⱬ": "z",
"ꝣ": "z",
"Ά": "Α",
"Έ": "Ε",
"Ή": "Η",
"Ί": "Ι",
"Ϊ": "Ι",
"Ό": "Ο",
"Ύ": "Υ",
"Ϋ": "Υ",
"Ώ": "Ω",
"ά": "α",
"έ": "ε",
"ή": "η",
"ί": "ι",
"ϊ": "ι",
"ΐ": "ι",
"ό": "ο",
"ύ": "υ",
"ϋ": "υ",
"ΰ": "υ",
"ώ": "ω",
"ς": "σ",
"’": "'"
}
}), t.define("select2RS/data/base", ["../utils"], function(e) {
function t(e, i) {
t.__super__.constructor.call(this)
}
return e.Extend(t, e.Observable), t.prototype.current = function(e) {
throw new Error("The `current` method must be defined in child classes.")
}, t.prototype.query = function(e, t) {
throw new Error("The `query` method must be defined in child classes.")
}, t.prototype.bind = function(e, t) {}, t.prototype.destroy = function() {}, t.prototype.generateResultId = function(t, i) {
var r = t.id + "-result-";
return r += e.generateChars(4), null != i.id ? r += "-" + i.id.toString() : r += "-" + e.generateChars(4), r
}, t
}), t.define("select2RS/data/select", ["./base", "../utils", "jquery"], function(e, t, i) {
function r(e, t) {
this.$element = e, this.options = t, r.__super__.constructor.call(this)
}
return t.Extend(r, e), r.prototype.current = function(e) {
var t = [],
r = this;
this.$element.find(":selected").each(function() {
var e = i(this),
a = r.item(e);
t.push(a)
}), e(t)
}, r.prototype.select = function(e) {
var t = this;
if (e.selected = !0, i(e.element).is("option")) return e.element.selected = !0, void this.$element.trigger("change");
if (this.$element.prop("multiple")) this.current(function(r) {
var a = [];
(e = [e]).push.apply(e, r);
for (var o = 0; o < e.length; o++) {
var n = e[o].id; - 1 === i.inArray(n, a) && a.push(n)
}
t.$element.val(a), t.$element.trigger("change")
});
else {
var r = e.id;
this.$element.val(r), this.$element.trigger("change")
}
}, r.prototype.unselect = function(e) {
var t = this;
if (this.$element.prop("multiple")) {
if (e.selected = !1, i(e.element).is("option")) return e.element.selected = !1, void this.$element.trigger("change");
this.current(function(r) {
for (var a = [], o = 0; o < r.length; o++) {
var n = r[o].id;
n !== e.id && -1 === i.inArray(n, a) && a.push(n)
}
t.$element.val(a), t.$element.trigger("change")
})
}
}, r.prototype.bind = function(e, t) {
var i = this;
this.container = e, e.on("select", function(e) {
i.select(e.data)
}), e.on("unselect", function(e) {
i.unselect(e.data)
})
}, r.prototype.destroy = function() {
this.$element.find("*").each(function() {
t.RemoveData(this)
})
}, r.prototype.query = function(e, t) {
var r = [],
a = this;
this.$element.children().each(function() {
var t = i(this);
if (t.is("option") || t.is("optgroup")) {
var o = a.item(t),
n = a.matches(e, o);
null !== n && r.push(n)
}
}), t({
results: r
})
}, r.prototype.addOptions = function(e) {
t.appendMany(this.$element, e)
}, r.prototype.option = function(e) {
var r;
e.children ? (r = document.createElement("optgroup")).label = e.text : void 0 !== (r = document.createElement("option")).textContent ? r.textContent = e.text : r.innerText = e.text, void 0 !== e.id && (r.value = e.id), e.disabled && (r.disabled = !0), e.selected && (r.selected = !0), e.title && (r.title = e.title);
var a = i(r),
o = this._normalizeItem(e);
return o.element = r, t.StoreData(r, "data", o), a
}, r.prototype.item = function(e) {
var r = {};
if (null != (r = t.GetData(e[0], "data"))) return r;
if (e.is("option")) r = {
id: e.val(),
text: e.text(),
disabled: e.prop("disabled"),
selected: e.prop("selected"),
title: e.prop("title")
};
else if (e.is("optgroup")) {
r = {
text: e.prop("label"),
children: [],
title: e.prop("title")
};
for (var a = e.children("option"), o = [], n = 0; n < a.length; n++) {
var s = i(a[n]),
l = this.item(s);
o.push(l)
}
r.children = o
}
return (r = this._normalizeItem(r)).element = e[0], t.StoreData(e[0], "data", r), r
}, r.prototype._normalizeItem = function(e) {
e !== Object(e) && (e = {
id: e,
text: e
});
return null != (e = i.extend({}, {
text: ""
}, e)).id && (e.id = e.id.toString()), null != e.text && (e.text = e.text.toString()), null == e._resultId && e.id && null != this.container && (e._resultId = this.generateResultId(this.container, e)), i.extend({}, {
selected: !1,
disabled: !1
}, e)
}, r.prototype.matches = function(e, t) {
return this.options.get("matcher")(e, t)
}, r
}), t.define("select2RS/data/array", ["./select", "../utils", "jquery"], function(e, t, i) {
function r(e, t) {
this._dataToConvert = t.get("data") || [], r.__super__.constructor.call(this, e, t)
}
return t.Extend(r, e), r.prototype.bind = function(e, t) {
r.__super__.bind.call(this, e, t), this.addOptions(this.convertToOptions(this._dataToConvert))
}, r.prototype.select = function(e) {
var t = this.$element.find("option").filter(function(t, i) {
return i.value == e.id.toString()
});
0 === t.length && (t = this.option(e), this.addOptions(t)), r.__super__.select.call(this, e)
}, r.prototype.convertToOptions = function(e) {
var r = this,
a = this.$element.find("option"),
o = a.map(function() {
return r.item(i(this)).id
}).get(),
n = [];
function s(e) {
return function() {
return i(this).val() == e.id
}
}
for (var l = 0; l < e.length; l++) {
var c = this._normalizeItem(e[l]);
if (i.inArray(c.id, o) >= 0) {
var d = a.filter(s(c)),
p = this.item(d),
u = i.extend(!0, {}, c, p),
v = this.option(u);
d.replaceWith(v)
} else {
var h = this.option(c);
if (c.children) {
var g = this.convertToOptions(c.children);
t.appendMany(h, g)
}
n.push(h)
}
}
return n
}, r
}), t.define("select2RS/data/ajax", ["./array", "../utils", "jquery"], function(e, t, i) {
function r(e, t) {
this.ajaxOptions = this._applyDefaults(t.get("ajax")), null != this.ajaxOptions.processResults && (this.processResults = this.ajaxOptions.processResults), r.__super__.constructor.call(this, e, t)
}
return t.Extend(r, e), r.prototype._applyDefaults = function(e) {
var t = {
data: function(e) {
return i.extend({}, e, {
q: e.term
})
},
transport: function(e, t, r) {
var a = i.ajax(e);
return a.then(t), a.fail(r), a
}
};
return i.extend({}, t, e, !0)
}, r.prototype.processResults = function(e) {
return e
}, r.prototype.query = function(e, t) {
var r = this;
null != this._request && (i.isFunction(this._request.abort) && this._request.abort(), this._request = null);
var a = i.extend({
type: "GET"
}, this.ajaxOptions);
function o() {
var o = a.transport(a, function(a) {
var o = r.processResults(a, e);
r.options.get("debug") && window.console && console.error && (o && o.results && i.isArray(o.results) || console.error("Select2: The AJAX results did not return an array in the `results` key of the response.")), t(o)
}, function() {
"status" in o && (0 === o.status || "0" === o.status) || r.trigger("results:message", {
message: "errorLoading"
})
});
r._request = o
}
"function" == typeof a.url && (a.url = a.url.call(this.$element, e)), "function" == typeof a.data && (a.data = a.data.call(this.$element, e)), this.ajaxOptions.delay && null != e.term ? (this._queryTimeout && window.clearTimeout(this._queryTimeout), this._queryTimeout = window.setTimeout(o, this.ajaxOptions.delay)) : o()
}, r
}), t.define("select2RS/data/tags", ["jquery"], function(e) {
function t(t, i, r) {
var a = r.get("tags"),
o = r.get("createTag");
void 0 !== o && (this.createTag = o);
var n = r.get("insertTag");
if (void 0 !== n && (this.insertTag = n), t.call(this, i, r), e.isArray(a))
for (var s = 0; s < a.length; s++) {
var l = a[s],
c = this._normalizeItem(l),
d = this.option(c);
this.$element.append(d)
}
}
return t.prototype.query = function(e, t, i) {
var r = this;
this._removeOldTags(), null != t.term && null == t.page ? e.call(this, t, function e(a, o) {
for (var n = a.results, s = 0; s < n.length; s++) {
var l = n[s],
c = null != l.children && !e({
results: l.children
}, !0);
if ((l.text || "").toUpperCase() === (t.term || "").toUpperCase() || c) return !o && (a.data = n, void i(a))
}
if (o) return !0;
var d = r.createTag(t);
if (null != d) {
var p = r.option(d);
p.attr("data-select2RS-tag", !0), r.addOptions([p]), r.insertTag(n, d)
}
a.results = n, i(a)
}) : e.call(this, t, i)
}, t.prototype.createTag = function(t, i) {
var r = e.trim(i.term);
return "" === r ? null : {
id: r,
text: r
}
}, t.prototype.insertTag = function(e, t, i) {
t.unshift(i)
}, t.prototype._removeOldTags = function(t) {
this.$element.find("option[data-select2RS-tag]").each(function() {
this.selected || e(this).remove()
})
}, t
}), t.define("select2RS/data/tokenizer", ["jquery"], function(e) {
function t(e, t, i) {
var r = i.get("tokenizer");
void 0 !== r && (this.tokenizer = r), e.call(this, t, i)
}
return t.prototype.bind = function(e, t, i) {
e.call(this, t, i), this.$search = t.dropdown.$search || t.selection.$search || i.find(".select2RS-search__field")
}, t.prototype.query = function(t, i, r) {
var a = this;
i.term = i.term || "";
var o = this.tokenizer(i, this.options, function(t) {
var i = a._normalizeItem(t);
if (!a.$element.find("option").filter(function() {
return e(this).val() === i.id
}).length) {
var r = a.option(i);
r.attr("data-select2RS-tag", !0), a._removeOldTags(), a.addOptions([r])
}! function(e) {
a.trigger("select", {
data: e
})
}(i)
});
o.term !== i.term && (this.$search.length && (this.$search.val(o.term), this.$search.trigger("focus")), i.term = o.term), t.call(this, i, r)
}, t.prototype.tokenizer = function(t, i, r, a) {
for (var o = r.get("tokenSeparators") || [], n = i.term, s = 0, l = this.createTag || function(e) {
return {
id: e.term,
text: e.term
}
}; s < n.length;) {
var c = n[s];
if (-1 !== e.inArray(c, o)) {
var d = n.substr(0, s),
p = l(e.extend({}, i, {
term: d
}));
null != p ? (a(p), n = n.substr(s + 1) || "", s = 0) : s++
} else s++
}
return {
term: n
}
}, t
}), t.define("select2RS/data/minimumInputLength", [], function() {
function e(e, t, i) {
this.minimumInputLength = i.get("minimumInputLength"), e.call(this, t, i)
}
return e.prototype.query = function(e, t, i) {
t.term = t.term || "", t.term.length < this.minimumInputLength ? this.trigger("results:message", {
message: "inputTooShort",
args: {
minimum: this.minimumInputLength,
input: t.term,
params: t
}
}) : e.call(this, t, i)
}, e
}), t.define("select2RS/data/maximumInputLength", [], function() {
function e(e, t, i) {
this.maximumInputLength = i.get("maximumInputLength"), e.call(this, t, i)
}
return e.prototype.query = function(e, t, i) {
t.term = t.term || "", this.maximumInputLength > 0 && t.term.length > this.maximumInputLength ? this.trigger("results:message", {
message: "inputTooLong",
args: {
maximum: this.maximumInputLength,
input: t.term,
params: t
}
}) : e.call(this, t, i)
}, e
}), t.define("select2RS/data/maximumSelectionLength", [], function() {
function e(e, t, i) {
this.maximumSelectionLength = i.get("maximumSelectionLength"), e.call(this, t, i)
}
return e.prototype.bind = function(e, t, i) {
var r = this;
e.call(this, t, i), t.on("select", function() {
r._checkIfMaximumSelected()
})
}, e.prototype.query = function(e, t, i) {
var r = this;
this._checkIfMaximumSelected(function() {
e.call(r, t, i)
})
}, e.prototype._checkIfMaximumSelected = function(e, t) {
var i = this;
this.current(function(e) {
var r = null != e ? e.length : 0;
i.maximumSelectionLength > 0 && r >= i.maximumSelectionLength ? i.trigger("results:message", {
message: "maximumSelected",
args: {
maximum: i.maximumSelectionLength
}
}) : t && t()
})
}, e
}), t.define("select2RS/dropdown", ["jquery", "./utils"], function(e, t) {
function i(e, t) {
this.$element = e, this.options = t, i.__super__.constructor.call(this)
}
return t.Extend(i, t.Observable), i.prototype.render = function() {
var t = e('
');
return t.attr("dir", this.options.get("dir")), this.$dropdown = t, t
}, i.prototype.bind = function() {}, i.prototype.position = function(e, t) {}, i.prototype.destroy = function() {
this.$dropdown.remove()
}, i
}), t.define("select2RS/dropdown/search", ["jquery", "../utils"], function(e, t) {
function i() {}
return i.prototype.render = function(t) {
var i = t.call(this),
r = e('
');
return this.$searchContainer = r, this.$search = r.find("input"), i.prepend(r), i
}, i.prototype.bind = function(t, i, r) {
var a = this,
o = i.id + "-results";
t.call(this, i, r), this.$search.on("keydown", function(e) {
a.trigger("keypress", e), a._keyUpPrevented = e.isDefaultPrevented()
}), this.$search.on("input", function(t) {
e(this).off("keyup")
}), this.$search.on("keyup input", function(e) {
a.handleSearch(e)
}), i.on("open", function() {
a.$search.attr("tabindex", 0), a.$search.attr("aria-controls", o), a.$search.trigger("focus"), window.setTimeout(function() {
a.$search.trigger("focus")
}, 0)
}), i.on("close", function() {
a.$search.attr("tabindex", -1), a.$search.removeAttr("aria-controls"), a.$search.removeAttr("aria-activedescendant"), a.$search.val(""), a.$search.trigger("blur")
}), i.on("focus", function() {
i.isOpen() || a.$search.trigger("focus")
}), i.on("results:all", function(e) {
null != e.query.term && "" !== e.query.term || (a.showSearch(e) ? a.$searchContainer.removeClass("select2RS-search--hide") : a.$searchContainer.addClass("select2RS-search--hide"))
}), i.on("results:focus", function(e) {
e.data._resultId ? a.$search.attr("aria-activedescendant", e.data._resultId) : a.$search.removeAttr("aria-activedescendant")
})
}, i.prototype.handleSearch = function(e) {
if (!this._keyUpPrevented) {
var t = this.$search.val();
this.trigger("query", {
term: t
})
}
this._keyUpPrevented = !1
}, i.prototype.showSearch = function(e, t) {
return !0
}, i
}), t.define("select2RS/dropdown/hidePlaceholder", [], function() {
function e(e, t, i, r) {
this.placeholder = this.normalizePlaceholder(i.get("placeholder")), e.call(this, t, i, r)
}
return e.prototype.append = function(e, t) {
t.results = this.removePlaceholder(t.results), e.call(this, t)
}, e.prototype.normalizePlaceholder = function(e, t) {
return "string" == typeof t && (t = {
id: "",
text: t
}), t
}, e.prototype.removePlaceholder = function(e, t) {
for (var i = t.slice(0), r = t.length - 1; r >= 0; r--) {
var a = t[r];
this.placeholder.id === a.id && i.splice(r, 1)
}
return i
}, e
}), t.define("select2RS/dropdown/infiniteScroll", ["jquery"], function(e) {
function t(e, t, i, r) {
this.lastParams = {}, e.call(this, t, i, r), this.$loadingMore = this.createLoadingMore(), this.loading = !1
}
return t.prototype.append = function(e, t) {
this.$loadingMore.remove(), this.loading = !1, e.call(this, t), this.showLoadingMore(t) && (this.$results.append(this.$loadingMore), this.loadMoreIfNeeded())
}, t.prototype.bind = function(e, t, i) {
var r = this;
e.call(this, t, i), t.on("query", function(e) {
r.lastParams = e, r.loading = !0
}), t.on("query:append", function(e) {
r.lastParams = e, r.loading = !0
}), this.$results.on("scroll", this.loadMoreIfNeeded.bind(this))
}, t.prototype.loadMoreIfNeeded = function() {
var t = e.contains(document.documentElement, this.$loadingMore[0]);
!this.loading && t && (this.$results.offset().top + this.$results.outerHeight(!1) + 50 >= this.$loadingMore.offset().top + this.$loadingMore.outerHeight(!1) && this.loadMore())
}, t.prototype.loadMore = function() {
this.loading = !0;
var t = e.extend({}, {
page: 1
}, this.lastParams);
t.page++, this.trigger("query:append", t)
}, t.prototype.showLoadingMore = function(e, t) {
return t.pagination && t.pagination.more
}, t.prototype.createLoadingMore = function() {
var t = e('
'),
i = this.options.get("translations").get("loadingMore");
return t.html(i(this.lastParams)), t
}, t
}), t.define("select2RS/dropdown/attachBody", ["jquery", "../utils"], function(e, t) {
function i(t, i, r) {
this.$dropdownParent = e(r.get("dropdownParent") || document.body), t.call(this, i, r)
}
return i.prototype.bind = function(e, t, i) {
var r = this;
e.call(this, t, i), t.on("open", function() {
r._showDropdown(), r._attachPositioningHandler(t), r._bindContainerResultHandlers(t)
}), t.on("close", function() {
r._hideDropdown(), r._detachPositioningHandler(t)
}), this.$dropdownContainer.on("mousedown", function(e) {
e.stopPropagation()
})
}, i.prototype.destroy = function(e) {
e.call(this), this.$dropdownContainer.remove()
}, i.prototype.position = function(e, t, i) {
t.attr("class", i.attr("class")), t.removeClass("select2RS"), t.addClass("select2RS-container--open"), t.css({
position: "absolute",
top: -999999
}), this.$container = i
}, i.prototype.render = function(t) {
var i = e("
"),
r = t.call(this);
return i.append(r), this.$dropdownContainer = i, i
}, i.prototype._hideDropdown = function(e) {
this.$dropdownContainer.detach()
}, i.prototype._bindContainerResultHandlers = function(e, t) {
if (!this._containerResultsHandlersBound) {
var i = this;
t.on("results:all", function() {
i._positionDropdown(), i._resizeDropdown()
}), t.on("results:append", function() {
i._positionDropdown(), i._resizeDropdown()
}), t.on("results:message", function() {
i._positionDropdown(), i._resizeDropdown()
}), t.on("select", function() {
i._positionDropdown(), i._resizeDropdown()
}), t.on("unselect", function() {
i._positionDropdown(), i._resizeDropdown()
}), this._containerResultsHandlersBound = !0
}
}, i.prototype._attachPositioningHandler = function(i, r) {
var a = this,
o = "scroll.select2RS." + r.id,
n = "resize.select2RS." + r.id,
s = "orientationchange.select2RS." + r.id,
l = this.$container.parents().filter(t.hasScroll);
l.each(function() {
t.StoreData(this, "select2RS-scroll-position", {
x: e(this).scrollLeft(),
y: e(this).scrollTop()
})
}), l.on(o, function(e) {}), e(window).on(o + " " + n + " " + s, function(e) {
a._positionDropdown(), a._resizeDropdown()
})
}, i.prototype._detachPositioningHandler = function(i, r) {
var a = "scroll.select2RS." + r.id,
o = "resize.select2RS." + r.id,
n = "orientationchange.select2RS." + r.id;
this.$container.parents().filter(t.hasScroll).off(a), e(window).off(a + " " + o + " " + n)
}, i.prototype._positionDropdown = function() {
var t = e(window),
i = this.$dropdown.hasClass("select2RS-dropdown--above"),
r = this.$dropdown.hasClass("select2RS-dropdown--below"),
a = null,
o = this.$container.offset();
o.bottom = o.top + this.$container.outerHeight(!1);
var n = {
height: this.$container.outerHeight(!1)
};
n.top = o.top, n.bottom = o.top + n.height;
var s = this.$dropdown.outerHeight(!1),
l = t.scrollTop(),
c = t.scrollTop() + t.height(),
d = l < o.top - s,
p = c > o.bottom + s,
u = {
left: o.left,
top: n.bottom
},
v = this.$dropdownParent;
"static" === v.css("position") && (v = v.offsetParent());
var h = {
top: 0,
left: 0
};
(e.contains(document.body, v[0]) || v[0].isConnected) && (h = v.offset()), u.top -= h.top, u.left -= h.left, i || r || (a = "below"), p || !d || i ? !d && p && i && (a = "below") : a = "above", ("above" == a || i && "below" !== a) && (u.top = n.top - h.top - s), null != a && (this.$dropdown.removeClass("select2RS-dropdown--below select2RS-dropdown--above").addClass("select2RS-dropdown--" + a), this.$container.removeClass("select2RS-container--below select2RS-container--above").addClass("select2RS-container--" + a)), this.$dropdownContainer.css(u)
}, i.prototype._resizeDropdown = function() {
var e = {
width: this.$container.outerWidth(!1) + "px"
};
this.options.get("dropdownAutoWidth") && (e.minWidth = e.width, e.position = "relative", e.width = "auto"), this.$dropdown.css(e)
}, i.prototype._showDropdown = function(e) {
this.$dropdownContainer.appendTo(this.$dropdownParent), this._positionDropdown(), this._resizeDropdown()
}, i
}), t.define("select2RS/dropdown/minimumResultsForSearch", [], function() {
function e(e, t, i, r) {
this.minimumResultsForSearch = i.get("minimumResultsForSearch"), this.minimumResultsForSearch < 0 && (this.minimumResultsForSearch = 1 / 0), e.call(this, t, i, r)
}
return e.prototype.showSearch = function(e, t) {
return !(function e(t) {
for (var i = 0, r = 0; r < t.length; r++) {
var a = t[r];
a.children ? i += e(a.children) : i++
}
return i
}(t.data.results) < this.minimumResultsForSearch) && e.call(this, t)
}, e
}), t.define("select2RS/dropdown/selectOnClose", ["../utils"], function(e) {
function t() {}
return t.prototype.bind = function(e, t, i) {
var r = this;
e.call(this, t, i), t.on("close", function(e) {
r._handleSelectOnClose(e)
})
}, t.prototype._handleSelectOnClose = function(t, i) {
if (i && null != i.originalSelect2Event) {
var r = i.originalSelect2Event;
if ("select" === r._type || "unselect" === r._type) return
}
var a = this.getHighlightedResults();
if (!(a.length < 1)) {
var o = e.GetData(a[0], "data");
null != o.element && o.element.selected || null == o.element && o.selected || this.trigger("select", {
data: o
})
}
}, t
}), t.define("select2RS/dropdown/closeOnSelect", [], function() {
function e() {}
return e.prototype.bind = function(e, t, i) {
var r = this;
e.call(this, t, i), t.on("select", function(e) {
r._selectTriggered(e)
}), t.on("unselect", function(e) {
r._selectTriggered(e)
})
}, e.prototype._selectTriggered = function(e, t) {
var i = t.originalEvent;
i && (i.ctrlKey || i.metaKey) || this.trigger("close", {
originalEvent: i,
originalSelect2Event: t
})
}, e
}), t.define("select2RS/i18n/en", [], function() {
return {
errorLoading: function() {
return "The results could not be loaded."
},
inputTooLong: function(e) {
var t = e.input.length - e.maximum,
i = "Please delete " + t + " character";
return 1 != t && (i += "s"), i
},
inputTooShort: function(e) {
return "Please enter " + (e.minimum - e.input.length) + " or more characters"
},
loadingMore: function() {
return "Loading more results…"
},
maximumSelected: function(e) {
var t = "You can only select " + e.maximum + " item";
return 1 != e.maximum && (t += "s"), t
},
noResults: function() {
return "No results found"
},
searching: function() {
return "Searching…"
},
removeAllItems: function() {
return "Remove all items"
}
}
}), t.define("select2RS/defaults", ["jquery", "require", "./results", "./selection/single", "./selection/multiple", "./selection/placeholder", "./selection/allowClear", "./selection/search", "./selection/eventRelay", "./utils", "./translation", "./diacritics", "./data/select", "./data/array", "./data/ajax", "./data/tags", "./data/tokenizer", "./data/minimumInputLength", "./data/maximumInputLength", "./data/maximumSelectionLength", "./dropdown", "./dropdown/search", "./dropdown/hidePlaceholder", "./dropdown/infiniteScroll", "./dropdown/attachBody", "./dropdown/minimumResultsForSearch", "./dropdown/selectOnClose", "./dropdown/closeOnSelect", "./i18n/en"], function(e, t, i, r, a, o, n, s, l, c, d, p, u, v, h, g, f, m, b, S, y, R, _, V, k, O, w, B, L) {
function I() {
this.reset()
}
return I.prototype.apply = function(d) {
if (null == (d = e.extend(!0, {}, this.defaults, d)).dataAdapter) {
if (null != d.ajax ? d.dataAdapter = h : null != d.data ? d.dataAdapter = v : d.dataAdapter = u, d.minimumInputLength > 0 && (d.dataAdapter = c.Decorate(d.dataAdapter, m)), d.maximumInputLength > 0 && (d.dataAdapter = c.Decorate(d.dataAdapter, b)), d.maximumSelectionLength > 0 && (d.dataAdapter = c.Decorate(d.dataAdapter, S)), d.tags && (d.dataAdapter = c.Decorate(d.dataAdapter, g)), null == d.tokenSeparators && null == d.tokenizer || (d.dataAdapter = c.Decorate(d.dataAdapter, f)), null != d.query) {
var p = t(d.amdBase + "compat/query");
d.dataAdapter = c.Decorate(d.dataAdapter, p)
}
if (null != d.initSelection) {
var L = t(d.amdBase + "compat/initSelection");
d.dataAdapter = c.Decorate(d.dataAdapter, L)
}
}
if (null == d.resultsAdapter && (d.resultsAdapter = i, null != d.ajax && (d.resultsAdapter = c.Decorate(d.resultsAdapter, V)), null != d.placeholder && (d.resultsAdapter = c.Decorate(d.resultsAdapter, _)), d.selectOnClose && (d.resultsAdapter = c.Decorate(d.resultsAdapter, w))), null == d.dropdownAdapter) {
if (d.multiple) d.dropdownAdapter = y;
else {
var I = c.Decorate(y, R);
d.dropdownAdapter = I
}
if (0 !== d.minimumResultsForSearch && (d.dropdownAdapter = c.Decorate(d.dropdownAdapter, O)), d.closeOnSelect && (d.dropdownAdapter = c.Decorate(d.dropdownAdapter, B)), null != d.dropdownCssClass || null != d.dropdownCss || null != d.adaptDropdownCssClass) {
var x = t(d.amdBase + "compat/dropdownCss");
d.dropdownAdapter = c.Decorate(d.dropdownAdapter, x)
}
d.dropdownAdapter = c.Decorate(d.dropdownAdapter, k)
}
if (null == d.selectionAdapter) {
if (d.multiple ? d.selectionAdapter = a : d.selectionAdapter = r, null != d.placeholder && (d.selectionAdapter = c.Decorate(d.selectionAdapter, o)), d.allowClear && (d.selectionAdapter = c.Decorate(d.selectionAdapter, n)), d.multiple && (d.selectionAdapter = c.Decorate(d.selectionAdapter, s)), null != d.containerCssClass || null != d.containerCss || null != d.adaptContainerCssClass) {
var C = t(d.amdBase + "compat/containerCss");
d.selectionAdapter = c.Decorate(d.selectionAdapter, C)
}
d.selectionAdapter = c.Decorate(d.selectionAdapter, l)
}
d.language = this._resolveLanguage(d.language), d.language.push("en");
for (var A = [], j = 0; j < d.language.length; j++) {
var J = d.language[j]; - 1 === A.indexOf(J) && A.push(J)
}
return d.language = A, d.translations = this._processTranslations(d.language, d.debug), d
}, I.prototype.reset = function() {
function t(e) {
return e.replace(/[^\u0000-\u007E]/g, function(e) {
return p[e] || e
})
}
this.defaults = {
amdBase: "./",
amdLanguageBase: "./i18n/",
closeOnSelect: !0,
debug: !1,
dropdownAutoWidth: !1,
escapeMarkup: c.escapeMarkup,
language: {},
matcher: function i(r, a) {
if ("" === e.trim(r.term)) return a;
if (a.children && a.children.length > 0) {
for (var o = e.extend(!0, {}, a), n = a.children.length - 1; n >= 0; n--) null == i(r, a.children[n]) && o.children.splice(n, 1);
return o.children.length > 0 ? o : i(r, o)
}
var s = t(a.text).toUpperCase(),
l = t(r.term).toUpperCase();
return s.indexOf(l) > -1 ? a : null
},
minimumInputLength: 0,
maximumInputLength: 0,
maximumSelectionLength: 0,
minimumResultsForSearch: 0,
selectOnClose: !1,
scrollAfterSelect: !1,
sorter: function(e) {
return e
},
templateResult: function(e) {
return e.text
},
templateSelection: function(e) {
return e.text
},
theme: "default",
width: "resolve"
}
}, I.prototype.applyFromElement = function(e, t) {
var i = e.language,
r = this.defaults.language,
a = t.prop("lang"),
o = t.closest("[lang]").prop("lang"),
n = Array.prototype.concat.call(this._resolveLanguage(a), this._resolveLanguage(i), this._resolveLanguage(r), this._resolveLanguage(o));
return e.language = n, e
}, I.prototype._resolveLanguage = function(t) {
if (!t) return [];
if (e.isEmptyObject(t)) return [];
if (e.isPlainObject(t)) return [t];
var i;
i = e.isArray(t) ? t : [t];
for (var r = [], a = 0; a < i.length; a++)
if (r.push(i[a]), "string" == typeof i[a] && i[a].indexOf("-") > 0) {
var o = i[a].split("-")[0];
r.push(o)
}
return r
}, I.prototype._processTranslations = function(t, i) {
for (var r = new d, a = 0; a < t.length; a++) {
var o = new d,
n = t[a];
if ("string" == typeof n) try {
o = d.loadPath(n)
} catch (e) {
try {
n = this.defaults.amdLanguageBase + n, o = d.loadPath(n)
} catch (e) {
i && window.console && console.warn && console.warn('Select2: The language file for "' + n + '" could not be automatically loaded. A fallback will be used instead.')
}
} else o = e.isPlainObject(n) ? new d(n) : n;
r.extend(o)
}
return r
}, I.prototype.set = function(t, i) {
var r = {};
r[e.camelCase(t)] = i;
var a = c._convertData(r);
e.extend(!0, this.defaults, a)
}, new I
}), t.define("select2RS/options", ["require", "jquery", "./defaults", "./utils"], function(e, t, i, r) {
function a(t, a) {
if (this.options = t, null != a && this.fromElement(a), null != a && (this.options = i.applyFromElement(this.options, a)), this.options = i.apply(this.options), a && a.is("input")) {
var o = e(this.get("amdBase") + "compat/inputData");
this.options.dataAdapter = r.Decorate(this.options.dataAdapter, o)
}
}
return a.prototype.fromElement = function(e) {
var i = ["select2RS"];
null == this.options.multiple && (this.options.multiple = e.prop("multiple")), null == this.options.disabled && (this.options.disabled = e.prop("disabled")), null == this.options.dir && (e.prop("dir") ? this.options.dir = e.prop("dir") : e.closest("[dir]").prop("dir") ? this.options.dir = e.closest("[dir]").prop("dir") : this.options.dir = "ltr"), e.prop("disabled", this.options.disabled), e.prop("multiple", this.options.multiple), r.GetData(e[0], "select2RSTags") && (this.options.debug && window.console && console.warn && console.warn('Select2: The `data-select2RS-tags` attribute has been changed to use the `data-data` and `data-tags="true"` attributes and will be removed in future versions of Select2.'), r.StoreData(e[0], "data", r.GetData(e[0], "select2RSTags")), r.StoreData(e[0], "tags", !0)), r.GetData(e[0], "rev_ajaxurl") && (this.options.debug && window.console && console.warn && console.warn("Select2: The `data-ajax-url` attribute has been changed to `data-ajax--url` and support for the old attribute will be removed in future versions of Select2."), e.attr("ajax--url", r.GetData(e[0], "rev_ajaxurl")), r.StoreData(e[0], "ajax-Url", r.GetData(e[0], "rev_ajaxurl")));
var a = {};
function o(e, t) {
return t.toUpperCase()
}
for (var n = 0; n < e[0].attributes.length; n++) {
var s = e[0].attributes[n].name;
if ("data-" == s.substr(0, "data-".length)) {
var l = s.substring("data-".length),
c = r.GetData(e[0], l);
a[l.replace(/-([a-z])/g, o)] = c
}
}
t.fn.jquery && "1." == t.fn.jquery.substr(0, 2) && e[0].dataset && (a = t.extend(!0, {}, e[0].dataset, a));
var d = t.extend(!0, {}, r.GetData(e[0]), a);
for (var p in d = r._convertData(d)) t.inArray(p, i) > -1 || (t.isPlainObject(this.options[p]) ? t.extend(this.options[p], d[p]) : this.options[p] = d[p]);
return this
}, a.prototype.get = function(e) {
return this.options[e]
}, a.prototype.set = function(e, t) {
this.options[e] = t
}, a
}), t.define("select2RS/core", ["jquery", "./options", "./utils", "./keys"], function(e, t, i, r) {
var a = function(e, r) {
null != i.GetData(e[0], "select2RS") && i.GetData(e[0], "select2RS").destroy(), this.$element = e, this.id = this._generateId(e), r = r || {}, this.options = new t(r, e), a.__super__.constructor.call(this);
var o = e.attr("tabindex") || 0;
i.StoreData(e[0], "old-tabindex", o), e.attr("tabindex", "-1");
var n = this.options.get("dataAdapter");
this.dataAdapter = new n(e, this.options);
var s = this.render();
this._placeContainer(s);
var l = this.options.get("selectionAdapter");
this.selection = new l(e, this.options), this.$selection = this.selection.render(), this.selection.position(this.$selection, s);
var c = this.options.get("dropdownAdapter");
this.dropdown = new c(e, this.options), this.$dropdown = this.dropdown.render(), this.dropdown.position(this.$dropdown, s);
var d = this.options.get("resultsAdapter");
this.results = new d(e, this.options, this.dataAdapter), this.$results = this.results.render(), this.results.position(this.$results, this.$dropdown);
var p = this;
this._bindAdapters(), this._registerDomEvents(), this._registerDataEvents(), this._registerSelectionEvents(), this._registerDropdownEvents(), this._registerResultsEvents(), this._registerEvents(), this.dataAdapter.current(function(e) {
p.trigger("selection:update", {
data: e
})
}), e.addClass("select2RS-hidden-accessible"), e.attr("aria-hidden", "true"), this._syncAttributes(), i.StoreData(e[0], "select2RS", this), e.data("select2RS", this)
};
return i.Extend(a, i.Observable), a.prototype._generateId = function(e) {
return "select2RS-" + (null != e.attr("id") ? e.attr("id") : null != e.attr("name") ? e.attr("name") + "-" + i.generateChars(2) : i.generateChars(4)).replace(/(:|\.|\[|\]|,)/g, "")
}, a.prototype._placeContainer = function(e) {
e.insertAfter(this.$element);
var t = this._resolveWidth(this.$element, this.options.get("width"));
null != t && e.css("width", t)
}, a.prototype._resolveWidth = function(e, t) {
var i = /^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;
if ("resolve" == t) {
var r = this._resolveWidth(e, "style");
return null != r ? r : this._resolveWidth(e, "element")
}
if ("element" == t) {
var a = e.outerWidth(!1);
return a <= 0 ? "auto" : a + "px"
}
if ("style" == t) {
var o = e.attr("style");
if ("string" != typeof o) return null;
for (var n = o.split(";"), s = 0, l = n.length; s < l; s += 1) {
var c = n[s].replace(/\s/g, "").match(i);
if (null !== c && c.length >= 1) return c[1]
}
return null
}
return "computedstyle" == t ? window.getComputedStyle(e[0]).width : t
}, a.prototype._bindAdapters = function() {
this.dataAdapter.bind(this, this.$container), this.selection.bind(this, this.$container), this.dropdown.bind(this, this.$container), this.results.bind(this, this.$container)
}, a.prototype._registerDomEvents = function() {
var t = this;
this.$element.on("change.select2RS", function() {
t.dataAdapter.current(function(e) {
t.trigger("selection:update", {
data: e
})
})
}), this.$element.on("focus.select2RS", function(e) {
t.trigger("focus", e)
}), this._syncA = i.bind(this._syncAttributes, this), this._syncS = i.bind(this._syncSubtree, this), this.$element[0].attachEvent && this.$element[0].attachEvent("onpropertychange", this._syncA);
var r = window.MutationObserver || window.WebKitMutationObserver || window.MozMutationObserver;
null != r ? (this._observer = new r(function(i) {
e.each(i, t._syncA), e.each(i, t._syncS)
}), this._observer.observe(this.$element[0], {
attributes: !0,
childList: !0,
subtree: !1
})) : this.$element[0].addEventListener && (this.$element[0].addEventListener("DOMAttrModified", t._syncA, !1), this.$element[0].addEventListener("DOMNodeInserted", t._syncS, !1), this.$element[0].addEventListener("DOMNodeRemoved", t._syncS, !1))
}, a.prototype._registerDataEvents = function() {
var e = this;
this.dataAdapter.on("*", function(t, i) {
e.trigger(t, i)
})
}, a.prototype._registerSelectionEvents = function() {
var t = this,
i = ["toggle", "focus"];
this.selection.on("toggle", function() {
t.toggleDropdown()
}), this.selection.on("focus", function(e) {
t.focus(e)
}), this.selection.on("*", function(r, a) {
-1 === e.inArray(r, i) && t.trigger(r, a)
})
}, a.prototype._registerDropdownEvents = function() {
var e = this;
this.dropdown.on("*", function(t, i) {
e.trigger(t, i)
})
}, a.prototype._registerResultsEvents = function() {
var e = this;
this.results.on("*", function(t, i) {
e.trigger(t, i)
})
}, a.prototype._registerEvents = function() {
var e = this;
this.on("open", function() {
e.$container.addClass("select2RS-container--open")
}), this.on("close", function() {
e.$container.removeClass("select2RS-container--open")
}), this.on("enable", function() {
e.$container.removeClass("select2RS-container--disabled")
}), this.on("disable", function() {
e.$container.addClass("select2RS-container--disabled")
}), this.on("blur", function() {
e.$container.removeClass("select2RS-container--focus")
}), this.on("query", function(t) {
e.isOpen() || e.trigger("open", {}), this.dataAdapter.query(t, function(i) {
e.trigger("results:all", {
data: i,
query: t
})
})
}), this.on("query:append", function(t) {
this.dataAdapter.query(t, function(i) {
e.trigger("results:append", {
data: i,
query: t
})
})
}), this.on("keypress", function(t) {
var i = t.which;
e.isOpen() ? i === r.ESC || i === r.TAB || i === r.UP && t.altKey ? (e.close(), t.preventDefault()) : i === r.ENTER ? (e.trigger("results:select", {}), t.preventDefault()) : i === r.SPACE && t.ctrlKey ? (e.trigger("results:toggle", {}), t.preventDefault()) : i === r.UP ? (e.trigger("results:previous", {}), t.preventDefault()) : i === r.DOWN && (e.trigger("results:next", {}), t.preventDefault()) : (i === r.ENTER || i === r.SPACE || i === r.DOWN && t.altKey) && (e.open(), t.preventDefault())
})
}, a.prototype._syncAttributes = function() {
this.options.set("disabled", this.$element.prop("disabled")), this.options.get("disabled") ? (this.isOpen() && this.close(), this.trigger("disable", {})) : this.trigger("enable", {})
}, a.prototype._syncSubtree = function(e, t) {
var i = !1,
r = this;
if (!e || !e.target || "OPTION" === e.target.nodeName || "OPTGROUP" === e.target.nodeName) {
if (t)
if (t.addedNodes && t.addedNodes.length > 0)
for (var a = 0; a < t.addedNodes.length; a++) {
t.addedNodes[a].selected && (i = !0)
} else t.removedNodes && t.removedNodes.length > 0 && (i = !0);
else i = !0;
i && this.dataAdapter.current(function(e) {
r.trigger("selection:update", {
data: e
})
})
}
}, a.prototype.trigger = function(e, t) {
var i = a.__super__.trigger,
r = {
open: "opening",
close: "closing",
select: "selecting",
unselect: "unselecting",
clear: "clearing"
};
if (void 0 === t && (t = {}), e in r) {
var o = r[e],
n = {
prevented: !1,
name: e,
args: t
};
if (i.call(this, o, n), n.prevented) return void(t.prevented = !0)
}
i.call(this, e, t)
}, a.prototype.toggleDropdown = function() {
this.options.get("disabled") || (this.isOpen() ? this.close() : this.open())
}, a.prototype.open = function() {
this.isOpen() || this.trigger("query", {})
}, a.prototype.close = function() {
this.isOpen() && this.trigger("close", {})
}, a.prototype.isOpen = function() {
return this.$container.hasClass("select2RS-container--open")
}, a.prototype.hasFocus = function() {
return this.$container.hasClass("select2RS-container--focus")
}, a.prototype.focus = function(e) {
this.hasFocus() || (this.$container.addClass("select2RS-container--focus"), this.trigger("focus", {}))
}, a.prototype.enable = function(e) {
this.options.get("debug") && window.console && console.warn && console.warn('Select2: The `select2RS("enable")` method has been deprecated and will be removed in later Select2 versions. Use $element.prop("disabled") instead.'), null != e && 0 !== e.length || (e = [!0]);
var t = !e[0];
this.$element.prop("disabled", t)
}, a.prototype.data = function() {
this.options.get("debug") && arguments.length > 0 && window.console && console.warn && console.warn('Select2: Data can no longer be set using `select2RS("data")`. You should consider setting the value instead using `$element.val()`.');
var e = [];
return this.dataAdapter.current(function(t) {
e = t
}), e
}, a.prototype.val = function(t) {
if (this.options.get("debug") && window.console && console.warn && console.warn('Select2: The `select2RS("val")` method has been deprecated and will be removed in later Select2 versions. Use $element.val() instead.'), null == t || 0 === t.length) return this.$element.val();
var i = t[0];
e.isArray(i) && (i = e.map(i, function(e) {
return e.toString()
})), this.$element.val(i).trigger("change")
}, a.prototype.destroy = function() {
this.$container.remove(), this.$element[0].detachEvent && this.$element[0].detachEvent("onpropertychange", this._syncA), null != this._observer ? (this._observer.disconnect(), this._observer = null) : this.$element[0].removeEventListener && (this.$element[0].removeEventListener("DOMAttrModified", this._syncA, !1), this.$element[0].removeEventListener("DOMNodeInserted", this._syncS, !1), this.$element[0].removeEventListener("DOMNodeRemoved", this._syncS, !1)), this._syncA = null, this._syncS = null, this.$element.off(".select2RS"), this.$element.attr("tabindex", i.GetData(this.$element[0], "old-tabindex")), this.$element.removeClass("select2RS-hidden-accessible"), this.$element.attr("aria-hidden", "false"), i.RemoveData(this.$element[0]), this.$element.removeData("select2RS"), this.dataAdapter.destroy(), this.selection.destroy(), this.dropdown.destroy(), this.results.destroy(), this.dataAdapter = null, this.selection = null, this.dropdown = null, this.results = null
}, a.prototype.render = function() {
var t = e('
');
return t.attr("dir", this.options.get("dir")), this.$container = t, this.$container.addClass("select2RS-container--" + this.options.get("theme")), i.StoreData(t[0], "element", this.$element), t
}, a
}), t.define("select2RS/compat/utils", ["jquery"], function(e) {
return {
syncCssClasses: function(t, i, r) {
var a, o, n = [];
(a = e.trim(t.attr("class"))) && e((a = "" + a).split(/\s+/)).each(function() {
0 === this.indexOf("select2RS-") && n.push(this)
}), (a = e.trim(i.attr("class"))) && e((a = "" + a).split(/\s+/)).each(function() {
0 !== this.indexOf("select2RS-") && null != (o = r(this)) && n.push(o)
}), t.attr("class", n.join(" "))
}
}
}), t.define("select2RS/compat/containerCss", ["jquery", "./utils"], function(e, t) {
function i(e) {
return null
}
function r() {}
return r.prototype.render = function(r) {
var a = r.call(this),
o = this.options.get("containerCssClass") || "";
e.isFunction(o) && (o = o(this.$element));
var n = this.options.get("adaptContainerCssClass");
if (n = n || i, -1 !== o.indexOf(":all:")) {
o = o.replace(":all:", "");
var s = n;
n = function(e) {
var t = s(e);
return null != t ? t + " " + e : e
}
}
var l = this.options.get("containerCss") || {};
return e.isFunction(l) && (l = l(this.$element)), t.syncCssClasses(a, this.$element, n), a.css(l), a.addClass(o), a
}, r
}), t.define("select2RS/compat/dropdownCss", ["jquery", "./utils"], function(e, t) {
function i(e) {
return null
}
function r() {}
return r.prototype.render = function(r) {
var a = r.call(this),
o = this.options.get("dropdownCssClass") || "";
e.isFunction(o) && (o = o(this.$element));
var n = this.options.get("adaptDropdownCssClass");
if (n = n || i, -1 !== o.indexOf(":all:")) {
o = o.replace(":all:", "");
var s = n;
n = function(e) {
var t = s(e);
return null != t ? t + " " + e : e
}
}
var l = this.options.get("dropdownCss") || {};
return e.isFunction(l) && (l = l(this.$element)), t.syncCssClasses(a, this.$element, n), a.css(l), a.addClass(o), a
}, r
}), t.define("select2RS/compat/initSelection", ["jquery"], function(e) {
function t(e, t, i) {
i.get("debug") && window.console && console.warn && console.warn("Select2: The `initSelection` option has been deprecated in favor of a custom data adapter that overrides the `current` method. This method is now called multiple times instead of a single time when the instance is initialized. Support will be removed for the `initSelection` option in future versions of Select2"), this.initSelection = i.get("initSelection"), this._isInitialized = !1, e.call(this, t, i)
}
return t.prototype.current = function(t, i) {
var r = this;
this._isInitialized ? t.call(this, i) : this.initSelection.call(null, this.$element, function(t) {
r._isInitialized = !0, e.isArray(t) || (t = [t]), i(t)
})
}, t
}), t.define("select2RS/compat/inputData", ["jquery", "../utils"], function(e, t) {
function i(e, t, i) {
this._currentData = [], this._valueSeparator = i.get("valueSeparator") || ",", "hidden" === t.prop("type") && i.get("debug") && console && console.warn && console.warn("Select2: Using a hidden input with Select2 is no longer supported and may stop working in the future. It is recommended to use a `