跳转到内容
主菜单
主菜单
移至侧栏
隐藏
导航
首页
最近更改
随机页面
MediaWiki帮助
中医百科
搜索
搜索
登录
个人工具
登录
深色模式
查看“MediaWiki:Gadget-select2.js”的源代码
系统消息
讨论
English
阅读
查看源代码
查看历史
工具
工具
移至侧栏
隐藏
操作
阅读
查看源代码
查看历史
清除缓存
常规
链入页面
相关更改
特殊页面
页面信息
页面值
←
MediaWiki:Gadget-select2.js
因为以下原因,您没有权限编辑该页面:
您请求的操作仅限属于该用户组的用户执行:
用户
此页面为本wiki上的软件提供界面文本,并受到保护以防止滥用。 如欲修改所有wiki的翻译,请访问
translatewiki.net
上的MediaWiki本地化项目。
您无权编辑此JavaScript页面,因为编辑此页面可能会影响所有访问者。
您必须确认您的电子邮件地址才能编辑页面。请通过
参数设置
设置并确认您的电子邮件地址。
您可以查看和复制此页面的源代码。
/** * SPDX-License-Identifier: MIT * _addText: '{{Gadget Header|license=MIT|attribution=2012-2017 Kevin Brown, Igor Vaynberg, and Select2 contributors}}' * * @base {@link https://github.com/select2/select2/} * @source {@link https://git.qiuwen.net.cn/InterfaceAdmin/QiuwenGadgets/src/branch/master/src/select2} * @license MIT {@link https://github.com/select2/select2/blob/master/LICENSE.md} */ /** * Copyright (c) 2012-2017 Kevin Brown, Igor Vaynberg, and Select2 contributors * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /** * +------------------------------------------------------------+ * | === WARNING: GLOBAL GADGET FILE === | * +------------------------------------------------------------+ * | All changes should be made in the repository, | * | otherwise they will be lost. | * +------------------------------------------------------------+ * | Changes to this page may affect many users. | * | Please discuss changes by opening an issue before editing. | * +------------------------------------------------------------+ */ /* <nowiki> */ (() => { "use strict"; // dist/select2/select2.js //! src/select2/select2.js /*! Select2 4.0.12 | https://github.com/select2/select2/blob/master/LICENSE.md */ !function(n) { "function" == typeof define && define.amd ? define(["jquery"], n) : ( /*"object"==typeof module&&module.exports?module.exports=function(e,t){return void 0===t&&(t="undefined"!=typeof window?require("jquery"):require("jquery")(e)),n(t),t}:*/ n(jQuery) ); }(function(u) { var e = function() { if (u && u.fn && u.fn.select2 && u.fn.select2.amd) var e2 = u.fn.select2.amd; var t2, n, r, h, o, s, f, g, m, v, y, _, i, a, w; function b(e3, t3) { return i.call(e3, t3); } function l(e3, t3) { var n2, r2, i2, o2, s2, a2, l2, c2, u2, d, p, h2 = t3 && t3.split("/"), f2 = y.map, g2 = f2 && f2["*"] || {}; if (e3) { for (s2 = (e3 = e3.split("/")).length - 1, y.nodeIdCompat && w.test(e3[s2]) && (e3[s2] = e3[s2].replace(w, "")), "." === e3[0].charAt(0) && h2 && (e3 = h2.slice(0, h2.length - 1).concat(e3)), u2 = 0; u2 < e3.length; u2++) if ("." === (p = e3[u2])) e3.splice(u2, 1), u2 -= 1; else if (".." === p) { if (0 === u2 || 1 === u2 && ".." === e3[2] || ".." === e3[u2 - 1]) continue; 0 < u2 && (e3.splice(u2 - 1, 2), u2 -= 2); } e3 = e3.join("/"); } if ((h2 || g2) && f2) { for (u2 = (n2 = e3.split("/")).length; 0 < u2; u2 -= 1) { if (r2 = n2.slice(0, u2).join("/"), h2) { for (d = h2.length; 0 < d; d -= 1) if (i2 = (i2 = f2[h2.slice(0, d).join("/")]) && i2[r2]) { o2 = i2, a2 = u2; break; } } if (o2) break; !l2 && g2 && g2[r2] && (l2 = g2[r2], c2 = u2); } !o2 && l2 && (o2 = l2, a2 = c2), o2 && (n2.splice(0, a2, o2), e3 = n2.join("/")); } return e3; } function A(t3, n2) { return function() { var e3 = a.call(arguments, 0); return "string" != typeof e3[0] && 1 === e3.length && e3.push(null), s.apply(h, e3.concat([t3, n2])); }; } function x(t3) { return function(e3) { m[t3] = e3; }; } function D(e3) { if (b(v, e3)) { var t3 = v[e3]; delete v[e3], _[e3] = true, o.apply(h, t3); } if (!b(m, e3) && !b(_, e3)) throw new Error("No " + e3); return m[e3]; } function c(e3) { var t3, n2 = e3 ? e3.indexOf("!") : -1; return -1 < n2 && (t3 = e3.substring(0, n2), e3 = e3.substring(n2 + 1, e3.length)), [t3, e3]; } function S(e3) { return e3 ? c(e3) : []; } return e2 && e2.requirejs || (e2 ? n = e2 : e2 = {}, m = {}, v = {}, y = {}, _ = {}, i = Object.prototype.hasOwnProperty, a = [].slice, w = /\.js$/, f = function(e3, t3) { var n2, r2 = c(e3), i2 = r2[0], o2 = t3[1]; return e3 = r2[1], i2 && (n2 = D(i2 = l(i2, o2))), i2 ? e3 = n2 && n2.normalize ? n2.normalize(e3, /* @__PURE__ */ function(t4) { return function(e4) { return l(e4, t4); }; }(o2)) : l(e3, o2) : (i2 = (r2 = c(e3 = l(e3, o2)))[0], e3 = r2[1], i2 && (n2 = D(i2))), { f: i2 ? i2 + "!" + e3 : e3, n: e3, pr: i2, p: n2 }; }, g = { require: function(e3) { return A(e3); }, exports: function(e3) { var t3 = m[e3]; return void 0 !== t3 ? t3 : m[e3] = {}; }, module: function(e3) { return { id: e3, uri: "", exports: m[e3], config: /* @__PURE__ */ function(e4) { return function() { return y && y.config && y.config[e4] || {}; }; }(e3) }; } }, o = function(e3, t3, n2, r2) { var i2, o2, s2, a2, l2, c2, u2, d = [], p = typeof n2; if (c2 = S(r2 = r2 || e3), "undefined" == p || "function" == p) { for (t3 = !t3.length && n2.length ? ["require", "exports", "module"] : t3, l2 = 0; l2 < t3.length; l2 += 1) if ("require" === (o2 = (a2 = f(t3[l2], c2)).f)) d[l2] = g.require(e3); else if ("exports" === o2) d[l2] = g.exports(e3), u2 = true; else if ("module" === o2) i2 = d[l2] = g.module(e3); else if (b(m, o2) || b(v, o2) || b(_, o2)) d[l2] = D(o2); else { if (!a2.p) throw new Error(e3 + " missing " + o2); a2.p.load(a2.n, A(r2, true), x(o2), {}), d[l2] = m[o2]; } s2 = n2 ? n2.apply(m[e3], d) : void 0, e3 && (i2 && i2.exports !== h && i2.exports !== m[e3] ? m[e3] = i2.exports : s2 === h && u2 || (m[e3] = s2)); } else e3 && (m[e3] = n2); }, t2 = n = s = function(e3, t3, n2, r2, i2) { if ("string" == typeof e3) return g[e3] ? g[e3](t3) : D(f(e3, S(t3)).f); if (!e3.splice) { if ((y = e3).deps && s(y.deps, y.callback), !t3) return; t3.splice ? (e3 = t3, t3 = n2, n2 = null) : e3 = h; } return t3 = t3 || function() { }, "function" == typeof n2 && (n2 = r2, r2 = i2), r2 ? o(h, e3, t3, n2) : setTimeout(function() { o(h, e3, t3, n2); }, 4), s; }, s.config = function(e3) { return s(e3); }, t2._defined = m, (r = function(e3, t3, n2) { if ("string" != typeof e3) throw new Error("See almond README: incorrect module build, no module name"); t3.splice || (n2 = t3, t3 = []), b(m, e3) || b(v, e3) || (v[e3] = [e3, t3, n2]); }).amd = { jQuery: true }, e2.requirejs = t2, e2.require = n, e2.define = r), e2.define("almond", function() { }), e2.define("jquery", [], function() { var e3 = u || $; return null == e3 && 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."), e3; }), e2.define("select2/utils", ["jquery"], function(o2) { var i2 = {}; function u2(e4) { var t3 = e4.prototype, n3 = []; for (var r2 in t3) { "function" == typeof t3[r2] && "constructor" !== r2 && n3.push(r2); } return n3; } i2.Extend = function(e4, t3) { var n3 = {}.hasOwnProperty; function r2() { this.constructor = e4; } for (var i3 in t3) n3.call(t3, i3) && (e4[i3] = t3[i3]); return r2.prototype = t3.prototype, e4.prototype = new r2(), e4.__super__ = t3.prototype, e4; }, i2.Decorate = function(r2, i3) { var e4 = u2(i3), t3 = u2(r2); function o3() { var e5 = Array.prototype.unshift, t4 = i3.prototype.constructor.length, n4 = r2.prototype.constructor; 0 < t4 && (e5.call(arguments, r2.prototype.constructor), n4 = i3.prototype.constructor), n4.apply(this, arguments); } i3.displayName = r2.displayName, o3.prototype = new function() { this.constructor = o3; }(); for (var n3 = 0; n3 < t3.length; n3++) { var s2 = t3[n3]; o3.prototype[s2] = r2.prototype[s2]; } function a2(e5) { var t4 = function() { }; e5 in o3.prototype && (t4 = o3.prototype[e5]); var n4 = i3.prototype[e5]; return function() { return Array.prototype.unshift.call(arguments, t4), n4.apply(this, arguments); }; } for (var l2 = 0; l2 < e4.length; l2++) { var c2 = e4[l2]; o3.prototype[c2] = a2(c2); } return o3; }; function e3() { this.listeners = {}; } e3.prototype.on = function(e4, t3) { this.listeners = this.listeners || {}, e4 in this.listeners ? this.listeners[e4].push(t3) : this.listeners[e4] = [t3]; }, e3.prototype.trigger = function(e4) { var t3 = Array.prototype.slice, n3 = t3.call(arguments, 1); this.listeners = this.listeners || {}, null == n3 && (n3 = []), 0 === n3.length && n3.push({}), (n3[0]._type = e4) in this.listeners && this.invoke(this.listeners[e4], t3.call(arguments, 1)), "*" in this.listeners && this.invoke(this.listeners["*"], arguments); }, e3.prototype.invoke = function(e4, t3) { for (var n3 = 0, r2 = e4.length; n3 < r2; n3++) e4[n3].apply(this, t3); }, i2.Observable = e3, i2.generateChars = function(e4) { for (var t3 = "", n3 = 0; n3 < e4; n3++) { t3 += Math.floor(36 * Math.random()).toString(36); } return t3; }, i2.bind = function(e4, t3) { return function() { e4.apply(t3, arguments); }; }, i2._convertData = function(e4) { for (var t3 in e4) { var n3 = t3.split("-"), r2 = e4; if (1 !== n3.length) { for (var i3 = 0; i3 < n3.length; i3++) { var o3 = n3[i3]; (o3 = o3.substring(0, 1).toLowerCase() + o3.substring(1)) in r2 || (r2[o3] = {}), i3 == n3.length - 1 && (r2[o3] = e4[t3]), r2 = r2[o3]; } delete e4[t3]; } } return e4; }, i2.hasScroll = function(e4, t3) { var n3 = o2(t3), r2 = t3.style.overflowX, i3 = t3.style.overflowY; return (r2 !== i3 || "hidden" !== i3 && "visible" !== i3) && ("scroll" === r2 || "scroll" === i3 || n3.innerHeight() < t3.scrollHeight || n3.innerWidth() < t3.scrollWidth); }, i2.escapeMarkup = function(e4) { var t3 = { "\\": "\", "&": "&", "<": "<", ">": ">", '"': """, "'": "'", "/": "/" }; return "string" != typeof e4 ? e4 : String(e4).replace(/[&<>"'\/\\]/g, function(e5) { return t3[e5]; }); }, i2.appendMany = function(e4, t3) { if ("1.7" === o2.fn.jquery.substr(0, 3)) { var n3 = o2(); o2.map(t3, function(e5) { n3 = n3.add(e5); }), t3 = n3; } e4.append(t3); }, i2.__cache = {}; var n2 = 0; return i2.GetUniqueElementId = function(e4) { var t3 = e4.getAttribute("data-select2-id"); return null == t3 && (e4.id ? (t3 = e4.id, e4.setAttribute("data-select2-id", t3)) : (e4.setAttribute("data-select2-id", ++n2), t3 = n2.toString())), t3; }, i2.StoreData = function(e4, t3, n3) { var r2 = i2.GetUniqueElementId(e4); i2.__cache[r2] || (i2.__cache[r2] = {}), i2.__cache[r2][t3] = n3; }, i2.GetData = function(e4, t3) { var n3 = i2.GetUniqueElementId(e4); return t3 ? i2.__cache[n3] && null != i2.__cache[n3][t3] ? i2.__cache[n3][t3] : o2(e4).data(t3) : i2.__cache[n3]; }, i2.RemoveData = function(e4) { var t3 = i2.GetUniqueElementId(e4); null != i2.__cache[t3] && delete i2.__cache[t3], e4.removeAttribute("data-select2-id"); }, i2; }), e2.define("select2/results", ["jquery", "./utils"], function(h2, f2) { function r2(e3, t3, n2) { this.$element = e3, this.data = n2, this.options = t3, r2.__super__.constructor.call(this); } return f2.Extend(r2, f2.Observable), r2.prototype.render = function() { var e3 = h2('<ul class="select2-results__options" role="listbox"></ul>'); return this.options.get("multiple") && e3.attr("aria-multiselectable", "true"), this.$results = e3; }, r2.prototype.clear = function() { this.$results.empty(); }, r2.prototype.displayMessage = function(e3) { var t3 = this.options.get("escapeMarkup"); this.clear(), this.hideLoading(); var n2 = h2('<li role="alert" aria-live="assertive" class="select2-results__option"></li>'), r3 = this.options.get("translations").get(e3.message); n2.append(t3(r3(e3.args))), n2[0].className += " select2-results__message", this.$results.append(n2); }, r2.prototype.hideMessages = function() { this.$results.find(".select2-results__message").remove(); }, r2.prototype.append = function(e3) { this.hideLoading(); var t3 = []; if (null != e3.results && 0 !== e3.results.length) { e3.results = this.sort(e3.results); for (var n2 = 0; n2 < e3.results.length; n2++) { var r3 = e3.results[n2], i2 = this.option(r3); t3.push(i2); } this.$results.append(t3); } else 0 === this.$results.children().length && this.trigger("results:message", { message: "noResults" }); }, r2.prototype.position = function(e3, t3) { t3.find(".select2-results").append(e3); }, r2.prototype.sort = function(e3) { return this.options.get("sorter")(e3); }, r2.prototype.highlightFirstItem = function() { var e3 = this.$results.find(".select2-results__option[aria-selected]"), t3 = e3.filter("[aria-selected=true]"); 0 < t3.length ? t3.first().trigger("mouseenter") : e3.first().trigger("mouseenter"), this.ensureHighlightVisible(); }, r2.prototype.setClasses = function() { var t3 = this; this.data.current(function(e3) { var r3 = h2.map(e3, function(e4) { return e4.id.toString(); }); t3.$results.find(".select2-results__option[aria-selected]").each(function() { var e4 = h2(this), t4 = f2.GetData(this, "data"), n2 = "" + t4.id; null != t4.element && t4.element.selected || null == t4.element && -1 < h2.inArray(n2, r3) ? e4.attr("aria-selected", "true") : e4.attr("aria-selected", "false"); }); }); }, r2.prototype.showLoading = function(e3) { this.hideLoading(); var t3 = { disabled: true, loading: true, text: this.options.get("translations").get("searching")(e3) }, n2 = this.option(t3); n2.className += " loading-results", this.$results.prepend(n2); }, r2.prototype.hideLoading = function() { this.$results.find(".loading-results").remove(); }, r2.prototype.option = function(e3) { var t3 = document.createElement("li"); t3.className = "select2-results__option"; var n2 = { role: "option", "aria-selected": "false" }, r3 = window.Element.prototype.matches || window.Element.prototype.msMatchesSelector || window.Element.prototype.webkitMatchesSelector; for (var i2 in (null != e3.element && r3.call(e3.element, ":disabled") || null == e3.element && e3.disabled) && (delete n2["aria-selected"], n2["aria-disabled"] = "true"), null == e3.id && delete n2["aria-selected"], null != e3._resultId && (t3.id = e3._resultId), e3.title && (t3.title = e3.title), e3.children && (n2.role = "group", n2["aria-label"] = e3.text, delete n2["aria-selected"]), n2) { var o2 = n2[i2]; t3.setAttribute(i2, o2); } if (e3.children) { var s2 = h2(t3), a2 = document.createElement("strong"); a2.className = "select2-results__group"; h2(a2); this.template(e3, a2); for (var l2 = [], c2 = 0; c2 < e3.children.length; c2++) { var u2 = e3.children[c2], d = this.option(u2); l2.push(d); } var p = h2("<ul></ul>", { class: "select2-results__options select2-results__options--nested" }); p.append(l2), s2.append(a2), s2.append(p); } else this.template(e3, t3); return f2.StoreData(t3, "data", e3), t3; }, r2.prototype.bind = function(t3, e3) { var l2 = this, n2 = t3.id + "-results"; this.$results.attr("id", n2), t3.on("results:all", function(e4) { l2.clear(), l2.append(e4.data), t3.isOpen() && (l2.setClasses(), l2.highlightFirstItem()); }), t3.on("results:append", function(e4) { l2.append(e4.data), t3.isOpen() && l2.setClasses(); }), t3.on("query", function(e4) { l2.hideMessages(), l2.showLoading(e4); }), t3.on("select", function() { t3.isOpen() && (l2.setClasses(), l2.options.get("scrollAfterSelect") && l2.highlightFirstItem()); }), t3.on("unselect", function() { t3.isOpen() && (l2.setClasses(), l2.options.get("scrollAfterSelect") && l2.highlightFirstItem()); }), t3.on("open", function() { l2.$results.attr("aria-expanded", "true"), l2.$results.attr("aria-hidden", "false"), l2.setClasses(), l2.ensureHighlightVisible(); }), t3.on("close", function() { l2.$results.attr("aria-expanded", "false"), l2.$results.attr("aria-hidden", "true"), l2.$results.removeAttr("aria-activedescendant"); }), t3.on("results:toggle", function() { var e4 = l2.getHighlightedResults(); 0 !== e4.length && e4.trigger("mouseup"); }), t3.on("results:select", function() { var e4 = l2.getHighlightedResults(); if (0 !== e4.length) { var t4 = f2.GetData(e4[0], "data"); "true" == e4.attr("aria-selected") ? l2.trigger("close", {}) : l2.trigger("select", { data: t4 }); } }), t3.on("results:previous", function() { var e4 = l2.getHighlightedResults(), t4 = l2.$results.find("[aria-selected]"), n3 = t4.index(e4); if (!(n3 <= 0)) { var r3 = n3 - 1; 0 === e4.length && (r3 = 0); var i2 = t4.eq(r3); i2.trigger("mouseenter"); var o2 = l2.$results.offset().top, s2 = i2.offset().top, a2 = l2.$results.scrollTop() + (s2 - o2); 0 === r3 ? l2.$results.scrollTop(0) : s2 - o2 < 0 && l2.$results.scrollTop(a2); } }), t3.on("results:next", function() { var e4 = l2.getHighlightedResults(), t4 = l2.$results.find("[aria-selected]"), n3 = t4.index(e4) + 1; if (!(n3 >= t4.length)) { var r3 = t4.eq(n3); r3.trigger("mouseenter"); var i2 = l2.$results.offset().top + l2.$results.outerHeight(false), o2 = r3.offset().top + r3.outerHeight(false), s2 = l2.$results.scrollTop() + o2 - i2; 0 === n3 ? l2.$results.scrollTop(0) : i2 < o2 && l2.$results.scrollTop(s2); } }), t3.on("results:focus", function(e4) { e4.element.addClass("select2-results__option--highlighted"); }), t3.on("results:message", function(e4) { l2.displayMessage(e4); }), h2.fn.mousewheel && this.$results.on("mousewheel", function(e4) { var t4 = l2.$results.scrollTop(), n3 = l2.$results.get(0).scrollHeight - t4 + e4.deltaY, r3 = 0 < e4.deltaY && t4 - e4.deltaY <= 0, i2 = e4.deltaY < 0 && n3 <= l2.$results.height(); r3 ? (l2.$results.scrollTop(0), e4.preventDefault(), e4.stopPropagation()) : i2 && (l2.$results.scrollTop(l2.$results.get(0).scrollHeight - l2.$results.height()), e4.preventDefault(), e4.stopPropagation()); }), this.$results.on("mouseup", ".select2-results__option[aria-selected]", function(e4) { var t4 = h2(this), n3 = f2.GetData(this, "data"); "true" !== t4.attr("aria-selected") ? l2.trigger("select", { originalEvent: e4, data: n3 }) : l2.options.get("multiple") ? l2.trigger("unselect", { originalEvent: e4, data: n3 }) : l2.trigger("close", {}); }), this.$results.on("mouseenter", ".select2-results__option[aria-selected]", function(e4) { var t4 = f2.GetData(this, "data"); l2.getHighlightedResults().removeClass("select2-results__option--highlighted"), l2.trigger("results:focus", { data: t4, element: h2(this) }); }); }, r2.prototype.getHighlightedResults = function() { return this.$results.find(".select2-results__option--highlighted"); }, r2.prototype.destroy = function() { this.$results.remove(); }, r2.prototype.ensureHighlightVisible = function() { var e3 = this.getHighlightedResults(); if (0 !== e3.length) { var t3 = this.$results.find("[aria-selected]").index(e3), n2 = this.$results.offset().top, r3 = e3.offset().top, i2 = this.$results.scrollTop() + (r3 - n2), o2 = r3 - n2; i2 -= 2 * e3.outerHeight(false), t3 <= 2 ? this.$results.scrollTop(0) : (o2 > this.$results.outerHeight() || o2 < 0) && this.$results.scrollTop(i2); } }, r2.prototype.template = function(e3, t3) { var n2 = this.options.get("templateResult"), r3 = this.options.get("escapeMarkup"), i2 = n2(e3, t3); null == i2 ? t3.style.display = "none" : "string" == typeof i2 ? t3.innerHTML = r3(i2) : h2(t3).append(i2); }, r2; }), e2.define("select2/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 }; }), e2.define("select2/selection/base", ["jquery", "../utils", "../keys"], function(n2, r2, i2) { function o2(e3, t3) { this.$element = e3, this.options = t3, o2.__super__.constructor.call(this); } return r2.Extend(o2, r2.Observable), o2.prototype.render = function() { var e3 = n2('<span class="select2-selection" role="combobox" aria-haspopup="true" aria-expanded="false"></span>'); return this._tabindex = 0, null != r2.GetData(this.$element[0], "old-tabindex") ? this._tabindex = r2.GetData(this.$element[0], "old-tabindex") : null != this.$element.attr("tabindex") && (this._tabindex = this.$element.attr("tabindex")), e3.attr("title", this.$element.attr("title")), e3.attr("tabindex", this._tabindex), e3.attr("aria-disabled", "false"), this.$selection = e3; }, o2.prototype.bind = function(e3, t3) { var n3 = this, r3 = e3.id + "-results"; this.container = e3, this.$selection.on("focus", function(e4) { n3.trigger("focus", e4); }), this.$selection.on("blur", function(e4) { n3._handleBlur(e4); }), this.$selection.on("keydown", function(e4) { n3.trigger("keypress", e4), e4.which === i2.SPACE && e4.preventDefault(); }), e3.on("results:focus", function(e4) { n3.$selection.attr("aria-activedescendant", e4.data._resultId); }), e3.on("selection:update", function(e4) { n3.update(e4.data); }), e3.on("open", function() { n3.$selection.attr("aria-expanded", "true"), n3.$selection.attr("aria-owns", r3), n3._attachCloseHandler(e3); }), e3.on("close", function() { n3.$selection.attr("aria-expanded", "false"), n3.$selection.removeAttr("aria-activedescendant"), n3.$selection.removeAttr("aria-owns"), n3.$selection.trigger("focus"), n3._detachCloseHandler(e3); }), e3.on("enable", function() { n3.$selection.attr("tabindex", n3._tabindex), n3.$selection.attr("aria-disabled", "false"); }), e3.on("disable", function() { n3.$selection.attr("tabindex", "-1"), n3.$selection.attr("aria-disabled", "true"); }); }, o2.prototype._handleBlur = function(e3) { var t3 = this; window.setTimeout(function() { document.activeElement == t3.$selection[0] || n2.contains(t3.$selection[0], document.activeElement) || t3.trigger("blur", e3); }, 1); }, o2.prototype._attachCloseHandler = function(e3) { n2(document.body).on("mousedown.select2." + e3.id, function(e4) { var t3 = n2(e4.target).closest(".select2"); n2(".select2.select2-container--open").each(function() { this != t3[0] && r2.GetData(this, "element").select2("close"); }); }); }, o2.prototype._detachCloseHandler = function(e3) { n2(document.body).off("mousedown.select2." + e3.id); }, o2.prototype.position = function(e3, t3) { t3.find(".selection").append(e3); }, o2.prototype.destroy = function() { this._detachCloseHandler(this.container); }, o2.prototype.update = function(e3) { throw new Error("The `update` method must be defined in child classes."); }, o2; }), e2.define("select2/selection/single", ["jquery", "./base", "../utils", "../keys"], function(e3, t3, n2, r2) { function i2() { i2.__super__.constructor.apply(this, arguments); } return n2.Extend(i2, t3), i2.prototype.render = function() { var e4 = i2.__super__.render.call(this); return e4.addClass("select2-selection--single"), e4.html('<span class="select2-selection__rendered"></span><span class="select2-selection__arrow" role="presentation"><b role="presentation"></b></span>'), e4; }, i2.prototype.bind = function(t4, e4) { var n3 = this; i2.__super__.bind.apply(this, arguments); var r3 = t4.id + "-container"; this.$selection.find(".select2-selection__rendered").attr("id", r3).attr("role", "textbox").attr("aria-readonly", "true"), this.$selection.attr("aria-labelledby", r3), this.$selection.on("mousedown", function(e5) { 1 === e5.which && n3.trigger("toggle", { originalEvent: e5 }); }), this.$selection.on("focus", function(e5) { }), this.$selection.on("blur", function(e5) { }), t4.on("focus", function(e5) { t4.isOpen() || n3.$selection.trigger("focus"); }); }, i2.prototype.clear = function() { var e4 = this.$selection.find(".select2-selection__rendered"); e4.empty(), e4.removeAttr("title"); }, i2.prototype.display = function(e4, t4) { var n3 = this.options.get("templateSelection"); return this.options.get("escapeMarkup")(n3(e4, t4)); }, i2.prototype.selectionContainer = function() { return e3("<span></span>"); }, i2.prototype.update = function(e4) { if (0 !== e4.length) { var t4 = e4[0], n3 = this.$selection.find(".select2-selection__rendered"), r3 = this.display(t4, n3); n3.empty().append(r3); var i3 = t4.title || t4.text; i3 ? n3.attr("title", i3) : n3.removeAttr("title"); } else this.clear(); }, i2; }), e2.define("select2/selection/multiple", ["jquery", "./base", "../utils"], function(i2, e3, l2) { function n2(e4, t3) { n2.__super__.constructor.apply(this, arguments); } return l2.Extend(n2, e3), n2.prototype.render = function() { var e4 = n2.__super__.render.call(this); return e4.addClass("select2-selection--multiple"), e4.html('<ul class="select2-selection__rendered"></ul>'), e4; }, n2.prototype.bind = function(e4, t3) { var r2 = this; n2.__super__.bind.apply(this, arguments), this.$selection.on("click", function(e5) { r2.trigger("toggle", { originalEvent: e5 }); }), this.$selection.on("click", ".select2-selection__choice__remove", function(e5) { if (!r2.options.get("disabled")) { var t4 = i2(this).parent(), n3 = l2.GetData(t4[0], "data"); r2.trigger("unselect", { originalEvent: e5, data: n3 }); } }); }, n2.prototype.clear = function() { var e4 = this.$selection.find(".select2-selection__rendered"); e4.empty(), e4.removeAttr("title"); }, n2.prototype.display = function(e4, t3) { var n3 = this.options.get("templateSelection"); return this.options.get("escapeMarkup")(n3(e4, t3)); }, n2.prototype.selectionContainer = function() { return i2('<li class="select2-selection__choice"><span class="select2-selection__choice__remove" role="presentation">×</span></li>'); }, n2.prototype.update = function(e4) { if (this.clear(), 0 !== e4.length) { for (var t3 = [], n3 = 0; n3 < e4.length; n3++) { var r2 = e4[n3], i3 = this.selectionContainer(), o2 = this.display(r2, i3); i3.append(o2); var s2 = r2.title || r2.text; s2 && i3.attr("title", s2), l2.StoreData(i3[0], "data", r2), t3.push(i3); } var a2 = this.$selection.find(".select2-selection__rendered"); l2.appendMany(a2, t3); } }, n2; }), e2.define("select2/selection/placeholder", ["../utils"], function(e3) { function t3(e4, t4, n2) { this.placeholder = this.normalizePlaceholder(n2.get("placeholder")), e4.call(this, t4, n2); } return t3.prototype.normalizePlaceholder = function(e4, t4) { return "string" == typeof t4 && (t4 = { id: "", text: t4 }), t4; }, t3.prototype.createPlaceholder = function(e4, t4) { var n2 = this.selectionContainer(); return n2.html(this.display(t4)), n2.addClass("select2-selection__placeholder").removeClass("select2-selection__choice"), n2; }, t3.prototype.update = function(e4, t4) { var n2 = 1 == t4.length && t4[0].id != this.placeholder.id; if (1 < t4.length || n2) return e4.call(this, t4); this.clear(); var r2 = this.createPlaceholder(this.placeholder); this.$selection.find(".select2-selection__rendered").append(r2); }, t3; }), e2.define("select2/selection/allowClear", ["jquery", "../keys", "../utils"], function(i2, r2, a2) { function e3() { } return e3.prototype.bind = function(e4, t3, n2) { var r3 = this; e4.call(this, t3, n2), 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", ".select2-selection__clear", function(e5) { r3._handleClear(e5); }), t3.on("keypress", function(e5) { r3._handleKeyboardClear(e5, t3); }); }, e3.prototype._handleClear = function(e4, t3) { if (!this.options.get("disabled")) { var n2 = this.$selection.find(".select2-selection__clear"); if (0 !== n2.length) { t3.stopPropagation(); var r3 = a2.GetData(n2[0], "data"), i3 = this.$element.val(); this.$element.val(this.placeholder.id); var o2 = { data: r3 }; if (this.trigger("clear", o2), o2.prevented) this.$element.val(i3); else { for (var s2 = 0; s2 < r3.length; s2++) if (o2 = { data: r3[s2] }, this.trigger("unselect", o2), o2.prevented) return void this.$element.val(i3); this.$element.trigger("change"), this.trigger("toggle", {}); } } } }, e3.prototype._handleKeyboardClear = function(e4, t3, n2) { n2.isOpen() || t3.which != r2.DELETE && t3.which != r2.BACKSPACE || this._handleClear(t3); }, e3.prototype.update = function(e4, t3) { if (e4.call(this, t3), !(0 < this.$selection.find(".select2-selection__placeholder").length || 0 === t3.length)) { var n2 = this.options.get("translations").get("removeAllItems"), r3 = i2('<span class="select2-selection__clear" title="' + n2() + '">×</span>'); a2.StoreData(r3[0], "data", t3), this.$selection.find(".select2-selection__rendered").prepend(r3); } }, e3; }), e2.define("select2/selection/search", ["jquery", "../utils", "../keys"], function(r2, a2, l2) { function e3(e4, t3, n2) { e4.call(this, t3, n2); } return e3.prototype.render = function(e4) { var t3 = r2('<li class="select2-search select2-search--inline"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="none" spellcheck="false" role="searchbox" aria-autocomplete="list" /></li>'); this.$searchContainer = t3, this.$search = t3.find("input"); var n2 = e4.call(this); return this._transferTabIndex(), n2; }, e3.prototype.bind = function(e4, t3, n2) { var r3 = this, i2 = t3.id + "-results"; e4.call(this, t3, n2), t3.on("open", function() { r3.$search.attr("aria-controls", i2), r3.$search.trigger("focus"); }), t3.on("close", function() { r3.$search.val(""), r3.$search.removeAttr("aria-controls"), r3.$search.removeAttr("aria-activedescendant"), r3.$search.trigger("focus"); }), t3.on("enable", function() { r3.$search.prop("disabled", false), r3._transferTabIndex(); }), t3.on("disable", function() { r3.$search.prop("disabled", true); }), t3.on("focus", function(e5) { r3.$search.trigger("focus"); }), t3.on("results:focus", function(e5) { e5.data._resultId ? r3.$search.attr("aria-activedescendant", e5.data._resultId) : r3.$search.removeAttr("aria-activedescendant"); }), this.$selection.on("focusin", ".select2-search--inline", function(e5) { r3.trigger("focus", e5); }), this.$selection.on("focusout", ".select2-search--inline", function(e5) { r3._handleBlur(e5); }), this.$selection.on("keydown", ".select2-search--inline", function(e5) { if (e5.stopPropagation(), r3.trigger("keypress", e5), r3._keyUpPrevented = e5.isDefaultPrevented(), e5.which === l2.BACKSPACE && "" === r3.$search.val()) { var t4 = r3.$searchContainer.prev(".select2-selection__choice"); if (0 < t4.length) { var n3 = a2.GetData(t4[0], "data"); r3.searchRemoveChoice(n3), e5.preventDefault(); } } }), this.$selection.on("click", ".select2-search--inline", function(e5) { r3.$search.val() && e5.stopPropagation(); }); var o2 = document.documentMode, s2 = o2 && o2 <= 11; this.$selection.on("input.searchcheck", ".select2-search--inline", function(e5) { s2 ? r3.$selection.off("input.search input.searchcheck") : r3.$selection.off("keyup.search"); }), this.$selection.on("keyup.search input.search", ".select2-search--inline", function(e5) { if (s2 && "input" === e5.type) r3.$selection.off("input.search input.searchcheck"); else { var t4 = e5.which; t4 != l2.SHIFT && t4 != l2.CTRL && t4 != l2.ALT && t4 != l2.TAB && r3.handleSearch(e5); } }); }, e3.prototype._transferTabIndex = function(e4) { this.$search.attr("tabindex", this.$selection.attr("tabindex")), this.$selection.attr("tabindex", "-1"); }, e3.prototype.createPlaceholder = function(e4, t3) { this.$search.attr("placeholder", t3.text); }, e3.prototype.update = function(e4, t3) { var n2 = this.$search[0] == document.activeElement; this.$search.attr("placeholder", ""), e4.call(this, t3), this.$selection.find(".select2-selection__rendered").append(this.$searchContainer), this.resizeSearch(), n2 && this.$search.trigger("focus"); }, e3.prototype.handleSearch = function() { if (this.resizeSearch(), !this._keyUpPrevented) { var e4 = this.$search.val(); this.trigger("query", { term: e4 }); } this._keyUpPrevented = false; }, e3.prototype.searchRemoveChoice = function(e4, t3) { this.trigger("unselect", { data: t3 }), this.$search.val(t3.text), this.handleSearch(); }, e3.prototype.resizeSearch = function() { this.$search.css("width", "25px"); var e4 = ""; "" !== this.$search.attr("placeholder") ? e4 = this.$selection.find(".select2-selection__rendered").width() : e4 = 0.75 * (this.$search.val().length + 1) + "em"; this.$search.css("width", e4); }, e3; }), e2.define("select2/selection/eventRelay", ["jquery"], function(s2) { function e3() { } return e3.prototype.bind = function(e4, t3, n2) { var r2 = this, i2 = ["open", "opening", "close", "closing", "select", "selecting", "unselect", "unselecting", "clear", "clearing"], o2 = ["opening", "closing", "selecting", "unselecting", "clearing"]; e4.call(this, t3, n2), t3.on("*", function(e5, t4) { if (-1 !== s2.inArray(e5, i2)) { t4 = t4 || {}; var n3 = s2.Event("select2:" + e5, { params: t4 }); r2.$element.trigger(n3), -1 !== s2.inArray(e5, o2) && (t4.prevented = n3.isDefaultPrevented()); } }); }, e3; }), e2.define("select2/translation", ["jquery", "require"], function(t3, n2) { function r2(e3) { this.dict = e3 || {}; } return r2.prototype.all = function() { return this.dict; }, r2.prototype.get = function(e3) { return this.dict[e3]; }, r2.prototype.extend = function(e3) { this.dict = t3.extend({}, e3.all(), this.dict); }, r2._cache = {}, r2.loadPath = function(e3) { if (!(e3 in r2._cache)) { var t4 = n2(e3); r2._cache[e3] = t4; } return new r2(r2._cache[e3]); }, r2; }), e2.define("select2/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", "Ά": "Α", "Έ": "Ε", "Ή": "Η", "Ί": "Ι", "Ϊ": "Ι", "Ό": "Ο", "Ύ": "Υ", "Ϋ": "Υ", "Ώ": "Ω", "ά": "α", "έ": "ε", "ή": "η", "ί": "ι", "ϊ": "ι", "ΐ": "ι", "ό": "ο", "ύ": "υ", "ϋ": "υ", "ΰ": "υ", "ώ": "ω", "ς": "σ", "’": "'" }; }), e2.define("select2/data/base", ["../utils"], function(r2) { function n2(e3, t3) { n2.__super__.constructor.call(this); } return r2.Extend(n2, r2.Observable), n2.prototype.current = function(e3) { throw new Error("The `current` method must be defined in child classes."); }, n2.prototype.query = function(e3, t3) { throw new Error("The `query` method must be defined in child classes."); }, n2.prototype.bind = function(e3, t3) { }, n2.prototype.destroy = function() { }, n2.prototype.generateResultId = function(e3, t3) { var n3 = e3.id + "-result-"; return n3 += r2.generateChars(4), null != t3.id ? n3 += "-" + t3.id.toString() : n3 += "-" + r2.generateChars(4), n3; }, n2; }), e2.define("select2/data/select", ["./base", "../utils", "jquery"], function(e3, a2, l2) { function n2(e4, t3) { this.$element = e4, this.options = t3, n2.__super__.constructor.call(this); } return a2.Extend(n2, e3), n2.prototype.current = function(e4) { var n3 = [], r2 = this; this.$element.find(":selected").each(function() { var e5 = l2(this), t3 = r2.item(e5); n3.push(t3); }), e4(n3); }, n2.prototype.select = function(i2) { var o2 = this; if (i2.selected = true, l2(i2.element).is("option")) return i2.element.selected = true, void this.$element.trigger("change"); if (this.$element.prop("multiple")) this.current(function(e5) { var t3 = []; (i2 = [i2]).push.apply(i2, e5); for (var n3 = 0; n3 < i2.length; n3++) { var r2 = i2[n3].id; -1 === l2.inArray(r2, t3) && t3.push(r2); } o2.$element.val(t3), o2.$element.trigger("change"); }); else { var e4 = i2.id; this.$element.val(e4), this.$element.trigger("change"); } }, n2.prototype.unselect = function(i2) { var o2 = this; if (this.$element.prop("multiple")) { if (i2.selected = false, l2(i2.element).is("option")) return i2.element.selected = false, void this.$element.trigger("change"); this.current(function(e4) { for (var t3 = [], n3 = 0; n3 < e4.length; n3++) { var r2 = e4[n3].id; r2 !== i2.id && -1 === l2.inArray(r2, t3) && t3.push(r2); } o2.$element.val(t3), o2.$element.trigger("change"); }); } }, n2.prototype.bind = function(e4, t3) { var n3 = this; (this.container = e4).on("select", function(e5) { n3.select(e5.data); }), e4.on("unselect", function(e5) { n3.unselect(e5.data); }); }, n2.prototype.destroy = function() { this.$element.find("*").each(function() { a2.RemoveData(this); }); }, n2.prototype.query = function(r2, e4) { var i2 = [], o2 = this; this.$element.children().each(function() { var e5 = l2(this); if (e5.is("option") || e5.is("optgroup")) { var t3 = o2.item(e5), n3 = o2.matches(r2, t3); null !== n3 && i2.push(n3); } }), e4({ results: i2 }); }, n2.prototype.addOptions = function(e4) { a2.appendMany(this.$element, e4); }, n2.prototype.option = function(e4) { var t3; e4.children ? (t3 = document.createElement("optgroup")).label = e4.text : void 0 !== (t3 = document.createElement("option")).textContent ? t3.textContent = e4.text : t3.innerText = e4.text, void 0 !== e4.id && (t3.value = e4.id), e4.disabled && (t3.disabled = true), e4.selected && (t3.selected = true), e4.title && (t3.title = e4.title); var n3 = l2(t3), r2 = this._normalizeItem(e4); return r2.element = t3, a2.StoreData(t3, "data", r2), n3; }, n2.prototype.item = function(e4) { var t3 = {}; if (null != (t3 = a2.GetData(e4[0], "data"))) return t3; if (e4.is("option")) t3 = { id: e4.val(), text: e4.text(), disabled: e4.prop("disabled"), selected: e4.prop("selected"), title: e4.prop("title") }; else if (e4.is("optgroup")) { t3 = { text: e4.prop("label"), children: [], title: e4.prop("title") }; for (var n3 = e4.children("option"), r2 = [], i2 = 0; i2 < n3.length; i2++) { var o2 = l2(n3[i2]), s2 = this.item(o2); r2.push(s2); } t3.children = r2; } return (t3 = this._normalizeItem(t3)).element = e4[0], a2.StoreData(e4[0], "data", t3), t3; }, n2.prototype._normalizeItem = function(e4) { e4 !== Object(e4) && (e4 = { id: e4, text: e4 }); return null != (e4 = l2.extend({}, { text: "" }, e4)).id && (e4.id = e4.id.toString()), null != e4.text && (e4.text = e4.text.toString()), null == e4._resultId && e4.id && null != this.container && (e4._resultId = this.generateResultId(this.container, e4)), l2.extend({}, { selected: false, disabled: false }, e4); }, n2.prototype.matches = function(e4, t3) { return this.options.get("matcher")(e4, t3); }, n2; }), e2.define("select2/data/array", ["./select", "../utils", "jquery"], function(e3, f2, g2) { function r2(e4, t3) { this._dataToConvert = t3.get("data") || [], r2.__super__.constructor.call(this, e4, t3); } return f2.Extend(r2, e3), r2.prototype.bind = function(e4, t3) { r2.__super__.bind.call(this, e4, t3), this.addOptions(this.convertToOptions(this._dataToConvert)); }, r2.prototype.select = function(n2) { var e4 = this.$element.find("option").filter(function(e5, t3) { return t3.value == n2.id.toString(); }); 0 === e4.length && (e4 = this.option(n2), this.addOptions(e4)), r2.__super__.select.call(this, n2); }, r2.prototype.convertToOptions = function(e4) { var t3 = this, n2 = this.$element.find("option"), r3 = n2.map(function() { return t3.item(g2(this)).id; }).get(), i2 = []; function o2(e5) { return function() { return g2(this).val() == e5.id; }; } for (var s2 = 0; s2 < e4.length; s2++) { var a2 = this._normalizeItem(e4[s2]); if (0 <= g2.inArray(a2.id, r3)) { var l2 = n2.filter(o2(a2)), c2 = this.item(l2), u2 = g2.extend(true, {}, a2, c2), d = this.option(u2); l2.replaceWith(d); } else { var p = this.option(a2); if (a2.children) { var h2 = this.convertToOptions(a2.children); f2.appendMany(p, h2); } i2.push(p); } } return i2; }, r2; }), e2.define("select2/data/ajax", ["./array", "../utils", "jquery"], function(e3, t3, o2) { function n2(e4, t4) { this.ajaxOptions = this._applyDefaults(t4.get("ajax")), null != this.ajaxOptions.processResults && (this.processResults = this.ajaxOptions.processResults), n2.__super__.constructor.call(this, e4, t4); } return t3.Extend(n2, e3), n2.prototype._applyDefaults = function(e4) { var t4 = { data: function(e5) { return o2.extend({}, e5, { q: e5.term }); }, transport: function(e5, t5, n3) { var r2 = o2.ajax(e5); return r2.then(t5), r2.fail(n3), r2; } }; return o2.extend({}, t4, e4, true); }, n2.prototype.processResults = function(e4) { return e4; }, n2.prototype.query = function(n3, r2) { var i2 = this; null != this._request && (o2.isFunction(this._request.abort) && this._request.abort(), this._request = null); var t4 = o2.extend({ type: "GET" }, this.ajaxOptions); function e4() { var e5 = t4.transport(t4, function(e6) { var t5 = i2.processResults(e6, n3); i2.options.get("debug") && window.console && console.error && (t5 && t5.results && o2.isArray(t5.results) || console.error("Select2: The AJAX results did not return an array in the `results` key of the response.")), r2(t5); }, function() { "status" in e5 && (0 === e5.status || "0" === e5.status) || i2.trigger("results:message", { message: "errorLoading" }); }); i2._request = e5; } "function" == typeof t4.url && (t4.url = t4.url.call(this.$element, n3)), "function" == typeof t4.data && (t4.data = t4.data.call(this.$element, n3)), this.ajaxOptions.delay && null != n3.term ? (this._queryTimeout && window.clearTimeout(this._queryTimeout), this._queryTimeout = window.setTimeout(e4, this.ajaxOptions.delay)) : e4(); }, n2; }), e2.define("select2/data/tags", ["jquery"], function(u2) { function e3(e4, t3, n2) { var r2 = n2.get("tags"), i2 = n2.get("createTag"); void 0 !== i2 && (this.createTag = i2); var o2 = n2.get("insertTag"); if (void 0 !== o2 && (this.insertTag = o2), e4.call(this, t3, n2), u2.isArray(r2)) for (var s2 = 0; s2 < r2.length; s2++) { var a2 = r2[s2], l2 = this._normalizeItem(a2), c2 = this.option(l2); this.$element.append(c2); } } return e3.prototype.query = function(e4, c2, u3) { var d = this; this._removeOldTags(), null != c2.term && null == c2.page ? e4.call(this, c2, function e5(t3, n2) { for (var r2 = t3.results, i2 = 0; i2 < r2.length; i2++) { var o2 = r2[i2], s2 = null != o2.children && !e5({ results: o2.children }, true); if ((o2.text || "").toUpperCase() === (c2.term || "").toUpperCase() || s2) return !n2 && (t3.data = r2, void u3(t3)); } if (n2) return true; var a2 = d.createTag(c2); if (null != a2) { var l2 = d.option(a2); l2.attr("data-select2-tag", true), d.addOptions([l2]), d.insertTag(r2, a2); } t3.results = r2, u3(t3); }) : e4.call(this, c2, u3); }, e3.prototype.createTag = function(e4, t3) { var n2 = u2.trim(t3.term); return "" === n2 ? null : { id: n2, text: n2 }; }, e3.prototype.insertTag = function(e4, t3, n2) { t3.unshift(n2); }, e3.prototype._removeOldTags = function(e4) { this.$element.find("option[data-select2-tag]").each(function() { this.selected || u2(this).remove(); }); }, e3; }), e2.define("select2/data/tokenizer", ["jquery"], function(d) { function e3(e4, t3, n2) { var r2 = n2.get("tokenizer"); void 0 !== r2 && (this.tokenizer = r2), e4.call(this, t3, n2); } return e3.prototype.bind = function(e4, t3, n2) { e4.call(this, t3, n2), this.$search = t3.dropdown.$search || t3.selection.$search || n2.find(".select2-search__field"); }, e3.prototype.query = function(e4, t3, n2) { var r2 = this; t3.term = t3.term || ""; var i2 = this.tokenizer(t3, this.options, function(e5) { var t4 = r2._normalizeItem(e5); if (!r2.$element.find("option").filter(function() { return d(this).val() === t4.id; }).length) { var n3 = r2.option(t4); n3.attr("data-select2-tag", true), r2._removeOldTags(), r2.addOptions([n3]); } !function(e6) { r2.trigger("select", { data: e6 }); }(t4); }); i2.term !== t3.term && (this.$search.length && (this.$search.val(i2.term), this.$search.trigger("focus")), t3.term = i2.term), e4.call(this, t3, n2); }, e3.prototype.tokenizer = function(e4, t3, n2, r2) { for (var i2 = n2.get("tokenSeparators") || [], o2 = t3.term, s2 = 0, a2 = this.createTag || function(e5) { return { id: e5.term, text: e5.term }; }; s2 < o2.length; ) { var l2 = o2[s2]; if (-1 !== d.inArray(l2, i2)) { var c2 = o2.substr(0, s2), u2 = a2(d.extend({}, t3, { term: c2 })); null != u2 ? (r2(u2), o2 = o2.substr(s2 + 1) || "", s2 = 0) : s2++; } else s2++; } return { term: o2 }; }, e3; }), e2.define("select2/data/minimumInputLength", [], function() { function e3(e4, t3, n2) { this.minimumInputLength = n2.get("minimumInputLength"), e4.call(this, t3, n2); } return e3.prototype.query = function(e4, t3, n2) { t3.term = t3.term || "", t3.term.length < this.minimumInputLength ? this.trigger("results:message", { message: "inputTooShort", args: { minimum: this.minimumInputLength, input: t3.term, params: t3 } }) : e4.call(this, t3, n2); }, e3; }), e2.define("select2/data/maximumInputLength", [], function() { function e3(e4, t3, n2) { this.maximumInputLength = n2.get("maximumInputLength"), e4.call(this, t3, n2); } return e3.prototype.query = function(e4, t3, n2) { t3.term = t3.term || "", 0 < this.maximumInputLength && t3.term.length > this.maximumInputLength ? this.trigger("results:message", { message: "inputTooLong", args: { maximum: this.maximumInputLength, input: t3.term, params: t3 } }) : e4.call(this, t3, n2); }, e3; }), e2.define("select2/data/maximumSelectionLength", [], function() { function e3(e4, t3, n2) { this.maximumSelectionLength = n2.get("maximumSelectionLength"), e4.call(this, t3, n2); } return e3.prototype.bind = function(e4, t3, n2) { var r2 = this; e4.call(this, t3, n2), t3.on("select", function() { r2._checkIfMaximumSelected(); }); }, e3.prototype.query = function(e4, t3, n2) { var r2 = this; this._checkIfMaximumSelected(function() { e4.call(r2, t3, n2); }); }, e3.prototype._checkIfMaximumSelected = function(e4, n2) { var r2 = this; this.current(function(e5) { var t3 = null != e5 ? e5.length : 0; 0 < r2.maximumSelectionLength && t3 >= r2.maximumSelectionLength ? r2.trigger("results:message", { message: "maximumSelected", args: { maximum: r2.maximumSelectionLength } }) : n2 && n2(); }); }, e3; }), e2.define("select2/dropdown", ["jquery", "./utils"], function(t3, e3) { function n2(e4, t4) { this.$element = e4, this.options = t4, n2.__super__.constructor.call(this); } return e3.Extend(n2, e3.Observable), n2.prototype.render = function() { var e4 = t3('<span class="select2-dropdown"><span class="select2-results"></span></span>'); return e4.attr("dir", this.options.get("dir")), this.$dropdown = e4; }, n2.prototype.bind = function() { }, n2.prototype.position = function(e4, t4) { }, n2.prototype.destroy = function() { this.$dropdown.remove(); }, n2; }), e2.define("select2/dropdown/search", ["jquery", "../utils"], function(o2, e3) { function t3() { } return t3.prototype.render = function(e4) { var t4 = e4.call(this), n2 = o2('<span class="select2-search select2-search--dropdown"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="none" spellcheck="false" role="searchbox" aria-autocomplete="list" /></span>'); return this.$searchContainer = n2, this.$search = n2.find("input"), t4.prepend(n2), t4; }, t3.prototype.bind = function(e4, t4, n2) { var r2 = this, i2 = t4.id + "-results"; e4.call(this, t4, n2), this.$search.on("keydown", function(e5) { r2.trigger("keypress", e5), r2._keyUpPrevented = e5.isDefaultPrevented(); }), this.$search.on("input", function(e5) { o2(this).off("keyup"); }), this.$search.on("keyup input", function(e5) { r2.handleSearch(e5); }), t4.on("open", function() { r2.$search.attr("tabindex", 0), r2.$search.attr("aria-controls", i2), r2.$search.trigger("focus"), window.setTimeout(function() { r2.$search.trigger("focus"); }, 0); }), t4.on("close", function() { r2.$search.attr("tabindex", -1), r2.$search.removeAttr("aria-controls"), r2.$search.removeAttr("aria-activedescendant"), r2.$search.val(""), r2.$search.trigger("blur"); }), t4.on("focus", function() { t4.isOpen() || r2.$search.trigger("focus"); }), t4.on("results:all", function(e5) { null != e5.query.term && "" !== e5.query.term || (r2.showSearch(e5) ? r2.$searchContainer.removeClass("select2-search--hide") : r2.$searchContainer.addClass("select2-search--hide")); }), t4.on("results:focus", function(e5) { e5.data._resultId ? r2.$search.attr("aria-activedescendant", e5.data._resultId) : r2.$search.removeAttr("aria-activedescendant"); }); }, t3.prototype.handleSearch = function(e4) { if (!this._keyUpPrevented) { var t4 = this.$search.val(); this.trigger("query", { term: t4 }); } this._keyUpPrevented = false; }, t3.prototype.showSearch = function(e4, t4) { return true; }, t3; }), e2.define("select2/dropdown/hidePlaceholder", [], function() { function e3(e4, t3, n2, r2) { this.placeholder = this.normalizePlaceholder(n2.get("placeholder")), e4.call(this, t3, n2, r2); } return e3.prototype.append = function(e4, t3) { t3.results = this.removePlaceholder(t3.results), e4.call(this, t3); }, e3.prototype.normalizePlaceholder = function(e4, t3) { return "string" == typeof t3 && (t3 = { id: "", text: t3 }), t3; }, e3.prototype.removePlaceholder = function(e4, t3) { for (var n2 = t3.slice(0), r2 = t3.length - 1; 0 <= r2; r2--) { var i2 = t3[r2]; this.placeholder.id === i2.id && n2.splice(r2, 1); } return n2; }, e3; }), e2.define("select2/dropdown/infiniteScroll", ["jquery"], function(n2) { function e3(e4, t3, n3, r2) { this.lastParams = {}, e4.call(this, t3, n3, r2), this.$loadingMore = this.createLoadingMore(), this.loading = false; } return e3.prototype.append = function(e4, t3) { this.$loadingMore.remove(), this.loading = false, e4.call(this, t3), this.showLoadingMore(t3) && (this.$results.append(this.$loadingMore), this.loadMoreIfNeeded()); }, e3.prototype.bind = function(e4, t3, n3) { var r2 = this; e4.call(this, t3, n3), t3.on("query", function(e5) { r2.lastParams = e5, r2.loading = true; }), t3.on("query:append", function(e5) { r2.lastParams = e5, r2.loading = true; }), this.$results.on("scroll", this.loadMoreIfNeeded.bind(this)); }, e3.prototype.loadMoreIfNeeded = function() { var e4 = n2.contains(document.documentElement, this.$loadingMore[0]); if (!this.loading && e4) { var t3 = this.$results.offset().top + this.$results.outerHeight(false); this.$loadingMore.offset().top + this.$loadingMore.outerHeight(false) <= t3 + 50 && this.loadMore(); } }, e3.prototype.loadMore = function() { this.loading = true; var e4 = n2.extend({}, { page: 1 }, this.lastParams); e4.page++, this.trigger("query:append", e4); }, e3.prototype.showLoadingMore = function(e4, t3) { return t3.pagination && t3.pagination.more; }, e3.prototype.createLoadingMore = function() { var e4 = n2('<li class="select2-results__option select2-results__option--load-more"role="option" aria-disabled="true"></li>'), t3 = this.options.get("translations").get("loadingMore"); return e4.html(t3(this.lastParams)), e4; }, e3; }), e2.define("select2/dropdown/attachBody", ["jquery", "../utils"], function(f2, a2) { function e3(e4, t3, n2) { this.$dropdownParent = f2(n2.get("dropdownParent") || document.body), e4.call(this, t3, n2); } return e3.prototype.bind = function(e4, t3, n2) { var r2 = this; e4.call(this, t3, n2), t3.on("open", function() { r2._showDropdown(), r2._attachPositioningHandler(t3), r2._bindContainerResultHandlers(t3); }), t3.on("close", function() { r2._hideDropdown(), r2._detachPositioningHandler(t3); }), this.$dropdownContainer.on("mousedown", function(e5) { e5.stopPropagation(); }); }, e3.prototype.destroy = function(e4) { e4.call(this), this.$dropdownContainer.remove(); }, e3.prototype.position = function(e4, t3, n2) { t3.attr("class", n2.attr("class")), t3.removeClass("select2"), t3.addClass("select2-container--open"), t3.css({ position: "absolute", top: -999999 }), this.$container = n2; }, e3.prototype.render = function(e4) { var t3 = f2("<span></span>"), n2 = e4.call(this); return t3.append(n2), this.$dropdownContainer = t3; }, e3.prototype._hideDropdown = function(e4) { this.$dropdownContainer.detach(); }, e3.prototype._bindContainerResultHandlers = function(e4, t3) { if (!this._containerResultsHandlersBound) { var n2 = this; t3.on("results:all", function() { n2._positionDropdown(), n2._resizeDropdown(); }), t3.on("results:append", function() { n2._positionDropdown(), n2._resizeDropdown(); }), t3.on("results:message", function() { n2._positionDropdown(), n2._resizeDropdown(); }), t3.on("select", function() { n2._positionDropdown(), n2._resizeDropdown(); }), t3.on("unselect", function() { n2._positionDropdown(), n2._resizeDropdown(); }), this._containerResultsHandlersBound = true; } }, e3.prototype._attachPositioningHandler = function(e4, t3) { var n2 = this, r2 = "scroll.select2." + t3.id, i2 = "resize.select2." + t3.id, o2 = "orientationchange.select2." + t3.id, s2 = this.$container.parents().filter(a2.hasScroll); s2.each(function() { a2.StoreData(this, "select2-scroll-position", { x: f2(this).scrollLeft(), y: f2(this).scrollTop() }); }), s2.on(r2, function(e5) { var t4 = a2.GetData(this, "select2-scroll-position"); f2(this).scrollTop(t4.y); }), f2(window).on(r2 + " " + i2 + " " + o2, function(e5) { n2._positionDropdown(), n2._resizeDropdown(); }); }, e3.prototype._detachPositioningHandler = function(e4, t3) { var n2 = "scroll.select2." + t3.id, r2 = "resize.select2." + t3.id, i2 = "orientationchange.select2." + t3.id; this.$container.parents().filter(a2.hasScroll).off(n2), f2(window).off(n2 + " " + r2 + " " + i2); }, e3.prototype._positionDropdown = function() { var e4 = f2(window), t3 = this.$dropdown.hasClass("select2-dropdown--above"), n2 = this.$dropdown.hasClass("select2-dropdown--below"), r2 = null, i2 = this.$container.offset(); i2.bottom = i2.top + this.$container.outerHeight(false); var o2 = { height: this.$container.outerHeight(false) }; o2.top = i2.top, o2.bottom = i2.top + o2.height; var s2 = this.$dropdown.outerHeight(false), a3 = e4.scrollTop(), l2 = e4.scrollTop() + e4.height(), c2 = a3 < i2.top - s2, u2 = l2 > i2.bottom + s2, d = { left: i2.left, top: o2.bottom }, p = this.$dropdownParent; "static" === p.css("position") && (p = p.offsetParent()); var h2 = { top: 0, left: 0 }; (f2.contains(document.body, p[0]) || p[0].isConnected) && (h2 = p.offset()), d.top -= h2.top, d.left -= h2.left, t3 || n2 || (r2 = "below"), u2 || !c2 || t3 ? !c2 && u2 && t3 && (r2 = "below") : r2 = "above", ("above" == r2 || t3 && "below" !== r2) && (d.top = o2.top - h2.top - s2), null != r2 && (this.$dropdown.removeClass("select2-dropdown--below select2-dropdown--above").addClass("select2-dropdown--" + r2), this.$container.removeClass("select2-container--below select2-container--above").addClass("select2-container--" + r2)), this.$dropdownContainer.css(d); }, e3.prototype._resizeDropdown = function() { var e4 = { width: this.$container.outerWidth(false) + "px" }; this.options.get("dropdownAutoWidth") && (e4.minWidth = e4.width, e4.position = "relative", e4.width = "auto"), this.$dropdown.css(e4); }, e3.prototype._showDropdown = function(e4) { this.$dropdownContainer.appendTo(this.$dropdownParent), this._positionDropdown(), this._resizeDropdown(); }, e3; }), e2.define("select2/dropdown/minimumResultsForSearch", [], function() { function e3(e4, t3, n2, r2) { this.minimumResultsForSearch = n2.get("minimumResultsForSearch"), this.minimumResultsForSearch < 0 && (this.minimumResultsForSearch = 1 / 0), e4.call(this, t3, n2, r2); } return e3.prototype.showSearch = function(e4, t3) { return !(function e5(t4) { for (var n2 = 0, r2 = 0; r2 < t4.length; r2++) { var i2 = t4[r2]; i2.children ? n2 += e5(i2.children) : n2++; } return n2; }(t3.data.results) < this.minimumResultsForSearch) && e4.call(this, t3); }, e3; }), e2.define("select2/dropdown/selectOnClose", ["../utils"], function(o2) { function e3() { } return e3.prototype.bind = function(e4, t3, n2) { var r2 = this; e4.call(this, t3, n2), t3.on("close", function(e5) { r2._handleSelectOnClose(e5); }); }, e3.prototype._handleSelectOnClose = function(e4, t3) { if (t3 && null != t3.originalSelect2Event) { var n2 = t3.originalSelect2Event; if ("select" === n2._type || "unselect" === n2._type) return; } var r2 = this.getHighlightedResults(); if (!(r2.length < 1)) { var i2 = o2.GetData(r2[0], "data"); null != i2.element && i2.element.selected || null == i2.element && i2.selected || this.trigger("select", { data: i2 }); } }, e3; }), e2.define("select2/dropdown/closeOnSelect", [], function() { function e3() { } return e3.prototype.bind = function(e4, t3, n2) { var r2 = this; e4.call(this, t3, n2), t3.on("select", function(e5) { r2._selectTriggered(e5); }), t3.on("unselect", function(e5) { r2._selectTriggered(e5); }); }, e3.prototype._selectTriggered = function(e4, t3) { var n2 = t3.originalEvent; n2 && (n2.ctrlKey || n2.metaKey) || this.trigger("close", { originalEvent: n2, originalSelect2Event: t3 }); }, e3; }), e2.define("select2/i18n/en", [], function() { return { errorLoading: function() { return "The results could not be loaded."; }, inputTooLong: function(e3) { var t3 = e3.input.length - e3.maximum, n2 = "Please delete " + t3 + " character"; return 1 != t3 && (n2 += "s"), n2; }, inputTooShort: function(e3) { return "Please enter " + (e3.minimum - e3.input.length) + " or more characters"; }, loadingMore: function() { return "Loading more results…"; }, maximumSelected: function(e3) { var t3 = "You can only select " + e3.maximum + " item"; return 1 != e3.maximum && (t3 += "s"), t3; }, noResults: function() { return "No results found"; }, searching: function() { return "Searching…"; }, removeAllItems: function() { return "Remove all items"; } }; }), e2.define("select2/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(c2, u2, d, p, h2, f2, g2, m2, v2, y2, s2, t3, _2, $2, w2, b2, A2, x2, D2, S2, E, C, O, T, q, L, I, j, e3) { function n2() { this.reset(); } return n2.prototype.apply = function(e4) { if (null == (e4 = c2.extend(true, {}, this.defaults, e4)).dataAdapter) { if (null != e4.ajax ? e4.dataAdapter = w2 : null != e4.data ? e4.dataAdapter = $2 : e4.dataAdapter = _2, 0 < e4.minimumInputLength && (e4.dataAdapter = y2.Decorate(e4.dataAdapter, x2)), 0 < e4.maximumInputLength && (e4.dataAdapter = y2.Decorate(e4.dataAdapter, D2)), 0 < e4.maximumSelectionLength && (e4.dataAdapter = y2.Decorate(e4.dataAdapter, S2)), e4.tags && (e4.dataAdapter = y2.Decorate(e4.dataAdapter, b2)), null == e4.tokenSeparators && null == e4.tokenizer || (e4.dataAdapter = y2.Decorate(e4.dataAdapter, A2)), null != e4.query) { var t4 = u2(e4.amdBase + "compat/query"); e4.dataAdapter = y2.Decorate(e4.dataAdapter, t4); } if (null != e4.initSelection) { var n3 = u2(e4.amdBase + "compat/initSelection"); e4.dataAdapter = y2.Decorate(e4.dataAdapter, n3); } } if (null == e4.resultsAdapter && (e4.resultsAdapter = d, null != e4.ajax && (e4.resultsAdapter = y2.Decorate(e4.resultsAdapter, T)), null != e4.placeholder && (e4.resultsAdapter = y2.Decorate(e4.resultsAdapter, O)), e4.selectOnClose && (e4.resultsAdapter = y2.Decorate(e4.resultsAdapter, I))), null == e4.dropdownAdapter) { if (e4.multiple) e4.dropdownAdapter = E; else { var r2 = y2.Decorate(E, C); e4.dropdownAdapter = r2; } if (0 !== e4.minimumResultsForSearch && (e4.dropdownAdapter = y2.Decorate(e4.dropdownAdapter, L)), e4.closeOnSelect && (e4.dropdownAdapter = y2.Decorate(e4.dropdownAdapter, j)), null != e4.dropdownCssClass || null != e4.dropdownCss || null != e4.adaptDropdownCssClass) { var i2 = u2(e4.amdBase + "compat/dropdownCss"); e4.dropdownAdapter = y2.Decorate(e4.dropdownAdapter, i2); } e4.dropdownAdapter = y2.Decorate(e4.dropdownAdapter, q); } if (null == e4.selectionAdapter) { if (e4.multiple ? e4.selectionAdapter = h2 : e4.selectionAdapter = p, null != e4.placeholder && (e4.selectionAdapter = y2.Decorate(e4.selectionAdapter, f2)), e4.allowClear && (e4.selectionAdapter = y2.Decorate(e4.selectionAdapter, g2)), e4.multiple && (e4.selectionAdapter = y2.Decorate(e4.selectionAdapter, m2)), null != e4.containerCssClass || null != e4.containerCss || null != e4.adaptContainerCssClass) { var o2 = u2(e4.amdBase + "compat/containerCss"); e4.selectionAdapter = y2.Decorate(e4.selectionAdapter, o2); } e4.selectionAdapter = y2.Decorate(e4.selectionAdapter, v2); } e4.language = this._resolveLanguage(e4.language), e4.language.push("en"); for (var s3 = [], a2 = 0; a2 < e4.language.length; a2++) { var l2 = e4.language[a2]; -1 === s3.indexOf(l2) && s3.push(l2); } return e4.language = s3, e4.translations = this._processTranslations(e4.language, e4.debug), e4; }, n2.prototype.reset = function() { function a2(e4) { return e4.replace(/[^\u0000-\u007E]/g, function(e5) { return t3[e5] || e5; }); } this.defaults = { amdBase: "./", amdLanguageBase: "./i18n/", closeOnSelect: true, debug: false, dropdownAutoWidth: false, escapeMarkup: y2.escapeMarkup, language: {}, matcher: function e4(t4, n3) { if ("" === c2.trim(t4.term)) return n3; if (n3.children && 0 < n3.children.length) { for (var r2 = c2.extend(true, {}, n3), i2 = n3.children.length - 1; 0 <= i2; i2--) null == e4(t4, n3.children[i2]) && r2.children.splice(i2, 1); return 0 < r2.children.length ? r2 : e4(t4, r2); } var o2 = a2(n3.text).toUpperCase(), s3 = a2(t4.term).toUpperCase(); return -1 < o2.indexOf(s3) ? n3 : null; }, minimumInputLength: 0, maximumInputLength: 0, maximumSelectionLength: 0, minimumResultsForSearch: 0, selectOnClose: false, scrollAfterSelect: false, sorter: function(e4) { return e4; }, templateResult: function(e4) { return e4.text; }, templateSelection: function(e4) { return e4.text; }, theme: "default", width: "resolve" }; }, n2.prototype.applyFromElement = function(e4, t4) { var n3 = e4.language, r2 = this.defaults.language, i2 = t4.prop("lang"), o2 = t4.closest("[lang]").prop("lang"), s3 = Array.prototype.concat.call(this._resolveLanguage(i2), this._resolveLanguage(n3), this._resolveLanguage(r2), this._resolveLanguage(o2)); return e4.language = s3, e4; }, n2.prototype._resolveLanguage = function(e4) { if (!e4) return []; if (c2.isEmptyObject(e4)) return []; if (c2.isPlainObject(e4)) return [e4]; var t4; t4 = c2.isArray(e4) ? e4 : [e4]; for (var n3 = [], r2 = 0; r2 < t4.length; r2++) if (n3.push(t4[r2]), "string" == typeof t4[r2] && 0 < t4[r2].indexOf("-")) { var i2 = t4[r2].split("-")[0]; n3.push(i2); } return n3; }, n2.prototype._processTranslations = function(e4, t4) { for (var n3 = new s2(), r2 = 0; r2 < e4.length; r2++) { var i2 = new s2(), o2 = e4[r2]; if ("string" == typeof o2) try { i2 = s2.loadPath(o2); } catch (e5) { try { o2 = this.defaults.amdLanguageBase + o2, i2 = s2.loadPath(o2); } catch (e6) { t4 && window.console && console.warn && console.warn('Select2: The language file for "' + o2 + '" could not be automatically loaded. A fallback will be used instead.'); } } else i2 = c2.isPlainObject(o2) ? new s2(o2) : o2; n3.extend(i2); } return n3; }, n2.prototype.set = function(e4, t4) { var n3 = {}; n3[c2.camelCase(e4)] = t4; var r2 = y2._convertData(n3); c2.extend(true, this.defaults, r2); }, new n2(); }), e2.define("select2/options", ["require", "jquery", "./defaults", "./utils"], function(r2, d, i2, p) { function e3(e4, t3) { if (this.options = e4, null != t3 && this.fromElement(t3), null != t3 && (this.options = i2.applyFromElement(this.options, t3)), this.options = i2.apply(this.options), t3 && t3.is("input")) { var n2 = r2(this.get("amdBase") + "compat/inputData"); this.options.dataAdapter = p.Decorate(this.options.dataAdapter, n2); } } return e3.prototype.fromElement = function(e4) { var t3 = ["select2"]; null == this.options.multiple && (this.options.multiple = e4.prop("multiple")), null == this.options.disabled && (this.options.disabled = e4.prop("disabled")), null == this.options.dir && (e4.prop("dir") ? this.options.dir = e4.prop("dir") : e4.closest("[dir]").prop("dir") ? this.options.dir = e4.closest("[dir]").prop("dir") : this.options.dir = "ltr"), e4.prop("disabled", this.options.disabled), e4.prop("multiple", this.options.multiple), p.GetData(e4[0], "select2Tags") && (this.options.debug && window.console && console.warn && console.warn('Select2: The `data-select2-tags` attribute has been changed to use the `data-data` and `data-tags="true"` attributes and will be removed in future versions of Select2.'), p.StoreData(e4[0], "data", p.GetData(e4[0], "select2Tags")), p.StoreData(e4[0], "tags", true)), p.GetData(e4[0], "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."), e4.attr("ajax--url", p.GetData(e4[0], "ajaxUrl")), p.StoreData(e4[0], "ajax-Url", p.GetData(e4[0], "ajaxUrl"))); var n2 = {}; function r3(e5, t4) { return t4.toUpperCase(); } for (var i3 = 0; i3 < e4[0].attributes.length; i3++) { var o2 = e4[0].attributes[i3].name, s2 = "data-"; if (o2.substr(0, s2.length) == s2) { var a2 = o2.substring(s2.length), l2 = p.GetData(e4[0], a2); n2[a2.replace(/-([a-z])/g, r3)] = l2; } } d.fn.jquery && "1." == d.fn.jquery.substr(0, 2) && e4[0].dataset && (n2 = d.extend(true, {}, e4[0].dataset, n2)); var c2 = d.extend(true, {}, p.GetData(e4[0]), n2); for (var u2 in c2 = p._convertData(c2)) -1 < d.inArray(u2, t3) || (d.isPlainObject(this.options[u2]) ? d.extend(this.options[u2], c2[u2]) : this.options[u2] = c2[u2]); return this; }, e3.prototype.get = function(e4) { return this.options[e4]; }, e3.prototype.set = function(e4, t3) { this.options[e4] = t3; }, e3; }), e2.define("select2/core", ["jquery", "./options", "./utils", "./keys"], function(i2, c2, u2, r2) { var d = function(e3, t3) { null != u2.GetData(e3[0], "select2") && u2.GetData(e3[0], "select2").destroy(), this.$element = e3, this.id = this._generateId(e3), t3 = t3 || {}, this.options = new c2(t3, e3), d.__super__.constructor.call(this); var n2 = e3.attr("tabindex") || 0; u2.StoreData(e3[0], "old-tabindex", n2), e3.attr("tabindex", "-1"); var r3 = this.options.get("dataAdapter"); this.dataAdapter = new r3(e3, this.options); var i3 = this.render(); this._placeContainer(i3); var o2 = this.options.get("selectionAdapter"); this.selection = new o2(e3, this.options), this.$selection = this.selection.render(), this.selection.position(this.$selection, i3); var s2 = this.options.get("dropdownAdapter"); this.dropdown = new s2(e3, this.options), this.$dropdown = this.dropdown.render(), this.dropdown.position(this.$dropdown, i3); var a2 = this.options.get("resultsAdapter"); this.results = new a2(e3, this.options, this.dataAdapter), this.$results = this.results.render(), this.results.position(this.$results, this.$dropdown); var l2 = this; this._bindAdapters(), this._registerDomEvents(), this._registerDataEvents(), this._registerSelectionEvents(), this._registerDropdownEvents(), this._registerResultsEvents(), this._registerEvents(), this.dataAdapter.current(function(e4) { l2.trigger("selection:update", { data: e4 }); }), e3.addClass("select2-hidden-accessible"), e3.attr("aria-hidden", "true"), this._syncAttributes(), u2.StoreData(e3[0], "select2", this), e3.data("select2", this); }; return u2.Extend(d, u2.Observable), d.prototype._generateId = function(e3) { return "select2-" + (null != e3.attr("id") ? e3.attr("id") : null != e3.attr("name") ? e3.attr("name") + "-" + u2.generateChars(2) : u2.generateChars(4)).replace(/(:|\.|\[|\]|,)/g, ""); }, d.prototype._placeContainer = function(e3) { e3.insertAfter(this.$element); var t3 = this._resolveWidth(this.$element, this.options.get("width")); null != t3 && e3.css("width", t3); }, d.prototype._resolveWidth = function(e3, t3) { var n2 = /^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i; if ("resolve" == t3) { var r3 = this._resolveWidth(e3, "style"); return null != r3 ? r3 : this._resolveWidth(e3, "element"); } if ("element" == t3) { var i3 = e3.outerWidth(false); return i3 <= 0 ? "auto" : i3 + "px"; } if ("style" != t3) return "computedstyle" != t3 ? t3 : window.getComputedStyle(e3[0]).width; var o2 = e3.attr("style"); if ("string" != typeof o2) return null; for (var s2 = o2.split(";"), a2 = 0, l2 = s2.length; a2 < l2; a2 += 1) { var c3 = s2[a2].replace(/\s/g, "").match(n2); if (null !== c3 && 1 <= c3.length) return c3[1]; } return null; }, d.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); }, d.prototype._registerDomEvents = function() { var t3 = this; this.$element.on("change.select2", function() { t3.dataAdapter.current(function(e4) { t3.trigger("selection:update", { data: e4 }); }); }), this.$element.on("focus.select2", function(e4) { t3.trigger("focus", e4); }), this._syncA = u2.bind(this._syncAttributes, this), this._syncS = u2.bind(this._syncSubtree, this), this.$element[0].attachEvent && this.$element[0].attachEvent("onpropertychange", this._syncA); var e3 = window.MutationObserver || window.WebKitMutationObserver || window.MozMutationObserver; null != e3 ? (this._observer = new e3(function(e4) { i2.each(e4, t3._syncA), i2.each(e4, t3._syncS); }), this._observer.observe(this.$element[0], { attributes: true, childList: true, subtree: false })) : this.$element[0].addEventListener && (this.$element[0].addEventListener("DOMAttrModified", t3._syncA, false), this.$element[0].addEventListener("DOMNodeInserted", t3._syncS, false), this.$element[0].addEventListener("DOMNodeRemoved", t3._syncS, false)); }, d.prototype._registerDataEvents = function() { var n2 = this; this.dataAdapter.on("*", function(e3, t3) { n2.trigger(e3, t3); }); }, d.prototype._registerSelectionEvents = function() { var n2 = this, r3 = ["toggle", "focus"]; this.selection.on("toggle", function() { n2.toggleDropdown(); }), this.selection.on("focus", function(e3) { n2.focus(e3); }), this.selection.on("*", function(e3, t3) { -1 === i2.inArray(e3, r3) && n2.trigger(e3, t3); }); }, d.prototype._registerDropdownEvents = function() { var n2 = this; this.dropdown.on("*", function(e3, t3) { n2.trigger(e3, t3); }); }, d.prototype._registerResultsEvents = function() { var n2 = this; this.results.on("*", function(e3, t3) { n2.trigger(e3, t3); }); }, d.prototype._registerEvents = function() { var n2 = this; this.on("open", function() { n2.$container.addClass("select2-container--open"); }), this.on("close", function() { n2.$container.removeClass("select2-container--open"); }), this.on("enable", function() { n2.$container.removeClass("select2-container--disabled"); }), this.on("disable", function() { n2.$container.addClass("select2-container--disabled"); }), this.on("blur", function() { n2.$container.removeClass("select2-container--focus"); }), this.on("query", function(t3) { n2.isOpen() || n2.trigger("open", {}), this.dataAdapter.query(t3, function(e3) { n2.trigger("results:all", { data: e3, query: t3 }); }); }), this.on("query:append", function(t3) { this.dataAdapter.query(t3, function(e3) { n2.trigger("results:append", { data: e3, query: t3 }); }); }), this.on("keypress", function(e3) { var t3 = e3.which; n2.isOpen() ? t3 === r2.ESC || t3 === r2.TAB || t3 === r2.UP && e3.altKey ? (n2.close(), e3.preventDefault()) : t3 === r2.ENTER ? (n2.trigger("results:select", {}), e3.preventDefault()) : t3 === r2.SPACE && e3.ctrlKey ? (n2.trigger("results:toggle", {}), e3.preventDefault()) : t3 === r2.UP ? (n2.trigger("results:previous", {}), e3.preventDefault()) : t3 === r2.DOWN && (n2.trigger("results:next", {}), e3.preventDefault()) : (t3 === r2.ENTER || t3 === r2.SPACE || t3 === r2.DOWN && e3.altKey) && (n2.open(), e3.preventDefault()); }); }, d.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", {}); }, d.prototype._syncSubtree = function(e3, t3) { var n2 = false, r3 = this; if (!e3 || !e3.target || "OPTION" === e3.target.nodeName || "OPTGROUP" === e3.target.nodeName) { if (t3) { if (t3.addedNodes && 0 < t3.addedNodes.length) for (var i3 = 0; i3 < t3.addedNodes.length; i3++) { t3.addedNodes[i3].selected && (n2 = true); } else t3.removedNodes && 0 < t3.removedNodes.length && (n2 = true); } else n2 = true; n2 && this.dataAdapter.current(function(e4) { r3.trigger("selection:update", { data: e4 }); }); } }, d.prototype.trigger = function(e3, t3) { var n2 = d.__super__.trigger, r3 = { open: "opening", close: "closing", select: "selecting", unselect: "unselecting", clear: "clearing" }; if (void 0 === t3 && (t3 = {}), e3 in r3) { var i3 = r3[e3], o2 = { prevented: false, name: e3, args: t3 }; if (n2.call(this, i3, o2), o2.prevented) return void (t3.prevented = true); } n2.call(this, e3, t3); }, d.prototype.toggleDropdown = function() { this.options.get("disabled") || (this.isOpen() ? this.close() : this.open()); }, d.prototype.open = function() { this.isOpen() || this.trigger("query", {}); }, d.prototype.close = function() { this.isOpen() && this.trigger("close", {}); }, d.prototype.isOpen = function() { return this.$container.hasClass("select2-container--open"); }, d.prototype.hasFocus = function() { return this.$container.hasClass("select2-container--focus"); }, d.prototype.focus = function(e3) { this.hasFocus() || (this.$container.addClass("select2-container--focus"), this.trigger("focus", {})); }, d.prototype.enable = function(e3) { this.options.get("debug") && window.console && console.warn && console.warn('Select2: The `select2("enable")` method has been deprecated and will be removed in later Select2 versions. Use $element.prop("disabled") instead.'), null != e3 && 0 !== e3.length || (e3 = [true]); var t3 = !e3[0]; this.$element.prop("disabled", t3); }, d.prototype.data = function() { this.options.get("debug") && 0 < arguments.length && window.console && console.warn && console.warn('Select2: Data can no longer be set using `select2("data")`. You should consider setting the value instead using `$element.val()`.'); var t3 = []; return this.dataAdapter.current(function(e3) { t3 = e3; }), t3; }, d.prototype.val = function(e3) { if (this.options.get("debug") && window.console && console.warn && console.warn('Select2: The `select2("val")` method has been deprecated and will be removed in later Select2 versions. Use $element.val() instead.'), null == e3 || 0 === e3.length) return this.$element.val(); var t3 = e3[0]; i2.isArray(t3) && (t3 = i2.map(t3, function(e4) { return e4.toString(); })), this.$element.val(t3).trigger("change"); }, d.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, false), this.$element[0].removeEventListener("DOMNodeInserted", this._syncS, false), this.$element[0].removeEventListener("DOMNodeRemoved", this._syncS, false)), this._syncA = null, this._syncS = null, this.$element.off(".select2"), this.$element.attr("tabindex", u2.GetData(this.$element[0], "old-tabindex")), this.$element.removeClass("select2-hidden-accessible"), this.$element.attr("aria-hidden", "false"), u2.RemoveData(this.$element[0]), this.$element.removeData("select2"), this.dataAdapter.destroy(), this.selection.destroy(), this.dropdown.destroy(), this.results.destroy(), this.dataAdapter = null, this.selection = null, this.dropdown = null, this.results = null; }, d.prototype.render = function() { var e3 = i2('<span class="select2 select2-container"><span class="selection"></span><span class="dropdown-wrapper" aria-hidden="true"></span></span>'); return e3.attr("dir", this.options.get("dir")), this.$container = e3, this.$container.addClass("select2-container--" + this.options.get("theme")), u2.StoreData(e3[0], "element", this.$element), e3; }, d; }), e2.define("jquery-mousewheel", ["jquery"], function(e3) { return e3; }), e2.define("jquery.select2", ["jquery", "jquery-mousewheel", "./select2/core", "./select2/defaults", "./select2/utils"], function(i2, e3, o2, t3, s2) { if (null == i2.fn.select2) { var a2 = ["open", "close", "destroy"]; i2.fn.select2 = function(t4) { if ("object" == typeof (t4 = t4 || {})) return this.each(function() { var e4 = i2.extend(true, {}, t4); new o2(i2(this), e4); }), this; if ("string" != typeof t4) throw new Error("Invalid arguments for Select2: " + t4); var n2, r2 = Array.prototype.slice.call(arguments, 1); return this.each(function() { var e4 = s2.GetData(this, "select2"); null == e4 && window.console && console.error && console.error("The select2('" + t4 + "') method was called on an element that is not using Select2."), n2 = e4[t4].apply(e4, r2); }), -1 < i2.inArray(t4, a2) ? this : n2; }; } return null == i2.fn.select2.defaults && (i2.fn.select2.defaults = t3), o2; }), { define: e2.define, require: e2.require }; }(), t = e.require("jquery.select2"); return u.fn.select2.amd = e, t; }); })();
该页面使用的模板:
Template:Gadget Header
(
查看源代码
)
返回
MediaWiki:Gadget-select2.js
。
开关有限宽度模式